web: fix imports

This commit is contained in:
Abdullah Atta
2024-09-23 15:18:22 +05:00
parent bcc739aa57
commit 89aba00aac
59 changed files with 84 additions and 116 deletions

View File

@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { Reminder } from "@notesnook/core/dist/types";
import { Reminder } from "@notesnook/core";
import { Locator } from "@playwright/test";
import { getTestId } from "../utils";
import { BaseItemModel } from "./base-item.model";

View File

@@ -21,7 +21,7 @@ import { Locator, Page } from "@playwright/test";
import { getTestId } from "../utils";
import { BaseViewModel } from "./base-view.model";
import { ReminderItemModel } from "./reminder-item.model";
import { Reminder } from "@notesnook/core/dist/types";
import { Reminder } from "@notesnook/core";
import { fillReminderDialog } from "./utils";
export class RemindersViewModel extends BaseViewModel {

View File

@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { Reminder } from "@notesnook/core/dist/types";
import { Reminder } from "@notesnook/core";
import { Locator, Page } from "@playwright/test";
import { getTestId } from "../utils";
import { Color, Item, Notebook } from "./types";

View File

@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { Reminder } from "@notesnook/core/dist/types";
import { Reminder } from "@notesnook/core";
import { test, expect } from "@playwright/test";
import { AppModel } from "./models/app.model";

View File

@@ -25835,6 +25835,8 @@
"license": "GPL-3.0-or-later",
"dependencies": {
"@notesnook/core": "^8.0.0",
"@readme/data-urls": "^3.0.0",
"dayjs": "^1.11.13",
"pathe": "^1.1.2",
"timeago.js": "4.0.2"
},
@@ -26883,6 +26885,7 @@
"@types/prismjs": "^1.26.0",
"@types/spark-md5": "^3.0.2",
"@types/streetwriters__showdown": "npm:@types/showdown@^2.0.6",
"@types/unist": "^3.0.3",
"@types/ws": "^8.5.5",
"@vitest/coverage-v8": "^1.0.1",
"abortcontroller-polyfill": "^1.7.3",
@@ -29876,6 +29879,7 @@
"../../packages/crypto": {
"name": "@notesnook/crypto",
"version": "2.0.7",
"dev": true,
"license": "GPL-3.0-or-later",
"dependencies": {
"@notesnook/sodium": "file:../sodium"
@@ -29892,7 +29896,7 @@
"hasInstallScript": true,
"license": "GPL-3.0-or-later",
"dependencies": {
"@notesnook/core": "file:../core",
"@notesnook/common": "file:../common",
"@notesnook/theme": "file:../theme",
"@notesnook/ui": "file:../ui",
"@social-embed/lib": "^0.1.0-next.7",
@@ -30215,10 +30219,6 @@
"prop-types": "^15.7.2"
}
},
"../../packages/editor/node_modules/@notesnook/core": {
"resolved": "../../packages/core",
"link": true
},
"../../packages/editor/node_modules/@notesnook/theme": {
"resolved": "../../packages/theme",
"link": true
@@ -33885,16 +33885,6 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"../../packages/sodium/node_modules/node-gyp-build": {
"version": "4.8.0",
"dev": true,
"license": "MIT",
"bin": {
"node-gyp-build": "bin.js",
"node-gyp-build-optional": "optional.js",
"node-gyp-build-test": "build-test.js"
}
},
"../../packages/sodium/node_modules/onetime": {
"version": "5.1.2",
"dev": true,
@@ -34052,15 +34042,6 @@
"dev": true,
"license": "ISC"
},
"../../packages/sodium/node_modules/sodium-native": {
"version": "4.1.1",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"node-gyp-build": "^4.8.0"
}
},
"../../packages/sodium/node_modules/source-map-js": {
"version": "1.0.2",
"dev": true,
@@ -34516,7 +34497,7 @@
"@theme-ui/color": "^0.16.1",
"@theme-ui/components": "^0.16.1",
"@theme-ui/core": "^0.16.1",
"@trpc/server": "^10.31.0",
"@trpc/server": "^10.45.2",
"@types/react": "^18.2.39",
"@types/tinycolor2": "^1.4.3",
"isomorphic-fetch": "^3.0.0",
@@ -36512,7 +36493,7 @@
"license": "ISC",
"dependencies": {
"@orama/orama": "^1.0.8",
"@trpc/server": "10.38.3",
"@trpc/server": "10.45.2",
"async-mutex": "^0.4.0",
"cors": "^2.8.5",
"util": "^0.12.5",

View File

@@ -31,7 +31,7 @@ import {
import { introduceFeatures, showUpgradeReminderDialogs } from "./common";
import { AppEventManager, AppEvents } from "./common/app-events";
import { db } from "./common/db";
import { CHECK_IDS, EV, EVENTS } from "@notesnook/core/dist/common";
import { CHECK_IDS, EV, EVENTS } from "@notesnook/core";
import { registerKeyMap } from "./common/key-map";
import { isUserPremium } from "./hooks/use-is-user-premium";
import { updateStatus, removeStatus, getStatus } from "./hooks/use-status";

View File

@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import "./polyfills";
import { getCurrentHash, getCurrentPath, makeURL } from "./navigation";
import Config from "./utils/config";

View File

@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import EventManager from "@notesnook/core/dist/utils/event-manager";
import { EventManager } from "@notesnook/core";
export const AppEventManager = new EventManager();
export const AppEvents = {

View File

@@ -25,7 +25,7 @@ import { createDialect } from "./sqlite";
import { isFeatureSupported } from "../utils/feature-check";
import { generatePassword } from "../utils/password-generator";
import { deriveKey, useKeyStore } from "../interfaces/key-store";
import { logManager } from "@notesnook/core/dist/logger";
import { logManager } from "@notesnook/core";
import Config from "../utils/config";
const db = database;

View File

@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { TaskManager } from "./task-manager";
import { createZipStream } from "../utils/streams/zip-stream";
import { createWriteStream } from "../utils/stream-saver";
import { FilteredSelector } from "@notesnook/core/dist/database/sql-collection";
import { FilteredSelector } from "@notesnook/core";
import { Note } from "@notesnook/core";
import { fromAsyncIterator } from "../utils/stream";
import {

View File

@@ -29,7 +29,7 @@ import { readFile, showFilePicker } from "../utils/file-picker";
import { logger } from "../utils/logger";
import { PATHS } from "@notesnook/desktop";
import { TaskManager } from "./task-manager";
import { EVENTS } from "@notesnook/core/dist/common";
import { EVENTS } from "@notesnook/core";
import { createWritableStream } from "./desktop-bridge";
import { createZipStream, ZipFile } from "../utils/streams/zip-stream";
import { FeatureDialog, FeatureKeys } from "../dialogs/feature-dialog";
@@ -37,7 +37,7 @@ import { ZipEntry, createUnzipIterator } from "../utils/streams/unzip-stream";
import { User } from "@notesnook/core";
import { LegacyBackupFile } from "@notesnook/core";
import { useEditorStore } from "../stores/editor-store";
import { formatDate } from "@notesnook/core/dist/utils/date";
import { formatDate } from "@notesnook/core";
import { showPasswordDialog } from "../dialogs/password-dialog";
import { BackupPasswordDialog } from "../dialogs/backup-password-dialog";
import { ReminderDialog } from "../dialogs/reminder-dialog";

View File

@@ -28,7 +28,7 @@ import {
WaSqliteWorkerSingleTabDriver
} from "./wa-sqlite-kysely-driver";
declare module "kysely" {
declare module "@streetwriters/kysely" {
interface Driver {
delete(): Promise<void>;
}

View File

@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { db } from "./db";
import { showPasswordDialog } from "../dialogs/password-dialog";
import { showToast } from "../utils/toast";
import { VAULT_ERRORS } from "@notesnook/core/dist/api/vault";
import { VAULT_ERRORS } from "@notesnook/core";
class Vault {
static async createVault() {

View File

@@ -48,7 +48,7 @@ import {
DocumentMimeTypes,
WebClipMimeType,
PDFMimeType
} from "@notesnook/core/dist/utils/filename";
} from "@notesnook/core";
import React, { useEffect, useState } from "react";
import { AppEventManager, AppEvents } from "../../common/app-events";
import { getFormattedDate } from "@notesnook/common";

View File

@@ -24,7 +24,7 @@ import Grberk from "../../assets/testimonials/grberk.jpeg";
import Holenstein from "../../assets/testimonials/holenstein.jpg";
import Jason from "../../assets/testimonials/jason.jpg";
import Cameron from "../../assets/testimonials/cameron.jpg";
import hosts from "@notesnook/core/dist/utils/constants";
import { hosts } from "@notesnook/core";
import { SettingsDialog } from "../../dialogs/settings";
const testimonials = [

View File

@@ -51,14 +51,14 @@ import { Attachment } from "../icons";
import { attachFiles, AttachmentProgress, insertAttachments } from "./picker";
import { useEditorManager } from "./manager";
import { saveAttachment, downloadAttachment } from "../../common/attachments";
import { EV, EVENTS } from "@notesnook/core/dist/common";
import { EV, EVENTS } from "@notesnook/core";
import { db } from "../../common/db";
import Titlebox from "./title-box";
import Config from "../../utils/config";
import { ScopedThemeProvider } from "../theme-provider";
import { Lightbox } from "../lightbox";
import { showToast } from "../../utils/toast";
import { Item, MaybeDeletedItem, isDeleted } from "@notesnook/core/dist/types";
import { Item, MaybeDeletedItem, isDeleted } from "@notesnook/core";
import { debounce, debounceWithId } from "@notesnook/common";
import { Freeze } from "react-freeze";
import { UnlockView } from "../unlock";

View File

@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { SerializedKey } from "@notesnook/crypto/dist/src/types";
import { SerializedKey } from "@notesnook/crypto";
import { AppEventManager, AppEvents } from "../../common/app-events";
import { db } from "../../common/db";
import { TaskManager } from "../../common/task-manager";

View File

@@ -35,7 +35,9 @@ import {
getFontById,
TiptapOptions,
Attachment,
getTableOfContents
getTableOfContents,
getChangedNodes,
LinkAttributes
} from "@notesnook/editor";
import { Box, Flex } from "@theme-ui/components";
import {
@@ -52,15 +54,13 @@ import { useStore as useSettingsStore } from "../../stores/setting-store";
import { debounce } from "@notesnook/common";
import { ScopedThemeProvider } from "../theme-provider";
import { useStore as useThemeStore } from "../../stores/theme-store";
import { getChangedNodes } from "@notesnook/editor/dist/utils/prosemirror";
import { LinkAttributes } from "@notesnook/editor/dist/extensions/link";
import { writeToClipboard } from "../../utils/clipboard";
import { useEditorStore } from "../../stores/editor-store";
import { parseInternalLink } from "@notesnook/core";
import Skeleton from "react-loading-skeleton";
import useMobile from "../../hooks/use-mobile";
import useTablet from "../../hooks/use-tablet";
import { TimeFormat } from "@notesnook/core/dist/utils/date";
import { TimeFormat } from "@notesnook/core";
import { BuyDialog } from "../../dialogs/buy-dialog";
export type OnChangeHandler = (

View File

@@ -25,7 +25,7 @@ import useMobile from "../../hooks/use-mobile";
import useTablet from "../../hooks/use-tablet";
import { useEditorConfig, useEditorManager } from "./manager";
import { getFontById } from "@notesnook/editor";
import { replaceDateTime } from "@notesnook/editor/dist/extensions/date-time";
import { replaceDateTime } from "@notesnook/editor";
import { useStore as useSettingsStore } from "../../stores/setting-store";
import { AppEventManager, AppEvents } from "../../common/app-events";

View File

@@ -43,7 +43,7 @@ import {
GroupHeader as GroupHeaderType,
GroupOptions,
GroupingKey
} from "@notesnook/core/dist/types";
} from "@notesnook/core";
const groupByToTitleMap = {
none: "None",

View File

@@ -24,7 +24,7 @@ import TrashItem from "../trash-item";
import { db } from "../../common/db";
import Reminder from "../reminder";
import { Context } from "./types";
import { getSortValue } from "@notesnook/core/dist/utils/grouping";
import { getSortValue } from "@notesnook/core";
import { GroupingKey, Item } from "@notesnook/core";
import { isNoteResolvedData } from "@notesnook/common";
import { Attachment } from "../attachment";

View File

@@ -28,7 +28,7 @@ import React, { useRef } from "react";
import { SchemeColors } from "@notesnook/theme";
import { MenuItem } from "@notesnook/ui";
import { alpha } from "@theme-ui/color";
import { Item } from "@notesnook/core/dist/types";
import { Item } from "@notesnook/core";
import { setDragData } from "../../utils/data-transfer";
type ListItemProps<TItem extends Item, TContext> = {

View File

@@ -68,10 +68,7 @@ import IconTag from "../icon-tag";
import { exportNote, exportNotes } from "../../common/export";
import { Multiselect } from "../../common/multi-select";
import { store as selectionStore } from "../../stores/selection-store";
import {
isReminderActive,
isReminderToday
} from "@notesnook/core/dist/collections/reminders";
import { isReminderActive, isReminderToday } from "@notesnook/core";
import {
NoteResolvedData,
exportContent,

View File

@@ -60,7 +60,7 @@ import {
highlightInternalLinks
} from "@notesnook/core";
import { VirtualizedTable } from "../virtualized-table";
import { TextSlice } from "@notesnook/core/dist/utils/content-block";
import { TextSlice } from "@notesnook/core";
import { TITLE_BAR_HEIGHT } from "../title-bar";
const tools = [

View File

@@ -27,7 +27,7 @@ import { db } from "../../common/db";
import { writeText } from "clipboard-polyfill";
import { ScopedThemeProvider } from "../theme-provider";
import { showToast } from "../../utils/toast";
import { EV, EVENTS } from "@notesnook/core/dist/common";
import { EV, EVENTS } from "@notesnook/core";
import { useStore } from "../../stores/monograph-store";
import ReactModal from "react-modal";
import { DialogButton } from "../dialog";

View File

@@ -32,7 +32,7 @@ import {
Trash
} from "../icons";
import IconTag from "../icon-tag";
import { isReminderToday } from "@notesnook/core/dist/collections/reminders";
import { isReminderToday } from "@notesnook/core";
import { hashNavigate } from "../../navigation";
import { Multiselect } from "../../common/multi-select";
import { store } from "../../stores/reminder-store";
@@ -40,7 +40,7 @@ import { db } from "../../common/db";
import { pluralize } from "@notesnook/common";
import { getFormattedReminderTime } from "@notesnook/common";
import { MenuItem } from "@notesnook/ui";
import { Reminder as ReminderType } from "@notesnook/core/dist/types";
import { Reminder as ReminderType } from "@notesnook/core";
import { ConfirmDialog } from "../../dialogs/confirm";
import { EditReminderDialog } from "../../dialogs/add-reminder-dialog";
import { useStore as useSelectionStore } from "../../stores/selection-store";

View File

@@ -25,7 +25,7 @@ import TimeAgo from "../time-ago";
import { pluralize, toTitleCase } from "@notesnook/common";
import { showToast } from "../../utils/toast";
import { MenuItem } from "@notesnook/ui";
import { TrashItem as TrashItemType } from "@notesnook/core/dist/types";
import { TrashItem as TrashItemType } from "@notesnook/core";
import { useEditorStore } from "../../stores/editor-store";
import { showMultiPermanentDeleteConfirmation } from "../../dialogs/confirm";
import { useStore as useSelectionStore } from "../../stores/selection-store";

View File

@@ -34,7 +34,7 @@ import "react-day-picker/dist/style.css";
import { PopupPresenter } from "@notesnook/ui";
import { useStore as useThemeStore } from "../stores/theme-store";
import { getFormattedDate } from "@notesnook/common";
import { MONTHS_FULL, getTimeFormat } from "@notesnook/core/dist/utils/date";
import { MONTHS_FULL, getTimeFormat } from "@notesnook/core";
import { Note, Reminder } from "@notesnook/core";
import { BaseDialogProps, DialogManager } from "../common/dialog-manager";

View File

@@ -30,7 +30,7 @@ import { useStore, store } from "../stores/tag-store";
import { store as notestore } from "../stores/note-store";
import { useEditorStore } from "../stores/editor-store";
import { FilteredList } from "../components/filtered-list";
import { ItemReference, Tag } from "@notesnook/core/dist/types";
import { ItemReference, Tag } from "@notesnook/core";
import { create } from "zustand";
import { VirtualizedGrouping } from "@notesnook/core";
import { ResolvedItem } from "@notesnook/common";

View File

@@ -28,7 +28,7 @@ import { writeText } from "clipboard-polyfill";
import { store as userstore } from "../stores/user-store";
import { ErrorText } from "../components/error-text";
import { Debug } from "@notesnook/core/dist/api/debug";
import { Debug } from "@notesnook/core";
import { ConfirmDialog } from "./confirm";
import { BaseDialogProps, DialogManager } from "../common/dialog-manager";

View File

@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { EVENTS } from "@notesnook/core/dist/common";
import { EVENTS } from "@notesnook/core";
import { Text } from "@theme-ui/components";
import { useCallback, useEffect, useState } from "react";
import { createBackup } from "../common";

View File

@@ -37,7 +37,7 @@ import { store as notebookStore } from "../stores/notebook-store";
import { showToast } from "../utils/toast";
import { isMac } from "../utils/platform";
import { create } from "zustand";
import { Notebook } from "@notesnook/core/dist/types";
import { Notebook } from "@notesnook/core";
import {
UncontrolledTreeEnvironment,
Tree,

View File

@@ -30,10 +30,10 @@ import {
import { VirtualizedList } from "../components/virtualized-list";
import { Button, Flex, Text } from "@theme-ui/components";
import { ScrollContainer } from "@notesnook/ui";
import { LinkAttributes } from "@notesnook/editor/dist/extensions/link";
import { LinkAttributes } from "@notesnook/editor";
import { NoteResolvedData, ResolvedItem } from "@notesnook/common";
import { Lock } from "../components/icons";
import { ellipsize } from "@notesnook/core/dist/utils/content-block";
import { ellipsize } from "@notesnook/core";
import { BaseDialogProps, DialogManager } from "../common/dialog-manager";
export type NoteLinkingDialogProps = BaseDialogProps<LinkAttributes | false> & {

View File

@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import Dialog from "../components/dialog";
import { Button, Flex, Text } from "@theme-ui/components";
import { db } from "../common/db";
import { Reminder } from "@notesnook/core/dist/types";
import { Reminder } from "@notesnook/core";
import IconTag from "../components/icon-tag";
import { Clock, Refresh } from "../components/icons";
import Note from "../components/note";

View File

@@ -17,12 +17,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { DATE_FORMATS } from "@notesnook/core/dist/common";
import { DATE_FORMATS } from "@notesnook/core";
import { SettingsGroup } from "./types";
import { useStore as useSettingStore } from "../../stores/setting-store";
import dayjs from "dayjs";
import { isUserPremium } from "../../hooks/use-is-user-premium";
import { TimeFormat } from "@notesnook/core/dist/utils/date";
import { TimeFormat } from "@notesnook/core";
import { TrashCleanupInterval } from "@notesnook/core";
export const BehaviourSettings: SettingsGroup[] = [

View File

@@ -22,10 +22,7 @@ import { Loading } from "../../../components/icons";
import { Box, Flex, Link, Text } from "@theme-ui/components";
import { getFormattedDate } from "@notesnook/common";
import { db } from "../../../common/db";
import {
Transaction,
TransactionStatus
} from "@notesnook/core/dist/api/subscriptions";
import { Transaction, TransactionStatus } from "@notesnook/core";
const TransactionStatusToText: Record<TransactionStatus, string> = {
completed: "Completed",

View File

@@ -46,7 +46,7 @@ import {
import { useEffect, useState } from "react";
import { CSS } from "@dnd-kit/utilities";
import { createPortal } from "react-dom";
import { getId } from "@notesnook/core/dist/utils/id";
import { getId } from "@notesnook/core";
import { Label } from "@theme-ui/components";
import { db } from "../../../common/db";
import { useToolbarConfig } from "../../../components/editor/manager";

View File

@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { Language, useSpellChecker } from "../../../hooks/use-spell-checker";
import { Input, Label } from "@theme-ui/components";
import { useCallback, useEffect, useState } from "react";
import { deleteItem } from "@notesnook/core/dist/utils/array";
import { deleteItem } from "@notesnook/core";
import { FlexScrollContainer } from "../../../components/scroll-container";
export function SpellCheckerLanguages() {

View File

@@ -21,7 +21,7 @@ import { Flex, Image, Text } from "@theme-ui/components";
import { Edit, User } from "../../../components/icons";
import { useStore as useUserStore } from "../../../stores/user-store";
import { useStore as useSettingStore } from "../../../stores/setting-store";
import { getObjectIdTimestamp } from "@notesnook/core/dist/utils/object-id";
import { getObjectIdTimestamp } from "@notesnook/core";
import { getFormattedDate } from "@notesnook/common";
import { SUBSCRIPTION_STATUS } from "../../../common/constants";
import dayjs from "dayjs";

View File

@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import "./polyfills";
import "./app.css";
import { AppEventManager, AppEvents } from "./common/app-events";
import { register } from "./service-worker-registration";

View File

@@ -17,8 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { IFileStorage } from "@notesnook/streamable-fs/dist/src/interfaces";
import { File } from "@notesnook/streamable-fs/dist/src/types";
import { IFileStorage, File } from "@notesnook/streamable-fs";
import { IndexedDBKVStore } from "./key-value";
import OriginPrivateFileStoreWorker from "./opfs.worker?worker";
import { OriginPrivateFileStoreWorkerType } from "./opfs.worker";

View File

@@ -23,11 +23,11 @@ import axios from "axios";
import { AppEventManager, AppEvents } from "../common/app-events";
import { StreamableFS } from "@notesnook/streamable-fs";
import { NNCrypto } from "./nncrypto";
import hosts from "@notesnook/core/dist/utils/constants";
import { hosts } from "@notesnook/core";
import { saveAs } from "file-saver";
import { showToast } from "../utils/toast";
import { db } from "../common/db";
import { getFileNameWithExtension } from "@notesnook/core/dist/utils/filename";
import { getFileNameWithExtension } from "@notesnook/core";
import { ChunkedStream, IntoChunks } from "../utils/streams/chunked-stream";
import { ProgressStream } from "../utils/streams/progress-stream";
import { consumeReadableStream } from "../utils/stream";
@@ -35,7 +35,7 @@ import { Base64DecoderStream } from "../utils/streams/base64-decoder-stream";
import { toBlob } from "@notesnook-importer/core/dist/src/utils/stream";
import { DataFormat, SerializedKey } from "@notesnook/crypto";
import { IDataType } from "hash-wasm/dist/lib/util";
import FileHandle from "@notesnook/streamable-fs/dist/src/filehandle";
import { FileHandle } from "@notesnook/streamable-fs";
import {
CacheStorageFileStore,
IndexedDBFileStore,
@@ -48,7 +48,7 @@ import {
IFileStorage,
Output,
RequestOptions
} from "@notesnook/core/dist/interfaces";
} from "@notesnook/core";
import { logger } from "../utils/logger";
import { newQueue } from "@henrygd/queue";

View File

@@ -17,8 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { IFileStorage } from "@notesnook/streamable-fs/dist/src/interfaces";
import { File } from "@notesnook/streamable-fs/dist/src/types";
import { File, IFileStorage } from "@notesnook/streamable-fs";
import { IndexedDBKVStore } from "./key-value";
import { expose, transfer } from "comlink";

View File

@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { IStorage } from "@notesnook/core/dist/interfaces";
import { IStorage } from "@notesnook/core";
import {
IndexedDBKVStore,
LocalStorageKVStore,
@@ -25,7 +25,7 @@ import {
IKVStore
} from "./key-value";
import { NNCrypto } from "./nncrypto";
import type { Cipher, SerializedKey } from "@notesnook/crypto/dist/src/types";
import type { Cipher, SerializedKey } from "@notesnook/crypto";
import { isFeatureSupported } from "../utils/feature-check";
import { IKeyStore } from "./key-store";
import { User } from "@notesnook/core";

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { useState } from "react";
import EventManager from "@notesnook/core/dist/utils/event-manager";
import { EventManager } from "@notesnook/core";
import Config from "../utils/config";
import type { HashRoute } from "./hash-routes";
import type { ReplaceParametersInPath } from "./types";

View File

@@ -24,7 +24,7 @@ import Config from "../utils/config";
import { isUserPremium } from "../hooks/use-is-user-premium";
import { SUBSCRIPTION_STATUS } from "../common/constants";
import { appVersion } from "../utils/version";
import { findItemAndDelete } from "@notesnook/core/dist/utils/array";
import { findItemAndDelete } from "@notesnook/core";
/**
* @extends {BaseStore<AnnouncementStore>}

View File

@@ -31,7 +31,7 @@ import { store as settingStore } from "./setting-store";
import BaseStore from "./index";
import { showToast } from "../utils/toast";
import { Notice, resetNotices } from "../common/notices";
import { EV, EVENTS, SYNC_CHECK_IDS } from "@notesnook/core/dist/common";
import { EV, EVENTS, SYNC_CHECK_IDS, SyncOptions } from "@notesnook/core";
import { logger } from "../utils/logger";
import Config from "../utils/config";
import {
@@ -40,7 +40,6 @@ import {
} from "../utils/page-visibility";
import { NetworkCheck } from "../utils/network-check";
import { Color, Notebook, Tag } from "@notesnook/core";
import { SyncOptions } from "@notesnook/core/dist/api/sync";
type SyncState =
| "synced"

View File

@@ -23,7 +23,7 @@ import { store as appStore } from "./app-store";
import { store as settingStore } from "./setting-store";
import { db } from "../common/db";
import BaseStore from ".";
import { EV, EVENTS } from "@notesnook/core/dist/common";
import { EV, EVENTS } from "@notesnook/core";
import { logger } from "../utils/logger";
import Config from "../utils/config";
import { setDocumentTitle } from "../utils/dom";
@@ -36,15 +36,15 @@ import {
Note,
Tag,
isDeleted,
isTrashItem
isTrashItem,
NoteContent
} from "@notesnook/core";
import { NoteContent } from "@notesnook/core/dist/collections/session-content";
import { Context } from "../components/list-container/types";
import { showToast } from "../utils/toast";
import { getId } from "@notesnook/core/dist/utils/id";
import { getId } from "@notesnook/core";
import { PersistStorage } from "zustand/middleware";
import { getFormattedHistorySessionDate } from "@notesnook/common";
import { isCipher } from "@notesnook/core/dist/database/crypto";
import { isCipher } from "@notesnook/core";
import { hashNavigate } from "../navigation";
import { AppEventManager, AppEvents } from "../common/app-events";
import Vault from "../common/vault";

View File

@@ -21,8 +21,7 @@ import createStore from "../common/store";
import { db } from "../common/db";
import BaseStore from "./index";
import { store as noteStore } from "./note-store";
import { Note, VirtualizedGrouping } from "@notesnook/core";
import { PublishOptions } from "@notesnook/core/dist/api/monographs";
import { Note, VirtualizedGrouping, PublishOptions } from "@notesnook/core";
class MonographStore extends BaseStore<MonographStore> {
monographs: VirtualizedGrouping<Note> | undefined = undefined;

View File

@@ -24,9 +24,12 @@ import { TaskScheduler } from "../utils/task-scheduler";
import dayjs from "dayjs";
import Config from "../utils/config";
import { desktop } from "../common/desktop-bridge";
import { Reminder, VirtualizedGrouping } from "@notesnook/core";
import {
Reminder,
VirtualizedGrouping,
FilteredSelector
} from "@notesnook/core";
import { store as noteStore } from "./note-store";
import { FilteredSelector } from "@notesnook/core/dist/database/sql-collection";
import { ReminderPreviewDialog } from "../dialogs/reminder-preview-dialog";
class ReminderStore extends BaseStore<ReminderStore> {

View File

@@ -25,7 +25,7 @@ import Config from "../utils/config";
import BaseStore from "./index";
import { useEditorStore } from "./editor-store";
import { setDocumentTitle } from "../utils/dom";
import { TimeFormat } from "@notesnook/core/dist/utils/date";
import { TimeFormat } from "@notesnook/core";
import { Profile, TrashCleanupInterval } from "@notesnook/core";
export const HostIds = ["API_HOST", "AUTH_HOST", "SSE_HOST"] as const;

View File

@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import createStore from "../common/store";
import { db } from "../common/db";
import BaseStore from "./index";
import { Tag } from "@notesnook/core/dist/types";
import { Tag } from "@notesnook/core";
import { VirtualizedGrouping } from "@notesnook/core";
class TagStore extends BaseStore<TagStore> {

View File

@@ -21,7 +21,7 @@ import createStore from "../common/store";
import { db } from "../common/db";
import BaseStore from "./index";
import config from "../utils/config";
import { EV, EVENTS } from "@notesnook/core/dist/common";
import { EV, EVENTS } from "@notesnook/core";
import Config from "../utils/config";
import { hashNavigate } from "../navigation";
import { isUserPremium } from "../hooks/use-is-user-premium";

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { desktop } from "../common/desktop-bridge";
import { ICompressor } from "@notesnook/core/dist/interfaces";
import { ICompressor } from "@notesnook/core";
import { Foras, gzip, gunzip, Memory } from "@hazae41/foras";
export class Compressor implements ICompressor {

View File

@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import EventManager from "@notesnook/core/dist/utils/event-manager";
import { EventManager } from "@notesnook/core";
const KeyboardEventManager = new EventManager();

View File

@@ -17,11 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import {
initialize,
logger as _logger,
logManager
} from "@notesnook/core/dist/logger";
import { initialize, logger as _logger, logManager } from "@notesnook/core";
import { LogMessage, NoopLogger, format } from "@notesnook/logger";
import { ZipFile, createZipStream } from "./streams/zip-stream";
import { createWriteStream } from "./stream-saver";

View File

@@ -17,13 +17,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { getFileNameWithExtension } from "@notesnook/core/dist/utils/filename";
import { getFileNameWithExtension, Attachment } from "@notesnook/core";
import { db } from "../../common/db";
import { lazify } from "../lazify";
import { showToast } from "../toast";
import { makeUniqueFilename } from "./utils";
import { ZipFile } from "./zip-stream";
import { Attachment } from "@notesnook/core";
import { logger } from "../logger";
export const METADATA_FILENAME = "metadata.json";

View File

@@ -30,7 +30,7 @@ import { h } from "./html";
import { sanitizeFilename } from "@notesnook/common";
import { getFormattedDate } from "@notesnook/common";
import { useStore as useThemeStore } from "../stores/theme-store";
import { isCipher } from "@notesnook/core/dist/database/crypto";
import { isCipher } from "@notesnook/core";
import { attachFiles } from "../components/editor/picker";
export class WebExtensionServer implements Server {

View File

@@ -27,9 +27,8 @@ import AuthContainer from "../components/auth-container";
import { AuthField, SubmitButton } from "./auth";
import { createBackup, restoreBackupFile, selectBackupFile } from "../common";
import Config from "../utils/config";
import { EVENTS } from "@notesnook/core/dist/common";
import { ErrorText } from "../components/error-text";
import { User } from "@notesnook/core";
import { EVENTS, User } from "@notesnook/core";
import { RecoveryKeyDialog } from "../dialogs/recovery-key-dialog";
type RecoveryMethodType = "key" | "backup" | "reset";