2022-11-11 16:57:55 +05:00
|
|
|
/*
|
|
|
|
|
This file is part of the Notesnook project (https://notesnook.com/)
|
|
|
|
|
|
2023-01-16 13:44:52 +05:00
|
|
|
Copyright (C) 2023 Streetwriters (Private) Limited
|
2022-11-11 16:57:55 +05:00
|
|
|
|
|
|
|
|
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/>.
|
|
|
|
|
*/
|
2023-07-12 06:51:14 +05:00
|
|
|
/* eslint-disable no-var */
|
2022-11-11 16:57:55 +05:00
|
|
|
|
2023-06-12 12:00:16 +05:00
|
|
|
import "vite/client";
|
2023-06-17 11:14:00 +05:00
|
|
|
import "vite-plugin-svgr/client";
|
2024-02-07 13:32:27 +05:00
|
|
|
import "@notesnook/desktop/dist/preload";
|
2025-10-03 11:59:53 +05:00
|
|
|
import type { Database } from "@notesnook/core";
|
2023-06-17 11:14:00 +05:00
|
|
|
|
2023-06-16 19:10:02 +05:00
|
|
|
declare global {
|
2023-07-12 06:51:14 +05:00
|
|
|
var PUBLIC_URL: string;
|
|
|
|
|
var APP_VERSION: string;
|
|
|
|
|
var GIT_HASH: string;
|
|
|
|
|
var IS_DESKTOP_APP: boolean;
|
|
|
|
|
var IS_TESTING: boolean;
|
|
|
|
|
var PLATFORM: "web" | "desktop";
|
|
|
|
|
var IS_BETA: boolean;
|
2023-08-08 13:18:27 +05:00
|
|
|
var APP_TITLE: string;
|
2023-08-10 07:18:49 +05:00
|
|
|
var IS_THEME_BUILDER: boolean;
|
2024-06-01 13:21:05 +05:00
|
|
|
var hasNativeTitlebar: boolean;
|
2023-07-12 06:51:14 +05:00
|
|
|
|
2024-01-12 15:41:33 +05:00
|
|
|
interface AuthenticationExtensionsClientInputs {
|
|
|
|
|
prf?: {
|
|
|
|
|
eval: {
|
|
|
|
|
first: BufferSource;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface AuthenticationExtensionsClientOutputs {
|
|
|
|
|
prf?: {
|
|
|
|
|
enabled?: boolean;
|
|
|
|
|
results?: {
|
|
|
|
|
first: ArrayBuffer;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface PublicKeyCredentialRequestOptions {
|
|
|
|
|
hints?: ("security-key" | "client-device" | "hybrid")[];
|
|
|
|
|
}
|
|
|
|
|
interface PublicKeyCredentialCreationOptions {
|
|
|
|
|
hints?: ("security-key" | "client-device" | "hybrid")[];
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-15 07:14:08 +05:00
|
|
|
interface FileSystemFileHandle {
|
|
|
|
|
createSyncAccessHandle(options?: {
|
|
|
|
|
mode: "read-only" | "readwrite" | "readwrite-unsafe";
|
|
|
|
|
}): Promise<FileSystemSyncAccessHandle>;
|
|
|
|
|
}
|
2024-03-31 00:06:34 +05:00
|
|
|
interface Navigator {
|
|
|
|
|
windowControlsOverlay?: {
|
|
|
|
|
getTitlebarAreaRect(): DOMRect;
|
|
|
|
|
visible: boolean;
|
|
|
|
|
};
|
|
|
|
|
}
|
2024-08-16 18:06:07 +05:00
|
|
|
interface Window {
|
|
|
|
|
ApplePaySession?: {
|
2025-01-20 10:35:23 +05:00
|
|
|
canMakePayments(): boolean | Promise<boolean>;
|
2024-08-16 18:06:07 +05:00
|
|
|
};
|
2025-09-12 14:47:05 +05:00
|
|
|
ReactNativeWebView?: {
|
|
|
|
|
postMessage(message: string): void;
|
|
|
|
|
};
|
2024-08-16 18:06:07 +05:00
|
|
|
}
|
2022-11-11 16:57:55 +05:00
|
|
|
}
|