Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

common: fix esm imports

Ammar Ahmed9bc8bddc1259
diff --git a/apps/mobile/app/screens/editor/tiptap/types.ts b/apps/mobile/app/screens/editor/tiptap/types.ts
index 89239ac1f..3248d27c7 100644
--- a/apps/mobile/app/screens/editor/tiptap/types.ts
+++ b/apps/mobile/app/screens/editor/tiptap/types.ts
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import type { ToolbarGroupDefinition } from "@notesnook/editor";
import { useEditor } from "./use-editor";
+import { FeatureId, FeatureResult } from "@notesnook/common";
export type useEditorType = ReturnType<typeof useEditor>;
export type EditorState = {
@@ -57,6 +58,7 @@ export type Settings = {
timeFormat: string;
fontScale: number;
markdownShortcuts: boolean;
+ features: Record<any, any>;
};
export type EditorProps = {
diff --git a/packages/common/src/hooks/use-is-feature-available.ts b/packages/common/src/hooks/use-is-feature-available.ts
index 8aa70a27e..435edb542 100644
--- a/packages/common/src/hooks/use-is-feature-available.ts
+++ b/packages/common/src/hooks/use-is-feature-available.ts
@@ -23,8 +23,8 @@ import {
FeatureId,
FeatureResult,
isFeatureAvailable
-} from "../utils";
-import { usePromise } from "./use-promise";
+} from "../utils/index.js";
+import { usePromise } from "./use-promise.js";
export function useIsFeatureAvailable<TId extends FeatureId>(
id: TId,
diff --git a/packages/common/src/utils/is-feature-available.ts b/packages/common/src/utils/is-feature-available.ts
index d30492954..8de99f646 100644
--- a/packages/common/src/utils/is-feature-available.ts
+++ b/packages/common/src/utils/is-feature-available.ts
@@ -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 { database as db } from "../database";
+import { database as db } from "../database.js";
import { SubscriptionPlan, SubscriptionType } from "@notesnook/core";
type CaptionValue = ("infinity" | (string & {})) | boolean | number;