A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
global: implement the new theme engine (#2196)
Ammar Ahmed622294b80772
diff --git a/.commitlintrc.js b/.commitlintrc.jsindex 7c7181e21..3bc3fcbdc 100644--- a/.commitlintrc.js+++ b/.commitlintrc.js@@ -20,8 +20,10 @@ const SCOPES = ["editor","logger","theme",+ "server","core","fs",+ "ui","clipper","config","ci",diff --git a/apps/mobile/app/app.js b/apps/mobile/app/app.jsindex 4238a5ad1..23d37761b 100644--- a/apps/mobile/app/app.js+++ b/apps/mobile/app/app.js@@ -16,6 +16,10 @@ GNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import {+ THEME_COMPATIBILITY_VERSION,+ useThemeEngineStore+} from "@notesnook/theme";import React, { useEffect } from "react";import { View } from "react-native";import "react-native-gesture-handler";@@ -29,7 +33,9 @@ import { ApplicationHolder } from "./navigation";import Notifications from "./services/notifications";import SettingsService from "./services/settings";import { TipManager } from "./services/tip-manager";+import { useThemeStore } from "./stores/use-theme-store";import { useUserStore } from "./stores/use-user-store";+import { themeTrpcClient } from "./screens/settings/theme-selector";SettingsService.init();SettingsService.checkOrientation();@@ -87,4 +93,43 @@ const App = () => {);};-export default withErrorBoundry(App, "App");+export const withTheme = (Element) => {+ return function AppWithThemeProvider() {+ const [colorScheme, darkTheme, lightTheme] = useThemeStore((state) => [+ state.colorScheme,+ state.darkTheme,+ state.lightTheme+ ]);++ useEffect(() => {+ const currentTheme = colorScheme === "dark" ? darkTheme : lightTheme;+ if (!currentTheme) return;+ themeTrpcClient.updateTheme+ .query({+ version: currentTheme.version,+ compatibilityVersion: THEME_COMPATIBILITY_VERSION,+ id: currentTheme.id+ })+ .then((theme) => {+ if (theme) {+ console.log(theme.version, "theme updated");+ theme.colorScheme === "dark"+ ? useThemeStore.getState().setDarkTheme(theme)+ : useThemeStore.getState().setLightTheme(theme);+ }+ })+ .catch(console.log);+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, []);++ useEffect(() => {+ useThemeEngineStore+ .getState()+ .setTheme(colorScheme === "dark" ? darkTheme : lightTheme);+ }, [colorScheme, darkTheme, lightTheme]);++ return <Element />;+ };+};++export default withTheme(withErrorBoundry(App, "App"));diff --git a/apps/mobile/app/components/announcements/announcement.js b/apps/mobile/app/components/announcements/announcement.jsindex caa1d5c25..5e80d59f5 100644--- a/apps/mobile/app/components/announcements/announcement.js+++ b/apps/mobile/app/components/announcements/announcement.js@@ -21,18 +21,18 @@ import React from "react";import { FlatList, View } from "react-native";import { useSelectionStore } from "../../stores/use-selection-store";import { useMessageStore } from "../../stores/use-message-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { allowedOnPlatform, renderItem } from "./functions";export const Announcement = ({ color }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const announcements = useMessageStore((state) => state.announcements);let announcement = announcements.length > 0 ? announcements[0] : null;const selectionMode = useSelectionStore((state) => state.selectionMode);return !announcement || selectionMode ? null : (<Viewstyle={{- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,width: "100%",paddingHorizontal: 12,paddingTop: 12,@@ -44,28 +44,26 @@ export const Announcement = ({ color }) => {width: "100%",borderRadius: 10,overflow: "hidden",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,paddingBottom: 12}}>- <View>- <FlatList- style={{- width: "100%",- marginTop: 12- }}- data={announcement?.body.filter((item) =>- allowedOnPlatform(item.platforms)- )}- renderItem={({ item, index }) =>+ <View+ style={{+ width: "100%",+ marginTop: 12+ }}+ >+ {announcement?.body+ .filter((item) => allowedOnPlatform(item.platforms))+ .map((item, index) =>renderItem({item: item,index: index,color: colors[color],inline: true})- }- />+ )}</View></View></View>diff --git a/apps/mobile/app/components/announcements/cta.js b/apps/mobile/app/components/announcements/cta.jsindex 84428a39d..39cdf2fd3 100644--- a/apps/mobile/app/components/announcements/cta.js+++ b/apps/mobile/app/components/announcements/cta.js@@ -22,7 +22,7 @@ import { Linking, View } from "react-native";//import SettingsBackupAndRestore from '../../screens/settings/backup-restore';import { eSendEvent, presentSheet } from "../../services/event-manager";import Sync from "../../services/sync";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eCloseAnnouncementDialog, eCloseSheet } from "../../utils/events";import { SIZE } from "../../utils/size";import { sleep } from "../../utils/time";@@ -33,7 +33,7 @@ import { Button } from "../ui/button";import { allowedOnPlatform, getStyle } from "./functions";export const Cta = ({ actions, style = {}, color, inline }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();let buttons =actions.filter((item) => allowedOnPlatform(item.platforms)) || [];@@ -92,8 +92,7 @@ export const Cta = ({ actions, style = {}, color, inline }) => {style={{height: 30,alignSelf: "flex-start",- paddingHorizontal: 0,- marginTop: -6+ paddingHorizontal: 0}}/>))}@@ -111,7 +110,6 @@ export const Cta = ({ actions, style = {}, color, inline }) => {style={{alignSelf: "flex-start",paddingHorizontal: 0,- marginTop: -6,marginLeft: 12}}textStyle={{@@ -129,9 +127,9 @@ export const Cta = ({ actions, style = {}, color, inline }) => {title={item.title}fontSize={SIZE.md}buttonType={{- color: color ? color : colors.accent,- text: colors.light,- selected: color ? color : colors.accent,+ color: color ? color : colors.primary.accent,+ text: colors.static.white,+ selected: color ? color : colors.primary.accent,opacity: 1}}onPress={() => onPress(item)}diff --git a/apps/mobile/app/components/announcements/index.js b/apps/mobile/app/components/announcements/index.jsindex 4487bbf6e..889a538f5 100644--- a/apps/mobile/app/components/announcements/index.js+++ b/apps/mobile/app/components/announcements/index.js@@ -25,7 +25,7 @@ import {eUnSubscribeEvent} from "../../services/event-manager";import { useMessageStore } from "../../stores/use-message-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import {eCloseAnnouncementDialog,eOpenAnnouncementDialog@@ -35,7 +35,7 @@ import { allowedOnPlatform, renderItem } from "./functions";import { useCallback } from "react";export const AnnouncementDialog = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [visible, setVisible] = useState(false);const [info, setInfo] = useState(null);const remove = useMessageStore((state) => state.remove);@@ -73,7 +73,7 @@ export const AnnouncementDialog = () => {<Viewstyle={{width: DDS.isTab ? 600 : "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,maxHeight: DDS.isTab ? "90%" : "100%",borderRadius: DDS.isTab ? 10 : 0,overflow: "hidden",diff --git a/apps/mobile/app/components/app-lock-overlay/index.js b/apps/mobile/app/components/app-lock-overlay/index.jsindex cf60f4d5a..aa95866dc 100644--- a/apps/mobile/app/components/app-lock-overlay/index.js+++ b/apps/mobile/app/components/app-lock-overlay/index.js@@ -24,7 +24,7 @@ import { db } from "../../common/database";import { useAppState } from "../../hooks/use-app-state";import BiometricService from "../../services/biometrics";import { useSettingStore } from "../../stores/use-setting-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useUserStore } from "../../stores/use-user-store";import { NotesnookModule } from "../../utils/notesnook-module";import { SIZE } from "../../utils/size";@@ -36,7 +36,7 @@ import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";const AppLockedOverlay = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const user = useUserStore((state) => state.user);const appLocked = useUserStore((state) => state.appLocked);const lockApp = useUserStore((state) => state.lockApp);@@ -134,10 +134,10 @@ const AppLockedOverlay = () => {marginTop: user ? 0 : 50}}onPress={onUnlockAppRequested}- color={colors.border}+ color={colors.primary.border}/><Heading- color={colors.heading}+ color={colors.primary.heading}style={{alignSelf: "center",textAlign: "center"diff --git a/apps/mobile/app/components/attachments/actions.js b/apps/mobile/app/components/attachments/actions.jsindex b3b0c2c86..bea5d0e41 100644--- a/apps/mobile/app/components/attachments/actions.js+++ b/apps/mobile/app/components/attachments/actions.js@@ -33,7 +33,7 @@ import {} from "../../services/event-manager";import PremiumService from "../../services/premium";import { useAttachmentStore } from "../../stores/use-attachment-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eCloseAttachmentDialog, eCloseSheet } from "../../utils/events";import { SIZE } from "../../utils/size";import { sleep } from "../../utils/time";@@ -49,7 +49,7 @@ import Paragraph from "../ui/typography/paragraph";import { formatBytes } from "@notesnook/common";const Actions = ({ attachment, setAttachments, fwdRef }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const contextId = attachment.metadata.hash;const [filename, setFilename] = useState(attachment.metadata.filename);const [currentProgress] = useAttachmentProgress(attachment);@@ -194,7 +194,7 @@ const Actions = ({ attachment, setAttachments, fwdRef }) => {<Viewstyle={{borderBottomWidth: 1,- borderBottomColor: colors.nav,+ borderBottomColor: colors.secondary.background,marginBottom: notes && notes.length > 0 ? 0 : 12}}>@@ -219,7 +219,7 @@ const Actions = ({ attachment, setAttachments, fwdRef }) => {style={{marginRight: 10}}- color={colors.icon}+ color={colors.secondary.paragraph}>{attachment.metadata.type}</Paragraph>@@ -228,7 +228,7 @@ const Actions = ({ attachment, setAttachments, fwdRef }) => {marginRight: 10}}size={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}>{formatBytes(attachment.length)}</Paragraph>@@ -239,7 +239,7 @@ const Actions = ({ attachment, setAttachments, fwdRef }) => {marginRight: 10}}size={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}>{attachment.noteIds.length} note{attachment.noteIds.length > 1 ? "s" : ""}@@ -255,7 +255,7 @@ const Actions = ({ attachment, setAttachments, fwdRef }) => {});}}size={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}>{attachment.metadata.hash}</Paragraph>@@ -268,7 +268,7 @@ const Actions = ({ attachment, setAttachments, fwdRef }) => {<Viewstyle={{borderBottomWidth: 1,- borderBottomColor: colors.nav,+ borderBottomColor: colors.secondary.background,marginBottom: 12,paddingVertical: 12}}@@ -322,10 +322,10 @@ const Actions = ({ attachment, setAttachments, fwdRef }) => {key={item.name}buttonType={{text: item.on- ? colors.accent+ ? colors.primary.accent: item.name === "Delete" || item.name === "PermDelete"- ? colors.errorText- : colors.pri+ ? colors.error.paragraph+ : colors.primary.paragraph}}onPress={item.onPress}title={item.name}diff --git a/apps/mobile/app/components/attachments/attachment-item.js b/apps/mobile/app/components/attachments/attachment-item.jsindex 0c8e723a6..ad24b8d47 100644--- a/apps/mobile/app/components/attachments/attachment-item.js+++ b/apps/mobile/app/components/attachments/attachment-item.js@@ -23,7 +23,7 @@ import { TouchableOpacity, View } from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { db } from "../../common/database";import { useAttachmentProgress } from "../../hooks/use-attachment-progress";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { IconButton } from "../ui/icon-button";import { ProgressCircleComponent } from "../ui/svg/lazy";@@ -43,12 +43,11 @@ export const AttachmentItem = ({hideWhenNotDownloading,context}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [currentProgress, setCurrentProgress] = useAttachmentProgress(attachment,encryption);-const onPress = () => {if (!pressable) return;Actions.present(attachment, setAttachments, context);@@ -66,7 +65,7 @@ export const AttachmentItem = ({padding: 12,paddingVertical: 6,borderRadius: 5,- backgroundColor: colors.nav+ backgroundColor: colors.secondary.background}}type="grayBg">@@ -84,12 +83,12 @@ export const AttachmentItem = ({marginLeft: -5}}>- <Icon name="file" size={SIZE.xxxl} color={colors.icon} />+ <Icon name="file" size={SIZE.xxxl} color={colors.primary.icon} /><ParagraphadjustsFontSizeToFitsize={6}- color={colors.light}+ color={colors.static.white}style={{position: "absolute"}}@@ -112,13 +111,13 @@ export const AttachmentItem = ({}}numberOfLines={1}lineBreakMode="middle"- color={colors.pri}+ color={colors.primary.paragraph}>{attachment.metadata.filename}</Paragraph>{!hideWhenNotDownloading ? (- <Paragraph color={colors.icon} size={SIZE.xs}>+ <Paragraph color={colors.secondary.paragraph} size={SIZE.xs}>{formatBytes(attachment.length)}{" "}{currentProgress?.type? "(" + currentProgress.type + "ing - tap to cancel)"@@ -150,7 +149,7 @@ export const AttachmentItem = ({textStyle={{fontSize: 10}}- color={colors.accent}+ color={colors.primary.accent}formatText={(progress) => (progress * 100).toFixed(0)}borderWidth={0}thickness={2}@@ -162,7 +161,7 @@ export const AttachmentItem = ({<IconButtononPress={onPress}name="alert-circle-outline"- color={colors.errorText}+ color={colors.error.paragraph}/>) : null}</>diff --git a/apps/mobile/app/components/attachments/download-attachments.js b/apps/mobile/app/components/attachments/download-attachments.jsindex 71b9deb8e..3d8bff584 100644--- a/apps/mobile/app/components/attachments/download-attachments.js+++ b/apps/mobile/app/components/attachments/download-attachments.js@@ -26,12 +26,12 @@ import { Button } from "../ui/button";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";import { ProgressBarComponent } from "../ui/svg/lazy";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { FlatList } from "react-native-actions-sheet";import { AttachmentItem } from "./attachment-item";const DownloadAttachments = ({ close, attachments, isNote, update }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [downloading, setDownloading] = useState(false);const [progress, setProgress] = useState({value: 0,@@ -158,8 +158,8 @@ const DownloadAttachments = ({ close, attachments, isNote, update }) => {animated={true}useNativeDriverprogress={progress.value ? progress.value / attachments.length : 0}- unfilledColor={colors.nav}- color={colors.accent}+ unfilledColor={colors.secondary.background}+ color={colors.primary.accent}borderWidth={0}/></View>@@ -170,7 +170,7 @@ const DownloadAttachments = ({ close, attachments, isNote, update }) => {maxHeight: 300,width: "100%",minHeight: 60,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginVertical: 12}}@@ -184,7 +184,9 @@ const DownloadAttachments = ({ close, attachments, isNote, update }) => {height: 60}}>- <Paragraph color={colors.icon}>No downloads in progress.</Paragraph>+ <Paragraph color={colors.secondary.paragraph}>+ No downloads in progress.+ </Paragraph></View>}keyExtractor={(item) => item.id}diff --git a/apps/mobile/app/components/attachments/index.js b/apps/mobile/app/components/attachments/index.jsindex 14b286688..421a4a206 100644--- a/apps/mobile/app/components/attachments/index.js+++ b/apps/mobile/app/components/attachments/index.js@@ -24,7 +24,7 @@ import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { db } from "../../common/database";import filesystem from "../../common/filesystem";import { presentSheet } from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import SheetProvider from "../sheet-provider";import { IconButton } from "../ui/icon-button";@@ -45,7 +45,7 @@ import { useSettingStore } from "../../stores/use-setting-store";import { FlashList } from "react-native-actions-sheet/dist/src/views/FlashList";export const AttachmentDialog = ({ note }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const { height } = useSettingStore((state) => state.dimensions);const [attachments, setAttachments] = useState(note@@ -201,7 +201,7 @@ export const AttachmentDialog = ({ note }) => {width: 40,marginRight: 10}}- color={colors.pri}+ color={colors.primary.paragraph}size={SIZE.lg}onPress={onCheck}/>@@ -213,7 +213,7 @@ export const AttachmentDialog = ({ note }) => {height: 40,width: 40}}- color={colors.pri}+ color={colors.primary.paragraph}onPress={() => {DownloadAttachments.present("attachments-list",@@ -264,7 +264,7 @@ export const AttachmentDialog = ({ note }) => {borderBottomColor:currentFilter !== item.filterBy? "transparent"- : colors.accent+ : colors.primary.accent}}onPress={() => {setCurrentFilter(item.filterBy);@@ -285,7 +285,7 @@ export const AttachmentDialog = ({ note }) => {alignItems: "center"}}>- <Icon name="attachment" size={60} color={colors.icon} />+ <Icon name="attachment" size={60} color={colors.secondary.icon} /><Paragraph>{note ? "No attachments on this note" : "No attachments"}</Paragraph>@@ -304,14 +304,18 @@ export const AttachmentDialog = ({ note }) => {/><Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.xs}style={{textAlign: "center",marginTop: 10}}>- <Icon name="shield-key-outline" size={SIZE.xs} color={colors.icon} />+ <Icon+ name="shield-key-outline"+ size={SIZE.xs}+ color={colors.primary.icon}+ />{" "}All attachments are end-to-end encrypted.</Paragraph></View>diff --git a/apps/mobile/app/components/auth/auth-modal.js b/apps/mobile/app/components/auth/auth-modal.jsindex 6111e0438..806ab1f12 100644--- a/apps/mobile/app/components/auth/auth-modal.js+++ b/apps/mobile/app/components/auth/auth-modal.js@@ -24,7 +24,7 @@ import {eSubscribeEvent,eUnSubscribeEvent} from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eCloseLoginDialog, eOpenLoginDialog } from "../../utils/events";import { sleep } from "../../utils/time";import BaseDialog from "../dialog/base-dialog";@@ -44,7 +44,7 @@ export const AuthMode = {};const AuthModal = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [visible, setVisible] = useState(false);const [currentAuthMode, setCurrentAuthMode] = useState(AuthMode.login);const actionSheetRef = useRef();@@ -82,7 +82,7 @@ const AuthModal = () => {onClose={close}useSafeArea={false}bounce={false}- background={colors.bg}+ background={colors.primary.background}transparent={false}animated={false}>@@ -112,7 +112,7 @@ const AuthModal = () => {paddingTop: Platform.OS === "android" ? 0 : insets.top,top: 0,zIndex: 999,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,width: "100%"}}>@@ -135,7 +135,7 @@ const AuthModal = () => {onPress={() => {hideAuth();}}- color={colors.pri}+ color={colors.primary.paragraph}/>)}diff --git a/apps/mobile/app/components/auth/forgot-password.js b/apps/mobile/app/components/auth/forgot-password.jsindex fdda27406..0f2a169a3 100644--- a/apps/mobile/app/components/auth/forgot-password.js+++ b/apps/mobile/app/components/auth/forgot-password.js@@ -24,7 +24,7 @@ import { db } from "../../common/database";import { DDS } from "../../services/device-detection";import { ToastEvent } from "../../services/event-manager";import SettingsService from "../../services/settings";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import DialogHeader from "../dialog/dialog-header";import { Button } from "../ui/button";import { IconButton } from "../ui/icon-button";@@ -34,7 +34,7 @@ import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";export const ForgotPassword = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors("sheet");const email = useRef();const emailInputRef = useRef();const [error, setError] = useState(false);@@ -117,7 +117,7 @@ export const ForgotPassword = () => {width: null,height: null}}- color={colors.accent}+ color={colors.primary.accent}name="email"size={50}/>@@ -134,7 +134,7 @@ export const ForgotPassword = () => {<Viewstyle={{borderRadius: DDS.isTab ? 5 : 0,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,zIndex: 10,width: "100%",padding: 12diff --git a/apps/mobile/app/components/auth/index.js b/apps/mobile/app/components/auth/index.jsindex 0fbbe7c3b..e410d4ed3 100644--- a/apps/mobile/app/components/auth/index.js+++ b/apps/mobile/app/components/auth/index.js@@ -65,7 +65,7 @@ const Auth = ({ navigation, route }) => {onPress={() => {hideAuth();}}- color={colors.pri}+ color={colors.primary.paragraph}customStyle={{position: 'absolute',zIndex: 999,diff --git a/apps/mobile/app/components/auth/login.js b/apps/mobile/app/components/auth/login.jsindex 45aaa37f2..a383b26bb 100644--- a/apps/mobile/app/components/auth/login.js+++ b/apps/mobile/app/components/auth/login.js@@ -22,7 +22,7 @@ import { TouchableOpacity, View, useWindowDimensions } from "react-native";import { SheetManager } from "react-native-actions-sheet";import { DDS } from "../../services/device-detection";import { eSendEvent } from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { sleep } from "../../utils/time";import SheetProvider from "../sheet-provider";@@ -46,7 +46,7 @@ const LoginSteps = {};export const Login = ({ changeMode }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [focused, setFocused] = useState(false);const {step,@@ -92,7 +92,7 @@ export const Login = ({ changeMode }) => {<Viewstyle={{borderRadius: DDS.isTab ? 5 : 0,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,zIndex: 10,width: "100%",alignSelf: "center"@@ -102,13 +102,13 @@ export const Login = ({ changeMode }) => {style={{justifyContent: "flex-end",paddingHorizontal: 20,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderBottomWidth: 1,marginBottom: 12,- borderBottomColor: colors.border,+ borderBottomColor: colors.primary.border,alignSelf: deviceMode !== "mobile" ? "center" : undefined,borderWidth: deviceMode !== "mobile" ? 1 : null,- borderColor: deviceMode !== "mobile" ? colors.border : null,+ borderColor: deviceMode !== "mobile" ? colors.primary.border : null,borderRadius: deviceMode !== "mobile" ? 20 : null,marginTop: deviceMode !== "mobile" ? 50 : null,width: deviceMode === "mobile" ? null : "50%",@@ -124,7 +124,7 @@ export const Login = ({ changeMode }) => {style={{width: 100,height: 5,- backgroundColor: colors.accent,+ backgroundColor: colors.primary.accent,borderRadius: 2,marginRight: 7}}@@ -134,7 +134,7 @@ export const Login = ({ changeMode }) => {style={{width: 20,height: 5,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 2}}/>@@ -160,7 +160,7 @@ export const Login = ({ changeMode }) => {: focused? "100%": "99.9%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,alignSelf: "center",paddingHorizontal: 20}}@@ -281,11 +281,14 @@ export const Login = ({ changeMode }) => {paddingVertical: 12}}>- <Paragraph size={SIZE.xs + 1} color={colors.icon}>+ <Paragraph+ size={SIZE.xs + 1}+ color={colors.secondary.paragraph}+ >Don't have an account?{" "}<Paragraphsize={SIZE.xs + 1}- style={{ color: colors.accent }}+ style={{ color: colors.primary.accent }}>Sign up</Paragraph>diff --git a/apps/mobile/app/components/auth/session-expired.js b/apps/mobile/app/components/auth/session-expired.jsindex 2573c6b3f..aaa540c42 100644--- a/apps/mobile/app/components/auth/session-expired.js+++ b/apps/mobile/app/components/auth/session-expired.js@@ -28,7 +28,7 @@ import {} from "../../services/event-manager";import SettingsService from "../../services/settings";import Sync from "../../services/sync";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eLoginSessionExpired, eUserLoggedIn } from "../../utils/events";import { SIZE } from "../../utils/size";import { sleep } from "../../utils/time";@@ -56,7 +56,7 @@ function getObfuscatedEmail(email) {}export const SessionExpired = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [visible, setVisible] = useState(false);const [focused, setFocused] = useState(false);const { step, password, email, passwordInputRef, loading, login } = useLogin(@@ -138,7 +138,7 @@ export const SessionExpired = () => {padding: 12,justifyContent: "center",flex: 1,- backgroundColor: colors.bg+ backgroundColor: colors.primary.background}}><View@@ -157,10 +157,10 @@ export const SessionExpired = () => {height: 60}}name="alert"- color={colors.errorText}+ color={colors.error.icon}size={50}/>- <Heading size={SIZE.xxxl} color={colors.heading}>+ <Heading size={SIZE.xxxl} color={colors.primary.heading}>Session expired</Heading><Paragraphdiff --git a/apps/mobile/app/components/auth/signup.js b/apps/mobile/app/components/auth/signup.jsindex 2f9d91f83..c01a3072f 100644--- a/apps/mobile/app/components/auth/signup.js+++ b/apps/mobile/app/components/auth/signup.js@@ -24,7 +24,7 @@ import { DDS } from "../../services/device-detection";import { ToastEvent } from "../../services/event-manager";import { clearMessage, setEmailVerifyMessage } from "../../services/message";import PremiumService from "../../services/premium";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useUserStore } from "../../stores/use-user-store";import { openLinkInBrowser } from "../../utils/functions";import { SIZE } from "../../utils/size";@@ -37,7 +37,7 @@ import { hideAuth } from "./common";import { useSettingStore } from "../../stores/use-setting-store";export const Signup = ({ changeMode, trial }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const email = useRef();const emailInputRef = useRef();const passwordInputRef = useRef();@@ -98,7 +98,7 @@ export const Signup = ({ changeMode, trial }) => {<Viewstyle={{borderRadius: DDS.isTab ? 5 : 0,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,zIndex: 10,width: "100%",alignSelf: "center"@@ -108,13 +108,13 @@ export const Signup = ({ changeMode, trial }) => {style={{justifyContent: "flex-end",paddingHorizontal: 20,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,marginBottom: 20,borderBottomWidth: 1,- borderBottomColor: colors.border,+ borderBottomColor: colors.primary.border,alignSelf: deviceMode !== "mobile" ? "center" : undefined,borderWidth: deviceMode !== "mobile" ? 1 : null,- borderColor: deviceMode !== "mobile" ? colors.border : null,+ borderColor: deviceMode !== "mobile" ? colors.primary.border : null,borderRadius: deviceMode !== "mobile" ? 20 : null,marginTop: deviceMode !== "mobile" ? 50 : null,width: deviceMode === "mobile" ? null : "50%",@@ -130,7 +130,7 @@ export const Signup = ({ changeMode, trial }) => {style={{width: 100,height: 5,- backgroundColor: colors.accent,+ backgroundColor: colors.primary.accent,borderRadius: 2,marginRight: 7}}@@ -140,7 +140,7 @@ export const Signup = ({ changeMode, trial }) => {style={{width: 20,height: 5,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 2}}/>@@ -161,7 +161,7 @@ export const Signup = ({ changeMode, trial }) => {style={{width: DDS.isTab ? "50%" : "100%",paddingHorizontal: 20,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,alignSelf: "center"}}>@@ -230,7 +230,7 @@ export const Signup = ({ changeMode, trial }) => {marginBottom: 25}}size={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}>By signing up, you agree to our{" "}<Paragraph@@ -241,7 +241,7 @@ export const Signup = ({ changeMode, trial }) => {style={{textDecorationLine: "underline"}}- color={colors.accent}+ color={colors.primary.accent}>Terms of Service{" "}</Paragraph>@@ -254,7 +254,7 @@ export const Signup = ({ changeMode, trial }) => {style={{textDecorationLine: "underline"}}- color={colors.accent}+ color={colors.primary.accent}>Privacy Policy.</Paragraph>{" "}@@ -287,9 +287,12 @@ export const Signup = ({ changeMode, trial }) => {paddingVertical: 12}}>- <Paragraph size={SIZE.xs + 1} color={colors.icon}>+ <Paragraph size={SIZE.xs + 1} color={colors.secondary.paragraph}>Already have an account?{" "}- <Paragraph size={SIZE.xs + 1} style={{ color: colors.accent }}>+ <Paragraph+ size={SIZE.xs + 1}+ style={{ color: colors.primary.accent }}+ >Login</Paragraph></Paragraph>diff --git a/apps/mobile/app/components/auth/two-factor.js b/apps/mobile/app/components/auth/two-factor.jsindex bc9e2c12b..737899c28 100644--- a/apps/mobile/app/components/auth/two-factor.js+++ b/apps/mobile/app/components/auth/two-factor.js@@ -26,7 +26,7 @@ import {presentSheet,ToastEvent} from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eCloseSheet } from "../../utils/events";import { SIZE } from "../../utils/size";import { Button } from "../ui/button";@@ -39,7 +39,7 @@ import Paragraph from "../ui/typography/paragraph";import { useCallback } from "react";const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const code = useRef();const [currentMethod, setCurrentMethod] = useState({method: mfaInfo?.primaryMethod,@@ -157,7 +157,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {}}size={50}name="key"- color={colors.accent}+ color={colors.primary.accent}/><Headingstyle={{@@ -281,7 +281,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {marginRight: 10}}size={15}- color={colors.accent}+ color={colors.primary.accent}name={item.icon}/><Viewdiff --git a/apps/mobile/app/components/container/container-header.js b/apps/mobile/app/components/container/container-header.jsindex ffd4861c5..227315577 100644--- a/apps/mobile/app/components/container/container-header.js+++ b/apps/mobile/app/components/container/container-header.js@@ -20,16 +20,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { View } from "react-native";import { useSelectionStore } from "../../stores/use-selection-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";export const ContainerHeader = ({ children }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const selectionMode = useSelectionStore((state) => state.selectionMode);return !selectionMode ? (<Viewstyle={{- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,width: "100%",overflow: "hidden"}}diff --git a/apps/mobile/app/components/container/floating-button.js b/apps/mobile/app/components/container/floating-button.jsindex 4e6c42898..52e7981b2 100644--- a/apps/mobile/app/components/container/floating-button.js+++ b/apps/mobile/app/components/container/floating-button.js@@ -34,13 +34,15 @@ import { getElevationStyle } from "../../utils/elevation";import { SIZE, normalize } from "../../utils/size";import NativeTooltip from "../../utils/tooltip";import { PressableButton } from "../ui/pressable";+import { useThemeColors } from "@notesnook/theme";export const FloatingButton = ({title,onPress,- color = "accent",+ color,shouldShow = false}) => {+ const { colors } = useThemeColors();const deviceMode = useSettingStore((state) => state.deviceMode);const selectionMode = useSelectionStore((state) => state.selectionMode);const translate = useSharedValue(0);@@ -113,8 +115,10 @@ export const FloatingButton = ({<PressableButtontestID={notesnook.buttons.add}type="accent"- accentColor={color || "accent"}- accentText="light"+ buttonType={{+ color: colors.static[color],+ text: colors.static.white+ }}customStyle={{...getElevationStyle(5),borderRadius: 100diff --git a/apps/mobile/app/components/delay-layout/default-placeholder.tsx b/apps/mobile/app/components/delay-layout/default-placeholder.tsxindex 50a13ca10..4fe87d610 100644--- a/apps/mobile/app/components/delay-layout/default-placeholder.tsx+++ b/apps/mobile/app/components/delay-layout/default-placeholder.tsx@@ -20,21 +20,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { View } from "react-native";import { useMessageStore } from "../../stores/use-message-store";-import { useThemeStore } from "../../stores/use-theme-store";-import { COLORS_NOTE } from "../../utils/color-scheme";-import { hexToRGBA } from "../../utils/color-scheme/utils";+import { useThemeColors } from "@notesnook/theme";+import { ColorValues } from "../../utils/colors";+import { hexToRGBA } from "../../utils/colors";export const DefaultPlaceholder = ({ color }: { color: string }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const message = useMessageStore((state) => state.message);const annoucements = useMessageStore((state) => state.announcements);const hasAnnoucements = annoucements.length > 0;const shadeColor = color? hexToRGBA(- COLORS_NOTE[color?.toLowerCase() as keyof typeof COLORS_NOTE],+ ColorValues[color?.toLowerCase() as keyof typeof ColorValues],0.15)- : colors.shade;+ : colors.primary.shade;return (<View@@ -50,7 +50,7 @@ export const DefaultPlaceholder = ({ color }: { color: string }) => {height: 100,borderRadius: 10,marginBottom: 20,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,padding: 12}}>@@ -58,7 +58,7 @@ export const DefaultPlaceholder = ({ color }: { color: string }) => {style={{width: 150,height: 20,- backgroundColor: colors.transGray,+ backgroundColor: colors.primary.hover,borderRadius: 5,marginBottom: 10}}@@ -67,7 +67,7 @@ export const DefaultPlaceholder = ({ color }: { color: string }) => {style={{width: 250,height: 14,- backgroundColor: colors.transGray,+ backgroundColor: colors.primary.hover,borderRadius: 5}}/>@@ -110,7 +110,7 @@ export const DefaultPlaceholder = ({ color }: { color: string }) => {style={{width: 150,height: 12,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginBottom: 10}}@@ -119,7 +119,7 @@ export const DefaultPlaceholder = ({ color }: { color: string }) => {style={{width: 250,height: 16,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5}}/>@@ -131,7 +131,7 @@ export const DefaultPlaceholder = ({ color }: { color: string }) => {style={{width: "100%",height: 30,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 10,marginBottom: 20,padding: 5,@@ -158,7 +158,7 @@ export const DefaultPlaceholder = ({ color }: { color: string }) => {style={{width: 15,height: 15,- backgroundColor: colors.transGray,+ backgroundColor: colors.primary.hover,borderRadius: 100,marginRight: 10}}@@ -167,7 +167,7 @@ export const DefaultPlaceholder = ({ color }: { color: string }) => {style={{width: 60,height: 15,- backgroundColor: colors.transGray,+ backgroundColor: colors.primary.hover,borderRadius: 3}}/>@@ -178,7 +178,7 @@ export const DefaultPlaceholder = ({ color }: { color: string }) => {style={{width: 200,height: 16,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5}}/>@@ -186,7 +186,7 @@ export const DefaultPlaceholder = ({ color }: { color: string }) => {style={{width: "85%",height: 13,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginTop: 10}}@@ -202,7 +202,7 @@ export const DefaultPlaceholder = ({ color }: { color: string }) => {style={{width: 50,height: 10,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5}}/>@@ -210,7 +210,7 @@ export const DefaultPlaceholder = ({ color }: { color: string }) => {style={{width: 60,height: 10,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginLeft: 10}}diff --git a/apps/mobile/app/components/delay-layout/index.tsx b/apps/mobile/app/components/delay-layout/index.tsxindex 23d1fda29..e3ffc9f17 100644--- a/apps/mobile/app/components/delay-layout/index.tsx+++ b/apps/mobile/app/components/delay-layout/index.tsx@@ -21,7 +21,7 @@ import React from "react";import { ViewProps } from "react-native";import Animated, { FadeOutUp } from "react-native-reanimated";import { useDelayLayout } from "../../hooks/use-delay-layout";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { DefaultPlaceholder } from "./default-placeholder";import { SettingsPlaceholder } from "./settings-placeholder";@@ -42,7 +42,7 @@ export default function DelayLayout({animated = true,...props}: IDelayLayoutProps) {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const loading = useDelayLayout(!props.delay || props.delay < 300 ? 300 : props.delay);@@ -52,12 +52,12 @@ export default function DelayLayout({<Animated.Viewexiting={animated ? FadeOutUp : undefined}style={{- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,flex: 1,paddingTop: 20}}>- <Placeholder color={props.color || colors.accent} />+ <Placeholder color={props.color || colors.primary.accent} /></Animated.View>) : (<>{props.children}</>diff --git a/apps/mobile/app/components/delay-layout/settings-placeholder.tsx b/apps/mobile/app/components/delay-layout/settings-placeholder.tsxindex 328ffaa13..fd9d5a34f 100644--- a/apps/mobile/app/components/delay-layout/settings-placeholder.tsx+++ b/apps/mobile/app/components/delay-layout/settings-placeholder.tsx@@ -19,10 +19,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { View } from "react-native";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";export const SettingsPlaceholder = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<View>@@ -30,7 +30,7 @@ export const SettingsPlaceholder = () => {style={{width: 100,height: 12,- backgroundColor: colors.shade,+ backgroundColor: colors.primary.shade,borderRadius: 5,marginLeft: 12,marginBottom: 12@@ -51,7 +51,7 @@ export const SettingsPlaceholder = () => {style={{width: 40,height: 40,- backgroundColor: colors.transGray,+ backgroundColor: colors.primary.hover,borderRadius: 100,marginRight: 20}}@@ -61,7 +61,7 @@ export const SettingsPlaceholder = () => {style={{width: 150,height: 12,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginBottom: 10}}@@ -70,7 +70,7 @@ export const SettingsPlaceholder = () => {style={{width: 250,height: 16,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5}}/>@@ -93,7 +93,7 @@ export const SettingsPlaceholder = () => {style={{width: 40,height: 40,- backgroundColor: colors.shade,+ backgroundColor: colors.primary.shade,borderRadius: 100,marginRight: 20}}@@ -103,7 +103,7 @@ export const SettingsPlaceholder = () => {style={{width: 150,height: 12,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginBottom: 10}}@@ -112,7 +112,7 @@ export const SettingsPlaceholder = () => {style={{width: 250,height: 16,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5}}/>@@ -122,7 +122,7 @@ export const SettingsPlaceholder = () => {style={{width: 40,height: 20,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 100,marginLeft: 15,alignItems: "flex-end",@@ -134,7 +134,7 @@ export const SettingsPlaceholder = () => {style={{width: 15,height: 15,- backgroundColor: colors.shade,+ backgroundColor: colors.primary.shade,borderRadius: 100,marginLeft: 15}}diff --git a/apps/mobile/app/components/dialog-provider/index.js b/apps/mobile/app/components/dialog-provider/index.jsindex 8c4fc5d31..08cbe3ffd 100644--- a/apps/mobile/app/components/dialog-provider/index.js+++ b/apps/mobile/app/components/dialog-provider/index.js@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { useNoteStore } from "../../stores/use-notes-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { AnnouncementDialog } from "../announcements";import AuthModal from "../auth/auth-modal";import { SessionExpired } from "../auth/session-expired";@@ -39,7 +39,7 @@ import RestoreDataSheet from "../sheets/restore-data";import PDFPreview from "../dialogs/pdf-preview";const DialogProvider = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const loading = useNoteStore((state) => state.loading);return (diff --git a/apps/mobile/app/components/dialog/base-dialog.js b/apps/mobile/app/components/dialog/base-dialog.jsindex a5cfabfcc..8397b7bb1 100644--- a/apps/mobile/app/components/dialog/base-dialog.js+++ b/apps/mobile/app/components/dialog/base-dialog.js@@ -30,6 +30,7 @@ import {import useIsFloatingKeyboard from "../../hooks/use-is-floating-keyboard";import { useSettingStore } from "../../stores/use-setting-store";import { BouncingView } from "../ui/transitions/bouncing-view";+import { ScopedThemeProvider } from "@notesnook/theme";const BaseDialog = ({visible,@@ -60,69 +61,71 @@ const BaseDialog = ({const Wrapper = useSafeArea ? SafeAreaView : View;return (- <Modal- visible={visible}- transparent={true}- animated- statusBarTranslucent={statusBarTranslucent}- supportedOrientations={[- "portrait",- "portrait-upside-down",- "landscape",- "landscape-left",- "landscape-right"- ]}- onShow={() => {- if (onShow) {- onShow();- useSettingStore.getState().setSheetKeyboardHandler(false);- }- }}- animationType={animation}- onRequestClose={() => {- if (!closeOnTouch) return null;- useSettingStore.getState().setSheetKeyboardHandler(true);- onRequestClose && onRequestClose();- }}- >- <Wrapper- style={{- backgroundColor: background- ? background- : transparent- ? "transparent"- : "rgba(0,0,0,0.3)"+ <ScopedThemeProvider value="dialog">+ <Modal+ visible={visible}+ transparent={true}+ animated+ statusBarTranslucent={statusBarTranslucent}+ supportedOrientations={[+ "portrait",+ "portrait-upside-down",+ "landscape",+ "landscape-left",+ "landscape-right"+ ]}+ onShow={() => {+ if (onShow) {+ onShow();+ useSettingStore.getState().setSheetKeyboardHandler(false);+ }+ }}+ animationType={animation}+ onRequestClose={() => {+ if (!closeOnTouch) return null;+ useSettingStore.getState().setSheetKeyboardHandler(true);+ onRequestClose && onRequestClose();}}>- <KeyboardAvoidingView- enabled={!floating && Platform.OS === "ios" && !avoidKeyboardResize}- behavior="padding"+ <Wrapper+ style={{+ backgroundColor: background+ ? background+ : transparent+ ? "transparent"+ : "rgba(0,0,0,0.3)"+ }}>- <BouncingView- duration={400}- animated={animated}- initialScale={bounce ? 0.9 : 1}- style={[- styles.backdrop,- {- justifyContent: centered- ? "center"- : bottom- ? "flex-end"- : "flex-start"- }- ]}+ <KeyboardAvoidingView+ enabled={!floating && Platform.OS === "ios" && !avoidKeyboardResize}+ behavior="padding">- <TouchableOpacity- onPress={closeOnTouch ? onRequestClose : null}- style={styles.overlayButton}- />- {premium}- {children}- </BouncingView>- </KeyboardAvoidingView>- </Wrapper>- </Modal>+ <BouncingView+ duration={400}+ animated={animated}+ initialScale={bounce ? 0.9 : 1}+ style={[+ styles.backdrop,+ {+ justifyContent: centered+ ? "center"+ : bottom+ ? "flex-end"+ : "flex-start"+ }+ ]}+ >+ <TouchableOpacity+ onPress={closeOnTouch ? onRequestClose : null}+ style={styles.overlayButton}+ />+ {premium}+ {children}+ </BouncingView>+ </KeyboardAvoidingView>+ </Wrapper>+ </Modal>+ </ScopedThemeProvider>);};diff --git a/apps/mobile/app/components/dialog/dialog-buttons.js b/apps/mobile/app/components/dialog/dialog-buttons.jsindex 3521504f7..51543d37e 100644--- a/apps/mobile/app/components/dialog/dialog-buttons.js+++ b/apps/mobile/app/components/dialog/dialog-buttons.js@@ -21,7 +21,7 @@ import React from "react";import { ActivityIndicator, StyleSheet, View } from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { notesnook } from "../../../e2e/test.ids";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { Button } from "../ui/button";import Paragraph from "../ui/typography/paragraph";@@ -35,14 +35,14 @@ const DialogButtons = ({doneText,positiveType}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<Viewstyle={[styles.container,{- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,height: 60,borderBottomRightRadius: 10,borderBottomLeftRadius: 10,@@ -51,7 +51,7 @@ const DialogButtons = ({]}>{loading ? (- <ActivityIndicator color={colors.accent} size={SIZE.lg} />+ <ActivityIndicator color={colors.primary.accent} size={SIZE.lg} />) : doneText ? (<Viewstyle={{@@ -60,11 +60,11 @@ const DialogButtons = ({}}><Icon- color={colors.accent}+ color={colors.primary.accent}name="check-circle-outline"size={SIZE.md}/>- <Paragraph color={colors.accent}>{" " + doneText}</Paragraph>+ <Paragraph color={colors.primary.accent}>{" " + doneText}</Paragraph></View>) : (<View />diff --git a/apps/mobile/app/components/dialog/dialog-container.js b/apps/mobile/app/components/dialog/dialog-container.jsindex 476dbb417..4ed387e35 100644--- a/apps/mobile/app/components/dialog/dialog-container.js+++ b/apps/mobile/app/components/dialog/dialog-container.js@@ -20,11 +20,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { View } from "react-native";import { DDS } from "../../services/device-detection";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { getElevationStyle } from "../../utils/elevation";const DialogContainer = ({ width, height, ...restProps }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<View@@ -34,7 +34,7 @@ const DialogContainer = ({ width, height, ...restProps }) => {width: width || DDS.isTab ? 500 : "85%",maxHeight: height || 450,borderRadius: 10,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,paddingTop: 12}}/>diff --git a/apps/mobile/app/components/dialog/dialog-header.tsx b/apps/mobile/app/components/dialog/dialog-header.tsxindex 6aee74027..a3c0f1771 100644--- a/apps/mobile/app/components/dialog/dialog-header.tsx+++ b/apps/mobile/app/components/dialog/dialog-header.tsx@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { Text, View, ViewStyle } from "react-native";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { Button } from "../ui/button";import { PressableButtonProps } from "../ui/pressable";@@ -54,7 +54,7 @@ const DialogHeader = ({titlePart,style}: DialogHeaderProps) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<>@@ -86,7 +86,7 @@ const DialogHeader = ({>{title}{" "}{titlePart ? (- <Text style={{ color: colors.accent }}>{titlePart}</Text>+ <Text style={{ color: colors.primary.accent }}>{titlePart}</Text>) : null}</Heading>@@ -114,7 +114,7 @@ const DialogHeader = ({maxWidth: centered ? "90%" : "100%",alignSelf: centered ? "center" : "flex-start"}}- color={paragraphColor || colors.icon}+ color={paragraphColor || colors.secondary.paragraph}>{paragraph}</Paragraph>diff --git a/apps/mobile/app/components/dialog/index.js b/apps/mobile/app/components/dialog/index.jsindex 0e7197e42..b36d4ed5e 100644--- a/apps/mobile/app/components/dialog/index.js+++ b/apps/mobile/app/components/dialog/index.js@@ -24,7 +24,7 @@ import {eSubscribeEvent,eUnSubscribeEvent} from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { getElevationStyle } from "../../utils/elevation";import { eCloseSimpleDialog, eOpenSimpleDialog } from "../../utils/events";import { sleep } from "../../utils/time";@@ -38,7 +38,7 @@ import { useCallback } from "react";import { Button } from "../ui/button";export const Dialog = ({ context = "global" }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [visible, setVisible] = useState(false);const [inputValue, setInputValue] = useState(null);const inputRef = useRef();@@ -51,7 +51,7 @@ export const Dialog = ({ context = "global" }) => {onClose: () => {},positiveType: "transparent",icon: null,- paragraphColor: colors.pri,+ paragraphColor: colors.primary.paragraph,input: false,inputPlaceholder: "Enter some text",defaultValue: "",@@ -115,7 +115,7 @@ export const Dialog = ({ context = "global" }) => {width: DDS.isTab ? 400 : "85%",maxHeight: 450,borderRadius: 5,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,paddingTop: 12};diff --git a/apps/mobile/app/components/dialogs/jump-to-section/index.js b/apps/mobile/app/components/dialogs/jump-to-section/index.jsindex e33c7bc8c..88094ab7e 100644--- a/apps/mobile/app/components/dialogs/jump-to-section/index.js+++ b/apps/mobile/app/components/dialogs/jump-to-section/index.js@@ -25,7 +25,7 @@ import {eUnSubscribeEvent} from "../../../services/event-manager";import { useMessageStore } from "../../../stores/use-message-store";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { getElevationStyle } from "../../../utils/elevation";import {eCloseJumpToDialog,@@ -41,10 +41,10 @@ import { useCallback } from "react";const offsets = [];let timeout = null;const JumpToSectionDialog = ({ scrollRef, data, type }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const notes = data;const [visible, setVisible] = useState(false);- const [currentIndex, setCurrentIndex] = useState(null);+ const [currentIndex, setCurrentIndex] = useState(0);const onPress = (item) => {let ind = notes.findIndex(@@ -77,7 +77,7 @@ const JumpToSectionDialog = ({ scrollRef, data, type }) => {}timeout = setTimeout(() => {let index = offsets.findIndex((o, i) => o <= y && offsets[i + 1] > y);- setCurrentIndex(index);+ setCurrentIndex(index || 0);}, 200);};@@ -113,7 +113,6 @@ const JumpToSectionDialog = ({ scrollRef, data, type }) => {offsets.push(offset);});}, [notes]);-return !visible ? null : (<BaseDialogonShow={() => {@@ -126,7 +125,7 @@ const JumpToSectionDialog = ({ scrollRef, data, type }) => {style={{...getElevationStyle(5),width: DDS.isTab ? 500 : "85%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,zIndex: 100,bottom: 20,maxHeight: "65%",@@ -157,7 +156,7 @@ const JumpToSectionDialog = ({ scrollRef, data, type }) => {<PressableButtonkey={item.title}onPress={() => onPress(item, index)}- type={currentIndex === index ? "accent" : "transparent"}+ type={currentIndex === index ? "selected" : "transparent"}customStyle={{minWidth: "20%",width: null,@@ -171,7 +170,9 @@ const JumpToSectionDialog = ({ scrollRef, data, type }) => {<Paragraphsize={SIZE.sm}color={- currentIndex === index ? colors.light : colors.accent+ currentIndex === index+ ? colors.selected.accent+ : colors.primary.accent}style={{textAlign: "center"diff --git a/apps/mobile/app/components/dialogs/loading/index.tsx b/apps/mobile/app/components/dialogs/loading/index.tsxindex c28ccd80c..eb67807bb 100644--- a/apps/mobile/app/components/dialogs/loading/index.tsx+++ b/apps/mobile/app/components/dialogs/loading/index.tsx@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import React from "react";import { View } from "react-native";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import BaseDialog from "../../dialog/base-dialog";import { ProgressBarComponent } from "../../ui/svg/lazy";import { useEffect } from "react";@@ -30,7 +30,7 @@ import { useState } from "react";import { eCloseLoading, eOpenLoading } from "../../../utils/events";export const LoadingDialog = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [visible, setVisible] = useState(false);useEffect(() => {@@ -58,7 +58,7 @@ export const LoadingDialog = () => {style={{width: "100%",height: "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,justifyContent: "center",alignItems: "center"}}@@ -77,8 +77,8 @@ export const LoadingDialog = () => {useNativeDriverindeterminateindeterminateAnimationDuration={2000}- unfilledColor={colors.nav}- color={colors.accent}+ unfilledColor={colors.secondary.background}+ color={colors.primary.accent}borderWidth={0}/></View>diff --git a/apps/mobile/app/components/dialogs/pdf-preview/index.js b/apps/mobile/app/components/dialogs/pdf-preview/index.jsindex a6abc113b..4b5e6aa5a 100644--- a/apps/mobile/app/components/dialogs/pdf-preview/index.js+++ b/apps/mobile/app/components/dialogs/pdf-preview/index.js@@ -33,7 +33,7 @@ import {eSubscribeEvent,eUnSubscribeEvent} from "../../../services/event-manager";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import { Dialog } from "../../dialog";import BaseDialog from "../../dialog/base-dialog";@@ -64,7 +64,7 @@ const usePDFSnapshot = (attachment) => {};const PDFPreview = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [visible, setVisible] = useState(false);const [pdfSource, setPDFSource] = useState();const [loading, setLoading] = useState(false);@@ -172,7 +172,7 @@ const PDFPreview = () => {><ProgressBarComponentindeterminate={!progress}- color={colors.accent}+ color={colors.primary.accent}borderColor="transparent"progress={parseInt(progress?.value || "100") / 100}/>@@ -180,7 +180,7 @@ const PDFPreview = () => {style={{marginTop: 10}}- color={colors.light}+ color={colors.static.white}>Loading {`${progress?.percent ? `(${progress?.percent})` : ""}`}... Please wait@@ -205,7 +205,7 @@ const PDFPreview = () => {}}><IconButton- color={colors.light}+ color={colors.static.white}name="arrow-left"onPress={close}customStyle={{@@ -226,7 +226,7 @@ const PDFPreview = () => {ref={inputRef}defaultValue={currentPage + ""}style={{- color: colors.pri,+ color: colors.primary.paragraph,padding: 0,paddingTop: 0,paddingBottom: 0,@@ -234,7 +234,7 @@ const PDFPreview = () => {marginBottom: 0,paddingVertical: 0,height: 25,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,width: 40,textAlign: "center",marginRight: 4,@@ -249,7 +249,7 @@ const PDFPreview = () => {}}blurOnSubmit/>- <Paragraph color={colors.light}>/{numPages}</Paragraph>+ <Paragraph color={colors.static.white}>/{numPages}</Paragraph></View><View@@ -258,7 +258,7 @@ const PDFPreview = () => {}}><IconButton- color={colors.light}+ color={colors.static.white}name="download"onPress={() => {downloadAttachment(attachment.metadata.hash, false);diff --git a/apps/mobile/app/components/dialogs/result/index.js b/apps/mobile/app/components/dialogs/result/index.jsindex c3ab7c969..9fd956654 100644--- a/apps/mobile/app/components/dialogs/result/index.js+++ b/apps/mobile/app/components/dialogs/result/index.js@@ -24,7 +24,7 @@ import {eSubscribeEvent,eUnSubscribeEvent} from "../../../services/event-manager";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { getElevationStyle } from "../../../utils/elevation";import { eCloseResultDialog, eOpenResultDialog } from "../../../utils/events";import { SIZE } from "../../../utils/size";@@ -36,7 +36,7 @@ import Paragraph from "../../ui/typography/paragraph";import { ProFeatures } from "./pro-features";const ResultDialog = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [visible, setVisible] = useState(false);const [dialogData, setDialogData] = useState({title: "Thank you for signing up!",@@ -72,7 +72,7 @@ const ResultDialog = () => {width: DDS.isTab ? 350 : "85%",maxHeight: 500,borderRadius: 10,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,paddingTop: 20,justifyContent: "center",alignItems: "center"@@ -94,7 +94,7 @@ const ResultDialog = () => {</Heading><Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.md}style={{alignSelf: "center",@@ -121,7 +121,7 @@ const ResultDialog = () => {<Seperator /><Viewstyle={{- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,width: "100%",borderBottomRightRadius: 10,borderBottomLeftRadius: 10,diff --git a/apps/mobile/app/components/dialogs/result/pro-features.js b/apps/mobile/app/components/dialogs/result/pro-features.jsindex d89ad5e5d..44898a35d 100644--- a/apps/mobile/app/components/dialogs/result/pro-features.js+++ b/apps/mobile/app/components/dialogs/result/pro-features.js@@ -21,7 +21,7 @@ import React from "react";import { View } from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { eSendEvent } from "../../../services/event-manager";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import {eCloseSheet,eCloseResultDialog,@@ -31,7 +31,7 @@ import { SIZE } from "../../../utils/size";import { sleep } from "../../../utils/time";import Paragraph from "../../ui/typography/paragraph";export const ProFeatures = ({ count = 6 }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<>@@ -73,7 +73,7 @@ export const ProFeatures = ({ count = 6 }) => {justifyContent: "flex-start"}}>- <Icon size={SIZE.lg} color={colors.accent} name="check" />+ <Icon size={SIZE.lg} color={colors.primary.accent} name="check" /><Paragraph style={{ marginLeft: 5, flexShrink: 1 }}>{item.content}</Paragraph>@@ -89,7 +89,7 @@ export const ProFeatures = ({ count = 6 }) => {size={SIZE.xs}style={{textDecorationLine: "underline",- color: colors.icon+ color: colors.secondary.paragraph}}>See all features included in Notesnook Prodiff --git a/apps/mobile/app/components/dialogs/vault/index.js b/apps/mobile/app/components/dialogs/vault/index.jsindex 64c4779ad..89ff1f271 100644--- a/apps/mobile/app/components/dialogs/vault/index.js+++ b/apps/mobile/app/components/dialogs/vault/index.js@@ -682,7 +682,7 @@ export class VaultDialog extends Component {...getElevationStyle(5),width: DDS.isTab ? 350 : "85%",borderRadius: 10,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,paddingTop: 12}}>@@ -867,7 +867,12 @@ export class VaultDialog extends Component {icon="fingerprint"width="100%"title="Biometric unlocking"- type={this.state.biometricUnlock ? "transparent" : "gray"}+ iconColor={+ this.state.biometricUnlock+ ? colors.selected.icon+ : colors.primary.icon+ }+ type={this.state.biometricUnlock ? "transparent" : "selected"}/>) : null}</View>diff --git a/apps/mobile/app/components/header/index.js b/apps/mobile/app/components/header/index.jsindex 358b4b775..70bb2dfb4 100644--- a/apps/mobile/app/components/header/index.js+++ b/apps/mobile/app/components/header/index.js@@ -27,14 +27,14 @@ import {} from "../../services/event-manager";import useNavigationStore from "../../stores/use-navigation-store";import { useSelectionStore } from "../../stores/use-selection-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eScrollEvent } from "../../utils/events";import { LeftMenus } from "./left-menus";import { RightMenus } from "./right-menus";import { Title } from "./title";const _Header = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const insets = useGlobalSafeAreaInsets();const [hide, setHide] = useState(true);const selectionMode = useSelectionStore((state) => state.selectionMode);@@ -69,10 +69,12 @@ const _Header = () => {styles.container,{marginTop: Platform.OS === "android" ? insets.top : null,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,overflow: "hidden",borderBottomWidth: 1,- borderBottomColor: hide ? "transparent" : colors.nav,+ borderBottomColor: hide+ ? "transparent"+ : colors.secondary.background,justifyContent: "space-between"}]}diff --git a/apps/mobile/app/components/header/left-menus.js b/apps/mobile/app/components/header/left-menus.jsindex 1f6af651f..6d5954908 100644--- a/apps/mobile/app/components/header/left-menus.js+++ b/apps/mobile/app/components/header/left-menus.js@@ -23,12 +23,12 @@ import { DDS } from "../../services/device-detection";import Navigation from "../../services/navigation";import useNavigationStore from "../../stores/use-navigation-store";import { useSettingStore } from "../../stores/use-setting-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { tabBarRef } from "../../utils/global-refs";import { IconButton } from "../ui/icon-button";export const LeftMenus = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const deviceMode = useSettingStore((state) => state.deviceMode);const canGoBack = useNavigationStore((state) => state.canGoBack);const isTablet = deviceMode === "tablet";@@ -61,17 +61,17 @@ export const LeftMenus = () => {width: 40,borderRadius: 100,marginLeft: -5,- marginRight: DDS.isLargeTablet() ? 10 : 25+ marginRight: DDS.isLargeTablet() ? 10 : 7}}left={40}top={40}- right={DDS.isLargeTablet() ? 10 : 25}+ right={DDS.isLargeTablet() ? 10 : 10}onPress={onLeftButtonPress}onLongPress={() => {Navigation.popToTop();}}name={canGoBack ? "arrow-left" : "menu"}- color={colors.pri}+ color={colors.primary.paragraph}iconStyle={{marginLeft: canGoBack ? -5 : 0}}diff --git a/apps/mobile/app/components/header/right-menus.js b/apps/mobile/app/components/header/right-menus.jsindex 1afc77311..80775820c 100644--- a/apps/mobile/app/components/header/right-menus.js+++ b/apps/mobile/app/components/header/right-menus.js@@ -25,14 +25,15 @@ import Navigation from "../../services/navigation";import SearchService from "../../services/search";import useNavigationStore from "../../stores/use-navigation-store";import { useSettingStore } from "../../stores/use-setting-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { sleep } from "../../utils/time";import { Button } from "../ui/button";import { IconButton } from "../ui/icon-button";export const RightMenus = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();+ const { contextMenuColors } = useThemeColors("contextMenu");const deviceMode = useSettingStore((state) => state.deviceMode);const rightButtons = useNavigationStore((state) => state.headerRightButtons);const currentScreen = useNavigationStore((state) => state.currentScreen.name);@@ -51,7 +52,7 @@ export const RightMenus = () => {}}testID="icon-search"name="magnify"- color={colors.pri}+ color={colors.primary.paragraph}customStyle={styles.rightBtn}/>) : null}@@ -76,7 +77,7 @@ export const RightMenus = () => {borderRadius: 5,paddingHorizontal: 0,borderWidth: 1,- borderColor: colors.accent+ borderColor: colors.primary.accent}}/>) : null}@@ -87,7 +88,7 @@ export const RightMenus = () => {animationDuration={200}style={{borderRadius: 5,- backgroundColor: colors.bg+ backgroundColor: contextMenuColors.primary.background}}onRequestClose={() => {menuRef.current?.hide();@@ -98,7 +99,7 @@ export const RightMenus = () => {menuRef.current?.show();}}name="dots-vertical"- color={colors.pri}+ color={colors.primary.paragraph}customStyle={styles.rightBtn}/>}@@ -112,7 +113,7 @@ export const RightMenus = () => {}}type="gray"buttonType={{- text: colors.pri+ text: colors.primary.paragraph}}key={item.title}title={item.title}diff --git a/apps/mobile/app/components/header/title.js b/apps/mobile/app/components/header/title.jsindex 8e8704679..1d6e591cd 100644--- a/apps/mobile/app/components/header/title.js+++ b/apps/mobile/app/components/header/title.js@@ -26,7 +26,7 @@ import {eUnSubscribeEvent} from "../../services/event-manager";import useNavigationStore from "../../stores/use-navigation-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eScrollEvent } from "../../utils/events";import { SIZE } from "../../utils/size";import Heading from "../ui/typography/heading";@@ -36,7 +36,7 @@ import Tag from "../ui/tag";const titleState = {};export const Title = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const currentScreen = useNavigationStore((state) => state.currentScreen);const isNotebook = currentScreen.name === "Notebook";const isTopic = currentScreen?.name === "TopicNotes";@@ -110,15 +110,15 @@ export const Title = () => {<HeadingonPress={navigateToNotebook}numberOfLines={1}- size={SIZE.xl}+ size={SIZE.lg}style={{flexWrap: "wrap",marginTop: Platform.OS === "ios" ? -1 : 0}}- color={currentScreen.color || colors.heading}+ color={currentScreen.color || colors.primary.heading}>{isTag ? (- <Heading size={SIZE.xl} color={colors.accent}>+ <Heading size={SIZE.xl} color={colors.primary.accent}>#</Heading>) : null}diff --git a/apps/mobile/app/components/image-preview/index.js b/apps/mobile/app/components/image-preview/index.jsindex 8f396b371..7a65ef2a9 100644--- a/apps/mobile/app/components/image-preview/index.js+++ b/apps/mobile/app/components/image-preview/index.js@@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import Sodium from "@ammarahmed/react-native-sodium";+import dataurl from "@notesnook/core/utils/dataurl";+import { useThemeColors } from "@notesnook/theme";import React, { useEffect, useState } from "react";import { Platform, View } from "react-native";import ImageViewer from "react-native-image-zoom-viewer";@@ -26,15 +29,13 @@ import {eSubscribeEvent,eUnSubscribeEvent} from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";import BaseDialog from "../dialog/base-dialog";import { IconButton } from "../ui/icon-button";import { ProgressBarComponent } from "../ui/svg/lazy";-import Sodium from "@ammarahmed/react-native-sodium";-import dataurl from "@notesnook/core/utils/dataurl";const ImagePreview = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors("dialog");+const [visible, setVisible] = useState(false);const [image, setImage] = useState("");const [loading, setLoading] = useState(false);@@ -97,7 +98,7 @@ const ImagePreview = () => {><ProgressBarComponentindeterminate- color={colors.accent}+ color={colors.primary.accent}borderColor="transparent"/></View>diff --git a/apps/mobile/app/components/intro/index.js b/apps/mobile/app/components/intro/index.jsindex 2c21f5129..449eb6f7c 100644--- a/apps/mobile/app/components/intro/index.js+++ b/apps/mobile/app/components/intro/index.js@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { useThemeColors } from "@notesnook/theme";import React from "react";import {Linking,@@ -27,18 +28,17 @@ import {} from "react-native";import { SwiperFlatList } from "react-native-swiper-flatlist";import Icon from "react-native-vector-icons/MaterialCommunityIcons";+import { getElevationStyle } from "../../utils/elevation";+import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";import SettingsService from "../../services/settings";import { useSettingStore } from "../../stores/use-setting-store";-import { useThemeStore } from "../../stores/use-theme-store";-import { getElevationStyle } from "../../utils/elevation";import { SIZE } from "../../utils/size";import { Button } from "../ui/button";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";-import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";const Intro = ({ navigation }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const isTelemetryEnabled = useSettingStore((state) => state.settings.telemetry);@@ -64,7 +64,7 @@ const Intro = ({ navigation }) => {style={{width: 100,height: 5,- backgroundColor: colors.accent,+ backgroundColor: colors.primary.accent,borderRadius: 2,marginRight: 7}}@@ -74,7 +74,7 @@ const Intro = ({ navigation }) => {style={{width: 20,height: 5,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 2}}/>@@ -117,7 +117,7 @@ const Intro = ({ navigation }) => {</View></View>),- [colors.accent, colors.nav, deviceMode, width]+ [colors.primary.accent, colors.secondary.background, deviceMode, width]);return (@@ -130,13 +130,13 @@ const Intro = ({ navigation }) => {<Viewstyle={{width: deviceMode !== "mobile" ? width / 2 : "100%",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,marginBottom: 20,borderBottomWidth: 1,- borderBottomColor: colors.border,+ borderBottomColor: colors.primary.border,alignSelf: deviceMode !== "mobile" ? "center" : undefined,borderWidth: deviceMode !== "mobile" ? 1 : null,- borderColor: deviceMode !== "mobile" ? colors.border : null,+ borderColor: deviceMode !== "mobile" ? colors.primary.border : null,borderRadius: deviceMode !== "mobile" ? 20 : null,marginTop: deviceMode !== "mobile" ? 50 : null,paddingTop: insets.top + 10,@@ -171,14 +171,14 @@ const Intro = ({ navigation }) => {user: "@andrewsayer on Twitter"}]}- paginationActiveColor={colors.accent}+ paginationActiveColor={colors.primary.accent}paginationStyleItem={{width: 10,height: 5,marginRight: 4,marginLeft: 4}}- paginationDefaultColor={colors.border}+ paginationDefaultColor={colors.primary.border}renderItem={renderItem}/></View>@@ -229,7 +229,9 @@ const Intro = ({ navigation }) => {name={isTelemetryEnabled ? "checkbox-marked" : "checkbox-blank-outline"}- color={isTelemetryEnabled ? colors.accent : colors.icon}+ color={+ isTelemetryEnabled ? colors.primary.accent : colors.primary.icon+ }/><Paragraphdiff --git a/apps/mobile/app/components/intro/welcome.js b/apps/mobile/app/components/intro/welcome.jsindex 707daadca..fbedd4f42 100644--- a/apps/mobile/app/components/intro/welcome.js+++ b/apps/mobile/app/components/intro/welcome.js@@ -23,8 +23,8 @@ import { DDS } from "../../services/device-detection";import { eSendEvent } from "../../services/event-manager";import Navigation from "../../services/navigation";import SettingsService from "../../services/settings";-import { useThemeStore } from "../../stores/use-theme-store";-import { getElevationStyle } from "../../utils/elevation";+import { useThemeColors } from "@notesnook/theme";+import { getElevationStyle } from "../../../utils/elevation";import {eCloseLoading,eOpenLoading,@@ -41,7 +41,7 @@ const IMAGE = (color) =>`<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" width="1100.50064" height="691.70682" viewBox="0 0 1100.50064 691.70682" xmlns:xlink="http://www.w3.org/1999/xlink"><title>two_factor_authentication</title><path d="M1150.25032,388.23743h-1.85859V337.32194a29.4685,29.4685,0,0,0-29.46859-29.46853H1011.05186a29.4685,29.4685,0,0,0-29.46859,29.46853V616.64827a29.46851,29.46851,0,0,0,29.46859,29.46854h107.87128a29.46851,29.46851,0,0,0,29.46859-29.46854V424.47994h1.85859Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><path d="M1142.121,339.05342v278.92a22.01111,22.01111,0,0,1-22.01,22.01h-108.39a22.00248,22.00248,0,0,1-22-22.01v-278.92a22.00031,22.00031,0,0,1,22-22h13.15a10.4608,10.4608,0,0,0,9.68,14.4h61.8a10.44027,10.44027,0,0,0,9.67993-14.4H1120.111A22.00894,22.00894,0,0,1,1142.121,339.05342Z" transform="translate(-49.74968 -104.14659)" fill="#d0cde1"/><rect x="945.85129" y="355.70682" width="126" height="34" fill="${color}"/><path d="M1126.601,487.85341h-122a3.00328,3.00328,0,0,1-3-3v-30a3.00328,3.00328,0,0,1,3-3h122a3.00328,3.00328,0,0,1,3,3v30A3.00328,3.00328,0,0,1,1126.601,487.85341Zm-122-34a1.001,1.001,0,0,0-1,1v30a1.00067,1.00067,0,0,0,1,1h122a1.00067,1.00067,0,0,0,1-1v-30a1.001,1.001,0,0,0-1-1Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><rect x="959.85129" y="374.70682" width="16" height="2" fill="#3f3d56"/><rect x="981.85129" y="374.70682" width="16" height="2" fill="#3f3d56"/><rect x="1003.85129" y="374.70682" width="16" height="2" fill="#3f3d56"/><rect x="1025.85129" y="374.70682" width="16" height="2" fill="#3f3d56"/><rect x="1047.85129" y="374.70682" width="16" height="2" fill="#3f3d56"/><path d="M1142.121,589.61342v28.36a22.01111,22.01111,0,0,1-22.01,22.01h-108.39a22.00248,22.00248,0,0,1-22-22.01v-130.46Z" transform="translate(-49.74968 -104.14659)" opacity="0.1"/><rect x="99.85129" y="459.70682" width="473" height="232" fill="#d0cde1"/><path d="M502.351,795.85341H151.601a2.00591,2.00591,0,0,1-2-2v-228a2.00587,2.00587,0,0,1,2-2h4.44Z" transform="translate(-49.74968 -104.14659)" opacity="0.1"/><rect x="318.85129" y="490.70682" width="732.99951" height="2" fill="#3f3d56"/><path d="M600.34268,108.46435H390.853v-4.31776H295.86217v4.31776H85.5089a14.17039,14.17039,0,0,0-14.1704,14.1704V409.4906a14.17043,14.17043,0,0,0,14.1704,14.17045H600.34268a14.17044,14.17044,0,0,0,14.1704-14.17045V122.63475A14.17039,14.17039,0,0,0,600.34268,108.46435Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><rect x="40.59128" y="29.35679" width="505.16998" height="284.98004" fill="#d0cde1"/><circle cx="292.74433" cy="16.4075" r="5.18132" fill="${color}"/><path d="M240.601,239.85341h-12a3.00328,3.00328,0,0,1-3-3v-12a3.00328,3.00328,0,0,1,3-3h12a3.00328,3.00328,0,0,1,3,3v12A3.00328,3.00328,0,0,1,240.601,239.85341Zm-12-16a1.0013,1.0013,0,0,0-1,1v12a1.0013,1.0013,0,0,0,1,1h12a1.0013,1.0013,0,0,0,1-1v-12a1.0013,1.0013,0,0,0-1-1Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><rect x="176.85129" y="133.70682" width="228" height="2" fill="#3f3d56"/><rect x="345.85129" y="188.70682" width="53" height="16" fill="${color}"/><path d="M452.601,304.85341h-49a3.00328,3.00328,0,0,1-3-3v-12a3.00328,3.00328,0,0,1,3-3h49a3.00328,3.00328,0,0,1,3,3v12A3.00328,3.00328,0,0,1,452.601,304.85341Zm-49-16a1.0013,1.0013,0,0,0-1,1v12a1.0013,1.0013,0,0,0,1,1h49a1.0013,1.0013,0,0,0,1-1v-12a1.0013,1.0013,0,0,0-1-1Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><rect x="703.85129" y="206.70682" width="100" height="70" fill="${color}"/><path d="M863.601,375.35341h-96a4.00427,4.00427,0,0,1-4-4v-66a4.00427,4.00427,0,0,1,4-4h96a4.00426,4.00426,0,0,1,4,4v66A4.00426,4.00426,0,0,1,863.601,375.35341Zm-96-70v66H863.6039l-.00293-66Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><path d="M852.601,302.85341h-4a33,33,0,1,0-66,0h-4a37,37,0,1,1,74,0Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><path d="M825.601,330.35341a10.00023,10.00023,0,1,0-15.29412,8.47258V349.5593a5.29411,5.29411,0,0,0,5.29412,5.29411h0a5.29411,5.29411,0,0,0,5.29411-5.29411V338.826A9.98327,9.98327,0,0,0,825.601,330.35341Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><rect x="284.35129" y="562.70682" width="16" height="2" fill="#3f3d56"/><rect x="306.35129" y="562.70682" width="16" height="2" fill="#3f3d56"/><rect x="328.35129" y="562.70682" width="16" height="2" fill="#3f3d56"/><rect x="350.35129" y="562.70682" width="16" height="2" fill="#3f3d56"/><rect x="372.35129" y="562.70682" width="16" height="2" fill="#3f3d56"/><path d="M643.60059,778.85352H174.60107a4.00428,4.00428,0,0,1-4-4v-228a4.00427,4.00427,0,0,1,4-4H643.60059a4.004,4.004,0,0,1,4,4v228A4.004,4.004,0,0,1,643.60059,778.85352Zm-468.99952-232v228H643.60352l-.00293-228Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><circle cx="145.85129" cy="470.70682" r="6" fill="#3f3d56"/><circle cx="166.85129" cy="470.70682" r="6" fill="#3f3d56"/><circle cx="187.85129" cy="470.70682" r="6" fill="#3f3d56"/><path d="M453.601,680.85341h-135a3.00328,3.00328,0,0,1-3-3v-34a3.00328,3.00328,0,0,1,3-3h135a3.00328,3.00328,0,0,1,3,3v34A3.00328,3.00328,0,0,1,453.601,680.85341Zm-135-38a1.001,1.001,0,0,0-1,1v34a1.001,1.001,0,0,0,1,1h135a1.001,1.001,0,0,0,1-1v-34a1.001,1.001,0,0,0-1-1Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><circle cx="437.85129" cy="559.70682" r="18" fill="${color}"/><path d="M493.601,679.85341a19,19,0,1,1,19-19A19.02162,19.02162,0,0,1,493.601,679.85341Zm0-36a17,17,0,1,0,17,17A17.019,17.019,0,0,0,493.601,643.85341Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><polygon points="444.118 563.803 434.437 554.121 437.265 551.293 443.584 557.611 461.216 532.555 464.487 534.858 444.118 563.803" fill="#3f3d56"/><polygon points="433.761 314.337 40.591 314.337 40.591 50.947 433.761 314.337" opacity="0.1"/><path d="M628.69739,413.2984H579.39527v-3.55218a.7043.7043,0,0,0-.70431-.70432H561.78737a.70429.70429,0,0,0-.70431.70432v3.55218H550.51832v-3.55218a.7043.7043,0,0,0-.70432-.70432H532.91042a.7043.7043,0,0,0-.70432.70432v3.55218H521.64136v-3.55218a.70429.70429,0,0,0-.70431-.70432H504.03347a.7043.7043,0,0,0-.70432.70432v3.55218H492.76441v-3.55218a.7043.7043,0,0,0-.70432-.70432H475.15651a.70429.70429,0,0,0-.70431.70432v3.55218H463.88746v-3.55218a.7043.7043,0,0,0-.70432-.70432H446.27956a.7043.7043,0,0,0-.70432.70432v3.55218H435.0105v-3.55218a.70429.70429,0,0,0-.70431-.70432H417.4026a.7043.7043,0,0,0-.70431.70432v3.55218H406.13355v-3.55218a.7043.7043,0,0,0-.70432-.70432H273.01784a.7043.7043,0,0,0-.70432.70432v3.55218H261.74878v-3.55218a.7043.7043,0,0,0-.70432-.70432H244.14088a.70429.70429,0,0,0-.70431.70432v3.55218H232.87183v-3.55218a.7043.7043,0,0,0-.70432-.70432H215.26393a.7043.7043,0,0,0-.70432.70432v3.55218H203.99487v-3.55218a.70429.70429,0,0,0-.70431-.70432H186.387a.7043.7043,0,0,0-.70431.70432v3.55218H175.11792v-3.55218a.7043.7043,0,0,0-.70432-.70432H157.51a.7043.7043,0,0,0-.70432.70432v3.55218H146.241v-3.55218a.7043.7043,0,0,0-.70432-.70432H128.63307a.7043.7043,0,0,0-.70432.70432v3.55218H117.364v-3.55218a.7043.7043,0,0,0-.70431-.70432H99.75611a.70429.70429,0,0,0-.70431.70432v3.55218H66.65326A16.90359,16.90359,0,0,0,49.74968,430.202v7.6434a16.90358,16.90358,0,0,0,16.90358,16.90354H628.69739A16.90358,16.90358,0,0,0,645.601,437.84539V430.202A16.90359,16.90359,0,0,0,628.69739,413.2984Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><path d="M474.601,321.85341h-264a3.00328,3.00328,0,0,1-3-3v-110a3.00328,3.00328,0,0,1,3-3h264a3.00328,3.00328,0,0,1,3,3v110A3.00328,3.00328,0,0,1,474.601,321.85341Zm-264-114a1.0013,1.0013,0,0,0-1,1v110a1.0013,1.0013,0,0,0,1,1h264a1.0013,1.0013,0,0,0,1-1v-110a1.0013,1.0013,0,0,0-1-1Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><path d="M240.601,269.85341h-12a3.00328,3.00328,0,0,1-3-3v-12a3.00328,3.00328,0,0,1,3-3h12a3.00328,3.00328,0,0,1,3,3v12A3.00328,3.00328,0,0,1,240.601,269.85341Zm-12-16a1.0013,1.0013,0,0,0-1,1v12a1.0013,1.0013,0,0,0,1,1h12a1.0013,1.0013,0,0,0,1-1v-12a1.0013,1.0013,0,0,0-1-1Z" transform="translate(-49.74968 -104.14659)" fill="#3f3d56"/><rect x="176.85129" y="163.70682" width="228" height="2" fill="#3f3d56"/><rect x="264.85129" y="269.70682" width="732.99951" height="2" fill="#3f3d56"/><circle cx="264.85129" cy="269.70682" r="14" fill="#3f3d56"/><circle cx="997.85129" cy="271.70682" r="11" fill="#3f3d56"/><circle cx="1051.85129" cy="492.70682" r="11" fill="#3f3d56"/><circle cx="321.85129" cy="492.70682" r="11" fill="#3f3d56"/></svg>`;export const WelcomeNotice = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<Animated.Viewentering={FadeInDown}@@ -53,7 +53,7 @@ export const WelcomeNotice = () => {alignSelf: "center"}}>- <SvgView width={200} height={200} src={IMAGE(colors.accent)} />+ <SvgView width={200} height={200} src={IMAGE(colors.primary.accent)} /><Heading>100% encrypted notes</Heading><Paragraphdiff --git a/apps/mobile/app/components/list-items/headers/header.js b/apps/mobile/app/components/list-items/headers/header.jsindex c55fcdc8b..1556c2471 100644--- a/apps/mobile/app/components/list-items/headers/header.js+++ b/apps/mobile/app/components/list-items/headers/header.js@@ -19,9 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { View } from "react-native";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useMessageStore } from "../../../stores/use-message-store";-import { COLORS_NOTE } from "../../../utils/color-scheme";+import { ColorValues } from "../../../utils/colors";import { Announcement } from "../../announcements/announcement";import { Card } from "../../list/card";import Paragraph from "../../ui/typography/paragraph";@@ -37,7 +37,7 @@ export const Header = React.memo(noAnnouncement,warning}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const announcements = useMessageStore((state) => state.announcements);const selectionMode = useSelectionStore((state) => state.selectionMode);@@ -47,7 +47,7 @@ export const Header = React.memo(<Viewstyle={{padding: 12,- backgroundColor: colors.errorBg,+ backgroundColor: colors.error.background,width: "95%",alignSelf: "center",borderRadius: 5,@@ -55,13 +55,18 @@ export const Header = React.memo(alignItems: "center"}}>- <Icon name="sync-alert" size={SIZE.md} color={colors.red} f />- <Paragraph style={{ marginLeft: 5 }} color={colors.red}>+ <Icon+ name="sync-alert"+ size={SIZE.md}+ color={colors.error.icon}+ f+ />+ <Paragraph style={{ marginLeft: 5 }} color={colors.error.icon}>{warning.title}</Paragraph></View>) : announcements.length !== 0 && !noAnnouncement ? (- <Announcement color={color || colors.accent} />+ <Announcement color={color || colors.primary.accent} />) : type === "search" ? null : !shouldShow ? (<Viewstyle={{@@ -74,7 +79,9 @@ export const Header = React.memo(>{messageCard ? (<Card- color={COLORS_NOTE[color?.toLowerCase()] || colors.accent}+ color={+ ColorValues[color?.toLowerCase()] || colors.primary.accent+ }/>) : null}</View>diff --git a/apps/mobile/app/components/list-items/headers/notebook-header.js b/apps/mobile/app/components/list-items/headers/notebook-header.jsindex a797c49ff..0ba290c97 100644--- a/apps/mobile/app/components/list-items/headers/notebook-header.js+++ b/apps/mobile/app/components/list-items/headers/notebook-header.js@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { useRef, useState } from "react";import React from "react";import { View } from "react-native";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useMenuStore } from "../../../stores/use-menu-store";import { ToastEvent } from "../../../services/event-manager";import { getTotalNotes } from "@notesnook/common";@@ -31,7 +31,7 @@ import Heading from "../../ui/typography/heading";import Paragraph from "../../ui/typography/paragraph";export const NotebookHeader = ({ notebook, onEditNotebook }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [isPinnedToMenu, setIsPinnedToMenu] = useState(db.shortcuts.exists(notebook.id));@@ -75,7 +75,7 @@ export const NotebookHeader = ({ notebook, onEditNotebook }) => {paddingTop: 25}}>- <Paragraph color={colors.icon} size={SIZE.xs}>+ <Paragraph color={colors.secondary.paragraph} size={SIZE.xs}>{new Date(notebook.dateEdited).toLocaleString()}</Paragraph><View@@ -110,7 +110,7 @@ export const NotebookHeader = ({ notebook, onEditNotebook }) => {height: 40}}type={isPinnedToMenu ? "grayBg" : "grayBg"}- color={isPinnedToMenu ? colors.accent : colors.icon}+ color={isPinnedToMenu ? colors.primary.accent : colors.primary.icon}size={SIZE.lg}/><IconButton@@ -119,7 +119,7 @@ export const NotebookHeader = ({ notebook, onEditNotebook }) => {tooltipText="Edit this notebook"name="pencil"type="grayBg"- color={colors.icon}+ color={colors.primary.icon}customStyle={{width: 40,height: 40@@ -129,7 +129,7 @@ export const NotebookHeader = ({ notebook, onEditNotebook }) => {</View>{notebook.description ? (- <Paragraph size={SIZE.md} color={colors.pri}>+ <Paragraph size={SIZE.md} color={colors.primary.paragraph}>{notebook.description}</Paragraph>) : null}@@ -141,7 +141,7 @@ export const NotebookHeader = ({ notebook, onEditNotebook }) => {fontFamily: null}}size={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}>{notebook.topics.length === 1? "1 topic"diff --git a/apps/mobile/app/components/list-items/headers/section-header.js b/apps/mobile/app/components/list-items/headers/section-header.jsindex 807469406..ccf087a9a 100644--- a/apps/mobile/app/components/list-items/headers/section-header.js+++ b/apps/mobile/app/components/list-items/headers/section-header.js@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React, { useEffect, useRef, useState } from "react";import { TouchableOpacity, useWindowDimensions, View } from "react-native";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useSettingStore } from "../../../stores/use-setting-store";import {eSendEvent,@@ -29,7 +29,7 @@ import {} from "../../../services/event-manager";import SettingsService from "../../../services/settings";import { GROUP } from "../../../utils/constants";-import { COLORS_NOTE } from "../../../utils/color-scheme";+import { ColorValues } from "../../../utils/colors";import { db } from "../../../common/database";import { eOpenJumpToDialog } from "../../../utils/events";import { SIZE } from "../../../utils/size";@@ -41,7 +41,7 @@ import { useCallback } from "react";export const SectionHeader = React.memo(function SectionHeader({ item, index, type, color, screen }) {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const { fontScale } = useWindowDimensions();const [groupOptions, setGroupOptions] = useState(db.settings?.getGroupOptions(type)@@ -85,7 +85,7 @@ export const SectionHeader = React.memo(justifyContent: "space-between",paddingHorizontal: 12,height: 35 * fontScale,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,alignSelf: "center",borderRadius: 5,marginVertical: 5@@ -104,7 +104,7 @@ export const SectionHeader = React.memo(}}><Heading- color={COLORS_NOTE[color?.toLowerCase()] || colors.accent}+ color={ColorValues[color?.toLowerCase()] || colors.primary.accent}size={SIZE.sm}style={{minWidth: 60,@@ -168,7 +168,7 @@ export const SectionHeader = React.memo(: "Switch to compact mode"}fwdRef={compactModeRef}- color={colors.icon}+ color={colors.secondary.icon}name={listMode == "compact" ? "view-list" : "view-list-outline"}onPress={() => {let settings = {};diff --git a/apps/mobile/app/components/list-items/note/index.js b/apps/mobile/app/components/list-items/note/index.jsindex cd0bf9c78..f8136d89a 100644--- a/apps/mobile/app/components/list-items/note/index.js+++ b/apps/mobile/app/components/list-items/note/index.js@@ -29,9 +29,8 @@ import { TaggedNotes } from "../../../screens/notes/tagged";import { TopicNotes } from "../../../screens/notes/topic-notes";import useNavigationStore from "../../../stores/use-navigation-store";import { useRelationStore } from "../../../stores/use-relation-store";-import { useSettingStore } from "../../../stores/use-setting-store";-import { useThemeStore } from "../../../stores/use-theme-store";-import { COLORS_NOTE } from "../../../utils/color-scheme";+import { useThemeColors } from "@notesnook/theme";+import { ColorValues } from "../../../utils/colors";import { SIZE } from "../../../utils/size";import { Properties } from "../../properties";import { Button } from "../../ui/button";@@ -40,6 +39,7 @@ import { ReminderTime } from "../../ui/reminder-time";import { TimeSince } from "../../ui/time-since";import Heading from "../../ui/typography/heading";import Paragraph from "../../ui/typography/paragraph";+import { useIsCompactModeEnabled } from "../../../hooks/use-is-compact-mode-enabled";function navigateToTag(item) {const tag = db.tags.tag(item.id);@@ -98,18 +98,15 @@ const NoteItem = ({dateBy = "dateCreated",noOpen = false}) => {- const colors = useThemeStore((state) => state.colors);- const notesListMode = useSettingStore(- (state) => state.settings.notesListMode- );- const compactMode = notesListMode === "compact";+ const { colors } = useThemeColors();+ const compactMode = useIsCompactModeEnabled(item);const attachmentCount = db.attachments?.ofNote(item.id, "all")?.length || 0;const _update = useRelationStore((state) => state.updater);// eslint-disable-next-line react-hooks/exhaustive-depsconst notebooks = React.useMemo(() => getNotebook(item), [item, _update]);const reminders = db.relations.from(item, "reminder");const reminder = getUpcomingReminder(reminders);- const noteColor = COLORS_NOTE[item.color?.toLowerCase()];+ const noteColor = ColorValues[item.color?.toLowerCase()];const tags = getTags(item);return (<>@@ -151,7 +148,7 @@ const NoteItem = ({borderRadius: 5,marginRight: 5,borderWidth: 0.5,- borderColor: colors.icon,+ borderColor: colors.primary.border,paddingHorizontal: 6,marginBottom: 5}}@@ -181,7 +178,9 @@ const NoteItem = ({{compactMode ? (<ParagraphnumberOfLines={1}- color={COLORS_NOTE[item.color?.toLowerCase()] || colors.heading}+ color={+ ColorValues[item.color?.toLowerCase()] || colors.primary.heading+ }style={{flexWrap: "wrap"}}@@ -192,7 +191,9 @@ const NoteItem = ({) : (<HeadingnumberOfLines={1}- color={COLORS_NOTE[item.color?.toLowerCase()] || colors.heading}+ color={+ ColorValues[item.color?.toLowerCase()] || colors.primary.heading+ }style={{flexWrap: "wrap"}}@@ -235,13 +236,13 @@ const NoteItem = ({marginRight: 6}}size={SIZE.sm}- color={colors.red}+ color={colors.error.accent}/>) : null}<TimeSincestyle={{fontSize: SIZE.xs,- color: colors.icon,+ color: colors.secondary.paragraph,marginRight: 6}}time={item[dateBy]}@@ -261,9 +262,12 @@ const NoteItem = ({<Iconname="attachment"size={SIZE.md}- color={colors.icon}+ color={colors.primary.icon}/>- <Paragraph color={colors.icon} size={SIZE.xs}>+ <Paragraph+ color={colors.secondary.paragraph}+ size={SIZE.xs}+ >{attachmentCount}</Paragraph></View>@@ -278,7 +282,8 @@ const NoteItem = ({marginRight: 6}}color={- COLORS_NOTE[item.color?.toLowerCase()] || colors.accent+ ColorValues[item.color?.toLowerCase()] ||+ colors.primary.accent}/>) : null}@@ -291,7 +296,7 @@ const NoteItem = ({style={{marginRight: 6}}- color={colors.icon}+ color={colors.primary.icon}/>) : null}@@ -336,7 +341,7 @@ const NoteItem = ({) : (<><Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.xs}style={{marginRight: 6@@ -349,7 +354,7 @@ const NoteItem = ({</Paragraph><Paragraph- color={colors.accent}+ color={colors.primary.accent}size={SIZE.xs}style={{marginRight: 6@@ -377,7 +382,7 @@ const NoteItem = ({marginRight: 6}}size={SIZE.sm}- color={colors.red}+ color={colors.error.accent}/>) : null}@@ -389,7 +394,7 @@ const NoteItem = ({style={{marginRight: 6}}- color={colors.icon}+ color={colors.secondary.background}/>) : null}@@ -408,7 +413,7 @@ const NoteItem = ({<TimeSincestyle={{fontSize: SIZE.xs,- color: colors.icon,+ color: colors.secondary.paragraph,marginRight: 6}}time={item[dateBy]}@@ -419,7 +424,7 @@ const NoteItem = ({<IconButtontestID={notesnook.listitem.menu}- color={colors.pri}+ color={colors.primary.paragraph}name="dots-horizontal"size={SIZE.xl}onPress={() => !noOpen && showActionSheet(item, isTrash)}diff --git a/apps/mobile/app/components/list-items/notebook/index.js b/apps/mobile/app/components/list-items/notebook/index.jsindex 1fe4abd96..b10686526 100644--- a/apps/mobile/app/components/list-items/notebook/index.js+++ b/apps/mobile/app/components/list-items/notebook/index.js@@ -23,8 +23,7 @@ import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { notesnook } from "../../../../e2e/test.ids";import { TopicNotes } from "../../../screens/notes/topic-notes";import { useSelectionStore } from "../../../stores/use-selection-store";-import { useSettingStore } from "../../../stores/use-setting-store";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import { Properties } from "../../properties";import { Button } from "../../ui/button";@@ -32,6 +31,7 @@ import { IconButton } from "../../ui/icon-button";import Heading from "../../ui/typography/heading";import Paragraph from "../../ui/typography/paragraph";import { getFormattedDate } from "@notesnook/common";+import { useIsCompactModeEnabled } from "../../../hooks/use-is-compact-mode-enabled";const showActionSheet = (item) => {Properties.present(item);@@ -49,11 +49,8 @@ export const NotebookItem = ({dateBy,totalNotes}) => {- const colors = useThemeStore((state) => state.colors);- const notebooksListMode = useSettingStore(- (state) => state.settings.notebooksListMode- );- const compactMode = notebooksListMode === "compact";+ const { colors } = useThemeColors();+ const compactMode = useIsCompactModeEnabled(item);const topics = item.topics?.slice(0, 3) || [];return (@@ -112,8 +109,6 @@ export const NotebookItem = ({key={topic.id}height={null}textStyle={{- fontWeight: "normal",- fontFamily: null,marginRight: 0}}type="grayBg"@@ -125,7 +120,7 @@ export const NotebookItem = ({maxWidth: 120,borderWidth: 0.5,paddingVertical: 2.5,- borderColor: colors.icon,+ borderColor: colors.primary.border,paddingHorizontal: 6,marginVertical: 5,marginRight: 5@@ -149,7 +144,7 @@ export const NotebookItem = ({{isTrash ? (<><Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.xs}style={{textAlignVertical: "center",@@ -160,7 +155,7 @@ export const NotebookItem = ({new Date(item.dateDeleted).toISOString().slice(0, 10)}</Paragraph><Paragraph- color={colors.accent}+ color={colors.primary.accent}size={SIZE.xs}style={{textAlignVertical: "center",@@ -172,7 +167,7 @@ export const NotebookItem = ({</>) : (<Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.xs}style={{marginRight: 6@@ -182,7 +177,7 @@ export const NotebookItem = ({</Paragraph>)}<Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.xs}style={{marginRight: 6@@ -203,7 +198,7 @@ export const NotebookItem = ({marginRight: 10,marginTop: 2}}- color={colors.accent}+ color={colors.primary.accent}/>) : null}</View>@@ -218,7 +213,7 @@ export const NotebookItem = ({{compactMode ? (<><Paragraph- color={colors.icon}+ color={colors.primary.icon}size={SIZE.xs}style={{marginRight: 6@@ -234,7 +229,7 @@ export const NotebookItem = ({) : null}<IconButton- color={colors.heading}+ color={colors.primary.heading}name="dots-horizontal"testID={notesnook.ids.notebook.menu}size={SIZE.xl}diff --git a/apps/mobile/app/components/list-items/reminder/index.tsx b/apps/mobile/app/components/list-items/reminder/index.tsxindex 1d59f3afd..11b8820ec 100644--- a/apps/mobile/app/components/list-items/reminder/index.tsx+++ b/apps/mobile/app/components/list-items/reminder/index.tsx@@ -20,7 +20,7 @@ import React from "react";import { View } from "react-native";import { notesnook } from "../../../../e2e/test.ids";import type { Reminder } from "../../../services/notifications";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import { Properties } from "../../properties";import { IconButton } from "../../ui/icon-button";@@ -41,7 +41,7 @@ const ReminderItem = React.memo(index: number;isSheet: boolean;}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const openReminder = () => {ReminderSheet.present(item, undefined, isSheet);};@@ -90,7 +90,7 @@ const ReminderItem = React.memo({item.disabled ? (<Viewstyle={{- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,flexDirection: "row",paddingHorizontal: 6,@@ -105,11 +105,11 @@ const ReminderItem = React.memo(<Iconname="bell-off-outline"size={SIZE.md}- color={colors.errorText}+ color={colors.error.icon}/><Paragraphsize={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}style={{ marginLeft: 5 }}>Disabled@@ -119,7 +119,7 @@ const ReminderItem = React.memo({item.mode === "repeat" && item.recurringMode ? (<Viewstyle={{- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,flexDirection: "row",paddingHorizontal: 6,@@ -131,10 +131,10 @@ const ReminderItem = React.memo(height: 30}}>- <Icon name="reload" size={SIZE.md} color={colors.accent} />+ <Icon name="reload" size={SIZE.md} color={colors.primary.accent} /><Paragraphsize={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}style={{ marginLeft: 5 }}>{item.recurringMode.slice(0, 1).toUpperCase() +@@ -160,7 +160,7 @@ const ReminderItem = React.memo(</View><IconButtontestID={notesnook.listitem.menu}- color={colors.pri}+ color={colors.primary.paragraph}name="dots-horizontal"size={SIZE.xl}onPress={() => Properties.present(item, [], isSheet)}diff --git a/apps/mobile/app/components/list-items/selection-wrapper/back-fill.js b/apps/mobile/app/components/list-items/selection-wrapper/back-fill.jsindex c3476210d..1c9d01e39 100644--- a/apps/mobile/app/components/list-items/selection-wrapper/back-fill.js+++ b/apps/mobile/app/components/list-items/selection-wrapper/back-fill.js@@ -17,37 +17,36 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { useThemeColors } from "@notesnook/theme";import React from "react";import { View } from "react-native";+import useIsSelected from "../../../hooks/use-selected";import { useEditorStore } from "../../../stores/use-editor-store";-import { useThemeStore } from "../../../stores/use-theme-store";-import { hexToRGBA } from "../../../utils/color-scheme/utils";export const Filler = ({ item }) => {- const colors = useThemeStore((state) => state.colors);-+ const { colors } = useThemeColors();const currentEditingNote = useEditorStore((state) => state.currentEditingNote);- const color = "gray";+ const [selected] = useIsSelected(item);- return currentEditingNote === item.id ? (+ return currentEditingNote === item.id || selected ? (<Viewstyle={{position: "absolute",width: "110%",height: "150%",- backgroundColor:- currentEditingNote === item.id- ? hexToRGBA(colors[color], 0.12)- : null,+ backgroundColor: colors.selected.background,borderLeftWidth: 5,borderLeftColor:currentEditingNote === item.id- ? colors[item.color || "accent"]+ ? item.color+ ? colors.static[item.color]+ : colors.selected.accent: "transparent"}}- ></View>+ collapsable={false}+ />) : null;};diff --git a/apps/mobile/app/components/list-items/selection-wrapper/index.js b/apps/mobile/app/components/list-items/selection-wrapper/index.jsindex cd3d6afc4..ffa55e8a6 100644--- a/apps/mobile/app/components/list-items/selection-wrapper/index.js+++ b/apps/mobile/app/components/list-items/selection-wrapper/index.js@@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { useThemeColors } from "@notesnook/theme";import React, { useRef } from "react";+import { useIsCompactModeEnabled } from "../../../hooks/use-is-compact-mode-enabled";import { useSelectionStore } from "../../../stores/use-selection-store";-import { useSettingStore } from "../../../stores/use-setting-store";-import { useThemeStore } from "../../../stores/use-theme-store";import { PressableButton } from "../../ui/pressable";import { Filler } from "./back-fill";import { SelectionIcon } from "./selection";@@ -29,51 +29,33 @@ const SelectionWrapper = ({children,item,background,- onLongPress,onPress,testID,isSheet}) => {const itemId = useRef(item.id);- const colors = useThemeStore((state) => state.colors);- const notebooksListMode = useSettingStore(- (state) => state.settings.notebooksListMode- );- const notesListMode = useSettingStore(- (state) => state.settings.notesListMode- );- const listMode =- item.type === "notebook" || item.itemType === "notebook"- ? notebooksListMode- : notesListMode;- const compactMode =- (item.type === "notebook" ||- item.itemType === "notebook" ||- item.itemType === "note" ||- item.type === "note") &&- listMode === "compact";+ const { colors, isDark } = useThemeColors();+ const compactMode = useIsCompactModeEnabled(item);+if (item.id !== itemId.current) {itemId.current = item.id;}- const _onLongPress = () => {+ const onLongPress = () => {if (!useSelectionStore.getState().selectionMode) {useSelectionStore.getState().setSelectionMode(true);}useSelectionStore.getState().setSelectedItem(item);};- const _onPress = async () => {- await onPress();- };return (<PressableButton- customColor={isSheet ? colors.transGray : "transparent"}+ customColor={isSheet ? colors.primary.hover : "transparent"}testID={testID}- onLongPress={_onLongPress}- onPress={_onPress}- customSelectedColor={colors.transGray}- customAlpha={!colors.night ? -0.02 : 0.02}+ onLongPress={onLongPress}+ onPress={onPress}+ customSelectedColor={colors.primary.hover}+ customAlpha={!isDark ? -0.02 : 0.02}customOpacity={1}customStyle={{flexDirection: "row",diff --git a/apps/mobile/app/components/list-items/selection-wrapper/selection.js b/apps/mobile/app/components/list-items/selection-wrapper/selection.jsindex 088865ef5..86ed4654b 100644--- a/apps/mobile/app/components/list-items/selection-wrapper/selection.js+++ b/apps/mobile/app/components/list-items/selection-wrapper/selection.js@@ -17,51 +17,21 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import React, { useEffect, useState } from "react";+import { useThemeColors } from "@notesnook/theme";+import React from "react";import { View } from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";+import { useIsCompactModeEnabled } from "../../../hooks/use-is-compact-mode-enabled";+import useIsSelected from "../../../hooks/use-selected";import { useSelectionStore } from "../../../stores/use-selection-store";-import { useThemeStore } from "../../../stores/use-theme-store";import { SIZE } from "../../../utils/size";-import { useSettingStore } from "../../../stores/use-setting-store";export const SelectionIcon = ({ item }) => {- const colors = useThemeStore((state) => state.colors);-+ const { colors } = useThemeColors();const selectionMode = useSelectionStore((state) => state.selectionMode);- const selectedItemsList = useSelectionStore(- (state) => state.selectedItemsList- );- const [selected, setSelected] = useState(false);- const notebooksListMode = useSettingStore(- (state) => state.settings.notebooksListMode- );- const notesListMode = useSettingStore(- (state) => state.settings.notesListMode- );- const listMode = item.type === "notebook" ? notebooksListMode : notesListMode;-- const compactMode =- (item.type === "notebook" || item.type === "note") &&- listMode === "compact";-- useEffect(() => {- if (selectionMode) {- let exists = selectedItemsList.filter(- (o) => o.dateCreated === item.dateCreated- );+ const [selected] = useIsSelected(item);- if (exists[0]) {- if (!selected) {- setSelected(true);- }- } else {- if (selected) {- setSelected(false);- }- }- }- }, [selectedItemsList, item.id, selectionMode, item.dateCreated, selected]);+ const compactMode = useIsCompactModeEnabled(item);return selectionMode ? (<View@@ -73,14 +43,14 @@ export const SelectionIcon = ({ item }) => {marginRight: 10,borderWidth: 1,borderRadius: 100,- borderColor: colors.border+ borderColor: colors.primary.border}}pointerEvents="none">{selected ? (<Iconsize={compactMode ? SIZE.xl - 2 : SIZE.xl}- color={selected ? colors.accent : colors.icon}+ color={selected ? colors.selected.accent : colors.primary.icon}name={"check"}/>) : null}diff --git a/apps/mobile/app/components/list-items/tag/index.js b/apps/mobile/app/components/list-items/tag/index.jsindex f0bb8d1e2..593ac5cb5 100644--- a/apps/mobile/app/components/list-items/tag/index.js+++ b/apps/mobile/app/components/list-items/tag/index.js@@ -21,7 +21,7 @@ import React from "react";import { View } from "react-native";import { notesnook } from "../../../../e2e/test.ids";import { TaggedNotes } from "../../../screens/notes/tagged";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import { Properties } from "../../properties";import { IconButton } from "../../ui/icon-button";@@ -31,7 +31,7 @@ import Paragraph from "../../ui/typography/paragraph";const TagItem = React.memo(({ item, index }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors, isDark } = useThemeColors();const onPress = () => {TaggedNotes.navigate(item, true);};@@ -39,9 +39,9 @@ const TagItem = React.memo(return (<PressableButtononPress={onPress}- selectedColor={colors.nav}+ selectedColor={colors.secondary.background}testID={notesnook.ids.tag.get(index)}- alpha={!colors.night ? -0.02 : 0.02}+ alpha={!isDark ? -0.02 : 0.02}opacity={1}customStyle={{paddingHorizontal: 12,@@ -61,7 +61,7 @@ const TagItem = React.memo(<Headingsize={SIZE.md}style={{- color: colors.accent+ color: colors.primary.accent}}>#@@ -69,7 +69,7 @@ const TagItem = React.memo({item.alias}</Heading><Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.xs}style={{marginTop: 5@@ -84,7 +84,7 @@ const TagItem = React.memo(</View><IconButton- color={colors.heading}+ color={colors.primary.heading}name="dots-horizontal"size={SIZE.xl}onPress={() => {diff --git a/apps/mobile/app/components/list/card.js b/apps/mobile/app/components/list/card.jsindex dd19f95c7..8feacec6b 100644--- a/apps/mobile/app/components/list/card.js+++ b/apps/mobile/app/components/list/card.js@@ -21,15 +21,15 @@ import React from "react";import { View } from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { useMessageStore } from "../../stores/use-message-store";-import { useThemeStore } from "../../stores/use-theme-store";-import { hexToRGBA } from "../../utils/color-scheme/utils";+import { useThemeColors } from "@notesnook/theme";+import { hexToRGBA } from "../../utils/colors";import { SIZE } from "../../utils/size";import { PressableButton } from "../ui/pressable";import Paragraph from "../ui/typography/paragraph";export const Card = ({ color, warning }) => {- const colors = useThemeStore((state) => state.colors);- color = color ? color : colors.accent;+ const { colors } = useThemeColors();+ color = color ? color : colors.primary.accent;const messageBoardState = useMessageStore((state) => state.message);const announcement = useMessageStore((state) => state.announcement);@@ -62,7 +62,7 @@ export const Card = ({ color, warning }) => {width: 40,backgroundColor:messageBoardState.type === "error"- ? hexToRGBA(colors.red, 0.15)+ ? hexToRGBA(colors.static.red, 0.15): hexToRGBA(color, 0.15),height: 40,borderRadius: 100,@@ -73,7 +73,7 @@ export const Card = ({ color, warning }) => {<Iconsize={SIZE.lg}color={- messageBoardState.type === "error" ? colors.errorText : color+ messageBoardState.type === "error" ? colors.error.icon : color}name={messageBoardState.icon}/>@@ -86,7 +86,7 @@ export const Card = ({ color, warning }) => {marginRight: 10}}>- <Paragraph color={colors.icon} size={SIZE.xs}>+ <Paragraph color={colors.secondary.paragraph} size={SIZE.xs}>{messageBoardState.message}</Paragraph><Paragraph@@ -94,7 +94,7 @@ export const Card = ({ color, warning }) => {flexWrap: "wrap",flexShrink: 1}}- color={colors.heading}+ color={colors.primary.heading}>{messageBoardState.actionText}</Paragraph>@@ -111,7 +111,9 @@ export const Card = ({ color, warning }) => {><Iconname="chevron-right"- color={messageBoardState.type === "error" ? colors.red : color}+ color={+ messageBoardState.type === "error" ? colors.error.icon : color+ }size={SIZE.lg}/></View>diff --git a/apps/mobile/app/components/list/empty.js b/apps/mobile/app/components/list/empty.jsindex 42973634f..d3fcaa3ee 100644--- a/apps/mobile/app/components/list/empty.js+++ b/apps/mobile/app/components/list/empty.js@@ -23,8 +23,8 @@ import { notesnook } from "../../../e2e/test.ids";import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";import { useTip } from "../../services/tip-manager";import { useSettingStore } from "../../stores/use-setting-store";-import { useThemeStore } from "../../stores/use-theme-store";-import { COLORS_NOTE } from "../../utils/color-scheme";+import { useThemeColors } from "@notesnook/theme";+import { ColorValues } from "../../utils/colors";import { SIZE } from "../../utils/size";import { Tip } from "../tip";import { Button } from "../ui/button";@@ -40,7 +40,7 @@ export const Empty = React.memo(type,screen}) {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const insets = useGlobalSafeAreaInsets();const { height } = useWindowDimensions();const introCompleted = useSettingStore(@@ -69,7 +69,7 @@ export const Empty = React.memo(<><Tipcolor={- COLORS_NOTE[headerProps.color?.toLowerCase()]+ ColorValues[headerProps.color?.toLowerCase()]? headerProps.color: "accent"}@@ -87,12 +87,10 @@ export const Empty = React.memo(iconPosition="right"icon="arrow-right"onPress={placeholderData.action}- accentColor={- COLORS_NOTE[headerProps.color?.toLowerCase()]- ? headerProps.color- : "accent"- }- accentText="light"+ buttonType={{+ text:+ colors.static[headerProps.color] || colors.primary.accent+ }}style={{alignSelf: "flex-start",borderRadius: 5,@@ -118,7 +116,8 @@ export const Empty = React.memo(<ActivityIndicatorsize={SIZE.lg}color={- COLORS_NOTE[headerProps.color?.toLowerCase()] || colors.accent+ ColorValues[headerProps.color?.toLowerCase()] ||+ colors.primary.accent}/></View>diff --git a/apps/mobile/app/components/list/index.js b/apps/mobile/app/components/list/index.jsindex 9b3296b82..d1292cf92 100644--- a/apps/mobile/app/components/list/index.js+++ b/apps/mobile/app/components/list/index.js@@ -24,7 +24,7 @@ import Animated, { FadeInDown } from "react-native-reanimated";import { notesnook } from "../../../e2e/test.ids";import { eSendEvent } from "../../services/event-manager";import Sync from "../../services/sync";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { db } from "../../common/database";import { eScrollEvent } from "../../utils/events";import { tabBarRef } from "../../utils/global-refs";@@ -93,7 +93,7 @@ const List = ({handlers,ScrollComponent}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const scrollRef = useRef();const [notesListMode, notebooksListMode] = useSettingStore((state) => [state.settings.notesListMode,@@ -188,9 +188,9 @@ const List = ({keyboardDismissMode="interactive"refreshControl={<RefreshControl- tintColor={colors.accent}- colors={[colors.accent]}- progressBackgroundColor={colors.nav}+ tintColor={colors.primary.accent}+ colors={[colors.primary.accent]}+ progressBackgroundColor={colors.secondary.background}onRefresh={_onRefresh}refreshing={false}/>diff --git a/apps/mobile/app/components/merge-conflicts/index.js b/apps/mobile/app/components/merge-conflicts/index.jsindex 4a9c30950..86243e28d 100644--- a/apps/mobile/app/components/merge-conflicts/index.js+++ b/apps/mobile/app/components/merge-conflicts/index.js@@ -33,7 +33,7 @@ import {} from "../../services/event-manager";import Navigation from "../../services/navigation";import Sync from "../../services/sync";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eOnLoadNote, eShowMergeDialog } from "../../utils/events";import { SIZE } from "../../utils/size";import { sleep } from "../../utils/time";@@ -49,7 +49,7 @@ import { useSettingStore } from "../../stores/use-setting-store";import { getFormattedDate } from "@notesnook/common";const MergeConflicts = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [visible, setVisible] = useState(false);const [keep, setKeep] = useState(null);const [copy, setCopy] = useState(null);@@ -152,16 +152,20 @@ const MergeConflicts = () => {}}>{back && (- <IconButton onPress={close} color={colors.pri} name="arrow-left" />+ <IconButton+ onPress={close}+ color={colors.primary.paragraph}+ name="arrow-left"+ />)}<Paragraphstyle={{ flexWrap: "wrap" }}- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.xs}><Textstyle={{- color: isCurrent ? colors.accent : colors.red,+ color: isCurrent ? colors.primary.accent : colors.static.red,fontWeight: "bold"}}>@@ -200,15 +204,17 @@ const MergeConflicts = () => {<Buttontitle="Discard"type="accent"- accentColor="red"+ buttonType={{+ color: colors.static.red,+ text: colors.static.white+ }}height={30}style={{borderRadius: 100,paddingHorizontal: 12}}fontSize={SIZE.xs}- accentText="light"- color={colors.errorText}+ color={colors.error.paragraph}onPress={() => {setDialogVisible(true);}}@@ -257,7 +263,7 @@ const MergeConflicts = () => {><SafeAreaViewstyle={{- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,paddingTop: insets.top}}>@@ -299,9 +305,9 @@ const MergeConflicts = () => {<Animated.Viewstyle={{height: height / 2 - (50 + insets.top / 2),- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,borderBottomWidth: 1,- borderBottomColor: colors.nav+ borderBottomColor: colors.secondary.background}}><Editor@@ -335,7 +341,7 @@ const MergeConflicts = () => {<Animated.Viewstyle={{height: height / 2 - (50 + insets.top / 2),- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,borderRadius: 10}}>diff --git a/apps/mobile/app/components/note-history/index.js b/apps/mobile/app/components/note-history/index.jsindex aaf7b54c4..c5424384e 100644--- a/apps/mobile/app/components/note-history/index.js+++ b/apps/mobile/app/components/note-history/index.js@@ -23,7 +23,7 @@ import { FlatList } from "react-native-gesture-handler";import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { db } from "../../common/database";import { presentSheet } from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { openLinkInBrowser } from "../../utils/functions";import { SIZE } from "../../utils/size";import DialogHeader from "../dialog/dialog-header";@@ -37,7 +37,7 @@ import { getFormattedDate, getTimeAgo } from "@notesnook/common";export default function NoteHistory({ note, fwdRef }) {const [history, setHistory] = useState([]);const [_loading, setLoading] = useState(true);- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();useEffect(() => {(async () => {@@ -89,12 +89,12 @@ export default function NoteHistory({ note, fwdRef }) {}}><Paragraph>{getDate(item.dateCreated, item.dateModified)}</Paragraph>- <Paragraph color={colors.icon} size={SIZE.xs}>+ <Paragraph color={colors.secondary.paragraph} size={SIZE.xs}>{getTimeAgo(item.dateModified)}</Paragraph></PressableButton>),- [colors.icon, preview]+ [colors.secondary.paragraph, preview]);return (@@ -128,8 +128,8 @@ export default function NoteHistory({ note, fwdRef }) {height: 200}}>- <Icon name="history" size={60} color={colors.icon} />- <Paragraph color={colors.icon}>+ <Icon name="history" size={60} color={colors.primary.icon} />+ <Paragraph color={colors.secondary.paragraph}>No note history found on this device.</Paragraph></View>@@ -138,7 +138,7 @@ export default function NoteHistory({ note, fwdRef }) {/><Paragraphsize={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}style={{alignSelf: "center"}}@@ -151,7 +151,10 @@ export default function NoteHistory({ note, fwdRef }) {colors);}}- style={{ color: colors.accent, textDecorationLine: "underline" }}+ style={{+ color: colors.primary.accent,+ textDecorationLine: "underline"+ }}>Learn how this works.</Text>diff --git a/apps/mobile/app/components/note-history/preview.js b/apps/mobile/app/components/note-history/preview.jsindex f937f8902..4d2d7ad29 100644--- a/apps/mobile/app/components/note-history/preview.js+++ b/apps/mobile/app/components/note-history/preview.js@@ -27,7 +27,7 @@ import { eSendEvent, ToastEvent } from "../../services/event-manager";import Navigation from "../../services/navigation";import { useEditorStore } from "../../stores/use-editor-store";import { useSelectionStore } from "../../stores/use-selection-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useTrashStore } from "../../stores/use-trash-store";import { eCloseSheet, eOnLoadNote } from "../../utils/events";import { sleep } from "../../utils/time";@@ -38,7 +38,7 @@ import { Button } from "../ui/button";import Paragraph from "../ui/typography/paragraph";export default function NotePreview({ session, content, note }) {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const editorId = ":noteHistory";async function restore() {@@ -137,7 +137,7 @@ export default function NotePreview({ session, content, note }) {alignItems: "center"}}>- <Paragraph color={colors.icon}>+ <Paragraph color={colors.secondary.paragraph}>Preview not available, content is encrypted.</Paragraph></View>diff --git a/apps/mobile/app/components/premium/component.js b/apps/mobile/app/components/premium/component.jsindex 04d559924..122a32666 100644--- a/apps/mobile/app/components/premium/component.js+++ b/apps/mobile/app/components/premium/component.js@@ -24,7 +24,7 @@ import { db } from "../../common/database";import { usePricing } from "../../hooks/use-pricing";import { DDS } from "../../services/device-detection";import { eSendEvent, presentSheet } from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useUserStore } from "../../stores/use-user-store";import { getElevationStyle } from "../../utils/elevation";import {@@ -49,7 +49,7 @@ import { Group } from "./group";import { PricingPlans } from "./pricing-plans";export const Component = ({ close, promo }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const user = useUserStore((state) => state.user);const userCanRequestTrial =user && (!user.subscription || !user.subscription.expiry) ? true : false;@@ -87,7 +87,7 @@ export const Component = ({ close, promo }) => {<Viewstyle={{width: "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,justifyContent: "space-between",borderRadius: 10,maxHeight: "100%"@@ -106,7 +106,7 @@ export const Component = ({ close, promo }) => {width: 50,height: 50}}- color={colors.pri}+ color={colors.primary.paragraph}name="close"/>@@ -131,7 +131,7 @@ export const Component = ({ close, promo }) => {<SvgViewwidth={350}height={350}- src={LAUNCH_ROCKET(colors.accent)}+ src={LAUNCH_ROCKET(colors.primary.accent)}/></View>@@ -144,7 +144,7 @@ export const Component = ({ close, promo }) => {}}>Notesnook{" "}- <Heading size={SIZE.lg} color={colors.accent}>+ <Heading size={SIZE.lg} color={colors.primary.accent}>Pro</Heading></Heading>@@ -155,7 +155,7 @@ export const Component = ({ close, promo }) => {marginBottom: 20}}size={SIZE.md}- color={colors.accent}+ color={colors.primary.accent}/>) : (<Paragraph@@ -225,7 +225,7 @@ export const Component = ({ close, promo }) => {{!user || userCanRequestTrial ? (<Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.xs}style={{alignSelf: "center",diff --git a/apps/mobile/app/components/premium/expiring.js b/apps/mobile/app/components/premium/expiring.jsindex 6f4e71f38..ea27621db 100644--- a/apps/mobile/app/components/premium/expiring.js+++ b/apps/mobile/app/components/premium/expiring.js@@ -26,7 +26,7 @@ import {eUnSubscribeEvent} from "../../services/event-manager";import PremiumService from "../../services/premium";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import {eOpenPremiumDialog,eOpenResultDialog,@@ -44,7 +44,7 @@ import { CompactFeatures } from "./compact-features";import { Offer } from "./offer";export const Expiring = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [visible, setVisible] = useState(false);const [status, setStatus] = useState({title: "Your trial is ending soon",@@ -146,7 +146,7 @@ export const Expiring = () => {size={SIZE.xs}style={{textDecorationLine: "underline",- color: colors.icon,+ color: colors.secondary.paragraph,marginTop: 10}}>@@ -159,7 +159,7 @@ export const Expiring = () => {<Viewstyle={{- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,width: "100%",borderBottomRightRadius: 10,borderBottomLeftRadius: 10diff --git a/apps/mobile/app/components/premium/feature.js b/apps/mobile/app/components/premium/feature.jsindex cc3493d11..768846387 100644--- a/apps/mobile/app/components/premium/feature.js+++ b/apps/mobile/app/components/premium/feature.js@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { Text, View } from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import Paragraph from "../ui/typography/paragraph";import { ProTag } from "./pro-tag";@@ -33,7 +33,7 @@ export const FeatureBlock = ({pro,proTagBg}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return vertical ? (<View@@ -42,7 +42,7 @@ export const FeatureBlock = ({alignItems: "center",paddingHorizontal: 12,marginBottom: 10,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 10,paddingVertical: 12}}@@ -69,9 +69,9 @@ export const FeatureBlock = ({minWidth: 100}}>- <Icon color={colors.icon} name={icon} size={SIZE.xl} />+ <Icon color={colors.primary.icon} name={icon} size={SIZE.xl} /><Paragraph size={SIZE.md}>- <Text style={{ color: colors.accent }}>{highlight}</Text>+ <Text style={{ color: colors.primary.accent }}>{highlight}</Text>{content ? "\n" + content : null}</Paragraph>@@ -87,7 +87,7 @@ export const FeatureBlock = ({height: 3,marginTop: 10,borderRadius: 100,- backgroundColor: colors.accent+ backgroundColor: colors.primary.accent}}/>)}diff --git a/apps/mobile/app/components/premium/group.js b/apps/mobile/app/components/premium/group.jsindex 2a2408aa0..cdb27352a 100644--- a/apps/mobile/app/components/premium/group.js+++ b/apps/mobile/app/components/premium/group.js@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { ScrollView, View } from "react-native";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";@@ -27,20 +27,20 @@ import { FeatureBlock } from "./feature";import { ProTag } from "./pro-tag";export const Group = ({ item, index }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<Viewstyle={{paddingHorizontal: 12,- backgroundColor: index % 2 !== 0 ? colors.bg : colors.nav,+ backgroundColor: index % 2 !== 0 ? colors.primary.background : colors.secondary.background,paddingVertical: 40}}>{item?.pro ? (<ProTagsize={SIZE.sm}- background={index % 2 === 0 ? colors.bg : colors.nav}+ background={index % 2 === 0 ? colors.primary.background : colors.secondary.background}/>) : null}<Heading>{item.title}</Heading>@@ -60,7 +60,7 @@ export const Group = ({ item, index }) => {{...item}detail={item.detail}pro={item.pro}- proTagBg={index % 2 === 0 ? colors.bg : colors.nav}+ proTagBg={index % 2 === 0 ? colors.primary.background : colors.secondary.background}/>))}</ScrollView>@@ -71,7 +71,7 @@ export const Group = ({ item, index }) => {marginTop: 10}}size={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}>{item.info}</Paragraph>diff --git a/apps/mobile/app/components/premium/index.js b/apps/mobile/app/components/premium/index.jsindex 46c25bc49..82c438ba8 100644--- a/apps/mobile/app/components/premium/index.js+++ b/apps/mobile/app/components/premium/index.js@@ -71,7 +71,7 @@ class PremiumDialog extends React.Component {<BaseDialoganimation="slide"bounce={false}- background={this.props.colors.bg}+ background={this.props.colors.primary.background}onRequestClose={this.onClose}><Componentdiff --git a/apps/mobile/app/components/premium/offer.js b/apps/mobile/app/components/premium/offer.jsindex 699a32190..365f5d261 100644--- a/apps/mobile/app/components/premium/offer.js+++ b/apps/mobile/app/components/premium/offer.js@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { Text } from "react-native";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import Paragraph from "../ui/typography/paragraph";@@ -28,7 +28,7 @@ export const Offer = ({text = "on yearly plan, offer ends soon",padding = 0}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<Paragraph@@ -39,8 +39,8 @@ export const Offer = ({size={SIZE.xxxl}>GET {off}- <Text style={{ color: colors.accent }}>%</Text> OFF!{"\n"}- <Paragraph color={colors.icon}>{text}</Paragraph>+ <Text style={{ color: colors.primary.accent }}>%</Text> OFF!{"\n"}+ <Paragraph color={colors.secondary.paragraph}>{text}</Paragraph></Paragraph>);};diff --git a/apps/mobile/app/components/premium/premium-toast.js b/apps/mobile/app/components/premium/premium-toast.jsindex 1900feada..2cc726f3c 100644--- a/apps/mobile/app/components/premium/premium-toast.js+++ b/apps/mobile/app/components/premium/premium-toast.js@@ -27,7 +27,7 @@ import {eSubscribeEvent,eUnSubscribeEvent} from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { getElevationStyle } from "../../utils/elevation";import {eCloseActionSheet,@@ -42,7 +42,7 @@ import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";export const PremiumToast = ({ context = "global", offset = 0 }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [msg, setMsg] = useState(null);const timer = useRef();const keyboard = useKeyboard();@@ -92,7 +92,7 @@ export const PremiumToast = ({ context = "global", offset = 0 }) => {exiting={FadeOutUp}style={{position: "absolute",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,zIndex: 999,...getElevationStyle(20),padding: 12,@@ -119,7 +119,7 @@ export const PremiumToast = ({ context = "global", offset = 0 }) => {style={{flexWrap: "wrap"}}- color={colors.accent}+ color={colors.primary.accent}size={SIZE.md}>{msg.title}@@ -130,7 +130,7 @@ export const PremiumToast = ({ context = "global", offset = 0 }) => {flexWrap: "wrap"}}size={SIZE.sm}- color={colors.pri}+ color={colors.primary.paragraph}>{msg.desc}</Paragraph>diff --git a/apps/mobile/app/components/premium/pricing-plans.js b/apps/mobile/app/components/premium/pricing-plans.jsindex 3590c2e36..224934d96 100644--- a/apps/mobile/app/components/premium/pricing-plans.js+++ b/apps/mobile/app/components/premium/pricing-plans.js@@ -28,7 +28,7 @@ import {ToastEvent} from "../../services/event-manager";import PremiumService from "../../services/premium";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useUserStore } from "../../stores/use-user-store";import {eClosePremiumDialog,@@ -66,7 +66,7 @@ export const PricingPlans = ({heading = true,compact = false}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const user = useUserStore((state) => state.user);const [product, setProduct] = useState(null);const [buying, setBuying] = useState(false);@@ -176,7 +176,7 @@ export const PricingPlans = ({height: 100}}>- <ActivityIndicator color={colors.accent} size={25} />+ <ActivityIndicator color={colors.primary.accent} size={25} /></View>) : (<View@@ -251,7 +251,7 @@ export const PricingPlans = ({<Paragraphstyle={{textDecorationLine: "line-through",- color: colors.icon+ color: colors.secondary.paragraph}}size={SIZE.sm}>@@ -273,7 +273,7 @@ export const PricingPlans = ({marginBottom: 20}}>- <Heading color={colors.accent}>+ <Heading color={colors.primary.accent}>Get {monthlyPlan?.info?.discount}% off in{" "}{monthlyPlan?.info?.country}</Heading>@@ -455,7 +455,7 @@ export const PricingPlans = ({{!user || !upgrade ? (<Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.xs}style={{alignSelf: "center",@@ -479,7 +479,7 @@ export const PricingPlans = ({<ParagraphtextBreakStrategy="balanced"size={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}style={{alignSelf: "center",marginTop: 10,@@ -493,7 +493,7 @@ export const PricingPlans = ({) : (<Paragraphsize={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}style={{alignSelf: "center",marginTop: 10,@@ -513,7 +513,7 @@ export const PricingPlans = ({><Paragraphsize={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}style={{maxWidth: "100%",textAlign: "center"@@ -530,7 +530,7 @@ export const PricingPlans = ({style={{textDecorationLine: "underline"}}- color={colors.accent}+ color={colors.primary.accent}>Terms of Service{" "}</Paragraph>@@ -545,7 +545,7 @@ export const PricingPlans = ({style={{textDecorationLine: "underline"}}- color={colors.accent}+ color={colors.primary.accent}>Privacy Policy.</Paragraph>diff --git a/apps/mobile/app/components/premium/pro-tag.js b/apps/mobile/app/components/premium/pro-tag.jsindex c1c9a6848..8268ed753 100644--- a/apps/mobile/app/components/premium/pro-tag.js+++ b/apps/mobile/app/components/premium/pro-tag.js@@ -20,16 +20,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { View } from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import Paragraph from "../ui/typography/paragraph";export const ProTag = ({ width, size, background }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<Viewstyle={{- backgroundColor: background || colors.bg,+ backgroundColor: background || colors.primary.background,borderRadius: 100,width: width || 60,justifyContent: "center",@@ -43,10 +43,10 @@ export const ProTag = ({ width, size, background }) => {marginRight: 3}}size={size}- color={colors.accent}+ color={colors.primary.accent}name="crown"/>- <Paragraph size={size - 1.5} color={colors.accent}>+ <Paragraph size={size - 1.5} color={colors.primary.accent}>PRO</Paragraph></View>diff --git a/apps/mobile/app/components/properties/color-tags.js b/apps/mobile/app/components/properties/color-tags.jsindex 5f9c71c0c..98ea8b12c 100644--- a/apps/mobile/app/components/properties/color-tags.js+++ b/apps/mobile/app/components/properties/color-tags.js@@ -26,11 +26,14 @@ import { eSendEvent } from "../../services/event-manager";import Navigation from "../../services/navigation";import { useMenuStore } from "../../stores/use-menu-store";import { useSettingStore } from "../../stores/use-setting-store";-import { COLORS_NOTE } from "../../utils/color-scheme";+import { ColorValues } from "../../utils/colors";import { refreshNotesPage } from "../../utils/events";import { SIZE } from "../../utils/size";import { PressableButton } from "../ui/pressable";+import { useThemeColors } from "@notesnook/theme";+export const ColorTags = ({ item }) => {+ const { colors } = useThemeColors();const [note, setNote] = useState(item);const setColorNotes = useMenuStore((state) => state.setColorNotes);const isTablet = useSettingStore((state) => state.deviceMode) !== "mobile";@@ -50,13 +53,14 @@ export const ColorTags = ({ item }) => {const _renderColor = (c) => {const color = {name: c,- value: COLORS_NOTE[c?.toLowerCase()]+ value: ColorValues[c?.toLowerCase()]};return (<PressableButtontype="accent"- accentColor={color.name.toLowerCase()}+ accentColor={colors.static[color.name?.toLowerCase()]}+ accentText={colors.static.white}testID={notesnook.ids.dialogs.actionsheet.color(c)}key={color.value}onPress={() => changeColor(color)}@@ -88,7 +92,7 @@ export const ColorTags = ({ item }) => {justifyContent: isTablet ? "center" : "space-between"}}>- {Object.keys(COLORS_NOTE).map(_renderColor)}+ {Object.keys(ColorValues).map(_renderColor)}</View>);};diff --git a/apps/mobile/app/components/properties/date-meta.js b/apps/mobile/app/components/properties/date-meta.jsindex 7e0c1f9c8..946313215 100644--- a/apps/mobile/app/components/properties/date-meta.js+++ b/apps/mobile/app/components/properties/date-meta.js@@ -19,12 +19,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { View } from "react-native";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import Paragraph from "../ui/typography/paragraph";import { getFormattedDate } from "@notesnook/common";export const DateMeta = ({ item }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const getNameFromKey = (key) => {switch (key) {@@ -62,10 +62,10 @@ export const DateMeta = ({ item }) => {paddingVertical: 3}}>- <Paragraph size={SIZE.xs} color={colors.icon}>+ <Paragraph size={SIZE.xs} color={colors.secondary.paragraph}>{getNameFromKey(key)}</Paragraph>- <Paragraph size={SIZE.xs} color={colors.icon}>+ <Paragraph size={SIZE.xs} color={colors.secondary.paragraph}>{getFormattedDate(item[key], "date-time")}</Paragraph></View>@@ -74,6 +74,10 @@ export const DateMeta = ({ item }) => {return (<Viewstyle={{+ paddingVertical: 5,+ marginTop: 5,+ borderTopWidth: 1,+ borderTopColor: colors.secondary.background,paddingHorizontal: 12}}>diff --git a/apps/mobile/app/components/properties/dev-mode.js b/apps/mobile/app/components/properties/dev-mode.jsdeleted file mode 100644index 13b13c8da..000000000--- a/apps/mobile/app/components/properties/dev-mode.js+++ /dev/null@@ -1,71 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import Clipboard from "@react-native-clipboard/clipboard";-import React from "react";-import { View } from "react-native";-import { db } from "../../common/database";-import { ToastEvent } from "../../services/event-manager";-import { useSettingStore } from "../../stores/use-setting-store";-import { SIZE } from "../../utils/size";-import { Button } from "../ui/button";-export const DevMode = ({ item }) => {- const devMode = useSettingStore((state) => state.settings.devMode);-- return devMode ? (- <View- style={{- width: "100%",- paddingHorizontal: 12,- marginTop: 10- }}- >- <Button- onPress={async () => {- let additionalData = {};- if (item.type === "note") {- let content = await db.content.raw(item.contentId);- if (content) {- content = db.debug.strip(content);- additionalData.content = content;- }- }- additionalData.lastSynced = await db.lastSynced();- let _note = { ...item };- _note.additionalData = additionalData;- Clipboard.setString(db.debug.strip(_note));-- ToastEvent.show({- heading: "Debug data copied!",- type: "success",- context: "local"- });- }}- fontSize={SIZE.sm}- title="Copy debug data"- icon="clipboard"- height={30}- type="warn"- style={{- alignSelf: "flex-end"- }}- />- </View>- ) : null;-};diff --git a/apps/mobile/app/components/properties/index.js b/apps/mobile/app/components/properties/index.jsindex 9a4c8eca8..1896e93a9 100644--- a/apps/mobile/app/components/properties/index.js+++ b/apps/mobile/app/components/properties/index.js@@ -23,26 +23,25 @@ import { db } from "../../common/database";import { DDS } from "../../services/device-detection";import { presentSheet } from "../../services/event-manager";import SearchService from "../../services/search";-import { useThemeStore } from "../../stores/use-theme-store";-import { COLORS_NOTE } from "../../utils/color-scheme";+import { useThemeColors } from "@notesnook/theme";+import { ColorValues } from "../../utils/colors";import { SIZE } from "../../utils/size";import SheetProvider from "../sheet-provider";import { ReminderTime } from "../ui/reminder-time";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";import { DateMeta } from "./date-meta";-import { DevMode } from "./dev-mode";import { Items } from "./items";import Notebooks from "./notebooks";import { Synced } from "./synced";import { Tags, TagStrip } from "./tags";const Line = ({ top = 6, bottom = 6 }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<Viewstyle={{height: 1,- backgroundColor: colors.nav,+ backgroundColor: colors.primary.border,width: "100%",marginTop: top,marginBottom: bottom@@ -52,9 +51,9 @@ const Line = ({ top = 6, bottom = 6 }) => {};export const Properties = ({ close = () => {}, item, buttons = [] }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const alias = item.alias || item.title;- const isColor = !!COLORS_NOTE[item.title];+ const isColor = !!ColorValues[item.title];if (!item || !item.id) {return (@@ -68,7 +67,7 @@ export const Properties = ({ close = () => {}, item, buttons = [] }) => {keyboardShouldPersistTaps="always"keyboardDismissMode="none"style={{- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,borderBottomRightRadius: DDS.isLargeTablet() ? 10 : 1,borderBottomLeftRadius: DDS.isLargeTablet() ? 10 : 1,maxHeight: "100%"@@ -81,12 +80,13 @@ export const Properties = ({ close = () => {}, item, buttons = [] }) => {style={{paddingHorizontal: 12,marginTop: 5,- zIndex: 10+ zIndex: 10,+ marginBottom: 6}}><Heading size={SIZE.lg}>{item.type === "tag" && !isColor ? (- <Heading size={SIZE.xl} color={colors.accent}>+ <Heading size={SIZE.xl} color={colors.primary.accent}>#</Heading>) : null}@@ -112,7 +112,6 @@ export const Properties = ({ close = () => {}, item, buttons = [] }) => {/>) : null}</View>- <Line top={12} /><DateMeta item={item} /><Line bottom={0} />@@ -137,7 +136,6 @@ export const Properties = ({ close = () => {}, item, buttons = [] }) => {}}/><Synced item={item} close={close} />- <DevMode item={item} />{DDS.isTab ? (<Viewdiff --git a/apps/mobile/app/components/properties/items.js b/apps/mobile/app/components/properties/items.jsindex 12b578145..b06ac0330 100644--- a/apps/mobile/app/components/properties/items.js+++ b/apps/mobile/app/components/properties/items.js@@ -23,13 +23,13 @@ import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { useActions } from "../../hooks/use-actions";import { DDS } from "../../services/device-detection";import { useSettingStore } from "../../stores/use-setting-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { Button } from "../ui/button";import { PressableButton } from "../ui/pressable";import Paragraph from "../ui/typography/paragraph";export const Items = ({ item, buttons, close }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const dimensions = useSettingStore((state) => state.dimensions);const actions = useActions({ item, close });const data = actions.filter((i) => buttons.indexOf(i.id) > -1 && !i.hidden);@@ -70,10 +70,10 @@ export const Items = ({ item, buttons, close }) => {size={DDS.isTab ? SIZE.xxl : SIZE.lg}color={item.on- ? colors.accent+ ? colors.primary.accent: item.id.match(/(delete|trash)/g)- ? colors.errorText- : colors.icon+ ? colors.error.icon+ : colors.secondary.icon}/></PressableButton>@@ -89,10 +89,10 @@ export const Items = ({ item, buttons, close }) => {key={item.name + item.title}buttonType={{text: item.on- ? colors.accent+ ? colors.primary.accent: item.name === "Delete" || item.name === "PermDelete"- ? colors.errorText- : colors.pri+ ? colors.error.paragraph+ : colors.primary.paragraph}}onPress={item.func}title={item.title}@@ -142,10 +142,10 @@ export const Items = ({ item, buttons, close }) => {size={DDS.isTab ? SIZE.xxl : SIZE.md + 4}color={item.on- ? colors.accent+ ? colors.primary.accent: item.name === "Delete" || item.name === "PermDelete"- ? colors.errorText- : colors.icon+ ? colors.error.icon+ : colors.secondary.icon}/></PressableButton>diff --git a/apps/mobile/app/components/properties/notebooks.js b/apps/mobile/app/components/properties/notebooks.jsindex eac495f32..1e95f025a 100644--- a/apps/mobile/app/components/properties/notebooks.js+++ b/apps/mobile/app/components/properties/notebooks.js@@ -30,14 +30,14 @@ import {} from "../../services/event-manager";import Navigation from "../../services/navigation";import { useNotebookStore } from "../../stores/use-notebook-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { Button } from "../ui/button";import Heading from "../ui/typography/heading";import { eClearEditor } from "../../utils/events";export default function Notebooks({ note, close, full }) {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const notebooks = useNotebookStore((state) => state.notebooks);function getNotebooks(item) {let filteredNotebooks = [];@@ -95,15 +95,15 @@ export default function Notebooks({ note, close, full }) {flexGrow: 1,padding: 6,borderWidth: full ? 0 : 1,- borderColor: colors.nav,+ borderColor: colors.primary.background,borderRadius: 10,- backgroundColor: full ? "transparent" : colors.nav,+ backgroundColor: full ? "transparent" : colors.secondary.background,minHeight: 42}}><Iconname="book-outline"- color={colors.accent}+ color={colors.primary.accent}size={SIZE.sm}style={{marginRight: 5@@ -130,7 +130,7 @@ export default function Notebooks({ note, close, full }) {style={{flexDirection: "row",marginLeft: 8,- borderLeftColor: colors.nav,+ borderLeftColor: colors.primary.hover,borderLeftWidth: 1,paddingLeft: 8}}diff --git a/apps/mobile/app/components/properties/synced.js b/apps/mobile/app/components/properties/synced.jsindex afb1f6536..ef2c2bd59 100644--- a/apps/mobile/app/components/properties/synced.js+++ b/apps/mobile/app/components/properties/synced.js@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { View } from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useUserStore } from "../../stores/use-user-store";import { openLinkInBrowser } from "../../utils/functions";import { SIZE } from "../../utils/size";@@ -29,7 +29,7 @@ import { Button } from "../ui/button";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";export const Synced = ({ item, close }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const user = useUserStore((state) => state.user);const lastSynced = useUserStore((state) => state.lastSynced);@@ -46,10 +46,10 @@ export const Synced = ({ item, close }) => {paddingTop: 10,marginTop: 10,borderTopWidth: 1,- borderTopColor: colors.nav+ borderTopColor: colors.secondary.background}}>- <Icon name="shield-key-outline" color={colors.accent} size={SIZE.xxxl} />+ <Icon name="shield-key-outline" color={colors.primary.accent} size={SIZE.xxxl} /><Viewstyle={{@@ -59,7 +59,7 @@ export const Synced = ({ item, close }) => {}}><Heading- color={colors.heading}+ color={colors.primary.heading}size={SIZE.xs}style={{flexWrap: "wrap"@@ -72,7 +72,7 @@ export const Synced = ({ item, close }) => {flexWrap: "wrap"}}size={SIZE.xs}- color={colors.pri}+ color={colors.primary.paragraph}>No one can view this {item.itemType || item.type} except you.</Paragraph>diff --git a/apps/mobile/app/components/properties/tags.js b/apps/mobile/app/components/properties/tags.jsindex 5d5f5e576..650cda409 100644--- a/apps/mobile/app/components/properties/tags.js+++ b/apps/mobile/app/components/properties/tags.js@@ -21,14 +21,14 @@ import React from "react";import { View } from "react-native";import { db } from "../../common/database";import { TaggedNotes } from "../../screens/notes/tagged";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { sleep } from "../../utils/time";import ManageTagsSheet from "../sheets/manage-tags";import { Button } from "../ui/button";import { ColorTags } from "./color-tags";export const Tags = ({ item, close }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return item.id ? (<View@@ -50,7 +50,7 @@ export const Tags = ({ item, close }) => {ManageTagsSheet.present([item]);}}buttonType={{- text: colors.accent+ text: colors.primary.accent}}title="Add tags"type="grayBg"diff --git a/apps/mobile/app/components/properties/topics.js b/apps/mobile/app/components/properties/topics.jsindex fc34daf07..7727d38c5 100644--- a/apps/mobile/app/components/properties/topics.js+++ b/apps/mobile/app/components/properties/topics.js@@ -34,7 +34,7 @@ export const Topics = ({ item, close }) => {title={topic.title}type="grayBg"// buttonType={{- // text: colors.accent+ // text: colors.primary.accent// }}height={30}onPress={() => open(topic)}diff --git a/apps/mobile/app/components/selection-header/index.js b/apps/mobile/app/components/selection-header/index.jsindex 881acc0df..1b6264d76 100644--- a/apps/mobile/app/components/selection-header/index.js+++ b/apps/mobile/app/components/selection-header/index.js@@ -26,7 +26,7 @@ import Navigation from "../../services/navigation";import SearchService from "../../services/search";import useNavigationStore from "../../stores/use-navigation-store";import { useSelectionStore } from "../../stores/use-selection-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { deleteItems } from "../../utils/functions";import { tabBarRef } from "../../utils/global-refs";import { SIZE } from "../../utils/size";@@ -39,7 +39,7 @@ import Heading from "../ui/typography/heading";import ManageTagsSheet from "../sheets/manage-tags";export const SelectionHeader = React.memo(() => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const selectionMode = useSelectionStore((state) => state.selectionMode);const selectedItemsList = useSelectionStore((state) => state.selectedItemsList@@ -131,7 +131,7 @@ export const SelectionHeader = React.memo(() => {width: "100%",height: Platform.OS === "android" ? 50 + insets.top : 50,paddingTop: Platform.OS === "android" ? insets.top : null,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,justifyContent: "space-between",alignItems: "center",flexDirection: "row",@@ -162,13 +162,13 @@ export const SelectionHeader = React.memo(() => {setSelectionMode(!selectionMode);}}size={SIZE.xl}- color={colors.icon}+ color={colors.primary.icon}name="close"/><Viewstyle={{- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,height: 40,borderRadius: 100,paddingHorizontal: 16,@@ -177,7 +177,7 @@ export const SelectionHeader = React.memo(() => {alignItems: "center"}}>- <Heading size={SIZE.md} color={colors.accent}>+ <Heading size={SIZE.md} color={colors.primary.accent}>{selectedItemsList.length}</Heading></View>@@ -200,7 +200,7 @@ export const SelectionHeader = React.memo(() => {customStyle={{marginLeft: 10}}- color={allSelected ? colors.accent : colors.pri}+ color={colors.primary.paragraph}name="select-all"size={SIZE.xl}/>@@ -218,7 +218,7 @@ export const SelectionHeader = React.memo(() => {customStyle={{marginLeft: 10}}- color={colors.pri}+ color={colors.primary.icon}tooltipText="Manage tags"tooltipPosition={4}name="pound"@@ -233,9 +233,9 @@ export const SelectionHeader = React.memo(() => {customStyle={{marginLeft: 10}}- color={colors.pri}tooltipText="Add to notebooks"tooltipPosition={4}+ color={colors.primary.paragraph}name="plus"size={SIZE.xl}/>@@ -249,7 +249,7 @@ export const SelectionHeader = React.memo(() => {customStyle={{marginLeft: 10}}- color={colors.pri}+ color={colors.primary.paragraph}name="export"size={SIZE.xl}/>@@ -292,7 +292,7 @@ export const SelectionHeader = React.memo(() => {}`}tooltipPosition={4}testID="select-minus"- color={colors.pri}+ color={colors.primary.paragraph}name="minus"size={SIZE.xl}/>@@ -306,7 +306,7 @@ export const SelectionHeader = React.memo(() => {}}tooltipText="Remove from favorites"tooltipPosition={4}- color={colors.pri}+ color={colors.primary.paragraph}name="star-off"size={SIZE.xl}/>@@ -335,9 +335,9 @@ export const SelectionHeader = React.memo(() => {return;}}- color={colors.pri}tooltipText="Move to trash"tooltipPosition={1}+ color={colors.primary.paragraph}name="delete"size={SIZE.xl}/>@@ -349,7 +349,7 @@ export const SelectionHeader = React.memo(() => {customStyle={{marginLeft: 10}}- color={colors.pri}+ color={colors.primary.paragraph}onPress={restoreItem}name="delete-restore"tooltipText="Restore"@@ -361,7 +361,7 @@ export const SelectionHeader = React.memo(() => {customStyle={{marginLeft: 10}}- color={colors.pri}+ color={colors.primary.paragraph}onPress={deleteItem}tooltipText="Delete"tooltipPosition={4}diff --git a/apps/mobile/app/components/sheet-provider/index.js b/apps/mobile/app/components/sheet-provider/index.jsindex c517d26d3..c3bc0951e 100644--- a/apps/mobile/app/components/sheet-provider/index.js+++ b/apps/mobile/app/components/sheet-provider/index.js@@ -25,7 +25,7 @@ import {eSubscribeEvent,eUnSubscribeEvent} from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eCloseSheet, eOpenSheet } from "../../utils/events";import { SIZE } from "../../utils/size";import { sleep } from "../../utils/time";@@ -34,7 +34,7 @@ import SheetWrapper from "../ui/sheet";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";const SheetProvider = ({ context = "global" }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [visible, setVisible] = useState(false);const [data, setData] = useState(null);const actionSheetRef = useRef();@@ -121,13 +121,13 @@ const SheetProvider = ({ context = "global" }) => {marginTop: 15}}size={50}- color={colors.accent}+ color={colors.primary.accent}/>) : null}{data?.icon ? (<Icon- color={colors[data.iconColor] || colors.accent}+ color={colors[dialogData.iconColor] || colors.primary.accent}name={data.icon}size={50}/>@@ -193,7 +193,7 @@ const SheetProvider = ({ context = "global" }) => {onPress={data.action}key={data.actionText}title={data.actionText}- accentColor={data.iconColor || "accent"}+ accentColor={data.iconColor}accentText="light"type="accent"height={40}@@ -229,10 +229,10 @@ const SheetProvider = ({ context = "global" }) => {}}size={SIZE.xs}onPress={data.learnMorePress}- color={colors.icon}+ color={colors.secondary.paragraph}><Icon- color={colors.icon}+ color={colors.primary.icon}name="information-outline"size={SIZE.xs}/>{" "}diff --git a/apps/mobile/app/components/sheets/add-notebook/index.js b/apps/mobile/app/components/sheets/add-notebook/index.jsindex 0524bd607..6e0b02ba9 100644--- a/apps/mobile/app/components/sheets/add-notebook/index.js+++ b/apps/mobile/app/components/sheets/add-notebook/index.js@@ -354,7 +354,7 @@ export class AddNotebookSheet extends React.Component {refs[this.prevIndex].setNativeProps({text: value,style: {- borderBottomColor: colors.accent+ borderBottomColor: colors.primary.accent}});}@@ -369,7 +369,9 @@ export class AddNotebookSheet extends React.Component {testID: "topic-add-button",icon: this.state.editTopic ? "check" : "plus",onPress: this.onSubmit,- color: topicInputFocused ? colors.accent : colors.icon+ color: topicInputFocused+ ? colors.primary.accent+ : colors.secondary.icon}}placeholder="Add a topic"/>@@ -413,7 +415,7 @@ const TopicItem = ({ item, index, colors, onPress, onDelete }) => {flexDirection: "row",justifyContent: "space-between",alignItems: "center",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginVertical: 5}}@@ -436,11 +438,11 @@ const TopicItem = ({ item, index, colors, onPress, onDelete }) => {style={[styles.topicInput,{- color: colors.pri+ color: colors.primary.paragraph}]}defaultValue={item}- placeholderTextColor={colors.placeholder}+ placeholderTextColor={colors.primary.placeholder}/><View@@ -459,7 +461,7 @@ const TopicItem = ({ item, index, colors, onPress, onDelete }) => {}}name="pencil"size={SIZE.lg - 5}- color={colors.icon}+ color={colors.secondary.icon}/><IconButtononPress={() => {@@ -467,7 +469,7 @@ const TopicItem = ({ item, index, colors, onPress, onDelete }) => {}}name="minus"size={SIZE.lg}- color={colors.icon}+ color={colors.secondary.icon}/></View></View>diff --git a/apps/mobile/app/components/sheets/add-to/index.js b/apps/mobile/app/components/sheets/add-to/index.jsindex fc9d8da9b..99567b7ed 100644--- a/apps/mobile/app/components/sheets/add-to/index.js+++ b/apps/mobile/app/components/sheets/add-to/index.js@@ -31,8 +31,8 @@ import SearchService from "../../../services/search";import { useNotebookStore } from "../../../stores/use-notebook-store";import { useSelectionStore } from "../../../stores/use-selection-store";import { useSettingStore } from "../../../stores/use-setting-store";-import { useThemeStore } from "../../../stores/use-theme-store";import { eOnTopicSheetUpdate } from "../../../utils/events";+import { useThemeColors } from "@notesnook/theme";import { Dialog } from "../../dialog";import DialogHeader from "../../dialog/dialog-header";import { presentDialog } from "../../dialog/functions";@@ -45,7 +45,7 @@ import { useItemSelectionStore } from "./store";import { useRelationStore } from "../../../stores/use-relation-store";const MoveNoteSheet = ({ note, actionSheetRef }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const notebooks = useNotebookStore((state) =>state.notebooks.filter((n) => n?.type === "notebook"));@@ -385,7 +385,11 @@ const MoveNoteSheet = ({ note, actionSheetRef }) => {alignItems: "center"}}>- <Icon name="book-outline" color={colors.icon} size={100} />+ <Icon+ name="book-outline"+ color={colors.primary.icon}+ size={100}+ /><Paragraph style={{ marginBottom: 10 }}>You do not have any notebooks.</Paragraph>@@ -431,7 +435,9 @@ const MoveNoteSheet = ({ note, actionSheetRef }) => {})}icon={(expanded) => ({name: expanded ? "chevron-up" : "chevron-down",- color: expanded ? colors.accent : colors.pri+ color: expanded+ ? colors.primary.accent+ : colors.primary.paragraph})}onScrollEnd={() => {actionSheetRef.current?.handleChildScrollEnd();diff --git a/apps/mobile/app/components/sheets/add-to/list-header-item.js b/apps/mobile/app/components/sheets/add-to/list-header-item.jsindex 71ce0c37d..e5260fa93 100644--- a/apps/mobile/app/components/sheets/add-to/list-header-item.js+++ b/apps/mobile/app/components/sheets/add-to/list-header-item.js@@ -19,9 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React, { useRef, useState } from "react";import { View } from "react-native";-import { useThemeStore } from "../../../stores/use-theme-store";import Input from "../../ui/input";import Paragraph from "../../ui/typography/paragraph";+import { useThemeColors } from "@notesnook/theme";export const ListHeaderInputItem = ({onSubmit,@@ -30,7 +30,8 @@ export const ListHeaderInputItem = ({testID}) => {const [focused, setFocused] = useState(false);- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors("sheet");+const [inputValue, setInputValue] = useState();const inputRef = useRef();return (@@ -57,7 +58,7 @@ export const ListHeaderInputItem = ({}}button={{icon: inputValue ? "plus" : "magnify",- color: focused ? colors.accent : colors.icon,+ color: focused ? colors.selected.icon : colors.secondary.icon,onPress: async () => {const result = await onSubmit(inputValue);if (result) {@@ -71,13 +72,13 @@ export const ListHeaderInputItem = ({{inputValue ? (<Viewstyle={{- backgroundColor: colors.shade,+ backgroundColor: colors.primary.shade,padding: 5,borderRadius: 5,marginBottom: 10}}>- <Paragraph color={colors.accent}>+ <Paragraph color={colors.primary.accent}>Tap on + to add {`"${inputValue}"`}</Paragraph></View>diff --git a/apps/mobile/app/components/sheets/add-to/list-item.js b/apps/mobile/app/components/sheets/add-to/list-item.jsindex 898925cbf..2744ed112 100644--- a/apps/mobile/app/components/sheets/add-to/list-item.js+++ b/apps/mobile/app/components/sheets/add-to/list-item.js@@ -17,11 +17,11 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { useThemeColors } from "@notesnook/theme";import React, { useEffect, useState } from "react";import { View } from "react-native";import { db } from "../../../common/database";import { useSelectionStore } from "../../../stores/use-selection-store";-import { useThemeStore } from "../../../stores/use-theme-store";import { SIZE } from "../../../utils/size";import { IconButton } from "../../ui/icon-button";import { PressableButton } from "../../ui/pressable";@@ -44,7 +44,7 @@ const SelectionIndicator = ({const isSelected = itemState === "selected";const isIntermediate = itemState === "intermediate";const isRemoved = !isSelected && hasNotes;- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors("sheet");useEffect(() => {onChange?.();@@ -61,10 +61,10 @@ const SelectionIndicator = ({}}color={isRemoved- ? colors.red+ ? colors.static.red: isIntermediate || isSelected- ? colors.accent- : colors.icon+ ? colors.selected.icon+ : colors.primary.icon}onPress={() => {if (multiSelect) return selectItem();@@ -119,7 +119,7 @@ export const ListItem = ({const { toggleSelection } = useSelectionContext();const multiSelect = useItemSelectionStore((state) => state.multiSelect);const [showSelectedIndicator, setShowSelectedIndicator] = useState(false);- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors("sheet");const [expanded, setExpanded] = useState(false);function selectItem() {@@ -209,7 +209,7 @@ export const ListItem = ({)}{infoText ? (- <Paragraph size={SIZE.xs} color={colors.icon}>+ <Paragraph size={SIZE.xs} color={colors.primary.icon}>{infoText}</Paragraph>) : null}@@ -225,7 +225,7 @@ export const ListItem = ({{showSelectedIndicator ? (<Viewstyle={{- backgroundColor: colors.accent,+ backgroundColor: colors.primary.accent,width: 7,height: 7,borderRadius: 100,@@ -238,7 +238,7 @@ export const ListItem = ({<IconButtonname={"plus"}testID="add-item-icon"- color={colors.pri}+ color={colors.primary.paragraph}size={SIZE.xl}onPress={() => {onAddSublistItem(item);diff --git a/apps/mobile/app/components/sheets/export-notes/index.js b/apps/mobile/app/components/sheets/export-notes/index.jsindex 6d30cfa42..bf609c47d 100644--- a/apps/mobile/app/components/sheets/export-notes/index.js+++ b/apps/mobile/app/components/sheets/export-notes/index.js@@ -27,7 +27,7 @@ import { db } from "../../../common/database";import { presentSheet, ToastEvent } from "../../../services/event-manager";import Exporter from "../../../services/exporter";import PremiumService from "../../../services/premium";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useUserStore } from "../../../stores/use-user-store";import { getElevationStyle } from "../../../utils/elevation";import { ph, pv, SIZE } from "../../../utils/size";@@ -45,7 +45,7 @@ import { eCloseSheet } from "../../../utils/events";import { requestInAppReview } from "../../../services/app-review";const ExportNotesSheet = ({ notes, update }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [exporting, setExporting] = useState(false);const [complete, setComplete] = useState(false);const [result, setResult] = useState({});@@ -168,7 +168,7 @@ const ExportNotesSheet = ({ notes, update }) => {><Viewstyle={{- backgroundColor: colors.shade,+ backgroundColor: colors.primary.shade,borderRadius: 5,height: 60,width: 60,@@ -178,7 +178,7 @@ const ExportNotesSheet = ({ notes, update }) => {><Iconname={item.icon}- color={item.pro ? colors.accent : colors.icon}+ color={item.pro ? colors.primary.accent : colors.primary.icon}size={SIZE.xxxl + 10}/></View>@@ -194,7 +194,7 @@ const ExportNotesSheet = ({ notes, update }) => {<Paragraphstyle={{ marginLeft: 10 }}size={SIZE.sm}- color={colors.icon}+ color={colors.secondary.paragraph}>{item.desc}</Paragraph>@@ -228,7 +228,7 @@ const ExportNotesSheet = ({ notes, update }) => {<><IconButtonname="export"- color={colors.icon}+ color={colors.primary.icon}size={50}customStyle={{width: 70,@@ -240,7 +240,7 @@ const ExportNotesSheet = ({ notes, update }) => {textAlign: "center",marginTop: 10}}- color={colors.icon}+ color={colors.secondary.heading}>{notes.length > 1? `${notes.length} Notes exported`diff --git a/apps/mobile/app/components/sheets/github/issue.js b/apps/mobile/app/components/sheets/github/issue.jsindex 9013c478c..4b0013c5d 100644--- a/apps/mobile/app/components/sheets/github/issue.js+++ b/apps/mobile/app/components/sheets/github/issue.js@@ -24,7 +24,7 @@ import { getVersion } from "react-native-device-info";import { db } from "../../../common/database";import { eSendEvent, ToastEvent } from "../../../services/event-manager";import PremiumService from "../../../services/premium";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useUserStore } from "../../../stores/use-user-store";import { eCloseSheet } from "../../../utils/events";import { openLinkInBrowser } from "../../../utils/functions";@@ -36,7 +36,7 @@ import { Button } from "../../ui/button";import Seperator from "../../ui/seperator";import Paragraph from "../../ui/typography/paragraph";export const Issue = ({ defaultTitle, defaultBody, issueTitle }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const body = useRef(defaultBody);const title = useRef(defaultTitle);const user = useUserStore((state) => state.user);@@ -79,7 +79,7 @@ Logged in: ${user ? "yes" : "no"}`,<Textstyle={{textDecorationLine: "underline",- color: colors.accent+ color: colors.primary.accent}}onPress={() => {Linking.openURL(issue_url);@@ -136,15 +136,15 @@ Logged in: ${user ? "yes" : "no"}`,defaultValue={title.current}style={{borderWidth: 1,- borderColor: colors.nav,+ borderColor: colors.secondary.background,borderRadius: 5,padding: 12,fontFamily: "OpenSans-Regular",marginBottom: 10,fontSize: SIZE.md,- color: colors.heading+ color: colors.primary.heading}}- placeholderTextColor={colors.placeholder}+ placeholderTextColor={colors.primary.placeholder}/><TextInput@@ -173,20 +173,20 @@ For example:}}style={{borderWidth: 1,- borderColor: colors.nav,+ borderColor: colors.secondary.background,borderRadius: 5,padding: 12,fontFamily: "OpenSans-Regular",maxHeight: 200,fontSize: SIZE.sm,marginBottom: 2.5,- color: colors.pri+ color: colors.primary.paragraph}}- placeholderTextColor={colors.placeholder}+ placeholderTextColor={colors.primary.placeholder}/><Paragraphsize={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}>{`App version: ${getVersion()} Platform: ${Platform.OS} Model: ${Platform.constants.Brand}-${Platform.constants.Model}-${Platform.constants.Version}`}</Paragraph>@@ -201,7 +201,7 @@ For example:/><Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.xs}style={{marginTop: 10,@@ -215,7 +215,7 @@ For example:}}style={{textDecorationLine: "underline",- color: colors.accent+ color: colors.primary.accent}}>github.com/streetwriters/notesnook.@@ -225,7 +225,7 @@ For example:<Textstyle={{textDecorationLine: "underline",- color: colors.accent+ color: colors.primary.accent}}onPress={async () => {try {diff --git a/apps/mobile/app/components/sheets/manage-tags/index.js b/apps/mobile/app/components/sheets/manage-tags/index.jsindex ea76638d8..d85bd6de3 100644--- a/apps/mobile/app/components/sheets/manage-tags/index.js+++ b/apps/mobile/app/components/sheets/manage-tags/index.js@@ -25,7 +25,7 @@ import { db } from "../../../common/database";import { ToastEvent, presentSheet } from "../../../services/event-manager";import Navigation from "../../../services/navigation";import { useTagStore } from "../../../stores/use-tag-store";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import Input from "../../ui/input";import { PressableButton } from "../../ui/pressable";@@ -33,7 +33,7 @@ import Heading from "../../ui/typography/heading";import Paragraph from "../../ui/typography/paragraph";import { IconButton } from "../../ui/icon-button";const ManageTagsSheet = (props) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [notes, setNotes] = useState(props.notes || []);const allTags = useTagStore((state) => state.tags);const [tags, setTags] = useState([]);@@ -128,7 +128,7 @@ const ManageTagsSheet = (props) => {<Inputbutton={{icon: "magnify",- color: colors.accent,+ color: colors.primary.accent,size: SIZE.lg}}testID="tag-input"@@ -163,12 +163,12 @@ const ManageTagsSheet = (props) => {padding: 12}}onPress={onSubmit}- type="accent"+ type="selected">- <Heading size={SIZE.sm} color={colors.light}>+ <Heading size={SIZE.sm} color={colors.selected.heading}>Add {'"' + "#" + query + '"'}</Heading>- <Icon name="plus" color={colors.light} size={SIZE.lg} />+ <Icon name="plus" color={colors.selected.icon} size={SIZE.lg} /></PressableButton>) : null}{!allTags || allTags.length === 0 ? (@@ -180,10 +180,13 @@ const ManageTagsSheet = (props) => {alignItems: "center"}}>- <Heading size={50} color={colors.icon}>+ <Heading size={50} color={colors.secondary.heading}>#</Heading>- <Paragraph textBreakStrategy="balanced" color={colors.icon}>+ <Paragraph+ textBreakStrategy="balanced"+ color={colors.secondary.paragraph}+ >You do not have any tags.</Paragraph></View>@@ -213,7 +216,7 @@ ManageTagsSheet.present = (notes) => {export default ManageTagsSheet;const TagItem = ({ tag, notes, setNotes }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const someNotesTagged = notes.some((note) => note.tags?.indexOf(tag.title) !== -1);@@ -258,7 +261,11 @@ const TagItem = ({ tag, notes, setNotes }) => {width: 23,height: 23}}- color={someNotesTagged || allNotesTagged ? colors.accent : colors.icon}+ color={+ someNotesTagged || allNotesTagged+ ? colors.selected.icon+ : colors.primary.icon+ }testID={allNotesTagged? "check-circle-outline"diff --git a/apps/mobile/app/components/sheets/migrate/index.tsx b/apps/mobile/app/components/sheets/migrate/index.tsxindex c24e3820d..8ebdfb21a 100644--- a/apps/mobile/app/components/sheets/migrate/index.tsx+++ b/apps/mobile/app/components/sheets/migrate/index.tsx@@ -29,7 +29,7 @@ import {ToastEvent} from "../../../services/event-manager";import SettingsService from "../../../services/settings";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eCloseSheet } from "../../../utils/events";import { sleep } from "../../../utils/time";import { Dialog } from "../../dialog";@@ -56,7 +56,7 @@ type Progress = {};export default function Migrate() {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [loading, setLoading] = useState(false);const [error, _setError] = useState<Error>();const [reset, setReset] = useState(false);@@ -152,8 +152,8 @@ export default function Migrate() {animated={true}useNativeDriverindeterminate- unfilledColor={colors.nav}- color={colors.accent}+ unfilledColor={colors.secondary.background}+ color={colors.primary.accent}borderWidth={0}/>diff --git a/apps/mobile/app/components/sheets/move-notes/movenote.tsx b/apps/mobile/app/components/sheets/move-notes/movenote.tsxindex 304272b24..9a6702a72 100644--- a/apps/mobile/app/components/sheets/move-notes/movenote.tsx+++ b/apps/mobile/app/components/sheets/move-notes/movenote.tsx@@ -30,7 +30,7 @@ import {} from "../../../services/event-manager";import Navigation from "../../../services/navigation";import SearchService from "../../../services/search";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eCloseSheet } from "../../../utils/events";import { SIZE } from "../../../utils/size";import { Dialog } from "../../dialog";@@ -60,7 +60,7 @@ export const MoveNotes = ({selectedTopic?: TopicType;fwdRef: RefObject<ActionSheetRef>;}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [currentNotebook, setCurrentNotebook] = useState(notebook);const { height } = useWindowDimensions();let notes = db.notes?.all as NoteType[];@@ -153,12 +153,20 @@ export const MoveNotes = ({><ParagraphnumberOfLines={1}- color={item?.id === topic?.id ? colors.accent : colors.pri}+ color={+ item?.id === topic?.id+ ? colors.primary.accent+ : colors.primary.paragraph+ }>{item.title}</Paragraph>{item.type == "note" && item.headline ? (- <Paragraph numberOfLines={1} color={colors.icon} size={SIZE.xs}>+ <Paragraph+ numberOfLines={1}+ color={colors.secondary.paragraph}+ size={SIZE.xs}+ >{item.headline}</Paragraph>) : null}@@ -169,7 +177,7 @@ export const MoveNotes = ({style={{fontSize: SIZE.xs}}- color={colors.icon}+ color={colors.secondary.paragraph}>{item.notes?.length} Notes</Paragraph>@@ -183,14 +191,22 @@ export const MoveNotes = ({backgroundColor: "transparent"}}name="check"- type="grayAccent"- color={colors.accent}+ type="selected"+ color={colors.selected.icon}/>) : null}</PressableButton>);},- [colors.accent, colors.icon, colors.pri, select, selectedNoteIds, topic]+ [+ colors.primary.accent,+ colors.secondary.paragraph,+ colors.primary.paragraph,+ colors.selected.icon,+ select,+ selectedNoteIds,+ topic+ ]);/**@@ -241,7 +257,9 @@ export const MoveNotes = ({marginTop: 5}}>- <Paragraph color={colors.accent}>in {topic.title}</Paragraph>+ <Paragraph color={colors.selected.paragraph}>+ in {topic.title}+ </Paragraph><Paragraphstyle={{@@ -273,7 +291,7 @@ export const MoveNotes = ({alignItems: "center"}}>- <Paragraph color={colors.icon}>+ <Paragraph color={colors.secondary.paragraph}>{topic ? "No notes to show" : "No topics in this notebook"}</Paragraph>diff --git a/apps/mobile/app/components/sheets/new-feature/index.tsx b/apps/mobile/app/components/sheets/new-feature/index.tsxindex 36854caef..a8d6903c5 100644--- a/apps/mobile/app/components/sheets/new-feature/index.tsx+++ b/apps/mobile/app/components/sheets/new-feature/index.tsx@@ -23,7 +23,7 @@ import { getVersion } from "react-native-device-info";import { features } from "../../../features";import { eSendEvent, presentSheet } from "../../../services/event-manager";import SettingsService from "../../../services/settings";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eCloseSheet } from "../../../utils/events";import { SIZE } from "../../../utils/size";import { Button } from "../../ui/button";@@ -37,7 +37,7 @@ export type FeatureType = {};const NewFeature = ({ features }: { features: FeatureType[] }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<View@@ -47,7 +47,7 @@ const NewFeature = ({ features }: { features: FeatureType[] }) => {paddingTop: 12}}>- <Heading color={colors.icon} size={SIZE.md}>+ <Heading color={colors.secondary.heading} size={SIZE.md}>New Version Highlights 🎉</Heading>@@ -57,7 +57,7 @@ const NewFeature = ({ features }: { features: FeatureType[] }) => {<Viewkey={item.title}style={{- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,padding: 12,borderRadius: 10,width: "100%",diff --git a/apps/mobile/app/components/sheets/progress/index.tsx b/apps/mobile/app/components/sheets/progress/index.tsxindex 9123f3cde..839e2d00f 100644--- a/apps/mobile/app/components/sheets/progress/index.tsx+++ b/apps/mobile/app/components/sheets/progress/index.tsx@@ -21,14 +21,14 @@ import React, { useEffect, useState } from "react";import { View } from "react-native";import useSyncProgress from "../../../hooks/use-sync-progress";import { presentSheet } from "../../../services/event-manager";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import Seperator from "../../ui/seperator";import { ProgressBarComponent } from "../../ui/svg/lazy";import Heading from "../../ui/typography/heading";import Paragraph from "../../ui/typography/paragraph";export const Progress = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const { progress } = useSyncProgress();const [currentProgress, setCurrentProgress] = useState(0.1);@@ -65,14 +65,14 @@ export const Progress = () => {animated={true}useNativeDriverprogress={currentProgress || 0.1}- unfilledColor={colors.nav}- color={colors.accent}+ unfilledColor={colors.secondary.background}+ color={colors.primary.accent}borderWidth={0}/></View>{progress ? (- <Paragraph color={colors.icon}>+ <Paragraph color={colors.secondary.paragraph}>{progress.type?.slice(0, 1).toUpperCase() + progress.type?.slice(1)}ing {progress?.current}/{progress?.total}</Paragraph>diff --git a/apps/mobile/app/components/sheets/publish-note/index.js b/apps/mobile/app/components/sheets/publish-note/index.jsindex aa2cefe8a..ac16509ce 100644--- a/apps/mobile/app/components/sheets/publish-note/index.js+++ b/apps/mobile/app/components/sheets/publish-note/index.js@@ -25,7 +25,7 @@ import { db } from "../../../common/database";import { presentSheet, ToastEvent } from "../../../services/event-manager";import Navigation from "../../../services/navigation";import { useAttachmentStore } from "../../../stores/use-attachment-store";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { openLinkInBrowser } from "../../../utils/functions";import { SIZE } from "../../../utils/size";import DialogHeader from "../../dialog/dialog-header";@@ -38,7 +38,7 @@ import Paragraph from "../../ui/typography/paragraph";import { requestInAppReview } from "../../../services/app-review";const PublishNoteSheet = ({ note: item, update }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const actionSheetRef = useRef();const loading = useAttachmentStore((state) => state.loading);const [selfDestruct, setSelfDestruct] = useState(false);@@ -130,7 +130,7 @@ const PublishNoteSheet = ({ note: item, update }) => {width: "100%"}}>- <ActivityIndicator size={25} color={colors.accent} />+ <ActivityIndicator size={25} color={colors.primary.accent} /><Paragraphstyle={{textAlign: "center"@@ -152,7 +152,7 @@ const PublishNoteSheet = ({ note: item, update }) => {flexDirection: "row",alignItems: "center",marginTop: 10,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,padding: 12,borderRadius: 5}}@@ -170,7 +170,10 @@ const PublishNoteSheet = ({ note: item, update }) => {<ParagraphonPress={async () => {try {- await openLinkInBrowser(publishUrl, colors.accent);+ await openLinkInBrowser(+ publishUrl,+ colors.primary.accent+ );} catch (e) {console.error(e);}@@ -178,11 +181,11 @@ const PublishNoteSheet = ({ note: item, update }) => {size={SIZE.xs}style={{marginTop: 5,- color: colors.pri+ color: colors.primary.paragraph}}>- <Icon color={colors.accent} name="open-in-new" /> Open in- browser+ <Icon color={colors.primary.accent} name="open-in-new" /> Open+ in browser</Paragraph></View>@@ -195,7 +198,7 @@ const PublishNoteSheet = ({ note: item, update }) => {context: "local"});}}- color={colors.accent}+ color={colors.primary.accent}size={SIZE.lg}name="content-copy"/>@@ -212,7 +215,7 @@ const PublishNoteSheet = ({ note: item, update }) => {flexDirection: "row",alignItems: "center",marginBottom: 10,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,paddingVertical: 12,borderRadius: 5,marginTop: 10@@ -223,7 +226,7 @@ const PublishNoteSheet = ({ note: item, update }) => {if (publishing) return;setIsLocked(!isLocked);}}- color={isLocked ? colors.accent : colors.icon}+ color={isLocked ? colors.selected.icon : colors.primary.icon}size={SIZE.xl}name={isLocked@@ -253,7 +256,7 @@ const PublishNoteSheet = ({ note: item, update }) => {style={{flexDirection: "row",alignItems: "center",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,paddingVertical: 12,borderRadius: 5}}@@ -262,7 +265,7 @@ const PublishNoteSheet = ({ note: item, update }) => {onPress={() => {setSelfDestruct(!selfDestruct);}}- color={selfDestruct ? colors.accent : colors.icon}+ color={selfDestruct ? colors.selected.icon : colors.primary.icon}size={SIZE.xl}name={selfDestruct@@ -343,7 +346,7 @@ const PublishNoteSheet = ({ note: item, update }) => {)}<Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.xs}style={{textAlign: "center",@@ -354,7 +357,7 @@ const PublishNoteSheet = ({ note: item, update }) => {try {await openLinkInBrowser("https://docs.notesnook.com/monographs/",- colors.accent+ colors.primary.accent);} catch (e) {console.error(e);diff --git a/apps/mobile/app/components/sheets/recovery-key/index.js b/apps/mobile/app/components/sheets/recovery-key/index.jsindex 167ae2b29..2f2a13679 100644--- a/apps/mobile/app/components/sheets/recovery-key/index.js+++ b/apps/mobile/app/components/sheets/recovery-key/index.js@@ -220,7 +220,7 @@ class RecoveryKeySheet extends React.Component {<Viewstyle={{width: "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,justifyContent: "space-between",paddingHorizontal: 12,borderRadius: 10,@@ -241,7 +241,7 @@ class RecoveryKeySheet extends React.Component {}}><Paragraph- color={colors.pri}+ color={colors.primary.paragraph}size={SIZE.sm}numberOfLines={2}selectable@@ -327,7 +327,7 @@ class RecoveryKeySheet extends React.Component {<Seperator /><Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.sm}numberOfLines={2}style={{diff --git a/apps/mobile/app/components/sheets/relations-list/index.tsx b/apps/mobile/app/components/sheets/relations-list/index.tsxindex 697a5bc24..962fd8e37 100644--- a/apps/mobile/app/components/sheets/relations-list/index.tsx+++ b/apps/mobile/app/components/sheets/relations-list/index.tsx@@ -28,7 +28,7 @@ import {} from "../../../services/event-manager";import { Reminder } from "../../../services/notifications";import { useRelationStore } from "../../../stores/use-relation-store";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import DialogHeader from "../../dialog/dialog-header";import List from "../../list";@@ -71,17 +71,16 @@ export const RelationsList = ({onAdd}: RelationsListProps) => {const updater = useRelationStore((state) => state.updater);- const [items, setItems] = useState<Reminder[]>([]);- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();++ const items =+ (db.relations?.[relationType]?.(+ { id: item?.id, type: item?.type },+ referenceType+ ) as any) || [];+const hasNoRelations = !items || items.length === 0;- useEffect(() => {- setItems(- db.relations?.[relationType]?.(- { id: item?.id, type: item.type },- referenceType- ) as any- );- }, [item?.id, item?.type, referenceType, relationType, updater]);+return (<Viewstyle={{ paddingHorizontal: 12, height: hasNoRelations ? 300 : "100%" }}@@ -102,7 +101,7 @@ export const RelationsList = ({<Iconname={IconsByType[referenceType as keyof typeof IconsByType]}size={60}- color={colors.icon}+ color={colors.primary.icon}/><Paragraph>No {referenceType}s linked to this {item.type}.diff --git a/apps/mobile/app/components/sheets/reminder-notify/index.tsx b/apps/mobile/app/components/sheets/reminder-notify/index.tsxindex 4c109617d..62bdf324a 100644--- a/apps/mobile/app/components/sheets/reminder-notify/index.tsx+++ b/apps/mobile/app/components/sheets/reminder-notify/index.tsx@@ -27,7 +27,7 @@ import {PresentSheetOptions} from "../../../services/event-manager";import Notifications, { Reminder } from "../../../services/notifications";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import { ItemReference } from "../../../utils/types";import List from "../../list";@@ -47,7 +47,7 @@ export default function ReminderNotify({update,reminder}: ReminderSheetProps) {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const references = db.relations?.to(reminder as ItemReference, "note") || [];const QuickActions = [@@ -101,7 +101,7 @@ export default function ReminderNotify({alignItems: "center"}}>- <Icon name="bell" size={20} color={colors.accent} />+ <Icon name="bell" size={20} color={colors.primary.accent} /><Paragraph style={{ marginLeft: 5 }}>{dayjs(reminder?.date).format("ddd, YYYY-MM-DD hh:mm A")}</Paragraph>@@ -142,14 +142,14 @@ export default function ReminderNotify({height:160 * references?.length < 500 ? 160 * references?.length : 500,borderTopWidth: 1,- borderTopColor: colors.nav,+ borderTopColor: colors.secondary.background,marginTop: 5,paddingTop: 5}}><Paragraphstyle={{- color: colors.icon,+ color: colors.secondary.paragraph,fontSize: SIZE.xs,marginBottom: 10}}diff --git a/apps/mobile/app/components/sheets/reminder/index.tsx b/apps/mobile/app/components/sheets/reminder/index.tsxindex 0fdc122f2..6c337a3de 100644--- a/apps/mobile/app/components/sheets/reminder/index.tsx+++ b/apps/mobile/app/components/sheets/reminder/index.tsx@@ -25,7 +25,7 @@ import {ToastEvent,presentSheet} from "../../../services/event-manager";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import { Button } from "../../ui/button";import Input from "../../ui/input";@@ -95,7 +95,7 @@ export default function ReminderSheet({reminder,reference}: ReminderSheetProps) {- const colors = useThemeStore((state) => state.colors);+ const { colors, isDark } = useThemeColors();const [reminderMode, setReminderMode] = useState<Reminder["mode"]>(reminder?.mode || "once");@@ -299,7 +299,7 @@ export default function ReminderSheet({type={reminderMode ===ReminderModes[mode as keyof typeof ReminderModes]- ? "grayAccent"+ ? "selected": "gray"}onPress={() => {@@ -327,7 +327,7 @@ export default function ReminderSheet({{reminderMode === ReminderModes.Repeat ? (<Viewstyle={{- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,padding: 12,borderRadius: 5,marginBottom: 12@@ -391,8 +391,8 @@ export default function ReminderSheet({marginRight: 10,backgroundColor:selectedDays.indexOf(index) > -1- ? colors.accent- : colors.bg+ ? colors.primary.accent+ : colors.primary.background}}onPress={() => {setSelectedDays((days) => {@@ -421,8 +421,8 @@ export default function ReminderSheet({marginRight: 10,backgroundColor:selectedDays.indexOf(index + 1) > -1- ? colors.accent- : colors.bg+ ? colors.primary.accent+ : colors.primary.background}}onPress={() => {setSelectedDays((days) => {@@ -463,9 +463,9 @@ export default function ReminderSheet({date={date}maximumDate={dayjs(date).add(3, "months").toDate()}onDateChange={handleConfirm}- textColor={colors.night ? "#ffffff" : "#000000"}- fadeToColor={colors.bg}- theme={colors.night ? "dark" : "light"}+ textColor={isDark ? colors.static.white : colors.static.black}+ fadeToColor={colors.primary.background}+ theme={isDark ? "dark" : "light"}androidVariant="nativeAndroid"is24hourSource="locale"locale={@@ -500,7 +500,7 @@ export default function ReminderSheet({marginBottom: 12,paddingTop: 12,borderTopWidth: 1,- borderTopColor: colors.nav+ borderTopColor: colors.secondary.background}}>{Object.keys(ReminderNotificationModes).map((mode) => (@@ -551,11 +551,11 @@ export default function ReminderSheet({alignItems: "center",justifyContent: "flex-start",marginBottom: 10,- backgroundColor: colors.nav+ backgroundColor: colors.secondary.background}}><>- <Paragraph size={SIZE.xs} color={colors.icon}>+ <Paragraph size={SIZE.xs} color={colors.secondary.paragraph}>{recurringMode === RecurringModes.Daily? "Repeats daily " + `at ${dayjs(date).format("hh:mm A")}.`: selectedDays.length === 7 &&diff --git a/apps/mobile/app/components/sheets/restore-data/index.js b/apps/mobile/app/components/sheets/restore-data/index.jsindex 8e61f80b9..99f50d8ce 100644--- a/apps/mobile/app/components/sheets/restore-data/index.js+++ b/apps/mobile/app/components/sheets/restore-data/index.js@@ -33,7 +33,7 @@ import {} from "../../../services/event-manager";import SettingsService from "../../../services/settings";import { initialize } from "../../../stores";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eCloseRestoreDialog, eOpenRestoreDialog } from "../../../utils/events";import { SIZE } from "../../../utils/size";import { Dialog } from "../../dialog";@@ -109,7 +109,7 @@ const RestoreDataSheet = () => {export default RestoreDataSheet;const RestoreDataComponent = ({ close, setRestoring, restoring }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [files, setFiles] = useState([]);const [loading, setLoading] = useState(true);const [backupDirectoryAndroid, setBackupDirectoryAndroid] = useState(false);@@ -242,7 +242,7 @@ const RestoreDataComponent = ({ close, setRestoring, restoring }) => {borderRadius: 0,flexDirection: "row",borderBottomWidth: 0.5,- borderBottomColor: colors.nav+ borderBottomColor: colors.secondary.background}}><View@@ -377,7 +377,7 @@ const RestoreDataComponent = ({ close, setRestoring, restoring }) => {height: 100}}>- <ActivityIndicator color={colors.accent} size={SIZE.lg} />+ <ActivityIndicator color={colors.primary.accent} size={SIZE.lg} /></View>) : (<View@@ -427,14 +427,14 @@ const RestoreDataComponent = ({ close, setRestoring, restoring }) => {}}size={SIZE.xs}textBreakStrategy="balanced"- color={colors.icon}+ color={colors.secondary.paragraph}>Select the folder that includes your backup files tolist them here.</Paragraph></>) : (- <Paragraph color={colors.icon}>No backups found</Paragraph>+ <Paragraph color={colors.secondary.paragraph}>No backups found</Paragraph>)}</View>)@@ -446,8 +446,8 @@ const RestoreDataComponent = ({ close, setRestoring, restoring }) => {height: 200}}>- <ActivityIndicator color={colors.accent} />- <Paragraph color={colors.icon}>+ <ActivityIndicator color={colors.primary.accent} />+ <Paragraph color={colors.secondary.paragraph}>Restoring {progress ? progress?.collection : null}{progress ? `(${progress.current}/${progress.total}) ` : null}...Please wait.diff --git a/apps/mobile/app/components/sheets/sort/index.js b/apps/mobile/app/components/sheets/sort/index.jsindex 1e26410da..b85ff3673 100644--- a/apps/mobile/app/components/sheets/sort/index.js+++ b/apps/mobile/app/components/sheets/sort/index.js@@ -22,7 +22,7 @@ import { View } from "react-native";import { db } from "../../../common/database";import { eSendEvent } from "../../../services/event-manager";import Navigation from "../../../services/navigation";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { GROUP, SORT } from "../../../utils/constants";import { refreshNotesPage } from "../../../utils/events";import { SIZE } from "../../../utils/size";@@ -30,8 +30,8 @@ import { Button } from "../../ui/button";import Seperator from "../../ui/seperator";import Heading from "../../ui/typography/heading";const Sort = ({ type, screen }) => {- const colors = useThemeStore((state) => state.colors);const isTopicSheet = screen === "TopicSheet";+ const { colors } = useThemeColors();const [groupOptions, setGroupOptions] = useState(db.settings.getGroupOptions(type));@@ -61,7 +61,7 @@ const Sort = ({ type, screen }) => {<Viewstyle={{width: "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,justifyContent: "space-between"}}>@@ -104,7 +104,7 @@ const Sort = ({ type, screen }) => {fontSize={SIZE.sm - 1}type="transparent"buttonType={{- text: colors.accent+ text: colors.primary.accent}}style={{borderRadius: 100,@@ -122,7 +122,7 @@ const Sort = ({ type, screen }) => {justifyContent: "flex-start",flexWrap: "wrap",borderBottomWidth: isTopicSheet ? 0 : 1,- borderBottomColor: colors.nav,+ borderBottomColor: colors.secondary.background,marginBottom: 12,paddingHorizontal: 12,paddingBottom: 12,@@ -136,7 +136,7 @@ const Sort = ({ type, screen }) => {height={40}iconPosition="left"icon={"check"}- buttonType={{ text: colors.accent }}+ buttonType={{ text: colors.primary.accent }}fontSize={SIZE.sm}iconSize={SIZE.md}/>@@ -149,7 +149,7 @@ const Sort = ({ type, screen }) => {item === "dateEdited") ? null : (<Buttonkey={item}- type={groupOptions.sortBy === item ? "grayBg" : "gray"}+ type={groupOptions.sortBy === item ? "selected" : "gray"}title={SORT[item]}height={40}iconPosition="left"@@ -160,7 +160,9 @@ const Sort = ({ type, screen }) => {}}buttonType={{text:- groupOptions.sortBy === item ? colors.accent : colors.icon+ groupOptions.sortBy === item+ ? colors.primary.accent+ : colors.secondary.paragraph}}fontSize={SIZE.sm}onPress={async () => {@@ -205,12 +207,14 @@ const Sort = ({ type, screen }) => {<Buttonkey={item}testID={"btn-" + item}- type={groupOptions.groupBy === GROUP[item] ? "grayBg" : "gray"}+ type={+ groupOptions.groupBy === GROUP[item] ? "selected" : "gray"+ }buttonType={{text:groupOptions.groupBy === GROUP[item]- ? colors.accent- : colors.icon+ ? colors.primary.accent+ : colors.secondary.paragraph}}onPress={async () => {let _groupOptions = {diff --git a/apps/mobile/app/components/sheets/topic-sheet/index.tsx b/apps/mobile/app/components/sheets/topic-sheet/index.tsxindex 90dac8d1d..b96f48735 100644--- a/apps/mobile/app/components/sheets/topic-sheet/index.tsx+++ b/apps/mobile/app/components/sheets/topic-sheet/index.tsx@@ -45,7 +45,7 @@ import {import useNavigationStore, {NotebookScreenParams} from "../../../stores/use-navigation-store";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import {eOnNewTopicAdded,eOnTopicSheetUpdate,@@ -98,7 +98,7 @@ export const TopicsSheet = () => {);const [selection, setSelection] = useState<TopicType[]>([]);const [enabled, setEnabled] = useState(false);- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors("sheet");const ref = useRef<ActionSheetRef>(null);const isTopic = currentScreen.name === "TopicNotes";const [topics, setTopics] = useState(@@ -245,9 +245,9 @@ export const TopicsSheet = () => {maxHeight: 300,borderTopRightRadius: 15,borderTopLeftRadius: 15,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,borderWidth: 1,- borderColor: colors.nav,+ borderColor: colors.primary.border,borderBottomWidth: 0}}openAnimationConfig={{@@ -263,11 +263,12 @@ export const TopicsSheet = () => {index);}}+ overlayColor={colors.primary.backdrop}closable={!canShow}elevation={10}indicatorStyle={{width: 100,- backgroundColor: colors.nav+ backgroundColor: colors.secondary.background}}keyboardHandlerEnabled={false}snapPoints={Config.isTesting === "true" ? [100] : [25, 100]}@@ -285,8 +286,6 @@ export const TopicsSheet = () => {<PressableButtontestID={notesnook.buttons.add}type="accent"- accentColor={"accent"}- accentText="light"onPress={openEditor}customStyle={{borderRadius: 100@@ -319,7 +318,7 @@ export const TopicsSheet = () => {alignItems: "center"}}>- <Paragraph size={SIZE.xs} color={colors.icon}>+ <Paragraph size={SIZE.xs} color={colors.primary.icon}>TOPICS</Paragraph><View@@ -356,7 +355,7 @@ export const TopicsSheet = () => {});return;}}- color={colors.pri}+ color={colors.primary.icon}tooltipText="Move to trash"tooltipPosition={1}name="delete"@@ -376,7 +375,7 @@ export const TopicsSheet = () => {});}}testID="group-topic-button"- color={colors.pri}+ color={colors.primary.icon}size={22}customStyle={{width: 40,@@ -387,7 +386,7 @@ export const TopicsSheet = () => {name="plus"onPress={PLACEHOLDER_DATA.action}testID="add-topic-button"- color={colors.pri}+ color={colors.primary.icon}size={22}customStyle={{width: 40,@@ -406,7 +405,7 @@ export const TopicsSheet = () => {ref.current?.snapToIndex(1);}}}- color={colors.pri}+ color={colors.primary.icon}size={22}customStyle={{width: 40,@@ -429,8 +428,8 @@ export const TopicsSheet = () => {onRefresh={() => {onRequestUpdate();}}- colors={[colors.accent]}- progressBackgroundColor={colors.bg}+ colors={[colors.primary.accent]}+ progressBackgroundColor={colors.primary.background}/>}keyExtractor={(item) => (item as TopicType).id}@@ -444,7 +443,7 @@ export const TopicsSheet = () => {height: 200}}>- <Paragraph color={colors.icon}>No topics</Paragraph>+ <Paragraph color={colors.primary.icon}>No topics</Paragraph></View>}ListFooterComponent={<View style={{ height: 50 }} />}@@ -478,7 +477,7 @@ const TopicItem = ({sheetRef: RefObject<ActionSheetRef>;}) => {const screen = useNavigationStore((state) => state.currentScreen);- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors("sheet");const selection = useSelection();const isSelected =selection.selection.findIndex((selected) => selected.id === item.id) > -1;@@ -487,7 +486,7 @@ const TopicItem = ({return (<PressableButton- type={isSelected || isFocused ? "grayBg" : "transparent"}+ type={isSelected || isFocused ? "selected" : "transparent"}onLongPress={() => {if (selection.enabled) return;selection.setEnabled(true);@@ -519,7 +518,7 @@ const TopicItem = ({{selection.enabled ? (<IconButtonsize={SIZE.lg}- color={isSelected ? colors.accent : colors.icon}+ color={isSelected ? colors.selected.icon : colors.primary.icon}name={isSelected? "check-circle-outline"@@ -530,7 +529,7 @@ const TopicItem = ({<Paragraph size={SIZE.sm}>{item.title}{" "}{notesCount ? (- <Paragraph size={SIZE.xs} color={colors.icon}>+ <Paragraph size={SIZE.xs} color={colors.secondary.paragraph}>{notesCount}</Paragraph>) : null}@@ -550,7 +549,7 @@ const TopicItem = ({right={0}bottom={0}top={0}- color={colors.pri}+ color={colors.primary.icon}size={SIZE.xl}/></PressableButton>diff --git a/apps/mobile/app/components/sheets/update/index.js b/apps/mobile/app/components/sheets/update/index.jsindex 4f94e2770..b0978fc70 100644--- a/apps/mobile/app/components/sheets/update/index.js+++ b/apps/mobile/app/components/sheets/update/index.js@@ -23,7 +23,7 @@ import { ScrollView } from "react-native-actions-sheet";import { checkVersion } from "react-native-check-version";import Config from "react-native-config";import deviceInfoModule from "react-native-device-info";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { STORE_LINK } from "../../../utils/constants";import { SIZE } from "../../../utils/size";import { Button } from "../../ui/button";@@ -36,7 +36,7 @@ const UPDATE_SVG = (color) =>`<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="774" height="669.5" viewBox="0 0 774 669.5" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M938.2145,322.3829C936.73266,207.5841,878.16775,115.25,806.13079,115.25c-43.29082,0-81.71777,33.346-105.81477,84.87331l28.33157,71.08654-39.15446-43.81576c-9.876,29.64743-15.48115,63.49569-15.48115,99.44475a324.20917,324.20917,0,0,0,9.98686,80.80891l75.92761-12.24058-67.9507,37.99628c22.13728,60.69069,62.59851,102.1414,109.23586,104.87608l-8.988,244.5184,27.81449.99338-5.94527-245.75716c66.41162-6.32443,119.60967-91.20375,123.8712-197.42794l-45.89372-25.66252Z" transform="translate(-213 -115.25)" fill="#f0f0f0"/><rect x="157.51532" y="354.40187" width="6.60151" height="49.25266" fill="${color}"/><polygon points="187.815 376.276 182.98 380.779 160.823 356.936 138.658 380.779 133.823 376.276 160.823 347.243 187.815 376.276" fill="${color}"/><path d="M371.9876,543.6602a52.8121,52.8121,0,1,1,52.8121-52.81209A52.87183,52.87183,0,0,1,371.9876,543.6602Zm0-99.02268a46.21059,46.21059,0,1,0,46.21058,46.21059A46.26275,46.26275,0,0,0,371.9876,444.63752Z" transform="translate(-213 -115.25)" fill="${color}"/><rect x="212.75248" y="253.9314" width="3.63974" height="27.15545" fill="#e4e4e4"/><polygon points="229.458 265.992 226.793 268.475 214.576 255.328 202.356 268.475 199.69 265.992 214.576 249.984 229.458 265.992" fill="#e4e4e4"/><path d="M426.56422,409.9859a29.118,29.118,0,1,1,29.118-29.118A29.15089,29.15089,0,0,1,426.56422,409.9859Zm0-54.59616A25.47821,25.47821,0,1,0,452.04243,380.868,25.507,25.507,0,0,0,426.56422,355.38974Z" transform="translate(-213 -115.25)" fill="#e4e4e4"/><rect x="99.52274" y="186.73872" width="3.63974" height="27.15545" fill="#e4e4e4"/><polygon points="116.229 198.799 113.563 201.282 101.346 188.136 89.126 201.282 86.46 198.799 101.346 182.792 116.229 198.799" fill="#e4e4e4"/><path d="M313.33448,342.79321a29.118,29.118,0,1,1,29.118-29.118A29.15088,29.15088,0,0,1,313.33448,342.79321Zm0-54.59615a25.47821,25.47821,0,1,0,25.47821,25.4782A25.507,25.507,0,0,0,313.33448,288.19706Z" transform="translate(-213 -115.25)" fill="#e4e4e4"/><path d="M518.7325,635.91942a8.22484,8.22484,0,0,1,.958-12.302,9.56322,9.56322,0,0,1,1.26081-.83521l-6.99347-30.13439,16.26512,5.84042,4.14749,27.72073a8.21849,8.21849,0,0,1-2.21462,10.58849A10.12952,10.12952,0,0,1,518.7325,635.91942Z" transform="translate(-213 -115.25)" fill="#ffb8b8"/><path d="M516.88531,612.40706l-.08727-.29605c-8.79267-29.805-17.88169-60.6154-28.97824-94.16236l-.0728-.21977.2448-.13088c6.18493-3.30762,15.48114-3.08736,21.62358.51183,5.68293,3.33,8.55569,9.77159,7.0024,15.68347l8.09328,38.67327c3.29039,12.64158,6.69574,25.72668,9.95036,38.62892l.09229.36576-.504.0295c-5.92592.34536-12.04821.70254-16.95322.89973Z" transform="translate(-213 -115.25)" fill="#ccc"/><polygon points="229.16 657.57 217.627 657.57 212.138 616.801 229.16 616.801 229.16 657.57" fill="#ffb8b8"/><path d="M445.10175,783.06559H407.9141v-.43107c0-7.31472,6.49345-13.26551,14.47493-13.26551h22.71272Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><polygon points="337.837 648.851 326.848 652.06 308.113 614.743 324.331 610.006 337.837 648.851" fill="#ffb8b8"/><path d="M521.60173,783.39141l-.14262-.41086c-2.42325-6.96953,1.79234-14.4459,9.39693-16.66692l21.64062-6.31955,4.53736,13.05Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><ellipse cx="279.46347" cy="354.21043" rx="23.10522" ry="21.17504" fill="#ffb8b8"/><path d="M502.83713,465.536c.13132-8.54065-3.76885-16.99907-9.79916-21.25171a16.77762,16.77762,0,0,0-19.87954.322c-5.937,4.44645-9.65428,13.02823-9.33974,21.56167C477.12124,466.20257,490.42379,466.23726,502.83713,465.536Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M448.74454,759.69687l-.46255-.04125c-10.03358-.90255-20.40891-1.83457-30.21419-1.9415l-.5333-.00589.07281-.48411c2.32311-15.42,3.30793-31.45044,4.26037-46.9538.9405-15.308,1.91269-31.13682,4.17769-46.17039.95818-4.0257,1.892-8.00342,2.82264-11.96682,7.70037-32.79837,14.97378-63.77816,29.98728-94.44433l.14194-.28963.34381.03789c14.08679,1.56221,27.62283,6.27241,38.11391,13.26256l.20326.13513-.00988.23027a131.25944,131.25944,0,0,0-.10174,14.17269,44.82523,44.82523,0,0,1,7.48241,42.489c4.13084,12.65215,8.40154,25.73075,12.75907,38.63212,10.5818,26.587,21.53153,54.10056,32.75594,81.99045l.1842.45717-.51791.11114c-8.07587,1.73775-16.40668,3.52938-24.62518,4.22482l-.31028.0261-.14745-.25174a587.30717,587.30717,0,0,1-50.88262-112.12662c-2.80473,7.83882-6.84508,14.91443-10.75934,21.76819a157.11556,157.11556,0,0,0-9.86087,19.31354c-1.73239,13.0365-2.192,27.16078-2.63591,40.81947-.42007,12.91442-.81671,25.11236-2.19312,36.582Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M484.57528,444.67592c10.01507-1.97751,21.093-.09617,28.95819,6.09651s11.85919,16.9058,8.62805,26.09364-14.20114,15.65236-24.12,13.27969c2.84131-7.33881-.35623-16.34918-7.302-20.57639C482.50242,464.55626,480.23475,452.58775,484.57528,444.67592Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M496.73471,571.62025l-.36633-.15281c-12.77629-5.34207-25.30408-9.441-37.04181-13.18089l-.35989-.07114-.00092-.95644.23358.07451c.04915-.09935.1045-.21217.16008-.32456.16031-.325.26963-.54642.36264-.69292l-.00252-.00126c.97862-1.82742,1.75651-3.59337,2.50868-5.30123.77628-1.76259,1.5776-3.58243,2.61295-5.50793a15.68833,15.68833,0,0,1-4.02289-17.95719c2.593-5.63211,9.20424-10.01859,16.15083-10.74644,2.54543-6.42185,8.21712-19.91552,8.21712-19.91552s11.92674-.30015,16.72316-.85793l.08062-.00926.07923.016c10.4711,2.10273,19.213,11.1834,21.25846,22.08265,1.72665,9.199-.89525,19.721-7.38227,29.62807A128.7532,128.7532,0,0,1,504.93,561.61682c-2.92186,3.34837-5.68157,6.51067-7.97367,9.69571Z" transform="translate(-213 -115.25)" fill="#ccc"/><path d="M519.3919,459.10521v0Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M519.861,457.22412c-7.01076-.95907-12.51527-7.52688-11.71835-13.982s7.76344-11.72977,14.83079-11.22907,13.06654,6.694,12.77147,13.18459S528.81221,458.44864,519.861,457.22412Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M518.76646,453.03852c-7.01067-.95906-12.51516-7.52688-11.71821-13.98194.54524-4.41578,3.9788-8.27657,8.35539-10.11667-5.65378,1.13408-10.51956,5.64916-11.17757,10.97881-.79695,6.45506,4.70754,13.02288,11.71821,13.98195a14.465,14.465,0,0,0,7.6875-.98538A14.866,14.866,0,0,1,518.76646,453.03852Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M382.77632,566.82181a9.99626,9.99626,0,0,1,12.97554-3.271,9.61149,9.61149,0,0,1,1.27935.81118l28.67233-16.08336-.58936,16.00057-27.13738,12.82a10.15042,10.15042,0,0,1-11.63139,1.61428A8.34216,8.34216,0,0,1,382.77632,566.82181Z" transform="translate(-213 -115.25)" fill="#ffb8b8"/><path d="M406.35053,557.3917l.2755-.17406c27.73394-17.52829,56.40359-35.64765,87.2197-56.41349l.20185-.13613.21621.16792c5.46363,4.24233,8.33439,12.34854,6.67808,18.85539-1.5324,6.02009-7.20243,10.64869-13.80215,11.27624L450.049,550.84631c-11.90943,7.05521-24.23685,14.35751-36.42636,21.46865l-.34555.20162-.19828-.42571c-2.32974-5.0055-4.73707-10.17674-6.57422-14.34943Z" transform="translate(-213 -115.25)" fill="#ccc"/><path d="M986,784.75H214a1,1,0,0,1,0-2H986a1,1,0,0,1,0,2Z" transform="translate(-213 -115.25)" fill="#cacaca"/></svg>`;export const Update = ({ version: appVersion, fwdRef }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [version, setVersion] = useState(appVersion);let notes = version?.notes? version.notes.replace("Thank you for using Notesnook!", "").split("- ")@@ -102,7 +102,7 @@ export const Update = ({ version: appVersion, fwdRef }) => {<ProgressBarComponentsize={SIZE.xxl}indeterminate={true}- color={colors.accent}+ color={colors.primary.accent}borderWidth={0}height={5}width={250}@@ -129,7 +129,7 @@ export const Update = ({ version: appVersion, fwdRef }) => {alignItems: "flex-end",justifyContent: "space-between",width: "100%",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 10,padding: 12}}@@ -142,7 +142,7 @@ export const Update = ({ version: appVersion, fwdRef }) => {</Paragraph></View>- <SvgView src={UPDATE_SVG(colors.accent)} width={100} height={100} />+ <SvgView src={UPDATE_SVG(colors.primary.accent)} width={100} height={100} /></View><Seperator />@@ -156,7 +156,7 @@ export const Update = ({ version: appVersion, fwdRef }) => {{version.body ? (<Paragraph- color={colors.icon}+ color={colors.secondary.paragraph}style={{marginBottom: 5,fontFamily: "monospace",@@ -171,7 +171,7 @@ export const Update = ({ version: appVersion, fwdRef }) => {{notes.map((item) => (<Paragraphkey={item}- color={colors.icon}+ color={colors.secondary.paragraph}style={{marginBottom: 5}}@@ -196,7 +196,7 @@ export const Update = ({ version: appVersion, fwdRef }) => {<Paragraphsize={12}- color={colors.icon}+ color={colors.secondary.paragraph}style={{textDecorationLine: "underline",marginTop: 10diff --git a/apps/mobile/app/components/side-menu/color-section.js b/apps/mobile/app/components/side-menu/color-section.jsindex 8aaa37333..8af784669 100644--- a/apps/mobile/app/components/side-menu/color-section.js+++ b/apps/mobile/app/components/side-menu/color-section.js@@ -23,8 +23,8 @@ import Navigation from "../../services/navigation";import useNavigationStore from "../../stores/use-navigation-store";import { useMenuStore } from "../../stores/use-menu-store";import { useNoteStore } from "../../stores/use-notes-store";-import { useThemeStore } from "../../stores/use-theme-store";-import { COLORS_NOTE } from "../../utils/color-scheme";+import { useThemeColors } from "@notesnook/theme";+import { ColorValues } from "../../utils/colors";import { db } from "../../common/database";import { normalize, SIZE } from "../../utils/size";import { presentDialog } from "../dialog/functions";@@ -58,7 +58,7 @@ export const ColorSection = React.memo(const ColorItem = React.memo(function ColorItem({ item, alias }) {- const colors = useThemeStore((state) => state.colors);+ const { colors, isDark } = useThemeColors();const setColorNotes = useMenuStore((state) => state.setColorNotes);const [headerTextState, setHeaderTextState] = useState(null);alias = db.colors.alias(item.id) || "";@@ -116,8 +116,8 @@ const ColorItem = React.memo(headerTextState?.id === item.id ? "rgba(0,0,0,0.04)" : "transparent"}onLongPress={onLongPress}- customSelectedColor={COLORS_NOTE[item.title.toLowerCase()]}- customAlpha={!colors.night ? -0.02 : 0.02}+ customSelectedColor={ColorValues[item.title.toLowerCase()]}+ customAlpha={!isDark ? -0.02 : 0.02}customOpacity={0.12}onPress={() => onPress(item)}customStyle={{@@ -149,7 +149,7 @@ const ColorItem = React.memo(style={{width: SIZE.lg - 2,height: SIZE.lg - 2,- backgroundColor: COLORS_NOTE[item.title.toLowerCase()],+ backgroundColor: ColorValues[item.title.toLowerCase()],borderRadius: 100,justifyContent: "center",marginRight: 10@@ -157,11 +157,11 @@ const ColorItem = React.memo(/></View>{headerTextState?.id === item.id ? (- <Heading color={colors.heading} size={SIZE.md}>+ <Heading color={colors.selected.heading} size={SIZE.md}>{alias.slice(0, 1).toUpperCase() + alias.slice(1)}</Heading>) : (- <Paragraph color={colors.pri} size={SIZE.md}>+ <Paragraph color={colors.primary.paragraph} size={SIZE.md}>{alias.slice(0, 1).toUpperCase() + alias.slice(1)}</Paragraph>)}diff --git a/apps/mobile/app/components/side-menu/index.js b/apps/mobile/app/components/side-menu/index.jsindex c2a101fa2..2afee4ed3 100644--- a/apps/mobile/app/components/side-menu/index.js+++ b/apps/mobile/app/components/side-menu/index.js@@ -26,20 +26,19 @@ import { eSendEvent } from "../../services/event-manager";import Navigation from "../../services/navigation";import { useNoteStore } from "../../stores/use-notes-store";import { useSettingStore } from "../../stores/use-setting-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useUserStore } from "../../stores/use-user-store";-import { toggleDarkMode } from "../../utils/color-scheme/utils";import { MenuItemsList, SUBSCRIPTION_STATUS } from "../../utils/constants";import { eOpenPremiumDialog } from "../../utils/events";import { ColorSection } from "./color-section";import { MenuItem } from "./menu-item";import { TagsSection } from "./pinned-section";import { UserStatus } from "./user-status";+import { useThemeStore } from "../../stores/use-theme-store";export const SideMenu = React.memo(function SideMenu() {- const colors = useThemeStore((state) => state.colors);- const deviceMode = useSettingStore((state) => state.deviceMode);+ const { colors, isDark } = useThemeColors();const insets = useGlobalSafeAreaInsets();const subscriptionType = useUserStore((state) => state.user?.subscription?.type@@ -51,11 +50,13 @@ export const SideMenu = React.memo(const noTextMode = false;const BottomItemsList = [{- name: colors.night ? "Day" : "Night",+ name: isDark ? "Day" : "Night",icon: "theme-light-dark",- func: toggleDarkMode,+ func: () => {+ useThemeStore.getState().setColorScheme();+ },switch: true,- on: !!colors.night,+ on: !!isDark,close: false},{@@ -102,16 +103,18 @@ export const SideMenu = React.memo(style={{height: "100%",width: "100%",- backgroundColor: colors.nav+ backgroundColor: colors.primary.background}}><Viewstyle={{height: "100%",width: "100%",- backgroundColor: deviceMode !== "mobile" ? colors.nav : colors.bg,+ backgroundColor: colors.primary.background,paddingTop: insets.top,- borderRadius: 10+ borderRadius: 10,+ borderTopLeftRadius: 0,+ borderBottomLeftRadius: 0}}><FlatListdiff --git a/apps/mobile/app/components/side-menu/menu-item.js b/apps/mobile/app/components/side-menu/menu-item.jsindex eacacb292..632e533b2 100644--- a/apps/mobile/app/components/side-menu/menu-item.js+++ b/apps/mobile/app/components/side-menu/menu-item.js@@ -23,7 +23,7 @@ import Icon from "react-native-vector-icons/MaterialCommunityIcons";import ToggleSwitch from "toggle-switch-react-native";import Navigation from "../../services/navigation";import useNavigationStore from "../../stores/use-navigation-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { normalize, SIZE } from "../../utils/size";import { Button } from "../ui/button";import { PressableButton } from "../ui/pressable";@@ -34,7 +34,7 @@ import Tag from "../ui/tag";export const MenuItem = React.memo(function MenuItem({ item, index, testID, rightBtn }) {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [headerTextState, setHeaderTextState] = useState(useNavigationStore.getState().currentScreen);@@ -85,7 +85,7 @@ export const MenuItem = React.memo(testID={testID}key={item.name + index}onPress={_onPress}- type={!isFocused ? "gray" : "grayBg"}+ type={isFocused ? "selected" : "gray"}customStyle={{width: "100%",alignSelf: "center",@@ -113,15 +113,15 @@ export const MenuItem = React.memo(name={item.icon}color={item.icon === "crown"- ? colors.yellow+ ? colors.static.yellow: isFocused- ? colors.accent- : colors.pri+ ? colors.selected.icon+ : colors.secondary.icon}size={SIZE.lg - 2}/>{isFocused ? (- <Heading color={colors.heading} size={SIZE.md}>+ <Heading color={colors.selected.heading} size={SIZE.md}>{item.name}</Heading>) : (@@ -134,8 +134,8 @@ export const MenuItem = React.memo({item.switch ? (<ToggleSwitchisOn={item.on}- onColor={colors.accent}- offColor={colors.icon}+ onColor={colors.primary.accent}+ offColor={colors.primary.icon}size="small"animationSpeed={150}onToggle={_onPress}diff --git a/apps/mobile/app/components/side-menu/pinned-section.js b/apps/mobile/app/components/side-menu/pinned-section.jsindex 444b7789a..ef14a58d0 100644--- a/apps/mobile/app/components/side-menu/pinned-section.js+++ b/apps/mobile/app/components/side-menu/pinned-section.js@@ -27,7 +27,7 @@ import Navigation from "../../services/navigation";import { useMenuStore } from "../../stores/use-menu-store";import useNavigationStore from "../../stores/use-navigation-store";import { useNoteStore } from "../../stores/use-notes-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { db } from "../../common/database";import { normalize, SIZE } from "../../utils/size";import { Properties } from "../properties";@@ -103,12 +103,15 @@ export const TagsSection = React.memo(export const PinItem = React.memo(function PinItem({ item, onPress, placeholder, alias }) {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const setMenuPins = useMenuStore((state) => state.setMenuPins);alias = item?.alias || item?.title;const [visible, setVisible] = useState(false);const [headerTextState, setHeaderTextState] = useState(null);- const color = headerTextState?.id === item.id ? colors.accent : colors.pri;+ const color =+ headerTextState?.id === item.id+ ? colors.primary.accent+ : colors.primary.icon;const fwdRef = useRef();const onHeaderStateChange = useCallback(@@ -171,7 +174,7 @@ export const PinItem = React.memo(</SheetWrapper>)}<PressableButton- type={headerTextState?.id === item.id ? "grayBg" : "gray"}+ type={headerTextState?.id === item.id ? "selected" : "gray"}onLongPress={() => {if (placeholder) return;Properties.present(item);@@ -227,13 +230,17 @@ export const PinItem = React.memo(style={{flexWrap: "wrap"}}- color={colors.heading}+ color={colors.primary.heading}size={SIZE.md}>{alias}</Heading>) : (- <Paragraph numberOfLines={1} color={colors.pri} size={SIZE.md}>+ <Paragraph+ numberOfLines={1}+ color={colors.primary.paragraph}+ size={SIZE.md}+ >{alias}</Paragraph>)}diff --git a/apps/mobile/app/components/side-menu/user-status.js b/apps/mobile/app/components/side-menu/user-status.jsindex de6c8eaa0..6ef28b276 100644--- a/apps/mobile/app/components/side-menu/user-status.js+++ b/apps/mobile/app/components/side-menu/user-status.js@@ -24,7 +24,7 @@ import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";import useSyncProgress from "../../hooks/use-sync-progress";import { eSendEvent } from "../../services/event-manager";import Sync from "../../services/sync";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SyncStatus, useUserStore } from "../../stores/use-user-store";import { eOpenLoginDialog } from "../../utils/events";import { tabBarRef } from "../../utils/global-refs";@@ -35,7 +35,7 @@ import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";import { useNetInfo } from "@react-native-community/netinfo";export const UserStatus = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const user = useUserStore((state) => state.user);const syncing = useUserStore((state) => state.syncing);const lastSyncStatus = useUserStore((state) => state.lastSyncStatus);@@ -51,7 +51,7 @@ export const UserStatus = () => {alignSelf: "center",paddingBottom: Platform.OS === "ios" ? insets.bottom / 2 : null,borderTopWidth: 1,- borderTopColor: colors.nav+ borderTopColor: colors.secondary.background}}><View@@ -90,7 +90,7 @@ export const UserStatus = () => {flexWrap: "wrap"}}size={SIZE.xs}- color={colors.icon}+ color={colors.secondary.heading}>{!user ? ("You are not logged in"@@ -98,7 +98,10 @@ export const UserStatus = () => {<>Synced{" "}<TimeSince- style={{ fontSize: SIZE.xs, color: colors.icon }}+ style={{+ fontSize: SIZE.xs,+ color: colors.secondary.paragraph+ }}time={lastSynced}bold={true}/>@@ -112,10 +115,10 @@ export const UserStatus = () => {size={11}color={!user || lastSyncStatus === SyncStatus.Failed- ? colors.red+ ? colors.error.icon: isOffline- ? colors.orange- : colors.green+ ? colors.static.orange+ : colors.success.icon}/></Heading>@@ -124,7 +127,7 @@ export const UserStatus = () => {style={{flexWrap: "wrap"}}- color={colors.heading}+ color={colors.primary.heading}>{!user? "Login to sync your notes."@@ -140,11 +143,15 @@ export const UserStatus = () => {{user ? (syncing ? (- <ActivityIndicator color={colors.accent} size={SIZE.xl} />+ <ActivityIndicator color={colors.primary.accent} size={SIZE.xl} />) : lastSyncStatus === SyncStatus.Failed ? (- <Icon color={colors.red} name="sync-alert" size={SIZE.lg} />+ <Icon+ color={colors.error.icon}+ name="sync-alert"+ size={SIZE.lg}+ />) : (- <Icon color={colors.accent} name="sync" size={SIZE.lg} />+ <Icon color={colors.primary.accent} name="sync" size={SIZE.lg} />)) : null}</PressableButton>diff --git a/apps/mobile/app/components/tip/index.tsx b/apps/mobile/app/components/tip/index.tsxindex 343ff445a..592b412fd 100644--- a/apps/mobile/app/components/tip/index.tsx+++ b/apps/mobile/app/components/tip/index.tsx@@ -17,12 +17,12 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { useThemeColors } from "@notesnook/theme";import React from "react";import { Image, TextStyle, View, ViewStyle } from "react-native";import { MMKV } from "../../common/database/mmkv";import { eSendEvent, presentSheet } from "../../services/event-manager";import { TTip } from "../../services/tip-manager";-import { ThemeStore, useThemeStore } from "../../stores/use-theme-store";import { eCloseSheet } from "../../utils/events";import { SIZE } from "../../utils/size";import { Button } from "../ui/button";@@ -41,9 +41,9 @@ export const Tip = ({textStyle?: TextStyle;neverShowAgain: boolean;noImage?: boolean;- color?: keyof ThemeStore["colors"];+ color?: string;}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return tip ? (<View@@ -54,7 +54,7 @@ export const Tip = ({width: "100%",alignSelf: "center",paddingVertical: 12,- backgroundColor: colors.nav+ backgroundColor: colors.secondary.background},style]}@@ -77,7 +77,7 @@ export const Tip = ({alignSelf: "flex-start",borderRadius: 100,borderWidth: 1,- borderColor: colors[color as keyof typeof colors] as string+ borderColor: colors.static[color as never] || colors.primary[color as never] as string}}/>@@ -99,14 +99,18 @@ export const Tip = ({alignSelf: "flex-start",borderRadius: 100,borderWidth: 1,- borderColor: colors.icon+ borderColor: colors.primary.border}}/>)}</View><Seperator half />- <Paragraph style={textStyle} color={colors.pri} size={SIZE.md}>+ <Paragraph+ style={textStyle}+ color={colors.primary.paragraph}+ size={SIZE.md}+ >{tip.text}</Paragraph>{tip.image && !noImage && (@@ -133,8 +137,10 @@ export const Tip = ({title={tip.button.title}type="accent"icon={tip.button.icon}- accentText="light"- accentColor={color}+ buttonType={{+ color: colors.static[color as never],+ text: colors.static.white+ }}style={{marginTop: 10}}diff --git a/apps/mobile/app/components/toast/index.js b/apps/mobile/app/components/toast/index.jsindex 17b004cbd..399fdd004 100644--- a/apps/mobile/app/components/toast/index.js+++ b/apps/mobile/app/components/toast/index.js@@ -27,7 +27,7 @@ import {eSubscribeEvent,eUnSubscribeEvent} from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { getElevationStyle } from "../../utils/elevation";import { eHideToast, eShowToast } from "../../utils/events";import { SIZE } from "../../utils/size";@@ -35,7 +35,7 @@ import { Button } from "../ui/button";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";export const Toast = ({ context = "global" }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [data, setData] = useState({});const insets = useGlobalSafeAreaInsets();const hideTimeout = useRef();@@ -138,7 +138,7 @@ export const Toast = ({ context = "global" }) => {style={{...getElevationStyle(5),maxWidth: "95%",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,minWidth: data?.func ? "95%" : "50%",alignSelf: "center",borderRadius: 5,@@ -173,7 +173,9 @@ export const Toast = ({ context = "global" }) => {name={data?.type === "success" ? "check" : "close"}size={SIZE.lg}color={- data?.type === "error" ? colors.errorText : colors.accent+ data?.type === "error"+ ? colors.error.icon+ : colors.primary.accent}/></View>@@ -186,7 +188,7 @@ export const Toast = ({ context = "global" }) => {>{data?.heading ? (<Heading- color={colors.pri}+ color={colors.primary.paragraph}size={SIZE.md}onPress={() => {hide();@@ -198,7 +200,7 @@ export const Toast = ({ context = "global" }) => {{data?.message ? (<Paragraph- color={colors.pri}+ color={colors.primary.paragraph}style={{maxWidth: "100%",paddingRight: 10diff --git a/apps/mobile/app/components/ui/animated-button/index.tsx b/apps/mobile/app/components/ui/animated-button/index.tsxindex 2f278d5b5..cd07366f5 100644--- a/apps/mobile/app/components/ui/animated-button/index.tsx+++ b/apps/mobile/app/components/ui/animated-button/index.tsx@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import React from "react";-import { ActivityIndicator, ColorValue, ViewStyle } from "react-native";+import { ActivityIndicator, DimensionValue, ViewStyle } from "react-native";import Animated, {FadeIn,FadeOut,@@ -26,12 +26,10 @@ import Animated, {LightSpeedInLeft} from "react-native-reanimated";import Icon from "react-native-vector-icons/MaterialCommunityIcons";-import { ColorKey, useThemeStore } from "../../../stores/use-theme-store";-import { BUTTON_TYPES } from "../../../utils/constants";import { SIZE } from "../../../utils/size";import NativeTooltip from "../../../utils/tooltip";import { ButtonProps } from "../button";-import { PressableButton } from "../pressable";+import { PressableButton, useButton } from "../pressable";import Heading from "../typography/heading";import Paragraph from "../typography/paragraph";const AnimatedIcon = Animated.createAnimatedComponent(Icon);@@ -59,15 +57,12 @@ export const AnimatedButton = ({fwdRef,...restProps}: ButtonProps) => {- const colors = useThemeStore((state) => state.colors);-- const textColor = buttonType?.text- ? buttonType.text- : (colors[- type === "accent"- ? (BUTTON_TYPES[type](accentColor, accentText).text as ColorKey)- : (BUTTON_TYPES[type].text as ColorKey)- ] as ColorValue);+ const { text } = useButton({+ type,+ accent: accentColor,+ text: accentText+ });+ const textColor = buttonType?.text ? buttonType.text : text;const Component = bold ? Heading : Paragraph;return (@@ -99,7 +94,7 @@ export const AnimatedButton = ({customAlpha={buttonType?.alpha}customStyle={{height: height,- width: width || undefined,+ width: (width as DimensionValue) || undefined,paddingHorizontal: 12,borderRadius: 5,alignSelf: "center",diff --git a/apps/mobile/app/components/ui/button/index.tsx b/apps/mobile/app/components/ui/button/index.tsxindex de763c3e5..c791bb6e1 100644--- a/apps/mobile/app/components/ui/button/index.tsx+++ b/apps/mobile/app/components/ui/button/index.tsx@@ -17,22 +17,22 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { useThemeColors } from "@notesnook/theme";import React from "react";import {ActivityIndicator,ColorValue,+ DimensionValue,TextStyle,View,ViewStyle} from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";-import { ColorKey, useThemeStore } from "../../../stores/use-theme-store";import { useUserStore } from "../../../stores/use-user-store";-import { BUTTON_TYPES } from "../../../utils/constants";import { SIZE } from "../../../utils/size";import NativeTooltip from "../../../utils/tooltip";import { ProTag } from "../../premium/pro-tag";-import { PressableButton, PressableButtonProps } from "../pressable";+import { PressableButton, PressableButtonProps, useButton } from "../pressable";import Heading from "../typography/heading";import Paragraph from "../typography/paragraph";export interface ButtonProps extends PressableButtonProps {@@ -69,8 +69,8 @@ export const Button = ({type = "transparent",iconSize = SIZE.md,style = {},- accentColor = "accent",- accentText = "light",+ accentColor,+ accentText = "#ffffff",onLongPress,tooltipText,textStyle,@@ -79,19 +79,19 @@ export const Button = ({bold,iconColor,fwdRef,- iconStyle,proTag,+ iconStyle,...restProps}: ButtonProps) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const premium = useUserStore((state) => state.premium);- const textColor = buttonType?.text- ? buttonType.text- : (colors[- type === "accent"- ? (BUTTON_TYPES[type](accentColor, accentText).text as ColorKey)- : (BUTTON_TYPES[type].text as ColorKey)- ] as ColorValue);+ const { text } = useButton({+ type,+ accent: accentColor,+ text: accentText+ });+ const textColor = buttonType?.text ? buttonType.text : text;+const Component = bold ? Heading : Paragraph;return (@@ -118,7 +118,7 @@ export const Button = ({customAlpha={buttonType?.alpha}customStyle={{height: height,- width: width || undefined,+ width: (width as DimensionValue) || undefined,paddingHorizontal: 12,borderRadius: 5,alignSelf: "center",@@ -134,7 +134,7 @@ export const Button = ({{icon && !loading && iconPosition === "left" ? (<Iconname={icon}- style={[{ marginRight: 0 }, iconStyle]}+ style={[{ marginRight: 0 }, iconStyle as any]}color={iconColor || buttonType?.text || textColor}size={iconSize}/>@@ -163,14 +163,14 @@ export const Button = ({marginLeft: 10}}>- <ProTag size={10} width={40} background={colors.shade} />+ <ProTag size={10} width={40} background={colors.primary.shade} /></View>) : null}{icon && !loading && iconPosition === "right" ? (<Iconname={icon}- style={[{ marginLeft: 0 }, iconStyle]}+ style={[{ marginLeft: 0 }, iconStyle as any]}color={iconColor || buttonType?.text || textColor}size={iconSize}/>diff --git a/apps/mobile/app/components/ui/icon-button/index.tsx b/apps/mobile/app/components/ui/icon-button/index.tsxindex 0629137bc..f517d65b2 100644--- a/apps/mobile/app/components/ui/icon-button/index.tsx+++ b/apps/mobile/app/components/ui/icon-button/index.tsx@@ -17,15 +17,15 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { useThemeColors } from "@notesnook/theme";import React from "react";-import { ColorValue, GestureResponderEvent, ViewStyle } from "react-native";+import { ColorValue, GestureResponderEvent, TextStyle } from "react-native";import Animated, { Layout } from "react-native-reanimated";import Icon from "react-native-vector-icons/MaterialCommunityIcons";-import { ColorKey, useThemeStore } from "../../../stores/use-theme-store";-import { hexToRGBA, RGB_Linear_Shade } from "../../../utils/color-scheme/utils";+import { RGB_Linear_Shade, hexToRGBA } from "../../../utils/colors";import { SIZE } from "../../../utils/size";-import { PressableButton, PressableButtonProps } from "../pressable";import NativeTooltip from "../../../utils/tooltip";+import { PressableButton, PressableButtonProps } from "../pressable";interface IconButtonProps extends PressableButtonProps {name: string;color?: ColorValue;@@ -37,7 +37,7 @@ interface IconButtonProps extends PressableButtonProps {disabled?: boolean;tooltipText?: string;tooltipPosition?: number;- iconStyle?: ViewStyle;+ iconStyle?: TextStyle;}const AnimatedIcon = Animated.createAnimatedComponent(Icon);@@ -59,7 +59,7 @@ export const IconButton = ({tooltipPosition = NativeTooltip.POSITIONS.TOP,...restProps}: IconButtonProps) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const _onLongPress = (event: GestureResponderEvent) => {if (onLongPress) {@@ -91,11 +91,11 @@ export const IconButton = ({<AnimatedIconlayout={Layout}name={name}- style={iconStyle}+ style={iconStyle as any}color={restProps.disabled- ? RGB_Linear_Shade(-0.05, hexToRGBA(colors.nav))- : (colors[color as ColorKey] as ColorValue) || color+ ? RGB_Linear_Shade(-0.05, hexToRGBA(colors.secondary.background))+ : colors.static[color as never] || color}size={size}/>diff --git a/apps/mobile/app/components/ui/input/index.tsx b/apps/mobile/app/components/ui/input/index.tsxindex 25acedf81..118630913 100644--- a/apps/mobile/app/components/ui/input/index.tsx+++ b/apps/mobile/app/components/ui/input/index.tsx@@ -35,7 +35,7 @@ import {validatePass,validateUsername} from "../../../services/validation";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { getElevationStyle } from "../../../utils/elevation";import { SIZE } from "../../../utils/size";import { IconButton } from "../icon-button";@@ -106,7 +106,7 @@ const Input = ({wrapperStyle = {},...restProps}: InputProps) => {- const colors = useThemeStore((state) => state.colors);+ const { colors, isDark } = useThemeColors();const [error, setError] = useState(false);const [focus, setFocus] = useState(false);const [secureEntry, setSecureEntry] = useState(true);@@ -116,10 +116,10 @@ const Input = ({});type ErrorKey = keyof typeof errorList;const color = error- ? colors.red+ ? colors.error.paragraph: focus- ? customColor || colors.accent- : colors.border;+ ? customColor || colors.primary.accent+ : colors.primary.border;const validate = async (value: string) => {if (!validationType) return;@@ -226,7 +226,8 @@ const Input = ({const textStyle: TextInputProps["style"] = {paddingHorizontal: 0,fontSize: fontSize,- color: onPress && loading ? colors.accent : colors.pri,+ color:+ onPress && loading ? colors.primary.accent : colors.primary.paragraph,paddingVertical: 0,paddingBottom: 2.5,flexGrow: 1,@@ -270,12 +271,12 @@ const Input = ({}importantForAutofill="yes"importantForAccessibility="yes"- keyboardAppearance={colors.night ? "dark" : "light"}+ keyboardAppearance={isDark ? "dark" : "light"}onFocus={onFocus}onSubmitEditing={onSubmit}style={textStyle}secureTextEntry={secureTextEntry && secureEntry}- placeholderTextColor={colors.placeholder}+ placeholderTextColor={colors.primary.placeholder}/><View@@ -300,7 +301,9 @@ const Input = ({width: 25,marginLeft: 5}}- color={secureEntry ? colors.icon : colors.accent}+ color={+ secureEntry ? colors.primary.icon : colors.primary.accent+ }/>)}@@ -331,7 +334,7 @@ const Input = ({width: 25,marginLeft: 5}}- color={colors.errorText}+ color={colors.error.icon}/>)}</View>@@ -340,7 +343,7 @@ const Input = ({<Viewstyle={{position: "absolute",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,paddingVertical: 3,paddingHorizontal: 5,borderRadius: 2.5,@@ -358,7 +361,7 @@ const Input = ({<Iconname="alert-circle-outline"size={SIZE.xs}- color={colors.errorText}+ color={colors.error.icon}/>{" "}{errorMessage}</Paragraph>diff --git a/apps/mobile/app/components/ui/notice/index.tsx b/apps/mobile/app/components/ui/notice/index.tsxindex 7847610e2..9c145a08b 100644--- a/apps/mobile/app/components/ui/notice/index.tsx+++ b/apps/mobile/app/components/ui/notice/index.tsx@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { View } from "react-native";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import { IconButton } from "../icon-button";import Paragraph from "../typography/paragraph";@@ -36,7 +36,7 @@ export const Notice = ({size = "large",selectable}: NoticeProps) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const isSmall = size === "small";return (@@ -44,7 +44,7 @@ export const Notice = ({style={{padding: 12,flexDirection: "row",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: isSmall ? 5 : 10,alignItems: "flex-start"}}@@ -57,7 +57,7 @@ export const Notice = ({height: isSmall ? undefined : 40,alignSelf: "flex-start"}}- color={type === "alert" ? colors.errorText : colors.accent}+ color={type === "alert" ? colors.error.icon : colors.primary.accent}/><Paragraphstyle={{diff --git a/apps/mobile/app/components/ui/pressable/index.tsx b/apps/mobile/app/components/ui/pressable/index.tsxindex 75fc90e1c..6efe6f37b 100644--- a/apps/mobile/app/components/ui/pressable/index.tsx+++ b/apps/mobile/app/components/ui/pressable/index.tsx@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { useThemeColors } from "@notesnook/theme";import React, { RefObject, useCallback } from "react";import {ColorValue,@@ -27,20 +28,14 @@ import {ViewStyle} from "react-native";import Animated from "react-native-reanimated";-import {- ColorKey,- ThemeStore,- useThemeStore-} from "../../../stores/use-theme-store";-import { hexToRGBA, RGB_Linear_Shade } from "../../../utils/color-scheme/utils";-import { BUTTON_TYPES } from "../../../utils/constants";+import { hexToRGBA, RGB_Linear_Shade } from "../../../utils/colors";import { br } from "../../../utils/size";export interface PressableButtonProps extends PressableProps {customStyle?: ViewStyle;noborder?: boolean;- type?: keyof typeof BUTTON_TYPES;- accentColor?: keyof ThemeStore["colors"];- accentText?: keyof ThemeStore["colors"];+ type?: ButtonTypes;+ accentColor?: string;+ accentText?: string;customColor?: ColorValue;customSelectedColor?: ColorValue;customAlpha?: number;@@ -50,6 +45,108 @@ export interface PressableButtonProps extends PressableProps {hidden?: boolean;}+type ButtonTypes =+ | "transparent"+ | "accent"+ | "shade"+ | "gray"+ | "grayBg"+ | "grayAccent"+ | "inverted"+ | "white"+ | "error"+ | "errorShade"+ | "warn"+ | "selected";+export const useButton = ({+ type,+ accent,+ text+}: {+ accent?: string;+ text?: string;+ type: ButtonTypes;+}): {+ primary: string;+ text: string;+ selected: string;+ colorOpacity?: number;+} => {+ const { colors } = useThemeColors();+ const buttonTypes: {+ [name: string]: {+ primary: string;+ text: string;+ selected: string;+ colorOpacity?: number;+ };+ } = {+ transparent: {+ primary: "transparent",+ text: colors.primary.accent,+ selected: colors.secondary.background+ },+ gray: {+ primary: "transparent",+ text: colors.secondary.paragraph,+ selected: colors.primary.hover+ },+ grayBg: {+ primary: colors.secondary.background,+ text: colors.secondary.paragraph,+ selected: colors.secondary.background+ },+ selected: {+ primary: colors.selected.background,+ text: colors.selected.paragraph,+ selected: colors.selected.background+ },+ grayAccent: {+ primary: colors.secondary.background,+ text: colors.primary.accent,+ selected: colors.secondary.background+ },+ accent: {+ primary: accent || colors.primary.accent,+ text: text || colors.primary.paragraph,+ selected: accent || colors.primary.accent+ },+ inverted: {+ primary: colors.primary.background,+ text: colors.primary.accent,+ selected: colors.primary.background+ },+ white: {+ primary: "transparent",+ text: colors.static.white,+ selected: colors.primary.hover+ },+ shade: {+ primary: colors.primary.shade,+ text: colors.primary.accent,+ selected: colors.primary.accent,+ colorOpacity: 0.12+ },+ error: {+ primary: colors.error.background,+ text: colors.error.paragraph,+ selected: colors.error.background+ },+ errorShade: {+ primary: "transparent",+ text: colors.error.paragraph,+ selected: colors.error.background+ },+ warn: {+ primary: colors.static.orange,+ text: colors.static.white,+ selected: colors.static.orange+ }+ };++ return buttonTypes[type];+};+export const PressableButton = ({children,onPress,@@ -60,8 +157,8 @@ export const PressableButton = ({disabled,type = "gray",noborder,- accentColor = "accent",- accentText = "light",+ accentColor,+ accentText = "#ffffff",customColor,customSelectedColor,customAlpha,@@ -69,29 +166,20 @@ export const PressableButton = ({fwdRef,hidden}: PressableButtonProps) => {- const colors = useThemeStore((state) => state.colors);-- const selectedColor =- customSelectedColor ||- colors[- type === "accent"- ? (BUTTON_TYPES[type](accentColor, accentText).selected as ColorKey)- : (BUTTON_TYPES[type].selected as ColorKey)- ];- const primaryColor =- customColor ||- colors[- type === "accent"- ? (BUTTON_TYPES[type](accentColor, accentText).primary as ColorKey)- : (BUTTON_TYPES[type].primary as ColorKey)- ];+ const { isDark } = useThemeColors();+ const { primary, selected, colorOpacity } = useButton({+ type,+ accent: accentColor,+ text: accentText+ });+ const selectedColor = customSelectedColor || selected;+ const primaryColor = customColor || primary;const opacity = customOpacity? customOpacity: type === "accent"? 1- : //@ts-ignore- BUTTON_TYPES[type].opacity;- const alpha = customAlpha ? customAlpha : colors.night ? 0.04 : -0.04;+ : colorOpacity;+ const alpha = customAlpha ? customAlpha : isDark ? 0.04 : -0.04;const getStyle = useCallback(({ pressed }: PressableStateCallbackType): ViewStyle | ViewStyle[] => [diff --git a/apps/mobile/app/components/ui/reminder-time/index.tsx b/apps/mobile/app/components/ui/reminder-time/index.tsxindex 669ea34b0..4e9d8d061 100644--- a/apps/mobile/app/components/ui/reminder-time/index.tsx+++ b/apps/mobile/app/components/ui/reminder-time/index.tsx@@ -21,7 +21,7 @@ import React from "react";import { ViewStyle } from "react-native";import { Reminder } from "../../../services/notifications";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import { Button, ButtonProps } from "../button";import { getFormattedReminderTime } from "@notesnook/common";@@ -38,7 +38,7 @@ export const ReminderTime = ({style?: ViewStyle;checkIsActive?: boolean;} & ButtonProps) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const reminder = props.reminder;const time = !reminder ? undefined : getFormattedReminderTime(reminder);const isTodayOrTomorrow =@@ -59,7 +59,7 @@ export const ReminderTime = ({buttonType={isTodayOrTomorrow? {- text: props.color || colors.accent+ text: props.color || colors.primary.accent}: undefined}@@ -70,7 +70,7 @@ export const ReminderTime = ({borderRadius: 5,marginRight: 5,borderWidth: 0.5,- borderColor: colors.icon,+ borderColor: colors.primary.border,paddingHorizontal: 6,marginBottom: 5,...(style as ViewStyle)diff --git a/apps/mobile/app/components/ui/sheet/index.js b/apps/mobile/app/components/ui/sheet/index.jsindex c53b06f5f..d2c9048a1 100644--- a/apps/mobile/app/components/ui/sheet/index.js+++ b/apps/mobile/app/components/ui/sheet/index.js@@ -22,7 +22,7 @@ import { Platform, View } from "react-native";import ActionSheet from "react-native-actions-sheet";import useGlobalSafeAreaInsets from "../../../hooks/use-global-safe-area-insets";import { useSettingStore } from "../../../stores/use-setting-store";-import { useThemeStore } from "../../../stores/use-theme-store";+import { ScopedThemeProvider, useThemeColors } from "@notesnook/theme";import { PremiumToast } from "../../premium/premium-toast";import { Toast } from "../../toast";import { BouncingView } from "../transitions/bouncing-view";@@ -41,7 +41,7 @@ const SheetWrapper = ({enableGesturesInScrollView = false,bottomPadding = true}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors("sheet");const deviceMode = useSettingStore((state) => state.deviceMode);const sheetKeyboardHandler = useSettingStore((state) => state.sheetKeyboardHandler@@ -51,13 +51,12 @@ const SheetWrapper = ({const dimensions = useSettingStore((state) => state.dimensions);const pitchBlack = useSettingStore((state) => state.settings.pitchBlack);const insets = useGlobalSafeAreaInsets();-let width = dimensions.width > 600 ? 600 : 500;const style = React.useMemo(() => {return {width: largeTablet || smallTablet ? width : "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,zIndex: 10,paddingTop: 5,paddingBottom: 0,@@ -67,7 +66,7 @@ const SheetWrapper = ({borderBottomRightRadius: 0,borderBottomLeftRadius: 0};- }, [colors.bg, largeTablet, smallTablet, width]);+ }, [colors.primary.background, largeTablet, smallTablet, width]);const _onOpen = () => {onOpen && onOpen();@@ -80,61 +79,63 @@ const SheetWrapper = ({};return (- <ActionSheet- ref={fwdRef}- testIDs={{- backdrop: "sheet-backdrop"- }}- indicatorStyle={{- width: 100,- backgroundColor: colors.nav- }}- drawUnderStatusBar={false}- containerStyle={style}- gestureEnabled={gestureEnabled}- initialOffsetFromBottom={1}- onPositionChanged={onHasReachedTop}- closeOnTouchBackdrop={closeOnTouchBackdrop}- keyboardMode={keyboardMode}- keyboardHandlerEnabled={sheetKeyboardHandler}- closeOnPressBack={closeOnTouchBackdrop}- indicatorColor={colors.nav}- onOpen={_onOpen}- keyboardDismissMode="none"- enableGesturesInScrollView={enableGesturesInScrollView}- defaultOverlayOpacity={overlayOpacity}- overlayColor={pitchBlack ? "#585858" : "#2b2b2b"}- keyboardShouldPersistTaps="always"- openAnimationConfig={{- friction: 9- }}- ExtraOverlayComponent={- <>- {overlay}- <PremiumToast- context="sheet"- close={() => fwdRef?.current?.hide()}- offset={50}- />- <Toast context="local" />- </>- }- onClose={_onClose}- >- <BouncingView>- {children}- {bottomPadding ? (- <View- style={{- height:- Platform.OS === "ios" && insets.bottom !== 0- ? insets.bottom + 5- : 20- }}- />- ) : null}- </BouncingView>- </ActionSheet>+ <ScopedThemeProvider value="sheet">+ <ActionSheet+ ref={fwdRef}+ testIDs={{+ backdrop: "sheet-backdrop"+ }}+ indicatorStyle={{+ width: 100,+ backgroundColor: colors.secondary.background+ }}+ drawUnderStatusBar={false}+ containerStyle={style}+ gestureEnabled={gestureEnabled}+ initialOffsetFromBottom={1}+ onPositionChanged={onHasReachedTop}+ closeOnTouchBackdrop={closeOnTouchBackdrop}+ keyboardMode={keyboardMode}+ keyboardHandlerEnabled={sheetKeyboardHandler}+ closeOnPressBack={closeOnTouchBackdrop}+ indicatorColor={colors.secondary.background}+ onOpen={_onOpen}+ keyboardDismissMode="none"+ enableGesturesInScrollView={enableGesturesInScrollView}+ defaultOverlayOpacity={overlayOpacity}+ overlayColor={colors.primary.backdrop}+ keyboardShouldPersistTaps="always"+ openAnimationConfig={{+ friction: 9+ }}+ ExtraOverlayComponent={+ <>+ {overlay}+ <PremiumToast+ context="sheet"+ close={() => fwdRef?.current?.hide()}+ offset={50}+ />+ <Toast context="local" />+ </>+ }+ onClose={_onClose}+ >+ <BouncingView>+ {children}+ {bottomPadding ? (+ <View+ style={{+ height:+ Platform.OS === "ios" && insets.bottom !== 0+ ? insets.bottom + 5+ : 20+ }}+ />+ ) : null}+ </BouncingView>+ </ActionSheet>+ </ScopedThemeProvider>);};diff --git a/apps/mobile/app/components/ui/tag/index.tsx b/apps/mobile/app/components/ui/tag/index.tsxindex 60d69df8c..d54fd6308 100644--- a/apps/mobile/app/components/ui/tag/index.tsx+++ b/apps/mobile/app/components/ui/tag/index.tsx@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import React from "react";import { View, ViewStyle } from "react-native";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import Paragraph from "../typography/paragraph";@@ -35,11 +35,11 @@ export default function Tag({visible?: boolean;style?: ViewStyle;}) {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return !visible ? null : (<Viewstyle={{- backgroundColor: background || colors.accent,+ backgroundColor: background || colors.primary.accent,borderRadius: 100,paddingHorizontal: 4,paddingVertical: 2,@@ -50,7 +50,7 @@ export default function Tag({...style}}>- <Paragraph color={textColor || colors.light} size={SIZE.xxs}>+ <Paragraph color={textColor || colors.static.white} size={SIZE.xxs}>{text}</Paragraph></View>diff --git a/apps/mobile/app/components/ui/typography/heading.tsx b/apps/mobile/app/components/ui/typography/heading.tsxindex 16958f8c0..029ed3a4a 100644--- a/apps/mobile/app/components/ui/typography/heading.tsx+++ b/apps/mobile/app/components/ui/typography/heading.tsx@@ -23,7 +23,7 @@ import Animated, {ComplexAnimationBuilder,Layout} from "react-native-reanimated";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";interface HeadingProps extends TextProps {color?: string;@@ -52,7 +52,7 @@ const Heading = ({extraBold,...restProps}: HeadingProps) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const Component = useMemo(() => (animated ? AnimatedText : Text), [animated]);return (@@ -64,7 +64,7 @@ const Heading = ({style={[{fontSize: size || SIZE.xl,- color: color || colors.heading+ color: color || colors.primary.heading},extraBold ? (extraBoldStyle as ViewStyle) : (boldStyle as ViewStyle),stylediff --git a/apps/mobile/app/components/ui/typography/paragraph.tsx b/apps/mobile/app/components/ui/typography/paragraph.tsxindex 78116e553..c39caa712 100644--- a/apps/mobile/app/components/ui/typography/paragraph.tsx+++ b/apps/mobile/app/components/ui/typography/paragraph.tsx@@ -23,7 +23,7 @@ import Animated, {ComplexAnimationBuilder,Layout} from "react-native-reanimated";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";interface ParagraphProps extends TextProps {color?: string;@@ -39,7 +39,7 @@ const Paragraph = ({animated,...restProps}: ParagraphProps) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const Component = useMemo(() => (animated ? AnimatedText : Text), [animated]);return (@@ -51,7 +51,7 @@ const Paragraph = ({style={[{fontSize: size || SIZE.sm,- color: color || colors.pri,+ color: color || colors.primary.paragraph,fontWeight: "400",fontFamily: "OpenSans-Regular"},diff --git a/apps/mobile/app/components/walkthroughs/index.tsx b/apps/mobile/app/components/walkthroughs/index.tsxindex eade89529..1d7325e97 100644--- a/apps/mobile/app/components/walkthroughs/index.tsx+++ b/apps/mobile/app/components/walkthroughs/index.tsx@@ -21,7 +21,7 @@ import React, { useState } from "react";import { LayoutAnimation, View } from "react-native";import { MMKV } from "../../common/database/mmkv";import { eSendEvent, presentSheet } from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eCloseSheet } from "../../utils/events";import { SIZE } from "../../utils/size";import { sleep } from "../../utils/time";@@ -36,7 +36,7 @@ export const Walkthrough = ({steps: TStep[];canSkip: boolean;}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [step, setStep] = useState<TStep>(steps && steps[0]);const next = () => {diff --git a/apps/mobile/app/components/walkthroughs/walkthroughs.tsx b/apps/mobile/app/components/walkthroughs/walkthroughs.tsxindex cd3a7021e..f49866be4 100644--- a/apps/mobile/app/components/walkthroughs/walkthroughs.tsx+++ b/apps/mobile/app/components/walkthroughs/walkthroughs.tsx@@ -26,7 +26,7 @@ import {SUPPORT_SVG,WELCOME_SVG} from "../../assets/images/assets";-import { ThemeStore, useThemeStore } from "../../stores/use-theme-store";+import { ThemeStore } from "../../stores/use-theme-store";import { eSendEvent } from "../../services/event-manager";import { getElevationStyle } from "../../utils/elevation";import { eOpenAddNotebookDialog } from "../../utils/events";@@ -39,6 +39,7 @@ import { PinItem } from "../side-menu/pinned-section";import Seperator from "../ui/seperator";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";+import { useThemeColors } from "@notesnook/theme";export type TStep = {text?: string;@@ -56,7 +57,7 @@ export type TStep = {};const NotebookWelcome = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const data = useRotator([{title: "Work and office",@@ -80,7 +81,7 @@ const NotebookWelcome = () => {style={{width: "100%",padding: 12,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 10}}>@@ -88,13 +89,13 @@ const NotebookWelcome = () => {style={{padding: 12,width: "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,...getElevationStyle(3),borderRadius: 10,marginVertical: 12}}>- <Heading size={SIZE.md} color={colors.heading}>+ <Heading size={SIZE.md} color={colors.primary.heading}>{data?.title}</Heading><Paragraph>{data?.description}</Paragraph>@@ -104,7 +105,7 @@ const NotebookWelcome = () => {marginTop: 5}}size={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}>Notebook - {data?.count} notes</Paragraph>@@ -133,7 +134,7 @@ const notebooks: { id: string; steps: TStep[] } = {style={{width: "100%",padding: 12,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 10}}>@@ -141,13 +142,13 @@ const notebooks: { id: string; steps: TStep[] } = {style={{padding: 12,width: "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,...getElevationStyle(3),borderRadius: 10,marginVertical: 12}}>- <Heading size={SIZE.md} color={colors.heading}>+ <Heading size={SIZE.md} color={colors.primary.heading}>Work and office</Heading><Paragraph>Everything related to my job in one place.</Paragraph>@@ -157,7 +158,7 @@ const notebooks: { id: string; steps: TStep[] } = {marginTop: 5}}size={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}>Notebook - 2 notes</Paragraph>@@ -166,14 +167,18 @@ const notebooks: { id: string; steps: TStep[] } = {style={{padding: 12,width: "90%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,borderRadius: 10,alignSelf: "flex-end",marginBottom: 10}}>- <Paragraph color={colors.accent}>- <Icon color={colors.accent} size={SIZE.sm} name="bookmark" />{" "}+ <Paragraph color={colors.primary.accent}>+ <Icon+ color={colors.primary.accent}+ size={SIZE.sm}+ name="bookmark"+ />{" "}Tasks</Paragraph></View>@@ -182,22 +187,22 @@ const notebooks: { id: string; steps: TStep[] } = {padding: 12,paddingVertical: 12,width: "80%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,borderRadius: 5,alignSelf: "flex-end",marginBottom: 10}}><Paragraph size={SIZE.xs}>- <Icon color={colors.icon} size={SIZE.sm} name="note" /> Feburary- 2022 Week 2+ <Icon color={colors.primary.icon} size={SIZE.sm} name="note" />{" "}+ Feburary 2022 Week 2</Paragraph></View><Viewstyle={{padding: 12,width: "80%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,borderRadius: 5,paddingVertical: 12,alignSelf: "flex-end",@@ -205,22 +210,26 @@ const notebooks: { id: string; steps: TStep[] } = {}}><Paragraph size={SIZE.xs}>- <Icon color={colors.icon} size={SIZE.sm} name="note" /> Feburary- 2022 Week 1+ <Icon color={colors.primary.icon} size={SIZE.sm} name="note" />{" "}+ Feburary 2022 Week 1</Paragraph></View><Viewstyle={{padding: 12,width: "90%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,borderRadius: 10,alignSelf: "flex-end",marginBottom: 10}}>- <Paragraph color={colors.accent}>- <Icon color={colors.accent} size={SIZE.sm} name="bookmark" />{" "}+ <Paragraph color={colors.primary.accent}>+ <Icon+ color={colors.primary.accent}+ size={SIZE.sm}+ name="bookmark"+ />{" "}Meetings</Paragraph></View>@@ -306,7 +315,9 @@ const trialstarted: { id: string; steps: TStep[] } = {{title: "Your trial is activated",text: "You can use all premium features for free for the next 14 days",- walkthroughItem: (colors) => <SvgView src={LAUNCH_ROCKET(colors.pri)} />,+ walkthroughItem: (colors) => (+ <SvgView src={LAUNCH_ROCKET(colors.primary.paragraph)} />+ ),button: {type: "next",title: "Next"@@ -323,7 +334,9 @@ const trialstarted: { id: string; steps: TStep[] } = {{title: "Join the cause",text: "Meet other privacy-minded people and talk to us directly about your concerns, issues and suggestions.",- walkthroughItem: (colors) => <SvgView src={COMMUNITY_SVG(colors.pri)} />,+ walkthroughItem: (colors) => (+ <SvgView src={COMMUNITY_SVG(colors.primary.paragraph)} />+ ),button: {type: "done",title: "Continue"@@ -344,7 +357,9 @@ const emailconfirmed: { id: string; steps: TStep[] } = {{title: "Email confirmed",text: "Your email was confirmed successfully. Thank you for choosing end-to-end encrypted note taking.",- walkthroughItem: (colors) => <SvgView src={WELCOME_SVG(colors.pri)} />,+ walkthroughItem: (colors) => (+ <SvgView src={WELCOME_SVG(colors.primary.paragraph)} />+ ),button: {type: "done",title: "Continue"@@ -431,7 +446,9 @@ const prouser: { id: string; steps: TStep[] } = {{title: "Welcome to Notesnook Pro",text: "Thank you for reaffirming our idea that privacy comes first",- walkthroughItem: (colors) => <SvgView src={LAUNCH_ROCKET(colors.pri)} />,+ walkthroughItem: (colors) => (+ <SvgView src={LAUNCH_ROCKET(colors.primary.paragraph)} />+ ),button: {type: "next",title: "Next"diff --git a/apps/mobile/app/hooks/use-actions.js b/apps/mobile/app/hooks/use-actions.jsindex 1507d6a7d..25127cc0f 100644--- a/apps/mobile/app/hooks/use-actions.js+++ b/apps/mobile/app/hooks/use-actions.js@@ -48,10 +48,10 @@ import useNavigationStore from "../stores/use-navigation-store";import { useRelationStore } from "../stores/use-relation-store";import { useSelectionStore } from "../stores/use-selection-store";import { useTagStore } from "../stores/use-tag-store";-import { useThemeStore } from "../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useUserStore } from "../stores/use-user-store";import { convertNoteToText } from "../utils/note-to-text";-import { toggleDarkMode } from "../utils/color-scheme/utils";+import { toggleDarkMode } from "../utils/colors";import {eOnTopicSheetUpdate,eOpenAddTopicDialog,@@ -61,7 +61,7 @@ import { deleteItems } from "../utils/functions";import { sleep } from "../utils/time";export const useActions = ({ close = () => null, item }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors, isDark } = useThemeColors();const clearSelection = useSelectionStore((state) => state.clearSelection);const setSelectedItem = useSelectionStore((state) => state.setSelectedItem);const setMenuPins = useMenuStore((state) => state.setMenuPins);@@ -751,7 +751,7 @@ export const useActions = ({ close = () => null, item }) => {icon: "theme-light-dark",func: switchTheme,switch: true,- on: colors.night ? true : false,+ on: isDark ? true : false,close: false,pro: true},diff --git a/apps/mobile/app/hooks/use-app-events.js b/apps/mobile/app/hooks/use-app-events.jsindex 8cf63ca19..5e284c86f 100644--- a/apps/mobile/app/hooks/use-app-events.js+++ b/apps/mobile/app/hooks/use-app-events.js@@ -38,7 +38,6 @@ import { DatabaseLogger, db } from "../common/database";import { MMKV } from "../common/database/mmkv";import Migrate from "../components/sheets/migrate";import NewFeature from "../components/sheets/new-feature";-import { Update } from "../components/sheets/update";import { Walkthrough } from "../components/walkthroughs";import {clearAppState,@@ -71,7 +70,7 @@ import { useMessageStore } from "../stores/use-message-store";import { useNoteStore } from "../stores/use-notes-store";import { useSettingStore } from "../stores/use-setting-store";import { SyncStatus, useUserStore } from "../stores/use-user-store";-import { updateStatusBarColor } from "../utils/color-scheme";+import { updateStatusBarColor } from "../utils/colors";import {eClearEditor,eCloseSheet,@@ -84,6 +83,7 @@ import {import { getGithubVersion } from "../utils/github-version";import { tabBarRef } from "../utils/global-refs";import { sleep } from "../utils/time";+import { useThemeColors } from "@notesnook/theme";const onCheckSyncStatus = async (type) => {const { disableSync, disableAutoSync } = SettingsService.get();@@ -253,6 +253,7 @@ export const useAppEvents = () => {]);const syncedOnLaunch = useRef(false);+ const { isDark } = useThemeColors();const refValues = useRef({subsriptionSuccessListener: null,subsriptionErrorListener: null,diff --git a/apps/mobile/app/hooks/use-is-compact-mode-enabled.ts b/apps/mobile/app/hooks/use-is-compact-mode-enabled.tsnew file mode 100644index 000000000..4dd2fcd3c--- /dev/null+++ b/apps/mobile/app/hooks/use-is-compact-mode-enabled.ts@@ -0,0 +1,34 @@+/*+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 { useSettingStore } from "../stores/use-setting-store";++export function useIsCompactModeEnabled(item: any) {+ const [notebooksListMode, notesListMode] = useSettingStore((state) => [+ state.settings.notebooksListMode,+ state.settings.notesListMode+ ]);++ const type = item.itemType || item.type;++ if (type !== "note" && type !== "notebook") return false;++ const listMode = type === "notebook" ? notebooksListMode : notesListMode;++ return listMode === "compact";+}diff --git a/apps/mobile/app/hooks/use-selected.ts b/apps/mobile/app/hooks/use-selected.tsnew file mode 100644index 000000000..a4a68139c--- /dev/null+++ b/apps/mobile/app/hooks/use-selected.ts@@ -0,0 +1,41 @@+/*+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 { useSelectionStore } from "../stores/use-selection-store";++export default function useIsSelected(item: any) {+ const selectionMode = useSelectionStore((state) => state.selectionMode);+ const selectedItemsList = useSelectionStore(+ (state) => state.selectedItemsList+ );+ const selected =+ selectionMode &&+ selectedItemsList.findIndex(+ (selectedItem: any) => selectedItem.id === item.id+ ) > -1;++ function toggle() {+ if (!useSelectionStore.getState().selectionMode) {+ useSelectionStore.getState().setSelectionMode(true);+ }+ useSelectionStore.getState().setSelectedItem(item);+ }++ return [selected, toggle];+}diff --git a/apps/mobile/app/hooks/use-tooltip.ts b/apps/mobile/app/hooks/use-tooltip.tsindex c6b745a3b..9f7f8c744 100644--- a/apps/mobile/app/hooks/use-tooltip.ts+++ b/apps/mobile/app/hooks/use-tooltip.ts@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { RefObject, useEffect, useRef } from "react";import { Platform } from "react-native";import RNTooltips from "react-native-tooltips";-import { useThemeStore } from "../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import {eSendEvent,eSubscribeEvent,@@ -51,7 +51,7 @@ export const hideAllTooltips = async () => {* @returns*/const useTooltip = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors, isDark } = useThemeColors();const parent = useRef();const keyboard = useKeyboard();@@ -79,7 +79,7 @@ const useTooltip = () => {//TipManager.markPopupUsed(popup.id);RNTooltips.Show(target.current, parent.current, {text: popup.text,- tintColor: colors.night ? colors.nav : "#404040",+ tintColor: isDark ? colors.secondary.background : "#404040",corner: Platform.OS === "ios" ? 5 : 50,textSize: 15,position: positions[position],diff --git a/apps/mobile/app/navigation/index.js b/apps/mobile/app/navigation/index.jsindex b2dc1d431..2c5e858af 100644--- a/apps/mobile/app/navigation/index.js+++ b/apps/mobile/app/navigation/index.js@@ -21,12 +21,14 @@ import React from "react";import DialogProvider from "../components/dialog-provider";import { Toast } from "../components/toast";import { TabHolder } from "./tabs-holder";-+import { ScopedThemeProvider } from "@notesnook/theme";const _ApplicationHolder = () => {return (<><TabHolder />- <Toast />+ <ScopedThemeProvider value="dialog">+ <Toast />+ </ScopedThemeProvider><DialogProvider /></>);diff --git a/apps/mobile/app/navigation/navigation-stack.js b/apps/mobile/app/navigation/navigation-stack.jsindex dcf9926ab..2861973be 100644--- a/apps/mobile/app/navigation/navigation-stack.js+++ b/apps/mobile/app/navigation/navigation-stack.js@@ -47,7 +47,7 @@ import useNavigationStore from "../stores/use-navigation-store";import { useNoteStore } from "../stores/use-notes-store";import { useSelectionStore } from "../stores/use-selection-store";import { useSettingStore } from "../stores/use-setting-store";-import { useThemeStore } from "../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { rootNavigatorRef } from "../utils/global-refs";import Auth from "../components/auth";const NativeStack = createNativeStackNavigator();@@ -63,7 +63,7 @@ const IntroStack = createNativeStackNavigator();*/const IntroStackNavigator = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const height = useSettingStore((state) => state.dimensions.height);return (<IntroStack.Navigator@@ -72,7 +72,7 @@ const IntroStackNavigator = () => {lazy: false,animation: "none",contentStyle: {- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,minHeight: height}}}@@ -86,7 +86,7 @@ const IntroStackNavigator = () => {};const _Tabs = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const homepage = SettingsService.get().homepage;const introCompleted = useSettingStore((state) => state.settings.introCompleted@@ -106,7 +106,7 @@ const _Tabs = () => {<SafeAreaViewstyle={{flex: 1,- backgroundColor: colors.bg+ backgroundColor: colors.primary.background}}><DelayLayout animated={false} wait={loading} />@@ -122,7 +122,7 @@ const _Tabs = () => {lazy: false,animation: "none",contentStyle: {- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,minHeight: !introCompleted ? undefined : screenHeight}}}diff --git a/apps/mobile/app/navigation/tabs-holder.js b/apps/mobile/app/navigation/tabs-holder.jsindex c6ab2f2c0..ce76326a9 100644--- a/apps/mobile/app/navigation/tabs-holder.js+++ b/apps/mobile/app/navigation/tabs-holder.js@@ -59,7 +59,7 @@ import {} from "../services/event-manager";import { useEditorStore } from "../stores/use-editor-store";import { useSettingStore } from "../stores/use-setting-store";-import { useThemeStore } from "../stores/use-theme-store";+import { ScopedThemeProvider, useThemeColors } from "@notesnook/theme";import {eClearEditor,eCloseFullscreenEditor,@@ -71,7 +71,7 @@ import { sleep } from "../utils/time";import { NavigationStack } from "./navigation-stack";const _TabsHolder = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors, isDark } = useThemeColors();const deviceMode = useSettingStore((state) => state.deviceMode);const setFullscreen = useSettingStore((state) => state.setFullscreen);const fullscreen = useSettingStore((state) => state.fullscreen);@@ -384,8 +384,8 @@ const _TabsHolder = () => {}, []);useEffect(() => {- changeNavigationBarColor(colors.bg, !colors.night, true);- }, [colors.night, colors.bg]);+ changeNavigationBarColor(colors.primary.background, isDark, true);+ }, [colors.primary.background, isDark]);return (<View@@ -394,7 +394,7 @@ const _TabsHolder = () => {style={{height: "100%",width: "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,paddingBottom: Platform.OS === "android" ? insets?.bottom : 0,marginRight:orientation === "LANDSCAPE-RIGHT" && Platform.OS === "ios"@@ -407,7 +407,7 @@ const _TabsHolder = () => {}}><StatusBar- barStyle={colors.night ? "light-content" : "dark-content"}+ barStyle={isDark ? "light-content" : "dark-content"}translucent={true}backgroundColor="transparent"/>@@ -433,7 +433,9 @@ const _TabsHolder = () => {width: fullscreen ? 0 : widths[deviceMode]?.a}}>- <SideMenu />+ <ScopedThemeProvider value="navigationMenu">+ <SideMenu />+ </ScopedThemeProvider></View><View@@ -443,31 +445,35 @@ const _TabsHolder = () => {width: fullscreen ? 0 : widths[deviceMode]?.b}}>- {deviceMode === "mobile" ? (- <Animated.View- onTouchEnd={() => {- tabBarRef.current?.closeDrawer();- animatedOpacity.value = withTiming(0);- animatedTranslateY.value = withTiming(-9999);- }}- style={[- {- position: "absolute",- width: "100%",- height: "100%",- zIndex: 999,- backgroundColor: "rgba(0,0,0,0.2)"- },- animatedStyle- ]}- ref={overlayRef}- />- ) : null}-- <NavigationStack />+ <ScopedThemeProvider value="list">+ {deviceMode === "mobile" ? (+ <Animated.View+ onTouchEnd={() => {+ tabBarRef.current?.closeDrawer();+ animatedOpacity.value = withTiming(0);+ animatedTranslateY.value = withTiming(-9999);+ }}+ style={[+ {+ position: "absolute",+ width: "100%",+ height: "100%",+ zIndex: 999,+ backgroundColor: colors.primary.backdrop+ },+ animatedStyle+ ]}+ ref={overlayRef}+ />+ ) : null}++ <NavigationStack />+ </ScopedThemeProvider></View>- <EditorWrapper key="3" width={widths} dimensions={dimensions} />+ <ScopedThemeProvider value="editor">+ <EditorWrapper key="3" width={widths} dimensions={dimensions} />+ </ScopedThemeProvider></FluidTabs>) : null}</>@@ -477,8 +483,6 @@ const _TabsHolder = () => {};export const TabHolder = React.memo(_TabsHolder, () => true);-let layoutTimer = null;-const onChangeTab = async (obj) => {if (obj.i === 2) {editorState().movedAway = false;diff --git a/apps/mobile/app/package.json b/apps/mobile/app/package.jsonindex abc404c6e..7e2edd4cd 100644--- a/apps/mobile/app/package.json+++ b/apps/mobile/app/package.json@@ -6,9 +6,13 @@"dependencies": {"@flyerhq/react-native-link-preview": "^1.6.0","@mdi/js": "^6.7.96",+ "@streetwriters/showdown": "^3.0.1-alpha.2","absolutify": "^0.1.0",+ "buffer": "^6.0.3","dayjs": "^1.10.4",+ "deprecated-react-native-prop-types": "^4.1.0","entities": "^3.0.1",+ "fflate": "^0.7.3","html-to-text": "9.0.5","phone": "^3.1.14","qclone": "^1.2.0",@@ -16,21 +20,17 @@"react-native-check-version": "https://github.com/flexible-agency/react-native-check-version","react-native-drax": "^0.10.2","react-native-image-zoom-viewer": "^3.0.1",+ "react-native-keyboard-aware-scroll-view": "^0.9.5","react-native-progress": "^5.0.0","react-native-qrcode-svg": "^6.0.6","react-native-reanimated-material-menu": "github:ammarahm-ed/react-native-reanimated-material-menu","react-native-reanimated-progress-bar": "1.0.1",+ "react-native-swiper-flatlist": "3.2.2",+ "timeago.js": "4.0.2","toggle-switch-react-native": "3.2.0","url": "^0.11.0","validator": "^13.5.2",- "zustand": "^3.6.0",- "fflate": "^0.7.3",- "timeago.js": "4.0.2",- "react-native-swiper-flatlist": "3.2.2",- "@streetwriters/showdown": "^3.0.1-alpha.2",- "react-native-keyboard-aware-scroll-view": "^0.9.5",- "buffer": "^6.0.3",- "deprecated-react-native-prop-types": "^4.1.0"+ "zustand": "^3.6.0"},"sideEffects": false}diff --git a/apps/mobile/app/screens/editor/index.tsx b/apps/mobile/app/screens/editor/index.tsxindex 56f80be41..de627336b 100755--- a/apps/mobile/app/screens/editor/index.tsx+++ b/apps/mobile/app/screens/editor/index.tsx@@ -80,12 +80,11 @@ const Editor = React.memo(withController = true,editorId = "",onLoad,- onChange,- theme+ onChange},ref) => {- const editor = useEditor(editorId || "", readonly, onChange, theme);+ const editor = useEditor(editorId || "", readonly, onChange);const onMessage = useEditorEvents(editor, {readonly,noToolbar,@@ -128,8 +127,8 @@ const Editor = React.memo(const onError = useCallback(() => {renderKey.current =renderKey.current === `editor-0` ? `editor-1` : `editor-0`;- editor.state.current.ready = false;- editor.setLoading(true);+ // editor.state.current.ready = false;+ //editor.setLoading(true);}, [editor]);useEffect(() => {diff --git a/apps/mobile/app/screens/editor/loading.js b/apps/mobile/app/screens/editor/loading.jsindex a07fc07dc..c36bfb70f 100644--- a/apps/mobile/app/screens/editor/loading.js+++ b/apps/mobile/app/screens/editor/loading.js@@ -34,12 +34,12 @@ import {eUnSubscribeEvent} from "../../services/event-manager";import { useSettingStore } from "../../stores/use-setting-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { eClearEditor } from "../../utils/events";import { SIZE } from "../../utils/size";import { editorState } from "./tiptap/utils";const EditorOverlay = ({ editorId = "", editor }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [error, setError] = useState(false);const opacity = useSharedValue(1);const translateValue = useSharedValue(0);@@ -129,7 +129,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {position: "absolute",width: "100%",height: "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,justifyContent: "center",alignItems: "center",zIndex: 100@@ -140,7 +140,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {<Viewstyle={{width: "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,borderRadius: 5,height: "100%",alignItems: "flex-start",@@ -169,7 +169,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {translateValue.value = 6000;}}name="arrow-left"- color={colors.pri}+ color={colors.primary.paragraph}/>)}@@ -180,7 +180,10 @@ const EditorOverlay = ({ editorId = "", editor }) => {alignItems: "center"}}>- <IconButton name="dots-horizontal" color={colors.pri} />+ <IconButton+ name="dots-horizontal"+ color={colors.primary.paragraph}+ /></View></View>) : null}@@ -196,7 +199,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {<Viewstyle={{height: 30,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 100,marginBottom: 10,justifyContent: "flex-start",@@ -205,10 +208,10 @@ const EditorOverlay = ({ editorId = "", editor }) => {paddingHorizontal: 10,marginTop: 5,borderWidth: 1,- borderColor: colors.border+ borderColor: colors.primary.border}}>- <Paragraph color={colors.icon} size={13}>+ <Paragraph color={colors.secondary.paragraph} size={13}>Add a tag</Paragraph><IconButton@@ -218,7 +221,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {height: 26}}name="plus"- color={colors.accent}+ color={colors.primary.accent}/></View>) : null}@@ -227,7 +230,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {style={{height: 25,width: "100%",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5}}/>@@ -244,7 +247,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {style={{height: 12,width: 60,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginRight: 10}}@@ -253,7 +256,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {style={{height: 12,width: 60,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginRight: 10}}@@ -262,7 +265,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {style={{height: 12,width: 60,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginRight: 10}}@@ -273,7 +276,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {style={{height: 16,width: "100%",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginTop: 10}}@@ -283,7 +286,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {style={{height: 16,width: "100%",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginTop: 10}}@@ -293,7 +296,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {style={{height: 16,width: 200,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginTop: 10}}@@ -319,7 +322,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {<ParagraphtextBreakStrategy="balanced"size={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}style={{maxWidth: "100%",marginTop: 5diff --git a/apps/mobile/app/screens/editor/progress.js b/apps/mobile/app/screens/editor/progress.jsindex 1b771eca9..c533bbdf2 100644--- a/apps/mobile/app/screens/editor/progress.js+++ b/apps/mobile/app/screens/editor/progress.js@@ -22,10 +22,10 @@ import { View } from "react-native";import { ProgressBarComponent } from "../../components/ui/svg/lazy";import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";import { useAttachmentStore } from "../../stores/use-attachment-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";export const ProgressBar = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const loading = useAttachmentStore((state) => state.loading);const [prog, setProg] = useState(0);const [visible, setVisible] = useState(false);@@ -71,7 +71,7 @@ export const ProgressBar = () => {<ProgressBarComponentsize={SIZE.xxl}progress={prog}- color={colors.accent}+ color={colors.primary.accent}borderWidth={0}height={1}width={width || 400}diff --git a/apps/mobile/app/screens/editor/tiptap/types.ts b/apps/mobile/app/screens/editor/tiptap/types.tsindex 9243c5d58..41e5981db 100644--- a/apps/mobile/app/screens/editor/tiptap/types.ts+++ b/apps/mobile/app/screens/editor/tiptap/types.ts@@ -17,10 +17,9 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { useEditor } from "./use-editor";import type { ToolbarGroupDefinition } from "@notesnook/editor/dist/toolbar/types";-import { ThemeStore } from "../../../stores/use-theme-store";import { NoteType } from "../../../utils/types";+import { useEditor } from "./use-editor";export type useEditorType = ReturnType<typeof useEditor>;export type EditorState = {@@ -63,7 +62,6 @@ export type EditorProps = {editorId?: string;onLoad?: () => void;onChange?: (html: string) => void;- theme?: ThemeStore["colors"];};export type EditorMessage = {diff --git a/apps/mobile/app/screens/editor/tiptap/use-editor.ts b/apps/mobile/app/screens/editor/tiptap/use-editor.tsindex 42e7dd582..755e3c9d2 100644--- a/apps/mobile/app/screens/editor/tiptap/use-editor.ts+++ b/apps/mobile/app/screens/editor/tiptap/use-editor.ts@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { EVENTS } from "@notesnook/core/common";+import { useThemeEngineStore } from "@notesnook/theme";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import WebView from "react-native-webview";import { db } from "../../../common/database";@@ -35,7 +36,6 @@ import { TipManager } from "../../../services/tip-manager";import { useEditorStore } from "../../../stores/use-editor-store";import { useNoteStore } from "../../../stores/use-notes-store";import { useTagStore } from "../../../stores/use-tag-store";-import { ThemeStore, useThemeStore } from "../../../stores/use-theme-store";import { eClearEditor, eOnLoadNote } from "../../../utils/events";import { tabBarRef } from "../../../utils/global-refs";import { NoteType } from "../../../utils/types";@@ -57,9 +57,10 @@ import { getFormattedDate } from "@notesnook/common";export const useEditor = (editorId = "",readonly?: boolean,- onChange?: (html: string) => void,- theme?: ThemeStore["colors"]+ onChange?: (html: string) => void) => {+ const theme = useThemeEngineStore((state) => state.theme);+const [loading, setLoading] = useState(false);const [sessionId, setSessionId] = useState<string>(makeSessionId());const sessionIdRef = useRef(sessionId);@@ -92,6 +93,10 @@ export const useEditor = ();}, [commands, insets, isDefaultEditor]);+ useEffect(() => {+ postMessage(EditorEvents.theme, theme);+ }, [theme, postMessage]);+useEffect(() => {sessionIdRef.current = sessionId;}, [sessionId]);@@ -100,17 +105,6 @@ export const useEditor = (commands.setTags(currentNote.current);}, [commands, tags]);- useEffect(() => {- if (theme) return;- const unsub = useThemeStore.subscribe((state) => {- postMessage(EditorEvents.theme, state.colors);- });-- return () => {- unsub();- };- }, [postMessage, theme]);-const overlay = useCallback((show: boolean, data = { type: "new" }) => {eSendEvent(@@ -617,7 +611,7 @@ export const useEditor = (if (currentNote.current) overlay(true);clearTimeout(timers.current["editor:loaded"]);timers.current["editor:loaded"] = setTimeout(async () => {- postMessage(EditorEvents.theme, theme || useThemeStore.getState().colors);+ postMessage(EditorEvents.theme, theme);commands.setInsets(isDefaultEditor ? insets : { top: 0, left: 0, right: 0, bottom: 0 });diff --git a/apps/mobile/app/screens/editor/wrapper.js b/apps/mobile/app/screens/editor/wrapper.jsindex dad8fd292..a3632084e 100644--- a/apps/mobile/app/screens/editor/wrapper.js+++ b/apps/mobile/app/screens/editor/wrapper.js@@ -32,13 +32,14 @@ import useIsFloatingKeyboard from "../../hooks/use-is-floating-keyboard";import useKeyboard from "../../hooks/use-keyboard";import { DDS } from "../../services/device-detection";import { useSettingStore } from "../../stores/use-setting-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { editorRef } from "../../utils/global-refs";import { ProgressBar } from "./progress";import { editorController, textInput } from "./tiptap/utils";export const EditorWrapper = ({ width }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();+ const { colors: toolBarColors } = useThemeColors("editorToolbar");const deviceMode = useSettingStore((state) => state.deviceMode);const loading = false;const insets = useGlobalSafeAreaInsets();@@ -71,7 +72,8 @@ export const EditorWrapper = ({ width }) => {}, [loading]);const getMarginBottom = () => {- const bottomInsets = Platform.OS === "android" ? 12 : insets.bottom || 14;+ const bottomInsets =+ Platform.OS === "android" ? 12 : insets.bottom + 16 || 14;if (!keyboard.keyboardShown) return bottomInsets / 1.5;if (Platform.isPad && !floating) return bottomInsets;if (Platform.OS === "ios") return bottomInsets / 1.5;@@ -89,9 +91,9 @@ export const EditorWrapper = ({ width }) => {width: width[!introCompleted ? "mobile" : deviceMode]?.c,height: "100%",minHeight: "100%",- backgroundColor: colors.bg,+ backgroundColor: toolBarColors.primary.background,borderLeftWidth: DDS.isTab ? 1 : 0,- borderLeftColor: DDS.isTab ? colors.nav : "transparent"+ borderLeftColor: DDS.isTab ? colors.secondary.background : "transparent"}}>{loading || !introCompleted ? null : (@@ -99,6 +101,7 @@ export const EditorWrapper = ({ width }) => {behavior="padding"style={{marginBottom: getMarginBottom(),+ backgroundColor: colors.primary.background,flex: 1}}enabled={!floating}diff --git a/apps/mobile/app/screens/notes/index.tsx b/apps/mobile/app/screens/notes/index.tsxindex 84a5522bf..89ce1389c 100644--- a/apps/mobile/app/screens/notes/index.tsx+++ b/apps/mobile/app/screens/notes/index.tsx@@ -228,7 +228,7 @@ const NotesPage = ({flexDirection: "row",alignItems: "center"// borderBottomWidth: 1,- // borderBottomColor: colors.nav+ // borderBottomColor: colors.secondary.background}}><Paragraphdiff --git a/apps/mobile/app/screens/search/search-bar.js b/apps/mobile/app/screens/search/search-bar.jsindex 176bf42da..5c8239e94 100644--- a/apps/mobile/app/screens/search/search-bar.js+++ b/apps/mobile/app/screens/search/search-bar.js@@ -25,11 +25,11 @@ import { ToastEvent } from "../../services/event-manager";import Navigation from "../../services/navigation";import SearchService from "../../services/search";import { useSearchStore } from "../../stores/use-search-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { sleep } from "../../utils/time";export const SearchBar = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [value, setValue] = useState(null);const inputRef = useRef();const setSearchResults = useSearchStore((state) => state.setSearchResults);@@ -98,7 +98,7 @@ export const SearchBar = () => {SearchService.setTerm(null);Navigation.goBack();}}- color={colors.pri}+ color={colors.primary.paragraph}type="gray"customStyle={{paddingLeft: 0,@@ -115,7 +115,7 @@ export const SearchBar = () => {fontFamily: "OpenSans-Regular",flexGrow: 1,height: "100%",- color: colors.pri+ color: colors.primary.paragraph}}onChangeText={onChangeText}placeholder="Type a keyword"@@ -124,7 +124,7 @@ export const SearchBar = () => {returnKeyType="search"autoCapitalize="none"autoCorrect={false}- placeholderTextColor={colors.placeholder}+ placeholderTextColor={colors.primary.placeholder}/>{value && value.length > 0 ? (@@ -136,7 +136,7 @@ export const SearchBar = () => {right={20}onPress={onClear}type="grayBg"- color={colors.icon}+ color={colors.primary.icon}customStyle={{width: 25,height: 25diff --git a/apps/mobile/app/screens/settings/2fa.tsx b/apps/mobile/app/screens/settings/2fa.tsxindex 9050b2f6b..658c382cd 100644--- a/apps/mobile/app/screens/settings/2fa.tsx+++ b/apps/mobile/app/screens/settings/2fa.tsx@@ -46,7 +46,7 @@ import {presentSheet,ToastEvent} from "../../services/event-manager";-import { ThemeStore, useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors, VariantsWithStaticColors } from "@notesnook/theme";import { useUserStore } from "../../stores/use-user-store";import { eCloseSheet } from "../../utils/events";import { SIZE } from "../../utils/size";@@ -94,7 +94,7 @@ type MFAStepProps = {isSetup?: boolean;};export const MFAMethodsPickerStep = ({ recovery, onSuccess }: MFAStepProps) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const user = useUserStore((state) => state.user);const getMethods = () => {@@ -135,7 +135,9 @@ export const MFAMethodsPickerStep = ({ recovery, onSuccess }: MFAStepProps) => {marginRight: 10}}size={20}- color={item.recommended ? colors.accent : colors.icon}+ color={+ item.recommended ? colors.primary.accent : colors.primary.icon+ }name={item.icon}/>)}@@ -159,7 +161,7 @@ export const MFASetup = ({setStep,recovery}: MFAStepProps) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const user = useUserStore((state) => state.user);const [authenticatorDetails, setAuthenticatorDetails] = useState({sharedKey: null,@@ -284,7 +286,7 @@ export const MFASetup = ({}}><ActivityIndicator- color={colors.accent}+ color={colors.primary.accent}style={{height: 50}}@@ -399,7 +401,7 @@ export const MFARecoveryCodes = ({onSuccess,isSetup = true}: MFAStepProps) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [codes, setCodes] = useState([]);const [loading, setLoading] = useState(true);@@ -443,7 +445,7 @@ export const MFARecoveryCodes = ({}}><ActivityIndicator- color={colors.accent}+ color={colors.primary.accent}style={{height: 50}}@@ -568,16 +570,16 @@ MFARecoveryCodes.present = (methodId: MFAMethod["id"]) => {};const mfaSvg = (- colors: ThemeStore["colors"]+ colors: VariantsWithStaticColors) => `<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 382.94 405.93">-<path fill="${colors.pri}" d="M192.58 405.92a75.19 75.19 0 0 1-18.64-2.41l-1.2-.33-1.12-.56c-40.24-20.18-74.19-46.83-100.9-79.21a299.86 299.86 0 0 1-50.95-90.47A348.21 348.21 0 0 1 .07 110.27l.04-2.02c0-20.29 11.26-38.09 28.7-45.35C42.13 57.34 163.24 7.6 172 4c16.48-8.26 34.06-1.36 36.87-.16 6.31 2.58 118.28 48.38 142.47 59.9 24.94 11.87 31.6 33.2 31.6 43.93 0 48.6-8.43 94-25.02 134.97a312.52 312.52 0 0 1-56.16 90.51c-45.85 51.6-91.7 69.89-92.15 70.05a50.11 50.11 0 0 1-17.04 2.72zm-10.79-26.71c3.98.89 13.13 2.22 19.1.05 7.58-2.77 45.96-22.67 81.83-63.03 49.55-55.77 74.7-125.88 74.74-208.38-.1-1.67-1.28-13.59-17.07-21.1-23.72-11.3-140.1-58.89-141.27-59.37l-.32-.14c-2.44-1.02-10.2-3.17-15.55-.37l-1.08.5c-1.3.54-129.86 53.34-143.57 59.05-9.6 4-13 13.9-13 21.83 0 .58-.02 1.43-.05 2.52-1.1 56.44 11.97 195.34 156.24 268.44z"/>-<path fill="${colors.nav}" d="M177.33 15.59S47.61 68.87 33.71 74.66c-13.9 5.79-20.85 19.7-20.85 33.6 0 13.9-10.45 195.26 164.47 282.96 0 0 15.88 4.39 27.92 0 12.04-4.39 164.96-78.52 164.96-283.55 0 0 0-20.85-24.33-32.43C321.55 63.66 203.94 15.6 203.94 15.6s-14.44-6.37-26.6 0z"/>+<path fill="${colors.primary.paragraph}" d="M192.58 405.92a75.19 75.19 0 0 1-18.64-2.41l-1.2-.33-1.12-.56c-40.24-20.18-74.19-46.83-100.9-79.21a299.86 299.86 0 0 1-50.95-90.47A348.21 348.21 0 0 1 .07 110.27l.04-2.02c0-20.29 11.26-38.09 28.7-45.35C42.13 57.34 163.24 7.6 172 4c16.48-8.26 34.06-1.36 36.87-.16 6.31 2.58 118.28 48.38 142.47 59.9 24.94 11.87 31.6 33.2 31.6 43.93 0 48.6-8.43 94-25.02 134.97a312.52 312.52 0 0 1-56.16 90.51c-45.85 51.6-91.7 69.89-92.15 70.05a50.11 50.11 0 0 1-17.04 2.72zm-10.79-26.71c3.98.89 13.13 2.22 19.1.05 7.58-2.77 45.96-22.67 81.83-63.03 49.55-55.77 74.7-125.88 74.74-208.38-.1-1.67-1.28-13.59-17.07-21.1-23.72-11.3-140.1-58.89-141.27-59.37l-.32-.14c-2.44-1.02-10.2-3.17-15.55-.37l-1.08.5c-1.3.54-129.86 53.34-143.57 59.05-9.6 4-13 13.9-13 21.83 0 .58-.02 1.43-.05 2.52-1.1 56.44 11.97 195.34 156.24 268.44z"/>+<path fill="${colors.secondary.background}" d="M177.33 15.59S47.61 68.87 33.71 74.66c-13.9 5.79-20.85 19.7-20.85 33.6 0 13.9-10.45 195.26 164.47 282.96 0 0 15.88 4.39 27.92 0 12.04-4.39 164.96-78.52 164.96-283.55 0 0 0-20.85-24.33-32.43C321.55 63.66 203.94 15.6 203.94 15.6s-14.44-6.37-26.6 0z"/><path d="M191.23 57.29v284.25S60.34 278.53 61.51 112.89z" opacity=".2"/>-<path fill="${colors.icon}" d="m192.94 261.58-41.69-53.61 24.24-18.86 19.75 25.38 66.7-70.4 22.3 21.13z"/>+<path fill="${colors.primary.icon}" d="m192.94 261.58-41.69-53.61 24.24-18.86 19.75 25.38 66.7-70.4 22.3 21.13z"/></svg>`;const MFASuccess = ({ recovery }: MFAStepProps) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<Viewstyle={{diff --git a/apps/mobile/app/screens/settings/app-lock.js b/apps/mobile/app/screens/settings/app-lock.jsindex 68b11ef1c..f10a69723 100644--- a/apps/mobile/app/screens/settings/app-lock.js+++ b/apps/mobile/app/screens/settings/app-lock.js@@ -37,13 +37,13 @@ import {import Navigation from "../../services/navigation";import SettingsService from "../../services/settings";import { useSettingStore } from "../../stores/use-setting-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useUserStore } from "../../stores/use-user-store";import { getElevationStyle } from "../../utils/elevation";import { eOpenLoginDialog } from "../../utils/events";import { SIZE } from "../../utils/size";const AppLock = ({ route }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const appLockMode = useSettingStore((state) => state.settings.appLockMode);const welcome = route?.params?.welcome;const deviceMode = useSettingStore((state) => state.deviceMode);@@ -53,13 +53,14 @@ const AppLock = ({ route }) => {title: "No privacy",value: "none",desc: "Your notes are always unlocked. Anyone who has access to your phone can read them.",- activeColor: colors.errorText+ activeColor: colors.error.paragraph,+ activeType: "error"},{title: "Medium privacy",value: "launch",desc: "Your notes are locked when you exit the app but remain unlocked when you switch to other apps or background.",- activeColor: colors.accent+ activeColor: colors.primary.accent},{title: "Maximum privacy (Recommended)",@@ -69,7 +70,7 @@ const AppLock = ({ route }) => {? "App contents are hidden in app switcher": "Screenshots are disabled and app contents are hidden in app switcher."}`,- activeColor: colors.accent+ activeColor: colors.primary.accent}];@@ -96,17 +97,20 @@ const AppLock = ({ route }) => {alignSelf: "center",minHeight: 125,borderBottomWidth: 1,- borderBottomColor: welcome ? "transparent" : colors.nav+ borderBottomColor: welcome+ ? "transparent"+ : colors.secondary.background}}><Iconname="shield-lock"- color={colors.border}+ color={colors.secondary.icon}size={100}style={{position: "absolute",right: 0,- top: 6+ top: 6,+ opacity: 0.2}}/>@@ -133,12 +137,13 @@ const AppLock = ({ route }) => {flexGrow: 1,justifyContent: "flex-end",paddingHorizontal: 20,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderBottomWidth: 1,- borderBottomColor: colors.border,+ borderBottomColor: colors.primary.border,alignSelf: deviceMode !== "mobile" ? "center" : undefined,borderWidth: deviceMode !== "mobile" ? 1 : null,- borderColor: deviceMode !== "mobile" ? colors.border : null,+ borderColor:+ deviceMode !== "mobile" ? colors.primary.border : null,borderRadius: deviceMode !== "mobile" ? 20 : null,marginTop: deviceMode !== "mobile" ? 50 : null,width: deviceMode === "mobile" ? null : "50%",@@ -154,7 +159,7 @@ const AppLock = ({ route }) => {style={{width: 100,height: 5,- backgroundColor: colors.accent,+ backgroundColor: colors.primary.accent,borderRadius: 2,marginRight: 7}}@@ -164,7 +169,7 @@ const AppLock = ({ route }) => {style={{width: 20,height: 5,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 2}}/>@@ -226,7 +231,9 @@ const AppLock = ({ route }) => {marginBottom: 12,borderWidth: 1,borderColor:- appLockMode === item.value ? item.activeColor : colors.nav+ appLockMode === item.value+ ? item.activeColor+ : colors.secondary.background}}style={{marginBottom: 10@@ -234,7 +241,9 @@ const AppLock = ({ route }) => {><Headingcolor={- appLockMode === item.value ? item.activeColor : colors.pri+ appLockMode === item.value+ ? item.activeColor+ : colors.primary.heading}style={{ maxWidth: "95%" }}size={SIZE.md}@@ -243,7 +252,9 @@ const AppLock = ({ route }) => {</Heading><Paragraphcolor={- appLockMode === item.value ? item.activeColor : colors.icon+ appLockMode === item.value+ ? item.activeColor+ : colors.secondary.paragraph}style={{ maxWidth: "95%" }}size={SIZE.sm}diff --git a/apps/mobile/app/screens/settings/appearance.js b/apps/mobile/app/screens/settings/appearance.jsindex 8213f71ba..298110401 100644--- a/apps/mobile/app/screens/settings/appearance.js+++ b/apps/mobile/app/screens/settings/appearance.js@@ -24,16 +24,16 @@ import { PressableButton } from "../../components/ui/pressable";import { DDS } from "../../services/device-detection";import PremiumService from "../../services/premium";import SettingsService from "../../services/settings";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import {RGB_Linear_Shade,hexToRGBA,switchAccentColor-} from "../../utils/color-scheme/utils";+} from "../../utils/colors";import { SIZE } from "../../utils/size";export const AccentColorPicker = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors, isDark } = useThemeColors();function changeAccentColor(color) {switchAccentColor(color);}@@ -64,12 +64,12 @@ export const AccentColorPicker = () => {<PressableButtonkey={item}customColor={- colors.accent === item- ? RGB_Linear_Shade(!colors.night ? -0.2 : 0.2, hexToRGBA(item, 1))+ colors.primary.accent === item+ ? RGB_Linear_Shade(!isDark ? -0.2 : 0.2, hexToRGBA(item, 1)): item}customSelectedColor={item}- alpha={!colors.night ? -0.1 : 0.1}+ alpha={!isDark ? -0.1 : 0.1}opacity={1}onPress={async () => {await PremiumService.verify(async () => {@@ -93,7 +93,7 @@ export const AccentColorPicker = () => {borderRadius: 100}}>- {colors.accent === item ? (+ {colors.primary.accent === item ? (<Iconsize={DDS.isLargeTablet() ? SIZE.lg : SIZE.xxl}color="white"diff --git a/apps/mobile/app/screens/settings/components.tsx b/apps/mobile/app/screens/settings/components.tsxindex 351b8c045..c5c1290c7 100644--- a/apps/mobile/app/screens/settings/components.tsx+++ b/apps/mobile/app/screens/settings/components.tsx@@ -33,6 +33,7 @@ import {TrashIntervalPicker,BackupReminderPicker} from "./picker/pickers";+import ThemeSelector from "./theme-selector";export const components: { [name: string]: ReactElement } = {colorpicker: <AccentColorPicker />,@@ -47,5 +48,6 @@ export const components: { [name: string]: ReactElement } = {"font-selector": <FontPicker />,"title-format": <TitleFormat />,"date-format-selector": <DateFormatPicker />,- "time-format-selector": <TimeFormatPicker />+ "time-format-selector": <TimeFormatPicker />,+ "theme-selector": <ThemeSelector />};diff --git a/apps/mobile/app/screens/settings/debug.tsx b/apps/mobile/app/screens/settings/debug.tsxindex 02f7bfd70..b154c0692 100644--- a/apps/mobile/app/screens/settings/debug.tsx+++ b/apps/mobile/app/screens/settings/debug.tsx@@ -31,29 +31,12 @@ import { Notice } from "../../components/ui/notice";import Paragraph from "../../components/ui/typography/paragraph";import useTimer from "../../hooks/use-timer";import { ToastEvent } from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";-import { hexToRGBA } from "../../utils/color-scheme/utils";+import { useThemeColors } from "@notesnook/theme";+import { hexToRGBA } from "../../utils/colors";import { sanitizeFilename } from "@notesnook/common";-// function getLevelString(level: number) {-// switch (level) {-// case LogLevel.Debug:-// return 'DEBUG';-// case LogLevel.Info:-// return 'INFO';-// case LogLevel.Log:-// return 'LOG';-// case LogLevel.Error:-// return 'ERROR';-// case LogLevel.Warn:-// return 'WARN';-// case LogLevel.Fatal:-// return 'FATAL';-// }-// }-export default function DebugLogs() {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const { seconds, start } = useTimer("debug_logs_timer");const listRef = useRef<FlatList>(null);const currentOffset = useRef(0);@@ -88,17 +71,17 @@ export default function DebugLogs() {({ item }: { item: LogMessage; index: number }) => {const background =item.level === LogLevel.Error || item.level === LogLevel.Fatal- ? hexToRGBA(colors.red, 0.2)+ ? hexToRGBA(colors.error.paragraph, 0.2): item.level === LogLevel.Warn- ? hexToRGBA(colors.orange, 0.2)+ ? hexToRGBA(colors.static.orange, 0.2): "transparent";const color =item.level === LogLevel.Error || item.level === LogLevel.Fatal- ? colors.red+ ? colors.error.paragraph: item.level === LogLevel.Warn- ? colors.orange- : colors.pri;+ ? colors.static.black+ : colors.primary.paragraph;return !item ? null : (<TouchableOpacity@@ -117,7 +100,7 @@ export default function DebugLogs() {backgroundColor: background,flexShrink: 1,borderBottomWidth: 1,- borderBottomColor: colors.nav+ borderBottomColor: colors.secondary.background}}><Paragraph@@ -134,7 +117,13 @@ export default function DebugLogs() {</TouchableOpacity>);},- [colors.nav, colors.orange, colors.pri, colors.red]+ [+ colors.secondary.background,+ colors.primary.paragraph,+ colors.error.paragraph,+ colors.static.black,+ colors.static.orange+ ]);const downloadLogs = React.useCallback(async () => {@@ -239,7 +228,7 @@ export default function DebugLogs() {marginBottom: 10,flexDirection: "row",alignItems: "center",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,justifyContent: "space-between"}}>@@ -266,7 +255,7 @@ export default function DebugLogs() {}}size={20}name="chevron-left"- color={colors.icon}+ color={colors.primary.icon}/><IconButton@@ -283,7 +272,7 @@ export default function DebugLogs() {}}size={20}name="chevron-right"- color={colors.icon}+ color={colors.primary.icon}/></View>@@ -301,7 +290,7 @@ export default function DebugLogs() {marginRight: 5}}name="content-copy"- color={colors.gray}+ color={colors.secondary.paragraph}/><IconButtononPress={downloadLogs}@@ -312,7 +301,7 @@ export default function DebugLogs() {}}size={20}name="download"- color={colors.gray}+ color={colors.secondary.paragraph}/><IconButton@@ -324,7 +313,7 @@ export default function DebugLogs() {}}size={20}name="delete"- color={colors.gray}+ color={colors.secondary.paragraph}/></View></View>diff --git a/apps/mobile/app/screens/settings/editor/configure-toolbar.tsx b/apps/mobile/app/screens/settings/editor/configure-toolbar.tsxindex 104cfd79a..2a9e7a9e8 100644--- a/apps/mobile/app/screens/settings/editor/configure-toolbar.tsx+++ b/apps/mobile/app/screens/settings/editor/configure-toolbar.tsx@@ -25,14 +25,14 @@ import { Button } from "../../../components/ui/button";import { Notice } from "../../../components/ui/notice";import Paragraph from "../../../components/ui/typography/paragraph";import PremiumService from "../../../services/premium";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import { Group } from "./group";import { DragState, useDragState } from "./state";export const ConfigureToolbar = () => {const data = useDragState((state) => state.data);const preset = useDragState((state) => state.preset);- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const renderGroups = () => {return data?.map((item, index) => (@@ -62,7 +62,7 @@ export const ConfigureToolbar = () => {marginTop: 10}}size={SIZE.xs}- color={colors.icon}+ color={colors.secondary.paragraph}>PRESETS</Paragraph>diff --git a/apps/mobile/app/screens/settings/editor/group.tsx b/apps/mobile/app/screens/settings/editor/group.tsxindex c1d76ed10..b9724d7e1 100644--- a/apps/mobile/app/screens/settings/editor/group.tsx+++ b/apps/mobile/app/screens/settings/editor/group.tsx@@ -24,7 +24,7 @@ import Animated, { Layout } from "react-native-reanimated";import { presentDialog } from "../../../components/dialog/functions";import { IconButton } from "../../../components/ui/icon-button";import Paragraph from "../../../components/ui/typography/paragraph";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { getElevationStyle } from "../../../utils/elevation";import { SIZE } from "../../../utils/size";import { renderTool } from "./common";@@ -58,7 +58,7 @@ export const Group = ({height: 0,width: 0});- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const onDrop = (data: DraxDragWithReceiverEventData) => {if (!PremiumService.get()) {@@ -172,7 +172,7 @@ export const Group = ({style={[{width: isDragged ? dimensions.current?.width : "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,borderRadius: 10,...getElevationStyle(hover ? 5 : 0),marginTop: isSubgroup ? 0 : 10@@ -195,12 +195,12 @@ export const Group = ({alignItems: "center"}}>- <Icon size={SIZE.md} name="drag" color={colors.icon} />+ <Icon size={SIZE.md} name="drag" color={colors.primary.icon} /><Paragraphstyle={{marginLeft: 5}}- color={colors.icon}+ color={colors.secondary.paragraph}size={SIZE.xs}>GROUP@@ -225,7 +225,7 @@ export const Group = ({}}onPress={item.onPress}name={item.name}- color={colors.icon}+ color={colors.primary.icon}size={SIZE.lg}/>))}@@ -285,7 +285,10 @@ export const Group = ({receivingStyle={{paddingBottom: recievePosition === "below" ? 50 : 0,paddingTop: recievePosition === "above" ? 50 : 0,- backgroundColor: dragged.type === "subgroup" ? colors.nav : undefined,+ backgroundColor:+ dragged.type === "subgroup"+ ? colors.secondary.background+ : undefined,marginTop: recievePosition === "above" ? 10 : 0,marginBottom: recievePosition === "below" ? 10 : 0,borderRadius: 10diff --git a/apps/mobile/app/screens/settings/editor/tool-sheet.tsx b/apps/mobile/app/screens/settings/editor/tool-sheet.tsxindex 4e66fd419..895eee17c 100644--- a/apps/mobile/app/screens/settings/editor/tool-sheet.tsx+++ b/apps/mobile/app/screens/settings/editor/tool-sheet.tsx@@ -24,7 +24,7 @@ import { PressableButton } from "../../../components/ui/pressable";import { SvgView } from "../../../components/ui/svg";import Paragraph from "../../../components/ui/typography/paragraph";import { presentSheet } from "../../../services/event-manager";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import { DraggableItem, useDragState } from "./state";import {@@ -41,14 +41,16 @@ export default function ToolSheet({group: DraggableItem;fwdRef: RefObject<ActionSheetRef>;}) {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const data = useDragState((state) => state.data);const ungrouped = getUngroupedTools(data) as ToolId[];const renderTool = React.useCallback((item: ToolId) => {const tool = findToolById(item);- const iconSvgString = tool ? getToolIcon(tool.icon as ToolId) : null;+ const iconSvgString = tool+ ? getToolIcon(tool.icon as ToolId, colors.secondary.icon)+ : null;if (item === "none") return;return (<PressableButton@@ -90,7 +92,7 @@ export default function ToolSheet({style={{marginLeft: iconSvgString ? 10 : 0}}- color={colors.pri}+ color={colors.primary.paragraph}size={SIZE.sm}>{tool?.title}@@ -99,7 +101,12 @@ export default function ToolSheet({</PressableButton>);},- [colors.pri, group.groupIndex, group.index]+ [+ colors.primary.paragraph,+ colors.secondary.icon,+ group.groupIndex,+ group.index+ ]);return (@@ -115,7 +122,7 @@ export default function ToolSheet({style={{alignSelf: "center"}}- color={colors.icon}+ color={colors.secondary.paragraph}>You have grouped all the tools.</Paragraph>diff --git a/apps/mobile/app/screens/settings/editor/tool.tsx b/apps/mobile/app/screens/settings/editor/tool.tsxindex 95022d9dd..9ee90cfcd 100644--- a/apps/mobile/app/screens/settings/editor/tool.tsx+++ b/apps/mobile/app/screens/settings/editor/tool.tsx@@ -25,7 +25,7 @@ import { presentDialog } from "../../../components/dialog/functions";import { IconButton } from "../../../components/ui/icon-button";import { SvgView } from "../../../components/ui/svg";import Paragraph from "../../../components/ui/typography/paragraph";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { getElevationStyle } from "../../../utils/elevation";import { SIZE } from "../../../utils/size";import { renderGroup } from "./common";@@ -50,7 +50,7 @@ export const Tool = ({]);const [_recieving, setRecieving] = React.useState(false);const [recievePosition, setRecievePosition] = React.useState("above");- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const isSubgroup = typeof item === "object";const isDragged = !dragged? false@@ -65,7 +65,9 @@ export const Tool = ({const tool =isSubgroup || item === "dummy" ? null : findToolById(item as ToolId);const iconSvgString =- isSubgroup || !tool ? null : getToolIcon(tool.icon as ToolId);+ isSubgroup || !tool+ ? null+ : getToolIcon(tool.icon as ToolId, colors.secondary.icon);const buttons = React.useCallback(() => {const btns = isSubgroup@@ -120,7 +122,7 @@ export const Tool = ({const _data = useDragState.getState().data.slice();if (typeof parentIndex !== "number") {const index = _data[groupIndex]?.findIndex(- (tool: ToolId) => tool === item+ (tool: any) => tool === item);_data[groupIndex]?.splice(index, 1);} else {@@ -172,9 +174,11 @@ export const Tool = ({if (!isDragged) dimensions.current = event.nativeEvent.layout;}}style={{- backgroundColor: isSubgroup ? colors.bg : colors.nav,+ backgroundColor: isSubgroup+ ? colors.primary.background+ : colors.secondary.background,borderWidth: isSubgroup ? 0 : 1,- borderColor: isSubgroup ? undefined : colors.nav,+ borderColor: isSubgroup ? undefined : colors.secondary.background,marginBottom: 10,width: isDragged ? dimensions.current.width : "100%",paddingTop: isSubgroup ? 15 : 0,@@ -203,14 +207,18 @@ export const Tool = ({style={{ marginRight: 5 }}size={SIZE.md}name="drag"- color={colors.icon}+ color={colors.primary.icon}/>)}<Paragraphstyle={{marginLeft: iconSvgString ? 10 : 0}}- color={isSubgroup ? colors.icon : colors.pri}+ color={+ isSubgroup+ ? colors.secondary.paragraph+ : colors.primary.paragraph+ }size={isSubgroup ? SIZE.xs : SIZE.sm - 1}>{isSubgroup ? "COLLAPSED" : tool?.title}@@ -235,7 +243,7 @@ export const Tool = ({marginLeft: 10}}name={btn.name}- color={colors.icon}+ color={colors.primary.icon}size={SIZE.lg}/>))}@@ -255,10 +263,11 @@ export const Tool = ({),[buttons,- colors.bg,- colors.icon,- colors.nav,- colors.pri,+ colors.primary.background,+ colors.primary.icon,+ colors.secondary.background,+ colors.primary.paragraph,+ colors.secondary.paragraph,groupIndex,iconSvgString,index,@@ -356,7 +365,9 @@ export const Tool = ({paddingBottom: recievePosition === "below" ? 50 : 0,paddingTop: recievePosition === "above" ? 50 : 0,backgroundColor:- dragged?.type === "subgroup" ? colors.nav : undefined,+ dragged?.type === "subgroup"+ ? colors.secondary.background+ : undefined,marginTop: recievePosition === "above" ? 5 : 0,marginBottom: recievePosition === "below" ? 5 : 0,borderRadius: 10diff --git a/apps/mobile/app/screens/settings/editor/toolbar-definition.ts b/apps/mobile/app/screens/settings/editor/toolbar-definition.tsindex 8372c8f6b..840e2b7df 100644--- a/apps/mobile/app/screens/settings/editor/toolbar-definition.ts+++ b/apps/mobile/app/screens/settings/editor/toolbar-definition.ts@@ -18,13 +18,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { Icons } from "@notesnook/editor/dist/toolbar/icons";+import { ToolbarGroupDefinition } from "@notesnook/editor/dist/toolbar/index";import {- getDefaultPresets,- getAllTools+ getAllTools,+ getDefaultPresets} from "@notesnook/editor/dist/toolbar/tool-definitions";import { ToolId } from "@notesnook/editor/dist/toolbar/tools";-import { ToolbarGroupDefinition } from "@notesnook/editor/dist/toolbar/index";-import { useThemeStore } from "../../../stores/use-theme-store";export const tools = getAllTools();export const presets: { [name: string]: ToolbarGroupDefinition[] } = {@@ -40,13 +39,13 @@ export function findToolById(id: keyof typeof tools): {return tools[id];}-export function getToolIcon(id: ToolId) {+export function getToolIcon(id: ToolId, color: string) {const icon = Icons[id as keyof typeof Icons];- const colors = useThemeStore.getState().colors;+return (id as "none") === "none"? null: `<svg width="20" height="20" >- <path d="${icon}" fill="${colors.icon}" />+ <path d="${icon}" fill="${color}" /></svg>`;}diff --git a/apps/mobile/app/screens/settings/home.tsx b/apps/mobile/app/screens/settings/home.tsxindex 55f0c8e19..c944fcde4 100644--- a/apps/mobile/app/screens/settings/home.tsx+++ b/apps/mobile/app/screens/settings/home.tsx@@ -32,7 +32,7 @@ import {eUnSubscribeEvent} from "../../services/event-manager";import useNavigationStore from "../../stores/use-navigation-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { SectionGroup } from "./section-group";import { settingsGroups } from "./settings-data";@@ -43,7 +43,7 @@ const keyExtractor = (item: SettingSection) => item.id;const Home = ({navigation}: NativeStackScreenProps<RouteParams, "SettingsHome">) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const [loading, setLoading] = useState(false);useNavigationFocus(navigation, {@@ -82,35 +82,51 @@ const Home = ({style={{width: "100%",height: "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,justifyContent: "center",alignItems: "center"}}>- <Heading color={colors.pri} size={SIZE.lg}>+ <Heading color={colors.primary.heading} size={SIZE.lg}>Logging out</Heading>- <Paragraph color={colors.icon}>+ <Paragraph color={colors.secondary.icon}>Please wait while we log out and clear app data.</Paragraph><Viewstyle={{- flexDirection: "row",- width: 100,- marginTop: 15+ width: "100%",+ height: "100%",+ backgroundColor: colors.primary.background,+ justifyContent: "center",+ alignItems: "center"}}>- <ProgressBarComponent- height={5}- width={100}- animated={true}- useNativeDriver- indeterminate- indeterminateAnimationDuration={2000}- unfilledColor={colors.nav}- color={colors.accent}- borderWidth={0}- />+ <Heading color={colors.primary.paragraph} size={SIZE.lg}>+ Logging out+ </Heading>+ <Paragraph color={colors.secondary.paragraph}>+ Please wait while we log out and clear app data.+ </Paragraph>+ <View+ style={{+ flexDirection: "row",+ width: 100,+ marginTop: 15+ }}+ >+ <ProgressBarComponent+ height={5}+ width={100}+ animated={true}+ useNativeDriver+ indeterminate+ indeterminateAnimationDuration={2000}+ unfilledColor={colors.secondary.background}+ color={colors.primary.accent}+ borderWidth={0}+ />+ </View></View></View></BaseDialog>diff --git a/apps/mobile/app/screens/settings/index.tsx b/apps/mobile/app/screens/settings/index.tsxindex 71f016667..debe48d24 100644--- a/apps/mobile/app/screens/settings/index.tsx+++ b/apps/mobile/app/screens/settings/index.tsx@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { createNativeStackNavigator } from "@react-navigation/native-stack";import React from "react";import useNavigationStore from "../../stores/use-navigation-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import Group from "./group";import Home from "./home";import { RouteParams } from "./types";@@ -55,7 +55,7 @@ const SettingsStack = createNativeStackNavigator<RouteParams>();// };export const Settings = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<SettingsStack.NavigatorinitialRouteName="SettingsHome"@@ -70,7 +70,7 @@ export const Settings = () => {animation: "none",headerShown: false,contentStyle: {- backgroundColor: colors.bg+ backgroundColor: colors.primary.background}}}>diff --git a/apps/mobile/app/screens/settings/licenses.tsx b/apps/mobile/app/screens/settings/licenses.tsxindex 97d1dccec..162c51531 100644--- a/apps/mobile/app/screens/settings/licenses.tsx+++ b/apps/mobile/app/screens/settings/licenses.tsx@@ -22,7 +22,7 @@ import { FlatList, Linking, Platform } from "react-native";import { PressableButton } from "../../components/ui/pressable";import Heading from "../../components/ui/typography/heading";import { SIZE } from "../../utils/size";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import Paragraph from "../../components/ui/typography/paragraph";type LicenseEntry = {@@ -33,7 +33,7 @@ type LicenseEntry = {};export const Licenses = () => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors("base");const items =Platform.OS === "ios"? LICENSES.filter((l) => l.name.indexOf("android") === -1)@@ -49,7 +49,7 @@ export const Licenses = () => {alignSelf: "flex-start",padding: 12,borderBottomWidth: 1,- borderBottomColor: colors.nav,+ borderBottomColor: colors.secondary.background,borderRadius: 0}}onPress={() => {@@ -63,7 +63,7 @@ export const Licenses = () => {</Paragraph></PressableButton>),- [colors.nav]+ [colors.secondary.background]);return (<FlatListdiff --git a/apps/mobile/app/screens/settings/picker/index.tsx b/apps/mobile/app/screens/settings/picker/index.tsxindex 82ec2f00e..9aa3b0529 100644--- a/apps/mobile/app/screens/settings/picker/index.tsx+++ b/apps/mobile/app/screens/settings/picker/index.tsx@@ -24,7 +24,7 @@ import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { PressableButton } from "../../../components/ui/pressable";import Paragraph from "../../../components/ui/typography/paragraph";import PremiumService from "../../../services/premium";-import { useThemeStore } from "../../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../../utils/size";import { sleep } from "../../../utils/time";@@ -49,7 +49,7 @@ export function SettingsPicker<T>({premium,onCheckOptionIsPremium = () => true}: PickerOptions<T>) {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors("contextMenu");const menuRef = useRef<any>();const [width, setWidth] = useState(0);const [currentValue, setCurrentValue] = useState(getValue());@@ -90,9 +90,10 @@ export function SettingsPicker<T>({animationDuration={200}style={{borderRadius: 5,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,width: width,- marginTop: 60+ marginTop: 60,+ overflow: "hidden"}}onRequestClose={() => {menuRef.current?.hide();@@ -113,7 +114,7 @@ export function SettingsPicker<T>({}}><Paragraph>{formatValue(currentValue)}</Paragraph>- <Icon color={colors.icon} name="menu-down" size={SIZE.md} />+ <Icon color={colors.primary.icon} name="menu-down" size={SIZE.md} /></PressableButton>}>@@ -125,7 +126,7 @@ export function SettingsPicker<T>({}}style={{backgroundColor: compareValue(currentValue, item)- ? colors.nav+ ? colors.secondary.background: "transparent",width: "100%",maxWidth: width@@ -133,8 +134,8 @@ export function SettingsPicker<T>({textStyle={{fontSize: SIZE.md,color: compareValue(currentValue, item)- ? colors.accent- : colors.pri+ ? colors.primary.accent+ : colors.primary.paragraph}}>{formatValue(item)}diff --git a/apps/mobile/app/screens/settings/section-group.tsx b/apps/mobile/app/screens/settings/section-group.tsxindex 606e3d01b..885df34a9 100644--- a/apps/mobile/app/screens/settings/section-group.tsx+++ b/apps/mobile/app/screens/settings/section-group.tsx@@ -20,12 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { View } from "react-native";import Heading from "../../components/ui/typography/heading";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { SectionItem } from "./section-item";import { SettingSection } from "./types";export const SectionGroup = ({ item }: { item: SettingSection }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const current = item.useHook && item.useHook();const isHidden = item.hidden && item.hidden(current);return isHidden ? null : (@@ -39,7 +39,7 @@ export const SectionGroup = ({ item }: { item: SettingSection }) => {style={{paddingHorizontal: 12}}- color={colors.accent}+ color={colors.primary.accent}size={SIZE.xs}>{(item.name as string).toUpperCase()}diff --git a/apps/mobile/app/screens/settings/section-item.tsx b/apps/mobile/app/screens/settings/section-item.tsxindex 1a4474acc..2076fb1f1 100644--- a/apps/mobile/app/screens/settings/section-item.tsx+++ b/apps/mobile/app/screens/settings/section-item.tsx@@ -33,14 +33,14 @@ import Paragraph from "../../components/ui/typography/paragraph";import SettingsService from "../../services/settings";import useNavigationStore from "../../stores/use-navigation-store";import { SettingStore, useSettingStore } from "../../stores/use-setting-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { components } from "./components";import { RouteParams, SettingSection } from "./types";import { IconButton } from "../../components/ui/icon-button";const _SectionItem = ({ item }: { item: SettingSection }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const settings = useSettingStore((state) => state.settings);const navigation = useNavigation<NavigationProp<RouteParams>>();const current = item.useHook && item.useHook(item);@@ -66,7 +66,7 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {const styles =item.type === "danger"? {- backgroundColor: colors.errorBg+ backgroundColor: colors.error.background}: {};@@ -109,7 +109,7 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {navigation.dispatch(StackActions.push("SettingsGroup", item));useNavigationStore.getState().update({- name: "SettingsGroup",+ name: "SettingsGroup" as never,title:typeof item.name === "function"? item.name(current)@@ -141,13 +141,19 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {alignItems: "center",marginRight: 12,backgroundColor:- item.component === "colorpicker" ? colors.accent : undefined,+ item.component === "colorpicker"+ ? colors.primary.accent+ : undefined,borderRadius: 100}}>{!!item.icon && (<Icon- color={item.type === "danger" ? colors.errorText : colors.icon}+ color={+ item.type === "danger"+ ? colors.error.icon+ : colors.secondary.icon+ }name={item.icon}size={30}/>@@ -161,14 +167,22 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {}}><Paragraph- color={item.type === "danger" ? colors.errorText : colors.heading}+ color={+ item.type === "danger"+ ? colors.error.paragraph+ : colors.primary.heading+ }size={SIZE.md + 1}>{typeof item.name === "function" ? item.name(current) : item.name}</Paragraph>{!!item.description && (<Paragraph- color={item.type === "danger" ? colors.errorText : colors.pri}+ color={+ item.type === "danger"+ ? colors.error.paragraph+ : colors.primary.paragraph+ }size={SIZE.sm}>{typeof item.description === "function"@@ -227,7 +241,7 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {><IconButtonname="minus"- color={colors.pri}+ color={colors.primary.icon}onPress={() => {const rawValue = SettingsService.get()[item.property as keyof SettingStore["settings"]@@ -274,7 +288,7 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {/><IconButtonname="plus"- color={colors.pri}+ color={colors.primary.icon}onPress={() => {const rawValue = SettingsService.get()[item.property as keyof SettingStore["settings"]@@ -304,8 +318,8 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {? item.getter(item.property || current): settings[item?.property as never]}- onColor={colors.accent}- offColor={colors.icon}+ onColor={colors.primary.accent}+ offColor={colors.secondary.icon}size="small"animationSpeed={150}onToggle={onChangeSettings}@@ -313,7 +327,7 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {)}{loading ? (- <ActivityIndicator size={SIZE.xxl} color={colors.accent} />+ <ActivityIndicator size={SIZE.xxl} color={colors.primary.accent} />) : null}</PressableButton>);diff --git a/apps/mobile/app/screens/settings/settings-data.tsx b/apps/mobile/app/screens/settings/settings-data.tsxindex 5aff0b48e..bf17709b3 100644--- a/apps/mobile/app/screens/settings/settings-data.tsx+++ b/apps/mobile/app/screens/settings/settings-data.tsx@@ -17,11 +17,11 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { ThemeDark, ThemePitchBlack } from "@notesnook/theme";import notifee from "@notifee/react-native";-import dayjs from "dayjs";import React from "react";-import { Linking, Platform } from "react-native";+import { Appearance, Linking, Platform } from "react-native";import { getVersion } from "react-native-device-info";import * as RNIap from "react-native-iap";import { enabled } from "react-native-privacy-snapshot";@@ -51,9 +51,8 @@ import PremiumService from "../../services/premium";import SettingsService from "../../services/settings";import Sync from "../../services/sync";import { clearAllStores } from "../../stores";-import { useSettingStore } from "../../stores/use-setting-store";+import { useThemeStore } from "../../stores/use-theme-store";import { useUserStore } from "../../stores/use-user-store";-import { getColorScheme, toggleDarkMode } from "../../utils/color-scheme/utils";import { SUBSCRIPTION_STATUS } from "../../utils/constants";import {eCloseSheet,@@ -70,7 +69,6 @@ import { useDragState } from "./editor/state";import { verifyUser } from "./functions";import { SettingSection } from "./types";import { getTimeLeft } from "./user-section";-type User = any;export const settingsGroups: SettingSection[] = [@@ -434,16 +432,16 @@ export const settingsGroups: SettingSection[] = [{id: "personalization",type: "screen",- name: "Theme",+ name: "Appearance",description: "Change app look and feel with color themes",icon: "shape",sections: [{- id: "accent-color-picker",- type: "component",- name: "Accent color",- description: "Pick the color that matches your mood",- component: "colorpicker"+ id: "theme-picker",+ type: "screen",+ name: "Themes",+ description: "Customize Notesnook to absolute infinity.",+ component: "theme-selector"},{id: "use-system-theme",@@ -458,7 +456,11 @@ export const settingsGroups: SettingSection[] = [SettingsService.set({useSystemTheme: !current});- getColorScheme();+ if (!current) {+ useThemeStore+ .getState()+ .setColorScheme(Appearance.getColorScheme() as any);+ }}},{@@ -466,26 +468,12 @@ export const settingsGroups: SettingSection[] = [type: "switch",name: "Dark mode",description: "Strain your eyes no more at night",- property: "theme",+ property: "colorScheme",icon: "brightness-6",modifer: () => {- toggleDarkMode();+ useThemeStore.getState().setColorScheme();},- getter: () => useSettingStore.getState().settings.theme.dark- },- {- id: "pitch-black",- type: "switch",- name: "Pitch black",- description: "Save battery on device with amoled screen at night.",- property: "pitchBlack",- modifer: () => {- SettingsService.set({- pitchBlack: !SettingsService.get().pitchBlack- });- getColorScheme();- },- icon: "brightness-1"+ getter: () => useThemeStore.getState().colorScheme === "dark"}]},@@ -1059,13 +1047,6 @@ export const settingsGroups: SettingSection[] = [type: "screen",icon: "bug",sections: [- {- id: "debug-mode",- type: "switch",- name: "Debug mode",- description: "Show debug options on items",- property: "devMode"- },{id: "debug-logs",type: "screen",diff --git a/apps/mobile/app/screens/settings/sound-picker.tsx b/apps/mobile/app/screens/settings/sound-picker.tsxindex 228480e51..8959a3a00 100644--- a/apps/mobile/app/screens/settings/sound-picker.tsx+++ b/apps/mobile/app/screens/settings/sound-picker.tsx@@ -30,7 +30,7 @@ import Paragraph from "../../components/ui/typography/paragraph";import Notifications from "../../services/notifications";import SettingsService from "../../services/settings";import { useSettingStore } from "../../stores/use-setting-store";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";const SoundItem = ({@@ -46,7 +46,7 @@ const SoundItem = ({index: number;setPlaying: (sound: Sound | undefined) => void;}) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const isPlaying = playingSoundId === item.soundID;return (<PressableButton@@ -57,7 +57,7 @@ const SoundItem = ({height: 60,borderBottomWidth: 1,borderRadius: 0,- borderBottomColor: colors.border,+ borderBottomColor: colors.primary.border,paddingHorizontal: 12}}onPress={async () => {@@ -99,7 +99,7 @@ const SoundItem = ({type={isPlaying ? "grayAccent" : "gray"}size={22}name={isPlaying ? "pause" : "play"}- color={isPlaying ? colors.accent : colors.gray}+ color={isPlaying ? colors.primary.accent : colors.primary.icon}onPress={() => {if (isPlaying) {stopSampleSound();diff --git a/apps/mobile/app/screens/settings/theme-selector.tsx b/apps/mobile/app/screens/settings/theme-selector.tsxnew file mode 100644index 000000000..b6e9f611c--- /dev/null+++ b/apps/mobile/app/screens/settings/theme-selector.tsx@@ -0,0 +1,757 @@+/*+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 {+ THEME_COMPATIBILITY_VERSION,+ ThemeDefinition,+ getPreviewColors,+ useThemeColors,+ validateTheme+} from "@notesnook/theme";+import type {+ CompiledThemeDefinition,+ ThemeMetadata,+ ThemesRouter+} from "@notesnook/themes-server";+import DocumentPicker from "react-native-document-picker";+import Icon from "react-native-vector-icons/MaterialCommunityIcons";+import { MasonryFlashList } from "@shopify/flash-list";+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";+import { createTRPCProxyClient, httpBatchLink } from "@trpc/client";+import { createTRPCReact } from "@trpc/react-query";+import React, { useState } from "react";+import {+ ActivityIndicator,+ Linking,+ TouchableOpacity,+ View+} from "react-native";+import { db } from "../../common/database";+import SheetProvider from "../../components/sheet-provider";+import { Button } from "../../components/ui/button";+import Input from "../../components/ui/input";+import Heading from "../../components/ui/typography/heading";+import Paragraph from "../../components/ui/typography/paragraph";+import { ToastEvent, presentSheet } from "../../services/event-manager";+import { useThemeStore } from "../../stores/use-theme-store";+import { SIZE } from "../../utils/size";+import { getElevationStyle } from "../../utils/elevation";+import { MenuItemsList } from "../../utils/constants";+import { IconButton } from "../../components/ui/icon-button";+import { PressableButton } from "../../components/ui/pressable";++const THEME_SERVER_URL = "https://themes.notesnook.com";+//@ts-ignore+export const themeTrpcClient = createTRPCProxyClient<ThemesRouter>({+ links: [+ httpBatchLink({+ url: THEME_SERVER_URL+ })+ ]+});++function ThemeSelector() {+ const [darkTheme, lightTheme] = useThemeStore((state) => [+ state.darkTheme,+ state.lightTheme+ ]);++ const { colors } = useThemeColors();+ const themeColors = colors;+ const [searchQuery, setSearchQuery] = useState<string>();+ const [colorScheme, setColorScheme] = useState<string>();+ const themes = trpc.themes.useInfiniteQuery(+ {+ limit: 10,+ compatibilityVersion: THEME_COMPATIBILITY_VERSION,+ filters: [+ ...(searchQuery && searchQuery !== ""+ ? [+ {+ type: "term" as const,+ value: searchQuery+ }+ ]+ : []),+ ...(colorScheme && colorScheme !== ""+ ? [+ {+ type: "colorScheme" as const,+ value: colorScheme+ }+ ]+ : [])+ ]+ },+ {+ getNextPageParam: (lastPage) => lastPage.nextCursor+ }+ );++ const select = (item: Partial<ThemeMetadata>) => {+ presentSheet({+ context: "theme-details",+ component: (ref, close) => <ThemeSetter close={close} theme={item} />+ });+ };++ const renderItem = ({+ item,+ index+ }: {+ item: ThemeMetadata;+ index: number;+ }) => {+ const colors =+ item.previewColors ||+ getPreviewColors(item as unknown as ThemeDefinition);++ return (+ <>+ <TouchableOpacity+ activeOpacity={0.9}+ style={{+ borderRadius: 10,+ padding: 6,+ marginBottom: 10,+ flexShrink: 1,+ marginHorizontal: 10+ }}+ onPress={() => select(item)}+ >+ <View+ style={{+ backgroundColor: colors?.background,+ height: 200,+ width: "100%",+ borderRadius: 10,+ marginBottom: 10,+ overflow: "hidden",+ flexDirection: "row",+ justifyContent: "space-between",+ ...getElevationStyle(3)+ }}+ >+ <View+ style={{+ height: "100%",+ width: "49.5%",+ backgroundColor: colors.navigationMenu.background,+ padding: 5,+ paddingVertical: 3,+ borderRadius: 5+ }}+ >+ {MenuItemsList.map((item, index) => (+ <View+ key={item.name}+ style={{+ height: 12,+ width: "100%",+ backgroundColor:+ index === 0+ ? colors.navigationMenu.accent + 40+ : colors.navigationMenu.background,+ borderRadius: 2,+ paddingHorizontal: 3,+ flexDirection: "row",+ alignItems: "center",+ marginBottom: 4+ }}+ >+ <Icon+ size={8}+ name={item.icon}+ color={+ index === 0+ ? colors.navigationMenu.accent+ : colors.navigationMenu.icon+ }+ />++ <View+ style={{+ height: 3,+ width: "40%",+ backgroundColor:+ index === 0+ ? colors.navigationMenu.accent+ : colors.paragraph,+ borderRadius: 2,+ marginLeft: 3+ }}+ ></View>+ </View>+ ))}+ </View>++ <View+ style={{+ height: "100%",+ width: "49.5%",+ backgroundColor: colors.list.background,+ borderRadius: 5,+ paddingHorizontal: 2,+ paddingRight: 6+ }}+ >+ <View+ style={{+ height: 12,+ width: "100%",+ flexDirection: "row",+ justifyContent: "space-between",+ alignItems: "center",+ marginTop: 3+ }}+ >+ <View+ style={{+ flexDirection: "row",+ alignItems: "center"+ }}+ >+ <Icon size={8} color={colors.list.heading} name="menu" />+ <Heading+ style={{+ marginLeft: 3+ }}+ color={colors.list.heading}+ size={7}+ >+ Notes+ </Heading>+ </View>++ <Icon name="magnify" color={colors.list.heading} size={7} />+ </View>+ </View>++ <View+ style={{+ width: "100%",+ alignItems: "flex-end",+ justifyContent: "flex-end",+ marginTop: 6,+ position: "absolute",+ bottom: 6,+ right: 6,+ flexDirection: "row",+ gap: 10+ }}+ >+ {darkTheme.id === item.id || lightTheme.id === item.id ? (+ <IconButton+ name="check"+ type="gray"+ customStyle={{+ borderRadius: 100,+ paddingHorizontal: 6,+ alignSelf: "flex-end",+ width: 25,+ height: 25+ }}+ color={colors.accent}+ size={16}+ />+ ) : null}++ <Button+ title={item.colorScheme === "dark" ? "Dark" : "Light"}+ type="grayAccent"+ height={25}+ buttonType={{+ color: item.colorScheme === "dark" ? "black" : "#f0f0f060",+ text: colors.accent+ }}+ style={{+ borderRadius: 100,+ paddingHorizontal: 12,+ alignSelf: "flex-end"+ }}+ fontSize={SIZE.xxs}+ />+ </View>+ </View>++ <Heading size={SIZE.sm} color={themeColors.primary.heading}>+ {item.name}+ </Heading>+ {/* <Paragraph color={themeColors.primary?.paragraph}>+ {item.description}+ </Paragraph> */}+ <Paragraph size={SIZE.xs} color={themeColors.secondary?.paragraph}>+ By {item.authors?.[0].name}+ </Paragraph>+ </TouchableOpacity>+ </>+ );+ };+ let resetTimer: NodeJS.Timeout;+ const onSearch = (text: string) => {+ clearTimeout(resetTimer as NodeJS.Timeout);+ resetTimer = setTimeout(() => {+ setSearchQuery(text);+ }, 400);+ };++ function getThemes(): ThemeMetadata[] {+ const pages = themes.data?.pages;++ return (+ pages+ ?.map((page) => {+ return page.themes;+ })+ .flat()+ .filter(+ (theme) =>+ (!searchQuery || searchQuery === "") &&+ darkTheme.id !== theme.id &&+ lightTheme.id !== theme.id+ ) || []+ );+ }++ return (+ <>+ <SheetProvider context="theme-details" />+ <View+ style={{+ flex: 1+ }}+ >+ <View+ style={{+ paddingHorizontal: 12,+ marginBottom: 12,+ paddingTop: 12+ }}+ >+ <Input onChangeText={onSearch} placeholder="Search themes" />++ <View+ style={{+ flexDirection: "row",+ justifyContent: "space-between"+ }}+ >+ <View+ style={{+ flexDirection: "row",+ columnGap: 10+ }}+ >+ <Button+ height={30}+ style={{ borderRadius: 100, minWidth: 60 }}+ type={colorScheme === "" || !colorScheme ? "accent" : "grayBg"}+ title="All"+ fontSize={SIZE.xs}+ onPress={() => {+ setColorScheme("");+ }}+ />+ <Button+ style={{ borderRadius: 100, minWidth: 60 }}+ height={30}+ type={colorScheme === "dark" ? "accent" : "grayBg"}+ title="Dark"+ fontSize={SIZE.xs}+ onPress={() => {+ setColorScheme("dark");+ }}+ />+ <Button+ style={{ borderRadius: 100, minWidth: 60 }}+ height={30}+ fontSize={SIZE.xs}+ type={colorScheme === "light" ? "accent" : "grayBg"}+ title="Light"+ onPress={() => {+ setColorScheme("light");+ }}+ />+ </View>++ <Button+ title="Load from file"+ style={{ borderRadius: 100, minWidth: 60 }}+ height={30}+ type={"grayAccent"}+ icon="folder"+ fontSize={SIZE.xs}+ onPress={() => {+ DocumentPicker.pickSingle().then((r) => {+ fetch(r.uri).then(async (response) => {+ const json = await response.json();+ console.log(json);+ const result = validateTheme(json);+ if (result.error) {+ ToastEvent.error(new Error(result.error));+ return;+ }+ select(json);+ });+ });+ }}+ />+ </View>+ </View>++ <MasonryFlashList+ numColumns={2}+ data={[+ ...(colorScheme === "dark" || (searchQuery && searchQuery !== "")+ ? []+ : [lightTheme as unknown as ThemeMetadata]),+ ...(colorScheme === "light" || (searchQuery && searchQuery !== "")+ ? []+ : [darkTheme as unknown as ThemeMetadata]),+ ...getThemes()+ ]}+ ListEmptyComponent={+ <View+ style={{+ height: 100,+ width: "100%",+ justifyContent: "center",+ alignItems: "center"+ }}+ >+ {themes.isLoading ? (+ <ActivityIndicator color={colors.primary.accent} />+ ) : searchQuery ? (+ <Paragraph color={colors.secondary.paragraph}>+ No results found for {searchQuery}+ </Paragraph>+ ) : (+ <Paragraph>No themes found.</Paragraph>+ )}+ </View>+ }+ estimatedItemSize={200}+ renderItem={renderItem}+ onEndReachedThreshold={0.1}+ onEndReached={() => {+ themes.fetchNextPage();+ }}+ />+ </View>+ </>+ );+}++const trpc = createTRPCReact<ThemesRouter>();+export default function ThemeSelectorWithQueryClient() {+ const [queryClient] = useState(() => new QueryClient());+ const [trpcClient] = useState(() =>+ //@ts-ignore+ trpc.createClient({+ links: [+ //@ts-ignore+ httpBatchLink({+ url: THEME_SERVER_URL+ })+ ]+ })+ );++ return (+ <trpc.Provider client={trpcClient} queryClient={queryClient}>+ <QueryClientProvider client={queryClient}>+ <ThemeSelector />+ </QueryClientProvider>+ </trpc.Provider>+ );+}++const ThemeSetter = ({+ theme,+ close+}: {+ theme: Partial<CompiledThemeDefinition>;+ close?: (ctx?: string) => void;+}) => {+ const [darkTheme, lightTheme] = useThemeStore((state) => [+ state.darkTheme,+ state.lightTheme+ ]);+ const themeColors = useThemeColors();++ const colors =+ theme?.previewColors ||+ getPreviewColors(theme as unknown as ThemeDefinition);++ const applyTheme = async () => {+ if (!theme.id) return;+ try {+ const user = await db.user?.getUser();+ const fullTheme = theme.scopes+ ? (theme as ThemeDefinition)+ : await themeTrpcClient.installTheme.query({+ compatibilityVersion: THEME_COMPATIBILITY_VERSION,+ id: theme.id,+ userId: user?.id+ });++ if (!fullTheme) return;+ theme.colorScheme === "dark"+ ? useThemeStore.getState().setDarkTheme(fullTheme)+ : useThemeStore.getState().setLightTheme(fullTheme);+ ToastEvent.show({+ heading: `${theme.name} applied successfully`,+ type: "success",+ context: "global"+ });+ } catch (e) {+ console.log("Error", e);+ }++ setTimeout(() => {+ close?.();+ });+ };++ return (+ <>+ <View+ style={{+ paddingHorizontal: 12+ }}+ >+ <View+ style={{+ borderRadius: 10,+ marginBottom: 12,+ padding: 12+ }}+ >+ <View+ style={{+ width: "100%",+ justifyContent: "center",+ alignItems: "center",+ backgroundColor: colors?.accent + "20",+ padding: 12,+ borderRadius: 15,+ marginBottom: 12+ }}+ >+ <View+ style={{+ backgroundColor: colors?.background,+ borderWidth: 0.5,+ borderColor: colors?.border,+ height: 200,+ width: "100%",+ borderRadius: 10,+ marginBottom: 10,+ overflow: "hidden",+ flexDirection: "row",+ justifyContent: "space-between",+ ...getElevationStyle(3),+ maxWidth: 200+ }}+ >+ <View+ style={{+ height: "100%",+ width: "49.5%",+ backgroundColor: colors?.navigationMenu.background,+ padding: 5,+ paddingVertical: 3,+ borderRadius: 5+ }}+ >+ {MenuItemsList.map((item, index) => (+ <View+ key={item.name}+ style={{+ height: 12,+ width: "100%",+ backgroundColor:+ index === 0+ ? //@ts-ignore+ colors?.navigationMenu?.accent + 40+ : colors?.navigationMenu.background,+ borderRadius: 2,+ paddingHorizontal: 3,+ flexDirection: "row",+ alignItems: "center",+ marginBottom: 4+ }}+ >+ <Icon+ size={8}+ name={item.icon}+ color={+ index === 0+ ? colors?.navigationMenu.accent+ : colors?.navigationMenu.icon+ }+ />++ <View+ style={{+ height: 3,+ width: "40%",+ backgroundColor:+ index === 0+ ? colors?.navigationMenu.accent+ : colors?.paragraph,+ borderRadius: 2,+ marginLeft: 3+ }}+ ></View>+ </View>+ ))}+ </View>++ <View+ style={{+ height: "100%",+ width: "49.5%",+ backgroundColor: colors?.list.background,+ borderRadius: 5,+ paddingHorizontal: 2,+ paddingRight: 6+ }}+ >+ <View+ style={{+ height: 12,+ width: "100%",+ flexDirection: "row",+ justifyContent: "space-between",+ alignItems: "center",+ marginTop: 3+ }}+ >+ <View+ style={{+ flexDirection: "row",+ alignItems: "center"+ }}+ >+ <Icon size={8} color={colors?.list.heading} name="menu" />+ <Heading+ style={{+ marginLeft: 3+ }}+ color={colors?.list.heading}+ size={7}+ >+ Notes+ </Heading>+ </View>++ <Icon name="magnify" color={colors?.list.heading} size={7} />+ </View>+ </View>+ </View>+ </View>++ <Heading size={SIZE.md} color={themeColors.colors.primary.heading}>+ {theme.name}+ </Heading>+ <Paragraph color={themeColors.colors.primary.paragraph}>+ {theme.description}+ </Paragraph>++ <Paragraph+ size={SIZE.xs}+ color={themeColors.colors.secondary.paragraph}+ >+ By {theme.authors?.[0]?.name}+ </Paragraph>+ <View+ style={{+ marginTop: 5,+ flexDirection: "column",+ rowGap: 3+ }}+ >+ <Paragraph+ size={SIZE.xs}+ color={themeColors.colors.secondary.paragraph}+ >+ Version {theme.version}+ </Paragraph>++ <Paragraph+ size={SIZE.xs}+ color={themeColors.colors.secondary.paragraph}+ >+ {theme.license}+ </Paragraph>++ {theme.homepage ? (+ <View+ style={{+ flexDirection: "row"+ }}+ >+ <Paragraph+ size={SIZE.xs}+ color={themeColors.colors.secondary.accent}+ onPress={() => {+ Linking.openURL(theme.homepage as string);+ }}+ >+ Visit homepage+ </Paragraph>+ </View>+ ) : null}+ </View>+ </View>++ {darkTheme.id === theme.id || lightTheme.id === theme.id ? (+ <PressableButton+ onPress={applyTheme}+ type="grayAccent"+ customStyle={{+ paddingVertical: 12+ }}+ >+ <Heading color={colors.accent} size={SIZE.md}>+ {darkTheme.id === theme.id+ ? "Applied as dark theme"+ : "Applied as light theme"}+ </Heading>+ <Paragraph size={SIZE.xs}>(Tap to apply again)</Paragraph>+ </PressableButton>+ ) : (+ <Button+ style={{+ width: "100%",+ marginBottom: 10+ }}+ onPress={applyTheme}+ title={+ theme.colorScheme === "dark"+ ? "Set as dark theme"+ : "Set as light theme"+ }+ type="grayAccent"+ />+ )}+ </View>+ </>+ );+};diff --git a/apps/mobile/app/screens/settings/title-format.tsx b/apps/mobile/app/screens/settings/title-format.tsxindex 8b64c3ec6..4f08a58f7 100644--- a/apps/mobile/app/screens/settings/title-format.tsx+++ b/apps/mobile/app/screens/settings/title-format.tsx@@ -22,13 +22,13 @@ import Input from "../../components/ui/input";import React from "react";import { TextInput } from "react-native";import Paragraph from "../../components/ui/typography/paragraph";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";export const TitleFormat = () => {const [titleFormat] = useState(db.settings?.getTitleFormat());const inputRef = useRef<TextInput>();- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();return (<>@@ -48,7 +48,11 @@ export const TitleFormat = () => {defaultValue={titleFormat}/>- <Paragraph style={{ marginTop: 2 }} color={colors.icon} size={SIZE.xs}>+ <Paragraph+ style={{ marginTop: 2 }}+ color={colors.secondary.paragraph}+ size={SIZE.xs}+ >Use the following key to format the title:{"\n"}{"\n"}$date$: Current date.{"\n"}diff --git a/apps/mobile/app/screens/settings/user-section.js b/apps/mobile/app/screens/settings/user-section.jsindex 8a0ecab7e..eaf1292f9 100644--- a/apps/mobile/app/screens/settings/user-section.js+++ b/apps/mobile/app/screens/settings/user-section.js@@ -24,7 +24,7 @@ import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { TimeSince } from "../../components/ui/time-since";import Heading from "../../components/ui/typography/heading";import Paragraph from "../../components/ui/typography/paragraph";-import { useThemeStore } from "../../stores/use-theme-store";+import { useThemeColors } from "@notesnook/theme";import { useUserStore } from "../../stores/use-user-store";import { SUBSCRIPTION_STATUS_STRINGS } from "../../utils/constants";import { SIZE } from "../../utils/size";@@ -38,7 +38,7 @@ export const getTimeLeft = (t2) => {};const SettingsUserSection = ({ item }) => {- const colors = useThemeStore((state) => state.colors);+ const { colors } = useThemeColors();const user = useUserStore((state) => state.user);const lastSynced = useUserStore((state) => state.lastSynced);@@ -57,7 +57,7 @@ const SettingsUserSection = ({ item }) => {alignSelf: "center",width: "100%",paddingVertical: 12,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,borderRadius: 5}}>@@ -87,7 +87,7 @@ const SettingsUserSection = ({ item }) => {><Viewstyle={{- backgroundColor: colors.shade,+ backgroundColor: colors.primary.shade,borderRadius: 100,width: 50,height: 50,@@ -97,7 +97,7 @@ const SettingsUserSection = ({ item }) => {><Iconsize={SIZE.xl}- color={colors.accent}+ color={colors.primary.accent}name="account-outline"/></View>@@ -109,19 +109,19 @@ const SettingsUserSection = ({ item }) => {flexGrow: 1}}>- <Heading color={colors.accent} size={SIZE.xs}>+ <Heading color={colors.primary.accent} size={SIZE.xs}>{SUBSCRIPTION_STATUS_STRINGS[user.subscription?.type]?.toUpperCase() || "Basic"}</Heading>- <Paragraph color={colors.heading} size={SIZE.sm}>+ <Paragraph color={colors.primary.heading} size={SIZE.sm}>{user?.email}</Paragraph>- <Paragraph color={colors.icon} size={SIZE.xs}>+ <Paragraph color={colors.secondary.paragraph} size={SIZE.xs}>Last synced{" "}<TimeSince- style={{ fontSize: SIZE.xs, color: colors.icon }}+ style={{ fontSize: SIZE.xs, color: colors.secondary.paragraph }}time={lastSynced}/></Paragraph>diff --git a/apps/mobile/app/services/settings.ts b/apps/mobile/app/services/settings.tsindex 07800bdfd..5d3a7fded 100644--- a/apps/mobile/app/services/settings.ts+++ b/apps/mobile/app/services/settings.ts@@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { Platform } from "react-native";-import Orientation from "react-native-orientation";import { enabled } from "react-native-privacy-snapshot";import { MMKV } from "../common/database/mmkv";import {@@ -26,19 +25,14 @@ import {defaultSettings,useSettingStore} from "../stores/use-setting-store";-import { getColorScheme } from "../utils/color-scheme/utils";import { NotesnookModule } from "../utils/notesnook-module";import { scale, updateSize } from "../utils/size";-import { DDS } from "./device-detection";-import { setAutobackOffMessage } from "./message";-function reset() {const settings = get();if (settings.reminder !== "off" && settings.reminder !== "useroff") {settings.encryptedBackup = false;settings.reminder = "useroff";set(settings);- setTimeout(() => setAutobackOffMessage(), 10000);}}@@ -69,7 +63,6 @@ function init() {setTimeout(() => setPrivacyScreen(settings), 1);updateSize();useSettingStore.getState().setSettings({ ...settings });- getColorScheme();}function setPrivacyScreen(settings: SettingStore["settings"]) {@@ -112,10 +105,25 @@ function toggle(id: keyof SettingStore["settings"]) {MMKV.setString("appSettings", JSON.stringify(settings));}-function get() {+function get(): SettingStore["settings"] {return { ...useSettingStore.getState().settings };}+function getProperty<K extends keyof SettingStore["settings"]>(+ property: K+): SettingStore["settings"][K] {+ return useSettingStore.getState().settings[property];+}++function setProperty<K extends keyof SettingStore["settings"]>(+ property: K,+ value: SettingStore["settings"][K]+): void {+ SettingsService.set({+ [property]: value+ });+}+function onFirstLaunch() {const introCompleted = get().introCompleted;if (!introCompleted) {@@ -145,7 +153,7 @@ function checkOrientation() {//});}-const SettingsService = {+export const SettingsService = {init,set,get,@@ -153,6 +161,8 @@ const SettingsService = {onFirstLaunch,checkOrientation,reset,+ getProperty,+ setProperty,resetSettings};diff --git a/apps/mobile/app/stores/use-navigation-store.ts b/apps/mobile/app/stores/use-navigation-store.tsindex b87aaa4b0..adb121415 100644--- a/apps/mobile/app/stores/use-navigation-store.ts+++ b/apps/mobile/app/stores/use-navigation-store.ts@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import create, { State } from "zustand";-import { COLORS_NOTE } from "../utils/color-scheme";+import { ColorValues } from "../utils/colors";import {ColorType,MonographType,@@ -115,8 +115,8 @@ const useNavigationStore = create<NavigationStore>((set, get) => ({canGoBack: false,update: (currentScreen, canGoBack, headerRightButtons) => {const color =- COLORS_NOTE[- currentScreen.color?.toLowerCase() as keyof typeof COLORS_NOTE+ ColorValues[+ currentScreen.color?.toLowerCase() as keyof typeof ColorValues];if (JSON.stringify(currentScreen) === JSON.stringify(get().currentScreenRaw)diff --git a/apps/mobile/app/stores/use-setting-store.ts b/apps/mobile/app/stores/use-setting-store.tsindex ef48a9636..440fe8a3d 100644--- a/apps/mobile/app/stores/use-setting-store.ts+++ b/apps/mobile/app/stores/use-setting-store.ts@@ -24,7 +24,7 @@ import { initialWindowMetrics } from "react-native-safe-area-context";import { FileType } from "react-native-scoped-storage";import create, { State } from "zustand";import { Reminder } from "../services/notifications";-import { ACCENT } from "../utils/color-scheme";+import { ThemeDark, ThemeLight, ThemeDefinition } from "@notesnook/theme";export type Settings = {showToolbarOnTop?: boolean;@@ -54,10 +54,6 @@ export type Settings = {lastBackupDate?: number | undefined;userEmailConfirmed?: boolean;recoveryKeySaved?: boolean;- theme: {- accent: string;- dark: boolean;- };backupDirectoryAndroid?: FileType | null;showBackupCompleteSheet: boolean;lastRecoveryEmailTime?: number;@@ -75,6 +71,9 @@ export type Settings = {notificationSound?: Sound & { platform: PlatformOSType };defaultFontSize: string;defaultFontFamily: string;+ colorScheme: "dark" | "light";+ lighTheme: ThemeDefinition;+ darkTheme: ThemeDefinition;};type DimensionsType = {@@ -140,10 +139,6 @@ export const defaultSettings: SettingStore["settings"] = {lastBackupDate: undefined,userEmailConfirmed: false,recoveryKeySaved: false,- theme: {- accent: ACCENT?.color,- dark: false- },showBackupCompleteSheet: true,sessionExpired: false,version: null,@@ -154,7 +149,10 @@ export const defaultSettings: SettingStore["settings"] = {reminderNotificationMode: "urgent",notificationSound: undefined,defaultFontFamily: "sans-serif",- defaultFontSize: "16"+ defaultFontSize: "16",+ colorScheme: "light",+ lighTheme: ThemeLight,+ darkTheme: ThemeDark};export const useSettingStore = create<SettingStore>((set) => ({diff --git a/apps/mobile/app/stores/use-theme-store.ts b/apps/mobile/app/stores/use-theme-store.tsindex 29f0f3a05..b15adaf1f 100644--- a/apps/mobile/app/stores/use-theme-store.ts+++ b/apps/mobile/app/stores/use-theme-store.ts@@ -17,21 +17,48 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { ThemeDefinition } from "@notesnook/theme";import { Appearance } from "react-native";import create, { State } from "zustand";-import { COLOR_SCHEME_DARK, COLOR_SCHEME_LIGHT } from "../utils/color-scheme";+import SettingsService from "../services/settings";-const darkScheme = Appearance.getColorScheme() === "dark";export interface ThemeStore extends State {- colors: typeof COLOR_SCHEME_LIGHT;- setColors: (colors: typeof COLOR_SCHEME_LIGHT) => void;+ lightTheme: ThemeDefinition;+ darkTheme: ThemeDefinition;+ colorScheme: "dark" | "light";+ setDarkTheme: (theme: ThemeDefinition) => void;+ setLightTheme: (theme: ThemeDefinition) => void;+ setColorScheme: (colorScheme?: "dark" | "light") => void;}-export const useThemeStore = create<ThemeStore>((set) => ({- colors: darkScheme ? COLOR_SCHEME_DARK : COLOR_SCHEME_LIGHT,- setColors: (colors) => {- set({ colors });+export const useThemeStore = create<ThemeStore>((set, get) => ({+ lightTheme: SettingsService.get().lighTheme,+ darkTheme: SettingsService.get().darkTheme,+ colorScheme: SettingsService.get().useSystemTheme+ ? (Appearance.getColorScheme() as "dark" | "light")+ : SettingsService.get().colorScheme,+ setDarkTheme: (darkTheme) => {+ set({ darkTheme });+ SettingsService.setProperty("darkTheme", darkTheme);+ },+ setLightTheme: (lightTheme) => {+ set({ lightTheme });+ SettingsService.setProperty("lighTheme", lightTheme);+ },+ setColorScheme: (colorScheme) => {+ const nextColorScheme =+ colorScheme === undefined+ ? get().colorScheme === "dark"+ ? "light"+ : "dark"+ : colorScheme;+ set({+ colorScheme: nextColorScheme+ });+ if (!SettingsService.getProperty("useSystemTheme")) {+ SettingsService.set({+ colorScheme: nextColorScheme+ });+ }}}));--export type ColorKey = keyof ThemeStore["colors"];diff --git a/apps/mobile/app/utils/color-scheme/index.js b/apps/mobile/app/utils/color-scheme/index.jsdeleted file mode 100644index 85bdd26e4..000000000--- a/apps/mobile/app/utils/color-scheme/index.js+++ /dev/null@@ -1,165 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import { Platform, StatusBar } from "react-native";-import { eSendEvent } from "../../services/event-manager";-import { useThemeStore } from "../../stores/use-theme-store";-import { eThemeUpdated } from "../events";-import { NotesnookModule } from "../notesnook-module";--export const ACCENT = {- color: "#008837",- shade: "#00883712"-};--export const COLORS_NOTE = {- red: "#f44336",- orange: "#FF9800",- yellow: "#F9D71C",- green: "#4CAF50",- blue: "#2196F3",- purple: "#673AB7",- gray: "#9E9E9E"-};--const fixedColors = {- accent: ACCENT.color,- shade: ACCENT.shade,- fg: ACCENT.color,- normal: "black",- icon: "gray",- transGray: "#00000010",- errorBg: "#f4433620",- errorText: "#ff6961",- successBg: "#DFF2BF",- successText: "#4F8A10",- warningBg: "#FF990020",- warningText: "#FF9900",- red: "#f44336",- orange: "#FF9800",- yellow: "#FFD600",- green: "#4CAF50",- blue: "#2196F3",- purple: "#673AB7",- gray: "#9E9E9E",- discord: "#5865F2"-};-export var COLOR_SCHEME = {- ...fixedColors,- night: false,- bg: "#ffffff",- navbg: "#f7f7f7",- nav: "#f7f7f7",- input: "transparent",- heading: "#212121",- pri: "#505050",- sec: "#ffffff",- light: "#ffffff",- transGray: "#00000010",- border: "#E8E8E8",- placeholder: "#a9a9a9"-};--export const COLOR_SCHEME_LIGHT = {- ...fixedColors,- night: false,- bg: "#ffffff",- navbg: "#f7f7f7",- nav: "#f7f7f7",- input: "transparent",- heading: "#212121",- pri: "#505050",- sec: "#ffffff",- light: "#ffffff",- transGray: "#00000010",- border: "#E8E8E8",- placeholder: "#b6b6b6"-};-export const COLOR_SCHEME_PITCH_BLACK = {- ...fixedColors,- night: true,- bg: "#000000",- navbg: "#2b2b2b",- input: "#2d2d2d",- nav: "#1a1a1a",- heading: "#E8E8E8",- pri: "#C0C0C0",- sec: "black",- light: "#ffffff",- transGray: "#ffffff10",- border: "#383838",- placeholder: "#606060"-};--export const COLOR_SCHEME_DARK = {- ...fixedColors,- night: true,- bg: "#1f1f1f",- navbg: "#2b2b2b",- input: "#2d2d2d",- nav: "#2b2b2b",- heading: "#E8E8E8",- pri: "#C0C0C0",- sec: "black",- light: "#ffffff",- transGray: "#ffffff10",- border: "#383838",- placeholder: "#404040"-};--export function getCurrentColors() {- return COLOR_SCHEME;-}--export function setColorScheme(colors = COLOR_SCHEME, accent = ACCENT) {- COLOR_SCHEME = { ...colors, accent: accent.color, shade: accent.shade };-- useThemeStore.getState().setColors({ ...COLOR_SCHEME });-- StatusBar.setBarStyle(- COLOR_SCHEME.night ? "light-content" : "dark-content",- false- );- if (Platform.OS === "android") {- NotesnookModule.setBackgroundColor(COLOR_SCHEME.bg);- StatusBar.setBackgroundColor("transparent", false);- StatusBar.setTranslucent(true, false);- }- eSendEvent(eThemeUpdated);-- return COLOR_SCHEME;-}--export function setAccentColor(color) {- ACCENT.color = color;- ACCENT.shade = color + "12";-- return ACCENT;-}--export function updateStatusBarColor() {- StatusBar.setBarStyle(- COLOR_SCHEME.night ? "light-content" : "dark-content",- true- );- if (Platform.OS === "android") {- StatusBar.setBackgroundColor("transparent", true);- StatusBar.setTranslucent(true, true);- }-}diff --git a/apps/mobile/app/utils/color-scheme/utils.js b/apps/mobile/app/utils/colors.jssimilarity index 62%rename from apps/mobile/app/utils/color-scheme/utils.jsrename to apps/mobile/app/utils/colors.jsindex 03c1088a3..39bf254f5 100644--- a/apps/mobile/app/utils/color-scheme/utils.js+++ b/apps/mobile/app/utils/colors.js@@ -16,17 +16,31 @@ GNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { Platform, StatusBar } from "react-native";+import { useThemeStore } from "../stores/use-theme-store";-import { Appearance } from "react-native";-import {- COLOR_SCHEME,- COLOR_SCHEME_DARK,- COLOR_SCHEME_LIGHT,- COLOR_SCHEME_PITCH_BLACK,- setAccentColor,- setColorScheme-} from ".";-import SettingsService from "../../services/settings";+export const ColorValues = {+ red: "#f44336",+ orange: "#FF9800",+ yellow: "#F9D71C",+ green: "#4CAF50",+ blue: "#2196F3",+ purple: "#673AB7",+ gray: "#9E9E9E"+};++export function updateStatusBarColor() {+ StatusBar.setBarStyle(+ useThemeStore.getState().colorScheme === "dark"+ ? "light-content"+ : "dark-content",+ true+ );+ if (Platform.OS === "android") {+ StatusBar.setBackgroundColor("transparent", true);+ StatusBar.setTranslucent(true, true);+ }+}const isValidHex = (hex) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);const getChunksFromString = (st, chunkSize) =>@@ -85,49 +99,3 @@ export const RGB_Linear_Shade = (p, rgba) => {(d ? "," + d : ")"));};--export function getColorScheme(overrideSystemTheme) {- let { pitchBlack, theme, useSystemTheme } = SettingsService.get();- const darkTheme = pitchBlack ? COLOR_SCHEME_PITCH_BLACK : COLOR_SCHEME_DARK;-- if (useSystemTheme && !overrideSystemTheme) {- setAccentColor(theme.accent);- Appearance.getColorScheme() === "dark"- ? setColorScheme(darkTheme)- : setColorScheme(COLOR_SCHEME_LIGHT);- SettingsService.set({- theme: {- ...theme,- dark: Appearance.getColorScheme() === "dark"- }- });- return COLOR_SCHEME;- }-- setAccentColor(theme.accent);- setColorScheme(theme.dark ? darkTheme : COLOR_SCHEME_LIGHT);- return COLOR_SCHEME;-}--export const switchAccentColor = async (color) => {- setAccentColor(color);- let settings = SettingsService.get();- SettingsService.set({- theme: {- ...settings.theme,- accent: color- }- });- getColorScheme();-};--export const toggleDarkMode = async () => {- let settings = SettingsService.get();- SettingsService.set({- theme: {- ...settings.theme,- dark: !settings.theme?.dark- }- });- getColorScheme(true);-};diff --git a/apps/mobile/native/package.json b/apps/mobile/native/package.jsonindex 108f597a3..8cc2931a6 100644--- a/apps/mobile/native/package.json+++ b/apps/mobile/native/package.json@@ -107,7 +107,6 @@"react-test-renderer": "18.2.0","terser-webpack-plugin": "^5.3.5","ts-jest": "^28.0.7",- "typescript": "4.8.4","webpack": "^5.74.0"}}diff --git a/apps/mobile/native/webpack.config.cjs b/apps/mobile/native/webpack.config.cjsindex 1efd1f7a0..60be86979 100644--- a/apps/mobile/native/webpack.config.cjs+++ b/apps/mobile/native/webpack.config.cjs@@ -177,6 +177,11 @@ module.exports = (env) => {/node_modules(.*[/\\])+react-native-fingerprint-scanner/,/node_modules(.*[/\\])+@notesnook[/\\]logger/,/node_modules(.*[/\\])+@ammarahmed[/\\]notifee-react-native/,+ /node_modules(.*[/\\])+@trpc[/\\]client/,+ /node_modules(.*[/\\])+@trpc[/\\]server/,+ /node_modules(.*[/\\])+@tanstack[/\\]query-core/,+ /node_modules(.*[/\\])+@tanstack[/\\]react-query/,+ /node_modules(.*[/\\])+@trpc[/\\]react-query/,],use: {loader: "babel-loader",diff --git a/apps/mobile/package-lock.json b/apps/mobile/package-lock.jsonindex e356c7662..388264501 100644--- a/apps/mobile/package-lock.json+++ b/apps/mobile/package-lock.json@@ -19,6 +19,11 @@"@notesnook/editor": "file:../../packages/editor","@notesnook/editor-mobile": "file:../../packages/editor-mobile","@notesnook/logger": "file:../../packages/logger",+ "@notesnook/themes-server": "file:../../servers/themes",+ "@tanstack/react-query": "^4.29.19",+ "@trpc/client": "10.31.0",+ "@trpc/react-query": "10.31.0",+ "@trpc/server": "^10.31.0","react": "18.2.0","react-native": "0.72.0"},@@ -39,8 +44,7 @@"devDependencies": {"@notesnook/core": "file:../core","@types/react": "17.0.2",- "react": "17.0.2",- "typescript": "^4.8.2"+ "react": "17.0.2"},"peerDependencies": {"react": ">=17.0.2",@@ -102,12 +106,13 @@"hasInstallScript": true,"license": "GPL-3.0-or-later","dependencies": {- "@emotion/react": "^11.10.0",+ "@emotion/react": "11.11.1","@notesnook/core": "file:../core","@notesnook/theme": "file:../theme",+ "@notesnook/ui": "file:../ui","@social-embed/lib": "^0.0.2-next.1",- "@theme-ui/components": "^0.14.7",- "@theme-ui/core": "^0.14.7",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0","@tiptap/core": "2.0.3","@tiptap/extension-character-count": "2.0.3","@tiptap/extension-color": "2.0.3",@@ -136,7 +141,7 @@"prism-themes": "^1.9.0","prosemirror-codemark": "^0.4.1","re-resizable": "^6.9.9",- "react-colorful": "^5.5.1",+ "react-colorful": "^5.6.1","react-modal": "^3.15.1","redent": "^4.0.0","refractor": "^4.8.0",@@ -146,8 +151,8 @@"zustand": "^4.3.8"},"devDependencies": {- "@mdi/js": "^6.9.96",- "@mdi/react": "^1.6.0",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1","@types/katex": "^0.14.0","@types/prismjs": "^1.26.0","@types/react": "17.0.2",@@ -165,8 +170,11 @@"web-vitals": "^2.1.4"},"peerDependencies": {- "@mdi/js": ">=6.9.96",- "@mdi/react": ">=1.6.0",+ "@emotion/react": "11.11.1",+ "@mdi/js": ">=7.2.96",+ "@mdi/react": ">=1.6.1",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0","react": ">=17.0.0","react-dom": ">=17.0.0"}@@ -176,8 +184,8 @@"version": "1.0.0","hasInstallScript": true,"dependencies": {- "@emotion/react": "^11.10.0",- "@mdi/js": "^6.9.96",+ "@emotion/react": "11.11.1",+ "@mdi/js": "^7.2.96","@mdi/react": "^1.6.0","@notesnook/editor": "file:../editor","@notesnook/theme": "file:../theme",@@ -207,6 +215,26 @@"license": "GPL-3.0-or-later","devDependencies": {}},+ "../../servers/themes": {+ "name": "@notesnook/themes-server",+ "version": "1.0.0",+ "license": "ISC",+ "dependencies": {+ "@orama/orama": "^1.0.8",+ "@trpc/server": "10.31.0",+ "async-mutex": "^0.4.0",+ "cors": "^2.8.5",+ "util": "^0.12.5",+ "zod": "^3.21.4"+ },+ "devDependencies": {+ "@notesnook/theme": "file:../../packages/theme",+ "@types/cors": "^2.8.13",+ "@vitejs/plugin-react": "^4.0.3",+ "react": "17.0.2",+ "vite-node": "^0.33.0"+ }+ },"app": {"name": "@notesnook/mobile-app","version": "1.0.0",@@ -348,7 +376,6 @@"react-test-renderer": "18.2.0","terser-webpack-plugin": "^5.3.5","ts-jest": "^28.0.7",- "typescript": "4.8.4","webpack": "^5.74.0"}},@@ -6873,6 +6900,10 @@"resolved": "native","link": true},+ "node_modules/@notesnook/themes-server": {+ "resolved": "../../servers/themes",+ "link": true+ },"node_modules/@otplib/core": {"version": "12.0.1","resolved": "https://registry.npmjs.org/@otplib/core/-/core-12.0.1.tgz",@@ -7606,11 +7637,80 @@"url": "https://www.paypal.me/tiviesantos"}},+ "node_modules/@tanstack/query-core": {+ "version": "4.29.19",+ "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.29.19.tgz",+ "integrity": "sha512-uPe1DukeIpIHpQi6UzIgBcXsjjsDaLnc7hF+zLBKnaUlh7jFE/A+P8t4cU4VzKPMFB/C970n/9SxtpO5hmIRgw==",+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/tannerlinsley"+ }+ },+ "node_modules/@tanstack/react-query": {+ "version": "4.29.19",+ "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-4.29.19.tgz",+ "integrity": "sha512-XiTIOHHQ5Cw1WUlHaD4fmVUMhoWjuNJlAeJGq7eM4BraI5z7y8WkZO+NR8PSuRnQGblpuVdjClQbDFtwxTtTUw==",+ "dependencies": {+ "@tanstack/query-core": "4.29.19",+ "use-sync-external-store": "^1.2.0"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/tannerlinsley"+ },+ "peerDependencies": {+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",+ "react-native": "*"+ },+ "peerDependenciesMeta": {+ "react-dom": {+ "optional": true+ },+ "react-native": {+ "optional": true+ }+ }+ },"node_modules/@tokenizer/token": {"version": "0.3.0","resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz","integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="},+ "node_modules/@trpc/client": {+ "version": "10.31.0",+ "resolved": "https://registry.npmjs.org/@trpc/client/-/client-10.31.0.tgz",+ "integrity": "sha512-VCqbJEvFJb8C4hQFw7AD+dkQTjgEdV/QAzO4D+/cX5e93u5NpfNXI+PKS0QFXwG/zqgwQwVV6OkYc/D/MFwA6g==",+ "funding": [+ "https://trpc.io/sponsor"+ ],+ "peerDependencies": {+ "@trpc/server": "10.31.0"+ }+ },+ "node_modules/@trpc/react-query": {+ "version": "10.31.0",+ "resolved": "https://registry.npmjs.org/@trpc/react-query/-/react-query-10.31.0.tgz",+ "integrity": "sha512-+M8sIsbf6e4H5XYvHlzDqhaf+ybfUigA/9OL3wXRp2vXhCedEiIERCnwNuHWFDRASl9vjOcM33AuJ4sbOOINEA==",+ "funding": [+ "https://trpc.io/sponsor"+ ],+ "peerDependencies": {+ "@tanstack/react-query": "^4.18.0",+ "@trpc/client": "10.31.0",+ "@trpc/server": "10.31.0",+ "react": ">=16.8.0",+ "react-dom": ">=16.8.0"+ }+ },+ "node_modules/@trpc/server": {+ "version": "10.31.0",+ "resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.31.0.tgz",+ "integrity": "sha512-9EnRTSDE9nF11LZsvSOqNKqkRYzHqFX4ch5AJ6VIu8uta2vxVTN4FxxsNRSOluTzVYZDeaCISbwmOJ5iihCCIg==",+ "funding": [+ "https://trpc.io/sponsor"+ ]+ },"node_modules/@tsconfig/react-native": {"version": "3.0.2","resolved": "https://registry.npmjs.org/@tsconfig/react-native/-/react-native-3.0.2.tgz",@@ -23188,19 +23288,6 @@"node": ">= 4"}},- "node_modules/typescript": {- "version": "4.8.4",- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz",- "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==",- "dev": true,- "bin": {- "tsc": "bin/tsc",- "tsserver": "bin/tsserver"- },- "engines": {- "node": ">=4.2.0"- }- },"node_modules/ua-parser-js": {"version": "0.7.35","resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.35.tgz",@@ -28883,8 +28970,7 @@"@notesnook/core": "file:../core","@types/react": "17.0.2","react": "17.0.2",- "timeago.js": "4.0.2",- "typescript": "^4.8.2"+ "timeago.js": "4.0.2"}},"@notesnook/core": {@@ -28935,14 +29021,15 @@"@notesnook/editor": {"version": "file:../../packages/editor","requires": {- "@emotion/react": "^11.10.0",- "@mdi/js": "^6.9.96",- "@mdi/react": "^1.6.0",+ "@emotion/react": "11.11.1",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1","@notesnook/core": "file:../core","@notesnook/theme": "file:../theme",+ "@notesnook/ui": "file:../ui","@social-embed/lib": "^0.0.2-next.1",- "@theme-ui/components": "^0.14.7",- "@theme-ui/core": "^0.14.7",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0","@tiptap/core": "2.0.3","@tiptap/extension-character-count": "2.0.3","@tiptap/extension-color": "2.0.3",@@ -28983,7 +29070,7 @@"prosemirror-test-builder": "^1.1.0","re-resizable": "^6.9.9","react": "17.0.2",- "react-colorful": "^5.5.1",+ "react-colorful": "^5.6.1","react-dom": "17.0.2","react-modal": "^3.15.1","redent": "^4.0.0",@@ -28999,8 +29086,8 @@"@notesnook/editor-mobile": {"version": "file:../../packages/editor-mobile","requires": {- "@emotion/react": "^11.10.0",- "@mdi/js": "^6.9.96",+ "@emotion/react": "11.11.1",+ "@mdi/js": "^7.2.96","@mdi/react": "^1.6.0","@notesnook/editor": "file:../editor","@notesnook/theme": "file:../theme",@@ -29159,10 +29246,25 @@"react-test-renderer": "18.2.0","terser-webpack-plugin": "^5.3.5","ts-jest": "^28.0.7",- "typescript": "4.8.4","webpack": "^5.74.0"}},+ "@notesnook/themes-server": {+ "version": "file:../../servers/themes",+ "requires": {+ "@notesnook/theme": "file:../../packages/theme",+ "@orama/orama": "^1.0.8",+ "@trpc/server": "10.31.0",+ "@types/cors": "^2.8.13",+ "@vitejs/plugin-react": "^4.0.3",+ "async-mutex": "^0.4.0",+ "cors": "^2.8.5",+ "react": "17.0.2",+ "util": "^0.12.5",+ "vite-node": "^0.33.0",+ "zod": "^3.21.4"+ }+ },"@otplib/core": {"version": "12.0.1","resolved": "https://registry.npmjs.org/@otplib/core/-/core-12.0.1.tgz",@@ -29736,11 +29838,40 @@"resolved": "https://registry.npmjs.org/@streetwriters/showdown/-/showdown-3.0.1-alpha.2.tgz","integrity": "sha512-GkIDQlcvJVVMgp1J5H5upiRr2hZQJAJK6gnDzOjvJAflKO4gV96xCq4RFakwahLLhL7uQ8Yx10qtmrtBuJMsEw=="},+ "@tanstack/query-core": {+ "version": "4.29.19",+ "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.29.19.tgz",+ "integrity": "sha512-uPe1DukeIpIHpQi6UzIgBcXsjjsDaLnc7hF+zLBKnaUlh7jFE/A+P8t4cU4VzKPMFB/C970n/9SxtpO5hmIRgw=="+ },+ "@tanstack/react-query": {+ "version": "4.29.19",+ "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-4.29.19.tgz",+ "integrity": "sha512-XiTIOHHQ5Cw1WUlHaD4fmVUMhoWjuNJlAeJGq7eM4BraI5z7y8WkZO+NR8PSuRnQGblpuVdjClQbDFtwxTtTUw==",+ "requires": {+ "@tanstack/query-core": "4.29.19",+ "use-sync-external-store": "^1.2.0"+ }+ },"@tokenizer/token": {"version": "0.3.0","resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz","integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="},+ "@trpc/client": {+ "version": "10.31.0",+ "resolved": "https://registry.npmjs.org/@trpc/client/-/client-10.31.0.tgz",+ "integrity": "sha512-VCqbJEvFJb8C4hQFw7AD+dkQTjgEdV/QAzO4D+/cX5e93u5NpfNXI+PKS0QFXwG/zqgwQwVV6OkYc/D/MFwA6g=="+ },+ "@trpc/react-query": {+ "version": "10.31.0",+ "resolved": "https://registry.npmjs.org/@trpc/react-query/-/react-query-10.31.0.tgz",+ "integrity": "sha512-+M8sIsbf6e4H5XYvHlzDqhaf+ybfUigA/9OL3wXRp2vXhCedEiIERCnwNuHWFDRASl9vjOcM33AuJ4sbOOINEA=="+ },+ "@trpc/server": {+ "version": "10.31.0",+ "resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.31.0.tgz",+ "integrity": "sha512-9EnRTSDE9nF11LZsvSOqNKqkRYzHqFX4ch5AJ6VIu8uta2vxVTN4FxxsNRSOluTzVYZDeaCISbwmOJ5iihCCIg=="+ },"@tsconfig/react-native": {"version": "3.0.2","resolved": "https://registry.npmjs.org/@tsconfig/react-native/-/react-native-3.0.2.tgz",@@ -41592,12 +41723,6 @@"resolved": "https://registry.npmjs.org/typesafe-actions/-/typesafe-actions-5.1.0.tgz","integrity": "sha512-bna6Yi1pRznoo6Bz1cE6btB/Yy8Xywytyfrzu/wc+NFW3ZF0I+2iCGImhBsoYYCOWuICtRO4yHcnDlzgo1AdNg=="},- "typescript": {- "version": "4.8.4",- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz",- "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==",- "dev": true- },"ua-parser-js": {"version": "0.7.35","resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.35.tgz",diff --git a/apps/mobile/package.json b/apps/mobile/package.jsonindex 296cba353..2026d9b6f 100644--- a/apps/mobile/package.json+++ b/apps/mobile/package.json@@ -24,16 +24,21 @@},"devDependencies": {"otplib": "12.0.1",- "react-refresh": "0.14.0",- "patch-package": "7.0.0"+ "patch-package": "7.0.0",+ "react-refresh": "0.14.0"},"dependencies": {- "react": "18.2.0",- "react-native": "0.72.0",+ "@notesnook/common": "file:../../packages/common","@notesnook/core": "file:../../packages/core","@notesnook/editor": "file:../../packages/editor","@notesnook/editor-mobile": "file:../../packages/editor-mobile","@notesnook/logger": "file:../../packages/logger",- "@notesnook/common": "file:../../packages/common"+ "@notesnook/themes-server": "file:../../servers/themes",+ "react": "18.2.0",+ "react-native": "0.72.0",+ "@trpc/client": "10.31.0",+ "@trpc/react-query": "10.31.0",+ "@trpc/server": "^10.31.0",+ "@tanstack/react-query": "^4.29.19"}-}\ No newline at end of file+}diff --git a/apps/mobile/share/editor.js b/apps/mobile/share/editor.jsindex b741086c2..d2764aa97 100644--- a/apps/mobile/share/editor.js+++ b/apps/mobile/share/editor.js@@ -16,34 +16,33 @@ GNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong 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 React, {- useRef,- useState,- useMemo,useCallback,useEffect,- useLayoutEffect+ useLayoutEffect,+ useMemo,+ useRef,+ useState} from "react";+import { Linking, Platform, View } from "react-native";import { WebView } from "react-native-webview";import { EDITOR_URI } from "../app/screens/editor/source";-import { Linking, Platform, View } from "react-native";-import { EditorEvents, post } from "../app/screens/editor/tiptap/utils";import Commands from "../app/screens/editor/tiptap/commands";-import { useShareStore } from "./store";+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 { eOnLoadNote } from "../app/utils/events";-import { getDefaultPresets } from "@notesnook/editor/dist/toolbar/tool-definitions";import { useSettingStore } from "../app/stores/use-setting-store";-import { EventTypes } from "../app/screens/editor/tiptap/editor-events";+import { eOnLoadNote } from "../app/utils/events";const useEditor = () => {const ref = useRef();const [sessionId] = useState("share-editor-session" + Date.now());- const colors = useShareStore((state) => state.colors);- const accent = useShareStore((state) => state.accent);+ const theme = useThemeEngineStore((state) => state.theme);const commands = useMemo(() => new Commands(ref), [ref]);const currentNote = useRef();const doubleSpacedLines = useSettingStore(@@ -70,7 +69,7 @@ const useEditor = () => {}, [loadNote]);const onLoad = () => {- postMessage(EditorEvents.theme, { ...colors, accent });+ postMessage(EditorEvents.theme, theme);commands.setInsets({ top: 0, left: 0, right: 0, bottom: 0 });commands.setSettings({deviceMode: "mobile",@@ -148,7 +147,7 @@ const style = {};export const Editor = ({ onChange, onLoad }) => {- const colors = useShareStore((state) => state.colors);+ const { colors } = useThemeColors();const editor = useEditor();const onMessage = useEditorEvents(editor, onChange);const [loading, setLoading] = useState(true);@@ -212,7 +211,7 @@ export const Editor = ({ onChange, onLoad }) => {position: "absolute",width: "100%",height: "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,alignItems: "flex-start",zIndex: 999,paddingHorizontal: 12@@ -222,7 +221,7 @@ export const Editor = ({ onChange, onLoad }) => {style={{height: 16,width: "100%",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginTop: 10}}@@ -232,7 +231,7 @@ export const Editor = ({ onChange, onLoad }) => {style={{height: 16,width: "100%",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginTop: 10}}@@ -242,7 +241,7 @@ export const Editor = ({ onChange, onLoad }) => {style={{height: 16,width: "60%",- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,borderRadius: 5,marginTop: 10}}diff --git a/apps/mobile/share/index.js b/apps/mobile/share/index.jsindex 13b94a831..1a9bffb23 100644--- a/apps/mobile/share/index.js+++ b/apps/mobile/share/index.js@@ -17,9 +17,11 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import React, { Fragment } from "react";+import React, { Fragment, useEffect, useState } from "react";import { Modal, Platform } from "react-native";import ShareView from "./share";+import { ScopedThemeProvider } from "@notesnook/theme";+import "./store";const Wrapper = Platform.OS === "android" ? Modal : Fragment;const outerProps =Platform.OS === "android"@@ -29,11 +31,23 @@ const outerProps =visible: true}: {};+const NotesnookShare = ({ quicknote = false }) => {+ const [render, setRender] = useState(false);+ useEffect(() => {+ setTimeout(() => {+ setRender(true);+ }, 1);+ }, []);+return (- <Wrapper {...outerProps}>- <ShareView quicknote={quicknote} />- </Wrapper>+ <ScopedThemeProvider value="base">+ {!render ? null : (+ <Wrapper {...outerProps}>+ <ShareView quicknote={quicknote} />+ </Wrapper>+ )}+ </ScopedThemeProvider>);};diff --git a/apps/mobile/share/quick-note.js b/apps/mobile/share/quick-note.jsindex 606f6a873..0e370b1c2 100644--- a/apps/mobile/share/quick-note.js+++ b/apps/mobile/share/quick-note.js@@ -17,25 +17,12 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import React, { Component } from "react";-import { Appearance, SafeAreaView } from "react-native";+import { Component } from "react";import RNBootSplash from "react-native-bootsplash";-import {- COLOR_SCHEME_DARK,- COLOR_SCHEME_LIGHT-} from "../app/utils/color-scheme";-import NotesnookShare from "./index";export default class QuickNoteIOS extends Component {constructor(props, context) {super(props, context);- this.state = {- colors:- Appearance.getColorScheme() === "dark"- ? COLOR_SCHEME_DARK- : COLOR_SCHEME_LIGHT,- height: 0- };}componentDidMount() {@@ -43,17 +30,6 @@ export default class QuickNoteIOS extends Component {}render() {- return (- <SafeAreaView- style={{- width: "100%",- height: "100%",- justifyContent: "flex-start",- backgroundColor: this.state.colors.nav- }}- >- <NotesnookShare quicknote={true} />- </SafeAreaView>- );+ return null;}}diff --git a/apps/mobile/share/search.js b/apps/mobile/share/search.jsindex ec41b1a9f..32328451e 100644--- a/apps/mobile/share/search.js+++ b/apps/mobile/share/search.js@@ -33,9 +33,10 @@ import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { db } from "../app/common/database";import { getElevationStyle } from "../app/utils/elevation";import { initDatabase, useShareStore } from "./store";+import { useThemeColors } from "@notesnook/theme";const ListItem = ({ item, mode, close }) => {- const colors = useShareStore((state) => state.colors);+ const { colors } = useThemeColors();const selectedNotebooks = useShareStore((state) => state.selectedNotebooks);const selectedTags = useShareStore((state) => state.selectedTags);const isSelected =@@ -96,7 +97,7 @@ const ListItem = ({ item, mode, close }) => {style={{flexDirection: "column",borderBottomWidth: item.topics?.length > 0 ? 0 : 1,- borderBottomColor: colors.nav,+ borderBottomColor: colors.secondary.background,justifyContent: "center",paddingVertical: 12}}@@ -119,7 +120,7 @@ const ListItem = ({ item, mode, close }) => {marginRight: 10}}size={20}- color={isSelected ? colors.accent : colors.icon}+ color={isSelected ? colors.primary.accent : colors.secondary.icon}/>) : null}@@ -131,7 +132,7 @@ const ListItem = ({ item, mode, close }) => {<TextnumberOfLines={1}style={{- color: colors.pri,+ color: colors.primary.paragraph,fontFamily:item.type === "topic"? "OpenSans-Regular"@@ -192,7 +193,7 @@ const SearchLookup = {};export const Search = ({ close, getKeyboardHeight, quicknote, mode }) => {- const colors = useShareStore((state) => state.colors);+ const { colors } = useThemeColors();const { height } = useWindowDimensions();const timer = useRef(null);@@ -255,7 +256,7 @@ export const Search = ({ close, getKeyboardHeight, quicknote, mode }) => {style={{position: "absolute",top: Platform.OS === "android" ? 20 : 0,- backgroundColor: colors.bg,+ backgroundColor: colors.secondary.background,borderRadius: quicknote ? 0 : 10,width: quicknote ? "100%" : "95%",minHeight: 250,@@ -279,7 +280,7 @@ export const Search = ({ close, getKeyboardHeight, quicknote, mode }) => {><Iconname="arrow-left"- color={colors.pri}+ color={colors.secondary.icon}style={{marginRight: 10}}@@ -289,7 +290,7 @@ export const Search = ({ close, getKeyboardHeight, quicknote, mode }) => {<TextInputref={inputRef}placeholder="Search for a note"- placeholderTextColor={colors.placeholder}+ placeholderTextColor={colors.primary.placeholder}style={{fontSize: 15,fontFamily: "OpenSans-Regular",@@ -306,7 +307,12 @@ export const Search = ({ close, getKeyboardHeight, quicknote, mode }) => {onSubmitEditing={onSearch}/>- <Icon name="magnify" color={colors.pri} size={25} onPress={onSearch} />+ <Icon+ name="magnify"+ color={colors.primary.icon}+ size={25}+ onPress={onSearch}+ /></View><View@@ -352,7 +358,7 @@ export const Search = ({ close, getKeyboardHeight, quicknote, mode }) => {<Textstyle={{fontFamily: "OpenSans-Regular",- color: colors.icon+ color: colors.secondary.icon}}>{searchKeyword.currentdiff --git a/apps/mobile/share/share.js b/apps/mobile/share/share.jsindex cceebf005..61cd8c2ed 100644--- a/apps/mobile/share/share.js+++ b/apps/mobile/share/share.js@@ -54,6 +54,7 @@ import { NoteBundle } from "../app/utils/note-bundle";import { Editor } from "./editor";import { Search } from "./search";import { initDatabase, useShareStore } from "./store";+import { useThemeColors } from "@notesnook/theme";const getLinkPreview = (url) => {return getPreviewData(url, 5000);@@ -195,8 +196,7 @@ const modes = {};const ShareView = ({ quicknote = false }) => {- const colors = useShareStore((state) => state.colors);- const accent = useShareStore((state) => state.accent);+ const { colors } = useThemeColors();const appendNote = useShareStore((state) => state.appendNote);const [note, setNote] = useState({ ...defaultNote });const noteContent = useRef("");@@ -231,7 +231,6 @@ const ShareView = ({ quicknote = false }) => {};useEffect(() => {- useShareStore.getState().setAccent();let keyboardDidShow = Keyboard.addListener("keyboardDidShow",onKeyboardDidShow@@ -385,10 +384,6 @@ const ShareView = ({ quicknote = false }) => {setLoading(false);};- useEffect(() => {- useShareStore.getState().setColors();- }, [note]);-const changeMode = async (m) => {setMode(m);@@ -452,7 +447,7 @@ const ShareView = ({ quicknote = false }) => {<Viewstyle={{width: "100%",- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,height: 50 + insets.top,paddingTop: insets.top,...getElevationStyle(1),@@ -465,7 +460,7 @@ const ShareView = ({ quicknote = false }) => {<Buttontype="action"icon="close"- iconColor={colors.pri}+ iconColor={colors.secondary.icon}onPress={() => {if (searchMode) {setSearchMode(null);@@ -483,7 +478,7 @@ const ShareView = ({ quicknote = false }) => {<Textstyle={{- color: colors.pri,+ color: colors.primary.paragraph,fontSize: 17,fontFamily: "OpenSans-Regular"}}@@ -494,7 +489,7 @@ const ShareView = ({ quicknote = false }) => {<Buttontype="action"icon="check"- iconColor={accent.color}+ iconColor={colors.primary.accent}onPress={onPress}style={{width: 50,@@ -546,7 +541,7 @@ const ShareView = ({ quicknote = false }) => {<WrapperViewstyle={{paddingVertical: 12,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,display: searchMode ? "none" : "flex",borderTopRightRadius: Platform.OS === "ios" ? 10 : 15,borderTopLeftRadius: Platform.OS === "ios" ? 10 : 15,@@ -567,7 +562,7 @@ const ShareView = ({ quicknote = false }) => {<Viewstyle={{minHeight: 100,- backgroundColor: colors.bg,+ backgroundColor: colors.primary.background,overflow: "hidden"}}>@@ -578,14 +573,15 @@ const ShareView = ({ quicknote = false }) => {alignItems: "center",borderBottomWidth: 1,paddingBottom: 12,- borderBottomColor: colors.nav,+ borderBottomColor: colors.secondary.background,paddingHorizontal: 12}}><Textstyle={{fontSize: 18,- fontFamily: "OpenSans-SemiBold"+ fontFamily: "OpenSans-SemiBold",+ color: colors.primary.heading}}>Save to Notesnook@@ -594,13 +590,13 @@ const ShareView = ({ quicknote = false }) => {<Buttontitle="Done"style={{- backgroundColor: colors.accent,+ backgroundColor: colors.primary.accent,height: Platform.OS === "ios" ? 35 : 40,paddingHorizontal: 15,marginBottom: 0}}loading={loading}- iconColor={colors.light}+ iconColor={colors.static.white}onPress={onPress}textStyle={{fontSize: 16,@@ -614,10 +610,12 @@ const ShareView = ({ quicknote = false }) => {style={{paddingHorizontal: 12,paddingVertical: 12,- backgroundColor: colors.nav+ backgroundColor: colors.secondary.background}}>- <Text style={{ color: colors.pri, marginBottom: 6 }}>+ <Text+ style={{ color: colors.primary.paragraph, marginBottom: 6 }}+ >Attaching {rawFiles.length} file(s):</Text><ScrollView horizontal>@@ -655,10 +653,10 @@ const ShareView = ({ quicknote = false }) => {onPress={() => onRemoveFile(item)}style={{borderRadius: 5,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,flexDirection: "row",borderWidth: 1,- borderColor: colors.border,+ borderColor: colors.primary.border,alignItems: "center",paddingVertical: 5,paddingHorizontal: 8,@@ -666,12 +664,16 @@ const ShareView = ({ quicknote = false }) => {}}resizeMode="cover">- <Icon color={colors.pri} size={15} name="file" />+ <Icon+ color={colors.primary.icon}+ size={15}+ name="file"+ /><Textstyle={{marginLeft: 4,- color: colors.pri,+ color: colors.primary.paragraph,paddingRight: 8,fontSize: 12}}@@ -685,7 +687,7 @@ const ShareView = ({ quicknote = false }) => {<Textstyle={{- color: colors.icon,+ color: colors.secondary.paragraph,marginTop: 6,fontSize: 11}}@@ -700,7 +702,7 @@ const ShareView = ({ quicknote = false }) => {height: rawFiles.length > 0 ? 100 : 200,paddingBottom: 15,marginBottom: 10,- borderBottomColor: colors.nav,+ borderBottomColor: colors.secondary.background,borderBottomWidth: 1}}>@@ -725,7 +727,7 @@ const ShareView = ({ quicknote = false }) => {<Textstyle={{fontSize: 12,- color: colors.icon,+ color: colors.secondary.paragraph,fontFamily: "OpenSans-Regular",paddingHorizontal: 12,marginBottom: 10,@@ -735,7 +737,7 @@ const ShareView = ({ quicknote = false }) => {Above content will append to{" "}<Textstyle={{- color: accent.color,+ color: colors.primary.accent,fontFamily: "OpenSans-SemiBold"}}>@@ -755,7 +757,7 @@ const ShareView = ({ quicknote = false }) => {><Textstyle={{- color: colors.pri,+ color: colors.primary.paragraph,marginRight: 10}}>@@ -769,8 +771,12 @@ const ShareView = ({ quicknote = false }) => {title={modes[2].title}iconSize={16}fontSize={14}- iconColor={mode == 2 ? accent.color : colors.icon}- textColor={mode == 2 ? accent.color : colors.icon}+ iconColor={+ mode == 2 ? colors.primary.accent : colors.secondary.icon+ }+ textColor={+ mode == 2 ? colors.primary.accent : colors.secondary.icon+ }style={{paddingHorizontal: 0,height: 30,@@ -786,8 +792,12 @@ const ShareView = ({ quicknote = false }) => {title={modes[1].title}iconSize={16}fontSize={14}- iconColor={mode == 1 ? accent.color : colors.icon}- textColor={mode == 1 ? accent.color : colors.icon}+ iconColor={+ mode == 1 ? colors.primary.accent : colors.secondary.icon+ }+ textColor={+ mode == 1 ? colors.primary.accent : colors.secondary.icon+ }style={{ paddingHorizontal: 0, height: 30, marginBottom: 0 }}/></View>@@ -806,15 +816,19 @@ const ShareView = ({ quicknote = false }) => {}}><Button- color={colors.bg}+ color={colors.primary.background}onPress={() => {useShareStore.getState().setAppendNote(null);}}icon="plus"iconSize={18}- iconColor={!appendNote ? accent.color : colors.icon}+ iconColor={+ !appendNote ? colors.primary.accent : colors.secondary.icon+ }title="New note"- textColor={!appendNote ? accent.color : colors.icon}+ textColor={+ !appendNote ? colors.primary.accent : colors.secondary.icon+ }type="button"textStyle={{fontSize: 15@@ -825,7 +839,7 @@ const ShareView = ({ quicknote = false }) => {width: "100%",marginRight: 0,borderWidth: 1,- borderColor: colors.nav,+ borderColor: colors.secondary.background,justifyContent: "flex-start"}}/>@@ -837,9 +851,11 @@ const ShareView = ({ quicknote = false }) => {}}icon="text-short"iconSize={18}- iconColor={appendNote ? accent.color : colors.icon}+ iconColor={+ appendNote ? colors.primary.accent : colors.secondary.icon+ }title={`Append to a note`}- textColor={colors.icon}+ textColor={colors.secondary.paragraph}type="button"textStyle={{fontSize: 15@@ -850,7 +866,7 @@ const ShareView = ({ quicknote = false }) => {width: "100%",marginRight: 0,borderWidth: 1,- borderColor: colors.nav,+ borderColor: colors.secondary.background,justifyContent: "flex-start"}}/>@@ -884,7 +900,7 @@ const ShareView = ({ quicknote = false }) => {};const AddNotebooks = ({ onPress }) => {- const colors = useShareStore((state) => state.colors);+ const { colors } = useThemeColors();const notebooks = useShareStore((state) => state.selectedNotebooks);return (<TouchableOpacity@@ -895,7 +911,7 @@ const AddNotebooks = ({ onPress }) => {width: "100%",marginRight: 0,borderWidth: 1,- borderColor: colors.nav,+ borderColor: colors.secondary.background,justifyContent: "center",borderRadius: 5,marginBottom: 10,@@ -918,11 +934,11 @@ const AddNotebooks = ({ onPress }) => {style={{marginRight: 10}}- color={colors.icon}+ color={colors.secondary.icon}/><Textstyle={{- color: colors.icon,+ color: colors.secondary.icon,fontSize: 15}}>@@ -941,12 +957,12 @@ const AddNotebooks = ({ onPress }) => {{notebooks.map((item) => (<Textstyle={{- color: colors.icon,+ color: colors.secondary.icon,marginRight: 5,fontSize: 14,borderRadius: 4,paddingHorizontal: 8,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,paddingVertical: 5,marginTop: 5}}@@ -972,12 +988,12 @@ const AddNotebooks = ({ onPress }) => {<Textstyle={{- color: colors.accent,+ color: colors.primary.accent,marginRight: 5,fontSize: 14,borderRadius: 4,paddingHorizontal: 8,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,paddingVertical: 5,marginTop: 5}}@@ -995,7 +1011,7 @@ const AddNotebooks = ({ onPress }) => {};const AddTags = ({ onPress }) => {- const colors = useShareStore((state) => state.colors);+ const { colors } = useThemeColors();const tags = useShareStore((state) => state.selectedTags);return (<TouchableOpacity@@ -1007,7 +1023,7 @@ const AddTags = ({ onPress }) => {width: "100%",marginRight: 0,borderWidth: 1,- borderColor: colors.nav,+ borderColor: colors.secondary.background,justifyContent: "center",borderRadius: 5,marginBottom: 10@@ -1027,11 +1043,11 @@ const AddTags = ({ onPress }) => {style={{marginRight: 10}}- color={colors.icon}+ color={colors.secondary.icon}/><Textstyle={{- color: colors.icon,+ color: colors.secondary.icon,fontSize: 15}}>@@ -1050,12 +1066,12 @@ const AddTags = ({ onPress }) => {{tags.map((tag) => (<Textstyle={{- color: colors.icon,+ color: colors.secondary.icon,marginRight: 5,fontSize: 14,borderRadius: 4,paddingHorizontal: 8,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,paddingVertical: 5}}onPress={() => {@@ -1072,12 +1088,12 @@ const AddTags = ({ onPress }) => {<Textstyle={{- color: colors.accent,+ color: colors.primary.accent,marginRight: 5,fontSize: 14,borderRadius: 4,paddingHorizontal: 8,- backgroundColor: colors.nav,+ backgroundColor: colors.secondary.background,paddingVertical: 5}}onPress={() => {diff --git a/apps/mobile/share/store.js b/apps/mobile/share/store.jsindex 6797d4fcc..2d2f0b2b7 100644--- a/apps/mobile/share/store.js+++ b/apps/mobile/share/store.js@@ -17,16 +17,11 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { ThemeDark, ThemeLight, useThemeEngineStore } from "@notesnook/theme";import { Appearance } from "react-native";import create from "zustand";-import {- ACCENT,- COLOR_SCHEME_DARK,- COLOR_SCHEME_LIGHT-} from "../app/utils/color-scheme";-import { MMKV } from "../app/common/database/mmkv";import { db } from "../app/common/database";-+import { MMKV } from "../app/common/database/mmkv";export async function initDatabase() {if (!db.isInitialized) {await db.init();@@ -43,34 +38,24 @@ const StorageKeys = {appSettings: "appSettings"};-export const useShareStore = create((set) => ({- colors:- Appearance.getColorScheme() === "dark"- ? COLOR_SCHEME_DARK- : COLOR_SCHEME_LIGHT,- accent: ACCENT,- setAccent: async () => {- let appSettings = MMKV.getString(StorageKeys.appSettings);+let appSettings = MMKV.getString(StorageKeys.appSettings);+if (appSettings) {+ appSettings = JSON.parse(appSettings);+}+const theme =+ Appearance.getColorScheme() !== "dark"+ ? appSettings?.darkThem+ : appSettings?.lightTheme;- if (appSettings) {- appSettings = JSON.parse(appSettings);- let accentColor = appSettings.theme?.accent || ACCENT.color;+useThemeEngineStore+ .getState()+ .setTheme(+ theme || (Appearance.getColorScheme() === "dark" ? ThemeDark : ThemeLight)+ );- let accent = {- color: accentColor,- shade: accentColor + "12"- };- set({ accent: accent });- }- },- setColors: () => {- set({- colors:- Appearance.getColorScheme() === "dark"- ? COLOR_SCHEME_DARK- : COLOR_SCHEME_LIGHT- });- },+export const useShareStore = create((set) => ({+ theme:+ theme || (Appearance.getColorScheme() === "dark" ? ThemeDark : ThemeLight),appendNote: null,setAppendNote: (note) => {MMKV.setItem(StorageKeys.appendNote, JSON.stringify(note));diff --git a/apps/mobile/tsconfig.json b/apps/mobile/tsconfig.jsonindex db95e7324..2f0d2fc92 100644--- a/apps/mobile/tsconfig.json+++ b/apps/mobile/tsconfig.json@@ -12,7 +12,9 @@"@notesnook/*": ["../../packages"],"@notifee/react-native": ["./node_modules/@ammarahmed/notifee-react-native"- ]+ ],+ "@notesnook/theme": ["../../packages/theme"],+ "@types/react": ["./node_modules/@types/react"]},"incremental": true},diff --git a/apps/web/index.html b/apps/web/index.htmlindex 3918b024b..8d8dde2eb 100644--- a/apps/web/index.html+++ b/apps/web/index.html@@ -48,11 +48,11 @@<title>Notesnook</title><script nonce="7WIq8hRwApoXhctoGZZthMLYQLRNiprTwcPi6Azdf">- const theme = JSON.parse(- window.localStorage.getItem("theme") || '"light"'+ const colorScheme = JSON.parse(+ window.localStorage.getItem("colorScheme") || '"light"');const root = document.querySelector("html");- if (root) root.setAttribute("data-theme", theme);+ if (root) root.setAttribute("data-theme", colorScheme);</script><script type="module" src="/src/index.tsx"></script><style>@@ -72,13 +72,13 @@}html[data-theme="light"] .react-loading-skeleton {- --base-color: #f7f7f7;- --highlight-color: #f7f7f7;+ --base-color: var(--background-secondary);+ --highlight-color: #var(--background-secondary);}html[data-theme="dark"] .react-loading-skeleton {- --base-color: #2b2b2b;- --highlight-color: #2b2b2b;+ --base-color: var(--background-secondary);+ --highlight-color: var(--background-secondary);}#splash svg {diff --git a/apps/web/package-lock.json b/apps/web/package-lock.jsonindex 49ec9e7f9..b5f022d43 100644--- a/apps/web/package-lock.json+++ b/apps/web/package-lock.json@@ -14,9 +14,9 @@"@dnd-kit/core": "^6.0.5","@dnd-kit/modifiers": "^6.0.0","@dnd-kit/sortable": "^7.0.1",- "@emotion/react": "^11.10.0",- "@mdi/js": "^6.9.96",- "@mdi/react": "^1.6.0",+ "@emotion/react": "11.11.1",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1","@notesnook-importer/core": "^1.7.1","@notesnook/common": "file:../../packages/common","@notesnook/core": "file:../../packages/core",@@ -27,12 +27,17 @@"@notesnook/logger": "file:../../packages/logger","@notesnook/streamable-fs": "file:../../packages/streamable-fs","@notesnook/theme": "file:../../packages/theme",+ "@notesnook/themes-server": "file:../../servers/themes",+ "@notesnook/ui": "file:../../packages/ui","@notesnook/web-clipper": "file:../../extensions/web-clipper","@react-pdf-viewer/core": "^3.12.0","@react-pdf-viewer/toolbar": "^3.12.0",+ "@tanstack/react-query": "^4.29.19",+ "@theme-ui/color": "^0.14.7","@theme-ui/components": "^0.14.7","@theme-ui/core": "^0.14.7","@trpc/client": "10.31.0",+ "@trpc/react-query": "10.31.0","allotment": "^1.19.0","axios": "^1.3.4","clipboard-polyfill": "^3.0.3",@@ -61,6 +66,7 @@"react-scroll-sync": "^0.9.0","react-virtuoso": "^3.0.0","timeago.js": "^4.0.2",+ "tinycolor2": "^1.6.0","w3c-keyname": "^2.2.6","web-streams-polyfill": "^3.1.1","wouter": "2.7.3",@@ -78,6 +84,7 @@"@types/react": "17.0.2","@types/react-dom": "17.0.2","@types/react-modal": "^3.13.1",+ "@types/tinycolor2": "^1.4.3","@vitejs/plugin-react-swc": "^3.3.2","autoprefixer": "^10.4.14","buffer": "^6.0.3",@@ -110,7 +117,7 @@"version": "0.2.2","license": "GPL-3.0-or-later","dependencies": {- "@emotion/react": "^11.10.0",+ "@emotion/react": "11.11.1","@hot-loader/react-dom": "^17.0.2","@mdi/js": "^6.9.96","@mdi/react": "^1.6.0",@@ -179,7 +186,6 @@"name": "@notesnook/clipper","version": "1.0.0","extraneous": true,- "hasInstallScript": true,"license": "GPL-3.0-or-later","dependencies": {"@mozilla/readability": "^0.4.2",@@ -195,7 +201,8 @@"@types/stylis": "^4.0.2","esbuild": "^0.15.9","slugify": "^1.6.5",- "ts-node": "^10.9.1"+ "ts-node": "^10.9.1",+ "typescript": "^4.8.2"}},"../../packages/common": {@@ -209,8 +216,7 @@"devDependencies": {"@notesnook/core": "file:../core","@types/react": "17.0.2",- "react": "17.0.2",- "typescript": "^4.8.2"+ "react": "17.0.2"},"peerDependencies": {"react": ">=17.0.2",@@ -291,12 +297,13 @@"hasInstallScript": true,"license": "GPL-3.0-or-later","dependencies": {- "@emotion/react": "^11.10.0",+ "@emotion/react": "11.11.1","@notesnook/core": "file:../core","@notesnook/theme": "file:../theme",+ "@notesnook/ui": "file:../ui","@social-embed/lib": "^0.0.2-next.1",- "@theme-ui/components": "^0.14.7",- "@theme-ui/core": "^0.14.7",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0","@tiptap/core": "2.0.3","@tiptap/extension-character-count": "2.0.3","@tiptap/extension-color": "2.0.3",@@ -325,7 +332,7 @@"prism-themes": "^1.9.0","prosemirror-codemark": "^0.4.1","re-resizable": "^6.9.9",- "react-colorful": "^5.5.1",+ "react-colorful": "^5.6.1","react-modal": "^3.15.1","redent": "^4.0.0","refractor": "^4.8.0",@@ -335,8 +342,8 @@"zustand": "^4.3.8"},"devDependencies": {- "@mdi/js": "^6.9.96",- "@mdi/react": "^1.6.0",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1","@types/katex": "^0.14.0","@types/prismjs": "^1.26.0","@types/react": "17.0.2",@@ -354,8 +361,11 @@"web-vitals": "^2.1.4"},"peerDependencies": {- "@mdi/js": ">=6.9.96",- "@mdi/react": ">=1.6.0",+ "@emotion/react": "11.11.1",+ "@mdi/js": ">=7.2.96",+ "@mdi/react": ">=1.6.1",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0","react": ">=17.0.0","react-dom": ">=17.0.0"}@@ -399,11 +409,74 @@"version": "1.2.0","license": "GPL-3.0-or-later","dependencies": {+ "@emotion/react": "11.11.1",+ "@theme-ui/color": "^0.16.0",+ "@theme-ui/components": "0.14.7",+ "@theme-ui/core": "0.14.7",+ "tinycolor2": "^1.4.2",+ "zustand": "^4.3.8"+ },+ "devDependencies": {+ "@trpc/server": "^10.31.0",+ "@types/react": "17.0.2",+ "@types/tinycolor2": "^1.4.3",+ "isomorphic-fetch": "^3.0.0",+ "ts-json-schema-generator": "^1.2.0"+ },+ "peerDependencies": {+ "react": "17.0.2"+ }+ },+ "../../packages/ui": {+ "name": "@notesnook/ui",+ "version": "1.0.0",+ "license": "GPL-3.0-or-later",+ "dependencies": {+ "@emotion/react": "11.11.1",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1",+ "@notesnook/theme": "file:../theme",+ "@theme-ui/components": "^0.14.7","@theme-ui/core": "^0.14.7",- "tinycolor2": "^1.4.2"+ "framer-motion": "^6.5.1",+ "mac-scrollbar": "^0.10.3",+ "react-modal": "^3.15.1"},"devDependencies": {- "@types/tinycolor2": "^1.4.3"+ "@types/react": "17.0.2",+ "@types/react-dom": "17.0.2",+ "@types/react-modal": "^3.15.1",+ "react": "17.0.2",+ "react-dom": "17.0.2"+ },+ "peerDependencies": {+ "@emotion/react": "11.11.1",+ "@mdi/js": ">=7.2.96",+ "@mdi/react": ">=1.6.1",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0",+ "react": ">=17.0.0",+ "react-dom": ">=17.0.0"+ }+ },+ "../../servers/themes": {+ "name": "@notesnook/themes-server",+ "version": "1.0.0",+ "license": "ISC",+ "dependencies": {+ "@orama/orama": "^1.0.8",+ "@trpc/server": "10.31.0",+ "async-mutex": "^0.4.0",+ "cors": "^2.8.5",+ "util": "^0.12.5",+ "zod": "^3.21.4"+ },+ "devDependencies": {+ "@notesnook/theme": "file:../../packages/theme",+ "@types/cors": "^2.8.13",+ "@vitejs/plugin-react": "^4.0.3",+ "react": "17.0.2",+ "vite-node": "^0.33.0"}},"../desktop": {@@ -437,6 +510,27 @@"dmg-license": "^1.0.11"}},+ "desktop": {+ "name": "@notesnook/desktop",+ "version": "2.4.10",+ "extraneous": true,+ "dependencies": {+ "diary": "^0.3.1",+ "electron-updater": "^5.3.0",+ "icojs": "^0.17.1",+ "isomorphic-fetch": "^3.0.0",+ "yargs": "^17.6.2"+ },+ "devDependencies": {+ "@types/node-fetch": "^2.6.2",+ "electron": "^21.1.1",+ "electron-builder": "^23.6.0",+ "electron-builder-notarize": "^1.5.0",+ "electron-reloader": "^1.2.3",+ "esbuild": "^0.15.11",+ "patch-package": "^6.5.1"+ }+ },"node_modules/@ampproject/remapping": {"version": "2.2.0","dev": true,@@ -472,25 +566,20 @@"tslib": "^2.3.1"}},- "node_modules/@aws-sdk/util-base64-browser/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/@azure/msal-browser": {"version": "2.34.0","license": "MIT",- "optional": true,"dependencies": {- "@azure/msal-common": "^11.0.0"+ "@azure/msal-common": "^9.0.1"},"engines": {"node": ">=0.8.0"}},- "node_modules/@azure/msal-common": {- "version": "11.0.0",- "license": "MIT",- "optional": true,+ "node_modules/@azure/msal-browser/node_modules/@azure/msal-common": {+ "version": "9.1.1",+ "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-9.1.1.tgz",+ "integrity": "sha512-we9xR8lvu47fF0h+J8KyXoRy9+G/fPzm3QEa2TrdR3jaVS3LKAyE2qyMuUkNdbVkvzl8Zr9f7l+IUSP22HeqXw==","engines": {"node": ">=0.8.0"}@@ -498,10 +587,9 @@"node_modules/@azure/msal-node": {"version": "1.16.0","license": "MIT",- "optional": true,"dependencies": {- "@azure/msal-common": "^11.0.0",- "jsonwebtoken": "^9.0.0",+ "@azure/msal-common": "^9.0.1",+ "jsonwebtoken": "^8.5.1","uuid": "^8.3.0"},"engines": {@@ -512,22 +600,59 @@"version": "1.0.0-alpha.31","hasInstallScript": true,"license": "MIT",- "optional": true,"dependencies": {- "@azure/msal-common": "^11.0.0",- "@azure/msal-node-runtime": "^0.13.6-alpha.0",+ "@azure/msal-common": "^9.0.1","keytar": "^7.8.0",- "node-addon-api": "^6.0.0"+ "node-addon-api": "5.0.0"},"engines": {"node": ">=10"}},- "node_modules/@azure/msal-node-runtime": {- "version": "0.13.6-alpha.0",- "hasInstallScript": true,- "license": "MIT",- "optional": true+ "node_modules/@azure/msal-node-extensions/node_modules/@azure/msal-common": {+ "version": "9.1.1",+ "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-9.1.1.tgz",+ "integrity": "sha512-we9xR8lvu47fF0h+J8KyXoRy9+G/fPzm3QEa2TrdR3jaVS3LKAyE2qyMuUkNdbVkvzl8Zr9f7l+IUSP22HeqXw==",+ "engines": {+ "node": ">=0.8.0"+ }+ },+ "node_modules/@azure/msal-node/node_modules/@azure/msal-common": {+ "version": "9.1.1",+ "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-9.1.1.tgz",+ "integrity": "sha512-we9xR8lvu47fF0h+J8KyXoRy9+G/fPzm3QEa2TrdR3jaVS3LKAyE2qyMuUkNdbVkvzl8Zr9f7l+IUSP22HeqXw==",+ "engines": {+ "node": ">=0.8.0"+ }+ },+ "node_modules/@azure/msal-node/node_modules/jsonwebtoken": {+ "version": "8.5.1",+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",+ "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",+ "dependencies": {+ "jws": "^3.2.2",+ "lodash.includes": "^4.3.0",+ "lodash.isboolean": "^3.0.3",+ "lodash.isinteger": "^4.0.4",+ "lodash.isnumber": "^3.0.3",+ "lodash.isplainobject": "^4.0.6",+ "lodash.isstring": "^4.0.1",+ "lodash.once": "^4.0.0",+ "ms": "^2.1.1",+ "semver": "^5.6.0"+ },+ "engines": {+ "node": ">=4",+ "npm": ">=1.4.28"+ }+ },+ "node_modules/@azure/msal-node/node_modules/semver": {+ "version": "5.7.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",+ "bin": {+ "semver": "bin/semver"+ }},"node_modules/@babel/code-frame": {"version": "7.22.5",@@ -967,8 +1092,7 @@},"node_modules/@babel/highlight/node_modules/ansi-styles": {"version": "3.2.1",- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",+ "license": "MIT","dependencies": {"color-convert": "^1.9.0"},@@ -978,8 +1102,7 @@},"node_modules/@babel/highlight/node_modules/chalk": {"version": "2.4.2",- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",+ "license": "MIT","dependencies": {"ansi-styles": "^3.2.1","escape-string-regexp": "^1.0.5",@@ -991,37 +1114,32 @@},"node_modules/@babel/highlight/node_modules/color-convert": {"version": "1.9.3",- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",- "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",+ "license": "MIT","dependencies": {"color-name": "1.1.3"}},"node_modules/@babel/highlight/node_modules/color-name": {"version": "1.1.3",- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",- "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="+ "license": "MIT"},"node_modules/@babel/highlight/node_modules/escape-string-regexp": {"version": "1.0.5",- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",- "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",+ "license": "MIT","engines": {"node": ">=0.8.0"}},"node_modules/@babel/highlight/node_modules/has-flag": {"version": "3.0.0",- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",- "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",+ "license": "MIT","engines": {"node": ">=4"}},"node_modules/@babel/highlight/node_modules/supports-color": {"version": "5.5.0",- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",+ "license": "MIT","dependencies": {"has-flag": "^3.0.0"},@@ -2068,11 +2186,6 @@"@babel/core": "^7.0.0-0"}},- "node_modules/@babel/regjsgen": {- "version": "0.8.0",- "dev": true,- "license": "MIT"- },"node_modules/@babel/runtime": {"version": "7.20.13","license": "MIT",@@ -2148,10 +2261,6 @@"react": ">=16.8.0"}},- "node_modules/@dnd-kit/accessibility/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/@dnd-kit/core": {"version": "6.0.8","license": "MIT",@@ -2165,10 +2274,6 @@"react-dom": ">=16.8.0"}},- "node_modules/@dnd-kit/core/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/@dnd-kit/modifiers": {"version": "6.0.1","license": "MIT",@@ -2181,10 +2286,6 @@"react": ">=16.8.0"}},- "node_modules/@dnd-kit/modifiers/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/@dnd-kit/sortable": {"version": "7.0.2","license": "MIT",@@ -2197,10 +2298,6 @@"react": ">=16.8.0"}},- "node_modules/@dnd-kit/sortable/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/@dnd-kit/utilities": {"version": "3.2.1","license": "MIT",@@ -2211,41 +2308,40 @@"react": ">=16.8.0"}},- "node_modules/@dnd-kit/utilities/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/@emotion/babel-plugin": {- "version": "11.10.6",- "license": "MIT",+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz",+ "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==","dependencies": {"@babel/helper-module-imports": "^7.16.7","@babel/runtime": "^7.18.3",- "@emotion/hash": "^0.9.0",- "@emotion/memoize": "^0.8.0",- "@emotion/serialize": "^1.1.1",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/serialize": "^1.1.2","babel-plugin-macros": "^3.1.0","convert-source-map": "^1.5.0","escape-string-regexp": "^4.0.0","find-root": "^1.1.0","source-map": "^0.5.7",- "stylis": "4.1.3"+ "stylis": "4.2.0"}},"node_modules/@emotion/cache": {- "version": "11.10.5",- "license": "MIT",+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz",+ "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==","dependencies": {- "@emotion/memoize": "^0.8.0",- "@emotion/sheet": "^1.2.1",- "@emotion/utils": "^1.2.0",- "@emotion/weak-memoize": "^0.3.0",- "stylis": "4.1.3"+ "@emotion/memoize": "^0.8.1",+ "@emotion/sheet": "^1.2.2",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1",+ "stylis": "4.2.0"}},"node_modules/@emotion/hash": {- "version": "0.9.0",- "license": "MIT"+ "version": "0.9.1",+ "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz",+ "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ=="},"node_modules/@emotion/is-prop-valid": {"version": "0.8.8",@@ -2259,20 +2355,22 @@"license": "MIT"},"node_modules/@emotion/memoize": {- "version": "0.8.0",- "license": "MIT"+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="},"node_modules/@emotion/react": {- "version": "11.10.6",- "license": "MIT",+ "version": "11.11.1",+ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz",+ "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==","dependencies": {"@babel/runtime": "^7.18.3",- "@emotion/babel-plugin": "^11.10.6",- "@emotion/cache": "^11.10.5",- "@emotion/serialize": "^1.1.1",- "@emotion/use-insertion-effect-with-fallbacks": "^1.0.0",- "@emotion/utils": "^1.2.0",- "@emotion/weak-memoize": "^0.3.0",+ "@emotion/babel-plugin": "^11.11.0",+ "@emotion/cache": "^11.11.0",+ "@emotion/serialize": "^1.1.2",+ "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1","hoist-non-react-statics": "^3.3.1"},"peerDependencies": {@@ -2285,38 +2383,44 @@}},"node_modules/@emotion/serialize": {- "version": "1.1.1",- "license": "MIT",+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz",+ "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==","dependencies": {- "@emotion/hash": "^0.9.0",- "@emotion/memoize": "^0.8.0",- "@emotion/unitless": "^0.8.0",- "@emotion/utils": "^1.2.0",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/unitless": "^0.8.1",+ "@emotion/utils": "^1.2.1","csstype": "^3.0.2"}},"node_modules/@emotion/sheet": {- "version": "1.2.1",- "license": "MIT"+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz",+ "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA=="},"node_modules/@emotion/unitless": {- "version": "0.8.0",- "license": "MIT"+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz",+ "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ=="},"node_modules/@emotion/use-insertion-effect-with-fallbacks": {- "version": "1.0.0",- "license": "MIT",+ "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==","peerDependencies": {"react": ">=16.8.0"}},"node_modules/@emotion/utils": {- "version": "1.2.0",- "license": "MIT"+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz",+ "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg=="},"node_modules/@emotion/weak-memoize": {- "version": "0.3.0",- "license": "MIT"+ "version": "0.3.1",+ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz",+ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww=="},"node_modules/@esbuild/android-arm": {"version": "0.17.19",@@ -2761,8 +2865,9 @@}},"node_modules/@mdi/js": {- "version": "6.9.96",- "license": "Apache-2.0"+ "version": "7.2.96",+ "resolved": "https://registry.npmjs.org/@mdi/js/-/js-7.2.96.tgz",+ "integrity": "sha512-paR9M9ZT7rKbh2boksNUynuSZMHhqRYnEZOm/KrZTjQ4/FzyhjLHuvw/8XYzP+E7fS4+/Ms/82EN1pl/OFsiIA=="},"node_modules/@mdi/react": {"version": "1.6.1",@@ -2796,10 +2901,6 @@}}},- "node_modules/@microsoft/microsoft-graph-client/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/@motionone/animation": {"version": "10.15.1","license": "MIT",@@ -2810,10 +2911,6 @@"tslib": "^2.3.1"}},- "node_modules/@motionone/animation/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/@motionone/dom": {"version": "10.12.0","license": "MIT",@@ -2826,10 +2923,6 @@"tslib": "^2.3.1"}},- "node_modules/@motionone/dom/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/@motionone/easing": {"version": "10.15.1","license": "MIT",@@ -2838,10 +2931,6 @@"tslib": "^2.3.1"}},- "node_modules/@motionone/easing/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/@motionone/generators": {"version": "10.15.1","license": "MIT",@@ -2851,10 +2940,6 @@"tslib": "^2.3.1"}},- "node_modules/@motionone/generators/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/@motionone/types": {"version": "10.15.1","license": "MIT"@@ -2868,10 +2953,6 @@"tslib": "^2.3.1"}},- "node_modules/@motionone/utils/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/@nodelib/fs.scandir": {"version": "2.1.5","dev": true,@@ -2921,6 +3002,7 @@"domutils": "^3.0.1","entities": "^4.4.0","fflate": "^0.7.4",+ "gray-matter": "^4.0.3","htmlparser2": "^8.0.1","marked": "^4.1.0","spark-md5": "^3.0.2"@@ -2948,19 +3030,13 @@"version": "1.6.0","license": "GPL-3.0-or-later","dependencies": {- "@microsoft/microsoft-graph-client": "^3.0.1",- "css-select": "^5.1.0",- "dom-serializer": "^2.0.0",- "domhandler": "^5.0.3",- "domutils": "^3.0.1",- "dotenv": "^16.0.0",- "htmlparser2": "^8.0.1",- "isomorphic-fetch": "^3.0.0"- },- "optionalDependencies": {"@azure/msal-browser": "^2.22.0","@azure/msal-node": "^1.6.0",- "@azure/msal-node-extensions": "^1.0.0-alpha.15"+ "@azure/msal-node-extensions": "^1.0.0-alpha.15",+ "@microsoft/microsoft-graph-client": "^3.0.1",+ "dotenv": "^16.0.0",+ "isomorphic-fetch": "^3.0.0",+ "node-html-parser": "github:thecodrr/node-html-parser"}},"node_modules/@notesnook-importer/onenote/node_modules/dotenv": {@@ -2981,12 +3057,8 @@"version": "1.6.0","license": "GPL-3.0-or-later","dependencies": {- "base64-js": "^1.5.1",- "css-select": "^5.1.0",- "dom-serializer": "^2.0.0",- "domhandler": "^5.0.3",- "domutils": "^3.0.1",- "htmlparser2": "^8.0.1",+ "base64-arraybuffer": "^1.0.2",+ "node-html-parser": "github:thecodrr/node-html-parser","spark-md5": "^3.0.2"}},@@ -3026,6 +3098,14 @@"resolved": "../../packages/theme","link": true},+ "node_modules/@notesnook/themes-server": {+ "resolved": "../../servers/themes",+ "link": true+ },+ "node_modules/@notesnook/ui": {+ "resolved": "../../packages/ui",+ "link": true+ },"node_modules/@notesnook/web-clipper": {"resolved": "../../extensions/web-clipper","link": true@@ -3077,6 +3157,7 @@"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.35.0.tgz","integrity": "sha512-6qXdd5edCBynOwsz1YcNfgX8tNWeuS9fxy5o59D0rvHXxRtjXRebB4gE4vFVfEMXl/z8zTnAzfOs7aQDEs8G4Q==","dev": true,+ "license": "Apache-2.0","dependencies": {"@types/node": "*","playwright-core": "1.35.0"@@ -3415,13 +3496,54 @@"version": "1.7.6","license": "AGPL-3.0-or-later","dependencies": {- "jsonwebtoken": "^9.0.0",+ "@standardnotes/common": "1.46.1",+ "jsonwebtoken": "^8.5.1","reflect-metadata": "^0.1.13"},"engines": {"node": ">=18.0.0 <19.0.0"}},+ "node_modules/@standardnotes/security/node_modules/@standardnotes/common": {+ "version": "1.46.1",+ "resolved": "https://registry.npmjs.org/@standardnotes/common/-/common-1.46.1.tgz",+ "integrity": "sha512-f9MjqfBAs4lcXbAwo31A2ahWRMPu6QwURCbtANGPt7dtPugFie8V6HVKe4Mwrzg32WwkYe+VrGAoizY/93flGg==",+ "dependencies": {+ "reflect-metadata": "^0.1.13"+ },+ "engines": {+ "node": ">=18.0.0 <19.0.0"+ }+ },+ "node_modules/@standardnotes/security/node_modules/jsonwebtoken": {+ "version": "8.5.1",+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",+ "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",+ "dependencies": {+ "jws": "^3.2.2",+ "lodash.includes": "^4.3.0",+ "lodash.isboolean": "^3.0.3",+ "lodash.isinteger": "^4.0.4",+ "lodash.isnumber": "^3.0.3",+ "lodash.isplainobject": "^4.0.6",+ "lodash.isstring": "^4.0.1",+ "lodash.once": "^4.0.0",+ "ms": "^2.1.1",+ "semver": "^5.6.0"+ },+ "engines": {+ "node": ">=4",+ "npm": ">=1.4.28"+ }+ },+ "node_modules/@standardnotes/security/node_modules/semver": {+ "version": "5.7.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",+ "bin": {+ "semver": "bin/semver"+ }+ },"node_modules/@streamparser/json": {"version": "0.0.10","license": "MIT"@@ -3733,6 +3855,50 @@"node": ">=10"}},+ "node_modules/@tanstack/query-core": {+ "version": "4.29.19",+ "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.29.19.tgz",+ "integrity": "sha512-uPe1DukeIpIHpQi6UzIgBcXsjjsDaLnc7hF+zLBKnaUlh7jFE/A+P8t4cU4VzKPMFB/C970n/9SxtpO5hmIRgw==",+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/tannerlinsley"+ }+ },+ "node_modules/@tanstack/react-query": {+ "version": "4.29.19",+ "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-4.29.19.tgz",+ "integrity": "sha512-XiTIOHHQ5Cw1WUlHaD4fmVUMhoWjuNJlAeJGq7eM4BraI5z7y8WkZO+NR8PSuRnQGblpuVdjClQbDFtwxTtTUw==",+ "dependencies": {+ "@tanstack/query-core": "4.29.19",+ "use-sync-external-store": "^1.2.0"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/tannerlinsley"+ },+ "peerDependencies": {+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",+ "react-native": "*"+ },+ "peerDependenciesMeta": {+ "react-dom": {+ "optional": true+ },+ "react-native": {+ "optional": true+ }+ }+ },+ "node_modules/@theme-ui/color": {+ "version": "0.14.7",+ "resolved": "https://registry.npmjs.org/@theme-ui/color/-/color-0.14.7.tgz",+ "integrity": "sha512-0e1IhJeaAkzAdYvFI98qZcUqxl38ZuCdE6DPVInM/73qXzvi5dmBs0B8Uto/X2bsViNDjTUk0eikhZVkeR8pwQ==",+ "dependencies": {+ "@theme-ui/css": "0.14.7",+ "polished": "^4.0.5"+ }+ },"node_modules/@theme-ui/components": {"version": "0.14.7","license": "MIT",@@ -3793,6 +3959,21 @@"@trpc/server": "10.31.0"}},+ "node_modules/@trpc/react-query": {+ "version": "10.31.0",+ "resolved": "https://registry.npmjs.org/@trpc/react-query/-/react-query-10.31.0.tgz",+ "integrity": "sha512-+M8sIsbf6e4H5XYvHlzDqhaf+ybfUigA/9OL3wXRp2vXhCedEiIERCnwNuHWFDRASl9vjOcM33AuJ4sbOOINEA==",+ "funding": [+ "https://trpc.io/sponsor"+ ],+ "peerDependencies": {+ "@tanstack/react-query": "^4.18.0",+ "@trpc/client": "10.31.0",+ "@trpc/server": "10.31.0",+ "react": ">=16.8.0",+ "react-dom": ">=16.8.0"+ }+ },"node_modules/@trpc/server": {"version": "10.31.0","resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.31.0.tgz",@@ -3808,8 +3989,8 @@"integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==","dev": true,"dependencies": {- "@babel/parser": "^7.20.7",- "@babel/types": "^7.20.7",+ "@babel/parser": "^7.1.0",+ "@babel/types": "^7.0.0","@types/babel__generator": "*","@types/babel__template": "*","@types/babel__traverse": "*"@@ -3894,7 +4075,8 @@},"node_modules/@types/parse-json": {"version": "4.0.0",- "license": "MIT"+ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",+ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="},"node_modules/@types/platform": {"version": "1.3.4",@@ -3946,6 +4128,12 @@"csstype": "^3.0.2"}},+ "node_modules/@types/tinycolor2": {+ "version": "1.4.3",+ "resolved": "https://registry.npmjs.org/@types/tinycolor2/-/tinycolor2-1.4.3.tgz",+ "integrity": "sha512-Kf1w9NE5HEgGxCRyIcRXR/ZYtDv0V8FVPtYHwLxl0O+maGX0erE77pQlD0gpP+/KByMZ87mOA79SjifhSB3PjQ==",+ "dev": true+ },"node_modules/@types/trusted-types": {"version": "2.0.3","dev": true,@@ -4111,7 +4299,7 @@"integrity": "sha512-qL/1faHUoCOvMstCFGkaGSK/nVoSAVN6NLFuIW4P6D5fvKdgxV8/KNfMFeuQUXReodILp4I6z+5a9zmuqK5t4g==","dependencies": {"classnames": "^2.3.0",- "eventemitter3": "^5.0.0",+ "eventemitter3": "^4.0.0","lodash.clamp": "^4.0.0","lodash.debounce": "^4.0.0","lodash.isequal": "^4.5.0",@@ -4122,6 +4310,11 @@"react-dom": "^17.0.0 || ^18.0.0"}},+ "node_modules/allotment/node_modules/eventemitter3": {+ "version": "4.0.7",+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",+ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="+ },"node_modules/ansi-regex": {"version": "5.0.1","resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",@@ -4164,6 +4357,14 @@"node": ">=10"}},+ "node_modules/argparse": {+ "version": "1.0.10",+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",+ "dependencies": {+ "sprintf-js": "~1.0.2"+ }+ },"node_modules/assertion-error": {"version": "1.1.0","resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",@@ -4212,6 +4413,7 @@"url": "https://tidelift.com/funding/github/npm/autoprefixer"}],+ "license": "MIT","dependencies": {"browserslist": "^4.21.5","caniuse-lite": "^1.0.30001464",@@ -4266,7 +4468,8 @@},"node_modules/babel-plugin-macros": {"version": "3.1.0",- "license": "MIT",+ "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz",+ "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==","dependencies": {"@babel/runtime": "^7.12.5","cosmiconfig": "^7.0.0",@@ -4326,6 +4529,14 @@"devOptional": true,"license": "MIT"},+ "node_modules/base64-arraybuffer": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",+ "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==",+ "engines": {+ "node": ">= 0.6.0"+ }+ },"node_modules/base64-js": {"version": "1.5.1","funding": [@@ -4355,7 +4566,6 @@"node_modules/bl": {"version": "4.1.0","license": "MIT",- "optional": true,"dependencies": {"buffer": "^5.5.0","inherits": "^2.0.4",@@ -4379,7 +4589,6 @@}],"license": "MIT",- "optional": true,"dependencies": {"base64-js": "^1.3.1","ieee754": "^1.1.13"@@ -4430,10 +4639,10 @@],"license": "MIT","dependencies": {- "caniuse-lite": "^1.0.30001449",- "electron-to-chromium": "^1.4.284",- "node-releases": "^2.0.8",- "update-browserslist-db": "^1.0.10"+ "caniuse-lite": "^1.0.30001400",+ "electron-to-chromium": "^1.4.251",+ "node-releases": "^2.0.6",+ "update-browserslist-db": "^1.0.9"},"bin": {"browserslist": "cli.js"@@ -4542,7 +4751,8 @@"type": "github","url": "https://github.com/sponsors/ai"}- ]+ ],+ "license": "CC-BY-4.0"},"node_modules/canvas": {"version": "2.11.2",@@ -4638,8 +4848,7 @@},"node_modules/chownr": {"version": "1.1.4",- "license": "ISC",- "optional": true+ "license": "ISC"},"node_modules/classnames": {"version": "2.3.2",@@ -4735,7 +4944,7 @@"dev": true,"license": "MIT","dependencies": {- "browserslist": "^4.21.5"+ "browserslist": "^4.21.4"},"funding": {"type": "opencollective",@@ -4744,7 +4953,8 @@},"node_modules/cosmiconfig": {"version": "7.1.0",- "license": "MIT",+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",+ "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==","dependencies": {"@types/parse-json": "^4.0.0","import-fresh": "^3.2.1",@@ -4870,7 +5080,6 @@"node_modules/decompress-response": {"version": "6.0.0","license": "MIT",- "optional": true,"dependencies": {"mimic-response": "^3.1.0"},@@ -4896,7 +5105,6 @@"node_modules/deep-extend": {"version": "0.6.0","license": "MIT",- "optional": true,"engines": {"node": ">=4.0.0"}@@ -4939,7 +5147,6 @@"node_modules/detect-libc": {"version": "2.0.1","license": "Apache-2.0",- "optional": true,"engines": {"node": ">=8"}@@ -5055,7 +5262,6 @@"node_modules/end-of-stream": {"version": "1.4.4","license": "MIT",- "optional": true,"dependencies": {"once": "^1.4.0"}@@ -5082,9 +5288,8 @@"dev": true,"license": "MIT","dependencies": {- "available-typed-arrays": "^1.0.5","call-bind": "^1.0.2",- "es-set-tostringtag": "^2.0.1",+ "es-set-tostringtag": "^2.0.0","es-to-primitive": "^1.2.1","function-bind": "^1.1.1","function.prototype.name": "^1.1.5",@@ -5097,7 +5302,7 @@"has-proto": "^1.0.1","has-symbols": "^1.0.3","internal-slot": "^1.0.4",- "is-array-buffer": "^3.0.1",+ "is-array-buffer": "^3.0.0","is-callable": "^1.2.7","is-negative-zero": "^2.0.2","is-regex": "^1.1.4",@@ -5199,7 +5404,8 @@},"node_modules/escape-string-regexp": {"version": "4.0.0",- "license": "MIT",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==","engines": {"node": ">=10"},@@ -5207,6 +5413,18 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/esprima": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",+ "bin": {+ "esparse": "bin/esparse.js",+ "esvalidate": "bin/esvalidate.js"+ },+ "engines": {+ "node": ">=4"+ }+ },"node_modules/estree-walker": {"version": "1.0.1","dev": true,@@ -5224,10 +5442,6 @@"version": "1.0.31","license": "MIT"},- "node_modules/eventemitter3": {- "version": "5.0.0",- "license": "MIT"- },"node_modules/exenv": {"version": "1.2.2","license": "BSD-3-Clause"@@ -5235,11 +5449,21 @@"node_modules/expand-template": {"version": "2.0.3","license": "(MIT OR WTFPL)",- "optional": true,"engines": {"node": ">=6"}},+ "node_modules/extend-shallow": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",+ "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==",+ "dependencies": {+ "is-extendable": "^0.1.0"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },"node_modules/fast-deep-equal": {"version": "3.1.3","dev": true,@@ -5266,17 +5490,6 @@"node": ">=8.6.0"}},- "node_modules/fast-glob/node_modules/glob-parent": {- "version": "5.1.2",- "dev": true,- "license": "ISC",- "dependencies": {- "is-glob": "^4.0.1"- },- "engines": {- "node": ">= 6"- }- },"node_modules/fast-json-stable-stringify": {"version": "2.1.0","dev": true,@@ -5328,10 +5541,6 @@"node": ">= 10"}},- "node_modules/file-selector/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/filelist": {"version": "1.0.4","dev": true,@@ -5393,7 +5602,8 @@},"node_modules/find-root": {"version": "1.1.0",- "license": "MIT"+ "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",+ "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng=="},"node_modules/follow-redirects": {"version": "1.15.2",@@ -5466,10 +5676,6 @@"react-dom": ">=16.8 || ^17.0.0 || ^18.0.0"}},- "node_modules/framer-motion/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/framesync": {"version": "6.0.1","license": "MIT",@@ -5477,14 +5683,9 @@"tslib": "^2.1.0"}},- "node_modules/framesync/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/fs-constants": {"version": "1.0.0",- "license": "MIT",- "optional": true+ "license": "MIT"},"node_modules/fs-extra": {"version": "9.1.0",@@ -5650,8 +5851,7 @@},"node_modules/github-from-package": {"version": "0.0.0",- "license": "MIT",- "optional": true+ "license": "MIT"},"node_modules/glob": {"version": "7.2.3",@@ -5672,6 +5872,18 @@"url": "https://github.com/sponsors/isaacs"}},+ "node_modules/glob-parent": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",+ "dev": true,+ "dependencies": {+ "is-glob": "^4.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },"node_modules/globals": {"version": "11.12.0","dev": true,@@ -5717,6 +5929,20 @@"dev": true,"license": "ISC"},+ "node_modules/gray-matter": {+ "version": "4.0.3",+ "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz",+ "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==",+ "dependencies": {+ "js-yaml": "^3.13.1",+ "kind-of": "^6.0.2",+ "section-matter": "^1.0.0",+ "strip-bom-string": "^1.0.0"+ },+ "engines": {+ "node": ">=6.0"+ }+ },"node_modules/happy-dom": {"version": "8.9.0","resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-8.9.0.tgz",@@ -5916,7 +6142,6 @@},"node_modules/ieee754": {"version": "1.2.1",- "devOptional": true,"funding": [{"type": "github",@@ -5970,20 +6195,18 @@},"node_modules/inherits": {"version": "2.0.4",- "devOptional": true,"license": "ISC"},"node_modules/ini": {"version": "1.3.8",- "license": "ISC",- "optional": true+ "license": "ISC"},"node_modules/internal-slot": {"version": "1.0.5","dev": true,"license": "MIT","dependencies": {- "get-intrinsic": "^1.2.0",+ "get-intrinsic": "^1.1.3","has": "^1.0.3","side-channel": "^1.0.4"},@@ -6074,6 +6297,14 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/is-extendable": {+ "version": "0.1.1",+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",+ "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==",+ "engines": {+ "node": ">=0.10.0"+ }+ },"node_modules/is-extglob": {"version": "2.1.1","dev": true,@@ -6293,6 +6524,18 @@"version": "4.0.0","license": "MIT"},+ "node_modules/js-yaml": {+ "version": "3.14.1",+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",+ "dependencies": {+ "argparse": "^1.0.7",+ "esprima": "^4.0.0"+ },+ "bin": {+ "js-yaml": "bin/js-yaml.js"+ }+ },"node_modules/jsesc": {"version": "2.5.2","dev": true,@@ -6354,20 +6597,6 @@"node": ">=0.10.0"}},- "node_modules/jsonwebtoken": {- "version": "9.0.0",- "license": "MIT",- "dependencies": {- "jws": "^3.2.2",- "lodash": "^4.17.21",- "ms": "^2.1.1",- "semver": "^7.3.8"- },- "engines": {- "node": ">=12",- "npm": ">=6"- }- },"node_modules/jwa": {"version": "1.4.1","license": "MIT",@@ -6389,7 +6618,6 @@"version": "7.9.0","hasInstallScript": true,"license": "MIT",- "optional": true,"dependencies": {"node-addon-api": "^4.3.0","prebuild-install": "^7.0.1"@@ -6397,8 +6625,15 @@},"node_modules/keytar/node_modules/node-addon-api": {"version": "4.3.0",- "license": "MIT",- "optional": true+ "license": "MIT"+ },+ "node_modules/kind-of": {+ "version": "6.0.3",+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",+ "engines": {+ "node": ">=0.10.0"+ }},"node_modules/leven": {"version": "3.1.0",@@ -6453,6 +6688,7 @@},"node_modules/lodash": {"version": "4.17.21",+ "dev": true,"license": "MIT"},"node_modules/lodash.clamp": {@@ -6653,7 +6889,6 @@"node_modules/mimic-response": {"version": "3.1.0","license": "MIT",- "optional": true,"engines": {"node": ">=10"},@@ -6675,7 +6910,6 @@"node_modules/minimist": {"version": "1.2.8","license": "MIT",- "optional": true,"funding": {"url": "https://github.com/sponsors/ljharb"}@@ -6734,8 +6968,7 @@},"node_modules/mkdirp-classic": {"version": "0.5.3",- "license": "MIT",- "optional": true+ "license": "MIT"},"node_modules/mlly": {"version": "1.3.0",@@ -6779,13 +7012,11 @@},"node_modules/napi-build-utils": {"version": "1.0.2",- "license": "MIT",- "optional": true+ "license": "MIT"},"node_modules/node-abi": {"version": "3.33.0","license": "MIT",- "optional": true,"dependencies": {"semver": "^7.3.5"},@@ -6794,9 +7025,9 @@}},"node_modules/node-addon-api": {- "version": "6.0.0",- "license": "MIT",- "optional": true+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.0.0.tgz",+ "integrity": "sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA=="},"node_modules/node-fetch": {"version": "2.6.9",@@ -6816,6 +7047,89 @@}}},+ "node_modules/node-html-parser": {+ "version": "5.1.0",+ "resolved": "git+ssh://[email protected]/thecodrr/node-html-parser.git#35d8d7b2965943b11e669e3e53438a681bbbdee2",+ "license": "MIT",+ "dependencies": {+ "css-select": "^4.1.3",+ "entities": "^3.0.1"+ }+ },+ "node_modules/node-html-parser/node_modules/css-select": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz",+ "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==",+ "dependencies": {+ "boolbase": "^1.0.0",+ "css-what": "^6.0.1",+ "domhandler": "^4.3.1",+ "domutils": "^2.8.0",+ "nth-check": "^2.0.1"+ },+ "funding": {+ "url": "https://github.com/sponsors/fb55"+ }+ },+ "node_modules/node-html-parser/node_modules/dom-serializer": {+ "version": "1.4.1",+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz",+ "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==",+ "dependencies": {+ "domelementtype": "^2.0.1",+ "domhandler": "^4.2.0",+ "entities": "^2.0.0"+ },+ "funding": {+ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"+ }+ },+ "node_modules/node-html-parser/node_modules/dom-serializer/node_modules/entities": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",+ "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",+ "funding": {+ "url": "https://github.com/fb55/entities?sponsor=1"+ }+ },+ "node_modules/node-html-parser/node_modules/domhandler": {+ "version": "4.3.1",+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz",+ "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==",+ "dependencies": {+ "domelementtype": "^2.2.0"+ },+ "engines": {+ "node": ">= 4"+ },+ "funding": {+ "url": "https://github.com/fb55/domhandler?sponsor=1"+ }+ },+ "node_modules/node-html-parser/node_modules/domutils": {+ "version": "2.8.0",+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz",+ "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==",+ "dependencies": {+ "dom-serializer": "^1.0.1",+ "domelementtype": "^2.2.0",+ "domhandler": "^4.2.0"+ },+ "funding": {+ "url": "https://github.com/fb55/domutils?sponsor=1"+ }+ },+ "node_modules/node-html-parser/node_modules/entities": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",+ "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",+ "engines": {+ "node": ">=0.12"+ },+ "funding": {+ "url": "https://github.com/fb55/entities?sponsor=1"+ }+ },"node_modules/node-releases": {"version": "2.0.10","dev": true,@@ -6909,7 +7223,6 @@},"node_modules/once": {"version": "1.4.0",- "devOptional": true,"license": "ISC","dependencies": {"wrappy": "1"@@ -7074,6 +7387,7 @@"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.35.0.tgz","integrity": "sha512-muMXyPmIx/2DPrCHOD1H1ePT01o7OdKxKj2ebmCAYvqhUy+Y1bpal7B0rdoxros7YrXI294JT/DWw2LqyiqTPA==","dev": true,+ "license": "Apache-2.0","bin": {"playwright-core": "cli.js"},@@ -7081,6 +7395,17 @@"node": ">=16"}},+ "node_modules/polished": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/polished/-/polished-4.2.2.tgz",+ "integrity": "sha512-Sz2Lkdxz6F2Pgnpi9U5Ng/WdWAUZxmHrNPoVlm3aAemxoy2Qy7LGjQg4uf8qKelDAUW94F4np3iH2YPf2qefcQ==",+ "dependencies": {+ "@babel/runtime": "^7.17.8"+ },+ "engines": {+ "node": ">=10"+ }+ },"node_modules/popmotion": {"version": "11.0.3","license": "MIT",@@ -7091,10 +7416,6 @@"tslib": "^2.1.0"}},- "node_modules/popmotion/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/postcss": {"version": "8.4.24","resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz",@@ -7114,6 +7435,7 @@"url": "https://github.com/sponsors/ai"}],+ "license": "MIT","dependencies": {"nanoid": "^3.3.6","picocolors": "^1.0.0",@@ -7132,7 +7454,6 @@"node_modules/prebuild-install": {"version": "7.1.1","license": "MIT",- "optional": true,"dependencies": {"detect-libc": "^2.0.0","expand-template": "^2.0.3",@@ -7203,7 +7524,6 @@"node_modules/pump": {"version": "3.0.0","license": "MIT",- "optional": true,"dependencies": {"end-of-stream": "^1.1.0","once": "^1.3.1"@@ -7255,7 +7575,6 @@"node_modules/rc": {"version": "1.2.8","license": "(BSD-2-Clause OR MIT OR Apache-2.0)",- "optional": true,"dependencies": {"deep-extend": "^0.6.0","ini": "~1.3.0",@@ -7393,7 +7712,6 @@"node_modules/readable-stream": {"version": "3.6.0","license": "MIT",- "optional": true,"dependencies": {"inherits": "^2.0.3","string_decoder": "^1.1.1",@@ -7456,9 +7774,9 @@"dev": true,"license": "MIT","dependencies": {- "@babel/regjsgen": "^0.8.0","regenerate": "^1.4.2","regenerate-unicode-properties": "^10.1.0",+ "regjsgen": "^0.7.1","regjsparser": "^0.9.1","unicode-match-property-ecmascript": "^2.0.0","unicode-match-property-value-ecmascript": "^2.1.0"@@ -7467,6 +7785,11 @@"node": ">=4"}},+ "node_modules/regjsgen": {+ "version": "0.7.1",+ "dev": true,+ "license": "MIT"+ },"node_modules/regjsparser": {"version": "0.9.1","dev": true,@@ -7701,6 +8024,18 @@"dev": true,"license": "MIT"},+ "node_modules/section-matter": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz",+ "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==",+ "dependencies": {+ "extend-shallow": "^2.0.1",+ "kind-of": "^6.0.0"+ },+ "engines": {+ "node": ">=4"+ }+ },"node_modules/semver": {"version": "7.3.8","license": "ISC",@@ -7708,10 +8043,7 @@"lru-cache": "^6.0.0"},"bin": {- "semver": "bin/semver.js"- },- "engines": {- "node": ">=10"+ "semver": "bin/semver"}},"node_modules/semver/node_modules/lru-cache": {@@ -7794,8 +8126,7 @@"url": "https://feross.org/support"}],- "license": "MIT",- "optional": true+ "license": "MIT"},"node_modules/simple-get": {"version": "4.0.1",@@ -7814,7 +8145,6 @@}],"license": "MIT",- "optional": true,"dependencies": {"decompress-response": "^6.0.0","once": "^1.3.1",@@ -7823,7 +8153,8 @@},"node_modules/source-map": {"version": "0.5.7",- "license": "BSD-3-Clause",+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",+ "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==","engines": {"node": ">=0.10.0"}@@ -7862,6 +8193,11 @@"version": "3.0.2","license": "(WTFPL OR MIT)"},+ "node_modules/sprintf-js": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",+ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="+ },"node_modules/stackback": {"version": "0.0.2","resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",@@ -7877,7 +8213,6 @@"node_modules/string_decoder": {"version": "1.3.0","license": "MIT",- "optional": true,"dependencies": {"safe-buffer": "~5.2.0"}@@ -7965,6 +8300,14 @@"node": ">=8"}},+ "node_modules/strip-bom-string": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz",+ "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==",+ "engines": {+ "node": ">=0.10.0"+ }+ },"node_modules/strip-comments": {"version": "2.0.1","dev": true,@@ -7976,7 +8319,6 @@"node_modules/strip-json-comments": {"version": "2.0.1","license": "MIT",- "optional": true,"engines": {"node": ">=0.10.0"}@@ -8001,10 +8343,6 @@"tslib": "^2.1.0"}},- "node_modules/style-value-types/node_modules/tslib": {- "version": "2.5.0",- "license": "0BSD"- },"node_modules/styled-system": {"version": "5.1.5","license": "MIT",@@ -8025,8 +8363,9 @@}},"node_modules/stylis": {- "version": "4.1.3",- "license": "MIT"+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",+ "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="},"node_modules/supports-color": {"version": "7.2.0",@@ -8080,7 +8419,6 @@"node_modules/tar-fs": {"version": "2.1.1","license": "MIT",- "optional": true,"dependencies": {"chownr": "^1.1.1","mkdirp-classic": "^0.5.2",@@ -8091,7 +8429,6 @@"node_modules/tar-stream": {"version": "2.2.0","license": "MIT",- "optional": true,"dependencies": {"bl": "^4.0.3","end-of-stream": "^1.4.1",@@ -8203,6 +8540,11 @@"integrity": "sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==","dev": true},+ "node_modules/tinycolor2": {+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz",+ "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw=="+ },"node_modules/tinypool": {"version": "0.5.0","resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.5.0.tgz",@@ -8243,10 +8585,14 @@"version": "0.0.3","license": "MIT"},+ "node_modules/tslib": {+ "version": "2.6.0",+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",+ "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA=="+ },"node_modules/tunnel-agent": {"version": "0.6.0","license": "Apache-2.0",- "optional": true,"dependencies": {"safe-buffer": "^5.0.1"},@@ -8414,13 +8760,11 @@},"node_modules/util-deprecate": {"version": "1.0.2",- "license": "MIT",- "optional": true+ "license": "MIT"},"node_modules/uuid": {"version": "8.3.2","license": "MIT",- "optional": true,"bin": {"uuid": "dist/bin/uuid"}@@ -9117,9 +9461,8 @@},"node_modules/vitest/node_modules/acorn-walk": {"version": "8.2.0",- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",- "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==","dev": true,+ "license": "MIT","engines": {"node": ">=0.4.0"}@@ -9293,6 +9636,7 @@"resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-7.0.0.tgz","integrity": "sha512-dg3qJU7tR/Gcd/XXOOo7x9QoCI9nk74JopaJaYAQ+ugLi57gPsXycVdBnYbayVj34m6Y8ppPwIuecrzkpBVwbA==","dev": true,+ "license": "MIT","dependencies": {"workbox-core": "7.0.0"}@@ -9306,7 +9650,6 @@},"node_modules/wrappy": {"version": "1.0.2",- "devOptional": true,"license": "ISC"},"node_modules/yallist": {@@ -9316,7 +9659,8 @@},"node_modules/yaml": {"version": "1.10.2",- "license": "ISC",+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",+ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==","engines": {"node": ">= 6"}diff --git a/apps/web/package.json b/apps/web/package.jsonindex ffa498dc2..a9048c232 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -13,9 +13,9 @@"@dnd-kit/core": "^6.0.5","@dnd-kit/modifiers": "^6.0.0","@dnd-kit/sortable": "^7.0.1",- "@emotion/react": "^11.10.0",- "@mdi/js": "^6.9.96",- "@mdi/react": "^1.6.0",+ "@emotion/react": "11.11.1",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1","@notesnook-importer/core": "^1.7.1","@notesnook/common": "file:../../packages/common","@notesnook/core": "file:../../packages/core",@@ -26,12 +26,17 @@"@notesnook/logger": "file:../../packages/logger","@notesnook/streamable-fs": "file:../../packages/streamable-fs","@notesnook/theme": "file:../../packages/theme",+ "@notesnook/themes-server": "file:../../servers/themes",+ "@notesnook/ui": "file:../../packages/ui","@notesnook/web-clipper": "file:../../extensions/web-clipper","@react-pdf-viewer/core": "^3.12.0","@react-pdf-viewer/toolbar": "^3.12.0",+ "@tanstack/react-query": "^4.29.19",+ "@theme-ui/color": "^0.14.7","@theme-ui/components": "^0.14.7","@theme-ui/core": "^0.14.7","@trpc/client": "10.31.0",+ "@trpc/react-query": "10.31.0","allotment": "^1.19.0","axios": "^1.3.4","clipboard-polyfill": "^3.0.3",@@ -60,6 +65,7 @@"react-scroll-sync": "^0.9.0","react-virtuoso": "^3.0.0","timeago.js": "^4.0.2",+ "tinycolor2": "^1.6.0","w3c-keyname": "^2.2.6","web-streams-polyfill": "^3.1.1","wouter": "2.7.3",@@ -77,6 +83,7 @@"@types/react": "17.0.2","@types/react-dom": "17.0.2","@types/react-modal": "^3.13.1",+ "@types/tinycolor2": "^1.4.3","@vitejs/plugin-react-swc": "^3.3.2","autoprefixer": "^10.4.14","buffer": "^6.0.3",@@ -107,7 +114,10 @@"react@>17": "17.0.2","react-dom@>17": "17.0.2","@types/react@>17": "17.0.2",- "@types/react-dom@>17": "17.0.2"+ "@types/react-dom@>17": "17.0.2",+ "@emotion/react@>11": "11.10.5",+ "@theme-ui/components@>0": "0.14.7",+ "@theme-ui/core@>0": "0.14.7"},"scripts": {"start": "cross-env PLATFORM=web vite",diff --git a/apps/web/src/app-effects.tsx b/apps/web/src/app-effects.tsxindex 3b665e612..230c3e657 100644--- a/apps/web/src/app-effects.tsx+++ b/apps/web/src/app-effects.tsx@@ -35,11 +35,9 @@ import {showAnnouncementDialog,showBuyDialog,showFeatureDialog,- showInvalidSystemTimeDialog,showOnboardingDialog} from "./common/dialog-controller";import useSystemTheme from "./hooks/use-system-theme";-import { updateStatus, removeStatus, getStatus } from "./hooks/use-status";import { showToast } from "./utils/toast";import { interruptedOnboarding } from "./dialogs/onboarding-dialog";@@ -57,7 +55,7 @@ export default function AppEffects({ setShow }: AppEffectsProps) {const initStore = useStore((store) => store.init);const initAttachments = useAttachmentStore((store) => store.init);const setIsVaultCreated = useStore((store) => store.setIsVaultCreated);- const setTheme = useThemeStore((store) => store.setTheme);+ const setColorScheme = useThemeStore((store) => store.setColorScheme);const followSystemTheme = useThemeStore((store) => store.followSystemTheme);const initEditorStore = useEditorStore((store) => store.init);const dialogAnnouncements = useAnnouncementStore(@@ -207,8 +205,8 @@ export default function AppEffects({ setShow }: AppEffectsProps) {useEffect(() => {if (!followSystemTheme) return;- setTheme(isSystemThemeDark ? "dark" : "light");- }, [isSystemThemeDark, followSystemTheme, setTheme]);+ setColorScheme(isSystemThemeDark ? "dark" : "light");+ }, [isSystemThemeDark, followSystemTheme, setColorScheme]);useEffect(() => {const { unsubscribe } =diff --git a/apps/web/src/app.css b/apps/web/src/app.cssindex c1469faf3..8af00af31 100644--- a/apps/web/src/app.css+++ b/apps/web/src/app.css@@ -1,10 +1,18 @@:root {- --focus-border: var(--primary);- --separator-border: var(--border);--sash-size: 10px;--sash-hover-size: 4px;}+.sash-module_sash__K-9lB.sash-module_hover__80W6I:before,+.sash-module_sash__K-9lB.sash-module_active__bJspD:before {+ background: var(--accent);+}++.allotment-module_splitView__L-yRc.allotment-module_separatorBorder__x-rDS+ > .allotment-module_splitViewContainer__rQnVa+ > .allotment-module_splitViewView__MGZ6O:not(:first-child)::before {+ background-color: var(--border);+}/* open-sans-regular - vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic */@font-face {font-family: "Open Sans";@@ -158,13 +166,13 @@ textarea,::-moz-selection {/* Code for Firefox */- background-color: var(--dimPrimary);- color: var(--text);+ background-color: var(--textSelection);+ color: var(--paragraph);}::selection {- background-color: var(--dimPrimary);- color: var(--text);+ background-color: var(--textSelection);+ color: var(--paragraph);}.middle-pane {@@ -192,8 +200,8 @@ textarea,.ms-track:hover,.ms-track:active {- background: var(--bgSecondary) !important;- border-width: 0px !important;+ background: var(--background-secondary) !important;+ border-left: 1px solid var(--border-secondary) !important;}.ms-track {@@ -205,5 +213,5 @@ textarea,}.ms-thumb {- background: var(--bgSecondaryText) !important;+ background: var(--paragraph-secondary) !important;}diff --git a/apps/web/src/app.tsx b/apps/web/src/app.tsxindex 5d306d4f5..465925b59 100644--- a/apps/web/src/app.tsx+++ b/apps/web/src/app.tsx@@ -19,7 +19,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React, { useState, Suspense, useRef } from "react";import { Box, Flex } from "@theme-ui/components";-import ThemeProvider from "./components/theme-provider";+import {+ BaseThemeProvider,+ ScopedThemeProvider+} from "./components/theme-provider";import useMobile from "./hooks/use-mobile";import useTablet from "./hooks/use-tablet";import { LazyMotion, domAnimation } from "framer-motion";@@ -52,7 +55,7 @@ function App() {return (<LazyMotion features={domAnimation} strict>- <ThemeProvider>+ <BaseThemeProvider sx={{ height: "100%" }} addGlobalStyles>{isAppLoaded && (<Suspense fallback={<div style={{ display: "none" }} />}><div id="menu-wrapper">@@ -84,7 +87,7 @@ function App() {)}<Toaster containerClassName="toasts-container" /></Flex>- </ThemeProvider>+ </BaseThemeProvider></LazyMotion>);}@@ -173,9 +176,18 @@ function DesktopAppContents({visible={show}priority={LayoutPriority.Normal}>- <Flex className="listMenu" variant="columnFill">+ <ScopedThemeProvider+ className="listMenu"+ scope="list"+ sx={{+ display: "flex",+ flexDirection: "column",+ flex: 1,+ bg: "background"+ }}+ >{isAppLoaded && <CachedRouter />}- </Flex>+ </ScopedThemeProvider></Allotment.Pane><Allotment.PaneclassName="pane editor-pane"@@ -183,18 +195,22 @@ function DesktopAppContents({><Flexsx={{+ display: "flex",overflow: "hidden",flex: 1,- flexDirection: "column"+ flexDirection: "column",+ bg: "background"}}>- {isAppLoaded && (- <SuspenseLoader- fallback={<EditorLoader />}- component={HashRouter}- condition={isAppLoaded}- />- )}+ <ScopedThemeProvider scope="editor" sx={{ flex: 1 }}>+ {isAppLoaded && (+ <SuspenseLoader+ fallback={<EditorLoader />}+ component={HashRouter}+ condition={isAppLoaded}+ />+ )}+ </ScopedThemeProvider></Flex></Allotment.Pane></Allotment>diff --git a/apps/web/src/common/dialog-controller.tsx b/apps/web/src/common/dialog-controller.tsxindex 6ab4a9501..6fa0d4242 100644--- a/apps/web/src/common/dialog-controller.tsx+++ b/apps/web/src/common/dialog-controller.tsx@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import ReactDOM from "react-dom";import { Dialogs } from "../dialogs";-import ThemeProvider from "../components/theme-provider";import qclone from "qclone";import { store as notebookStore } from "../stores/notebook-store";import { store as tagStore } from "../stores/tag-store";@@ -39,7 +38,8 @@ import { Suspense } from "react";import { Reminder } from "@notesnook/core/collections/reminders";import { ConfirmDialogProps } from "../dialogs/confirm";import { getFormattedDate } from "@notesnook/common";-import { downloadUpdate, installUpdate } from "../utils/updater";+import { downloadUpdate } from "../utils/updater";+import { ThemeMetadata } from "@notesnook/themes-server";type DialogTypes = typeof Dialogs;type DialogIds = keyof DialogTypes;@@ -68,11 +68,9 @@ function showDialog<TId extends DialogIds, TReturnType>(};const PropDialog = () => render(Dialogs[id], perform);ReactDOM.render(- <ThemeProvider>- <Suspense fallback={<div />}>- <PropDialog />- </Suspense>- </ThemeProvider>,+ <Suspense fallback={<div />}>+ <PropDialog />+ </Suspense>,container,() => (openDialogs[id] = true));@@ -316,6 +314,12 @@ export function showProgressDialog<T>(dialogData: ProgressDialogProps) {);}+export function showThemeDetails(theme: ThemeMetadata) {+ return showDialog("ThemeDetailsDialog", (Dialog, perform) => (+ <Dialog theme={theme} onClose={(res: boolean) => perform(res)} />+ ));+}+export function showMoveNoteDialog(noteIds: string[]) {return showDialog("MoveDialog", (Dialog, perform) => (<Dialog noteIds={noteIds} onClose={(res: boolean) => perform(res)} />@@ -390,7 +394,13 @@ function getDialogData(type: string) {subtitle: (<>All your data will be re-encrypted and synced with the new password.- <Text as="div" mt={1} p={1} bg="errorBg" sx={{ color: "error" }}>+ <Text+ as="div"+ mt={1}+ p={1}+ bg="var(--background-error)"+ sx={{ color: "var(--paragraph-error)" }}+ ><Text as="p" my={0} sx={{ color: "inherit" }}>It is recommended that you <b>log out from all other devices</b>{" "}before continuing.@@ -416,7 +426,7 @@ function getDialogData(type: string) {return {title: "Delete your account",subtitle: (- <Text as="span" sx={{ color: "error" }}>+ <Text as="span" sx={{ color: "var(--paragraph-error)" }}>All your data will be permanently deleted with{" "}<b>no way of recovery</b>. Proceed with caution.</Text>diff --git a/apps/web/src/common/index.js b/apps/web/src/common/index.jsindex 5cbfb8ece..848abf32e 100644--- a/apps/web/src/common/index.js+++ b/apps/web/src/common/index.js@@ -27,12 +27,11 @@ import Config from "../utils/config";import { hashNavigate, getCurrentHash } from "../navigation";import { db } from "./db";import { sanitizeFilename } from "@notesnook/common";-import { store as userstore } from "../stores/user-store";import FileSaver from "file-saver";import { showToast } from "../utils/toast";import { SUBSCRIPTION_STATUS } from "./constants";-import { showFilePicker } from "../components/editor/picker";+import { showFilePicker } from "../utils/file-picker";import { logger } from "../utils/logger";import { PATHS } from "@notesnook/desktop";import { TaskManager } from "./task-manager";diff --git a/apps/web/src/common/notices.ts b/apps/web/src/common/notices.tsindex 0a661108c..a7f63c56a 100644--- a/apps/web/src/common/notices.ts+++ b/apps/web/src/common/notices.ts@@ -174,7 +174,7 @@ function isIgnored(key: keyof typeof NoticesData) {return Config.get(`ignored:${key}`, false);}-var openedToast: { hide: () => void } | null = null;+let openedToast: { hide: () => void } | null = null;async function saveBackup() {if (IS_DESKTOP_APP) {await createBackup();@@ -191,7 +191,7 @@ async function saveBackup() {openedToast?.hide();openedToast = null;},- type: "text"+ type: "paragraph"},{text: "Download",@@ -200,7 +200,7 @@ async function saveBackup() {openedToast?.hide();openedToast = null;},- type: "primary"+ type: "accent"}],0diff --git a/apps/web/src/common/task-manager.ts b/apps/web/src/common/task-manager.tsindex 2c5aca4d0..ab73e0b04 100644--- a/apps/web/src/common/task-manager.ts+++ b/apps/web/src/common/task-manager.ts@@ -67,8 +67,7 @@ export class TaskManager {updateStatus({key: statusTask.id,status: progress.text,- progress: percentage,- icon: null+ progress: percentage});});removeStatus(statusTask.id);diff --git a/apps/web/src/common/themes-router.ts b/apps/web/src/common/themes-router.tsnew file mode 100644index 000000000..266362c6d--- /dev/null+++ b/apps/web/src/common/themes-router.ts@@ -0,0 +1,32 @@+/*+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 type { ThemesRouter as ThemesRouterType } from "@notesnook/themes-server";+import { createTRPCProxyClient, httpBatchLink } from "@trpc/client";+import { createTRPCReact } from "@trpc/react-query";++export const THEME_SERVER_URL = "https://themes.notesnook.com";+export const ThemesRouter = createTRPCProxyClient<ThemesRouterType>({+ links: [+ httpBatchLink({+ url: THEME_SERVER_URL+ })+ ]+});+export const ThemesTRPC = createTRPCReact<ThemesRouterType>();diff --git a/apps/web/src/components/accent-item/index.jsx b/apps/web/src/components/accent-item/index.jsxdeleted file mode 100644index b1a4f2155..000000000--- a/apps/web/src/components/accent-item/index.jsx+++ /dev/null@@ -1,58 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import { Flex } from "@theme-ui/components";-import { Checkmark, Circle } from "../icons";-import { useStore as useThemeStore } from "../../stores/theme-store";-import { showBuyDialog } from "../../common/dialog-controller";-import { isUserPremium } from "../../hooks/use-is-user-premium";--function AccentItem(props) {- const { code, label } = props;- const setAccent = useThemeStore((store) => store.setAccent);- const accent = useThemeStore((store) => store.accent);-- return (- <Flex- variant="rowCenter"- sx={{ position: "relative" }}- onClick={async () => {- if (isUserPremium()) setAccent(code);- else {- await showBuyDialog();- }- }}- key={label}- >- {code === accent && (- <Checkmark- sx={{- position: "absolute",- zIndex: 1,- cursor: "pointer"- }}- color="static"- size={20}- />- )}- <Circle size={40} sx={{ cursor: "pointer" }} color={code} />- </Flex>- );-}-export default AccentItem;diff --git a/apps/web/src/components/accordion/index.tsx b/apps/web/src/components/accordion/index.tsxindex 3548e0bdc..38cf83c15 100644--- a/apps/web/src/components/accordion/index.tsx+++ b/apps/web/src/components/accordion/index.tsx@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { SchemeColors } from "@notesnook/theme/dist/theme/colorscheme";+import { SchemeColors } from "@notesnook/theme";import { Flex, FlexProps, Text } from "@theme-ui/components";import { PropsWithChildren, useEffect, useState } from "react";import { ChevronDown, ChevronUp } from "../icons";@@ -25,7 +25,7 @@ import { ChevronDown, ChevronUp } from "../icons";export type AccordionProps = {title: string;isClosed: boolean;- color?: keyof SchemeColors;+ color?: SchemeColors;testId?: string;};@@ -46,7 +46,7 @@ export default function Accordion(justifyContent: "space-between",alignItems: "center",cursor: "pointer",- bg: "bgSecondary",+ bg: "var(--background-secondary)",p: 1,borderRadius: "default"}}diff --git a/apps/web/src/components/announcements/body.jsx b/apps/web/src/components/announcements/body.jsxindex 981ff85b2..2185dbca7 100644--- a/apps/web/src/components/announcements/body.jsx+++ b/apps/web/src/components/announcements/body.jsx@@ -42,6 +42,7 @@ import {import { store as appStore } from "../../stores/app-store";import { createBackup } from "../../common";import { allowedPlatforms } from "../../stores/announcement-store";+import { alpha } from "@theme-ui/color";var margins = [0, 2];var HORIZONTAL_MARGIN = 3;@@ -195,7 +196,7 @@ function Description({ item, fontSize, color }) {...mapStyle(style),fontSize: fontSize,fontWeight: "normal",- color: color || "fontTertiary"+ color: color || "paragraph"}}/>);@@ -273,8 +274,8 @@ function InlineCalltoActions({ item, dismissAnnouncement }) {textDecoration: "underline",textDecorationLine: "underline",textDecorationColor:- index === 0 ? "var(--dimPrimary)" : "var(--bgSecondary)",- color: index === 0 ? "primary" : "fontTertiary",+ index === 0 ? alpha("accent", 0.7) : "border",+ color: index === 0 ? "accent" : "paragraph",fontWeight: "bold",":first-of-type": {mr: 1diff --git a/apps/web/src/components/announcements/index.jsx b/apps/web/src/components/announcements/index.jsxindex 966c4e52b..30502c146 100644--- a/apps/web/src/components/announcements/index.jsx+++ b/apps/web/src/components/announcements/index.jsx@@ -24,6 +24,8 @@ import AnnouncementBody from "./body";import { useStore as useAnnouncementStore } from "../../stores/announcement-store";import Notice from "../notice";+import { alpha } from "@theme-ui/color";+function Announcements() {const announcements = useAnnouncementStore((store) => store.inlineAnnouncements@@ -37,7 +39,7 @@ function Announcements() {mx={1}mb={2}py={2}- bg="bgSecondary"+ bg="var(--background-secondary)"sx={{borderRadius: "default",position: "relative",@@ -45,9 +47,9 @@ function Announcements() {}}><Text- bg="errorBg"p="2px"sx={{+ bg: alpha("red", 0.2),position: "absolute",right: 2,top: 2,@@ -61,7 +63,7 @@ function Announcements() {dismiss(announcement.id);}}>- <Cross color="error" size={16} />+ <Cross size={16} color="red" /></Text><AnnouncementBody components={announcement.body} type="inline" /></Flex>diff --git a/apps/web/src/components/attachment/index.tsx b/apps/web/src/components/attachment/index.tsxindex 723da0c84..5c3a91cec 100644--- a/apps/web/src/components/attachment/index.tsx+++ b/apps/web/src/components/attachment/index.tsx@@ -58,6 +58,7 @@ import {import { useEffect, useState } from "react";import { AppEventManager, AppEvents } from "../../common/app-events";import { getFormattedDate } from "@notesnook/common";+import { MenuItem } from "@notesnook/ui";const FILE_ICONS: Record<string, Icon> = {"image/": FileImage,@@ -120,17 +121,14 @@ export function Attachment({};}, [attachment.metadata.hash]);- const Icon = getFileIcon(attachment.metadata.type);+ const FileIcon = getFileIcon(attachment.metadata.type);return (<Boxas="tr"sx={{ height: 30, ":hover": { bg: "hover" } }}onContextMenu={(e) => {e.preventDefault();- Menu.openMenu(AttachmentMenuItems, {- attachment,- status- });+ Menu.openMenu(AttachmentMenuItems(attachment, status));}}onClick={onSelected}>@@ -138,7 +136,11 @@ export function Attachment({<td><Label><Checkbox- sx={{ width: 18, height: 18 }}+ sx={{+ width: 18,+ height: 18,+ color: isSelected ? "accent" : "icon"+ }}checked={isSelected}onChange={onSelected}/>@@ -154,9 +156,9 @@ export function Attachment({>{status ? (status.type === "download" ? (- <Download size={16} color="primary" />+ <Download size={16} color="accent" />) : (- <Uploading size={16} color="primary" />+ <Uploading size={16} color="accent" />)) : attachment.failed ? (<AttachmentError@@ -167,7 +169,7 @@ export function Attachment({) : attachment.working ? (<Loading size={16} />) : (- <Icon size={16} />+ <FileIcon size={16} />)}<Textvariant="body"@@ -188,20 +190,23 @@ export function Attachment({) : attachment.dateUploaded ? (<DoubleCheckmarksx={{ flexShrink: 0 }}- color={"primary"}+ color={"accent"}size={16}title={"Uploaded"}/>) : (<Checkmarksx={{ flexShrink: 0 }}- color={"icon"}size={16}title={"Waiting for upload"}/>)}</Text>- <Text as="td" variant="body" sx={{ color: status ? "primary" : "text" }}>+ <Text+ as="td"+ variant="body"+ sx={{ color: status ? "accent" : "paragraph" }}+ >{status ? (<>{formatBytes(status.loaded, 1)}/{formatBytes(status.total, 1)}@@ -221,110 +226,101 @@ export function Attachment({);}-type MenuActionParams = {- attachment: any;- status: AttachmentProgressStatus;-};--type MenuItemValue<T> = T | ((options: MenuActionParams) => T);-type MenuItem = {- type?: "separator";- key: string;- title?: MenuItemValue<string>;- icon?: MenuItemValue<Icon>;- onClick?: (options: MenuActionParams) => void;- disabled?: MenuItemValue<boolean | string>;- color?: MenuItemValue<string>;- iconColor?: MenuItemValue<string>;- multiSelect?: boolean;- items?: MenuItemValue<MenuItem[]>;-};-const AttachmentMenuItems: MenuItem[] = [- {- key: "notes",- title: "Notes",- icon: References,- items: ({ attachment }) =>- (attachment.noteIds as string[]).reduce((prev, curr) => {- const note = db.notes?.note(curr);- if (!note)- prev.push({- key: curr,- title: `Note with id ${curr}`,- onClick: () => showToast("error", "This note does not exist.")- });- else- prev.push({- key: note.id,- title: note.title,- onClick: () => {- hashNavigate(`/notes/${curr}/edit`);- closeOpenedDialog();- }- });- return prev;- }, [] as MenuItem[])- },- {- key: "recheck",- title: () => "Recheck",- icon: DoubleCheckmark,- disabled: ({ attachment }) =>- !attachment.dateUploaded ? "This attachment is not uploaded yet." : false,- onClick: async ({ attachment }) => {- await store.recheck([attachment.metadata.hash]);- }- },- {- key: "rename",- title: () => "Rename",- icon: Rename,- onClick: async ({ attachment }) => {- const newName = await showPromptDialog({- title: "Rename attachment",- description: attachment.metadata.filename,- defaultValue: attachment.metadata.filename- });- if (!newName) return;- await store.rename(attachment.metadata.hash, newName);- }- },- {- key: "download",- title: ({ status }) =>- status?.type === "download" ? "Cancel download" : "Download",- icon: Download,- disabled: ({ attachment }) =>- !attachment.dateUploaded ? "This attachment is not uploaded yet." : false,- onClick: async ({ attachment, status }) => {- const isDownloading = status?.type === "download";- if (isDownloading) {- await db.fs?.cancel(attachment.metadata.hash, "download");- } else await saveAttachment(attachment.metadata.hash);- }- },- {- key: "reupload",- title: ({ status }) =>- status?.type === "upload" ? "Cancel upload" : "Reupload",- icon: Reupload,- onClick: async ({ attachment, status }) => {- const isDownloading = status?.type === "upload";- if (isDownloading) {- await db.fs?.cancel(attachment.metadata.hash, "upload");- } else- await reuploadAttachment(- attachment.metadata.type,- attachment.metadata.hash- );+const AttachmentMenuItems: (+ attachment: any,+ status?: AttachmentProgressStatus+) => MenuItem[] = (attachment, status) => {+ return [+ {+ type: "button",+ key: "notes",+ title: "Notes",+ icon: References.path,+ menu: {+ items: (attachment.noteIds as string[]).reduce((prev, curr) => {+ const note = db.notes?.note(curr);+ if (!note)+ prev.push({+ type: "button",+ key: curr,+ title: `Note with id ${curr}`,+ onClick: () => showToast("error", "This note does not exist.")+ });+ else+ prev.push({+ type: "button",+ key: note.id,+ title: note.title,+ onClick: () => {+ hashNavigate(`/notes/${curr}/edit`);+ closeOpenedDialog();+ }+ });+ return prev;+ }, [] as MenuItem[])+ }+ },+ {+ type: "button",+ key: "recheck",+ title: "Recheck",+ icon: DoubleCheckmark.path,+ isDisabled: !attachment.dateUploaded,+ onClick: async () => {+ await store.recheck([attachment.metadata.hash]);+ }+ },+ {+ type: "button",+ key: "rename",+ title: "Rename",+ icon: Rename.path,+ onClick: async () => {+ const newName = await showPromptDialog({+ title: "Rename attachment",+ description: attachment.metadata.filename,+ defaultValue: attachment.metadata.filename+ });+ if (!newName) return;+ await store.rename(attachment.metadata.hash, newName);+ }+ },+ {+ type: "button",+ key: "download",+ title: status?.type === "download" ? "Cancel download" : "Download",+ icon: Download.path,+ isDisabled: !attachment.dateUploaded,+ onClick: async () => {+ const isDownloading = status?.type === "download";+ if (isDownloading) {+ await db.fs?.cancel(attachment.metadata.hash, "download");+ } else await saveAttachment(attachment.metadata.hash);+ }+ },+ {+ type: "button",+ key: "reupload",+ title: status?.type === "upload" ? "Cancel upload" : "Reupload",+ icon: Reupload.path,+ onClick: async () => {+ const isDownloading = status?.type === "upload";+ if (isDownloading) {+ await db.fs?.cancel(attachment.metadata.hash, "upload");+ } else+ await reuploadAttachment(+ attachment.metadata.type,+ attachment.metadata.hash+ );+ }+ },+ {+ type: "button",+ key: "permanent-delete",+ styles: { icon: { color: "red" }, text: { color: "red" } },+ title: "Delete permanently",+ icon: DeleteForver.path,+ onClick: () => Multiselect.deleteAttachments([attachment])}- },- {- key: "permanent-delete",- color: "error",- iconColor: "error",- title: () => "Delete permanently",- icon: DeleteForver,- onClick: ({ attachment }) => Multiselect.deleteAttachments([attachment])- }-];+ ];+};diff --git a/apps/web/src/components/auth-container/index.jsx b/apps/web/src/components/auth-container/index.jsxindex f1c23608a..eb5b6a028 100644--- a/apps/web/src/components/auth-container/index.jsx+++ b/apps/web/src/components/auth-container/index.jsx@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { useMemo } from "react";import { Box, Flex, Image, Link, Text } from "@theme-ui/components";-import ThemeProvider from "../theme-provider";+import { BaseThemeProvider } from "../theme-provider";import Logo from "../../assets/logo.svg";import LogoDark from "../../assets/logo-dark.svg";import { useStore as useThemeStore } from "../../stores/theme-store";@@ -77,164 +77,168 @@ function randomTitle() {}function AuthContainer(props) {- const theme = useThemeStore((store) => store.theme);+ const colorScheme = useThemeStore((store) => store.colorScheme);const testimonial = useMemo(() => randomTestimonial(), []);const title = useMemo(() => randomTitle(), []);return (- <ThemeProvider>- <Flex sx={{ position: "relative", height: "100%", bg: "background" }}>+ <BaseThemeProvider+ addGlobalStyles+ sx={{+ display: "flex",+ position: "relative",+ height: "100%",+ bg: "background"+ }}+ >+ <Box+ sx={{+ position: "relative",+ overflow: "hidden",+ flexDirection: "column",+ display: ["none", "none", "flex"],+ flex: 1+ }}+ ><Box+ as="svg"+ version="1.1"+ viewBox="0 0 1920 1080"+ preserveAspectRatio="xMinYMin slice"sx={{- position: "relative",- overflow: "hidden",- flexDirection: "column",- display: ["none", "none", "flex"],- flex: 1- }}- >- <Box- as="svg"- version="1.1"- viewBox="0 0 1920 1080"- preserveAspectRatio="xMinYMin slice"- sx={{- position: "absolute",- top: -100,- left: 0,- height: "100%"- // opacity: 0.7,- }}- >- <g mask='url("#SvgjsMask1017")' fill="none">- <path- d="M1184.21-85.14C1033.8-60.27 964.89 302.42 717.38 307.22 469.87 312.02 483.97 244.72 250.55 244.72 17.13 244.72-98.53 307.08-216.28 307.22"- stroke="var(--text)"- strokeWidth="2"- ></path>- <path- d="M641.38-10.43C534.57 43 590.55 387.5 384.53 392.38 178.52 397.26 2.17 282.99-129.16 282.38"- stroke="var(--text)"- strokeWidth="2"- ></path>- <path- d="M1136.18-29.24C957.53-5.77 852.26 404.49 561.01 405.07 269.76 405.65 142.54 160.4-14.16 155.07"- stroke="var(--text)"- strokeWidth="2"- ></path>- <path- d="M508.47-71.88C398.16-66.29 333.42 117.75 114.38 127.84-104.65 137.93-170.96 308.31-279.7 312.84"- stroke="var(--text)"- strokeWidth="2"- ></path>- <path- d="M1104.88-26.74C976.63-19.04 883.5 217.2 653.03 218.11 422.55 219.02 427.1 155.61 201.17 155.61-24.75 155.61-136.64 217.96-250.68 218.11"- stroke="var(--text)"- strokeWidth="2"- ></path>- </g>- <defs>- <mask id="SvgjsMask1017">- <rect width="1440" height="500" fill="#ffffff"></rect>- </mask>- </defs>- </Box>-- <Flex- p={50}- sx={{- zIndex: 1,- flex: 1,- flexDirection: "column",- alignItems: "start",- justifyContent: "end"- }}- >- <Image- src={theme === "dark" ? LogoDark : Logo}- sx={{ borderRadius: "default", width: 70, alignSelf: "start" }}- mb={4}- />- <Text variant={"heading"} sx={{ fontSize: 48 }}>- {title}- </Text>-- <Text variant="body" mt={10} sx={{ fontSize: 14, color: "icon" }}>- {testimonial.text} —{" "}- <Link- sx={{ fontStyle: "italic", color: "icon" }}- href={testimonial.link}- >- source- </Link>- </Text>- <Flex- mt={2}- sx={{ alignItems: "center", justifyContent: "center" }}- >- <Image- src={testimonial.image}- sx={{ borderRadius: 50, width: 40 }}- />- <Flex ml={2} sx={{ flexDirection: "column" }}>- <Text- variant="body"- sx={{ fontSize: 14, fontWeight: "bold", color: "icon" }}- >- {testimonial.name}- </Text>- <Text variant="subBody">@{testimonial.username}</Text>- </Flex>- </Flex>- </Flex>- </Box>- <Flex- sx={{- position: "relative",- flex: 1.5,- flexDirection: "column"+ position: "absolute",+ top: -100,+ left: 0,+ height: "100%"+ // opacity: 0.7,}}>- <Box- as="svg"- version="1.1"- viewBox="0 0 1920 1080"- preserveAspectRatio="xMinYMin slice"- sx={{- position: "absolute",- top: 0,- left: 0,- right: 0,- bottom: 0,- width: "130%",- height: "100%"- }}- >+ <g mask='url("#SvgjsMask1017")' fill="none"><path- d="M0 336L29.2 316.2C58.3 296.3 116.7 256.7 174.8 267.5C233 278.3 291 339.7 349.2 361.3C407.3 383 465.7 365 523.8 359.5C582 354 640 361 698.2 346.5C756.3 332 814.7 296 872.8 267.2C931 238.3 989 216.7 1047.2 202.3C1105.3 188 1163.7 181 1221.8 202.7C1280 224.3 1338 274.7 1396.2 298C1454.3 321.3 1512.7 317.7 1570.8 332C1629 346.3 1687 378.7 1745.2 366.2C1803.3 353.7 1861.7 296.3 1890.8 267.7L1920 239L1920 0L1890.8 0C1861.7 0 1803.3 0 1745.2 0C1687 0 1629 0 1570.8 0C1512.7 0 1454.3 0 1396.2 0C1338 0 1280 0 1221.8 0C1163.7 0 1105.3 0 1047.2 0C989 0 931 0 872.8 0C814.7 0 756.3 0 698.2 0C640 0 582 0 523.8 0C465.7 0 407.3 0 349.2 0C291 0 233 0 174.8 0C116.7 0 58.3 0 29.2 0L0 0Z"- fill="var(--bgSecondary)"+ d="M1184.21-85.14C1033.8-60.27 964.89 302.42 717.38 307.22 469.87 312.02 483.97 244.72 250.55 244.72 17.13 244.72-98.53 307.08-216.28 307.22"+ stroke="var(--icon)"+ strokeWidth="2"></path><path- d="M0 627L29.2 607.3C58.3 587.7 116.7 548.3 174.8 564.7C233 581 291 653 349.2 683.5C407.3 714 465.7 703 523.8 703C582 703 640 714 698.2 724.8C756.3 735.7 814.7 746.3 872.8 742.7C931 739 989 721 1047.2 670.7C1105.3 620.3 1163.7 537.7 1221.8 528.7C1280 519.7 1338 584.3 1396.2 623.8C1454.3 663.3 1512.7 677.7 1570.8 666.8C1629 656 1687 620 1745.2 602C1803.3 584 1861.7 584 1890.8 584L1920 584L1920 237L1890.8 265.7C1861.7 294.3 1803.3 351.7 1745.2 364.2C1687 376.7 1629 344.3 1570.8 330C1512.7 315.7 1454.3 319.3 1396.2 296C1338 272.7 1280 222.3 1221.8 200.7C1163.7 179 1105.3 186 1047.2 200.3C989 214.7 931 236.3 872.8 265.2C814.7 294 756.3 330 698.2 344.5C640 359 582 352 523.8 357.5C465.7 363 407.3 381 349.2 359.3C291 337.7 233 276.3 174.8 265.5C116.7 254.7 58.3 294.3 29.2 314.2L0 334Z"- fill="var(--hover)"+ d="M641.38-10.43C534.57 43 590.55 387.5 384.53 392.38 178.52 397.26 2.17 282.99-129.16 282.38"+ stroke="var(--icon)"+ strokeWidth="2"></path><path- d="M0 735L29.2 731.5C58.3 728 116.7 721 174.8 739C233 757 291 800 349.2 832.3C407.3 864.7 465.7 886.3 523.8 886.3C582 886.3 640 864.7 698.2 859.3C756.3 854 814.7 865 872.8 870.5C931 876 989 876 1047.2 845.3C1105.3 814.7 1163.7 753.3 1221.8 729.8C1280 706.3 1338 720.7 1396.2 738.7C1454.3 756.7 1512.7 778.3 1570.8 789.2C1629 800 1687 800 1745.2 814.5C1803.3 829 1861.7 858 1890.8 872.5L1920 887L1920 582L1890.8 582C1861.7 582 1803.3 582 1745.2 600C1687 618 1629 654 1570.8 664.8C1512.7 675.7 1454.3 661.3 1396.2 621.8C1338 582.3 1280 517.7 1221.8 526.7C1163.7 535.7 1105.3 618.3 1047.2 668.7C989 719 931 737 872.8 740.7C814.7 744.3 756.3 733.7 698.2 722.8C640 712 582 701 523.8 701C465.7 701 407.3 712 349.2 681.5C291 651 233 579 174.8 562.7C116.7 546.3 58.3 585.7 29.2 605.3L0 625Z"- fill="var(--border)"+ d="M1136.18-29.24C957.53-5.77 852.26 404.49 561.01 405.07 269.76 405.65 142.54 160.4-14.16 155.07"+ stroke="var(--icon)"+ strokeWidth="2"></path><path- d="M0 897L29.2 895.3C58.3 893.7 116.7 890.3 174.8 908.3C233 926.3 291 965.7 349.2 985.3C407.3 1005 465.7 1005 523.8 1003.3C582 1001.7 640 998.3 698.2 996.7C756.3 995 814.7 995 872.8 986C931 977 989 959 1047.2 939.2C1105.3 919.3 1163.7 897.7 1221.8 894C1280 890.3 1338 904.7 1396.2 911.8C1454.3 919 1512.7 919 1570.8 928C1629 937 1687 955 1745.2 960.3C1803.3 965.7 1861.7 958.3 1890.8 954.7L1920 951L1920 885L1890.8 870.5C1861.7 856 1803.3 827 1745.2 812.5C1687 798 1629 798 1570.8 787.2C1512.7 776.3 1454.3 754.7 1396.2 736.7C1338 718.7 1280 704.3 1221.8 727.8C1163.7 751.3 1105.3 812.7 1047.2 843.3C989 874 931 874 872.8 868.5C814.7 863 756.3 852 698.2 857.3C640 862.7 582 884.3 523.8 884.3C465.7 884.3 407.3 862.7 349.2 830.3C291 798 233 755 174.8 737C116.7 719 58.3 726 29.2 729.5L0 733Z"- fill="var(--hover)"+ d="M508.47-71.88C398.16-66.29 333.42 117.75 114.38 127.84-104.65 137.93-170.96 308.31-279.7 312.84"+ stroke="var(--icon)"+ strokeWidth="2"></path><path- d="M0 1081L29.2 1081C58.3 1081 116.7 1081 174.8 1081C233 1081 291 1081 349.2 1081C407.3 1081 465.7 1081 523.8 1081C582 1081 640 1081 698.2 1081C756.3 1081 814.7 1081 872.8 1081C931 1081 989 1081 1047.2 1081C1105.3 1081 1163.7 1081 1221.8 1081C1280 1081 1338 1081 1396.2 1081C1454.3 1081 1512.7 1081 1570.8 1081C1629 1081 1687 1081 1745.2 1081C1803.3 1081 1861.7 1081 1890.8 1081L1920 1081L1920 949L1890.8 952.7C1861.7 956.3 1803.3 963.7 1745.2 958.3C1687 953 1629 935 1570.8 926C1512.7 917 1454.3 917 1396.2 909.8C1338 902.7 1280 888.3 1221.8 892C1163.7 895.7 1105.3 917.3 1047.2 937.2C989 957 931 975 872.8 984C814.7 993 756.3 993 698.2 994.7C640 996.3 582 999.7 523.8 1001.3C465.7 1003 407.3 1003 349.2 983.3C291 963.7 233 924.3 174.8 906.3C116.7 888.3 58.3 891.7 29.2 893.3L0 895Z"- fill="var(--border)"+ d="M1104.88-26.74C976.63-19.04 883.5 217.2 653.03 218.11 422.55 219.02 427.1 155.61 201.17 155.61-24.75 155.61-136.64 217.96-250.68 218.11"+ stroke="var(--icon)"+ strokeWidth="2"></path>- </Box>- {props.children}+ </g>+ <defs>+ <mask id="SvgjsMask1017">+ <rect width="1440" height="500" fill="#ffffff"></rect>+ </mask>+ </defs>+ </Box>++ <Flex+ p={50}+ sx={{+ zIndex: 1,+ flex: 1,+ flexDirection: "column",+ alignItems: "start",+ justifyContent: "end"+ }}+ >+ <Image+ src={colorScheme === "dark" ? LogoDark : Logo}+ sx={{ borderRadius: "default", width: 70, alignSelf: "start" }}+ mb={4}+ />+ <Text variant={"heading"} sx={{ fontSize: 48 }}>+ {title}+ </Text>++ <Text+ variant="body"+ mt={10}+ sx={{ fontSize: 14, color: "paragraph-secondary" }}+ >+ {testimonial.text} —{" "}+ <Link+ sx={{ fontStyle: "italic", color: "paragraph-secondary" }}+ href={testimonial.link}+ >+ source+ </Link>+ </Text>+ <Flex mt={2} sx={{ alignItems: "center", justifyContent: "center" }}>+ <Image+ src={testimonial.image}+ sx={{ borderRadius: 50, width: 40 }}+ />+ <Flex ml={2} sx={{ flexDirection: "column" }}>+ <Text variant="body" sx={{ fontSize: 14, fontWeight: "bold" }}>+ {testimonial.name}+ </Text>+ <Text variant="subBody">@{testimonial.username}</Text>+ </Flex>+ </Flex></Flex>+ </Box>+ <Flex+ sx={{+ position: "relative",+ flex: 1.5,+ flexDirection: "column"+ }}+ >+ <Box+ as="svg"+ version="1.1"+ viewBox="0 0 1920 1080"+ preserveAspectRatio="xMinYMin slice"+ sx={{+ position: "absolute",+ top: 0,+ left: 0,+ right: 0,+ bottom: 0,+ width: "130%",+ height: "100%"+ }}+ >+ <path+ d="M0 336L29.2 316.2C58.3 296.3 116.7 256.7 174.8 267.5C233 278.3 291 339.7 349.2 361.3C407.3 383 465.7 365 523.8 359.5C582 354 640 361 698.2 346.5C756.3 332 814.7 296 872.8 267.2C931 238.3 989 216.7 1047.2 202.3C1105.3 188 1163.7 181 1221.8 202.7C1280 224.3 1338 274.7 1396.2 298C1454.3 321.3 1512.7 317.7 1570.8 332C1629 346.3 1687 378.7 1745.2 366.2C1803.3 353.7 1861.7 296.3 1890.8 267.7L1920 239L1920 0L1890.8 0C1861.7 0 1803.3 0 1745.2 0C1687 0 1629 0 1570.8 0C1512.7 0 1454.3 0 1396.2 0C1338 0 1280 0 1221.8 0C1163.7 0 1105.3 0 1047.2 0C989 0 931 0 872.8 0C814.7 0 756.3 0 698.2 0C640 0 582 0 523.8 0C465.7 0 407.3 0 349.2 0C291 0 233 0 174.8 0C116.7 0 58.3 0 29.2 0L0 0Z"+ fill="var(--background-secondary)"+ ></path>+ <path+ d="M0 627L29.2 607.3C58.3 587.7 116.7 548.3 174.8 564.7C233 581 291 653 349.2 683.5C407.3 714 465.7 703 523.8 703C582 703 640 714 698.2 724.8C756.3 735.7 814.7 746.3 872.8 742.7C931 739 989 721 1047.2 670.7C1105.3 620.3 1163.7 537.7 1221.8 528.7C1280 519.7 1338 584.3 1396.2 623.8C1454.3 663.3 1512.7 677.7 1570.8 666.8C1629 656 1687 620 1745.2 602C1803.3 584 1861.7 584 1890.8 584L1920 584L1920 237L1890.8 265.7C1861.7 294.3 1803.3 351.7 1745.2 364.2C1687 376.7 1629 344.3 1570.8 330C1512.7 315.7 1454.3 319.3 1396.2 296C1338 272.7 1280 222.3 1221.8 200.7C1163.7 179 1105.3 186 1047.2 200.3C989 214.7 931 236.3 872.8 265.2C814.7 294 756.3 330 698.2 344.5C640 359 582 352 523.8 357.5C465.7 363 407.3 381 349.2 359.3C291 337.7 233 276.3 174.8 265.5C116.7 254.7 58.3 294.3 29.2 314.2L0 334Z"+ fill="var(--hover)"+ ></path>+ <path+ d="M0 735L29.2 731.5C58.3 728 116.7 721 174.8 739C233 757 291 800 349.2 832.3C407.3 864.7 465.7 886.3 523.8 886.3C582 886.3 640 864.7 698.2 859.3C756.3 854 814.7 865 872.8 870.5C931 876 989 876 1047.2 845.3C1105.3 814.7 1163.7 753.3 1221.8 729.8C1280 706.3 1338 720.7 1396.2 738.7C1454.3 756.7 1512.7 778.3 1570.8 789.2C1629 800 1687 800 1745.2 814.5C1803.3 829 1861.7 858 1890.8 872.5L1920 887L1920 582L1890.8 582C1861.7 582 1803.3 582 1745.2 600C1687 618 1629 654 1570.8 664.8C1512.7 675.7 1454.3 661.3 1396.2 621.8C1338 582.3 1280 517.7 1221.8 526.7C1163.7 535.7 1105.3 618.3 1047.2 668.7C989 719 931 737 872.8 740.7C814.7 744.3 756.3 733.7 698.2 722.8C640 712 582 701 523.8 701C465.7 701 407.3 712 349.2 681.5C291 651 233 579 174.8 562.7C116.7 546.3 58.3 585.7 29.2 605.3L0 625Z"+ fill="var(--border)"+ ></path>+ <path+ d="M0 897L29.2 895.3C58.3 893.7 116.7 890.3 174.8 908.3C233 926.3 291 965.7 349.2 985.3C407.3 1005 465.7 1005 523.8 1003.3C582 1001.7 640 998.3 698.2 996.7C756.3 995 814.7 995 872.8 986C931 977 989 959 1047.2 939.2C1105.3 919.3 1163.7 897.7 1221.8 894C1280 890.3 1338 904.7 1396.2 911.8C1454.3 919 1512.7 919 1570.8 928C1629 937 1687 955 1745.2 960.3C1803.3 965.7 1861.7 958.3 1890.8 954.7L1920 951L1920 885L1890.8 870.5C1861.7 856 1803.3 827 1745.2 812.5C1687 798 1629 798 1570.8 787.2C1512.7 776.3 1454.3 754.7 1396.2 736.7C1338 718.7 1280 704.3 1221.8 727.8C1163.7 751.3 1105.3 812.7 1047.2 843.3C989 874 931 874 872.8 868.5C814.7 863 756.3 852 698.2 857.3C640 862.7 582 884.3 523.8 884.3C465.7 884.3 407.3 862.7 349.2 830.3C291 798 233 755 174.8 737C116.7 719 58.3 726 29.2 729.5L0 733Z"+ fill="var(--hover)"+ ></path>+ <path+ d="M0 1081L29.2 1081C58.3 1081 116.7 1081 174.8 1081C233 1081 291 1081 349.2 1081C407.3 1081 465.7 1081 523.8 1081C582 1081 640 1081 698.2 1081C756.3 1081 814.7 1081 872.8 1081C931 1081 989 1081 1047.2 1081C1105.3 1081 1163.7 1081 1221.8 1081C1280 1081 1338 1081 1396.2 1081C1454.3 1081 1512.7 1081 1570.8 1081C1629 1081 1687 1081 1745.2 1081C1803.3 1081 1861.7 1081 1890.8 1081L1920 1081L1920 949L1890.8 952.7C1861.7 956.3 1803.3 963.7 1745.2 958.3C1687 953 1629 935 1570.8 926C1512.7 917 1454.3 917 1396.2 909.8C1338 902.7 1280 888.3 1221.8 892C1163.7 895.7 1105.3 917.3 1047.2 937.2C989 957 931 975 872.8 984C814.7 993 756.3 993 698.2 994.7C640 996.3 582 999.7 523.8 1001.3C465.7 1003 407.3 1003 349.2 983.3C291 963.7 233 924.3 174.8 906.3C116.7 888.3 58.3 891.7 29.2 893.3L0 895Z"+ fill="var(--border)"+ ></path>+ </Box>+ {props.children}</Flex>- </ThemeProvider>+ </BaseThemeProvider>);}export default AuthContainer;diff --git a/apps/web/src/components/dialog/index.tsx b/apps/web/src/components/dialog/index.tsxindex ced8a3e9c..48b5b88b8 100644--- a/apps/web/src/components/dialog/index.tsx+++ b/apps/web/src/components/dialog/index.tsx@@ -24,6 +24,7 @@ import ReactModal from "react-modal";import { FlexScrollContainer } from "../scroll-container";import { SxProp } from "@theme-ui/core";import { useStore as useThemeStore } from "../../stores/theme-store";+import { ScopedThemeProvider } from "../theme-provider";ReactModal.setAppElement("#root");@@ -53,7 +54,7 @@ type DialogProps = SxProp & {};function BaseDialog(props: React.PropsWithChildren<DialogProps>) {- const theme = useThemeStore((store) => store.theme);+ const theme = useThemeStore((store) => store.colorScheme);return (<ReactModal@@ -63,6 +64,7 @@ function BaseDialog(props: React.PropsWithChildren<DialogProps>) {shouldReturnFocusAfterCloseshouldFocusAfterRenderonAfterOpen={(e) => onAfterOpen(e, props)}+ overlayClassName={"theme-scope-dialog"}style={{content: {top: 0,@@ -72,20 +74,24 @@ function BaseDialog(props: React.PropsWithChildren<DialogProps>) {display: "flex",flexDirection: "column",justifyContent: "center",- backgroundColor: undefined,+ // backgroundColor: undefined,padding: 0,overflowY: "hidden",border: 0,- zIndex: 0- },- overlay: {zIndex: 999,- background: "var(--overlay)"+ backgroundColor: "var(--backdrop)"}+ // overlay: {+ // zIndex: 999,+ // background: "var(--backdrop)"+ // }}}>- <Flex+ <ScopedThemeProvider+ scope="dialog"+ injectCssVarssx={{+ display: "flex",flexDirection: "column",width: ["100%", "90%", props.width || "380px"],maxHeight: ["100%", "80%", "70%"],@@ -127,7 +133,7 @@ function BaseDialog(props: React.PropsWithChildren<DialogProps>) {sx={{fontSize: "subheading",textAlign: props.textAlignment || "left",- color: "text"+ color: "paragraph"}}>{props.title}@@ -138,7 +144,7 @@ function BaseDialog(props: React.PropsWithChildren<DialogProps>) {variant="body"sx={{textAlign: props.textAlignment || "left",- color: "fontTertiary"+ color: "var(--paragraph-secondary)"}}>{props.description}@@ -159,7 +165,7 @@ function BaseDialog(props: React.PropsWithChildren<DialogProps>) {{(props.positiveButton || props.negativeButton) && (<Flexsx={{ justifyContent: props.buttonsAlignment || "end" }}- bg="bgSecondary"+ bg="var(--background-secondary)"p={1}px={2}mt={2}@@ -167,43 +173,36 @@ function BaseDialog(props: React.PropsWithChildren<DialogProps>) {{props.negativeButton && (<DialogButton{...props.negativeButton}- color="text"+ color="paragraph"data-test-id="dialog-no"/>)}{props.positiveButton && (<DialogButton{...props.positiveButton}- color="primary"+ color="accent"data-test-id="dialog-yes"/>)}</Flex>)}{props.footer}- </Flex>+ </ScopedThemeProvider></ReactModal>);}export default BaseDialog;-function DialogButton(props: DialogButtonProps) {+export function DialogButton(props: DialogButtonProps) {return (<Button{...props}- variant="primary"- sx={{- opacity: props.disabled ? 0.7 : 1,- fontWeight: "bold",- bg: "transparent",-- ":hover": { bg: "bgSecondary" }- }}+ variant="dialog"disabled={props.disabled}onClick={props.disabled ? undefined : props.onClick}>- {props.loading ? <Loading size={16} color="primary" /> : props.text}+ {props.loading ? <Loading size={16} color="accent" /> : props.text}</Button>);}diff --git a/apps/web/src/components/diff-viewer/content-toggle.jsx b/apps/web/src/components/diff-viewer/content-toggle.jsxindex 1385afbd3..f2f00d480 100644--- a/apps/web/src/components/diff-viewer/content-toggle.jsx+++ b/apps/web/src/components/diff-viewer/content-toggle.jsx@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { Flex, Button } from "@theme-ui/components";+import { Flex, Button, Text } from "@theme-ui/components";import { getFormattedDate } from "@notesnook/common";function ContentToggle(props) {@@ -36,7 +36,7 @@ function ContentToggle(props) {<Flex>{isOtherSelected && (<Button- variant="primary"+ variant="accent"mr={2}onClick={() => resolveConflict({ saveCopy: true })}p={1}@@ -46,7 +46,7 @@ function ContentToggle(props) {</Button>)}<Button- variant="primary"+ variant={isOtherSelected ? "error" : "primary"}onClick={() => {if (isOtherSelected) {resolveConflict({ saveCopy: false });@@ -56,22 +56,13 @@ function ContentToggle(props) {}}p={1}px={2}- bg={isOtherSelected ? "error" : "primary"}>{isSelected ? "Undo" : isOtherSelected ? "Discard" : "Keep"}</Button></Flex>- <Flex- mt={1}- sx={{- fontSize: "subBody",- color: "fontTertiary",- alignItems: "center",- fontFamily: "body"- }}- >+ <Text variant="subBody" mt={1}>{label} | {getFormattedDate(dateEdited)}- </Flex>+ </Text></Flex>);}diff --git a/apps/web/src/components/diff-viewer/index.jsx b/apps/web/src/components/diff-viewer/index.jsxindex 41227f1f4..128505d50 100644--- a/apps/web/src/components/diff-viewer/index.jsx+++ b/apps/web/src/components/diff-viewer/index.jsx@@ -144,7 +144,7 @@ function DiffViewer(props) {</Text><Flex mt={1} sx={{ alignSelf: "center", justifySelf: "center" }}><Button- variant="tool"+ variant="secondary"onClick={async () => {setIsDownloadingImages(true);try {diff --git a/apps/web/src/components/dropdown-button/index.jsx b/apps/web/src/components/dropdown-button/index.jsxindex 8fe76e1f3..9b241ae04 100644--- a/apps/web/src/components/dropdown-button/index.jsx+++ b/apps/web/src/components/dropdown-button/index.jsx@@ -48,7 +48,7 @@ export default function DropdownButton(props) {}}onClick={() => openMenu(options.slice(1), { title })}>- <ChevronDown color="static" size={18} />+ <ChevronDown color="white" size={18} /></Button>)}</Flex>diff --git a/apps/web/src/components/editor/footer.tsx b/apps/web/src/components/editor/footer.tsxindex 88df0ed5a..b68ab62df 100644--- a/apps/web/src/components/editor/footer.tsx+++ b/apps/web/src/components/editor/footer.tsx@@ -50,7 +50,7 @@ function EditorFooter() {data-test-id="editor-word-count"variant="subBody"mr={2}- sx={{ color: "bgSecondaryText" }}+ sx={{ color: "paragraph" }}>{words.total + " words"}{words.selected ? ` (${words.selected} selected)` : ""}@@ -59,13 +59,24 @@ function EditorFooter() {className="selectable"variant="subBody"mr={2}- sx={{ color: "bgSecondaryText" }}+ sx={{ color: "paragraph" }}data-test-id="editor-date-edited"title={dateEdited?.toString()}>{getFormattedDate(dateEdited || Date.now())}</Text>- {SaveStateIcon && <SaveStateIcon size={13} color="bgSecondaryText" />}+ {SaveStateIcon && (+ <SaveStateIcon+ size={13}+ color={+ saveState === 1+ ? "accent"+ : saveState === "-1"+ ? "red"+ : "paragraph"+ }+ />+ )}</Flex>);}diff --git a/apps/web/src/components/editor/header.jsx b/apps/web/src/components/editor/header.tsxsimilarity index 80%rename from apps/web/src/components/editor/header.jsxrename to apps/web/src/components/editor/header.tsxindex cdc1724b8..3544ae7a3 100644--- a/apps/web/src/components/editor/header.jsx+++ b/apps/web/src/components/editor/header.tsx@@ -25,13 +25,16 @@ import { Flex } from "@theme-ui/components";import IconTag from "../icon-tag";import { db } from "../../common/db";import { useMenuTrigger } from "../../hooks/use-menu";+import { MenuItem } from "@notesnook/ui";-function Header({ readonly }) {+type HeaderProps = { readonly: boolean };+function Header(props: HeaderProps) {+ const { readonly } = props;const id = useStore((store) => store.session.id);const tags = useStore((store) => store.session.tags);const setTag = useStore((store) => store.setTag);const filterableTags = useMemo(() => {- return db.tags.all.filter((t) => tags?.every((tag) => tag !== t?.title));+ return db.tags?.all.filter((t) => tags?.every((tag) => tag !== t?.title));}, [tags]);return (@@ -45,7 +48,7 @@ function Header({ readonly }) {<IconTagtestId={`tag`}key={tag}- text={db.tags.alias(tag)}+ text={db.tags?.alias(tag)}icon={Tag}title={`Click to remove`}onClick={() => setTag(tag)}@@ -55,7 +58,7 @@ function Header({ readonly }) {<AutosuggestsessionId={id}filter={(query) =>- db.lookup.tags(filterableTags, query).slice(0, 10)+ db.lookup?.tags(filterableTags, query).slice(0, 10) || []}onAdd={(value) => setTag(value)}onSelect={(item) => setTag(item.title)}@@ -63,7 +66,7 @@ function Header({ readonly }) {if (tags.length <= 0) return;setTag(tags[tags.length - 1]);}}- defaultItems={filterableTags.slice(0, 10)}+ defaultItems={filterableTags?.slice(0, 10) || []}/></Flex>)}@@ -72,23 +75,27 @@ function Header({ readonly }) {}export default Header;-export function Autosuggest({- sessionId,- filter,- onRemove,- onSelect,- onAdd,- defaultItems-}) {- const inputRef = useRef();- const filteredItems = useRef([]);+type AutosuggestProps = {+ sessionId: string;+ filter: (query: string) => any[];+ onRemove: () => void;+ onSelect: (item: any) => void;+ onAdd: (item: any) => void;+ defaultItems: any[];+};+export function Autosuggest(props: AutosuggestProps) {+ const { sessionId, filter, onRemove, onSelect, onAdd, defaultItems } = props;+ const inputRef = useRef<HTMLInputElement>(null);+ const filteredItems = useRef<any[]>([]);const { openMenu, closeMenu, isOpen } = useMenuTrigger();const clearInput = useCallback(() => {+ if (!inputRef.current) return;inputRef.current.value = "";inputRef.current.focus();}, []);const getInputValue = useCallback(() => {+ if (!inputRef.current) return;return inputRef.current.value.trim().toLowerCase();}, []);@@ -106,9 +113,9 @@ export function Autosuggest({);const onOpenMenu = useCallback(- (filtered) => {+ (filtered: any[]) => {const filterText = getInputValue();- let items = [];+ const items: MenuItem[] = [];if (!filterText && filtered.length <= 0) {closeMenu();@@ -118,9 +125,10 @@ export function Autosuggest({const isExactMatch = filtered.some((item) => item.title === filterText);if (filterText && !isExactMatch) {items.push({+ type: "button",key: "new",- title: () => `Create "${filterText}" tag`,- icon: Plus,+ title: `Create "${filterText}" tag`,+ icon: Plus.path,onClick: () => onAction("add", filterText)});}@@ -128,19 +136,20 @@ export function Autosuggest({if (filtered.length > 0) {items.push(...filtered.map((tag) => ({+ type: "button" as const,key: tag.id,- title: () => tag.alias,- icon: Tag,+ title: tag.alias,+ icon: Tag.path,onClick: () => onAction("select", tag)})));}openMenu(items, {- type: "autocomplete",- positionOptions: {- relativeTo: inputRef.current,- absolute: true,+ blocking: true,+ position: {+ target: inputRef.current,+ isTargetAbsolute: true,location: "below"}});diff --git a/apps/web/src/components/editor/index.tsx b/apps/web/src/components/editor/index.tsxindex cf6e986a4..0a324d404 100644--- a/apps/web/src/components/editor/index.tsx+++ b/apps/web/src/components/editor/index.tsx@@ -50,10 +50,9 @@ import useTablet from "../../hooks/use-tablet";import Config from "../../utils/config";import { AnimatedFlex } from "../animated";import { EditorLoader } from "../loaders/editor-loader";+import { ScopedThemeProvider } from "../theme-provider";import { Lightbox } from "../lightbox";-import ThemeProviderWrapper from "../theme-provider";import { Allotment } from "allotment";-// import { PdfPreview } from "";import { showToast } from "../../utils/toast";import { getFormattedDate } from "@notesnook/common";@@ -221,7 +220,8 @@ export default function EditorManager({alignSelf: "stretch",overflow: "hidden",flex: 1,- flexDirection: "column"+ flexDirection: "column",+ background: "background"}}>{previewSession.current && (@@ -429,14 +429,14 @@ export function Editor(props: EditorProps) {return showToast("error", "This image cannot be previewed.");ReactDOM.render(- <ThemeProviderWrapper>+ <ScopedThemeProvider><Lightboximage={dataurl}onClose={() => {ReactDOM.unmountComponentAtNode(container);}}/>- </ThemeProviderWrapper>,+ </ScopedThemeProvider>,container);} else if (attachment && onPreviewDocument) {@@ -527,7 +527,7 @@ function EditorChrome(/>)}<Titlebox readonly={readonly || false} />- <Header readonly={readonly} />+ <Header readonly={readonly || false} /><AnimatedFlexinitial={{ opacity: 0 }}animate={{ opacity: isLoading ? 0 : 1 }}@@ -574,7 +574,7 @@ function PreviewModeNotice(props: PreviewModeNoticeProps) {return (<Flex- bg="bgSecondary"+ bg="var(--background-secondary)"p={2}sx={{ alignItems: "center", justifyContent: "space-between" }}data-test-id="preview-notice"@@ -597,6 +597,7 @@ function PreviewModeNotice(props: PreviewModeNoticeProps) {Cancel</Button><Button+ variant="accent"data-test-id="preview-notice-restore"px={4}onClick={async () => {diff --git a/apps/web/src/components/editor/loading.tsx b/apps/web/src/components/editor/loading.tsxindex 50386aa9e..64a6c9048 100644--- a/apps/web/src/components/editor/loading.tsx+++ b/apps/web/src/components/editor/loading.tsx@@ -30,7 +30,7 @@ function EditorLoading({ text }: { text?: string }) {justifyContent: "center"}}>- <Loading color="primary" sx={{ mt: 2 }} />+ <Loading color="accent" sx={{ mt: 2 }} /><Text variant="body" mt={2} sx={{ textAlign: "center" }}>{text || "Loading editor. Please wait..."}</Text>diff --git a/apps/web/src/components/editor/picker.ts b/apps/web/src/components/editor/picker.tsindex 53d0c6aa5..2fd92a93e 100644--- a/apps/web/src/components/editor/picker.ts+++ b/apps/web/src/components/editor/picker.ts@@ -25,13 +25,12 @@ import { TaskManager } from "../../common/task-manager";import { isUserPremium } from "../../hooks/use-is-user-premium";import fs from "../../interfaces/fs";import { showToast } from "../../utils/toast";+import { showFilePicker } from "../../utils/file-picker";const FILE_SIZE_LIMIT = 500 * 1024 * 1024;const IMAGE_SIZE_LIMIT = 50 * 1024 * 1024;-type MimeType = string; //`${string}/${string}`;--export async function insertAttachment(type: MimeType = "*/*") {+export async function insertAttachment(type = "*/*") {if (!isUserPremium()) {await showBuyDialog();return;@@ -58,7 +57,7 @@ export async function attachFile(selectedFile: File) {}export async function reuploadAttachment(- type: MimeType,+ type: string,expectedFileHash: string) {const selectedFile = await showFilePicker({@@ -120,25 +119,6 @@ async function getEncryptionKey(): Promise<SerializedKey> {return key;}-type FilePickerOptions = { acceptedFileTypes: MimeType };--export function showFilePicker({- acceptedFileTypes-}: FilePickerOptions): Promise<File | undefined> {- return new Promise((resolve) => {- const input = document.createElement("input");- input.setAttribute("type", "file");- input.setAttribute("accept", acceptedFileTypes);- input.dispatchEvent(new MouseEvent("click"));- input.onchange = async function () {- if (!input.files) return resolve(undefined);- const file = input.files[0];- if (!file) return resolve(undefined);- resolve(file);- };- });-}-async function toDataURL(file: File): Promise<string> {const buffer = await file.arrayBuffer();const base64 = Buffer.from(buffer).toString("base64");diff --git a/apps/web/src/components/editor/tiptap.tsx b/apps/web/src/components/editor/tiptap.tsxindex 8f7c2ef90..b504f506a 100644--- a/apps/web/src/components/editor/tiptap.tsx+++ b/apps/web/src/components/editor/tiptap.tsx@@ -21,9 +21,6 @@ import "@notesnook/editor/styles/styles.css";import "@notesnook/editor/styles/katex.min.css";import "@notesnook/editor/styles/katex-fonts.css";import "@notesnook/editor/styles/fonts.css";-import "@notesnook/editor/styles/prism-theme.css";-import { Theme } from "@notesnook/theme";-import { useTheme } from "@emotion/react";import {Toolbar,useTiptap,@@ -57,7 +54,9 @@ import { showBuyDialog } from "../../common/dialog-controller";import { useStore as useSettingsStore } from "../../stores/setting-store";import { debounce, debounceWithId } from "@notesnook/common";import { store as editorstore } from "../../stores/editor-store";+import { ScopedThemeProvider } from "../theme-provider";import { writeText } from "clipboard-polyfill";+import { useStore as useThemeStore } from "../../stores/theme-store";type OnChangeHandler = (id: string | undefined,@@ -78,7 +77,6 @@ type TipTapProps = {toolbarContainerId?: string;readonly?: boolean;nonce?: number;- theme: Theme;isMobile?: boolean;downloadOptions?: DownloadOptions;fontSize: number;@@ -126,7 +124,6 @@ function TipTap(props: TipTapProps) {editorContainer,readonly,nonce,- theme,isMobile,downloadOptions,fontSize,@@ -206,6 +203,7 @@ function TipTap(props: TipTapProps) {editor.commands.refreshSearch();},onUpdate: ({ editor, transaction }) => {+ console.log("UPDATE", transaction);onContentChange?.();const preventSave = transaction?.getMeta("preventSave") as boolean;@@ -265,7 +263,6 @@ function TipTap(props: TipTapProps) {};});}, 500),- theme,onOpenAttachmentPicker: (_editor, type) => {onInsertAttachment?.(type);return true;@@ -283,7 +280,7 @@ function TipTap(props: TipTapProps) {return true;}};- }, [theme, readonly, nonce, doubleSpacedLines, dateFormat, timeFormat]);+ }, [readonly, nonce, doubleSpacedLines, dateFormat, timeFormat]);const editor = useTiptap(tiptapOptions,@@ -339,14 +336,15 @@ function TipTap(props: TipTapProps) {return (<><Portal containerId={toolbarContainerId}>- <Toolbar- editor={editor}- theme={theme}- location={isMobile ? "bottom" : "top"}- tools={toolbarConfig}- defaultFontFamily={fontFamily}- defaultFontSize={fontSize}- />+ <ScopedThemeProvider scope="editorToolbar">+ <Toolbar+ editor={editor}+ location={isMobile ? "bottom" : "top"}+ tools={toolbarConfig}+ defaultFontFamily={fontFamily}+ defaultFontSize={fontSize}+ />+ </ScopedThemeProvider></Portal></>);@@ -358,7 +356,10 @@ function TiptapWrapper("editorContainer" | "theme" | "fontSize" | "fontFamily">) {- const theme = useTheme() as Theme;+ const colorScheme = useThemeStore((store) => store.colorScheme);+ const theme = useThemeStore((store) =>+ colorScheme === "dark" ? store.darkTheme : store.lightTheme+ );const [isReady, setIsReady] = useState(false);const editorContainerRef = useRef<HTMLDivElement>(null);const { editorConfig } = useEditorConfig();@@ -373,7 +374,6 @@ function TiptapWrapper(<TipTap{...props}editorContainer={editorContainerRef.current}- theme={theme}fontFamily={editorConfig.fontFamily}fontSize={editorConfig.fontSize}/>@@ -384,7 +384,9 @@ function TiptapWrapper(style={{flex: 1,cursor: "text",- color: theme.colors.text, // TODO!+ color:+ theme.scopes.editor?.primary?.paragraph ||+ theme.scopes.base.primary.paragraph, // TODO!paddingBottom: 150,fontSize: editorConfig.fontSize,fontFamily: getFontById(editorConfig.fontFamily)?.fontdiff --git a/apps/web/src/components/editor/title-box.tsx b/apps/web/src/components/editor/title-box.tsxindex fa3f31bad..ed2b81d16 100644--- a/apps/web/src/components/editor/title-box.tsx+++ b/apps/web/src/components/editor/title-box.tsx@@ -79,7 +79,10 @@ function TitleBox(props: TitleBoxProps) {fontFamily: getFontById(editorConfig.fontFamily)?.font || "heading",fontSize: ["1.625em", "1.625em", "2.625em"],fontWeight: "heading",- width: "100%"+ width: "100%",+ "::placeholder": {+ color: "placeholder"+ }}}onChange={(e) => {const { sessionId, id } = store.get().session;diff --git a/apps/web/src/components/editor/toolbar.jsx b/apps/web/src/components/editor/toolbar.jsxindex 5f48b786c..cebea46c2 100644--- a/apps/web/src/components/editor/toolbar.jsx+++ b/apps/web/src/components/editor/toolbar.jsx@@ -59,8 +59,8 @@ function Toolbar() {const editorMargins = useStore((store) => store.editorMargins);const clearSession = useStore((store) => store.clearSession);const title = useStore((store) => store.session.title);- const theme = useThemeStore((store) => store.theme);- const toggleNightMode = useThemeStore((store) => store.toggleNightMode);+ const theme = useThemeStore((store) => store.colorScheme);+ const toggleNightMode = useThemeStore((store) => store.toggleColorScheme);const [isTitleVisible, setIsTitleVisible] = useState(false);const monographs = useMonographStore((store) => store.monographs);@@ -232,42 +232,42 @@ function Toolbar() {setTitle(sessionId, title);}}sx={{+ flex: 1,fontWeight: "heading",fontSize: "heading",- color: "text",+ color: "paragraph",p: 0,borderWidth: 0,borderRadius: "default",textOverflow: "ellipsis",whiteSpace: "nowrap",- overflow: "hidden",- ":focus": { bg: "bgSecondary" }+ overflow: "hidden"}}/></Flex>+<Flex>{tools.map((tool) => (<Button+ key={tool.title}+ variant="secondary"data-test-id={tool.title}disabled={!tool.enabled}- variant="tool"title={tool.title}- key={tool.title}mr={1}sx={{display: [tool.hideOnMobile ? "none" : "flex",tool.hidden ? "none" : "flex"],- color: tool.enabled ? "text" : "disabled",- cursor: tool.enabled ? "pointer" : "not-allowed",+ color: "paragraph",flexDirection: "row",flexShrink: 0,alignItems: "center"}}onClick={tool.onClick}>- <tool.icon size={18} color={tool.enabled ? "text" : "disabled"} />+ <tool.icon size={18} /><Textvariant="body"ml={1}@@ -278,7 +278,7 @@ function Toolbar() {</Button>))}<Flex- bg="bgSecondary"+ bg="background"sx={{borderRadius: "default",overflow: "hidden",@@ -290,41 +290,20 @@ function Toolbar() {<Buttondata-test-id={tool.title}disabled={!tool.enabled}- variant="tool"- bg="transparent"+ variant="secondary"title={tool.title}key={tool.title}sx={{- borderRadius: 0,display: [tool.hideOnMobile ? "none" : "flex",tool.hidden ? "none" : "flex"],- color: tool.enabled ? "text" : "disabled",- cursor: tool.enabled ? "pointer" : "not-allowed",- flexDirection: "row",- flexShrink: 0,- alignItems: "center"+ borderRadius: 0,+ flexShrink: 0}}onClick={tool.onClick}>- <tool.icon size={18} color={tool.enabled ? "text" : "disabled"} />- {tool.new && (- <Text- variant="subBody"- ml={1}- bg="primary"- px={"3px"}- py="1px"- sx={{- borderRadius: "default",- fontSize: 10,- color: "static"- }}- >- NEW- </Text>- )}+ <tool.icon size={18} /></Button>))}</Flex>diff --git a/packages/theme/src/theme/accents.ts b/apps/web/src/components/error-text/index.tsxsimilarity index 56%rename from packages/theme/src/theme/accents.tsrename to apps/web/src/components/error-text/index.tsxindex e70cb9d7e..69e1a8ec3 100644--- a/packages/theme/src/theme/accents.ts+++ b/apps/web/src/components/error-text/index.tsx@@ -17,29 +17,27 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-const accents = {- orange: "#FF5722",- yellow: "#FFA000",- green: "#1B5E20",- green2: "#008837",- gray: "#757575",- blue: "#0560ff",- teal: "#009688",- lightblue: "#2196F3",- indigo: "#880E4F",- purple: "#9C27B0",- pink: "#FF1744",- red: "#B71C1C"-} as const;--export function getDefaultAccentColor() {- return accents.green2;+import { Flex, FlexProps, Text } from "@theme-ui/components";++import { Error } from "../icons";++type ErrorTextProps = { error?: string | null | false } & FlexProps;+export function ErrorText(props: ErrorTextProps) {+ const { error, sx, ...restProps } = props;++ if (!error) return null;+ return (+ <Flex+ bg="var(--background-error)"+ p={1}+ mt={2}+ sx={{ borderRadius: "default", ...sx }}+ {...restProps}+ >+ <Error size={15} color="var(--icon-error)" />+ <Text variant={"error"} ml={1}>+ {error}+ </Text>+ </Flex>+ );}--export function getAllAccents(): { label: Accents; code: string }[] {- return Object.entries(accents).map(([key, value]) => {- return { label: key as Accents, code: value };- });-}--export type Accents = keyof typeof accents;diff --git a/apps/web/src/components/field/index.jsx b/apps/web/src/components/field/index.jsxindex 5d226c7be..28cfd1987 100644--- a/apps/web/src/components/field/index.jsx+++ b/apps/web/src/components/field/index.jsx@@ -93,7 +93,7 @@ function Field(props) {fontSize: "subtitle",fontWeight: "bold",fontFamily: "body",- color: "icon",+ color: "paragraph",flexDirection: "column",...styles.label}}@@ -101,11 +101,10 @@ function Field(props) {{label}{" "}{helpText && (<Text+ variant="subBody"as="span"sx={{- fontSize: "subBody",fontWeight: "normal",- color: "fontTertiary",...styles.helpText}}>@@ -134,9 +133,10 @@ function Field(props) {min={min}value={value}sx={{+ flex: 1,...styles.input,":disabled": {- bg: "bgSecondary"+ bg: "var(--background-secondary)"}}}onChange={(e) => {@@ -211,7 +211,7 @@ function Field(props) {) : (<Cross color="error" size={14} />)}- <Text ml={1} sx={{ fontSize: "body", color: "text" }}>+ <Text ml={1} sx={{ fontSize: "body", color: "paragraph" }}>{rule.title}</Text></Flex>diff --git a/apps/web/src/components/filtered-list/index.tsx b/apps/web/src/components/filtered-list/index.tsxindex d28b7e06c..900b546ad 100644--- a/apps/web/src/components/filtered-list/index.tsx+++ b/apps/web/src/components/filtered-list/index.tsx@@ -141,7 +141,7 @@ export function FilteredList<T extends FilterableItem>(}}><Text variant={"body"}>{`Add "${query}"`}</Text>- <Plus size={16} color="primary" />+ <Plus size={16} color="accent" /></Button>)}{items.map((item, index) => renderItem(item, index, refresh, !!query))}diff --git a/apps/web/src/components/global-menu-wrapper/index.jsx b/apps/web/src/components/global-menu-wrapper/index.jsxdeleted file mode 100644index f586a08db..000000000--- a/apps/web/src/components/global-menu-wrapper/index.jsx+++ /dev/null@@ -1,113 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import Menu from "../menu";-import { useMenuTrigger, useMenu, getPosition } from "../../hooks/use-menu";-import Modal from "react-modal";-import { Box } from "@theme-ui/components";--function GlobalMenuWrapper() {- const { isOpen, closeMenu } = useMenuTrigger();- const { items, data = {} } = useMenu();- const { positionOptions, type } = data;- const isAutocomplete = type === "autocomplete";-- return (- <Modal- role="menu"- portalClassName="menu-portal"- isOpen={isOpen}- shouldCloseOnEsc- shouldReturnFocusAfterClose- shouldCloseOnOverlayClick- shouldFocusAfterRender={!isAutocomplete}- ariaHideApp={!isAutocomplete}- preventScroll={!isAutocomplete}- onRequestClose={closeMenu}- id={"globalContextMenu"}- overlayElement={(props, contentEl) => {- return (- <Box- {...props}- style={{- ...props.style,- zIndex: 1000,- backgroundColor: isAutocomplete ? "transparent" : "unset"- }}- onClick={(e) => {- if (e.target.closest(".menuContainer")) return;- closeMenu();- }}- onContextMenu={(e) => {- e.preventDefault();- closeMenu();- }}- >- {contentEl}- </Box>- );- }}- onAfterOpen={({ contentEl: menu }) => {- if (!menu) return;- const menuPosition = getPosition(menu, positionOptions);- menu.style.top = menuPosition.top + "px";- menu.style.left = menuPosition.left + "px";- }}- contentElement={(props, children) => (- <Box- {...props}- style={{}}- sx={{- top: 0,- left: 0,- right: 0,- bottom: 0,- display: "flex",- width: "fit-content",- height: "fit-content",- position: "absolute",- backgroundColor: undefined,- padding: 0,- zIndex: 0,- outline: 0,- isolation: "isolate"- }}- >- {children}- </Box>- )}- style={{- content: {},- overlay: {- zIndex: 999,- background: "transparent",- transition: "none"- }- }}- >- <Menu- items={items}- data={data}- title={data?.title}- closeMenu={closeMenu}- />- </Modal>- );-}-export default GlobalMenuWrapper;diff --git a/apps/web/src/components/global-menu-wrapper/index.tsx b/apps/web/src/components/global-menu-wrapper/index.tsxnew file mode 100644index 000000000..fe5d45e34--- /dev/null+++ b/apps/web/src/components/global-menu-wrapper/index.tsx@@ -0,0 +1,42 @@+/*+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 { MenuPresenter } from "@notesnook/ui";+import { useMenuTrigger, useMenu } from "../../hooks/use-menu";+import useMobile from "../../hooks/use-mobile";++function GlobalMenuWrapper() {+ const { isOpen, closeMenu } = useMenuTrigger();+ const { items, options } = useMenu();+ const isMobile = useMobile();++ return (+ <MenuPresenter+ isOpen={isOpen}+ onClose={closeMenu}+ focusOnRender={!options.blocking}+ blocking={options.blocking}+ isMobile={isMobile}+ position={options.position || {}}+ items={items}+ title={options.title}+ />+ );+}+export default GlobalMenuWrapper;diff --git a/apps/web/src/components/group-header/index.jsx b/apps/web/src/components/group-header/index.jsxdeleted file mode 100644index c535250b0..000000000--- a/apps/web/src/components/group-header/index.jsx+++ /dev/null@@ -1,325 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import {- GroupBy,- OrderAtoZ,- OrderOldestNewest,- OrderZtoA,- OrderNewestOldest,- SortBy,- SortAsc,- SortDesc,- DetailedView,- CompactView-} from "../icons";-import { useEffect, useMemo, useRef, useState } from "react";-import { Button, Flex, Text } from "@theme-ui/components";-import { db } from "../../common/db";-import { Menu, useMenuTrigger } from "../../hooks/use-menu";-import { useStore as useNoteStore } from "../../stores/note-store";-import { useStore as useNotebookStore } from "../../stores/notebook-store";-import useMobile from "../../hooks/use-mobile";--const groupByToTitleMap = {- [undefined]: "Default",- none: "None",- default: "Default",- abc: "A - Z",- year: "Year",- week: "Week",- month: "Month"-};--const groupByMenu = {- key: "groupBy",- title: "Group by",- icon: GroupBy,- items: map([- { key: "none", title: "None" },- { key: "default", title: "Default" },- { key: "year", title: "Year" },- { key: "month", title: "Month" },- { key: "week", title: "Week" },- { key: "abc", title: "A - Z" }- ])-};--const orderByMenu = {- key: "sortDirection",- title: "Order by",- icon: ({ groupOptions }) =>- groupOptions.sortDirection === "asc"- ? groupOptions.sortBy === "title"- ? OrderAtoZ- : OrderOldestNewest- : groupOptions.sortBy === "title"- ? OrderZtoA- : OrderNewestOldest,- items: map([- {- key: "asc",- title: ({ groupOptions }) =>- groupOptions.sortBy === "title" ? "A - Z" : "Oldest - newest"- },- {- key: "desc",- title: ({ groupOptions }) =>- groupOptions.sortBy === "title" ? "Z - A" : "Newest - oldest"- }- ])-};--const sortByMenu = {- key: "sortBy",- title: "Sort by",- icon: SortBy,- items: map([- {- key: "dateCreated",- title: "Date created",- hidden: ({ type }) => type === "trash"- },- {- key: "dateEdited",- title: "Date edited",- hidden: ({ type }) => type === "trash" || type === "tags"- },- {- key: "dateDeleted",- title: "Date deleted",- hidden: ({ type }) => type !== "trash"- },- {- key: "dateModified",- title: "Date modified",- hidden: ({ type }) => type !== "tags"- },- {- key: "title",- title: "Title",- hidden: ({ groupOptions, parent, isUngrouped }, item) => {- if (isUngrouped) return false;-- return (- parent?.key === "sortBy" &&- item.key === "title" &&- groupOptions.groupBy !== "abc" &&- groupOptions.groupBy !== "none"- );- }- }- ])-};--export function showSortMenu(type, refresh) {- const groupOptions = db.settings.getGroupOptions(type);- Menu.openMenu([orderByMenu, sortByMenu], {- title: "Sort",- groupOptions,- refresh,- type,- isUngrouped: true- });-}--function changeGroupOptions({ groupOptions, type, refresh, parent }, item) {- if (!parent) return false;-- groupOptions[parent.key] = item.key;- if (parent.key === "groupBy") {- if (item.key === "abc") groupOptions.sortBy = "title";- else groupOptions.sortBy = "dateEdited";- }- db.settings.setGroupOptions(type, groupOptions);- refresh();-}--function isChecked({ groupOptions, parent }, item) {- if (!parent) return false;- return groupOptions[parent.key] === item.key;-}--function map(items) {- return items.map((item) => {- item.checked = isChecked;- item.onClick = changeGroupOptions;- return item;- }, []);-}--function GroupHeader(props) {- const {- title,- groups,- onJump,- index,- type,- refresh,- onSelectGroup,- isFocused- } = props;- const [groupOptions, setGroupOptions] = useState(- db.settings.getGroupOptions(type)- );- const groupHeaderRef = useRef();- const { openMenu, target } = useMenuTrigger();- const notesViewMode = useNoteStore((store) => store.viewMode);- const setNotesViewMode = useNoteStore((store) => store.setViewMode);- const notebooksViewMode = useNotebookStore((store) => store.viewMode);- const setNotebooksViewMode = useNotebookStore((store) => store.setViewMode);-- useEffect(() => {- if (isFocused) groupHeaderRef.current.focus();- }, [isFocused]);- const isMenuTarget = target && target === groupHeaderRef.current;-- const [viewMode, setViewMode] = useMemo(() => {- if (type === "home" || type === "notes" || type === "favorites") {- return [notesViewMode, setNotesViewMode];- } else if (type === "notebooks")- return [notebooksViewMode, setNotebooksViewMode];- else return [null, null];- }, [- type,- notesViewMode,- notebooksViewMode,- setNotesViewMode,- setNotebooksViewMode- ]);-- return (- <Flex- ref={groupHeaderRef}- onClick={(e) => {- if (e.ctrlKey) {- onSelectGroup();- return;- }- if (groups.length <= 0) return;- e.stopPropagation();- const items = groups.map((group) => {- const groupTitle = group.title.toString();- return {- key: groupTitle,- title: () => groupTitle,- onClick: () => onJump(groupTitle),- checked: group.title === title- };- });- openMenu(items, {- title: "Jump to group",- target: groupHeaderRef.current- });- }}- mx={1}- my={1}- py={1}- pl={1}- pr={0}- bg="bgSecondary"- sx={{- borderRadius: "default",- cursor: "pointer",- border: isMenuTarget ? "1px solid var(--primary)" : "none",- ":focus": {- border: "1px solid var(--primary)",- outline: "none"- },- alignItems: "center",- justifyContent: "space-between"- }}- tabIndex={0}- data-test-id="group-header"- >- <Text- data-test-id="title"- variant="subtitle"- sx={{- fontSize: "body",- color: title === "Conflicted" ? "error" : "primary"- }}- >- {title}- </Text>-- {index === 0 && (- <Flex mr={1}>- {type && (- <IconButton- testId={`${type}-sort-button`}- icon={groupOptions.sortDirection === "asc" ? SortAsc : SortDesc}- title={`Grouped by ${groupByToTitleMap[groupOptions.groupBy]}`}- onClick={() => {- const groupOptions = db.settings.getGroupOptions(type);- setGroupOptions(groupOptions);-- openMenu([orderByMenu, sortByMenu, groupByMenu], {- title: "Group & sort",- groupOptions,- refresh,- type- });- }}- />- )}- {viewMode && (- <IconButton- icon={viewMode === "compact" ? DetailedView : CompactView}- title={- viewMode === "compact"- ? "Switch to detailed view"- : "Switch to compact view"- }- onClick={() =>- setViewMode(viewMode === "compact" ? "detailed" : "compact")- }- />- )}- </Flex>- )}- </Flex>- );-}-export default GroupHeader;--function IconButton(props) {- const { text, title, onClick, testId } = props;- const isMobile = useMobile();- return (- <Button- variant="secondary"- bg="transparent"- title={title}- p={"2px"}- mr={[2, 0]}- data-test-id={testId}- sx={{ ":last-of-type": { mr: 0 }, alignItems: "center", display: "flex" }}- onClick={(e) => {- e.stopPropagation();- onClick(e);- }}- >- {text && <Text variant="body">{text}</Text>}- {props.icon && (- <props.icon size={isMobile ? 20 : 14} sx={{ ml: text ? 1 : 0 }} />- )}- </Button>- );-}diff --git a/apps/web/src/components/group-header/index.tsx b/apps/web/src/components/group-header/index.tsxnew file mode 100644index 000000000..0db280cd4--- /dev/null+++ b/apps/web/src/components/group-header/index.tsx@@ -0,0 +1,406 @@+/*+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 {+ GroupBy,+ OrderAtoZ,+ OrderOldestNewest,+ OrderZtoA,+ OrderNewestOldest,+ SortBy,+ SortAsc,+ SortDesc,+ DetailedView,+ CompactView,+ Icon+} from "../icons";+import React, { useEffect, useMemo, useRef, useState } from "react";+import { Button, Flex, Text } from "@theme-ui/components";+import { db } from "../../common/db";+import { Menu, useMenuTrigger } from "../../hooks/use-menu";+import { useStore as useNoteStore } from "../../stores/note-store";+import { useStore as useNotebookStore } from "../../stores/notebook-store";+import useMobile from "../../hooks/use-mobile";+import { MenuButtonItem, MenuItem } from "@notesnook/ui";++const groupByToTitleMap = {+ none: "None",+ default: "Default",+ abc: "A - Z",+ year: "Year",+ week: "Week",+ month: "Month"+};++type GroupingMenuOptions = {+ groupOptions: GroupOptions;+ parentKey: keyof GroupOptions;+ groupingKey: GroupingKey;+ refresh: () => void;+ isUngrouped: boolean;+};++const groupByMenu: (options: GroupingMenuOptions) => MenuItem = (options) => ({+ type: "button",+ key: "groupBy",+ title: "Group by",+ icon: GroupBy.path,+ menu: {+ items: map(options, [+ { key: "none", title: "None" },+ { key: "default", title: "Default" },+ { key: "year", title: "Year" },+ { key: "month", title: "Month" },+ { key: "week", title: "Week" },+ { key: "abc", title: "A - Z" }+ ])+ }+});++const orderByMenu: (options: GroupingMenuOptions) => MenuItem = (options) => ({+ type: "button",+ key: "sortDirection",+ title: "Order by",+ icon:+ options.groupOptions.sortDirection === "asc"+ ? options.groupOptions.sortBy === "title"+ ? OrderAtoZ.path+ : OrderOldestNewest.path+ : options.groupOptions.sortBy === "title"+ ? OrderZtoA.path+ : OrderNewestOldest.path,+ menu: {+ items: map(options, [+ {+ key: "asc",+ title:+ options.groupOptions.sortBy === "title" ? "A - Z" : "Oldest - newest"+ },+ {+ key: "desc",+ title:+ options.groupOptions.sortBy === "title" ? "Z - A" : "Newest - oldest"+ }+ ])+ }+});++const sortByMenu: (options: GroupingMenuOptions) => MenuItem = (options) => ({+ type: "button",+ key: "sortBy",+ title: "Sort by",+ icon: SortBy.path,+ menu: {+ items: map(options, [+ {+ key: "dateCreated",+ title: "Date created",+ isHidden: options.groupingKey === "trash"+ },+ {+ key: "dateEdited",+ title: "Date edited",+ isHidden:+ options.groupingKey === "trash" || options.groupingKey === "tags"+ },+ {+ key: "dateDeleted",+ title: "Date deleted",+ isHidden: options.groupingKey !== "trash"+ },+ {+ key: "dateModified",+ title: "Date modified",+ isHidden: options.groupingKey !== "tags"+ },+ {+ key: "title",+ title: "Title",+ isHidden:+ !options.isUngrouped &&+ options.parentKey === "sortBy" &&+ options.groupOptions.groupBy !== "abc" &&+ options.groupOptions.groupBy !== "none"+ }+ ])+ }+});++export function showSortMenu(groupingKey: GroupingKey, refresh: () => void) {+ const groupOptions = db.settings?.getGroupOptions(groupingKey);+ if (!groupOptions) return;++ const menuOptions: Omit<GroupingMenuOptions, "parentKey"> = {+ groupingKey,+ groupOptions,+ isUngrouped: true,+ refresh+ };++ Menu.openMenu(+ [+ orderByMenu({ ...menuOptions, parentKey: "sortDirection" }),+ sortByMenu({ ...menuOptions, parentKey: "sortBy" })+ ],+ {+ title: "Sort"+ }+ );+}++function changeGroupOptions(+ options: GroupingMenuOptions,+ item: Omit<MenuButtonItem, "type">+) {+ if (!parent) return false;++ const groupOptions: GroupOptions = { ...options.groupOptions };+ (groupOptions as any)[options.parentKey] = item.key;++ if (options.parentKey === "groupBy") {+ if (item.key === "abc") groupOptions.sortBy = "title";+ else groupOptions.sortBy = "dateEdited";+ }+ db.settings?.setGroupOptions(options.groupingKey, groupOptions);+ options.refresh();+}++function map(+ options: GroupingMenuOptions,+ items: Omit<MenuButtonItem, "type">[]+): MenuItem[] {+ return items.map((item) => {+ item.isChecked = options.groupOptions[options.parentKey] === item.key;+ item.onClick = () => changeGroupOptions(options, item);+ return { ...item, type: "button" };+ }, []);+}++type GroupHeaderProps = {+ title: string;+ groupingKey: GroupingKey;+ index: number;++ groups: { title: string }[];+ onJump: (title: string) => void;+ refresh: () => void;+ onSelectGroup: () => void;+ isFocused: boolean;+};+function GroupHeader(props: GroupHeaderProps) {+ const {+ title,+ groups,+ onJump,+ index,+ groupingKey,+ refresh,+ onSelectGroup,+ isFocused+ } = props;+ const [groupOptions, setGroupOptions] = useState(+ db.settings!.getGroupOptions(groupingKey)+ );+ const groupHeaderRef = useRef<HTMLDivElement>(null);+ const { openMenu, target } = useMenuTrigger();+ const notesViewMode = useNoteStore((store) => store.viewMode);+ const setNotesViewMode = useNoteStore((store) => store.setViewMode);+ const notebooksViewMode = useNotebookStore((store) => store.viewMode);+ const setNotebooksViewMode = useNotebookStore((store) => store.setViewMode);++ useEffect(() => {+ if (isFocused && groupHeaderRef.current) groupHeaderRef.current.focus();+ }, [isFocused]);+ const isMenuTarget = target && target === groupHeaderRef.current;++ const [viewMode, setViewMode] = useMemo(() => {+ if (+ groupingKey === "home" ||+ groupingKey === "notes" ||+ groupingKey === "favorites"+ ) {+ return [notesViewMode, setNotesViewMode];+ } else if (groupingKey === "notebooks")+ return [notebooksViewMode, setNotebooksViewMode];+ else return [null, null];+ }, [+ groupingKey,+ notesViewMode,+ notebooksViewMode,+ setNotesViewMode,+ setNotebooksViewMode+ ]);++ return (+ <Flex+ ref={groupHeaderRef}+ onClick={(e) => {+ if (e.ctrlKey) {+ onSelectGroup();+ return;+ }+ if (groups.length <= 0) return;+ e.stopPropagation();+ const items: MenuItem[] = groups.map((group) => {+ const groupTitle = group.title.toString();+ return {+ type: "button",+ key: groupTitle,+ title: groupTitle,+ onClick: () => onJump(groupTitle),+ checked: group.title === title+ };+ });+ openMenu(items, {+ title: "Jump to group",+ position: {+ target: groupHeaderRef.current,+ align: "start",+ isTargetAbsolute: true,+ location: "below",+ yOffset: 10+ }+ });+ }}+ mx={1}+ my={1}+ py={1}+ pl={1}+ pr={0}+ bg="var(--background-secondary)"+ sx={{+ borderRadius: "default",+ cursor: "pointer",+ border: isMenuTarget ? "1px solid" : "none",+ borderColor: isMenuTarget ? "accent" : "transparent",+ ":focus": {+ border: "1px solid",+ borderColor: "accent",+ outline: "none"+ },+ alignItems: "center",+ justifyContent: "space-between"+ }}+ tabIndex={0}+ data-test-id="group-header"+ >+ <Text+ data-test-id="title"+ variant="subtitle"+ sx={{+ fontSize: "body",+ color: title === "Conflicted" ? "error" : "accent"+ }}+ >+ {title}+ </Text>++ {index === 0 && (+ <Flex mr={1}>+ {groupingKey && (+ <IconButton+ testId={`${groupingKey}-sort-button`}+ icon={groupOptions.sortDirection === "asc" ? SortAsc : SortDesc}+ title={`Grouped by ${+ groupByToTitleMap[groupOptions.groupBy || "default"]+ }`}+ onClick={() => {+ const groupOptions = db.settings!.getGroupOptions(groupingKey);+ setGroupOptions(groupOptions);++ const menuOptions: Omit<GroupingMenuOptions, "parentKey"> = {+ groupingKey,+ groupOptions,+ isUngrouped: false,+ refresh+ };++ openMenu(+ [+ orderByMenu({+ ...menuOptions,+ parentKey: "sortDirection"+ }),+ sortByMenu({+ ...menuOptions,+ parentKey: "sortBy"+ }),+ groupByMenu({+ ...menuOptions,+ parentKey: "groupBy"+ })+ ],+ {+ title: "Group & sort"+ }+ );+ }}+ />+ )}+ {viewMode && (+ <IconButton+ icon={viewMode === "compact" ? DetailedView : CompactView}+ title={+ viewMode === "compact"+ ? "Switch to detailed view"+ : "Switch to compact view"+ }+ onClick={() =>+ setViewMode(viewMode === "compact" ? "detailed" : "compact")+ }+ />+ )}+ </Flex>+ )}+ </Flex>+ );+}+export default GroupHeader;++type IconButtonProps = {+ text?: string;+ title: string;+ onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;+ testId?: string;+ icon: Icon;+};+function IconButton(props: IconButtonProps) {+ const { text, title, onClick, testId } = props;+ const isMobile = useMobile();+ return (+ <Button+ variant="secondary"+ bg="transparent"+ title={title}+ p={"2px"}+ mr={[2, 0]}+ data-test-id={testId}+ sx={{ ":last-of-type": { mr: 0 }, alignItems: "center", display: "flex" }}+ onClick={(e) => {+ e.stopPropagation();+ onClick(e);+ }}+ >+ {text && <Text variant="body">{text}</Text>}+ {props.icon && (+ <props.icon size={isMobile ? 20 : 14} sx={{ ml: text ? 1 : 0 }} />+ )}+ </Button>+ );+}diff --git a/apps/web/src/components/icon-tag/index.tsx b/apps/web/src/components/icon-tag/index.tsxindex fd2d3a851..6aa26a989 100644--- a/apps/web/src/components/icon-tag/index.tsx+++ b/apps/web/src/components/icon-tag/index.tsx@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { Theme } from "@notesnook/theme";import { Flex, Text } from "@theme-ui/components";import { ThemeUICSSObject } from "@theme-ui/core";import { Icon } from "../icons";@@ -28,7 +27,7 @@ type IconTagProps = {icon: Icon;onClick?: React.MouseEventHandler<HTMLDivElement>;styles?: {- icon?: ThemeUICSSObject & { color: keyof Theme["colors"] };+ icon?: ThemeUICSSObject;container?: ThemeUICSSObject;text?: ThemeUICSSObject;};@@ -70,12 +69,12 @@ function IconTag(props: IconTagProps) {alignItems: "center",justifyContent: "center"}}- bg="bgSecondary"+ bg="var(--background-secondary)"py="2px"><Iconsize={11}- color={styles?.icon?.color || (highlight ? "primary" : "icon")}+ // color={styles?.icon?.color || (highlight ? "primary" : "icon")}sx={{ ...styles?.icon, flexShrink: 0 }}/><Text@@ -87,7 +86,7 @@ function IconTag(props: IconTagProps) {textOverflow: "ellipsis",whiteSpace: "nowrap",overflow: "hidden",- color: highlight ? "primary" : "text",+ color: highlight ? "accent" : "paragraph",...styles?.text}}>diff --git a/apps/web/src/components/icons/index.tsx b/apps/web/src/components/icons/index.tsxindex c69b66239..4b42edd67 100644--- a/apps/web/src/components/icons/index.tsx+++ b/apps/web/src/components/icons/index.tsx@@ -101,7 +101,6 @@ import {mdiViewHeadline,mdiViewSequentialOutline,mdiEmailCheckOutline,- mdiDiscord,mdiTwitter,mdiReddit,mdiFileOutline,@@ -152,8 +151,6 @@ import {mdiOrderNumericDescending,mdiOrderNumericAscending,mdiSelectGroup,- mdiContentSaveCheckOutline,- mdiContentSaveAlertOutline,mdiCurrencyUsd,mdiCellphoneKey,mdiEmailOutline,@@ -216,12 +213,13 @@ import { useTheme } from "@emotion/react";import { Theme } from "@notesnook/theme";import { Flex, FlexProps } from "@theme-ui/components";import { MotionProps } from "framer-motion";+import { isThemeColor, SchemeColors } from "@notesnook/theme";type MDIIconWrapperProps = {title?: string;path: string;size?: keyof Theme["iconSizes"] | number;- color?: keyof Theme["colors"];+ color?: SchemeColors;rotate?: boolean;};function _MDIIconWrapper({@@ -233,9 +231,10 @@ function _MDIIconWrapper({}: MDIIconWrapperProps) {const theme = useTheme() as Theme;- const themedColor: string = theme?.colors- ? (theme.colors[color] as string)- : color;+ const themedColor: string =+ theme?.colors && isThemeColor(color, theme.colors)+ ? theme.colors[color]+ : color;return (<MDIIcon@@ -271,6 +270,7 @@ export type IconProps = FlexProps &export type Icon = {(props: IconProps): JSX.Element;isReactComponent: boolean;+ path: string;};function createIcon(path: string, rotate = false) {@@ -297,6 +297,7 @@ function createIcon(path: string, rotate = false) {);};NNIcon.isReactComponent = true;+ NNIcon.path = path;return NNIcon;}@@ -411,7 +412,9 @@ export const Destruct = createIcon(mdiBomb);export const CompactView = createIcon(mdiViewHeadline);export const DetailedView = createIcon(mdiViewSequentialOutline);export const MailCheck = createIcon(mdiEmailCheckOutline);-export const Discord = createIcon(mdiDiscord);+export const Discord = createIcon(+ `m22 24l-5.25-5l.63 2H4.5A2.5 2.5 0 0 1 2 18.5v-15A2.5 2.5 0 0 1 4.5 1h15A2.5 2.5 0 0 1 22 3.5V24M12 6.8c-2.68 0-4.56 1.15-4.56 1.15c1.03-.92 2.83-1.45 2.83-1.45l-.17-.17c-1.69.03-3.22 1.2-3.22 1.2c-1.72 3.59-1.61 6.69-1.61 6.69c1.4 1.81 3.48 1.68 3.48 1.68l.71-.9c-1.25-.27-2.04-1.38-2.04-1.38S9.3 14.9 12 14.9s4.58-1.28 4.58-1.28s-.79 1.11-2.04 1.38l.71.9s2.08.13 3.48-1.68c0 0 .11-3.1-1.61-6.69c0 0-1.53-1.17-3.22-1.2l-.17.17s1.8.53 2.83 1.45c0 0-1.88-1.15-4.56-1.15m-2.07 3.79c.65 0 1.18.57 1.17 1.27c0 .69-.52 1.27-1.17 1.27c-.64 0-1.16-.58-1.16-1.27c0-.7.51-1.27 1.16-1.27m4.17 0c.65 0 1.17.57 1.17 1.27c0 .69-.52 1.27-1.17 1.27c-.64 0-1.16-.58-1.16-1.27c0-.7.51-1.27 1.16-1.27Z`+);export const Twitter = createIcon(mdiTwitter);export const Github = createIcon(mdiGithub);export const Reddit = createIcon(mdiReddit);@@ -462,8 +465,8 @@ export const OrderAtoZ = createIcon(mdiOrderAlphabeticalAscending);export const OrderZtoA = createIcon(mdiOrderAlphabeticalDescending);export const OrderOldestNewest = createIcon(mdiOrderNumericDescending);export const OrderNewestOldest = createIcon(mdiOrderNumericAscending);-export const Saved = createIcon(mdiContentSaveCheckOutline);-export const NotSaved = createIcon(mdiContentSaveAlertOutline);+export const Saved = createIcon(mdiCheckAll);+export const NotSaved = createIcon(mdiClose);export const MfaAuthenticator = createIcon(mdiCellphoneKey);export const MfaEmail = createIcon(mdiEmailOutline);diff --git a/apps/web/src/components/install-notice/index.jsx b/apps/web/src/components/install-notice/index.jsxindex e7db2b6b0..d101076c4 100644--- a/apps/web/src/components/install-notice/index.jsx+++ b/apps/web/src/components/install-notice/index.jsx@@ -22,7 +22,7 @@ import { Box, Button, Flex, Text } from "@theme-ui/components";import Config from "../../utils/config";import { getDownloadLink, getPlatform } from "../../utils/platform";import DropdownButton from "../dropdown-button";-import ThemeProvider from "../theme-provider";+import { BaseThemeProvider } from "../theme-provider";const nativeFeatures = ["Native high-performance encryption",@@ -128,9 +128,9 @@ export function showInstallNotice() {resolve(result);};ReactDOM.render(- <ThemeProvider>+ <BaseThemeProvider><InstallNotice onClose={perform} />- </ThemeProvider>,+ </BaseThemeProvider>,root);});diff --git a/apps/web/src/components/lightbox/index.tsx b/apps/web/src/components/lightbox/index.tsxindex cdbf61303..8c41b020a 100644--- a/apps/web/src/components/lightbox/index.tsx+++ b/apps/web/src/components/lightbox/index.tsx@@ -332,7 +332,7 @@ export class Lightbox extends React.Component<LightboxProps> {}}><Flex- bg="bgSecondary"+ bg="var(--background-secondary)"sx={{borderRadius: "0px 0px 0px 5px",overflow: "hidden",@@ -342,19 +342,18 @@ export class Lightbox extends React.Component<LightboxProps> {>{tools.map((tool) => (<Button+ key={tool.title}data-test-id={tool.title}disabled={!tool.enabled}- variant="tool"+ variant="secondary"bg="transparent"title={tool.title}- key={tool.title}sx={{borderRadius: 0,display: [tool.hideOnMobile ? "none" : "flex",tool.hidden ? "none" : "flex"],- color: tool.enabled ? "text" : "disabled",cursor: tool.enabled ? "pointer" : "not-allowed",flexDirection: "row",flexShrink: 0,@@ -362,10 +361,7 @@ export class Lightbox extends React.Component<LightboxProps> {}}onClick={tool.onClick}>- <tool.icon- size={18}- color={tool.enabled ? "text" : "disabled"}- />+ <tool.icon size={18} color={"icon"} /></Button>))}</Flex>diff --git a/apps/web/src/components/list-container/index.tsx b/apps/web/src/components/list-container/index.tsxindex 9d4696617..db801ee2d 100644--- a/apps/web/src/components/list-container/index.tsx+++ b/apps/web/src/components/list-container/index.tsx@@ -26,16 +26,12 @@ import {store as selectionStore} from "../../stores/selection-store";import GroupHeader from "../group-header";-import {- Context,- DEFAULT_ITEM_HEIGHT,- Item,- ListProfiles-} from "./list-profiles";+import { DEFAULT_ITEM_HEIGHT, ListProfiles } from "./list-profiles";import Announcements from "../announcements";import { ListLoader } from "../loaders/list-loader";import ScrollContainer from "../scroll-container";import { useKeyboardListNavigation } from "../../hooks/use-keyboard-list-navigation";+import { Context, Item } from "./types";export const CustomScrollbarsVirtualList = forwardRef<HTMLDivElement,@@ -55,7 +51,7 @@ export const CustomScrollbarsVirtualList = forwardRef<type ListContainerProps = {type: keyof typeof ListProfiles;items: Item[];- groupType?: string;+ groupingKey?: GroupingKey;compact?: boolean;context?: Context;refresh: () => void;@@ -68,8 +64,16 @@ type ListContainerProps = {};function ListContainer(props: ListContainerProps) {- const { type, groupType, items, context, refresh, header, button, compact } =- props;+ const {+ type,+ groupingKey,+ items,+ context,+ refresh,+ header,+ button,+ compact+ } = props;const [focusedGroupIndex, setFocusedGroupIndex] = useState(-1);@@ -174,10 +178,10 @@ function ListContainer(props: ListContainerProps) {switch (item.type) {case "header":- if (!groupType) return null;+ if (!groupingKey) return null;return (<GroupHeader- type={groupType}+ groupingKey={groupingKey}refresh={refresh}title={item.title}isFocused={index === focusedGroupIndex}@@ -218,7 +222,6 @@ function ListContainer(props: ListContainerProps) {<Componentitem={item}context={context}- index={index}type={type}compact={compact}/>@@ -231,7 +234,7 @@ function ListContainer(props: ListContainerProps) {)}{button && (<Button- variant="primary"+ variant="accent"data-test-id={`${props.type}-action-button`}onClick={button.onClick}sx={{diff --git a/apps/web/src/components/list-container/list-profiles.tsx b/apps/web/src/components/list-container/list-profiles.tsxindex 16832ac80..65701cfb3 100644--- a/apps/web/src/components/list-container/list-profiles.tsx+++ b/apps/web/src/components/list-container/list-profiles.tsx@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { navigate } from "../../navigation";import Note from "../note";import Notebook from "../notebook";import Tag from "../tag";@@ -26,36 +25,22 @@ import TrashItem from "../trash-item";import { db } from "../../common/db";import { getTotalNotes } from "@notesnook/common";import Reminder from "../reminder";-import type { Reminder as ReminderType } from "@notesnook/core/collections/reminders";import { useMemo } from "react";+import {+ ReferencesWithDateEdited,+ ItemWrapper,+ Item,+ NotebookReference,+ NotebookType,+ Reference+} from "./types";const SINGLE_LINE_HEIGHT = 1.4;const DEFAULT_LINE_HEIGHT =(document.getElementById("p")?.clientHeight || 16) - 1;export const DEFAULT_ITEM_HEIGHT = SINGLE_LINE_HEIGHT * 2 * DEFAULT_LINE_HEIGHT;-export type Item = { id: string; type: string; title: string } & Record<- string,- unknown->;--type NotebookReference = Item & { topics: string[] };-type NotebookType = Item & { topics: Item[] };--export type Context = { type: string } & Record<string, unknown>;-type ItemWrapperProps<TItem = Item> = {- index: number;- item: TItem;- type: keyof typeof ListProfiles;- context?: Context;- compact?: boolean;-};--type ItemWrapper<TItem = Item> = (- props: ItemWrapperProps<TItem>-) => JSX.Element;--const NotesProfile: ItemWrapper = ({ index, item, type, context, compact }) => {+const NotesProfile: ItemWrapper = ({ item, type, context, compact }) => {const references = useMemo(() => getReferences(item.id, item.notebooks as Item[], context?.type),[item, context]@@ -64,8 +49,6 @@ const NotesProfile: ItemWrapper = ({ index, item, type, context, compact }) => {return (<Notecompact={compact}- index={index}- pinnable={!context}item={item}tags={getTags(item)}references={references}@@ -76,42 +59,25 @@ const NotesProfile: ItemWrapper = ({ index, item, type, context, compact }) => {);};-const NotebooksProfile: ItemWrapper = ({ index, item, type }) => (+const NotebooksProfile: ItemWrapper = ({ item, type }) => (<Notebook- index={index}item={item}totalNotes={getTotalNotes(item)}date={getDate(item, type)}/>);-const TagsProfile: ItemWrapper = ({ index, item }) => (- <Tag item={item} index={index} />-);--const TopicsProfile: ItemWrapper = ({ index, item }) => (- <Topic- index={index}- item={item}- onClick={() => navigate(`/notebooks/${item.notebookId}/${item.id}`)}- />-);--const RemindersProfile: ItemWrapper = ({ index, item }) => (- <Reminder item={item as ReminderType} index={index} />-);--const TrashProfile: ItemWrapper = ({ index, item, type }) => (- <TrashItem index={index} item={item} date={getDate(item, type)} />+const TrashProfile: ItemWrapper = ({ item, type }) => (+ <TrashItem item={item} date={getDate(item, type)} />);export const ListProfiles = {home: NotesProfile,notebooks: NotebooksProfile,notes: NotesProfile,- reminders: RemindersProfile,- tags: TagsProfile,- topics: TopicsProfile,+ reminders: Reminder,+ tags: Tag,+ topics: Topic,trash: TrashProfile} as const;@@ -126,17 +92,11 @@ function getTags(item: Item) {return tags || [];}-type Reference = {- type: "topic" | "notebook";- url: string;- title: string;-};-function getReferences(noteId: string,notebooks: Item[],contextType?: string-): { dateEdited: number; references: Reference[] } | undefined {+): ReferencesWithDateEdited | undefined {if (["topic", "notebook"].includes(contextType || "")) return;const references: Reference[] = [];@@ -179,7 +139,7 @@ function getReminder(noteId: string) {return db.relations?.from({ id: noteId, type: "note" }, "reminder")[0];}-function getDate(item: Item, groupType: keyof typeof ListProfiles) {+function getDate(item: Item, groupType: keyof typeof ListProfiles): number {const sortBy = db.settings?.getGroupOptions(groupType).sortBy;switch (sortBy) {case "dateEdited":diff --git a/apps/web/src/components/list-container/types.ts b/apps/web/src/components/list-container/types.tsnew file mode 100644index 000000000..e062274be--- /dev/null+++ b/apps/web/src/components/list-container/types.ts@@ -0,0 +1,57 @@+/*+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 { ListProfiles } from "./list-profiles";++export type Item = {+ id: string;+ type: string;+ title: string;++ dateEdited: number;+ dateModified: number;+ dateDeleted: number;+ dateCreated: number;+} & Record<string, unknown>;++export type NotebookReference = Item & { topics: string[] };+export type NotebookType = Item & { topics: Item[] };++export type Context = { type: string } & Record<string, unknown>;+export type ItemWrapperProps<TItem = Item> = {+ item: TItem;+ type: keyof typeof ListProfiles;+ context?: Context;+ compact?: boolean;+};++export type ItemWrapper<TItem = Item> = (+ props: ItemWrapperProps<TItem>+) => JSX.Element | null;++export type Reference = {+ type: "topic" | "notebook";+ url: string;+ title: string;+};++export type ReferencesWithDateEdited = {+ dateEdited: number;+ references: Reference[];+};diff --git a/apps/web/src/components/list-item/index.jsx b/apps/web/src/components/list-item/index.tsxsimilarity index 65%rename from apps/web/src/components/list-item/index.jsxrename to apps/web/src/components/list-item/index.tsxindex d89f0fce5..ff4862c25 100644--- a/apps/web/src/components/list-item/index.jsx+++ b/apps/web/src/components/list-item/index.tsx@@ -18,60 +18,60 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { Box, Flex, Text } from "@theme-ui/components";-import { Copy } from "../icons";import {store as selectionStore,useStore as useSelectionStore} from "../../stores/selection-store";import { useMenuTrigger } from "../../hooks/use-menu";-import Config from "../../utils/config";-import { db } from "../../common/db";-import * as clipboard from "clipboard-polyfill/text";-import { useRef } from "react";--function debugMenuItems(type) {- if (!type) return [];- return [- {- key: "copy-data",- title: () => "Copy data",- icon: Copy,- onClick: async ({ [type]: item }) => {- if (type === "note" && item.contentId) {- item.additionalData = {- content: db.debug.strip(await db.content.raw(item.contentId))- };- }- item.additionalData = {- ...item.additionalData,- lastSynced: await db.lastSynced()- };- await clipboard.writeText(db.debug.strip(item));- }- }- ];-}--function ListItem(props) {+import React, { useRef } from "react";+import { SchemeColors } from "@notesnook/theme";+import { Item } from "../list-container/types";+import { MenuItem } from "@notesnook/ui";+import { alpha } from "@theme-ui/color";++type ListItemProps = {+ colors?: {+ accent: SchemeColors;+ paragraph: SchemeColors;+ background: SchemeColors;+ };+ isFocused?: boolean;+ isCompact?: boolean;+ isDisabled?: boolean;+ isSimple?: boolean;+ item: Item;++ onKeyPress?: (e: React.KeyboardEvent<HTMLDivElement>) => void;+ onClick?: () => void;+ title: string | JSX.Element;+ header?: JSX.Element;+ body?: JSX.Element | string;+ footer?: JSX.Element;++ menuItems?: (item: any, items?: any[]) => MenuItem[];+};++function ListItem(props: ListItemProps) {const {- colors: { text, background, primary } = {- primary: "primary",- text: "text",+ colors: { paragraph, background, accent } = {+ accent: "accent",+ paragraph: "paragraph",background: "background"},isFocused,isCompact,isDisabled,- isSimple+ isSimple,+ item} = props;- const listItemRef = useRef();+ const listItemRef = useRef<HTMLDivElement>(null);const { openMenu, target } = useMenuTrigger();const isMenuTarget = target && target === listItemRef.current;const isSelected = useSelectionStore((store) => {const isInSelection =- store.selectedItems.findIndex((item) => props.item.id === item.id) > -1;+ store.selectedItems.findIndex((item) => item.id === props.item.id) > -1;return isFocused? store.selectedItems.length > 1 && isInSelection: isInSelection;@@ -79,38 +79,32 @@ function ListItem(props) {return (<Flex- id={`id_${props.item.id}`}+ id={`id_${item.id}`}className={isSelected ? "selected" : ""}ref={listItemRef}onContextMenu={(e) => {e.preventDefault();e.stopPropagation();- let items = props.menu?.items?.slice() || [];let title = undefined;let selectedItems = selectionStore.get()- .selectedItems.filter((i) => i.type === props.item.type);+ .selectedItems.filter((i) => i.type === item.type);- if (selectedItems.findIndex((i) => i.id === props.item.id) === -1) {+ if (selectedItems.findIndex((i) => i.id === item.id) === -1) {selectedItems = [];- selectedItems.push(props.item);+ selectedItems.push(item);}if (selectedItems.length > 1) {title = `${selectedItems.length} items selected`;- items = items.filter((item) => item.multiSelect);- } else if (Config.get("debugMode", false)) {- items.push(...debugMenuItems(props.item.type));}- if (items.length <= 0) return;+ const menuItems = props.menuItems?.(item, selectedItems);+ if (!menuItems) return;- openMenu(items, {- title,- items: selectedItems,- target: listItemRef.current,- ...props.menu?.extraData+ openMenu(menuItems, {+ title});}}pl={1}@@ -132,26 +126,24 @@ function ListItem(props) {opacity: isDisabled ? 0.7 : 1,borderLeft: "5px solid",- borderLeftColor: isFocused ? primary : "transparent",+ borderLeftColor: isFocused ? accent : "transparent",ml: "2px",mr: "1px",- backgroundColor: isSelected- ? "shade"- : isMenuTarget || isFocused- ? "hover"- : background,+ backgroundColor:+ isSelected || isMenuTarget || isFocused+ ? "background-selected"+ : background,":hover": {- backgroundColor: isSelected ? "textSelection" : "hover"+ backgroundColor: isSelected ? "hover-selected" : "hover"},":focus": {- backgroundColor: isSelected ? "textSelection" : "hover"+ backgroundColor: isSelected ? "hover-selected" : "hover"},":focus-visible": {- outline: `1px solid var(--${- primary === "primary" ? "dimPrimary" : primary- })`,+ outline: `1px solid`,+ outlineColor: accent === "accent" ? "accent" : alpha("accent", 0.7),backgroundColor: isSelected ? "textSelection" : background}}}@@ -177,7 +169,7 @@ function ListItem(props) {overflow: "hidden",textOverflow: "ellipsis",fontWeight: isCompact || isSimple ? "body" : "bold",- color: text,+ color: paragraph,display: "block"}}>diff --git a/apps/web/src/components/loader/index.jsx b/apps/web/src/components/loader/index.tsxsimilarity index 83%rename from apps/web/src/components/loader/index.jsxrename to apps/web/src/components/loader/index.tsxindex 75fe431df..de83c2761 100644--- a/apps/web/src/components/loader/index.jsx+++ b/apps/web/src/components/loader/index.tsx@@ -20,7 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { Flex, Text } from "@theme-ui/components";import { Loading } from "../icons";-export default function Loader({ title, text }) {+type LoaderProps = { title: string; text?: string };+export function Loader(props: LoaderProps) {+ const { title, text } = props;return (<Flexsx={{@@ -35,9 +37,11 @@ export default function Loader({ title, text }) {<Text variant="subtitle" mt={4}>{title}</Text>- <Text variant="body" mt={2}>- {text}- </Text>+ {text && (+ <Text variant="body" mt={2}>+ {text}+ </Text>+ )}</Flex>);}diff --git a/apps/web/src/components/menu/index.jsx b/apps/web/src/components/menu/index.jsxdeleted file mode 100644index 4f8d21e78..000000000--- a/apps/web/src/components/menu/index.jsx+++ /dev/null@@ -1,258 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import React, { useCallback, useRef, useEffect, useState } from "react";-import { Flex, Text } from "@theme-ui/components";-import { getPosition } from "../../hooks/use-menu";-import { FlexScrollContainer } from "../scroll-container";-import MenuItem from "./menu-item";-import { store as selectionStore } from "../../stores/selection-store";--function getMenuItemId(item) {- return `menuitem-${item.key}`;-}-function useMenuFocus(items, onAction, onClose) {- const [focusIndex, setFocusIndex] = useState(-1);- const [isSubmenuOpen, setIsSubmenuOpen] = useState(false);-- const moveItemIntoView = useCallback(- (index) => {- const item = items[index];- if (!item) return;- const element = document.getElementById(getMenuItemId(item));- if (!element) return;- element.scrollIntoView({- behavior: "auto"- });- },- [items]- );-- const onKeyDown = useCallback(- (e) => {- const isSeperator = (i) =>- items && (items[i]?.type === "separator" || items[i]?.isDisabled);- const moveDown = (i) => (i < items.length - 1 ? ++i : 0);- const moveUp = (i) => (i > 0 ? --i : items.length - 1);- const hasSubmenu = (i) => items && items[i]?.hasSubmenu;- const openSubmenu = (index) => {- if (!hasSubmenu(index)) return;- setIsSubmenuOpen(true);- };-- const closeSubmenu = (index) => {- if (!hasSubmenu(index)) return;- setIsSubmenuOpen(false);- };-- setFocusIndex((i) => {- let nextIndex = i;-- switch (e.key) {- case "ArrowUp":- if (isSubmenuOpen) break;- nextIndex = moveUp(i);- while (isSeperator(nextIndex)) {- nextIndex = moveUp(nextIndex);- }- break;- case "ArrowDown":- if (isSubmenuOpen) break;- nextIndex = moveDown(i);- while (isSeperator(nextIndex)) {- nextIndex = moveDown(nextIndex);- }- break;- case "ArrowRight":- openSubmenu(i);- break;- case "ArrowLeft":- closeSubmenu(i);- break;- case "Enter":- onAction && onAction(e);- break;- case "Escape":- onClose && onClose(e);- break;- default:- break;- }- if (nextIndex !== i) moveItemIntoView(nextIndex);-- return nextIndex;- });- },- [items, isSubmenuOpen, moveItemIntoView, onAction, onClose]- );-- useEffect(() => {- window.addEventListener("keydown", onKeyDown);- return () => {- window.removeEventListener("keydown", onKeyDown);- };- }, [onKeyDown]);-- return [focusIndex, setFocusIndex, isSubmenuOpen, setIsSubmenuOpen];-}--function Menu({ items, data, title, closeMenu }) {- const hoverTimeout = useRef();- const onAction = useCallback(- (e, item) => {- e.stopPropagation();- if (closeMenu) closeMenu();- if (item.onClick) {- item.onClick();- // TODO: this probably shouldn't be here.- selectionStore.toggleSelectionMode(false);- }- },- [closeMenu]- );-- const [focusIndex, setFocusIndex, isSubmenuOpen, setIsSubmenuOpen] =- useMenuFocus(- items,- (e) => {- const item = items[focusIndex];- if (item) onAction(e, item);- },- () => closeMenu()- );-- const subMenuRef = useRef();- useEffect(() => {- const item = items[focusIndex];- if (!item || !subMenuRef.current) return;-- if (!isSubmenuOpen) {- subMenuRef.current.style.visibility = "hidden";- return;- }-- const { top, left } = getPosition(subMenuRef.current, {- yOffset: 0,- relativeTo: document.getElementById(getMenuItemId(item)),- location: "right"- });-- subMenuRef.current.style.visibility = "visible";- subMenuRef.current.style.top = `${top}px`;- subMenuRef.current.style.left = `${left}px`;- }, [isSubmenuOpen, focusIndex, items]);-- return (- <>- <MenuContainer title={title}>- {items.map((item, index) => (- <MenuItem- key={item.key}- index={index}- item={item}- onClick={(e) => {- if (item.items?.length) {- setFocusIndex(index);- setIsSubmenuOpen(true);- } else onAction(e, item);- }}- isFocused={focusIndex === index}- onMouseEnter={() => {- if (item.isDisabled) {- setFocusIndex(-1);- return;- }- if (!isSubmenuOpen) setFocusIndex(index);-- clearTimeout(hoverTimeout.current);- hoverTimeout.current = setTimeout(() => {- if (isSubmenuOpen) {- setFocusIndex(index);- setIsSubmenuOpen(false);- }- if (item.items?.length) {- setIsSubmenuOpen(true);- }- }, 200);- }}- onMouseLeave={() => {- clearTimeout(hoverTimeout.current);- }}- />- ))}- </MenuContainer>- {isSubmenuOpen && (- <Flex- ref={subMenuRef}- style={{ visibility: "hidden" }}- sx={{- position: "absolute"- }}- >- <Menu- items={items[focusIndex]?.items || []}- closeMenu={closeMenu}- data={data}- />- </Flex>- )}- </>- );-}-export default React.memo(Menu);--function MenuContainer({ title, children }) {- return (- <Flex- className="menuContainer"- data-test-id="menu-container"- tabIndex={-1}- py={1}- sx={{- bg: "bgSecondary",- padding: 0,- margin: 0,- borderRadius: "default",- boxShadow: "0px 0px 10px 0px #00000022",- border: "1px solid var(--border)",- width: 220,- flexDirection: "column"- }}- >- {title && (- <Text- py={"8px"}- px={3}- sx={{- borderBottom: "1px solid",- borderBottomColor: "border",- wordWrap: "break-word",- fontSize: "subtitle",- fontFamily: "body",- color: "primary"- }}- data-test-id="menu-title"- >- {title}- </Text>- )}- <FlexScrollContainer>{children}</FlexScrollContainer>- </Flex>- );-}diff --git a/apps/web/src/components/menu/menu-item.jsx b/apps/web/src/components/menu/menu-item.jsxdeleted file mode 100644index af918ba3e..000000000--- a/apps/web/src/components/menu/menu-item.jsx+++ /dev/null@@ -1,115 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import { Check, ChevronRight, Pro } from "../icons";-import { useRef } from "react";-import { Flex, Box, Text, Button } from "@theme-ui/components";--function MenuItem({ item, isFocused, onMouseEnter, onMouseLeave, onClick }) {- const {- title,- key,- color,- icon: Icon,- iconColor,- type,- tooltip,- isDisabled,- isChecked,- hasSubmenu,- isPremium,- modifier- } = item;- const itemRef = useRef();- if (type === "separator")- return (- <Box- key={key}- bg="border"- my={1}- sx={{ width: "90%", height: "1px", ml: "5%" }}- />- );-- return (- <Flex- as="li"- id={`menuitem-${key}`}- onMouseEnter={onMouseEnter}- onMouseLeave={onMouseLeave}- sx={{ flex: 1, flexDirection: "column" }}- >- <Button- data-test-id={`menuitem-${key}`}- key={key}- ref={itemRef}- tabIndex={-1}- variant="menuitem"- title={tooltip}- disabled={isDisabled}- onClick={onClick}- sx={{- bg: isFocused ? "border" : "transparent",- alignItems: "center",- justifyContent: "space-between",- display: "flex",- py: "7px",- px: 2,- mx: 1,- borderRadius: "default"- }}- >- <Flex sx={{ mr: 1 }}>- {Icon && (- <Icon color={iconColor || "icon"} size={15} sx={{ mr: 2 }} />- )}- <Text- as="span"- sx={{- fontSize: "menu",- fontFamily: "body",- color: color || "text",- textAlign: "left"- }}- >- {title}- </Text>- {isPremium && <Pro size={14} color="primary" sx={{ ml: 1 }} />}- </Flex>- <Flex data-test-id={`toggle-state-${isChecked ? "on" : "off"}`}>- {isChecked && <Check size={14} />}- {hasSubmenu && <ChevronRight size={14} />}- {modifier && (- <Text- as="span"- sx={{- fontSize: "menu",- fontFamily: "body",- color: "fontTertiary"- }}- >- {modifier}- </Text>- )}- </Flex>- </Button>- </Flex>- );-}-export default MenuItem;diff --git a/apps/web/src/components/navigation-menu/index.tsx b/apps/web/src/components/navigation-menu/index.tsxindex 2c31013a1..bb466fd94 100644--- a/apps/web/src/components/navigation-menu/index.tsx+++ b/apps/web/src/components/navigation-menu/index.tsx@@ -48,6 +48,7 @@ import { useStore as useUserStore } from "../../stores/user-store";import { useStore as useThemeStore } from "../../stores/theme-store";import useLocation from "../../hooks/use-location";import { FlexScrollContainer } from "../scroll-container";+import { ScopedThemeProvider } from "../theme-provider";type Route = {title: string;@@ -118,8 +119,8 @@ function NavigationMenu(props: NavigationMenuProps) {const refreshNavItems = useAppStore((store) => store.refreshNavItems);const isLoggedIn = useUserStore((store) => store.isLoggedIn);const isMobile = useMobile();- const theme = useThemeStore((store) => store.theme);- const toggleNightMode = useThemeStore((store) => store.toggleNightMode);+ const theme = useThemeStore((store) => store.colorScheme);+ const toggleNightMode = useThemeStore((store) => store.toggleColorScheme);const setFollowSystemTheme = useThemeStore((store) => store.setFollowSystemTheme);@@ -140,178 +141,183 @@ function NavigationMenu(props: NavigationMenuProps) {}, [location, previousLocation, state]);return (- <AnimatedFlex- id="navigation-menu"- data-test-id="navigation-menu"- initial={{- opacity: 0- }}- animate={{- opacity: isFocusMode ? 0 : 1,- visibility: isFocusMode ? "collapse" : "visible"- }}- transition={{ duration: 0.2, ease: "easeInOut" }}- sx={{- zIndex: 1,- position: "relative",- flex: 1,- height: "100%",- overflow: "hidden",- flexDirection: "column",- justifyContent: "space-between"- }}- bg={"bgSecondary"}- px={0}- >- <FlexScrollContainer- style={{+ <ScopedThemeProvider scope="navigationMenu" injectCssVars={false}>+ <AnimatedFlex+ id="navigation-menu"+ data-test-id="navigation-menu"+ initial={{+ opacity: 0+ }}+ animate={{+ opacity: isFocusMode ? 0 : 1,+ visibility: isFocusMode ? "collapse" : "visible"+ }}+ transition={{ duration: 0.2, ease: "easeInOut" }}+ sx={{+ zIndex: 1,+ position: "relative",+ flex: 1,+ height: "100%",+ overflow: "hidden",flexDirection: "column",- display: "flex"+ justifyContent: "space-between",+ bg: "background"}}- suppressScrollX={true}+ px={0}>- {routes.map((item) => (- <NavigationItem- isTablet={isTablet}- key={item.path}- title={item.title}- icon={item.icon}- tag={item.tag}- selected={- item.path === "/"- ? location === item.path- : location.startsWith(item.path)- }- onClick={() => {- if (!isMobile && location === item.path)- return toggleNavigationContainer();- _navigate(item.path);- }}- />- ))}- {colors.map((color, index) => (- <NavigationItem- animate={!IS_DESKTOP_APP}- index={index}- isTablet={isTablet}- key={color.id}- title={db.colors?.alias(color.id)}- icon={Circle}- selected={location === `/colors/${color.id}`}- color={color.title.toLowerCase()}- onClick={() => {- _navigate(`/colors/${color.id}`);- }}- menuItems={[- {- key: "rename",- title: () => "Rename color",- onClick: async () => {- await showRenameColorDialog(color.id);- }- }- ]}- />- ))}- <Box- bg="border"- my={1}- sx={{ width: "85%", height: "0.8px", alignSelf: "center" }}- />- {shortcuts.map((item, index) => (- <NavigationItem- animate={!IS_DESKTOP_APP}- index={colors.length - 1 + index}- isTablet={isTablet}- key={item.id}- title={item.type === "tag" ? db.tags?.alias(item.id) : item.title}- menuItems={[- {- key: "removeshortcut",- title: () => "Remove shortcut",- onClick: async () => {- await db.shortcuts?.remove(item.id);- refreshNavItems();- }- }- ]}- icon={- item.type === "notebook"- ? Notebook2- : item.type === "tag"- ? Tag2- : Topic- }- isShortcut- selected={shouldSelectNavItem(location, item)}- onClick={() => {- if (item.type === "notebook") {- _navigate(`/notebooks/${item.id}`);- } else if (item.type === "topic") {- _navigate(`/notebooks/${item.notebookId}/${item.id}`);- } else if (item.type === "tag") {- _navigate(`/tags/${item.id}`);- }- }}- />- ))}- </FlexScrollContainer>- <Flex sx={{ flexDirection: "column" }}>- {isLoggedIn === false && (- <NavigationItem- isTablet={isTablet}- title="Login"- icon={Login}- onClick={() => hardNavigate("/login")}- />- )}- {isTablet && (- <NavigationItem- isTablet={isTablet}- title={theme === "dark" ? "Light mode" : "Dark mode"}- icon={theme === "dark" ? LightMode : DarkMode}- onClick={() => {- setFollowSystemTheme(false);- toggleNightMode();- }}- />- )}- <NavigationItem- isTablet={isTablet}- key={settings.path}- title={settings.title}- icon={settings.icon}- onClick={() => {- hashNavigate("/settings");+ <FlexScrollContainer+ style={{+ flexDirection: "column",+ display: "flex"}}+ suppressScrollX={true}>- {isTablet ? null : (- <Button- variant={"icon"}- title="Toggle dark/light mode"- sx={{- bg: "transparent",- borderRadius: "default",- ":hover:not(disabled)": {- bg: "bgSecondaryHover",- filter: "brightness(100%)"+ <Flex sx={{ flexDirection: "column" }}>+ {routes.map((item) => (+ <NavigationItem+ isTablet={isTablet}+ key={item.path}+ title={item.title}+ icon={item.icon}+ tag={item.tag}+ selected={+ item.path === "/"+ ? location === item.path+ : location.startsWith(item.path)}- }}+ onClick={() => {+ if (!isMobile && location === item.path)+ return toggleNavigationContainer();+ _navigate(item.path);+ }}+ />+ ))}+ {colors.map((color, index) => (+ <NavigationItem+ animate={!IS_DESKTOP_APP}+ index={index}+ isTablet={isTablet}+ key={color.id}+ title={db.colors?.alias(color.id)}+ icon={Circle}+ selected={location === `/colors/${color.id}`}+ color={color.title.toLowerCase()}+ onClick={() => {+ _navigate(`/colors/${color.id}`);+ }}+ menuItems={[+ {+ type: "button",+ key: "rename",+ title: "Rename color",+ onClick: async () => {+ await showRenameColorDialog(color.id);+ }+ }+ ]}+ />+ ))}+ <Box+ bg="border"+ my={1}+ sx={{ width: "85%", height: "0.8px", alignSelf: "center" }}+ />+ {shortcuts.map((item, index) => (+ <NavigationItem+ animate={!IS_DESKTOP_APP}+ index={colors.length - 1 + index}+ isTablet={isTablet}+ key={item.id}+ title={+ item.type === "tag" ? db.tags?.alias(item.id) : item.title+ }+ menuItems={[+ {+ type: "button",+ key: "removeshortcut",+ title: "Remove shortcut",+ onClick: async () => {+ await db.shortcuts?.remove(item.id);+ refreshNavItems();+ }+ }+ ]}+ icon={+ item.type === "notebook"+ ? Notebook2+ : item.type === "tag"+ ? Tag2+ : Topic+ }+ isShortcut+ selected={shouldSelectNavItem(location, item)}+ onClick={() => {+ if (item.type === "notebook") {+ _navigate(`/notebooks/${item.id}`);+ } else if (item.type === "topic") {+ _navigate(`/notebooks/${item.notebookId}/${item.id}`);+ } else if (item.type === "tag") {+ _navigate(`/tags/${item.id}`);+ }+ }}+ />+ ))}+ </Flex>+ </FlexScrollContainer>++ <Flex sx={{ flexDirection: "column" }}>+ {isLoggedIn === false && (+ <NavigationItem+ isTablet={isTablet}+ title="Login"+ icon={Login}+ onClick={() => hardNavigate("/login")}+ />+ )}+ {isTablet && (+ <NavigationItem+ isTablet={isTablet}+ title={theme === "dark" ? "Light mode" : "Dark mode"}+ icon={theme === "dark" ? LightMode : DarkMode}onClick={() => {setFollowSystemTheme(false);toggleNightMode();}}- >- {theme === "dark" ? (- <LightMode size={16} />- ) : (- <DarkMode size={16} />- )}- </Button>+ />)}- </NavigationItem>- </Flex>- </AnimatedFlex>+ <NavigationItem+ isTablet={isTablet}+ key={settings.path}+ title={settings.title}+ icon={settings.icon}+ onClick={() => {+ if (!isMobile && location === settings.path)+ return toggleNavigationContainer();+ hashNavigate("/settings");+ }}+ selected={location.startsWith(settings.path)}+ >+ {isTablet ? null : (+ <Button+ variant={"icon"}+ title="Toggle dark/light mode"+ sx={{ borderLeft: "1px solid var(--border)" }}+ onClick={() => {+ setFollowSystemTheme(false);+ toggleNightMode();+ }}+ >+ {theme === "dark" ? (+ <LightMode size={16} />+ ) : (+ <DarkMode size={16} />+ )}+ </Button>+ )}+ </NavigationItem>+ </Flex>+ </AnimatedFlex>+ </ScopedThemeProvider>);}export default NavigationMenu;diff --git a/apps/web/src/components/navigation-menu/navigation-item.tsx b/apps/web/src/components/navigation-menu/navigation-item.tsxindex 2fb844899..95f9e37eb 100644--- a/apps/web/src/components/navigation-menu/navigation-item.tsx+++ b/apps/web/src/components/navigation-menu/navigation-item.tsx@@ -22,13 +22,14 @@ import { useStore as useAppStore } from "../../stores/app-store";import { Menu } from "../../hooks/use-menu";import useMobile from "../../hooks/use-mobile";import { PropsWithChildren } from "react";-import { Theme } from "@notesnook/theme";import { Icon, Shortcut } from "../icons";import { AnimatedFlex } from "../animated";+import { SchemeColors, createButtonVariant } from "@notesnook/theme";+import { MenuItem } from "@notesnook/ui";type NavigationItemProps = {icon: Icon;- color?: keyof Theme["colors"];+ color?: SchemeColors;title: string;isTablet?: boolean;isLoading?: boolean;@@ -39,8 +40,7 @@ type NavigationItemProps = {count?: number;animate?: boolean;index?: number;- // TODO: add proper typings here- menuItems?: any[];+ menuItems?: MenuItem[];};function NavigationItem(props: PropsWithChildren<NavigationItemProps>) {@@ -75,24 +75,32 @@ function NavigationItem(props: PropsWithChildren<NavigationItemProps>) {x: 0}}transition={{ duration: 0.1, delay: index * 0.05, ease: "easeIn" }}- bg={selected ? "bgSecondaryHover" : "transparent"}sx={{+ ...createButtonVariant(+ selected ? "background-selected" : "transparent",+ "transparent",+ {+ hover: {+ bg: selected ? "hover-selected" : "hover"+ }+ }+ ),borderRadius: "default",mx: 1,+ p: 0,mt: isTablet ? 1 : "3px",alignItems: "center",position: "relative",":first-of-type": { mt: 1 },- ":last-of-type": { mb: 1 },- ":hover:not(:disabled)": {- bg: "bgSecondaryHover",- filter: "brightness(100%)"- }+ ":last-of-type": { mb: 1 }+ // ":hover:not(:disabled)": {+ // bg: "hover",+ // filter: "brightness(100%)"+ // }}}><Buttondata-test-id={`navigation-item`}- bg={"transparent"}sx={{px: 2,flex: 1,@@ -113,7 +121,7 @@ function NavigationItem(props: PropsWithChildren<NavigationItemProps>) {><Iconsize={isTablet ? 16 : 15}- color={color || (selected ? "primary" : "icon")}+ color={color || (selected ? "icon-selected" : "icon")}rotate={isLoading}/>{isShortcut && (@@ -132,6 +140,7 @@ function NavigationItem(props: PropsWithChildren<NavigationItemProps>) {overflow: "hidden",textOverflow: "ellipsis",fontWeight: selected ? "bold" : "normal",+ color: selected ? "paragraph-selected" : "paragraph",fontSize: "subtitle",display: isTablet ? "none" : "block"}}@@ -144,6 +153,8 @@ function NavigationItem(props: PropsWithChildren<NavigationItemProps>) {variant="subBody"as="span"sx={{+ bg: "accent",+ color: "white",ml: 1,px: "small",borderRadius: "default"diff --git a/apps/web/src/components/note/index.jsx b/apps/web/src/components/note/index.tsxsimilarity index 54%rename from apps/web/src/components/note/index.jsxrename to apps/web/src/components/note/index.tsxindex 743179801..870c184f0 100644--- a/apps/web/src/components/note/index.jsx+++ b/apps/web/src/components/note/index.tsx@@ -73,23 +73,33 @@ import { exportNotes } from "../../common/export";import { Multiselect } from "../../common/multi-select";import { store as selectionStore } from "../../stores/selection-store";import {+ Reminder as ReminderType,formatReminderTime,isReminderActive,isReminderToday} from "@notesnook/core/collections/reminders";-function Note(props) {- const {- tags,- references,- item,- index,- context,- date,- reminder,- simplified,- compact- } = props;+import { MenuItem } from "@notesnook/ui";+import {+ Context,+ Item,+ ReferencesWithDateEdited+} from "../list-container/types";+import { SchemeColors } from "@notesnook/theme";++type NoteProps = {+ tags: Item[];+ references?: ReferencesWithDateEdited;+ item: Item;+ context?: Context;+ date: number;+ reminder?: ReminderType;+ simplified?: boolean;+ compact?: boolean;+};++function Note(props: NoteProps) {+ const { tags, references, item, date, reminder, simplified, compact } = props;const note = item;const isOpened = useStore((store) => store.selectedNote === note.id);@@ -100,40 +110,32 @@ function Note(props) {() => attachments.filter((a) => a.failed),[attachments]);-- const primary = useMemo(() => {- if (!note.color) return "primary";- return note.color.toLowerCase();- }, [note.color]);+ const primary: SchemeColors = !note.color+ ? "accent-selected"+ : (note.color as string).toLowerCase();return (<ListItem- selectableisFocused={isOpened}isCompact={compact}isSimple={simplified}item={note}title={note.title}- body={note.headline}- id={note.id}- index={index}+ body={note.headline as string}onKeyPress={async (e) => {if (e.key === "Delete") {- let selectedItems = selectionStore+ const selectedItems = selectionStore.get().selectedItems.filter((i) => i.type === item.type && i !== item);await Multiselect.moveNotesToTrash([item, ...selectedItems]);}}}colors={{- primary,- text: note.color ? primary : "text",- background: isOpened ? "bgSecondary" : "background"- }}- menu={{- items: menuItems,- extraData: { note, context }+ accent: primary,+ paragraph: note.color ? primary : "heading",+ background: "background"}}+ menuItems={menuItems}onClick={() => {if (note.conflicted) {hashNavigate(`/notes/${note.id}/conflict`, { replace: true });@@ -178,74 +180,54 @@ function Note(props) {<Flexsx={{fontSize: "subBody",- color: isOpened ? "bgSecondaryText" : "fontTertiary",- alignItems: "center"+ color: "var(--paragraph-secondary)",+ alignItems: "center",+ gap: 1}}>{compact ? (<>- {note.conflicted && (- <Alert size={15} color="error" sx={{ mr: 1 }} />- )}- {note.locked && (- <Lock- size={11}- color={"fontTertiary"}- sx={{ mr: 1 }}- data-test-id={`locked`}- />- )}- {note.favorite && (- <Star color={primary} size={15} sx={{ mr: 1 }} />- )}+ {note.conflicted && <Alert size={15} color="var(--icon-error)" />}+ {note.locked && <Lock size={11} data-test-id={`locked`} />}+ {note.favorite && <Star color={primary} size={15} />}<TimeAgo live={true} datetime={date} locale="short" /></>) : (<>- {note.conflicted && (- <Alert size={15} color="error" sx={{ mr: 1 }} />- )}+ {note.conflicted && <Alert size={15} color="error" />}- {note.localOnly && <SyncOff size={13} sx={{ mr: 1 }} />}+ {note.localOnly && <SyncOff size={13} />}<TimeAgosx={{ flexShrink: 0 }}locale="en_short"live={true}datetime={date}- mr={1}/>{attachments.length > 0 && (- <Flex mr={1}>- <Attachment size={13} color="fontTertiary" />- <Text ml={"2px"}>{attachments.length}</Text>+ <Flex sx={{ alignItems: "center", justifyContent: "center" }}>+ <Attachment size={13} />+ <Text variant="subBody" ml={"2px"}>+ {attachments.length}+ </Text></Flex>)}{failed.length > 0 && (- <Flex mr={1} title={`Errors in ${failed.length} attachments.`}>- <AttachmentError size={13} color="error" />+ <Flex title={`Errors in ${failed.length} attachments.`}>+ <AttachmentError size={13} color="var(--icon-error)" /><Text ml={"2px"}>{failed.length}</Text></Flex>)}{note.pinned && !props.context && (- <Pin size={13} color={primary} sx={{ mr: 1 }} />+ <Pin size={13} color={primary} />)}- {note.locked && (- <Lock- size={13}- color={"fontTertiary"}- sx={{ mr: 1 }}- data-test-id={`locked`}- />- )}+ {note.locked && <Lock size={13} data-test-id={`locked`} />}- {note.favorite && (- <Star color={primary} size={15} sx={{ mr: 1 }} />- )}+ {note.favorite && <Star color={primary} size={15} />}{tags?.map((tag) => {return (@@ -253,18 +235,17 @@ function Note(props) {data-test-id={`tag-item`}key={tag.id}variant="anchor"- mr={1}title={`Go to #${tag.alias}`}onClick={(e) => {e.stopPropagation();- if (!tag.id) return showToast("Tag not found.");+ if (!tag.id) return showToast("error", "Tag not found.");navigate(`/tags/${tag.id}`);}}sx={{maxWidth: `calc(100% / ${tags.length})`,overflow: "hidden",textOverflow: "ellipsis",- color: "fontTertiary"+ color: "var(--paragraph-secondary)"}}>#{tag.alias}@@ -300,7 +281,7 @@ export default React.memo(Note, function (prevProps, nextProps) {);});-const pin = (note) => {+const pin = (note: Item) => {return store.pin(note.id).then(async () => {@@ -335,244 +316,229 @@ const formats = [icon: Plaintext,subtitle: "Can be opened in any plain-text editor."}-];+] as const;const notFullySyncedText ="Cannot perform this action because note is not fully synced.";-const menuItems = [- {- key: "pin",- title: "Pin",- checked: ({ note }) => note.pinned,- icon: Pin,- onClick: async ({ note }) => {- await pin(note);- }- },- {- key: "readonly",- title: "Readonly",- checked: ({ note }) => note.readonly,- icon: Readonly,- onClick: ({ note }) => store.readonly(note.id)- },- {- key: "favorite",- title: "Favorite",- checked: ({ note }) => note.favorite,- icon: StarOutline,- onClick: ({ note }) => store.favorite(note.id)- },- {- key: "lock",- disabled: ({ note }) =>- !db.notes.note(note.id).synced() ? notFullySyncedText : false,- title: "Lock",- checked: ({ note }) => note.locked,- icon: Lock,- onClick: async ({ note }) => {- const { unlock, lock } = store.get();- if (!note.locked) {- if (await lock(note.id))+const menuItems: (note: any, items?: any[]) => MenuItem[] = (+ note,+ items = []+) => {+ const isSynced = db.notes?.note(note.id).synced();+ const ids = items.map((i) => i.id);++ return [+ {+ type: "button",+ key: "pin",+ title: "Pin",+ isChecked: note.pinned,+ icon: Pin.path,+ onClick: () => pin(note)+ },+ {+ type: "button",+ key: "readonly",+ title: "Readonly",+ isChecked: note.readonly,+ icon: Readonly.path,+ onClick: () => store.readonly(note.id)+ },+ {+ type: "button",+ key: "favorite",+ title: "Favorite",+ isChecked: note.favorite,+ icon: StarOutline.path,+ onClick: () => store.favorite(note.id)+ },+ {+ type: "button",+ key: "lock",+ isDisabled: !isSynced,+ title: "Lock",+ isChecked: note.locked,+ icon: Lock.path,+ onClick: async () => {+ const { unlock, lock } = store.get();+ if (!note.locked) {+ await lock(note.id);showToast("success", "Note locked successfully!");- } else {- if (await unlock(note.id))+ } else {+ await unlock(note.id);showToast("success", "Note unlocked successfully!");+ }+ },+ isPro: true+ },+ {+ type: "button",+ key: "remind-me",+ title: "Remind me",+ icon: AddReminder.path,+ onClick: async () => {+ await showAddReminderDialog(note.id);}},- isPro: true- },- {- key: "remind-me",- title: "Remind me",- icon: AddReminder,- onClick: async ({ note }) => {- await showAddReminderDialog(note.id);- }- },- { key: "sep1", type: "separator" },- {- key: "notebooks",- title: "Notebooks",- icon: Notebook,- items: notebooksMenuItems,- multiSelect: true- },- {- key: "colors",- title: "Assign color",- icon: Colors,- items: colorsToMenuItems()- },- {- key: "add-tags",- title: "Tags",- icon: Tag2,- multiSelect: true,- items: tagsMenuItems- // onClick: async ({ items }) => {- // await showAddTagsDialog(items.map((i) => i.id));- // }- },- { key: "sep2", type: "separator" },- {- key: "print",- title: "Print",- disabled: ({ note }) => {- if (!db.notes.note(note.id).synced()) return notFullySyncedText;+ { key: "sep1", type: "separator" },+ {+ type: "button",+ key: "notebooks",+ title: "Notebooks",+ icon: Notebook.path,+ menu: { items: notebooksMenuItems(items) },+ multiSelect: true},- icon: Print,- onClick: async ({ note }) => {- await exportNotes("pdf", [note.id]);- }- },- {- key: "publish",- disabled: ({ note }) => {- if (!db.notes.note(note.id).synced()) return notFullySyncedText;- if (!db.monographs.isPublished(note.id) && note.locked)- return "You cannot publish a locked note.";+ {+ type: "button",+ key: "colors",+ title: "Assign color",+ icon: Colors.path,+ menu: { items: colorsToMenuItems(note) }},- icon: Publish,- title: "Publish",- checked: ({ note }) => db.monographs.isPublished(note.id),- onClick: async ({ note }) => {- const isPublished = db.monographs.isPublished(note.id);- if (isPublished) await db.monographs.unpublish(note.id);- else await showPublishView(note.id, "bottom");- }- },- {- key: "export",- title: "Export as",- icon: Export,- disabled: ({ note }) => {- if (!db.notes.note(note.id).synced()) return notFullySyncedText;+ {+ type: "button",+ key: "add-tags",+ title: "Tags",+ icon: Tag2.path,+ multiSelect: true,+ menu: { items: tagsMenuItems(items) }+ // onClick: async ({ items }) => {+ // await showAddTagsDialog(items.map((i) => i.id));+ // }},- items: formats.map((format) => ({- key: format.type,- title: format.title,- tooltip: `Export as ${format.title} - ${format.subtitle}`,- icon: format.icon,- disabled: ({ items }) =>- format.type === "pdf" && items.length > 1- ? "Multiple notes cannot be exported as PDF."- : false,- isPro: format.type !== "txt",- onClick: async ({ items }) => {- await exportNotes(- format.type,- items.map((i) => i.id)- );+ { key: "sep2", type: "separator" },+ {+ type: "button",+ key: "print",+ title: "Print",+ isDisabled: !isSynced,+ icon: Print.path,+ onClick: async () => {+ await exportNotes("pdf", [note.id]);}- })),- multiSelect: true,- isPro: true- },- {- key: "duplicate",- title: "Duplicate",- disabled: ({ note }) => {- if (!db.notes.note(note.id).synced()) return notFullySyncedText;- if (note.locked) return "Locked notes cannot be duplicated";},- icon: Duplicate,- onClick: async ({ note }) => {- const id = await store.get().duplicate(note);- if (- await confirm({- title: "Open duplicated note?",- message: "Do you want to open the duplicated note?",- negativeButtonText: "No",- positiveButtonText: "Yes"- })- ) {- hashNavigate(`/notes/${id}/edit`, { replace: true });+ {+ type: "button",+ key: "publish",+ isDisabled:+ !isSynced || (!db.monographs?.isPublished(note.id) && note.locked),+ icon: Publish.path,+ title: "Publish",+ isChecked: db.monographs?.isPublished(note.id),+ onClick: async () => {+ const isPublished = db.monographs?.isPublished(note.id);+ if (isPublished) await db.monographs?.unpublish(note.id);+ else await showPublishView(note.id, "bottom");}- }- },- { key: "sep3", type: "separator" },- {- key: "local-only",- hidden: () => !userstore.get().isLoggedIn,- disabled: ({ note }) =>- !db.notes.note(note.id).synced() ? notFullySyncedText : false,- title: "Local only",- checked: ({ note }) => note.localOnly,- icon: ({ note }) => (note.localOnly ? Sync : SyncOff),- onClick: async ({ note }) => {- if (- note.localOnly ||- (await confirm({- title: "Prevent this item from syncing?",- message:- "Turning sync off for this item will automatically delete it from all other devices & any future changes to this item won't get synced. Are you sure you want to continue?",- positiveButtonText: "Yes",- negativeButtonText: "No"+ },+ {+ type: "button",+ key: "export",+ title: "Export as",+ icon: Export.path,+ isDisabled: !isSynced,+ menu: {+ items: formats.map((format) => ({+ type: "button",+ key: format.type,+ title: format.title,+ tooltip: `Export as ${format.title} - ${format.subtitle}`,+ icon: format.icon.path,+ isDisabled: format.type === "pdf" && items.length > 1,+ // ? "Multiple notes cannot be exported as PDF."+ // : false,+ isPro: format.type !== "txt",+ onClick: () => exportNotes(format.type, ids)}))- )- await store.get().localOnly(note.id);- }- },- { key: "sep3", type: "separator" },- {- key: "movetotrash",- title: "Move to trash",- color: "error",- iconColor: "error",- icon: Trash,- disabled: ({ items }) => {- const areAllSynced = items.reduce((prev, curr) => {- if (!prev || !db.notes.note(curr.id).synced()) return false;- return prev;- }, true);- if (!areAllSynced) return notFullySyncedText;-- if (items.length !== 1) return false;-- if (db.monographs.isPublished(items[0].id))- return "Please unpublish this note to move it to trash";-- if (items[0].locked)- return "Please unlock this note to move it to trash.";+ },+ multiSelect: true,+ isPro: true},- onClick: async ({ items }) => {- await Multiselect.moveNotesToTrash(items, items.length > 1);+ {+ type: "button",+ key: "duplicate",+ title: "Duplicate",+ isDisabled: !isSynced || note.locked,+ icon: Duplicate.path,+ onClick: async () => {+ const id = await store.get().duplicate(note);+ if (+ await confirm({+ title: "Open duplicated note?",+ message: "Do you want to open the duplicated note?",+ negativeButtonText: "No",+ positiveButtonText: "Yes"+ })+ ) {+ hashNavigate(`/notes/${id}/edit`, { replace: true });+ }+ }},- multiSelect: true- }-];+ {+ type: "button",+ key: "local-only",+ isHidden: !userstore.get().isLoggedIn,+ isDisabled: !isSynced,+ title: "Local only",+ isChecked: note.localOnly,+ icon: note.localOnly ? Sync.path : SyncOff.path,+ onClick: async () => {+ if (+ note.localOnly ||+ (await confirm({+ title: "Prevent this item from syncing?",+ message:+ "Turning sync off for this item will automatically delete it from all other devices & any future changes to this item won't get synced. Are you sure you want to continue?",+ positiveButtonText: "Yes",+ negativeButtonText: "No"+ }))+ )+ await store.get().localOnly(note.id);+ }+ },+ { key: "sep3", type: "separator" },+ {+ type: "button",+ key: "movetotrash",+ title: "Move to trash",+ styles: { icon: { color: "red" }, text: { color: "red" } },+ icon: Trash.path,+ isDisabled:+ items.length === 1+ ? db.monographs?.isPublished(note.id) || note.locked+ : items.some((item) => !db.notes?.note(item.id).synced()),+ onClick: () => Multiselect.moveNotesToTrash(items, items.length > 1),+ multiSelect: true+ }+ ];+};-function colorsToMenuItems() {+function colorsToMenuItems(note: any): MenuItem[] {return COLORS.map((label) => {const lowercase = label.toLowerCase();return {+ type: "button",key: lowercase,- title: () => db.colors.alias(lowercase) || label,- icon: Circle,- iconColor: lowercase,- checked: ({ note }) => {- return note.color === lowercase;- },- onClick: ({ note }) => {- const { id } = note;- store.setColor(id, lowercase);- }+ title: db.colors?.alias(lowercase) || label,+ icon: Circle.path,+ styles: { icon: { color: lowercase } },+ isChecked: note.color === lowercase,+ onClick: () => store.setColor(note.id, lowercase)};});}-function notebooksMenuItems({ items }) {+function notebooksMenuItems(items: any[]): MenuItem[] {const noteIds = items.map((i) => i.id);- const menuItems = [];+ const menuItems: MenuItem[] = [];menuItems.push({+ type: "button",key: "link-notebooks",title: "Link to...",- icon: AddToNotebook,- onClick: async () => {- await showMoveNoteDialog(noteIds);- }+ icon: AddToNotebook.path,+ onClick: () => showMoveNoteDialog(noteIds)});const notebooks = items@@ -583,11 +549,12 @@ function notebooksMenuItems({ items }) {if (topics?.length > 0 || notebooks?.length > 0) {menuItems.push({+ type: "button",key: "remove-from-all-notebooks",title: "Unlink from all",- icon: RemoveShortcutLink,+ icon: RemoveShortcutLink.path,onClick: async () => {- await db.notes.removeFromAllNotebooks(...noteIds);+ await db.notes?.removeFromAllNotebooks(...noteIds);store.refresh();}},@@ -595,16 +562,18 @@ function notebooksMenuItems({ items }) {);notebooks?.forEach((notebook) => {- if (menuItems.find((item) => item.key === notebook.id)) return;+ if (!notebook || menuItems.find((item) => item.key === notebook.id))+ return;menuItems.push({+ type: "button",key: notebook.id,- title: notebook.title,- icon: Notebook,- checked: true,+ title: db.notebooks?.notebook(notebook.id).title,+ icon: Notebook.path,+ isChecked: true,tooltip: "Click to remove from this notebook",onClick: async () => {- await db.notes.removeFromNotebook({ id: notebook.id }, ...noteIds);+ await db.notes?.removeFromNotebook({ id: notebook.id }, ...noteIds);store.refresh();}});@@ -619,13 +588,14 @@ function notebooksMenuItems({ items }) {const topic = notebook.topics.topic(topicId)._topic;menuItems.push({+ type: "button",key: topicId,title: topic.title,- icon: Topic,- checked: true,+ icon: Topic.path,+ isChecked: true,tooltip: "Click to remove from this topic",onClick: async () => {- await db.notes.removeFromNotebook(+ await db.notes?.removeFromNotebook({ id: ref.id, topic: topic.id },...noteIds);@@ -639,14 +609,15 @@ function notebooksMenuItems({ items }) {return menuItems;}-function tagsMenuItems({ items }) {+function tagsMenuItems(items: any[]): MenuItem[] {const noteIds = items.map((i) => i.id);- const menuItems = [];+ const menuItems: MenuItem[] = [];menuItems.push({+ type: "button",key: "assign-tags",title: "Assign to...",- icon: Plus,+ icon: Plus.path,onClick: async () => {await showAddTagsDialog(noteIds);}@@ -657,14 +628,15 @@ function tagsMenuItems({ items }) {if (tags?.length > 0) {menuItems.push({+ type: "button",key: "remove-from-all-tags",title: "Remove from all",- icon: RemoveShortcutLink,+ icon: RemoveShortcutLink.path,onClick: async () => {for (const note of items) {for (const tag of tags) {if (!note.tags.includes(tag)) continue;- await db.notes.note(note).untag(tag);+ await db.notes?.note(note).untag(tag);}}store.refresh();@@ -677,15 +649,16 @@ function tagsMenuItems({ items }) {if (menuItems.find((item) => item.key === tag)) return;menuItems.push({+ type: "button",key: tag,- title: db.tags.alias(tag),- icon: Tag,- checked: true,+ title: db.tags?.alias(tag),+ icon: Tag.path,+ isChecked: true,tooltip: "Click to remove from this tag",onClick: async () => {for (const note of items) {if (!note.tags.includes(tag)) continue;- await db.notes.note(note).untag(tag);+ await db.notes?.note(note).untag(tag);}store.refresh();}diff --git a/apps/web/src/components/notebook/index.jsx b/apps/web/src/components/notebook/index.jsxdeleted file mode 100644index 3a795480d..000000000--- a/apps/web/src/components/notebook/index.jsx+++ /dev/null@@ -1,214 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import React from "react";-import { Flex, Text } from "@theme-ui/components";-import ListItem from "../list-item";-import { useStore, store } from "../../stores/notebook-store";-import { store as appStore } from "../../stores/app-store";-import { showUnpinnedToast } from "../../common/toasts";-import { db } from "../../common/db";-import {- Topic,- PinFilled,- NotebookEdit,- Notebook as NotebookIcon,- Pin,- RemoveShortcutLink,- Shortcut,- Trash-} from "../icons";-import { hashNavigate, navigate } from "../../navigation";-import IconTag from "../icon-tag";-import { showToast } from "../../utils/toast";-import { Multiselect } from "../../common/multi-select";-import { pluralize } from "@notesnook/common";-import { confirm } from "../../common/dialog-controller";-import { getFormattedDate } from "@notesnook/common";--function Notebook(props) {- const { item, index, totalNotes, date, simplified } = props;- const notebook = item;- const isCompact = useStore((store) => store.viewMode === "compact");-- return (- <ListItem- selectable- isCompact={isCompact}- isSimple={simplified}- item={notebook}- onClick={() => {- navigate(`/notebooks/${notebook.id}`);- }}- title={notebook.title}- body={notebook.description}- index={index}- menu={{ items: menuItems, extraData: { notebook } }}- footer={- isCompact ? (- <>- <Text sx={{ fontSize: "subBody", color: "fontTertiary" }}>- {pluralize(totalNotes, "note")}- </Text>- </>- ) : (- <>- {notebook?.topics && (- <Flex mb={1} sx={{ gap: 1 }}>- {notebook?.topics.slice(0, 3).map((topic) => (- <IconTag- key={topic.id}- text={topic.title}- icon={Topic}- onClick={() => {- navigate(`/notebooks/${notebook.id}/${topic.id}`);- }}- />- ))}- </Flex>- )}- <Flex- sx={{- fontSize: "subBody",- color: "fontTertiary",- alignItems: "center",- fontFamily: "body"- }}- >- {notebook.pinned && (- <PinFilled color="primary" size={13} sx={{ mr: 1 }} />- )}-- {getFormattedDate(date, "date")}- <Text as="span" mx={1} sx={{ color: "inherit" }}>- •- </Text>- <Text sx={{ color: "inherit" }}>- {pluralize(totalNotes, "note")}- </Text>- </Flex>- </>- )- }- />- );-}-export default React.memo(Notebook, (prev, next) => {- const prevItem = prev.item;- const nextItem = next.item;-- return (- prev.date === next.date &&- prevItem.pinned === nextItem.pinned &&- prevItem.title === nextItem.title &&- prevItem.description === nextItem.description &&- prevItem.topics.length === nextItem.topics.length &&- prev.totalNotes === next.totalNotes- );-});--const pin = (notebook) => {- return store- .pin(notebook.id)- .then(() => {- if (notebook.pinned) showUnpinnedToast(notebook.id, "notebook");- })- .catch((error) => showToast("error", error.message));-};--const menuItems = [- {- key: "edit",- title: "Edit",- icon: NotebookEdit,- onClick: ({ notebook }) => hashNavigate(`/notebooks/${notebook.id}/edit`)- },- {- key: "set-as-default",- title: "Set as default",- checked: ({ notebook }) => {- const defaultNotebook = db.settings.getDefaultNotebook();- return defaultNotebook?.id === notebook.id && !defaultNotebook?.topic;- },-- icon: NotebookIcon,- onClick: async ({ notebook }) => {- const defaultNotebook = db.settings.getDefaultNotebook();- const isDefault =- defaultNotebook?.id === notebook.id && !defaultNotebook?.topic;-- await db.settings.setDefaultNotebook(- isDefault ? undefined : { id: notebook.id }- );- }- },- {- key: "pin",- icon: Pin,- title: "Pin",- checked: ({ notebook }) => notebook.pinned,- onClick: ({ notebook }) => pin(notebook)- },- {- key: "shortcut",- icon: ({ notebook }) =>- db.shortcuts.exists(notebook.id) ? RemoveShortcutLink : Shortcut,- title: ({ notebook }) =>- db.shortcuts.exists(notebook.id) ? "Remove shortcut" : "Create shortcut",- onClick: ({ notebook }) => appStore.addToShortcuts(notebook)- },- { key: "sep", type: "separator" },- {- key: "movetotrash",- title: "Move to trash",- color: "error",- iconColor: "error",- icon: Trash,- onClick: async ({ items }) => {- const result = await confirm({- title: `Delete ${pluralize(items.length, "notebook")}?`,- positiveButtonText: `Yes`,- negativeButtonText: "No",- checks: {- deleteContainingNotes: {- text: `Move all notes in ${- items.length > 1 ? "these notebooks" : "this notebook"- } to trash`- }- }- });-- if (result) {- if (result.deleteContainingNotes) {- const notes = [];- for (const item of items) {- notes.push(...db.relations.from(item, "note"));- const topics = db.notebooks.notebook(item.id).topics;- for (const topic of topics.all) {- notes.push(...topics.topic(topic.id).all);- }- }- await Multiselect.moveNotesToTrash(notes, false);- }- await Multiselect.moveNotebooksToTrash(items);- }- },- multiSelect: true- }-];diff --git a/apps/web/src/components/notebook/index.tsx b/apps/web/src/components/notebook/index.tsxnew file mode 100644index 000000000..7ab53f60a--- /dev/null+++ b/apps/web/src/components/notebook/index.tsx@@ -0,0 +1,228 @@+/*+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 React from "react";+import { Flex, Text } from "@theme-ui/components";+import ListItem from "../list-item";+import { useStore, store } from "../../stores/notebook-store";+import { store as appStore } from "../../stores/app-store";+import { showUnpinnedToast } from "../../common/toasts";+import { db } from "../../common/db";+import {+ Topic,+ PinFilled,+ NotebookEdit,+ Notebook as NotebookIcon,+ Pin,+ RemoveShortcutLink,+ Shortcut,+ Trash+} from "../icons";+import { hashNavigate, navigate } from "../../navigation";+import IconTag from "../icon-tag";+import { showToast } from "../../utils/toast";+import { Multiselect } from "../../common/multi-select";+import { pluralize } from "@notesnook/common";+import { confirm } from "../../common/dialog-controller";+import { getFormattedDate } from "@notesnook/common";+import { MenuItem } from "@notesnook/ui";+import { Item } from "../list-container/types";++type NotebookProps = {+ item: Item;+ totalNotes: number;+ date: number;+ simplified?: boolean;+};+function Notebook(props: NotebookProps) {+ const { item, totalNotes, date, simplified } = props;+ const notebook = item;+ const isCompact = useStore((store) => store.viewMode === "compact");++ return (+ <ListItem+ isCompact={isCompact}+ isSimple={simplified}+ item={notebook}+ onClick={() => {+ navigate(`/notebooks/${notebook.id}`);+ }}+ title={notebook.title}+ body={notebook.description as string}+ menuItems={menuItems}+ footer={+ <>+ {isCompact ? (+ <>+ <Text variant="subBody">{pluralize(totalNotes, "note")}</Text>+ </>+ ) : (+ <>+ {notebook?.topics && (+ <Flex mb={1} sx={{ gap: 1 }}>+ {(notebook?.topics as Item[]).slice(0, 3).map((topic) => (+ <IconTag+ key={topic.id}+ text={topic.title}+ icon={Topic}+ onClick={() => {+ navigate(`/notebooks/${notebook.id}/${topic.id}`);+ }}+ />+ ))}+ </Flex>+ )}+ <Flex+ sx={{+ fontSize: "subBody",+ color: "var(--paragraph-secondary)",+ alignItems: "center",+ fontFamily: "body"+ }}+ >+ {notebook.pinned && (+ <PinFilled color="accent" size={13} sx={{ mr: 1 }} />+ )}++ {getFormattedDate(date, "date")}+ <Text as="span" mx={1} sx={{ color: "inherit" }}>+ •+ </Text>+ <Text sx={{ color: "inherit" }}>+ {pluralize(totalNotes, "note")}+ </Text>+ </Flex>+ </>+ )}+ </>+ }+ />+ );+}+export default React.memo(Notebook, (prev, next) => {+ const prevItem = prev.item;+ const nextItem = next.item;++ return (+ prev.date === next.date &&+ prevItem.pinned === nextItem.pinned &&+ prevItem.title === nextItem.title &&+ prevItem.description === nextItem.description &&+ prev.totalNotes === next.totalNotes+ );+});++const pin = (notebook: Item) => {+ return store+ .pin(notebook.id)+ .then(() => {+ if (notebook.pinned) showUnpinnedToast(notebook.id, "notebook");+ })+ .catch((error) => showToast("error", error.message));+};++const menuItems: (notebook: any, items?: any[]) => MenuItem[] = (+ notebook,+ items = []+) => {+ const defaultNotebook = db.settings?.getDefaultNotebook();++ return [+ {+ type: "button",+ key: "edit",+ title: "Edit",+ icon: NotebookEdit.path,+ onClick: () => hashNavigate(`/notebooks/${notebook.id}/edit`)+ },+ {+ type: "button",+ key: "set-as-default",+ title: "Set as default",+ isChecked: defaultNotebook?.id === notebook.id && !defaultNotebook?.topic,+ icon: NotebookIcon.path,+ onClick: async () => {+ const defaultNotebook = db.settings?.getDefaultNotebook();+ const isDefault =+ defaultNotebook?.id === notebook.id && !defaultNotebook?.topic;+ await db.settings?.setDefaultNotebook(+ isDefault ? undefined : { id: notebook.id }+ );+ }+ },+ {+ type: "button",+ key: "pin",+ icon: Pin.path,+ title: "Pin",+ isChecked: notebook.pinned,+ onClick: () => pin(notebook)+ },+ {+ type: "button",+ key: "shortcut",+ icon: db.shortcuts?.exists(notebook.id)+ ? RemoveShortcutLink.path+ : Shortcut.path,+ title: db.shortcuts?.exists(notebook.id)+ ? "Remove shortcut"+ : "Create shortcut",+ onClick: () => appStore.addToShortcuts(notebook)+ },+ { key: "sep", type: "separator" },+ {+ type: "button",+ key: "movetotrash",+ title: "Move to trash",+ styles: { icon: { color: "red" }, text: { color: "red" } },+ icon: Trash.path,+ onClick: async () => {+ const result = await confirm({+ title: `Delete ${pluralize(items.length, "notebook")}?`,+ positiveButtonText: `Yes`,+ negativeButtonText: "No",+ checks: {+ deleteContainingNotes: {+ text: `Move all notes in ${+ items.length > 1 ? "these notebooks" : "this notebook"+ } to trash`+ }+ }+ });++ if (result) {+ if (result.deleteContainingNotes) {+ const notes = [];+ for (const item of items) {+ notes.push(...(db.relations?.from(item, "note") || []));+ const topics = db.notebooks?.notebook(item.id).topics;+ if (!topics) return;+ for (const topic of topics.all) {+ notes.push(...topics.topic(topic.id).all);+ }+ }+ await Multiselect.moveNotesToTrash(notes, false);+ }+ await Multiselect.moveNotebooksToTrash(items);+ }+ },+ multiSelect: true+ }+ ];+};diff --git a/apps/web/src/components/notice/index.tsx b/apps/web/src/components/notice/index.tsxindex 737fa4e03..0be564d73 100644--- a/apps/web/src/components/notice/index.tsx+++ b/apps/web/src/components/notice/index.tsx@@ -49,7 +49,7 @@ function Notice() {<Flex sx={{ flex: 1, alignItems: "center" }}><NoticeData.iconsize={18}- color="primary"+ color="accent"sx={{ bg: "shade", mr: 2, p: 2, borderRadius: 80 }}/><Flex variant="columnCenter" sx={{ alignItems: "flex-start" }}>@@ -77,12 +77,11 @@ function Notice() {borderRadius: 50,p: 1,mr: 1,- bg: "transparent",- ":hover": { backgroundColor: "shade" }+ bg: "transparent"}}- variant="tool"+ variant="accentSecondary">- <Dismiss size={20} color="primary" />+ <Dismiss size={20} color="accent" /></Button>)}</Flex>diff --git a/apps/web/src/components/pdf-preview/index.tsx b/apps/web/src/components/pdf-preview/index.tsxindex 384d1b96d..9e7c4f973 100644--- a/apps/web/src/components/pdf-preview/index.tsx+++ b/apps/web/src/components/pdf-preview/index.tsx@@ -31,13 +31,13 @@ import {ZoomIn,ZoomOut,Close,- Search,- Alert+ Search} from "../icons";import { useStore as useThemeStore } from "../../stores/theme-store";import Field from "../field";import { LinkPlugin } from "./links-plugin";import Config from "../../utils/config";+import { ErrorText } from "../error-text";export type PdfPreviewProps = {fileUrl: string | Uint8Array;@@ -52,7 +52,7 @@ export function PdfPreview(props: PdfPreviewProps) {const searchPluginInstance = searchPlugin();const { ShowSearchPopover } = searchPluginInstance;- const theme = useThemeStore((state) => state.theme);+ const theme = useThemeStore((state) => state.colorScheme);return (<Worker workerUrl="/pdf.worker.min.js">@@ -72,7 +72,7 @@ export function PdfPreview(props: PdfPreviewProps) {<><Flexsx={{- bg: "bgSecondary",+ bg: "var(--background-secondary)",borderRadius: "default",overflow: "hidden",alignItems: "center",@@ -88,7 +88,7 @@ export function PdfPreview(props: PdfPreviewProps) {},".rpv-search__popover-label-checkbox": {- accentColor: "var(--primary)"+ accentColor: "var(--accent)"},".rpv-core__textbox": {@@ -104,9 +104,9 @@ export function PdfPreview(props: PdfPreviewProps) {fontFamily: "body",fontWeight: "body",fontSize: "input",- color: "text",+ color: "paragraph",":focus": {- outline: "2px solid var(--primary)"+ outline: "2px solid var(--accent)"},":hover:not(:focus)": {outline: "1.5px solid var(--dimPrimary)"@@ -155,7 +155,7 @@ export function PdfPreview(props: PdfPreviewProps) {<Flexsx={{- bg: "bgSecondary",+ bg: "var(--background-secondary)",borderRadius: "default",overflow: "hidden",alignItems: "center"@@ -190,7 +190,7 @@ export function PdfPreview(props: PdfPreviewProps) {<Flexsx={{- bg: "bgSecondary",+ bg: "var(--background-secondary)",borderRadius: "default",overflow: "hidden",alignItems: "center"@@ -272,7 +272,7 @@ export function PdfPreview(props: PdfPreviewProps) {variant="subheading"mt={1}mb={4}- sx={{ textAlign: "center", color: "fontTertiary" }}+ sx={{ textAlign: "center", color: "paragraph" }}>Please enter the password to unlock this document.</Text>@@ -289,24 +289,11 @@ export function PdfPreview(props: PdfPreviewProps) {}}/>{props.passwordStatus === PasswordStatus.WrongPassword && (- <Flex- mt={2}- sx={{- alignItems: "center",- justifyContent: "center",- color: "error",- alignSelf: "flex-center"- }}- >- <Alert color="error" size={12} />- <Text ml={1} sx={{ fontSize: "body" }}>- Wrong password- </Text>- </Flex>+ <ErrorText error="Wrong password" />)}<Buttonmt={3}- variant="primary"+ variant="accent"data-test-id="unlock-note-submit"sx={{ borderRadius: 100, px: 30 }}onClick={async () => {}}@@ -338,13 +325,12 @@ function ToolbarButton(props: ToolbarButtonProps) {<Buttondata-test-id={title}disabled={disabled}- variant="tool"+ variant="secondary"bg="transparent"title={title}sx={{borderRadius: 0,display: [hideOnMobile ? "none" : "flex", hidden ? "none" : "flex"],- color: !disabled ? "text" : "disabled",cursor: !disabled ? "pointer" : "not-allowed",flexDirection: "row",flexShrink: 0,@@ -352,10 +338,7 @@ function ToolbarButton(props: ToolbarButtonProps) {}}onClick={onClick}>- <props.icon- size={iconSize || 18}- color={!disabled ? "text" : "disabled"}- />+ <props.icon size={iconSize || 18} /></Button>);}diff --git a/apps/web/src/components/placeholders/index.tsx b/apps/web/src/components/placeholders/index.tsxindex 4a997cd4f..92a211f42 100644--- a/apps/web/src/components/placeholders/index.tsx+++ b/apps/web/src/components/placeholders/index.tsx@@ -42,18 +42,18 @@ function Placeholder(props: PlaceholderProps) {><Flexsx={{- border: "1px solid var(--primary)",+ border: "1px solid var(--accent)",borderRadius: 50,p: 1,py: "1.5px"}}>- <Info color="primary" size={13} sx={{ mr: "small" }} />- <Text variant="subBody" sx={{ fontSize: 10 }} color="primary">+ <Info color="accent" size={13} sx={{ mr: "small" }} />+ <Text variant="subBody" sx={{ fontSize: 10 }} color="accent">TIP</Text></Flex>- <Text variant="body" sx={{ color: "icon", mt: 1 }}>+ <Text variant="subBody" sx={{ fontSize: "body", mt: 1 }}>{text || tip.text}</Text>{tip.button && (@@ -64,13 +64,13 @@ function Placeholder(props: PlaceholderProps) {justifyContent: "center",display: "flex"}}- variant="tool"+ variant="secondary"onClick={tip.button.onClick}>- <Text mr={1} color="primary">+ <Text mr={1} color="accent">{tip.button.title}</Text>- {tip.button.icon && <tip.button.icon size={18} color="primary" />}+ {tip.button.icon && <tip.button.icon size={18} color="accent" />}</Button>)}</Flex>diff --git a/apps/web/src/components/properties/index.jsx b/apps/web/src/components/properties/index.jsxindex 5852e714e..6e7e42ecc 100644--- a/apps/web/src/components/properties/index.jsx+++ b/apps/web/src/components/properties/index.jsx@@ -208,18 +208,18 @@ function Properties(props) {py={2}px={2}sx={{- borderBottom: "1px solid var(--border)",+ borderBottom: "1px solid var(--separator)",alignItems: "center",justifyContent: "space-between"}}>- <Text variant="body" sx={{ color: "fontTertiary" }}>+ <Text variant="subBody" sx={{ fontSize: "body" }}>{item.label}</Text><TextclassName="selectable"- variant="body"- sx={{ color: "fontTertiary" }}+ variant="subBody"+ sx={{ fontSize: "body" }}>{item.value(session[item.key])}</Text>@@ -258,7 +258,7 @@ function Properties(props) {/>{label.toLowerCase() === color?.toLowerCase() && (<Checkmark- color="static"+ color="white"size={18}sx={{ position: "absolute", left: "8px" }}/>@@ -335,9 +335,9 @@ function Properties(props) {px={2}sx={{cursor: "pointer",- bg: isSelected ? "bgSecondary" : "transparent",+ bg: isSelected ? "background-selected" : "transparent",":hover": {- bg: "hover"+ bg: isSelected ? "hover-selected" : "hover"},alignItems: "center",justifyContent: "space-between"@@ -374,7 +374,12 @@ function Properties(props) {<Text variant={"body"} data-test-id="title">{label}</Text>- <Flex sx={{ fontSize: "subBody", color: "fontTertiary" }}>+ <Flex+ sx={{+ fontSize: "subBody",+ color: "paragraph-secondary"+ }}+ >{session.locked && <Lock size={14} data-test-id="locked" />}<TimeAgolivediff --git a/apps/web/src/components/properties/toggle.jsx b/apps/web/src/components/properties/toggle.jsxindex 80ccb07ab..4101c9c9e 100644--- a/apps/web/src/components/properties/toggle.jsx+++ b/apps/web/src/components/properties/toggle.jsx@@ -28,7 +28,7 @@ function Toggle(props) {py={2}px={2}sx={{- borderBottom: "1px solid var(--border)",+ borderBottom: "1px solid var(--separator)",cursor: "pointer",alignItems: "center",justifyContent: "space-between",@@ -40,13 +40,17 @@ function Toggle(props) {><Textvariant="body"- sx={{ alignItems: "center", color: "text", display: "flex" }}+ sx={{ alignItems: "center", color: "paragraph", display: "flex" }}data-test-id={`toggle-state-${isOn ? "on" : "off"}`}><ToggleIcon size={13} sx={{ flexShrink: 0, mr: 1 }} />{label}</Text>- <Switch sx={{ m: 0 }} onClick={() => onToggle(!isOn)} checked={isOn} />+ <Switch+ sx={{ m: 0, bg: isOn ? "accent" : "icon" }}+ onClick={() => onToggle(!isOn)}+ checked={isOn}+ /></Flex>);}diff --git a/apps/web/src/components/publish-view/index.jsx b/apps/web/src/components/publish-view/index.jsxindex 8fbf29ab2..2eed61814 100644--- a/apps/web/src/components/publish-view/index.jsx+++ b/apps/web/src/components/publish-view/index.jsx@@ -17,21 +17,23 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { useCallback, useEffect, useMemo, useState } from "react";+import { useEffect, useMemo, useState } from "react";import ReactDOM from "react-dom";import { Flex, Text, Button } from "@theme-ui/components";-import { Copy, Loading } from "../icons";+import { Copy } from "../icons";import Toggle from "../toggle";import Field from "../field";import { db } from "../../common/db";import * as clipboard from "clipboard-polyfill/text";-import ThemeProvider from "../theme-provider";+import { ScopedThemeProvider } from "../theme-provider";import { showToast } from "../../utils/toast";import { EV, EVENTS } from "@notesnook/core/common";import { useStore } from "../../stores/monograph-store";+import ReactModal from "react-modal";+import { DialogButton } from "../dialog";function PublishView(props) {- const { noteId, position, onClose } = props;+ const { noteId, onClose } = props;const [publishId, setPublishId] = useState();const [isPasswordProtected, setIsPasswordProtected] = useState(false);const [selfDestruct, setSelfDestruct] = useState(false);@@ -46,29 +48,6 @@ function PublishView(props) {setPublishId(db.monographs.monograph(noteId));}, [noteId]);- const onKeyDown = useCallback(- (event) => {- if (event.keyCode === 27) {- onClose(false);- }- },- [onClose]- );-- const onWindowClick = useCallback(() => onClose(false), [onClose]);-- useEffect(() => {- window.addEventListener("keydown", onKeyDown);- window.addEventListener("click", onWindowClick);- window.addEventListener("blur", onWindowClick);-- return () => {- window.removeEventListener("click", onWindowClick);- window.removeEventListener("keydown", onKeyDown);- window.removeEventListener("blur", onWindowClick);- };- }, [onKeyDown, onWindowClick]);-useEffect(() => {const attachmentsLoadingEvent = EV.subscribe(EVENTS.attachmentsLoading,@@ -85,29 +64,23 @@ function PublishView(props) {}, [noteId]);return (- <Flex+ <ScopedThemeProvider+ scope="dialog"+ injectCssVarssx={{- position: "absolute",- zIndex: 999,width: ["100%", 350, 350],border: "1px solid",borderColor: "border",- borderRadius: "default",- boxShadow: "0px 0px 15px 0px #00000011",- ...position,- flexDirection: "column"+ borderRadius: "dialog",+ flexDirection: "column",+ overflow: "hidden"}}bg="background"- // p={2}-- onClick={(e) => {- e.stopPropagation();- }}><Flex p={2} sx={{ flexDirection: "column" }}><Textvariant="body"- sx={{ fontSize: "title", fontWeight: "bold", color: "primary" }}+ sx={{ fontSize: "title", fontWeight: "bold", color: "accent" }}>{noteTitle}</Text>@@ -134,13 +107,13 @@ function PublishView(props) {<Flex mt={1} sx={{ flexDirection: "column", overflow: "hidden" }}><Textvariant="body"- sx={{ fontWeight: "bold", color: "fontTertiary" }}+ sx={{ fontWeight: "bold", color: "paragraph" }}>Published at</Text><Flexsx={{- bg: "bgSecondary",+ bg: "var(--background-secondary)",mt: 1,p: 1,borderRadius: "default",@@ -172,16 +145,14 @@ function PublishView(props) {);}}>- <Copy size={20} color="primary" />+ <Copy size={20} color="accent" /></Button></Flex></Flex>) : (- <>- <Text variant="body" sx={{ color: "fontTertiary" }}>- This note will be published to a public URL.- </Text>- </>+ <Text variant="body" sx={{ color: "paragraph" }}>+ This note will be published to a public URL.+ </Text>)}<Toggletitle="Self destruct?"@@ -211,19 +182,13 @@ function PublishView(props) {</Flex><Flex- bg="bgSecondary"+ bg="var(--background-secondary)"p={1}px={2}sx={{ alignItems: "center", justifyContent: "end" }}>- <Button- variant="primary"- bg={"transparent"}- sx={{- ":hover": { bg: "bgSecondary" },- fontWeight: "bold",- color: "primary"- }}+ <DialogButton+ color="accent"onClick={async () => {try {setIsPublishing(true);@@ -243,26 +208,12 @@ function PublishView(props) {setIsPublishing(false);}}}- >- {isPublishing ? (- <>- <Loading color="static" />- </>- ) : publishId ? (- "Update"- ) : (- "Publish"- )}- </Button>+ loading={isPublishing}+ text={publishId ? "Update" : "Publish"}+ />{publishId && (- <Button- variant="primary"- bg={"transparent"}- sx={{- ":hover": { bg: "bgSecondary" },- fontWeight: "bold",- color: "error"- }}+ <DialogButton+ color="red"onClick={async () => {try {setIsPublishing(true);@@ -280,28 +231,20 @@ function PublishView(props) {setIsPublishing(false);}}}- >- Unpublish- </Button>+ text={"Unpublish"}+ />)}- <Button- variant="primary"+ <DialogButtondata-test-id="dialog-no"- bg={"transparent"}- sx={{- ":hover": { bg: "bgSecondary" },- fontWeight: "bold",- color: "text"- }}onClick={() => {onClose(false);}}- >- Cancel- </Button>+ color="paragraph"+ text="Cancel"+ /></Flex>- </Flex>+ </ScopedThemeProvider>);}@@ -318,18 +261,31 @@ export function showPublishView(noteId, location = "top") {resolve(result);};ReactDOM.render(- <ThemeProvider>- <PublishView- noteId={noteId}- position={{- top: location === "top" ? [0, 50, 60] : undefined,- right: location === "top" ? [0, 20, 10] : undefined,+ <ReactModal+ isOpen+ onRequestClose={perform}+ preventScroll={false}+ shouldCloseOnOverlayClick+ shouldCloseOnEsc+ shouldFocusAfterRender+ shouldReturnFocusAfterClose+ style={{+ overlay: { backgroundColor: "transparent", zIndex: 999 },+ content: {+ padding: 0,+ top: location === "top" ? 60 : undefined,+ right: location === "top" ? 10 : undefined,bottom: location === "bottom" ? 0 : undefined,- left: location === "bottom" ? 0 : undefined- }}- onClose={perform}- />- </ThemeProvider>,+ left: location === "bottom" ? 0 : undefined,+ background: "transparent",+ border: "none",+ borderRadius: 0,+ boxShadow: "0px 0px 15px 0px #00000011"+ }+ }}+ >+ <PublishView noteId={noteId} onClose={perform} />+ </ReactModal>,root);});diff --git a/apps/web/src/components/reminder/index.tsx b/apps/web/src/components/reminder/index.tsxindex 89bf37ad3..ad92f0764 100644--- a/apps/web/src/components/reminder/index.tsx+++ b/apps/web/src/components/reminder/index.tsx@@ -27,7 +27,6 @@ import {ReminderOff,Clock,Refresh,- Icon,Edit,Reminders,Trash@@ -47,6 +46,8 @@ import {} from "../../common/dialog-controller";import { pluralize } from "@notesnook/common";import { getFormattedReminderTime } from "@notesnook/common";+import { Item } from "../list-container/types";+import { MenuItem } from "@notesnook/ui";const RECURRING_MODE_MAP = {week: "Weekly",@@ -60,21 +61,18 @@ const PRIORITY_ICON_MAP = {urgent: Loud} as const;-function Reminder({- item,- index,- simplified-}: {- item: ReminderType;- index: number;+type ReminderProps = {+ item: Item;simplified?: boolean;-}) {- const reminder = item;+};++function Reminder(props: ReminderProps) {+ const { item, simplified } = props;+ const reminder = item as unknown as ReminderType;const PriorityIcon = PRIORITY_ICON_MAP[reminder.priority];return (<ListItem- selectable- item={reminder}+ item={item}title={reminder.title}body={reminder.description}isDisabled={reminder.disabled}@@ -88,12 +86,7 @@ function Reminder({}}>{reminder.disabled ? (- <IconTag- icon={ReminderOff}- text={"Disabled"}- styles={{ icon: { color: "error" } }}- testId={"disabled"}- />+ <IconTag icon={ReminderOff} text={"Disabled"} testId={"disabled"} />) : (<IconTagicon={Clock}@@ -102,9 +95,7 @@ function Reminder({testId={"reminder-time"}/>)}- {reminder.disabled ? null : (- <PriorityIcon size={14} color="fontTertiary" />- )}+ {reminder.disabled ? null : <PriorityIcon size={14} />}{reminder.mode === "repeat" && reminder.recurringMode && (<IconTagicon={Refresh}@@ -114,11 +105,7 @@ function Reminder({)}</Flex>}- index={index}- menu={{- items: menuItems,- extraData: { reminder }- }}+ menuItems={menuItems}/>);}@@ -127,61 +114,49 @@ export default React.memo(Reminder, (prev, next) => {return prev?.item?.title === next?.item?.title;});-type MenuActionParams = {- reminder: ReminderType;- items: ReminderType[];-};--type MenuItemValue<T> = T | ((options: MenuActionParams) => T);-type MenuItem = {- type?: "separator";- key: string;- title?: MenuItemValue<string>;- icon?: MenuItemValue<Icon>;- onClick?: (options: MenuActionParams) => void;- color?: MenuItemValue<string>;- iconColor?: MenuItemValue<string>;- multiSelect?: boolean;- items?: MenuItemValue<MenuItem[]>;-};--const menuItems: MenuItem[] = [- {- key: "edit",- title: "Edit",- icon: Edit,- onClick: ({ reminder }) => hashNavigate(`/reminders/${reminder.id}/edit`)- },- {- key: "toggle",- title: ({ reminder }) => (reminder.disabled ? "Activate" : "Deactivate"),- icon: ({ reminder }: MenuActionParams) =>- reminder.disabled ? Reminders : ReminderOff,- onClick: async ({ reminder }) => {- await db.reminders?.add({- id: reminder.id,- disabled: !reminder.disabled- });- store.refresh();- }- },- { key: "sep", type: "separator" },- {- key: "delete",- title: "Delete",- color: "error",- iconColor: "error",- icon: Trash,- onClick: async ({ items }) => {- confirm({- title: `Delete ${pluralize(items.length, "reminder")}`,- message: `Are you sure you want to proceed? **This action is IRREVERSIBLE**.`,- positiveButtonText: "Yes",- negativeButtonText: "No"- }).then((result) => {- result && Multiselect.moveRemindersToTrash(items);- });+const menuItems: (+ reminder: ReminderType,+ items?: ReminderType[]+) => MenuItem[] = (reminder, items = []) => {+ return [+ {+ type: "button",+ key: "edit",+ title: "Edit",+ icon: Edit.path,+ onClick: () => hashNavigate(`/reminders/${reminder.id}/edit`)},- multiSelect: true- }-];+ {+ type: "button",+ key: "toggle",+ title: reminder.disabled ? "Activate" : "Deactivate",+ icon: reminder.disabled ? Reminders.path : ReminderOff.path,+ onClick: async () => {+ await db.reminders?.add({+ id: reminder.id,+ disabled: !reminder.disabled+ });+ store.refresh();+ }+ },+ { key: "sep", type: "separator" },+ {+ type: "button",+ key: "delete",+ title: "Delete",+ styles: { icon: { color: "red" }, text: { color: "red" } },+ icon: Trash.path,+ onClick: async () => {+ confirm({+ title: `Delete ${pluralize(items.length, "reminder")}`,+ message: `Are you sure you want to proceed? **This action is IRREVERSIBLE**.`,+ positiveButtonText: "Yes",+ negativeButtonText: "No"+ }).then((result) => {+ result && Multiselect.moveRemindersToTrash(items);+ });+ },+ multiSelect: true+ }+ ];+};diff --git a/apps/web/src/components/route-container/index.tsx b/apps/web/src/components/route-container/index.tsxindex ab97c1bb8..5b70f12cb 100644--- a/apps/web/src/components/route-container/index.tsx+++ b/apps/web/src/components/route-container/index.tsx@@ -69,7 +69,6 @@ function Header(props: RouteContainerProps) {size={24}{...buttons.back}sx={{ flexShrink: 0, mr: 2, cursor: "pointer" }}- color="text"data-test-id="go-back"/>) : (@@ -86,7 +85,7 @@ function Header(props: RouteContainerProps) {/>)}{title && (- <Text variant="heading" data-test-id="routeHeader" color="text">+ <Text variant="heading" data-test-id="routeHeader" color="heading">{title}</Text>)}@@ -103,14 +102,15 @@ function Header(props: RouteContainerProps) {{!isMobile && buttons?.create && (<Plusdata-test-id={`${type}-action-button`}- color="static"+ color="white"size={18}sx={{- bg: "primary",+ bg: "accent",ml: 2,borderRadius: 100,size: 28,- ":hover": { boxShadow: "0px 0px 5px 0px var(--dimPrimary)" }+ cursor: "pointer",+ ":hover": { boxShadow: "0px 0px 5px 0px var(--accent)" }}}{...buttons.create}/>diff --git a/apps/web/src/components/status-bar/index.jsx b/apps/web/src/components/status-bar/index.tsxsimilarity index 67%rename from apps/web/src/components/status-bar/index.jsxrename to apps/web/src/components/status-bar/index.tsxindex 5f8882224..20be59353 100644--- a/apps/web/src/components/status-bar/index.jsx+++ b/apps/web/src/components/status-bar/index.tsx@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { Box, Button, Flex, Text } from "@theme-ui/components";+import { Button, Flex, Text } from "@theme-ui/components";import EditorFooter from "../editor/footer";import {Circle,@@ -28,18 +28,20 @@ import {Checkmark,Alert,Issue,- SyncOff+ SyncOff,+ Icon} from "../icons";import { useStore as useUserStore } from "../../stores/user-store";import { useStore as useAppStore } from "../../stores/app-store";import TimeAgo from "../time-ago";import { hardNavigate, hashNavigate, navigate } from "../../navigation";-import { useAutoUpdater } from "../../hooks/use-auto-updater";+import { useAutoUpdater, UpdateStatus } from "../../hooks/use-auto-updater";import {showIssueDialog,showUpdateAvailableNotice} from "../../common/dialog-controller";import useStatus from "../../hooks/use-status";+import { ScopedThemeProvider } from "../theme-provider";import { checkForUpdate, installUpdate } from "../../utils/updater";function StatusBar() {@@ -49,8 +51,9 @@ function StatusBar() {const updateStatus = useAutoUpdater();return (- <Box- bg="bgSecondary"+ <ScopedThemeProvider+ scope="statusBar"+ bg="background"sx={{borderTop: "1px solid",borderTopColor: "border",@@ -64,7 +67,7 @@ function StatusBar() {<><ButtononClick={() =>- user.isEmailConfirmed+ user?.isEmailConfirmed? navigate("/settings"): hashNavigate("/email/verify")}@@ -77,16 +80,20 @@ function StatusBar() {><Circlesize={7}- color={user.isEmailConfirmed ? "success" : "warn"}+ color={+ user?.isEmailConfirmed+ ? "var(--icon-success)"+ : "var(--icon-error)"+ }/><TextclassName="selectable"variant="subBody"ml={1}- sx={{ color: "bgSecondaryText" }}+ sx={{ color: "paragraph" }}>- {user.email}- {user.isEmailConfirmed ? "" : " (not verified)"}+ {user?.email}+ {user?.isEmailConfirmed ? "" : " (not verified)"}</Text></Button>@@ -103,8 +110,8 @@ function StatusBar() {}}data-test-id="not-logged-in">- <Circle size={7} color="error" />- <Text variant="subBody" ml={1} sx={{ color: "bgSecondaryText" }}>+ <Circle size={7} color="var(--icon-error)" />+ <Text variant="subBody" ml={1} sx={{ color: "paragraph" }}>Not logged in</Text></Button>@@ -120,7 +127,7 @@ function StatusBar() {title="Facing an issue? Click here to create a bug report."><Issue size={12} />- <Text variant="subBody" ml={1} sx={{ color: "bgSecondaryText" }}>+ <Text variant="subBody" ml={1} sx={{ color: "paragraph" }}>Report an issue</Text></Button>@@ -132,7 +139,7 @@ function StatusBar() {sx={{ alignItems: "center", justifyContent: "center" }}>{Icon ? <Icon size={12} /> : <Loading size={12} />}- <Text variant="subBody" ml={1} sx={{ color: "bgSecondaryText" }}>+ <Text variant="subBody" ml={1} sx={{ color: "paragraph" }}>{progress ? `${progress}% ${status}` : status}</Text></Flex>@@ -152,6 +159,7 @@ function StatusBar() {}}}sx={{+ ml: 1,alignItems: "center",justifyContent: "center",display: "flex"@@ -163,57 +171,62 @@ function StatusBar() {updateStatus.type !== "completed" &&updateStatus.type !== "available"}- color={- updateStatus.type === "available"- ? "primary"- : "bgSecondaryText"- }+ color={updateStatus.type === "available" ? "accent" : "paragraph"}size={12}/>- <Text variant="subBody" ml={1} sx={{ color: "bgSecondaryText" }}>+ <Text variant="subBody" ml={1} sx={{ color: "paragraph" }}>{statusToInfoText(updateStatus)}</Text></Button>)}</Flex><EditorFooter />- </Box>+ </ScopedThemeProvider>);}export default StatusBar;-function statusToInfoText(status) {- const { type, version, progress = 0 } = status;+function statusToInfoText(status: UpdateStatus) {+ const { type } = status;return type === "checking"? "Checking for updates...": type === "updated"? "You are on latest version": type === "downloading"- ? `${Math.round(progress)}% updating...`+ ? `${Math.round(status.progress)}% updating...`: type === "completed"- ? `v${version} downloaded (restart required)`+ ? `v${status.version} downloaded (restart required)`: type === "available"- ? `v${version} available`+ ? `v${status.version} available`: "";}function SyncStatus() {- const syncStatus = useAppStore((state) => state.syncStatus);+ const syncStatus = useAppStore(+ (state) => state.syncStatus+ ) /* TODO: remove this type coercing */ as unknown as SyncState;const lastSynced = useAppStore((state) => state.lastSynced);const isSyncEnabled = useAppStore((state) => state.isSyncEnabled);const sync = useAppStore((state) => state.sync);const user = useUserStore((state) => state.user);const status = syncStatusFilters.find((f) =>- f.check(syncStatus.key, user, lastSynced)+ f.isActive(syncStatus.key, user, lastSynced));+ if (!status) return null;return (<Buttonvariant="statusitem"onClick={() => (isSyncEnabled ? sync() : null)}- sx={{ alignItems: "center", justifyContent: "center", display: "flex" }}+ sx={{+ alignItems: "center",+ justifyContent: "center",+ display: "flex",+ color: "paragraph",+ height: "100%"+ }}title={status.tooltip}data-test-id={`sync-status-${status.key}`}>@@ -222,17 +235,20 @@ function SyncStatus() {) : (<status.iconsize={12}- color={status.iconColor}rotate={status.loading}+ color={status.iconColor}/>)}- <Text variant="subBody" ml={status.text ? "3px" : 0}>+ <Text+ variant="body"+ sx={{ ml: status.text ? "3px" : 0, fontSize: "subBody" }}+ >{status.text ? (<>{typeof status.text === "string" ? (status.text) : (- <status.text lastSynced={lastSynced} syncStatus={syncStatus} />+ <status.text lastSynced={lastSynced} type={syncStatus.type} />)}{" "}</>) : null}@@ -241,61 +257,95 @@ function SyncStatus() {);}-const syncStatusFilters = [+type SyncState = {+ key: SyncStatus;+ progress: number;+ type: SyncType;+};+type SyncType = "download" | "upload" | "sync";+type SyncStatus =+ | "synced"+ | "syncing"+ | "conflicts"+ | "failed"+ | "completed"+ | "offline"+ | "disabled";+type SyncStatusFilter = {+ key: SyncStatus | "emailNotConfirmed";+ icon: Icon;+ isActive: (+ syncStatus: SyncStatus,+ user: User | undefined,+ lastSynced: number+ ) => boolean;+ text:+ | string+ | ((props: {+ type?: "download" | "upload" | "sync";+ user?: User;+ lastSynced: number;+ }) => JSX.Element);+ tooltip?: string;+ iconColor?: string;+ loading?: boolean;+};++const syncStatusFilters: SyncStatusFilter[] = [{key: "synced",- check: (syncStatus) => syncStatus === "synced",+ isActive: (syncStatus) => syncStatus === "synced",icon: Sync,text: ({ lastSynced }) =>lastSynced ? (<TimeAgo live={true} locale="en_short" datetime={lastSynced} />) : (- "click to sync"+ <>click to sync</>),tooltip: "All changes are synced."},{key: "syncing",- check: (syncStatus) => syncStatus === "syncing",+ isActive: (syncStatus) => syncStatus === "syncing",icon: Sync,loading: true,- text: ({ syncStatus }) => <>{syncStatus.type || "sync"}ing</>,+ text: ({ type }) => <>{type || "sync"}ing</>,tooltip: "Syncing your notes..."},{key: "completed",- check: (syncStatus) => syncStatus === "completed",+ isActive: (syncStatus) => syncStatus === "completed",icon: Checkmark,- iconColor: "success",+ iconColor: "var(--icon-success)",text: ""},{key: "conflicts",- check: (syncStatus) => syncStatus === "conflicts",+ isActive: (syncStatus) => syncStatus === "conflicts",icon: Alert,- iconColor: "error",+ iconColor: "var(--icon-error)",text: "Merge conflicts",tooltip: "Please resolve all merge conflicts and run the sync again."},{key: "emailNotConfirmed",- check: (_syncStatus, user) => !user.isEmailConfirmed,+ isActive: (_syncStatus, user) => !user?.isEmailConfirmed,icon: Alert,- iconColor: "warn",+ iconColor: "var(--icon-error)",text: "Sync disabled",tooltip: "Please confirm your email to start syncing."},{key: "failed",- check: (syncStatus) => syncStatus === "failed",+ isActive: (syncStatus) => syncStatus === "failed",icon: SyncError,- color: "error",+ iconColor: "var(--icon-error)",text: "Sync failed",tooltip: "Sync failed to completed. Please try again."},{key: "offline",- check: (syncStatus) => syncStatus === "offline",+ isActive: (syncStatus) => syncStatus === "offline",icon: SyncOff,text: ({ lastSynced }) => (<>@@ -307,9 +357,10 @@ const syncStatusFilters = [},{key: "disabled",- check: (syncStatus) => syncStatus === "disabled",+ iconColor: "var(--icon-disabled)",+ isActive: (syncStatus) => syncStatus === "disabled",icon: SyncOff,- text: () => "Sync disabled",+ text: "Sync disabled",tooltip: "Sync is disabled."}];diff --git a/apps/web/src/components/tag/index.jsx b/apps/web/src/components/tag/index.tsxsimilarity index 51%rename from apps/web/src/components/tag/index.jsxrename to apps/web/src/components/tag/index.tsxindex 64c903c13..9b3b76729 100644--- a/apps/web/src/components/tag/index.jsx+++ b/apps/web/src/components/tag/index.tsx@@ -28,59 +28,32 @@ import { db } from "../../common/db";import { Edit, Shortcut, DeleteForver } from "../icons";import { showToast } from "../../utils/toast";import { pluralize } from "@notesnook/common";+import { Item } from "../list-container/types";+import { MenuItem } from "@notesnook/ui";-const menuItems = [- {- key: "edit",- title: "Rename tag",- icon: Edit,- onClick: ({ tag }) => {- hashNavigate(`/tags/${tag.id}/edit`);- }- },- {- key: "shortcut",- title: ({ tag }) =>- db.shortcuts.exists(tag.id) ? "Remove shortcut" : "Create shortcut",- icon: Shortcut,- onClick: ({ tag }) => appStore.addToShortcuts(tag)- },- { key: "sep", type: "separator" },- {- key: "delete",- color: "error",- iconColor: "error",- title: "Delete",- icon: DeleteForver,- onClick: async ({ items }) => {- for (let tag of items) {- if (tag.noteIds.includes(editorStore.get().session.id))- await editorStore.clearSession();- await db.tags.remove(tag.id);- }- showToast("success", `${pluralize(items.length, "tag")} deleted`);- tagStore.refresh();- noteStore.refresh();- },- multiSelect: true- }-];--function Tag({ item, index }) {+type TagProps = { item: Item };+function Tag(props: TagProps) {+ const { item } = props;const { id, noteIds, alias } = item;+return (<ListItemitem={item}isCompact- selectable={false}- index={index}- title={<TagNode title={alias} />}+ title={+ <Text as="span">+ <Text as="span" sx={{ color: "accent" }}>+ {"#"}+ </Text>+ {alias}+ </Text>+ }footer={<Text mt={1} variant="subBody">- {noteIds.length}+ {(noteIds as string[]).length}</Text>}- menu={{ items: menuItems, extraData: { tag: item } }}+ menuItems={menuItems}onClick={() => {navigate(`/tags/${id}`);}}@@ -89,13 +62,47 @@ function Tag({ item, index }) {}export default Tag;-function TagNode({ title }) {- return (- <Text as="span">- <Text as="span" sx={{ color: "primary" }}>- {"#"}- </Text>- {title}- </Text>- );-}+const menuItems: (tag: any, items?: any[]) => MenuItem[] = (+ tag,+ items = []+) => {+ return [+ {+ type: "button",+ key: "edit",+ title: "Rename tag",+ icon: Edit.path,+ onClick: () => {+ hashNavigate(`/tags/${tag.id}/edit`);+ }+ },+ {+ type: "button",+ key: "shortcut",+ title: db.shortcuts?.exists(tag.id)+ ? "Remove shortcut"+ : "Create shortcut",+ icon: Shortcut.path,+ onClick: () => appStore.addToShortcuts(tag)+ },+ { key: "sep", type: "separator" },+ {+ type: "button",+ key: "delete",+ styles: { icon: { color: "red" }, text: { color: "red" } },+ title: "Delete",+ icon: DeleteForver.path,+ onClick: async () => {+ for (const tag of items) {+ if (tag.noteIds.includes(editorStore.get().session.id))+ await editorStore.clearSession();+ await db.tags?.remove(tag.id);+ }+ showToast("success", `${pluralize(items.length, "tag")} deleted`);+ tagStore.refresh();+ noteStore.refresh();+ },+ multiSelect: true+ }+ ];+};diff --git a/apps/web/src/components/theme-preview/index.tsx b/apps/web/src/components/theme-preview/index.tsxnew file mode 100644index 000000000..ed5ee4bfe--- /dev/null+++ b/apps/web/src/components/theme-preview/index.tsx@@ -0,0 +1,169 @@+/*+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 { alpha } from "@theme-ui/color";+import { Flex, Text } from "@theme-ui/components";+import { Circle, Notes, Notebook, StarOutline, Tag, Plus } from "../icons";+import { ThemeMetadata } from "@notesnook/themes-server";++export type ThemePreviewProps = {+ theme: ThemeMetadata;+};++export function ThemePreview(props: ThemePreviewProps) {+ const { theme } = props;++ return (+ <Flex+ sx={{+ position: "relative",+ flexDirection: "column",+ height: 200,+ borderRadius: "default",+ overflow: "hidden",+ bg: alpha(theme.previewColors.accent, 0.2),+ //m: 2,++ border: `2px solid ${theme.previewColors.accent}`,+ gap: 0,+ transition: "all 300ms ease-out",+ ":hover": {+ gap: 1,+ p: 1,+ "&> div.ui": { gap: 1 },+ "& *": { border: "none" }+ }+ }}+ >+ <Flex+ sx={{+ borderRadius: "default",+ p: "small",+ position: "absolute",+ bottom: 1,+ right: 1+ }}+ >+ {[+ theme.previewColors.accent,+ theme.previewColors.paragraph,+ theme.previewColors.background+ ].map((color) => (+ <Circle+ key={color}+ color={color}+ size={18}+ sx={{+ ml: -12+ }}+ />+ ))}+ </Flex>+ <Flex+ className="ui"+ sx={{ flex: 1, gap: 0, transition: "all 300ms ease-out" }}+ >+ <Flex+ className="navigation"+ sx={{+ bg: theme.previewColors.navigationMenu.background,+ width: 20,+ flexDirection: "column",+ gap: 2,+ py: 1,+ borderRight: `1px solid ${theme.previewColors.border}`+ }}+ >+ {[Notes, Notebook, StarOutline, Tag].map((Icon, index) => (+ <Icon+ key={index.toString()}+ color={+ index === 0+ ? theme.previewColors.navigationMenu.accent+ : theme.previewColors.navigationMenu.icon+ }+ size={8}+ />+ ))}+ </Flex>+ <Flex+ className="list"+ sx={{+ bg: theme.previewColors.list.background,+ flex: 0.3,+ p: 1,+ borderRight: `1px solid ${theme.previewColors.border}`+ }}+ >+ <Flex+ sx={{+ justifyContent: "space-between",+ width: 120+ }}+ >+ <Text+ variant="heading"+ sx={{+ color: theme.previewColors.list.heading,+ fontSize: 7+ }}+ >+ Notes+ </Text>+ <Plus+ color="white"+ size={8}+ sx={{+ bg: theme.previewColors.list.accent,+ size: 10,+ borderRadius: 100+ }}+ />+ </Flex>+ </Flex>+ <Flex+ className="editor"+ sx={{ bg: theme.previewColors.editor, flex: 1 }}+ />+ </Flex>+ <Flex+ className="statusbar"+ sx={{+ height: 10,+ bg: theme.previewColors.statusBar.background,+ px: 1,+ alignItems: "center",+ gap: 1,+ borderTop: `1px solid ${theme.previewColors.border}`+ }}+ >+ <Circle color={theme.previewColors.statusBar.icon} size={3} />+ <Text+ variant="subBody"+ sx={{+ fontSize: 5,+ color: theme.previewColors.statusBar.paragraph+ }}+ >+ </Text>+ </Flex>+ </Flex>+ );+}diff --git a/apps/web/src/components/theme-provider/index.jsx b/apps/web/src/components/theme-provider/index.jsxdeleted file mode 100644index 8da86ea09..000000000--- a/apps/web/src/components/theme-provider/index.jsx+++ /dev/null@@ -1,43 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import { useStore } from "../../stores/theme-store";-import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";-import { useTheme } from "@notesnook/theme";-import { useEffect } from "react";--function ThemeProviderWrapper(props) {- const theme = useStore((store) => store.theme);- const accent = useStore((store) => store.accent);- const themeProperties = useTheme({ accent, theme });-- useEffect(() => {- const root = document.querySelector("html");- if (root) root.setAttribute("data-theme", theme);- }, [theme]);-- return (- <EmotionThemeProvider theme={themeProperties}>- {props.children instanceof Function- ? props.children(themeProperties)- : props.children}- </EmotionThemeProvider>- );-}-export default ThemeProviderWrapper;diff --git a/apps/web/src/components/theme-provider/index.tsx b/apps/web/src/components/theme-provider/index.tsxnew file mode 100644index 000000000..2056acb25--- /dev/null+++ b/apps/web/src/components/theme-provider/index.tsx@@ -0,0 +1,80 @@+/*+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 {+ EmotionThemeProvider,+ themeToCSS,+ ThemeScopes,+ useThemeEngineStore+} from "@notesnook/theme";+import { PropsWithChildren, useEffect, useMemo } from "react";+import { BoxProps } from "@theme-ui/components";+import { Global, css } from "@emotion/react";+import { useStore as useThemeStore } from "../../stores/theme-store";++export function BaseThemeProvider(+ props: PropsWithChildren<+ {+ injectCssVars?: boolean;+ addGlobalStyles?: boolean;+ scope?: keyof ThemeScopes;+ } & Omit<BoxProps, "variant">+ >+) {+ const {+ children,+ addGlobalStyles = false,+ scope = "base",+ ...restProps+ } = props;++ const colorScheme = useThemeStore((store) => store.colorScheme);+ const theme = useThemeStore((store) =>+ colorScheme === "dark" ? store.darkTheme : store.lightTheme+ );+ const cssTheme = useMemo(() => themeToCSS(theme), [theme]);++ useEffect(() => {+ (async () => {+ await useThemeStore.getState().init();+ })();+ }, []);++ useEffect(() => {+ useThemeEngineStore.getState().setTheme(theme);+ }, [theme]);++ return (+ <>+ {addGlobalStyles && (+ <Global+ styles={css`+ ${cssTheme}+ `}+ />+ )}++ <EmotionThemeProvider {...restProps} scope={scope}>+ {children}+ </EmotionThemeProvider>+ </>+ );+}++export { EmotionThemeProvider as ScopedThemeProvider };diff --git a/apps/web/src/components/tip/index.jsx b/apps/web/src/components/tip/index.jsxindex d354301be..4297bfb7c 100644--- a/apps/web/src/components/tip/index.jsx+++ b/apps/web/src/components/tip/index.jsx@@ -21,15 +21,14 @@ import { Text } from "@theme-ui/components";function TextWithTip({ text, tip, sx, color }) {return (- <Text sx={{ ...sx, fontSize: "body", color: color || "text" }}>+ <Text sx={{ ...sx, fontSize: "body", color: color || "paragraph" }}>{text}<br /><Text+ variant="subBody"sx={{wordBreak: "break-word",- whiteSpace: "pre-wrap",- fontSize: "subBody",- color: "fontTertiary"+ whiteSpace: "pre-wrap"}}>{tip}diff --git a/apps/web/src/components/toggle/index.jsx b/apps/web/src/components/toggle/index.jsxindex 426317b3d..29e91da7f 100644--- a/apps/web/src/components/toggle/index.jsx+++ b/apps/web/src/components/toggle/index.jsx@@ -60,8 +60,8 @@ function Toggle(props) {opacity: disabled ? 0.7 : 1,cursor: "pointer",borderBottom: "1px solid",- borderBottomColor: "border",- ":hover": { borderBottomColor: "primary" },+ borderBottomColor: "separator",+ ":hover": { borderBottomColor: "accent" },alignItems: "center",justifyContent: "space-between",@@ -73,9 +73,9 @@ function Toggle(props) {<Loading size={18} />) : (<Switch- sx={{ m: 0 }}onClick={disabled ? null : onClick}checked={isToggled}+ sx={{ m: 0, bg: isToggled ? "accent" : "icon" }}/>)}</Flex>diff --git a/apps/web/src/components/topic/index.jsx b/apps/web/src/components/topic/index.jsxdeleted file mode 100644index af9e4c1a9..000000000--- a/apps/web/src/components/topic/index.jsx+++ /dev/null@@ -1,145 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import React from "react";-import ListItem from "../list-item";-import { db } from "../../common/db";-import { store as appStore } from "../../stores/app-store";-import { hashNavigate } from "../../navigation";-import { Flex, Text } from "@theme-ui/components";-import { Edit, Topic as TopicIcon, Shortcut, Trash } from "../icons";-import { Multiselect } from "../../common/multi-select";-import { confirm } from "../../common/dialog-controller";-import { useStore as useNotesStore } from "../../stores/note-store";-import { pluralize } from "@notesnook/common";-import { getTotalNotes } from "@notesnook/common";--function Topic({ item, index, onClick }) {- const topic = item;- const isOpened = useNotesStore(- (store) => store.context?.value?.topic === item.id- );-- return (- <ListItem- selectable- isFocused={isOpened}- isCompact- item={topic}- onClick={onClick}- title={topic.title}- footer={- <Flex- sx={{- fontSize: "subBody",- color: "fontTertiary",- alignItems: "center"- }}- >- <Text variant="subBody">{getTotalNotes(topic)}</Text>- </Flex>- }- index={index}- menu={{- items: menuItems,- extraData: { topic, notebookId: topic.notebookId }- }}- />- );-}--export default React.memo(Topic, (prev, next) => {- return prev?.item?.title === next?.item?.title;-});--const menuItems = [- {- key: "edit",- title: "Edit",- icon: Edit,- onClick: ({ topic }) =>- hashNavigate(`/notebooks/${topic.notebookId}/topics/${topic.id}/edit`)- },- {- key: "set-as-default",- title: "Set as default",- checked: ({ topic }) => {- const defaultNotebook = db.settings.getDefaultNotebook();- return (- defaultNotebook?.id === topic.notebookId &&- defaultNotebook?.topic === topic.id- );- },- icon: TopicIcon,- onClick: async ({ topic }) => {- const defaultNotebook = db.settings.getDefaultNotebook();- const isDefault =- defaultNotebook?.id === topic.notebookId &&- defaultNotebook?.topic === topic.id;-- await db.settings.setDefaultNotebook(- isDefault ? undefined : { id: topic.notebookId, topic: topic.id }- );- }- },- {- key: "shortcut",- title: ({ topic }) =>- db.shortcuts.exists(topic.id) ? "Remove shortcut" : "Create shortcut",- icon: Shortcut,- onClick: ({ topic }) => appStore.addToShortcuts(topic)- },- { key: "sep", type: "separator" },- {- key: "delete",- title: "Delete",- icon: Trash,- color: "error",- iconColor: "error",- onClick: async ({ items, notebookId }) => {- const result = await confirm({- title: `Delete ${pluralize(items.length, "topic")}?`,- positiveButtonText: `Yes`,- negativeButtonText: "No",- checks: {- deleteContainingNotes: {- text: `Move all notes in ${- items.length > 1 ? "these topics" : "this topic"- } to trash`- }- }- });-- if (result) {- if (result.deleteContainingNotes) {- const notes = [];- for (const item of items) {- const topic = db.notebooks- .notebook(notebookId)- .topics.topic(item.id);- notes.push(...topic.all);- }- await Multiselect.moveNotesToTrash(notes, false);- }- await Multiselect.deleteTopics(notebookId, items);- }- },- multiSelect: true- }-];diff --git a/apps/web/src/components/topic/index.tsx b/apps/web/src/components/topic/index.tsxnew file mode 100644index 000000000..5cf4f1e22--- /dev/null+++ b/apps/web/src/components/topic/index.tsx@@ -0,0 +1,140 @@+/*+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 React from "react";+import ListItem from "../list-item";+import { db } from "../../common/db";+import { store as appStore } from "../../stores/app-store";+import { hashNavigate, navigate } from "../../navigation";+import { Flex, Text } from "@theme-ui/components";+import { Edit, Topic as TopicIcon, Shortcut, Trash } from "../icons";+import { Multiselect } from "../../common/multi-select";+import { confirm } from "../../common/dialog-controller";+import { useStore as useNotesStore } from "../../stores/note-store";+import { pluralize } from "@notesnook/common";+import { getTotalNotes } from "@notesnook/common";+import { Item } from "../list-container/types";+import { MenuItem } from "@notesnook/ui";++type TopicProps = { item: Item };+function Topic(props: TopicProps) {+ const { item: topic } = props;+ const isOpened = useNotesStore(+ (store) => (store.context?.value as any)?.topic === topic.id+ );++ return (+ <ListItem+ isFocused={isOpened}+ isCompact+ item={topic}+ onClick={() => navigate(`/notebooks/${topic.notebookId}/${topic.id}`)}+ title={topic.title}+ footer={<Text variant="subBody">{getTotalNotes(topic)}</Text>}+ menuItems={menuItems}+ />+ );+}++export default React.memo(Topic, (prev, next) => {+ return prev?.item?.title === next?.item?.title;+});++const menuItems: (topic: any, items?: any[]) => MenuItem[] = (+ topic,+ items = []+) => {+ const defaultNotebook = db.settings?.getDefaultNotebook();+ return [+ {+ type: "button",+ key: "edit",+ title: "Edit",+ icon: Edit.path,+ onClick: () =>+ hashNavigate(`/notebooks/${topic.notebookId}/topics/${topic.id}/edit`)+ },+ {+ type: "button",+ key: "set-as-default",+ title: "Set as default",+ checked:+ defaultNotebook?.id === topic.notebookId &&+ defaultNotebook?.topic === topic.id,+ icon: TopicIcon.path,+ onClick: async () => {+ const defaultNotebook = db.settings?.getDefaultNotebook();+ const isDefault =+ defaultNotebook?.id === topic.notebookId &&+ defaultNotebook?.topic === topic.id;++ await db.settings?.setDefaultNotebook(+ isDefault ? undefined : { id: topic.notebookId, topic: topic.id }+ );+ }+ },+ {+ type: "button",+ key: "shortcut",+ title: db.shortcuts?.exists(topic.id)+ ? "Remove shortcut"+ : "Create shortcut",+ icon: Shortcut.path,+ onClick: () => appStore.addToShortcuts(topic)+ },+ { key: "sep", type: "separator" },+ {+ type: "button",+ key: "delete",+ title: "Delete",+ icon: Trash.path,+ styles: { icon: { color: "red" }, text: { color: "red" } },+ onClick: async () => {+ const result = await confirm({+ title: `Delete ${pluralize(items.length, "topic")}?`,+ positiveButtonText: `Yes`,+ negativeButtonText: "No",+ checks: {+ deleteContainingNotes: {+ text: `Move all notes in ${+ items.length > 1 ? "these topics" : "this topic"+ } to trash`+ }+ }+ });++ if (result) {+ if (result.deleteContainingNotes) {+ const notes = [];+ for (const item of items) {+ const topic = db.notebooks+ ?.notebook(item.notebookId)+ .topics.topic(item.id);+ if (!topic) continue;+ notes.push(...topic.all);+ }+ await Multiselect.moveNotesToTrash(notes, false);+ }+ await Multiselect.deleteTopics(topic.notebookId, items);+ }+ },+ multiSelect: true+ }+ ];+};diff --git a/apps/web/src/components/trash-item/index.jsx b/apps/web/src/components/trash-item/index.tsxsimilarity index 55%rename from apps/web/src/components/trash-item/index.jsxrename to apps/web/src/components/trash-item/index.tsxindex 3c3cdcb2d..1d501790c 100644--- a/apps/web/src/components/trash-item/index.jsx+++ b/apps/web/src/components/trash-item/index.tsx@@ -28,28 +28,35 @@ import { showUndoableToast } from "../../common/toasts";import { showToast } from "../../utils/toast";import { hashNavigate } from "../../navigation";import { useStore } from "../../stores/note-store";+import { Item } from "../list-container/types";+import { MenuItem } from "@notesnook/ui";-function TrashItem({ item, index, date }) {+type TrashItemProps = { item: Item; date: number };+function TrashItem(props: TrashItemProps) {+ const { item, date } = props;const isOpened = useStore((store) => store.selectedNote === item.id);return (<ListItem- selectableisFocused={isOpened}item={item}title={item.title}- body={item.headline || item.description}- index={index}+ body={(item.headline || item.description) as string}footer={- <Flex mt={1} sx={{ fontSize: "subBody", color: "fontTertiary" }}>+ <Flex+ mt={1}+ sx={{ fontSize: "subBody", color: "var(--paragraph-secondary)" }}+ ><TimeAgo live={true} datetime={date} /><Text as="span" mx={1}>•</Text>- <Text sx={{ color: "primary" }}>{toTitleCase(item.itemType)}</Text>+ <Text sx={{ color: "accent" }}>+ {toTitleCase(item.itemType as string)}+ </Text></Flex>}- menu={{ items: menuItems, extraData: { item } }}+ menuItems={menuItems}onClick={() => {if (item.itemType === "note")hashNavigate(`/notes/${item.id}/edit`, { replace: true });@@ -59,33 +66,39 @@ function TrashItem({ item, index, date }) {}export default TrashItem;-const menuItems = [- {- key: "restore",- title: "Restore",- icon: Restore,- onClick: ({ items }) => {- store.restore(items.map((i) => i.id));- showToast("success", `${pluralize(items.length, "item")} restored`);- },- multiSelect: true- },- {- key: "delete",- title: "Delete",- icon: DeleteForver,- color: "error",- iconColor: "error",- onClick: async ({ items }) => {- if (!(await showMultiPermanentDeleteConfirmation(items.length))) return;- const ids = items.map((i) => i.id);- showUndoableToast(- `${pluralize(items.length, "item")} permanently deleted`,- () => store.delete(ids),- () => store.delete(ids, true),- () => store.refresh()- );+const menuItems: (item: any, items?: any[]) => MenuItem[] = (+ item,+ items = []+) => {+ return [+ {+ type: "button",+ key: "restore",+ title: "Restore",+ icon: Restore.path,+ onClick: () => {+ store.restore(items.map((i) => i.id));+ showToast("success", `${pluralize(items.length, "item")} restored`);+ },+ multiSelect: true},- multiSelect: true- }-];+ {+ type: "button",+ key: "delete",+ title: "Delete",+ icon: DeleteForver.path,+ styles: { icon: { color: "red" }, text: { color: "red" } },+ onClick: async () => {+ if (!(await showMultiPermanentDeleteConfirmation(items.length))) return;+ const ids = items.map((i) => i.id);+ showUndoableToast(+ `${pluralize(items.length, "item")} permanently deleted`,+ () => store.delete(ids),+ () => store.delete(ids, true),+ () => store.refresh()+ );+ },+ multiSelect: true+ }+ ];+};diff --git a/apps/web/src/components/unlock/index.jsx b/apps/web/src/components/unlock/index.jsxindex 5d6c13b80..d0cde27e7 100644--- a/apps/web/src/components/unlock/index.jsx+++ b/apps/web/src/components/unlock/index.jsx@@ -19,12 +19,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { useRef, useState, useCallback, useEffect, useMemo } from "react";import { Flex, Text, Button } from "@theme-ui/components";-import { Lock, Alert } from "../icons";+import { Lock } from "../icons";import { db } from "../../common/db";import { useStore as useEditorStore } from "../../stores/editor-store";import { useStore as useAppStore } from "../../stores/app-store";import Field from "../field";import { showToast } from "../../utils/toast";+import { ErrorText } from "../error-text";function Unlock(props) {const { noteId } = props;@@ -108,7 +109,7 @@ function Unlock(props) {sx={{textAlign: "center",fontSize: "title",- color: "fontTertiary"+ color: "var(--paragraph-secondary)"}}>Please enter the password to unlock this note.@@ -129,25 +130,10 @@ function Unlock(props) {}}}/>- {isWrong && (- <Flex- mt={2}- sx={{- alignItems: "center",- justifyContent: "center",- color: "error",- alignSelf: "flex-center"- }}- >- <Alert color="error" size={12} />- <Text ml={1} sx={{ fontSize: "body" }}>- Wrong password- </Text>- </Flex>- )}+ {isWrong && <ErrorText error="Wrong password" />}<Buttonmt={3}- variant="primary"+ variant="accent"data-test-id="unlock-note-submit"disabled={isUnlocking}sx={{ borderRadius: 100, px: 30 }}diff --git a/apps/web/src/dialogs/add-notebook-dialog.jsx b/apps/web/src/dialogs/add-notebook-dialog.jsxindex e42211ae4..9cc211950 100644--- a/apps/web/src/dialogs/add-notebook-dialog.jsx+++ b/apps/web/src/dialogs/add-notebook-dialog.jsx@@ -230,10 +230,10 @@ function TopicItem(props) {pl={0}sx={{borderWidth: 1,- borderBottomColor: isEditing ? "primary" : "border",+ borderBottomColor: isEditing ? "accent" : "border",borderBottomStyle: "solid",cursor: "pointer",- ":hover": { borderBottomColor: "primary" },+ ":hover": { borderBottomColor: "accent" },alignItems: "center",justifyContent: "space-between"}}@@ -242,7 +242,7 @@ function TopicItem(props) {><Flex sx={{ alignItems: "center", justifyContent: "center" }}><Topic />- <Text as="span" ml={1} sx={{ fontSize: "body", color: "text" }}>+ <Text as="span" ml={1} sx={{ fontSize: "body", color: "paragraph" }}>{title}</Text></Flex>@@ -254,7 +254,7 @@ function TopicItem(props) {alignItems: "center",":hover": { opacity: 0.8 },height: "25px",- color: "primary",+ color: "accent",display: "flex"}}onClick={isEditing ? onDoneEditing : onEdit}@@ -272,7 +272,7 @@ function TopicItem(props) {alignItems: "center",":hover": { opacity: 0.8 },height: "25px",- color: "error",+ color: "red",display: "flex"}}>diff --git a/apps/web/src/dialogs/add-reminder-dialog.tsx b/apps/web/src/dialogs/add-reminder-dialog.tsxindex d8d245255..04ddfd74b 100644--- a/apps/web/src/dialogs/add-reminder-dialog.tsx+++ b/apps/web/src/dialogs/add-reminder-dialog.tsx@@ -256,6 +256,7 @@ export default function AddReminderDialog(props: AddReminderDialogProps) {defaultChecked={m.id === Modes.ONCE}checked={m.id === mode}disabled={m.premium && !isUserPremium}+ sx={{ color: m.id === mode ? "accent" : "icon" }}onChange={() => {if (m.premium && !isUserPremium) return;setMode(m.id);@@ -265,7 +266,7 @@ export default function AddReminderDialog(props: AddReminderDialogProps) {/>{m.title}{m.premium && !isUserPremium && (- <Pro size={18} color="primary" sx={{ ml: 1 }} />+ <Pro size={18} color="accent" sx={{ ml: 1 }} />)}</Label>))}@@ -274,7 +275,7 @@ export default function AddReminderDialog(props: AddReminderDialogProps) {<Flexsx={{mt: 2,- bg: "bgSecondary",+ bg: "var(--background-secondary)",borderRadius: "default",p: 1,flexDirection: "column"@@ -284,7 +285,7 @@ export default function AddReminderDialog(props: AddReminderDialogProps) {{recurringModes.map((mode) => (<Buttonkey={mode.id}- variant="tool"+ variant="secondary"data-test-id={`recurring-mode-${mode.id}`}onClick={() => {setRecurringMode(mode.id);@@ -295,7 +296,14 @@ export default function AddReminderDialog(props: AddReminderDialogProps) {py: 1,px: 2,flexShrink: 0,- color: mode.id === recurringMode ? "primary" : "text"+ bg:+ mode.id === recurringMode+ ? "background-selected"+ : "transparent",+ color:+ mode.id === recurringMode+ ? "paragraph-selected"+ : "paragraph"}}>{mode.title}@@ -321,7 +329,7 @@ export default function AddReminderDialog(props: AddReminderDialogProps) {{mode.options.map((day, i) => (<Buttonkey={day}- variant="tool"+ variant="secondary"data-test-id={`day-${day}`}onClick={() => {setSelectedDays((days) => {@@ -338,8 +346,12 @@ export default function AddReminderDialog(props: AddReminderDialogProps) {px: 2,flexShrink: 0,textAlign: "left",- bg: selectedDays.includes(day) ? "shade" : "bgSecondary",- color: selectedDays.includes(day) ? "primary" : "text"+ bg: selectedDays.includes(day)+ ? "background-selected"+ : "transparent",+ color: selectedDays.includes(day)+ ? "paragraph-selected"+ : "paragraph"}}>{mode.id === "week" ? WEEK_DAYS[i] : day}@@ -396,6 +408,7 @@ export default function AddReminderDialog(props: AddReminderDialogProps) {<Radioid="priority"name="priority"+ sx={{ color: p.id === priority ? "accent" : "icon" }}defaultChecked={p.id === Priorities.VIBRATE}checked={p.id === priority}onChange={() => setPriority(p.id)}diff --git a/apps/web/src/dialogs/add-tags-dialog.tsx b/apps/web/src/dialogs/add-tags-dialog.tsxindex 8460e55c2..bd9f71cf8 100644--- a/apps/web/src/dialogs/add-tags-dialog.tsx+++ b/apps/web/src/dialogs/add-tags-dialog.tsx@@ -179,10 +179,9 @@ function TagItem(props: {cursor: "pointer",justifyContent: "space-between",alignItems: "center",- bg: "bgSecondary",+ bg: "var(--background-secondary)",borderRadius: "default",- p: 1,- background: "bgSecondary"+ p: 1}}onClick={onSelect}>@@ -192,7 +191,7 @@ function TagItem(props: {className="title"data-test-id="notebook-title"variant="subtitle"- sx={{ fontWeight: "body", color: "text" }}+ sx={{ fontWeight: "body", color: "paragraph" }}>#{tag.title}</Text>@@ -211,7 +210,7 @@ function SelectedCheck({size?: number;}) {return selected === "add" ? (- <CheckCircleOutline size={size} sx={{ mr: 1 }} color="primary" />+ <CheckCircleOutline size={size} sx={{ mr: 1 }} color="accent" />) : selected === "remove" ? (<CheckRemove size={size} sx={{ mr: 1 }} color="error" />) : (diff --git a/apps/web/src/dialogs/attachments-dialog.tsx b/apps/web/src/dialogs/attachments-dialog.tsxindex ce935b194..7922545ff 100644--- a/apps/web/src/dialogs/attachments-dialog.tsx+++ b/apps/web/src/dialogs/attachments-dialog.tsx@@ -57,6 +57,8 @@ import { CustomScrollbarsVirtualList } from "../components/list-container";import { Attachment } from "../components/attachment";import { isDocument, isImage, isVideo } from "@notesnook/core/utils/filename";+import { alpha } from "@theme-ui/color";+type ToolbarAction = {title: string;icon: Icon;@@ -181,7 +183,7 @@ function AttachmentsDialog({ onClose }: AttachmentsDialogProps) {<Flex sx={{ gap: 1 }}>{TOOLBAR_ACTIONS.map((tool) => (<Button- variant="tool"+ variant="secondary"key={tool.title}title={tool.title}onClick={() =>@@ -245,7 +247,7 @@ function AttachmentsDialog({ onClose }: AttachmentsDialogProps) {as="tr"sx={{height: 40,- th: { borderBottom: "1px solid var(--border)" },+ th: { borderBottom: "1px solid var(--separator)" },bg: "background"}}>@@ -392,18 +394,18 @@ const Sidebar = memo(flexDirection: "column",justifyContent: "space-between",width: 240,- bg: "bgSecondary","@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none))":{- bg: "bgTransparent",+ backgroundColor: alpha("background", 0.6),backdropFilter: "blur(8px)"- }+ },+ backgroundColor: "var(--background-secondary)"}}><Flex sx={{ flexDirection: "column" }}><Inputplaceholder="Search"- sx={{ m: 2, mb: 0, width: "auto", bg: "bgSecondary", py: "7px" }}+ sx={{ m: 2, mb: 0, width: "auto", bg: "background", py: "7px" }}onChange={(e) => {setRoute(e.target.value ? "none" : "all");if (e.target.value) filter(e.target.value);@@ -430,7 +432,7 @@ const Sidebar = memo(<Text variant="subBody">{formatBytes(totalSize)}</Text></Flex><Button- variant="tool"+ variant="secondary"sx={{bg: "transparent",borderRadius: 100,diff --git a/apps/web/src/dialogs/buy-dialog/buy-dialog.tsx b/apps/web/src/dialogs/buy-dialog/buy-dialog.tsxindex 845d0ec6f..76c6111dd 100644--- a/apps/web/src/dialogs/buy-dialog/buy-dialog.tsx+++ b/apps/web/src/dialogs/buy-dialog/buy-dialog.tsx@@ -44,6 +44,8 @@ import { isMacStoreApp } from "../../utils/platform";import { isUserSubscribed } from "../../hooks/use-is-user-premium";import { SUBSCRIPTION_STATUS } from "../../common/constants";+import { alpha } from "@theme-ui/color";+type BuyDialogProps = {couponCode?: string;plan?: "monthly" | "yearly";@@ -108,7 +110,7 @@ export function BuyDialog(props: BuyDialogProps) {},overlay: {zIndex: 999,- background: theme.colors.overlay+ background: theme.colors.backdrop}}}>@@ -131,10 +133,10 @@ export function BuyDialog(props: BuyDialogProps) {borderTopLeftRadius: "dialog",borderBottomLeftRadius: [0, 0, "dialog"],overflow: "hidden",- bg: "bgSecondary",+ bg: "var(--background-secondary)","@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none))":{- bg: "bgTransparent",+ bg: alpha("background", 0.6),backdropFilter: "blur(8px)"},flexDirection: "column",@@ -242,7 +244,7 @@ function Details() {const setIsApplyingCoupon = useCheckoutStore((store) => store.setIsApplyingCoupon);- const theme = useThemeStore((store) => store.theme);+ const theme = useThemeStore((store) => store.colorScheme);if (isCheckoutCompleted) return null;@@ -312,7 +314,7 @@ function TrialOrUpgrade(props: TrialOrUpgradeProps) {) : user ? (<><Button- variant="primary"+ variant="accent"mt={2}sx={{ borderRadius: 100, px: 6 }}onClick={onShowPlans}@@ -334,7 +336,7 @@ function TrialOrUpgrade(props: TrialOrUpgradeProps) {) : (<><Button- variant="primary"+ variant="accent"mt={4}sx={{ borderRadius: 100, px: 6 }}onClick={() => hardNavigate("/signup")}@@ -354,7 +356,7 @@ function TrialOrUpgrade(props: TrialOrUpgradeProps) {bg="shade"mt={4}p={1}- sx={{ borderRadius: "default", color: "primary" }}+ sx={{ borderRadius: "default", color: "accent" }}>{user? "Please select a plan to use your coupon:"@@ -389,7 +391,7 @@ function AlreadyPremium(props: AlreadyPremiumProps) {subscription.</Text><Button- variant="primary"+ variant="accent"mt={2}sx={{ borderRadius: 100, px: 6 }}onClick={onShowPlans}@@ -420,7 +422,7 @@ function CheckoutCompleted(props: { onClose: () => void }) {You have successfully subscribed to Notesnook Pro.</Text><Button- variant="primary"+ variant="accent"mt={2}sx={{ borderRadius: 100, px: 6 }}onClick={onClose}@@ -563,13 +565,13 @@ function CheckoutPricing(props: CheckoutPricingProps) {{key: "tax",label: "Sales tax",- color: "error",+ color: "red",value: formatPrice(currency, price.tax.toFixed(2), null)},{key: "discount",label: "Discount",- color: "primary",+ color: "accent",value: formatPrice(currency,discount.amount.toFixed(2),@@ -609,7 +611,7 @@ function CheckoutPricing(props: CheckoutPricingProps) {<Textdata-test-id={`value`}variant="body"- sx={{ fontSize: "subtitle", color: field.color || "text" }}+ sx={{ fontSize: "subtitle", color: field.color || "paragraph" }}>{field.value}</Text>@@ -630,11 +632,11 @@ function CheckoutPricing(props: CheckoutPricingProps) {<Text as="div" variant="body" sx={{ textAlign: "end" }}><Textdata-test-id={`value`}- sx={{ fontSize: "heading", color: "text" }}+ sx={{ fontSize: "heading", color: "paragraph" }}>{currentTotal}</Text>- <Text as="div" sx={{ fontSize: "body", color: "text" }}>+ <Text as="div" sx={{ fontSize: "body", color: "paragraph" }}>{isDiscounted? "forever": `first ${getFullPeriod(period)} then ${recurringTotal}`}diff --git a/apps/web/src/dialogs/buy-dialog/features.tsx b/apps/web/src/dialogs/buy-dialog/features.tsxindex 944b43138..a6cb636bb 100644--- a/apps/web/src/dialogs/buy-dialog/features.tsx+++ b/apps/web/src/dialogs/buy-dialog/features.tsx@@ -450,14 +450,14 @@ export function Features() {<Flex key={section.title} px={6} sx={{ flexDirection: "column" }}>{section.pro && (<Flex- bg="bgSecondary"+ bg="var(--background-secondary)"px={2}py="2px"sx={{ borderRadius: 50, alignSelf: "start" }}mb={1}>- <Pro color="primary" size={16} />- <Text variant="body" ml={"2px"} sx={{ color: "primary" }}>+ <Pro color="accent" size={16} />+ <Text variant="body" ml={"2px"} sx={{ color: "accent" }}>Pro</Text></Flex>@@ -468,7 +468,7 @@ export function Features() {<Textvariant="body"mt={1}- sx={{ fontSize: "title", color: "fontTertiary" }}+ sx={{ fontSize: "title", color: "paragraph" }}>{section.detail}</Text>@@ -488,18 +488,16 @@ export function Features() {key={feature.id}sx={{ flexDirection: "column", alignItems: "start" }}>- {feature.icon && (- <feature.icon size={20} color="text" sx={{ mb: 1 }} />- )}+ {feature.icon && <feature.icon size={20} sx={{ mb: 1 }} />}{feature.pro && (<Flexsx={{ alignItems: "center", justifyContent: "center" }}>- <Pro color="primary" size={14} />+ <Pro color="accent" size={14} /><Textvariant="subBody"ml={"2px"}- sx={{ color: "primary" }}+ sx={{ color: "accent" }}>Pro</Text>diff --git a/apps/web/src/dialogs/buy-dialog/paddle.tsx b/apps/web/src/dialogs/buy-dialog/paddle.tsxindex d6e6e4ba2..dfa1ae675 100644--- a/apps/web/src/dialogs/buy-dialog/paddle.tsx+++ b/apps/web/src/dialogs/buy-dialog/paddle.tsx@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { useEffect, useState, useRef, useCallback } from "react";import { Embed, Flex } from "@theme-ui/components";-import Loader from "../../components/loader";+import { Loader } from "../../components/loader";import {CheckoutData,CheckoutDataResponse,diff --git a/apps/web/src/dialogs/buy-dialog/plan-list.tsx b/apps/web/src/dialogs/buy-dialog/plan-list.tsxindex 3f889a1b3..44bf0d45a 100644--- a/apps/web/src/dialogs/buy-dialog/plan-list.tsx+++ b/apps/web/src/dialogs/buy-dialog/plan-list.tsx@@ -62,7 +62,7 @@ export function PlansList(props: PlansListProps) {key={metadata.title}disabled={isLoading}data-test-id={`checkout-plan`}- variant="tool"+ variant="secondary"mt={1}bg="transparent"// sx={@@ -90,7 +90,10 @@ export function PlansList(props: PlansListProps) {<br /><Textvariant="body"- sx={{ fontWeight: "normal", color: "fontTertiary" }}+ sx={{+ fontWeight: "normal",+ color: "var(--paragraph-secondary)"+ }}>{metadata.subtitle}</Text>@@ -119,7 +122,7 @@ function RecurringPricing(props: RecurringPricingProps) {sx={{textDecorationLine: "line-through",fontSize: "body",- color: "fontTertiary"+ color: "var(--paragraph-secondary)"}}>{getCurrencySymbol(plan.currency)}diff --git a/apps/web/src/dialogs/email-verification-dialog.jsx b/apps/web/src/dialogs/email-verification-dialog.jsxindex 30088f189..c19df23aa 100644--- a/apps/web/src/dialogs/email-verification-dialog.jsx+++ b/apps/web/src/dialogs/email-verification-dialog.jsx@@ -93,14 +93,18 @@ function EmailVerificationDialog(props) {sx={{ borderRadius: "default", alignSelf: "stretch" }}>We have sent the email confirmation link at{" "}- <Text as="b" sx={{ fontWeight: "bold" }}>+ <Text as="b" sx={{ color: "accent" }}>{user.email}</Text>.</Text><Accordiontitle={"What do I do if I am not getting the email?"}- sx={{ mt: 2, bg: "bgSecondary", borderRadius: "default" }}+ sx={{+ mt: 2,+ bg: "var(--background-secondary)",+ borderRadius: "default"+ }}><Text variant={"body"} px={1} pb={1}>{`If you didn't get an email from us or the confirmation link isn'tdiff --git a/apps/web/src/dialogs/feature-dialog.tsx b/apps/web/src/dialogs/feature-dialog.tsxindex 0bdd57b45..b352e4b57 100644--- a/apps/web/src/dialogs/feature-dialog.tsx+++ b/apps/web/src/dialogs/feature-dialog.tsx@@ -136,7 +136,7 @@ function FeatureDialog(props: FeatureDialogProps) {text: (<Flex>{feature.cta.icon && (- <feature.cta.icon color="primary" size={16} sx={{ mr: 1 }} />+ <feature.cta.icon color="accent" size={16} sx={{ mr: 1 }} />)}{feature.cta.title}</Flex>@@ -152,7 +152,7 @@ function FeatureDialog(props: FeatureDialogProps) {<Flexkey={feature.title}mb={2}- bg="bgSecondary"+ bg="var(--background-secondary)"p={2}sx={{borderRadius: "default",@@ -161,13 +161,13 @@ function FeatureDialog(props: FeatureDialogProps) {}}><Flex sx={{ alignItems: "center", justifyContent: "start" }}>- {feature.icon && <feature.icon size={14} color="primary" />}+ {feature.icon && <feature.icon size={14} color="accent" />}<Text variant="subtitle" ml={1} sx={{ fontWeight: "normal" }}>{feature.title}</Text></Flex>{feature.subtitle && (- <Text variant="body" sx={{ color: "icon" }}>+ <Text variant="subBody" sx={{ fontSize: "body" }}>{feature.subtitle}</Text>)}@@ -186,7 +186,7 @@ export function Code(props: CodeProps) {as="code"sx={{bg: "background",- color: "text",+ color: "paragraph",px: 1,borderRadius: 5,fontFamily: "monospace",diff --git a/apps/web/src/dialogs/index.ts b/apps/web/src/dialogs/index.tsindex 232974a70..83e22590a 100644--- a/apps/web/src/dialogs/index.ts+++ b/apps/web/src/dialogs/index.ts@@ -51,6 +51,7 @@ const Prompt = React.lazy(() => import("./prompt"));const MigrationDialog = React.lazy(() => import("./migration-dialog"));const EmailChangeDialog = React.lazy(() => import("./email-change-dialog"));const AddTagsDialog = React.lazy(() => import("./add-tags-dialog"));+const ThemeDetailsDialog = React.lazy(() => import("./theme-details-dialog"));export const Dialogs = {AddNotebookDialog,@@ -77,5 +78,6 @@ export const Dialogs = {ReminderPreviewDialog,EmailChangeDialog,AddTagsDialog,- SettingsDialog+ SettingsDialog,+ ThemeDetailsDialog};diff --git a/apps/web/src/dialogs/issue-dialog.tsx b/apps/web/src/dialogs/issue-dialog.tsxindex 667463530..74c8f5774 100644--- a/apps/web/src/dialogs/issue-dialog.tsx+++ b/apps/web/src/dialogs/issue-dialog.tsx@@ -29,6 +29,8 @@ import * as clipboard from "clipboard-polyfill/text";import { store as userstore } from "../stores/user-store";import { db } from "../common/db";+import { ErrorText } from "../components/error-text";+const PLACEHOLDERS = {title: "Briefly describe what happened",body: `Tell us more about the issue you are facing.@@ -119,10 +121,10 @@ function IssueDialog(props: IssueDialogProps) {/><Textvariant="error"- bg={"warnBg"}+ bg={"var(--background-error)"}mt={1}p={1}- sx={{ borderRadius: "default", color: "warn" }}+ sx={{ borderRadius: "default" }}>Your bug report is public. Do NOT include sensitive information(email, passwords etc) in the issue title or description.@@ -137,11 +139,7 @@ function IssueDialog(props: IssueDialogProps) {</>))}</Text>- {error && (- <Text bg="errorBg" variant="error" mt={1} px={1}>- Error: {error}- </Text>- )}+ <ErrorText error={error} /></Flex></Dialog>);diff --git a/apps/web/src/dialogs/loading-dialog.tsx b/apps/web/src/dialogs/loading-dialog.tsxindex 211cb86d5..43e1bce54 100644--- a/apps/web/src/dialogs/loading-dialog.tsx+++ b/apps/web/src/dialogs/loading-dialog.tsx@@ -49,7 +49,7 @@ function LoadingDialog<T>(props: LoadingDialogProps<T>) {<Text as="span" variant="body">{message}</Text>- <Loading rotate sx={{ my: 2 }} color="primary" />+ <Loading sx={{ my: 2 }} color="accent" /></Box></Dialog>);diff --git a/apps/web/src/dialogs/mfa/multi-factor-dialog.tsx b/apps/web/src/dialogs/mfa/multi-factor-dialog.tsxindex f81b07d8d..0897f1ff9 100644--- a/apps/web/src/dialogs/mfa/multi-factor-dialog.tsx+++ b/apps/web/src/dialogs/mfa/multi-factor-dialog.tsx@@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { useState } from "react";-import { Text } from "@theme-ui/components";import { Perform } from "../../common/dialog-controller";import Dialog from "../../components/dialog";import {@@ -30,6 +29,7 @@ import {steps} from "./steps";import { Authenticator, AuthenticatorType, OnNextFunction } from "./types";+import { ErrorText } from "../../components/error-text";type MultifactorDialogProps = {onClose: Perform;@@ -88,11 +88,7 @@ export default function MultifactorDialog(props: MultifactorDialogProps) {onClose={onClose}/>)}- {error && (- <Text variant={"error"} bg="errorBg" p={1} mt={2}>- {error}- </Text>- )}+ <ErrorText error={error} /></Dialog>);}diff --git a/apps/web/src/dialogs/mfa/recovery-code-dialog.tsx b/apps/web/src/dialogs/mfa/recovery-code-dialog.tsxindex 5228f9731..100e63a4d 100644--- a/apps/web/src/dialogs/mfa/recovery-code-dialog.tsx+++ b/apps/web/src/dialogs/mfa/recovery-code-dialog.tsx@@ -18,11 +18,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { useState } from "react";-import { Text } from "@theme-ui/components";import { Perform } from "../../common/dialog-controller";import Dialog from "../../components/dialog";import { steps } from "./steps";import { AuthenticatorType } from "./types";+import { ErrorText } from "../../components/error-text";type RecoveryCodesDialogProps = {onClose: Perform;@@ -48,11 +48,7 @@ export default function RecoveryCodesDialog(props: RecoveryCodesDialogProps) {{step.component && (<step.component onNext={() => {}} onError={setError} />)}- {error && (- <Text variant={"error"} bg="errorBg" p={1} mt={2}>- {error}- </Text>- )}+ <ErrorText error={error} /></Dialog>);}diff --git a/apps/web/src/dialogs/mfa/steps.tsx b/apps/web/src/dialogs/mfa/steps.tsxindex ea3a706dd..a1d8f5a7a 100644--- a/apps/web/src/dialogs/mfa/steps.tsx+++ b/apps/web/src/dialogs/mfa/steps.tsx@@ -57,6 +57,8 @@ import {OnNextFunction} from "./types";import { showMultifactorDialog } from "../../common/dialog-controller";+import { ErrorText } from "../../components/error-text";+const QRCode = React.lazy(() => import("../../re-exports/react-qrcode-logo"));export type Steps = typeof steps;@@ -271,14 +273,14 @@ function ChooseAuthenticator(props: ChooseAuthenticatorProps) {<auth.iconclassName="2fa-icon"sx={{- bg: selected === index ? "shade" : "bgSecondary",+ bg: selected === index ? "shade" : "var(--background-secondary)",borderRadius: 100,width: 35,height: 35,mr: 2}}size={16}- color={selected === index ? "primary" : "text"}+ color={selected === index ? "accent" : "icon"}/><Text variant={"title"} sx={{ fontWeight: "body" }}>{auth.title}{" "}@@ -288,7 +290,7 @@ function ChooseAuthenticator(props: ChooseAuthenticatorProps) {variant={"subBody"}bg="shade"px={1}- sx={{ borderRadius: "default", color: "primary" }}+ sx={{ borderRadius: "default", color: "accent" }}>Recommended</Text>@@ -372,7 +374,7 @@ function SetupAuthenticatorApp(props: SetupAuthenticatorProps) {don't matter):`}</Text><Flex- bg="bgSecondary"+ bg="var(--background-secondary)"mt={2}sx={{ borderRadius: "default", alignItems: "center" }}p={1}@@ -383,7 +385,7 @@ function SetupAuthenticatorApp(props: SetupAuthenticatorProps) {sx={{flex: 1,overflowWrap: "anywhere",- color: "text",+ color: "paragraph",fontSize: "body",fontFamily: "monospace"}}@@ -438,7 +440,7 @@ function SetupEmail(props: SetupAuthenticatorProps) {><Flexmt={2}- bg="bgSecondary"+ bg="var(--background-secondary)"sx={{borderRadius: "default",overflowWrap: "anywhere",@@ -479,17 +481,7 @@ function SetupEmail(props: SetupAuthenticatorProps) {)}</Button></Flex>- {error ? (- <Text- variant={"error"}- bg="errorBg"- p={1}- sx={{ borderRadius: "default" }}- mt={1}- >- {error}- </Text>- ) : null}+ <ErrorText error={error} /></VerifyAuthenticatorForm>);}@@ -568,17 +560,7 @@ function SetupSMS(props: SetupAuthenticatorProps) {}}}/>- {error ? (- <Text- variant={"error"}- bg="errorBg"- p={1}- sx={{ borderRadius: "default" }}- mt={1}- >- {error}- </Text>- ) : null}+ <ErrorText error={error} /></VerifyAuthenticatorForm>);}@@ -665,7 +647,7 @@ function BackupRecoveryCodes(props: TwoFactorEnabledProps) {sx={{display: "grid",gridTemplateColumns: "1fr 1fr 1fr 1fr",- bg: "bgSecondary",+ bg: "var(--background-secondary)",p: 2,gap: 1,columnGap: 2,@@ -682,7 +664,7 @@ function BackupRecoveryCodes(props: TwoFactorEnabledProps) {fontFamily: "monospace",textAlign: "center",fontWeight: "body",- color: "text"+ color: "paragraph"}}>{code}@@ -734,7 +716,7 @@ function TwoFactorEnabled(props: TwoFactorEnabledProps) {<Textvariant={"body"}mt={1}- sx={{ textAlign: "center", color: "fontTertiary" }}+ sx={{ textAlign: "center", color: "var(--paragraph-secondary)" }}>Your account is now 100% secure against unauthorized logins.</Text>@@ -788,7 +770,7 @@ function Fallback2FAEnabled(props: Fallback2FAEnabledProps) {<Textvariant={"body"}mt={1}- sx={{ textAlign: "center", color: "fontTertiary" }}+ sx={{ textAlign: "center", color: "var(--paragraph-secondary)" }}>You will now receive your 2FA codes on your{" "}{mfaMethodToPhrase(fallbackMethod)} in case you lose access to your{" "}diff --git a/apps/web/src/dialogs/migration-dialog.tsx b/apps/web/src/dialogs/migration-dialog.tsxindex 817fdf8e1..5fadd40aa 100644--- a/apps/web/src/dialogs/migration-dialog.tsx+++ b/apps/web/src/dialogs/migration-dialog.tsx@@ -26,6 +26,7 @@ import { Perform } from "../common/dialog-controller";import { TaskManager } from "../common/task-manager";import Dialog from "../components/dialog";+import { ErrorText } from "../components/error-text";type MigrationProgressEvent = {collection: string;@@ -92,19 +93,15 @@ export default function MigrationDialog(props: MigrationDialogProps) {onClick: startMigration}}>- <Text+ <ErrorText+ error={error.stack}as="p"- variant={"error"}sx={{- bg: "errorBg",- p: 1,borderRadius: "default",wordWrap: "normal",overflowWrap: "break-word"}}- >- {error.stack}- </Text>+ /><Text as="p" variant={"subBody"} sx={{ mt: 2 }}>If this continues to happen, please reach out to us via{" "}<a href="https://discord.com/invite/zQBK97EE22">Discord</a> or emaildiff --git a/apps/web/src/dialogs/move-note-dialog.tsx b/apps/web/src/dialogs/move-note-dialog.tsxindex b16ed05ed..d3007e657 100644--- a/apps/web/src/dialogs/move-note-dialog.tsx+++ b/apps/web/src/dialogs/move-note-dialog.tsx@@ -266,7 +266,7 @@ function NotebookItem(props: {cursor: "pointer",justifyContent: "space-between",alignItems: "center",- bg: "bgSecondary",+ bg: "var(--background-secondary)",borderRadius: "default",p: 1,height: "40px"@@ -306,7 +306,7 @@ function NotebookItem(props: {<Flex data-test-id="notebook-tools" sx={{ alignItems: "center" }}><TopicSelectionIndicator notebook={notebook} /><Button- variant="tool"+ variant="secondary"className="create-topic"data-test-id="create-topic"sx={{ display: "none", p: 1 }}@@ -354,7 +354,7 @@ function NotebookItem(props: {data-test-id={`new-topic-input`}autoFocussx={{- bg: "bgSecondary",+ bg: "var(--background-secondary)",p: "small",border: "1px solid var(--border)"}}@@ -387,7 +387,7 @@ function TopicSelectionIndicator({ notebook }: { notebook: Notebook }) {);if (!hasSelectedTopics) return null;- return <Circle size={8} color="primary" sx={{ mr: 1 }} />;+ return <Circle size={8} color="accent" sx={{ mr: 1 }} />;}function TopicItem(props: { topic: Topic }) {@@ -447,9 +447,13 @@ function SelectedCheck({selectedItem?.op === "remove" ? "remove" : selectedItem?.op === "add";return selected === true ? (- <CheckCircleOutline size={size} sx={{ mr: 1 }} color="primary" />+ <CheckCircleOutline size={size} sx={{ mr: 1 }} color="accent" />) : selected === null ? (- <CheckIntermediate size={size} sx={{ mr: 1 }} color="dimPrimary" />+ <CheckIntermediate+ size={size}+ sx={{ mr: 1 }}+ color="var(--accent-secondary)"+ />) : selected === "remove" ? (<CheckRemove size={size} sx={{ mr: 1 }} color="error" />) : (diff --git a/apps/web/src/dialogs/onboarding-dialog.jsx b/apps/web/src/dialogs/onboarding-dialog.jsxindex 5ad77260e..66a48c19f 100644--- a/apps/web/src/dialogs/onboarding-dialog.jsx+++ b/apps/web/src/dialogs/onboarding-dialog.jsx@@ -43,11 +43,10 @@ import { showBuyDialog } from "../common/dialog-controller";import { TaskManager } from "../common/task-manager";import { db } from "../common/db";import { usePersistentState } from "../hooks/use-persistent-state";-import AccentItem from "../components/accent-item";import { useCallback, useState } from "react";import Config from "../utils/config";-import { getAllAccents } from "@notesnook/theme";import { isMacStoreApp } from "../utils/platform";+import { ErrorText } from "../components/error-text";const newUserSteps = [{@@ -80,7 +79,7 @@ const newUserSteps = [image: <Friends style={{ flexShrink: 0, width: 140, height: 140 }} />},{- image: <Pro size={60} color="primary" />,+ image: <Pro size={60} color="accent" />,title: "Notesnook Pro",subtitle: "Experience the next level of private note taking",component: TrialOffer@@ -94,12 +93,12 @@ const proUserSteps = [buttonText: "Next",image: <Nomad style={{ flexShrink: 0, width: 120, height: 120 }} />},- {- title: "Style your 'nook",- subtitle: "Let's make Notesnook your new note taking home",- buttonText: "Next",- component: AccentSelector- },+ // {+ // title: "Style your 'nook",+ // subtitle: "Let's make Notesnook your new note taking home",+ // buttonText: "Next",+ // component: AccentSelector+ // },{title: "We are always listening",subtitle: "If you face any issue, you can reach out to us anytime.",@@ -178,7 +177,11 @@ function OnboardingDialog({ onClose: _onClose, type }) {</Text><Textvariant={"body"}- sx={{ textAlign: "center", maxWidth: "70%", color: "fontTertiary" }}+ sx={{+ textAlign: "center",+ maxWidth: "70%",+ color: "var(--paragraph-secondary)"+ }}>{subtitle}</Text>@@ -205,7 +208,7 @@ function JoinCause({ onNext }) {href="https://discord.com/invite/zQBK97EE22"target="_blank"mt={4}- variant={"primary"}+ variant="accent"sx={{ borderRadius: 50, alignSelf: "center", px: 30 }}onClick={() => onNext()}>@@ -215,7 +218,7 @@ function JoinCause({ onNext }) {variant={"anchor"}mt={2}onClick={() => onNext()}- sx={{ color: "fontTertiary" }}+ sx={{ color: "var(--paragraph-secondary)" }}>Skip for now</Button>@@ -259,7 +262,7 @@ function Importer({ onClose }) {href="https://importer.notesnook.com/"target="_blank"mt={4}- variant={"primary"}+ variant="accent"sx={{ borderRadius: 50, alignSelf: "center", px: 30 }}onClick={() => onClose()}>@@ -269,7 +272,7 @@ function Importer({ onClose }) {variant={"anchor"}mt={2}onClick={() => onClose()}- sx={{ color: "fontTertiary" }}+ sx={{ color: "var(--paragraph-secondary)" }}>Skip for now</Button>@@ -277,23 +280,6 @@ function Importer({ onClose }) {);}-function AccentSelector() {- return (- <Flex my={4}>- <Box- sx={{- display: "grid",- gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr 1fr"- }}- >- {getAllAccents().map((color) => (- <AccentItem key={color.code} code={color.code} label={color.label} />- ))}- </Box>- </Flex>- );-}-const supportChannels = [{key: "email",@@ -353,8 +339,8 @@ const themes = [];function ThemeSelector() {- const currentTheme = useThemeStore((store) => store.theme);- const setTheme = useThemeStore((store) => store.setTheme);+ const currentTheme = useThemeStore((store) => store.colorScheme);+ const setTheme = useThemeStore((store) => store.setColorScheme);return (<Flex@@ -369,7 +355,7 @@ function ThemeSelector() {p={20}sx={{borderRight: "1px solid var(--border)",- bg: isSelected ? "bgSecondary" : "transparent",+ bg: isSelected ? "shade" : "transparent",cursor: "pointer",":last-of-type": {borderRight: "0px"@@ -389,7 +375,8 @@ function ThemeSelector() {src={theme.image}sx={{borderRadius: "default",- border: isSelected ? "2px solid var(--primary)" : "none",+ border: isSelected ? "2px solid" : "none",+ borderColor: "accent",boxShadow: isSelected ? "0px 0px 10px 1px #00000016" : "none"}}/>@@ -450,22 +437,14 @@ function TrialOffer({ onClose }) {><Features item={{ style: {} }} />{error ? (- <Text- variant={"body"}- mt={2}- bg="errorBg"- p={1}- sx={{ borderRadius: "default", color: "error" }}- >- {error}- </Text>+ <ErrorText error={error} />) : (<Textvariant={"body"}mt={2}- bg="bgSecondary"+ bg="var(--background-secondary)"p={1}- sx={{ borderRadius: "default", color: "icon" }}+ sx={{ borderRadius: "default", color: "var(--paragraph-secondary)" }}><b>Note:</b> Upgrade now and get 50% discount on all plans.</Text>@@ -514,7 +493,7 @@ function TrialOffer({ onClose }) {variant={"anchor"}mt={2}onClick={() => onClose()}- sx={{ color: "fontTertiary" }}+ sx={{ color: "var(--paragraph-secondary)" }}>Skip for now</Button>diff --git a/apps/web/src/dialogs/progress-dialog.jsx b/apps/web/src/dialogs/progress-dialog.jsxindex b2355f7b6..008f98da8 100644--- a/apps/web/src/dialogs/progress-dialog.jsx+++ b/apps/web/src/dialogs/progress-dialog.jsx@@ -56,7 +56,7 @@ function ProgressDialog(props) {sx={{alignSelf: "start",my: 1,- bg: "primary",+ bg: "accent",height: "2px",width: `${(current / total) * 100}%`}}diff --git a/apps/web/src/dialogs/recovery-key-dialog.jsx b/apps/web/src/dialogs/recovery-key-dialog.jsxindex 3cd4393a9..0554bba26 100644--- a/apps/web/src/dialogs/recovery-key-dialog.jsx+++ b/apps/web/src/dialogs/recovery-key-dialog.jsx@@ -26,6 +26,7 @@ import * as clipboard from "clipboard-polyfill/text";import { Suspense } from "react";import Config from "../utils/config";import FileSaver from "file-saver";+import { ErrorText } from "../components/error-text";const QRCode = React.lazy(() => import("../re-exports/react-qrcode-logo"));@@ -57,30 +58,22 @@ function RecoveryKeyDialog(props) {><Flex sx={{ overflow: "hidden", flex: 1, flexDirection: "column" }}><Flex sx={{ overflowY: "auto", flexDirection: "column" }}>- <Text- bg="errorBg"- p={2}- sx={{- borderRadius: "default",- fontSize: "subBody",- color: "error"- }}- >- In case you forget your password, your recovery key is the only way- to recover your data.- </Text>+ <ErrorText+ error="In case you forget your password, your recovery key is the only way to recover your data."+ mt={0}+ /><Textdata-test-id="recovery-key"className="selectable"mt={2}- bg="bgSecondary"+ bg="var(--background-secondary)"p={2}sx={{borderRadius: "default",overflowWrap: "anywhere",fontSize: "body",fontFamily: "monospace",- color: "text"+ color: "paragraph"}}>{key}diff --git a/apps/web/src/dialogs/reminder-dialog.jsx b/apps/web/src/dialogs/reminder-dialog.jsxindex 3c633c2f6..1d6ad143d 100644--- a/apps/web/src/dialogs/reminder-dialog.jsx+++ b/apps/web/src/dialogs/reminder-dialog.jsx@@ -50,7 +50,7 @@ const reminders = {title: (<>Subscribe now to{" "}- <Text as="span" sx={{ fontWeight: "bold", color: "primary" }}>+ <Text as="span" sx={{ fontWeight: "bold", color: "accent" }}>get 30% off</Text>*@@ -61,7 +61,7 @@ const reminders = {features,// footer: (// <Flex bg="bgSecondary" pb={2} sx={{justifyContent: "center"}}>- // <Button variant="anchor" sx={{color: "text"}}>+ // <Button variant="anchor" sx={{color: "paragraph"}}>// Can't decide yet? Extend your trial!// </Button>// </Flex>diff --git a/apps/web/src/dialogs/reminder-preview-dialog.tsx b/apps/web/src/dialogs/reminder-preview-dialog.tsxindex cf5f7200a..11561ec7e 100644--- a/apps/web/src/dialogs/reminder-preview-dialog.tsx+++ b/apps/web/src/dialogs/reminder-preview-dialog.tsx@@ -101,7 +101,7 @@ export default function ReminderPreviewDialog({SNOOZE_TIMES.map((time) => (<Buttonkey={time.id}- variant="tool"+ variant="secondary"onClick={() => {db.reminders?.add({id: reminder.id,diff --git a/apps/web/src/dialogs/settings/appearance-settings.ts b/apps/web/src/dialogs/settings/appearance-settings.tsindex e4fd62bc9..5c1f458a0 100644--- a/apps/web/src/dialogs/settings/appearance-settings.ts+++ b/apps/web/src/dialogs/settings/appearance-settings.ts@@ -20,33 +20,50 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { SettingsGroup } from "./types";import { useStore as useSettingStore } from "../../stores/setting-store";import { useStore as useThemeStore } from "../../stores/theme-store";--import { AccentColors } from "./components/accent-colors";+import { ThemesSelector } from "./components/themes-selector";export const AppearanceSettings: SettingsGroup[] = [{key: "theme",section: "appearance",- header: "Theme",+ header: "General",+ isHidden: () => !IS_DESKTOP_APP,settings: [{- key: "accent-color",- title: "Accent color",- description: "Pick the color that matches your mood.",+ key: "zoom-factor",+ title: "Zoom factor",+ description: "Zoom in or out the app content.",+ isHidden: () => !IS_DESKTOP_APP,+ onStateChange: (listener) =>+ useThemeStore.subscribe(+ (s) => [s.colorScheme, s.followSystemTheme],+ listener+ ),components: [{- type: "custom",- component: AccentColors+ type: "input",+ inputType: "number",+ min: 0.5,+ max: 2.0,+ defaultValue: () => useSettingStore.getState().zoomFactor,+ onChange: (value) => useSettingStore.getState().setZoomFactor(value)}]- },+ }+ ]+ },+ {+ key: "theme",+ section: "appearance",+ header: "Themes",+ settings: [{- key: "theme",- title: "App theme",+ key: "color-scheme",+ title: "Color scheme",description: "Dark or light, we won't judge.",onStateChange: (listener) =>useThemeStore.subscribe(- (s) => [s.theme, s.followSystemTheme],+ (s) => [s.colorScheme, s.followSystemTheme],listener),components: [@@ -60,34 +77,19 @@ export const AppearanceSettings: SettingsGroup[] = [selectedOption: () =>useThemeStore.getState().followSystemTheme? "auto"- : useThemeStore.getState().theme,+ : useThemeStore.getState().colorScheme,onSelectionChanged: (value) => {useThemeStore.getState().setFollowSystemTheme(value === "auto");- if (value !== "auto") useThemeStore.getState().setTheme(value);+ if (value !== "auto")+ useThemeStore.getState().setColorScheme(value);}}]},{- key: "zoom-factor",- title: "Zoom factor",- description: "Zoom in or out the app content.",- isHidden: () => !IS_DESKTOP_APP,- onStateChange: (listener) =>- useThemeStore.subscribe(- (s) => [s.theme, s.followSystemTheme],- listener- ),- components: [- {- type: "input",- inputType: "number",- min: 0.5,- max: 2.0,- defaultValue: () => useSettingStore.getState().zoomFactor,- onChange: (value) => useSettingStore.getState().setZoomFactor(value)- }- ]+ key: "themes",+ title: "Select a theme",+ components: [{ type: "custom", component: ThemesSelector }]}]}diff --git a/apps/web/src/dialogs/settings/components/billing-history.tsx b/apps/web/src/dialogs/settings/components/billing-history.tsxindex d21ee2d7a..3aea720b8 100644--- a/apps/web/src/dialogs/settings/components/billing-history.tsx+++ b/apps/web/src/dialogs/settings/components/billing-history.tsx@@ -84,7 +84,13 @@ export function BillingHistory() {{isLoading ? (<Loading sx={{ mt: 2 }} />) : error ? (- <Flex sx={{ bg: "errorBg", p: 1, borderRadius: "default" }}>+ <Flex+ sx={{+ bg: "var(--background-error)",+ p: 1,+ borderRadius: "default"+ }}+ ><Text variant="error" sx={{ whiteSpace: "pre-wrap" }}>{error.message}<br />@@ -102,7 +108,7 @@ export function BillingHistory() {as="tr"sx={{height: 30,- th: { borderBottom: "1px solid var(--border)" }+ th: { borderBottom: "1px solid var(--separator)" }}}>{[@@ -157,7 +163,7 @@ export function BillingHistory() {target="_blank"rel="noreferer nofollow"variant="text.subBody"- sx={{ color: "primary" }}+ sx={{ color: "accent" }}>View receipt</Link>diff --git a/apps/web/src/dialogs/settings/components/customize-toolbar.tsx b/apps/web/src/dialogs/settings/components/customize-toolbar.tsxindex 9f8976b7d..f40b4481e 100644--- a/apps/web/src/dialogs/settings/components/customize-toolbar.tsx+++ b/apps/web/src/dialogs/settings/components/customize-toolbar.tsx@@ -21,7 +21,6 @@ import { Button, Flex, FlexProps, Text } from "@theme-ui/components";import {getAllTools,getToolDefinition,- Icon,Icons,ToolbarDefinition,ToolbarGroupDefinition,@@ -63,6 +62,8 @@ import { showToast } from "../../../utils/toast";import { isUserPremium } from "../../../hooks/use-is-user-premium";import { Pro } from "../../../components/icons";+import { Icon } from "@notesnook/ui";+export function CustomizeToolbar() {const sensors = useSensors(useSensor(PointerSensor),@@ -117,7 +118,7 @@ export function CustomizeToolbar() {checked={preset.id === currentPreset.id}defaultChecked={preset.id === currentPreset.id}disabled={preset.id === "custom" && !isUserPremium()}- style={{ accentColor: "var(--primary)" }}+ style={{ accentColor: "var(--accent)" }}onChange={async (e) => {const { value } = e.target;if (preset.id === "custom" && !isUserPremium()) {@@ -133,7 +134,7 @@ export function CustomizeToolbar() {/><span style={{ marginLeft: 5 }}>{preset.title}</span>{preset.id === "custom" && !isUserPremium() ? (- <Pro color="primary" size={18} sx={{ ml: 1 }} />+ <Pro color="accent" size={18} sx={{ ml: 1 }} />) : null}</Label>))}@@ -153,7 +154,7 @@ export function CustomizeToolbar() {showToast("success", "Group added successfully");}}>- <Icon path={Icons.plus} color="text" size={18} />+ <Icon path={Icons.plus} color="paragraph" size={18} /></Button>)}</Flex>@@ -284,8 +285,7 @@ function TreeNodeComponent(props: TreeNodeComponentProps) {onRemove={onRemoveGroup}onAdd={isGroup(item) ? onAddSubGroup : undefined}sx={{- bg: "background",- border: "1px solid var(--border)",+ bg: "var(--background-secondary)",borderRadius: "default",p: 1,mb: 1,@@ -294,9 +294,9 @@ function TreeNodeComponent(props: TreeNodeComponentProps) {}}>{isDraggable ? (- <Icon path={Icons.dragHandle} size={18} color="icon" />+ <Icon path={Icons.dragHandle} size={18} color="accent" />) : null}- <Text variant={"body"} sx={{ ml: 1 }}>+ <Text variant={"body"} sx={{ ml: 1, color: "accent" }}>{item.title}</Text></SortableWrapper>@@ -313,7 +313,7 @@ function TreeNodeComponent(props: TreeNodeComponentProps) {p: 1,alignItems: "center",justifyContent: "space-between",- bg: "bgSecondary",+ bg: "var(--background-secondary)",borderRadius: "default",mb: 1,ml: item.depth * 15,@@ -381,7 +381,7 @@ function SortableWrapper(props: SortableWrapperProps) {{onAdd && (<Buttonid="add-item"- variant={"tool"}+ variant={"secondary"}sx={{ p: "small", opacity: 0, mr: 1 }}onClick={() => onAdd()}>@@ -391,7 +391,7 @@ function SortableWrapper(props: SortableWrapperProps) {{onRemove && (<Buttonid="remove-item"- variant={"tool"}+ variant={"secondary"}sx={{ p: "small", opacity: 0 }}onClick={() => onRemove(item)}>diff --git a/apps/web/src/dialogs/settings/components/importer.tsx b/apps/web/src/dialogs/settings/components/importer.tsxindex 9fc174c64..ef48190b5 100644--- a/apps/web/src/dialogs/settings/components/importer.tsx+++ b/apps/web/src/dialogs/settings/components/importer.tsx@@ -66,14 +66,14 @@ export function Importer() {alignSelf: "start",borderRadius: "default",height: "5px",- bg: "primary",+ bg: "accent",width: `0%`}}/></>) : isDone ? (<>- <CheckCircleOutline color="primary" sx={{ mt: 150 }} />+ <CheckCircleOutline color="accent" sx={{ mt: 150 }} /><Text variant="body" my={2} sx={{ textAlign: "center" }}>Import successful. {errors.length} errors occured.</Text>@@ -90,13 +90,18 @@ export function Importer() {Start over</Button>{errors.length > 0 && (- <Flex my={1} bg="errorBg" p={1} sx={{ flexDirection: "column" }}>+ <Flex+ my={1}+ bg="var(--background-error)"+ p={1}+ sx={{ flexDirection: "column" }}+ >{errors.map((error) => (<Textkey={error.message}variant="body"sx={{- color: "error"+ color: "var(--paragraph-error)"}}>{error.message}@@ -114,7 +119,10 @@ export function Importer() {? `${pluralize(files.length, "file")} ready for import`: "Select files to import"}</Text>- <Text variant={"body"} sx={{ color: "fontTertiary" }}>+ <Text+ variant={"body"}+ sx={{ color: "var(--paragraph-secondary)" }}+ >Please refer to the{" "}<Linkhref="https://help.notesnook.com/importing-notes/import-notes-from-evernote"diff --git a/apps/web/src/dialogs/settings/components/spell-checker-languages.tsx b/apps/web/src/dialogs/settings/components/spell-checker-languages.tsxindex 2f460c3c3..e60c6d0be 100644--- a/apps/web/src/dialogs/settings/components/spell-checker-languages.tsx+++ b/apps/web/src/dialogs/settings/components/spell-checker-languages.tsx@@ -62,7 +62,7 @@ export function SpellCheckerLanguages() {<inputtype="checkbox"style={{- accentColor: "var(--primary)",+ accentColor: "var(--accent)",marginRight: 1,width: 14,height: 14diff --git a/apps/web/src/dialogs/settings/components/subscription-status.tsx b/apps/web/src/dialogs/settings/components/subscription-status.tsxindex 9f632431e..24dd65116 100644--- a/apps/web/src/dialogs/settings/components/subscription-status.tsx+++ b/apps/web/src/dialogs/settings/components/subscription-status.tsx@@ -93,7 +93,7 @@ export function SubscriptionStatus() {borderRadius: "default",justifyContent: "center",alignItems: "start",- bg: "bgSecondary",+ bg: "var(--background-secondary)",p: 2,mb: isBasic ? 0 : 4}}@@ -104,7 +104,7 @@ export function SubscriptionStatus() {fontSize: 11,fontWeight: "bold",letterSpacing: 0.3,- color: "primary"+ color: "accent"}}>CURRENT PLAN@@ -199,7 +199,7 @@ export function SubscriptionStatus() {) : isBasic ? (<><Button- variant="primary"+ variant="accent"onClick={async () => {showBuyDialog();}}@@ -217,7 +217,7 @@ export function SubscriptionStatus() {) : isTrial ? (<><Button- variant="primary"+ variant="accent"onClick={async () => {showBuyDialog();}}diff --git a/apps/web/src/dialogs/settings/components/themes-selector.tsx b/apps/web/src/dialogs/settings/components/themes-selector.tsxnew file mode 100644index 000000000..206f85219--- /dev/null+++ b/apps/web/src/dialogs/settings/components/themes-selector.tsx@@ -0,0 +1,323 @@+/*+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 { httpBatchLink } from "@trpc/client";+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";+import { useCallback, useState } from "react";+import { Box, Button, Flex, Input, Text } from "@theme-ui/components";+import { CheckCircleOutline, Loading } from "../../../components/icons";+import {+ THEME_COMPATIBILITY_VERSION,+ getPreviewColors,+ validateTheme+} from "@notesnook/theme";+import { debounce } from "@notesnook/common";+import { useStore as useThemeStore } from "../../../stores/theme-store";+import { useStore as useUserStore } from "../../../stores/user-store";+import {+ ThemesRouter,+ THEME_SERVER_URL,+ ThemesTRPC+} from "../../../common/themes-router";+import { ThemeMetadata } from "@notesnook/themes-server";+import { showThemeDetails } from "../../../common/dialog-controller";+import { ThemePreview } from "../../../components/theme-preview";+import { VirtuosoGrid } from "react-virtuoso";+import { Loader } from "../../../components/loader";+import { showToast } from "../../../utils/toast";+import { showFilePicker, readFile } from "../../../utils/file-picker";++const ThemesClient = ThemesTRPC.createClient({+ links: [+ httpBatchLink({+ url: THEME_SERVER_URL+ })+ ]+});+const ThemesQueryClient = new QueryClient();++export function ThemesSelector() {+ return (+ <ThemesTRPC.Provider client={ThemesClient} queryClient={ThemesQueryClient}>+ <QueryClientProvider client={ThemesQueryClient}>+ <ThemesList />+ </QueryClientProvider>+ </ThemesTRPC.Provider>+ );+}++const COLOR_SCHEMES = [+ { id: "all", title: "All" },+ { id: "dark", title: "Dark" },+ { id: "light", title: "Light" }+] as const;++function ThemesList() {+ const [searchQuery, setSearchQuery] = useState<string>();+ const [colorScheme, setColorScheme] = useState<"all" | "dark" | "light">(+ "all"+ );++ const [isApplying, setIsApplying] = useState(false);+ const setCurrentTheme = useThemeStore((store) => store.setTheme);+ const user = useUserStore((store) => store.user);+ const darkTheme = useThemeStore((store) => store.darkTheme);+ const lightTheme = useThemeStore((store) => store.lightTheme);+ const isThemeCurrentlyApplied = useThemeStore(+ (store) => store.isThemeCurrentlyApplied+ );+ const filters = [];+ if (searchQuery) filters.push({ type: "term" as const, value: searchQuery });+ if (colorScheme !== "all")+ filters.push({ type: "colorScheme" as const, value: colorScheme });++ const themes = ThemesTRPC.themes.useInfiniteQuery(+ {+ limit: 10,+ compatibilityVersion: THEME_COMPATIBILITY_VERSION,+ filters+ },+ {+ keepPreviousData: true,+ select: (themes) => ({+ pageParams: themes.pageParams,+ pages: themes.pages.map((page) => ({+ nextCursor: page.nextCursor,+ themes: page.themes.filter(+ (theme) => !isThemeCurrentlyApplied(theme.id)+ )+ }))+ }),+ getNextPageParam: (lastPage) => lastPage.nextCursor+ }+ );++ const setTheme = useCallback(+ async (theme: ThemeMetadata) => {+ if (isThemeCurrentlyApplied(theme.id)) return;+ setIsApplying(true);+ try {+ const fullTheme = await ThemesRouter.installTheme.query({+ id: theme.id,+ compatibilityVersion: THEME_COMPATIBILITY_VERSION,+ userId: user?.id+ });+ if (!fullTheme) return;+ setCurrentTheme(fullTheme);+ } catch (e) {+ console.error(e);+ if (e instanceof Error)+ showToast("error", "Failed to install theme. Error: " + e.message);+ } finally {+ setIsApplying(false);+ }+ },+ [isThemeCurrentlyApplied, setCurrentTheme, user?.id]+ );++ return (+ <>+ <Input+ placeholder="Search themes"+ sx={{ mt: 2 }}+ onChange={debounce((e) => setSearchQuery(e.target.value), 500)}+ />+ <Flex sx={{ justifyContent: "space-between", alignItems: "center" }}>+ <Flex sx={{ mt: 2, gap: 1 }}>+ {COLOR_SCHEMES.map((filter) => (+ <Button+ key={filter.id}+ variant="secondary"+ onClick={() => {+ setColorScheme(filter.id);+ }}+ sx={{+ borderRadius: 100,+ minWidth: 50,+ py: 1,+ px: 2,+ flexShrink: 0,+ bg: colorScheme === filter.id ? "shade" : "transparent",+ color: colorScheme === filter.id ? "accent" : "paragraph"+ }}+ >+ {filter.title}+ </Button>+ ))}+ {themes.isLoading && !themes.isInitialLoading ? (+ <Loading color="accent" />+ ) : null}+ </Flex>++ <Flex sx={{ mt: 2, gap: 1 }}>+ <Button+ variant="secondary"+ onClick={async () => {+ const file = await showFilePicker({+ acceptedFileTypes: "application/json"+ });+ if (!file) return;+ const theme = JSON.parse(await readFile(file));+ const { error } = validateTheme(theme);+ if (error) return showToast("error", error);++ if (+ await showThemeDetails({+ ...theme,+ totalInstalls: 0,+ previewColors: getPreviewColors(theme)+ })+ ) {+ setTheme(theme);+ }+ }}+ sx={{+ px: 3,+ flexShrink: 0+ }}+ >+ Load from file+ </Button>+ </Flex>+ </Flex>++ <Box+ sx={{+ ".virtuoso-grid-list": {+ display: "grid",+ gridTemplateColumns: "1fr 1fr",+ gap: 2+ },+ mt: 2+ }}+ >+ {themes.isInitialLoading ? (+ <Loader title={"Loading themes..."} />+ ) : (+ <VirtuosoGrid+ style={{ height: 700 }}+ data={themes.data?.pages.flatMap((a) => a.themes) || []}+ endReached={() =>+ themes.hasNextPage ? themes.fetchNextPage() : null+ }+ components={{+ Header: () => (+ <div className="virtuoso-grid-list">+ <ThemeItem+ theme={{+ ...darkTheme,+ previewColors: getPreviewColors(darkTheme)+ }}+ isApplied={true}+ isApplying={isApplying}+ setTheme={setTheme}+ />+ <ThemeItem+ theme={{+ ...lightTheme,+ previewColors: getPreviewColors(lightTheme)+ }}+ isApplied={true}+ isApplying={isApplying}+ setTheme={setTheme}+ />+ </div>+ )+ }}+ computeItemKey={(_index, item) => item.id}+ itemContent={(_index, theme) => (+ <ThemeItem+ key={theme.id}+ theme={theme}+ isApplied={false}+ isApplying={isApplying}+ setTheme={setTheme}+ />+ )}+ />+ )}+ </Box>+ </>+ );+}++type ThemeItemProps = {+ theme: ThemeMetadata;+ isApplied: boolean;+ isApplying: boolean;+ setTheme: (theme: ThemeMetadata) => Promise<void>;+};+function ThemeItem(props: ThemeItemProps) {+ const { theme, isApplied, isApplying, setTheme } = props;++ return (+ <Flex+ sx={{+ flexDirection: "column",+ flex: 1,+ cursor: "pointer",+ p: 2,+ border: "1px solid transparent",+ borderRadius: "default",+ ":hover": {+ bg: "background-secondary",+ border: "1px solid var(--border)",+ ".set-as-button": { visibility: "visible" }+ }+ }}+ onClick={async () => {+ if (await showThemeDetails(theme)) {+ await setTheme(theme);+ }+ }}+ >+ <ThemePreview theme={theme} />+ <Text variant="title" sx={{ mt: 1 }}>+ {theme.name}+ </Text>+ <Text variant="body">{theme.authors[0].name}</Text>+ <Flex sx={{ justifyContent: "space-between", alignItems: "center" }}>+ <Text variant="subBody">+ {theme.colorScheme === "dark" ? "Dark" : "Light"}+ + {theme.totalInstalls ? `${theme.totalInstalls} installs` : ""}+ </Text>+ {isApplied ? (+ <CheckCircleOutline color="accent" size={20} />+ ) : (+ <Button+ className="set-as-button"+ variant="secondary"+ sx={{ visibility: "hidden", bg: "background" }}+ onClick={(e) => {+ e.stopPropagation();+ setTheme(theme);+ }}+ disabled={isApplying}+ >+ {isApplying ? (+ <Loading color="accent" size={18} />+ ) : (+ `Set as ${theme.colorScheme}`+ )}+ </Button>+ )}+ </Flex>+ </Flex>+ );+}diff --git a/apps/web/src/dialogs/settings/components/tracking-details.tsx b/apps/web/src/dialogs/settings/components/tracking-details.tsxindex b37c13711..690674a90 100644--- a/apps/web/src/dialogs/settings/components/tracking-details.tsx+++ b/apps/web/src/dialogs/settings/components/tracking-details.tsx@@ -33,7 +33,7 @@ export function TrackingDetails() {as="tr"sx={{height: 30,- th: { borderBottom: "1px solid var(--border)" }+ th: { borderBottom: "1px solid var(--separator)" }}}>{[diff --git a/apps/web/src/dialogs/settings/components/user-profile.tsx b/apps/web/src/dialogs/settings/components/user-profile.tsxindex 48d0f6422..a7dad896a 100644--- a/apps/web/src/dialogs/settings/components/user-profile.tsx+++ b/apps/web/src/dialogs/settings/components/user-profile.tsx@@ -58,7 +58,7 @@ export function UserProfile() {sx={{borderRadius: "default",alignItems: "center",- bg: "bgSecondary",+ bg: "var(--background-secondary)",p: 2,mb: 4}}@@ -66,13 +66,13 @@ export function UserProfile() {<Flexvariant="columnCenter"sx={{- bg: "border",+ bg: "shade",mr: 2,size: 60,borderRadius: 80}}>- <User size={30} color="icon" />+ <User size={30} /></Flex><Flex sx={{ flexDirection: "column" }}><Text variant={"title"}>You are not logged in</Text>@@ -88,7 +88,7 @@ export function UserProfile() {sx={{borderRadius: "default",alignItems: "center",- bg: "bgSecondary",+ bg: "var(--background-secondary)",p: 2,mb: 4}}@@ -96,19 +96,19 @@ export function UserProfile() {<Flexvariant="columnCenter"sx={{- bg: "border",+ bg: "shade",mr: 2,size: 60,borderRadius: 80}}>- <User size={30} color="icon" />+ <User size={30} /></Flex><Flex sx={{ flexDirection: "column" }}><Textvariant="subBody"sx={{- color: "primary"+ color: "accent"}}>{remainingDays > 0 && (isPro || isProCancelled)diff --git a/apps/web/src/dialogs/settings/index.tsx b/apps/web/src/dialogs/settings/index.tsxindex bb50f3816..6b5e73c27 100644--- a/apps/web/src/dialogs/settings/index.tsx+++ b/apps/web/src/dialogs/settings/index.tsx@@ -65,6 +65,8 @@ import {import { AppearanceSettings } from "./appearance-settings";import { debounce } from "@notesnook/common";import { SubscriptionSettings } from "./subscription-settings";+import { alpha } from "@theme-ui/color";+import { ScopedThemeProvider } from "../../components/theme-provider";type SettingsDialogProps = { onClose: Perform };@@ -169,9 +171,8 @@ const SettingsGroups = [// can appear independent of others (e.g. as a search result)export default function SettingsDialog(props: SettingsDialogProps) {- const [route, setRoute] = useState<SectionKeys>("profile");const [activeSettings, setActiveSettings] = useState<SettingsGroup[]>(- SettingsGroups.filter((g) => g.section === route)+ SettingsGroups.filter((g) => g.section === "profile"));return (@@ -185,37 +186,75 @@ export default function SettingsDialog(props: SettingsDialogProps) {<Flexsx={{height: "80vw",- overflow: "hidden",- "& #settings-side-menu": {- "@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none))":- {- backgroundColor: "bgTransparent",- backdropFilter: "blur(8px)"- }- }+ overflow: "hidden"}}>+ <SettingsSideBar+ onNavigate={(settings) => setActiveSettings(settings)}+ /><FlexScrollContainer- id="settings-side-menu"style={{display: "flex",+ backgroundColor: "var(--background)",+ flex: 1,flexDirection: "column",- borderRadius: "10px",- width: 240,- overflow: "auto",+ padding: 20,+ gap: 20,minHeight: "min-content",- backgroundColor: "bgSecondary"+ overflow: "auto"+ }}+ >+ {activeSettings.map((group) => (+ <SettingsGroupComponent item={group} />+ ))}+ </FlexScrollContainer>+ </Flex>+ </Dialog>+ );+}++type SettingsSideBarProps = { onNavigate: (settings: SettingsGroup[]) => void };+function SettingsSideBar(props: SettingsSideBarProps) {+ const { onNavigate } = props;+ const [route, setRoute] = useState<SectionKeys>("profile");++ return (+ <FlexScrollContainer+ id="settings-side-menu"+ style={{+ width: 240,+ overflow: "auto"+ }}+ data-test-id="settings-navigation-menu"+ >+ <ScopedThemeProvider scope="navigationMenu">+ <Flex+ sx={{+ flexDirection: "column",+ display: "flex",+ overflow: "hidden",+ "@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none))":+ {+ backgroundColor: alpha("background", 0.6),+ backdropFilter: "blur(8px)"+ },+ backgroundColor: "var(--background-secondary)"}}- data-test-id="settings-navigation-menu"><Inputplaceholder="Search"data-test-id="settings-search"- sx={{ m: 2, mb: 2, width: "auto", bg: "bgSecondary", py: "7px" }}+ sx={{+ m: 2,+ mb: 2,+ width: "auto",+ bg: "background",+ py: "7px"+ }}onChange={(e) => {const query = e.target.value.toLowerCase().trim();if (!query)- return setActiveSettings(+ return onNavigate(SettingsGroups.filter((g) => g.section === route));@@ -249,7 +288,7 @@ export default function SettingsDialog(props: SettingsDialogProps) {if (!settings.length) continue;groups.push({ ...group, settings });}- setActiveSettings(groups);+ onNavigate(groups);}}/>{sectionGroups.map((group) => (@@ -258,7 +297,7 @@ export default function SettingsDialog(props: SettingsDialogProps) {variant={"subBody"}sx={{fontWeight: "bold",- color: "text",+ color: "paragraph",mx: 3,mb: 1}}@@ -274,7 +313,7 @@ export default function SettingsDialog(props: SettingsDialogProps) {title={section.title}selected={section.key === route}onClick={() => {- setActiveSettings(+ onNavigate(SettingsGroups.filter((g) => g.section === section.key)@@ -286,25 +325,9 @@ export default function SettingsDialog(props: SettingsDialogProps) {)}</Flex>))}- </FlexScrollContainer>- <FlexScrollContainer- style={{- display: "flex",- backgroundColor: "var(--background)",- flex: 1,- flexDirection: "column",- padding: 20,- gap: 20,- minHeight: "min-content",- overflow: "auto"- }}- >- {activeSettings.map((group) => (- <SettingsGroupComponent item={group} />- ))}- </FlexScrollContainer>- </Flex>- </Dialog>+ </Flex>+ </ScopedThemeProvider>+ </FlexScrollContainer>);}@@ -333,7 +356,7 @@ function SettingsGroupComponent(props: { item: SettingsGroup }) {fontSize: 11,fontWeight: "bold",letterSpacing: 0.3,- color: "primary"+ color: "accent"}}>{item.header.toUpperCase()}@@ -384,7 +407,7 @@ function SettingItem(props: { item: Setting }) {sx={{flexDirection: "column",pb: 4,- borderBottom: "1px solid var(--border)"+ borderBottom: "1px solid var(--separator)"}}data-test-id={`setting-${item.key}`}>@@ -401,7 +424,7 @@ function SettingItem(props: { item: Setting }) {{item.description && (<Textvariant={"body"}- sx={{ mt: 1, color: "fontTertiary", whiteSpace: "pre-wrap" }}+ sx={{ mt: 1, color: "paragraph", whiteSpace: "pre-wrap" }}>{typeof item.description === "function"? item.description(state)@@ -439,7 +462,7 @@ function SettingItem(props: { item: Setting }) {case "toggle":return (<Switch- sx={{ m: 0 }}+ sx={{ m: 0, background: "accent" }}disabled={isWorking}onChange={() => workWithLoading(component.toggle)}checked={component.isToggled()}@@ -449,11 +472,11 @@ function SettingItem(props: { item: Setting }) {return (<selectstyle={{- backgroundColor: "var(--bgSecondary)",+ backgroundColor: "var(--background-secondary)",outline: "none",- border: "1px solid var(--border)",+ border: "1px solid var(--border-secondary)",borderRadius: "5px",- color: "var(--text)",+ color: "var(--paragraph)",padding: "5px"}}value={component.selectedOption()}diff --git a/apps/web/src/dialogs/theme-details-dialog.tsx b/apps/web/src/dialogs/theme-details-dialog.tsxnew file mode 100644index 000000000..6bcee74e0--- /dev/null+++ b/apps/web/src/dialogs/theme-details-dialog.tsx@@ -0,0 +1,99 @@+/*+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 { Perform } from "../common/dialog-controller";+import Dialog from "../components/dialog";+import { ThemeMetadata } from "@notesnook/themes-server";+import { ThemePreview } from "../components/theme-preview";+import { Flex, Link, Text } from "@theme-ui/components";+import { useStore as useThemeStore } from "../stores/theme-store";++export type ThemeDetailsDialogProps = {+ onClose: Perform<boolean>;+ theme: ThemeMetadata;+};++function ThemeDetailsDialog(props: ThemeDetailsDialogProps) {+ const { onClose, theme } = props;+ const isThemeCurrentlyApplied = useThemeStore(+ (store) => store.isThemeCurrentlyApplied+ );++ return (+ <Dialog+ isOpen={true}+ onClose={() => onClose(false)}+ positiveButton={{+ text: `Set as default`,+ onClick: () => onClose(true),+ disabled: isThemeCurrentlyApplied(theme.id)+ }}+ negativeButton={{+ text: "Close",+ onClick: () => onClose(false)+ }}+ >+ <ThemePreview theme={theme} />+ <Flex sx={{ flexDirection: "column", mt: 2 }}>+ <Text variant="heading">+ {theme.name}{" "}+ <Text variant="subBody" sx={{ fontSize: "subtitle" }}>+ v{theme.version}+ </Text>+ </Text>+ <Text variant="body" sx={{ fontSize: "title" }}>+ {theme.description}+ </Text>+ <Text variant="subBody" sx={{ fontSize: "subtitle" }}>+ {theme.authors.map((author) => author.name).join(", ")}+ </Text>+ {theme.totalInstalls && (+ <Text variant="subBody" sx={{ fontSize: "subtitle" }}>+ {theme.totalInstalls} installs+ </Text>+ )}+ <Text variant="subBody" sx={{ fontSize: "subtitle" }}>+ Licensed under {theme.license}+ </Text>+ <Flex sx={{ gap: 1, mt: 1 }}>+ <Link+ href={theme.homepage}+ target="_blank"+ variant="text.subBody"+ sx={{ fontSize: "subtitle", color: "accent" }}+ >+ Website+ </Link>+ {theme.sourceURL && (+ <Link+ href={theme.sourceURL}+ target="_blank"+ variant="text.subBody"+ sx={{ fontSize: "subtitle", color: "accent" }}+ >+ Source+ </Link>+ )}+ </Flex>+ </Flex>+ </Dialog>+ );+}++export default ThemeDetailsDialog;diff --git a/apps/web/src/hooks/use-auto-updater.ts b/apps/web/src/hooks/use-auto-updater.tsindex 22e2b446d..28fa374e2 100644--- a/apps/web/src/hooks/use-auto-updater.ts+++ b/apps/web/src/hooks/use-auto-updater.ts@@ -26,7 +26,7 @@ type CompletedUpdateStatus = { type: "completed"; version: string };type DownloadingUpdateStatus = { type: "downloading"; progress: number };type AvailableUpdateStatus = { type: "available"; version: string };type GenericUpdateStatus = { type: "checking" | "updated" };-type UpdateStatus =+export type UpdateStatus =| AvailableUpdateStatus| CompletedUpdateStatus| DownloadingUpdateStatusdiff --git a/apps/web/src/hooks/use-menu.js b/apps/web/src/hooks/use-menu.jsdeleted file mode 100644index d839e970e..000000000--- a/apps/web/src/hooks/use-menu.js+++ /dev/null@@ -1,257 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import { create } from "zustand";-import { shallow } from "zustand/shallow";-import { isUserPremium } from "./use-is-user-premium";--const mousePosition = { x: 0, y: 0, actualX: 0, actualY: 0 };-window.addEventListener("mousemove", (e) => {- const { x, y, actualX, actualY } = getMousePosition(e);- mousePosition.x = x;- mousePosition.y = y;- mousePosition.actualX = actualX;- mousePosition.actualY = actualY;-});--const useMenuStore = create((set) => ({- isOpen: false,- items: [],- title: undefined,- data: undefined,- open: (items, data) =>- set(() => ({ isOpen: true, items: mapMenuItems(items, data), data })),- close: () =>- set(() => ({- isOpen: false,- items: [],- data: undefined,- title: undefined- }))-}));--export function useMenuTrigger() {- const isOpen = useMenuStore((store) => store.isOpen);- const target = useMenuStore((store) => store.data?.target);- const [open, close] = useMenuStore(- (store) => [store.open, store.close],- shallow- );-- return {- openMenu: open,- closeMenu: close,- isOpen,- target- };-}--export const Menu = {- openMenu: (items, data) => useMenuStore.getState().open(items, data),- closeMenu: () => useMenuStore.getState().close(),- isOpen: () => useMenuStore.getState().isOpen,- target: () => useMenuStore.getState().target-};--export function useMenu() {- const [items, data] = useMenuStore((store) => [store.items, store.data]);- return { items, data };-}--/**- *- * @param {HTMLElement} element- * @param {"mouse"|HTMLElement} relativeTo- * @param {"right"|"below"|"left"|"top"} location- * @returns- */-export function getPosition(element, positionOptions) {- const {- relativeTo = "mouse",- absolute = false,- location = undefined,- yOffset = 0- } = positionOptions || {};-- const { x, y, width, height, actualX, actualY } =- relativeTo === "mouse"- ? mousePosition- : getElementPosition(relativeTo, absolute);-- const elementWidth = element.offsetWidth;- const elementHeight = element.offsetHeight;-- const windowWidth = window.innerWidth;- const windowHeight = window.innerHeight - 20;-- let position = { top: undefined, left: undefined };-- if (windowWidth - actualX < elementWidth) {- const xDiff = actualX - x;- position.left = windowWidth - elementWidth;- position.left -= xDiff;- } else {- position.left = x;- if (location === "right") position.left += width;- else if (location === "left") position.left -= width;- }-- if (windowHeight - actualY < elementHeight) {- const yDiff = actualY - y;- position.top = windowHeight - elementHeight;- position.top -= yDiff;- } else {- position.top = y;- if (location === "below") position.top += height;- else if (location === "top") position.top -= height;- }-- position.top = position.top < 0 ? 0 : position.top;- position.left = position.left < 0 ? 0 : position.left;- position.top += yOffset;-- // Adjust menu height- if (elementHeight > windowHeight - position.top) {- element.style.maxHeight = `${windowHeight - 20}px`;- }-- return position;-}--function getMousePosition(e) {- var posx = 0;- var posy = 0;-- if (!e) e = window.event;-- if (e.pageX || e.pageY) {- posx = e.pageX;- posy = e.pageY;- } else if (e.clientX || e.clientY) {- posx =- e.clientX +- document.body.scrollLeft +- document.documentElement.scrollLeft;- posy =- e.clientY + document.body.scrollTop + document.documentElement.scrollTop;- }-- return {- x: posx,- y: posy,- actualY: posy,- actualX: posx- };-}--/**- *- * @param {HTMLElement} element- */-function getElementPosition(element, absolute) {- const rect = element.getBoundingClientRect();- const position = {- x: element.offsetLeft,- y: element.offsetTop,- width: rect.width,- height: rect.height,- actualY: rect.y,- actualX: rect.x- };- if (absolute) {- position.x = position.actualX;- position.y = position.actualY;- }- return position;-}--function mapMenuItems(items, data) {- return items.reduce((prev, item) => {- const {- key,- onClick: _onClick,- color,- disabled,- hidden,- checked,- isPro,- isNew,- type,- iconColor,- modifier- } = item;-- const isHidden = hidden && hidden(data, item);- if (isHidden) return prev;-- const isSeperator = type === "separator";- if (isSeperator) {- prev.push({ type });- return prev;- }-- const title = resolveProp(item.title, data, item);- const icon = resolveProp(item.icon, data, item);- const isChecked = resolveProp(checked, data, item);- const isDisabled = resolveProp(disabled, data, item);- const items = resolveProp(item.items, data, item);- const onClick =- typeof _onClick === "function" && _onClick.bind(this, data, item);-- const tooltip = isDisabled || item.tooltip || title;- const isPremium = isPro && !isUserPremium();- const hasSubmenu = items?.length > 0;-- const menuItem = {- type,- title,- key,- onClick,- tooltip,-- isChecked,- isDisabled,- isHidden,- hasSubmenu,- isNew,- isPremium,-- icon,- color,- iconColor,-- modifier: modifier?.join("+")- };-- if (hasSubmenu)- menuItem.items = mapMenuItems(items, { ...data, parent: menuItem });-- prev.push(menuItem);-- return prev;- }, []);-}--function resolveProp(prop, data, item) {- const isFunction = typeof prop === "function";- if (isFunction) {- return prop.isReactComponent ? prop : prop(data, item);- }- return prop;-}diff --git a/apps/web/src/hooks/use-menu.ts b/apps/web/src/hooks/use-menu.tsnew file mode 100644index 000000000..d8eff60a4--- /dev/null+++ b/apps/web/src/hooks/use-menu.ts@@ -0,0 +1,86 @@+/*+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 { create } from "zustand";+import { shallow } from "zustand/shallow";+import { MenuItem, PositionOptions } from "@notesnook/ui";+// import { isUserPremium } from "./use-is-user-premium";++type MenuOptions = {+ position?: PositionOptions;+ blocking?: boolean;+ title?: string;+};+type MenuStore = {+ isOpen: boolean;+ items: MenuItem[];+ title?: string;+ options: MenuOptions;+ open: (items: MenuItem[], option?: MenuOptions) => void;+ close: () => void;+};++const useMenuStore = create<MenuStore>((set) => ({+ isOpen: false,+ items: [],+ title: undefined,+ options: {+ blocking: false+ },+ open: (items, options) => set(() => ({ isOpen: true, items, options })),+ close: () =>+ set(() => ({+ isOpen: false,+ items: [],+ data: undefined,+ title: undefined+ }))+}));++export function useMenuTrigger() {+ const isOpen = useMenuStore((store) => store.isOpen);+ const target = useMenuStore((store) => store.options?.position?.target);+ const [open, close] = useMenuStore(+ (store) => [store.open, store.close],+ shallow+ );++ return {+ openMenu: open,+ closeMenu: close,+ isOpen,+ target+ };+}++export const Menu = {+ openMenu: (items: MenuItem[], options?: MenuOptions) =>+ useMenuStore.getState().open(items, options),+ closeMenu: () => useMenuStore.getState().close(),+ isOpen: () => useMenuStore.getState().isOpen,+ target: () => useMenuStore.getState().options?.position?.target+};++export function useMenu() {+ const [items, options] = useMenuStore((store) => [+ store.items,+ store.options+ ]);+ return { items, options };+}diff --git a/apps/web/src/stores/note-store.js b/apps/web/src/stores/note-store.jsindex 077b39006..763dad13c 100644--- a/apps/web/src/stores/note-store.js+++ b/apps/web/src/stores/note-store.js@@ -24,9 +24,7 @@ import { store as appStore } from "./app-store";import { store as selectionStore } from "./selection-store";import Vault from "../common/vault";import BaseStore from ".";-import { EV, EVENTS } from "@notesnook/core/common";import Config from "../utils/config";-import { hashNavigate } from "../navigation";import { groupArray } from "@notesnook/core/utils/grouping";/**@@ -35,10 +33,10 @@ import { groupArray } from "@notesnook/core/utils/grouping";class NoteStore extends BaseStore {notes = [];/**- * @type {{ type: "tag" | "color" | "notebook" | "topic" | "favorite" | "monographs", notes: any[] } | undefined}+ * @type {import("../components/list-container/types").Context | undefined}*/context = undefined;- selectedNote = 0;+ selectedNote = "";nonce = 0;viewMode = Config.get("notes:viewMode", "detailed");diff --git a/apps/web/src/stores/theme-store.js b/apps/web/src/stores/theme-store.jsindex bfc522b5e..2bbdfa067 100644--- a/apps/web/src/stores/theme-store.js+++ b/apps/web/src/stores/theme-store.js@@ -20,8 +20,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import createStore from "../common/store";import BaseStore from "./index";import Config from "../utils/config";-import { getDefaultAccentColor } from "@notesnook/theme";import { desktop } from "../common/desktop-bridge";+import {+ THEME_COMPATIBILITY_VERSION,+ ThemeDark,+ ThemeLight+} from "@notesnook/theme";+import { ThemesRouter } from "../common/themes-router";/*** @extends {BaseStore<ThemeStore>}@@ -30,29 +35,54 @@ class ThemeStore extends BaseStore {/*** @type {"dark" | "light"}*/- theme = Config.get("theme", "light");- accent = Config.get("accent", getDefaultAccentColor());+ colorScheme = Config.get("colorScheme", "light");+ darkTheme = getTheme("dark");+ lightTheme = getTheme("light");followSystemTheme = Config.get("followSystemTheme", false);+ init = async () => {+ const { darkTheme, lightTheme } = this.get();+ this.set({+ darkTheme: await updateTheme(darkTheme),+ lightTheme: await updateTheme(lightTheme)+ });+ };++ /**+ * @param {import("@notesnook/theme").ThemeDefinition} theme+ */setTheme = async (theme) => {- if (!this.get().followSystemTheme)- await desktop?.integration.changeTheme.mutate(theme);- this.set((state) => (state.theme = theme));- Config.set("theme", theme);+ Config.set(`theme:${theme.colorScheme}`, theme);+ this.set({+ [getKey(theme)]: theme,+ colorScheme: theme.colorScheme+ });};- toggleNightMode = () => {- const theme = this.get().theme;- this.setTheme(theme === "dark" ? "light" : "dark");+ setColorScheme = async (colorScheme) => {+ if (!this.get().followSystemTheme)+ await desktop?.integration.changeTheme.mutate(colorScheme);+ const theme = getTheme(colorScheme);+ this.set({+ colorScheme,+ theme+ });+ Config.set("colorScheme", colorScheme);++ updateTheme(theme).then((theme) =>+ this.set({+ [getKey(theme)]: theme+ })+ );};- setAccent = (accent) => {- this.set((state) => (state.accent = accent));- Config.set("accent", accent);+ toggleColorScheme = () => {+ const theme = this.get().colorScheme;+ this.setColorScheme(theme === "dark" ? "light" : "dark");};setFollowSystemTheme = async (followSystemTheme) => {- this.set((state) => (state.followSystemTheme = followSystemTheme));+ this.set({ followSystemTheme });Config.set("followSystemTheme", followSystemTheme);await desktop?.integration.changeTheme.mutate(followSystemTheme ? "system" : "light"@@ -63,7 +93,36 @@ class ThemeStore extends BaseStore {const followSystemTheme = this.get().followSystemTheme;this.setFollowSystemTheme(!followSystemTheme);};++ isThemeCurrentlyApplied = (id) => {+ return this.get().darkTheme.id === id || this.get().lightTheme.id === id;+ };}const [useStore, store] = createStore(ThemeStore);export { useStore, store };++function getKey(theme) {+ return theme.colorScheme === "dark" ? "darkTheme" : "lightTheme";+}++function getTheme(colorScheme) {+ return colorScheme === "dark"+ ? Config.get("theme:dark", ThemeDark)+ : Config.get("theme:light", ThemeLight);+}++async function updateTheme(theme) {+ const { id, version } = theme;+ try {+ const updatedTheme = await ThemesRouter.updateTheme.query({+ compatibilityVersion: THEME_COMPATIBILITY_VERSION,+ id,+ version+ });+ if (!updatedTheme) return theme;+ return updatedTheme;+ } catch (e) {+ return theme;+ }+}diff --git a/apps/web/src/utils/file-picker.ts b/apps/web/src/utils/file-picker.tsnew file mode 100644index 000000000..fdb9706fd--- /dev/null+++ b/apps/web/src/utils/file-picker.ts@@ -0,0 +1,49 @@+/*+This file is part of the Notesnook project (https://notesnook.com/)++Copyright (C) 2023 Streetwriters (Private) Limited++This program is free software: you can redistribute it and/or modify+it under the terms of the GNU General Public License as published by+the Free Software Foundation, either version 3 of the License, or+(at your option) any later version.++This program is distributed in the hope that it will be useful,+but WITHOUT ANY WARRANTY; without even the implied warranty of+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+GNU General Public License for more details.++You should have received a copy of the GNU General Public License+along with this program. If not, see <http://www.gnu.org/licenses/>.+*/++type FilePickerOptions = { acceptedFileTypes: string };++export function showFilePicker({+ acceptedFileTypes+}: FilePickerOptions): Promise<File | undefined> {+ return new Promise((resolve) => {+ const input = document.createElement("input");+ input.setAttribute("type", "file");+ input.setAttribute("accept", acceptedFileTypes);+ input.dispatchEvent(new MouseEvent("click"));+ input.onchange = async function () {+ if (!input.files) return resolve(undefined);+ const file = input.files[0];+ if (!file) return resolve(undefined);+ resolve(file);+ };+ });+}++export async function readFile(file: File): Promise<string> {+ const reader = new FileReader();+ return await new Promise<string>((resolve, reject) => {+ reader.addEventListener("load", (event) => {+ const text = event.target?.result as string;+ if (!text) return reject("FileReader failed to load file.");+ resolve(text);+ });+ reader.readAsText(file);+ });+}diff --git a/apps/web/src/utils/toast.tsx b/apps/web/src/utils/toast.tsxindex 8d015d60e..752613da9 100644--- a/apps/web/src/utils/toast.tsx+++ b/apps/web/src/utils/toast.tsx@@ -18,17 +18,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { Button, Flex, Text } from "@theme-ui/components";-import ThemeProvider from "../components/theme-provider";+import { ScopedThemeProvider } from "../components/theme-provider";import { Error, Warn, Success, Info } from "../components/icons";import { store as appstore } from "../stores/app-store";import toast from "react-hot-toast";-import { Theme } from "@notesnook/theme";type ToastType = "success" | "error" | "warn" | "info";type ToastAction = {text: string;onClick: () => void;- type?: "primary" | "text";+ type?: "accent" | "paragraph";+};++const ToastIcons = {+ error: Error,+ success: Success,+ warn: Warn,+ info: Info};function showToast(@@ -39,22 +45,9 @@ function showToast(): { hide: () => void } {if (appstore.get().isFocusMode) return { hide: () => {} }; // TODO- const IconComponent =- type === "error"- ? Error- : type === "success"- ? Success- : type === "warn"- ? Warn- : Info;-- const RenderedIcon = () => (- <IconComponent size={24} color={type as keyof Theme["colors"]} />- );-const id = toast(<ToastContainer message={message} actions={actions} />, {duration: hideAfter || Infinity,- icon: <RenderedIcon />,+ icon: <ToastIcon type={type} />,id: message,position: "bottom-right",style: {@@ -73,7 +66,7 @@ type ToastContainerProps = {function ToastContainer(props: ToastContainerProps) {const { message, actions } = props;return (- <ThemeProvider>+ <ScopedThemeProvider><Flexbg={"background"}data-test-id="toast"@@ -87,22 +80,19 @@ function ToastContainer(props: ToastContainerProps) {data-test-id="toast-message"variant="body"mr={2}- sx={{ fontSize: "body", color: "text" }}+ sx={{ fontSize: "body", color: "paragraph" }}>{message}</Text>{actions?.map((action) => (<Button- variant="primary"- bg={"transparent"}+ variant="dialog"sx={{py: "7px",- ":hover": { bg: "bgSecondary" },m: 0,flexShrink: 0,fontSize: "body",- fontWeight: "bold",- color: action.type || "primary"+ color: action.type || "accent"}}key={action.text}onClick={action.onClick}@@ -111,8 +101,18 @@ function ToastContainer(props: ToastContainerProps) {</Button>))}</Flex>- </ThemeProvider>+ </ScopedThemeProvider>);}export { showToast };++function ToastIcon({ type }: { type: ToastType }) {+ const IconComponent = ToastIcons[type];+ return (+ <IconComponent+ size={24}+ color={type === "info" ? "blue" : `var(--icon-${type})`}+ />+ );+}diff --git a/apps/web/src/utils/web-extension-server.ts b/apps/web/src/utils/web-extension-server.tsindex 2c6fbc68c..db1e6c634 100644--- a/apps/web/src/utils/web-extension-server.ts+++ b/apps/web/src/utils/web-extension-server.ts@@ -25,19 +25,19 @@ import {Clip} from "@notesnook/web-clipper/dist/common/bridge";import { isUserPremium } from "../hooks/use-is-user-premium";-import { store as themestore } from "../stores/theme-store";import { store as appstore } from "../stores/app-store";import { h } from "./html";import { sanitizeFilename } from "@notesnook/common";import { attachFile } from "../components/editor/picker";import { getFormattedDate } from "@notesnook/common";+import { getTheme } from "../hooks/use-theme";export class WebExtensionServer implements Server {async login() {const user = await db.user?.getUser();- const { theme, accent } = themestore.get();- if (!user) return { pro: false, theme, accent };- return { email: user.email, pro: isUserPremium(user), theme, accent };+ const theme = getTheme();+ if (!user) return { pro: false, theme };+ return { email: user.email, pro: isUserPremium(user), theme };}async getNotes(): Promise<ItemReference[] | undefined> {diff --git a/apps/web/src/views/all-notes.tsx b/apps/web/src/views/all-notes.tsxindex 90e8caa97..d6c1ba644 100644--- a/apps/web/src/views/all-notes.tsx+++ b/apps/web/src/views/all-notes.tsx@@ -49,7 +49,7 @@ function Home() {return (<ListContainertype="home"- groupType="home"+ groupingKey="home"compact={isCompact}refresh={refresh}items={notes}diff --git a/apps/web/src/views/auth.tsx b/apps/web/src/views/auth.tsxindex 1d4415ff9..bdf009740 100644--- a/apps/web/src/views/auth.tsx+++ b/apps/web/src/views/auth.tsx@@ -22,7 +22,6 @@ import { Button, Flex, Link, Text } from "@theme-ui/components";import {CheckCircle,Loading,- Error as ErrorIcon,MfaAuthenticator,MfaSms,MfaEmail,@@ -35,7 +34,7 @@ import { store as userstore } from "../stores/user-store";import { db } from "../common/db";import Config from "../utils/config";import useDatabase from "../hooks/use-database";-import Loader from "../components/loader";+import { Loader } from "../components/loader";import { showToast } from "../utils/toast";import AuthContainer from "../components/auth-container";@@ -45,6 +44,7 @@ import {showLoadingDialog,showLogoutConfirmation} from "../common/dialog-controller";+import { ErrorText } from "../components/error-text";type EmailFormData = {email: string;@@ -301,7 +301,7 @@ function LoginPassword(props: BaseAuthComponentProps<"login:password">) {mt={2}variant="anchor"onClick={() => navigate("recover", { email: formData.email })}- sx={{ color: "text", alignSelf: "end" }}+ sx={{ color: "paragraph", alignSelf: "end" }}>Forgot password?</Button>@@ -374,7 +374,7 @@ function Signup(props: BaseAuthComponentProps<"signup">) {target="_blank"rel="noreferrer"href="https://notesnook.com/tos"- sx={{ color: "primary" }}+ sx={{ color: "accent" }}>Terms of Service</Link>{" "}@@ -382,7 +382,7 @@ function Signup(props: BaseAuthComponentProps<"signup">) {<Linkrel="noreferrer"href="https://notesnook.com/privacy"- sx={{ color: "primary" }}+ sx={{ color: "accent" }}>Privacy Policy</Link>@@ -417,7 +417,7 @@ function SessionExpiry(props: BaseAuthComponentProps<"sessionExpiry">) {title="Your session has expired"subtitle={<Flex bg="shade" p={1} sx={{ borderRadius: "default" }}>- <Text as="span" sx={{ fontSize: "body", color: "primary" }}>+ <Text as="span" sx={{ fontSize: "body", color: "accent" }}><b>All your local changes are safe and will be synced after youlogin.@@ -460,22 +460,20 @@ function SessionExpiry(props: BaseAuthComponentProps<"sessionExpiry">) {mt={2}variant="anchor"onClick={() => user && navigate("recover", { email: user.email })}- sx={{ color: "text", alignSelf: "end" }}+ sx={{ color: "paragraph", alignSelf: "end" }}>Forgot password?</Button><SubmitButton text="Relogin to your account" />-<Buttontype="button"variant="anchor"sx={{mt: 5,- color: "error",+ color: "var(--paragraph-error)",textDecoration: "none",":hover": {- color: "error",- opacity: 0.8+ color: "var(--paragraph-error)"}}}onClick={async () => {@@ -533,8 +531,8 @@ function AccountRecovery(props: BaseAuthComponentProps<"recover">) {{success ? (<><Flex bg="background" p={2} mt={2} sx={{ borderRadius: "default" }}>- <CheckCircle size={20} color="primary" />- <Text variant="body" ml={2} sx={{ color: "primary" }}>+ <CheckCircle size={20} color="accent" />+ <Text variant="body" ml={2} sx={{ color: "accent" }}>{success}</Text></Flex>@@ -699,7 +697,7 @@ function MFACode(props: BaseAuthComponentProps<"mfa:code">) {mt={4}variant={"anchor"}onClick={() => navigate("mfa:select", formData)}- sx={{ color: "text" }}+ sx={{ color: "paragraph" }}>{texts.selector}</Button>@@ -763,7 +761,7 @@ function MFASelector(props: BaseAuthComponentProps<"mfa:select">) {sx={{":first-of-type": { mt: 2 },display: "flex",- bg: "bgSecondary",+ bg: "background",alignSelf: "stretch",alignItems: "center",textAlign: "left",@@ -780,7 +778,7 @@ function MFASelector(props: BaseAuthComponentProps<"mfa:select">) {mr: 2}}size={16}- color={selected === index ? "primary" : "text"}+ color={selected === index ? "accent" : "icon"}/><Text variant={"title"} sx={{ fontWeight: "body" }}>{method.title}@@ -793,7 +791,7 @@ function MFASelector(props: BaseAuthComponentProps<"mfa:select">) {disabled={!isAppLoaded}loading={!isAppLoaded}/> */}- {/* <Button type="button" mt={4} variant={"anchor"} sx={{color: "text"}}>+ {/* <Button type="button" mt={4} variant={"anchor"} sx={{color: "paragraph"}}>Don't have access to your {mfaMethodToPhrase(formData.primaryMethod)}?</Button> */}</AuthForm>@@ -867,7 +865,11 @@ export function AuthForm<T extends AuthRoutes>(props: AuthFormProps<T>) {variant="body"mt={2}mb={35}- sx={{ fontSize: "title", textAlign: "center", color: "fontTertiary" }}+ sx={{+ fontSize: "title",+ textAlign: "center",+ color: "var(--paragraph-secondary)"+ }}>{subtitle}</Text>@@ -878,11 +880,8 @@ export function AuthForm<T extends AuthRoutes>(props: AuthFormProps<T>) {variant="anchor"sx={{mt: 5,- color: "text",- textDecoration: "none",- ":hover": {- color: "bgSecondaryText"- }+ color: "paragraph",+ textDecoration: "none"}}onClick={() => {openURL("/notes/");@@ -892,14 +891,7 @@ export function AuthForm<T extends AuthRoutes>(props: AuthFormProps<T>) {</Button>)}- {error && (- <Flex bg="errorBg" p={1} mt={5} sx={{ borderRadius: "default" }}>- <ErrorIcon size={15} color="error" />- <Text variant="error" ml={1}>- {error}- </Text>- </Flex>- )}+ <ErrorText error={error} mt={5} /></Flex>);}@@ -920,10 +912,9 @@ function SubtitleWithAction(props: SubtitleWithActionProps) {variant="anchor"sx={{textDecoration: "underline",- ":hover": { color: "dimPrimary" },fontWeight: "bold",fontSize: "subtitle",- color: "text",+ color: "paragraph",cursor: "pointer"}}onClick={props.action.onClick}@@ -995,7 +986,7 @@ export function SubmitButton(props: SubmitButtonProps) {data-test-id="submitButton"type="submit"mt={50}- variant="primary"+ variant="accent"px={50}sx={{borderRadius: 50,@@ -1006,7 +997,7 @@ export function SubmitButton(props: SubmitButtonProps) {}}disabled={props.disabled}>- {props.loading ? <Loading color="static" /> : props.text}+ {props.loading ? <Loading color="white" /> : props.text}</Button>);}diff --git a/apps/web/src/views/email-confirmed.tsx b/apps/web/src/views/email-confirmed.tsxindex ccdec5b74..f12feb957 100644--- a/apps/web/src/views/email-confirmed.tsx+++ b/apps/web/src/views/email-confirmed.tsx@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import "../app.css";import { useEffect } from "react";import { Flex, Text } from "@theme-ui/components";-import ThemeProvider from "../components/theme-provider";+import { BaseThemeProvider } from "../components/theme-provider";import { ANALYTICS_EVENTS, trackEvent } from "../utils/analytics";import { useQueryParams } from "../navigation";import { MailCheck, Discord, Twitter, Reddit } from "../components/icons";@@ -32,74 +32,74 @@ function EmailConfirmed() {}, [userId]);return (- <ThemeProvider>+ <BaseThemeProvider+ addGlobalStyles+ sx={{+ display: "flex",+ bg: "background",+ flexDirection: "column",+ fontSize: [14, 16, 18],+ height: "100%",+ overflowY: "auto"+ }}+ ><Flex- bg="background"sx={{+ flex: 1,flexDirection: "column",- fontSize: [14, 16, 18],- height: "100%",- overflowY: "auto"+ alignItems: "center",+ justifyContent: "center"}}>- <Flex+ <MailCheck+ sx={{ bg: "shade", borderRadius: 100, p: 5 }}+ size={72}+ color="accent"+ />+ <Text+ variant="heading"+ mt={5}sx={{- flex: 1,- flexDirection: "column",- alignItems: "center",- justifyContent: "center"+ fontSize: "2.5em",+ textAlign: "center",+ fontWeight: "heading"}}>- <MailCheck- sx={{ bg: "shade", borderRadius: 100, p: 5 }}- size={72}- color="primary"- />- <Text- variant="heading"- mt={5}- sx={{- fontSize: "2.5em",- textAlign: "center",- fontWeight: "heading"- }}- >- Huzzah!- </Text>- <Text- variant="heading"- mt={2}- sx={{- fontSize: "1.5em",- textAlign: "center",- fontWeight: "bold",- color: "icon"- }}- >- Your email has been confirmed.- </Text>- <Text- variant="body"- mt={2}- sx={{- wordWrap: "break-word",- fontSize: "1.2em",- textAlign: "center",- color: "fontTertiary"- }}- >- Thank you for choosing end-to-end encrypted note taking.- </Text>- </Flex>- <Flex- bg="bgSecondary"- p={5}- sx={{ flexDirection: "column", justifyContent: "center" }}+ Huzzah!+ </Text>+ <Text+ variant="heading"+ mt={2}+ sx={{+ fontSize: "1.5em",+ textAlign: "center",+ fontWeight: "bold",+ color: "icon"+ }}+ >+ Your email has been confirmed.+ </Text>+ <Text+ variant="body"+ mt={2}+ sx={{+ wordWrap: "break-word",+ fontSize: "1.2em",+ textAlign: "center",+ color: "var(--paragraph-secondary)"+ }}>- <BlogPromoBanner />- </Flex>+ Thank you for choosing end-to-end encrypted note taking.+ </Text>+ </Flex>+ <Flex+ bg="var(--background-secondary)"+ p={5}+ sx={{ flexDirection: "column", justifyContent: "center" }}+ >+ <BlogPromoBanner /></Flex>- </ThemeProvider>+ </BaseThemeProvider>);}export default EmailConfirmed;@@ -143,7 +143,7 @@ function BlogPromoBanner() {wordWrap: "break-word",fontSize: "1em",textAlign: "center",- color: "fontTertiary"+ color: "paragraph"}}>{`Because where's the fun in nookin' alone?`}@@ -168,11 +168,11 @@ function BlogPromoBanner() {sx={{wordWrap: "break-word",textAlign: "center",- color: "fontTertiary"+ color: "paragraph"}}>Use{" "}- <Text as="span" sx={{ fontWeight: "bold", color: "primary" }}>+ <Text as="span" sx={{ fontWeight: "bold", color: "accent" }}>#notesnook</Text>{" "}and get a chance to win free promo codes.diff --git a/apps/web/src/views/notebooks.tsx b/apps/web/src/views/notebooks.tsxindex 01afa5007..cec67b199 100644--- a/apps/web/src/views/notebooks.tsx+++ b/apps/web/src/views/notebooks.tsx@@ -32,7 +32,7 @@ function Notebooks() {<><ListContainertype="notebooks"- groupType="notebooks"+ groupingKey="notebooks"refresh={refresh}items={notebooks}placeholder={<Placeholder context="notebooks" />}diff --git a/apps/web/src/views/notes.tsx b/apps/web/src/views/notes.tsxindex 8b457b440..d35e3e3ba 100644--- a/apps/web/src/views/notes.tsx+++ b/apps/web/src/views/notes.tsx@@ -41,7 +41,7 @@ function Notes() {return (<ListContainertype="notes"- groupType={type}+ groupingKey={type}refresh={refreshContext}compact={isCompact}context={{ ...context, notes: undefined }}diff --git a/apps/web/src/views/recovery.tsx b/apps/web/src/views/recovery.tsxindex 56b9ac3c6..72c8fd81b 100644--- a/apps/web/src/views/recovery.tsx+++ b/apps/web/src/views/recovery.tsx@@ -19,11 +19,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { useEffect, useMemo, useRef, useState } from "react";import { Button, Flex, Text } from "@theme-ui/components";-import { Error as ErrorIcon } from "../components/icons";import { makeURL, useQueryParams } from "../navigation";import { db } from "../common/db";import useDatabase from "../hooks/use-database";-import Loader from "../components/loader";+import { Loader } from "../components/loader";import { showToast } from "../utils/toast";import AuthContainer from "../components/auth-container";import { AuthField, SubmitButton } from "./auth";@@ -31,6 +30,7 @@ import { createBackup, restoreBackupFile, selectBackupFile } from "../common";import { showRecoveryKeyDialog } from "../common/dialog-controller";import Config from "../utils/config";import { EVENTS } from "@notesnook/core/common";+import { ErrorText } from "../components/error-text";type RecoveryMethodType = "key" | "backup" | "reset";type RecoveryMethodsFormData = Record<string, unknown>;@@ -296,7 +296,9 @@ function RecoveryMethods(props: BaseRecoveryComponentProps<"methods">) {":first-of-type": { mt: 2 },display: "flex",flexDirection: "column",- bg: method.isDangerous ? "errorBg" : "bgSecondary",+ bg: method.isDangerous+ ? "var(--background-secondary)"+ : "var(--background-error)",alignSelf: "stretch",// alignItems: "center",textAlign: "left",@@ -306,13 +308,19 @@ function RecoveryMethods(props: BaseRecoveryComponentProps<"methods">) {><Textvariant={"title"}- sx={{ color: method.isDangerous ? "error" : "text" }}+ sx={{+ color: method.isDangerous ? "var(--heading-error)" : "heading"+ }}>{method.title}</Text><Textvariant={"body"}- sx={{ color: method.isDangerous ? "error" : "fontTertiary" }}+ sx={{+ color: method.isDangerous+ ? "var(--paragraph-error)"+ : "var(--paragraph-secondary)"+ }}>{method.description}</Text>@@ -381,7 +389,7 @@ function RecoveryKeyMethod(props: BaseRecoveryComponentProps<"method:key">) {mt={4}variant={"anchor"}onClick={() => navigate("methods")}- sx={{ color: "text" }}+ sx={{ color: "paragraph" }}>{`Don't have your recovery key?`}</Button>@@ -407,19 +415,10 @@ function BackupFileMethod(props: BaseRecoveryComponentProps<"method:backup">) {type="method:backup"title="Recover your account"subtitle={- <Text- variant="body"- sx={{- borderRadius: "default",- color: "error",- bg: "errorBg",- px: 1,- mt: 2- }}- >- All the data in your account will be overwritten with the data in the- backup file. There is no way to reverse this action.- </Text>+ <ErrorText+ sx={{ fontSize: "body" }}+ error="All the data in your account will be overwritten with the data in the backup file. There is no way to reverse this action."+ />}onSubmit={async () => {navigate("new", { backupFile, userResetRequired: true });@@ -447,7 +446,7 @@ function BackupFileMethod(props: BaseRecoveryComponentProps<"method:backup">) {mt={4}variant={"anchor"}onClick={() => navigate("methods")}- sx={{ color: "text" }}+ sx={{ color: "paragraph" }}>{`Don't have a backup file?`}</Button>@@ -655,19 +654,16 @@ export function RecoveryForm<T extends RecoveryRoutes>(variant="body"mt={2}mb={35}- sx={{ fontSize: "title", textAlign: "center", color: "fontTertiary" }}+ sx={{+ fontSize: "title",+ textAlign: "center",+ color: "var(--paragraph-secondary)"+ }}>{subtitle}</Text>{typeof children === "function" ? children(form) : children}- {error && (- <Flex bg="errorBg" p={1} mt={2} sx={{ borderRadius: "default" }}>- <ErrorIcon size={15} color="error" />- <Text variant="error" ml={1}>- {error}- </Text>- </Flex>- )}+ <ErrorText error={error} /></Flex>);}diff --git a/apps/web/src/views/reminders.tsx b/apps/web/src/views/reminders.tsxindex 940408c09..0adcc7325 100644--- a/apps/web/src/views/reminders.tsx+++ b/apps/web/src/views/reminders.tsx@@ -32,7 +32,7 @@ function Reminders() {<><ListContainertype="reminders"- groupType="reminders"+ groupingKey="reminders"refresh={refresh}items={reminders}placeholder={<Placeholder context="reminders" />}diff --git a/apps/web/src/views/tags.tsx b/apps/web/src/views/tags.tsxindex 6ae2a9486..0adad1d27 100644--- a/apps/web/src/views/tags.tsx+++ b/apps/web/src/views/tags.tsx@@ -29,7 +29,7 @@ function Tags() {return (<ListContainertype="tags"- groupType="tags"+ groupingKey="tags"refresh={refresh}items={tags}placeholder={<Placeholder context="tags" />}diff --git a/apps/web/src/views/topics.jsx b/apps/web/src/views/topics.jsxindex 235d559aa..3a3d6edab 100644--- a/apps/web/src/views/topics.jsx+++ b/apps/web/src/views/topics.jsx@@ -110,15 +110,13 @@ function Notebook() {sx={{fontSize: "subBody",textDecoration: "none",- color: "fontTertiary"+ color: "var(--paragraph-secondary)"}}onClick={crumb.onClick}>{crumb.title}</Button>- {index === array.length - 1 ? null : (- <ChevronRight size={18} color="fontTertiary" />- )}+ {index === array.length - 1 ? null : <ChevronRight size={18} />}</>))}</Flex>@@ -140,7 +138,7 @@ function Notebook() {<Flex variant="columnFill" sx={{ height: "100%" }}><ListContainertype="notes"- groupType={"notes"}+ groupingKey={"notes"}refresh={refreshContext}compact={isCompact}context={{ ...context, notes: undefined }}@@ -215,21 +213,17 @@ function Topics({ selectedNotebook, isCollapsed, onClick }) {}}><Flex sx={{ alignItems: "center" }}>- {isCollapsed ? (- <ChevronRight size={16} color="fontTertiary" />- ) : (- <ChevronDown size={16} color="fontTertiary" />- )}+ {isCollapsed ? <ChevronRight size={16} /> : <ChevronDown size={16} />}<Text variant="subBody" sx={{ fontSize: 11 }}>TOPICS</Text></Flex><Flex sx={{ alignItems: "center" }}><Button- variant="tool"+ variant="secondary"data-test-id="topics-sort-button"sx={{- p: "3.5px",+ p: "small",bg: "transparent",visibility: isCollapsed ? "collapse" : "visible"}}@@ -241,7 +235,7 @@ function Topics({ selectedNotebook, isCollapsed, onClick }) {<SortAsc size={15} /></Button><Button- variant="tool"+ variant="secondary"sx={{p: "1px",bg: "transparent",@@ -292,7 +286,7 @@ function NotebookHeader({ notebook }) {<Text variant="heading">{title}</Text><Flex><Button- variant="tool"+ variant="secondary"sx={{ borderRadius: 100, width: 30, height: 30 }}mr={1}p={0}@@ -306,7 +300,7 @@ function NotebookHeader({ notebook }) {)}</Button><Button- variant="tool"+ variant="secondary"sx={{ borderRadius: 100, width: 30, height: 30 }}p={0}title="Edit notebook"diff --git a/apps/web/src/views/trash.tsx b/apps/web/src/views/trash.tsxindex 0ebaf67f8..9c8e9e40a 100644--- a/apps/web/src/views/trash.tsx+++ b/apps/web/src/views/trash.tsx@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { Trash as TrashIcon } from "../components/icons";import ListContainer from "../components/list-container";import { confirm } from "../common/dialog-controller";import { useStore, store } from "../stores/trash-store";@@ -34,7 +33,7 @@ function Trash() {return (<ListContainertype="trash"- groupType="trash"+ groupingKey="trash"refresh={refresh}placeholder={<Placeholder context="trash" />}items={items}diff --git a/extensions/web-clipper/package-lock.json b/extensions/web-clipper/package-lock.jsonindex b3d0e7c2f..f0ecfc125 100644--- a/extensions/web-clipper/package-lock.json+++ b/extensions/web-clipper/package-lock.json@@ -9,7 +9,7 @@"version": "0.2.2","license": "GPL-3.0-or-later","dependencies": {- "@emotion/react": "^11.10.0",+ "@emotion/react": "11.11.1","@hot-loader/react-dom": "^17.0.2","@mdi/js": "^6.9.96","@mdi/react": "^1.6.0",@@ -95,11 +95,22 @@"version": "1.2.0","license": "GPL-3.0-or-later","dependencies": {- "@theme-ui/core": "^0.14.7",- "tinycolor2": "^1.4.2"+ "@emotion/react": "11.11.1",+ "@theme-ui/color": "^0.16.0",+ "@theme-ui/components": "0.14.7",+ "@theme-ui/core": "0.14.7",+ "tinycolor2": "^1.4.2",+ "zustand": "^4.3.8"},"devDependencies": {- "@types/tinycolor2": "^1.4.3"+ "@trpc/server": "^10.31.0",+ "@types/react": "17.0.2",+ "@types/tinycolor2": "^1.4.3",+ "isomorphic-fetch": "^3.0.0",+ "ts-json-schema-generator": "^1.2.0"+ },+ "peerDependencies": {+ "react": "17.0.2"}},"../@notesnook-webextension-utils": {@@ -2149,43 +2160,39 @@}},"node_modules/@emotion/babel-plugin": {- "version": "11.10.5",- "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.10.5.tgz",- "integrity": "sha512-xE7/hyLHJac7D2Ve9dKroBBZqBT7WuPQmWcq7HSGb84sUuP4mlOWoB8dvVfD9yk5DHkU1m6RW7xSoDtnQHNQeA==",+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz",+ "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==","dependencies": {"@babel/helper-module-imports": "^7.16.7",- "@babel/plugin-syntax-jsx": "^7.17.12","@babel/runtime": "^7.18.3",- "@emotion/hash": "^0.9.0",- "@emotion/memoize": "^0.8.0",- "@emotion/serialize": "^1.1.1",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/serialize": "^1.1.2","babel-plugin-macros": "^3.1.0","convert-source-map": "^1.5.0","escape-string-regexp": "^4.0.0","find-root": "^1.1.0","source-map": "^0.5.7",- "stylis": "4.1.3"- },- "peerDependencies": {- "@babel/core": "^7.0.0"+ "stylis": "4.2.0"}},"node_modules/@emotion/cache": {- "version": "11.10.5",- "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.10.5.tgz",- "integrity": "sha512-dGYHWyzTdmK+f2+EnIGBpkz1lKc4Zbj2KHd4cX3Wi8/OWr5pKslNjc3yABKH4adRGCvSX4VDC0i04mrrq0aiRA==",+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz",+ "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==","dependencies": {- "@emotion/memoize": "^0.8.0",- "@emotion/sheet": "^1.2.1",- "@emotion/utils": "^1.2.0",- "@emotion/weak-memoize": "^0.3.0",- "stylis": "4.1.3"+ "@emotion/memoize": "^0.8.1",+ "@emotion/sheet": "^1.2.2",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1",+ "stylis": "4.2.0"}},"node_modules/@emotion/hash": {- "version": "0.9.0",- "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.0.tgz",- "integrity": "sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ=="+ "version": "0.9.1",+ "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz",+ "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ=="},"node_modules/@emotion/is-prop-valid": {"version": "0.8.8",@@ -2201,76 +2208,72 @@"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw=="},"node_modules/@emotion/memoize": {- "version": "0.8.0",- "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz",- "integrity": "sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA=="+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="},"node_modules/@emotion/react": {- "version": "11.10.5",- "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.10.5.tgz",- "integrity": "sha512-TZs6235tCJ/7iF6/rvTaOH4oxQg2gMAcdHemjwLKIjKz4rRuYe1HJ2TQJKnAcRAfOUDdU8XoDadCe1rl72iv8A==",+ "version": "11.11.1",+ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz",+ "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==","dependencies": {"@babel/runtime": "^7.18.3",- "@emotion/babel-plugin": "^11.10.5",- "@emotion/cache": "^11.10.5",- "@emotion/serialize": "^1.1.1",- "@emotion/use-insertion-effect-with-fallbacks": "^1.0.0",- "@emotion/utils": "^1.2.0",- "@emotion/weak-memoize": "^0.3.0",+ "@emotion/babel-plugin": "^11.11.0",+ "@emotion/cache": "^11.11.0",+ "@emotion/serialize": "^1.1.2",+ "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1","hoist-non-react-statics": "^3.3.1"},"peerDependencies": {- "@babel/core": "^7.0.0","react": ">=16.8.0"},"peerDependenciesMeta": {- "@babel/core": {- "optional": true- },"@types/react": {"optional": true}}},"node_modules/@emotion/serialize": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.1.tgz",- "integrity": "sha512-Zl/0LFggN7+L1liljxXdsVSVlg6E/Z/olVWpfxUTxOAmi8NU7YoeWeLfi1RmnB2TATHoaWwIBRoL+FvAJiTUQA==",+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz",+ "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==","dependencies": {- "@emotion/hash": "^0.9.0",- "@emotion/memoize": "^0.8.0",- "@emotion/unitless": "^0.8.0",- "@emotion/utils": "^1.2.0",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/unitless": "^0.8.1",+ "@emotion/utils": "^1.2.1","csstype": "^3.0.2"}},"node_modules/@emotion/sheet": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.1.tgz",- "integrity": "sha512-zxRBwl93sHMsOj4zs+OslQKg/uhF38MB+OMKoCrVuS0nyTkqnau+BM3WGEoOptg9Oz45T/aIGs1qbVAsEFo3nA=="+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz",+ "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA=="},"node_modules/@emotion/unitless": {- "version": "0.8.0",- "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz",- "integrity": "sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw=="+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz",+ "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ=="},"node_modules/@emotion/use-insertion-effect-with-fallbacks": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz",- "integrity": "sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A==",+ "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==","peerDependencies": {"react": ">=16.8.0"}},"node_modules/@emotion/utils": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.0.tgz",- "integrity": "sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw=="+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz",+ "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg=="},"node_modules/@emotion/weak-memoize": {- "version": "0.3.0",- "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz",- "integrity": "sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg=="+ "version": "0.3.1",+ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz",+ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww=="},"node_modules/@eslint/eslintrc": {"version": "1.2.3",@@ -19334,9 +19337,9 @@}},"node_modules/stylis": {- "version": "4.1.3",- "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.1.3.tgz",- "integrity": "sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA=="+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",+ "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="},"node_modules/supports-color": {"version": "5.5.0",@@ -22645,40 +22648,39 @@"dev": true},"@emotion/babel-plugin": {- "version": "11.10.5",- "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.10.5.tgz",- "integrity": "sha512-xE7/hyLHJac7D2Ve9dKroBBZqBT7WuPQmWcq7HSGb84sUuP4mlOWoB8dvVfD9yk5DHkU1m6RW7xSoDtnQHNQeA==",+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz",+ "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==","requires": {"@babel/helper-module-imports": "^7.16.7",- "@babel/plugin-syntax-jsx": "^7.17.12","@babel/runtime": "^7.18.3",- "@emotion/hash": "^0.9.0",- "@emotion/memoize": "^0.8.0",- "@emotion/serialize": "^1.1.1",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/serialize": "^1.1.2","babel-plugin-macros": "^3.1.0","convert-source-map": "^1.5.0","escape-string-regexp": "^4.0.0","find-root": "^1.1.0","source-map": "^0.5.7",- "stylis": "4.1.3"+ "stylis": "4.2.0"}},"@emotion/cache": {- "version": "11.10.5",- "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.10.5.tgz",- "integrity": "sha512-dGYHWyzTdmK+f2+EnIGBpkz1lKc4Zbj2KHd4cX3Wi8/OWr5pKslNjc3yABKH4adRGCvSX4VDC0i04mrrq0aiRA==",+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz",+ "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==","requires": {- "@emotion/memoize": "^0.8.0",- "@emotion/sheet": "^1.2.1",- "@emotion/utils": "^1.2.0",- "@emotion/weak-memoize": "^0.3.0",- "stylis": "4.1.3"+ "@emotion/memoize": "^0.8.1",+ "@emotion/sheet": "^1.2.2",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1",+ "stylis": "4.2.0"}},"@emotion/hash": {- "version": "0.9.0",- "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.0.tgz",- "integrity": "sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ=="+ "version": "0.9.1",+ "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz",+ "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ=="},"@emotion/is-prop-valid": {"version": "0.8.8",@@ -22696,61 +22698,61 @@}},"@emotion/memoize": {- "version": "0.8.0",- "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz",- "integrity": "sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA=="+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="},"@emotion/react": {- "version": "11.10.5",- "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.10.5.tgz",- "integrity": "sha512-TZs6235tCJ/7iF6/rvTaOH4oxQg2gMAcdHemjwLKIjKz4rRuYe1HJ2TQJKnAcRAfOUDdU8XoDadCe1rl72iv8A==",+ "version": "11.11.1",+ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz",+ "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==","requires": {"@babel/runtime": "^7.18.3",- "@emotion/babel-plugin": "^11.10.5",- "@emotion/cache": "^11.10.5",- "@emotion/serialize": "^1.1.1",- "@emotion/use-insertion-effect-with-fallbacks": "^1.0.0",- "@emotion/utils": "^1.2.0",- "@emotion/weak-memoize": "^0.3.0",+ "@emotion/babel-plugin": "^11.11.0",+ "@emotion/cache": "^11.11.0",+ "@emotion/serialize": "^1.1.2",+ "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1","hoist-non-react-statics": "^3.3.1"}},"@emotion/serialize": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.1.tgz",- "integrity": "sha512-Zl/0LFggN7+L1liljxXdsVSVlg6E/Z/olVWpfxUTxOAmi8NU7YoeWeLfi1RmnB2TATHoaWwIBRoL+FvAJiTUQA==",+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz",+ "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==","requires": {- "@emotion/hash": "^0.9.0",- "@emotion/memoize": "^0.8.0",- "@emotion/unitless": "^0.8.0",- "@emotion/utils": "^1.2.0",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/unitless": "^0.8.1",+ "@emotion/utils": "^1.2.1","csstype": "^3.0.2"}},"@emotion/sheet": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.1.tgz",- "integrity": "sha512-zxRBwl93sHMsOj4zs+OslQKg/uhF38MB+OMKoCrVuS0nyTkqnau+BM3WGEoOptg9Oz45T/aIGs1qbVAsEFo3nA=="+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz",+ "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA=="},"@emotion/unitless": {- "version": "0.8.0",- "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz",- "integrity": "sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw=="+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz",+ "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ=="},"@emotion/use-insertion-effect-with-fallbacks": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz",- "integrity": "sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A=="+ "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=="},"@emotion/utils": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.0.tgz",- "integrity": "sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw=="+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz",+ "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg=="},"@emotion/weak-memoize": {- "version": "0.3.0",- "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz",- "integrity": "sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg=="+ "version": "0.3.1",+ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz",+ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww=="},"@eslint/eslintrc": {"version": "1.2.3",@@ -23766,9 +23768,17 @@"@notesnook/theme": {"version": "file:../../packages/theme","requires": {- "@theme-ui/core": "^0.14.7",+ "@emotion/react": "11.11.1",+ "@theme-ui/color": "^0.16.0",+ "@theme-ui/components": "0.14.7",+ "@theme-ui/core": "0.14.7",+ "@trpc/server": "^10.31.0",+ "@types/react": "17.0.2","@types/tinycolor2": "^1.4.3",- "tinycolor2": "^1.4.2"+ "isomorphic-fetch": "^3.0.0",+ "tinycolor2": "^1.4.2",+ "ts-json-schema-generator": "^1.2.0",+ "zustand": "^4.3.8"}},"@npmcli/fs": {@@ -35244,9 +35254,9 @@}},"stylis": {- "version": "4.1.3",- "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.1.3.tgz",- "integrity": "sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA=="+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",+ "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="},"supports-color": {"version": "5.5.0",diff --git a/extensions/web-clipper/package.json b/extensions/web-clipper/package.jsonindex 5f6a8d4ea..3fb071629 100644--- a/extensions/web-clipper/package.json+++ b/extensions/web-clipper/package.json@@ -4,7 +4,7 @@"private": true,"main": "./dist/index.js","dependencies": {- "@emotion/react": "^11.10.0",+ "@emotion/react": "11.11.1","@hot-loader/react-dom": "^17.0.2","@mdi/js": "^6.9.96","@mdi/react": "^1.6.0",diff --git a/extensions/web-clipper/src/app.tsx b/extensions/web-clipper/src/app.tsxindex 7534b1951..2dd52bc18 100644--- a/extensions/web-clipper/src/app.tsx+++ b/extensions/web-clipper/src/app.tsx@@ -17,11 +17,11 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/import { useEffect } from "react";-import { ThemeProvider } from "./components/theme-provider";import { useAppStore } from "./stores/app-store";import { Login } from "./views/login";import { Main } from "./views/main";import { Settings } from "./views/settings";+import { EmotionThemeProvider, useThemeEngineStore } from "@notesnook/theme";export function App() {const isLoggedIn = useAppStore((s) => s.isLoggedIn);@@ -35,8 +35,17 @@ export function App() {} else navigate("/");}, [isLoggedIn]);+ useEffect(() => {+ console.log(user);+ if (user && user.theme) {+ document.body.style.backgroundColor =+ user.theme.scopes.base.primary.background;+ useThemeEngineStore.getState().setTheme(user.theme);+ }+ }, [user]);+return (- <ThemeProvider accent={user?.accent} theme={user?.theme}>+ <EmotionThemeProvider scope="base" injectCssVars>{(() => {switch (route) {case "/login":@@ -48,6 +57,6 @@ export function App() {return <Settings />;}})()}- </ThemeProvider>+ </EmotionThemeProvider>);}diff --git a/extensions/web-clipper/src/common/bridge.ts b/extensions/web-clipper/src/common/bridge.tsindex abef17f98..5b0f0799b 100644--- a/extensions/web-clipper/src/common/bridge.ts+++ b/extensions/web-clipper/src/common/bridge.ts@@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { ThemeDefinition } from "@notesnook/theme";+export type ClipArea = "full-page" | "visible" | "selection" | "article";export type ClipMode = "simplified" | "screenshot" | "complete";@@ -24,8 +26,7 @@ export type ClipMode = "simplified" | "screenshot" | "complete";export type User = {email?: string;pro: boolean;- accent: string;- theme: "dark" | "light";+ theme: ThemeDefinition;};export type ItemReference = {id: string;diff --git a/extensions/web-clipper/src/components/check-list-item/index.tsx b/extensions/web-clipper/src/components/check-list-item/index.tsxindex 28b46375b..381855800 100644--- a/extensions/web-clipper/src/components/check-list-item/index.tsx+++ b/extensions/web-clipper/src/components/check-list-item/index.tsx@@ -32,19 +32,27 @@ export function CheckListItem(props: CheckListItemProps) {const { title, onSelected, isSelected, indentLevel = 0 } = props;return (<Button- variant="list"onClick={onSelected}sx={{display: "flex",alignItems: "center",py: 1,px: 1,- ml: indentLevel * 2+ ml: indentLevel * 2,++ color: "paragraph",+ bg: "transparent",+ borderBottom: "1px solid",+ borderBottomColor: "border",+ borderRadius: 0,+ ":hover:not(:disabled)": {+ borderBottomColor: "accent"+ }}}><Iconpath={isSelected ? Icons.checkCircle : Icons.circle}- color={isSelected ? "primary" : "text"}+ color={isSelected ? "accent" : "paragraph"}size={16}/><Text@@ -52,7 +60,7 @@ export function CheckListItem(props: CheckListItemProps) {fontSize: "13px",ml: 1,fontWeight: 400,- color: "text"+ color: "paragraph"}}>{title}diff --git a/extensions/web-clipper/src/components/filtered-list/index.tsx b/extensions/web-clipper/src/components/filtered-list/index.tsxindex 3da83b893..8b4e79b68 100644--- a/extensions/web-clipper/src/components/filtered-list/index.tsx+++ b/extensions/web-clipper/src/components/filtered-list/index.tsx@@ -91,7 +91,7 @@ export function FilteredList<T>({width: "auto",fontSize: "body",py: "7px",- color: "text"+ color: "paragraph"}}ref={inputRef}autoFocusdiff --git a/extensions/web-clipper/src/components/icons/icon.tsx b/extensions/web-clipper/src/components/icons/icon.tsxindex 681df0ea4..924798adc 100644--- a/extensions/web-clipper/src/components/icons/icon.tsx+++ b/extensions/web-clipper/src/components/icons/icon.tsx@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/import MDIIcon from "@mdi/react";-import { SchemeColors } from "@notesnook/theme/dist/theme/colorscheme";+import { isThemeColor, SchemeColors } from "@notesnook/theme";import { Flex, FlexProps } from "@theme-ui/components";import { useTheme } from "@emotion/react";import { Theme } from "@notesnook/theme";@@ -26,7 +26,7 @@ type IconProps = {title?: string;path: string;size?: number;- color?: keyof SchemeColors;+ color?: SchemeColors;stroke?: string;rotate?: boolean;};@@ -40,9 +40,10 @@ function MDIIconWrapper({}: IconProps) {const theme = useTheme() as Theme;- const themedColor: string = theme.colors- ? (theme.colors[color] as string)- : color;+ const themedColor: string =+ theme.colors && isThemeColor(color, theme.colors)+ ? theme.colors[color]+ : color;return (<MDIIcondiff --git a/extensions/web-clipper/src/components/inline-tag/index.tsx b/extensions/web-clipper/src/components/inline-tag/index.tsxindex 76a1e0527..da6ed8849 100644--- a/extensions/web-clipper/src/components/inline-tag/index.tsx+++ b/extensions/web-clipper/src/components/inline-tag/index.tsx@@ -19,12 +19,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { Flex, Text } from "@theme-ui/components";import { Icon } from "../icons/icon";-import { SchemeColors } from "@notesnook/theme/dist/theme/colorscheme";+import { SchemeColors } from "@notesnook/theme";export function InlineTag(props: {title: string;icon: string;- iconColor?: keyof SchemeColors;+ iconColor?: SchemeColors;onClick: () => void;}) {const { title, icon, onClick, iconColor = "icon" } = props;@@ -35,7 +35,7 @@ export function InlineTag(props: {sx={{alignItems: "center",justifyContent: "center",- bg: "bgSecondary",+ bg: "var(--background-secondary)",border: "1px solid var(--border)",borderRadius: "small",p: "3px",@@ -47,7 +47,7 @@ export function InlineTag(props: {}}><Icon path={icon} color={iconColor} size={14} />- <Text variant="subBody" sx={{ color: "icon", ml: 1 }}>+ <Text variant="subBody" sx={{ ml: 1 }}>{title}</Text></Flex>diff --git a/extensions/web-clipper/src/components/note-picker/index.tsx b/extensions/web-clipper/src/components/note-picker/index.tsxindex 435eb1ed1..439c5b3ec 100644--- a/extensions/web-clipper/src/components/note-picker/index.tsx+++ b/extensions/web-clipper/src/components/note-picker/index.tsx@@ -45,7 +45,7 @@ export const NotePicker = (props: NotePickerProps) => {<><Flex sx={{ alignItems: "center" }}><Button- variant="tool"+ variant="secondary"onClick={open}sx={{display: "flex",@@ -63,7 +63,7 @@ export const NotePicker = (props: NotePickerProps) => {}><Text- variant="text"+ variant="body"sx={{whiteSpace: "nowrap",textOverflow: "ellipsis",@@ -74,11 +74,11 @@ export const NotePicker = (props: NotePickerProps) => {? `Append to "${selectedNote?.title}"`: `Select a note to append to`}</Text>- <Icon path={Icons.chevronDown} color="text" size={18} />+ <Icon path={Icons.chevronDown} size={18} /></Button>{selectedNote && (<Button- variant="tool"+ variant="secondary"onClick={() => onSelected(undefined)}sx={{display: "flex",@@ -91,7 +91,7 @@ export const NotePicker = (props: NotePickerProps) => {}}title={"Clear selection"}>- <Icon path={Icons.close} color="text" size={16} />+ <Icon path={Icons.close} size={16} /></Button>)}</Flex>diff --git a/extensions/web-clipper/src/components/notebook-picker/index.tsx b/extensions/web-clipper/src/components/notebook-picker/index.tsxindex 3014bf4e3..a78197942 100644--- a/extensions/web-clipper/src/components/notebook-picker/index.tsx+++ b/extensions/web-clipper/src/components/notebook-picker/index.tsx@@ -82,7 +82,7 @@ export const NotebookPicker = (props: NotebookPickerProps) => {<InlineTagtitle={selectedItems.length ? "Add more" : "Add to notebook"}icon={Icons.plus}- iconColor="primary"+ iconColor="accent"onClick={open}/></Flex>diff --git a/extensions/web-clipper/src/components/picker/index.tsx b/extensions/web-clipper/src/components/picker/index.tsxindex 62bd414b2..d3d0c5946 100644--- a/extensions/web-clipper/src/components/picker/index.tsx+++ b/extensions/web-clipper/src/components/picker/index.tsx@@ -19,30 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { PropsWithChildren } from "react";import Modal from "react-modal";import { Button, Flex } from "@theme-ui/components";-import { ThemeProvider } from "../theme-provider";-Modal.setAppElement("#root");--const customStyles = {- content: {- top: "50%",- left: "50%",- right: "auto",- bottom: "auto",- marginRight: "-50%",- transform: "translate(-50%, -50%)",- boxShadow: "0px 1px 10px #00000055",- border: "none",- borderRadius: 5,- backgroundColor: "var(--background)",+import { EmotionThemeProvider, useThemeEngineStore } from "@notesnook/theme";- height: "80vh",- width: "85vw",- display: "flex",- flexDirection: "column",- overflow: "hidden",- padding: 0- } as const-};+Modal.setAppElement("#root");type PickerProps = {isOpen: boolean;@@ -51,19 +30,46 @@ type PickerProps = {};export const Picker = (props: PropsWithChildren<PickerProps>) => {const { children, isOpen, onClose, onDone } = props;+ const theme = useThemeEngineStore((store) => store.theme);return (<Modalstyle={{- content: customStyles.content,+ content: {+ top: "50%",+ left: "50%",+ right: "auto",+ bottom: "auto",+ marginRight: "-50%",+ transform: "translate(-50%, -50%)",+ boxShadow: `0px 1px 10px ${theme.scopes.base.primary.border}`,+ border: "none",+ borderRadius: 5,+ backgroundColor: theme.scopes.base.primary.background,+ padding: "10px",++ height: "80vh",+ width: "85vw",+ display: "flex",+ flexDirection: "column",+ overflow: "hidden"+ },overlay: {- backgroundColor: "var(--overlay)"+ backgroundColor: theme.scopes.base.primary.backdrop}}}onRequestClose={onClose}isOpen={isOpen}>- <ThemeProvider>+ <EmotionThemeProvider+ scope="base"+ injectCssVars+ sx={{+ display: "flex",+ flexDirection: "column",+ overflow: "hidden"+ }}+ ><Flexsx={{flexDirection: "column",@@ -81,13 +87,19 @@ export const Picker = (props: PropsWithChildren<PickerProps>) => {>{children}</Flex>- <Flex sx={{ bg: "bgSecondary", p: 1, justifyContent: "end" }}>+ <Flex+ sx={{+ bg: "var(--background-secondary)",+ p: 1,+ justifyContent: "end"+ }}+ ><Button variant="dialog" onClick={onDone}>Done</Button></Flex></Flex>- </ThemeProvider>+ </EmotionThemeProvider></Modal>);};diff --git a/extensions/web-clipper/src/components/tag-picker/index.tsx b/extensions/web-clipper/src/components/tag-picker/index.tsxindex 94f0b177c..a4c299301 100644--- a/extensions/web-clipper/src/components/tag-picker/index.tsx+++ b/extensions/web-clipper/src/components/tag-picker/index.tsx@@ -78,7 +78,7 @@ export const TagPicker = (props: TagPickerProps) => {<InlineTagicon={Icons.plus}title={"Assign a tag"}- iconColor="primary"+ iconColor="accent"onClick={open}/></Flex>diff --git a/extensions/web-clipper/src/components/theme-provider/index.tsx b/extensions/web-clipper/src/components/theme-provider/index.tsxdeleted file mode 100644index 2231d8760..000000000--- a/extensions/web-clipper/src/components/theme-provider/index.tsx+++ /dev/null@@ -1,49 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--// import { useStore } from "../../stores/theme-store";-import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";-import { getDefaultAccentColor, useTheme } from "@notesnook/theme";-import { ReactNode } from "react";--type ThemeProviderProps = {- children: ReactNode;- accent?: string;- theme?: "dark" | "light";-};--function ThemeProvider(props: ThemeProviderProps) {- const { accent, children, theme } = props;- const themeProperties = useTheme({- accent: accent || getDefaultAccentColor(),- theme: theme || "light"- });-- // useEffect(() => {- // const root = document.querySelector("html");- // if (root) root.setAttribute("data-theme", theme);- // }, [theme]);-- return (- <EmotionThemeProvider theme={themeProperties}>- {children}- </EmotionThemeProvider>- );-}-export { ThemeProvider };diff --git a/extensions/web-clipper/src/index.css b/extensions/web-clipper/src/index.cssindex bd9052cea..93e2f39fe 100644--- a/extensions/web-clipper/src/index.css+++ b/extensions/web-clipper/src/index.css@@ -4,3 +4,21 @@ body {background-color: var(--background);overflow: hidden;}++.ms-track:hover,+.ms-track:active {+ background: var(--border) !important;+ border-width: 0px !important;+}++.ms-track {+ border-width: 0px !important;+}++.ms-active .ms-thumb {+ filter: brightness(80%);+}++.ms-thumb {+ background: var(--hover) !important;+}diff --git a/extensions/web-clipper/src/views/main.tsx b/extensions/web-clipper/src/views/main.tsxindex a6b6902e1..977414b4a 100644--- a/extensions/web-clipper/src/views/main.tsx+++ b/extensions/web-clipper/src/views/main.tsx@@ -249,7 +249,7 @@ export function Main() {><Flex><Icon path={item.icon} color="icon" size={16} />- <Text variant="text" sx={{ ml: 1 }}>+ <Text variant="body" sx={{ ml: 1 }}>{item.name}</Text></Flex>@@ -257,7 +257,6 @@ export function Main() {{clipArea === item.id && (<Iconpath={isClipping ? Icons.loading : Icons.check}- color="text"size={16}rotate={isClipping}/>@@ -292,7 +291,7 @@ export function Main() {><Flex><Icon path={item.icon} color="icon" size={16} />- <Text variant="text" sx={{ ml: 1 }}>+ <Text variant="body" sx={{ ml: 1 }}>{item.name}</Text></Flex>@@ -300,7 +299,6 @@ export function Main() {{clipMode === item.id && (<Iconpath={isClipping ? Icons.loading : Icons.check}- color="text"size={16}rotate={isClipping}/>@@ -314,9 +312,9 @@ export function Main() {sx={{mt: 1,bg: "shade",- color: "primary",+ color: "accent",p: 1,- border: "1px solid var(--primary)",+ border: "1px solid var(--accent)",borderRadius: "default",cursor: "pointer",":hover": {@@ -342,10 +340,10 @@ export function Main() {variant="body"sx={{mt: 1,- bg: "errorBg",- color: "error",+ bg: "var(--background-error)",+ color: "var(--paragraph-error)",p: 1,- border: "1px solid var(--error)",+ border: "1px solid var(--border-error)",borderRadius: "default",cursor: "pointer",":hover": {@@ -358,9 +356,7 @@ export function Main() {>{ERROR_MAP[error] || error}<br />- <Text sx={{ fontSize: 11, color: "error" }}>- Click here to try again.- </Text>+ Click here to retry.</Text>)}@@ -396,6 +392,7 @@ export function Main() {</>)}<Button+ variant="accent"sx={{ mt: 1 }}disabled={!clipData}onClick={async () => {@@ -431,7 +428,7 @@ export function Main() {window.close();}}>- <Text variant="text">Save clip</Text>+ <Text variant="body">Save clip</Text></Button><Flex@@ -449,7 +446,7 @@ export function Main() {navigate("/settings");}}>- <Icon path={Icons.settings} color="text" size={16} />+ <Icon path={Icons.settings} size={16} /></Button></Flex></Flex>diff --git a/extensions/web-clipper/webpack.config.js b/extensions/web-clipper/webpack.config.jsindex 711f51a0d..20fc056d8 100644--- a/extensions/web-clipper/webpack.config.js+++ b/extensions/web-clipper/webpack.config.js@@ -30,7 +30,11 @@ const ASSET_PATH = process.env.ASSET_PATH || "./public";const MANIFEST_VERSION = process.env.MANIFEST_VERSION || "2";var alias = {- "react-dom": "@hot-loader/react-dom"+ "react-dom": "@hot-loader/react-dom",+ react: path.resolve(path.join(__dirname, "node_modules", "react")),+ "@emotion/react": path.resolve(+ path.join(__dirname, "node_modules", "@emotion", "react")+ )};// load the secretsdiff --git a/lerna.json b/lerna.jsonindex af7388b71..28e97742b 100644--- a/lerna.json+++ b/lerna.json@@ -2,5 +2,5 @@"$schema": "node_modules/lerna/schemas/lerna-schema.json","useNx": true,"version": "independent",- "packages": ["packages/*", "apps/*", "extensions/*"]+ "packages": ["packages/*", "apps/*", "extensions/*", "servers/*"]}diff --git a/package-lock.json b/package-lock.jsonindex 80e70c1ac..c6801c274 100644--- a/package-lock.json+++ b/package-lock.json@@ -14,7 +14,7 @@"nx": "^16.3.2","patch-package": "^7.0.0","rxjs": "^7.8.1",- "typescript": "^5.1.3",+ "typescript": "5.1.3","yargs-parser": "^21.1.1"},"devDependencies": {diff --git a/package.json b/package.jsonindex cc0804bd9..2b152d5dc 100644--- a/package.json+++ b/package.json@@ -26,6 +26,8 @@"start:metro": "nx start @notesnook/mobile","start:repack": "nx repack @notesnook/mobile","start:editor-mobile": "nx start @notesnook/editor-mobile",+ "start:editor": "nx start @notesnook/editor",+ "start:server:themes": "nx start @notesnook/themes-server","prettier": "npx prettier . --write","lint": "npx eslint ./apps/ ./packages/","linc": "npx eslint ./apps/ ./packages/ --cache"@@ -57,7 +59,7 @@"nx": "^16.3.2","patch-package": "^7.0.0","rxjs": "^7.8.1",- "typescript": "^5.1.3",+ "typescript": "5.1.3","yargs-parser": "^21.1.1"},"license": "GPL-3.0-or-later",diff --git a/packages/common/package-lock.json b/packages/common/package-lock.jsonindex bc54c828a..4c31f5586 100644--- a/packages/common/package-lock.json+++ b/packages/common/package-lock.json@@ -15,8 +15,7 @@"devDependencies": {"@notesnook/core": "file:../core","@types/react": "17.0.2",- "react": "17.0.2",- "typescript": "^4.8.2"+ "react": "17.0.2"},"peerDependencies": {"react": ">=17.0.2",@@ -143,19 +142,6 @@"version": "4.0.2","resolved": "https://registry.npmjs.org/timeago.js/-/timeago.js-4.0.2.tgz","integrity": "sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w=="- },- "node_modules/typescript": {- "version": "4.9.5",- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",- "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",- "dev": true,- "bin": {- "tsc": "bin/tsc",- "tsserver": "bin/tsserver"- },- "engines": {- "node": ">=4.2.0"- }}},"dependencies": {@@ -261,12 +247,6 @@"version": "4.0.2","resolved": "https://registry.npmjs.org/timeago.js/-/timeago.js-4.0.2.tgz","integrity": "sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w=="- },- "typescript": {- "version": "4.9.5",- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",- "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",- "dev": true}}}diff --git a/packages/common/package.json b/packages/common/package.jsonindex 1f9118246..0b05ff7ef 100644--- a/packages/common/package.json+++ b/packages/common/package.json@@ -29,7 +29,6 @@"access": "restricted"},"devDependencies": {- "typescript": "^4.8.2","@notesnook/core": "file:../core","react": "17.0.2","@types/react": "17.0.2"diff --git a/packages/core/collections/relations.js b/packages/core/collections/relations.jsindex 9dec64252..3c6bce4e8 100644--- a/packages/core/collections/relations.js+++ b/packages/core/collections/relations.js@@ -160,7 +160,7 @@ export default class Relations extends Collection {* @param {"from" | "to"} resolveType* @private*- * @returns {Relation[]}+ * @returns {any[]}*/resolve(relations, resolveType) {const items = [];diff --git a/packages/editor-mobile/package-lock.json b/packages/editor-mobile/package-lock.jsonindex 41ec4abe1..3e481be17 100644--- a/packages/editor-mobile/package-lock.json+++ b/packages/editor-mobile/package-lock.json@@ -9,8 +9,8 @@"version": "1.0.0","hasInstallScript": true,"dependencies": {- "@emotion/react": "^11.10.0",- "@mdi/js": "^6.9.96",+ "@emotion/react": "11.11.1",+ "@mdi/js": "^7.2.96","@mdi/react": "^1.6.0","@notesnook/editor": "file:../editor","@notesnook/theme": "file:../theme",@@ -40,12 +40,13 @@"hasInstallScript": true,"license": "GPL-3.0-or-later","dependencies": {- "@emotion/react": "^11.10.0",+ "@emotion/react": "11.11.1","@notesnook/core": "file:../core","@notesnook/theme": "file:../theme",+ "@notesnook/ui": "file:../ui","@social-embed/lib": "^0.0.2-next.1",- "@theme-ui/components": "^0.14.7",- "@theme-ui/core": "^0.14.7",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0","@tiptap/core": "2.0.3","@tiptap/extension-character-count": "2.0.3","@tiptap/extension-color": "2.0.3",@@ -74,7 +75,7 @@"prism-themes": "^1.9.0","prosemirror-codemark": "^0.4.1","re-resizable": "^6.9.9",- "react-colorful": "^5.5.1",+ "react-colorful": "^5.6.1","react-modal": "^3.15.1","redent": "^4.0.0","refractor": "^4.8.0",@@ -84,8 +85,8 @@"zustand": "^4.3.8"},"devDependencies": {- "@mdi/js": "^6.9.96",- "@mdi/react": "^1.6.0",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1","@types/katex": "^0.14.0","@types/prismjs": "^1.26.0","@types/react": "17.0.2",@@ -103,8 +104,11 @@"web-vitals": "^2.1.4"},"peerDependencies": {- "@mdi/js": ">=6.9.96",- "@mdi/react": ">=1.6.0",+ "@emotion/react": "11.11.1",+ "@mdi/js": ">=7.2.96",+ "@mdi/react": ">=1.6.1",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0","react": ">=17.0.0","react-dom": ">=17.0.0"}@@ -114,11 +118,22 @@"version": "1.2.0","license": "GPL-3.0-or-later","dependencies": {- "@theme-ui/core": "^0.14.7",- "tinycolor2": "^1.4.2"+ "@emotion/react": "11.11.1",+ "@theme-ui/color": "^0.16.0",+ "@theme-ui/components": "0.14.7",+ "@theme-ui/core": "0.14.7",+ "tinycolor2": "^1.4.2",+ "zustand": "^4.3.8"},"devDependencies": {- "@types/tinycolor2": "^1.4.3"+ "@trpc/server": "^10.31.0",+ "@types/react": "17.0.2",+ "@types/tinycolor2": "^1.4.3",+ "isomorphic-fetch": "^3.0.0",+ "ts-json-schema-generator": "^1.2.0"+ },+ "peerDependencies": {+ "react": "17.0.2"}},"node_modules/@adobe/css-tools": {@@ -2530,9 +2545,9 @@"optional": true},"node_modules/@emotion/react": {- "version": "11.11.0",- "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.0.tgz",- "integrity": "sha512-ZSK3ZJsNkwfjT3JpDAWJZlrGD81Z3ytNDsxw1LKq1o+xkmO5pnWfr6gmCC8gHEFf3nSSX/09YrG67jybNPxSUw==",+ "version": "11.11.1",+ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz",+ "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==","dependencies": {"@babel/runtime": "^7.18.3","@emotion/babel-plugin": "^11.11.0",@@ -3545,9 +3560,9 @@"dev": true},"node_modules/@mdi/js": {- "version": "6.9.96",- "resolved": "https://registry.npmjs.org/@mdi/js/-/js-6.9.96.tgz",- "integrity": "sha512-rK0/vLFaiItYS2W7uVmaKPKnhNQE4XVkylpk5njtVwENnp8elwY5uRL6qvdj2esuvUHG7DwygE4Qu3eKxxuJiQ=="+ "version": "7.2.96",+ "resolved": "https://registry.npmjs.org/@mdi/js/-/js-7.2.96.tgz",+ "integrity": "sha512-paR9M9ZT7rKbh2boksNUynuSZMHhqRYnEZOm/KrZTjQ4/FzyhjLHuvw/8XYzP+E7fS4+/Ms/82EN1pl/OFsiIA=="},"node_modules/@mdi/react": {"version": "1.6.1",@@ -20630,9 +20645,9 @@"optional": true},"@emotion/react": {- "version": "11.11.0",- "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.0.tgz",- "integrity": "sha512-ZSK3ZJsNkwfjT3JpDAWJZlrGD81Z3ytNDsxw1LKq1o+xkmO5pnWfr6gmCC8gHEFf3nSSX/09YrG67jybNPxSUw==",+ "version": "11.11.1",+ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz",+ "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==","requires": {"@babel/runtime": "^7.18.3","@emotion/babel-plugin": "^11.11.0",@@ -21435,9 +21450,9 @@"dev": true},"@mdi/js": {- "version": "6.9.96",- "resolved": "https://registry.npmjs.org/@mdi/js/-/js-6.9.96.tgz",- "integrity": "sha512-rK0/vLFaiItYS2W7uVmaKPKnhNQE4XVkylpk5njtVwENnp8elwY5uRL6qvdj2esuvUHG7DwygE4Qu3eKxxuJiQ=="+ "version": "7.2.96",+ "resolved": "https://registry.npmjs.org/@mdi/js/-/js-7.2.96.tgz",+ "integrity": "sha512-paR9M9ZT7rKbh2boksNUynuSZMHhqRYnEZOm/KrZTjQ4/FzyhjLHuvw/8XYzP+E7fS4+/Ms/82EN1pl/OFsiIA=="},"@mdi/react": {"version": "1.6.1",@@ -21561,14 +21576,15 @@"@notesnook/editor": {"version": "file:../editor","requires": {- "@emotion/react": "^11.10.0",- "@mdi/js": "^6.9.96",- "@mdi/react": "^1.6.0",+ "@emotion/react": "11.11.1",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1","@notesnook/core": "file:../core","@notesnook/theme": "file:../theme",+ "@notesnook/ui": "file:../ui","@social-embed/lib": "^0.0.2-next.1",- "@theme-ui/components": "^0.14.7",- "@theme-ui/core": "^0.14.7",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0","@tiptap/core": "2.0.3","@tiptap/extension-character-count": "2.0.3","@tiptap/extension-color": "2.0.3",@@ -21609,7 +21625,7 @@"prosemirror-test-builder": "^1.1.0","re-resizable": "^6.9.9","react": "17.0.2",- "react-colorful": "^5.5.1",+ "react-colorful": "^5.6.1","react-dom": "17.0.2","react-modal": "^3.15.1","redent": "^4.0.0",@@ -21625,9 +21641,17 @@"@notesnook/theme": {"version": "file:../theme","requires": {- "@theme-ui/core": "^0.14.7",+ "@emotion/react": "11.11.1",+ "@theme-ui/color": "^0.16.0",+ "@theme-ui/components": "0.14.7",+ "@theme-ui/core": "0.14.7",+ "@trpc/server": "^10.31.0",+ "@types/react": "17.0.2","@types/tinycolor2": "^1.4.3",- "tinycolor2": "^1.4.2"+ "isomorphic-fetch": "^3.0.0",+ "tinycolor2": "^1.4.2",+ "ts-json-schema-generator": "^1.2.0",+ "zustand": "^4.3.8"}},"@pmmmwh/react-refresh-webpack-plugin": {diff --git a/packages/editor-mobile/package.json b/packages/editor-mobile/package.jsonindex 4a158d560..25e8597be 100644--- a/packages/editor-mobile/package.json+++ b/packages/editor-mobile/package.json@@ -6,13 +6,13 @@"@notesnook/editor": "file:../editor","@notesnook/theme": "file:../theme","framer-motion": "^6.5.1",- "@mdi/js": "^6.9.96",+ "@mdi/js": "^7.2.96","@mdi/react": "^1.6.0","mdi-react": "9.1.0","react": "^17.0.2","react-dom": "^17.0.2","zustand": "^3.6.8",- "@emotion/react": "^11.10.0"+ "@emotion/react": "11.11.1"},"devDependencies": {"@testing-library/jest-dom": "^5.16.0",diff --git a/packages/editor-mobile/public/index.html b/packages/editor-mobile/public/index.htmlindex 914e34c89..879142614 100644--- a/packages/editor-mobile/public/index.html+++ b/packages/editor-mobile/public/index.html@@ -17,20 +17,20 @@p {font-family: "Open Sans";- /* color: var(--nn_pri) ## TODO: use fixed color */+ /* color: var(--nn_primary_paragraph) ## TODO: use fixed color */}::selection {color: white;- background-color: var(--nn_accent);+ background-color: var(--nn_primary_accent);}::placeholder {- color: var(--nn_placeholder);+ color: var(--nn_primary_placeholder);}p.is-editor-empty:first-child::before {- color: var(--nn_placeholder) !important;+ color: var(--nn_primary_placeholder) !important;}#root {diff --git a/packages/editor-mobile/src/App.tsx b/packages/editor-mobile/src/App.tsxindex 72bfac1c4..d584cf24d 100644--- a/packages/editor-mobile/src/App.tsx+++ b/packages/editor-mobile/src/App.tsx@@ -17,11 +17,19 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { ScopedThemeProvider } from "@notesnook/theme";import "./App.css";import Tiptap from "./components/editor";+import { EmotionEditorTheme } from "./theme-factory";function App(): JSX.Element {- return <Tiptap />;+ return (+ <ScopedThemeProvider value="base">+ <EmotionEditorTheme>+ <Tiptap />+ </EmotionEditorTheme>+ </ScopedThemeProvider>+ );}export default App;diff --git a/packages/editor-mobile/src/components/button.tsx b/packages/editor-mobile/src/components/button.tsxindex 443180058..e52dc5efc 100644--- a/packages/editor-mobile/src/components/button.tsx+++ b/packages/editor-mobile/src/components/button.tsx@@ -42,11 +42,15 @@ export default function Button({width: 40,height: 40,borderWidth: 0,- background: active ? "var(--nn_transGray)" : "var(--nn_nav)",+ background: active+ ? "var(--nn_secondary_hover)"+ : "var(--nn_secondary_background)",borderRadius: 5,fontWeight: "bold",userSelect: "none",- color: active ? "var(--nn_accent)" : "var(--nn_pri)",+ color: active+ ? "var(--nn_primary_paragraphmary_accent)"+ : "var(--nn_primary_paragraph)",marginRight: marginRight,fontSize: 18}}diff --git a/packages/editor-mobile/src/components/editor.tsx b/packages/editor-mobile/src/components/editor.tsxindex 31cdf9c50..c15f8fdf5 100644--- a/packages/editor-mobile/src/components/editor.tsx+++ b/packages/editor-mobile/src/components/editor.tsx@@ -25,7 +25,7 @@ import {usePermissionHandler,useTiptap} from "@notesnook/editor";-import { Theme, useTheme } from "@notesnook/theme";+import { useThemeColors } from "@notesnook/theme";import {forwardRef,memo,@@ -36,22 +36,14 @@ import {} from "react";import { useEditorController } from "../hooks/useEditorController";import { useSettings } from "../hooks/useSettings";-import { useEditorThemeStore } from "../state/theme";+import { EmotionEditorToolbarTheme } from "../theme-factory";import { EventTypes, Settings } from "../utils";import Header from "./header";import StatusBar from "./statusbar";import Tags from "./tags";import Title from "./title";-const Tiptap = ({- editorTheme,- toolbarTheme,- settings-}: {- editorTheme: Theme;- toolbarTheme: Theme;- settings: Settings;-}) => {+const Tiptap = ({ settings }: { settings: Settings }) => {const [tick, setTick] = useState(0);const contentRef = useRef<HTMLDivElement>(null);const containerRef = useRef<HTMLDivElement>(null);@@ -81,7 +73,6 @@ const Tiptap = ({global.editorController.previewAttachment(attachment);return true;},- theme: editorTheme,element: !layout ? undefined : contentRef.current || undefined,editable: !settings.readonly,editorProps: {@@ -188,8 +179,7 @@ const Tiptap = ({display: "flex",flex: 1,flexDirection: "column",- maxWidth: "100vw",- marginBottom: "5px"+ maxWidth: "100vw"}}id="editorroot"onDoubleClick={onClickEmptyArea}@@ -242,20 +232,18 @@ const Tiptap = ({</div>{!layout ? null : (- <Toolbar- sx={{- pl: "10px",- pt: "5px",- minHeight: 45,- display: settings.noToolbar ? "none" : "flex"- }}- theme={toolbarTheme}- editor={_editor}- location="bottom"- tools={[...settings.tools]}- defaultFontFamily={settings.fontFamily}- defaultFontSize={settings.fontSize}- />+ <EmotionEditorToolbarTheme>+ <Toolbar+ sx={{+ display: settings.noToolbar ? "none" : "flex"+ }}+ editor={_editor}+ location="bottom"+ tools={[...settings.tools]}+ defaultFontFamily={settings.fontFamily}+ defaultFontSize={settings.fontSize}+ />+ </EmotionEditorToolbarTheme>)}</div></>@@ -267,16 +255,16 @@ const ContentDiv = memo(HTMLDivElement,{ padding: number; fontSize: number; fontFamily: string }>((props, ref) => {- const theme = useEditorThemeStore((state) => state.colors);+ const { colors } = useThemeColors("editor");return (<divref={ref}style={{padding: 12,paddingTop: props.padding,- color: theme.pri,+ color: colors.primary.paragraph,marginTop: -12,- caretColor: theme.accent,+ caretColor: colors.primary.accent,fontSize: props.fontSize,fontFamily: getFontById(props.fontFamily)?.font}}@@ -290,64 +278,12 @@ const ContentDiv = memo(});-const modifyToolbarTheme = (toolbarTheme: Theme) => {- toolbarTheme.space = [0, 10, 12, 18];- toolbarTheme.space.small = "10px";-- toolbarTheme.buttons.menuitem = {- ...toolbarTheme.buttons.menuitem,- height: "50px",- paddingX: "20px",- borderBottomWidth: 0- };-- toolbarTheme.iconSizes = {- big: 20,- medium: 18,- small: 18- };- toolbarTheme.fontSizes = {- ...toolbarTheme.fontSizes,- subBody: "0.8rem",- body: "0.9rem"- };-- toolbarTheme.radii = {- ...toolbarTheme.radii,- small: 5- };-- toolbarTheme.buttons.menuitem = {- ...toolbarTheme.buttons.menuitem,- px: 5,- height: "45px"- };-};-const TiptapProvider = (): JSX.Element => {const settings = useSettings();- const theme = useEditorThemeStore((state) => state.colors);- const toolbarTheme = useTheme({- //todo- accent: theme?.accent,- theme: theme?.night ? "dark" : "light"- });- modifyToolbarTheme(toolbarTheme);- const editorTheme = useTheme({- //todo- accent: theme?.accent,- theme: theme?.night ? "dark" : "light"- });- editorTheme.colors.background = theme?.bg || "#f0f0f0";- editorTheme.space = [0, 10, 12, 20];return (<PortalProvider>- <Tiptap- editorTheme={editorTheme}- toolbarTheme={toolbarTheme}- settings={settings}- />+ <Tiptap settings={settings} /></PortalProvider>);};diff --git a/packages/editor-mobile/src/components/header.tsx b/packages/editor-mobile/src/components/header.tsxindex 08ca86830..3a69a5da4 100644--- a/packages/editor-mobile/src/components/header.tsx+++ b/packages/editor-mobile/src/components/header.tsx@@ -72,7 +72,7 @@ function Header({display: "flex",alignItems: "center",height: noHeader ? `${insets.top}px` : `${50 + insets.top}px`,- backgroundColor: "var(--nn_bg)",+ backgroundColor: "var(--nn_primary_background)",position: "sticky",width: "100vw"}}@@ -101,7 +101,7 @@ function Header({style={{borderWidth: 0,borderRadius: 100,- color: "var(--nn_icon)",+ color: "var(--nn_primary_icon)",marginLeft: 6,width: 40,height: 40,@@ -117,7 +117,7 @@ function Header({style={{position: "absolute"}}- color="var(--nn_pri)"+ color="var(--nn_primary_paragraph)"/></Button>)}@@ -136,7 +136,7 @@ function Header({style={{borderWidth: 0,borderRadius: 100,- color: "var(--nn_icon)",+ color: "var(--nn_primary_icon)",marginRight: 10,width: 39,height: 39,@@ -147,7 +147,11 @@ function Header({}}><ArrowULeftTopIcon- color={!hasUndo ? "var(--nn_nav)" : "var(--nn_pri)"}+ color={+ !hasUndo+ ? "var(--nn_secondary_background)"+ : "var(--nn_primary_paragraph)"+ }size={25}style={{position: "absolute"@@ -162,7 +166,7 @@ function Header({style={{borderWidth: 0,borderRadius: 100,- color: "var(--nn_icon)",+ color: "var(--nn_primary_icon)",marginRight: 10,width: 39,height: 39,@@ -173,7 +177,11 @@ function Header({}}><ArrowURightTopIcon- color={!hasRedo ? "var(--nn_nav)" : "var(--nn_pri)"}+ color={+ !hasRedo+ ? "var(--nn_secondary_background)"+ : "var(--nn_primary_paragraph)"+ }size={25}style={{position: "absolute"@@ -189,7 +197,7 @@ function Header({style={{borderWidth: 0,borderRadius: 100,- color: "var(--nn_icon)",+ color: "var(--nn_primary_icon)",marginRight: 10,width: 39,height: 39,@@ -216,7 +224,7 @@ function Header({style={{borderWidth: 0,borderRadius: 100,- color: "var(--nn_icon)",+ color: "var(--nn_primary_icon)",marginRight: 10,width: 39,height: 39,@@ -231,7 +239,7 @@ function Header({style={{position: "absolute"}}- color="var(--nn_pri)"+ color="var(--nn_primary_paragraph)"/></Button>@@ -244,7 +252,7 @@ function Header({style={{borderWidth: 0,borderRadius: 100,- color: "var(--nn_icon)",+ color: "var(--nn_primary_icon)",marginRight: 10,width: 39,height: 39,@@ -259,7 +267,7 @@ function Header({style={{position: "absolute"}}- color="var(--nn_pri)"+ color="var(--nn_primary_paragraph)"/></Button>) : null}@@ -272,7 +280,7 @@ function Header({style={{borderWidth: 0,borderRadius: 100,- color: "var(--nn_icon)",+ color: "var(--nn_primary_icon)",marginRight: 12,width: 39,height: 39,@@ -287,7 +295,7 @@ function Header({style={{position: "absolute"}}- color="var(--nn_pri)"+ color="var(--nn_primary_paragraph)"/></Button></div>diff --git a/packages/editor-mobile/src/components/statusbar.tsx b/packages/editor-mobile/src/components/statusbar.tsxindex f7584d27a..08603856d 100644--- a/packages/editor-mobile/src/components/statusbar.tsx+++ b/packages/editor-mobile/src/components/statusbar.tsx@@ -80,7 +80,7 @@ function StatusBar({ container }: { container: RefObject<HTMLDivElement> }) {marginTop: 0,marginBottom: 0,fontSize: "12px",- color: "var(--nn_icon)",+ color: "var(--nn_secondary_paragraph)",marginRight: 8,paddingBottom: 0,userSelect: "none",@@ -96,7 +96,7 @@ function StatusBar({ container }: { container: RefObject<HTMLDivElement> }) {paddingLeft: 12,position: sticky ? "sticky" : "relative",top: -3,- backgroundColor: "var(--nn_bg)",+ backgroundColor: "var(--nn_primary_background)",zIndex: 1,justifyContent: sticky ? "center" : "flex-start",paddingTop: 2,diff --git a/packages/editor-mobile/src/components/styles.module.css b/packages/editor-mobile/src/components/styles.module.cssindex eec05a88f..9a39d79ee 100644--- a/packages/editor-mobile/src/components/styles.module.css+++ b/packages/editor-mobile/src/components/styles.module.css@@ -1,9 +1,9 @@.btn {- background-color: var(--nn_nav);+ background-color: var(--nn_secondary_background);}.btn:active {- background-color: var(--nn_transGray);+ background-color: var(--nn_secondary_hover);}.btn_header {@@ -13,11 +13,11 @@}.btn_header:active {- background-color: var(--nn_transGray);+ background-color: var(--nn_secondary_hover);}.titleBar::placeholder {- color: var(--nn_placeholder);+ color: var(--nn_primary_placeholder);}.container {diff --git a/packages/editor-mobile/src/components/tags.tsx b/packages/editor-mobile/src/components/tags.tsxindex b0ef8cea4..06125f0d8 100644--- a/packages/editor-mobile/src/components/tags.tsx+++ b/packages/editor-mobile/src/components/tags.tsx@@ -55,8 +55,8 @@ function Tags(): JSX.Element {openManageTagsSheet();}}style={{- border: "1px solid var(--nn_border)",- backgroundColor: "var(--nn_nav)",+ border: `1px solid var(--nn_primary_border)`,+ backgroundColor: "var(--nn_secondary_background)",marginRight: 5,borderRadius: 100,padding: "0px 10px",@@ -73,7 +73,7 @@ function Tags(): JSX.Element {style={{marginRight: 4,fontSize: 13,- color: "var(--nn_icon)",+ color: "var(--nn_primary_icon)",userSelect: "none"}}>@@ -88,7 +88,7 @@ function Tags(): JSX.Element {viewBox="0 0 24 24"><path- fill="var(--nn_accent)"+ fill="var(--nn_primary_accent)"d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"/></svg>@@ -99,15 +99,15 @@ function Tags(): JSX.Element {key={tag.title}className={styles.btn}style={{- border: "1px solid var(--nn_border)",- backgroundColor: "var(--nn_nav)",+ border: "1px solid var(--nn_primary_border)",+ backgroundColor: "var(--nn_secondary_background)",marginRight: 5,borderRadius: 100,padding: "0px 10px",height: "30px",fontFamily: "Open Sans",fontSize: 13,- color: "var(--nn_icon)",+ color: "var(--nn_primary_icon)",userSelect: "none",WebkitUserSelect: "none"}}diff --git a/packages/editor-mobile/src/components/title.tsx b/packages/editor-mobile/src/components/title.tsxindex f1b9acd6e..bc0d85d09 100644--- a/packages/editor-mobile/src/components/title.tsx+++ b/packages/editor-mobile/src/components/title.tsx@@ -63,8 +63,8 @@ function Title({fontWeight: 600,fontFamily: getFontById(fontFamily)?.font || "Open Sans",backgroundColor: "transparent",- color: "var(--nn_heading)",- caretColor: "var(--nn_accent)",+ color: "var(--nn_primary_heading)",+ caretColor: "var(--nn_primary_accent)",borderRadius: 0}}maxLength={150}diff --git a/packages/editor-mobile/src/hooks/useEditorController.ts b/packages/editor-mobile/src/hooks/useEditorController.tsindex 5a81ef049..a91498aa3 100644--- a/packages/editor-mobile/src/hooks/useEditorController.ts+++ b/packages/editor-mobile/src/hooks/useEditorController.ts@@ -25,8 +25,9 @@ import {useRef,useState} from "react";-import { useEditorThemeStore } from "../state/theme";import { EventTypes, isReactNative, post } from "../utils";+import { useThemeColors, useThemeEngineStore } from "@notesnook/theme";+import { injectCss, transform } from "../utils/css";type Attachment = {hash: string;@@ -100,6 +101,8 @@ export type EditorController = {};export function useEditorController(update: () => void): EditorController {+ const setTheme = useThemeEngineStore((store) => store.setTheme);+ const { colors } = useThemeColors("editor");const [title, setTitle] = useState("");const [titlePlaceholder, setTitlePlaceholder] = useState("Note title");const htmlContentRef = useRef<string | null>(null);@@ -126,6 +129,10 @@ export function useEditorController(update: () => void): EditorController {}, ms);}, []);+ useEffect(() => {+ injectCss(transform(colors));+ }, [colors]);+const contentChange = useCallback((editor: Editor) => {const currentSessionId = globalThis.sessionId;@@ -182,7 +189,7 @@ export function useEditorController(update: () => void): EditorController {countWords();break;case "native:theme":- useEditorThemeStore.getState().setColors(message.value);+ setTheme(message.value);break;case "native:title":setTitle(value);@@ -202,7 +209,7 @@ export function useEditorController(update: () => void): EditorController {}post(type); // Notify that message was delivered successfully.},- [update, countWords]+ [update, countWords, setTheme]);useEffect(() => {diff --git a/packages/editor-mobile/src/state/theme.tsx b/packages/editor-mobile/src/state/theme.tsxdeleted file mode 100644index 13e90b2f4..000000000--- a/packages/editor-mobile/src/state/theme.tsx+++ /dev/null@@ -1,100 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import create, { State } from "zustand";-import { injectCss, transform } from "../utils/css";-export type Colors = {- night: boolean;- bg: string;- navbg: string;- input: string;- nav: string;- heading: string;- pri: string;- sec: string;- light: string;- transGray: string;- accent: string;- shade: string;- fg: string;- normal: string;- errorText: string;- successBg: string;- successText: string;- warningBg: string;- warningText: string;- red: string;- orange: string;- yellow: string;- green: string;- blue: string;- purple: string;- gray: string;- discord: string;- border: string;- placeholder: string;-};--const DefaultColors = {- accent: "#008837",- shade: "#00883712",- fg: "#008837",- normal: "black",- icon: "gray",- transGray: "#00000010",- errorBg: "#FFB6C1",- errorText: "#ff6961",- successBg: "#DFF2BF",- successText: "#4F8A10",- warningBg: "#FF990020",- warningText: "#FF9900",- red: "#f44336",- orange: "#FF9800",- yellow: "#FFD600",- green: "#4CAF50",- blue: "#2196F3",- purple: "#673AB7",- gray: "#9E9E9E",- discord: "#5865F2",- night: false,- bg: "#ffffff",- navbg: "#f7f7f7",- nav: "#f7f7f7",- pri: "#424242",- sec: "white",- light: "#ffffff",- input: "transparent",- heading: "#212121",- border: "#E8E8E8",- placeholder: "#a9a9a9"-};--injectCss(transform(DefaultColors));-interface ThemeState extends State {- colors: Colors;- setColors: (colors: Colors) => void;-}--export const useEditorThemeStore = create<ThemeState>((set) => ({- colors: DefaultColors,- setColors: (colors) => {- injectCss(transform(colors));- set({ colors: colors });- }-}));diff --git a/packages/editor-mobile/src/theme-factory/index.tsx b/packages/editor-mobile/src/theme-factory/index.tsxnew file mode 100644index 000000000..6fe353908--- /dev/null+++ b/packages/editor-mobile/src/theme-factory/index.tsx@@ -0,0 +1,89 @@+/*+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 { PropsWithChildren, useMemo } from "react";+import { Theme, ThemeFactory, useThemeColors } from "@notesnook/theme";+import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";++const modifyToolbarTheme = (toolbarTheme: Theme) => {+ toolbarTheme.space = [0, 10, 12, 18];+ toolbarTheme.space.small = "10px";++ toolbarTheme.buttons.menuitem = {+ ...toolbarTheme.buttons.menuitem,+ height: "50px",+ paddingX: "20px",+ borderBottomWidth: 0+ };++ toolbarTheme.iconSizes = {+ big: 20,+ medium: 18,+ small: 18+ };+ toolbarTheme.fontSizes = {+ ...toolbarTheme.fontSizes,+ subBody: "0.8rem",+ body: "0.9rem"+ };++ toolbarTheme.radii = {+ ...toolbarTheme.radii,+ small: 5+ };++ toolbarTheme.buttons.menuitem = {+ ...toolbarTheme.buttons.menuitem,+ px: 5,+ height: "45px"+ };+};++export const EmotionEditorToolbarTheme = (props: PropsWithChildren<any>) => {+ const { colors, isDark } = useThemeColors("editorToolbar");+ const theme = useMemo(+ () =>+ ThemeFactory.construct({+ colorScheme: isDark ? "dark" : "light",+ scope: colors+ }),+ [colors, isDark]+ );+ modifyToolbarTheme(theme);+ console.log(theme);+ return (+ <EmotionThemeProvider theme={theme}>{props.children}</EmotionThemeProvider>+ );+};++export const EmotionEditorTheme = (props: PropsWithChildren<any>) => {+ const { colors, isDark } = useThemeColors("editor");+ const theme = useMemo(+ () =>+ ThemeFactory.construct({+ colorScheme: isDark ? "dark" : "light",+ scope: colors+ }),+ [colors, isDark]+ );+ theme.colors.background = colors.primary.background || "#f0f0f0";+ theme.space = [0, 10, 12, 20];+ return (+ <EmotionThemeProvider theme={theme}>{props.children}</EmotionThemeProvider>+ );+};diff --git a/packages/editor-mobile/src/utils/css.ts b/packages/editor-mobile/src/utils/css.tsindex b6314e92f..7553a8542 100644--- a/packages/editor-mobile/src/utils/css.ts+++ b/packages/editor-mobile/src/utils/css.ts@@ -16,7 +16,7 @@ GNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import type { Colors } from "../state/theme";+import { Colors, Variants } from "@notesnook/theme";export function removeCss(id: string): void {const link = document.getElementById(id);@@ -62,10 +62,15 @@ export function changeSvgTheme(newAccent: string): void {nodes[n].setAttribute("fill", newAccent);}-export function transform(colors: Colors): string {+export function transform(variants: Variants): string {let root = ":root {";- for (const color in colors) {- root += `--nn_${color}: ${colors[color as keyof Colors]};`;+ for (const variant in variants) {+ const variantColors = variants[variant as keyof Variants];+ for (const color in variantColors) {+ root += `--nn_${variant}_${color}: ${+ variantColors[color as keyof Colors]+ };`;+ }}return root + "}";}diff --git a/packages/editor/package-lock.json b/packages/editor/package-lock.jsonindex 32850628e..efa9bae04 100644--- a/packages/editor/package-lock.json+++ b/packages/editor/package-lock.json@@ -10,12 +10,13 @@"hasInstallScript": true,"license": "GPL-3.0-or-later","dependencies": {- "@emotion/react": "^11.10.0",+ "@emotion/react": "11.11.1","@notesnook/core": "file:../core","@notesnook/theme": "file:../theme",+ "@notesnook/ui": "file:../ui","@social-embed/lib": "^0.0.2-next.1",- "@theme-ui/components": "^0.14.7",- "@theme-ui/core": "^0.14.7",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0","@tiptap/core": "2.0.3","@tiptap/extension-character-count": "2.0.3","@tiptap/extension-color": "2.0.3",@@ -44,7 +45,7 @@"prism-themes": "^1.9.0","prosemirror-codemark": "^0.4.1","re-resizable": "^6.9.9",- "react-colorful": "^5.5.1",+ "react-colorful": "^5.6.1","react-modal": "^3.15.1","redent": "^4.0.0","refractor": "^4.8.0",@@ -54,8 +55,8 @@"zustand": "^4.3.8"},"devDependencies": {- "@mdi/js": "^6.9.96",- "@mdi/react": "^1.6.0",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1","@types/katex": "^0.14.0","@types/prismjs": "^1.26.0","@types/react": "17.0.2",@@ -73,8 +74,11 @@"web-vitals": "^2.1.4"},"peerDependencies": {- "@mdi/js": ">=6.9.96",- "@mdi/react": ">=1.6.0",+ "@emotion/react": "11.11.1",+ "@mdi/js": ">=7.2.96",+ "@mdi/react": ">=1.6.1",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0","react": ">=17.0.0","react-dom": ">=17.0.0"}@@ -133,11 +137,54 @@"version": "1.2.0","license": "GPL-3.0-or-later","dependencies": {+ "@emotion/react": "11.11.1",+ "@theme-ui/color": "^0.16.0",+ "@theme-ui/components": "0.14.7",+ "@theme-ui/core": "0.14.7",+ "tinycolor2": "^1.4.2",+ "zustand": "^4.3.8"+ },+ "devDependencies": {+ "@trpc/server": "^10.31.0",+ "@types/react": "17.0.2",+ "@types/tinycolor2": "^1.4.3",+ "isomorphic-fetch": "^3.0.0",+ "ts-json-schema-generator": "^1.2.0"+ },+ "peerDependencies": {+ "react": "17.0.2"+ }+ },+ "../ui": {+ "name": "@notesnook/ui",+ "version": "1.0.0",+ "license": "GPL-3.0-or-later",+ "dependencies": {+ "@emotion/react": "11.11.1",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1",+ "@notesnook/theme": "file:../theme",+ "@theme-ui/components": "^0.14.7","@theme-ui/core": "^0.14.7",- "tinycolor2": "^1.4.2"+ "framer-motion": "^6.5.1",+ "mac-scrollbar": "^0.10.3",+ "react-modal": "^3.15.1"},"devDependencies": {- "@types/tinycolor2": "^1.4.3"+ "@types/react": "17.0.2",+ "@types/react-dom": "17.0.2",+ "@types/react-modal": "^3.15.1",+ "react": "17.0.2",+ "react-dom": "17.0.2"+ },+ "peerDependencies": {+ "@emotion/react": "11.11.1",+ "@mdi/js": ">=7.2.96",+ "@mdi/react": ">=1.6.1",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0",+ "react": ">=17.0.0",+ "react-dom": ">=17.0.0"}},"node_modules/@babel/code-frame": {@@ -162,14 +209,6 @@"node": ">=6.9.0"}},- "node_modules/@babel/helper-plugin-utils": {- "version": "7.20.2",- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz",- "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==",- "engines": {- "node": ">=6.9.0"- }- },"node_modules/@babel/helper-string-parser": {"version": "7.22.5","resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",@@ -199,24 +238,9 @@"node": ">=6.9.0"}},- "node_modules/@babel/plugin-syntax-jsx": {- "version": "7.18.6",- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz",- "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==",- "dependencies": {- "@babel/helper-plugin-utils": "^7.18.6"- },- "engines": {- "node": ">=6.9.0"- },- "peerDependencies": {- "@babel/core": "^7.0.0-0"- }- },"node_modules/@babel/runtime": {- "version": "7.21.0",- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz",- "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==",+ "version": "7.20.13",+ "license": "MIT","dependencies": {"regenerator-runtime": "^0.13.11"},@@ -238,133 +262,137 @@}},"node_modules/@emotion/babel-plugin": {- "version": "11.10.2",- "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.10.2.tgz",- "integrity": "sha512-xNQ57njWTFVfPAc3cjfuaPdsgLp5QOSuRsj9MA6ndEhH/AzuZM86qIQzt6rq+aGBwj3n5/TkLmU5lhAfdRmogA==",+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz",+ "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==","dependencies": {"@babel/helper-module-imports": "^7.16.7",- "@babel/plugin-syntax-jsx": "^7.17.12","@babel/runtime": "^7.18.3",- "@emotion/hash": "^0.9.0",- "@emotion/memoize": "^0.8.0",- "@emotion/serialize": "^1.1.0",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/serialize": "^1.1.2","babel-plugin-macros": "^3.1.0","convert-source-map": "^1.5.0","escape-string-regexp": "^4.0.0","find-root": "^1.1.0","source-map": "^0.5.7",- "stylis": "4.0.13"- },- "peerDependencies": {- "@babel/core": "^7.0.0"+ "stylis": "4.2.0"}},+ "node_modules/@emotion/babel-plugin/node_modules/@emotion/memoize": {+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="+ },"node_modules/@emotion/cache": {- "version": "11.10.3",- "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.10.3.tgz",- "integrity": "sha512-Psmp/7ovAa8appWh3g51goxu/z3iVms7JXOreq136D8Bbn6dYraPnmL6mdM8GThEx9vwSn92Fz+mGSjBzN8UPQ==",+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz",+ "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==","dependencies": {- "@emotion/memoize": "^0.8.0",- "@emotion/sheet": "^1.2.0",- "@emotion/utils": "^1.2.0",- "@emotion/weak-memoize": "^0.3.0",- "stylis": "4.0.13"+ "@emotion/memoize": "^0.8.1",+ "@emotion/sheet": "^1.2.2",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1",+ "stylis": "4.2.0"}},+ "node_modules/@emotion/cache/node_modules/@emotion/memoize": {+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="+ },"node_modules/@emotion/hash": {- "version": "0.9.0",- "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.0.tgz",- "integrity": "sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ=="+ "version": "0.9.1",+ "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz",+ "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ=="},"node_modules/@emotion/is-prop-valid": {"version": "0.8.8",- "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",- "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==",+ "license": "MIT","dependencies": {"@emotion/memoize": "0.7.4"}},"node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize": {"version": "0.7.4",- "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",- "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw=="+ "license": "MIT"},"node_modules/@emotion/memoize": {- "version": "0.8.0",- "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz",- "integrity": "sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA=="+ "version": "0.7.5",+ "license": "MIT"},"node_modules/@emotion/react": {- "version": "11.10.4",- "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.10.4.tgz",- "integrity": "sha512-j0AkMpr6BL8gldJZ6XQsQ8DnS9TxEQu1R+OGmDZiWjBAJtCcbt0tS3I/YffoqHXxH6MjgI7KdMbYKw3MEiU9eA==",+ "version": "11.11.1",+ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz",+ "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==","dependencies": {"@babel/runtime": "^7.18.3",- "@emotion/babel-plugin": "^11.10.0",- "@emotion/cache": "^11.10.0",- "@emotion/serialize": "^1.1.0",- "@emotion/use-insertion-effect-with-fallbacks": "^1.0.0",- "@emotion/utils": "^1.2.0",- "@emotion/weak-memoize": "^0.3.0",+ "@emotion/babel-plugin": "^11.11.0",+ "@emotion/cache": "^11.11.0",+ "@emotion/serialize": "^1.1.2",+ "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1","hoist-non-react-statics": "^3.3.1"},"peerDependencies": {- "@babel/core": "^7.0.0","react": ">=16.8.0"},"peerDependenciesMeta": {- "@babel/core": {- "optional": true- },"@types/react": {"optional": true}}},"node_modules/@emotion/serialize": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.0.tgz",- "integrity": "sha512-F1ZZZW51T/fx+wKbVlwsfchr5q97iW8brAnXmsskz4d0hVB4O3M/SiA3SaeH06x02lSNzkkQv+n3AX3kCXKSFA==",+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz",+ "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==","dependencies": {- "@emotion/hash": "^0.9.0",- "@emotion/memoize": "^0.8.0",- "@emotion/unitless": "^0.8.0",- "@emotion/utils": "^1.2.0",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/unitless": "^0.8.1",+ "@emotion/utils": "^1.2.1","csstype": "^3.0.2"}},+ "node_modules/@emotion/serialize/node_modules/@emotion/memoize": {+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="+ },"node_modules/@emotion/sheet": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.0.tgz",- "integrity": "sha512-OiTkRgpxescko+M51tZsMq7Puu/KP55wMT8BgpcXVG2hqXc0Vo0mfymJ/Uj24Hp0i083ji/o0aLddh08UEjq8w=="+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz",+ "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA=="},"node_modules/@emotion/unitless": {- "version": "0.8.0",- "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz",- "integrity": "sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw=="+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz",+ "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ=="},"node_modules/@emotion/use-insertion-effect-with-fallbacks": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz",- "integrity": "sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A==",+ "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==","peerDependencies": {"react": ">=16.8.0"}},"node_modules/@emotion/utils": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.0.tgz",- "integrity": "sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw=="+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz",+ "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg=="},"node_modules/@emotion/weak-memoize": {- "version": "0.3.0",- "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz",- "integrity": "sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg=="+ "version": "0.3.1",+ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz",+ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww=="},"node_modules/@esbuild/android-arm": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz",- "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz",+ "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==","cpu": ["arm"],@@ -378,9 +406,9 @@}},"node_modules/@esbuild/android-arm64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz",- "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz",+ "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==","cpu": ["arm64"],@@ -394,9 +422,9 @@}},"node_modules/@esbuild/android-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz",- "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz",+ "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==","cpu": ["x64"],@@ -410,9 +438,9 @@}},"node_modules/@esbuild/darwin-arm64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz",- "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz",+ "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==","cpu": ["arm64"],@@ -426,9 +454,9 @@}},"node_modules/@esbuild/darwin-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz",- "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz",+ "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==","cpu": ["x64"],@@ -442,9 +470,9 @@}},"node_modules/@esbuild/freebsd-arm64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz",- "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz",+ "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==","cpu": ["arm64"],@@ -458,9 +486,9 @@}},"node_modules/@esbuild/freebsd-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz",- "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz",+ "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==","cpu": ["x64"],@@ -474,9 +502,9 @@}},"node_modules/@esbuild/linux-arm": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz",- "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz",+ "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==","cpu": ["arm"],@@ -490,9 +518,9 @@}},"node_modules/@esbuild/linux-arm64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz",- "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz",+ "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==","cpu": ["arm64"],@@ -506,9 +534,9 @@}},"node_modules/@esbuild/linux-ia32": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz",- "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz",+ "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==","cpu": ["ia32"],@@ -522,9 +550,9 @@}},"node_modules/@esbuild/linux-loong64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz",- "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz",+ "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==","cpu": ["loong64"],@@ -538,9 +566,9 @@}},"node_modules/@esbuild/linux-mips64el": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz",- "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz",+ "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==","cpu": ["mips64el"],@@ -554,9 +582,9 @@}},"node_modules/@esbuild/linux-ppc64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz",- "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz",+ "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==","cpu": ["ppc64"],@@ -570,9 +598,9 @@}},"node_modules/@esbuild/linux-riscv64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz",- "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz",+ "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==","cpu": ["riscv64"],@@ -586,9 +614,9 @@}},"node_modules/@esbuild/linux-s390x": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz",- "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz",+ "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==","cpu": ["s390x"],@@ -602,9 +630,9 @@}},"node_modules/@esbuild/linux-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz",- "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz",+ "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==","cpu": ["x64"],@@ -618,9 +646,9 @@}},"node_modules/@esbuild/netbsd-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz",- "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz",+ "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==","cpu": ["x64"],@@ -634,9 +662,9 @@}},"node_modules/@esbuild/openbsd-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz",- "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz",+ "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==","cpu": ["x64"],@@ -650,9 +678,9 @@}},"node_modules/@esbuild/sunos-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz",- "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz",+ "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==","cpu": ["x64"],@@ -666,9 +694,9 @@}},"node_modules/@esbuild/win32-arm64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz",- "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz",+ "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==","cpu": ["arm64"],@@ -682,9 +710,9 @@}},"node_modules/@esbuild/win32-ia32": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz",- "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz",+ "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==","cpu": ["ia32"],@@ -698,9 +726,9 @@}},"node_modules/@esbuild/win32-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz",- "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz",+ "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==","cpu": ["x64"],@@ -715,20 +743,18 @@},"node_modules/@linaria/core": {"version": "3.0.0-beta.13",- "resolved": "https://registry.npmjs.org/@linaria/core/-/core-3.0.0-beta.13.tgz",- "integrity": "sha512-3zEi5plBCOsEzUneRVuQb+2SAx3qaC1dj0FfFAI6zIJQoDWu0dlSwKijMRack7oO9tUWrchfj3OkKQAd1LBdVg=="+ "license": "MIT"},"node_modules/@mdi/js": {- "version": "6.9.96",- "resolved": "https://registry.npmjs.org/@mdi/js/-/js-6.9.96.tgz",- "integrity": "sha512-rK0/vLFaiItYS2W7uVmaKPKnhNQE4XVkylpk5njtVwENnp8elwY5uRL6qvdj2esuvUHG7DwygE4Qu3eKxxuJiQ==",+ "version": "7.2.96",+ "resolved": "https://registry.npmjs.org/@mdi/js/-/js-7.2.96.tgz",+ "integrity": "sha512-paR9M9ZT7rKbh2boksNUynuSZMHhqRYnEZOm/KrZTjQ4/FzyhjLHuvw/8XYzP+E7fS4+/Ms/82EN1pl/OFsiIA==","dev": true},"node_modules/@mdi/react": {"version": "1.6.1",- "resolved": "https://registry.npmjs.org/@mdi/react/-/react-1.6.1.tgz",- "integrity": "sha512-4qZeDcluDFGFTWkHs86VOlHkm6gnKaMql13/gpIcUQ8kzxHgpj31NuCkD8abECVfbULJ3shc7Yt4HJ6Wu6SN4w==","dev": true,+ "license": "MIT","dependencies": {"prop-types": "^15.7.2"}@@ -805,18 +831,20 @@"resolved": "../theme","link": true},+ "node_modules/@notesnook/ui": {+ "resolved": "../ui",+ "link": true+ },"node_modules/@remirror/core-constants": {"version": "2.0.0",- "resolved": "https://registry.npmjs.org/@remirror/core-constants/-/core-constants-2.0.0.tgz",- "integrity": "sha512-vpePPMecHJllBqCWXl6+FIcZqS+tRUM2kSCCKFeEo1H3XUEv3ocijBIPhnlSAa7g6maX+12ATTgxrOsLpWVr2g==",+ "license": "MIT","dependencies": {"@babel/runtime": "^7.13.10"}},"node_modules/@remirror/core-helpers": {"version": "2.0.1",- "resolved": "https://registry.npmjs.org/@remirror/core-helpers/-/core-helpers-2.0.1.tgz",- "integrity": "sha512-s8M1pn33aBUhduvD1QR02uUQMegnFkGaTr4c1iBzxTTyg0rbQstzuQ7Q8TkL6n64JtgCdJS9jLz2dONb2meBKQ==",+ "license": "MIT","dependencies": {"@babel/runtime": "^7.13.10","@linaria/core": "3.0.0-beta.13",@@ -837,129 +865,108 @@},"node_modules/@remirror/types": {"version": "1.0.0",- "resolved": "https://registry.npmjs.org/@remirror/types/-/types-1.0.0.tgz",- "integrity": "sha512-7HQbW7k8VxrAtfzs9FxwO6XSDabn8tSFDi1wwzShOnU+cvaYpfxu0ygyTk3TpXsag1hgFKY3ZIlAfB4WVz2LkQ==",+ "license": "MIT","dependencies": {"type-fest": "^2.0.0"}},"node_modules/@social-embed/lib": {"version": "0.0.2-next.1",- "resolved": "https://registry.npmjs.org/@social-embed/lib/-/lib-0.0.2-next.1.tgz",- "integrity": "sha512-Ug3VCJL6GODPvYnWGjP5n+wWhc711MN4VnwhRoOYkP8h51rqJj7ttKM8EM7Mq2+KaD2JFb4x05JjMv6S33pf6g=="+ "license": "MIT"},"node_modules/@styled-system/background": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/background/-/background-5.1.2.tgz",- "integrity": "sha512-jtwH2C/U6ssuGSvwTN3ri/IyjdHb8W9X/g8Y0JLcrH02G+BW3OS8kZdHphF1/YyRklnrKrBT2ngwGUK6aqqV3A==",+ "license": "MIT","dependencies": {"@styled-system/core": "^5.1.2"}},"node_modules/@styled-system/border": {"version": "5.1.5",- "resolved": "https://registry.npmjs.org/@styled-system/border/-/border-5.1.5.tgz",- "integrity": "sha512-JvddhNrnhGigtzWRCVuAHepniyVi6hBlimxWDVAdcTuk7aRn9BYJUwfHslURtwYFsF5FoEs8Zmr1oZq2M1AP0A==",+ "license": "MIT","dependencies": {"@styled-system/core": "^5.1.2"}},"node_modules/@styled-system/color": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/color/-/color-5.1.2.tgz",- "integrity": "sha512-1kCkeKDZkt4GYkuFNKc7vJQMcOmTl3bJY3YBUs7fCNM6mMYJeT1pViQ2LwBSBJytj3AB0o4IdLBoepgSgGl5MA==",+ "license": "MIT","dependencies": {"@styled-system/core": "^5.1.2"}},"node_modules/@styled-system/core": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/core/-/core-5.1.2.tgz",- "integrity": "sha512-XclBDdNIy7OPOsN4HBsawG2eiWfCcuFt6gxKn1x4QfMIgeO6TOlA2pZZ5GWZtIhCUqEPTgIBta6JXsGyCkLBYw==",+ "license": "MIT","dependencies": {"object-assign": "^4.1.1"}},"node_modules/@styled-system/css": {"version": "5.1.5",- "resolved": "https://registry.npmjs.org/@styled-system/css/-/css-5.1.5.tgz",- "integrity": "sha512-XkORZdS5kypzcBotAMPBoeckDs9aSZVkvrAlq5K3xP8IMAUek+x2O4NtwoSgkYkWWzVBu6DGdFZLR790QWGG+A=="+ "license": "MIT"},"node_modules/@styled-system/flexbox": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/flexbox/-/flexbox-5.1.2.tgz",- "integrity": "sha512-6hHV52+eUk654Y1J2v77B8iLeBNtc+SA3R4necsu2VVinSD7+XY5PCCEzBFaWs42dtOEDIa2lMrgL0YBC01mDQ==",+ "license": "MIT","dependencies": {"@styled-system/core": "^5.1.2"}},"node_modules/@styled-system/grid": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/grid/-/grid-5.1.2.tgz",- "integrity": "sha512-K3YiV1KyHHzgdNuNlaw8oW2ktMuGga99o1e/NAfTEi5Zsa7JXxzwEnVSDSBdJC+z6R8WYTCYRQC6bkVFcvdTeg==",+ "license": "MIT","dependencies": {"@styled-system/core": "^5.1.2"}},"node_modules/@styled-system/layout": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/layout/-/layout-5.1.2.tgz",- "integrity": "sha512-wUhkMBqSeacPFhoE9S6UF3fsMEKFv91gF4AdDWp0Aym1yeMPpqz9l9qS/6vjSsDPF7zOb5cOKC3tcKKOMuDCPw==",+ "license": "MIT","dependencies": {"@styled-system/core": "^5.1.2"}},"node_modules/@styled-system/position": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/position/-/position-5.1.2.tgz",- "integrity": "sha512-60IZfMXEOOZe3l1mCu6sj/2NAyUmES2kR9Kzp7s2D3P4qKsZWxD1Se1+wJvevb+1TP+ZMkGPEYYXRyU8M1aF5A==",+ "license": "MIT","dependencies": {"@styled-system/core": "^5.1.2"}},"node_modules/@styled-system/shadow": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/shadow/-/shadow-5.1.2.tgz",- "integrity": "sha512-wqniqYb7XuZM7K7C0d1Euxc4eGtqEe/lvM0WjuAFsQVImiq6KGT7s7is+0bNI8O4Dwg27jyu4Lfqo/oIQXNzAg==",+ "license": "MIT","dependencies": {"@styled-system/core": "^5.1.2"}},"node_modules/@styled-system/should-forward-prop": {"version": "5.1.5",- "resolved": "https://registry.npmjs.org/@styled-system/should-forward-prop/-/should-forward-prop-5.1.5.tgz",- "integrity": "sha512-+rPRomgCGYnUIaFabDoOgpSDc4UUJ1KsmlnzcEp0tu5lFrBQKgZclSo18Z1URhaZm7a6agGtS5Xif7tuC2s52Q==",+ "license": "MIT","dependencies": {"@emotion/is-prop-valid": "^0.8.1","@emotion/memoize": "^0.7.1","styled-system": "^5.1.5"}},- "node_modules/@styled-system/should-forward-prop/node_modules/@emotion/memoize": {- "version": "0.7.5",- "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz",- "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ=="- },"node_modules/@styled-system/space": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/space/-/space-5.1.2.tgz",- "integrity": "sha512-+zzYpR8uvfhcAbaPXhH8QgDAV//flxqxSjHiS9cDFQQUSznXMQmxJegbhcdEF7/eNnJgHeIXv1jmny78kipgBA==",+ "license": "MIT","dependencies": {"@styled-system/core": "^5.1.2"}},"node_modules/@styled-system/typography": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/typography/-/typography-5.1.2.tgz",- "integrity": "sha512-BxbVUnN8N7hJ4aaPOd7wEsudeT7CxarR+2hns8XCX1zp0DFfbWw4xYa/olA0oQaqx7F1hzDg+eRaGzAJbF+jOg==",+ "license": "MIT","dependencies": {"@styled-system/core": "^5.1.2"}},"node_modules/@styled-system/variant": {"version": "5.1.5",- "resolved": "https://registry.npmjs.org/@styled-system/variant/-/variant-5.1.5.tgz",- "integrity": "sha512-Yn8hXAFoWIro8+Q5J8YJd/mP85Teiut3fsGVR9CAxwgNfIAiqlYxsk5iHU7VHJks/0KjL4ATSjmbtCDC/4l1qw==",+ "license": "MIT","dependencies": {"@styled-system/core": "^5.1.2","@styled-system/css": "^5.1.5"@@ -967,8 +974,7 @@},"node_modules/@theme-ui/components": {"version": "0.14.7",- "resolved": "https://registry.npmjs.org/@theme-ui/components/-/components-0.14.7.tgz",- "integrity": "sha512-iIzqBvRL8GNVkzuZinxInYNFW/38pvqqthuCgLsnOC0/A4Q4v13mn/fxlZa6pJjwouswsRLOrkd63bS7Svzkfw==",+ "license": "MIT","dependencies": {"@styled-system/color": "^5.1.2","@styled-system/should-forward-prop": "^5.1.2",@@ -983,8 +989,7 @@},"node_modules/@theme-ui/core": {"version": "0.14.7",- "resolved": "https://registry.npmjs.org/@theme-ui/core/-/core-0.14.7.tgz",- "integrity": "sha512-u60cKOZYsGDG9sSoM4jYj743OpNXXU27f7vXGwrO/B1t/1sv1MAQA0R8HtVwoi9DyOIcOmWfMWYTiMg+4vV1MA==",+ "license": "MIT","dependencies": {"@theme-ui/css": "0.14.7","@theme-ui/parse-props": "0.14.7",@@ -997,8 +1002,7 @@},"node_modules/@theme-ui/css": {"version": "0.14.7",- "resolved": "https://registry.npmjs.org/@theme-ui/css/-/css-0.14.7.tgz",- "integrity": "sha512-DbGw0T4MrTjiRs6lnyYgSD2TV/LvFErzDDpm0ICPL2KqDwqgHX4mFpDafj8/DkyCO9wx2KEiUuE+0NtOlR3i4w==",+ "license": "MIT","dependencies": {"csstype": "^3.0.10"},@@ -1008,8 +1012,7 @@},"node_modules/@theme-ui/parse-props": {"version": "0.14.7",- "resolved": "https://registry.npmjs.org/@theme-ui/parse-props/-/parse-props-0.14.7.tgz",- "integrity": "sha512-qF10mAYs3wcIkSU5ZSbmHUngwTkPS87D23qg1ArbeO+m+/e4uqOy0+6W0Lt/4JTP7lnWWsCYuScK3F3hOp2q0w==",+ "license": "MIT","dependencies": {"@theme-ui/css": "0.14.7"},@@ -1516,9 +1519,9 @@}},"node_modules/@types/chai": {- "version": "4.3.4",- "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz",- "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==",+ "version": "4.3.5",+ "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.5.tgz",+ "integrity": "sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==","dev": true},"node_modules/@types/chai-subset": {@@ -1532,33 +1535,28 @@},"node_modules/@types/hast": {"version": "2.3.4",- "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz",- "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==",+ "license": "MIT","dependencies": {"@types/unist": "*"}},"node_modules/@types/katex": {"version": "0.14.0",- "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.14.0.tgz",- "integrity": "sha512-+2FW2CcT0K3P+JMR8YG846bmDwplKUTsWgT2ENwdQ1UdVfRk3GQrh6Mi4sTopy30gI8Uau5CEqHTDZ6YvWIUPA==",- "dev": true+ "dev": true,+ "license": "MIT"},"node_modules/@types/node": {- "version": "18.11.0",- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.0.tgz",- "integrity": "sha512-IOXCvVRToe7e0ny7HpT/X9Rb2RYtElG1a+VshjwT00HxrM2dWBApHQoqsI6WiY7Q03vdf2bCrIGzVrkF/5t10w==",- "dev": true+ "version": "18.13.0",+ "dev": true,+ "license": "MIT"},"node_modules/@types/object.omit": {"version": "3.0.0",- "resolved": "https://registry.npmjs.org/@types/object.omit/-/object.omit-3.0.0.tgz",- "integrity": "sha512-I27IoPpH250TUzc9FzXd0P1BV/BMJuzqD3jOz98ehf9dQqGkxlq+hO1bIqZGWqCg5bVOy0g4AUVJtnxe0klDmw=="+ "license": "MIT"},"node_modules/@types/object.pick": {"version": "1.3.2",- "resolved": "https://registry.npmjs.org/@types/object.pick/-/object.pick-1.3.2.tgz",- "integrity": "sha512-sn7L+qQ6RLPdXRoiaE7bZ/Ek+o4uICma/lBFPyJEKDTPTBP1W8u0c4baj3EiS4DiqLs+Hk+KUGvMVJtAw3ePJg=="+ "license": "MIT"},"node_modules/@types/parse-json": {"version": "4.0.0",@@ -1567,20 +1565,17 @@},"node_modules/@types/prismjs": {"version": "1.26.0",- "resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.0.tgz",- "integrity": "sha512-ZTaqn/qSqUuAq1YwvOFQfVW1AR/oQJlLSZVustdjwI+GZ8kr0MSHBj0tsXPW1EqHubx50gtBEjbPGsdZwQwCjQ=="+ "license": "MIT"},"node_modules/@types/prop-types": {"version": "15.7.5",- "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",- "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==",- "dev": true+ "dev": true,+ "license": "MIT"},"node_modules/@types/react": {"version": "17.0.2",- "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.2.tgz",- "integrity": "sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA==","dev": true,+ "license": "MIT","dependencies": {"@types/prop-types": "*","csstype": "^3.0.2"@@ -1588,9 +1583,8 @@},"node_modules/@types/react-color": {"version": "3.0.6",- "resolved": "https://registry.npmjs.org/@types/react-color/-/react-color-3.0.6.tgz",- "integrity": "sha512-OzPIO5AyRmLA7PlOyISlgabpYUa3En74LP8mTMa0veCA719SvYQov4WLMsHvCgXP+L+KI9yGhYnqZafVGG0P4w==","dev": true,+ "license": "MIT","dependencies": {"@types/react": "*","@types/reactcss": "*"@@ -1598,131 +1592,91 @@},"node_modules/@types/react-dom": {"version": "17.0.2",- "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.2.tgz",- "integrity": "sha512-Icd9KEgdnFfJs39KyRyr0jQ7EKhq8U6CcHRMGAS45fp5qgUvxL3ujUCfWFttUK2UErqZNj97t9gsVPNAqcwoCg==","dev": true,+ "license": "MIT","dependencies": {"@types/react": "*"}},"node_modules/@types/react-modal": {"version": "3.13.1",- "resolved": "https://registry.npmjs.org/@types/react-modal/-/react-modal-3.13.1.tgz",- "integrity": "sha512-iY/gPvTDIy6Z+37l+ibmrY+GTV4KQTHcCyR5FIytm182RQS69G5ps4PH2FxtC7bAQ2QRHXMevsBgck7IQruHNg==","dev": true,+ "license": "MIT","dependencies": {"@types/react": "*"}},"node_modules/@types/reactcss": {"version": "1.2.6",- "resolved": "https://registry.npmjs.org/@types/reactcss/-/reactcss-1.2.6.tgz",- "integrity": "sha512-qaIzpCuXNWomGR1Xq8SCFTtF4v8V27Y6f+b9+bzHiv087MylI/nTCqqdChNeWS7tslgROmYB7yeiruWX7WnqNg==","dev": true,+ "license": "MIT","dependencies": {"@types/react": "*"}},"node_modules/@types/styled-system": {- "version": "5.1.15",- "resolved": "https://registry.npmjs.org/@types/styled-system/-/styled-system-5.1.15.tgz",- "integrity": "sha512-1uls4wipZn8FtYFZ7upRVFDoEeOXTQTs2zuyOZPn02T6rjIxtvj2P2lG5qsxXHhKuKsu3thveCZrtaeLE/ibLg==",+ "version": "5.1.16",+ "license": "MIT","dependencies": {"csstype": "^3.0.2"}},"node_modules/@types/throttle-debounce": {"version": "2.1.0",- "resolved": "https://registry.npmjs.org/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz",- "integrity": "sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ=="+ "license": "MIT"},"node_modules/@types/tinycolor2": {"version": "1.4.3",- "resolved": "https://registry.npmjs.org/@types/tinycolor2/-/tinycolor2-1.4.3.tgz",- "integrity": "sha512-Kf1w9NE5HEgGxCRyIcRXR/ZYtDv0V8FVPtYHwLxl0O+maGX0erE77pQlD0gpP+/KByMZ87mOA79SjifhSB3PjQ==",- "dev": true+ "dev": true,+ "license": "MIT"},"node_modules/@types/unist": {"version": "2.0.6",- "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz",- "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ=="+ "license": "MIT"},"node_modules/@vitest/expect": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.29.2.tgz",- "integrity": "sha512-wjrdHB2ANTch3XKRhjWZN0UueFocH0cQbi2tR5Jtq60Nb3YOSmakjdAvUa2JFBu/o8Vjhj5cYbcMXkZxn1NzmA==",+ "version": "0.29.8",+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.29.8.tgz",+ "integrity": "sha512-xlcVXn5I5oTq6NiZSY3ykyWixBxr5mG8HYtjvpgg6KaqHm0mvhX18xuwl5YGxIRNt/A5jidd7CWcNHrSvgaQqQ==","dev": true,"dependencies": {- "@vitest/spy": "0.29.2",- "@vitest/utils": "0.29.2",+ "@vitest/spy": "0.29.8",+ "@vitest/utils": "0.29.8","chai": "^4.3.7"}},"node_modules/@vitest/runner": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.29.2.tgz",- "integrity": "sha512-A1P65f5+6ru36AyHWORhuQBJrOOcmDuhzl5RsaMNFe2jEkoj0faEszQS4CtPU/LxUYVIazlUtZTY0OEZmyZBnA==",+ "version": "0.29.8",+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.29.8.tgz",+ "integrity": "sha512-FzdhnRDwEr/A3Oo1jtIk/B952BBvP32n1ObMEb23oEJNO+qO5cBet6M2XWIDQmA7BDKGKvmhUf2naXyp/2JEwQ==","dev": true,"dependencies": {- "@vitest/utils": "0.29.2",+ "@vitest/utils": "0.29.8","p-limit": "^4.0.0","pathe": "^1.1.0"}},"node_modules/@vitest/spy": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.29.2.tgz",- "integrity": "sha512-Hc44ft5kaAytlGL2PyFwdAsufjbdOvHklwjNy/gy/saRbg9Kfkxfh+PklLm1H2Ib/p586RkQeNFKYuJInUssyw==",+ "version": "0.29.8",+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.29.8.tgz",+ "integrity": "sha512-VdjBe9w34vOMl5I5mYEzNX8inTxrZ+tYUVk9jxaZJmHFwmDFC/GV3KBFTA/JKswr3XHvZL+FE/yq5EVhb6pSAw==","dev": true,"dependencies": {"tinyspy": "^1.0.2"}},"node_modules/@vitest/utils": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.29.2.tgz",- "integrity": "sha512-F14/Uc+vCdclStS2KEoXJlOLAEyqRhnw0gM27iXw9bMTcyKRPJrQ+rlC6XZ125GIPvvKYMPpVxNhiou6PsEeYQ==",+ "version": "0.29.8",+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.29.8.tgz",+ "integrity": "sha512-qGzuf3vrTbnoY+RjjVVIBYfuWMjn3UMUqyQtdGNZ6ZIIyte7B37exj6LaVkrZiUTvzSadVvO/tJm8AEgbGCBPg==","dev": true,"dependencies": {"cli-truncate": "^3.1.0","diff": "^5.1.0","loupe": "^2.3.6",- "picocolors": "^1.0.0","pretty-format": "^27.5.1"}},- "node_modules/@vitest/utils/node_modules/ansi-styles": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",- "dev": true,- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/chalk/ansi-styles?sponsor=1"- }- },- "node_modules/@vitest/utils/node_modules/pretty-format": {- "version": "27.5.1",- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",- "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",- "dev": true,- "dependencies": {- "ansi-regex": "^5.0.1",- "ansi-styles": "^5.0.0",- "react-is": "^17.0.1"- },- "engines": {- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"- }- },- "node_modules/@vitest/utils/node_modules/react-is": {- "version": "17.0.2",- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",- "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",- "dev": true- },"node_modules/acorn": {"version": "8.8.2","resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",@@ -1766,8 +1720,7 @@},"node_modules/argparse": {"version": "2.0.1",- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="+ "license": "Python-2.0"},"node_modules/assertion-error": {"version": "1.1.0",@@ -1816,8 +1769,7 @@},"node_modules/case-anything": {"version": "2.1.10",- "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.10.tgz",- "integrity": "sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ==",+ "license": "MIT","engines": {"node": ">=12.13"},@@ -1866,8 +1818,7 @@},"node_modules/character-entities": {"version": "2.0.2",- "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz",- "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==",+ "license": "MIT","funding": {"type": "github","url": "https://github.com/sponsors/wooorm"@@ -1875,8 +1826,7 @@},"node_modules/character-entities-legacy": {"version": "3.0.0",- "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz",- "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==",+ "license": "MIT","funding": {"type": "github","url": "https://github.com/sponsors/wooorm"@@ -1884,8 +1834,7 @@},"node_modules/character-reference-invalid": {"version": "2.0.1",- "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz",- "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==",+ "license": "MIT","funding": {"type": "github","url": "https://github.com/sponsors/wooorm"@@ -1985,9 +1934,8 @@"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="},"node_modules/comma-separated-tokens": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.2.tgz",- "integrity": "sha512-G5yTt3KQN4Yn7Yk4ed73hlZ1evrFKXeUW3086p3PRFNp7m2vIjI6Pg+Kgb+oyzhd9F2qdcoj67+y3SdxL5XWsg==",+ "version": "2.0.3",+ "license": "MIT","funding": {"type": "github","url": "https://github.com/sponsors/wooorm"@@ -1995,8 +1943,7 @@},"node_modules/commander": {"version": "8.3.0",- "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",- "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",+ "license": "MIT","engines": {"node": ">= 12"}@@ -2007,9 +1954,9 @@"integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="},"node_modules/cosmiconfig": {- "version": "7.0.1",- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz",- "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==",+ "version": "7.1.0",+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",+ "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==","dependencies": {"@types/parse-json": "^4.0.0","import-fresh": "^3.2.1",@@ -2023,8 +1970,7 @@},"node_modules/crelt": {"version": "1.0.5",- "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.5.tgz",- "integrity": "sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA=="+ "license": "MIT"},"node_modules/css.escape": {"version": "1.5.1",@@ -2034,26 +1980,22 @@},"node_modules/csstype": {"version": "3.1.1",- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",- "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="+ "license": "MIT"},"node_modules/dash-get": {"version": "1.0.2",- "resolved": "https://registry.npmjs.org/dash-get/-/dash-get-1.0.2.tgz",- "integrity": "sha512-4FbVrHDwfOASx7uQVxeiCTo7ggSdYZbqs8lH+WU6ViypPlDbe9y6IP5VVUDQBv9DcnyaiPT5XT0UWHgJ64zLeQ=="+ "license": "MIT"},"node_modules/debug": {"version": "3.2.7",- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",- "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",+ "license": "MIT","dependencies": {"ms": "^2.1.1"}},"node_modules/decode-named-character-reference": {"version": "1.0.2",- "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz",- "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==",+ "license": "MIT","dependencies": {"character-entities": "^2.0.0"},@@ -2075,17 +2017,15 @@}},"node_modules/deepmerge": {- "version": "4.2.2",- "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",- "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",+ "version": "4.3.0",+ "license": "MIT","engines": {"node": ">=0.10.0"}},"node_modules/detect-indent": {"version": "7.0.1",- "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-7.0.1.tgz",- "integrity": "sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==",+ "license": "MIT","engines": {"node": ">=12.20"}@@ -2152,8 +2092,12 @@"node_modules/eastasianwidth": {"version": "0.2.0","resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",- "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",- "dev": true+ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="+ },+ "node_modules/emoji-regex": {+ "version": "9.2.2",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="},"node_modules/entities": {"version": "1.1.2",@@ -2169,9 +2113,9 @@}},"node_modules/esbuild": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz",- "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz",+ "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==","dev": true,"hasInstallScript": true,"bin": {@@ -2181,34 +2125,33 @@"node": ">=12"},"optionalDependencies": {- "@esbuild/android-arm": "0.16.17",- "@esbuild/android-arm64": "0.16.17",- "@esbuild/android-x64": "0.16.17",- "@esbuild/darwin-arm64": "0.16.17",- "@esbuild/darwin-x64": "0.16.17",- "@esbuild/freebsd-arm64": "0.16.17",- "@esbuild/freebsd-x64": "0.16.17",- "@esbuild/linux-arm": "0.16.17",- "@esbuild/linux-arm64": "0.16.17",- "@esbuild/linux-ia32": "0.16.17",- "@esbuild/linux-loong64": "0.16.17",- "@esbuild/linux-mips64el": "0.16.17",- "@esbuild/linux-ppc64": "0.16.17",- "@esbuild/linux-riscv64": "0.16.17",- "@esbuild/linux-s390x": "0.16.17",- "@esbuild/linux-x64": "0.16.17",- "@esbuild/netbsd-x64": "0.16.17",- "@esbuild/openbsd-x64": "0.16.17",- "@esbuild/sunos-x64": "0.16.17",- "@esbuild/win32-arm64": "0.16.17",- "@esbuild/win32-ia32": "0.16.17",- "@esbuild/win32-x64": "0.16.17"+ "@esbuild/android-arm": "0.17.18",+ "@esbuild/android-arm64": "0.17.18",+ "@esbuild/android-x64": "0.17.18",+ "@esbuild/darwin-arm64": "0.17.18",+ "@esbuild/darwin-x64": "0.17.18",+ "@esbuild/freebsd-arm64": "0.17.18",+ "@esbuild/freebsd-x64": "0.17.18",+ "@esbuild/linux-arm": "0.17.18",+ "@esbuild/linux-arm64": "0.17.18",+ "@esbuild/linux-ia32": "0.17.18",+ "@esbuild/linux-loong64": "0.17.18",+ "@esbuild/linux-mips64el": "0.17.18",+ "@esbuild/linux-ppc64": "0.17.18",+ "@esbuild/linux-riscv64": "0.17.18",+ "@esbuild/linux-s390x": "0.17.18",+ "@esbuild/linux-x64": "0.17.18",+ "@esbuild/netbsd-x64": "0.17.18",+ "@esbuild/openbsd-x64": "0.17.18",+ "@esbuild/sunos-x64": "0.17.18",+ "@esbuild/win32-arm64": "0.17.18",+ "@esbuild/win32-ia32": "0.17.18",+ "@esbuild/win32-x64": "0.17.18"}},"node_modules/escape-string-regexp": {"version": "4.0.0",- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",+ "license": "MIT","engines": {"node": ">=10"},@@ -2218,13 +2161,11 @@},"node_modules/exenv": {"version": "1.2.2",- "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz",- "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw=="+ "license": "BSD-3-Clause"},"node_modules/fast-deep-equal": {"version": "3.1.3",- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="+ "license": "MIT"},"node_modules/find-root": {"version": "1.1.0",@@ -2345,9 +2286,8 @@}},"node_modules/hast-util-parse-selector": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.0.tgz",- "integrity": "sha512-AyjlI2pTAZEOeu7GeBPZhROx0RHBnydkQIXlhnFzDi0qfXTmGUWoCYZtomHbrdrheV4VFUlPcfJ6LMF5T6sQzg==",+ "version": "3.1.1",+ "license": "MIT","dependencies": {"@types/hast": "^2.0.0"},@@ -2357,9 +2297,8 @@}},"node_modules/hastscript": {- "version": "7.1.0",- "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.1.0.tgz",- "integrity": "sha512-uBjaTTLN0MkCZxY/R2fWUOcu7FRtUVzKRO5P/RAfgsu3yFiMB1JWCO4AjeVkgHxAira1f2UecHK5WfS9QurlWA==",+ "version": "7.2.0",+ "license": "MIT","dependencies": {"@types/hast": "^2.0.0","comma-separated-tokens": "^2.0.0",@@ -2374,8 +2313,7 @@},"node_modules/he": {"version": "1.2.0",- "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",- "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",+ "license": "MIT","bin": {"he": "bin/he"}@@ -2388,8 +2326,7 @@},"node_modules/hoist-non-react-statics": {"version": "3.3.2",- "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",- "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",+ "license": "BSD-3-Clause","dependencies": {"react-is": "^16.7.0"}@@ -2409,8 +2346,7 @@},"node_modules/iconv-lite": {"version": "0.4.24",- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",+ "license": "MIT","dependencies": {"safer-buffer": ">= 2.1.2 < 3"},@@ -2435,8 +2371,7 @@},"node_modules/indent-string": {"version": "5.0.0",- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",- "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",+ "license": "MIT","engines": {"node": ">=12"},@@ -2451,8 +2386,7 @@},"node_modules/is-alphabetical": {"version": "2.0.1",- "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz",- "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==",+ "license": "MIT","funding": {"type": "github","url": "https://github.com/sponsors/wooorm"@@ -2460,8 +2394,7 @@},"node_modules/is-alphanumerical": {"version": "2.0.1",- "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz",- "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==",+ "license": "MIT","dependencies": {"is-alphabetical": "^2.0.0","is-decimal": "^2.0.0"@@ -2477,9 +2410,9 @@"integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="},"node_modules/is-core-module": {- "version": "2.10.0",- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz",- "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==",+ "version": "2.12.1",+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz",+ "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==","dependencies": {"has": "^1.0.3"},@@ -2489,8 +2422,7 @@},"node_modules/is-decimal": {"version": "2.0.1",- "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz",- "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==",+ "license": "MIT","funding": {"type": "github","url": "https://github.com/sponsors/wooorm"@@ -2498,8 +2430,7 @@},"node_modules/is-extendable": {"version": "1.0.1",- "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",- "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",+ "license": "MIT","dependencies": {"is-plain-object": "^2.0.4"},@@ -2507,10 +2438,21 @@"node": ">=0.10.0"}},+ "node_modules/is-fullwidth-code-point": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",+ "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",+ "dev": true,+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/is-hexadecimal": {"version": "2.0.1",- "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz",- "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==",+ "license": "MIT","funding": {"type": "github","url": "https://github.com/sponsors/wooorm"@@ -2518,8 +2460,7 @@},"node_modules/is-plain-object": {"version": "2.0.4",- "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",- "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",+ "license": "MIT","dependencies": {"isobject": "^3.0.1"},@@ -2529,17 +2470,15 @@},"node_modules/isobject": {"version": "3.0.1",- "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",- "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==",+ "license": "MIT","engines": {"node": ">=0.10.0"}},"node_modules/isomorphic-fetch": {"version": "3.0.0",- "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz",- "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==","dev": true,+ "license": "MIT","dependencies": {"node-fetch": "^2.6.1","whatwg-fetch": "^3.4.1"@@ -2547,8 +2486,7 @@},"node_modules/js-tokens": {"version": "4.0.0",- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="+ "license": "MIT"},"node_modules/json-parse-even-better-errors": {"version": "2.3.1",@@ -2562,13 +2500,12 @@"dev": true},"node_modules/katex": {- "version": "0.16.2",- "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.2.tgz",- "integrity": "sha512-70DJdQAyh9EMsthw3AaQlDyFf54X7nWEUIa5W+rq8XOpEk//w5Th7/8SqFqpvi/KZ2t6MHUj4f9wLmztBmAYQA==",+ "version": "0.16.4","funding": ["https://opencollective.com/katex","https://github.com/sponsors/katex"],+ "license": "MIT","dependencies": {"commander": "^8.0.0"},@@ -2583,16 +2520,15 @@},"node_modules/linkify-it": {"version": "4.0.1",- "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",- "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",+ "license": "MIT","dependencies": {"uc.micro": "^1.0.1"}},"node_modules/linkifyjs": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.1.0.tgz",- "integrity": "sha512-Ffv8VoY3+ixI1b3aZ3O+jM6x17cOsgwfB1Wq7pkytbo1WlyRp6ZO0YDMqiWT/gQPY/CmtiGuKfzDIVqxh1aCTA=="+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.1.1.tgz",+ "integrity": "sha512-zFN/CTVmbcVef+WaDXT63dNzzkfRBKT1j464NJQkV7iSgJU0sLBus9W0HBwnXK13/hf168pbrx/V/bjEHOXNHA=="},"node_modules/local-pkg": {"version": "0.4.3",@@ -2608,8 +2544,7 @@},"node_modules/loose-envify": {"version": "1.4.0",- "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",- "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",+ "license": "MIT","dependencies": {"js-tokens": "^3.0.0 || ^4.0.0"},@@ -2628,13 +2563,11 @@},"node_modules/make-error": {"version": "1.3.6",- "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",- "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw=="+ "license": "ISC"},"node_modules/markdown-it": {"version": "13.0.1",- "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz",- "integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==",+ "license": "MIT","dependencies": {"argparse": "^2.0.1","entities": "~3.0.1",@@ -2648,8 +2581,7 @@},"node_modules/markdown-it/node_modules/entities": {"version": "3.0.1",- "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",- "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",+ "license": "BSD-2-Clause","engines": {"node": ">=0.12"},@@ -2659,38 +2591,41 @@},"node_modules/mdurl": {"version": "1.0.1",- "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",- "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="+ "license": "MIT"},"node_modules/min-indent": {"version": "1.0.1",- "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",- "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",+ "license": "MIT","engines": {"node": ">=4"}},"node_modules/mlly": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.1.1.tgz",- "integrity": "sha512-Jnlh4W/aI4GySPo6+DyTN17Q75KKbLTyFK8BrGhjNP4rxuUjbRWhE6gHg3bs33URWAF44FRm7gdQA348i3XxRw==",+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.2.0.tgz",+ "integrity": "sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==","dev": true,"dependencies": {"acorn": "^8.8.2","pathe": "^1.1.0",- "pkg-types": "^1.0.1",- "ufo": "^1.1.0"+ "pkg-types": "^1.0.2",+ "ufo": "^1.1.1"}},"node_modules/ms": {"version": "2.1.3",- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="+ "license": "MIT"},"node_modules/nanoid": {- "version": "4.0.1",- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.1.tgz",- "integrity": "sha512-udKGtCCUafD3nQtJg9wBhRP3KMbPglUsgV5JVsXhvyBs/oefqb4sqMEhKBBgqZncYowu58p1prsZQBYvAj/Gww==",+ "version": "4.0.2",+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz",+ "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],"bin": {"nanoid": "bin/nanoid.js"},@@ -2699,9 +2634,8 @@}},"node_modules/node-fetch": {- "version": "2.6.7",- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",+ "version": "2.6.9",+ "license": "MIT","dependencies": {"whatwg-url": "^5.0.0"},@@ -2719,16 +2653,14 @@},"node_modules/object-assign": {"version": "4.1.1",- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",- "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",+ "license": "MIT","engines": {"node": ">=0.10.0"}},"node_modules/object.omit": {"version": "3.0.0",- "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-3.0.0.tgz",- "integrity": "sha512-EO+BCv6LJfu+gBIF3ggLicFebFLN5zqzz/WWJlMFfkMyGth+oBkhxzDl0wx2W4GkLzuQs/FsSkXZb2IMWQqmBQ==",+ "license": "MIT","dependencies": {"is-extendable": "^1.0.0"},@@ -2738,8 +2670,7 @@},"node_modules/object.pick": {"version": "1.3.0",- "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",- "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==",+ "license": "MIT","dependencies": {"isobject": "^3.0.1"},@@ -2749,8 +2680,7 @@},"node_modules/orderedmap": {"version": "2.1.0",- "resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-2.1.0.tgz",- "integrity": "sha512-/pIFexOm6S70EPdznemIz3BQZoJ4VTFrhqzu0ACBqBgeLsLxq8e6Jim63ImIfwW/zAD1AlXpRMlOv3aghmo4dA=="+ "license": "MIT"},"node_modules/p-limit": {"version": "4.0.0",@@ -2779,9 +2709,8 @@}},"node_modules/parse-entities": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.0.tgz",- "integrity": "sha512-5nk9Fn03x3rEhGaX1FU6IDwG/k+GxLXlFAkgrbM1asuAFl3BhdQWvASaIsmwWypRNcZKHPYnIuOSfIWEyEQnPQ==",+ "version": "4.0.1",+ "license": "MIT","dependencies": {"@types/unist": "^2.0.0","character-entities": "^2.0.0",@@ -2849,13 +2778,13 @@"dev": true},"node_modules/pkg-types": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.2.tgz",- "integrity": "sha512-hM58GKXOcj8WTqUXnsQyJYXdeAPbythQgEF3nTcEo+nkD49chjQ9IKm/QJy9xf6JakXptz86h7ecP2024rrLaQ==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz",+ "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==","dev": true,"dependencies": {"jsonc-parser": "^3.2.0",- "mlly": "^1.1.1",+ "mlly": "^1.2.0","pathe": "^1.1.0"}},@@ -2872,9 +2801,9 @@}},"node_modules/postcss": {- "version": "8.4.21",- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz",- "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",+ "version": "8.4.23",+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz",+ "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==","dev": true,"funding": [{@@ -2884,10 +2813,14 @@{"type": "tidelift","url": "https://tidelift.com/funding/github/npm/postcss"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"}],"dependencies": {- "nanoid": "^3.3.4",+ "nanoid": "^3.3.6","picocolors": "^1.0.0","source-map-js": "^1.0.2"},@@ -2896,10 +2829,16 @@}},"node_modules/postcss/node_modules/nanoid": {- "version": "3.3.4",- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",- "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",+ "version": "3.3.6",+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==","dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],"bin": {"nanoid": "bin/nanoid.cjs"},@@ -2907,15 +2846,45 @@"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"}},+ "node_modules/pretty-format": {+ "version": "27.5.1",+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",+ "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",+ "dev": true,+ "dependencies": {+ "ansi-regex": "^5.0.1",+ "ansi-styles": "^5.0.0",+ "react-is": "^17.0.1"+ },+ "engines": {+ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"+ }+ },+ "node_modules/pretty-format/node_modules/ansi-styles": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",+ "dev": true,+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/pretty-format/node_modules/react-is": {+ "version": "17.0.2",+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",+ "dev": true+ },"node_modules/prism-themes": {"version": "1.9.0",- "resolved": "https://registry.npmjs.org/prism-themes/-/prism-themes-1.9.0.tgz",- "integrity": "sha512-tX2AYsehKDw1EORwBps+WhBFKc2kxfoFpQAjxBndbZKr4fRmMkv47XN0BghC/K1qwodB1otbe4oF23vUTFDokw=="+ "license": "MIT"},"node_modules/prop-types": {"version": "15.8.1",- "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",- "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",+ "license": "MIT","dependencies": {"loose-envify": "^1.4.0","object-assign": "^4.1.1",@@ -2923,9 +2892,8 @@}},"node_modules/property-information": {- "version": "6.1.1",- "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.1.1.tgz",- "integrity": "sha512-hrzC564QIl0r0vy4l6MvRLhafmUowhO/O3KgVSoXIbbA2Sz4j8HGpJc6T2cubRVwMwpdiG/vKGfhT4IixmKN9w==",+ "version": "6.2.0",+ "license": "MIT","funding": {"type": "github","url": "https://github.com/sponsors/wooorm"@@ -2933,16 +2901,14 @@},"node_modules/prosemirror-changeset": {"version": "2.2.0",- "resolved": "https://registry.npmjs.org/prosemirror-changeset/-/prosemirror-changeset-2.2.0.tgz",- "integrity": "sha512-QM7ohGtkpVpwVGmFb8wqVhaz9+6IUXcIQBGZ81YNAKYuHiFJ1ShvSzab4pKqTinJhwciZbrtBEk/2WsqSt2PYg==",+ "license": "MIT","dependencies": {"prosemirror-transform": "^1.0.0"}},"node_modules/prosemirror-codemark": {- "version": "0.4.1",- "resolved": "https://registry.npmjs.org/prosemirror-codemark/-/prosemirror-codemark-0.4.1.tgz",- "integrity": "sha512-dRttadls8V1ikQ1lK3m3wYGkDqBq1sVNNvwn8X2trNXYWBcb5c+tLg9LPlN7dQMvLFGVjyalB7lvG9hobLXvbg==",+ "version": "0.4.2",+ "license": "MIT","peerDependencies": {"prosemirror-inputrules": "^1.2.0","prosemirror-model": "^1.18.1",@@ -2952,16 +2918,14 @@},"node_modules/prosemirror-collab": {"version": "1.3.0",- "resolved": "https://registry.npmjs.org/prosemirror-collab/-/prosemirror-collab-1.3.0.tgz",- "integrity": "sha512-+S/IJ69G2cUu2IM5b3PBekuxs94HO1CxJIWOFrLQXUaUDKL/JfBx+QcH31ldBlBXyDEUl+k3Vltfi1E1MKp2mA==",+ "license": "MIT","dependencies": {"prosemirror-state": "^1.0.0"}},"node_modules/prosemirror-commands": {"version": "1.5.0",- "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.5.0.tgz",- "integrity": "sha512-zL0Fxbj3fh71GPNHn5YdYgYGX2aU2XLecZYk2ekEF0oOD259HcXtM+96VjPVi5o3h4sGUdDfEEhGiREXW6U+4A==",+ "license": "MIT","dependencies": {"prosemirror-model": "^1.0.0","prosemirror-state": "^1.0.0",@@ -2969,9 +2933,8 @@}},"node_modules/prosemirror-dropcursor": {- "version": "1.7.1",- "resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.7.1.tgz",- "integrity": "sha512-GmWk9bAwhfHwA8xmJhBFjPcebxUG9zAPYtqpIr7NTDigWZZEJCgUYyUQeqgyscLr8ZHoh9aeprX9kW7BihUT+w==",+ "version": "1.7.0",+ "license": "MIT","dependencies": {"prosemirror-state": "^1.0.0","prosemirror-transform": "^1.1.0",@@ -2980,8 +2943,7 @@},"node_modules/prosemirror-gapcursor": {"version": "1.3.1",- "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.3.1.tgz",- "integrity": "sha512-GKTeE7ZoMsx5uVfc51/ouwMFPq0o8YrZ7Hx4jTF4EeGbXxBveUV8CGv46mSHuBBeXGmvu50guoV2kSnOeZZnUA==",+ "license": "MIT","dependencies": {"prosemirror-keymap": "^1.0.0","prosemirror-model": "^1.0.0",@@ -2991,8 +2953,7 @@},"node_modules/prosemirror-history": {"version": "1.3.0",- "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.3.0.tgz",- "integrity": "sha512-qo/9Wn4B/Bq89/YD+eNWFbAytu6dmIM85EhID+fz9Jcl9+DfGEo8TTSrRhP15+fFEoaPqpHSxlvSzSEbmlxlUA==",+ "license": "MIT","dependencies": {"prosemirror-state": "^1.2.2","prosemirror-transform": "^1.0.0",@@ -3001,17 +2962,15 @@},"node_modules/prosemirror-inputrules": {"version": "1.2.0",- "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.2.0.tgz",- "integrity": "sha512-eAW/M/NTSSzpCOxfR8Abw6OagdG0MiDAiWHQMQveIsZtoKVYzm0AflSPq/ymqJd56/Su1YPbwy9lM13wgHOFmQ==",+ "license": "MIT","dependencies": {"prosemirror-state": "^1.0.0","prosemirror-transform": "^1.0.0"}},"node_modules/prosemirror-keymap": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.2.0.tgz",- "integrity": "sha512-TdSfu+YyLDd54ufN/ZeD1VtBRYpgZnTPnnbY+4R08DDgs84KrIPEPbJL8t1Lm2dkljFx6xeBE26YWH3aIzkPKg==",+ "version": "1.2.1",+ "license": "MIT","dependencies": {"prosemirror-state": "^1.0.0","w3c-keyname": "^2.2.0"@@ -3019,8 +2978,7 @@},"node_modules/prosemirror-markdown": {"version": "1.10.1",- "resolved": "https://registry.npmjs.org/prosemirror-markdown/-/prosemirror-markdown-1.10.1.tgz",- "integrity": "sha512-s7iaTLiX+qO5z8kF2NcMmy2T7mIlxzkS4Sp3vTKSYChPtbMpg6YxFkU0Y06rUg2WtKlvBu7v1bXzlGBkfjUWAA==",+ "license": "MIT","dependencies": {"markdown-it": "^13.0.1","prosemirror-model": "^1.0.0"@@ -3028,8 +2986,7 @@},"node_modules/prosemirror-menu": {"version": "1.2.1",- "resolved": "https://registry.npmjs.org/prosemirror-menu/-/prosemirror-menu-1.2.1.tgz",- "integrity": "sha512-sBirXxVfHalZO4f1ZS63WzewINK4182+7dOmoMeBkqYO8wqMBvBS7wQuwVOHnkMWPEh0+N0LJ856KYUN+vFkmQ==",+ "license": "MIT","dependencies": {"crelt": "^1.0.0","prosemirror-commands": "^1.0.0",@@ -3039,24 +2996,21 @@},"node_modules/prosemirror-model": {"version": "1.19.0",- "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.19.0.tgz",- "integrity": "sha512-/CvFGJnwc41EJSfDkQLly1cAJJJmBpZwwUJtwZPTjY2RqZJfM8HVbCreOY/jti8wTRbVyjagcylyGoeJH/g/3w==",+ "license": "MIT","dependencies": {"orderedmap": "^2.0.0"}},"node_modules/prosemirror-schema-basic": {"version": "1.2.1",- "resolved": "https://registry.npmjs.org/prosemirror-schema-basic/-/prosemirror-schema-basic-1.2.1.tgz",- "integrity": "sha512-vYBdIHsYKSDIqYmPBC7lnwk9DsKn8PnVqK97pMYP5MLEDFqWIX75JiaJTzndBii4bRuNqhC2UfDOfM3FKhlBHg==",+ "license": "MIT","dependencies": {"prosemirror-model": "^1.19.0"}},"node_modules/prosemirror-schema-list": {"version": "1.2.2",- "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.2.2.tgz",- "integrity": "sha512-rd0pqSDp86p0MUMKG903g3I9VmElFkQpkZ2iOd3EOVg1vo5Cst51rAsoE+5IPy0LPXq64eGcCYlW1+JPNxOj2w==",+ "license": "MIT","dependencies": {"prosemirror-model": "^1.0.0","prosemirror-state": "^1.0.0",@@ -3065,8 +3019,7 @@},"node_modules/prosemirror-state": {"version": "1.4.2",- "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.2.tgz",- "integrity": "sha512-puuzLD2mz/oTdfgd8msFbe0A42j5eNudKAAPDB0+QJRw8cO1ygjLmhLrg9RvDpf87Dkd6D4t93qdef00KKNacQ==",+ "license": "MIT","dependencies": {"prosemirror-model": "^1.0.0","prosemirror-transform": "^1.0.0",@@ -3075,8 +3028,7 @@},"node_modules/prosemirror-tables": {"version": "1.3.2",- "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.3.2.tgz",- "integrity": "sha512-/9JTeN6s58Zq66HXaxP6uf8PAmc7XXKZFPlOGVtLvxEd6xBP6WtzaJB9wBjiGUzwbdhdMEy7V62yuHqk/3VrnQ==",+ "license": "MIT","dependencies": {"prosemirror-keymap": "^1.1.2","prosemirror-model": "^1.8.1",@@ -3098,8 +3050,7 @@},"node_modules/prosemirror-trailing-node": {"version": "2.0.3",- "resolved": "https://registry.npmjs.org/prosemirror-trailing-node/-/prosemirror-trailing-node-2.0.3.tgz",- "integrity": "sha512-lGrjMrn97KWkjQSW/FjdvnhJmqFACmQIyr6lKYApvHitDnKsCoZz6XzrHB7RZYHni/0NxQmZ01p/2vyK2SkvaA==",+ "license": "MIT","dependencies": {"@babel/runtime": "^7.13.10","@remirror/core-constants": "^2.0.0",@@ -3113,17 +3064,15 @@}},"node_modules/prosemirror-transform": {- "version": "1.7.0",- "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.7.0.tgz",- "integrity": "sha512-O4T697Cqilw06Zvc3Wm+e237R6eZtJL/xGMliCi+Uo8VL6qHk6afz1qq0zNjT3eZMuYwnP8ZS0+YxX/tfcE9TQ==",+ "version": "1.7.1",+ "license": "MIT","dependencies": {"prosemirror-model": "^1.0.0"}},"node_modules/prosemirror-view": {"version": "1.30.1",- "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.30.1.tgz",- "integrity": "sha512-pZUfr7lICJkEY7XwzldAKrkflZDeIvnbfuu2RIS01N5NwJmR/dfZzDzJRzhb3SM2QtT/bM8b4Nnib8X3MGpAhA==",+ "license": "MIT","dependencies": {"prosemirror-model": "^1.16.0","prosemirror-state": "^1.0.0",@@ -3132,8 +3081,7 @@},"node_modules/re-resizable": {"version": "6.9.9",- "resolved": "https://registry.npmjs.org/re-resizable/-/re-resizable-6.9.9.tgz",- "integrity": "sha512-l+MBlKZffv/SicxDySKEEh42hR6m5bAHfNu3Tvxks2c4Ah+ldnWjfnVRwxo/nxF27SsUsxDS0raAzFuJNKABXA==",+ "license": "MIT","peerDependencies": {"react": "^16.13.1 || ^17.0.0 || ^18.0.0","react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0"@@ -3154,8 +3102,7 @@},"node_modules/react-colorful": {"version": "5.6.1",- "resolved": "https://registry.npmjs.org/react-colorful/-/react-colorful-5.6.1.tgz",- "integrity": "sha512-1exovf0uGTGyq5mXQT0zgQ80uvj2PCwvF8zY1RN9/vbJVSjSo3fsB/4L3ObbF7u70NduSiK4xu4Y6q1MHoUGEw==",+ "license": "MIT","peerDependencies": {"react": ">=16.8.0","react-dom": ">=16.8.0"@@ -3177,18 +3124,15 @@},"node_modules/react-is": {"version": "16.13.1",- "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",- "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="+ "license": "MIT"},"node_modules/react-lifecycles-compat": {"version": "3.0.4",- "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",- "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="+ "license": "MIT"},"node_modules/react-modal": {"version": "3.16.1",- "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.1.tgz",- "integrity": "sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==",+ "license": "MIT","dependencies": {"exenv": "^1.2.0","prop-types": "^15.7.2",@@ -3204,9 +3148,9 @@}},"node_modules/readable-stream": {- "version": "3.6.0",- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",- "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",+ "version": "3.6.2",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==","dependencies": {"inherits": "^2.0.3","string_decoder": "^1.1.1",@@ -3218,8 +3162,7 @@},"node_modules/redent": {"version": "4.0.0",- "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz",- "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==",+ "license": "MIT","dependencies": {"indent-string": "^5.0.0","strip-indent": "^4.0.0"@@ -3233,8 +3176,7 @@},"node_modules/refractor": {"version": "4.8.0",- "resolved": "https://registry.npmjs.org/refractor/-/refractor-4.8.0.tgz",- "integrity": "sha512-SVOnWUJiEBFNiBlHbudSpSpDfDhDY1UHF0CMKgdvPsMYNQQ4rnqFxyGvP07UmteNC8V12mTF2c0lEsGS7lKaGw==",+ "license": "MIT","dependencies": {"@types/hast": "^2.0.0","@types/prismjs": "^1.0.0",@@ -3248,15 +3190,14 @@},"node_modules/regenerator-runtime": {"version": "0.13.11",- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",- "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="+ "license": "MIT"},"node_modules/resolve": {- "version": "1.22.1",- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",+ "version": "1.22.2",+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",+ "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==","dependencies": {- "is-core-module": "^2.9.0",+ "is-core-module": "^2.11.0","path-parse": "^1.0.7","supports-preserve-symlinks-flag": "^1.0.0"},@@ -3276,9 +3217,9 @@}},"node_modules/rollup": {- "version": "3.17.3",- "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.17.3.tgz",- "integrity": "sha512-p5LaCXiiOL/wrOkj8djsIDFmyU9ysUxcyW+EKRLHb6TKldJzXpImjcRSR+vgo09DBdofGcOoLOsRyxxG2n5/qQ==",+ "version": "3.21.4",+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.4.tgz",+ "integrity": "sha512-N5LxpvDolOm9ueiCp4NfB80omMDqb45ShtsQw2+OT3f11uJ197dv703NZvznYHP6RWR85wfxanXurXKG3ux2GQ==","dev": true,"bin": {"rollup": "dist/bin/rollup"@@ -3293,32 +3234,11 @@},"node_modules/rope-sequence": {"version": "1.3.3",- "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.3.tgz",- "integrity": "sha512-85aZYCxweiD5J8yTEbw+E6A27zSnLPNDL0WfPdw3YYodq7WjnTKo0q4dtyQ2gz23iPT8Q9CUyJtAaUNcTxRf5Q=="- },- "node_modules/safe-buffer": {- "version": "5.2.1",- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/feross"- },- {- "type": "patreon",- "url": "https://www.patreon.com/feross"- },- {- "type": "consulting",- "url": "https://feross.org/support"- }- ]+ "license": "MIT"},"node_modules/safer-buffer": {"version": "2.1.2",- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="+ "license": "MIT"},"node_modules/scheduler": {"version": "0.20.2",@@ -3364,18 +3284,6 @@"url": "https://github.com/chalk/ansi-styles?sponsor=1"}},- "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",- "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",- "dev": true,- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/source-map": {"version": "0.5.7","resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",@@ -3411,9 +3319,8 @@}},"node_modules/space-separated-tokens": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.1.tgz",- "integrity": "sha512-ekwEbFp5aqSPKaqeY1PGrlGQxPNaq+Cnx4+bE2D8sciBQrHpbwoBbawqTN2+6jPs9IdWxxiUcN0K2pkczD3zmw==",+ "version": "2.0.2",+ "license": "MIT","funding": {"type": "github","url": "https://github.com/sponsors/wooorm"@@ -3426,9 +3333,9 @@"dev": true},"node_modules/std-env": {- "version": "3.3.2",- "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.2.tgz",- "integrity": "sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==",+ "version": "3.3.3",+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.3.tgz",+ "integrity": "sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==","dev": true},"node_modules/string_decoder": {@@ -3436,13 +3343,45 @@"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz","integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==","dependencies": {- "safe-buffer": "~5.2.0"+ "eastasianwidth": "^0.2.0",+ "emoji-regex": "^9.2.2",+ "strip-ansi": "^7.0.1"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/strip-ansi": {+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",+ "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",+ "dependencies": {+ "ansi-regex": "^6.0.1"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"+ }+ },+ "node_modules/strip-ansi/node_modules/ansi-regex": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"}},"node_modules/strip-indent": {"version": "4.0.0",- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz",- "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==",+ "license": "MIT","dependencies": {"min-indent": "^1.0.1"},@@ -3477,8 +3416,7 @@},"node_modules/styled-system": {"version": "5.1.5",- "resolved": "https://registry.npmjs.org/styled-system/-/styled-system-5.1.5.tgz",- "integrity": "sha512-7VoD0o2R3RKzOzPK0jYrVnS8iJdfkKsQJNiLRDjikOpQVqQHns/DXWaPZOH4tIKkhAT7I6wIsy9FWTWh2X3q+A==",+ "license": "MIT","dependencies": {"@styled-system/background": "^5.1.2","@styled-system/border": "^5.1.5",@@ -3496,9 +3434,9 @@}},"node_modules/stylis": {- "version": "4.0.13",- "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.13.tgz",- "integrity": "sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag=="+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",+ "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="},"node_modules/supports-color": {"version": "5.5.0",@@ -3524,30 +3462,25 @@},"node_modules/throttle-debounce": {"version": "3.0.1",- "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-3.0.1.tgz",- "integrity": "sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==",+ "license": "MIT","engines": {"node": ">=10"}},"node_modules/tinybench": {- "version": "2.3.1",- "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.3.1.tgz",- "integrity": "sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA==",+ "version": "2.5.0",+ "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.0.tgz",+ "integrity": "sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==","dev": true},"node_modules/tinycolor2": {- "version": "1.4.2",- "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz",- "integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==",- "engines": {- "node": "*"- }+ "version": "1.6.0",+ "license": "MIT"},"node_modules/tinypool": {- "version": "0.3.1",- "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.3.1.tgz",- "integrity": "sha512-zLA1ZXlstbU2rlpA4CIeVaqvWq41MTWqLY3FfsAXgC8+f7Pk7zroaJQxDgxn1xNudKW6Kmj4808rPFShUlIRmQ==",+ "version": "0.4.0",+ "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.4.0.tgz",+ "integrity": "sha512-2ksntHOKf893wSAH4z/+JbPpi92esw8Gn9N2deXX+B0EO92hexAVI9GIZZPx7P5aYo5KULfeOSt3kMOmSOy6uA==","dev": true,"engines": {"node": ">=14.0.0"@@ -3572,8 +3505,7 @@},"node_modules/tr46": {"version": "0.0.3",- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="+ "license": "MIT"},"node_modules/tslib": {"version": "2.5.0",@@ -3592,8 +3524,7 @@},"node_modules/type-fest": {"version": "2.19.0",- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",- "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",+ "license": "(MIT OR CC0-1.0)","engines": {"node": ">=12.20"},@@ -3603,13 +3534,12 @@},"node_modules/uc.micro": {"version": "1.0.6",- "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",- "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="+ "license": "MIT"},"node_modules/ufo": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.1.tgz",- "integrity": "sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==",+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.2.tgz",+ "integrity": "sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==","dev": true},"node_modules/unfurl.js": {@@ -3630,8 +3560,7 @@},"node_modules/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==",+ "license": "MIT","peerDependencies": {"react": "^16.8.0 || ^17.0.0 || ^18.0.0"}@@ -3642,15 +3571,14 @@"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="},"node_modules/vite": {- "version": "4.1.4",- "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.4.tgz",- "integrity": "sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg==",+ "version": "4.3.4",+ "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.4.tgz",+ "integrity": "sha512-f90aqGBoxSFxWph2b39ae2uHAxm5jFBBdnfueNxZAT1FTpM13ccFQExCaKbR2xFW5atowjleRniQ7onjJ22QEg==","dev": true,"dependencies": {- "esbuild": "^0.16.14",- "postcss": "^8.4.21",- "resolve": "^1.22.1",- "rollup": "^3.10.0"+ "esbuild": "^0.17.5",+ "postcss": "^8.4.23",+ "rollup": "^3.21.0"},"bin": {"vite": "bin/vite.js"@@ -3691,9 +3619,9 @@}},"node_modules/vite-node": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.29.2.tgz",- "integrity": "sha512-5oe1z6wzI3gkvc4yOBbDBbgpiWiApvuN4P55E8OI131JGrSuo4X3SOZrNmZYo4R8Zkze/dhi572blX0zc+6SdA==",+ "version": "0.29.8",+ "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.29.8.tgz",+ "integrity": "sha512-b6OtCXfk65L6SElVM20q5G546yu10/kNrhg08afEoWlFRJXFq9/6glsvSVY+aI6YeC1tu2TtAqI2jHEQmOmsFw==","dev": true,"dependencies": {"cac": "^6.7.14",@@ -3737,18 +3665,18 @@"dev": true},"node_modules/vitest": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.29.2.tgz",- "integrity": "sha512-ydK9IGbAvoY8wkg29DQ4ivcVviCaUi3ivuPKfZEVddMTenFHUfB8EEDXQV8+RasEk1ACFLgMUqAaDuQ/Nk+mQA==",+ "version": "0.29.8",+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.29.8.tgz",+ "integrity": "sha512-JIAVi2GK5cvA6awGpH0HvH/gEG9PZ0a/WoxdiV3PmqK+3CjQMf8c+J/Vhv4mdZ2nRyXFw66sAg6qz7VNkaHfDQ==","dev": true,"dependencies": {"@types/chai": "^4.3.4","@types/chai-subset": "^1.3.3","@types/node": "*",- "@vitest/expect": "0.29.2",- "@vitest/runner": "0.29.2",- "@vitest/spy": "0.29.2",- "@vitest/utils": "0.29.2",+ "@vitest/expect": "0.29.8",+ "@vitest/runner": "0.29.8",+ "@vitest/spy": "0.29.8",+ "@vitest/utils": "0.29.8","acorn": "^8.8.1","acorn-walk": "^8.2.0","cac": "^6.7.14",@@ -3761,10 +3689,10 @@"std-env": "^3.3.1","strip-literal": "^1.0.0","tinybench": "^2.3.1",- "tinypool": "^0.3.1",+ "tinypool": "^0.4.0","tinyspy": "^1.0.2","vite": "^3.0.0 || ^4.0.0",- "vite-node": "0.29.2",+ "vite-node": "0.29.8","why-is-node-running": "^2.2.2"},"bin": {@@ -3781,7 +3709,10 @@"@vitest/browser": "*","@vitest/ui": "*","happy-dom": "*",- "jsdom": "*"+ "jsdom": "*",+ "playwright": "*",+ "safaridriver": "*",+ "webdriverio": "*"},"peerDependenciesMeta": {"@edge-runtime/vm": {@@ -3798,6 +3729,15 @@},"jsdom": {"optional": true+ },+ "playwright": {+ "optional": true+ },+ "safaridriver": {+ "optional": true+ },+ "webdriverio": {+ "optional": true}}},@@ -3835,27 +3775,23 @@},"node_modules/w3c-keyname": {"version": "2.2.6",- "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.6.tgz",- "integrity": "sha512-f+fciywl1SJEniZHD6H+kUO8gOnwIr7f4ijKA6+ZvJFjeGi1r4PDLl53Ayud9O/rk64RqgoQine0feoeOU0kXg=="+ "license": "MIT"},"node_modules/warning": {"version": "4.0.3",- "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",- "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",+ "license": "MIT","dependencies": {"loose-envify": "^1.0.0"}},"node_modules/web-vitals": {"version": "2.1.4",- "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-2.1.4.tgz",- "integrity": "sha512-sVWcwhU5mX6crfI5Vd2dC4qchyTqxV8URinzt25XqVh+bHEPGH4C3NPrNionCP7Obx59wrYEbNlw4Z8sjALzZg==",- "dev": true+ "dev": true,+ "license": "Apache-2.0"},"node_modules/webidl-conversions": {"version": "3.0.1",- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="+ "license": "BSD-2-Clause"},"node_modules/whatwg-encoding": {"version": "2.0.0",@@ -3883,9 +3819,8 @@},"node_modules/whatwg-fetch": {"version": "3.6.2",- "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz",- "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==",- "dev": true+ "dev": true,+ "license": "MIT"},"node_modules/whatwg-mimetype": {"version": "3.0.0",@@ -3898,8 +3833,7 @@},"node_modules/whatwg-url": {"version": "5.0.0",- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",+ "license": "MIT","dependencies": {"tr46": "~0.0.3","webidl-conversions": "^3.0.0"@@ -3982,11 +3916,6 @@"@babel/types": "^7.22.5"}},- "@babel/helper-plugin-utils": {- "version": "7.20.2",- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz",- "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ=="- },"@babel/helper-string-parser": {"version": "7.22.5","resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",@@ -4007,18 +3936,8 @@"js-tokens": "^4.0.0"}},- "@babel/plugin-syntax-jsx": {- "version": "7.18.6",- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz",- "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==",- "requires": {- "@babel/helper-plugin-utils": "^7.18.6"- }- },"@babel/runtime": {- "version": "7.21.0",- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz",- "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==",+ "version": "7.20.13","requires": {"regenerator-runtime": "^0.13.11"}@@ -4034,282 +3953,292 @@}},"@emotion/babel-plugin": {- "version": "11.10.2",- "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.10.2.tgz",- "integrity": "sha512-xNQ57njWTFVfPAc3cjfuaPdsgLp5QOSuRsj9MA6ndEhH/AzuZM86qIQzt6rq+aGBwj3n5/TkLmU5lhAfdRmogA==",+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz",+ "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==","requires": {"@babel/helper-module-imports": "^7.16.7",- "@babel/plugin-syntax-jsx": "^7.17.12","@babel/runtime": "^7.18.3",- "@emotion/hash": "^0.9.0",- "@emotion/memoize": "^0.8.0",- "@emotion/serialize": "^1.1.0",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/serialize": "^1.1.2","babel-plugin-macros": "^3.1.0","convert-source-map": "^1.5.0","escape-string-regexp": "^4.0.0","find-root": "^1.1.0","source-map": "^0.5.7",- "stylis": "4.0.13"+ "stylis": "4.2.0"+ },+ "dependencies": {+ "@emotion/memoize": {+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="+ }}},"@emotion/cache": {- "version": "11.10.3",- "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.10.3.tgz",- "integrity": "sha512-Psmp/7ovAa8appWh3g51goxu/z3iVms7JXOreq136D8Bbn6dYraPnmL6mdM8GThEx9vwSn92Fz+mGSjBzN8UPQ==",+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz",+ "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==","requires": {- "@emotion/memoize": "^0.8.0",- "@emotion/sheet": "^1.2.0",- "@emotion/utils": "^1.2.0",- "@emotion/weak-memoize": "^0.3.0",- "stylis": "4.0.13"+ "@emotion/memoize": "^0.8.1",+ "@emotion/sheet": "^1.2.2",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1",+ "stylis": "4.2.0"+ },+ "dependencies": {+ "@emotion/memoize": {+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="+ }}},"@emotion/hash": {- "version": "0.9.0",- "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.0.tgz",- "integrity": "sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ=="+ "version": "0.9.1",+ "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz",+ "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ=="},"@emotion/is-prop-valid": {"version": "0.8.8",- "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",- "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==","requires": {"@emotion/memoize": "0.7.4"},"dependencies": {"@emotion/memoize": {- "version": "0.7.4",- "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",- "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw=="+ "version": "0.7.4"}}},"@emotion/memoize": {- "version": "0.8.0",- "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz",- "integrity": "sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA=="+ "version": "0.7.5"},"@emotion/react": {- "version": "11.10.4",- "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.10.4.tgz",- "integrity": "sha512-j0AkMpr6BL8gldJZ6XQsQ8DnS9TxEQu1R+OGmDZiWjBAJtCcbt0tS3I/YffoqHXxH6MjgI7KdMbYKw3MEiU9eA==",+ "version": "11.11.1",+ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz",+ "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==","requires": {"@babel/runtime": "^7.18.3",- "@emotion/babel-plugin": "^11.10.0",- "@emotion/cache": "^11.10.0",- "@emotion/serialize": "^1.1.0",- "@emotion/use-insertion-effect-with-fallbacks": "^1.0.0",- "@emotion/utils": "^1.2.0",- "@emotion/weak-memoize": "^0.3.0",+ "@emotion/babel-plugin": "^11.11.0",+ "@emotion/cache": "^11.11.0",+ "@emotion/serialize": "^1.1.2",+ "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1","hoist-non-react-statics": "^3.3.1"}},"@emotion/serialize": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.0.tgz",- "integrity": "sha512-F1ZZZW51T/fx+wKbVlwsfchr5q97iW8brAnXmsskz4d0hVB4O3M/SiA3SaeH06x02lSNzkkQv+n3AX3kCXKSFA==",+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz",+ "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==","requires": {- "@emotion/hash": "^0.9.0",- "@emotion/memoize": "^0.8.0",- "@emotion/unitless": "^0.8.0",- "@emotion/utils": "^1.2.0",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/unitless": "^0.8.1",+ "@emotion/utils": "^1.2.1","csstype": "^3.0.2"+ },+ "dependencies": {+ "@emotion/memoize": {+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="+ }}},"@emotion/sheet": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.0.tgz",- "integrity": "sha512-OiTkRgpxescko+M51tZsMq7Puu/KP55wMT8BgpcXVG2hqXc0Vo0mfymJ/Uj24Hp0i083ji/o0aLddh08UEjq8w=="+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz",+ "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA=="},"@emotion/unitless": {- "version": "0.8.0",- "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz",- "integrity": "sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw=="+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz",+ "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ=="},"@emotion/use-insertion-effect-with-fallbacks": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz",- "integrity": "sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A=="+ "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=="},"@emotion/utils": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.0.tgz",- "integrity": "sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw=="+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz",+ "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg=="},"@emotion/weak-memoize": {- "version": "0.3.0",- "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz",- "integrity": "sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg=="+ "version": "0.3.1",+ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz",+ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww=="},"@esbuild/android-arm": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz",- "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz",+ "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==","dev": true,"optional": true},"@esbuild/android-arm64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz",- "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz",+ "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==","dev": true,"optional": true},"@esbuild/android-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz",- "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz",+ "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==","dev": true,"optional": true},"@esbuild/darwin-arm64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz",- "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz",+ "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==","dev": true,"optional": true},"@esbuild/darwin-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz",- "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz",+ "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==","dev": true,"optional": true},"@esbuild/freebsd-arm64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz",- "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz",+ "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==","dev": true,"optional": true},"@esbuild/freebsd-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz",- "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz",+ "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==","dev": true,"optional": true},"@esbuild/linux-arm": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz",- "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz",+ "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==","dev": true,"optional": true},"@esbuild/linux-arm64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz",- "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz",+ "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==","dev": true,"optional": true},"@esbuild/linux-ia32": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz",- "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz",+ "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==","dev": true,"optional": true},"@esbuild/linux-loong64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz",- "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz",+ "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==","dev": true,"optional": true},"@esbuild/linux-mips64el": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz",- "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz",+ "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==","dev": true,"optional": true},"@esbuild/linux-ppc64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz",- "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz",+ "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==","dev": true,"optional": true},"@esbuild/linux-riscv64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz",- "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz",+ "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==","dev": true,"optional": true},"@esbuild/linux-s390x": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz",- "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz",+ "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==","dev": true,"optional": true},"@esbuild/linux-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz",- "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz",+ "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==","dev": true,"optional": true},"@esbuild/netbsd-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz",- "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz",+ "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==","dev": true,"optional": true},"@esbuild/openbsd-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz",- "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz",+ "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==","dev": true,"optional": true},"@esbuild/sunos-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz",- "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz",+ "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==","dev": true,"optional": true},"@esbuild/win32-arm64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz",- "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz",+ "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==","dev": true,"optional": true},"@esbuild/win32-ia32": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz",- "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz",+ "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==","dev": true,"optional": true},"@esbuild/win32-x64": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz",- "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==",+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz",+ "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==","dev": true,"optional": true},"@linaria/core": {- "version": "3.0.0-beta.13",- "resolved": "https://registry.npmjs.org/@linaria/core/-/core-3.0.0-beta.13.tgz",- "integrity": "sha512-3zEi5plBCOsEzUneRVuQb+2SAx3qaC1dj0FfFAI6zIJQoDWu0dlSwKijMRack7oO9tUWrchfj3OkKQAd1LBdVg=="+ "version": "3.0.0-beta.13"},"@mdi/js": {- "version": "6.9.96",- "resolved": "https://registry.npmjs.org/@mdi/js/-/js-6.9.96.tgz",- "integrity": "sha512-rK0/vLFaiItYS2W7uVmaKPKnhNQE4XVkylpk5njtVwENnp8elwY5uRL6qvdj2esuvUHG7DwygE4Qu3eKxxuJiQ==",+ "version": "7.2.96",+ "resolved": "https://registry.npmjs.org/@mdi/js/-/js-7.2.96.tgz",+ "integrity": "sha512-paR9M9ZT7rKbh2boksNUynuSZMHhqRYnEZOm/KrZTjQ4/FzyhjLHuvw/8XYzP+E7fS4+/Ms/82EN1pl/OFsiIA==","dev": true},"@mdi/react": {"version": "1.6.1",- "resolved": "https://registry.npmjs.org/@mdi/react/-/react-1.6.1.tgz",- "integrity": "sha512-4qZeDcluDFGFTWkHs86VOlHkm6gnKaMql13/gpIcUQ8kzxHgpj31NuCkD8abECVfbULJ3shc7Yt4HJ6Wu6SN4w==","dev": true,"requires": {"prop-types": "^15.7.2"@@ -4427,23 +4356,46 @@"@notesnook/theme": {"version": "file:../theme","requires": {- "@theme-ui/core": "^0.14.7",+ "@emotion/react": "11.11.1",+ "@theme-ui/color": "^0.16.0",+ "@theme-ui/components": "0.14.7",+ "@theme-ui/core": "0.14.7",+ "@trpc/server": "^10.31.0",+ "@types/react": "17.0.2","@types/tinycolor2": "^1.4.3",- "tinycolor2": "^1.4.2"+ "isomorphic-fetch": "^3.0.0",+ "tinycolor2": "^1.4.2",+ "ts-json-schema-generator": "^1.2.0",+ "zustand": "^4.3.8"+ }+ },+ "@notesnook/ui": {+ "version": "file:../ui",+ "requires": {+ "@emotion/react": "11.11.1",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1",+ "@notesnook/theme": "file:../theme",+ "@theme-ui/components": "^0.14.7",+ "@theme-ui/core": "^0.14.7",+ "@types/react": "17.0.2",+ "@types/react-dom": "17.0.2",+ "@types/react-modal": "^3.15.1",+ "framer-motion": "^6.5.1",+ "mac-scrollbar": "^0.10.3",+ "react": "17.0.2",+ "react-dom": "17.0.2",+ "react-modal": "^3.15.1"}},"@remirror/core-constants": {"version": "2.0.0",- "resolved": "https://registry.npmjs.org/@remirror/core-constants/-/core-constants-2.0.0.tgz",- "integrity": "sha512-vpePPMecHJllBqCWXl6+FIcZqS+tRUM2kSCCKFeEo1H3XUEv3ocijBIPhnlSAa7g6maX+12ATTgxrOsLpWVr2g==","requires": {"@babel/runtime": "^7.13.10"}},"@remirror/core-helpers": {"version": "2.0.1",- "resolved": "https://registry.npmjs.org/@remirror/core-helpers/-/core-helpers-2.0.1.tgz",- "integrity": "sha512-s8M1pn33aBUhduvD1QR02uUQMegnFkGaTr4c1iBzxTTyg0rbQstzuQ7Q8TkL6n64JtgCdJS9jLz2dONb2meBKQ==","requires": {"@babel/runtime": "^7.13.10","@linaria/core": "3.0.0-beta.13",@@ -4464,131 +4416,92 @@},"@remirror/types": {"version": "1.0.0",- "resolved": "https://registry.npmjs.org/@remirror/types/-/types-1.0.0.tgz",- "integrity": "sha512-7HQbW7k8VxrAtfzs9FxwO6XSDabn8tSFDi1wwzShOnU+cvaYpfxu0ygyTk3TpXsag1hgFKY3ZIlAfB4WVz2LkQ==","requires": {"type-fest": "^2.0.0"}},"@social-embed/lib": {- "version": "0.0.2-next.1",- "resolved": "https://registry.npmjs.org/@social-embed/lib/-/lib-0.0.2-next.1.tgz",- "integrity": "sha512-Ug3VCJL6GODPvYnWGjP5n+wWhc711MN4VnwhRoOYkP8h51rqJj7ttKM8EM7Mq2+KaD2JFb4x05JjMv6S33pf6g=="+ "version": "0.0.2-next.1"},"@styled-system/background": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/background/-/background-5.1.2.tgz",- "integrity": "sha512-jtwH2C/U6ssuGSvwTN3ri/IyjdHb8W9X/g8Y0JLcrH02G+BW3OS8kZdHphF1/YyRklnrKrBT2ngwGUK6aqqV3A==","requires": {"@styled-system/core": "^5.1.2"}},"@styled-system/border": {"version": "5.1.5",- "resolved": "https://registry.npmjs.org/@styled-system/border/-/border-5.1.5.tgz",- "integrity": "sha512-JvddhNrnhGigtzWRCVuAHepniyVi6hBlimxWDVAdcTuk7aRn9BYJUwfHslURtwYFsF5FoEs8Zmr1oZq2M1AP0A==","requires": {"@styled-system/core": "^5.1.2"}},"@styled-system/color": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/color/-/color-5.1.2.tgz",- "integrity": "sha512-1kCkeKDZkt4GYkuFNKc7vJQMcOmTl3bJY3YBUs7fCNM6mMYJeT1pViQ2LwBSBJytj3AB0o4IdLBoepgSgGl5MA==","requires": {"@styled-system/core": "^5.1.2"}},"@styled-system/core": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/core/-/core-5.1.2.tgz",- "integrity": "sha512-XclBDdNIy7OPOsN4HBsawG2eiWfCcuFt6gxKn1x4QfMIgeO6TOlA2pZZ5GWZtIhCUqEPTgIBta6JXsGyCkLBYw==","requires": {"object-assign": "^4.1.1"}},"@styled-system/css": {- "version": "5.1.5",- "resolved": "https://registry.npmjs.org/@styled-system/css/-/css-5.1.5.tgz",- "integrity": "sha512-XkORZdS5kypzcBotAMPBoeckDs9aSZVkvrAlq5K3xP8IMAUek+x2O4NtwoSgkYkWWzVBu6DGdFZLR790QWGG+A=="+ "version": "5.1.5"},"@styled-system/flexbox": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/flexbox/-/flexbox-5.1.2.tgz",- "integrity": "sha512-6hHV52+eUk654Y1J2v77B8iLeBNtc+SA3R4necsu2VVinSD7+XY5PCCEzBFaWs42dtOEDIa2lMrgL0YBC01mDQ==","requires": {"@styled-system/core": "^5.1.2"}},"@styled-system/grid": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/grid/-/grid-5.1.2.tgz",- "integrity": "sha512-K3YiV1KyHHzgdNuNlaw8oW2ktMuGga99o1e/NAfTEi5Zsa7JXxzwEnVSDSBdJC+z6R8WYTCYRQC6bkVFcvdTeg==","requires": {"@styled-system/core": "^5.1.2"}},"@styled-system/layout": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/layout/-/layout-5.1.2.tgz",- "integrity": "sha512-wUhkMBqSeacPFhoE9S6UF3fsMEKFv91gF4AdDWp0Aym1yeMPpqz9l9qS/6vjSsDPF7zOb5cOKC3tcKKOMuDCPw==","requires": {"@styled-system/core": "^5.1.2"}},"@styled-system/position": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/position/-/position-5.1.2.tgz",- "integrity": "sha512-60IZfMXEOOZe3l1mCu6sj/2NAyUmES2kR9Kzp7s2D3P4qKsZWxD1Se1+wJvevb+1TP+ZMkGPEYYXRyU8M1aF5A==","requires": {"@styled-system/core": "^5.1.2"}},"@styled-system/shadow": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/shadow/-/shadow-5.1.2.tgz",- "integrity": "sha512-wqniqYb7XuZM7K7C0d1Euxc4eGtqEe/lvM0WjuAFsQVImiq6KGT7s7is+0bNI8O4Dwg27jyu4Lfqo/oIQXNzAg==","requires": {"@styled-system/core": "^5.1.2"}},"@styled-system/should-forward-prop": {"version": "5.1.5",- "resolved": "https://registry.npmjs.org/@styled-system/should-forward-prop/-/should-forward-prop-5.1.5.tgz",- "integrity": "sha512-+rPRomgCGYnUIaFabDoOgpSDc4UUJ1KsmlnzcEp0tu5lFrBQKgZclSo18Z1URhaZm7a6agGtS5Xif7tuC2s52Q==","requires": {"@emotion/is-prop-valid": "^0.8.1","@emotion/memoize": "^0.7.1","styled-system": "^5.1.5"- },- "dependencies": {- "@emotion/memoize": {- "version": "0.7.5",- "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz",- "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ=="- }}},"@styled-system/space": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/space/-/space-5.1.2.tgz",- "integrity": "sha512-+zzYpR8uvfhcAbaPXhH8QgDAV//flxqxSjHiS9cDFQQUSznXMQmxJegbhcdEF7/eNnJgHeIXv1jmny78kipgBA==","requires": {"@styled-system/core": "^5.1.2"}},"@styled-system/typography": {"version": "5.1.2",- "resolved": "https://registry.npmjs.org/@styled-system/typography/-/typography-5.1.2.tgz",- "integrity": "sha512-BxbVUnN8N7hJ4aaPOd7wEsudeT7CxarR+2hns8XCX1zp0DFfbWw4xYa/olA0oQaqx7F1hzDg+eRaGzAJbF+jOg==","requires": {"@styled-system/core": "^5.1.2"}},"@styled-system/variant": {"version": "5.1.5",- "resolved": "https://registry.npmjs.org/@styled-system/variant/-/variant-5.1.5.tgz",- "integrity": "sha512-Yn8hXAFoWIro8+Q5J8YJd/mP85Teiut3fsGVR9CAxwgNfIAiqlYxsk5iHU7VHJks/0KjL4ATSjmbtCDC/4l1qw==","requires": {"@styled-system/core": "^5.1.2","@styled-system/css": "^5.1.5"@@ -4596,8 +4509,6 @@},"@theme-ui/components": {"version": "0.14.7",- "resolved": "https://registry.npmjs.org/@theme-ui/components/-/components-0.14.7.tgz",- "integrity": "sha512-iIzqBvRL8GNVkzuZinxInYNFW/38pvqqthuCgLsnOC0/A4Q4v13mn/fxlZa6pJjwouswsRLOrkd63bS7Svzkfw==","requires": {"@styled-system/color": "^5.1.2","@styled-system/should-forward-prop": "^5.1.2",@@ -4608,8 +4519,6 @@},"@theme-ui/core": {"version": "0.14.7",- "resolved": "https://registry.npmjs.org/@theme-ui/core/-/core-0.14.7.tgz",- "integrity": "sha512-u60cKOZYsGDG9sSoM4jYj743OpNXXU27f7vXGwrO/B1t/1sv1MAQA0R8HtVwoi9DyOIcOmWfMWYTiMg+4vV1MA==","requires": {"@theme-ui/css": "0.14.7","@theme-ui/parse-props": "0.14.7",@@ -4618,16 +4527,12 @@},"@theme-ui/css": {"version": "0.14.7",- "resolved": "https://registry.npmjs.org/@theme-ui/css/-/css-0.14.7.tgz",- "integrity": "sha512-DbGw0T4MrTjiRs6lnyYgSD2TV/LvFErzDDpm0ICPL2KqDwqgHX4mFpDafj8/DkyCO9wx2KEiUuE+0NtOlR3i4w==","requires": {"csstype": "^3.0.10"}},"@theme-ui/parse-props": {"version": "0.14.7",- "resolved": "https://registry.npmjs.org/@theme-ui/parse-props/-/parse-props-0.14.7.tgz",- "integrity": "sha512-qF10mAYs3wcIkSU5ZSbmHUngwTkPS87D23qg1ArbeO+m+/e4uqOy0+6W0Lt/4JTP7lnWWsCYuScK3F3hOp2q0w==","requires": {"@theme-ui/css": "0.14.7"}@@ -4862,9 +4767,9 @@}},"@types/chai": {- "version": "4.3.4",- "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz",- "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==",+ "version": "4.3.5",+ "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.5.tgz",+ "integrity": "sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==","dev": true},"@types/chai-subset": {@@ -4878,33 +4783,23 @@},"@types/hast": {"version": "2.3.4",- "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz",- "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==","requires": {"@types/unist": "*"}},"@types/katex": {"version": "0.14.0",- "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.14.0.tgz",- "integrity": "sha512-+2FW2CcT0K3P+JMR8YG846bmDwplKUTsWgT2ENwdQ1UdVfRk3GQrh6Mi4sTopy30gI8Uau5CEqHTDZ6YvWIUPA==","dev": true},"@types/node": {- "version": "18.11.0",- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.0.tgz",- "integrity": "sha512-IOXCvVRToe7e0ny7HpT/X9Rb2RYtElG1a+VshjwT00HxrM2dWBApHQoqsI6WiY7Q03vdf2bCrIGzVrkF/5t10w==",+ "version": "18.13.0","dev": true},"@types/object.omit": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/@types/object.omit/-/object.omit-3.0.0.tgz",- "integrity": "sha512-I27IoPpH250TUzc9FzXd0P1BV/BMJuzqD3jOz98ehf9dQqGkxlq+hO1bIqZGWqCg5bVOy0g4AUVJtnxe0klDmw=="+ "version": "3.0.0"},"@types/object.pick": {- "version": "1.3.2",- "resolved": "https://registry.npmjs.org/@types/object.pick/-/object.pick-1.3.2.tgz",- "integrity": "sha512-sn7L+qQ6RLPdXRoiaE7bZ/Ek+o4uICma/lBFPyJEKDTPTBP1W8u0c4baj3EiS4DiqLs+Hk+KUGvMVJtAw3ePJg=="+ "version": "1.3.2"},"@types/parse-json": {"version": "4.0.0",@@ -4912,20 +4807,14 @@"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="},"@types/prismjs": {- "version": "1.26.0",- "resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.0.tgz",- "integrity": "sha512-ZTaqn/qSqUuAq1YwvOFQfVW1AR/oQJlLSZVustdjwI+GZ8kr0MSHBj0tsXPW1EqHubx50gtBEjbPGsdZwQwCjQ=="+ "version": "1.26.0"},"@types/prop-types": {"version": "15.7.5",- "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",- "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==","dev": true},"@types/react": {"version": "17.0.2",- "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.2.tgz",- "integrity": "sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA==","dev": true,"requires": {"@types/prop-types": "*",@@ -4934,8 +4823,6 @@},"@types/react-color": {"version": "3.0.6",- "resolved": "https://registry.npmjs.org/@types/react-color/-/react-color-3.0.6.tgz",- "integrity": "sha512-OzPIO5AyRmLA7PlOyISlgabpYUa3En74LP8mTMa0veCA719SvYQov4WLMsHvCgXP+L+KI9yGhYnqZafVGG0P4w==","dev": true,"requires": {"@types/react": "*",@@ -4944,8 +4831,6 @@},"@types/react-dom": {"version": "17.0.2",- "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.2.tgz",- "integrity": "sha512-Icd9KEgdnFfJs39KyRyr0jQ7EKhq8U6CcHRMGAS45fp5qgUvxL3ujUCfWFttUK2UErqZNj97t9gsVPNAqcwoCg==","dev": true,"requires": {"@types/react": "*"@@ -4953,8 +4838,6 @@},"@types/react-modal": {"version": "3.13.1",- "resolved": "https://registry.npmjs.org/@types/react-modal/-/react-modal-3.13.1.tgz",- "integrity": "sha512-iY/gPvTDIy6Z+37l+ibmrY+GTV4KQTHcCyR5FIytm182RQS69G5ps4PH2FxtC7bAQ2QRHXMevsBgck7IQruHNg==","dev": true,"requires": {"@types/react": "*"@@ -4962,104 +4845,68 @@},"@types/reactcss": {"version": "1.2.6",- "resolved": "https://registry.npmjs.org/@types/reactcss/-/reactcss-1.2.6.tgz",- "integrity": "sha512-qaIzpCuXNWomGR1Xq8SCFTtF4v8V27Y6f+b9+bzHiv087MylI/nTCqqdChNeWS7tslgROmYB7yeiruWX7WnqNg==","dev": true,"requires": {"@types/react": "*"}},"@types/styled-system": {- "version": "5.1.15",- "resolved": "https://registry.npmjs.org/@types/styled-system/-/styled-system-5.1.15.tgz",- "integrity": "sha512-1uls4wipZn8FtYFZ7upRVFDoEeOXTQTs2zuyOZPn02T6rjIxtvj2P2lG5qsxXHhKuKsu3thveCZrtaeLE/ibLg==",+ "version": "5.1.16","requires": {"csstype": "^3.0.2"}},"@types/throttle-debounce": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz",- "integrity": "sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ=="+ "version": "2.1.0"},"@types/tinycolor2": {"version": "1.4.3",- "resolved": "https://registry.npmjs.org/@types/tinycolor2/-/tinycolor2-1.4.3.tgz",- "integrity": "sha512-Kf1w9NE5HEgGxCRyIcRXR/ZYtDv0V8FVPtYHwLxl0O+maGX0erE77pQlD0gpP+/KByMZ87mOA79SjifhSB3PjQ==","dev": true},"@types/unist": {- "version": "2.0.6",- "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz",- "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ=="+ "version": "2.0.6"},"@vitest/expect": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.29.2.tgz",- "integrity": "sha512-wjrdHB2ANTch3XKRhjWZN0UueFocH0cQbi2tR5Jtq60Nb3YOSmakjdAvUa2JFBu/o8Vjhj5cYbcMXkZxn1NzmA==",+ "version": "0.29.8",+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.29.8.tgz",+ "integrity": "sha512-xlcVXn5I5oTq6NiZSY3ykyWixBxr5mG8HYtjvpgg6KaqHm0mvhX18xuwl5YGxIRNt/A5jidd7CWcNHrSvgaQqQ==","dev": true,"requires": {- "@vitest/spy": "0.29.2",- "@vitest/utils": "0.29.2",+ "@vitest/spy": "0.29.8",+ "@vitest/utils": "0.29.8","chai": "^4.3.7"}},"@vitest/runner": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.29.2.tgz",- "integrity": "sha512-A1P65f5+6ru36AyHWORhuQBJrOOcmDuhzl5RsaMNFe2jEkoj0faEszQS4CtPU/LxUYVIazlUtZTY0OEZmyZBnA==",+ "version": "0.29.8",+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.29.8.tgz",+ "integrity": "sha512-FzdhnRDwEr/A3Oo1jtIk/B952BBvP32n1ObMEb23oEJNO+qO5cBet6M2XWIDQmA7BDKGKvmhUf2naXyp/2JEwQ==","dev": true,"requires": {- "@vitest/utils": "0.29.2",+ "@vitest/utils": "0.29.8","p-limit": "^4.0.0","pathe": "^1.1.0"}},"@vitest/spy": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.29.2.tgz",- "integrity": "sha512-Hc44ft5kaAytlGL2PyFwdAsufjbdOvHklwjNy/gy/saRbg9Kfkxfh+PklLm1H2Ib/p586RkQeNFKYuJInUssyw==",+ "version": "0.29.8",+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.29.8.tgz",+ "integrity": "sha512-VdjBe9w34vOMl5I5mYEzNX8inTxrZ+tYUVk9jxaZJmHFwmDFC/GV3KBFTA/JKswr3XHvZL+FE/yq5EVhb6pSAw==","dev": true,"requires": {"tinyspy": "^1.0.2"}},"@vitest/utils": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.29.2.tgz",- "integrity": "sha512-F14/Uc+vCdclStS2KEoXJlOLAEyqRhnw0gM27iXw9bMTcyKRPJrQ+rlC6XZ125GIPvvKYMPpVxNhiou6PsEeYQ==",+ "version": "0.29.8",+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.29.8.tgz",+ "integrity": "sha512-qGzuf3vrTbnoY+RjjVVIBYfuWMjn3UMUqyQtdGNZ6ZIIyte7B37exj6LaVkrZiUTvzSadVvO/tJm8AEgbGCBPg==","dev": true,"requires": {"cli-truncate": "^3.1.0","diff": "^5.1.0","loupe": "^2.3.6",- "picocolors": "^1.0.0","pretty-format": "^27.5.1"- },- "dependencies": {- "ansi-styles": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",- "dev": true- },- "pretty-format": {- "version": "27.5.1",- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",- "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",- "dev": true,- "requires": {- "ansi-regex": "^5.0.1",- "ansi-styles": "^5.0.0",- "react-is": "^17.0.1"- }- },- "react-is": {- "version": "17.0.2",- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",- "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",- "dev": true- }}},"acorn": {@@ -5089,9 +4936,7 @@}},"argparse": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="+ "version": "2.0.1"},"assertion-error": {"version": "1.1.0",@@ -5126,9 +4971,7 @@"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="},"case-anything": {- "version": "2.1.10",- "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.10.tgz",- "integrity": "sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ=="+ "version": "2.1.10"},"chai": {"version": "4.3.7",@@ -5163,19 +5006,13 @@}},"character-entities": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz",- "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="+ "version": "2.0.2"},"character-entities-legacy": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz",- "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="+ "version": "3.0.0"},"character-reference-invalid": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz",- "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw=="+ "version": "2.0.1"},"check-error": {"version": "1.0.2",@@ -5246,14 +5083,10 @@"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="},"comma-separated-tokens": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.2.tgz",- "integrity": "sha512-G5yTt3KQN4Yn7Yk4ed73hlZ1evrFKXeUW3086p3PRFNp7m2vIjI6Pg+Kgb+oyzhd9F2qdcoj67+y3SdxL5XWsg=="+ "version": "2.0.3"},"commander": {- "version": "8.3.0",- "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",- "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww=="+ "version": "8.3.0"},"convert-source-map": {"version": "1.9.0",@@ -5261,9 +5094,9 @@"integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="},"cosmiconfig": {- "version": "7.0.1",- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz",- "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==",+ "version": "7.1.0",+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",+ "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==","requires": {"@types/parse-json": "^4.0.0","import-fresh": "^3.2.1",@@ -5273,9 +5106,7 @@}},"crelt": {- "version": "1.0.5",- "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.5.tgz",- "integrity": "sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA=="+ "version": "1.0.5"},"css.escape": {"version": "1.5.1",@@ -5284,27 +5115,19 @@"dev": true},"csstype": {- "version": "3.1.1",- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",- "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="+ "version": "3.1.1"},"dash-get": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/dash-get/-/dash-get-1.0.2.tgz",- "integrity": "sha512-4FbVrHDwfOASx7uQVxeiCTo7ggSdYZbqs8lH+WU6ViypPlDbe9y6IP5VVUDQBv9DcnyaiPT5XT0UWHgJ64zLeQ=="+ "version": "1.0.2"},"debug": {"version": "3.2.7",- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",- "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==","requires": {"ms": "^2.1.1"}},"decode-named-character-reference": {"version": "1.0.2",- "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz",- "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==","requires": {"character-entities": "^2.0.0"}@@ -5319,14 +5142,10 @@}},"deepmerge": {- "version": "4.2.2",- "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",- "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg=="+ "version": "4.3.0"},"detect-indent": {- "version": "7.0.1",- "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-7.0.1.tgz",- "integrity": "sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g=="+ "version": "7.0.1"},"diff": {"version": "5.1.0",@@ -5380,8 +5199,12 @@"eastasianwidth": {"version": "0.2.0","resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",- "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",- "dev": true+ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="+ },+ "emoji-regex": {+ "version": "9.2.2",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="},"entities": {"version": "1.1.2",@@ -5397,49 +5220,43 @@}},"esbuild": {- "version": "0.16.17",- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz",- "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==",- "dev": true,- "requires": {- "@esbuild/android-arm": "0.16.17",- "@esbuild/android-arm64": "0.16.17",- "@esbuild/android-x64": "0.16.17",- "@esbuild/darwin-arm64": "0.16.17",- "@esbuild/darwin-x64": "0.16.17",- "@esbuild/freebsd-arm64": "0.16.17",- "@esbuild/freebsd-x64": "0.16.17",- "@esbuild/linux-arm": "0.16.17",- "@esbuild/linux-arm64": "0.16.17",- "@esbuild/linux-ia32": "0.16.17",- "@esbuild/linux-loong64": "0.16.17",- "@esbuild/linux-mips64el": "0.16.17",- "@esbuild/linux-ppc64": "0.16.17",- "@esbuild/linux-riscv64": "0.16.17",- "@esbuild/linux-s390x": "0.16.17",- "@esbuild/linux-x64": "0.16.17",- "@esbuild/netbsd-x64": "0.16.17",- "@esbuild/openbsd-x64": "0.16.17",- "@esbuild/sunos-x64": "0.16.17",- "@esbuild/win32-arm64": "0.16.17",- "@esbuild/win32-ia32": "0.16.17",- "@esbuild/win32-x64": "0.16.17"+ "version": "0.17.18",+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz",+ "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==",+ "dev": true,+ "requires": {+ "@esbuild/android-arm": "0.17.18",+ "@esbuild/android-arm64": "0.17.18",+ "@esbuild/android-x64": "0.17.18",+ "@esbuild/darwin-arm64": "0.17.18",+ "@esbuild/darwin-x64": "0.17.18",+ "@esbuild/freebsd-arm64": "0.17.18",+ "@esbuild/freebsd-x64": "0.17.18",+ "@esbuild/linux-arm": "0.17.18",+ "@esbuild/linux-arm64": "0.17.18",+ "@esbuild/linux-ia32": "0.17.18",+ "@esbuild/linux-loong64": "0.17.18",+ "@esbuild/linux-mips64el": "0.17.18",+ "@esbuild/linux-ppc64": "0.17.18",+ "@esbuild/linux-riscv64": "0.17.18",+ "@esbuild/linux-s390x": "0.17.18",+ "@esbuild/linux-x64": "0.17.18",+ "@esbuild/netbsd-x64": "0.17.18",+ "@esbuild/openbsd-x64": "0.17.18",+ "@esbuild/sunos-x64": "0.17.18",+ "@esbuild/win32-arm64": "0.17.18",+ "@esbuild/win32-ia32": "0.17.18",+ "@esbuild/win32-x64": "0.17.18"}},"escape-string-regexp": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="+ "version": "4.0.0"},"exenv": {- "version": "1.2.2",- "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz",- "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw=="+ "version": "1.2.2"},"fast-deep-equal": {- "version": "3.1.3",- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="+ "version": "3.1.3"},"find-root": {"version": "1.1.0",@@ -5534,17 +5351,13 @@"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="},"hast-util-parse-selector": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.0.tgz",- "integrity": "sha512-AyjlI2pTAZEOeu7GeBPZhROx0RHBnydkQIXlhnFzDi0qfXTmGUWoCYZtomHbrdrheV4VFUlPcfJ6LMF5T6sQzg==",+ "version": "3.1.1","requires": {"@types/hast": "^2.0.0"}},"hastscript": {- "version": "7.1.0",- "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.1.0.tgz",- "integrity": "sha512-uBjaTTLN0MkCZxY/R2fWUOcu7FRtUVzKRO5P/RAfgsu3yFiMB1JWCO4AjeVkgHxAira1f2UecHK5WfS9QurlWA==",+ "version": "7.2.0","requires": {"@types/hast": "^2.0.0","comma-separated-tokens": "^2.0.0",@@ -5554,9 +5367,7 @@}},"he": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",- "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="+ "version": "1.2.0"},"hey-listen": {"version": "1.0.8",@@ -5566,8 +5377,6 @@},"hoist-non-react-statics": {"version": "3.3.2",- "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",- "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==","requires": {"react-is": "^16.7.0"}@@ -5587,8 +5396,6 @@},"iconv-lite": {"version": "0.4.24",- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==","requires": {"safer-buffer": ">= 2.1.2 < 3"}@@ -5603,9 +5410,7 @@}},"indent-string": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",- "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg=="+ "version": "5.0.0"},"inherits": {"version": "2.0.4",@@ -5613,14 +5418,10 @@"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="},"is-alphabetical": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz",- "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="+ "version": "2.0.1"},"is-alphanumerical": {"version": "2.0.1",- "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz",- "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==","requires": {"is-alphabetical": "^2.0.0","is-decimal": "^2.0.0"@@ -5632,48 +5433,42 @@"integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="},"is-core-module": {- "version": "2.10.0",- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz",- "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==",+ "version": "2.12.1",+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz",+ "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==","requires": {"has": "^1.0.3"}},"is-decimal": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz",- "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="+ "version": "2.0.1"},"is-extendable": {"version": "1.0.1",- "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",- "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==","requires": {"is-plain-object": "^2.0.4"}},+ "is-fullwidth-code-point": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",+ "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",+ "dev": true+ },"is-hexadecimal": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz",- "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg=="+ "version": "2.0.1"},"is-plain-object": {"version": "2.0.4",- "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",- "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==","requires": {"isobject": "^3.0.1"}},"isobject": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",- "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg=="+ "version": "3.0.1"},"isomorphic-fetch": {"version": "3.0.0",- "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz",- "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==","dev": true,"requires": {"node-fetch": "^2.6.1",@@ -5681,9 +5476,7 @@}},"js-tokens": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="+ "version": "4.0.0"},"json-parse-even-better-errors": {"version": "2.3.1",@@ -5697,9 +5490,7 @@"dev": true},"katex": {- "version": "0.16.2",- "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.2.tgz",- "integrity": "sha512-70DJdQAyh9EMsthw3AaQlDyFf54X7nWEUIa5W+rq8XOpEk//w5Th7/8SqFqpvi/KZ2t6MHUj4f9wLmztBmAYQA==",+ "version": "0.16.4","requires": {"commander": "^8.0.0"}@@ -5711,16 +5502,14 @@},"linkify-it": {"version": "4.0.1",- "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",- "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==","requires": {"uc.micro": "^1.0.1"}},"linkifyjs": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.1.0.tgz",- "integrity": "sha512-Ffv8VoY3+ixI1b3aZ3O+jM6x17cOsgwfB1Wq7pkytbo1WlyRp6ZO0YDMqiWT/gQPY/CmtiGuKfzDIVqxh1aCTA=="+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.1.1.tgz",+ "integrity": "sha512-zFN/CTVmbcVef+WaDXT63dNzzkfRBKT1j464NJQkV7iSgJU0sLBus9W0HBwnXK13/hf168pbrx/V/bjEHOXNHA=="},"local-pkg": {"version": "0.4.3",@@ -5730,8 +5519,6 @@},"loose-envify": {"version": "1.4.0",- "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",- "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==","requires": {"js-tokens": "^3.0.0 || ^4.0.0"}@@ -5746,14 +5533,10 @@}},"make-error": {- "version": "1.3.6",- "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",- "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw=="+ "version": "1.3.6"},"markdown-it": {"version": "13.0.1",- "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz",- "integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==","requires": {"argparse": "^2.0.1","entities": "~3.0.1",@@ -5763,77 +5546,59 @@},"dependencies": {"entities": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",- "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q=="+ "version": "3.0.1"}}},"mdurl": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",- "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="+ "version": "1.0.1"},"min-indent": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",- "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg=="+ "version": "1.0.1"},"mlly": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.1.1.tgz",- "integrity": "sha512-Jnlh4W/aI4GySPo6+DyTN17Q75KKbLTyFK8BrGhjNP4rxuUjbRWhE6gHg3bs33URWAF44FRm7gdQA348i3XxRw==",+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.2.0.tgz",+ "integrity": "sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==","dev": true,"requires": {"acorn": "^8.8.2","pathe": "^1.1.0",- "pkg-types": "^1.0.1",- "ufo": "^1.1.0"+ "pkg-types": "^1.0.2",+ "ufo": "^1.1.1"}},"ms": {- "version": "2.1.3",- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="+ "version": "2.1.3"},"nanoid": {- "version": "4.0.1",- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.1.tgz",- "integrity": "sha512-udKGtCCUafD3nQtJg9wBhRP3KMbPglUsgV5JVsXhvyBs/oefqb4sqMEhKBBgqZncYowu58p1prsZQBYvAj/Gww=="+ "version": "4.0.2",+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz",+ "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw=="},"node-fetch": {- "version": "2.6.7",- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",+ "version": "2.6.9","requires": {"whatwg-url": "^5.0.0"}},"object-assign": {- "version": "4.1.1",- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",- "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="+ "version": "4.1.1"},"object.omit": {"version": "3.0.0",- "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-3.0.0.tgz",- "integrity": "sha512-EO+BCv6LJfu+gBIF3ggLicFebFLN5zqzz/WWJlMFfkMyGth+oBkhxzDl0wx2W4GkLzuQs/FsSkXZb2IMWQqmBQ==","requires": {"is-extendable": "^1.0.0"}},"object.pick": {"version": "1.3.0",- "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",- "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==","requires": {"isobject": "^3.0.1"}},"orderedmap": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-2.1.0.tgz",- "integrity": "sha512-/pIFexOm6S70EPdznemIz3BQZoJ4VTFrhqzu0ACBqBgeLsLxq8e6Jim63ImIfwW/zAD1AlXpRMlOv3aghmo4dA=="+ "version": "2.1.0"},"p-limit": {"version": "4.0.0",@@ -5853,9 +5618,7 @@}},"parse-entities": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.0.tgz",- "integrity": "sha512-5nk9Fn03x3rEhGaX1FU6IDwG/k+GxLXlFAkgrbM1asuAFl3BhdQWvASaIsmwWypRNcZKHPYnIuOSfIWEyEQnPQ==",+ "version": "4.0.1","requires": {"@types/unist": "^2.0.0","character-entities": "^2.0.0",@@ -5907,13 +5670,13 @@"dev": true},"pkg-types": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.2.tgz",- "integrity": "sha512-hM58GKXOcj8WTqUXnsQyJYXdeAPbythQgEF3nTcEo+nkD49chjQ9IKm/QJy9xf6JakXptz86h7ecP2024rrLaQ==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz",+ "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==","dev": true,"requires": {"jsonc-parser": "^3.2.0",- "mlly": "^1.1.1",+ "mlly": "^1.2.0","pathe": "^1.1.0"}},@@ -5930,33 +5693,54 @@}},"postcss": {- "version": "8.4.21",- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz",- "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",+ "version": "8.4.23",+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz",+ "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==","dev": true,"requires": {- "nanoid": "^3.3.4",+ "nanoid": "^3.3.6","picocolors": "^1.0.0","source-map-js": "^1.0.2"},"dependencies": {"nanoid": {- "version": "3.3.4",- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",- "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",+ "version": "3.3.6",+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",+ "dev": true+ }+ }+ },+ "pretty-format": {+ "version": "27.5.1",+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",+ "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",+ "dev": true,+ "requires": {+ "ansi-regex": "^5.0.1",+ "ansi-styles": "^5.0.0",+ "react-is": "^17.0.1"+ },+ "dependencies": {+ "ansi-styles": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",+ "dev": true+ },+ "react-is": {+ "version": "17.0.2",+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==","dev": true}}},"prism-themes": {- "version": "1.9.0",- "resolved": "https://registry.npmjs.org/prism-themes/-/prism-themes-1.9.0.tgz",- "integrity": "sha512-tX2AYsehKDw1EORwBps+WhBFKc2kxfoFpQAjxBndbZKr4fRmMkv47XN0BghC/K1qwodB1otbe4oF23vUTFDokw=="+ "version": "1.9.0"},"prop-types": {"version": "15.8.1",- "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",- "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==","requires": {"loose-envify": "^1.4.0","object-assign": "^4.1.1",@@ -5964,35 +5748,25 @@}},"property-information": {- "version": "6.1.1",- "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.1.1.tgz",- "integrity": "sha512-hrzC564QIl0r0vy4l6MvRLhafmUowhO/O3KgVSoXIbbA2Sz4j8HGpJc6T2cubRVwMwpdiG/vKGfhT4IixmKN9w=="+ "version": "6.2.0"},"prosemirror-changeset": {"version": "2.2.0",- "resolved": "https://registry.npmjs.org/prosemirror-changeset/-/prosemirror-changeset-2.2.0.tgz",- "integrity": "sha512-QM7ohGtkpVpwVGmFb8wqVhaz9+6IUXcIQBGZ81YNAKYuHiFJ1ShvSzab4pKqTinJhwciZbrtBEk/2WsqSt2PYg==","requires": {"prosemirror-transform": "^1.0.0"}},"prosemirror-codemark": {- "version": "0.4.1",- "resolved": "https://registry.npmjs.org/prosemirror-codemark/-/prosemirror-codemark-0.4.1.tgz",- "integrity": "sha512-dRttadls8V1ikQ1lK3m3wYGkDqBq1sVNNvwn8X2trNXYWBcb5c+tLg9LPlN7dQMvLFGVjyalB7lvG9hobLXvbg=="+ "version": "0.4.2"},"prosemirror-collab": {"version": "1.3.0",- "resolved": "https://registry.npmjs.org/prosemirror-collab/-/prosemirror-collab-1.3.0.tgz",- "integrity": "sha512-+S/IJ69G2cUu2IM5b3PBekuxs94HO1CxJIWOFrLQXUaUDKL/JfBx+QcH31ldBlBXyDEUl+k3Vltfi1E1MKp2mA==","requires": {"prosemirror-state": "^1.0.0"}},"prosemirror-commands": {"version": "1.5.0",- "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.5.0.tgz",- "integrity": "sha512-zL0Fxbj3fh71GPNHn5YdYgYGX2aU2XLecZYk2ekEF0oOD259HcXtM+96VjPVi5o3h4sGUdDfEEhGiREXW6U+4A==","requires": {"prosemirror-model": "^1.0.0","prosemirror-state": "^1.0.0",@@ -6000,9 +5774,7 @@}},"prosemirror-dropcursor": {- "version": "1.7.1",- "resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.7.1.tgz",- "integrity": "sha512-GmWk9bAwhfHwA8xmJhBFjPcebxUG9zAPYtqpIr7NTDigWZZEJCgUYyUQeqgyscLr8ZHoh9aeprX9kW7BihUT+w==",+ "version": "1.7.0","requires": {"prosemirror-state": "^1.0.0","prosemirror-transform": "^1.1.0",@@ -6011,8 +5783,6 @@},"prosemirror-gapcursor": {"version": "1.3.1",- "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.3.1.tgz",- "integrity": "sha512-GKTeE7ZoMsx5uVfc51/ouwMFPq0o8YrZ7Hx4jTF4EeGbXxBveUV8CGv46mSHuBBeXGmvu50guoV2kSnOeZZnUA==","requires": {"prosemirror-keymap": "^1.0.0","prosemirror-model": "^1.0.0",@@ -6022,8 +5792,6 @@},"prosemirror-history": {"version": "1.3.0",- "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.3.0.tgz",- "integrity": "sha512-qo/9Wn4B/Bq89/YD+eNWFbAytu6dmIM85EhID+fz9Jcl9+DfGEo8TTSrRhP15+fFEoaPqpHSxlvSzSEbmlxlUA==","requires": {"prosemirror-state": "^1.2.2","prosemirror-transform": "^1.0.0",@@ -6032,17 +5800,13 @@},"prosemirror-inputrules": {"version": "1.2.0",- "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.2.0.tgz",- "integrity": "sha512-eAW/M/NTSSzpCOxfR8Abw6OagdG0MiDAiWHQMQveIsZtoKVYzm0AflSPq/ymqJd56/Su1YPbwy9lM13wgHOFmQ==","requires": {"prosemirror-state": "^1.0.0","prosemirror-transform": "^1.0.0"}},"prosemirror-keymap": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.2.0.tgz",- "integrity": "sha512-TdSfu+YyLDd54ufN/ZeD1VtBRYpgZnTPnnbY+4R08DDgs84KrIPEPbJL8t1Lm2dkljFx6xeBE26YWH3aIzkPKg==",+ "version": "1.2.1","requires": {"prosemirror-state": "^1.0.0","w3c-keyname": "^2.2.0"@@ -6050,8 +5814,6 @@},"prosemirror-markdown": {"version": "1.10.1",- "resolved": "https://registry.npmjs.org/prosemirror-markdown/-/prosemirror-markdown-1.10.1.tgz",- "integrity": "sha512-s7iaTLiX+qO5z8kF2NcMmy2T7mIlxzkS4Sp3vTKSYChPtbMpg6YxFkU0Y06rUg2WtKlvBu7v1bXzlGBkfjUWAA==","requires": {"markdown-it": "^13.0.1","prosemirror-model": "^1.0.0"@@ -6059,8 +5821,6 @@},"prosemirror-menu": {"version": "1.2.1",- "resolved": "https://registry.npmjs.org/prosemirror-menu/-/prosemirror-menu-1.2.1.tgz",- "integrity": "sha512-sBirXxVfHalZO4f1ZS63WzewINK4182+7dOmoMeBkqYO8wqMBvBS7wQuwVOHnkMWPEh0+N0LJ856KYUN+vFkmQ==","requires": {"crelt": "^1.0.0","prosemirror-commands": "^1.0.0",@@ -6070,24 +5830,18 @@},"prosemirror-model": {"version": "1.19.0",- "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.19.0.tgz",- "integrity": "sha512-/CvFGJnwc41EJSfDkQLly1cAJJJmBpZwwUJtwZPTjY2RqZJfM8HVbCreOY/jti8wTRbVyjagcylyGoeJH/g/3w==","requires": {"orderedmap": "^2.0.0"}},"prosemirror-schema-basic": {"version": "1.2.1",- "resolved": "https://registry.npmjs.org/prosemirror-schema-basic/-/prosemirror-schema-basic-1.2.1.tgz",- "integrity": "sha512-vYBdIHsYKSDIqYmPBC7lnwk9DsKn8PnVqK97pMYP5MLEDFqWIX75JiaJTzndBii4bRuNqhC2UfDOfM3FKhlBHg==","requires": {"prosemirror-model": "^1.19.0"}},"prosemirror-schema-list": {"version": "1.2.2",- "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.2.2.tgz",- "integrity": "sha512-rd0pqSDp86p0MUMKG903g3I9VmElFkQpkZ2iOd3EOVg1vo5Cst51rAsoE+5IPy0LPXq64eGcCYlW1+JPNxOj2w==","requires": {"prosemirror-model": "^1.0.0","prosemirror-state": "^1.0.0",@@ -6096,8 +5850,6 @@},"prosemirror-state": {"version": "1.4.2",- "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.2.tgz",- "integrity": "sha512-puuzLD2mz/oTdfgd8msFbe0A42j5eNudKAAPDB0+QJRw8cO1ygjLmhLrg9RvDpf87Dkd6D4t93qdef00KKNacQ==","requires": {"prosemirror-model": "^1.0.0","prosemirror-transform": "^1.0.0",@@ -6106,8 +5858,6 @@},"prosemirror-tables": {"version": "1.3.2",- "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.3.2.tgz",- "integrity": "sha512-/9JTeN6s58Zq66HXaxP6uf8PAmc7XXKZFPlOGVtLvxEd6xBP6WtzaJB9wBjiGUzwbdhdMEy7V62yuHqk/3VrnQ==","requires": {"prosemirror-keymap": "^1.1.2","prosemirror-model": "^1.8.1",@@ -6129,8 +5879,6 @@},"prosemirror-trailing-node": {"version": "2.0.3",- "resolved": "https://registry.npmjs.org/prosemirror-trailing-node/-/prosemirror-trailing-node-2.0.3.tgz",- "integrity": "sha512-lGrjMrn97KWkjQSW/FjdvnhJmqFACmQIyr6lKYApvHitDnKsCoZz6XzrHB7RZYHni/0NxQmZ01p/2vyK2SkvaA==","requires": {"@babel/runtime": "^7.13.10","@remirror/core-constants": "^2.0.0",@@ -6139,17 +5887,13 @@}},"prosemirror-transform": {- "version": "1.7.0",- "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.7.0.tgz",- "integrity": "sha512-O4T697Cqilw06Zvc3Wm+e237R6eZtJL/xGMliCi+Uo8VL6qHk6afz1qq0zNjT3eZMuYwnP8ZS0+YxX/tfcE9TQ==",+ "version": "1.7.1","requires": {"prosemirror-model": "^1.0.0"}},"prosemirror-view": {"version": "1.30.1",- "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.30.1.tgz",- "integrity": "sha512-pZUfr7lICJkEY7XwzldAKrkflZDeIvnbfuu2RIS01N5NwJmR/dfZzDzJRzhb3SM2QtT/bM8b4Nnib8X3MGpAhA==","requires": {"prosemirror-model": "^1.16.0","prosemirror-state": "^1.0.0",@@ -6157,9 +5901,7 @@}},"re-resizable": {- "version": "6.9.9",- "resolved": "https://registry.npmjs.org/re-resizable/-/re-resizable-6.9.9.tgz",- "integrity": "sha512-l+MBlKZffv/SicxDySKEEh42hR6m5bAHfNu3Tvxks2c4Ah+ldnWjfnVRwxo/nxF27SsUsxDS0raAzFuJNKABXA=="+ "version": "6.9.9"},"react": {"version": "17.0.2",@@ -6172,9 +5914,7 @@}},"react-colorful": {- "version": "5.6.1",- "resolved": "https://registry.npmjs.org/react-colorful/-/react-colorful-5.6.1.tgz",- "integrity": "sha512-1exovf0uGTGyq5mXQT0zgQ80uvj2PCwvF8zY1RN9/vbJVSjSo3fsB/4L3ObbF7u70NduSiK4xu4Y6q1MHoUGEw=="+ "version": "5.6.1"},"react-dom": {"version": "17.0.2",@@ -6188,19 +5928,13 @@}},"react-is": {- "version": "16.13.1",- "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",- "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="+ "version": "16.13.1"},"react-lifecycles-compat": {- "version": "3.0.4",- "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",- "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="+ "version": "3.0.4"},"react-modal": {"version": "3.16.1",- "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.1.tgz",- "integrity": "sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==","requires": {"exenv": "^1.2.0","prop-types": "^15.7.2",@@ -6209,9 +5943,9 @@}},"readable-stream": {- "version": "3.6.0",- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",- "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",+ "version": "3.6.2",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==","requires": {"inherits": "^2.0.3","string_decoder": "^1.1.1",@@ -6220,8 +5954,6 @@},"redent": {"version": "4.0.0",- "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz",- "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==","requires": {"indent-string": "^5.0.0","strip-indent": "^4.0.0"@@ -6229,8 +5961,6 @@},"refractor": {"version": "4.8.0",- "resolved": "https://registry.npmjs.org/refractor/-/refractor-4.8.0.tgz",- "integrity": "sha512-SVOnWUJiEBFNiBlHbudSpSpDfDhDY1UHF0CMKgdvPsMYNQQ4rnqFxyGvP07UmteNC8V12mTF2c0lEsGS7lKaGw==","requires": {"@types/hast": "^2.0.0","@types/prismjs": "^1.0.0",@@ -6239,16 +5969,14 @@}},"regenerator-runtime": {- "version": "0.13.11",- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",- "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="+ "version": "0.13.11"},"resolve": {- "version": "1.22.1",- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",+ "version": "1.22.2",+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",+ "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==","requires": {- "is-core-module": "^2.9.0",+ "is-core-module": "^2.11.0","path-parse": "^1.0.7","supports-preserve-symlinks-flag": "^1.0.0"}@@ -6259,28 +5987,19 @@"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="},"rollup": {- "version": "3.17.3",- "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.17.3.tgz",- "integrity": "sha512-p5LaCXiiOL/wrOkj8djsIDFmyU9ysUxcyW+EKRLHb6TKldJzXpImjcRSR+vgo09DBdofGcOoLOsRyxxG2n5/qQ==",+ "version": "3.21.4",+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.4.tgz",+ "integrity": "sha512-N5LxpvDolOm9ueiCp4NfB80omMDqb45ShtsQw2+OT3f11uJ197dv703NZvznYHP6RWR85wfxanXurXKG3ux2GQ==","dev": true,"requires": {"fsevents": "~2.3.2"}},"rope-sequence": {- "version": "1.3.3",- "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.3.tgz",- "integrity": "sha512-85aZYCxweiD5J8yTEbw+E6A27zSnLPNDL0WfPdw3YYodq7WjnTKo0q4dtyQ2gz23iPT8Q9CUyJtAaUNcTxRf5Q=="- },- "safe-buffer": {- "version": "5.2.1",- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="+ "version": "1.3.3"},"safer-buffer": {- "version": "2.1.2",- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="+ "version": "2.1.2"},"scheduler": {"version": "0.20.2",@@ -6313,12 +6032,6 @@"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz","integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==","dev": true- },- "is-fullwidth-code-point": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",- "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",- "dev": true}}},@@ -6350,9 +6063,7 @@}},"space-separated-tokens": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.1.tgz",- "integrity": "sha512-ekwEbFp5aqSPKaqeY1PGrlGQxPNaq+Cnx4+bE2D8sciBQrHpbwoBbawqTN2+6jPs9IdWxxiUcN0K2pkczD3zmw=="+ "version": "2.0.2"},"stackback": {"version": "0.0.2",@@ -6361,9 +6072,9 @@"dev": true},"std-env": {- "version": "3.3.2",- "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.2.tgz",- "integrity": "sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==",+ "version": "3.3.3",+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.3.tgz",+ "integrity": "sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==","dev": true},"string_decoder": {@@ -6371,13 +6082,28 @@"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz","integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==","requires": {- "safe-buffer": "~5.2.0"+ "eastasianwidth": "^0.2.0",+ "emoji-regex": "^9.2.2",+ "strip-ansi": "^7.0.1"+ }+ },+ "strip-ansi": {+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",+ "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",+ "requires": {+ "ansi-regex": "^6.0.1"+ },+ "dependencies": {+ "ansi-regex": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA=="+ }}},"strip-indent": {"version": "4.0.0",- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz",- "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==","requires": {"min-indent": "^1.0.1"}@@ -6403,8 +6129,6 @@},"styled-system": {"version": "5.1.5",- "resolved": "https://registry.npmjs.org/styled-system/-/styled-system-5.1.5.tgz",- "integrity": "sha512-7VoD0o2R3RKzOzPK0jYrVnS8iJdfkKsQJNiLRDjikOpQVqQHns/DXWaPZOH4tIKkhAT7I6wIsy9FWTWh2X3q+A==","requires": {"@styled-system/background": "^5.1.2","@styled-system/border": "^5.1.5",@@ -6422,9 +6146,9 @@}},"stylis": {- "version": "4.0.13",- "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.13.tgz",- "integrity": "sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag=="+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",+ "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="},"supports-color": {"version": "5.5.0",@@ -6440,25 +6164,21 @@"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="},"throttle-debounce": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-3.0.1.tgz",- "integrity": "sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg=="+ "version": "3.0.1"},"tinybench": {- "version": "2.3.1",- "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.3.1.tgz",- "integrity": "sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA==",+ "version": "2.5.0",+ "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.0.tgz",+ "integrity": "sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==","dev": true},"tinycolor2": {- "version": "1.4.2",- "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz",- "integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA=="+ "version": "1.6.0"},"tinypool": {- "version": "0.3.1",- "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.3.1.tgz",- "integrity": "sha512-zLA1ZXlstbU2rlpA4CIeVaqvWq41MTWqLY3FfsAXgC8+f7Pk7zroaJQxDgxn1xNudKW6Kmj4808rPFShUlIRmQ==",+ "version": "0.4.0",+ "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.4.0.tgz",+ "integrity": "sha512-2ksntHOKf893wSAH4z/+JbPpi92esw8Gn9N2deXX+B0EO92hexAVI9GIZZPx7P5aYo5KULfeOSt3kMOmSOy6uA==","dev": true},"tinyspy": {@@ -6473,9 +6193,7 @@"integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog=="},"tr46": {- "version": "0.0.3",- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="+ "version": "0.0.3"},"tslib": {"version": "2.5.0",@@ -6490,19 +6208,15 @@"dev": true},"type-fest": {- "version": "2.19.0",- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",- "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA=="+ "version": "2.19.0"},"uc.micro": {- "version": "1.0.6",- "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",- "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="+ "version": "1.0.6"},"ufo": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.1.tgz",- "integrity": "sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==",+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.2.tgz",+ "integrity": "sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==","dev": true},"unfurl.js": {@@ -6519,9 +6233,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=="+ "version": "1.2.0"},"util-deprecate": {"version": "1.0.2",@@ -6529,22 +6241,21 @@"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="},"vite": {- "version": "4.1.4",- "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.4.tgz",- "integrity": "sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg==",+ "version": "4.3.4",+ "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.4.tgz",+ "integrity": "sha512-f90aqGBoxSFxWph2b39ae2uHAxm5jFBBdnfueNxZAT1FTpM13ccFQExCaKbR2xFW5atowjleRniQ7onjJ22QEg==","dev": true,"requires": {- "esbuild": "^0.16.14",+ "esbuild": "^0.17.5","fsevents": "~2.3.2",- "postcss": "^8.4.21",- "resolve": "^1.22.1",- "rollup": "^3.10.0"+ "postcss": "^8.4.23",+ "rollup": "^3.21.0"}},"vite-node": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.29.2.tgz",- "integrity": "sha512-5oe1z6wzI3gkvc4yOBbDBbgpiWiApvuN4P55E8OI131JGrSuo4X3SOZrNmZYo4R8Zkze/dhi572blX0zc+6SdA==",+ "version": "0.29.8",+ "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.29.8.tgz",+ "integrity": "sha512-b6OtCXfk65L6SElVM20q5G546yu10/kNrhg08afEoWlFRJXFq9/6glsvSVY+aI6YeC1tu2TtAqI2jHEQmOmsFw==","dev": true,"requires": {"cac": "^6.7.14",@@ -6573,18 +6284,18 @@}},"vitest": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.29.2.tgz",- "integrity": "sha512-ydK9IGbAvoY8wkg29DQ4ivcVviCaUi3ivuPKfZEVddMTenFHUfB8EEDXQV8+RasEk1ACFLgMUqAaDuQ/Nk+mQA==",+ "version": "0.29.8",+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.29.8.tgz",+ "integrity": "sha512-JIAVi2GK5cvA6awGpH0HvH/gEG9PZ0a/WoxdiV3PmqK+3CjQMf8c+J/Vhv4mdZ2nRyXFw66sAg6qz7VNkaHfDQ==","dev": true,"requires": {"@types/chai": "^4.3.4","@types/chai-subset": "^1.3.3","@types/node": "*",- "@vitest/expect": "0.29.2",- "@vitest/runner": "0.29.2",- "@vitest/spy": "0.29.2",- "@vitest/utils": "0.29.2",+ "@vitest/expect": "0.29.8",+ "@vitest/runner": "0.29.8",+ "@vitest/spy": "0.29.8",+ "@vitest/utils": "0.29.8","acorn": "^8.8.1","acorn-walk": "^8.2.0","cac": "^6.7.14",@@ -6597,10 +6308,10 @@"std-env": "^3.3.1","strip-literal": "^1.0.0","tinybench": "^2.3.1",- "tinypool": "^0.3.1",+ "tinypool": "^0.4.0","tinyspy": "^1.0.2","vite": "^3.0.0 || ^4.0.0",- "vite-node": "0.29.2",+ "vite-node": "0.29.8","why-is-node-running": "^2.2.2"},"dependencies": {@@ -6628,28 +6339,20 @@}},"w3c-keyname": {- "version": "2.2.6",- "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.6.tgz",- "integrity": "sha512-f+fciywl1SJEniZHD6H+kUO8gOnwIr7f4ijKA6+ZvJFjeGi1r4PDLl53Ayud9O/rk64RqgoQine0feoeOU0kXg=="+ "version": "2.2.6"},"warning": {"version": "4.0.3",- "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",- "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==","requires": {"loose-envify": "^1.0.0"}},"web-vitals": {"version": "2.1.4",- "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-2.1.4.tgz",- "integrity": "sha512-sVWcwhU5mX6crfI5Vd2dC4qchyTqxV8URinzt25XqVh+bHEPGH4C3NPrNionCP7Obx59wrYEbNlw4Z8sjALzZg==","dev": true},"webidl-conversions": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="+ "version": "3.0.1"},"whatwg-encoding": {"version": "2.0.0",@@ -6673,8 +6376,6 @@},"whatwg-fetch": {"version": "3.6.2",- "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz",- "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==","dev": true},"whatwg-mimetype": {@@ -6685,8 +6386,6 @@},"whatwg-url": {"version": "5.0.0",- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==","requires": {"tr46": "~0.0.3","webidl-conversions": "^3.0.0"diff --git a/packages/editor/package.json b/packages/editor/package.jsonindex 959bed1fc..fe23174d2 100644--- a/packages/editor/package.json+++ b/packages/editor/package.json@@ -5,13 +5,13 @@"types": "dist/index.d.ts","license": "GPL-3.0-or-later","dependencies": {- "clipboard-polyfill": "^4.0.0",- "@emotion/react": "^11.10.0",- "@notesnook/theme": "file:../theme",+ "@emotion/react": "11.11.1","@notesnook/core": "file:../core",+ "@notesnook/theme": "file:../theme",+ "@notesnook/ui": "file:../ui","@social-embed/lib": "^0.0.2-next.1",- "@theme-ui/components": "^0.14.7",- "@theme-ui/core": "^0.14.7",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0","@tiptap/core": "2.0.3","@tiptap/extension-character-count": "2.0.3","@tiptap/extension-color": "2.0.3",@@ -33,13 +33,14 @@"@tiptap/extension-underline": "2.0.3","@tiptap/pm": "2.0.3","@tiptap/starter-kit": "2.0.3",+ "clipboard-polyfill": "^4.0.0","detect-indent": "^7.0.0","katex": "^0.16.2","nanoid": "^4.0.1","prism-themes": "^1.9.0","prosemirror-codemark": "^0.4.1","re-resizable": "^6.9.9",- "react-colorful": "^5.5.1",+ "react-colorful": "^5.6.1","react-modal": "^3.15.1","redent": "^4.0.0","refractor": "^4.8.0",@@ -49,8 +50,8 @@"zustand": "^4.3.8"},"devDependencies": {- "@mdi/js": "^6.9.96",- "@mdi/react": "^1.6.0",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1","@types/katex": "^0.14.0","@types/prismjs": "^1.26.0","@types/react": "17.0.2",@@ -62,14 +63,17 @@"happy-dom": "^8.9.0","isomorphic-fetch": "^3.0.0","prosemirror-test-builder": "^1.1.0",- "vitest": "^0.29.2",- "web-vitals": "^2.1.4","react": "17.0.2",- "react-dom": "17.0.2"+ "react-dom": "17.0.2",+ "vitest": "^0.29.2",+ "web-vitals": "^2.1.4"},"peerDependencies": {- "@mdi/js": ">=6.9.96",- "@mdi/react": ">=1.6.0",+ "@emotion/react": "11.11.1",+ "@mdi/js": ">=7.2.96",+ "@mdi/react": ">=1.6.1",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0","react": ">=17.0.0","react-dom": ">=17.0.0"},@@ -79,6 +83,7 @@"prewatch": "node ./scripts/build.mjs","build": "tsc","watch": "tsc --watch",+ "start": "npm run watch","prepublishOnly": "npm run build && npm run test","postinstall": "npx patch-package"},diff --git a/packages/editor/patches/katex+0.16.2.patch b/packages/editor/patches/katex+0.16.4.patchsimilarity index 99%rename from packages/editor/patches/katex+0.16.2.patchrename to packages/editor/patches/katex+0.16.4.patchindex 40fbfedfe..9c30c2248 100644--- a/packages/editor/patches/katex+0.16.2.patch+++ b/packages/editor/patches/katex+0.16.4.patch@@ -1,7 +1,7 @@diff --git a/node_modules/katex/dist/katex.min.css b/node_modules/katex/dist/katex.min.css-index 3bab0af..a047ef2 100644+index f556af3..2246666 100644--- a/node_modules/katex/dist/katex.min.css+++ b/node_modules/katex/dist/katex.min.css@@ -1 +1 @@--@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{text-rendering:auto;font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.2"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}-+.katex{text-rendering:auto;font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.2"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}+-@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{text-rendering:auto;font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.4"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}++.katex{text-rendering:auto;font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.4"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}diff --git a/packages/editor/src/components/action-sheet/index.tsx b/packages/editor/src/components/action-sheet/index.tsxindex 7bd8bf2e7..03a47180b 100644--- a/packages/editor/src/components/action-sheet/index.tsx+++ b/packages/editor/src/components/action-sheet/index.tsx@@ -24,12 +24,9 @@ import React, {useState,useEffect} from "react";-import { MenuItem } from "../menu/types";+import { MenuItem, Icon, MenuButton, MenuSeparator } from "@notesnook/ui";import { Box, Button, Flex, Text, FlexProps } from "@theme-ui/components";-import { Icon } from "../../toolbar/components/icon";import { Icons } from "../../toolbar/icons";-import { MenuButton } from "../menu/menu-button";-import { MenuSeparator } from "../menu/menu-separator";import Modal from "react-modal";import {motion,@@ -38,7 +35,8 @@ import {useTransform,useAnimation} from "framer-motion";-import { useTheme } from "../../toolbar/stores/toolbar-store";+import { useTheme } from "@emotion/react";+import { Theme } from "@notesnook/theme";const AnimatedFlex = motion(Flex as React.FunctionComponent<Omit<FlexProps, "onDrag" | "onDragEnd">>@@ -104,7 +102,7 @@ export function ActionSheetPresenter(draggable = true,children} = props;- const theme = useTheme();+ const theme = useTheme() as Theme;const contentRef = useRef<HTMLDivElement>();const y = useMotionValue(0);@@ -184,7 +182,7 @@ export function ActionSheetPresenter(width: "100%",opacity,position: "absolute",- backgroundColor: "var(--overlay)"+ backgroundColor: "var(--backdrop)"}}tabIndex={-1}/>@@ -219,6 +217,8 @@ export function ActionSheetPresenter(><AnimatedFlexanimate={animation}+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment+ // @ts-ignorestyle={{ y }}initial={{ y: 1000 }}sx={{diff --git a/packages/editor/src/components/button.tsx b/packages/editor/src/components/button.tsxindex beafec426..8fa74df76 100644--- a/packages/editor/src/components/button.tsx+++ b/packages/editor/src/components/button.tsx@@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { forwardRef, useRef, ForwardedRef } from "react";import { useEffect } from "react";import { Button as RebassButton, ButtonProps } from "@theme-ui/components";-import { ThemeUICSSObject } from "@theme-ui/core";const _Button = (props: ButtonProps,@@ -28,11 +27,6 @@ const _Button = () => {const { sx, ...buttonProps } = props;- const hoverBg =- (((sx as ThemeUICSSObject)?.[":hover"] as ThemeUICSSObject)- ?.bg as string) || "hover";- const bg = ((sx as ThemeUICSSObject)?.bg as string) || "unset";-const buttonRef = useRef<HTMLButtonElement>();useEffect(() => {@@ -58,9 +52,7 @@ const _Button = (<RebassButton{...buttonProps}sx={{- ...sx,- ":hover": { bg: [bg, hoverBg] },- ":active": { bg: hoverBg }+ ...sx}}ref={(ref) => {buttonRef.current = ref || undefined;diff --git a/packages/editor/src/components/inline-input/index.tsx b/packages/editor/src/components/inline-input/index.tsxindex 658824f3d..64d2caec8 100644--- a/packages/editor/src/components/inline-input/index.tsx+++ b/packages/editor/src/components/inline-input/index.tsx@@ -37,7 +37,7 @@ export function InlineInput(props: LabelInputProps) {p: 2,borderRadius: "default",":focus-within": {- outlineColor: "primary",+ outlineColor: "accent",outlineWidth: "1.8px"}}}@@ -47,7 +47,7 @@ export function InlineInput(props: LabelInputProps) {variant={"body"}sx={{flexShrink: 0,- color: "fontTertiary",+ color: "paragraph",borderLeft: "1px solid var(--border)",pl: 1}}diff --git a/packages/editor/src/components/popup-presenter/index.tsx b/packages/editor/src/components/popup-presenter/index.tsxindex 716ecfa2a..6c0615c9d 100644--- a/packages/editor/src/components/popup-presenter/index.tsx+++ b/packages/editor/src/components/popup-presenter/index.tsx@@ -17,10 +17,13 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { useCallback, useRef, useEffect, PropsWithChildren } from "react";+import { useEffect, PropsWithChildren } from "react";import { Box } from "@theme-ui/components";-import { getPosition, PositionOptions } from "../../utils/position";-import Modal from "react-modal";+import {+ PositionOptions,+ PopupPresenterProps,+ PopupPresenter+} from "@notesnook/ui";import ReactDOM from "react-dom";import { getPopupContainer, getToolbarElement } from "../../toolbar/utils/dom";import {@@ -29,209 +32,6 @@ import {} from "../../toolbar/stores/toolbar-store";import React from "react";import { ResponsivePresenter, ResponsivePresenterProps } from "../responsive";-import { ThemeProvider } from "../theme-provider";--export type PopupPresenterProps = {- isOpen: boolean;- onClose: () => void;- position: PositionOptions;- blocking?: boolean;- focusOnRender?: boolean;- movable?: boolean;-};--function _PopupPresenter(props: PropsWithChildren<PopupPresenterProps>) {- const {- isOpen,- position,- onClose,- blocking = true,- focusOnRender = true,- children- } = props;-- const isMobile = useIsMobile();- const contentRef = useRef<HTMLDivElement>();- const observerRef = useRef<ResizeObserver>();-- const repositionPopup = useCallback((position: PositionOptions) => {- if (!contentRef.current || !position) return;- const popup = contentRef.current;- const popupPosition = getPosition(popup, position);- popup.style.top = popupPosition.top + "px";- popup.style.left = popupPosition.left + "px";- }, []);-- useEffect(() => {- repositionPopup(position);- }, [repositionPopup, position]);-- useEffect(() => {- function onWindowResize() {- repositionPopup(position);- }- window.addEventListener("resize", onWindowResize);- return () => {- window.removeEventListener("resize", onWindowResize);- };- }, [repositionPopup, position]);-- const attachMoveHandlers = useCallback(() => {- if (!contentRef.current || !isOpen) return;- const movableBar = contentRef.current.querySelector(- ".movable"- ) as HTMLElement;-- if (!movableBar) return;- const popup = contentRef.current;-- const offset = { x: 0, y: 0 };- function mouseDown(e: MouseEvent) {- offset.x = e.clientX - popup.offsetLeft;- offset.y = e.clientY - popup.offsetTop;- window.addEventListener("mousemove", mouseMove);- }-- function mouseMove(e: MouseEvent) {- if (!e.buttons) mouseUp();- const top = e.clientY - offset.y;- const left = e.clientX - offset.x;- requestAnimationFrame(() => {- popup.style.top = top + "px";- popup.style.left = left + "px";- });- }-- function mouseUp() {- window.removeEventListener("mousemove", mouseMove);- }-- movableBar.addEventListener("mousedown", mouseDown);- window.addEventListener("mouseup", mouseUp);- }, [isOpen]);-- const handleResize = useCallback(() => {- const popup = contentRef.current;- if (!popup) return;-- let oldHeight: number = popup.offsetHeight;- observerRef.current = new ResizeObserver(() => {- if (isMobile) {- repositionPopup(position);- } else {- const { height, y } = popup.getBoundingClientRect();- const delta = height - oldHeight;- if (delta > 0) {- // means the new size is bigger so we need to adjust the position- // if required. We only do this in case the newly resized popup- // is going out of the window.-- const windowHeight = document.body.clientHeight - 20;- if (y + height > windowHeight) {- popup.style.top = windowHeight - height + "px";- }- }- oldHeight = height;- }- });- observerRef.current.observe(popup, { box: "border-box" });- }, [repositionPopup, position, isMobile]);-- return (- <Modal- contentRef={(ref) => (contentRef.current = ref)}- className={"popup-presenter"}- role="menu"- isOpen={isOpen}- appElement={document.body}- shouldCloseOnEsc- shouldReturnFocusAfterClose- shouldCloseOnOverlayClick- shouldFocusAfterRender={focusOnRender}- ariaHideApp={blocking}- preventScroll={blocking}- onRequestClose={onClose}- portalClassName={"popup-presenter-portal"}- onAfterOpen={(obj) => {- if (!obj || !position) return;- repositionPopup(position);-- handleResize();- attachMoveHandlers();- }}- onAfterClose={() => observerRef.current?.disconnect()}- overlayElement={(props, contentEl) => {- return (- <Box- {...props}- style={{- ...props.style,- position: !blocking ? "initial" : "fixed",- zIndex: 1000,- backgroundColor: !blocking ? "transparent" : "unset"- }}- // onClick={(e) => {- // if (!(e.target instanceof HTMLElement)) return;- // console.log(e.target.closest(".ReactModal__Content"));- // if (e.target.closest(".ReactModal__Content")) return;- // onClose();- // }}- // onContextMenu={(e) => {- // e.preventDefault();- // onClose();- // }}- >- {contentEl}- </Box>- );- }}- contentElement={(props, children) => (- <Box- {...props}- style={{}}- // TODO onMouseDown={(e) => {- // console.log(e);- // }}- sx={{- top: 0,- left: 0,- right: 0,- bottom: 0,- display: "flex",- width: "fit-content",- height: "fit-content",- position: "fixed",- backgroundColor: undefined,- padding: 0,- zIndex: 999,- outline: 0,- isolation: "isolate"- }}- >- {children}- </Box>- )}- style={{- content: {},- overlay: {- zIndex: 999,- background: "transparent"- }- }}- >- {children}- </Modal>- );-}--export function PopupPresenter(props: PropsWithChildren<PopupPresenterProps>) {- // HACK: we don't want to render the popup presenter for no reason- // including it's effects etc. so we just wrap it and return null- // if the popup is closed.- if (!props.isOpen) return null;-- return <_PopupPresenter {...props} />;-}export type PopupWrapperProps = UsePopupHandlerOptions & {autoCloseOnUnmount?: boolean;@@ -241,6 +41,7 @@ export function PopupWrapper(props: PropsWithChildren<PopupWrapperProps>) {const { id, position, children, autoCloseOnUnmount, ...presenterProps } =props;const { closePopup, isPopupOpen } = usePopupHandler(props);+ const isMobile = useIsMobile();useEffect(() => {if (!autoCloseOnUnmount) return;@@ -256,6 +57,7 @@ export function PopupWrapper(props: PropsWithChildren<PopupWrapperProps>) {position={position}blockingfocusOnRender+ isMobile={isMobile}{...presenterProps}isOpen={isPopupOpen}>@@ -319,27 +121,25 @@ export function showPopup(options: ShowPopupOptions) {}ReactDOM.render(- <ThemeProvider>- <ResponsivePresenter- isOpen- position={{- target: getToolbarElement(),- isTargetAbsolute: true,- location: "below",- align: "end",- yOffset: 10- }}- blocking- focusOnRender- {...props}- onClose={() => {- hide();- props.onClose?.();- }}- >- {popup(hide)}- </ResponsivePresenter>- </ThemeProvider>,+ <ResponsivePresenter+ isOpen+ position={{+ target: getToolbarElement(),+ isTargetAbsolute: true,+ location: "below",+ align: "end",+ yOffset: 10+ }}+ blocking+ focusOnRender+ {...props}+ onClose={() => {+ hide();+ props.onClose?.();+ }}+ >+ {popup(hide)}+ </ResponsivePresenter>,getPopupContainer());diff --git a/packages/editor/src/components/popup-presenter/popuprenderer.tsx b/packages/editor/src/components/popup-presenter/popuprenderer.tsxdeleted file mode 100644index fd32e98de..000000000--- a/packages/editor/src/components/popup-presenter/popuprenderer.tsx+++ /dev/null@@ -1,85 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import React, { PropsWithChildren, useContext } from "react";-import { Editor } from "@tiptap/core";--export const PopupRendererContext = React.createContext<PopupRenderer | null>(- null-);-export const EditorContext = React.createContext<Editor | null>(null);--export type PopupRendererProps = PropsWithChildren<{ editor: Editor }>;-type PopupComponent = React.FunctionComponent<{ id: string }>;-type PopupRendererState = {- popups: { id: string; popup: PopupComponent }[];-};-export class PopupRenderer extends React.Component<- PopupRendererProps,- PopupRendererState,- PopupRendererState-> {- popupContainer: HTMLDivElement | null = null;- state: PopupRendererState = {- popups: [] as PopupRendererState["popups"]- };-- isOpen(id: string) {- return !!this.state.popups?.find((popup) => popup.id === id);- }-- openPopup = (id: string, popup: PopupComponent) => {- if (!popup) return;- this.setState((prev) => {- return {- popups: [...prev.popups, { id, popup }]- };- });- };-- closePopup = (id: string) => {- this.setState((prev) => {- const index = prev.popups.findIndex((p) => p.id === id);- if (index <= -1) return prev;- const clone = prev.popups.slice();- clone.splice(index, 1);- return {- popups: clone- };- });- };-- render() {- return (- <PopupRendererContext.Provider value={this}>- {this.props.children}- <EditorContext.Provider value={this.props.editor}>- {this.state.popups.map(({ id, popup: Popup }) => {- return <Popup key={id} id={id} />;- })}- <div id="popup-container" />- </EditorContext.Provider>- </PopupRendererContext.Provider>- );- }-}--export function usePopupRenderer() {- return useContext(PopupRendererContext);-}diff --git a/packages/editor/src/components/resizer/index.tsx b/packages/editor/src/components/resizer/index.tsxindex 711dfab0d..2e562e4d8 100644--- a/packages/editor/src/components/resizer/index.tsx+++ b/packages/editor/src/components/resizer/index.tsx@@ -17,10 +17,11 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { SchemeColors } from "@notesnook/theme/dist/theme/colorscheme";+import { SchemeColors } from "@notesnook/theme";import { Resizable } from "re-resizable";import { PropsWithChildren } from "react";-import { Icon, Icons } from "../../toolbar";+import { Icons } from "../../toolbar";+import { Icon } from "@notesnook/ui";import { Editor } from "../../types";import { Flex } from "@theme-ui/components";@@ -29,7 +30,7 @@ type ResizerProps = {selected: boolean;width?: number;height?: number;- handleColor?: keyof SchemeColors;+ handleColor?: SchemeColors;onResize: (width: number, height: number) => void;style?: React.CSSProperties;};diff --git a/packages/editor/src/components/responsive/index.tsx b/packages/editor/src/components/responsive/index.tsxindex f077c557e..7c5f9598d 100644--- a/packages/editor/src/components/responsive/index.tsx+++ b/packages/editor/src/components/responsive/index.tsx@@ -23,7 +23,7 @@ import {ActionSheetPresenter,ActionSheetPresenterProps} from "../action-sheet";-import { MenuPresenter, MenuPresenterProps } from "../menu";+import { MenuPresenter, MenuPresenterProps } from "@notesnook/ui";type ResponsiveContainerProps = {mobile?: JSX.Element;diff --git a/packages/editor/src/components/tabs/index.tsx b/packages/editor/src/components/tabs/index.tsxindex a213bd50d..7fc85dd1e 100644--- a/packages/editor/src/components/tabs/index.tsx+++ b/packages/editor/src/components/tabs/index.tsx@@ -52,6 +52,7 @@ export function Tabs(props: PropsWithChildren<TabsProps>) {>{tabs?.map((tab, index) => (<Button+ variant="secondary"key={index.toString()}sx={{flex: 1,@@ -60,16 +61,15 @@ export function Tabs(props: PropsWithChildren<TabsProps>) {borderRadius: 0,borderTopLeftRadius: "default",borderTopRightRadius: "default",- bg: activeTab === index ? "bgSecondary" : "transparent",+ bg:+ activeTab === index+ ? "var(--background-secondary)"+ : "transparent",fontWeight: activeTab === index ? "bold" : "normal",- color: "text",+ color: "paragraph",":last-of-type": { mr: 0 },borderBottom: "2px solid",- borderBottomColor:- activeTab === index ? "primary" : "transparent",- ":hover": {- bg: "hover"- }+ borderBottomColor: activeTab === index ? "accent" : "transparent"}}onClick={() => {setActiveTab(index);diff --git a/packages/editor/src/extensions/attachment/component.tsx b/packages/editor/src/extensions/attachment/component.tsxindex 779b87491..9f38124a9 100644--- a/packages/editor/src/extensions/attachment/component.tsx+++ b/packages/editor/src/extensions/attachment/component.tsx@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { Box, Text } from "@theme-ui/components";import { AttachmentWithProgress } from "./attachment";import { useRef } from "react";-import { Icon } from "../../toolbar/components/icon";+import { Icon } from "@notesnook/ui";import { Icons } from "../../toolbar/icons";import { SelectionBasedReactNodeViewProps } from "../react";import { ToolbarGroup } from "../../toolbar/components/toolbar-group";@@ -34,80 +34,78 @@ export function AttachmentComponent(const elementRef = useRef<HTMLSpanElement>();return (- <>- <Box- ref={elementRef}+ <Box+ ref={elementRef}+ as="span"+ contentEditable={false}+ variant={"body"}+ sx={{+ display: "inline-flex",+ position: "relative",+ justifyContent: "center",+ userSelect: "none",+ alignItems: "center",+ backgroundColor: "var(--background-secondary)",+ px: 1,+ borderRadius: "default",+ border: "1px solid var(--border)",+ cursor: "pointer",+ maxWidth: 250,+ borderColor: selected ? "accent" : "border",+ ":hover": {+ bg: "hover"+ }+ }}+ title={filename}+ >+ <Icon path={Icons.attachment} size={14} />+ <Textas="span"- contentEditable={false}- variant={"body"}sx={{- display: "inline-flex",- position: "relative",- justifyContent: "center",- userSelect: "none",- alignItems: "center",- backgroundColor: "bgSecondary",- px: 1,- borderRadius: "default",- border: "1px solid var(--border)",- cursor: "pointer",- maxWidth: 250,- borderColor: selected ? "primary" : "border",- ":hover": {- bg: "hover"- }+ ml: "small",+ fontSize: "body",+ whiteSpace: "nowrap",+ textOverflow: "ellipsis",+ overflow: "hidden"}}- title={filename}>- <Icon path={Icons.attachment} size={14} />- <Text- as="span"- sx={{- ml: "small",- fontSize: "body",- whiteSpace: "nowrap",- textOverflow: "ellipsis",- overflow: "hidden"- }}- >- {filename}- </Text>- <Text- as="span"- sx={{- ml: 1,- fontSize: "0.65rem",- color: "fontTertiary",- flexShrink: 0- }}- >- {progress ? `${progress}%` : formatBytes(size)}- </Text>- <DesktopOnly>- {selected && (- <ToolbarGroup- editor={editor}- tools={- editor.isEditable- ? [- "removeAttachment",- "downloadAttachment",- "previewAttachment"- ]- : ["downloadAttachment", "previewAttachment"]- }- sx={{- boxShadow: "menu",- borderRadius: "default",- bg: "background",- position: "absolute",- top: -35- }}- />- )}- </DesktopOnly>- </Box>- </>+ {filename}+ </Text>+ <Text+ as="span"+ sx={{+ ml: 1,+ fontSize: "0.65rem",+ color: "var(--paragraph-secondary)",+ flexShrink: 0+ }}+ >+ {progress ? `${progress}%` : formatBytes(size)}+ </Text>+ <DesktopOnly>+ {selected && (+ <ToolbarGroup+ editor={editor}+ tools={+ editor.isEditable+ ? [+ "removeAttachment",+ "downloadAttachment",+ "previewAttachment"+ ]+ : ["downloadAttachment", "previewAttachment"]+ }+ sx={{+ boxShadow: "menu",+ borderRadius: "default",+ bg: "background",+ position: "absolute",+ top: -35+ }}+ />+ )}+ </DesktopOnly>+ </Box>);}diff --git a/packages/editor/src/extensions/code-block/code-block.ts b/packages/editor/src/extensions/code-block/code-block.tsindex cee1d2fd3..6fce25816 100644--- a/packages/editor/src/extensions/code-block/code-block.ts+++ b/packages/editor/src/extensions/code-block/code-block.ts@@ -558,8 +558,9 @@ export const CodeBlock = Node.create<CodeBlockOptions>({addNodeView() {return createNodeView(CodeblockComponent, {contentDOMFactory: () => {- const content = document.createElement("div");+ const content = document.createElement("pre");content.classList.add("node-content-wrapper");+ content.classList.add("language-xyz");content.style.whiteSpace = "pre";// caret is not visible if content element width is 0pxcontent.style.minWidth = "20px";diff --git a/packages/editor/src/extensions/code-block/component.tsx b/packages/editor/src/extensions/code-block/component.tsxindex 98c43e3fc..f02c2d9ad 100644--- a/packages/editor/src/extensions/code-block/component.tsx+++ b/packages/editor/src/extensions/code-block/component.tsx@@ -22,25 +22,24 @@ import { useRef, useState } from "react";import { Button } from "../../components/button";import { ResponsivePresenter } from "../../components/responsive";import { useTimer } from "../../hooks/use-timer";-import { Icon } from "../../toolbar/components/icon";+import { Icon } from "@notesnook/ui";import { Popup } from "../../toolbar/components/popup";import { Icons } from "../../toolbar/icons";-import { useIsMobile } from "../../toolbar/stores/toolbar-store";import { ReactNodeViewProps } from "../react/types";import { CodeBlockAttributes } from "./code-block";import Languages from "./languages.json";+import { useThemeEngineStore } from "@notesnook/theme";export function CodeblockComponent(props: ReactNodeViewProps<CodeBlockAttributes>) {- const isMobile = useIsMobile();const { editor, updateAttributes, node, forwardRef } = props;- const { language, indentLength, indentType, caretPosition, lines } =- node.attrs;+ const { language, indentLength, indentType, caretPosition } = node.attrs;- const [isOpen, setIsOpen] = useState(false);// const [caretPosition, setCaretPosition] = useState<CaretPosition>();+ const [isOpen, setIsOpen] = useState(false);const toolbarRef = useRef<HTMLDivElement>(null);+ const theme = useThemeEngineStore((store) => store.theme);const { enabled, start } = useTimer(1000);@@ -59,27 +58,38 @@ export function CodeblockComponent(><Textref={forwardRef}- as="pre"autoCorrect="off"autoCapitalize="none"- css={{}}+ css={theme.codeBlockCSS}sx={{- "div, span.token, span.line-number-widget, span.line-number::before":- {- fontFamily: "monospace",- fontSize: "code",- whiteSpace: "pre", // TODO !important- tabSize: 1+ pre: {+ fontFamily: "inherit !important",+ tabSize: "inherit !important",+ // background: "transparent !important",+ padding: "10px !important",+ margin: "0px !important",+ width: "100%",+ borderRadius: `0px !important`,++ "::selection,*::selection": {+ bg: "textSelection",+ color: "currentColor"},+ "::-moz-selection,*::-moz-selection": {+ bg: "textSelection",+ color: "currentColor"+ }+ },+ fontFamily: "monospace",+ fontSize: "code",+ whiteSpace: "pre", // TODO !important+ tabSize: 1,position: "relative",lineHeight: "20px",- bg: "codeBg",- color: "static",- overflowX: "auto",- display: "flex",- px: 2,- pt: 2,- pb: 2+ // bg: "var(--background-secondary)",+ color: "white",+ overflowX: "hidden",+ display: "flex"}}spellCheck={false}/>@@ -87,14 +97,14 @@ export function CodeblockComponent(ref={toolbarRef}contentEditable={false}sx={{- bg: "codeBg",+ bg: "var(--background-secondary)",alignItems: "center",justifyContent: "flex-end",- borderTop: "1px solid var(--codeBorder)"+ borderTop: "1px solid var(--border-secondary)"}}>{caretPosition ? (- <Text variant={"subBody"} sx={{ mr: 1, color: "codeFg" }}>+ <Text variant={"subBody"} sx={{ mr: 1, mt: "2px" }}>Line {caretPosition.line}, Column {caretPosition.column}{" "}{caretPosition.selected? `(${caretPosition.selected} selected)`@@ -106,8 +116,7 @@ export function CodeblockComponent(variant={"icon"}sx={{p: 1,- opacity: "1 !important",- ":hover": { bg: "codeSelection" }+ opacity: "1 !important"}}title="Toggle indentation mode"disabled={!editor.isEditable}@@ -119,7 +128,7 @@ export function CodeblockComponent(});}}>- <Text variant={"subBody"} sx={{ color: "codeFg" }}>+ <Text variant={"subBody"}>{indentType === "space" ? "Spaces" : "Tabs"}: {indentLength}</Text></Button>@@ -129,8 +138,8 @@ export function CodeblockComponent(sx={{opacity: "1 !important",p: 1,- bg: isOpen ? "codeSelection" : "transparent",- ":hover": { bg: "codeSelection" }+ mr: 1,+ bg: isOpen ? "textSelection" : "transparent"}}disabled={!editor.isEditable}onClick={() => {@@ -140,11 +149,7 @@ export function CodeblockComponent(}}title="Change language">- <Text- variant={"subBody"}- spellCheck={false}- sx={{ color: "codeFg" }}- >+ <Text variant={"subBody"} spellCheck={false}>{languageDefinition?.title || "Plaintext"}</Text></Button>@@ -156,8 +161,7 @@ export function CodeblockComponent(opacity: "1 !important",p: 1,mr: 1,- bg: "transparent",- ":hover": { bg: "codeSelection" }+ bg: "transparent"}}onClick={() => {editor.commands.copyToClipboard(node.textContent);@@ -170,7 +174,7 @@ export function CodeblockComponent(spellCheck={false}sx={{ color: "codeFg" }}>- Copy+ {enabled ? "Copied!" : "Copy"}</Text></Button>) : null}@@ -237,9 +241,6 @@ function LanguageSelector(props: LanguageSelectorProps) {}}><Input- onFocus={() => {- console.log("EHLLO!");- }}autoFocusplaceholder="Search languages"sx={{diff --git a/packages/editor/src/extensions/embed/component.tsx b/packages/editor/src/extensions/embed/component.tsxindex fac69abe7..4301916e1 100644--- a/packages/editor/src/extensions/embed/component.tsx+++ b/packages/editor/src/extensions/embed/component.tsx@@ -23,7 +23,8 @@ import { EmbedAlignmentOptions, EmbedAttributes } from "./embed";import { SelectionBasedReactNodeViewProps } from "../react";import { DesktopOnly } from "../../components/responsive";import { ToolbarGroup } from "../../toolbar/components/toolbar-group";-import { Icon, Icons } from "../../toolbar";+import { Icons } from "../../toolbar";+import { Icon } from "@notesnook/ui";import { Resizer } from "../../components/resizer";export function EmbedComponent(@@ -48,7 +49,7 @@ export function EmbedComponent(}}><Resizer- handleColor="primary"+ handleColor="accent"editor={editor}selected={selected}width={width}@@ -70,10 +71,12 @@ export function EmbedComponent(top: -24,justifyContent: "end",p: "small",- bg: editor.isEditable ? "bgSecondary" : "transparent",+ bg: editor.isEditable+ ? "var(--background-secondary)"+ : "transparent",borderTopLeftRadius: "default",borderTopRightRadius: "default",- borderColor: selected ? "border" : "bgSecondary",+ borderColor: selected ? "border" : "var(--border-secondary)",cursor: "pointer",":hover": {borderColor: "border"@@ -117,9 +120,9 @@ export function EmbedComponent(width={"100%"}height={"100%"}sx={{- bg: "bgSecondary",+ bg: "var(--background-secondary)",border: selected- ? "2px solid var(--primary)"+ ? "2px solid var(--accent)": "2px solid transparent",borderRadius: "default"}}@@ -137,7 +140,7 @@ export function EmbedComponent(justifyContent: "center"}}>- <Icon path={Icons.loading} rotate size={32} color="disabled" />+ <Icon path={Icons.loading} rotate size={32} color="icon" /></Flex>)}</Resizer>diff --git a/packages/editor/src/extensions/image/component.tsx b/packages/editor/src/extensions/image/component.tsxindex 8e8911a96..6cb42f704 100644--- a/packages/editor/src/extensions/image/component.tsx+++ b/packages/editor/src/extensions/image/component.tsx@@ -22,7 +22,7 @@ import { ImageAlignmentOptions, ImageAttributes } from "./image";import { useEffect, useRef, useState } from "react";import { SelectionBasedReactNodeViewProps } from "../react";import { DesktopOnly } from "../../components/responsive";-import { Icon } from "../../toolbar/components/icon";+import { Icon } from "@notesnook/ui";import { Icons } from "../../toolbar/icons";import { ToolbarGroup } from "../../toolbar/components/toolbar-group";import {@@ -132,9 +132,9 @@ export function ImageComponent(height: height || relativeHeight || "100%",maxWidth: "100%",minWidth: 135,- bg: "bgSecondary",+ bg: "background",border: selected- ? "2px solid var(--primary)"+ ? "2px solid var(--accent)": "2px solid transparent",borderRadius: "default",flexDirection: "column",@@ -262,7 +262,7 @@ export function ImageComponent(width: editor.isEditable ? "100%" : width,height: editor.isEditable ? "100%" : height,border: selected- ? "2px solid var(--primary)"+ ? "2px solid var(--accent)": "2px solid transparent",borderRadius: "default"}}diff --git a/packages/editor/src/extensions/react/react-node-view.tsx b/packages/editor/src/extensions/react/react-node-view.tsxindex c8cd89c38..08709ef3f 100644--- a/packages/editor/src/extensions/react/react-node-view.tsx+++ b/packages/editor/src/extensions/react/react-node-view.tsx@@ -31,7 +31,7 @@ import {} from "./types";import { Editor, NodeViewRendererProps } from "@tiptap/core";import { __serializeForClipboard, EditorView } from "prosemirror-view";-import { ThemeProvider } from "../../components/theme-provider";+import { EmotionThemeProvider } from "@notesnook/theme";// This is hacky workaround to manually handle serialization when// drag/dropping on mobile devices.@@ -156,7 +156,7 @@ export class ReactNodeView<P extends ReactNodeViewProps> implements NodeView {if (!this.options.component) return null;return (- <ThemeProvider>+ <EmotionThemeProvider scope="editor" injectCssVars={false}><this.options.component{...props}editor={this.editor}@@ -173,7 +173,7 @@ export class ReactNodeView<P extends ReactNodeViewProps> implements NodeView {)}/>- </ThemeProvider>+ </EmotionThemeProvider>);}diff --git a/packages/editor/src/extensions/react/selection-based-react-node-view.tsx b/packages/editor/src/extensions/react/selection-based-react-node-view.tsxindex ba8029f83..a6ea72e91 100644--- a/packages/editor/src/extensions/react/selection-based-react-node-view.tsx+++ b/packages/editor/src/extensions/react/selection-based-react-node-view.tsx@@ -33,7 +33,7 @@ import {} from "./types";import { ReactNodeView } from "./react-node-view";import { Editor, NodeViewRendererProps } from "@tiptap/core";-import { ThemeProvider } from "../../components/theme-provider";+import { EmotionThemeProvider } from "@notesnook/theme";/*** A ReactNodeView that handles React components sensitive@@ -95,7 +95,7 @@ export class SelectionBasedNodeView<this.isSelectedNode(this.editor.view.state.selection);return (- <ThemeProvider>+ <EmotionThemeProvider scope="editor" injectCssVars={false}><this.options.component{...props}editor={this.editor}@@ -113,7 +113,7 @@ export class SelectionBasedNodeView<)}/>- </ThemeProvider>+ </EmotionThemeProvider>);}diff --git a/packages/editor/src/extensions/table/component.tsx b/packages/editor/src/extensions/table/component.tsxindex 1ce6e5540..8ca60a6f3 100644--- a/packages/editor/src/extensions/table/component.tsx+++ b/packages/editor/src/extensions/table/component.tsx@@ -32,7 +32,7 @@ import {TableProperties} from "../../toolbar/tools/table";import { getToolDefinition } from "../../toolbar/tool-definitions";-import { getPosition } from "../../utils/position";+import { getPosition } from "@notesnook/ui";import {findSelectedDOMNode,hasSameAttributesdiff --git a/packages/editor/src/extensions/task-item/component.tsx b/packages/editor/src/extensions/task-item/component.tsxindex 1001ea1f6..d469c354c 100644--- a/packages/editor/src/extensions/task-item/component.tsx+++ b/packages/editor/src/extensions/task-item/component.tsx@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { Box, Flex } from "@theme-ui/components";import { ReactNodeViewProps } from "../react";-import { Icon } from "../../toolbar/components/icon";+import { Icon } from "@notesnook/ui";import { Icons } from "../../toolbar/icons";import { Node as ProsemirrorNode } from "prosemirror-model";import { Transaction } from "prosemirror-state";@@ -85,10 +85,8 @@ export function TaskItemComponent(opacity: [1, 1, 0],alignSelf: "start",bg: "transparent",+ mt: "0.36ch",cursor: "grab",- ".icon:hover path": {- fill: "var(--checked) !important"- },mx: 1,fontFamily: "inherit"}}@@ -102,17 +100,15 @@ export function TaskItemComponent(tabIndex={1}sx={{border: "2px solid",- borderColor: checked ? "checked" : "icon",+ borderColor: checked ? "accent" : "icon",borderRadius: "default",alignSelf: "start",p: "1px",+ mt: "0.40ch",mr: 1,cursor: editor.isEditable ? "pointer" : "unset",":hover": {- borderColor: "checked"- },- ":hover .icon path": {- fill: "var(--checked) !important"+ borderColor: "accent"},fontFamily: "inherit"}}@@ -128,7 +124,7 @@ export function TaskItemComponent(toggle();}}}- color={checked ? "checked" : "icon"}+ color={checked ? "accent" : "icon"}size={isMobile ? "1.66ch" : "1.46ch"}/>diff --git a/packages/editor/src/extensions/task-item/task-item.ts b/packages/editor/src/extensions/task-item/task-item.tsindex f76543949..b2b4c09fc 100644--- a/packages/editor/src/extensions/task-item/task-item.ts+++ b/packages/editor/src/extensions/task-item/task-item.ts@@ -57,7 +57,7 @@ export const TaskItemNode = TaskItem.extend({return [{tag: "li",- getAttrs: (node) => {+ getAttrs: (node: any) => {if (node instanceof Node && node instanceof HTMLElement) {return node.classList.contains("checklist--item") ||node.parentElement?.classList.contains("checklist")diff --git a/packages/editor/src/extensions/task-list/component.tsx b/packages/editor/src/extensions/task-list/component.tsxindex 2ce4b3fee..56e1603ff 100644--- a/packages/editor/src/extensions/task-list/component.tsx+++ b/packages/editor/src/extensions/task-list/component.tsx@@ -75,7 +75,7 @@ export function TaskListComponent(<Flexsx={{position: "relative",- bg: "bgSecondary",+ bg: "var(--background-secondary)",py: "5px",borderRadius: "default",mb: 2,@@ -92,7 +92,7 @@ export function TaskListComponent(height: "100%",width: `${stats.percentage}%`,position: "absolute",- bg: "border",+ bg: "shade",zIndex: 0,left: 0,@@ -104,10 +104,11 @@ export function TaskListComponent(value={title || ""}variant={"clean"}sx={{+ flex: 1,p: 0,px: 2,zIndex: 1,- color: "fontTertiary",+ color: "var(--paragraph-secondary)",fontSize: "inherit",fontFamily: "inherit"}}@@ -167,7 +168,7 @@ export function TaskListComponent(sx={{ml: 1,mr: 2,- color: "fontTertiary",+ color: "var(--paragraph-secondary)",flexShrink: 0,zIndex: 1,fontFamily: "inherit"diff --git a/packages/editor/src/extensions/task-list/task-list.ts b/packages/editor/src/extensions/task-list/task-list.tsindex 85a2e3a04..ac5369c25 100644--- a/packages/editor/src/extensions/task-list/task-list.ts+++ b/packages/editor/src/extensions/task-list/task-list.ts@@ -57,7 +57,7 @@ export const TaskListNode = TaskList.extend({return [{tag: "ul",- getAttrs: (node) => {+ getAttrs: (node: any) => {if (node instanceof Node && node instanceof HTMLElement) {return node.classList.contains("checklist") && null;}diff --git a/packages/editor/src/extensions/web-clip/component.tsx b/packages/editor/src/extensions/web-clip/component.tsxindex 583f3b5c8..f8011894e 100644--- a/packages/editor/src/extensions/web-clip/component.tsx+++ b/packages/editor/src/extensions/web-clip/component.tsx@@ -20,7 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { Box, Flex, Text } from "@theme-ui/components";import { useEffect, useRef, useState } from "react";import { SelectionBasedReactNodeViewProps } from "../react";-import { Icon, Icons } from "../../toolbar";+import { Icons } from "../../toolbar";+import { Icon } from "@notesnook/ui";import { WebClipAttributes } from "./web-clip";import { DesktopOnly } from "../../components/responsive";import { ToolbarGroup } from "../../toolbar/components/toolbar-group";@@ -96,7 +97,7 @@ export function WebClipComponent(flexDirection: "column",position: "relative",border: selected- ? "2px solid var(--primary)"+ ? "2px solid var(--accent)": "2px solid var(--border)",borderRadius: "default"}}@@ -105,7 +106,7 @@ export function WebClipComponent(sx={{width: "100%",p: 1,- bg: "bgSecondary",+ bg: "var(--background-secondary)",borderTopLeftRadius: "default",borderTopRightRadius: "default",cursor: "pointer",@@ -124,7 +125,6 @@ export function WebClipComponent(<Textvariant="subBody"sx={{- color: "icon",ml: 1,whiteSpace: "nowrap",overflow: "hidden",@@ -196,7 +196,7 @@ export function WebClipComponent(justifyContent: "center"}}>- <Icon path={Icons.loading} rotate size={32} color="disabled" />+ <Icon path={Icons.loading} rotate size={32} /></Flex>)}</Box>diff --git a/packages/editor/src/index.ts b/packages/editor/src/index.tsindex 5a669d09e..5beb82dfa 100644--- a/packages/editor/src/index.ts+++ b/packages/editor/src/index.ts@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { Theme } from "@notesnook/theme";import {EditorOptions,extensions as TiptapCoreExtensions,@@ -104,17 +103,15 @@ export type TiptapOptions = EditorOptions &ClipboardOptions &OpenLinkOptions & {downloadOptions?: DownloadOptions;- theme: Theme;isMobile?: boolean;doubleSpacedLines?: boolean;};const useTiptap = (- options: Partial<TiptapOptions> = {},+ options: Partial<TiptapOptions>,deps: React.DependencyList = []) => {const {- theme,doubleSpacedLines = true,isMobile,onDownloadAttachment,@@ -131,7 +128,6 @@ const useTiptap = (} = options;const PortalProviderAPI = usePortalProvider();const setIsMobile = useToolbarStore((store) => store.setIsMobile);- const setTheme = useToolbarStore((store) => store.setTheme);const closeAllPopups = useToolbarStore((store) => store.closeAllPopups);const setDownloadOptions = useToolbarStore((store) => store.setDownloadOptions@@ -139,9 +135,8 @@ const useTiptap = (useEffect(() => {setIsMobile(isMobile || false);- setTheme(theme);setDownloadOptions(downloadOptions);- }, [isMobile, theme, downloadOptions]);+ }, [isMobile, downloadOptions]);useEffect(() => {closeAllPopups();diff --git a/packages/editor/src/toolbar/components/counter.tsx b/packages/editor/src/toolbar/components/counter.tsxindex 076f1f21d..96ef25f6f 100644--- a/packages/editor/src/toolbar/components/counter.tsx+++ b/packages/editor/src/toolbar/components/counter.tsx@@ -18,8 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import React from "react";-import { Flex } from "@theme-ui/components";-import { Button } from "../../components/button";+import { Flex, Text } from "@theme-ui/components";import { ToolButton } from "./tool-button";export type CounterProps = {@@ -35,12 +34,17 @@ function _Counter(props: CounterProps) {return (<Flexsx={{- alignItems: "center",- mr: 1,- ":last-of-type": {- mr: 0+ alignItems: "stretch",+ borderRadius: "default",+ overflow: "hidden",+ height: "100%",+ cursor: "pointer",+ ":hover": {+ bg: "hover-secondary"}}}+ onClick={onReset}+ title={`Click to reset ${title}`}><ToolButtontoggled={false}@@ -50,21 +54,17 @@ function _Counter(props: CounterProps) {onClick={onDecrease}/>- <Button+ <Textsx={{- color: "text",- bg: "transparent",- px: 0,+ color: "paragraph",fontSize: "subBody",+ alignSelf: "center",mx: 1,- textAlign: "center",- ":hover": { bg: "transparent" }+ textAlign: "center"}}- onClick={onReset}- title={`Reset ${title}`}>{value}- </Button>+ </Text><ToolButtontoggled={false}diff --git a/packages/editor/src/toolbar/components/dropdown.tsx b/packages/editor/src/toolbar/components/dropdown.tsxindex 1657f0719..2b9b07a06 100644--- a/packages/editor/src/toolbar/components/dropdown.tsx+++ b/packages/editor/src/toolbar/components/dropdown.tsx@@ -19,12 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { useRef, useState } from "react";import { Text } from "@theme-ui/components";-import { Icon } from "./icon";+import { Icon, MenuItem, MenuPresenter } from "@notesnook/ui";import { Icons } from "../icons";-// import { MenuPresenter, MenuPresenterProps } from "../../components/menu/menu";-import { MenuItem } from "../../components/menu/types";import { useIsMobile, useToolbarLocation } from "../stores/toolbar-store";-import { MenuPresenter } from "../../components/menu";import { getToolbarElement } from "../utils/dom";import { Button } from "../../components/button";import { usePopupHandler } from "../../components/popup-presenter";@@ -55,6 +52,7 @@ export function Dropdown(props: DropdownProps) {return (<><Button+ variant="secondary"ref={(ref) => {internalRef.current = ref || undefined;if (buttonRef) buttonRef.current = ref || undefined;@@ -63,11 +61,10 @@ export function Dropdown(props: DropdownProps) {p: 1,m: 0,bg: isPopupOpen ? "hover" : "transparent",- mr: 1,+ height: "100%",flexShrink: 0,display: "flex",alignItems: "center",- ":hover": { bg: "hover" },":last-of-type": {mr: 0}@@ -77,7 +74,12 @@ export function Dropdown(props: DropdownProps) {>{typeof selectedItem === "string" ? (<Text- sx={{ fontSize: "subBody", mr: 1, color: "text", flexShrink: 0 }}+ sx={{+ fontSize: "subBody",+ mr: 1,+ color: "paragraph",+ flexShrink: 0+ }}>{selectedItem}</Text>@@ -95,7 +97,6 @@ export function Dropdown(props: DropdownProps) {: Icons.chevronDown}size={"small"}- color={"text"}/></Button>diff --git a/packages/editor/src/toolbar/components/more-tools.tsx b/packages/editor/src/toolbar/components/more-tools.tsxindex 5b34f84d9..13d02d0b6 100644--- a/packages/editor/src/toolbar/components/more-tools.tsx+++ b/packages/editor/src/toolbar/components/more-tools.tsx@@ -71,10 +71,6 @@ export function MoreTools(props: MoreToolsProps) {editor={editor}sx={{flex: 1,- // this is intentionally set to a fixed value- // because we want the same padding on mobile- // and web.- p: "5px",boxShadow: "menu",bg: "background",borderRadius: "default",diff --git a/packages/editor/src/toolbar/components/popup.tsx b/packages/editor/src/toolbar/components/popup.tsxindex b148c1ede..058f8e1e3 100644--- a/packages/editor/src/toolbar/components/popup.tsx+++ b/packages/editor/src/toolbar/components/popup.tsx@@ -18,10 +18,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { Button, Flex, Text } from "@theme-ui/components";-import { Icon } from "./icon";+import { Icon } from "@notesnook/ui";import { Icons } from "../icons";import { PropsWithChildren } from "react";import { DesktopOnly, MobileOnly } from "../../components/responsive";+import { EmotionThemeProvider } from "@notesnook/theme";type Action = {title: string;@@ -39,7 +40,7 @@ export function Popup(props: PropsWithChildren<PopupProps>) {const { title, onClose, action, children } = props;return (- <>+ <EmotionThemeProvider scope="editorToolbar"><DesktopOnly><Flexsx={{@@ -63,7 +64,7 @@ export function Popup(props: PropsWithChildren<PopupProps>) {><Text variant={"title"}>{title}</Text><Button- variant={"tool"}+ variant={"secondary"}sx={{ p: 0, bg: "transparent" }}onClick={onClose}>@@ -75,7 +76,7 @@ export function Popup(props: PropsWithChildren<PopupProps>) {{title && action && (<Flexsx={{ justifyContent: "end" }}- bg="bgSecondary"+ bg="var(--background-secondary)"p={1}px={2}mt={2}@@ -102,7 +103,7 @@ export function Popup(props: PropsWithChildren<PopupProps>) {{action && (<Button- variant={"primary"}+ variant="accent"sx={{alignSelf: "stretch",mb: 1,@@ -121,6 +122,6 @@ export function Popup(props: PropsWithChildren<PopupProps>) {</Button>)}</MobileOnly>- </>+ </EmotionThemeProvider>);}diff --git a/packages/editor/src/toolbar/components/split-button.tsx b/packages/editor/src/toolbar/components/split-button.tsxindex 484fe30da..dc0f5b1fc 100644--- a/packages/editor/src/toolbar/components/split-button.tsx+++ b/packages/editor/src/toolbar/components/split-button.tsx@@ -19,17 +19,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { PropsWithChildren, useRef } from "react";import { Flex } from "@theme-ui/components";-import { Icons } from "../icons";-import { Icon } from "./icon";import { ToolButton, ToolButtonProps } from "./tool-button";import { useToolbarLocation } from "../stores/toolbar-store";--import { Button } from "../../components/button";import React from "react";-export type SplitButtonProps = ToolButtonProps & { onOpen: () => void };+export type SplitButtonProps = ToolButtonProps & {+ onOpen: () => void;+};function _SplitButton(props: PropsWithChildren<SplitButtonProps>) {- const { children, onOpen, sx, ...toolButtonProps } = props;+ const { children, onOpen, sx, toggled, ...toolButtonProps } = props;const ref = useRef<HTMLDivElement>(null);const toolbarLocation = useToolbarLocation();@@ -39,39 +37,27 @@ function _SplitButton(props: PropsWithChildren<SplitButtonProps>) {<Flexref={ref}sx={{- borderRadius: "default",flexShrink: 0,- alignItems: "center"+ alignItems: "stretch",+ borderRadius: "default",+ overflow: "hidden",+ ":hover": {+ bg: "hover-secondary"+ }}}><ToolButton{...toolButtonProps}- sx={{ mr: 0, ":hover": { bg: "hover" }, ...sx }}+ sx={{ mr: 0, borderRadius: 0, ...sx }}toggled={false}/>- <Button- sx={{- flexShrink: 0,- p: 0,- m: 0,- px: "3px",- bg: "bgSecondary",- ":hover": { bg: "hover" },- ":last-of-type": {- mr: 0- }- }}+ <ToolButton+ variant="small"+ icon={toolbarLocation === "bottom" ? "chevronUp" : "chevronDown"}+ toggled={toggled}onClick={onOpen}- >- <Icon- path={- toolbarLocation === "bottom" ? Icons.chevronUp : Icons.chevronDown- }- color="text"- size={"small"}- sx={{ flexShrink: 0 }}- />- </Button>+ sx={{ m: 0, borderRadius: 0, height: "unset" }}+ /></Flex>{children}</>diff --git a/packages/editor/src/toolbar/components/tool-button.tsx b/packages/editor/src/toolbar/components/tool-button.tsxindex 13fed0f0d..e4d22e2f5 100644--- a/packages/editor/src/toolbar/components/tool-button.tsx+++ b/packages/editor/src/toolbar/components/tool-button.tsx@@ -18,17 +18,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { Theme } from "@notesnook/theme";-import { SchemeColors } from "@notesnook/theme/dist/theme/colorscheme";+import { SchemeColors } from "@notesnook/theme";import React from "react";import { ButtonProps } from "@theme-ui/components";import { IconNames, Icons } from "../icons";import { ToolButtonVariant } from "../types";import { Button } from "../../components/button";-import { Icon } from "./icon";+import { Icon } from "@notesnook/ui";export type ToolButtonProps = ButtonProps & {icon: IconNames;- iconColor?: keyof SchemeColors;+ iconColor?: SchemeColors;iconSize?: keyof Theme["iconSizes"] | number;toggled: boolean;buttonRef?: React.RefObject<HTMLButtonElement>;@@ -50,17 +50,18 @@ export const ToolButton = React.memo(return (<Button+ variant="secondary"ref={buttonRef}tabIndex={-1}id={`tool-${id || icon}`}sx={{+ height: "unset",flexShrink: 0,p: variant === "small" ? "small" : 1,borderRadius: variant === "small" ? "small" : "default",m: 0,- bg: toggled ? "hover" : "transparent",+ bg: toggled ? "background-selected" : "transparent",mr: variant === "small" ? 0 : 1,- ":hover": { bg: "hover" },":last-of-type": {mr: 0},@@ -71,7 +72,7 @@ export const ToolButton = React.memo(><Iconpath={Icons[icon]}- color={iconColor || "icon"}+ color={iconColor || (toggled ? "icon-selected" : "icon")}size={iconSize || (variant === "small" ? "medium" : "big")}/></Button>diff --git a/packages/editor/src/toolbar/components/toolbar-group.tsx b/packages/editor/src/toolbar/components/toolbar-group.tsxindex c955ef5b2..8cf521571 100644--- a/packages/editor/src/toolbar/components/toolbar-group.tsx+++ b/packages/editor/src/toolbar/components/toolbar-group.tsx@@ -33,10 +33,19 @@ export type ToolbarGroupProps = FlexProps & {selectedNode?: NodeWithOffset;};export function ToolbarGroup(props: ToolbarGroupProps) {- const { tools, editor, force, selectedNode, ...flexProps } = props;+ const { tools, editor, force, selectedNode, sx, ...flexProps } = props;return (- <Flex className="toolbar-group" {...flexProps}>+ <Flex+ className="toolbar-group"+ sx={{+ gap: "small",+ p: "small",+ flexShrink: 0,+ ...sx+ }}+ {...flexProps}+ >{tools.map((toolId) => {if (Array.isArray(toolId)) {return (diff --git a/packages/editor/src/toolbar/icons.ts b/packages/editor/src/toolbar/icons.tsindex 2b25a18d8..6a5e1c3a9 100644--- a/packages/editor/src/toolbar/icons.ts+++ b/packages/editor/src/toolbar/icons.ts@@ -72,8 +72,8 @@ import {mdiFormatStrikethrough,mdiFormatSubscript,mdiFormatSuperscript,- mdiFormatTextdirectionLToR,- mdiFormatTextdirectionRToL,+ mdiFormatPilcrowArrowLeft,+ mdiFormatPilcrowArrowRight,mdiFormatUnderline,mdiFullscreen,mdiFunctionVariant,@@ -136,8 +136,8 @@ export const Icons = {codeblock: mdiCodeBraces,blockquote: mdiFormatQuoteClose,formatClear: mdiFormatClear,- ltr: mdiFormatTextdirectionLToR,- rtl: mdiFormatTextdirectionRToL,+ ltr: mdiFormatPilcrowArrowRight,+ rtl: mdiFormatPilcrowArrowLeft,numberedList: mdiFormatListNumbered,bulletList: mdiFormatListBulleted,highlight: mdiFormatColorHighlight,diff --git a/packages/editor/src/toolbar/index.ts b/packages/editor/src/toolbar/index.tsindex 952503417..1381e5fda 100644--- a/packages/editor/src/toolbar/index.ts+++ b/packages/editor/src/toolbar/index.ts@@ -22,6 +22,5 @@ import { Toolbar } from "./toolbar";export default Toolbar;export * from "./types";export * from "./icons";-export * from "./components/icon";export * from "./tools";export * from "./tool-definitions";diff --git a/packages/editor/src/toolbar/popups/cell-properties.tsx b/packages/editor/src/toolbar/popups/cell-properties.tsxindex 4aa4a9bc3..e5b56b942 100644--- a/packages/editor/src/toolbar/popups/cell-properties.tsx+++ b/packages/editor/src/toolbar/popups/cell-properties.tsx@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { Editor } from "../../types";import { Box } from "@theme-ui/components";import { Tab, Tabs } from "../../components/tabs";-import { Icon } from "../components/icon";+import { Icon } from "@notesnook/ui";// import { MenuPresenter } from "../../components/menu/menu";import { Popup } from "../components/popup";import { Icons } from "../icons";diff --git a/packages/editor/src/toolbar/popups/color-picker.tsx b/packages/editor/src/toolbar/popups/color-picker.tsxindex 3b8a6cb7c..55f968bd3 100644--- a/packages/editor/src/toolbar/popups/color-picker.tsx+++ b/packages/editor/src/toolbar/popups/color-picker.tsx@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { ButtonProps, Flex } from "@theme-ui/components";import { Input } from "@theme-ui/components";-import { Icon } from "../components/icon";+import { Icon } from "@notesnook/ui";import { Icons } from "../icons";import { useCallback, useEffect, useRef, useState } from "react";import tinycolor from "tinycolor2";@@ -27,7 +27,7 @@ import { HexColorPicker } from "react-colorful";import { Button } from "../../components/button";import { debounce } from "../../utils/debounce";import { Popup } from "../components/popup";-import { SchemeColors } from "@notesnook/theme/dist/theme/colorscheme";+import { SchemeColors } from "@notesnook/theme";export const DEFAULT_COLORS = ["#e91e63",@@ -139,7 +139,7 @@ export function ColorPicker(props: ColorPickerProps) {p: 0,borderRadius: 0,fontSize: ["title", "title", "body"],- color: "fontTertiary",+ color: "var(--paragraph-secondary)",width: [75, 75, 65],letterSpacing: 1.5,textAlign: "center"@@ -184,7 +184,6 @@ export function ColorPicker(props: ColorPickerProps) {{!deleteMode && (<PaletteButtonicon={Icons.colorClear}- iconColor="text"onClick={onClear}title="Clear color"iconSize={15}@@ -192,8 +191,8 @@ export function ColorPicker(props: ColorPickerProps) {)}<PaletteButtonicon={Icons.delete}- iconColor={deleteMode ? "error" : "icon"}- bg={deleteMode ? "errorBg" : undefined}+ iconColor={deleteMode ? "var(--icon-error)" : "icon"}+ bg={deleteMode ? "var(--background-error)" : "transparent"}onClick={() => setDeleteMode((s) => !s)}title={deleteMode@@ -205,7 +204,7 @@ export function ColorPicker(props: ColorPickerProps) {{!deleteMode && (<PaletteButtonicon={Icons.palette}- iconColor={tColor.isDark() ? "static" : "icon"}+ iconColor={tColor.isDark() ? "white" : "icon"}onClick={() => setIsPickerOpen((s) => !s)}title="Choose custom color"iconSize={18}@@ -218,7 +217,7 @@ export function ColorPicker(props: ColorPickerProps) {title={deleteMode ? "Click to delete this color" : colorItem}bg={colorItem}iconSize={15}- iconColor={"static"}+ iconColor={"white"}icon={deleteMode && colors.includes(colorItem)? Icons.close@@ -253,7 +252,7 @@ export function ColorPicker(props: ColorPickerProps) {type PaletteButtonProps = ButtonProps & {icon?: string;- iconColor?: keyof SchemeColors;+ iconColor?: SchemeColors;iconSize?: number;bg?: string;};@@ -271,7 +270,11 @@ function PaletteButton(props: PaletteButtonProps) {p: 0,ml: [2, 2, 1],bg,- ":hover": { bg },+ ":hover:not(:disabled):not(:active)": {+ bg: bg?.startsWith("#")+ ? tinycolor(bg).darken(5).toRgbString()+ : "hover"+ },...sx}}{...restProps}diff --git a/packages/editor/src/toolbar/popups/embed-popup.tsx b/packages/editor/src/toolbar/popups/embed-popup.tsxindex d3a5a8f76..5fa512da0 100644--- a/packages/editor/src/toolbar/popups/embed-popup.tsx+++ b/packages/editor/src/toolbar/popups/embed-popup.tsx@@ -113,8 +113,7 @@ export function EmbedPopup(props: EmbedPopupProps) {<Textvariant={"error"}sx={{- bg: "errorBg",- color: "error",+ bg: "var(--background-error)",p: 1,borderRadius: "default"}}diff --git a/packages/editor/src/toolbar/popups/image-upload.tsx b/packages/editor/src/toolbar/popups/image-upload.tsxindex c7f42ce03..785d188d9 100644--- a/packages/editor/src/toolbar/popups/image-upload.tsx+++ b/packages/editor/src/toolbar/popups/image-upload.tsx@@ -78,7 +78,7 @@ export function ImageUploadPopup(props: ImageUploadPopupProps) {<Textvariant={"error"}sx={{- bg: "errorBg",+ bg: "var(--background-error)",mt: 1,p: 1,borderRadius: "default"@@ -91,7 +91,7 @@ export function ImageUploadPopup(props: ImageUploadPopupProps) {variant={"subBody"}sx={{bg: "shade",- color: "primary",+ color: "accent",mt: 1,p: 1,borderRadius: "default"diff --git a/packages/editor/src/toolbar/popups/search-replace.tsx b/packages/editor/src/toolbar/popups/search-replace.tsxindex fc479ec57..dc1f027d8 100644--- a/packages/editor/src/toolbar/popups/search-replace.tsx+++ b/packages/editor/src/toolbar/popups/search-replace.tsx@@ -101,11 +101,11 @@ export function SearchReplacePopup(props: SearchReplacePopupProps) {p: 1,py: 0,":focus-within": {- outlineColor: "primary",+ outlineColor: "accent",outlineWidth: "1.8px"},":hover": {- outlineColor: "primary"+ outlineColor: "accent"}}}>@@ -185,7 +185,7 @@ export function SearchReplacePopup(props: SearchReplacePopupProps) {sx={{flexShrink: 0,borderLeft: "1px solid var(--border)",- color: "fontTertiary",+ color: "paragraph",px: 1}}>diff --git a/packages/editor/src/toolbar/popups/table-popup.tsx b/packages/editor/src/toolbar/popups/table-popup.tsxindex 2fa3fe116..fe7d1a49b 100644--- a/packages/editor/src/toolbar/popups/table-popup.tsx+++ b/packages/editor/src/toolbar/popups/table-popup.tsx@@ -117,11 +117,14 @@ export function TablePopup(props: TablePopupProps) {data-index={index}sx={{height: cellSize || 15,- border: "1px solid var(--disabled)",borderRadius: "small",- bg: isCellHighlighted(index, cellLocation, tableSize)- ? "disabled"- : "transparent"+ border: "1px solid",+ ...(isCellHighlighted(index, cellLocation, tableSize)+ ? {+ bg: "background-selected",+ borderColor: "transparent"+ }+ : { bg: "transparent", borderColor: "border" })}}onTouchStart={() => {setCellLocation(getCellLocation(index, tableSize));diff --git a/packages/editor/src/toolbar/stores/toolbar-store.ts b/packages/editor/src/toolbar/stores/toolbar-store.tsindex 4af6d7a26..d3c4b3895 100644--- a/packages/editor/src/toolbar/stores/toolbar-store.ts+++ b/packages/editor/src/toolbar/stores/toolbar-store.ts@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { Theme } from "@notesnook/theme";import { create } from "zustand";import { DownloadOptions } from "../../utils/downloader";@@ -25,8 +24,6 @@ export type ToolbarLocation = "top" | "bottom";export type PopupRef = { id: string; group: string };interface ToolbarState {- theme?: Theme;- setTheme: (theme?: Theme) => void;downloadOptions?: DownloadOptions;setDownloadOptions: (options?: DownloadOptions) => void;isMobile: boolean;@@ -46,13 +43,11 @@ interface ToolbarState {}export const useToolbarStore = create<ToolbarState>((set, get) => ({- theme: undefined,downloadOptions: undefined,isMobile: false,openedPopups: {},setDownloadOptions: (options) => set({ downloadOptions: options }),setIsMobile: (isMobile) => set({ isMobile }),- setTheme: (theme) => set({ theme }),toolbarLocation: "top",setToolbarLocation: (location) => set({ toolbarLocation: location }),closePopup: (id) =>@@ -94,13 +89,3 @@ export function useToolbarLocation() {export function useIsMobile() {return useToolbarStore((store) => store.isMobile);}--export const useTheme = Object.defineProperty(- () => {- return useToolbarStore((store) => store.theme);- },- "current",- {- get: () => useToolbarStore.getState().theme- }-) as (() => Theme | undefined) & { current: Theme | undefined };diff --git a/packages/editor/src/toolbar/toolbar.tsx b/packages/editor/src/toolbar/toolbar.tsxindex 853a7ecfc..8275b8275 100644--- a/packages/editor/src/toolbar/toolbar.tsx+++ b/packages/editor/src/toolbar/toolbar.tsx@@ -17,31 +17,24 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { Theme } from "@notesnook/theme";-import { Editor } from "../types";import { Flex, FlexProps } from "@theme-ui/components";-import { ThemeProvider } from "@emotion/react";-import { EditorFloatingMenus } from "./floating-menus";import {getDefaultPresets,STATIC_TOOLBAR_GROUPS,MOBILE_STATIC_TOOLBAR_GROUPS} from "./tool-definitions";import { useEffect, useMemo } from "react";+import { Editor } from "../types";+import { ToolbarGroup } from "./components/toolbar-group";+import { EditorFloatingMenus } from "./floating-menus";import {ToolbarLocation,useIsMobile,useToolbarStore} from "./stores/toolbar-store";import { ToolbarDefinition } from "./types";-import { ToolbarGroup } from "./components/toolbar-group";-import {- EditorContext,- PopupRenderer-} from "../components/popup-presenter/popuprenderer";type ToolbarProps = FlexProps & {- theme: Theme;editor: Editor | null;location: ToolbarLocation;tools?: ToolbarDefinition;@@ -52,7 +45,6 @@ type ToolbarProps = FlexProps & {export function Toolbar(props: ToolbarProps) {const {editor,- theme,location,tools = getDefaultPresets().default,defaultFontFamily,@@ -91,38 +83,34 @@ export function Toolbar(props: ToolbarProps) {if (!editor) return null;return (- <ThemeProvider theme={theme}>- <EditorContext.Provider value={editor}>- <PopupRenderer editor={editor}>- <Flex- className="editor-toolbar"- sx={{- ...sx,- flexWrap: isMobile ? "nowrap" : "wrap",- overflowX: isMobile ? "auto" : "hidden"- }}- {...flexProps}- >- {toolbarTools.map((tools) => {- return (- <ToolbarGroup- key={tools.join("")}- tools={tools}- editor={editor}- sx={{- flexShrink: 0,- pr: 2,- mr: 2,- borderRight: "1px solid var(--border)",- ":last-of-type": { mr: 0, pr: 0, borderRight: "none" }- }}- />- );- })}- </Flex>- <EditorFloatingMenus editor={editor} />- </PopupRenderer>- </EditorContext.Provider>- </ThemeProvider>+ <>+ <Flex+ className="editor-toolbar"+ sx={{+ ...sx,+ flexWrap: isMobile ? "nowrap" : "wrap",+ overflowX: isMobile ? "auto" : "hidden",+ bg: "background",+ borderRadius: isMobile ? "0px" : "default"+ }}+ {...flexProps}+ >+ {toolbarTools.map((tools) => {+ return (+ <ToolbarGroup+ key={tools.join("")}+ tools={tools}+ editor={editor}+ sx={{+ borderRight: "1px solid var(--border)",+ ":last-of-type": { borderRight: "none" },+ alignItems: "center"+ }}+ />+ );+ })}+ </Flex>+ <EditorFloatingMenus editor={editor} />+ </>);}diff --git a/packages/editor/src/toolbar/tools/block.tsx b/packages/editor/src/toolbar/tools/block.tsxindex 7f0e415d2..66b11523b 100644--- a/packages/editor/src/toolbar/tools/block.tsx+++ b/packages/editor/src/toolbar/tools/block.tsx@@ -21,10 +21,9 @@ import { ToolProps } from "../types";import { Editor } from "../../types";import { Icons } from "../icons";import { useMemo, useRef, useState } from "react";-import { Icon } from "../components/icon";import { EmbedPopup } from "../popups/embed-popup";import { TablePopup } from "../popups/table-popup";-import { MenuItem } from "../../components/menu/types";+import { MenuItem, Icon } from "@notesnook/ui";import { useIsMobile, useToolbarLocation } from "../stores/toolbar-store";import { ResponsivePresenter } from "../../components/responsive";import { showPopup } from "../../components/popup-presenter";@@ -61,14 +60,14 @@ export function InsertBlock(props: ToolProps) {<><Buttonref={buttonRef}+ variant="secondary"sx={{p: 1,m: 0,- bg: isOpen ? "hover" : "transparent",+ bg: isOpen ? "var(--background-secondary)" : "transparent",mr: 1,display: "flex",alignItems: "center",- ":hover": { bg: "hover" },":last-of-type": {mr: 0}@@ -76,7 +75,7 @@ export function InsertBlock(props: ToolProps) {onMouseDown={(e) => e.preventDefault()}onClick={() => setIsOpen((s) => !s)}>- <Icon path={Icons.plus} size={18} color={"primary"} />+ <Icon path={Icons.plus} size={18} color={"accent"} /></Button><ResponsivePresenter@@ -101,7 +100,7 @@ const horizontalRule = (editor: Editor): MenuItem => ({key: "hr",type: "button",title: "Horizontal rule",- icon: "horizontalRule",+ icon: Icons.horizontalRule,isChecked: editor?.isActive("horizontalRule"),onClick: () => editor.current?.chain().focus().setHorizontalRule().run()});@@ -110,7 +109,7 @@ const codeblock = (editor: Editor): MenuItem => ({key: "codeblock",type: "button",title: "Code block",- icon: "codeblock",+ icon: Icons.codeblock,isChecked: editor?.isActive("codeBlock"),onClick: () => editor.current?.chain().focus().toggleCodeBlock().run()});@@ -119,7 +118,7 @@ const blockquote = (editor: Editor): MenuItem => ({key: "blockquote",type: "button",title: "Quote",- icon: "blockquote",+ icon: Icons.blockquote,isChecked: editor?.isActive("blockQuote"),onClick: () => editor.current?.chain().focus().toggleBlockquote().run()});@@ -128,7 +127,7 @@ const mathblock = (editor: Editor): MenuItem => ({key: "math",type: "button",title: "Math & formulas",- icon: "mathBlock",+ icon: Icons.mathBlock,isChecked: editor?.isActive("mathBlock"),onClick: () => editor.current?.chain().focus().insertMathBlock().run()});@@ -137,7 +136,7 @@ const image = (editor: Editor, isMobile: boolean): MenuItem => ({key: "image",type: "button",title: "Image",- icon: "image",+ icon: Icons.image,menu: {title: "Insert an image",items: [@@ -145,7 +144,7 @@ const image = (editor: Editor, isMobile: boolean): MenuItem => ({key: "upload-from-disk",type: "button",title: "Upload from disk",- icon: "upload",+ icon: Icons.upload,onClick: () =>editor.current?.chain().focus().openAttachmentPicker("image").run()},@@ -153,7 +152,7 @@ const image = (editor: Editor, isMobile: boolean): MenuItem => ({key: "camera",type: "button",title: "Take a photo using camera",- icon: "camera",+ icon: Icons.camera,isHidden: !isMobile,onClick: () =>editor.current?.chain().focus().openAttachmentPicker("camera").run()@@ -167,7 +166,7 @@ const table = (editor: Editor): MenuItem => ({key: "table",type: "button",title: "Table",- icon: "table",+ icon: Icons.table,menu: {title: "Insert a table",items: [@@ -198,7 +197,7 @@ const embedMobile = (editor: Editor): MenuItem => ({key: "embed",type: "button",title: "Embed",- icon: "embed",+ icon: Icons.embed,menu: {title: "Insert an embed",items: [@@ -226,7 +225,7 @@ const embedDesktop = (editor: Editor): MenuItem => ({key: "embed",type: "button",title: "Embed",- icon: "embed",+ icon: Icons.embed,onClick: () => {if (!editor) return;showPopup({@@ -248,7 +247,7 @@ const attachment = (editor: Editor): MenuItem => ({key: "attachment",type: "button",title: "Attachment",- icon: "attachment",+ icon: Icons.attachment,isChecked: editor?.isActive("attachment"),onClick: () =>editor.current?.chain().focus().openAttachmentPicker("file").run()@@ -258,7 +257,7 @@ const tasklist = (editor: Editor): MenuItem => ({key: "tasklist",type: "button",title: "Task list",- icon: "checkbox",+ icon: Icons.checkbox,isChecked: editor?.isActive("taskList"),onClick: () => editor.current?.chain().focus().toggleTaskList().run()});@@ -267,7 +266,7 @@ const outlinelist = (editor: Editor): MenuItem => ({key: "outlinelist",type: "button",title: "Outline list",- icon: "outlineList",+ icon: Icons.outlineList,isChecked: editor?.isActive("outlineList"),onClick: () => editor.current?.chain().focus().toggleOutlineList().run()});@@ -276,7 +275,7 @@ const uploadImageFromURLMobile = (editor: Editor): MenuItem => ({key: "upload-from-url",type: "button",title: "Attach from URL",- icon: "link",+ icon: Icons.link,menu: {title: "Attach image from URL",items: [@@ -308,7 +307,7 @@ const uploadImageFromURL = (editor: Editor): MenuItem => ({key: "upload-from-url",type: "button",title: "Attach from URL",- icon: "link",+ icon: Icons.link,onClick: () => {showPopup({popup: (hide) => (diff --git a/packages/editor/src/toolbar/tools/colors.tsx b/packages/editor/src/toolbar/tools/colors.tsxindex e9e891f41..ef8e9b9a7 100644--- a/packages/editor/src/toolbar/tools/colors.tsx+++ b/packages/editor/src/toolbar/tools/colors.tsx@@ -26,7 +26,7 @@ import { ColorPicker, DEFAULT_COLORS } from "../popups/color-picker";import { useToolbarLocation } from "../stores/toolbar-store";import { ToolProps } from "../types";import { getToolbarElement } from "../utils/dom";-import { PositionOptions } from "../../utils/position";+import { PositionOptions } from "@notesnook/ui";type ColorToolProps = ToolProps & {onColorChange: (color?: string) => void;@@ -67,11 +67,11 @@ export function ColorTool(props: ColorToolProps) {return (<SplitButton{...toolProps}- iconColor={activeColor && tColor.isDark() ? "static" : "icon"}+ iconColor={activeColor && tColor.isDark() ? "white" : "icon"}sx={{mr: 0,bg: activeColor || "transparent",- ":hover": {+ ":hover:not(:disabled):not(:active)": {bg: activeColor ? tColor.darken(5).toRgbString() : "transparent"}}}diff --git a/packages/editor/src/toolbar/tools/font.tsx b/packages/editor/src/toolbar/tools/font.tsxindex 662feff45..84dfe8405 100644--- a/packages/editor/src/toolbar/tools/font.tsx+++ b/packages/editor/src/toolbar/tools/font.tsx@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { ToolProps } from "../types";import { Editor } from "../../types";import { Dropdown } from "../components/dropdown";-import { MenuItem } from "../../components/menu/types";+import { MenuItem } from "@notesnook/ui";import { useCallback, useMemo } from "react";import { Counter } from "../components/counter";import { useRefValue } from "../../hooks/use-ref-value";@@ -108,7 +108,9 @@ function toMenuItems(editor: Editor, currentFontFamily: string): MenuItem[] {onClick: () =>editor.current?.chain().focus().setFontFamily(font.id).run(),styles: {- fontFamily: font.font+ title: {+ fontFamily: font.font+ }}});}diff --git a/packages/editor/src/toolbar/tools/headings.tsx b/packages/editor/src/toolbar/tools/headings.tsxindex b1b71b146..706b3dd67 100644--- a/packages/editor/src/toolbar/tools/headings.tsx+++ b/packages/editor/src/toolbar/tools/headings.tsx@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { ToolProps } from "../types";import { Editor } from "../../types";import { Dropdown } from "../components/dropdown";-import { MenuItem } from "../../components/menu/types";+import { MenuItem } from "@notesnook/ui";import { ToolbarLocation, useToolbarLocation } from "../stores/toolbar-store";import { useMemo } from "react";diff --git a/packages/editor/src/toolbar/tools/link.tsx b/packages/editor/src/toolbar/tools/link.tsxindex b5d46faf9..fcf11eb82 100644--- a/packages/editor/src/toolbar/tools/link.tsx+++ b/packages/editor/src/toolbar/tools/link.tsx@@ -231,8 +231,8 @@ export function OpenLink(props: ToolProps) {overflow: "hidden",textOverflow: "ellipsis",whiteSpace: "nowrap",- ":visited": { color: "primary" },- ":hover": { color: "primary", opacity: 0.8 }+ ":visited": { color: "accent" },+ ":hover": { color: "accent", opacity: 0.8 }}}>{href}diff --git a/packages/editor/src/toolbar/tools/lists.tsx b/packages/editor/src/toolbar/tools/lists.tsxindex 7e9292875..090031cdf 100644--- a/packages/editor/src/toolbar/tools/lists.tsx+++ b/packages/editor/src/toolbar/tools/lists.tsx@@ -220,7 +220,8 @@ function ListThumbnail(props: ListThumbnailProps) {flexDirection: "column",flex: 1,p: 0,- listStyleType+ listStyleType,+ gap: 1}}onMouseDown={(e) => e.preventDefault()}>@@ -230,9 +231,8 @@ function ListThumbnail(props: ListThumbnailProps) {as="li"sx={{display: "list-item",- color: "text",- fontSize: 8,- mb: "1px"+ color: "paragraph",+ fontSize: 8}}><Flex@@ -244,8 +244,8 @@ function ListThumbnail(props: ListThumbnailProps) {sx={{width: "100%",flexShrink: 0,- height: 4,- bg: "#cbcbcb",+ height: 5,+ bg: "border",borderRadius: "small"}}/>diff --git a/packages/editor/src/toolbar/tools/table.tsx b/packages/editor/src/toolbar/tools/table.tsxindex 2a9115f22..018994ca6 100644--- a/packages/editor/src/toolbar/tools/table.tsx+++ b/packages/editor/src/toolbar/tools/table.tsx@@ -22,7 +22,7 @@ import { Editor } from "../../types";import { ToolButton } from "../components/tool-button";import { useCallback, useMemo, useRef, useState } from "react";import { ResponsivePresenter } from "../../components/responsive";-import { MenuButton, MenuItem } from "../../components/menu/types";+import { MenuButtonItem, MenuItem } from "@notesnook/ui";import {moveColumnLeft as moveColumnLeftAction,moveColumnRight as moveColumnRightAction,@@ -30,7 +30,7 @@ import {moveRowUp as moveRowUpAction} from "../../extensions/table/actions";import { MoreTools } from "../components/more-tools";-import { menuButtonToTool } from "./utils";+import { menuButtonToTool, toolToMenuButton } from "./utils";import { getToolDefinition } from "../tool-definitions";import { CellProperties as CellPropertiesPopup } from "../popups/cell-properties";import { ColorTool } from "./colors";@@ -314,102 +314,72 @@ export function CellBorderWidth(props: ToolProps) {);}-const insertColumnLeft = (editor: Editor): MenuButton => ({- ...getToolDefinition("insertColumnLeft"),- key: "addColumnLeft",- type: "button",+const insertColumnLeft = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("insertColumnLeft")),onClick: () => editor.current?.chain().focus().addColumnBefore().run()});-const insertColumnRight = (editor: Editor): MenuButton => ({- ...getToolDefinition("insertColumnRight"),- key: "addColumnRight",- type: "button",- title: "Add column right",- onClick: () => editor.current?.chain().focus().addColumnAfter().run(),- icon: "insertColumnRight"+const insertColumnRight = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("insertColumnRight")),+ onClick: () => editor.current?.chain().focus().addColumnAfter().run()});-const moveColumnLeft = (editor: Editor): MenuButton => ({- ...getToolDefinition("moveColumnLeft"),- key: "moveColumnLeft",- type: "button",+const moveColumnLeft = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("moveColumnLeft")),onClick: () => moveColumnLeftAction(editor)});-const moveColumnRight = (editor: Editor): MenuButton => ({- ...getToolDefinition("moveColumnRight"),- key: "moveColumnRight",- type: "button",+const moveColumnRight = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("moveColumnRight")),onClick: () => moveColumnRightAction(editor)});-const deleteColumn = (editor: Editor): MenuButton => ({- ...getToolDefinition("deleteColumn"),- key: "deleteColumn",- type: "button",+const deleteColumn = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("deleteColumn")),onClick: () => editor.current?.chain().focus().deleteColumn().run()});-const splitCells = (editor: Editor): MenuButton => ({- ...getToolDefinition("splitCells"),- key: "splitCells",- type: "button",+const splitCells = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("splitCells")),onClick: () => editor.current?.chain().focus().splitCell().run()});-const mergeCells = (editor: Editor): MenuButton => ({- ...getToolDefinition("mergeCells"),- key: "mergeCells",- type: "button",+const mergeCells = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("mergeCells")),onClick: () => editor.current?.chain().focus().mergeCells().run()});-const insertRowAbove = (editor: Editor): MenuButton => ({- ...getToolDefinition("insertRowAbove"),- key: "insertRowAbove",- type: "button",+const insertRowAbove = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("insertRowAbove")),onClick: () => editor.current?.chain().focus().addRowBefore().run()});-const insertRowBelow = (editor: Editor): MenuButton => ({- ...getToolDefinition("insertRowBelow"),- key: "insertRowBelow",- type: "button",+const insertRowBelow = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("insertRowBelow")),onClick: () => editor.current?.chain().focus().addRowAfter().run()});-const moveRowUp = (editor: Editor): MenuButton => ({- ...getToolDefinition("moveRowUp"),- key: "moveRowUp",- type: "button",+const moveRowUp = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("moveRowUp")),onClick: () => moveRowUpAction(editor)});-const moveRowDown = (editor: Editor): MenuButton => ({- ...getToolDefinition("moveRowDown"),- key: "moveRowDown",- type: "button",+const moveRowDown = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("moveRowDown")),onClick: () => moveRowDownAction(editor)});-const deleteRow = (editor: Editor): MenuButton => ({- ...getToolDefinition("deleteRow"),- key: "deleteRow",- type: "button",+const deleteRow = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("deleteRow")),onClick: () => editor.current?.chain().focus().deleteRow().run()});-const deleteTable = (editor: Editor): MenuButton => ({- ...getToolDefinition("deleteTable"),- key: "deleteTable",- type: "button",+const deleteTable = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("deleteTable")),onClick: () => editor.current?.chain().focus().deleteTable().run()});-const cellProperties = (editor: Editor): MenuButton => ({- ...getToolDefinition("cellProperties"),- key: "cellProperties",- type: "button",+const cellProperties = (editor: Editor): MenuButtonItem => ({+ ...toolToMenuButton(getToolDefinition("cellProperties")),onClick: () => {showPopup({popup: (hide) => <CellPropertiesPopup onClose={hide} editor={editor} />diff --git a/packages/editor/src/toolbar/tools/utils.tsx b/packages/editor/src/toolbar/tools/utils.tsxindex d4124da29..aacfa6fa9 100644--- a/packages/editor/src/toolbar/tools/utils.tsx+++ b/packages/editor/src/toolbar/tools/utils.tsx@@ -18,19 +18,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { Editor } from "../../types";-import { MenuButton } from "../../components/menu/types";+import { MenuButtonItem } from "@notesnook/ui";import { ToolButton } from "../components/tool-button";-import { ToolProps } from "../types";+import { ToolDefinition, ToolProps } from "../types";+import { IconNames, Icons } from "../icons";export function menuButtonToTool(- constructItem: (editor: Editor) => MenuButton+ constructItem: (editor: Editor) => MenuButtonItem) {- return function Tool(props: ToolProps) {+ return function Tool(props: ToolProps & { icon: IconNames }) {const item = constructItem(props.editor);return (<ToolButton{...props}- icon={item.icon || props.icon}+ icon={props.icon}toggled={item.isChecked || false}title={item.title}onClick={item.onClick}@@ -38,3 +39,12 @@ export function menuButtonToTool();};}++export function toolToMenuButton(tool: ToolDefinition): MenuButtonItem {+ return {+ ...tool,+ type: "button",+ icon: Icons[tool.icon],+ key: tool.title+ };+}diff --git a/packages/editor/src/toolbar/utils/dom.ts b/packages/editor/src/toolbar/utils/dom.tsindex 3b92a1bcc..516d08313 100644--- a/packages/editor/src/toolbar/utils/dom.ts+++ b/packages/editor/src/toolbar/utils/dom.ts@@ -25,7 +25,7 @@ export function getToolbarElement() {export function getPopupContainer() {return (- (document.getElementById("popup-container") as HTMLElement) || undefined+ (document.getElementById("dialogContainer") as HTMLElement) || undefined);}diff --git a/packages/editor/styles/katex.min.css b/packages/editor/styles/katex.min.cssindex a047ef2af..224666693 100644--- a/packages/editor/styles/katex.min.css+++ b/packages/editor/styles/katex.min.css@@ -1 +1 @@-.katex{text-rendering:auto;font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.2"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}+.katex{text-rendering:auto;font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.4"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}diff --git a/packages/editor/styles/styles.css b/packages/editor/styles/styles.cssindex c69292a2f..e4a27598a 100644--- a/packages/editor/styles/styles.css+++ b/packages/editor/styles/styles.css@@ -46,11 +46,11 @@}.ProseMirror hr.ProseMirror-selectednode::after {- border: 2px solid var(--primary);+ border: 2px solid var(--accent);}.ProseMirror code:not(pre code) {- background-color: var(--bgSecondary);+ background-color: var(--background);border: 1px solid var(--border);border-radius: 5px;padding: 3px 5px 0px 5px;@@ -83,7 +83,7 @@}.ProseMirror a {- color: var(--primary);+ color: var(--accent);cursor: pointer;}@@ -105,7 +105,8 @@}.ProseMirror > div.codeblock-view-content-wrap,-.ProseMirror > div.taskList-view-content-wrap {+.ProseMirror > div.taskList-view-content-wrap,+.ProseMirror > div.math-block.math-node {margin-top: 1em;margin-bottom: 1em;}@@ -213,7 +214,7 @@ img.ProseMirror-separator {}.ProseMirror table .selectedCell {- border-color: var(--primary);+ border-color: var(--accent);}.ProseMirror table td > *,@@ -222,13 +223,12 @@ img.ProseMirror-separator {}.ProseMirror table th {- background-color: var(--bgSecondary);font-weight: bold;text-align: left;}.ProseMirror table .selectedCell:after {- background: var(--primary);+ background: var(--accent);content: "";left: 0;right: 0;@@ -241,7 +241,7 @@ img.ProseMirror-separator {}.ProseMirror table .column-resize-handle {- background-color: var(--primary);+ background-color: var(--accent);bottom: -2px;position: absolute;right: 0px;@@ -301,13 +301,7 @@ img.ProseMirror-separator {position: absolute;left: 0;pointer-events: none;- background-color: var(--overlay);-}--pre::selection,-pre *::selection {- background-color: var(--codeSelection) !important;- color: currentColor;+ background-color: var(--backdrop);}.hide-scrollbar::-webkit-scrollbar {@@ -548,7 +542,7 @@ p > *::selection {}.outline-list li .outline-list:hover:before {- border-left: 1px solid var(--bgSecondaryHover);+ border-left: 1px solid var(--hover);}diff --git a/packages/theme/.gitignore b/packages/theme/.gitignoreindex 23af43502..a14019d96 100644--- a/packages/theme/.gitignore+++ b/packages/theme/.gitignore@@ -154,4 +154,5 @@ psdthumbsketch+**/themes/# End of https://www.toptal.com/developers/gitignore/api/react,node\ No newline at end of filediff --git a/packages/theme/package-lock.json b/packages/theme/package-lock.jsonindex 7c2ab4457..231a5ce16 100644--- a/packages/theme/package-lock.json+++ b/packages/theme/package-lock.json@@ -9,11 +9,385 @@"version": "1.2.0","license": "GPL-3.0-or-later","dependencies": {- "@theme-ui/core": "^0.14.7",- "tinycolor2": "^1.4.2"+ "@emotion/react": "11.11.1",+ "@theme-ui/color": "^0.16.0",+ "@theme-ui/components": "0.14.7",+ "@theme-ui/core": "0.14.7",+ "tinycolor2": "^1.4.2",+ "zustand": "^4.3.8"},"devDependencies": {- "@types/tinycolor2": "^1.4.3"+ "@trpc/server": "^10.31.0",+ "@types/react": "17.0.2",+ "@types/tinycolor2": "^1.4.3",+ "isomorphic-fetch": "^3.0.0",+ "ts-json-schema-generator": "^1.2.0"+ },+ "peerDependencies": {+ "react": "17.0.2"+ }+ },+ "../../servers/themes": {+ "name": "@notesnook/themes-server",+ "version": "1.0.0",+ "extraneous": true,+ "license": "ISC",+ "dependencies": {+ "@orama/orama": "^1.0.8",+ "@trpc/server": "10.31.0",+ "async-mutex": "^0.4.0",+ "nodemon": "^3.0.1",+ "util": "^0.12.5",+ "zod": "^3.21.4"+ },+ "devDependencies": {+ "@notesnook/theme": "file:../../packages/theme",+ "ts-node": "^10.9.1",+ "typescript": "^4.7.4"+ }+ },+ "node_modules/@babel/code-frame": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz",+ "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==",+ "dependencies": {+ "@babel/highlight": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-module-imports": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz",+ "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==",+ "dependencies": {+ "@babel/types": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-string-parser": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",+ "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-validator-identifier": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz",+ "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/highlight": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz",+ "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==",+ "dependencies": {+ "@babel/helper-validator-identifier": "^7.22.5",+ "chalk": "^2.0.0",+ "js-tokens": "^4.0.0"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/runtime": {+ "version": "7.22.6",+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz",+ "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==",+ "dependencies": {+ "regenerator-runtime": "^0.13.11"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/types": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz",+ "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==",+ "dependencies": {+ "@babel/helper-string-parser": "^7.22.5",+ "@babel/helper-validator-identifier": "^7.22.5",+ "to-fast-properties": "^2.0.0"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@emotion/babel-plugin": {+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz",+ "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==",+ "dependencies": {+ "@babel/helper-module-imports": "^7.16.7",+ "@babel/runtime": "^7.18.3",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/serialize": "^1.1.2",+ "babel-plugin-macros": "^3.1.0",+ "convert-source-map": "^1.5.0",+ "escape-string-regexp": "^4.0.0",+ "find-root": "^1.1.0",+ "source-map": "^0.5.7",+ "stylis": "4.2.0"+ }+ },+ "node_modules/@emotion/cache": {+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz",+ "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==",+ "dependencies": {+ "@emotion/memoize": "^0.8.1",+ "@emotion/sheet": "^1.2.2",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1",+ "stylis": "4.2.0"+ }+ },+ "node_modules/@emotion/hash": {+ "version": "0.9.1",+ "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz",+ "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ=="+ },+ "node_modules/@emotion/is-prop-valid": {+ "version": "0.8.8",+ "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",+ "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==",+ "dependencies": {+ "@emotion/memoize": "0.7.4"+ }+ },+ "node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize": {+ "version": "0.7.4",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",+ "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw=="+ },+ "node_modules/@emotion/memoize": {+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="+ },+ "node_modules/@emotion/react": {+ "version": "11.11.1",+ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz",+ "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==",+ "dependencies": {+ "@babel/runtime": "^7.18.3",+ "@emotion/babel-plugin": "^11.11.0",+ "@emotion/cache": "^11.11.0",+ "@emotion/serialize": "^1.1.2",+ "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1",+ "hoist-non-react-statics": "^3.3.1"+ },+ "peerDependencies": {+ "react": ">=16.8.0"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@emotion/serialize": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz",+ "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==",+ "dependencies": {+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/unitless": "^0.8.1",+ "@emotion/utils": "^1.2.1",+ "csstype": "^3.0.2"+ }+ },+ "node_modules/@emotion/sheet": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz",+ "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA=="+ },+ "node_modules/@emotion/unitless": {+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz",+ "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ=="+ },+ "node_modules/@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==",+ "peerDependencies": {+ "react": ">=16.8.0"+ }+ },+ "node_modules/@emotion/utils": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz",+ "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg=="+ },+ "node_modules/@emotion/weak-memoize": {+ "version": "0.3.1",+ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz",+ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww=="+ },+ "node_modules/@styled-system/background": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/background/-/background-5.1.2.tgz",+ "integrity": "sha512-jtwH2C/U6ssuGSvwTN3ri/IyjdHb8W9X/g8Y0JLcrH02G+BW3OS8kZdHphF1/YyRklnrKrBT2ngwGUK6aqqV3A==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/border": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/@styled-system/border/-/border-5.1.5.tgz",+ "integrity": "sha512-JvddhNrnhGigtzWRCVuAHepniyVi6hBlimxWDVAdcTuk7aRn9BYJUwfHslURtwYFsF5FoEs8Zmr1oZq2M1AP0A==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/color": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/color/-/color-5.1.2.tgz",+ "integrity": "sha512-1kCkeKDZkt4GYkuFNKc7vJQMcOmTl3bJY3YBUs7fCNM6mMYJeT1pViQ2LwBSBJytj3AB0o4IdLBoepgSgGl5MA==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/core": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/core/-/core-5.1.2.tgz",+ "integrity": "sha512-XclBDdNIy7OPOsN4HBsawG2eiWfCcuFt6gxKn1x4QfMIgeO6TOlA2pZZ5GWZtIhCUqEPTgIBta6JXsGyCkLBYw==",+ "dependencies": {+ "object-assign": "^4.1.1"+ }+ },+ "node_modules/@styled-system/css": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/@styled-system/css/-/css-5.1.5.tgz",+ "integrity": "sha512-XkORZdS5kypzcBotAMPBoeckDs9aSZVkvrAlq5K3xP8IMAUek+x2O4NtwoSgkYkWWzVBu6DGdFZLR790QWGG+A=="+ },+ "node_modules/@styled-system/flexbox": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/flexbox/-/flexbox-5.1.2.tgz",+ "integrity": "sha512-6hHV52+eUk654Y1J2v77B8iLeBNtc+SA3R4necsu2VVinSD7+XY5PCCEzBFaWs42dtOEDIa2lMrgL0YBC01mDQ==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/grid": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/grid/-/grid-5.1.2.tgz",+ "integrity": "sha512-K3YiV1KyHHzgdNuNlaw8oW2ktMuGga99o1e/NAfTEi5Zsa7JXxzwEnVSDSBdJC+z6R8WYTCYRQC6bkVFcvdTeg==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/layout": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/layout/-/layout-5.1.2.tgz",+ "integrity": "sha512-wUhkMBqSeacPFhoE9S6UF3fsMEKFv91gF4AdDWp0Aym1yeMPpqz9l9qS/6vjSsDPF7zOb5cOKC3tcKKOMuDCPw==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/position": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/position/-/position-5.1.2.tgz",+ "integrity": "sha512-60IZfMXEOOZe3l1mCu6sj/2NAyUmES2kR9Kzp7s2D3P4qKsZWxD1Se1+wJvevb+1TP+ZMkGPEYYXRyU8M1aF5A==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/shadow": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/shadow/-/shadow-5.1.2.tgz",+ "integrity": "sha512-wqniqYb7XuZM7K7C0d1Euxc4eGtqEe/lvM0WjuAFsQVImiq6KGT7s7is+0bNI8O4Dwg27jyu4Lfqo/oIQXNzAg==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/should-forward-prop": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/@styled-system/should-forward-prop/-/should-forward-prop-5.1.5.tgz",+ "integrity": "sha512-+rPRomgCGYnUIaFabDoOgpSDc4UUJ1KsmlnzcEp0tu5lFrBQKgZclSo18Z1URhaZm7a6agGtS5Xif7tuC2s52Q==",+ "dependencies": {+ "@emotion/is-prop-valid": "^0.8.1",+ "@emotion/memoize": "^0.7.1",+ "styled-system": "^5.1.5"+ }+ },+ "node_modules/@styled-system/should-forward-prop/node_modules/@emotion/memoize": {+ "version": "0.7.5",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz",+ "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ=="+ },+ "node_modules/@styled-system/space": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/space/-/space-5.1.2.tgz",+ "integrity": "sha512-+zzYpR8uvfhcAbaPXhH8QgDAV//flxqxSjHiS9cDFQQUSznXMQmxJegbhcdEF7/eNnJgHeIXv1jmny78kipgBA==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/typography": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/typography/-/typography-5.1.2.tgz",+ "integrity": "sha512-BxbVUnN8N7hJ4aaPOd7wEsudeT7CxarR+2hns8XCX1zp0DFfbWw4xYa/olA0oQaqx7F1hzDg+eRaGzAJbF+jOg==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/variant": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/@styled-system/variant/-/variant-5.1.5.tgz",+ "integrity": "sha512-Yn8hXAFoWIro8+Q5J8YJd/mP85Teiut3fsGVR9CAxwgNfIAiqlYxsk5iHU7VHJks/0KjL4ATSjmbtCDC/4l1qw==",+ "dependencies": {+ "@styled-system/core": "^5.1.2",+ "@styled-system/css": "^5.1.5"+ }+ },+ "node_modules/@theme-ui/color": {+ "version": "0.16.0",+ "resolved": "https://registry.npmjs.org/@theme-ui/color/-/color-0.16.0.tgz",+ "integrity": "sha512-0V9g5Zh27mTsCEXhB697j/jEigdENlsN12TooY/upT9l7YXfMl3Zeupu2X3bifmdz2Q2OaMGD+r8EAJWdqX87A==",+ "dependencies": {+ "@theme-ui/css": "^0.16.0",+ "polished": "^4.0.5"+ }+ },+ "node_modules/@theme-ui/color/node_modules/@theme-ui/css": {+ "version": "0.16.0",+ "resolved": "https://registry.npmjs.org/@theme-ui/css/-/css-0.16.0.tgz",+ "integrity": "sha512-4kGFw80XTDguziltO8RW7KBhW8ju3aCmbcbLG7ASor2CXmS91jSGr0ILcd973TfJpp/5f8pLfOXxdIiu9PeaVA==",+ "dependencies": {+ "csstype": "^3.0.10"+ },+ "peerDependencies": {+ "@emotion/react": "^11.11.1"+ }+ },+ "node_modules/@theme-ui/components": {+ "version": "0.14.7",+ "resolved": "https://registry.npmjs.org/@theme-ui/components/-/components-0.14.7.tgz",+ "integrity": "sha512-iIzqBvRL8GNVkzuZinxInYNFW/38pvqqthuCgLsnOC0/A4Q4v13mn/fxlZa6pJjwouswsRLOrkd63bS7Svzkfw==",+ "dependencies": {+ "@styled-system/color": "^5.1.2",+ "@styled-system/should-forward-prop": "^5.1.2",+ "@styled-system/space": "^5.1.2",+ "@theme-ui/css": "0.14.7",+ "@types/styled-system": "^5.1.13"+ },+ "peerDependencies": {+ "@emotion/react": "^11",+ "react": ">16"}},"node_modules/@theme-ui/core": {@@ -53,12 +427,158 @@"react": ">16"}},+ "node_modules/@trpc/server": {+ "version": "10.31.0",+ "resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.31.0.tgz",+ "integrity": "sha512-9EnRTSDE9nF11LZsvSOqNKqkRYzHqFX4ch5AJ6VIu8uta2vxVTN4FxxsNRSOluTzVYZDeaCISbwmOJ5iihCCIg==",+ "dev": true,+ "funding": [+ "https://trpc.io/sponsor"+ ]+ },+ "node_modules/@types/json-schema": {+ "version": "7.0.12",+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz",+ "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==",+ "dev": true+ },+ "node_modules/@types/parse-json": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",+ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="+ },+ "node_modules/@types/prop-types": {+ "version": "15.7.5",+ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",+ "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==",+ "dev": true+ },+ "node_modules/@types/react": {+ "version": "17.0.2",+ "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.2.tgz",+ "integrity": "sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA==",+ "dev": true,+ "dependencies": {+ "@types/prop-types": "*",+ "csstype": "^3.0.2"+ }+ },+ "node_modules/@types/styled-system": {+ "version": "5.1.16",+ "resolved": "https://registry.npmjs.org/@types/styled-system/-/styled-system-5.1.16.tgz",+ "integrity": "sha512-+dyGs2n2o6QStsexh87NeaRmXYnKOnEe7iOEkcYOwKwI5a1gFL0+Mt/hZKi+4KD1qDMkLkGb0lpDrffb/vSkDQ==",+ "dependencies": {+ "csstype": "^3.0.2"+ }+ },"node_modules/@types/tinycolor2": {"version": "1.4.3","resolved": "https://registry.npmjs.org/@types/tinycolor2/-/tinycolor2-1.4.3.tgz","integrity": "sha512-Kf1w9NE5HEgGxCRyIcRXR/ZYtDv0V8FVPtYHwLxl0O+maGX0erE77pQlD0gpP+/KByMZ87mOA79SjifhSB3PjQ==","dev": true},+ "node_modules/ansi-styles": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",+ "dependencies": {+ "color-convert": "^1.9.0"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/babel-plugin-macros": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz",+ "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==",+ "dependencies": {+ "@babel/runtime": "^7.12.5",+ "cosmiconfig": "^7.0.0",+ "resolve": "^1.19.0"+ },+ "engines": {+ "node": ">=10",+ "npm": ">=6"+ }+ },+ "node_modules/balanced-match": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",+ "dev": true+ },+ "node_modules/callsites": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/chalk": {+ "version": "2.4.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",+ "dependencies": {+ "ansi-styles": "^3.2.1",+ "escape-string-regexp": "^1.0.5",+ "supports-color": "^5.3.0"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/chalk/node_modules/escape-string-regexp": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",+ "engines": {+ "node": ">=0.8.0"+ }+ },+ "node_modules/color-convert": {+ "version": "1.9.3",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",+ "dependencies": {+ "color-name": "1.1.3"+ }+ },+ "node_modules/color-name": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="+ },+ "node_modules/commander": {+ "version": "9.5.0",+ "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",+ "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",+ "dev": true,+ "engines": {+ "node": "^12.20.0 || >=14"+ }+ },+ "node_modules/convert-source-map": {+ "version": "1.9.0",+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",+ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="+ },+ "node_modules/cosmiconfig": {+ "version": "7.1.0",+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",+ "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==",+ "dependencies": {+ "@types/parse-json": "^4.0.0",+ "import-fresh": "^3.2.1",+ "parse-json": "^5.0.0",+ "path-type": "^4.0.0",+ "yaml": "^1.10.0"+ },+ "engines": {+ "node": ">=10"+ }+ },"node_modules/csstype": {"version": "3.1.1","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",@@ -72,62 +592,1363 @@"node": ">=0.10.0"}},- "node_modules/tinycolor2": {- "version": "1.4.2",- "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz",- "integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==",+ "node_modules/error-ex": {+ "version": "1.3.2",+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",+ "dependencies": {+ "is-arrayish": "^0.2.1"+ }+ },+ "node_modules/escape-string-regexp": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==","engines": {- "node": "*"+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"}- }- },- "dependencies": {- "@theme-ui/core": {- "version": "0.14.7",- "resolved": "https://registry.npmjs.org/@theme-ui/core/-/core-0.14.7.tgz",- "integrity": "sha512-u60cKOZYsGDG9sSoM4jYj743OpNXXU27f7vXGwrO/B1t/1sv1MAQA0R8HtVwoi9DyOIcOmWfMWYTiMg+4vV1MA==",- "requires": {- "@theme-ui/css": "0.14.7",- "@theme-ui/parse-props": "0.14.7",- "deepmerge": "^4.2.2"+ },+ "node_modules/find-root": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",+ "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng=="+ },+ "node_modules/fs.realpath": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",+ "dev": true+ },+ "node_modules/function-bind": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="+ },+ "node_modules/has": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",+ "dependencies": {+ "function-bind": "^1.1.1"+ },+ "engines": {+ "node": ">= 0.4.0"}},- "@theme-ui/css": {- "version": "0.14.7",- "resolved": "https://registry.npmjs.org/@theme-ui/css/-/css-0.14.7.tgz",- "integrity": "sha512-DbGw0T4MrTjiRs6lnyYgSD2TV/LvFErzDDpm0ICPL2KqDwqgHX4mFpDafj8/DkyCO9wx2KEiUuE+0NtOlR3i4w==",- "requires": {- "csstype": "^3.0.10"+ "node_modules/has-flag": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",+ "engines": {+ "node": ">=4"}},- "@theme-ui/parse-props": {- "version": "0.14.7",- "resolved": "https://registry.npmjs.org/@theme-ui/parse-props/-/parse-props-0.14.7.tgz",- "integrity": "sha512-qF10mAYs3wcIkSU5ZSbmHUngwTkPS87D23qg1ArbeO+m+/e4uqOy0+6W0Lt/4JTP7lnWWsCYuScK3F3hOp2q0w==",- "requires": {- "@theme-ui/css": "0.14.7"+ "node_modules/hoist-non-react-statics": {+ "version": "3.3.2",+ "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",+ "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",+ "dependencies": {+ "react-is": "^16.7.0"}},- "@types/tinycolor2": {- "version": "1.4.3",- "resolved": "https://registry.npmjs.org/@types/tinycolor2/-/tinycolor2-1.4.3.tgz",- "integrity": "sha512-Kf1w9NE5HEgGxCRyIcRXR/ZYtDv0V8FVPtYHwLxl0O+maGX0erE77pQlD0gpP+/KByMZ87mOA79SjifhSB3PjQ==",+ "node_modules/import-fresh": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",+ "dependencies": {+ "parent-module": "^1.0.0",+ "resolve-from": "^4.0.0"+ },+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/inflight": {+ "version": "1.0.6",+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",+ "dev": true,+ "dependencies": {+ "once": "^1.3.0",+ "wrappy": "1"+ }+ },+ "node_modules/inherits": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==","dev": true},- "csstype": {- "version": "3.1.1",- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",- "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="+ "node_modules/is-arrayish": {+ "version": "0.2.1",+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="},- "deepmerge": {- "version": "4.2.2",- "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",- "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg=="+ "node_modules/is-core-module": {+ "version": "2.12.0",+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz",+ "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==",+ "dependencies": {+ "has": "^1.0.3"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }},- "tinycolor2": {- "version": "1.4.2",- "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz",- "integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA=="+ "node_modules/isomorphic-fetch": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz",+ "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==",+ "dev": true,+ "dependencies": {+ "node-fetch": "^2.6.1",+ "whatwg-fetch": "^3.4.1"+ }+ },+ "node_modules/js-tokens": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="+ },+ "node_modules/json-parse-even-better-errors": {+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="+ },+ "node_modules/json5": {+ "version": "2.2.3",+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",+ "dev": true,+ "bin": {+ "json5": "lib/cli.js"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/lines-and-columns": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="+ },+ "node_modules/node-fetch": {+ "version": "2.6.12",+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz",+ "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==",+ "dev": true,+ "dependencies": {+ "whatwg-url": "^5.0.0"+ },+ "engines": {+ "node": "4.x || >=6.0.0"+ },+ "peerDependencies": {+ "encoding": "^0.1.0"+ },+ "peerDependenciesMeta": {+ "encoding": {+ "optional": true+ }+ }+ },+ "node_modules/normalize-path": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",+ "dev": true,+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/object-assign": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/once": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",+ "dev": true,+ "dependencies": {+ "wrappy": "1"+ }+ },+ "node_modules/parent-module": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",+ "dependencies": {+ "callsites": "^3.0.0"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/parse-json": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",+ "dependencies": {+ "@babel/code-frame": "^7.0.0",+ "error-ex": "^1.3.1",+ "json-parse-even-better-errors": "^2.3.0",+ "lines-and-columns": "^1.1.6"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/path-parse": {+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="+ },+ "node_modules/path-type": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/polished": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/polished/-/polished-4.2.2.tgz",+ "integrity": "sha512-Sz2Lkdxz6F2Pgnpi9U5Ng/WdWAUZxmHrNPoVlm3aAemxoy2Qy7LGjQg4uf8qKelDAUW94F4np3iH2YPf2qefcQ==",+ "dependencies": {+ "@babel/runtime": "^7.17.8"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/react-is": {+ "version": "16.13.1",+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="+ },+ "node_modules/regenerator-runtime": {+ "version": "0.13.11",+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",+ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="+ },+ "node_modules/resolve": {+ "version": "1.22.2",+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",+ "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==",+ "dependencies": {+ "is-core-module": "^2.11.0",+ "path-parse": "^1.0.7",+ "supports-preserve-symlinks-flag": "^1.0.0"+ },+ "bin": {+ "resolve": "bin/resolve"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/resolve-from": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/safe-stable-stringify": {+ "version": "2.4.3",+ "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz",+ "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==",+ "dev": true,+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/source-map": {+ "version": "0.5.7",+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",+ "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/styled-system": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/styled-system/-/styled-system-5.1.5.tgz",+ "integrity": "sha512-7VoD0o2R3RKzOzPK0jYrVnS8iJdfkKsQJNiLRDjikOpQVqQHns/DXWaPZOH4tIKkhAT7I6wIsy9FWTWh2X3q+A==",+ "dependencies": {+ "@styled-system/background": "^5.1.2",+ "@styled-system/border": "^5.1.5",+ "@styled-system/color": "^5.1.2",+ "@styled-system/core": "^5.1.2",+ "@styled-system/flexbox": "^5.1.2",+ "@styled-system/grid": "^5.1.2",+ "@styled-system/layout": "^5.1.2",+ "@styled-system/position": "^5.1.2",+ "@styled-system/shadow": "^5.1.2",+ "@styled-system/space": "^5.1.2",+ "@styled-system/typography": "^5.1.2",+ "@styled-system/variant": "^5.1.5",+ "object-assign": "^4.1.1"+ }+ },+ "node_modules/stylis": {+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",+ "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="+ },+ "node_modules/supports-color": {+ "version": "5.5.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",+ "dependencies": {+ "has-flag": "^3.0.0"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/supports-preserve-symlinks-flag": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/tinycolor2": {+ "version": "1.4.2",+ "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz",+ "integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==",+ "engines": {+ "node": "*"+ }+ },+ "node_modules/to-fast-properties": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",+ "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/tr46": {+ "version": "0.0.3",+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",+ "dev": true+ },+ "node_modules/ts-json-schema-generator": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/ts-json-schema-generator/-/ts-json-schema-generator-1.2.0.tgz",+ "integrity": "sha512-tUMeO3ZvA12d3HHh7T/AK8W5hmUhDRNtqWRHSMN3ZRbUFt+UmV0oX8k1RK4SA+a+BKNHpmW2v06MS49e8Fi3Yg==",+ "dev": true,+ "dependencies": {+ "@types/json-schema": "^7.0.11",+ "commander": "^9.4.1",+ "glob": "^8.0.3",+ "json5": "^2.2.1",+ "normalize-path": "^3.0.0",+ "safe-stable-stringify": "^2.4.1",+ "typescript": "~4.9.3"+ },+ "bin": {+ "ts-json-schema-generator": "bin/ts-json-schema-generator"+ },+ "engines": {+ "node": ">=10.0.0"+ }+ },+ "node_modules/ts-json-schema-generator/node_modules/brace-expansion": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",+ "dev": true,+ "dependencies": {+ "balanced-match": "^1.0.0"+ }+ },+ "node_modules/ts-json-schema-generator/node_modules/glob": {+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",+ "dev": true,+ "dependencies": {+ "fs.realpath": "^1.0.0",+ "inflight": "^1.0.4",+ "inherits": "2",+ "minimatch": "^5.0.1",+ "once": "^1.3.0"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/ts-json-schema-generator/node_modules/minimatch": {+ "version": "5.1.6",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",+ "dev": true,+ "dependencies": {+ "brace-expansion": "^2.0.1"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/typescript": {+ "version": "4.9.5",+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",+ "dev": true,+ "bin": {+ "tsc": "bin/tsc",+ "tsserver": "bin/tsserver"+ },+ "engines": {+ "node": ">=4.2.0"+ }+ },+ "node_modules/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==",+ "peerDependencies": {+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"+ }+ },+ "node_modules/webidl-conversions": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",+ "dev": true+ },+ "node_modules/whatwg-fetch": {+ "version": "3.6.2",+ "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz",+ "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==",+ "dev": true+ },+ "node_modules/whatwg-url": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",+ "dev": true,+ "dependencies": {+ "tr46": "~0.0.3",+ "webidl-conversions": "^3.0.0"+ }+ },+ "node_modules/wrappy": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",+ "dev": true+ },+ "node_modules/yaml": {+ "version": "1.10.2",+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",+ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/zustand": {+ "version": "4.3.8",+ "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.3.8.tgz",+ "integrity": "sha512-4h28KCkHg5ii/wcFFJ5Fp+k1J3gJoasaIbppdgZFO4BPJnsNxL0mQXBSFgOgAdCdBj35aDTPvdAJReTMntFPGg==",+ "dependencies": {+ "use-sync-external-store": "1.2.0"+ },+ "engines": {+ "node": ">=12.7.0"+ },+ "peerDependencies": {+ "immer": ">=9.0",+ "react": ">=16.8"+ },+ "peerDependenciesMeta": {+ "immer": {+ "optional": true+ },+ "react": {+ "optional": true+ }+ }+ }+ },+ "dependencies": {+ "@babel/code-frame": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz",+ "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==",+ "requires": {+ "@babel/highlight": "^7.22.5"+ }+ },+ "@babel/helper-module-imports": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz",+ "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==",+ "requires": {+ "@babel/types": "^7.22.5"+ }+ },+ "@babel/helper-string-parser": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",+ "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw=="+ },+ "@babel/helper-validator-identifier": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz",+ "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ=="+ },+ "@babel/highlight": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz",+ "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==",+ "requires": {+ "@babel/helper-validator-identifier": "^7.22.5",+ "chalk": "^2.0.0",+ "js-tokens": "^4.0.0"+ }+ },+ "@babel/runtime": {+ "version": "7.22.6",+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz",+ "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==",+ "requires": {+ "regenerator-runtime": "^0.13.11"+ }+ },+ "@babel/types": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz",+ "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==",+ "requires": {+ "@babel/helper-string-parser": "^7.22.5",+ "@babel/helper-validator-identifier": "^7.22.5",+ "to-fast-properties": "^2.0.0"+ }+ },+ "@emotion/babel-plugin": {+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz",+ "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==",+ "requires": {+ "@babel/helper-module-imports": "^7.16.7",+ "@babel/runtime": "^7.18.3",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/serialize": "^1.1.2",+ "babel-plugin-macros": "^3.1.0",+ "convert-source-map": "^1.5.0",+ "escape-string-regexp": "^4.0.0",+ "find-root": "^1.1.0",+ "source-map": "^0.5.7",+ "stylis": "4.2.0"+ }+ },+ "@emotion/cache": {+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz",+ "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==",+ "requires": {+ "@emotion/memoize": "^0.8.1",+ "@emotion/sheet": "^1.2.2",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1",+ "stylis": "4.2.0"+ }+ },+ "@emotion/hash": {+ "version": "0.9.1",+ "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz",+ "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ=="+ },+ "@emotion/is-prop-valid": {+ "version": "0.8.8",+ "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",+ "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==",+ "requires": {+ "@emotion/memoize": "0.7.4"+ },+ "dependencies": {+ "@emotion/memoize": {+ "version": "0.7.4",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",+ "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw=="+ }+ }+ },+ "@emotion/memoize": {+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="+ },+ "@emotion/react": {+ "version": "11.11.1",+ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz",+ "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==",+ "requires": {+ "@babel/runtime": "^7.18.3",+ "@emotion/babel-plugin": "^11.11.0",+ "@emotion/cache": "^11.11.0",+ "@emotion/serialize": "^1.1.2",+ "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1",+ "hoist-non-react-statics": "^3.3.1"+ }+ },+ "@emotion/serialize": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz",+ "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==",+ "requires": {+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/unitless": "^0.8.1",+ "@emotion/utils": "^1.2.1",+ "csstype": "^3.0.2"+ }+ },+ "@emotion/sheet": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz",+ "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA=="+ },+ "@emotion/unitless": {+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz",+ "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ=="+ },+ "@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=="+ },+ "@emotion/utils": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz",+ "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg=="+ },+ "@emotion/weak-memoize": {+ "version": "0.3.1",+ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz",+ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww=="+ },+ "@styled-system/background": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/background/-/background-5.1.2.tgz",+ "integrity": "sha512-jtwH2C/U6ssuGSvwTN3ri/IyjdHb8W9X/g8Y0JLcrH02G+BW3OS8kZdHphF1/YyRklnrKrBT2ngwGUK6aqqV3A==",+ "requires": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "@styled-system/border": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/@styled-system/border/-/border-5.1.5.tgz",+ "integrity": "sha512-JvddhNrnhGigtzWRCVuAHepniyVi6hBlimxWDVAdcTuk7aRn9BYJUwfHslURtwYFsF5FoEs8Zmr1oZq2M1AP0A==",+ "requires": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "@styled-system/color": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/color/-/color-5.1.2.tgz",+ "integrity": "sha512-1kCkeKDZkt4GYkuFNKc7vJQMcOmTl3bJY3YBUs7fCNM6mMYJeT1pViQ2LwBSBJytj3AB0o4IdLBoepgSgGl5MA==",+ "requires": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "@styled-system/core": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/core/-/core-5.1.2.tgz",+ "integrity": "sha512-XclBDdNIy7OPOsN4HBsawG2eiWfCcuFt6gxKn1x4QfMIgeO6TOlA2pZZ5GWZtIhCUqEPTgIBta6JXsGyCkLBYw==",+ "requires": {+ "object-assign": "^4.1.1"+ }+ },+ "@styled-system/css": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/@styled-system/css/-/css-5.1.5.tgz",+ "integrity": "sha512-XkORZdS5kypzcBotAMPBoeckDs9aSZVkvrAlq5K3xP8IMAUek+x2O4NtwoSgkYkWWzVBu6DGdFZLR790QWGG+A=="+ },+ "@styled-system/flexbox": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/flexbox/-/flexbox-5.1.2.tgz",+ "integrity": "sha512-6hHV52+eUk654Y1J2v77B8iLeBNtc+SA3R4necsu2VVinSD7+XY5PCCEzBFaWs42dtOEDIa2lMrgL0YBC01mDQ==",+ "requires": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "@styled-system/grid": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/grid/-/grid-5.1.2.tgz",+ "integrity": "sha512-K3YiV1KyHHzgdNuNlaw8oW2ktMuGga99o1e/NAfTEi5Zsa7JXxzwEnVSDSBdJC+z6R8WYTCYRQC6bkVFcvdTeg==",+ "requires": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "@styled-system/layout": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/layout/-/layout-5.1.2.tgz",+ "integrity": "sha512-wUhkMBqSeacPFhoE9S6UF3fsMEKFv91gF4AdDWp0Aym1yeMPpqz9l9qS/6vjSsDPF7zOb5cOKC3tcKKOMuDCPw==",+ "requires": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "@styled-system/position": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/position/-/position-5.1.2.tgz",+ "integrity": "sha512-60IZfMXEOOZe3l1mCu6sj/2NAyUmES2kR9Kzp7s2D3P4qKsZWxD1Se1+wJvevb+1TP+ZMkGPEYYXRyU8M1aF5A==",+ "requires": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "@styled-system/shadow": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/shadow/-/shadow-5.1.2.tgz",+ "integrity": "sha512-wqniqYb7XuZM7K7C0d1Euxc4eGtqEe/lvM0WjuAFsQVImiq6KGT7s7is+0bNI8O4Dwg27jyu4Lfqo/oIQXNzAg==",+ "requires": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "@styled-system/should-forward-prop": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/@styled-system/should-forward-prop/-/should-forward-prop-5.1.5.tgz",+ "integrity": "sha512-+rPRomgCGYnUIaFabDoOgpSDc4UUJ1KsmlnzcEp0tu5lFrBQKgZclSo18Z1URhaZm7a6agGtS5Xif7tuC2s52Q==",+ "requires": {+ "@emotion/is-prop-valid": "^0.8.1",+ "@emotion/memoize": "^0.7.1",+ "styled-system": "^5.1.5"+ },+ "dependencies": {+ "@emotion/memoize": {+ "version": "0.7.5",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz",+ "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ=="+ }+ }+ },+ "@styled-system/space": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/space/-/space-5.1.2.tgz",+ "integrity": "sha512-+zzYpR8uvfhcAbaPXhH8QgDAV//flxqxSjHiS9cDFQQUSznXMQmxJegbhcdEF7/eNnJgHeIXv1jmny78kipgBA==",+ "requires": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "@styled-system/typography": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/typography/-/typography-5.1.2.tgz",+ "integrity": "sha512-BxbVUnN8N7hJ4aaPOd7wEsudeT7CxarR+2hns8XCX1zp0DFfbWw4xYa/olA0oQaqx7F1hzDg+eRaGzAJbF+jOg==",+ "requires": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "@styled-system/variant": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/@styled-system/variant/-/variant-5.1.5.tgz",+ "integrity": "sha512-Yn8hXAFoWIro8+Q5J8YJd/mP85Teiut3fsGVR9CAxwgNfIAiqlYxsk5iHU7VHJks/0KjL4ATSjmbtCDC/4l1qw==",+ "requires": {+ "@styled-system/core": "^5.1.2",+ "@styled-system/css": "^5.1.5"+ }+ },+ "@theme-ui/color": {+ "version": "0.16.0",+ "resolved": "https://registry.npmjs.org/@theme-ui/color/-/color-0.16.0.tgz",+ "integrity": "sha512-0V9g5Zh27mTsCEXhB697j/jEigdENlsN12TooY/upT9l7YXfMl3Zeupu2X3bifmdz2Q2OaMGD+r8EAJWdqX87A==",+ "requires": {+ "@theme-ui/css": "^0.16.0",+ "polished": "^4.0.5"+ },+ "dependencies": {+ "@theme-ui/css": {+ "version": "0.16.0",+ "resolved": "https://registry.npmjs.org/@theme-ui/css/-/css-0.16.0.tgz",+ "integrity": "sha512-4kGFw80XTDguziltO8RW7KBhW8ju3aCmbcbLG7ASor2CXmS91jSGr0ILcd973TfJpp/5f8pLfOXxdIiu9PeaVA==",+ "requires": {+ "csstype": "^3.0.10"+ }+ }+ }+ },+ "@theme-ui/components": {+ "version": "0.14.7",+ "resolved": "https://registry.npmjs.org/@theme-ui/components/-/components-0.14.7.tgz",+ "integrity": "sha512-iIzqBvRL8GNVkzuZinxInYNFW/38pvqqthuCgLsnOC0/A4Q4v13mn/fxlZa6pJjwouswsRLOrkd63bS7Svzkfw==",+ "requires": {+ "@styled-system/color": "^5.1.2",+ "@styled-system/should-forward-prop": "^5.1.2",+ "@styled-system/space": "^5.1.2",+ "@theme-ui/css": "0.14.7",+ "@types/styled-system": "^5.1.13"+ }+ },+ "@theme-ui/core": {+ "version": "0.14.7",+ "resolved": "https://registry.npmjs.org/@theme-ui/core/-/core-0.14.7.tgz",+ "integrity": "sha512-u60cKOZYsGDG9sSoM4jYj743OpNXXU27f7vXGwrO/B1t/1sv1MAQA0R8HtVwoi9DyOIcOmWfMWYTiMg+4vV1MA==",+ "requires": {+ "@theme-ui/css": "0.14.7",+ "@theme-ui/parse-props": "0.14.7",+ "deepmerge": "^4.2.2"+ }+ },+ "@theme-ui/css": {+ "version": "0.14.7",+ "resolved": "https://registry.npmjs.org/@theme-ui/css/-/css-0.14.7.tgz",+ "integrity": "sha512-DbGw0T4MrTjiRs6lnyYgSD2TV/LvFErzDDpm0ICPL2KqDwqgHX4mFpDafj8/DkyCO9wx2KEiUuE+0NtOlR3i4w==",+ "requires": {+ "csstype": "^3.0.10"+ }+ },+ "@theme-ui/parse-props": {+ "version": "0.14.7",+ "resolved": "https://registry.npmjs.org/@theme-ui/parse-props/-/parse-props-0.14.7.tgz",+ "integrity": "sha512-qF10mAYs3wcIkSU5ZSbmHUngwTkPS87D23qg1ArbeO+m+/e4uqOy0+6W0Lt/4JTP7lnWWsCYuScK3F3hOp2q0w==",+ "requires": {+ "@theme-ui/css": "0.14.7"+ }+ },+ "@trpc/server": {+ "version": "10.31.0",+ "resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.31.0.tgz",+ "integrity": "sha512-9EnRTSDE9nF11LZsvSOqNKqkRYzHqFX4ch5AJ6VIu8uta2vxVTN4FxxsNRSOluTzVYZDeaCISbwmOJ5iihCCIg==",+ "dev": true+ },+ "@types/json-schema": {+ "version": "7.0.12",+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz",+ "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==",+ "dev": true+ },+ "@types/parse-json": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",+ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="+ },+ "@types/prop-types": {+ "version": "15.7.5",+ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",+ "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==",+ "dev": true+ },+ "@types/react": {+ "version": "17.0.2",+ "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.2.tgz",+ "integrity": "sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA==",+ "dev": true,+ "requires": {+ "@types/prop-types": "*",+ "csstype": "^3.0.2"+ }+ },+ "@types/styled-system": {+ "version": "5.1.16",+ "resolved": "https://registry.npmjs.org/@types/styled-system/-/styled-system-5.1.16.tgz",+ "integrity": "sha512-+dyGs2n2o6QStsexh87NeaRmXYnKOnEe7iOEkcYOwKwI5a1gFL0+Mt/hZKi+4KD1qDMkLkGb0lpDrffb/vSkDQ==",+ "requires": {+ "csstype": "^3.0.2"+ }+ },+ "@types/tinycolor2": {+ "version": "1.4.3",+ "resolved": "https://registry.npmjs.org/@types/tinycolor2/-/tinycolor2-1.4.3.tgz",+ "integrity": "sha512-Kf1w9NE5HEgGxCRyIcRXR/ZYtDv0V8FVPtYHwLxl0O+maGX0erE77pQlD0gpP+/KByMZ87mOA79SjifhSB3PjQ==",+ "dev": true+ },+ "ansi-styles": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",+ "requires": {+ "color-convert": "^1.9.0"+ }+ },+ "babel-plugin-macros": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz",+ "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==",+ "requires": {+ "@babel/runtime": "^7.12.5",+ "cosmiconfig": "^7.0.0",+ "resolve": "^1.19.0"+ }+ },+ "balanced-match": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",+ "dev": true+ },+ "callsites": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="+ },+ "chalk": {+ "version": "2.4.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",+ "requires": {+ "ansi-styles": "^3.2.1",+ "escape-string-regexp": "^1.0.5",+ "supports-color": "^5.3.0"+ },+ "dependencies": {+ "escape-string-regexp": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="+ }+ }+ },+ "color-convert": {+ "version": "1.9.3",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",+ "requires": {+ "color-name": "1.1.3"+ }+ },+ "color-name": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="+ },+ "commander": {+ "version": "9.5.0",+ "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",+ "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",+ "dev": true+ },+ "convert-source-map": {+ "version": "1.9.0",+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",+ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="+ },+ "cosmiconfig": {+ "version": "7.1.0",+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",+ "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==",+ "requires": {+ "@types/parse-json": "^4.0.0",+ "import-fresh": "^3.2.1",+ "parse-json": "^5.0.0",+ "path-type": "^4.0.0",+ "yaml": "^1.10.0"+ }+ },+ "csstype": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",+ "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="+ },+ "deepmerge": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",+ "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg=="+ },+ "error-ex": {+ "version": "1.3.2",+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",+ "requires": {+ "is-arrayish": "^0.2.1"+ }+ },+ "escape-string-regexp": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="+ },+ "find-root": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",+ "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng=="+ },+ "fs.realpath": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",+ "dev": true+ },+ "function-bind": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="+ },+ "has": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",+ "requires": {+ "function-bind": "^1.1.1"+ }+ },+ "has-flag": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="+ },+ "hoist-non-react-statics": {+ "version": "3.3.2",+ "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",+ "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",+ "requires": {+ "react-is": "^16.7.0"+ }+ },+ "import-fresh": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",+ "requires": {+ "parent-module": "^1.0.0",+ "resolve-from": "^4.0.0"+ }+ },+ "inflight": {+ "version": "1.0.6",+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",+ "dev": true,+ "requires": {+ "once": "^1.3.0",+ "wrappy": "1"+ }+ },+ "inherits": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",+ "dev": true+ },+ "is-arrayish": {+ "version": "0.2.1",+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="+ },+ "is-core-module": {+ "version": "2.12.0",+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz",+ "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==",+ "requires": {+ "has": "^1.0.3"+ }+ },+ "isomorphic-fetch": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz",+ "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==",+ "dev": true,+ "requires": {+ "node-fetch": "^2.6.1",+ "whatwg-fetch": "^3.4.1"+ }+ },+ "js-tokens": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="+ },+ "json-parse-even-better-errors": {+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="+ },+ "json5": {+ "version": "2.2.3",+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",+ "dev": true+ },+ "lines-and-columns": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="+ },+ "node-fetch": {+ "version": "2.6.12",+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz",+ "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==",+ "dev": true,+ "requires": {+ "whatwg-url": "^5.0.0"+ }+ },+ "normalize-path": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",+ "dev": true+ },+ "object-assign": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="+ },+ "once": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",+ "dev": true,+ "requires": {+ "wrappy": "1"+ }+ },+ "parent-module": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",+ "requires": {+ "callsites": "^3.0.0"+ }+ },+ "parse-json": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",+ "requires": {+ "@babel/code-frame": "^7.0.0",+ "error-ex": "^1.3.1",+ "json-parse-even-better-errors": "^2.3.0",+ "lines-and-columns": "^1.1.6"+ }+ },+ "path-parse": {+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="+ },+ "path-type": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="+ },+ "polished": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/polished/-/polished-4.2.2.tgz",+ "integrity": "sha512-Sz2Lkdxz6F2Pgnpi9U5Ng/WdWAUZxmHrNPoVlm3aAemxoy2Qy7LGjQg4uf8qKelDAUW94F4np3iH2YPf2qefcQ==",+ "requires": {+ "@babel/runtime": "^7.17.8"+ }+ },+ "react-is": {+ "version": "16.13.1",+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="+ },+ "regenerator-runtime": {+ "version": "0.13.11",+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",+ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="+ },+ "resolve": {+ "version": "1.22.2",+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",+ "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==",+ "requires": {+ "is-core-module": "^2.11.0",+ "path-parse": "^1.0.7",+ "supports-preserve-symlinks-flag": "^1.0.0"+ }+ },+ "resolve-from": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="+ },+ "safe-stable-stringify": {+ "version": "2.4.3",+ "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz",+ "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==",+ "dev": true+ },+ "source-map": {+ "version": "0.5.7",+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",+ "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ=="+ },+ "styled-system": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/styled-system/-/styled-system-5.1.5.tgz",+ "integrity": "sha512-7VoD0o2R3RKzOzPK0jYrVnS8iJdfkKsQJNiLRDjikOpQVqQHns/DXWaPZOH4tIKkhAT7I6wIsy9FWTWh2X3q+A==",+ "requires": {+ "@styled-system/background": "^5.1.2",+ "@styled-system/border": "^5.1.5",+ "@styled-system/color": "^5.1.2",+ "@styled-system/core": "^5.1.2",+ "@styled-system/flexbox": "^5.1.2",+ "@styled-system/grid": "^5.1.2",+ "@styled-system/layout": "^5.1.2",+ "@styled-system/position": "^5.1.2",+ "@styled-system/shadow": "^5.1.2",+ "@styled-system/space": "^5.1.2",+ "@styled-system/typography": "^5.1.2",+ "@styled-system/variant": "^5.1.5",+ "object-assign": "^4.1.1"+ }+ },+ "stylis": {+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",+ "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="+ },+ "supports-color": {+ "version": "5.5.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",+ "requires": {+ "has-flag": "^3.0.0"+ }+ },+ "supports-preserve-symlinks-flag": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="+ },+ "tinycolor2": {+ "version": "1.4.2",+ "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz",+ "integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA=="+ },+ "to-fast-properties": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",+ "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog=="+ },+ "tr46": {+ "version": "0.0.3",+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",+ "dev": true+ },+ "ts-json-schema-generator": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/ts-json-schema-generator/-/ts-json-schema-generator-1.2.0.tgz",+ "integrity": "sha512-tUMeO3ZvA12d3HHh7T/AK8W5hmUhDRNtqWRHSMN3ZRbUFt+UmV0oX8k1RK4SA+a+BKNHpmW2v06MS49e8Fi3Yg==",+ "dev": true,+ "requires": {+ "@types/json-schema": "^7.0.11",+ "commander": "^9.4.1",+ "glob": "^8.0.3",+ "json5": "^2.2.1",+ "normalize-path": "^3.0.0",+ "safe-stable-stringify": "^2.4.1",+ "typescript": "~4.9.3"+ },+ "dependencies": {+ "brace-expansion": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",+ "dev": true,+ "requires": {+ "balanced-match": "^1.0.0"+ }+ },+ "glob": {+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",+ "dev": true,+ "requires": {+ "fs.realpath": "^1.0.0",+ "inflight": "^1.0.4",+ "inherits": "2",+ "minimatch": "^5.0.1",+ "once": "^1.3.0"+ }+ },+ "minimatch": {+ "version": "5.1.6",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",+ "dev": true,+ "requires": {+ "brace-expansion": "^2.0.1"+ }+ }+ }+ },+ "typescript": {+ "version": "4.9.5",+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",+ "dev": true+ },+ "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=="+ },+ "webidl-conversions": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",+ "dev": true+ },+ "whatwg-fetch": {+ "version": "3.6.2",+ "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz",+ "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==",+ "dev": true+ },+ "whatwg-url": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",+ "dev": true,+ "requires": {+ "tr46": "~0.0.3",+ "webidl-conversions": "^3.0.0"+ }+ },+ "wrappy": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",+ "dev": true+ },+ "yaml": {+ "version": "1.10.2",+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",+ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="+ },+ "zustand": {+ "version": "4.3.8",+ "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.3.8.tgz",+ "integrity": "sha512-4h28KCkHg5ii/wcFFJ5Fp+k1J3gJoasaIbppdgZFO4BPJnsNxL0mQXBSFgOgAdCdBj35aDTPvdAJReTMntFPGg==",+ "requires": {+ "use-sync-external-store": "1.2.0"+ }}}}diff --git a/packages/theme/package.json b/packages/theme/package.jsonindex 57794ceda..bfcc46904 100644--- a/packages/theme/package.json+++ b/packages/theme/package.json@@ -8,14 +8,28 @@"url": "git://github.com/streetwriters/themeprovider.git"},"dependencies": {- "@theme-ui/core": "^0.14.7",- "tinycolor2": "^1.4.2"+ "@emotion/react": "11.11.1",+ "@theme-ui/color": "^0.16.0",+ "@theme-ui/components": "0.14.7",+ "@theme-ui/core": "0.14.7",+ "tinycolor2": "^1.4.2",+ "zustand": "^4.3.8"},"devDependencies": {- "@types/tinycolor2": "^1.4.3"+ "@trpc/server": "^10.31.0",+ "@types/react": "17.0.2",+ "@types/tinycolor2": "^1.4.3",+ "isomorphic-fetch": "^3.0.0",+ "ts-json-schema-generator": "^1.2.0"+ },+ "peerDependencies": {+ "react": "17.0.2"},"scripts": {+ "prebuild": "node ./scripts/prebuild.mjs",+ "generate": "node ./scripts/schema-generator.mjs","build": "tsc",- "prepublishOnly": "npm run build"+ "prepublishOnly": "npm run build",+ "watch": "tsc --watch"}}diff --git a/packages/theme/scripts/prebuild.mjs b/packages/theme/scripts/prebuild.mjsnew file mode 100644index 000000000..8a2394e21--- /dev/null+++ b/packages/theme/scripts/prebuild.mjs@@ -0,0 +1,55 @@+/*+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 "isomorphic-fetch";+import { mkdir, writeFile } from "fs/promises";+import path from "path";+import { fileURLToPath } from "url";++const __filename = fileURLToPath(import.meta.url);+const __dirname = path.dirname(__filename);++const DEFAULT_THEMES = ["default-light", "default-dark", "default-pitch-black"];++const THEMES_DIRECTORY = path.resolve(+ path.join(__dirname, "..", "src", "theme-engine", "themes")+);++const THEME_COMPATIBILITY_VERSION = 1;++async function main() {+ await mkdir(THEMES_DIRECTORY, { recursive: true });++ for (const themeId of DEFAULT_THEMES) {+ console.log("Getting", themeId);++ const BASE_URL = `https://raw.githubusercontent.com/streetwriters/notesnook-themes/main/themes/${themeId}/v${THEME_COMPATIBILITY_VERSION}`;+ const theme = await fetch(`${BASE_URL}/theme.json`).then((r) => r.json());+ const codeBlockCSS = await fetch(`${BASE_URL}/code-block.css`).then((r) =>+ r.text()+ );+ if (!theme) continue;++ await writeFile(+ path.join(THEMES_DIRECTORY, `${themeId}.json`),+ JSON.stringify({ ...theme, $schema: undefined, codeBlockCSS })+ );+ }+}++main();diff --git a/packages/theme/scripts/schema-generator.mjs b/packages/theme/scripts/schema-generator.mjsnew file mode 100644index 000000000..35fa05f23--- /dev/null+++ b/packages/theme/scripts/schema-generator.mjs@@ -0,0 +1,40 @@+/*+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 { writeFile } from "fs/promises";+import path from "path";+import tsj from "ts-json-schema-generator";+import { fileURLToPath } from "url";++const __filename = fileURLToPath(import.meta.url);+const __dirname = path.dirname(__filename);++const generator = tsj.createGenerator({+ path: path.join(__dirname, "..", "src", "theme-engine", "types.ts"),+ tsconfig: path.join(__dirname, "..", "tsconfig.json"),+ type: "ThemeDefinition"+});++const schema = generator.createSchema("ThemeDefinition");++delete schema.definitions.ThemeDefinition.properties.codeBlockCSS;+const required = schema.definitions.ThemeDefinition.required;+required.splice(required.indexOf("codeBlockCSS"), 1);++await writeFile(`v1.schema.json`, JSON.stringify(schema, undefined, 2));diff --git a/packages/theme/src/css.ts b/packages/theme/src/css.tsdeleted file mode 100644index f4934c914..000000000--- a/packages/theme/src/css.ts+++ /dev/null@@ -1,65 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--export function removeCss(id: string) {- const link = document.getElementById(id);- if (link) link.remove();-}--export function injectCssSrc(id: string, src: string) {- const head = document.head;- const link = document.createElement("link");-- link.id = id;- link.type = "text/css";- link.rel = "stylesheet";- link.href = src;-- head.appendChild(link);-}--export function injectCss(rules: string) {- const variableCss = document.getElementById("variables");- const head = document.getElementsByTagName("head")[0];- if (variableCss) {- head.removeChild(variableCss);- }- const css = document.createElement("style");- css.type = "text/css";- css.id = "variables";- // Support for the rest- css.appendChild(document.createTextNode(rules));-- head.insertBefore(css, getRootStylesheet());-}--function getRootStylesheet() {- for (const sty of document.getElementsByTagName("style")) {- if (sty.innerHTML.includes("#root")) {- return sty;- }- }- return null;-}--export function changeSvgTheme(newAccent: string) {- const nodes = document.querySelectorAll('*[fill="#0560ff"]');- for (let n = 0; n < nodes.length; ++n)- nodes[n].setAttribute("fill", newAccent);-}diff --git a/packages/theme/src/emotion/index.ts b/packages/theme/src/emotion/index.tsnew file mode 100644index 000000000..3689ee1cd--- /dev/null+++ b/packages/theme/src/emotion/index.ts@@ -0,0 +1,20 @@+/*+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 * from "./theme-provider";diff --git a/packages/theme/src/emotion/theme-provider.tsx b/packages/theme/src/emotion/theme-provider.tsxnew file mode 100644index 000000000..a5a9feeb9--- /dev/null+++ b/packages/theme/src/emotion/theme-provider.tsx@@ -0,0 +1,77 @@+/*+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 { ThemeProvider } from "@theme-ui/core";+import {+ ThemeScopes,+ useThemeColors,+ useThemeEngineStore,+ ScopedThemeProvider as NNScopedThemeProvider,+ ThemeFactory+} from "../";+import { PropsWithChildren, useMemo } from "react";+import { Box, BoxProps } from "@theme-ui/components";++export type EmotionThemeProviderProps = {+ scope?: keyof ThemeScopes;+ injectCssVars?: boolean;+} & Omit<BoxProps, "variant">;++export function EmotionThemeProvider(+ props: PropsWithChildren<EmotionThemeProviderProps>+) {+ const {+ children,+ scope = "base",+ injectCssVars = true,+ className,+ ...restProps+ } = props;+ const theme = useThemeEngineStore((store) => store.theme);+ const themeScope = useThemeColors(scope);+ const { colors } = themeScope;++ const themeProperties = useMemo(+ () =>+ ThemeFactory.construct({+ scope: colors,+ colorScheme: theme.colorScheme+ }),+ [colors, theme.colorScheme]+ );++ return (+ <ThemeProvider theme={themeProperties}>+ <NNScopedThemeProvider value={scope}>+ {injectCssVars ? (+ <Box+ {...restProps}+ className={`${+ className ? className + " " : ""+ }theme-scope-${scope}`}+ >+ {children}+ </Box>+ ) : (+ children+ )}+ </NNScopedThemeProvider>+ </ThemeProvider>+ );+}diff --git a/packages/theme/src/index.ts b/packages/theme/src/index.tsindex 47f029f29..e4c8ffce1 100644--- a/packages/theme/src/index.ts+++ b/packages/theme/src/index.ts@@ -16,7 +16,44 @@ GNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { SchemeColors, SchemeColorsAsCSSVariables } from "./theme-engine/types";-export * from "./theme/accents";-export * from "./themeprovider";export * from "./theme";+export * from "./theme-engine";+export * from "./theme-engine/types";+export * from "./emotion";++declare module "csstype" {+ interface Properties {+ backgroundColor?:+ | Property.BackgroundColor+ | SchemeColors+ | SchemeColorsAsCSSVariables;+ color?: Property.Color | SchemeColors | SchemeColorsAsCSSVariables;+ accentColor?:+ | Property.AccentColor+ | SchemeColors+ | SchemeColorsAsCSSVariables;++ borderColor?:+ | Property.BorderColor+ | SchemeColors+ | SchemeColorsAsCSSVariables;+ borderBottomColor?:+ | Property.BorderBottomColor+ | SchemeColors+ | SchemeColorsAsCSSVariables;+ borderTopColor?:+ | Property.BorderTopColor+ | SchemeColors+ | SchemeColorsAsCSSVariables;+ borderLeftColor?:+ | Property.BorderLeftColor+ | SchemeColors+ | SchemeColorsAsCSSVariables;+ borderRightColor?:+ | Property.BorderRightColor+ | SchemeColors+ | SchemeColorsAsCSSVariables;+ }+}diff --git a/packages/theme/src/theme-engine/index.ts b/packages/theme/src/theme-engine/index.tsnew file mode 100644index 000000000..cbf8cb552--- /dev/null+++ b/packages/theme/src/theme-engine/index.ts@@ -0,0 +1,85 @@+/*+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 { createContext, useContext, useMemo } from "react";+import {+ ThemeDefinition,+ ThemeCompatibilityVersion,+ ThemeScopes,+ VariantsWithStaticColors+} from "./types";+import { create } from "zustand";+import _ThemeLight from "./themes/default-light.json";+import _ThemeDark from "./themes/default-dark.json";+import _ThemePitchBlack from "./themes/default-pitch-black.json";+import { buildVariants } from "./utils";++const ThemeLight = _ThemeLight as ThemeDefinition;+const ThemeDark = _ThemeDark as ThemeDefinition;+const ThemePitchBlack = _ThemePitchBlack as ThemeDefinition;++type ThemeScope = {+ colors: VariantsWithStaticColors<true>;+ scope: keyof ThemeScopes;+ isDark: boolean;+};++type ThemeEngineState = {+ theme: ThemeDefinition;+ setTheme: (theme: ThemeDefinition) => void;+};+const useThemeEngineStore = create<ThemeEngineState>((set) => ({+ theme: ThemeLight,+ setTheme: (theme) => set({ theme })+}));++const ThemeScopeContext = createContext<keyof ThemeScopes>("base");++export function useThemeColors(scope?: keyof ThemeScopes): ThemeScope {+ const currentScope = useCurrentThemeScope();+ const theme = useThemeEngineStore((store) => store.theme);+ const themeScope = useMemo(+ () => theme.scopes[scope || currentScope] || theme.scopes.base,+ [currentScope, scope, theme.scopes]+ );++ const currentTheme = useMemo(+ () => ({+ colors: buildVariants(scope || currentScope || "base", theme, themeScope),+ isDark: theme.colorScheme === "dark",+ scope: currentScope+ }),+ [themeScope, theme, scope, currentScope]+ );++ return currentTheme;+}++export const useCurrentThemeScope = () => useContext(ThemeScopeContext);+export const ScopedThemeProvider = ThemeScopeContext.Provider;+export const THEME_COMPATIBILITY_VERSION: ThemeCompatibilityVersion = 1;+export {+ ThemeLight,+ ThemeDark,+ ThemePitchBlack,+ useThemeEngineStore,+ type ThemeEngineState+};+export { getPreviewColors, themeToCSS } from "./utils";+export { validateTheme } from "./validator";diff --git a/packages/theme/src/theme-engine/types.ts b/packages/theme/src/theme-engine/types.tsnew file mode 100644index 000000000..6b9a08486--- /dev/null+++ b/packages/theme/src/theme-engine/types.ts@@ -0,0 +1,312 @@+/*+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 CSS from "csstype";++export type ThemeColor =+ | keyof Colors+ | `${keyof Colors}-${keyof Omit<Variants, "primary">}`;+export type SchemeColors = ThemeColor | CSS.Property.Color;+export type SchemeColorsAsCSSVariables = `var(--${ThemeColor})`;++export function isThemeColor(+ color: string,+ colors: Colors+): color is keyof Colors {+ return color in colors;+}+export type ThemeCompatibilityVersion = 1;++/**+ * @title Notesnook Theme schema+ * @description This is a schema for validation of Notesnook themes.+ */+export type ThemeDefinition = {+ /**+ * Name of the theme+ */+ name: string;+ /**+ * ID of the theme. Must be unique across all other themes.+ */+ id: string;+ /**+ * Version of the theme.+ */+ version: number;+ /**+ * The compatibility version of the theme used by the client to+ * decide whether the theme is compatible with the current app version.+ */+ compatibilityVersion: ThemeCompatibilityVersion;+ /**+ * The license under which the theme can be shared, modified etc.+ *+ * @examples ["GPL-3.0-or-later", "Apache-2.0", "BSD-3-Clause", "MIT", "MPL-2.0"]+ */+ license: string;+ /**+ * Author(s) of the theme.+ */+ authors: ThemeAuthor[];+ /**+ * Website or homepage of the theme.+ *+ * @format uri+ */+ homepage: string;+ /**+ * A short description of the theme.+ */+ description: string;+ /**+ * Whether the theme has a dark color scheme or light.+ */+ colorScheme: "light" | "dark";+ /**+ * Keywords to help categorize the theme & improve search results.+ */+ tags?: string[];+ /**+ * All the theme scopes.+ */+ scopes: ThemeScopes;++ codeBlockCSS: string;+};++export type ThemeAuthor = {+ /**+ * Name of the author.+ */+ name: string;+ /**+ * Contact email of the author.+ */+ email?: string;+ /**+ * Website or support page of the author.+ */+ url?: string;+};++export type ThemeScopes = {+ /**+ * Base theme scope is the only scope that must be 100% specified.+ * There are no optional variants or colors in this scope and it+ * acts as a fallback for all the other scopes in case a color or+ * variant is missing in them.+ */+ base: Variants<true>;+ /**+ * Scope for the status bar on Desktop & mobile. On mobile, the status+ * bar can be found at the bottom of the side navigation menu which+ * includes the sync status, logged in status etc.+ */+ statusBar?: PartialVariants;+ /**+ * Scope for the central list view containing your notes, notebooks, tags etc.+ */+ list?: PartialVariants;+ /**+ * Scope for everything inside the editor excluding the toolbar which has its+ * own scope.+ */+ editor?: PartialVariants;+ /**+ * Scope specific to the Editor Toolbar.+ */+ editorToolbar?: PartialVariants;+ /**+ * Scope for all the dialogs in the app.+ */+ dialog?: PartialVariants;+ /**+ * Scope for the side navigation menu.+ */+ navigationMenu?: PartialVariants;+ /**+ * Scope for all the context menus in the app. This is desktop/web only since+ * the mobile clients do not have context menus.+ */+ contextMenu?: PartialVariants;+ /**+ * Scope for all the bottom sheets shown in the app. This scope only applies+ * on the mobile clients & the mobile version of the web app.+ */+ sheet?: PartialVariants;+};++export type PartialVariants = Partial<Variants<false>>;+export type PartialOrFullColors<TRequired extends boolean = false> =+ TRequired extends true ? Colors : Partial<Colors>;+export type Variants<TRequired extends boolean = false> = {+ primary: PartialOrFullColors<TRequired>;+ secondary: PartialOrFullColors<TRequired>;+ disabled: PartialOrFullColors<TRequired>;+ selected: PartialOrFullColors<TRequired>;+ error: PartialOrFullColors<TRequired>;+ success: PartialOrFullColors<TRequired>;+};++export type Colors = {+ /**+ * Only Hex RGB values are supported. No Alpha. (e.g. #f33ff3)+ * @pattern ^#(?:[0-9a-fA-F]{3}){1,2}$+ */+ accent: string;+ /**+ * Only Hex RGB values are supported. No Alpha. (e.g. #f33ff3)+ * @pattern ^#(?:[0-9a-fA-F]{3}){1,2}$+ */+ paragraph: string;+ /**+ * Hex RGB & ARGB values both are supported. (e.g. #dbdbdb99)+ * @pattern ^#(?:(?:[\da-fA-F]{3}){1,2}|(?:[\da-fA-F]{4}){1,2})$+ */+ background: string;+ /**+ * Only Hex RGB values are supported. No Alpha. (e.g. #f33ff3)+ * @pattern ^#(?:[0-9a-fA-F]{3}){1,2}$+ */+ border: string;+ /**+ * Only Hex RGB values are supported. No Alpha. (e.g. #f33ff3)+ * @pattern ^#(?:[0-9a-fA-F]{3}){1,2}$+ */+ heading: string;+ /**+ * Only Hex RGB values are supported. No Alpha. (e.g. #f33ff3)+ * @pattern ^#(?:[0-9a-fA-F]{3}){1,2}$+ */+ icon: string;+ /**+ * Only Hex RGB values are supported. No Alpha. (e.g. #f33ff3)+ * @pattern ^#(?:[0-9a-fA-F]{3}){1,2}$+ */+ separator: string;+ /**+ * Hex RGB & ARGB values both are supported. (e.g. #dbdbdb99)+ * @pattern ^#(?:(?:[\da-fA-F]{3}){1,2}|(?:[\da-fA-F]{4}){1,2})$+ */+ placeholder: string;+ /**+ * Hex RGB & ARGB values both are supported. (e.g. #dbdbdb99)+ * @pattern ^#(?:(?:[\da-fA-F]{3}){1,2}|(?:[\da-fA-F]{4}){1,2})$+ */+ hover: string;+ /**+ * Hex RGB & ARGB values both are supported. (e.g. #dbdbdb99)+ * @pattern ^#(?:(?:[\da-fA-F]{3}){1,2}|(?:[\da-fA-F]{4}){1,2})$+ */+ shade: string;+ /**+ * Hex RGB & ARGB values both are supported. (e.g. #dbdbdb99)+ * @pattern ^#(?:(?:[\da-fA-F]{3}){1,2}|(?:[\da-fA-F]{4}){1,2})$+ */+ backdrop: string;+ /**+ * Hex RGB & ARGB values both are supported. (e.g. #dbdbdb99)+ * @pattern ^#(?:(?:[\da-fA-F]{3}){1,2}|(?:[\da-fA-F]{4}){1,2})$+ */+ textSelection: string;+};++export type VariantsWithStaticColors<TRequired extends boolean = false> =+ Variants<TRequired> & {+ static: typeof StaticColors;+ };++export type PreviewColors = {+ editor: string;+ navigationMenu: {+ shade: string;+ accent: string;+ background: string;+ icon: string;+ };+ list: {+ heading: string;+ accent: string;+ background: string;+ };+ statusBar: {+ paragraph: string;+ background: string;+ icon: string;+ };+ border: string;+ paragraph: string;+ background: string;+ accent: string;+};++export const StaticColors = {+ red: "#f44336",+ orange: "#FF9800",+ yellow: "#FFD600",+ green: "#4CAF50",+ blue: "#2196F3",+ purple: "#673AB7",+ gray: "#9E9E9E",+ black: "#000000",+ white: "#ffffff"+} as const;++export const ThemeScopeKeys: readonly (keyof ThemeScopes)[] = [+ "base",+ "statusBar",+ "list",+ "editor",+ "dialog",+ "navigationMenu",+ "contextMenu",+ "editorToolbar",+ "sheet"+];++export const COLORS: readonly (keyof Colors)[] = [+ "accent",+ "paragraph",+ "background",+ "border",+ "heading",+ "icon",+ "separator",+ "placeholder",+ "hover",+ "shade",+ "backdrop",+ "textSelection"+];++export const ALPHA_COLORS: readonly (keyof Colors)[] = [+ "hover",+ "shade",+ "backdrop",+ "textSelection"+];++export const Variants: readonly (keyof Variants)[] = [+ "primary",+ "secondary",+ "disabled",+ "selected",+ "error",+ "success"+];diff --git a/packages/theme/src/theme-engine/utils.ts b/packages/theme/src/theme-engine/utils.tsnew file mode 100644index 000000000..ae8b45dee--- /dev/null+++ b/packages/theme/src/theme-engine/utils.ts@@ -0,0 +1,151 @@+/*+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 {+ Colors,+ PreviewColors,+ StaticColors,+ ThemeDefinition,+ ThemeScopeKeys,+ ThemeScopes,+ Variants,+ VariantsWithStaticColors+} from "./types";+import _ThemeLight from "./themes/default-light.json";+import _ThemeDark from "./themes/default-dark.json";++const ThemeLight = _ThemeLight as ThemeDefinition;+const ThemeDark = _ThemeDark as ThemeDefinition;++export function getPreviewColors(theme: ThemeDefinition): PreviewColors {+ const { base, navigationMenu, statusBar, list, editor } = theme.scopes;+ const { primary, success } = base;++ return {+ navigationMenu: {+ shade: navigationMenu?.primary?.shade || primary.shade,+ accent: navigationMenu?.primary?.accent || primary.accent,+ background: navigationMenu?.primary?.background || primary.background,+ icon: navigationMenu?.primary?.icon || primary.icon+ },+ statusBar: {+ paragraph: statusBar?.primary?.paragraph || primary.paragraph,+ background: statusBar?.primary?.background || primary.background,+ icon: statusBar?.success?.icon || success.icon+ },+ editor: editor?.primary?.background || primary.background,+ list: {+ heading: list?.primary?.heading || primary.heading,+ background: list?.primary?.background || primary.background,+ accent: list?.primary?.accent || primary.accent+ },+ border: primary.border,+ paragraph: primary.paragraph,+ background: primary.background,+ accent: primary.accent+ };+}++export function themeToCSS(theme: ThemeDefinition) {+ const css: string[] = [];+ for (const scopeKey of ThemeScopeKeys) {+ const scope = theme.scopes[scopeKey] || {};+ const variants = buildVariants(scopeKey, theme, scope);++ let scopeCss = `.theme-scope-${scopeKey} {`;+ for (const variantKey in variants) {+ const variant = variants[variantKey as keyof Variants];+ if (!variant) continue;++ css.push(`.theme-scope-${scopeKey}-${variant} {+ ${colorsToCSSVariables(variant, variantKey)}+ }`);++ scopeCss += colorsToCSSVariables(variant, variantKey);+ scopeCss += "\n\n";+ }+ scopeCss += "}";+ css.push(scopeCss);+ }++ return css.join("\n\n");+}++export function buildVariants(+ scope: keyof ThemeScopes,+ theme: ThemeDefinition,+ themeScope: Partial<Variants>+): VariantsWithStaticColors<true> {+ const defaultTheme = theme.colorScheme === "dark" ? ThemeDark : ThemeLight;+ const defaultThemeBase = defaultTheme.scopes.base;+ const defaultThemeScope = defaultTheme.scopes[scope] || {};+ const variant = {+ ...defaultThemeBase,+ ...defaultThemeScope,+ primary: {+ ...defaultThemeBase.primary,+ ...defaultThemeScope.primary,+ ...theme.scopes.base.primary,+ ...themeScope.primary+ },+ secondary: {+ ...defaultThemeBase.secondary,+ ...defaultThemeScope.secondary,+ ...theme.scopes.base.secondary,+ ...themeScope.secondary+ },+ disabled: {+ ...defaultThemeBase.disabled,+ ...defaultThemeScope.disabled,+ ...theme.scopes.base.disabled,+ ...themeScope.disabled+ },+ error: {+ ...defaultThemeBase.error,+ ...defaultThemeScope.error,+ ...theme.scopes.base.error,+ ...themeScope.error+ },+ success: {+ ...defaultThemeBase.success,+ ...defaultThemeScope.success,+ ...theme.scopes.base.success,+ ...themeScope.success+ },+ selected: {+ ...defaultThemeBase.selected,+ ...defaultThemeScope.selected,+ ...theme.scopes.base.selected,+ ...themeScope.selected+ },+ static: StaticColors+ };++ return variant;+}++export function colorsToCSSVariables(colors: Colors, variantKey?: string) {+ let root = "";+ const suffix =+ !variantKey || variantKey === "primary" ? "" : `-${variantKey}`;+ for (const color in colors) {+ root += `--${color}${suffix}: ${colors[color as keyof Colors]};\n`;+ }+ return root;+}diff --git a/packages/theme/src/theme-engine/validator.ts b/packages/theme/src/theme-engine/validator.tsnew file mode 100644index 000000000..565a26d0b--- /dev/null+++ b/packages/theme/src/theme-engine/validator.ts@@ -0,0 +1,120 @@+/*+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 {+ ALPHA_COLORS,+ COLORS,+ Colors,+ ThemeDefinition,+ Variants+} from "./types";++const RequiredKeys = [+ "version",+ "id",+ "name",+ "license",+ "authors.0.name",+ "description",+ "colorScheme",+ "compatibilityVersion",+ "homepage",+ ...Variants.map((variant) =>+ COLORS.map((colorName) => `scopes.base.${variant}.${colorName}`)+ ).flat()+];++const HEX_COLOR_REGEX = /^#(?:[0-9a-fA-F]{3}){1,2}$/;+const HEX_COLOR_REGEX_ALPHA =+ /^#(?:(?:[\da-fA-F]{3}){1,2}|(?:[\da-fA-F]{4}){1,2})$/;++export function validateTheme(json: Partial<ThemeDefinition>): {+ error: string | undefined;+} {+ const flattenedTheme = flatten(json);+ const missingKeys = [];+ for (const key of RequiredKeys) {+ if (!Object.keys(flattenedTheme).includes(key)) {+ missingKeys.push(key);+ }+ }+ if (missingKeys.length > 0) {+ return {+ error: `Invalid theme. ${missingKeys.join(+ ","+ )} are missing from the theme.`+ };+ }+ const invalidColors = [];+ for (const key in flattenedTheme) {+ if (!key.startsWith("scopes")) continue;+ const keyPart = key.split(".").pop() as keyof Colors | undefined;+ if (!keyPart || !COLORS.includes(keyPart))+ return {+ error: `Invalid theme. Found unknown key: ${key}.`+ };++ const value = flattenedTheme[key];+ const isAlpha = ALPHA_COLORS.includes(keyPart);+ const isHexColor = HEX_COLOR_REGEX.test(value);+ const isAlphaHexColor = HEX_COLOR_REGEX_ALPHA.test(value);++ if (+ ((!isAlpha && !isHexColor) || (isAlpha && !isAlphaHexColor)) &&+ !isHexColor+ ) {+ invalidColors.push(key);+ }+ }++ if (invalidColors.length > 0) {+ return {+ error: `Invalid theme. ${invalidColors.join(", ")} have invalid values.`+ };+ }++ return {+ error: undefined+ };+}++export function isThemeDefinition(+ json: Partial<ThemeDefinition>+): json is ThemeDefinition {+ return !validateTheme(json).error;+}++function flatten(object: Record<string, any>) {+ const flattenedObject: Record<string, any> = {};++ for (const innerObj in object) {+ if (typeof object[innerObj] === "object") {+ if (typeof object[innerObj] === "function") continue;++ const newObject = flatten(object[innerObj]);+ for (const key in newObject) {+ flattenedObject[innerObj + "." + key] = newObject[key];+ }+ } else {+ if (typeof object[innerObj] === "function") continue;+ flattenedObject[innerObj] = object[innerObj];+ }+ }+ return flattenedObject;+}diff --git a/packages/theme/src/theme/colorscheme/dark.ts b/packages/theme/src/theme/colorscheme/dark.tsdeleted file mode 100644index 068ddb968..000000000--- a/packages/theme/src/theme/colorscheme/dark.ts+++ /dev/null@@ -1,55 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import tinycolor from "tinycolor2";-import { SchemeColors } from ".";-import { getStaticColors } from "./static";--export function getDarkScheme(accent: string): SchemeColors {- return {- primary: accent,- placeholder: tinycolor("#ffffff").setAlpha(0.6).toRgbString(),- background: "#1b1b1b",- bgTransparent: "#2b2b2b99",- accent: "#000",- bgSecondary: "#2b2b2b",- bgSecondaryText: "#A1A1A1",- bgSecondaryHover: "#3d3d3d",- border: "#353535",- hover: "#404040",- fontSecondary: "#000",- fontTertiary: "#A1A1A1",- text: "#d3d3d3",- overlay: "rgba(53, 53, 53, 0.5)",- secondary: "black",- icon: "#dbdbdb",- disabled: "#5b5b5b",- checked: "#6b6b6b",- ...getStaticColors(accent),-- // COLORS- red: "#f44336",- orange: "#FF9800",- yellow: "#FFD600",- green: "#4CAF50",- blue: "#2196F3",- purple: "#9568ED",- gray: "#9E9E9E"- };-}diff --git a/packages/theme/src/theme/colorscheme/index.ts b/packages/theme/src/theme/colorscheme/index.tsdeleted file mode 100644index fc4362136..000000000--- a/packages/theme/src/theme/colorscheme/index.ts+++ /dev/null@@ -1,61 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import { getDarkScheme } from "./dark";-import { getLightScheme } from "./light";-import { StaticColors } from "./static";--const colorSchemes = {- dark: getDarkScheme,- light: getLightScheme-};--export type ColorSchemes = keyof typeof colorSchemes;-export function getColors(theme: ColorSchemes, accent: string) {- return colorSchemes[theme](accent);-}--export type SchemeColors = StaticColors & {- primary: string;- placeholder: string;- background: string;- bgTransparent: string;- accent: string;- bgSecondary: string;- bgSecondaryText: string;- bgSecondaryHover: string;- border: string;- hover: string;- fontSecondary: string;- fontTertiary: string;- text: string;- overlay: string;- secondary: string;- icon: string;- disabled: string;- checked: string;-- red: string;- orange: string;- yellow: string;- green: string;- blue: string;- purple: string;- gray: string;-};diff --git a/packages/theme/src/theme/colorscheme/light.ts b/packages/theme/src/theme/colorscheme/light.tsdeleted file mode 100644index b20692813..000000000--- a/packages/theme/src/theme/colorscheme/light.ts+++ /dev/null@@ -1,54 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import tinycolor from "tinycolor2";-import { SchemeColors } from ".";-import { getStaticColors } from "./static";--export function getLightScheme(accent: string): SchemeColors {- return {- primary: accent,- background: "white",- bgTransparent: "#f7f7f799",- accent: "white",- bgSecondary: "#f7f7f7",- bgSecondaryText: "#5E5E5E",- bgSecondaryHover: "#dbdbdb",- border: "#e5e5e5",- hover: "#f0f0f0",- fontSecondary: "white",- fontTertiary: "#656565",- text: "#202124",- overlay: "rgba(0, 0, 0, 0.1)",- secondary: "white",- icon: "#3b3b3b",- disabled: "#9b9b9b",- placeholder: tinycolor("#000000").setAlpha(0.6).toRgbString(),- checked: "#505050",- ...getStaticColors(accent),-- red: "#f44336",- orange: "#FF9800",- yellow: "#f0c800",- green: "#4CAF50",- blue: "#2196F3",- purple: "#9568ED",- gray: "#9E9E9E"- };-}diff --git a/packages/theme/src/theme/colorscheme/static.ts b/packages/theme/src/theme/colorscheme/static.tsdeleted file mode 100644index 97ab95fa1..000000000--- a/packages/theme/src/theme/colorscheme/static.ts+++ /dev/null@@ -1,70 +0,0 @@-/*-This file is part of the Notesnook project (https://notesnook.com/)--Copyright (C) 2023 Streetwriters (Private) Limited--This program is free software: you can redistribute it and/or modify-it under the terms of the GNU General Public License as published by-the Free Software Foundation, either version 3 of the License, or-(at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program. If not, see <http://www.gnu.org/licenses/>.-*/--import tinycolor from "tinycolor2";--export type StaticColors = {- shade: string;- textSelection: string;- dimPrimary: string;- transparent: string;- static: string;- error: string;- errorBg: string;- success: string;- warn: string;- warnBg: string;- info: string;- infoBg: string;- favorite: string;-- codeBg: string;- codeFg: string;- codeHighlight: string;- codeSelectionBg: string;- codeSelectionFg: string;- codeBorder: string;- codeSelection: string;-};-export function getStaticColors(accent: string): StaticColors {- return {- shade: tinycolor(accent).setAlpha(0.1).toRgbString(),- textSelection: tinycolor(accent).setAlpha(0.2).toRgbString(),- dimPrimary: tinycolor(accent).setAlpha(0.7).toRgbString(),- transparent: "transparent",- static: "white",- error: "#E53935",- errorBg: "#E5393520",- success: "#4F8A10",- warn: "#FF5722",- warnBg: "#FF572220",- info: "#17a2b8",- infoBg: "#17a2b820",- favorite: "#ffd700",-- // dracula colors- codeBg: "#282a36",- codeFg: "#6c7393",- codeHighlight: "#50fa7b",- codeSelectionFg: "#f8f8f2",- codeSelectionBg: "#44475a",- codeBorder: "#6c7393",- codeSelection: "#9580ff1a"- };-}diff --git a/packages/theme/src/theme/index.ts b/packages/theme/src/theme/index.tsindex d314908eb..9687a4a7d 100644--- a/packages/theme/src/theme/index.ts+++ b/packages/theme/src/theme/index.ts@@ -17,12 +17,13 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { getColors, SchemeColors } from "./colorscheme";import { variants } from "./variants";import { FontConfig, getFontConfig } from "./font";-import { TransformerFactory, Transformers } from "./transformer";import { ThemeConfig } from "./types";+import { ThemeColor, VariantsWithStaticColors } from "../theme-engine/types";+import { ThemeUIConfig } from "@theme-ui/css/dist/declarations/src/options";+export { createButtonVariant } from "./variants/button";export type Theme = {breakpoints: string[];space: number[] & { small?: number | string };@@ -34,37 +35,39 @@ export type Theme = {small: number;};shadows: { menu: string };- colors: SchemeColors;+ colors: Record<ThemeColor, string>;iconSizes: {small: number;medium: number;big: number;};+ config: ThemeUIConfig;} & FontConfig &typeof variants;-class ThemeFactory {- transform(type: Transformers, theme: Theme) {- const factory = new TransformerFactory();- return factory.construct(type, theme);- }-- construct(config: ThemeConfig): Theme {+export class ThemeFactory {+ static construct(config: ThemeConfig): Theme {const theme: Theme = {breakpoints: ["480px", "1000px", "1000px"],space: [0, 5, 10, 15, 20, 25, 30, 35],sizes: { full: "100%", half: "50%" },radii: { none: 0, default: 5, dialog: 10, small: 2.5 },iconSizes: { big: 18, medium: 16, small: 14 },- colors: getColors(config.theme, config.accent),+ colors: flattenVariants(config.scope),shadows:- config.theme === "dark"+ config.colorScheme === "dark"? {menu: "0px 0px 10px 0px #00000078"}: {menu: "0px 0px 10px 0px #00000022"},+ config: {+ useCustomProperties: false,+ useRootStyles: false,+ useLocalStorage: false,+ useColorSchemeMediaQuery: false+ },...getFontConfig(),...variants};@@ -73,4 +76,20 @@ class ThemeFactory {}}-export default ThemeFactory;+function flattenVariants(variants: VariantsWithStaticColors) {+ const colors: Partial<Record<ThemeColor, string>> = {};+ for (const variantKey in variants) {+ const variant = variants[variantKey as keyof VariantsWithStaticColors];+ if (!variant) continue;++ for (const colorKey in variant) {+ const suffix =+ variantKey === "primary" || variantKey === "static"+ ? ""+ : `-${variantKey}`;+ colors[`${colorKey}${suffix}` as ThemeColor] =+ variant[colorKey as keyof typeof variant];+ }+ }+ return colors as Record<ThemeColor, string>;+}diff --git a/packages/theme/src/theme/types.ts b/packages/theme/src/theme/types.tsindex 9725a3913..ac7ceb86a 100644--- a/packages/theme/src/theme/types.ts+++ b/packages/theme/src/theme/types.ts@@ -17,9 +17,8 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { ColorSchemes } from "./colorscheme";-+import { VariantsWithStaticColors } from "../theme-engine/types";export type ThemeConfig = {- theme: ColorSchemes;- accent: string;+ colorScheme: "dark" | "light";+ scope: VariantsWithStaticColors;};diff --git a/packages/theme/src/theme/variants/button.ts b/packages/theme/src/theme/variants/button.tsindex 5235ba6ed..bf51d3558 100644--- a/packages/theme/src/theme/variants/button.ts+++ b/packages/theme/src/theme/variants/button.ts@@ -18,183 +18,121 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { ThemeUIStyleObject } from "@theme-ui/core";+import { SchemeColors } from "../../theme-engine/types";+import { alpha } from "@theme-ui/color";++export const createButtonVariant = (+ background: SchemeColors = "transparent",+ color: SchemeColors = "paragraph",+ states?: {+ hover?: ThemeUIStyleObject;+ active?: ThemeUIStyleObject;+ }+): ThemeUIStyleObject => ({+ bg: background,+ color,-const defaultVariant: ThemeUIStyleObject = {- bg: "transparent",fontFamily: "body",fontWeight: "body",fontSize: "body",++ outline: "none",borderRadius: "default",cursor: "pointer",- // p: 0,+height: "min-content",px: 2,py: "7.5px",- transition: "filter 200ms ease-in, box-shadow 200ms ease-out",- ":hover:not(:disabled)": {- filter: "brightness(90%)"++ transition: "transform 50ms ease-out",+ ":hover:not(:disabled):not(:active)": {+ bg: background,+ filter: "brightness(90%)",+ ...states?.hover},":active": {- filter: "brightness(98%)"+ bg: background,+ filter: "brightness(90%)",+ transform: "scale(0.98) !important",+ ...states?.hover,+ ...states?.active},- outline: "none",":focus-visible:not(:active)": {- filter: "brightness(90%)",- bg: "bgSecondary"+ outline: `2px solid var(--paragraph)`},":disabled": {opacity: 0.5,cursor: "not-allowed"}-};+});-const primary: ThemeUIStyleObject = {- variant: "buttons.default",- color: "static",- bg: "primary"-};+const primary = createButtonVariant();-const error: ThemeUIStyleObject = {- variant: "buttons.default",- color: "static",- bg: "error"-};+const secondary: ThemeUIStyleObject = createButtonVariant(+ "background-secondary",+ "paragraph"+);-const errorSecondary: ThemeUIStyleObject = {- variant: "buttons.default",- color: "error",- // fontWeight: "bold",- bg: "errorBg",- ":hover": {- opacity: 0.8- }- // border: "1px solid",- // borderColor: "error",- // ":hover": {- // bg: "error",- // color: "static"- // }-};+const accent = createButtonVariant("accent", "white", {+ hover: { bg: alpha("accent", 0.9) },+ active: { bg: alpha("accent", 0.8) }+});+const accentSecondary = createButtonVariant("shade", "accent", {+ hover: { bg: alpha("shade", 0.3) }+});-const dialog: ThemeUIStyleObject = {- variant: "buttons.primary",- color: "primary",- fontWeight: "bold",- bg: "transparent",- ":hover": { bg: "bgSecondary" },- ":focus:not(:active), :focus-within:not(:active), :focus-visible:not(:active)":- {- bg: "hover",- filter: "brightness(90%)"- },- ":disabled": {- opacity: 0.7,- cursor: "not-allowed"- }-};+const error = createButtonVariant("accent-error", "white", {+ hover: { bg: alpha("accent-error", 0.9) }+});-const secondary: ThemeUIStyleObject = {- variant: "buttons.default",- color: "text",- bg: "border"-};--const tertiary: ThemeUIStyleObject = {- variant: "buttons.default",- color: "text",- bg: "transparent",- border: "2px solid",- borderColor: "border",- ":hover": {- borderColor: "primary"- }-};+const errorSecondary: ThemeUIStyleObject = createButtonVariant(+ "background-error",+ "accent-error"+);-const list: ThemeUIStyleObject = {- variant: "buttons.tertiary",- border: "0px solid",- borderBottom: "1px solid",- borderBottomColor: "border",- borderRadius: 0,- textAlign: "left",- py: 2,- px: 0,- cursor: "pointer",- ":hover": {- borderBottomColor: "primary"- }+const dialog: ThemeUIStyleObject = {+ variant: "buttons.secondary",+ color: "accent",+ fontWeight: "bold",+ bg: "transparent"};const anchor: ThemeUIStyleObject = {- variant: "buttons.default",- color: "primary",+ variant: "buttons.primary",+ color: "accent",p: 0,m: 0,px: 0,py: 0,textDecoration: "underline",- ":hover": {- color: "dimPrimary"- }-};--const icon: ThemeUIStyleObject = {- variant: "buttons.default",- color: "text",- borderRadius: "none",- ":hover": {- backgroundColor: "hover",- filter: "brightness(90%)"- }-};--const tool: ThemeUIStyleObject = {- variant: "buttons.default",- color: "text",- backgroundColor: "bgSecondary",- borderRadius: "default",- ":hover": {- backgroundColor: "hover"+ ":hover:not(:disabled)": {+ opacity: 0.8}};const statusItem: ThemeUIStyleObject = {- variant: "buttons.icon",- py: 1,- px: 1+ variant: "buttons.menuitem",+ py: "small",+ px: "small"};const menuItem: ThemeUIStyleObject = {- variant: "buttons.default",- // bg: "transparent",- py: "8px",- px: 3,- borderRadius: 0,- color: "text",- cursor: "pointer",- ":hover:not(:disabled),:focus:not(:disabled)": {- backgroundColor: "hover",- boxShadow: "none"- },- ":active:not(:disabled)": {- backgroundColor: "border"- }+ ...createButtonVariant("transparent", "paragraph"),+ borderRadius: 0};export const buttonVariants = {- default: defaultVariant,primary,secondary,- tertiary,+ accent,+ accentSecondary,error,errorSecondary,- list,anchor,- tool,- icon,dialog,statusitem: statusItem,+ icon: menuItem,menuitem: menuItem};diff --git a/packages/theme/src/theme/variants/input.ts b/packages/theme/src/theme/variants/input.tsindex c6c3aa45b..ab4c7887a 100644--- a/packages/theme/src/theme/variants/input.ts+++ b/packages/theme/src/theme/variants/input.ts@@ -22,21 +22,23 @@ import { ThemeUIStyleObject } from "@theme-ui/core";const defaultVariant: ThemeUIStyleObject = {borderRadius: "default",border: "none",+ width: "auto",+ mx: "2px",outline: "1.5px solid var(--border)",fontFamily: "body",fontWeight: "body",fontSize: "input",- color: "text",+ color: "paragraph",":-webkit-autofill": {- WebkitTextFillColor: "var(--text)",- caretColor: "var(--text)",+ WebkitTextFillColor: "var(--paragraph)",+ caretColor: "var(--paragraph)",fontSize: "inherit"},":focus": {- outline: "2px solid var(--primary)"+ outline: "2px solid var(--accent)"},":hover:not(:focus)": {- outline: "1.5px solid var(--dimPrimary)"+ outline: "1.5px solid var(--accent)"}};diff --git a/packages/theme/src/theme/variants/text.ts b/packages/theme/src/theme/variants/text.tsindex d5371c3ed..0d207cae8 100644--- a/packages/theme/src/theme/variants/text.ts+++ b/packages/theme/src/theme/variants/text.ts@@ -20,12 +20,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { ThemeUIStyleObject } from "@theme-ui/core";const defaultVariant: ThemeUIStyleObject = {- color: "text",+ color: "paragraph",fontFamily: "body"};const heading: ThemeUIStyleObject = {variant: "text.default",+ color: "heading",fontFamily: "heading",fontWeight: "bold",fontSize: "heading"@@ -33,12 +34,14 @@ const heading: ThemeUIStyleObject = {const title: ThemeUIStyleObject = {variant: "text.heading",+ color: "heading",fontSize: "title",fontWeight: "bold"};const subtitle: ThemeUIStyleObject = {variant: "text.heading",+ color: "heading",fontSize: "subtitle",fontWeight: "bold"};@@ -48,13 +51,13 @@ const body: ThemeUIStyleObject = { variant: "text.default", fontSize: "body" };const subBody: ThemeUIStyleObject = {variant: "text.default",fontSize: "subBody",- color: "fontTertiary"+ color: "paragraph-secondary"};const error: ThemeUIStyleObject = {variant: "text.default",fontSize: "subBody",- color: "error"+ color: "paragraph-error"};export const textVariants = {diff --git a/packages/theme/tsconfig.json b/packages/theme/tsconfig.jsonindex 5274060a7..740087b66 100644--- a/packages/theme/tsconfig.json+++ b/packages/theme/tsconfig.json@@ -1,7 +1,8 @@{"extends": "../../tsconfig","compilerOptions": {- "outDir": "./dist"+ "outDir": "./dist",+ "jsx": "react-jsx"},"include": ["src/"]}diff --git a/packages/ui/package-lock.json b/packages/ui/package-lock.jsonnew file mode 100644index 000000000..aff3bfb37--- /dev/null+++ b/packages/ui/package-lock.json@@ -0,0 +1,1059 @@+{+ "name": "@notesnook/ui",+ "version": "1.0.0",+ "lockfileVersion": 3,+ "requires": true,+ "packages": {+ "": {+ "name": "@notesnook/ui",+ "version": "1.0.0",+ "license": "GPL-3.0-or-later",+ "dependencies": {+ "@emotion/react": "11.11.1",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1",+ "@notesnook/theme": "file:../theme",+ "@theme-ui/components": "^0.14.7",+ "@theme-ui/core": "^0.14.7",+ "framer-motion": "^6.5.1",+ "mac-scrollbar": "^0.10.3",+ "react-modal": "^3.15.1"+ },+ "devDependencies": {+ "@types/react": "17.0.2",+ "@types/react-dom": "17.0.2",+ "@types/react-modal": "^3.15.1",+ "react": "17.0.2",+ "react-dom": "17.0.2"+ },+ "peerDependencies": {+ "@emotion/react": "11.11.1",+ "@mdi/js": ">=7.2.96",+ "@mdi/react": ">=1.6.1",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0",+ "react": ">=17.0.0",+ "react-dom": ">=17.0.0"+ }+ },+ "../theme": {+ "name": "@notesnook/theme",+ "version": "1.1.0",+ "license": "GPL-3.0-or-later",+ "dependencies": {+ "@emotion/react": "11.11.1",+ "@theme-ui/color": "^0.16.0",+ "@theme-ui/components": "0.14.7",+ "@theme-ui/core": "0.14.7",+ "tinycolor2": "^1.4.2",+ "zustand": "^4.3.8"+ },+ "devDependencies": {+ "@trpc/server": "^10.31.0",+ "@types/react": "17.0.2",+ "@types/tinycolor2": "^1.4.3",+ "isomorphic-fetch": "^3.0.0",+ "ts-json-schema-generator": "^1.2.0"+ },+ "peerDependencies": {+ "react": "17.0.2"+ }+ },+ "node_modules/@babel/code-frame": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz",+ "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==",+ "dependencies": {+ "@babel/highlight": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-module-imports": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz",+ "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==",+ "dependencies": {+ "@babel/types": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-string-parser": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",+ "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-validator-identifier": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz",+ "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/highlight": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz",+ "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==",+ "dependencies": {+ "@babel/helper-validator-identifier": "^7.22.5",+ "chalk": "^2.0.0",+ "js-tokens": "^4.0.0"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/runtime": {+ "version": "7.22.6",+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz",+ "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==",+ "dependencies": {+ "regenerator-runtime": "^0.13.11"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/types": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz",+ "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==",+ "dependencies": {+ "@babel/helper-string-parser": "^7.22.5",+ "@babel/helper-validator-identifier": "^7.22.5",+ "to-fast-properties": "^2.0.0"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@emotion/babel-plugin": {+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz",+ "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==",+ "dependencies": {+ "@babel/helper-module-imports": "^7.16.7",+ "@babel/runtime": "^7.18.3",+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/serialize": "^1.1.2",+ "babel-plugin-macros": "^3.1.0",+ "convert-source-map": "^1.5.0",+ "escape-string-regexp": "^4.0.0",+ "find-root": "^1.1.0",+ "source-map": "^0.5.7",+ "stylis": "4.2.0"+ }+ },+ "node_modules/@emotion/cache": {+ "version": "11.11.0",+ "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz",+ "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==",+ "dependencies": {+ "@emotion/memoize": "^0.8.1",+ "@emotion/sheet": "^1.2.2",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1",+ "stylis": "4.2.0"+ }+ },+ "node_modules/@emotion/hash": {+ "version": "0.9.1",+ "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz",+ "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ=="+ },+ "node_modules/@emotion/is-prop-valid": {+ "version": "0.8.8",+ "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",+ "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==",+ "dependencies": {+ "@emotion/memoize": "0.7.4"+ }+ },+ "node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize": {+ "version": "0.7.4",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",+ "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw=="+ },+ "node_modules/@emotion/memoize": {+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="+ },+ "node_modules/@emotion/react": {+ "version": "11.11.1",+ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz",+ "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==",+ "dependencies": {+ "@babel/runtime": "^7.18.3",+ "@emotion/babel-plugin": "^11.11.0",+ "@emotion/cache": "^11.11.0",+ "@emotion/serialize": "^1.1.2",+ "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1",+ "@emotion/utils": "^1.2.1",+ "@emotion/weak-memoize": "^0.3.1",+ "hoist-non-react-statics": "^3.3.1"+ },+ "peerDependencies": {+ "react": ">=16.8.0"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@emotion/serialize": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz",+ "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==",+ "dependencies": {+ "@emotion/hash": "^0.9.1",+ "@emotion/memoize": "^0.8.1",+ "@emotion/unitless": "^0.8.1",+ "@emotion/utils": "^1.2.1",+ "csstype": "^3.0.2"+ }+ },+ "node_modules/@emotion/sheet": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz",+ "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA=="+ },+ "node_modules/@emotion/unitless": {+ "version": "0.8.1",+ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz",+ "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ=="+ },+ "node_modules/@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==",+ "peerDependencies": {+ "react": ">=16.8.0"+ }+ },+ "node_modules/@emotion/utils": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz",+ "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg=="+ },+ "node_modules/@emotion/weak-memoize": {+ "version": "0.3.1",+ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz",+ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww=="+ },+ "node_modules/@mdi/js": {+ "version": "7.2.96",+ "resolved": "https://registry.npmjs.org/@mdi/js/-/js-7.2.96.tgz",+ "integrity": "sha512-paR9M9ZT7rKbh2boksNUynuSZMHhqRYnEZOm/KrZTjQ4/FzyhjLHuvw/8XYzP+E7fS4+/Ms/82EN1pl/OFsiIA=="+ },+ "node_modules/@mdi/react": {+ "version": "1.6.1",+ "resolved": "https://registry.npmjs.org/@mdi/react/-/react-1.6.1.tgz",+ "integrity": "sha512-4qZeDcluDFGFTWkHs86VOlHkm6gnKaMql13/gpIcUQ8kzxHgpj31NuCkD8abECVfbULJ3shc7Yt4HJ6Wu6SN4w==",+ "dependencies": {+ "prop-types": "^15.7.2"+ }+ },+ "node_modules/@motionone/animation": {+ "version": "10.15.1",+ "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.15.1.tgz",+ "integrity": "sha512-mZcJxLjHor+bhcPuIFErMDNyrdb2vJur8lSfMCsuCB4UyV8ILZLvK+t+pg56erv8ud9xQGK/1OGPt10agPrCyQ==",+ "dependencies": {+ "@motionone/easing": "^10.15.1",+ "@motionone/types": "^10.15.1",+ "@motionone/utils": "^10.15.1",+ "tslib": "^2.3.1"+ }+ },+ "node_modules/@motionone/dom": {+ "version": "10.12.0",+ "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.12.0.tgz",+ "integrity": "sha512-UdPTtLMAktHiqV0atOczNYyDd/d8Cf5fFsd1tua03PqTwwCe/6lwhLSQ8a7TbnQ5SN0gm44N1slBfj+ORIhrqw==",+ "dependencies": {+ "@motionone/animation": "^10.12.0",+ "@motionone/generators": "^10.12.0",+ "@motionone/types": "^10.12.0",+ "@motionone/utils": "^10.12.0",+ "hey-listen": "^1.0.8",+ "tslib": "^2.3.1"+ }+ },+ "node_modules/@motionone/easing": {+ "version": "10.15.1",+ "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.15.1.tgz",+ "integrity": "sha512-6hIHBSV+ZVehf9dcKZLT7p5PEKHGhDwky2k8RKkmOvUoYP3S+dXsKupyZpqx5apjd9f+php4vXk4LuS+ADsrWw==",+ "dependencies": {+ "@motionone/utils": "^10.15.1",+ "tslib": "^2.3.1"+ }+ },+ "node_modules/@motionone/generators": {+ "version": "10.15.1",+ "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.15.1.tgz",+ "integrity": "sha512-67HLsvHJbw6cIbLA/o+gsm7h+6D4Sn7AUrB/GPxvujse1cGZ38F5H7DzoH7PhX+sjvtDnt2IhFYF2Zp1QTMKWQ==",+ "dependencies": {+ "@motionone/types": "^10.15.1",+ "@motionone/utils": "^10.15.1",+ "tslib": "^2.3.1"+ }+ },+ "node_modules/@motionone/types": {+ "version": "10.15.1",+ "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.15.1.tgz",+ "integrity": "sha512-iIUd/EgUsRZGrvW0jqdst8st7zKTzS9EsKkP+6c6n4MPZoQHwiHuVtTQLD6Kp0bsBLhNzKIBlHXponn/SDT4hA=="+ },+ "node_modules/@motionone/utils": {+ "version": "10.15.1",+ "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.15.1.tgz",+ "integrity": "sha512-p0YncgU+iklvYr/Dq4NobTRdAPv9PveRDUXabPEeOjBLSO/1FNB2phNTZxOxpi1/GZwYpAoECEa0Wam+nsmhSw==",+ "dependencies": {+ "@motionone/types": "^10.15.1",+ "hey-listen": "^1.0.8",+ "tslib": "^2.3.1"+ }+ },+ "node_modules/@notesnook/theme": {+ "resolved": "../theme",+ "link": true+ },+ "node_modules/@styled-system/background": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/background/-/background-5.1.2.tgz",+ "integrity": "sha512-jtwH2C/U6ssuGSvwTN3ri/IyjdHb8W9X/g8Y0JLcrH02G+BW3OS8kZdHphF1/YyRklnrKrBT2ngwGUK6aqqV3A==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/border": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/@styled-system/border/-/border-5.1.5.tgz",+ "integrity": "sha512-JvddhNrnhGigtzWRCVuAHepniyVi6hBlimxWDVAdcTuk7aRn9BYJUwfHslURtwYFsF5FoEs8Zmr1oZq2M1AP0A==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/color": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/color/-/color-5.1.2.tgz",+ "integrity": "sha512-1kCkeKDZkt4GYkuFNKc7vJQMcOmTl3bJY3YBUs7fCNM6mMYJeT1pViQ2LwBSBJytj3AB0o4IdLBoepgSgGl5MA==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/core": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/core/-/core-5.1.2.tgz",+ "integrity": "sha512-XclBDdNIy7OPOsN4HBsawG2eiWfCcuFt6gxKn1x4QfMIgeO6TOlA2pZZ5GWZtIhCUqEPTgIBta6JXsGyCkLBYw==",+ "dependencies": {+ "object-assign": "^4.1.1"+ }+ },+ "node_modules/@styled-system/css": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/@styled-system/css/-/css-5.1.5.tgz",+ "integrity": "sha512-XkORZdS5kypzcBotAMPBoeckDs9aSZVkvrAlq5K3xP8IMAUek+x2O4NtwoSgkYkWWzVBu6DGdFZLR790QWGG+A=="+ },+ "node_modules/@styled-system/flexbox": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/flexbox/-/flexbox-5.1.2.tgz",+ "integrity": "sha512-6hHV52+eUk654Y1J2v77B8iLeBNtc+SA3R4necsu2VVinSD7+XY5PCCEzBFaWs42dtOEDIa2lMrgL0YBC01mDQ==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/grid": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/grid/-/grid-5.1.2.tgz",+ "integrity": "sha512-K3YiV1KyHHzgdNuNlaw8oW2ktMuGga99o1e/NAfTEi5Zsa7JXxzwEnVSDSBdJC+z6R8WYTCYRQC6bkVFcvdTeg==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/layout": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/layout/-/layout-5.1.2.tgz",+ "integrity": "sha512-wUhkMBqSeacPFhoE9S6UF3fsMEKFv91gF4AdDWp0Aym1yeMPpqz9l9qS/6vjSsDPF7zOb5cOKC3tcKKOMuDCPw==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/position": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/position/-/position-5.1.2.tgz",+ "integrity": "sha512-60IZfMXEOOZe3l1mCu6sj/2NAyUmES2kR9Kzp7s2D3P4qKsZWxD1Se1+wJvevb+1TP+ZMkGPEYYXRyU8M1aF5A==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/shadow": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/shadow/-/shadow-5.1.2.tgz",+ "integrity": "sha512-wqniqYb7XuZM7K7C0d1Euxc4eGtqEe/lvM0WjuAFsQVImiq6KGT7s7is+0bNI8O4Dwg27jyu4Lfqo/oIQXNzAg==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/should-forward-prop": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/@styled-system/should-forward-prop/-/should-forward-prop-5.1.5.tgz",+ "integrity": "sha512-+rPRomgCGYnUIaFabDoOgpSDc4UUJ1KsmlnzcEp0tu5lFrBQKgZclSo18Z1URhaZm7a6agGtS5Xif7tuC2s52Q==",+ "dependencies": {+ "@emotion/is-prop-valid": "^0.8.1",+ "@emotion/memoize": "^0.7.1",+ "styled-system": "^5.1.5"+ }+ },+ "node_modules/@styled-system/should-forward-prop/node_modules/@emotion/memoize": {+ "version": "0.7.5",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz",+ "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ=="+ },+ "node_modules/@styled-system/space": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/space/-/space-5.1.2.tgz",+ "integrity": "sha512-+zzYpR8uvfhcAbaPXhH8QgDAV//flxqxSjHiS9cDFQQUSznXMQmxJegbhcdEF7/eNnJgHeIXv1jmny78kipgBA==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/typography": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/@styled-system/typography/-/typography-5.1.2.tgz",+ "integrity": "sha512-BxbVUnN8N7hJ4aaPOd7wEsudeT7CxarR+2hns8XCX1zp0DFfbWw4xYa/olA0oQaqx7F1hzDg+eRaGzAJbF+jOg==",+ "dependencies": {+ "@styled-system/core": "^5.1.2"+ }+ },+ "node_modules/@styled-system/variant": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/@styled-system/variant/-/variant-5.1.5.tgz",+ "integrity": "sha512-Yn8hXAFoWIro8+Q5J8YJd/mP85Teiut3fsGVR9CAxwgNfIAiqlYxsk5iHU7VHJks/0KjL4ATSjmbtCDC/4l1qw==",+ "dependencies": {+ "@styled-system/core": "^5.1.2",+ "@styled-system/css": "^5.1.5"+ }+ },+ "node_modules/@theme-ui/components": {+ "version": "0.14.7",+ "resolved": "https://registry.npmjs.org/@theme-ui/components/-/components-0.14.7.tgz",+ "integrity": "sha512-iIzqBvRL8GNVkzuZinxInYNFW/38pvqqthuCgLsnOC0/A4Q4v13mn/fxlZa6pJjwouswsRLOrkd63bS7Svzkfw==",+ "dependencies": {+ "@styled-system/color": "^5.1.2",+ "@styled-system/should-forward-prop": "^5.1.2",+ "@styled-system/space": "^5.1.2",+ "@theme-ui/css": "0.14.7",+ "@types/styled-system": "^5.1.13"+ },+ "peerDependencies": {+ "@emotion/react": "^11",+ "react": ">16"+ }+ },+ "node_modules/@theme-ui/core": {+ "version": "0.14.7",+ "resolved": "https://registry.npmjs.org/@theme-ui/core/-/core-0.14.7.tgz",+ "integrity": "sha512-u60cKOZYsGDG9sSoM4jYj743OpNXXU27f7vXGwrO/B1t/1sv1MAQA0R8HtVwoi9DyOIcOmWfMWYTiMg+4vV1MA==",+ "dependencies": {+ "@theme-ui/css": "0.14.7",+ "@theme-ui/parse-props": "0.14.7",+ "deepmerge": "^4.2.2"+ },+ "peerDependencies": {+ "@emotion/react": "^11",+ "react": ">16"+ }+ },+ "node_modules/@theme-ui/css": {+ "version": "0.14.7",+ "resolved": "https://registry.npmjs.org/@theme-ui/css/-/css-0.14.7.tgz",+ "integrity": "sha512-DbGw0T4MrTjiRs6lnyYgSD2TV/LvFErzDDpm0ICPL2KqDwqgHX4mFpDafj8/DkyCO9wx2KEiUuE+0NtOlR3i4w==",+ "dependencies": {+ "csstype": "^3.0.10"+ },+ "peerDependencies": {+ "@emotion/react": "^11"+ }+ },+ "node_modules/@theme-ui/parse-props": {+ "version": "0.14.7",+ "resolved": "https://registry.npmjs.org/@theme-ui/parse-props/-/parse-props-0.14.7.tgz",+ "integrity": "sha512-qF10mAYs3wcIkSU5ZSbmHUngwTkPS87D23qg1ArbeO+m+/e4uqOy0+6W0Lt/4JTP7lnWWsCYuScK3F3hOp2q0w==",+ "dependencies": {+ "@theme-ui/css": "0.14.7"+ },+ "peerDependencies": {+ "@emotion/react": "^11",+ "react": ">16"+ }+ },+ "node_modules/@types/parse-json": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",+ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="+ },+ "node_modules/@types/prop-types": {+ "version": "15.7.5",+ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",+ "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==",+ "dev": true+ },+ "node_modules/@types/react": {+ "version": "17.0.2",+ "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.2.tgz",+ "integrity": "sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA==",+ "dev": true,+ "dependencies": {+ "@types/prop-types": "*",+ "csstype": "^3.0.2"+ }+ },+ "node_modules/@types/react-dom": {+ "version": "17.0.2",+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.2.tgz",+ "integrity": "sha512-Icd9KEgdnFfJs39KyRyr0jQ7EKhq8U6CcHRMGAS45fp5qgUvxL3ujUCfWFttUK2UErqZNj97t9gsVPNAqcwoCg==",+ "dev": true,+ "dependencies": {+ "@types/react": "*"+ }+ },+ "node_modules/@types/react-modal": {+ "version": "3.16.0",+ "resolved": "https://registry.npmjs.org/@types/react-modal/-/react-modal-3.16.0.tgz",+ "integrity": "sha512-iphdqXAyUfByLbxJn5j6d+yh93dbMgshqGP0IuBeaKbZXx0aO+OXsvEkt6QctRdxjeM9/bR+Gp3h9F9djVWTQQ==",+ "dev": true,+ "dependencies": {+ "@types/react": "*"+ }+ },+ "node_modules/@types/styled-system": {+ "version": "5.1.16",+ "resolved": "https://registry.npmjs.org/@types/styled-system/-/styled-system-5.1.16.tgz",+ "integrity": "sha512-+dyGs2n2o6QStsexh87NeaRmXYnKOnEe7iOEkcYOwKwI5a1gFL0+Mt/hZKi+4KD1qDMkLkGb0lpDrffb/vSkDQ==",+ "dependencies": {+ "csstype": "^3.0.2"+ }+ },+ "node_modules/ansi-styles": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",+ "dependencies": {+ "color-convert": "^1.9.0"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/babel-plugin-macros": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz",+ "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==",+ "dependencies": {+ "@babel/runtime": "^7.12.5",+ "cosmiconfig": "^7.0.0",+ "resolve": "^1.19.0"+ },+ "engines": {+ "node": ">=10",+ "npm": ">=6"+ }+ },+ "node_modules/callsites": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/chalk": {+ "version": "2.4.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",+ "dependencies": {+ "ansi-styles": "^3.2.1",+ "escape-string-regexp": "^1.0.5",+ "supports-color": "^5.3.0"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/chalk/node_modules/escape-string-regexp": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",+ "engines": {+ "node": ">=0.8.0"+ }+ },+ "node_modules/color-convert": {+ "version": "1.9.3",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",+ "dependencies": {+ "color-name": "1.1.3"+ }+ },+ "node_modules/color-name": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="+ },+ "node_modules/convert-source-map": {+ "version": "1.9.0",+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",+ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="+ },+ "node_modules/cosmiconfig": {+ "version": "7.1.0",+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",+ "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==",+ "dependencies": {+ "@types/parse-json": "^4.0.0",+ "import-fresh": "^3.2.1",+ "parse-json": "^5.0.0",+ "path-type": "^4.0.0",+ "yaml": "^1.10.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/csstype": {+ "version": "3.1.2",+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",+ "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="+ },+ "node_modules/deepmerge": {+ "version": "4.3.1",+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/error-ex": {+ "version": "1.3.2",+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",+ "dependencies": {+ "is-arrayish": "^0.2.1"+ }+ },+ "node_modules/escape-string-regexp": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/exenv": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz",+ "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw=="+ },+ "node_modules/find-root": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",+ "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng=="+ },+ "node_modules/framer-motion": {+ "version": "6.5.1",+ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz",+ "integrity": "sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw==",+ "dependencies": {+ "@motionone/dom": "10.12.0",+ "framesync": "6.0.1",+ "hey-listen": "^1.0.8",+ "popmotion": "11.0.3",+ "style-value-types": "5.0.0",+ "tslib": "^2.1.0"+ },+ "optionalDependencies": {+ "@emotion/is-prop-valid": "^0.8.2"+ },+ "peerDependencies": {+ "react": ">=16.8 || ^17.0.0 || ^18.0.0",+ "react-dom": ">=16.8 || ^17.0.0 || ^18.0.0"+ }+ },+ "node_modules/framesync": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.0.1.tgz",+ "integrity": "sha512-fUY88kXvGiIItgNC7wcTOl0SNRCVXMKSWW2Yzfmn7EKNc+MpCzcz9DhdHcdjbrtN3c6R4H5dTY2jiCpPdysEjA==",+ "dependencies": {+ "tslib": "^2.1.0"+ }+ },+ "node_modules/function-bind": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="+ },+ "node_modules/has": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",+ "dependencies": {+ "function-bind": "^1.1.1"+ },+ "engines": {+ "node": ">= 0.4.0"+ }+ },+ "node_modules/has-flag": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/hey-listen": {+ "version": "1.0.8",+ "resolved": "https://registry.npmjs.org/hey-listen/-/hey-listen-1.0.8.tgz",+ "integrity": "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q=="+ },+ "node_modules/hoist-non-react-statics": {+ "version": "3.3.2",+ "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",+ "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",+ "dependencies": {+ "react-is": "^16.7.0"+ }+ },+ "node_modules/import-fresh": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",+ "dependencies": {+ "parent-module": "^1.0.0",+ "resolve-from": "^4.0.0"+ },+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/is-arrayish": {+ "version": "0.2.1",+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="+ },+ "node_modules/is-core-module": {+ "version": "2.12.1",+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz",+ "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==",+ "dependencies": {+ "has": "^1.0.3"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/js-tokens": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="+ },+ "node_modules/json-parse-even-better-errors": {+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="+ },+ "node_modules/lines-and-columns": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="+ },+ "node_modules/loose-envify": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",+ "dependencies": {+ "js-tokens": "^3.0.0 || ^4.0.0"+ },+ "bin": {+ "loose-envify": "cli.js"+ }+ },+ "node_modules/mac-scrollbar": {+ "version": "0.10.7",+ "resolved": "https://registry.npmjs.org/mac-scrollbar/-/mac-scrollbar-0.10.7.tgz",+ "integrity": "sha512-3AL/sxi+W2gwo83Q6Uy/0a10tuaOzqVd+edhq+M3Y7ml5TaZDoLOO56KRTMjFPIZPh/qoB7+o1P3lEXnxLRbEQ=="+ },+ "node_modules/object-assign": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/parent-module": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",+ "dependencies": {+ "callsites": "^3.0.0"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/parse-json": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",+ "dependencies": {+ "@babel/code-frame": "^7.0.0",+ "error-ex": "^1.3.1",+ "json-parse-even-better-errors": "^2.3.0",+ "lines-and-columns": "^1.1.6"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/path-parse": {+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="+ },+ "node_modules/path-type": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/popmotion": {+ "version": "11.0.3",+ "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-11.0.3.tgz",+ "integrity": "sha512-Y55FLdj3UxkR7Vl3s7Qr4e9m0onSnP8W7d/xQLsoJM40vs6UKHFdygs6SWryasTZYqugMjm3BepCF4CWXDiHgA==",+ "dependencies": {+ "framesync": "6.0.1",+ "hey-listen": "^1.0.8",+ "style-value-types": "5.0.0",+ "tslib": "^2.1.0"+ }+ },+ "node_modules/prop-types": {+ "version": "15.8.1",+ "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",+ "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",+ "dependencies": {+ "loose-envify": "^1.4.0",+ "object-assign": "^4.1.1",+ "react-is": "^16.13.1"+ }+ },+ "node_modules/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,+ "dependencies": {+ "loose-envify": "^1.1.0",+ "object-assign": "^4.1.1"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/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,+ "dependencies": {+ "loose-envify": "^1.1.0",+ "object-assign": "^4.1.1",+ "scheduler": "^0.20.2"+ },+ "peerDependencies": {+ "react": "17.0.2"+ }+ },+ "node_modules/react-is": {+ "version": "16.13.1",+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="+ },+ "node_modules/react-lifecycles-compat": {+ "version": "3.0.4",+ "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",+ "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="+ },+ "node_modules/react-modal": {+ "version": "3.16.1",+ "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.1.tgz",+ "integrity": "sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==",+ "dependencies": {+ "exenv": "^1.2.0",+ "prop-types": "^15.7.2",+ "react-lifecycles-compat": "^3.0.0",+ "warning": "^4.0.3"+ },+ "engines": {+ "node": ">=8"+ },+ "peerDependencies": {+ "react": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18",+ "react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18"+ }+ },+ "node_modules/regenerator-runtime": {+ "version": "0.13.11",+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",+ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="+ },+ "node_modules/resolve": {+ "version": "1.22.2",+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",+ "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==",+ "dependencies": {+ "is-core-module": "^2.11.0",+ "path-parse": "^1.0.7",+ "supports-preserve-symlinks-flag": "^1.0.0"+ },+ "bin": {+ "resolve": "bin/resolve"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/resolve-from": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/scheduler": {+ "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"+ }+ },+ "node_modules/source-map": {+ "version": "0.5.7",+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",+ "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/style-value-types": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz",+ "integrity": "sha512-08yq36Ikn4kx4YU6RD7jWEv27v4V+PUsOGa4n/as8Et3CuODMJQ00ENeAVXAeydX4Z2j1XHZF1K2sX4mGl18fA==",+ "dependencies": {+ "hey-listen": "^1.0.8",+ "tslib": "^2.1.0"+ }+ },+ "node_modules/styled-system": {+ "version": "5.1.5",+ "resolved": "https://registry.npmjs.org/styled-system/-/styled-system-5.1.5.tgz",+ "integrity": "sha512-7VoD0o2R3RKzOzPK0jYrVnS8iJdfkKsQJNiLRDjikOpQVqQHns/DXWaPZOH4tIKkhAT7I6wIsy9FWTWh2X3q+A==",+ "dependencies": {+ "@styled-system/background": "^5.1.2",+ "@styled-system/border": "^5.1.5",+ "@styled-system/color": "^5.1.2",+ "@styled-system/core": "^5.1.2",+ "@styled-system/flexbox": "^5.1.2",+ "@styled-system/grid": "^5.1.2",+ "@styled-system/layout": "^5.1.2",+ "@styled-system/position": "^5.1.2",+ "@styled-system/shadow": "^5.1.2",+ "@styled-system/space": "^5.1.2",+ "@styled-system/typography": "^5.1.2",+ "@styled-system/variant": "^5.1.5",+ "object-assign": "^4.1.1"+ }+ },+ "node_modules/stylis": {+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",+ "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw=="+ },+ "node_modules/supports-color": {+ "version": "5.5.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",+ "dependencies": {+ "has-flag": "^3.0.0"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/supports-preserve-symlinks-flag": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/to-fast-properties": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",+ "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/tslib": {+ "version": "2.6.0",+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",+ "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA=="+ },+ "node_modules/warning": {+ "version": "4.0.3",+ "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",+ "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",+ "dependencies": {+ "loose-envify": "^1.0.0"+ }+ },+ "node_modules/yaml": {+ "version": "1.10.2",+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",+ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",+ "engines": {+ "node": ">= 6"+ }+ }+ }+}diff --git a/packages/ui/package.json b/packages/ui/package.jsonnew file mode 100644index 000000000..388b76c9c--- /dev/null+++ b/packages/ui/package.json@@ -0,0 +1,42 @@+{+ "name": "@notesnook/ui",+ "version": "1.0.0",+ "main": "./dist/index.js",+ "license": "GPL-3.0-or-later",+ "repository": {+ "type": "git",+ "url": "git://github.com/streetwriters/notesnook.git"+ },+ "dependencies": {+ "mac-scrollbar": "^0.10.3",+ "@mdi/js": "^7.2.96",+ "@mdi/react": "^1.6.1",+ "@notesnook/theme": "file:../theme",+ "@theme-ui/components": "^0.14.7",+ "@theme-ui/core": "^0.14.7",+ "framer-motion": "^6.5.1",+ "react-modal": "^3.15.1",+ "@emotion/react": "11.11.1"+ },+ "devDependencies": {+ "@types/react": "17.0.2",+ "@types/react-dom": "17.0.2",+ "@types/react-modal": "^3.15.1",+ "react": "17.0.2",+ "react-dom": "17.0.2"+ },+ "peerDependencies": {+ "@mdi/js": ">=7.2.96",+ "@mdi/react": ">=1.6.1",+ "@emotion/react": "11.11.1",+ "@theme-ui/components": ">=0.14.0",+ "@theme-ui/core": ">=0.14.0",+ "react": ">=17.0.0",+ "react-dom": ">=17.0.0"+ },+ "scripts": {+ "build": "tsc",+ "prepublishOnly": "npm run build",+ "watch": "tsc --watch"+ }+}diff --git a/packages/editor/src/toolbar/components/icon.tsx b/packages/ui/src/components/icon/index.tsxsimilarity index 80%rename from packages/editor/src/toolbar/components/icon.tsxrename to packages/ui/src/components/icon/index.tsxindex 9306d2b77..12daca8c4 100644--- a/packages/editor/src/toolbar/components/icon.tsx+++ b/packages/ui/src/components/icon/index.tsx@@ -19,23 +19,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import MDIIcon from "@mdi/react";import { Theme } from "@notesnook/theme";-import { SchemeColors } from "@notesnook/theme/dist/theme/colorscheme";+import { isThemeColor, SchemeColors } from "@notesnook/theme";import { Flex, FlexProps } from "@theme-ui/components";import { useTheme } from "@emotion/react";-function isSchemeColor(- color: string,- theme: Theme-): color is keyof SchemeColors {- if (!theme || !theme.colors) return false;- return color in theme.colors;-}--type IconProps = {+type MDIIconWrapper = {title?: string;path: string;size?: keyof Theme["iconSizes"] | number | string;- color?: keyof SchemeColors | string;+ color?: SchemeColors;stroke?: string;rotate?: boolean;};@@ -46,12 +38,11 @@ function MDIIconWrapper({color = "icon",stroke,rotate-}: IconProps) {+}: MDIIconWrapper) {const theme = useTheme() as Theme;-- const themedColor: string =- theme && isSchemeColor(color, theme)- ? (theme.colors[color] as string)+ const themedColor =+ theme?.colors && isThemeColor(color, theme.colors)+ ? theme.colors[color]: color;return (@@ -76,9 +67,9 @@ function MDIIconWrapper({);}-export type NNIconProps = FlexProps & IconProps;+export type IconProps = FlexProps & MDIIconWrapper;-export function Icon(props: NNIconProps) {+export function Icon(props: IconProps) {const { sx, title, color, size, stroke, rotate, path, ...restProps } = props;return (diff --git a/packages/ui/src/components/index.ts b/packages/ui/src/components/index.tsnew file mode 100644index 000000000..5dc78e1e9--- /dev/null+++ b/packages/ui/src/components/index.ts@@ -0,0 +1,23 @@+/*+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 * from "./icon";+export * from "./menu";+export * from "./popup-presenter";+export * from "./scroll-container";diff --git a/packages/editor/src/components/menu/index.tsx b/packages/ui/src/components/menu/index.tsxsimilarity index 74%rename from packages/editor/src/components/menu/index.tsxrename to packages/ui/src/components/menu/index.tsxindex aec0b036f..b7af9cdb0 100644--- a/packages/editor/src/components/menu/index.tsx+++ b/packages/ui/src/components/menu/index.tsx@@ -20,17 +20,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { useCallback, useRef, useEffect, PropsWithChildren } from "react";import { Box, Flex, FlexProps, Text } from "@theme-ui/components";import { getPosition } from "../../utils/position";-import {- MenuButton as MenuButtonType,- MenuItem as MenuItemType-} from "./types";+import { MenuButtonItem, MenuItem } from "./types";import { useFocus } from "./use-focus";import { MenuSeparator } from "./menu-separator";import { MenuButton } from "./menu-button";import { PopupPresenter, PopupPresenterProps } from "../popup-presenter";+import { ScrollContainer } from "../scroll-container";type MenuProps = MenuContainerProps & {- items?: MenuItemType[];+ items?: MenuItem[];onClose: () => void;};@@ -38,7 +36,7 @@ export function Menu(props: MenuProps) {const { items = [], onClose, ...containerProps } = props;const hoverTimeout = useRef<number>();const onAction = useCallback(- (e?: Event, item?: MenuButtonType) => {+ (e?: Event, item?: MenuButtonItem) => {e?.stopPropagation();if (item?.onClick) {@@ -65,7 +63,7 @@ export function Menu(props: MenuProps) {const item = items[focusIndex];if (!item || !subMenuRef.current) return;- const menuItemElement = document.getElementById(item.key);+ const menuItemElement = document.getElementById(`${item.key}-menu-item`);if (!menuItemElement) return;if (!isSubmenuOpen) {@@ -110,25 +108,30 @@ export function Menu(props: MenuProps) {setFocusIndex(-1);return;}+ if (!isSubmenuOpen) setFocusIndex(index);- if (hoverTimeout.current)- clearTimeout(hoverTimeout.current);- setFocusIndex(index);- setIsSubmenuOpen(false);- if (item.menu) {- hoverTimeout.current = setTimeout(() => {+ clearTimeout(hoverTimeout.current);+ hoverTimeout.current = setTimeout(() => {+ if (isSubmenuOpen) {+ setFocusIndex(index);+ } else {setIsSubmenuOpen(true);- }, 500) as unknown as number;- }+ }++ if (!item.menu) {+ setIsSubmenuOpen(false);+ }+ }, 200) as unknown as number;}}onMouseLeave={() => {- if (hoverTimeout.current)- clearTimeout(hoverTimeout.current);+ clearTimeout(hoverTimeout.current);}}/>);case "popup":- return <item.component onClick={(e) => onAction(e)} />;+ return (+ <item.component key={item.key} onClick={(e) => onAction(e)} />+ );}})}</MenuContainer>@@ -169,7 +172,7 @@ function MenuContainer(props: PropsWithChildren<MenuContainerProps>) {margin: 0,borderRadius: "default",boxShadow: "menu",- border: "1px solid var(--border)",+ border: "1px solid var(--separator)",minWidth: 220,...sx}}@@ -180,7 +183,7 @@ function MenuContainer(props: PropsWithChildren<MenuContainerProps>) {sx={{fontFamily: "body",fontSize: "subtitle",- color: "primary",+ color: "accent",py: "8px",px: 3,borderBottom: "1px solid",@@ -191,18 +194,48 @@ function MenuContainer(props: PropsWithChildren<MenuContainerProps>) {{title}</Text>)}- {children}+ <ScrollContainer>{children}</ScrollContainer>{/* <FlexScrollContainer>{children}</FlexScrollContainer> */}</Box>);}-export type MenuPresenterProps = PopupPresenterProps & MenuProps;+export type MenuPresenterProps = Omit<+ PopupPresenterProps,+ "movable" | "scope"+> &+ MenuProps;export function MenuPresenter(props: PropsWithChildren<MenuPresenterProps>) {- const { items = [], ...restProps } = props;+ const {+ items = [],+ position,+ isOpen,+ onClose,+ blocking,+ focusOnRender,+ isMobile,+ ...restProps+ } = props;+return (- <PopupPresenter {...restProps}>- {props.children ? props.children : <Menu items={items} {...restProps} />}+ <PopupPresenter+ scope="contextMenu"+ position={position}+ isOpen={isOpen}+ onClose={onClose}+ blocking={blocking}+ focusOnRender={focusOnRender}+ isMobile={isMobile}+ >+ {props.children ? (+ props.children+ ) : (+ <Menu items={items} onClose={onClose} {...restProps} />+ )}</PopupPresenter>);}++export * from "./types";+export * from "./menu-button";+export * from "./menu-separator";diff --git a/packages/editor/src/components/menu/menu-button.tsx b/packages/ui/src/components/menu/menu-button.tsxsimilarity index 70%rename from packages/editor/src/components/menu/menu-button.tsxrename to packages/ui/src/components/menu/menu-button.tsxindex b77b1eff4..b77006e7b 100644--- a/packages/editor/src/components/menu/menu-button.tsx+++ b/packages/ui/src/components/menu/menu-button.tsx@@ -18,15 +18,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { useRef } from "react";-import { Flex, Text } from "@theme-ui/components";-import { Icon } from "../../toolbar/components/icon";-import { Icons } from "../../toolbar/icons";-import { useToolbarLocation } from "../../toolbar/stores/toolbar-store";-import { Button } from "../button";-import { MenuButton, MenuItemComponentProps } from "./types";+import { Flex, Text, Button } from "@theme-ui/components";+import { Icon } from "../icon";+import { MenuButtonItem, MenuItemComponentProps } from "./types";+import { mdiCheck, mdiChevronRight } from "@mdi/js";type MenuButtonProps = {- item: MenuButton;+ item: MenuButtonItem;isFocused?: boolean;onMouseEnter?: () => void;onMouseLeave?: () => void;@@ -46,8 +44,6 @@ export function MenuButton(props: MenuButtonProps) {styles} = item;const itemRef = useRef<HTMLButtonElement>(null);- const toolbarLocation = useToolbarLocation();- const isBottom = toolbarLocation === "bottom";return (<Flex@@ -57,7 +53,7 @@ export function MenuButton(props: MenuButtonProps) {onMouseLeave={onMouseLeave}><Button- id={key}+ id={`${key}-menu-item`}data-test-id={`MenuButton-${key}`}key={key}ref={itemRef}@@ -67,44 +63,44 @@ export function MenuButton(props: MenuButtonProps) {disabled={isDisabled}onClick={(e) => onClick?.(e.nativeEvent)}sx={{- ...styles,- bg: isFocused && !isBottom ? "hover" : "transparent",+ bg: isFocused && "background-selected",display: "flex",alignItems: "center",- justifyContent: "space-between",- ":hover": {- bg: isBottom ? "transparent" : "hover"- }+ justifyContent: "space-between"}}><Flex sx={{ fontSize: "inherit", fontFamily: "inherit" }}>{icon && (<Icon- path={Icons[icon]}- color={"text"}+ path={icon}size={"medium"}- sx={{ mr: 2 }}+ sx={{ mr: 2, ...styles?.icon }}+ color={styles?.icon?.color as string}/>)}<Textas="span"variant={"body"}- sx={{ fontSize: "inherit", fontFamily: "inherit" }}+ sx={{+ fontSize: "inherit",+ fontFamily: "inherit",+ ...styles?.title+ }}>{title}</Text></Flex>{isChecked || menu || modifier ? (<Flex sx={{ ml: 4 }}>- {isChecked && <Icon path={Icons.check} size={"small"} />}- {menu && <Icon path={Icons.chevronRight} size={"small"} />}+ {isChecked && <Icon path={mdiCheck} size={"small"} />}+ {menu && <Icon path={mdiChevronRight} size={"small"} />}{modifier && (<Textas="span"sx={{fontFamily: "body",fontSize: "menu",- color: "fontTertiary"+ color: "paragraph"}}>{modifier}diff --git a/packages/editor/src/components/menu/menu-separator.tsx b/packages/ui/src/components/menu/menu-separator.tsxsimilarity index 95%rename from packages/editor/src/components/menu/menu-separator.tsxrename to packages/ui/src/components/menu/menu-separator.tsxindex 90742c38e..216311a9d 100644--- a/packages/editor/src/components/menu/menu-separator.tsx+++ b/packages/ui/src/components/menu/menu-separator.tsx@@ -25,8 +25,8 @@ export function MenuSeparator() {as="li"sx={{width: "95%",- height: "0.5px",- bg: "border",+ height: "1px",+ bg: "separator",my: 2,alignSelf: "center"}}diff --git a/packages/editor/src/components/menu/types.ts b/packages/ui/src/components/menu/types.tssimilarity index 73%rename from packages/editor/src/components/menu/types.tsrename to packages/ui/src/components/menu/types.tsindex 9e950b052..625ec7d09 100644--- a/packages/editor/src/components/menu/types.ts+++ b/packages/ui/src/components/menu/types.ts@@ -17,8 +17,7 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { ThemeUIStyleObject } from "@theme-ui/core";-import { IconNames } from "../../toolbar/icons";+import { ThemeUICSSObject } from "@theme-ui/core";export type MenuItemComponentProps = {onClick?: (e?: Event) => void;@@ -31,22 +30,26 @@ export type BaseMenuItem<TType extends MenuItemTypes> = {isHidden?: boolean;};-export type MenuSeperator = BaseMenuItem<"separator">;+export type MenuSeperatorItem = BaseMenuItem<"separator">;-export type MenuPopup = BaseMenuItem<"popup"> & {+export type MenuPopupItem = BaseMenuItem<"popup"> & {component: (props: MenuItemComponentProps) => JSX.Element;};-export type MenuButton = BaseMenuItem<"button"> & {+export type MenuButtonItem = BaseMenuItem<"button"> & {onClick?: () => void;title: string;- icon?: IconNames;+ icon?: string;tooltip?: string;isDisabled?: boolean;isChecked?: boolean;modifier?: string;- menu?: { title: string; items: MenuItem[] };- styles?: ThemeUIStyleObject;+ menu?: { title?: string; items: MenuItem[] };++ styles?: {+ title?: ThemeUICSSObject;+ icon?: ThemeUICSSObject;+ };};-export type MenuItem = MenuButton | MenuSeperator | MenuPopup;+export type MenuItem = MenuButtonItem | MenuSeperatorItem | MenuPopupItem;diff --git a/packages/editor/src/components/menu/use-focus.ts b/packages/ui/src/components/menu/use-focus.tssimilarity index 91%rename from packages/editor/src/components/menu/use-focus.tsrename to packages/ui/src/components/menu/use-focus.tsindex b35086aa7..2227f1bce 100644--- a/packages/editor/src/components/menu/use-focus.ts+++ b/packages/ui/src/components/menu/use-focus.ts@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { useCallback, useEffect, useState } from "react";-import { MenuButton, MenuItem } from "./types";+import { MenuButtonItem, MenuItem } from "./types";export function useFocus(items: MenuItem[],@@ -43,13 +43,13 @@ export function useFocus(const onKeyDown = useCallback((e: KeyboardEvent) => {- const as = <T>(i: number) => items[i] as unknown as T;+ const as = <T>(i: number) => items[i] as unknown as T | undefined;const isSeperator = (i: number) =>items &&- (items[i]?.type === "separator" || as<MenuButton>(i)?.isDisabled);+ (items[i]?.type === "separator" || as<MenuButtonItem>(i)?.isDisabled);const moveDown = (i: number) => (i < items.length - 1 ? ++i : 0);const moveUp = (i: number) => (i > 0 ? --i : items.length - 1);- const hasSubmenu = (i: number) => items && as<MenuButton>(i).menu;+ const hasSubmenu = (i: number) => items && as<MenuButtonItem>(i)?.menu;const openSubmenu = (index: number) => {if (!hasSubmenu(index)) return;setIsSubmenuOpen(true);diff --git a/packages/ui/src/components/popup-presenter/index.tsx b/packages/ui/src/components/popup-presenter/index.tsxnew file mode 100644index 000000000..1f3527b4d--- /dev/null+++ b/packages/ui/src/components/popup-presenter/index.tsx@@ -0,0 +1,230 @@+/*+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 { useCallback, useRef, useEffect, PropsWithChildren } from "react";+import { Box } from "@theme-ui/components";+import { getPosition, PositionOptions } from "../../utils/position";+import Modal from "react-modal";+import { EmotionThemeProvider, ThemeScopes } from "@notesnook/theme";++export type PopupPresenterProps = {+ isOpen: boolean;+ onClose: () => void;+ position: PositionOptions;+ blocking?: boolean;+ focusOnRender?: boolean;+ movable?: boolean;+ scope?: keyof ThemeScopes;+ isMobile?: boolean;+};++function _PopupPresenter(props: PropsWithChildren<PopupPresenterProps>) {+ const {+ isOpen,+ position,+ onClose,+ blocking = true,+ focusOnRender = true,+ children,+ scope,+ isMobile+ } = props;++ const contentRef = useRef<HTMLDivElement>();+ const observerRef = useRef<ResizeObserver>();++ const repositionPopup = useCallback((position: PositionOptions) => {+ if (!contentRef.current || !position) return;+ const popup = contentRef.current;+ const popupPosition = getPosition(popup, position);+ popup.style.top = popupPosition.top + "px";+ popup.style.left = popupPosition.left + "px";+ }, []);++ useEffect(() => {+ repositionPopup(position);+ }, [repositionPopup, position]);++ useEffect(() => {+ function onWindowResize() {+ if (!position.target || position.target === "mouse") return;+ repositionPopup(position);+ }+ window.addEventListener("resize", onWindowResize);+ return () => {+ window.removeEventListener("resize", onWindowResize);+ };+ }, [repositionPopup, position]);++ const attachMoveHandlers = useCallback(() => {+ if (!contentRef.current || !isOpen) return;+ const movableBar = contentRef.current.querySelector(+ ".movable"+ ) as HTMLElement;++ if (!movableBar) return;+ const popup = contentRef.current;++ const offset = { x: 0, y: 0 };+ function mouseDown(e: MouseEvent) {+ offset.x = e.clientX - popup.offsetLeft;+ offset.y = e.clientY - popup.offsetTop;+ window.addEventListener("mousemove", mouseMove);+ }++ function mouseMove(e: MouseEvent) {+ if (!e.buttons) mouseUp();+ const top = e.clientY - offset.y;+ const left = e.clientX - offset.x;+ requestAnimationFrame(() => {+ popup.style.top = top + "px";+ popup.style.left = left + "px";+ });+ }++ function mouseUp() {+ window.removeEventListener("mousemove", mouseMove);+ }++ movableBar.addEventListener("mousedown", mouseDown);+ window.addEventListener("mouseup", mouseUp);+ }, [isOpen]);++ const handleResize = useCallback(() => {+ const popup = contentRef.current;+ if (!popup) return;++ let oldHeight: number = popup.offsetHeight;+ observerRef.current = new ResizeObserver(() => {+ if (isMobile) {+ repositionPopup(position);+ } else {+ const { height, y } = popup.getBoundingClientRect();+ const delta = height - oldHeight;+ if (delta > 0) {+ // means the new size is bigger so we need to adjust the position+ // if required. We only do this in case the newly resized popup+ // is going out of the window.++ const windowHeight = document.body.clientHeight - 20;+ if (y + height > windowHeight) {+ popup.style.top = windowHeight - height + "px";+ }+ }+ oldHeight = height;+ }+ });+ observerRef.current.observe(popup, { box: "border-box" });+ }, [repositionPopup, position, isMobile]);++ return (+ <Modal+ contentRef={(ref) => (contentRef.current = ref)}+ className={"popup-presenter"}+ role="menu"+ isOpen={isOpen}+ appElement={document.body}+ shouldCloseOnEsc+ shouldReturnFocusAfterClose+ shouldCloseOnOverlayClick+ shouldFocusAfterRender={focusOnRender}+ ariaHideApp={blocking}+ preventScroll={blocking}+ onRequestClose={onClose}+ portalClassName={"popup-presenter-portal"}+ onAfterOpen={(obj) => {+ if (!obj || !position) return;+ repositionPopup(position);++ handleResize();+ attachMoveHandlers();+ }}+ onAfterClose={() => observerRef.current?.disconnect()}+ overlayElement={(props, contentEl) => {+ return (+ <Box+ {...props}+ style={{+ ...props.style,+ position: !blocking ? "initial" : "fixed",+ zIndex: 1000,+ backgroundColor: !blocking ? "transparent" : "unset"+ }}+ // onClick={(e) => {+ // if (!(e.target instanceof HTMLElement)) return;+ // console.log(e.target.closest(".ReactModal__Content"));+ // if (e.target.closest(".ReactModal__Content")) return;+ // onClose();+ // }}+ // onContextMenu={(e) => {+ // e.preventDefault();+ // onClose();+ // }}+ >+ {contentEl}+ </Box>+ );+ }}+ contentElement={(props, children) => (+ <Box+ {...props}+ style={{}}+ // TODO onMouseDown={(e) => {+ // console.log(e);+ // }}+ sx={{+ top: 0,+ left: 0,+ right: 0,+ bottom: 0,+ display: "flex",+ width: "fit-content",+ height: "fit-content",+ position: "fixed",+ backgroundColor: undefined,+ padding: 0,+ zIndex: 999,+ outline: 0,+ isolation: "isolate"+ }}+ >+ {children}+ </Box>+ )}+ style={{+ content: {},+ overlay: {+ zIndex: 999,+ background: "transparent"+ }+ }}+ >+ <EmotionThemeProvider scope={scope}>{children}</EmotionThemeProvider>+ </Modal>+ );+}++export function PopupPresenter(props: PropsWithChildren<PopupPresenterProps>) {+ // HACK: we don't want to render the popup presenter for no reason+ // including it's effects etc. so we just wrap it and return null+ // if the popup is closed.+ if (!props.isOpen) return null;++ return <_PopupPresenter {...props} />;+}diff --git a/packages/ui/src/components/scroll-container/index.tsx b/packages/ui/src/components/scroll-container/index.tsxnew file mode 100644index 000000000..3bc441317--- /dev/null+++ b/packages/ui/src/components/scroll-container/index.tsx@@ -0,0 +1,48 @@+/*+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 { PropsWithChildren } from "react";+import { MacScrollbar, MacScrollbarProps } from "mac-scrollbar";+import "mac-scrollbar/dist/mac-scrollbar.css";++type ScrollContainerProps = {+ id?: string;+ className?: string;+ style?: React.CSSProperties;+} & MacScrollbarProps;++export function ScrollContainer({+ id,+ children,+ style,+ className,+ ...restProps+}: PropsWithChildren<ScrollContainerProps>) {+ return (+ <MacScrollbar+ {...restProps}+ id={id}+ className={className}+ style={style}+ minThumbSize={40}+ >+ {children}+ </MacScrollbar>+ );+}diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.tsnew file mode 100644index 000000000..b4778c27c--- /dev/null+++ b/packages/ui/src/index.ts@@ -0,0 +1,21 @@+/*+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 * from "./components";+export * from "./utils";diff --git a/packages/ui/src/utils/index.ts b/packages/ui/src/utils/index.tsnew file mode 100644index 000000000..fcd935b5a--- /dev/null+++ b/packages/ui/src/utils/index.ts@@ -0,0 +1,20 @@+/*+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 * from "./position";diff --git a/packages/editor/src/utils/position.ts b/packages/ui/src/utils/position.tssimilarity index 100%rename from packages/editor/src/utils/position.tsrename to packages/ui/src/utils/position.tsdiff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.jsonnew file mode 100644index 000000000..740087b66--- /dev/null+++ b/packages/ui/tsconfig.json@@ -0,0 +1,8 @@+{+ "extends": "../../tsconfig",+ "compilerOptions": {+ "outDir": "./dist",+ "jsx": "react-jsx"+ },+ "include": ["src/"]+}diff --git a/scripts/bootstrap.mjs b/scripts/bootstrap.mjsindex 06d4182bb..f347c80cd 100644--- a/scripts/bootstrap.mjs+++ b/scripts/bootstrap.mjs@@ -34,7 +34,8 @@ const scopes = {vericrypt: "apps/vericrypt",desktop: "apps/desktop",core: "packages/core",- editor: "packages/editor"+ editor: "packages/editor",+ themes: "servers/themes"};if (args.scope && !scopes[args.scope])@@ -47,10 +48,10 @@ if (IS_BOOTSTRAP_ALL) {await new fdir().onlyDirs().withMaxDepth(2)- .glob("packages/**", "apps/**", "extensions/**")+ .glob("packages/**", "apps/**", "extensions/**", "servers/**").crawl(".").withPromise()- ).slice(3);+ ).slice(4);const dependencies = Array.from(new Set(diff --git a/servers/themes/.gitignore b/servers/themes/.gitignorenew file mode 100644index 000000000..320602de0--- /dev/null+++ b/servers/themes/.gitignore@@ -0,0 +1,3 @@+node_modules/+themes-metadata.json+notesnook-themes\ No newline at end of filediff --git a/servers/themes/global.d.ts b/servers/themes/global.d.tsnew file mode 100644index 000000000..52c4e3ea9--- /dev/null+++ b/servers/themes/global.d.ts@@ -0,0 +1,20 @@+/*+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 "vite/client";diff --git a/servers/themes/package-lock.json b/servers/themes/package-lock.jsonnew file mode 100644index 000000000..95f766ddb--- /dev/null+++ b/servers/themes/package-lock.json@@ -0,0 +1,2726 @@+{+ "name": "@notesnook/themes-server",+ "version": "1.0.0",+ "lockfileVersion": 2,+ "requires": true,+ "packages": {+ "": {+ "name": "@notesnook/themes-server",+ "version": "1.0.0",+ "license": "ISC",+ "dependencies": {+ "@orama/orama": "^1.0.8",+ "@trpc/server": "10.31.0",+ "async-mutex": "^0.4.0",+ "cors": "^2.8.5",+ "util": "^0.12.5",+ "zod": "^3.21.4"+ },+ "devDependencies": {+ "@notesnook/theme": "file:../../packages/theme",+ "@types/cors": "^2.8.13",+ "@vitejs/plugin-react": "^4.0.3",+ "react": "17.0.2",+ "vite-node": "^0.33.0"+ }+ },+ "../../packages/theme": {+ "name": "@notesnook/theme",+ "version": "1.1.0",+ "dev": true,+ "license": "GPL-3.0-or-later",+ "dependencies": {+ "@emotion/react": "11.11.1",+ "@theme-ui/color": "^0.16.0",+ "@theme-ui/components": "0.14.7",+ "@theme-ui/core": "0.14.7",+ "tinycolor2": "^1.4.2",+ "zustand": "^4.3.8"+ },+ "devDependencies": {+ "@trpc/server": "^10.31.0",+ "@types/react": "17.0.2",+ "@types/tinycolor2": "^1.4.3",+ "isomorphic-fetch": "^3.0.0",+ "ts-json-schema-generator": "^1.2.0"+ },+ "peerDependencies": {+ "react": "17.0.2"+ }+ },+ "node_modules/@ampproject/remapping": {+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",+ "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",+ "dev": true,+ "dependencies": {+ "@jridgewell/gen-mapping": "^0.3.0",+ "@jridgewell/trace-mapping": "^0.3.9"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@babel/code-frame": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz",+ "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==",+ "dev": true,+ "dependencies": {+ "@babel/highlight": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/compat-data": {+ "version": "7.22.9",+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz",+ "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==",+ "dev": true,+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/core": {+ "version": "7.22.9",+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.9.tgz",+ "integrity": "sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==",+ "dev": true,+ "dependencies": {+ "@ampproject/remapping": "^2.2.0",+ "@babel/code-frame": "^7.22.5",+ "@babel/generator": "^7.22.9",+ "@babel/helper-compilation-targets": "^7.22.9",+ "@babel/helper-module-transforms": "^7.22.9",+ "@babel/helpers": "^7.22.6",+ "@babel/parser": "^7.22.7",+ "@babel/template": "^7.22.5",+ "@babel/traverse": "^7.22.8",+ "@babel/types": "^7.22.5",+ "convert-source-map": "^1.7.0",+ "debug": "^4.1.0",+ "gensync": "^1.0.0-beta.2",+ "json5": "^2.2.2",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/babel"+ }+ },+ "node_modules/@babel/generator": {+ "version": "7.22.9",+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz",+ "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==",+ "dev": true,+ "dependencies": {+ "@babel/types": "^7.22.5",+ "@jridgewell/gen-mapping": "^0.3.2",+ "@jridgewell/trace-mapping": "^0.3.17",+ "jsesc": "^2.5.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-compilation-targets": {+ "version": "7.22.9",+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz",+ "integrity": "sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==",+ "dev": true,+ "dependencies": {+ "@babel/compat-data": "^7.22.9",+ "@babel/helper-validator-option": "^7.22.5",+ "browserslist": "^4.21.9",+ "lru-cache": "^5.1.1",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0"+ }+ },+ "node_modules/@babel/helper-environment-visitor": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz",+ "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==",+ "dev": true,+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-function-name": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz",+ "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==",+ "dev": true,+ "dependencies": {+ "@babel/template": "^7.22.5",+ "@babel/types": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-hoist-variables": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",+ "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",+ "dev": true,+ "dependencies": {+ "@babel/types": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-module-imports": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz",+ "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==",+ "dev": true,+ "dependencies": {+ "@babel/types": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-module-transforms": {+ "version": "7.22.9",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz",+ "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==",+ "dev": true,+ "dependencies": {+ "@babel/helper-environment-visitor": "^7.22.5",+ "@babel/helper-module-imports": "^7.22.5",+ "@babel/helper-simple-access": "^7.22.5",+ "@babel/helper-split-export-declaration": "^7.22.6",+ "@babel/helper-validator-identifier": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0"+ }+ },+ "node_modules/@babel/helper-plugin-utils": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz",+ "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==",+ "dev": true,+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-simple-access": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz",+ "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==",+ "dev": true,+ "dependencies": {+ "@babel/types": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-split-export-declaration": {+ "version": "7.22.6",+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",+ "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",+ "dev": true,+ "dependencies": {+ "@babel/types": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-string-parser": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",+ "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",+ "dev": true,+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-validator-identifier": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz",+ "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==",+ "dev": true,+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-validator-option": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz",+ "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==",+ "dev": true,+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helpers": {+ "version": "7.22.6",+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz",+ "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==",+ "dev": true,+ "dependencies": {+ "@babel/template": "^7.22.5",+ "@babel/traverse": "^7.22.6",+ "@babel/types": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/highlight": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz",+ "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==",+ "dev": true,+ "dependencies": {+ "@babel/helper-validator-identifier": "^7.22.5",+ "chalk": "^2.0.0",+ "js-tokens": "^4.0.0"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/parser": {+ "version": "7.22.7",+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz",+ "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==",+ "dev": true,+ "bin": {+ "parser": "bin/babel-parser.js"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@babel/plugin-transform-react-jsx-self": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.22.5.tgz",+ "integrity": "sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g==",+ "dev": true,+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-transform-react-jsx-source": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.22.5.tgz",+ "integrity": "sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w==",+ "dev": true,+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/template": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz",+ "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==",+ "dev": true,+ "dependencies": {+ "@babel/code-frame": "^7.22.5",+ "@babel/parser": "^7.22.5",+ "@babel/types": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/traverse": {+ "version": "7.22.8",+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz",+ "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==",+ "dev": true,+ "dependencies": {+ "@babel/code-frame": "^7.22.5",+ "@babel/generator": "^7.22.7",+ "@babel/helper-environment-visitor": "^7.22.5",+ "@babel/helper-function-name": "^7.22.5",+ "@babel/helper-hoist-variables": "^7.22.5",+ "@babel/helper-split-export-declaration": "^7.22.6",+ "@babel/parser": "^7.22.7",+ "@babel/types": "^7.22.5",+ "debug": "^4.1.0",+ "globals": "^11.1.0"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/types": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz",+ "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==",+ "dev": true,+ "dependencies": {+ "@babel/helper-string-parser": "^7.22.5",+ "@babel/helper-validator-identifier": "^7.22.5",+ "to-fast-properties": "^2.0.0"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@esbuild/android-arm": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.12.tgz",+ "integrity": "sha512-LIxaNIQfkFZbTLb4+cX7dozHlAbAshhFE5PKdro0l+FnCpx1GDJaQ2WMcqm+ToXKMt8p8Uojk/MFRuGyz3V5Sw==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/android-arm64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.12.tgz",+ "integrity": "sha512-BMAlczRqC/LUt2P97E4apTBbkvS9JTJnp2DKFbCwpZ8vBvXVbNdqmvzW/OsdtI/+mGr+apkkpqGM8WecLkPgrA==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/android-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.12.tgz",+ "integrity": "sha512-zU5MyluNsykf5cOJ0LZZZjgAHbhPJ1cWfdH1ZXVMXxVMhEV0VZiZXQdwBBVvmvbF28EizeK7obG9fs+fpmS0eQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/darwin-arm64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.12.tgz",+ "integrity": "sha512-zUZMep7YONnp6954QOOwEBwFX9svlKd3ov6PkxKd53LGTHsp/gy7vHaPGhhjBmEpqXEXShi6dddjIkmd+NgMsA==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/darwin-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.12.tgz",+ "integrity": "sha512-ohqLPc7i67yunArPj1+/FeeJ7AgwAjHqKZ512ADk3WsE3FHU9l+m5aa7NdxXr0HmN1bjDlUslBjWNbFlD9y12Q==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/freebsd-arm64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.12.tgz",+ "integrity": "sha512-GIIHtQXqgeOOqdG16a/A9N28GpkvjJnjYMhOnXVbn3EDJcoItdR58v/pGN31CHjyXDc8uCcRnFWmqaJt24AYJg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/freebsd-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.12.tgz",+ "integrity": "sha512-zK0b9a1/0wZY+6FdOS3BpZcPc1kcx2G5yxxfEJtEUzVxI6n/FrC2Phsxj/YblPuBchhBZ/1wwn7AyEBUyNSa6g==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-arm": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.12.tgz",+ "integrity": "sha512-y75OijvrBE/1XRrXq1jtrJfG26eHeMoqLJ2dwQNwviwTuTtHGCojsDO6BJNF8gU+3jTn1KzJEMETytwsFSvc+Q==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-arm64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.12.tgz",+ "integrity": "sha512-JKgG8Q/LL/9sw/iHHxQyVMoQYu3rU3+a5Z87DxC+wAu3engz+EmctIrV+FGOgI6gWG1z1+5nDDbXiRMGQZXqiw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-ia32": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.12.tgz",+ "integrity": "sha512-yoRIAqc0B4lDIAAEFEIu9ttTRFV84iuAl0KNCN6MhKLxNPfzwCBvEMgwco2f71GxmpBcTtn7KdErueZaM2rEvw==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-loong64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.12.tgz",+ "integrity": "sha512-qYgt3dHPVvf/MgbIBpJ4Sup/yb9DAopZ3a2JgMpNKIHUpOdnJ2eHBo/aQdnd8dJ21X/+sS58wxHtA9lEazYtXQ==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-mips64el": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.12.tgz",+ "integrity": "sha512-wHphlMLK4ufNOONqukELfVIbnGQJrHJ/mxZMMrP2jYrPgCRZhOtf0kC4yAXBwnfmULimV1qt5UJJOw4Kh13Yfg==",+ "cpu": [+ "mips64el"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-ppc64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.12.tgz",+ "integrity": "sha512-TeN//1Ft20ZZW41+zDSdOI/Os1bEq5dbvBvYkberB7PHABbRcsteeoNVZFlI0YLpGdlBqohEpjrn06kv8heCJg==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-riscv64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.12.tgz",+ "integrity": "sha512-AgUebVS4DoAblBgiB2ACQ/8l4eGE5aWBb8ZXtkXHiET9mbj7GuWt3OnsIW/zX+XHJt2RYJZctbQ2S/mDjbp0UA==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-s390x": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.12.tgz",+ "integrity": "sha512-dJ3Rb3Ei2u/ysSXd6pzleGtfDdc2MuzKt8qc6ls8vreP1G3B7HInX3i7gXS4BGeVd24pp0yqyS7bJ5NHaI9ing==",+ "cpu": [+ "s390x"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.12.tgz",+ "integrity": "sha512-OrNJMGQbPaVyHHcDF8ybNSwu7TDOfX8NGpXCbetwOSP6txOJiWlgQnRymfC9ocR1S0Y5PW0Wb1mV6pUddqmvmQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/netbsd-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.12.tgz",+ "integrity": "sha512-55FzVCAiwE9FK8wWeCRuvjazNRJ1QqLCYGZVB6E8RuQuTeStSwotpSW4xoRGwp3a1wUsaVCdYcj5LGCASVJmMg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "netbsd"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/openbsd-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.12.tgz",+ "integrity": "sha512-qnluf8rfb6Y5Lw2tirfK2quZOBbVqmwxut7GPCIJsM8lc4AEUj9L8y0YPdLaPK0TECt4IdyBdBD/KRFKorlK3g==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "openbsd"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/sunos-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.12.tgz",+ "integrity": "sha512-+RkKpVQR7bICjTOPUpkTBTaJ4TFqQBX5Ywyd/HSdDkQGn65VPkTsR/pL4AMvuMWy+wnXgIl4EY6q4mVpJal8Kg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "sunos"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/win32-arm64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.12.tgz",+ "integrity": "sha512-GNHuciv0mFM7ouzsU0+AwY+7eV4Mgo5WnbhfDCQGtpvOtD1vbOiRjPYG6dhmMoFyBjj+pNqQu2X+7DKn0KQ/Gw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/win32-ia32": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.12.tgz",+ "integrity": "sha512-kR8cezhYipbbypGkaqCTWIeu4zID17gamC8YTPXYtcN3E5BhhtTnwKBn9I0PJur/T6UVwIEGYzkffNL0lFvxEw==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/win32-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.12.tgz",+ "integrity": "sha512-O0UYQVkvfM/jO8a4OwoV0mAKSJw+mjWTAd1MJd/1FCX6uiMdLmMRPK/w6e9OQ0ob2WGxzIm9va/KG0Ja4zIOgg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@jridgewell/gen-mapping": {+ "version": "0.3.3",+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",+ "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",+ "dev": true,+ "dependencies": {+ "@jridgewell/set-array": "^1.0.1",+ "@jridgewell/sourcemap-codec": "^1.4.10",+ "@jridgewell/trace-mapping": "^0.3.9"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@jridgewell/resolve-uri": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",+ "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",+ "dev": true,+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@jridgewell/set-array": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",+ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",+ "dev": true,+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@jridgewell/sourcemap-codec": {+ "version": "1.4.15",+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",+ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",+ "dev": true+ },+ "node_modules/@jridgewell/trace-mapping": {+ "version": "0.3.18",+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz",+ "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==",+ "dev": true,+ "dependencies": {+ "@jridgewell/resolve-uri": "3.1.0",+ "@jridgewell/sourcemap-codec": "1.4.14"+ }+ },+ "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": {+ "version": "1.4.14",+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",+ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",+ "dev": true+ },+ "node_modules/@notesnook/theme": {+ "resolved": "../../packages/theme",+ "link": true+ },+ "node_modules/@orama/orama": {+ "version": "1.0.8",+ "resolved": "https://registry.npmjs.org/@orama/orama/-/orama-1.0.8.tgz",+ "integrity": "sha512-UJvfnhCL4m4NQZFTs2kUDel67HHkzWCZJqF6Q4Dsx8hROXP82OXvPXsTXfHhHIyxtETdliEEkub1c6k6+36Gqw==",+ "engines": {+ "node": ">= 16.0.0"+ }+ },+ "node_modules/@trpc/server": {+ "version": "10.31.0",+ "resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.31.0.tgz",+ "integrity": "sha512-9EnRTSDE9nF11LZsvSOqNKqkRYzHqFX4ch5AJ6VIu8uta2vxVTN4FxxsNRSOluTzVYZDeaCISbwmOJ5iihCCIg==",+ "funding": [+ "https://trpc.io/sponsor"+ ]+ },+ "node_modules/@types/cors": {+ "version": "2.8.13",+ "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz",+ "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==",+ "dev": true,+ "dependencies": {+ "@types/node": "*"+ }+ },+ "node_modules/@types/node": {+ "version": "20.4.2",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.2.tgz",+ "integrity": "sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw==",+ "dev": true+ },+ "node_modules/@vitejs/plugin-react": {+ "version": "4.0.3",+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.0.3.tgz",+ "integrity": "sha512-pwXDog5nwwvSIzwrvYYmA2Ljcd/ZNlcsSG2Q9CNDBwnsd55UGAyr2doXtB5j+2uymRCnCfExlznzzSFbBRcoCg==",+ "dev": true,+ "dependencies": {+ "@babel/core": "^7.22.5",+ "@babel/plugin-transform-react-jsx-self": "^7.22.5",+ "@babel/plugin-transform-react-jsx-source": "^7.22.5",+ "react-refresh": "^0.14.0"+ },+ "engines": {+ "node": "^14.18.0 || >=16.0.0"+ },+ "peerDependencies": {+ "vite": "^4.2.0"+ }+ },+ "node_modules/acorn": {+ "version": "8.10.0",+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",+ "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",+ "dev": true,+ "bin": {+ "acorn": "bin/acorn"+ },+ "engines": {+ "node": ">=0.4.0"+ }+ },+ "node_modules/ansi-styles": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",+ "dev": true,+ "dependencies": {+ "color-convert": "^1.9.0"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/async-mutex": {+ "version": "0.4.0",+ "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.0.tgz",+ "integrity": "sha512-eJFZ1YhRR8UN8eBLoNzcDPcy/jqjsg6I1AP+KvWQX80BqOSW1oJPJXDylPUEeMr2ZQvHgnQ//Lp6f3RQ1zI7HA==",+ "dependencies": {+ "tslib": "^2.4.0"+ }+ },+ "node_modules/available-typed-arrays": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",+ "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/browserslist": {+ "version": "4.21.9",+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz",+ "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/browserslist"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "dependencies": {+ "caniuse-lite": "^1.0.30001503",+ "electron-to-chromium": "^1.4.431",+ "node-releases": "^2.0.12",+ "update-browserslist-db": "^1.0.11"+ },+ "bin": {+ "browserslist": "cli.js"+ },+ "engines": {+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"+ }+ },+ "node_modules/cac": {+ "version": "6.7.14",+ "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",+ "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/call-bind": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",+ "dependencies": {+ "function-bind": "^1.1.1",+ "get-intrinsic": "^1.0.2"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/caniuse-lite": {+ "version": "1.0.30001516",+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001516.tgz",+ "integrity": "sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ]+ },+ "node_modules/chalk": {+ "version": "2.4.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",+ "dev": true,+ "dependencies": {+ "ansi-styles": "^3.2.1",+ "escape-string-regexp": "^1.0.5",+ "supports-color": "^5.3.0"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/color-convert": {+ "version": "1.9.3",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",+ "dev": true,+ "dependencies": {+ "color-name": "1.1.3"+ }+ },+ "node_modules/color-name": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",+ "dev": true+ },+ "node_modules/convert-source-map": {+ "version": "1.9.0",+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",+ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",+ "dev": true+ },+ "node_modules/cors": {+ "version": "2.8.5",+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",+ "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",+ "dependencies": {+ "object-assign": "^4",+ "vary": "^1"+ },+ "engines": {+ "node": ">= 0.10"+ }+ },+ "node_modules/debug": {+ "version": "4.3.4",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",+ "dev": true,+ "dependencies": {+ "ms": "2.1.2"+ },+ "engines": {+ "node": ">=6.0"+ },+ "peerDependenciesMeta": {+ "supports-color": {+ "optional": true+ }+ }+ },+ "node_modules/electron-to-chromium": {+ "version": "1.4.461",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.461.tgz",+ "integrity": "sha512-1JkvV2sgEGTDXjdsaQCeSwYYuhLRphRpc+g6EHTFELJXEiznLt3/0pZ9JuAOQ5p2rI3YxKTbivtvajirIfhrEQ==",+ "dev": true+ },+ "node_modules/esbuild": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.12.tgz",+ "integrity": "sha512-XuOVLDdtsDslXStStduT41op21Ytmf4/BDS46aa3xPJ7X5h2eMWBF1oAe3QjUH3bDksocNXgzGUZ7XHIBya6Tg==",+ "dev": true,+ "hasInstallScript": true,+ "bin": {+ "esbuild": "bin/esbuild"+ },+ "engines": {+ "node": ">=12"+ },+ "optionalDependencies": {+ "@esbuild/android-arm": "0.18.12",+ "@esbuild/android-arm64": "0.18.12",+ "@esbuild/android-x64": "0.18.12",+ "@esbuild/darwin-arm64": "0.18.12",+ "@esbuild/darwin-x64": "0.18.12",+ "@esbuild/freebsd-arm64": "0.18.12",+ "@esbuild/freebsd-x64": "0.18.12",+ "@esbuild/linux-arm": "0.18.12",+ "@esbuild/linux-arm64": "0.18.12",+ "@esbuild/linux-ia32": "0.18.12",+ "@esbuild/linux-loong64": "0.18.12",+ "@esbuild/linux-mips64el": "0.18.12",+ "@esbuild/linux-ppc64": "0.18.12",+ "@esbuild/linux-riscv64": "0.18.12",+ "@esbuild/linux-s390x": "0.18.12",+ "@esbuild/linux-x64": "0.18.12",+ "@esbuild/netbsd-x64": "0.18.12",+ "@esbuild/openbsd-x64": "0.18.12",+ "@esbuild/sunos-x64": "0.18.12",+ "@esbuild/win32-arm64": "0.18.12",+ "@esbuild/win32-ia32": "0.18.12",+ "@esbuild/win32-x64": "0.18.12"+ }+ },+ "node_modules/escalade": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",+ "dev": true,+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/escape-string-regexp": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",+ "dev": true,+ "engines": {+ "node": ">=0.8.0"+ }+ },+ "node_modules/for-each": {+ "version": "0.3.3",+ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",+ "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",+ "dependencies": {+ "is-callable": "^1.1.3"+ }+ },+ "node_modules/fsevents": {+ "version": "2.3.2",+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",+ "dev": true,+ "hasInstallScript": true,+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"+ }+ },+ "node_modules/function-bind": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="+ },+ "node_modules/gensync": {+ "version": "1.0.0-beta.2",+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",+ "dev": true,+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/get-intrinsic": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",+ "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",+ "dependencies": {+ "function-bind": "^1.1.1",+ "has": "^1.0.3",+ "has-proto": "^1.0.1",+ "has-symbols": "^1.0.3"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/globals": {+ "version": "11.12.0",+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",+ "dev": true,+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/gopd": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",+ "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",+ "dependencies": {+ "get-intrinsic": "^1.1.3"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/has": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",+ "dependencies": {+ "function-bind": "^1.1.1"+ },+ "engines": {+ "node": ">= 0.4.0"+ }+ },+ "node_modules/has-flag": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",+ "dev": true,+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/has-proto": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",+ "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/has-symbols": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/has-tostringtag": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",+ "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",+ "dependencies": {+ "has-symbols": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/inherits": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="+ },+ "node_modules/is-arguments": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",+ "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==",+ "dependencies": {+ "call-bind": "^1.0.2",+ "has-tostringtag": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-callable": {+ "version": "1.2.7",+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",+ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-generator-function": {+ "version": "1.0.10",+ "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz",+ "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==",+ "dependencies": {+ "has-tostringtag": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-typed-array": {+ "version": "1.1.10",+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz",+ "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==",+ "dependencies": {+ "available-typed-arrays": "^1.0.5",+ "call-bind": "^1.0.2",+ "for-each": "^0.3.3",+ "gopd": "^1.0.1",+ "has-tostringtag": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/js-tokens": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",+ "dev": true+ },+ "node_modules/jsesc": {+ "version": "2.5.2",+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",+ "dev": true,+ "bin": {+ "jsesc": "bin/jsesc"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/json5": {+ "version": "2.2.3",+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",+ "dev": true,+ "bin": {+ "json5": "lib/cli.js"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/jsonc-parser": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",+ "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",+ "dev": true+ },+ "node_modules/loose-envify": {+ "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"+ },+ "bin": {+ "loose-envify": "cli.js"+ }+ },+ "node_modules/lru-cache": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",+ "dev": true,+ "dependencies": {+ "yallist": "^3.0.2"+ }+ },+ "node_modules/mlly": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.0.tgz",+ "integrity": "sha512-ua8PAThnTwpprIaU47EPeZ/bPUVp2QYBbWMphUQpVdBI3Lgqzm5KZQ45Agm3YJedHXaIHl6pBGabaLSUPPSptg==",+ "dev": true,+ "dependencies": {+ "acorn": "^8.9.0",+ "pathe": "^1.1.1",+ "pkg-types": "^1.0.3",+ "ufo": "^1.1.2"+ }+ },+ "node_modules/ms": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",+ "dev": true+ },+ "node_modules/nanoid": {+ "version": "3.3.6",+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "bin": {+ "nanoid": "bin/nanoid.cjs"+ },+ "engines": {+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"+ }+ },+ "node_modules/node-releases": {+ "version": "2.0.13",+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz",+ "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==",+ "dev": true+ },+ "node_modules/object-assign": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/pathe": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz",+ "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==",+ "dev": true+ },+ "node_modules/picocolors": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",+ "dev": true+ },+ "node_modules/pkg-types": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz",+ "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==",+ "dev": true,+ "dependencies": {+ "jsonc-parser": "^3.2.0",+ "mlly": "^1.2.0",+ "pathe": "^1.1.0"+ }+ },+ "node_modules/postcss": {+ "version": "8.4.25",+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.25.tgz",+ "integrity": "sha512-7taJ/8t2av0Z+sQEvNzCkpDynl0tX3uJMCODi6nT3PfASC7dYCWV9aQ+uiCf+KBD4SEFcu+GvJdGdwzQ6OSjCw==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/postcss"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "dependencies": {+ "nanoid": "^3.3.6",+ "picocolors": "^1.0.0",+ "source-map-js": "^1.0.2"+ },+ "engines": {+ "node": "^10 || ^12 || >=14"+ }+ },+ "node_modules/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,+ "dependencies": {+ "loose-envify": "^1.1.0",+ "object-assign": "^4.1.1"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/react-refresh": {+ "version": "0.14.0",+ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz",+ "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==",+ "dev": true,+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/rollup": {+ "version": "3.26.2",+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.2.tgz",+ "integrity": "sha512-6umBIGVz93er97pMgQO08LuH3m6PUb3jlDUUGFsNJB6VgTCUaDFpupf5JfU30529m/UKOgmiX+uY6Sx8cOYpLA==",+ "dev": true,+ "bin": {+ "rollup": "dist/bin/rollup"+ },+ "engines": {+ "node": ">=14.18.0",+ "npm": ">=8.0.0"+ },+ "optionalDependencies": {+ "fsevents": "~2.3.2"+ }+ },+ "node_modules/semver": {+ "version": "6.3.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",+ "dev": true,+ "bin": {+ "semver": "bin/semver.js"+ }+ },+ "node_modules/source-map-js": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",+ "dev": true,+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/supports-color": {+ "version": "5.5.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",+ "dev": true,+ "dependencies": {+ "has-flag": "^3.0.0"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/to-fast-properties": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",+ "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",+ "dev": true,+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/tslib": {+ "version": "2.6.0",+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",+ "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA=="+ },+ "node_modules/ufo": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.2.tgz",+ "integrity": "sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==",+ "dev": true+ },+ "node_modules/update-browserslist-db": {+ "version": "1.0.11",+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz",+ "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/browserslist"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "dependencies": {+ "escalade": "^3.1.1",+ "picocolors": "^1.0.0"+ },+ "bin": {+ "update-browserslist-db": "cli.js"+ },+ "peerDependencies": {+ "browserslist": ">= 4.21.0"+ }+ },+ "node_modules/util": {+ "version": "0.12.5",+ "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz",+ "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==",+ "dependencies": {+ "inherits": "^2.0.3",+ "is-arguments": "^1.0.4",+ "is-generator-function": "^1.0.7",+ "is-typed-array": "^1.1.3",+ "which-typed-array": "^1.1.2"+ }+ },+ "node_modules/vary": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",+ "engines": {+ "node": ">= 0.8"+ }+ },+ "node_modules/vite": {+ "version": "4.4.3",+ "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.3.tgz",+ "integrity": "sha512-IMnXQXXWgLi5brBQx/4WzDxdzW0X3pjO4nqFJAuNvwKtxzAmPzFE1wszW3VDpAGQJm3RZkm/brzRdyGsnwgJIA==",+ "dev": true,+ "dependencies": {+ "esbuild": "^0.18.10",+ "postcss": "^8.4.25",+ "rollup": "^3.25.2"+ },+ "bin": {+ "vite": "bin/vite.js"+ },+ "engines": {+ "node": "^14.18.0 || >=16.0.0"+ },+ "funding": {+ "url": "https://github.com/vitejs/vite?sponsor=1"+ },+ "optionalDependencies": {+ "fsevents": "~2.3.2"+ },+ "peerDependencies": {+ "@types/node": ">= 14",+ "less": "*",+ "lightningcss": "^1.21.0",+ "sass": "*",+ "stylus": "*",+ "sugarss": "*",+ "terser": "^5.4.0"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ },+ "less": {+ "optional": true+ },+ "lightningcss": {+ "optional": true+ },+ "sass": {+ "optional": true+ },+ "stylus": {+ "optional": true+ },+ "sugarss": {+ "optional": true+ },+ "terser": {+ "optional": true+ }+ }+ },+ "node_modules/vite-node": {+ "version": "0.33.0",+ "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.33.0.tgz",+ "integrity": "sha512-19FpHYbwWWxDr73ruNahC+vtEdza52kA90Qb3La98yZ0xULqV8A5JLNPUff0f5zID4984tW7l3DH2przTJUZSw==",+ "dev": true,+ "dependencies": {+ "cac": "^6.7.14",+ "debug": "^4.3.4",+ "mlly": "^1.4.0",+ "pathe": "^1.1.1",+ "picocolors": "^1.0.0",+ "vite": "^3.0.0 || ^4.0.0"+ },+ "bin": {+ "vite-node": "vite-node.mjs"+ },+ "engines": {+ "node": ">=v14.18.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/which-typed-array": {+ "version": "1.1.9",+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz",+ "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==",+ "dependencies": {+ "available-typed-arrays": "^1.0.5",+ "call-bind": "^1.0.2",+ "for-each": "^0.3.3",+ "gopd": "^1.0.1",+ "has-tostringtag": "^1.0.0",+ "is-typed-array": "^1.1.10"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/yallist": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",+ "dev": true+ },+ "node_modules/zod": {+ "version": "3.21.4",+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz",+ "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==",+ "funding": {+ "url": "https://github.com/sponsors/colinhacks"+ }+ }+ },+ "dependencies": {+ "@ampproject/remapping": {+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",+ "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",+ "dev": true,+ "requires": {+ "@jridgewell/gen-mapping": "^0.3.0",+ "@jridgewell/trace-mapping": "^0.3.9"+ }+ },+ "@babel/code-frame": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz",+ "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==",+ "dev": true,+ "requires": {+ "@babel/highlight": "^7.22.5"+ }+ },+ "@babel/compat-data": {+ "version": "7.22.9",+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz",+ "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==",+ "dev": true+ },+ "@babel/core": {+ "version": "7.22.9",+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.9.tgz",+ "integrity": "sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==",+ "dev": true,+ "requires": {+ "@ampproject/remapping": "^2.2.0",+ "@babel/code-frame": "^7.22.5",+ "@babel/generator": "^7.22.9",+ "@babel/helper-compilation-targets": "^7.22.9",+ "@babel/helper-module-transforms": "^7.22.9",+ "@babel/helpers": "^7.22.6",+ "@babel/parser": "^7.22.7",+ "@babel/template": "^7.22.5",+ "@babel/traverse": "^7.22.8",+ "@babel/types": "^7.22.5",+ "convert-source-map": "^1.7.0",+ "debug": "^4.1.0",+ "gensync": "^1.0.0-beta.2",+ "json5": "^2.2.2",+ "semver": "^6.3.1"+ }+ },+ "@babel/generator": {+ "version": "7.22.9",+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz",+ "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==",+ "dev": true,+ "requires": {+ "@babel/types": "^7.22.5",+ "@jridgewell/gen-mapping": "^0.3.2",+ "@jridgewell/trace-mapping": "^0.3.17",+ "jsesc": "^2.5.1"+ }+ },+ "@babel/helper-compilation-targets": {+ "version": "7.22.9",+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz",+ "integrity": "sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==",+ "dev": true,+ "requires": {+ "@babel/compat-data": "^7.22.9",+ "@babel/helper-validator-option": "^7.22.5",+ "browserslist": "^4.21.9",+ "lru-cache": "^5.1.1",+ "semver": "^6.3.1"+ }+ },+ "@babel/helper-environment-visitor": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz",+ "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==",+ "dev": true+ },+ "@babel/helper-function-name": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz",+ "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==",+ "dev": true,+ "requires": {+ "@babel/template": "^7.22.5",+ "@babel/types": "^7.22.5"+ }+ },+ "@babel/helper-hoist-variables": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",+ "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",+ "dev": true,+ "requires": {+ "@babel/types": "^7.22.5"+ }+ },+ "@babel/helper-module-imports": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz",+ "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==",+ "dev": true,+ "requires": {+ "@babel/types": "^7.22.5"+ }+ },+ "@babel/helper-module-transforms": {+ "version": "7.22.9",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz",+ "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==",+ "dev": true,+ "requires": {+ "@babel/helper-environment-visitor": "^7.22.5",+ "@babel/helper-module-imports": "^7.22.5",+ "@babel/helper-simple-access": "^7.22.5",+ "@babel/helper-split-export-declaration": "^7.22.6",+ "@babel/helper-validator-identifier": "^7.22.5"+ }+ },+ "@babel/helper-plugin-utils": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz",+ "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==",+ "dev": true+ },+ "@babel/helper-simple-access": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz",+ "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==",+ "dev": true,+ "requires": {+ "@babel/types": "^7.22.5"+ }+ },+ "@babel/helper-split-export-declaration": {+ "version": "7.22.6",+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",+ "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",+ "dev": true,+ "requires": {+ "@babel/types": "^7.22.5"+ }+ },+ "@babel/helper-string-parser": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",+ "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",+ "dev": true+ },+ "@babel/helper-validator-identifier": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz",+ "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==",+ "dev": true+ },+ "@babel/helper-validator-option": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz",+ "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==",+ "dev": true+ },+ "@babel/helpers": {+ "version": "7.22.6",+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz",+ "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==",+ "dev": true,+ "requires": {+ "@babel/template": "^7.22.5",+ "@babel/traverse": "^7.22.6",+ "@babel/types": "^7.22.5"+ }+ },+ "@babel/highlight": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz",+ "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==",+ "dev": true,+ "requires": {+ "@babel/helper-validator-identifier": "^7.22.5",+ "chalk": "^2.0.0",+ "js-tokens": "^4.0.0"+ }+ },+ "@babel/parser": {+ "version": "7.22.7",+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz",+ "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==",+ "dev": true+ },+ "@babel/plugin-transform-react-jsx-self": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.22.5.tgz",+ "integrity": "sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g==",+ "dev": true,+ "requires": {+ "@babel/helper-plugin-utils": "^7.22.5"+ }+ },+ "@babel/plugin-transform-react-jsx-source": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.22.5.tgz",+ "integrity": "sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w==",+ "dev": true,+ "requires": {+ "@babel/helper-plugin-utils": "^7.22.5"+ }+ },+ "@babel/template": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz",+ "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==",+ "dev": true,+ "requires": {+ "@babel/code-frame": "^7.22.5",+ "@babel/parser": "^7.22.5",+ "@babel/types": "^7.22.5"+ }+ },+ "@babel/traverse": {+ "version": "7.22.8",+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz",+ "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==",+ "dev": true,+ "requires": {+ "@babel/code-frame": "^7.22.5",+ "@babel/generator": "^7.22.7",+ "@babel/helper-environment-visitor": "^7.22.5",+ "@babel/helper-function-name": "^7.22.5",+ "@babel/helper-hoist-variables": "^7.22.5",+ "@babel/helper-split-export-declaration": "^7.22.6",+ "@babel/parser": "^7.22.7",+ "@babel/types": "^7.22.5",+ "debug": "^4.1.0",+ "globals": "^11.1.0"+ }+ },+ "@babel/types": {+ "version": "7.22.5",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz",+ "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==",+ "dev": true,+ "requires": {+ "@babel/helper-string-parser": "^7.22.5",+ "@babel/helper-validator-identifier": "^7.22.5",+ "to-fast-properties": "^2.0.0"+ }+ },+ "@esbuild/android-arm": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.12.tgz",+ "integrity": "sha512-LIxaNIQfkFZbTLb4+cX7dozHlAbAshhFE5PKdro0l+FnCpx1GDJaQ2WMcqm+ToXKMt8p8Uojk/MFRuGyz3V5Sw==",+ "dev": true,+ "optional": true+ },+ "@esbuild/android-arm64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.12.tgz",+ "integrity": "sha512-BMAlczRqC/LUt2P97E4apTBbkvS9JTJnp2DKFbCwpZ8vBvXVbNdqmvzW/OsdtI/+mGr+apkkpqGM8WecLkPgrA==",+ "dev": true,+ "optional": true+ },+ "@esbuild/android-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.12.tgz",+ "integrity": "sha512-zU5MyluNsykf5cOJ0LZZZjgAHbhPJ1cWfdH1ZXVMXxVMhEV0VZiZXQdwBBVvmvbF28EizeK7obG9fs+fpmS0eQ==",+ "dev": true,+ "optional": true+ },+ "@esbuild/darwin-arm64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.12.tgz",+ "integrity": "sha512-zUZMep7YONnp6954QOOwEBwFX9svlKd3ov6PkxKd53LGTHsp/gy7vHaPGhhjBmEpqXEXShi6dddjIkmd+NgMsA==",+ "dev": true,+ "optional": true+ },+ "@esbuild/darwin-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.12.tgz",+ "integrity": "sha512-ohqLPc7i67yunArPj1+/FeeJ7AgwAjHqKZ512ADk3WsE3FHU9l+m5aa7NdxXr0HmN1bjDlUslBjWNbFlD9y12Q==",+ "dev": true,+ "optional": true+ },+ "@esbuild/freebsd-arm64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.12.tgz",+ "integrity": "sha512-GIIHtQXqgeOOqdG16a/A9N28GpkvjJnjYMhOnXVbn3EDJcoItdR58v/pGN31CHjyXDc8uCcRnFWmqaJt24AYJg==",+ "dev": true,+ "optional": true+ },+ "@esbuild/freebsd-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.12.tgz",+ "integrity": "sha512-zK0b9a1/0wZY+6FdOS3BpZcPc1kcx2G5yxxfEJtEUzVxI6n/FrC2Phsxj/YblPuBchhBZ/1wwn7AyEBUyNSa6g==",+ "dev": true,+ "optional": true+ },+ "@esbuild/linux-arm": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.12.tgz",+ "integrity": "sha512-y75OijvrBE/1XRrXq1jtrJfG26eHeMoqLJ2dwQNwviwTuTtHGCojsDO6BJNF8gU+3jTn1KzJEMETytwsFSvc+Q==",+ "dev": true,+ "optional": true+ },+ "@esbuild/linux-arm64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.12.tgz",+ "integrity": "sha512-JKgG8Q/LL/9sw/iHHxQyVMoQYu3rU3+a5Z87DxC+wAu3engz+EmctIrV+FGOgI6gWG1z1+5nDDbXiRMGQZXqiw==",+ "dev": true,+ "optional": true+ },+ "@esbuild/linux-ia32": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.12.tgz",+ "integrity": "sha512-yoRIAqc0B4lDIAAEFEIu9ttTRFV84iuAl0KNCN6MhKLxNPfzwCBvEMgwco2f71GxmpBcTtn7KdErueZaM2rEvw==",+ "dev": true,+ "optional": true+ },+ "@esbuild/linux-loong64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.12.tgz",+ "integrity": "sha512-qYgt3dHPVvf/MgbIBpJ4Sup/yb9DAopZ3a2JgMpNKIHUpOdnJ2eHBo/aQdnd8dJ21X/+sS58wxHtA9lEazYtXQ==",+ "dev": true,+ "optional": true+ },+ "@esbuild/linux-mips64el": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.12.tgz",+ "integrity": "sha512-wHphlMLK4ufNOONqukELfVIbnGQJrHJ/mxZMMrP2jYrPgCRZhOtf0kC4yAXBwnfmULimV1qt5UJJOw4Kh13Yfg==",+ "dev": true,+ "optional": true+ },+ "@esbuild/linux-ppc64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.12.tgz",+ "integrity": "sha512-TeN//1Ft20ZZW41+zDSdOI/Os1bEq5dbvBvYkberB7PHABbRcsteeoNVZFlI0YLpGdlBqohEpjrn06kv8heCJg==",+ "dev": true,+ "optional": true+ },+ "@esbuild/linux-riscv64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.12.tgz",+ "integrity": "sha512-AgUebVS4DoAblBgiB2ACQ/8l4eGE5aWBb8ZXtkXHiET9mbj7GuWt3OnsIW/zX+XHJt2RYJZctbQ2S/mDjbp0UA==",+ "dev": true,+ "optional": true+ },+ "@esbuild/linux-s390x": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.12.tgz",+ "integrity": "sha512-dJ3Rb3Ei2u/ysSXd6pzleGtfDdc2MuzKt8qc6ls8vreP1G3B7HInX3i7gXS4BGeVd24pp0yqyS7bJ5NHaI9ing==",+ "dev": true,+ "optional": true+ },+ "@esbuild/linux-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.12.tgz",+ "integrity": "sha512-OrNJMGQbPaVyHHcDF8ybNSwu7TDOfX8NGpXCbetwOSP6txOJiWlgQnRymfC9ocR1S0Y5PW0Wb1mV6pUddqmvmQ==",+ "dev": true,+ "optional": true+ },+ "@esbuild/netbsd-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.12.tgz",+ "integrity": "sha512-55FzVCAiwE9FK8wWeCRuvjazNRJ1QqLCYGZVB6E8RuQuTeStSwotpSW4xoRGwp3a1wUsaVCdYcj5LGCASVJmMg==",+ "dev": true,+ "optional": true+ },+ "@esbuild/openbsd-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.12.tgz",+ "integrity": "sha512-qnluf8rfb6Y5Lw2tirfK2quZOBbVqmwxut7GPCIJsM8lc4AEUj9L8y0YPdLaPK0TECt4IdyBdBD/KRFKorlK3g==",+ "dev": true,+ "optional": true+ },+ "@esbuild/sunos-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.12.tgz",+ "integrity": "sha512-+RkKpVQR7bICjTOPUpkTBTaJ4TFqQBX5Ywyd/HSdDkQGn65VPkTsR/pL4AMvuMWy+wnXgIl4EY6q4mVpJal8Kg==",+ "dev": true,+ "optional": true+ },+ "@esbuild/win32-arm64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.12.tgz",+ "integrity": "sha512-GNHuciv0mFM7ouzsU0+AwY+7eV4Mgo5WnbhfDCQGtpvOtD1vbOiRjPYG6dhmMoFyBjj+pNqQu2X+7DKn0KQ/Gw==",+ "dev": true,+ "optional": true+ },+ "@esbuild/win32-ia32": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.12.tgz",+ "integrity": "sha512-kR8cezhYipbbypGkaqCTWIeu4zID17gamC8YTPXYtcN3E5BhhtTnwKBn9I0PJur/T6UVwIEGYzkffNL0lFvxEw==",+ "dev": true,+ "optional": true+ },+ "@esbuild/win32-x64": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.12.tgz",+ "integrity": "sha512-O0UYQVkvfM/jO8a4OwoV0mAKSJw+mjWTAd1MJd/1FCX6uiMdLmMRPK/w6e9OQ0ob2WGxzIm9va/KG0Ja4zIOgg==",+ "dev": true,+ "optional": true+ },+ "@jridgewell/gen-mapping": {+ "version": "0.3.3",+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",+ "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",+ "dev": true,+ "requires": {+ "@jridgewell/set-array": "^1.0.1",+ "@jridgewell/sourcemap-codec": "^1.4.10",+ "@jridgewell/trace-mapping": "^0.3.9"+ }+ },+ "@jridgewell/resolve-uri": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",+ "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",+ "dev": true+ },+ "@jridgewell/set-array": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",+ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",+ "dev": true+ },+ "@jridgewell/sourcemap-codec": {+ "version": "1.4.15",+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",+ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",+ "dev": true+ },+ "@jridgewell/trace-mapping": {+ "version": "0.3.18",+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz",+ "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==",+ "dev": true,+ "requires": {+ "@jridgewell/resolve-uri": "3.1.0",+ "@jridgewell/sourcemap-codec": "1.4.14"+ },+ "dependencies": {+ "@jridgewell/sourcemap-codec": {+ "version": "1.4.14",+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",+ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",+ "dev": true+ }+ }+ },+ "@notesnook/theme": {+ "version": "file:../../packages/theme",+ "requires": {+ "@emotion/react": "11.11.1",+ "@theme-ui/color": "^0.16.0",+ "@theme-ui/components": "0.14.7",+ "@theme-ui/core": "0.14.7",+ "@trpc/server": "^10.31.0",+ "@types/react": "17.0.2",+ "@types/tinycolor2": "^1.4.3",+ "isomorphic-fetch": "^3.0.0",+ "tinycolor2": "^1.4.2",+ "ts-json-schema-generator": "^1.2.0",+ "zustand": "^4.3.8"+ }+ },+ "@orama/orama": {+ "version": "1.0.8",+ "resolved": "https://registry.npmjs.org/@orama/orama/-/orama-1.0.8.tgz",+ "integrity": "sha512-UJvfnhCL4m4NQZFTs2kUDel67HHkzWCZJqF6Q4Dsx8hROXP82OXvPXsTXfHhHIyxtETdliEEkub1c6k6+36Gqw=="+ },+ "@trpc/server": {+ "version": "10.31.0",+ "resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.31.0.tgz",+ "integrity": "sha512-9EnRTSDE9nF11LZsvSOqNKqkRYzHqFX4ch5AJ6VIu8uta2vxVTN4FxxsNRSOluTzVYZDeaCISbwmOJ5iihCCIg=="+ },+ "@types/cors": {+ "version": "2.8.13",+ "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz",+ "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==",+ "dev": true,+ "requires": {+ "@types/node": "*"+ }+ },+ "@types/node": {+ "version": "20.4.2",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.2.tgz",+ "integrity": "sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw==",+ "dev": true+ },+ "@vitejs/plugin-react": {+ "version": "4.0.3",+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.0.3.tgz",+ "integrity": "sha512-pwXDog5nwwvSIzwrvYYmA2Ljcd/ZNlcsSG2Q9CNDBwnsd55UGAyr2doXtB5j+2uymRCnCfExlznzzSFbBRcoCg==",+ "dev": true,+ "requires": {+ "@babel/core": "^7.22.5",+ "@babel/plugin-transform-react-jsx-self": "^7.22.5",+ "@babel/plugin-transform-react-jsx-source": "^7.22.5",+ "react-refresh": "^0.14.0"+ }+ },+ "acorn": {+ "version": "8.10.0",+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",+ "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",+ "dev": true+ },+ "ansi-styles": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",+ "dev": true,+ "requires": {+ "color-convert": "^1.9.0"+ }+ },+ "async-mutex": {+ "version": "0.4.0",+ "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.0.tgz",+ "integrity": "sha512-eJFZ1YhRR8UN8eBLoNzcDPcy/jqjsg6I1AP+KvWQX80BqOSW1oJPJXDylPUEeMr2ZQvHgnQ//Lp6f3RQ1zI7HA==",+ "requires": {+ "tslib": "^2.4.0"+ }+ },+ "available-typed-arrays": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",+ "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw=="+ },+ "browserslist": {+ "version": "4.21.9",+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz",+ "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==",+ "dev": true,+ "requires": {+ "caniuse-lite": "^1.0.30001503",+ "electron-to-chromium": "^1.4.431",+ "node-releases": "^2.0.12",+ "update-browserslist-db": "^1.0.11"+ }+ },+ "cac": {+ "version": "6.7.14",+ "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",+ "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",+ "dev": true+ },+ "call-bind": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",+ "requires": {+ "function-bind": "^1.1.1",+ "get-intrinsic": "^1.0.2"+ }+ },+ "caniuse-lite": {+ "version": "1.0.30001516",+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001516.tgz",+ "integrity": "sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==",+ "dev": true+ },+ "chalk": {+ "version": "2.4.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",+ "dev": true,+ "requires": {+ "ansi-styles": "^3.2.1",+ "escape-string-regexp": "^1.0.5",+ "supports-color": "^5.3.0"+ }+ },+ "color-convert": {+ "version": "1.9.3",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",+ "dev": true,+ "requires": {+ "color-name": "1.1.3"+ }+ },+ "color-name": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",+ "dev": true+ },+ "convert-source-map": {+ "version": "1.9.0",+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",+ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",+ "dev": true+ },+ "cors": {+ "version": "2.8.5",+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",+ "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",+ "requires": {+ "object-assign": "^4",+ "vary": "^1"+ }+ },+ "debug": {+ "version": "4.3.4",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",+ "dev": true,+ "requires": {+ "ms": "2.1.2"+ }+ },+ "electron-to-chromium": {+ "version": "1.4.461",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.461.tgz",+ "integrity": "sha512-1JkvV2sgEGTDXjdsaQCeSwYYuhLRphRpc+g6EHTFELJXEiznLt3/0pZ9JuAOQ5p2rI3YxKTbivtvajirIfhrEQ==",+ "dev": true+ },+ "esbuild": {+ "version": "0.18.12",+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.12.tgz",+ "integrity": "sha512-XuOVLDdtsDslXStStduT41op21Ytmf4/BDS46aa3xPJ7X5h2eMWBF1oAe3QjUH3bDksocNXgzGUZ7XHIBya6Tg==",+ "dev": true,+ "requires": {+ "@esbuild/android-arm": "0.18.12",+ "@esbuild/android-arm64": "0.18.12",+ "@esbuild/android-x64": "0.18.12",+ "@esbuild/darwin-arm64": "0.18.12",+ "@esbuild/darwin-x64": "0.18.12",+ "@esbuild/freebsd-arm64": "0.18.12",+ "@esbuild/freebsd-x64": "0.18.12",+ "@esbuild/linux-arm": "0.18.12",+ "@esbuild/linux-arm64": "0.18.12",+ "@esbuild/linux-ia32": "0.18.12",+ "@esbuild/linux-loong64": "0.18.12",+ "@esbuild/linux-mips64el": "0.18.12",+ "@esbuild/linux-ppc64": "0.18.12",+ "@esbuild/linux-riscv64": "0.18.12",+ "@esbuild/linux-s390x": "0.18.12",+ "@esbuild/linux-x64": "0.18.12",+ "@esbuild/netbsd-x64": "0.18.12",+ "@esbuild/openbsd-x64": "0.18.12",+ "@esbuild/sunos-x64": "0.18.12",+ "@esbuild/win32-arm64": "0.18.12",+ "@esbuild/win32-ia32": "0.18.12",+ "@esbuild/win32-x64": "0.18.12"+ }+ },+ "escalade": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",+ "dev": true+ },+ "escape-string-regexp": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",+ "dev": true+ },+ "for-each": {+ "version": "0.3.3",+ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",+ "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",+ "requires": {+ "is-callable": "^1.1.3"+ }+ },+ "fsevents": {+ "version": "2.3.2",+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",+ "dev": true,+ "optional": true+ },+ "function-bind": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="+ },+ "gensync": {+ "version": "1.0.0-beta.2",+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",+ "dev": true+ },+ "get-intrinsic": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",+ "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",+ "requires": {+ "function-bind": "^1.1.1",+ "has": "^1.0.3",+ "has-proto": "^1.0.1",+ "has-symbols": "^1.0.3"+ }+ },+ "globals": {+ "version": "11.12.0",+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",+ "dev": true+ },+ "gopd": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",+ "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",+ "requires": {+ "get-intrinsic": "^1.1.3"+ }+ },+ "has": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",+ "requires": {+ "function-bind": "^1.1.1"+ }+ },+ "has-flag": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",+ "dev": true+ },+ "has-proto": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",+ "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg=="+ },+ "has-symbols": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="+ },+ "has-tostringtag": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",+ "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",+ "requires": {+ "has-symbols": "^1.0.2"+ }+ },+ "inherits": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="+ },+ "is-arguments": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",+ "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==",+ "requires": {+ "call-bind": "^1.0.2",+ "has-tostringtag": "^1.0.0"+ }+ },+ "is-callable": {+ "version": "1.2.7",+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",+ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA=="+ },+ "is-generator-function": {+ "version": "1.0.10",+ "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz",+ "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==",+ "requires": {+ "has-tostringtag": "^1.0.0"+ }+ },+ "is-typed-array": {+ "version": "1.1.10",+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz",+ "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==",+ "requires": {+ "available-typed-arrays": "^1.0.5",+ "call-bind": "^1.0.2",+ "for-each": "^0.3.3",+ "gopd": "^1.0.1",+ "has-tostringtag": "^1.0.0"+ }+ },+ "js-tokens": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",+ "dev": true+ },+ "jsesc": {+ "version": "2.5.2",+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",+ "dev": true+ },+ "json5": {+ "version": "2.2.3",+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",+ "dev": true+ },+ "jsonc-parser": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",+ "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",+ "dev": true+ },+ "loose-envify": {+ "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"+ }+ },+ "lru-cache": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",+ "dev": true,+ "requires": {+ "yallist": "^3.0.2"+ }+ },+ "mlly": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.0.tgz",+ "integrity": "sha512-ua8PAThnTwpprIaU47EPeZ/bPUVp2QYBbWMphUQpVdBI3Lgqzm5KZQ45Agm3YJedHXaIHl6pBGabaLSUPPSptg==",+ "dev": true,+ "requires": {+ "acorn": "^8.9.0",+ "pathe": "^1.1.1",+ "pkg-types": "^1.0.3",+ "ufo": "^1.1.2"+ }+ },+ "ms": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",+ "dev": true+ },+ "nanoid": {+ "version": "3.3.6",+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",+ "dev": true+ },+ "node-releases": {+ "version": "2.0.13",+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz",+ "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==",+ "dev": true+ },+ "object-assign": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="+ },+ "pathe": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz",+ "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==",+ "dev": true+ },+ "picocolors": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",+ "dev": true+ },+ "pkg-types": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz",+ "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==",+ "dev": true,+ "requires": {+ "jsonc-parser": "^3.2.0",+ "mlly": "^1.2.0",+ "pathe": "^1.1.0"+ }+ },+ "postcss": {+ "version": "8.4.25",+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.25.tgz",+ "integrity": "sha512-7taJ/8t2av0Z+sQEvNzCkpDynl0tX3uJMCODi6nT3PfASC7dYCWV9aQ+uiCf+KBD4SEFcu+GvJdGdwzQ6OSjCw==",+ "dev": true,+ "requires": {+ "nanoid": "^3.3.6",+ "picocolors": "^1.0.0",+ "source-map-js": "^1.0.2"+ }+ },+ "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-refresh": {+ "version": "0.14.0",+ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz",+ "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==",+ "dev": true+ },+ "rollup": {+ "version": "3.26.2",+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.2.tgz",+ "integrity": "sha512-6umBIGVz93er97pMgQO08LuH3m6PUb3jlDUUGFsNJB6VgTCUaDFpupf5JfU30529m/UKOgmiX+uY6Sx8cOYpLA==",+ "dev": true,+ "requires": {+ "fsevents": "~2.3.2"+ }+ },+ "semver": {+ "version": "6.3.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",+ "dev": true+ },+ "source-map-js": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",+ "dev": true+ },+ "supports-color": {+ "version": "5.5.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",+ "dev": true,+ "requires": {+ "has-flag": "^3.0.0"+ }+ },+ "to-fast-properties": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",+ "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",+ "dev": true+ },+ "tslib": {+ "version": "2.6.0",+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",+ "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA=="+ },+ "ufo": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.2.tgz",+ "integrity": "sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==",+ "dev": true+ },+ "update-browserslist-db": {+ "version": "1.0.11",+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz",+ "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==",+ "dev": true,+ "requires": {+ "escalade": "^3.1.1",+ "picocolors": "^1.0.0"+ }+ },+ "util": {+ "version": "0.12.5",+ "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz",+ "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==",+ "requires": {+ "inherits": "^2.0.3",+ "is-arguments": "^1.0.4",+ "is-generator-function": "^1.0.7",+ "is-typed-array": "^1.1.3",+ "which-typed-array": "^1.1.2"+ }+ },+ "vary": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="+ },+ "vite": {+ "version": "4.4.3",+ "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.3.tgz",+ "integrity": "sha512-IMnXQXXWgLi5brBQx/4WzDxdzW0X3pjO4nqFJAuNvwKtxzAmPzFE1wszW3VDpAGQJm3RZkm/brzRdyGsnwgJIA==",+ "dev": true,+ "requires": {+ "esbuild": "^0.18.10",+ "fsevents": "~2.3.2",+ "postcss": "^8.4.25",+ "rollup": "^3.25.2"+ }+ },+ "vite-node": {+ "version": "0.33.0",+ "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.33.0.tgz",+ "integrity": "sha512-19FpHYbwWWxDr73ruNahC+vtEdza52kA90Qb3La98yZ0xULqV8A5JLNPUff0f5zID4984tW7l3DH2przTJUZSw==",+ "dev": true,+ "requires": {+ "cac": "^6.7.14",+ "debug": "^4.3.4",+ "mlly": "^1.4.0",+ "pathe": "^1.1.1",+ "picocolors": "^1.0.0",+ "vite": "^3.0.0 || ^4.0.0"+ }+ },+ "which-typed-array": {+ "version": "1.1.9",+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz",+ "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==",+ "requires": {+ "available-typed-arrays": "^1.0.5",+ "call-bind": "^1.0.2",+ "for-each": "^0.3.3",+ "gopd": "^1.0.1",+ "has-tostringtag": "^1.0.0",+ "is-typed-array": "^1.1.10"+ }+ },+ "yallist": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",+ "dev": true+ },+ "zod": {+ "version": "3.21.4",+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz",+ "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw=="+ }+ }+}diff --git a/servers/themes/package.json b/servers/themes/package.jsonnew file mode 100644index 000000000..128a9afd3--- /dev/null+++ b/servers/themes/package.json@@ -0,0 +1,27 @@+{+ "name": "@notesnook/themes-server",+ "version": "1.0.0",+ "description": "A simple rest api for notesnook themes",+ "private": "true",+ "main": "src/index.ts",+ "scripts": {+ "start": "vite-node -w src/server.ts"+ },+ "author": "",+ "license": "ISC",+ "dependencies": {+ "@orama/orama": "^1.0.8",+ "@trpc/server": "10.31.0",+ "async-mutex": "^0.4.0",+ "cors": "^2.8.5",+ "util": "^0.12.5",+ "zod": "^3.21.4"+ },+ "devDependencies": {+ "@notesnook/theme": "file:../../packages/theme",+ "@types/cors": "^2.8.13",+ "@vitejs/plugin-react": "^4.0.3",+ "react": "17.0.2",+ "vite-node": "^0.33.0"+ }+}diff --git a/servers/themes/src/api.ts b/servers/themes/src/api.tsnew file mode 100644index 000000000..2aa810856--- /dev/null+++ b/servers/themes/src/api.ts@@ -0,0 +1,63 @@+/*+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 { z } from "zod";+import { InstallsCounter } from "./constants";+import { findTheme, getThemes } from "./orama";+import { syncThemes } from "./sync";+import { publicProcedure, router } from "./trpc";+import { THEME_COMPATIBILITY_VERSION } from "@notesnook/theme";+import { ThemeQuerySchema } from "./schemas";++export const ThemesAPI = router({+ themes: publicProcedure.input(ThemeQuerySchema).query(async ({ input }) => {+ return getThemes(input);+ }),+ installTheme: publicProcedure+ .input(+ z.object({+ id: z.string(),+ userId: z.string().optional(),+ compatibilityVersion: z.number().default(THEME_COMPATIBILITY_VERSION)+ })+ )+ .query(async ({ input: { compatibilityVersion, id, userId } }) => {+ const theme = await findTheme(id, compatibilityVersion);+ if (!theme) return;++ if (userId) await InstallsCounter.increment(theme.id, userId);+ return theme;+ }),+ updateTheme: publicProcedure+ .input(+ z.object({+ id: z.string(),+ version: z.number(),+ compatibilityVersion: z.number()+ })+ )+ .query(async ({ input: { id, version, compatibilityVersion } }) => {+ const theme = await findTheme(id, compatibilityVersion);+ if (theme && theme.version !== version) return theme;+ }),+ sync: publicProcedure.query(() => {+ syncThemes();+ return true;+ })+});diff --git a/servers/themes/src/constants.ts b/servers/themes/src/constants.tsnew file mode 100644index 000000000..b7b30d261--- /dev/null+++ b/servers/themes/src/constants.ts@@ -0,0 +1,29 @@+/*+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 path from "path";+import { Counter } from "./counter";++export const THEMES_REPO_URL = `https://github.com/streetwriters/notesnook-themes.git`;+export const THEME_REPO_DIR_NAME = "notesnook-themes";+export const THEME_METADATA_JSON = path.join(__dirname, "themes-metadata.json");+export const THEME_REPO_DIR_PATH = path.resolve(+ path.join(__dirname, "..", THEME_REPO_DIR_NAME)+);+export const InstallsCounter = new Counter("installs", path.dirname(__dirname));diff --git a/servers/themes/src/counter.ts b/servers/themes/src/counter.tsnew file mode 100644index 000000000..83205c987--- /dev/null+++ b/servers/themes/src/counter.ts@@ -0,0 +1,54 @@+/*+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 { readFile, writeFile } from "fs/promises";+import path from "path";+import { Mutex } from "async-mutex";++type Counts = Record<string, string[]>;+export class Counter {+ private path: string;+ private readonly mutex: Mutex;+ constructor(id: string, baseDirectory: string) {+ this.path = path.join(baseDirectory, `${id}.json`);+ this.mutex = new Mutex();+ }++ async increment(key: string, uid: string) {+ await this.mutex.runExclusive(async () => {+ const counts = await this.counts();+ counts[key] = counts[key] || [];+ if (counts[key].includes(uid)) return;+ counts[key].push(uid);+ await this.save(counts);+ });+ }++ private async save(counts: Counts) {+ await writeFile(this.path, JSON.stringify(counts));+ }++ async counts(): Promise<Counts> {+ try {+ return JSON.parse(await readFile(this.path, "utf-8"));+ } catch {+ return {};+ }+ }+}diff --git a/packages/theme/src/theme/transformer/index.ts b/servers/themes/src/index.tssimilarity index 73%rename from packages/theme/src/theme/transformer/index.tsrename to servers/themes/src/index.tsindex d25f60c35..386d0f85c 100644--- a/packages/theme/src/theme/transformer/index.ts+++ b/servers/themes/src/index.ts@@ -17,16 +17,7 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { Theme } from "..";-import css from "./css";+import { ThemesAPI } from "./api";-const transformers = {- css: css-};--export type Transformers = keyof typeof transformers;-export class TransformerFactory {- construct(type: Transformers, theme: Theme) {- return transformers[type](theme);- }-}+export type ThemesRouter = typeof ThemesAPI;+export type { CompiledThemeDefinition, ThemeMetadata } from "./sync";diff --git a/servers/themes/src/orama.ts b/servers/themes/src/orama.tsnew file mode 100644index 000000000..67f67e398--- /dev/null+++ b/servers/themes/src/orama.ts@@ -0,0 +1,166 @@+/*+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 { Orama, SearchParams, create, search } from "@orama/orama";+import { CompiledThemeDefinition, ThemeMetadata } from "./sync";+import { ThemeQuerySchema } from "./schemas";++export let ThemesDatabase: Orama | null = null;+export async function initializeDatabase(): Promise<Orama> {+ ThemesDatabase = await create({+ schema: {+ id: "string",+ name: "string",+ authors: { name: "string", email: "string", url: "string" },+ colorScheme: "string",+ compatibilityVersion: "number",+ description: "string",+ tags: "string[]"+ },+ id: "notesnook-themes"+ });+ return ThemesDatabase;+}++export async function findTheme(+ id: string,+ compatibilityVersion: number+): Promise<CompiledThemeDefinition | undefined> {+ if (!ThemesDatabase) await initializeDatabase();++ const results = await search(ThemesDatabase!, {+ term: "",+ where: {+ id,+ compatibilityVersion: { eq: compatibilityVersion }+ }+ });+ console.log("EHLO");+ return results.hits[0].document as CompiledThemeDefinition;+}++export async function getThemes(query: (typeof ThemeQuerySchema)["_type"]) {+ if (!ThemesDatabase) await initializeDatabase();++ const from = query.cursor;+ const count = query.limit;++ const searchParams: SearchParams = {+ where: {+ compatibilityVersion: {+ eq: query.compatibilityVersion+ }+ }+ };+ for (const filter of query.filters || []) {+ switch (filter.type) {+ case "term":+ searchParams.term = filter.value;+ searchParams.properties = [+ "name",+ "authors.name",+ "description",+ "tags",+ "id"+ ];+ break;+ case "colorScheme":+ searchParams.where = {+ ...searchParams.where,+ colorScheme: filter.value+ };+ break;+ }+ }+ const results = await search(ThemesDatabase!, searchParams);+ // results.hits = [+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits,+ // ...results.hits+ // ];++ const themes = results.hits+ .map((hit) => {+ return {+ ...(hit.document as CompiledThemeDefinition),+ scope: undefined,+ codeBlockCSS: undefined+ } as ThemeMetadata;+ })+ .slice(from, from + count);++ return {+ themes,+ nextCursor: (from + count < results.hits.length+ ? from + count+ : undefined) as number | undefined+ };+}diff --git a/packages/theme/src/themeprovider.ts b/servers/themes/src/schemas.tssimilarity index 63%rename from packages/theme/src/themeprovider.tsrename to servers/themes/src/schemas.tsindex 39acf631a..bf1c16aa9 100644--- a/packages/theme/src/themeprovider.ts+++ b/servers/themes/src/schemas.ts@@ -17,20 +17,19 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import ThemeFactory from "./theme";-import { ThemeConfig } from "./theme/types";-import { injectCss } from "./css";--const factory = new ThemeFactory();--export function useTheme(config: ThemeConfig, inject = true) {- const { theme, accent } = config;-- const themeProperties = factory.construct({- theme,- accent- });- if (inject) injectCss(factory.transform("css", themeProperties));-- return themeProperties;-}+import { THEME_COMPATIBILITY_VERSION } from "@notesnook/theme";+import { z } from "zod";++export const ThemeQuerySchema = z.object({+ filters: z+ .array(+ z.object({+ type: z.enum(["term", "colorScheme"]),+ value: z.string()+ })+ )+ .optional(),+ limit: z.number(),+ cursor: z.number().default(0),+ compatibilityVersion: z.number().default(THEME_COMPATIBILITY_VERSION)+});diff --git a/servers/themes/src/server.ts b/servers/themes/src/server.tsnew file mode 100644index 000000000..3a5178179--- /dev/null+++ b/servers/themes/src/server.ts@@ -0,0 +1,39 @@+/*+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 { createHTTPServer } from "@trpc/server/adapters/standalone";+import { ThemesAPI } from "./api";+import { syncThemes } from "./sync";+import cors from "cors";++const server = createHTTPServer({+ middleware: cors(),+ router: ThemesAPI+});+const PORT = parseInt(process.env.PORT || "9000");+server.listen(PORT);+console.log(`Server started successfully on: http://localhost:${PORT}/`);++syncThemes();++if (import.meta.hot) {+ import.meta.hot.on("vite:beforeFullReload", () => {+ server.server.close();+ });+}diff --git a/servers/themes/src/sync.ts b/servers/themes/src/sync.tsnew file mode 100644index 000000000..98b679378--- /dev/null+++ b/servers/themes/src/sync.ts@@ -0,0 +1,106 @@+/*+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 { execSync } from "child_process";+import fs from "fs";+import { readdir, readFile } from "fs/promises";+import path from "path";+import {+ InstallsCounter,+ THEMES_REPO_URL,+ THEME_REPO_DIR_PATH+} from "./constants";+import { insertMultiple } from "@orama/orama";+import { initializeDatabase } from "./orama";+import {+ ThemeCompatibilityVersion,+ ThemeDefinition,+ PreviewColors,+ getPreviewColors+} from "@notesnook/theme";++export type CompiledThemeDefinition = ThemeDefinition & {+ sourceURL?: string;+ totalInstalls?: number;+ previewColors: PreviewColors;+};++export type ThemeMetadata = Omit<+ CompiledThemeDefinition,+ "scopes" | "codeBlockCSS"+>;++const THEME_COMPATIBILITY_VERSIONS: ThemeCompatibilityVersion[] = [1];++export async function syncThemes() {+ if (!fs.existsSync(THEME_REPO_DIR_PATH)) {+ execSync(`git clone ${THEMES_REPO_URL}`, {+ stdio: [0, 1, 2],+ cwd: path.dirname(THEME_REPO_DIR_PATH)+ });+ console.log(`Cloned github repo to path ${THEME_REPO_DIR_PATH}`);+ } else {+ execSync(`git pull`, {+ stdio: [0, 1, 2],+ cwd: THEME_REPO_DIR_PATH+ });+ console.log(`Synced github repo ${THEMES_REPO_URL}`);+ }+ await generateThemesMetadata();+}++async function generateThemesMetadata() {+ const themeDefinitions: CompiledThemeDefinition[] = [];+ const db = await initializeDatabase();++ const THEMES_PATH = path.join(THEME_REPO_DIR_PATH, "themes");+ const themes = await readdir(THEMES_PATH);+ const counts = await InstallsCounter.counts();++ for (const themeId of themes) {+ for (const version of THEME_COMPATIBILITY_VERSIONS) {+ const themeDirectory = path.join(THEMES_PATH, themeId, `v${version}`);+ const themeFilePath = path.join(themeDirectory, "theme.json");+ const theme: ThemeDefinition = JSON.parse(+ await readFile(themeFilePath, "utf-8")+ );+ const hasCodeBlockCSS = fs.existsSync(+ path.join(themeDirectory, "code-block.css")+ );+ const codeBlockCSS = await readFile(+ path.join(+ THEMES_PATH,+ hasCodeBlockCSS ? themeId : `default-${theme.colorScheme}`,+ `v${version}`,+ "code-block.css"+ ),+ "utf-8"+ );++ themeDefinitions.push({+ ...theme,+ sourceURL: `https://github.com/streetwriters/notesnook-themes/tree/main/themes/${themeId}/v${version}/`,+ codeBlockCSS,+ totalInstalls: counts[theme.id]?.length || 0,+ previewColors: getPreviewColors(theme)+ });+ }+ }+ await insertMultiple(db, themeDefinitions);+ console.log("Metadata generated and cached.");+}diff --git a/packages/editor/src/components/theme-provider/index.tsx b/servers/themes/src/trpc.tssimilarity index 65%rename from packages/editor/src/components/theme-provider/index.tsxrename to servers/themes/src/trpc.tsindex 9bc4ae5f5..c76d638f5 100644--- a/packages/editor/src/components/theme-provider/index.tsx+++ b/servers/themes/src/trpc.ts@@ -17,15 +17,17 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";-import { PropsWithChildren } from "react";-import { useTheme } from "../../toolbar/stores/toolbar-store";+import { initTRPC } from "@trpc/server";-export function ThemeProvider(props: PropsWithChildren<unknown>) {- const theme = useTheme();- return (- <EmotionThemeProvider theme={theme || {}}>- {props.children}- </EmotionThemeProvider>- );-}+/**+ * Initialization of tRPC backend+ * Should be done only once per backend!+ */+const t = initTRPC.create();++/**+ * Export reusable router and procedure helpers+ * that can be used throughout the router+ */+export const router = t.router;+export const publicProcedure = t.procedure;diff --git a/servers/themes/tsconfig.json b/servers/themes/tsconfig.jsonnew file mode 100644index 000000000..a97e43c04--- /dev/null+++ b/servers/themes/tsconfig.json@@ -0,0 +1,7 @@+{+ "extends": "../../tsconfig",+ "compilerOptions": {+ "outDir": "./dist"+ },+ "include": ["src/", "global.d.ts"]+}diff --git a/packages/theme/src/theme/transformer/css.ts b/servers/themes/vite.config.tssimilarity index 71%rename from packages/theme/src/theme/transformer/css.tsrename to servers/themes/vite.config.tsindex 7bdbc798b..97a06d2eb 100644--- a/packages/theme/src/theme/transformer/css.ts+++ b/servers/themes/vite.config.ts@@ -17,14 +17,13 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { Theme } from "..";-import { SchemeColors } from "../colorscheme";+import { defineConfig } from "vite";+import react from "@vitejs/plugin-react";-function transform(theme: Theme) {- let root = ":root {";- for (const color in theme.colors) {- root += `--${color}: ${theme.colors[color as keyof SchemeColors]};`;- }- return root + "}";-}-export default transform;+export default defineConfig({+ plugins: [+ react({+ jsxRuntime: "classic"+ })+ ]+});