Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Aug 30, 2022
2 parents ef5640c + 24f1584 commit 5752516
Show file tree
Hide file tree
Showing 68 changed files with 42,571 additions and 53 deletions.
5 changes: 4 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ apps/mobile/__tests__/
apps/web/public/an.js

# editor
packages/editor/styles/
packages/editor/styles/

# editor mobile
packages/editor-mobile/build.bundle
9 changes: 3 additions & 6 deletions apps/mobile/app/common/database/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import Database from "@streetwriters/notesnook-core/api/index";
import {
initalize,
logger as dbLogger
} from "@streetwriters/notesnook-core/logger";
import Database from "@notesnook/core/api/index";
import { initalize, logger as dbLogger } from "@notesnook/core/logger";
import { Platform } from "react-native";
import { MMKVLoader } from "react-native-mmkv-storage";
import filesystem from "../filesystem";
Expand All @@ -16,7 +13,7 @@ initalize(new KV(LoggerStorage));
export const DatabaseLogger = dbLogger;

/**
* @type {import("@streetwriters/notesnook-core/api/index").default}
* @type {import("@notesnook/core/api/index").default}
*/
export var db = new Database(
Storage,
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/common/filesystem/download.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import NetInfo from "@react-native-community/netinfo";
import hosts from "@streetwriters/notesnook-core/utils/constants";
import hosts from "@notesnook/core/utils/constants";
import React from "react";
import { Platform } from "react-native";
import * as ScopedStorage from "react-native-scoped-storage";
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/hooks/use-app-events.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import NetInfo from "@react-native-community/netinfo";
import { EV, EVENTS } from "@streetwriters/notesnook-core/common";
import { EV, EVENTS } from "@notesnook/core/common";
import { useEffect, useRef } from "react";
import {
Appearance,
Expand Down
5 changes: 2 additions & 3 deletions apps/mobile/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"dependencies": {
"@flyerhq/react-native-link-preview": "^1.6.0",
"@mdi/js": "^6.7.96",
"@streetwriters/editor": "*",
"@streetwriters/notesnook-core": "^7.3.5",
"@notesnook/editor": "*",
"@notesnook/core": "*",
"absolutify": "^0.1.0",
"buffer": "^6.0.3",
"dayjs": "^1.10.4",
Expand All @@ -22,7 +22,6 @@
"react-native-reanimated-material-menu": "github:ammarahm-ed/react-native-reanimated-material-menu",
"react-native-reanimated-progress-bar": "1.0.1",
"showdown": "github:thecodrr/showdown",
"showndown": "github:thecodrr/showdown",
"toggle-switch-react-native": "3.2.0",
"url": "^0.11.0",
"validator": "^13.5.2",
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/screens/editor/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import { EV, EVENTS } from "@streetwriters/notesnook-core/common";
import { EV, EVENTS } from "@notesnook/core/common";
import React, {
forwardRef,
useEffect,
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/app/screens/editor/tiptap/commands.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type {
Attachment,
AttachmentProgress
} from "@streetwriters/editor/dist/extensions/attachment/index";
import type { ImageAttributes } from "@streetwriters/editor/dist/extensions/image/index";
} from "@notesnook/editor/dist/extensions/attachment/index";
import type { ImageAttributes } from "@notesnook/editor/dist/extensions/image/index";
import { createRef, RefObject } from "react";
import { Platform } from "react-native";
import { EdgeInsets } from "react-native-safe-area-context";
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/screens/editor/tiptap/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEditor } from "./use-editor";
import type { ToolbarGroupDefinition } from "@streetwriters/editor/dist/toolbar/types";
import type { ToolbarGroupDefinition } from "@notesnook/editor/dist/toolbar/types";
import { ThemeStore } from "../../../stores/use-theme-store";
import { NoteType } from "../../../utils/types";
export type useEditorType = ReturnType<typeof useEditor>;
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/screens/notebook/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { groupArray } from "@streetwriters/notesnook-core/utils/grouping";
import { groupArray } from "@notesnook/core/utils/grouping";
import { qclone } from "qclone";
import React, { useEffect, useRef, useState } from "react";
import { db } from "../../common/database";
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/screens/notes/colored.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { groupArray } from "@streetwriters/notesnook-core/utils/grouping";
import { groupArray } from "@notesnook/core/utils/grouping";
import React from "react";
import NotesPage, { PLACEHOLDER_DATA } from ".";
import { db } from "../../common/database";
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/screens/notes/monographs.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { groupArray } from "@streetwriters/notesnook-core/utils/grouping";
import { groupArray } from "@notesnook/core/utils/grouping";
import React from "react";
import NotesPage, { PLACEHOLDER_DATA } from ".";
import { db } from "../../common/database";
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/screens/notes/tagged.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { groupArray } from "@streetwriters/notesnook-core/utils/grouping";
import { groupArray } from "@notesnook/core/utils/grouping";
import React from "react";
import NotesPage, { PLACEHOLDER_DATA } from ".";
import { db } from "../../common/database";
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/screens/notes/topic-notes.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { groupArray } from "@streetwriters/notesnook-core/utils/grouping";
import { groupArray } from "@notesnook/core/utils/grouping";
import React from "react";
import NotesPage, { PLACEHOLDER_DATA } from ".";
import { db } from "../../common/database";
Expand Down
6 changes: 1 addition & 5 deletions apps/mobile/app/screens/settings/debug.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import Clipboard from "@react-native-clipboard/clipboard";
import { LogMessage } from "@streetwriters/logger";
import {
format,
LogLevel,
logManager
} from "@streetwriters/notesnook-core/logger";
import { format, LogLevel, logManager } from "@notesnook/core/logger";
import React, { useEffect, useState } from "react";
import { FlatList, Platform, TouchableOpacity, View } from "react-native";
import * as ScopedStorage from "react-native-scoped-storage";
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/screens/settings/editor/state.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ToolbarGroupDefinition } from "@streetwriters/editor/dist/toolbar/types";
import type { ToolbarGroupDefinition } from "@notesnook/editor/dist/toolbar/types";
import create, { State } from "zustand";
import { persist, StateStorage } from "zustand/middleware";
import { useNoteStore } from "../../../stores/use-notes-store";
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/screens/settings/editor/tool-sheet.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ToolId } from "@streetwriters/editor/dist/toolbar";
import { ToolId } from "@notesnook/editor/dist/toolbar";
import React, { RefObject } from "react";
import { View } from "react-native";
import ActionSheet from "react-native-actions-sheet";
Expand Down
8 changes: 4 additions & 4 deletions apps/mobile/app/screens/settings/editor/toolbar-definition.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Icons } from "@streetwriters/editor/dist/toolbar/icons";
import { Icons } from "@notesnook/editor/dist/toolbar/icons";
import {
getDefaultPresets,
getAllTools
} from "@streetwriters/editor/dist/toolbar/tool-definitions";
import { ToolId } from "@streetwriters/editor/dist/toolbar/tools";
import { ToolbarGroupDefinition } from "@streetwriters/editor/dist/toolbar/index";
} 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();
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/services/event-manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Clipboard from "@react-native-clipboard/clipboard";
import EventManager from "@streetwriters/notesnook-core/utils/eventmanager";
import EventManager from "@notesnook/core/utils/eventmanager";
import { RefObject } from "react";
import ActionSheet from "react-native-actions-sheet";
import { Config } from "react-native-config";
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/services/premium.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CHECK_IDS } from "@streetwriters/notesnook-core/common";
import { CHECK_IDS } from "@notesnook/core/common";
import React from "react";
import { Platform } from "react-native";
import * as RNIap from "react-native-iap";
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/services/sync.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import NetInfo from "@react-native-community/netinfo";
import { EVENTS } from "@streetwriters/notesnook-core/common";
import { EVENTS } from "@notesnook/core/common";
import { initAfterSync } from "../stores/index";
import { useUserStore } from "../stores/use-user-store";
import { doInBackground } from "../utils";
Expand Down
1 change: 0 additions & 1 deletion apps/mobile/native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"test": "jest --forceExit",
"lint": "eslint .",
"build-detox-android": "REACT_NATIVE_DEPENDENCIES=$HOME/Repos/notesnook-mobile/rn-build-deps/ ENVFILE=.env.test detox build -c android.emu.debug",
"update": "yarn add @streetwriters/notesnook-core",
"test-android": "adb reverse tcp:8081 tcp:8081 && yarn detox test --configuration android.emu.debug --detectOpenHandles",
"test-android-release": "detox test --configuration android.emu.release",
"bump": "npx react-native bump-version --skip-semver-for android",
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/native/webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module.exports = (env) => {
//'react-native': reactNativePath,
"react": path.join(__dirname, "../node_modules/react"),
"react-dom": path.join(__dirname, "../node_modules/react-dom"),
"@streetwriters/editor": path.join(__dirname, "../../../packages/editor"),
"@notesnook/editor": path.join(__dirname, "../../../packages/editor"),
},
},
/**
Expand Down
14 changes: 7 additions & 7 deletions apps/mobile/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"typescript": "^4.8.2"
},
"dependencies": {
"@streetwriters/editor": "*"
"@notesnook/editor": "*"
}
}
2 changes: 1 addition & 1 deletion apps/mobile/share/share.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getPreviewData } from "@flyerhq/react-native-link-preview";
import { parseHTML } from "@streetwriters/notesnook-core/utils/htmlparser";
import { parseHTML } from "@notesnook/core/utils/htmlparser";
import React, { useEffect, useRef, useState } from "react";
import {
ActivityIndicator,
Expand Down
3 changes: 0 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@
"analyze": "source-map-explorer 'build/static/js/*.js'",
"postinstall": "patch-package"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
Expand Down
1 change: 1 addition & 0 deletions packages/editor-mobile/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SKIP_PREFLIGHT_CHECK=true
24 changes: 24 additions & 0 deletions packages/editor-mobile/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build
/build.bundle

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
Empty file.
Loading

0 comments on commit 5752516

Please sign in to comment.