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
chore: use remote packages
thecodrr3a886b6205df
diff --git a/packages/editor/dist/components/menu/menuitem.d.ts b/packages/editor/dist/components/menu/menuitem.d.tsindex 75b94e9ac..9348c2448 100644--- a/packages/editor/dist/components/menu/menuitem.d.ts+++ b/packages/editor/dist/components/menu/menuitem.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { MenuItem } from "./types";declare type MenuItemProps = {item: MenuItem;diff --git a/packages/editor/dist/components/menu/types.d.ts b/packages/editor/dist/components/menu/types.d.tsindex c534ec56a..843b21a8f 100644--- a/packages/editor/dist/components/menu/types.d.ts+++ b/packages/editor/dist/components/menu/types.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { IconNames } from "../../toolbar/icons";declare type MenuItemComponentProps = {onClick?: (e?: any) => void;diff --git a/packages/editor/dist/components/toggle/index.d.ts b/packages/editor/dist/components/toggle/index.d.tsindex d6e492445..38abf648a 100644--- a/packages/editor/dist/components/toggle/index.d.ts+++ b/packages/editor/dist/components/toggle/index.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { ToggleProps } from "react-toggle";import "react-toggle/style.css";export declare function Toggle(props: ToggleProps): JSX.Element;diff --git a/packages/editor/dist/extensions/attachment/component.d.ts b/packages/editor/dist/extensions/attachment/component.d.tsindex 7fee9f4e1..64ba9b1d8 100644--- a/packages/editor/dist/extensions/attachment/component.d.ts+++ b/packages/editor/dist/extensions/attachment/component.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { Attachment } from "./attachment";import { ReactNodeViewProps } from "../react";export declare function AttachmentComponent(props: ReactNodeViewProps<Attachment>): JSX.Element;diff --git a/packages/editor/dist/extensions/codeblock/component.d.ts b/packages/editor/dist/extensions/codeblock/component.d.tsindex 54e13f8bb..e46355fa2 100644--- a/packages/editor/dist/extensions/codeblock/component.d.ts+++ b/packages/editor/dist/extensions/codeblock/component.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import "prism-themes/themes/prism-dracula.min.css";import { CodeBlockAttributes } from "./code-block";import { ReactNodeViewProps } from "../react/types";diff --git a/packages/editor/dist/extensions/embed/component.d.ts b/packages/editor/dist/extensions/embed/component.d.tsindex 70c58dc23..6e14c0ab6 100644--- a/packages/editor/dist/extensions/embed/component.d.ts+++ b/packages/editor/dist/extensions/embed/component.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { EmbedAlignmentOptions, EmbedAttributes } from "./embed";import { ReactNodeViewProps } from "../react";export declare function EmbedComponent(props: ReactNodeViewProps<EmbedAttributes & EmbedAlignmentOptions>): JSX.Element;diff --git a/packages/editor/dist/extensions/image/component.d.ts b/packages/editor/dist/extensions/image/component.d.tsindex af8c4ee3e..dddb30e41 100644--- a/packages/editor/dist/extensions/image/component.d.ts+++ b/packages/editor/dist/extensions/image/component.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { ImageAlignmentOptions, ImageAttributes } from "./image";import { ReactNodeViewProps } from "../react";export declare function ImageComponent(props: ReactNodeViewProps<ImageAttributes & ImageAlignmentOptions>): JSX.Element;diff --git a/packages/editor/dist/extensions/link/index.d.ts b/packages/editor/dist/extensions/link/index.d.tsnew file mode 100644index 000000000..b8304046c--- /dev/null+++ b/packages/editor/dist/extensions/link/index.d.ts@@ -0,0 +1,3 @@+import { Link } from "./link";+export * from "./link";+export default Link;diff --git a/packages/editor/dist/extensions/link/index.js b/packages/editor/dist/extensions/link/index.jsnew file mode 100644index 000000000..b8304046c--- /dev/null+++ b/packages/editor/dist/extensions/link/index.js@@ -0,0 +1,3 @@+import { Link } from "./link";+export * from "./link";+export default Link;diff --git a/packages/editor/dist/extensions/link/link.d.ts b/packages/editor/dist/extensions/link/link.d.tsnew file mode 100644index 000000000..4a9b9a909--- /dev/null+++ b/packages/editor/dist/extensions/link/link.d.ts@@ -0,0 +1 @@+export declare const Link: import("@tiptap/core").Mark<import("@tiptap/extension-link").LinkOptions, any>;diff --git a/packages/editor/dist/extensions/link/link.js b/packages/editor/dist/extensions/link/link.jsnew file mode 100644index 000000000..35ac3919e--- /dev/null+++ b/packages/editor/dist/extensions/link/link.js@@ -0,0 +1,23 @@+import TiptapLink from "@tiptap/extension-link";+export var Link = TiptapLink.extend({+// addProseMirrorPlugins() {+// return [+// ...(this.parent?.() || []),+// new Plugin({+// key: new PluginKey("hoverHandler"),+// props: {+// handleDOMEvents: {+// mouseover: (view, event) => {+// if (+// event.target instanceof HTMLElement &&+// event.target.nodeName === "A"+// ) {+// console.log("Got it!");+// }+// },+// },+// },+// }),+// ];+// },+});diff --git a/packages/editor/dist/extensions/taskitem/component.d.ts b/packages/editor/dist/extensions/taskitem/component.d.tsindex 0a2a6f514..b01ab35de 100644--- a/packages/editor/dist/extensions/taskitem/component.d.ts+++ b/packages/editor/dist/extensions/taskitem/component.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { ReactNodeViewProps } from "../react";import { TaskItemAttributes } from "./task-item";export declare function TaskItemComponent(props: ReactNodeViewProps<TaskItemAttributes>): JSX.Element;diff --git a/packages/editor/dist/extensions/tasklist/component.d.ts b/packages/editor/dist/extensions/tasklist/component.d.tsindex 117e0bb94..5cc94955c 100644--- a/packages/editor/dist/extensions/tasklist/component.d.ts+++ b/packages/editor/dist/extensions/tasklist/component.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { ReactNodeViewProps } from "../react";import { TaskListAttributes } from "./task-list";export declare function TaskListComponent(props: ReactNodeViewProps<TaskListAttributes>): JSX.Element;diff --git a/packages/editor/dist/index.js b/packages/editor/dist/index.jsindex fbae2dfa6..4ab0180d4 100644--- a/packages/editor/dist/index.js+++ b/packages/editor/dist/index.js@@ -39,7 +39,6 @@ import BulletList from "./extensions/bullet-list";import OrderedList from "./extensions/ordered-list";import Highlight from "@tiptap/extension-highlight";import Color from "@tiptap/extension-color";-import Link from "@tiptap/extension-link";import Table from "@tiptap/extension-table";import TableRow from "@tiptap/extension-table-row";import TableCell from "./extensions/table-cell";@@ -53,6 +52,7 @@ import { SearchReplace } from "./extensions/search-replace";import { EmbedNode } from "./extensions/embed";import { CodeBlock } from "./extensions/code-block";import { ListItem } from "./extensions/list-item";+import { Link } from "./extensions/link";import { EventDispatcher } from "./extensions/react";EditorView.prototype.updateState = function updateState(state) {if (!this.docView)diff --git a/packages/editor/dist/toolbar/components/icon.d.ts b/packages/editor/dist/toolbar/components/icon.d.tsindex b93bea97a..2cf292b4a 100644--- a/packages/editor/dist/toolbar/components/icon.d.ts+++ b/packages/editor/dist/toolbar/components/icon.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { Theme } from "@notesnook/theme";import { SchemeColors } from "@notesnook/theme/dist/theme/colorscheme";import { FlexProps } from "rebass";diff --git a/packages/editor/dist/toolbar/floatingmenus/index.d.ts b/packages/editor/dist/toolbar/floatingmenus/index.d.tsindex 62d6f695a..b02c024c2 100644--- a/packages/editor/dist/toolbar/floatingmenus/index.d.ts+++ b/packages/editor/dist/toolbar/floatingmenus/index.d.ts@@ -1,2 +1,3 @@+/// <reference types="react" />import { FloatingMenuProps } from "./types";export declare function EditorFloatingMenus(props: FloatingMenuProps): JSX.Element;diff --git a/packages/editor/dist/toolbar/floatingmenus/searchreplace.d.ts b/packages/editor/dist/toolbar/floatingmenus/searchreplace.d.tsindex 9f4f82918..78197e973 100644--- a/packages/editor/dist/toolbar/floatingmenus/searchreplace.d.ts+++ b/packages/editor/dist/toolbar/floatingmenus/searchreplace.d.ts@@ -1,2 +1,3 @@+/// <reference types="react" />import { FloatingMenuProps } from "./types";export declare function SearchReplaceFloatingMenu(props: FloatingMenuProps): JSX.Element | null;diff --git a/packages/editor/dist/toolbar/floatingmenus/table/table.d.ts b/packages/editor/dist/toolbar/floatingmenus/table/table.d.tsindex e0696aacc..2ac8450ec 100644--- a/packages/editor/dist/toolbar/floatingmenus/table/table.d.ts+++ b/packages/editor/dist/toolbar/floatingmenus/table/table.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { FloatingMenuProps } from "../types";export declare function TableRowFloatingMenu(props: FloatingMenuProps): JSX.Element | null;export declare function TableColumnFloatingMenu(props: FloatingMenuProps): JSX.Element | null;diff --git a/packages/editor/dist/toolbar/floatingmenus/table/tools.d.ts b/packages/editor/dist/toolbar/floatingmenus/table/tools.d.tsindex c6c5e8dd1..ff7bd737e 100644--- a/packages/editor/dist/toolbar/floatingmenus/table/tools.d.ts+++ b/packages/editor/dist/toolbar/floatingmenus/table/tools.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { ToolButtonProps } from "../../components/tool-button";import { ToolProps } from "../../types";declare type TableToolProps = ToolProps & {diff --git a/packages/editor/dist/toolbar/popups/cellproperties.d.ts b/packages/editor/dist/toolbar/popups/cellproperties.d.tsindex ea38c5212..d116c136d 100644--- a/packages/editor/dist/toolbar/popups/cellproperties.d.ts+++ b/packages/editor/dist/toolbar/popups/cellproperties.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { Editor } from "@tiptap/core";declare type CellPropertiesProps = {editor: Editor;diff --git a/packages/editor/dist/toolbar/popups/embedpopup.d.ts b/packages/editor/dist/toolbar/popups/embedpopup.d.tsindex 51b8f03fb..dd78097a9 100644--- a/packages/editor/dist/toolbar/popups/embedpopup.d.ts+++ b/packages/editor/dist/toolbar/popups/embedpopup.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { EmbedAlignmentOptions, EmbedAttributes, EmbedSizeOptions } from "../../extensions/embed";import { IconNames } from "../icons";declare type Embed = Required<EmbedAttributes> & EmbedAlignmentOptions;diff --git a/packages/editor/dist/toolbar/popups/imageproperties.d.ts b/packages/editor/dist/toolbar/popups/imageproperties.d.tsindex f44695dc4..608647e46 100644--- a/packages/editor/dist/toolbar/popups/imageproperties.d.ts+++ b/packages/editor/dist/toolbar/popups/imageproperties.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { ImageAlignmentOptions, ImageSizeOptions } from "../../extensions/image";import { Editor } from "@tiptap/core";export declare type ImagePropertiesProps = ImageSizeOptions & ImageAlignmentOptions & {diff --git a/packages/editor/dist/toolbar/popups/searchreplace.d.ts b/packages/editor/dist/toolbar/popups/searchreplace.d.tsindex f6d3e95a8..74cbb2e62 100644--- a/packages/editor/dist/toolbar/popups/searchreplace.d.ts+++ b/packages/editor/dist/toolbar/popups/searchreplace.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { Editor } from "@tiptap/core";export declare type SearchReplacePopupProps = {editor: Editor;diff --git a/packages/editor/dist/toolbar/popups/tablepopup.d.ts b/packages/editor/dist/toolbar/popups/tablepopup.d.tsindex 9cdc17472..44a07a5ea 100644--- a/packages/editor/dist/toolbar/popups/tablepopup.d.ts+++ b/packages/editor/dist/toolbar/popups/tablepopup.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />declare type TableSize = {columns: number;rows: number;diff --git a/packages/editor/dist/toolbar/toolbar.d.ts b/packages/editor/dist/toolbar/toolbar.d.tsindex cf146d053..3b0a7f532 100644--- a/packages/editor/dist/toolbar/toolbar.d.ts+++ b/packages/editor/dist/toolbar/toolbar.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { Theme } from "@notesnook/theme";import { Editor } from "@tiptap/core";import { ToolbarLocation } from "./stores/toolbar-store";diff --git a/packages/editor/dist/toolbar/tools/alignment.d.ts b/packages/editor/dist/toolbar/tools/alignment.d.tsindex 3a4575749..6e121e63e 100644--- a/packages/editor/dist/toolbar/tools/alignment.d.ts+++ b/packages/editor/dist/toolbar/tools/alignment.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { ToolProps } from "../types";export declare function AlignCenter(props: ToolProps): JSX.Element;export declare function AlignLeft(props: ToolProps): JSX.Element;diff --git a/packages/editor/dist/toolbar/tools/block.d.ts b/packages/editor/dist/toolbar/tools/block.d.tsindex ae3b2d914..9ab2e4d50 100644--- a/packages/editor/dist/toolbar/tools/block.d.ts+++ b/packages/editor/dist/toolbar/tools/block.d.ts@@ -1,2 +1,3 @@+/// <reference types="react" />import { ToolProps } from "../types";export declare function InsertBlock(props: ToolProps): JSX.Element;diff --git a/packages/editor/dist/toolbar/tools/block.js b/packages/editor/dist/toolbar/tools/block.jsindex a5df5693f..44e1eba61 100644--- a/packages/editor/dist/toolbar/tools/block.js+++ b/packages/editor/dist/toolbar/tools/block.js@@ -27,13 +27,14 @@ var __read = (this && this.__read) || function (o, n) {};import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";import { Icons } from "../icons";-import { ActionSheetPresenter, } from "../../components/menu/menu";+import { ActionSheetPresenter, MenuPresenter, } from "../../components/menu/menu";import { useRef, useState } from "react";import { Icon } from "../components/icon";import { Button } from "rebass";import { EmbedPopup } from "../popups/embed-popup";import { TablePopup } from "../popups/table-popup";import { useToolbarLocation } from "../stores/toolbar-store";+import { DesktopOnly, MobileOnly } from "../../components/responsive";export function InsertBlock(props) {var buttonRef = useRef();var _a = __read(useState(false), 2), isOpen = _a[0], setIsOpen = _a[1];@@ -49,16 +50,33 @@ export function InsertBlock(props) {":last-of-type": {mr: 0,},- }, onMouseDown: function (e) { return e.preventDefault(); }, onClick: function () { return setIsOpen(function (s) { return !s; }); } }, { children: _jsx(Icon, { path: Icons.plus, size: 18, color: "primary" }) })), _jsx(ActionSheetPresenter, { title: "Choose a block to insert", isOpen: isOpen, items: [- tasklist(editor),- horizontalRule(editor),- codeblock(editor),- blockquote(editor),- imageActionSheet(editor),- attachment(editor),- embedActionSheet(editor),- tableActionSheet(editor),- ], onClose: function () { return setIsOpen(false); } })] }));+ }, onMouseDown: function (e) { return e.preventDefault(); }, onClick: function () { return setIsOpen(function (s) { return !s; }); } }, { children: _jsx(Icon, { path: Icons.plus, size: 18, color: "primary" }) })), _jsx(DesktopOnly, { children: _jsx(MenuPresenter, { options: {+ type: "menu",+ position: {+ target: buttonRef.current || undefined,+ isTargetAbsolute: true,+ location: toolbarLocation === "bottom" ? "top" : "below",+ yOffset: 5,+ },+ }, isOpen: isOpen, items: [+ tasklist(editor),+ horizontalRule(editor),+ codeblock(editor),+ blockquote(editor),+ image(editor),+ attachment(editor),+ embed(editor),+ table(editor),+ ], onClose: function () { return setIsOpen(false); } }) }), _jsx(MobileOnly, { children: _jsx(ActionSheetPresenter, { isOpen: isOpen, items: [+ tasklist(editor),+ horizontalRule(editor),+ codeblock(editor),+ blockquote(editor),+ imageActionSheet(editor),+ attachment(editor),+ embedActionSheet(editor),+ tableActionSheet(editor),+ ], onClose: function () { return setIsOpen(false); } }) })] }));}var horizontalRule = function (editor) { return ({key: "hr",diff --git a/packages/editor/dist/toolbar/tools/colors.d.ts b/packages/editor/dist/toolbar/tools/colors.d.tsindex 8a6bf6976..2b501e6fc 100644--- a/packages/editor/dist/toolbar/tools/colors.d.ts+++ b/packages/editor/dist/toolbar/tools/colors.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { ToolProps } from "../types";export declare const DEFAULT_COLORS: string[];export declare function Highlight(props: ToolProps): JSX.Element;diff --git a/packages/editor/dist/toolbar/tools/font.d.ts b/packages/editor/dist/toolbar/tools/font.d.tsindex d5becf75c..e7818addd 100644--- a/packages/editor/dist/toolbar/tools/font.d.ts+++ b/packages/editor/dist/toolbar/tools/font.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { ToolProps } from "../types";export declare function FontSize(props: ToolProps): JSX.Element;export declare function FontFamily(props: ToolProps): JSX.Element;diff --git a/packages/editor/dist/toolbar/tools/headings.d.ts b/packages/editor/dist/toolbar/tools/headings.d.tsindex 931208a7c..e237b7e5f 100644--- a/packages/editor/dist/toolbar/tools/headings.d.ts+++ b/packages/editor/dist/toolbar/tools/headings.d.ts@@ -1,2 +1,3 @@+/// <reference types="react" />import { ToolProps } from "../types";export declare function Headings(props: ToolProps): JSX.Element;diff --git a/packages/editor/dist/toolbar/tools/inline.d.ts b/packages/editor/dist/toolbar/tools/inline.d.tsindex 9d3097a67..87ad73d07 100644--- a/packages/editor/dist/toolbar/tools/inline.d.ts+++ b/packages/editor/dist/toolbar/tools/inline.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { ToolProps } from "../types";export declare function Italic(props: ToolProps): JSX.Element;export declare function Strikethrough(props: ToolProps): JSX.Element;diff --git a/packages/editor/dist/toolbar/tools/lists.d.ts b/packages/editor/dist/toolbar/tools/lists.d.tsindex 4c198c62a..50718c842 100644--- a/packages/editor/dist/toolbar/tools/lists.d.ts+++ b/packages/editor/dist/toolbar/tools/lists.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { ToolProps } from "../types";export declare function NumberedList(props: ToolProps): JSX.Element;export declare function BulletList(props: ToolProps): JSX.Element;diff --git a/packages/editor/dist/toolbar/tools/textdirection.d.ts b/packages/editor/dist/toolbar/tools/textdirection.d.tsindex 233172ba1..a625990f0 100644--- a/packages/editor/dist/toolbar/tools/textdirection.d.ts+++ b/packages/editor/dist/toolbar/tools/textdirection.d.ts@@ -1,3 +1,4 @@+/// <reference types="react" />import { ToolProps } from "../types";export declare function RightToLeft(props: ToolProps): JSX.Element;export declare function LeftToRight(props: ToolProps): JSX.Element;diff --git a/packages/editor/package-lock.json b/packages/editor/package-lock.jsonindex c88f5433b..35eafac93 100644--- a/packages/editor/package-lock.json+++ b/packages/editor/package-lock.json@@ -10,7 +10,7 @@"dependencies": {"@mdi/js": "^6.7.96","@mdi/react": "^1.6.0",- "@notesnook/theme": "file:../themeprovider",+ "@notesnook/theme": "github:streetwriters/themeprovider","@rebass/forms": "^4.0.6","@social-embed/lib": "^0.0.1-next.12","@tiptap/core": "^2.0.0-beta.176",@@ -50,7 +50,7 @@"react-color": "^2.19.3","react-colorful": "^5.5.1","react-modal": "^3.14.4",- "react-modal-sheet": "file:../react-modal-sheet",+ "react-modal-sheet": "github:thecodrr/react-action-sheet","react-spring-bottom-sheet": "^3.4.0","react-toggle": "^4.1.2","reactjs-popup": "^2.0.5",@@ -92,6 +92,7 @@},"../react-modal-sheet": {"version": "1.5.1",+ "extraneous": true,"license": "MIT","dependencies": {"react-merge-refs": "1.1.0"@@ -121,6 +122,7 @@"../themeprovider": {"name": "@notesnook/theme","version": "0.0.1",+ "extraneous": true,"dependencies": {"@rebass/forms": "^4.0.6","@types/rebass": "^4.0.10",@@ -3227,8 +3229,16 @@}},"node_modules/@notesnook/theme": {- "resolved": "../themeprovider",- "link": true+ "version": "0.0.1",+ "resolved": "git+ssh://[email protected]/streetwriters/themeprovider.git#c3370d1a0d1168f2b93504e447e1dd394acbf2b7",+ "dependencies": {+ "@rebass/forms": "^4.0.6",+ "@types/rebass": "^4.0.10",+ "@types/rebass__forms": "^4.0.6",+ "emotion-theming": "^10.0.19",+ "rebass": "^4.0.7",+ "tinycolor2": "^1.4.2"+ }},"node_modules/@npmcli/fs": {"version": "1.1.1",@@ -4562,7 +4572,6 @@"version": "3.3.1","resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz","integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",- "dev": true,"dependencies": {"@types/react": "*","hoist-non-react-statics": "^3.3.0"@@ -4652,8 +4661,7 @@"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+ "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w=="},"node_modules/@types/prosemirror-commands": {"version": "1.0.4",@@ -4758,7 +4766,6 @@"version": "17.0.45","resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.45.tgz","integrity": "sha512-YfhQ22Lah2e3CHPsb93tRwIGNiSwkuz1/blk4e6QrWS0jQzCSNbGLtOEYhPg02W0yGTTmpajp7dCTbBAMN3qsg==",- "dev": true,"dependencies": {"@types/prop-types": "*","@types/scheduler": "*",@@ -4805,8 +4812,7 @@"node_modules/@types/react/node_modules/csstype": {"version": "3.1.0","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz",- "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==",- "dev": true+ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="},"node_modules/@types/reactcss": {"version": "1.2.6",@@ -4821,7 +4827,6 @@"version": "4.0.10","resolved": "https://registry.npmjs.org/@types/rebass/-/rebass-4.0.10.tgz","integrity": "sha512-Bp9Y2Bc7wrZr2NYHrqWOVRHdL5I5CRIaOiG9hlnwHH5hFRf8/FJsiJmCMsBhlsma312Jc6xWL+XUtSnfio+wOA==",- "dev": true,"dependencies": {"@types/react": "*","@types/styled-components": "*",@@ -4833,7 +4838,6 @@"version": "4.0.6","resolved": "https://registry.npmjs.org/@types/rebass__forms/-/rebass__forms-4.0.6.tgz","integrity": "sha512-FuC2ibEY447g5lYwkzIVdxJBR+jSUpOclo9xl0b9pPwB2R33tA71DkUXcGwWPcgHRQQitith2o3hUnle++Vdcg==",- "dev": true,"dependencies": {"@types/react": "*","@types/rebass": "*",@@ -4852,8 +4856,7 @@"node_modules/@types/scheduler": {"version": "0.16.2","resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz",- "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==",- "dev": true+ "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew=="},"node_modules/@types/shortid": {"version": "0.0.29",@@ -4877,7 +4880,6 @@"version": "5.1.25","resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.25.tgz","integrity": "sha512-fgwl+0Pa8pdkwXRoVPP9JbqF0Ivo9llnmsm+7TCI330kbPIFd9qv1Lrhr37shf4tnxCOSu+/IgqM7uJXLWZZNQ==",- "dev": true,"dependencies": {"@types/hoist-non-react-statics": "*","@types/react": "*",@@ -4887,14 +4889,12 @@"node_modules/@types/styled-components/node_modules/csstype": {"version": "3.1.0","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz",- "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==",- "dev": true+ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="},"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==",- "dev": true,"dependencies": {"csstype": "^3.0.2"}@@ -4903,7 +4903,6 @@"version": "5.0.16","resolved": "https://registry.npmjs.org/@types/styled-system__css/-/styled-system__css-5.0.16.tgz","integrity": "sha512-Cji5miCIpR27m8yzH6y3cLU6106N4GVyPgUhBQ4nL7VxgoeAtRdAriKdGTnRgJzSpT3HyB7h5G//cDWOl0M1jQ==",- "dev": true,"dependencies": {"csstype": "^3.0.2"}@@ -4911,14 +4910,12 @@"node_modules/@types/styled-system__css/node_modules/csstype": {"version": "3.1.0","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz",- "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==",- "dev": true+ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="},"node_modules/@types/styled-system/node_modules/csstype": {"version": "3.1.0","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz",- "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==",- "dev": true+ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="},"node_modules/@types/tapable": {"version": "1.0.8",@@ -19431,6 +19428,15 @@"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz","integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="},+ "node_modules/react-merge-refs": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/react-merge-refs/-/react-merge-refs-1.1.0.tgz",+ "integrity": "sha512-alTKsjEL0dKH/ru1Iyn7vliS2QRcBp9zZPGoWxUOvRGWPUYgjo+V01is7p04It6KhgrzhJGnIj9GgX8W4bZoCQ==",+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/gregberge"+ }+ },"node_modules/react-modal": {"version": "3.15.1","resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.15.1.tgz",@@ -19450,8 +19456,19 @@}},"node_modules/react-modal-sheet": {- "resolved": "../react-modal-sheet",- "link": true+ "version": "1.5.1",+ "resolved": "git+ssh://[email protected]/thecodrr/react-action-sheet.git#141f48c87e0abdb75cc742a61d0f76168c16091c",+ "license": "MIT",+ "dependencies": {+ "react-merge-refs": "1.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "peerDependencies": {+ "framer-motion": ">=2",+ "react": ">=16"+ }},"node_modules/react-refresh": {"version": "0.8.3",@@ -28049,25 +28066,15 @@}},"@notesnook/theme": {- "version": "file:../themeprovider",+ "version": "git+ssh://[email protected]/streetwriters/themeprovider.git#c3370d1a0d1168f2b93504e447e1dd394acbf2b7",+ "from": "@notesnook/theme@github:streetwriters/themeprovider","requires": {"@rebass/forms": "^4.0.6",- "@types/node": "^16.11.11",- "@types/react": "^17.0.37",- "@types/react-color": "^3.0.6",- "@types/react-dom": "^17.0.11",- "@types/react-modal": "^3.13.1","@types/rebass": "^4.0.10","@types/rebass__forms": "^4.0.6",- "@types/tinycolor2": "^1.4.3","emotion-theming": "^10.0.19",- "react": "^17.0.2",- "react-dom": "^17.0.2",- "react-scripts": "4.0.3","rebass": "^4.0.7",- "tinycolor2": "^1.4.2",- "typescript": "^4.5.2",- "web-vitals": "^1.1.2"+ "tinycolor2": "^1.4.2"}},"@npmcli/fs": {@@ -28973,7 +28980,6 @@"version": "3.3.1","resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz","integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",- "dev": true,"requires": {"@types/react": "*","hoist-non-react-statics": "^3.3.0"@@ -29063,8 +29069,7 @@"@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+ "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w=="},"@types/prosemirror-commands": {"version": "1.0.4",@@ -29169,7 +29174,6 @@"version": "17.0.45","resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.45.tgz","integrity": "sha512-YfhQ22Lah2e3CHPsb93tRwIGNiSwkuz1/blk4e6QrWS0jQzCSNbGLtOEYhPg02W0yGTTmpajp7dCTbBAMN3qsg==",- "dev": true,"requires": {"@types/prop-types": "*","@types/scheduler": "*",@@ -29179,8 +29183,7 @@"csstype": {"version": "3.1.0","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz",- "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==",- "dev": true+ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="}}},@@ -29234,7 +29237,6 @@"version": "4.0.10","resolved": "https://registry.npmjs.org/@types/rebass/-/rebass-4.0.10.tgz","integrity": "sha512-Bp9Y2Bc7wrZr2NYHrqWOVRHdL5I5CRIaOiG9hlnwHH5hFRf8/FJsiJmCMsBhlsma312Jc6xWL+XUtSnfio+wOA==",- "dev": true,"requires": {"@types/react": "*","@types/styled-components": "*",@@ -29246,7 +29248,6 @@"version": "4.0.6","resolved": "https://registry.npmjs.org/@types/rebass__forms/-/rebass__forms-4.0.6.tgz","integrity": "sha512-FuC2ibEY447g5lYwkzIVdxJBR+jSUpOclo9xl0b9pPwB2R33tA71DkUXcGwWPcgHRQQitith2o3hUnle++Vdcg==",- "dev": true,"requires": {"@types/react": "*","@types/rebass": "*",@@ -29265,8 +29266,7 @@"@types/scheduler": {"version": "0.16.2","resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz",- "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==",- "dev": true+ "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew=="},"@types/shortid": {"version": "0.0.29",@@ -29290,7 +29290,6 @@"version": "5.1.25","resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.25.tgz","integrity": "sha512-fgwl+0Pa8pdkwXRoVPP9JbqF0Ivo9llnmsm+7TCI330kbPIFd9qv1Lrhr37shf4tnxCOSu+/IgqM7uJXLWZZNQ==",- "dev": true,"requires": {"@types/hoist-non-react-statics": "*","@types/react": "*",@@ -29300,8 +29299,7 @@"csstype": {"version": "3.1.0","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz",- "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==",- "dev": true+ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="}}},@@ -29309,7 +29307,6 @@"version": "5.1.15","resolved": "https://registry.npmjs.org/@types/styled-system/-/styled-system-5.1.15.tgz","integrity": "sha512-1uls4wipZn8FtYFZ7upRVFDoEeOXTQTs2zuyOZPn02T6rjIxtvj2P2lG5qsxXHhKuKsu3thveCZrtaeLE/ibLg==",- "dev": true,"requires": {"csstype": "^3.0.2"},@@ -29317,8 +29314,7 @@"csstype": {"version": "3.1.0","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz",- "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==",- "dev": true+ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="}}},@@ -29326,7 +29322,6 @@"version": "5.0.16","resolved": "https://registry.npmjs.org/@types/styled-system__css/-/styled-system__css-5.0.16.tgz","integrity": "sha512-Cji5miCIpR27m8yzH6y3cLU6106N4GVyPgUhBQ4nL7VxgoeAtRdAriKdGTnRgJzSpT3HyB7h5G//cDWOl0M1jQ==",- "dev": true,"requires": {"csstype": "^3.0.2"},@@ -29334,8 +29329,7 @@"csstype": {"version": "3.1.0","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz",- "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==",- "dev": true+ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="}}},@@ -40765,6 +40759,11 @@"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz","integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="},+ "react-merge-refs": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/react-merge-refs/-/react-merge-refs-1.1.0.tgz",+ "integrity": "sha512-alTKsjEL0dKH/ru1Iyn7vliS2QRcBp9zZPGoWxUOvRGWPUYgjo+V01is7p04It6KhgrzhJGnIj9GgX8W4bZoCQ=="+ },"react-modal": {"version": "3.15.1","resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.15.1.tgz",@@ -40777,21 +40776,10 @@}},"react-modal-sheet": {- "version": "file:../react-modal-sheet",+ "version": "git+ssh://[email protected]/thecodrr/react-action-sheet.git#141f48c87e0abdb75cc742a61d0f76168c16091c",+ "from": "react-modal-sheet@https://github.com/thecodrr/react-action-sheet.git","requires": {- "@types/react": "17.0.37",- "@types/react-dom": "17.0.11",- "@types/styled-components": "5.1.7",- "csstype": "3.0.6",- "framer-motion": "^4.1.17",- "husky": "4.2.5",- "react": "17.0.2",- "react-dom": "17.0.2",- "react-merge-refs": "1.1.0",- "styled-components": "5.3.3",- "tsdx": "0.14.1",- "tslib": "2.1.0",- "typescript": "4.5.5"+ "react-merge-refs": "1.1.0"}},"react-refresh": {diff --git a/packages/editor/package.json b/packages/editor/package.jsonindex d6dac37e2..cc563451e 100644--- a/packages/editor/package.json+++ b/packages/editor/package.json@@ -6,7 +6,7 @@"dependencies": {"@mdi/js": "^6.7.96","@mdi/react": "^1.6.0",- "@notesnook/theme": "file:../themeprovider",+ "@notesnook/theme": "github:streetwriters/themeprovider","@rebass/forms": "^4.0.6","@social-embed/lib": "^0.0.1-next.12","@tiptap/core": "^2.0.0-beta.176",@@ -46,7 +46,7 @@"react-color": "^2.19.3","react-colorful": "^5.5.1","react-modal": "^3.14.4",- "react-modal-sheet": "file:../react-modal-sheet",+ "react-modal-sheet": "github:thecodrr/react-action-sheet","react-spring-bottom-sheet": "^3.4.0","react-toggle": "^4.1.2","reactjs-popup": "^2.0.5",diff --git a/packages/editor/src/extensions/link/index.ts b/packages/editor/src/extensions/link/index.tsnew file mode 100644index 000000000..b44e8fde1--- /dev/null+++ b/packages/editor/src/extensions/link/index.ts@@ -0,0 +1,5 @@+import { Link } from "./link";++export * from "./link";++export default Link;diff --git a/packages/editor/src/extensions/link/link.ts b/packages/editor/src/extensions/link/link.tsnew file mode 100644index 000000000..315756968--- /dev/null+++ b/packages/editor/src/extensions/link/link.ts@@ -0,0 +1,25 @@+import TiptapLink from "@tiptap/extension-link";+import { Plugin, PluginKey } from "prosemirror-state";++export const Link = TiptapLink.extend({+ // addProseMirrorPlugins() {+ // return [+ // ...(this.parent?.() || []),+ // new Plugin({+ // key: new PluginKey("hoverHandler"),+ // props: {+ // handleDOMEvents: {+ // mouseover: (view, event) => {+ // if (+ // event.target instanceof HTMLElement &&+ // event.target.nodeName === "A"+ // ) {+ // console.log("Got it!");+ // }+ // },+ // },+ // },+ // }),+ // ];+ // },+});diff --git a/packages/editor/src/index.ts b/packages/editor/src/index.tsindex 3faf9d9a9..957cc7242 100644--- a/packages/editor/src/index.ts+++ b/packages/editor/src/index.ts@@ -17,7 +17,6 @@ import BulletList from "./extensions/bullet-list";import OrderedList from "./extensions/ordered-list";import Highlight from "@tiptap/extension-highlight";import Color from "@tiptap/extension-color";-import Link from "@tiptap/extension-link";import Table from "@tiptap/extension-table";import TableRow from "@tiptap/extension-table-row";import TableCell from "./extensions/table-cell";@@ -32,6 +31,7 @@ import { SearchReplace } from "./extensions/search-replace";import { EmbedNode } from "./extensions/embed";import { CodeBlock } from "./extensions/code-block";import { ListItem } from "./extensions/list-item";+import { Link } from "./extensions/link";import { PortalProviderAPI, EventDispatcher } from "./extensions/react";EditorView.prototype.updateState = function updateState(state) {diff --git a/packages/editor/src/toolbar/tools/block.tsx b/packages/editor/src/toolbar/tools/block.tsxindex 15cb33e1e..b94ee2a8d 100644--- a/packages/editor/src/toolbar/tools/block.tsx+++ b/packages/editor/src/toolbar/tools/block.tsx@@ -16,6 +16,7 @@ import { EmbedPopup } from "../popups/embed-popup";import { TablePopup } from "../popups/table-popup";import { MenuItem } from "../../components/menu/types";import { useToolbarLocation } from "../stores/toolbar-store";+import { DesktopOnly, MobileOnly } from "../../components/responsive";export function InsertBlock(props: ToolProps) {const buttonRef = useRef<HTMLButtonElement | null>();@@ -43,44 +44,48 @@ export function InsertBlock(props: ToolProps) {><Icon path={Icons.plus} size={18} color={"primary"} /></Button>- {/* <MenuPresenter- options={{- type: "menu",- position: {- target: buttonRef.current || undefined,- isTargetAbsolute: true,- location: toolbarLocation === "bottom" ? "top" : "below",- yOffset: 5,- },- }}- isOpen={isOpen}- items={[- tasklist(editor),- horizontalRule(editor),- codeblock(editor),- blockquote(editor),- image(editor),- attachment(editor),- embed(editor),- table(editor),- ]}- onClose={() => setIsOpen(false)}- /> */}- <ActionSheetPresenter- title="Choose a block to insert"- isOpen={isOpen}- items={[- tasklist(editor),- horizontalRule(editor),- codeblock(editor),- blockquote(editor),- imageActionSheet(editor),- attachment(editor),- embedActionSheet(editor),- tableActionSheet(editor),- ]}- onClose={() => setIsOpen(false)}- />++ <DesktopOnly>+ <MenuPresenter+ options={{+ type: "menu",+ position: {+ target: buttonRef.current || undefined,+ isTargetAbsolute: true,+ location: toolbarLocation === "bottom" ? "top" : "below",+ yOffset: 5,+ },+ }}+ isOpen={isOpen}+ items={[+ tasklist(editor),+ horizontalRule(editor),+ codeblock(editor),+ blockquote(editor),+ image(editor),+ attachment(editor),+ embed(editor),+ table(editor),+ ]}+ onClose={() => setIsOpen(false)}+ />+ </DesktopOnly>+ <MobileOnly>+ <ActionSheetPresenter+ isOpen={isOpen}+ items={[+ tasklist(editor),+ horizontalRule(editor),+ codeblock(editor),+ blockquote(editor),+ imageActionSheet(editor),+ attachment(editor),+ embedActionSheet(editor),+ tableActionSheet(editor),+ ]}+ onClose={() => setIsOpen(false)}+ />+ </MobileOnly></>);}