From 016b73028d6c50b1e9a648aafa29b51b32288d1d Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Mon, 9 Nov 2020 17:01:24 +0100 Subject: [PATCH 01/14] feat: improve bridge and exported types --- app/assets/javascripts/app.ts | 25 ++++++---- app/assets/javascripts/services/bridge.ts | 46 ++++--------------- .../javascripts/services/browserBridge.ts | 32 +++++++++++++ app/assets/javascripts/startApplication.ts | 6 +++ dist/@types/app/assets/javascripts/app.d.ts | 3 +- .../assets/javascripts/services/bridge.d.ts | 5 +- 6 files changed, 68 insertions(+), 49 deletions(-) create mode 100644 app/assets/javascripts/services/browserBridge.ts create mode 100644 app/assets/javascripts/startApplication.ts diff --git a/app/assets/javascripts/app.ts b/app/assets/javascripts/app.ts index a49e22c40..58ae18e44 100644 --- a/app/assets/javascripts/app.ts +++ b/app/assets/javascripts/app.ts @@ -53,17 +53,16 @@ import { import { trusted } from './filters'; import { isDev } from './utils'; -import { Bridge, BrowserBridge } from './services/bridge'; +import { BrowserBridge } from './services/browserBridge'; import { startErrorReporting } from './services/errorReporting'; import { alertDialog } from './services/alertService'; +import { StartApplication } from './startApplication'; +import { Bridge } from './services/bridge'; -if (__WEB__) { - startApplication((window as any)._default_sync_server, new BrowserBridge()); -} else { - (window as any).startApplication = startApplication; -} - -async function startApplication(defaultSyncServerHost: string, bridge: Bridge) { +const startApplication: StartApplication = async function startApplication( + defaultSyncServerHost: string, + bridge: Bridge +) { notifyBetaPeriodEnd(); SNLog.onLog = console.log; @@ -77,7 +76,7 @@ async function startApplication(defaultSyncServerHost: string, bridge: Bridge) { .config(configRoutes) .constant('bridge', bridge) .constant('defaultSyncServerHost', defaultSyncServerHost) - .constant('appVersion', __VERSION__); + .constant('appVersion', bridge.appVersion); // Controllers angular @@ -149,7 +148,7 @@ async function startApplication(defaultSyncServerHost: string, bridge: Bridge) { angular.element(document).ready(() => { angular.bootstrap(document, ['app']); }); -} +}; function notifyBetaPeriodEnd() { if (window.location.hostname === 'app-beta.standardnotes.org') { @@ -163,3 +162,9 @@ function notifyBetaPeriodEnd() { }); } } + +if (__WEB__) { + startApplication((window as any)._default_sync_server, new BrowserBridge(__VERSION__)); +} else { + (window as any).startApplication = startApplication; +} diff --git a/app/assets/javascripts/services/bridge.ts b/app/assets/javascripts/services/bridge.ts index fdf67f1df..f5f4488c6 100644 --- a/app/assets/javascripts/services/bridge.ts +++ b/app/assets/javascripts/services/bridge.ts @@ -1,51 +1,23 @@ -import { PurePayload, Environment } from "snjs"; +/** + * This file will be imported by desktop, so we make sure imports are not + * carrying too much code with them that's not tree-shakeable. + */ +import { Environment } from 'snjs/lib/platforms'; +export { Environment }; /** Platform-specific (i-e Electron/browser) behavior is handled by a Bridge object. */ export interface Bridge { - environment: Environment, + readonly appVersion: string; + environment: Environment; getKeychainValue(): Promise; setKeychainValue(value: any): Promise; clearKeychainValue(): Promise; extensionsServerHost?: string; - syncComponents(payloads: PurePayload[]): void; + syncComponents(payloads: unknown[]): void; onMajorDataChange(): void; onInitialDataLoad(): void; onSearch(text?: string): void; downloadBackup(): void; } - -const KEYCHAIN_STORAGE_KEY = 'keychain'; - -export class BrowserBridge implements Bridge { - environment = Environment.Web; - - async getKeychainValue(): Promise { - const value = localStorage.getItem(KEYCHAIN_STORAGE_KEY); - if (value) { - return JSON.parse(value); - } - } - - async setKeychainValue(value: any): Promise { - localStorage.setItem(KEYCHAIN_STORAGE_KEY, JSON.stringify(value)); - } - - async clearKeychainValue(): Promise { - localStorage.removeItem(KEYCHAIN_STORAGE_KEY); - } - - /** No-ops */ - - syncComponents() { - } - onMajorDataChange() { - } - onInitialDataLoad() { - } - onSearch() { - } - downloadBackup() { - } -} diff --git a/app/assets/javascripts/services/browserBridge.ts b/app/assets/javascripts/services/browserBridge.ts new file mode 100644 index 000000000..a7d2e2dab --- /dev/null +++ b/app/assets/javascripts/services/browserBridge.ts @@ -0,0 +1,32 @@ +import { Bridge } from "./bridge"; +import { Environment } from 'snjs'; + +const KEYCHAIN_STORAGE_KEY = 'keychain'; + +export class BrowserBridge implements Bridge { + constructor(public appVersion: string) {} + environment = Environment.Web; + + async getKeychainValue(): Promise { + const value = localStorage.getItem(KEYCHAIN_STORAGE_KEY); + if (value) { + return JSON.parse(value); + } + } + + async setKeychainValue(value: any): Promise { + localStorage.setItem(KEYCHAIN_STORAGE_KEY, JSON.stringify(value)); + } + + async clearKeychainValue(): Promise { + localStorage.removeItem(KEYCHAIN_STORAGE_KEY); + } + + /** No-ops */ + + syncComponents() {} + onMajorDataChange() {} + onInitialDataLoad() {} + onSearch() {} + downloadBackup() {} +} diff --git a/app/assets/javascripts/startApplication.ts b/app/assets/javascripts/startApplication.ts new file mode 100644 index 000000000..1ee380a1c --- /dev/null +++ b/app/assets/javascripts/startApplication.ts @@ -0,0 +1,6 @@ +import { Bridge } from "./services/bridge"; + +export type StartApplication = ( + defaultSyncServerHost: string, + bridge: Bridge +) => Promise; diff --git a/dist/@types/app/assets/javascripts/app.d.ts b/dist/@types/app/assets/javascripts/app.d.ts index cb0ff5c3b..ed7a54c5f 100644 --- a/dist/@types/app/assets/javascripts/app.d.ts +++ b/dist/@types/app/assets/javascripts/app.d.ts @@ -1 +1,2 @@ -export {}; +import { Bridge } from './services/bridge'; +export declare type StartApplication = (defaultSyncServerHost: string, bridge: Bridge) => Promise; diff --git a/dist/@types/app/assets/javascripts/services/bridge.d.ts b/dist/@types/app/assets/javascripts/services/bridge.d.ts index a61b3f734..2ad61a1dc 100644 --- a/dist/@types/app/assets/javascripts/services/bridge.d.ts +++ b/dist/@types/app/assets/javascripts/services/bridge.d.ts @@ -1,6 +1,7 @@ -import { PurePayload, Environment } from "snjs"; +import { PurePayload, Environment } from 'snjs'; /** Platform-specific (i-e Electron/browser) behavior is handled by a Bridge object. */ export interface Bridge { + readonly appVersion: string; environment: Environment; getKeychainValue(): Promise; setKeychainValue(value: any): Promise; @@ -13,6 +14,8 @@ export interface Bridge { downloadBackup(): void; } export declare class BrowserBridge implements Bridge { + appVersion: string; + constructor(appVersion: string); environment: Environment; getKeychainValue(): Promise; setKeychainValue(value: any): Promise; From 0023447d547ce454abd442b4151868cd733be66e Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Fri, 13 Nov 2020 12:06:28 +0100 Subject: [PATCH 02/14] fix: do not focus title if element is not mounted --- app/assets/javascripts/views/editor/editor_view.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/views/editor/editor_view.ts b/app/assets/javascripts/views/editor/editor_view.ts index c984c7148..1e5bbcd91 100644 --- a/app/assets/javascripts/views/editor/editor_view.ts +++ b/app/assets/javascripts/views/editor/editor_view.ts @@ -593,7 +593,7 @@ class EditorViewCtrl extends PureViewCtrl<{}, EditorState> { } focusTitle() { - document.getElementById(ElementIds.NoteTitleEditor)!.focus(); + document.getElementById(ElementIds.NoteTitleEditor)?.focus(); } clickedTextArea() { From 0f84a6cbad9784892571255589c4fcc4f64a6d0d Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Fri, 13 Nov 2020 12:19:10 +0100 Subject: [PATCH 03/14] fix: do not emit type declarations --- .gitignore | 1 + app/assets/javascripts/tsconfig.json | 2 +- dist/@types/app/assets/javascripts/app.d.ts | 1 - .../app/assets/javascripts/application.d.ts | 54 ---- .../javascripts/applicationManager.d.ts | 26 -- .../controllers/abstract/pure_ctrl.d.ts | 36 --- .../controllers/applicationView.d.ts | 4 - .../javascripts/controllers/constants.d.ts | 2 - .../javascripts/controllers/editor.d.ts | 116 --------- .../javascripts/controllers/footer.d.ts | 4 - .../assets/javascripts/controllers/index.d.ts | 7 - .../controllers/notes/note_utils.d.ts | 10 - .../javascripts/controllers/notes/notes.d.ts | 4 - .../assets/javascripts/controllers/root.d.ts | 4 - .../assets/javascripts/controllers/tags.d.ts | 4 - .../app/assets/javascripts/database.d.ts | 29 --- .../directives/functional/autofocus.d.ts | 8 - .../directives/functional/click-outside.d.ts | 6 - .../directives/functional/delay-hide.d.ts | 9 - .../directives/functional/elemReady.d.ts | 5 - .../directives/functional/file-change.d.ts | 8 - .../directives/functional/index.d.ts | 9 - .../directives/functional/infiniteScroll.d.ts | 4 - .../directives/functional/lowercase.d.ts | 5 - .../directives/functional/selectOnClick.d.ts | 5 - .../directives/functional/selectOnFocus.d.ts | 5 - .../directives/functional/snEnter.d.ts | 2 - .../directives/views/accountMenu.d.ts | 4 - .../directives/views/actionsMenu.d.ts | 4 - .../directives/views/challengeModal.d.ts | 4 - .../directives/views/componentModal.d.ts | 24 -- .../directives/views/componentView.d.ts | 4 - .../directives/views/editorMenu.d.ts | 4 - .../directives/views/historyMenu.d.ts | 4 - .../javascripts/directives/views/index.d.ts | 15 -- .../directives/views/inputModal.d.ts | 11 - .../javascripts/directives/views/menuRow.d.ts | 4 - .../directives/views/panelResizer.d.ts | 4 - .../directives/views/passwordWizard.d.ts | 4 - .../directives/views/permissionsModal.d.ts | 4 - .../directives/views/privilegesAuthModal.d.ts | 4 - .../views/privilegesManagementModal.d.ts | 4 - .../views/revisionPreviewModal.d.ts | 4 - .../directives/views/sessionHistoryMenu.d.ts | 4 - .../directives/views/syncResolutionMenu.d.ts | 4 - .../app/assets/javascripts/filters/index.d.ts | 1 - .../assets/javascripts/filters/trusted.d.ts | 2 - dist/@types/app/assets/javascripts/index.d.ts | 9 - .../app/assets/javascripts/interface.d.ts | 31 --- .../app/assets/javascripts/messages.d.ts | 4 - .../@types/app/assets/javascripts/routes.d.ts | 2 - .../javascripts/services/alertService.d.ts | 22 -- .../javascripts/services/archiveManager.d.ts | 14 - .../services/autolock_service.d.ts | 27 -- .../assets/javascripts/services/bridge.d.ts | 26 -- .../javascripts/services/desktopManager.d.ts | 52 ---- .../javascripts/services/errorReporting.d.ts | 1 - .../assets/javascripts/services/index.d.ts | 9 - .../javascripts/services/keyboardManager.d.ts | 39 --- .../javascripts/services/localStorage.d.ts | 8 - .../javascripts/services/lockManager.d.ts | 26 -- .../services/nativeExtManager.d.ts | 18 -- .../assets/javascripts/services/platform.d.ts | 11 - .../services/preferencesManager.d.ts | 18 -- .../assets/javascripts/services/state.d.ts | 72 ------ .../javascripts/services/statusManager.d.ts | 10 - .../javascripts/services/themeManager.d.ts | 21 -- .../app/assets/javascripts/strings.d.ts | 46 ---- dist/@types/app/assets/javascripts/types.d.ts | 44 ---- .../javascripts/ui_models/app_state.d.ts | 79 ------ .../javascripts/ui_models/application.d.ts | 58 ----- .../ui_models/application_group.d.ts | 13 - .../ui_models/component_group.d.ts | 23 -- .../assets/javascripts/ui_models/editor.d.ts | 34 --- .../javascripts/ui_models/editor_group.d.ts | 22 -- dist/@types/app/assets/javascripts/utils.d.ts | 7 - .../views/abstract/pure_view_ctrl.d.ts | 44 ---- .../account_switcher/account_switcher.d.ts | 4 - .../views/application/application_view.d.ts | 4 - .../application_group/application_group.d.ts | 4 - .../application_group_view.d.ts | 4 - .../challenge_modal/challenge_modal.d.ts | 4 - .../assets/javascripts/views/constants.d.ts | 2 - .../javascripts/views/editor/editor_view.d.ts | 4 - .../views/editor_group/editor_group.d.ts | 4 - .../views/editor_group/editor_group_view.d.ts | 4 - .../javascripts/views/footer/footer_view.d.ts | 4 - .../app/assets/javascripts/views/index.d.ts | 9 - .../javascripts/views/notes/note_utils.d.ts | 11 - .../javascripts/views/notes/notes_view.d.ts | 4 - .../javascripts/views/tags/tags_view.d.ts | 4 - .../javascripts/web_device_interface.d.ts | 32 --- .../assets/javascripts/angular-sanitize.d.ts | 242 ------------------ .../assets/javascripts/zip/deflate.d.ts | 0 .../assets/javascripts/zip/inflate.d.ts | 0 .../assets/javascripts/zip/z-worker.d.ts | 0 .../vendor/assets/javascripts/zip/zip.d.ts | 0 97 files changed, 2 insertions(+), 1611 deletions(-) delete mode 100644 dist/@types/app/assets/javascripts/app.d.ts delete mode 100644 dist/@types/app/assets/javascripts/application.d.ts delete mode 100644 dist/@types/app/assets/javascripts/applicationManager.d.ts delete mode 100644 dist/@types/app/assets/javascripts/controllers/abstract/pure_ctrl.d.ts delete mode 100644 dist/@types/app/assets/javascripts/controllers/applicationView.d.ts delete mode 100644 dist/@types/app/assets/javascripts/controllers/constants.d.ts delete mode 100644 dist/@types/app/assets/javascripts/controllers/editor.d.ts delete mode 100644 dist/@types/app/assets/javascripts/controllers/footer.d.ts delete mode 100644 dist/@types/app/assets/javascripts/controllers/index.d.ts delete mode 100644 dist/@types/app/assets/javascripts/controllers/notes/note_utils.d.ts delete mode 100644 dist/@types/app/assets/javascripts/controllers/notes/notes.d.ts delete mode 100644 dist/@types/app/assets/javascripts/controllers/root.d.ts delete mode 100644 dist/@types/app/assets/javascripts/controllers/tags.d.ts delete mode 100644 dist/@types/app/assets/javascripts/database.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/functional/autofocus.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/functional/click-outside.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/functional/delay-hide.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/functional/elemReady.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/functional/file-change.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/functional/index.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/functional/infiniteScroll.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/functional/lowercase.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/functional/selectOnClick.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/functional/selectOnFocus.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/functional/snEnter.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/accountMenu.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/actionsMenu.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/challengeModal.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/componentModal.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/componentView.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/editorMenu.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/historyMenu.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/index.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/inputModal.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/menuRow.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/panelResizer.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/passwordWizard.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/permissionsModal.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/privilegesAuthModal.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/privilegesManagementModal.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/revisionPreviewModal.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/sessionHistoryMenu.d.ts delete mode 100644 dist/@types/app/assets/javascripts/directives/views/syncResolutionMenu.d.ts delete mode 100644 dist/@types/app/assets/javascripts/filters/index.d.ts delete mode 100644 dist/@types/app/assets/javascripts/filters/trusted.d.ts delete mode 100644 dist/@types/app/assets/javascripts/index.d.ts delete mode 100644 dist/@types/app/assets/javascripts/interface.d.ts delete mode 100644 dist/@types/app/assets/javascripts/messages.d.ts delete mode 100644 dist/@types/app/assets/javascripts/routes.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/alertService.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/archiveManager.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/autolock_service.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/bridge.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/desktopManager.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/errorReporting.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/index.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/keyboardManager.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/localStorage.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/lockManager.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/nativeExtManager.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/platform.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/preferencesManager.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/state.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/statusManager.d.ts delete mode 100644 dist/@types/app/assets/javascripts/services/themeManager.d.ts delete mode 100644 dist/@types/app/assets/javascripts/strings.d.ts delete mode 100644 dist/@types/app/assets/javascripts/types.d.ts delete mode 100644 dist/@types/app/assets/javascripts/ui_models/app_state.d.ts delete mode 100644 dist/@types/app/assets/javascripts/ui_models/application.d.ts delete mode 100644 dist/@types/app/assets/javascripts/ui_models/application_group.d.ts delete mode 100644 dist/@types/app/assets/javascripts/ui_models/component_group.d.ts delete mode 100644 dist/@types/app/assets/javascripts/ui_models/editor.d.ts delete mode 100644 dist/@types/app/assets/javascripts/ui_models/editor_group.d.ts delete mode 100644 dist/@types/app/assets/javascripts/utils.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/abstract/pure_view_ctrl.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/account_switcher/account_switcher.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/application/application_view.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/application_group/application_group.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/application_group/application_group_view.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/challenge_modal/challenge_modal.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/constants.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/editor/editor_view.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/editor_group/editor_group.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/editor_group/editor_group_view.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/footer/footer_view.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/index.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/notes/note_utils.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/notes/notes_view.d.ts delete mode 100644 dist/@types/app/assets/javascripts/views/tags/tags_view.d.ts delete mode 100644 dist/@types/app/assets/javascripts/web_device_interface.d.ts delete mode 100644 dist/@types/vendor/assets/javascripts/angular-sanitize.d.ts delete mode 100644 dist/@types/vendor/assets/javascripts/zip/deflate.d.ts delete mode 100644 dist/@types/vendor/assets/javascripts/zip/inflate.d.ts delete mode 100644 dist/@types/vendor/assets/javascripts/zip/z-worker.d.ts delete mode 100644 dist/@types/vendor/assets/javascripts/zip/zip.d.ts diff --git a/.gitignore b/.gitignore index 6857795ff..f66f45ef9 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ dump.rdb /dist/javascripts /dist/stylesheets /dist/fonts +/dist/@types diff --git a/app/assets/javascripts/tsconfig.json b/app/assets/javascripts/tsconfig.json index da1734db6..8851c41cd 100644 --- a/app/assets/javascripts/tsconfig.json +++ b/app/assets/javascripts/tsconfig.json @@ -4,11 +4,11 @@ "module": "commonjs", "moduleResolution": "node", "allowJs": true, + "noEmit": true, "strict": true, "isolatedModules": true, "esModuleInterop": true, "declaration": true, - "emitDeclarationOnly": true, "newLine": "lf", "declarationDir": "../../../dist/@types", "baseUrl": ".", diff --git a/dist/@types/app/assets/javascripts/app.d.ts b/dist/@types/app/assets/javascripts/app.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/dist/@types/app/assets/javascripts/app.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/@types/app/assets/javascripts/application.d.ts b/dist/@types/app/assets/javascripts/application.d.ts deleted file mode 100644 index 42de02ddf..000000000 --- a/dist/@types/app/assets/javascripts/application.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/// -import { PasswordWizardType } from './types'; -import { SNApplication, Challenge, ChallengeOrchestrator, ProtectedAction } from 'snjs'; -import { AppState, DesktopManager, LockManager, ArchiveManager, NativeExtManager, StatusManager, ThemeManager, PreferencesManager, KeyboardManager } from './services'; -declare type WebServices = { - appState: AppState; - desktopService: DesktopManager; - lockService: LockManager; - archiveService: ArchiveManager; - nativeExtService: NativeExtManager; - statusService: StatusManager; - themeService: ThemeManager; - prefsService: PreferencesManager; - keyboardService: KeyboardManager; -}; -export declare class WebApplication extends SNApplication { - private $compile?; - private scope?; - private onDeinit?; - private webServices; - private currentAuthenticationElement?; - constructor($compile: ng.ICompileService, $timeout: ng.ITimeoutService, scope: ng.IScope, onDeinit: (app: WebApplication) => void); - /** @override */ - deinit(): void; - setWebServices(services: WebServices): void; - /** @access public */ - getAppState(): AppState; - /** @access public */ - getDesktopService(): DesktopManager; - /** @access public */ - getLockService(): LockManager; - /** @access public */ - getArchiveService(): ArchiveManager; - /** @access public */ - getNativeExtService(): NativeExtManager; - /** @access public */ - getStatusService(): StatusManager; - /** @access public */ - getThemeService(): ThemeManager; - /** @access public */ - getPrefsService(): PreferencesManager; - /** @access public */ - getKeyboardService(): KeyboardManager; - checkForSecurityUpdate(): Promise; - presentPasswordWizard(type: PasswordWizardType): void; - promptForChallenge(challenge: Challenge, orchestrator: ChallengeOrchestrator): void; - performProtocolUpgrade(): Promise; - presentPrivilegesModal(action: ProtectedAction, onSuccess?: any, onCancel?: any): Promise; - presentPrivilegesManagementModal(): void; - authenticationInProgress(): boolean; - presentPasswordModal(callback: () => void): void; - presentRevisionPreviewModal(uuid: string, content: any): void; -} -export {}; diff --git a/dist/@types/app/assets/javascripts/applicationManager.d.ts b/dist/@types/app/assets/javascripts/applicationManager.d.ts deleted file mode 100644 index d3d9f5722..000000000 --- a/dist/@types/app/assets/javascripts/applicationManager.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/// -import { WebApplication } from './application'; -declare type AppManagerChangeCallback = () => void; -export declare class ApplicationManager { - $compile: ng.ICompileService; - $rootScope: ng.IRootScopeService; - $timeout: ng.ITimeoutService; - applications: WebApplication[]; - changeObservers: AppManagerChangeCallback[]; - activeApplication?: WebApplication; - constructor($compile: ng.ICompileService, $rootScope: ng.IRootScopeService, $timeout: ng.ITimeoutService); - private createDefaultApplication; - /** @callback */ - onApplicationDeinit(application: WebApplication): void; - private createNewApplication; - get application(): WebApplication | undefined; - getApplications(): WebApplication[]; - /** - * Notifies observer when the active application has changed. - * Any application which is no longer active is destroyed, and - * must be removed from the interface. - */ - addApplicationChangeObserver(callback: AppManagerChangeCallback): void; - private notifyObserversOfAppChange; -} -export {}; diff --git a/dist/@types/app/assets/javascripts/controllers/abstract/pure_ctrl.d.ts b/dist/@types/app/assets/javascripts/controllers/abstract/pure_ctrl.d.ts deleted file mode 100644 index 583e51dac..000000000 --- a/dist/@types/app/assets/javascripts/controllers/abstract/pure_ctrl.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/// -import { WebApplication } from './../../application'; -import { ApplicationEvent } from 'snjs'; -export declare type CtrlState = Partial>; -export declare type CtrlProps = Partial>; -export declare class PureCtrl { - $timeout: ng.ITimeoutService; - /** Passed through templates */ - application?: WebApplication; - props: CtrlProps; - state: CtrlState; - private unsubApp; - private unsubState; - private stateTimeout; - constructor($timeout: ng.ITimeoutService); - $onInit(): void; - deinit(): void; - $onDestroy(): void; - get appState(): import("../../services/state").AppState; - /** @private */ - resetState(): Promise; - /** @override */ - getInitialState(): {}; - setState(state: CtrlState): Promise; - updateUI(func: () => void): Promise; - initProps(props: CtrlProps): void; - addAppStateObserver(): void; - onAppStateEvent(eventName: any, data: any): void; - addAppEventObserver(): void; - onAppEvent(eventName: ApplicationEvent): void; - /** @override */ - onAppStart(): Promise; - onAppLaunch(): Promise; - onAppKeyChange(): Promise; - onAppSync(): void; -} diff --git a/dist/@types/app/assets/javascripts/controllers/applicationView.d.ts b/dist/@types/app/assets/javascripts/controllers/applicationView.d.ts deleted file mode 100644 index 4cb07e488..000000000 --- a/dist/@types/app/assets/javascripts/controllers/applicationView.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../types'; -export declare class ApplicationView extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/controllers/constants.d.ts b/dist/@types/app/assets/javascripts/controllers/constants.d.ts deleted file mode 100644 index 3eadaa31f..000000000 --- a/dist/@types/app/assets/javascripts/controllers/constants.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const PANEL_NAME_NOTES = "notes"; -export declare const PANEL_NAME_TAGS = "tags"; diff --git a/dist/@types/app/assets/javascripts/controllers/editor.d.ts b/dist/@types/app/assets/javascripts/controllers/editor.d.ts deleted file mode 100644 index 997e98e2d..000000000 --- a/dist/@types/app/assets/javascripts/controllers/editor.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -/// -export class EditorPanel { - restrict: string; - scope: {}; - template: import("pug").compileTemplate; - replace: boolean; - controller: typeof EditorCtrl; - controllerAs: string; - bindToController: boolean; -} -declare class EditorCtrl { - constructor($timeout: any, $rootScope: any, alertManager: any, appState: any, authManager: any, actionsManager: any, componentManager: any, desktopManager: any, keyboardManager: any, modelManager: any, preferencesManager: any, privilegesManager: any, sessionHistory: any, syncManager: any); - $rootScope: any; - alertManager: any; - appState: any; - actionsManager: any; - authManager: any; - componentManager: any; - desktopManager: any; - keyboardManager: any; - modelManager: any; - preferencesManager: any; - privilegesManager: any; - syncManager: any; - state: { - componentStack: never[]; - editorDebounce: number; - isDesktop: any; - spellcheck: boolean; - mutable: { - tagsString: string; - }; - }; - leftResizeControl: {}; - rightResizeControl: {}; - /** Used by .pug template */ - prefKeyMonospace: any; - prefKeySpellcheck: any; - prefKeyMarginResizers: any; - addAppStateObserver(): void; - handleNoteSelectionChange(note: any, previousNote: any): Promise; - addMappingObservers(): void; - addSyncEventHandler(): void; - addSyncStatusObserver(): void; - syncStatusObserver: any; - editorForNote(note: any): any; - setMenuState(menu: any, state: any): void; - toggleMenu(menu: any): void; - closeAllMenus({ exclude }?: { - exclude: any; - }): void; - editorMenuOnSelect: (component: any) => void; - hasAvailableExtensions(): boolean; - performFirefoxPinnedTabFix(): void; - saveNote({ bypassDebouncer, updateClientModified, dontUpdatePreviews }: { - bypassDebouncer: any; - updateClientModified: any; - dontUpdatePreviews: any; - }): void; - saveTimeout: any; - didShowErrorAlert: boolean | undefined; - showSavingStatus(): void; - showAllChangesSavedStatus(): void; - showErrorStatus(error: any): void; - setStatus(status: any, wait?: boolean): void; - statusTimeout: any; - contentChanged(): void; - onTitleEnter($event: any): void; - onTitleChange(): void; - focusEditor(): void; - lastEditorFocusEventSource: any; - focusTitle(): void; - clickedTextArea(): void; - onNameFocus(): void; - editingName: boolean | undefined; - onContentFocus(): void; - onNameBlur(): void; - selectedMenuItem(hide: any): void; - deleteNote(permanently: any): Promise; - performNoteDeletion(note: any): void; - restoreTrashedNote(): void; - deleteNotePermanantely(): void; - getTrashCount(): any; - emptyTrash(): void; - togglePin(): void; - toggleLockNote(): void; - toggleProtectNote(): void; - toggleNotePreview(): void; - toggleArchiveNote(): void; - reloadTagsString(): void; - addTag(tag: any): void; - removeTag(tag: any): void; - saveTags({ strings }?: { - strings: any; - }): void; - onPanelResizeFinish: (width: any, left: any, isMaxWidth: any) => void; - loadPreferences(): void; - reloadFont(): void; - toggleKey(key: any): Promise; - /** @components */ - onEditorLoad: (editor: any) => void; - registerComponentHandler(): void; - reloadComponentStackArray(): void; - reloadComponentContext(): void; - toggleStackComponentForCurrentItem(component: any): void; - disassociateComponentWithCurrentNote(component: any): void; - associateComponentWithCurrentNote(component: any): void; - registerKeyboardShortcuts(): void; - altKeyObserver: any; - trashKeyObserver: any; - deleteKeyObserver: any; - onSystemEditorLoad(): void; - loadedTabListener: boolean | undefined; - tabObserver: any; -} -export {}; diff --git a/dist/@types/app/assets/javascripts/controllers/footer.d.ts b/dist/@types/app/assets/javascripts/controllers/footer.d.ts deleted file mode 100644 index 9762f99cf..000000000 --- a/dist/@types/app/assets/javascripts/controllers/footer.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../types'; -export declare class Footer extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/controllers/index.d.ts b/dist/@types/app/assets/javascripts/controllers/index.d.ts deleted file mode 100644 index beed45331..000000000 --- a/dist/@types/app/assets/javascripts/controllers/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { PureCtrl } from './abstract/pure_ctrl'; -export { EditorPanel } from './editor'; -export { Footer } from './footer'; -export { NotesPanel } from './notes/notes'; -export { TagsPanel } from './tags'; -export { Root } from './root'; -export { ApplicationView } from './applicationView'; diff --git a/dist/@types/app/assets/javascripts/controllers/notes/note_utils.d.ts b/dist/@types/app/assets/javascripts/controllers/notes/note_utils.d.ts deleted file mode 100644 index ac224a63f..000000000 --- a/dist/@types/app/assets/javascripts/controllers/notes/note_utils.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { SNNote, SNTag } from 'snjs'; -export declare enum NoteSortKey { - CreatedAt = "created_at", - UpdatedAt = "updated_at", - ClientUpdatedAt = "client_updated_at", - Title = "title" -} -export declare function filterAndSortNotes(notes: SNNote[], selectedTag: SNTag, showArchived: boolean, hidePinned: boolean, filterText: string, sortBy: string, reverse: boolean): SNNote[]; -export declare function filterNotes(notes: SNNote[], selectedTag: SNTag, showArchived: boolean, hidePinned: boolean, filterText: string): SNNote[]; -export declare function sortNotes(notes: SNNote[] | undefined, sortBy: string, reverse: boolean): SNNote[]; diff --git a/dist/@types/app/assets/javascripts/controllers/notes/notes.d.ts b/dist/@types/app/assets/javascripts/controllers/notes/notes.d.ts deleted file mode 100644 index 67451635b..000000000 --- a/dist/@types/app/assets/javascripts/controllers/notes/notes.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class NotesPanel extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/controllers/root.d.ts b/dist/@types/app/assets/javascripts/controllers/root.d.ts deleted file mode 100644 index 4a6f9a2cf..000000000 --- a/dist/@types/app/assets/javascripts/controllers/root.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../types'; -export declare class Root extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/controllers/tags.d.ts b/dist/@types/app/assets/javascripts/controllers/tags.d.ts deleted file mode 100644 index e704cae65..000000000 --- a/dist/@types/app/assets/javascripts/controllers/tags.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../types'; -export declare class TagsPanel extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/database.d.ts b/dist/@types/app/assets/javascripts/database.d.ts deleted file mode 100644 index 457736ca3..000000000 --- a/dist/@types/app/assets/javascripts/database.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { SNAlertService } from "snjs/dist/@types"; -export declare class Database { - databaseName: string; - private alertService; - private locked; - private db?; - constructor(databaseName: string, alertService: SNAlertService); - deinit(): void; - /** - * Relinquishes the lock and allows db operations to proceed - */ - unlock(): void; - /** - * Opens the database natively, or returns the existing database object if already opened. - * @param onNewDatabase - Callback to invoke when a database has been created - * as part of the open process. This can happen on new application sessions, or if the - * browser deleted the database without the user being aware. - */ - openDatabase(onNewDatabase?: () => void): Promise; - getAllPayloads(): Promise; - savePayload(payload: any): Promise; - savePayloads(payloads: any[]): Promise; - private putItems; - deletePayload(uuid: string): Promise; - clearAllPayloads(): Promise; - private showAlert; - private showGenericError; - private displayOfflineAlert; -} diff --git a/dist/@types/app/assets/javascripts/directives/functional/autofocus.d.ts b/dist/@types/app/assets/javascripts/directives/functional/autofocus.d.ts deleted file mode 100644 index 19784f72a..000000000 --- a/dist/@types/app/assets/javascripts/directives/functional/autofocus.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -export declare function autofocus($timeout: ng.ITimeoutService): { - restrict: string; - scope: { - shouldFocus: string; - }; - link: ($scope: ng.IScope, $element: JQLite) => void; -}; diff --git a/dist/@types/app/assets/javascripts/directives/functional/click-outside.d.ts b/dist/@types/app/assets/javascripts/directives/functional/click-outside.d.ts deleted file mode 100644 index 3f973b6fa..000000000 --- a/dist/@types/app/assets/javascripts/directives/functional/click-outside.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -export declare function clickOutside($document: ng.IDocumentService): { - restrict: string; - replace: boolean; - link($scope: ng.IScope, $element: JQLite, attrs: any): void; -}; diff --git a/dist/@types/app/assets/javascripts/directives/functional/delay-hide.d.ts b/dist/@types/app/assets/javascripts/directives/functional/delay-hide.d.ts deleted file mode 100644 index b11bee1e7..000000000 --- a/dist/@types/app/assets/javascripts/directives/functional/delay-hide.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// -export declare function delayHide($timeout: ng.ITimeoutService): { - restrict: string; - scope: { - show: string; - delay: string; - }; - link: (scope: ng.IScope, elem: JQLite) => void; -}; diff --git a/dist/@types/app/assets/javascripts/directives/functional/elemReady.d.ts b/dist/@types/app/assets/javascripts/directives/functional/elemReady.d.ts deleted file mode 100644 index 3e318b4c7..000000000 --- a/dist/@types/app/assets/javascripts/directives/functional/elemReady.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -export declare function elemReady($parse: ng.IParseService): { - restrict: string; - link: ($scope: ng.IScope, elem: JQLite, attrs: any) => void; -}; diff --git a/dist/@types/app/assets/javascripts/directives/functional/file-change.d.ts b/dist/@types/app/assets/javascripts/directives/functional/file-change.d.ts deleted file mode 100644 index aec283efc..000000000 --- a/dist/@types/app/assets/javascripts/directives/functional/file-change.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -export declare function fileChange(): { - restrict: string; - scope: { - handler: string; - }; - link: (scope: ng.IScope, element: JQLite) => void; -}; diff --git a/dist/@types/app/assets/javascripts/directives/functional/index.d.ts b/dist/@types/app/assets/javascripts/directives/functional/index.d.ts deleted file mode 100644 index 0a8bd4c53..000000000 --- a/dist/@types/app/assets/javascripts/directives/functional/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export { autofocus } from './autofocus'; -export { clickOutside } from './click-outside'; -export { delayHide } from './delay-hide'; -export { elemReady } from './elemReady'; -export { fileChange } from './file-change'; -export { infiniteScroll } from './infiniteScroll'; -export { lowercase } from './lowercase'; -export { selectOnFocus } from './selectOnFocus'; -export { snEnter } from './snEnter'; diff --git a/dist/@types/app/assets/javascripts/directives/functional/infiniteScroll.d.ts b/dist/@types/app/assets/javascripts/directives/functional/infiniteScroll.d.ts deleted file mode 100644 index f2f58fda5..000000000 --- a/dist/@types/app/assets/javascripts/directives/functional/infiniteScroll.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -export declare function infiniteScroll(): { - link: (scope: ng.IScope, elem: JQLite, attrs: any) => void; -}; diff --git a/dist/@types/app/assets/javascripts/directives/functional/lowercase.d.ts b/dist/@types/app/assets/javascripts/directives/functional/lowercase.d.ts deleted file mode 100644 index 9b2439769..000000000 --- a/dist/@types/app/assets/javascripts/directives/functional/lowercase.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -export declare function lowercase(): { - require: string; - link: (scope: ng.IScope, _: JQLite, attrs: any, ctrl: any) => void; -}; diff --git a/dist/@types/app/assets/javascripts/directives/functional/selectOnClick.d.ts b/dist/@types/app/assets/javascripts/directives/functional/selectOnClick.d.ts deleted file mode 100644 index cc0c10a01..000000000 --- a/dist/@types/app/assets/javascripts/directives/functional/selectOnClick.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -export declare function selectOnClick($window: ng.IWindowService): { - restrict: string; - link: (scope: import("angular").IScope, element: JQLite) => void; -}; diff --git a/dist/@types/app/assets/javascripts/directives/functional/selectOnFocus.d.ts b/dist/@types/app/assets/javascripts/directives/functional/selectOnFocus.d.ts deleted file mode 100644 index 49dd42194..000000000 --- a/dist/@types/app/assets/javascripts/directives/functional/selectOnFocus.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -export declare function selectOnFocus($window: ng.IWindowService): { - restrict: string; - link: (scope: ng.IScope, element: JQLite) => void; -}; diff --git a/dist/@types/app/assets/javascripts/directives/functional/snEnter.d.ts b/dist/@types/app/assets/javascripts/directives/functional/snEnter.d.ts deleted file mode 100644 index 3c195b49d..000000000 --- a/dist/@types/app/assets/javascripts/directives/functional/snEnter.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -export declare function snEnter(): (scope: ng.IScope, element: JQLite, attrs: any) => void; diff --git a/dist/@types/app/assets/javascripts/directives/views/accountMenu.d.ts b/dist/@types/app/assets/javascripts/directives/views/accountMenu.d.ts deleted file mode 100644 index f72d78730..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/accountMenu.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class AccountMenu extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/actionsMenu.d.ts b/dist/@types/app/assets/javascripts/directives/views/actionsMenu.d.ts deleted file mode 100644 index 762a1eea1..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/actionsMenu.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class ActionsMenu extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/challengeModal.d.ts b/dist/@types/app/assets/javascripts/directives/views/challengeModal.d.ts deleted file mode 100644 index 39de84ea0..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/challengeModal.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class ChallengeModal extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/componentModal.d.ts b/dist/@types/app/assets/javascripts/directives/views/componentModal.d.ts deleted file mode 100644 index 91221ca57..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/componentModal.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/// -import { WebApplication } from '@/ui_models/application'; -import { SNComponent, LiveItem } from 'snjs'; -import { WebDirective } from './../../types'; -export declare type ComponentModalScope = { - componentUuid: string; - onDismiss: () => void; - application: WebApplication; -}; -export declare class ComponentModalCtrl implements ComponentModalScope { - $element: JQLite; - componentUuid: string; - onDismiss: () => void; - application: WebApplication; - liveComponent: LiveItem; - component: SNComponent; - constructor($element: JQLite); - $onInit(): void; - $onDestroy(): void; - dismiss(): void; -} -export declare class ComponentModal extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/componentView.d.ts b/dist/@types/app/assets/javascripts/directives/views/componentView.d.ts deleted file mode 100644 index 7d100b1c9..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/componentView.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class ComponentView extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/editorMenu.d.ts b/dist/@types/app/assets/javascripts/directives/views/editorMenu.d.ts deleted file mode 100644 index 5125e0cf5..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/editorMenu.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class EditorMenu extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/historyMenu.d.ts b/dist/@types/app/assets/javascripts/directives/views/historyMenu.d.ts deleted file mode 100644 index 798aa419c..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/historyMenu.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from '../../types'; -export declare class HistoryMenu extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/index.d.ts b/dist/@types/app/assets/javascripts/directives/views/index.d.ts deleted file mode 100644 index adee8d90c..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export { AccountMenu } from './accountMenu'; -export { ActionsMenu } from './actionsMenu'; -export { ComponentModal } from './componentModal'; -export { ComponentView } from './componentView'; -export { EditorMenu } from './editorMenu'; -export { InputModal } from './inputModal'; -export { MenuRow } from './menuRow'; -export { PanelResizer } from './panelResizer'; -export { PasswordWizard } from './passwordWizard'; -export { PermissionsModal } from './permissionsModal'; -export { PrivilegesAuthModal } from './privilegesAuthModal'; -export { PrivilegesManagementModal } from './privilegesManagementModal'; -export { RevisionPreviewModal } from './revisionPreviewModal'; -export { HistoryMenu } from './historyMenu'; -export { SyncResolutionMenu } from './syncResolutionMenu'; diff --git a/dist/@types/app/assets/javascripts/directives/views/inputModal.d.ts b/dist/@types/app/assets/javascripts/directives/views/inputModal.d.ts deleted file mode 100644 index d4ef15914..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/inputModal.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// -import { WebDirective } from './../../types'; -export interface InputModalScope extends Partial { - type: string; - title: string; - message: string; - callback: (value: string) => void; -} -export declare class InputModal extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/menuRow.d.ts b/dist/@types/app/assets/javascripts/directives/views/menuRow.d.ts deleted file mode 100644 index 266f26a15..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/menuRow.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class MenuRow extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/panelResizer.d.ts b/dist/@types/app/assets/javascripts/directives/views/panelResizer.d.ts deleted file mode 100644 index 71d312ac5..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/panelResizer.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class PanelResizer extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/passwordWizard.d.ts b/dist/@types/app/assets/javascripts/directives/views/passwordWizard.d.ts deleted file mode 100644 index 66cf6d167..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/passwordWizard.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class PasswordWizard extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/permissionsModal.d.ts b/dist/@types/app/assets/javascripts/directives/views/permissionsModal.d.ts deleted file mode 100644 index 6ff96fbc2..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/permissionsModal.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class PermissionsModal extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/privilegesAuthModal.d.ts b/dist/@types/app/assets/javascripts/directives/views/privilegesAuthModal.d.ts deleted file mode 100644 index ac3ad1254..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/privilegesAuthModal.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class PrivilegesAuthModal extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/privilegesManagementModal.d.ts b/dist/@types/app/assets/javascripts/directives/views/privilegesManagementModal.d.ts deleted file mode 100644 index 0b86ff190..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/privilegesManagementModal.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class PrivilegesManagementModal extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/revisionPreviewModal.d.ts b/dist/@types/app/assets/javascripts/directives/views/revisionPreviewModal.d.ts deleted file mode 100644 index 21a54ae68..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/revisionPreviewModal.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class RevisionPreviewModal extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/sessionHistoryMenu.d.ts b/dist/@types/app/assets/javascripts/directives/views/sessionHistoryMenu.d.ts deleted file mode 100644 index 44adc2d36..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/sessionHistoryMenu.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class SessionHistoryMenu extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/directives/views/syncResolutionMenu.d.ts b/dist/@types/app/assets/javascripts/directives/views/syncResolutionMenu.d.ts deleted file mode 100644 index 6e3fdcf04..000000000 --- a/dist/@types/app/assets/javascripts/directives/views/syncResolutionMenu.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class SyncResolutionMenu extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/filters/index.d.ts b/dist/@types/app/assets/javascripts/filters/index.d.ts deleted file mode 100644 index 02443ccd5..000000000 --- a/dist/@types/app/assets/javascripts/filters/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { trusted } from './trusted'; diff --git a/dist/@types/app/assets/javascripts/filters/trusted.d.ts b/dist/@types/app/assets/javascripts/filters/trusted.d.ts deleted file mode 100644 index e53444239..000000000 --- a/dist/@types/app/assets/javascripts/filters/trusted.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -export declare function trusted($sce: ng.ISCEService): (url: string) => any; diff --git a/dist/@types/app/assets/javascripts/index.d.ts b/dist/@types/app/assets/javascripts/index.d.ts deleted file mode 100644 index e3ea66c1b..000000000 --- a/dist/@types/app/assets/javascripts/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import 'sn-stylekit/dist/stylekit.css'; -import '../stylesheets/index.css.scss'; -import 'angular'; -import '../../../vendor/assets/javascripts/angular-sanitize'; -import '../../../vendor/assets/javascripts/zip/deflate'; -import '../../../vendor/assets/javascripts/zip/inflate'; -import '../../../vendor/assets/javascripts/zip/zip'; -import '../../../vendor/assets/javascripts/zip/z-worker'; -import './app'; diff --git a/dist/@types/app/assets/javascripts/interface.d.ts b/dist/@types/app/assets/javascripts/interface.d.ts deleted file mode 100644 index 97165f0d8..000000000 --- a/dist/@types/app/assets/javascripts/interface.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { DeviceInterface, SNApplication } from 'snjs'; -import { Platform } from './services/platform'; -export declare class WebDeviceInterface extends DeviceInterface { - private platform; - private database; - constructor(namespace: string, timeout: any, platform: Platform); - setApplication(application: SNApplication): void; - deinit(): void; - getRawStorageValue(key: string): Promise; - getAllRawStorageKeyValues(): Promise<{ - key: string; - value: any; - }[]>; - setRawStorageValue(key: string, value: any): Promise; - removeRawStorageValue(key: string): Promise; - removeAllRawStorageValues(): Promise; - openDatabase(): Promise<{ - isNewDatabase?: boolean | undefined; - } | undefined>; - private getDatabaseKeyPrefix; - private keyForPayloadId; - getAllRawDatabasePayloads(): Promise; - saveRawDatabasePayload(payload: any): Promise; - saveRawDatabasePayloads(payloads: any[]): Promise; - removeRawDatabasePayloadWithId(id: string): Promise; - removeAllRawDatabasePayloads(): Promise; - getKeychainValue(): Promise; - setKeychainValue(value: any): Promise; - clearKeychainValue(): Promise; - openUrl(url: string): void; -} diff --git a/dist/@types/app/assets/javascripts/messages.d.ts b/dist/@types/app/assets/javascripts/messages.d.ts deleted file mode 100644 index fece23538..000000000 --- a/dist/@types/app/assets/javascripts/messages.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare enum RootScopeMessages { - ReloadExtendedData = "reload-ext-data", - NewUpdateAvailable = "new-update-available" -} diff --git a/dist/@types/app/assets/javascripts/routes.d.ts b/dist/@types/app/assets/javascripts/routes.d.ts deleted file mode 100644 index f797ed06f..000000000 --- a/dist/@types/app/assets/javascripts/routes.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -export declare function configRoutes($locationProvider: ng.ILocationProvider): void; diff --git a/dist/@types/app/assets/javascripts/services/alertService.d.ts b/dist/@types/app/assets/javascripts/services/alertService.d.ts deleted file mode 100644 index f0597949e..000000000 --- a/dist/@types/app/assets/javascripts/services/alertService.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { SNAlertService, ButtonType } from 'snjs'; -/** @returns a promise resolving to true if the user confirmed, false if they canceled */ -export declare function confirmDialog({ text, title, confirmButtonText, cancelButtonText, confirmButtonStyle, }: { - text: string; - title?: string; - confirmButtonText?: string; - cancelButtonText?: string; - confirmButtonStyle?: 'danger' | 'info'; -}): Promise; -export declare function alertDialog({ title, text, closeButtonText, }: { - title?: string; - text: string; - closeButtonText?: string; -}): Promise; -export declare class AlertService implements SNAlertService { - /** - * @deprecated use the standalone `alertDialog` function instead - */ - alert(text: string, title?: string, closeButtonText?: string): Promise; - confirm(text: string, title?: string, confirmButtonText?: string, confirmButtonType?: ButtonType, cancelButtonText?: string): Promise; - blockingDialog(text: string, title?: string): () => void; -} diff --git a/dist/@types/app/assets/javascripts/services/archiveManager.d.ts b/dist/@types/app/assets/javascripts/services/archiveManager.d.ts deleted file mode 100644 index a1edf78d9..000000000 --- a/dist/@types/app/assets/javascripts/services/archiveManager.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { WebApplication } from '@/ui_models/application'; -export declare class ArchiveManager { - private readonly application; - private textFile?; - constructor(application: WebApplication); - downloadBackup(encrypted: boolean): Promise; - private formattedDate; - private itemsData; - private get zip(); - private loadZip; - private downloadZippedItems; - private hrefForData; - private downloadData; -} diff --git a/dist/@types/app/assets/javascripts/services/autolock_service.d.ts b/dist/@types/app/assets/javascripts/services/autolock_service.d.ts deleted file mode 100644 index db4b21d15..000000000 --- a/dist/@types/app/assets/javascripts/services/autolock_service.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ApplicationService } from 'snjs'; -export declare class AutolockService extends ApplicationService { - private unsubState?; - private pollFocusInterval; - private lastFocusState?; - private lockAfterDate?; - private lockTimeout?; - onAppLaunch(): Promise; - observeVisibility(): void; - deinit(): void; - private lockApplication; - setAutoLockInterval(interval: number): Promise; - getAutoLockInterval(): Promise; - deleteAutolockPreference(): Promise; - /** - * Verify document is in focus every so often as visibilitychange event is - * not triggered on a typical window blur event but rather on tab changes. - */ - beginWebFocusPolling(): void; - getAutoLockIntervalOptions(): { - value: number; - label: string; - }[]; - documentVisibilityChanged(visible: boolean): Promise; - beginAutoLockTimer(): Promise; - cancelAutoLockTimer(): void; -} diff --git a/dist/@types/app/assets/javascripts/services/bridge.d.ts b/dist/@types/app/assets/javascripts/services/bridge.d.ts deleted file mode 100644 index a61b3f734..000000000 --- a/dist/@types/app/assets/javascripts/services/bridge.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { PurePayload, Environment } from "snjs"; -/** Platform-specific (i-e Electron/browser) behavior is handled by a Bridge object. */ -export interface Bridge { - environment: Environment; - getKeychainValue(): Promise; - setKeychainValue(value: any): Promise; - clearKeychainValue(): Promise; - extensionsServerHost?: string; - syncComponents(payloads: PurePayload[]): void; - onMajorDataChange(): void; - onInitialDataLoad(): void; - onSearch(text?: string): void; - downloadBackup(): void; -} -export declare class BrowserBridge implements Bridge { - environment: Environment; - getKeychainValue(): Promise; - setKeychainValue(value: any): Promise; - clearKeychainValue(): Promise; - /** No-ops */ - syncComponents(): void; - onMajorDataChange(): void; - onInitialDataLoad(): void; - onSearch(): void; - downloadBackup(): void; -} diff --git a/dist/@types/app/assets/javascripts/services/desktopManager.d.ts b/dist/@types/app/assets/javascripts/services/desktopManager.d.ts deleted file mode 100644 index ea965e6ca..000000000 --- a/dist/@types/app/assets/javascripts/services/desktopManager.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/// -import { SNComponent, PurePayload } from 'snjs'; -import { WebApplication } from '@/ui_models/application'; -import { ApplicationService, ApplicationEvent } from 'snjs'; -import { Bridge } from './bridge'; -declare type UpdateObserverCallback = (component: SNComponent) => void; -declare type ComponentActivationCallback = (payload: PurePayload) => void; -declare type ComponentActivationObserver = { - id: string; - callback: ComponentActivationCallback; -}; -export declare class DesktopManager extends ApplicationService { - private bridge; - $rootScope: ng.IRootScopeService; - $timeout: ng.ITimeoutService; - componentActivationObservers: ComponentActivationObserver[]; - updateObservers: { - callback: UpdateObserverCallback; - }[]; - isDesktop: boolean; - dataLoaded: boolean; - lastSearchedText?: string; - private removeComponentObserver?; - constructor($rootScope: ng.IRootScopeService, $timeout: ng.ITimeoutService, application: WebApplication, bridge: Bridge); - get webApplication(): WebApplication; - deinit(): void; - onAppEvent(eventName: ApplicationEvent): Promise; - saveBackup(): void; - getExtServerHost(): string | undefined; - /** - * Sending a component in its raw state is really slow for the desktop app - * Keys are not passed into ItemParams, so the result is not encrypted - */ - convertComponentForTransmission(component: SNComponent): Promise; - syncComponentsInstallation(components: SNComponent[]): void; - registerUpdateObserver(callback: UpdateObserverCallback): () => void; - searchText(text?: string): void; - redoSearch(): void; - desktop_windowGainedFocus(): void; - desktop_windowLostFocus(): void; - desktop_onComponentInstallationComplete(componentData: any, error: any): Promise; - desktop_registerComponentActivationObserver(callback: ComponentActivationCallback): { - id: string; - callback: ComponentActivationCallback; - }; - desktop_deregisterComponentActivationObserver(observer: ComponentActivationObserver): void; - notifyComponentActivation(component: SNComponent): Promise; - desktop_requestBackupFile(): Promise; - desktop_didBeginBackup(): void; - desktop_didFinishBackup(success: boolean): void; -} -export {}; diff --git a/dist/@types/app/assets/javascripts/services/errorReporting.d.ts b/dist/@types/app/assets/javascripts/services/errorReporting.d.ts deleted file mode 100644 index 1a475a492..000000000 --- a/dist/@types/app/assets/javascripts/services/errorReporting.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function startErrorReporting(): void; diff --git a/dist/@types/app/assets/javascripts/services/index.d.ts b/dist/@types/app/assets/javascripts/services/index.d.ts deleted file mode 100644 index b63b520e8..000000000 --- a/dist/@types/app/assets/javascripts/services/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export { AlertService } from './alertService'; -export { ArchiveManager } from './archiveManager'; -export { DesktopManager } from './desktopManager'; -export { KeyboardManager } from './keyboardManager'; -export { AutolockService } from './autolock_service'; -export { NativeExtManager } from './nativeExtManager'; -export { PreferencesManager } from './preferencesManager'; -export { StatusManager } from './statusManager'; -export { ThemeManager } from './themeManager'; diff --git a/dist/@types/app/assets/javascripts/services/keyboardManager.d.ts b/dist/@types/app/assets/javascripts/services/keyboardManager.d.ts deleted file mode 100644 index bab1b4cff..000000000 --- a/dist/@types/app/assets/javascripts/services/keyboardManager.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export declare enum KeyboardKey { - Tab = "Tab", - Backspace = "Backspace", - Up = "ArrowUp", - Down = "ArrowDown" -} -export declare enum KeyboardModifier { - Shift = "Shift", - Ctrl = "Control", - /** ⌘ key on Mac, ⊞ key on Windows */ - Meta = "Meta", - Alt = "Alt" -} -declare enum KeyboardKeyEvent { - Down = "KeyEventDown", - Up = "KeyEventUp" -} -declare type KeyboardObserver = { - key?: KeyboardKey | string; - modifiers?: KeyboardModifier[]; - onKeyDown?: (event: KeyboardEvent) => void; - onKeyUp?: (event: KeyboardEvent) => void; - element?: HTMLElement; - elements?: HTMLElement[]; - notElement?: HTMLElement; - notElementIds?: string[]; -}; -export declare class KeyboardManager { - private observers; - private handleKeyDown; - private handleKeyUp; - constructor(); - deinit(): void; - modifiersForEvent(event: KeyboardEvent): KeyboardModifier[]; - eventMatchesKeyAndModifiers(event: KeyboardEvent, key: KeyboardKey | string, modifiers?: KeyboardModifier[]): boolean; - notifyObserver(event: KeyboardEvent, keyEvent: KeyboardKeyEvent): void; - addKeyObserver(observer: KeyboardObserver): () => void; -} -export {}; diff --git a/dist/@types/app/assets/javascripts/services/localStorage.d.ts b/dist/@types/app/assets/javascripts/services/localStorage.d.ts deleted file mode 100644 index 6d37afec1..000000000 --- a/dist/@types/app/assets/javascripts/services/localStorage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum StorageKey { - DisableErrorReporting = "DisableErrorReporting" -} -export declare const storage: { - get(key: StorageKey): any; - set(key: StorageKey, value: unknown): void; - remove(key: StorageKey): void; -}; diff --git a/dist/@types/app/assets/javascripts/services/lockManager.d.ts b/dist/@types/app/assets/javascripts/services/lockManager.d.ts deleted file mode 100644 index 5fc508c13..000000000 --- a/dist/@types/app/assets/javascripts/services/lockManager.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { WebApplication } from '@/ui_models/application'; -export declare class LockManager { - private application; - private unsubState; - private pollFocusInterval; - private lastFocusState?; - private lockAfterDate?; - private lockTimeout?; - constructor(application: WebApplication); - observeVisibility(): void; - deinit(): void; - setAutoLockInterval(interval: number): Promise; - getAutoLockInterval(): Promise; - /** - * Verify document is in focus every so often as visibilitychange event is - * not triggered on a typical window blur event but rather on tab changes. - */ - beginWebFocusPolling(): void; - getAutoLockIntervalOptions(): { - value: number; - label: string; - }[]; - documentVisibilityChanged(visible: boolean): Promise; - beginAutoLockTimer(): Promise; - cancelAutoLockTimer(): void; -} diff --git a/dist/@types/app/assets/javascripts/services/nativeExtManager.d.ts b/dist/@types/app/assets/javascripts/services/nativeExtManager.d.ts deleted file mode 100644 index 4bca8a757..000000000 --- a/dist/@types/app/assets/javascripts/services/nativeExtManager.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { SNPredicate, ApplicationService } from 'snjs'; -import { PayloadContent } from 'snjs/dist/@types/protocol/payloads/generator'; -/** A class for handling installation of system extensions */ -export declare class NativeExtManager extends ApplicationService { - extManagerId: string; - batchManagerId: string; - /** @override */ - onAppLaunch(): Promise; - get extManagerPred(): SNPredicate; - get batchManagerPred(): SNPredicate; - get extMgrUrl(): any; - get batchMgrUrl(): any; - reload(): void; - resolveExtensionsManager(): Promise; - extensionsManagerTemplateContent(): PayloadContent; - resolveBatchManager(): Promise; - batchManagerTemplateContent(): PayloadContent; -} diff --git a/dist/@types/app/assets/javascripts/services/platform.d.ts b/dist/@types/app/assets/javascripts/services/platform.d.ts deleted file mode 100644 index 454e3a40c..000000000 --- a/dist/@types/app/assets/javascripts/services/platform.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** Platform-specific (i-e desktop/web) behavior is handled by a Platform object. */ -export interface Platform { - getKeychainValue(): Promise; - setKeychainValue(value: any): Promise; - clearKeychainValue(): Promise; -} -export declare class WebPlatform implements Platform { - getKeychainValue(): Promise; - setKeychainValue(value: any): Promise; - clearKeychainValue(): Promise; -} diff --git a/dist/@types/app/assets/javascripts/services/preferencesManager.d.ts b/dist/@types/app/assets/javascripts/services/preferencesManager.d.ts deleted file mode 100644 index ac3369374..000000000 --- a/dist/@types/app/assets/javascripts/services/preferencesManager.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { WebApplication } from '@/ui_models/application'; -import { ApplicationService, WebPrefKey, ApplicationEvent } from 'snjs'; -export declare class PreferencesManager extends ApplicationService { - private userPreferences; - private loadingPrefs; - private unubscribeStreamItems?; - private needsSingletonReload; - /** @override */ - onAppLaunch(): Promise; - onAppEvent(event: ApplicationEvent): Promise; - deinit(): void; - get webApplication(): WebApplication; - streamPreferences(): void; - private reloadSingleton; - syncUserPreferences(): void; - getValue(key: WebPrefKey, defaultValue?: any): any; - setUserPrefValue(key: WebPrefKey, value: any, sync?: boolean): Promise; -} diff --git a/dist/@types/app/assets/javascripts/services/state.d.ts b/dist/@types/app/assets/javascripts/services/state.d.ts deleted file mode 100644 index 8854ab5a2..000000000 --- a/dist/@types/app/assets/javascripts/services/state.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -/// -import { SNTag, SNNote, SNUserPrefs } from 'snjs'; -import { WebApplication } from '@/ui_models/application'; -import { Editor } from '@/ui_models/editor'; -export declare enum AppStateEvent { - TagChanged = 1, - ActiveEditorChanged = 2, - PreferencesChanged = 3, - PanelResized = 4, - EditorFocused = 5, - BeganBackupDownload = 6, - EndedBackupDownload = 7, - DesktopExtsReady = 8, - WindowDidFocus = 9, - WindowDidBlur = 10 -} -export declare enum EventSource { - UserInteraction = 1, - Script = 2 -} -declare type ObserverCallback = (event: AppStateEvent, data?: any) => Promise; -export declare class AppState { - $rootScope: ng.IRootScopeService; - $timeout: ng.ITimeoutService; - application: WebApplication; - observers: ObserverCallback[]; - locked: boolean; - unsubApp: any; - rootScopeCleanup1: any; - rootScopeCleanup2: any; - onVisibilityChange: any; - selectedTag?: SNTag; - userPreferences?: SNUserPrefs; - multiEditorEnabled: boolean; - constructor($rootScope: ng.IRootScopeService, $timeout: ng.ITimeoutService, application: WebApplication); - deinit(): void; - /** - * Creates a new editor if one doesn't exist. If one does, we'll replace the - * editor's note with an empty one. - */ - createEditor(title?: string): void; - openEditor(noteUuid: string): Promise; - getActiveEditor(): Editor; - getEditors(): Editor[]; - closeEditor(editor: Editor): void; - closeActiveEditor(): void; - closeAllEditors(): void; - editorForNote(note: SNNote): Editor | undefined; - streamNotesAndTags(): void; - addAppEventObserver(): void; - isLocked(): boolean; - registerVisibilityObservers(): void; - /** @returns A function that unregisters this observer */ - addObserver(callback: ObserverCallback): () => void; - notifyEvent(eventName: AppStateEvent, data?: any): Promise; - setSelectedTag(tag: SNTag): void; - /** Returns the tags that are referncing this note */ - getNoteTags(note: SNNote): SNTag[]; - /** Returns the notes this tag references */ - getTagNotes(tag: SNTag): SNNote[]; - getSelectedTag(): SNTag | undefined; - setUserPreferences(preferences: SNUserPrefs): void; - panelDidResize(name: string, collapsed: boolean): void; - editorDidFocus(eventSource: EventSource): void; - beganBackupDownload(): void; - endedBackupDownload(success: boolean): void; - /** - * When the desktop appplication extension server is ready. - */ - desktopExtensionsReady(): void; -} -export {}; diff --git a/dist/@types/app/assets/javascripts/services/statusManager.d.ts b/dist/@types/app/assets/javascripts/services/statusManager.d.ts deleted file mode 100644 index c70de6088..000000000 --- a/dist/@types/app/assets/javascripts/services/statusManager.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare type StatusCallback = (string: string) => void; -export declare class StatusManager { - private _message; - private observers; - get message(): string; - setMessage(message: string): void; - onStatusChange(callback: StatusCallback): () => void; - private notifyObservers; -} -export {}; diff --git a/dist/@types/app/assets/javascripts/services/themeManager.d.ts b/dist/@types/app/assets/javascripts/services/themeManager.d.ts deleted file mode 100644 index bc0cbb3f1..000000000 --- a/dist/@types/app/assets/javascripts/services/themeManager.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { WebApplication } from '@/ui_models/application'; -import { ApplicationService, ApplicationEvent } from 'snjs'; -export declare class ThemeManager extends ApplicationService { - private activeThemes; - private unregisterDesktop; - private unregisterStream; - onAppEvent(event: ApplicationEvent): Promise; - get webApplication(): WebApplication; - deinit(): void; - /** @override */ - onAppStart(): Promise; - private activateCachedThemes; - private registerObservers; - private clearAppThemeState; - private deactivateAllThemes; - private activateTheme; - private deactivateTheme; - private cacheThemes; - private decacheThemes; - private getCachedThemes; -} diff --git a/dist/@types/app/assets/javascripts/strings.d.ts b/dist/@types/app/assets/javascripts/strings.d.ts deleted file mode 100644 index 625a2e4b1..000000000 --- a/dist/@types/app/assets/javascripts/strings.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** @generic */ -export declare const STRING_SESSION_EXPIRED = "Your session has expired. New changes will not be pulled in. Please sign in to refresh your session."; -export declare const STRING_DEFAULT_FILE_ERROR = "Please use FileSafe or the Bold Editor to attach images and files. Learn more at standardnotes.org/filesafe."; -export declare const STRING_GENERIC_SYNC_ERROR = "There was an error syncing. Please try again. If all else fails, try signing out and signing back in."; -export declare function StringSyncException(data: any): string; -/** @footer */ -export declare const STRING_NEW_UPDATE_READY = "A new update is ready to install. Please use the top-level 'Updates' menu to manage installation."; -/** @tags */ -export declare const STRING_DELETE_TAG = "Are you sure you want to delete this tag? Note: deleting a tag will not delete its notes."; -/** @editor */ -export declare const STRING_SAVING_WHILE_DOCUMENT_HIDDEN = "Attempting to save an item while the application is hidden. To protect data integrity, please refresh the application window and try again."; -export declare const STRING_DELETED_NOTE = "The note you are attempting to edit has been deleted, and is awaiting sync. Changes you make will be disregarded."; -export declare const STRING_INVALID_NOTE = "The note you are attempting to save can not be found or has been deleted. Changes you make will not be synced. Please copy this note's text and start a new note."; -export declare const STRING_ELLIPSES = "..."; -export declare const STRING_GENERIC_SAVE_ERROR = "There was an error saving your note. Please try again."; -export declare const STRING_DELETE_PLACEHOLDER_ATTEMPT = "This note is a placeholder and cannot be deleted. To remove from your list, simply navigate to a different note."; -export declare const STRING_ARCHIVE_LOCKED_ATTEMPT = "This note is locked. If you'd like to archive it, unlock it, and try again."; -export declare const STRING_UNARCHIVE_LOCKED_ATTEMPT = "This note is locked. If you'd like to archive it, unlock it, and try again."; -export declare const STRING_DELETE_LOCKED_ATTEMPT = "This note is locked. If you'd like to delete it, unlock it, and try again."; -export declare function StringDeleteNote(title: string, permanently: boolean): string; -export declare function StringEmptyTrash(count: number): string; -/** @account */ -export declare const STRING_ACCOUNT_MENU_UNCHECK_MERGE = "Unchecking this option means any of the notes you have written while you were signed out will be deleted. Are you sure you want to discard these notes?"; -export declare const STRING_SIGN_OUT_CONFIRMATION = "Are you sure you want to end your session? This will delete all local items and extensions."; -export declare const STRING_ERROR_DECRYPTING_IMPORT = "There was an error decrypting your items. Make sure the password you entered is correct and try again."; -export declare const STRING_E2E_ENABLED = "End-to-end encryption is enabled. Your data is encrypted on your device first, then synced to your private cloud."; -export declare const STRING_LOCAL_ENC_ENABLED = "Encryption is enabled. Your data is encrypted using your passcode before it is saved to your device storage."; -export declare const STRING_ENC_NOT_ENABLED = "Encryption is not enabled. Sign in, register, or add a passcode lock to enable encryption."; -export declare const STRING_IMPORT_SUCCESS = "Your data has been successfully imported."; -export declare const STRING_REMOVE_PASSCODE_CONFIRMATION = "Are you sure you want to remove your application passcode?"; -export declare const STRING_REMOVE_PASSCODE_OFFLINE_ADDENDUM = " This will remove encryption from your local data."; -export declare const STRING_NON_MATCHING_PASSCODES = "The two passcodes you entered do not match. Please try again."; -export declare const STRING_NON_MATCHING_PASSWORDS = "The two passwords you entered do not match. Please try again."; -export declare const STRING_GENERATING_LOGIN_KEYS = "Generating Login Keys..."; -export declare const STRING_GENERATING_REGISTER_KEYS = "Generating Account Keys..."; -export declare const STRING_INVALID_IMPORT_FILE = "Unable to open file. Ensure it is a proper JSON file and try again."; -export declare function StringImportError(errorCount: number): string; -export declare const STRING_UNSUPPORTED_BACKUP_FILE_VERSION = "This backup file was created using an unsupported version of the application and cannot be imported here. Please update your application and try again."; -/** @password_change */ -export declare const STRING_FAILED_PASSWORD_CHANGE = "There was an error re-encrypting your items. Your password was changed, but not all your items were properly re-encrypted and synced. You should try syncing again. If all else fails, you should restore your notes from backup."; -export declare const STRING_CONFIRM_APP_QUIT_DURING_UPGRADE: string; -export declare const STRING_CONFIRM_APP_QUIT_DURING_PASSCODE_CHANGE: string; -export declare const STRING_CONFIRM_APP_QUIT_DURING_PASSCODE_REMOVAL: string; -export declare const STRING_UPGRADE_ACCOUNT_CONFIRM_TITLE = "Encryption upgrade available"; -export declare const STRING_UPGRADE_ACCOUNT_CONFIRM_TEXT: string; -export declare const STRING_UPGRADE_ACCOUNT_CONFIRM_BUTTON = "Upgrade"; diff --git a/dist/@types/app/assets/javascripts/types.d.ts b/dist/@types/app/assets/javascripts/types.d.ts deleted file mode 100644 index 1bfddb0f0..000000000 --- a/dist/@types/app/assets/javascripts/types.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/// -import { SNComponent } from 'snjs'; -export declare class WebDirective implements ng.IDirective { - controller?: string | ng.Injectable; - controllerAs?: string; - bindToController?: boolean | { - [boundProperty: string]: string; - }; - restrict?: string; - replace?: boolean; - scope?: boolean | { - [boundProperty: string]: string; - }; - template?: string | ((tElement: any, tAttrs: any) => string); - transclude?: boolean; -} -export declare enum PasswordWizardType { - ChangePassword = 1, - AccountUpgrade = 2 -} -export interface PasswordWizardScope extends Partial { - type: PasswordWizardType; - application: any; -} -export interface PermissionsModalScope extends Partial { - application: any; - component: SNComponent; - permissionsString: string; - callback: (approved: boolean) => void; -} -export interface AccountSwitcherScope extends Partial { - application: any; -} -export declare type PanelPuppet = { - onReady?: () => void; - ready?: boolean; - setWidth?: (width: number) => void; - setLeft?: (left: number) => void; - isCollapsed?: () => boolean; - flash?: () => void; -}; -export declare type FooterStatus = { - string: string; -}; diff --git a/dist/@types/app/assets/javascripts/ui_models/app_state.d.ts b/dist/@types/app/assets/javascripts/ui_models/app_state.d.ts deleted file mode 100644 index 7db839ae8..000000000 --- a/dist/@types/app/assets/javascripts/ui_models/app_state.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -/// -import { SNTag, SNNote, SNUserPrefs, DeinitSource, UuidString } from 'snjs'; -import { WebApplication } from '@/ui_models/application'; -import { Editor } from '@/ui_models/editor'; -export declare enum AppStateEvent { - TagChanged = 1, - ActiveEditorChanged = 2, - PreferencesChanged = 3, - PanelResized = 4, - EditorFocused = 5, - BeganBackupDownload = 6, - EndedBackupDownload = 7, - WindowDidFocus = 9, - WindowDidBlur = 10 -} -export declare enum EventSource { - UserInteraction = 1, - Script = 2 -} -declare type ObserverCallback = (event: AppStateEvent, data?: any) => Promise; -declare class ActionsMenuState { - hiddenExtensions: Record; - constructor(); - toggleExtensionVisibility(uuid: UuidString): void; - deinit(): void; -} -export declare class AppState { - $rootScope: ng.IRootScopeService; - $timeout: ng.ITimeoutService; - application: WebApplication; - observers: ObserverCallback[]; - locked: boolean; - unsubApp: any; - rootScopeCleanup1: any; - rootScopeCleanup2: any; - onVisibilityChange: any; - selectedTag?: SNTag; - userPreferences?: SNUserPrefs; - multiEditorEnabled: boolean; - showBetaWarning: boolean; - actionsMenu: ActionsMenuState; - constructor($rootScope: ng.IRootScopeService, $timeout: ng.ITimeoutService, application: WebApplication); - deinit(source: DeinitSource): void; - disableBetaWarning(): void; - enableBetaWarning(): void; - clearBetaWarning(): void; - private determineBetaWarningValue; - /** - * Creates a new editor if one doesn't exist. If one does, we'll replace the - * editor's note with an empty one. - */ - createEditor(title?: string): Promise; - openEditor(noteUuid: string): Promise; - getActiveEditor(): Editor; - getEditors(): Editor[]; - closeEditor(editor: Editor): void; - closeActiveEditor(): void; - closeAllEditors(): void; - editorForNote(note: SNNote): Editor | undefined; - streamNotesAndTags(): void; - addAppEventObserver(): void; - isLocked(): boolean; - registerVisibilityObservers(): void; - /** @returns A function that unregisters this observer */ - addObserver(callback: ObserverCallback): () => void; - notifyEvent(eventName: AppStateEvent, data?: any): Promise; - setSelectedTag(tag: SNTag): void; - /** Returns the tags that are referncing this note */ - getNoteTags(note: SNNote): SNTag[]; - /** Returns the notes this tag references */ - getTagNotes(tag: SNTag): SNNote[]; - getSelectedTag(): SNTag | undefined; - setUserPreferences(preferences: SNUserPrefs): void; - panelDidResize(name: string, collapsed: boolean): void; - editorDidFocus(eventSource: EventSource): void; - beganBackupDownload(): void; - endedBackupDownload(success: boolean): void; -} -export {}; diff --git a/dist/@types/app/assets/javascripts/ui_models/application.d.ts b/dist/@types/app/assets/javascripts/ui_models/application.d.ts deleted file mode 100644 index 9a2ca8d54..000000000 --- a/dist/@types/app/assets/javascripts/ui_models/application.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/// -import { PermissionDialog } from 'snjs/dist/@types/services/component_manager'; -import { ComponentGroup } from './component_group'; -import { EditorGroup } from '@/ui_models/editor_group'; -import { PasswordWizardType } from '@/types'; -import { SNApplication, Challenge, ProtectedAction, SNComponent } from 'snjs'; -import { WebDeviceInterface } from '@/web_device_interface'; -import { DesktopManager, AutolockService, ArchiveManager, NativeExtManager, StatusManager, ThemeManager, PreferencesManager, KeyboardManager } from '@/services'; -import { AppState } from '@/ui_models/app_state'; -import { Bridge } from '@/services/bridge'; -import { DeinitSource } from 'snjs/dist/@types/types'; -declare type WebServices = { - appState: AppState; - desktopService: DesktopManager; - autolockService: AutolockService; - archiveService: ArchiveManager; - nativeExtService: NativeExtManager; - statusManager: StatusManager; - themeService: ThemeManager; - prefsService: PreferencesManager; - keyboardService: KeyboardManager; -}; -export declare class WebApplication extends SNApplication { - private $compile; - private bridge; - private scope?; - private webServices; - private currentAuthenticationElement?; - editorGroup: EditorGroup; - componentGroup: ComponentGroup; - constructor(deviceInterface: WebDeviceInterface, identifier: string, $compile: ng.ICompileService, scope: ng.IScope, defaultSyncServerHost: string, bridge: Bridge); - /** @override */ - deinit(source: DeinitSource): void; - onStart(): void; - setWebServices(services: WebServices): void; - getAppState(): AppState; - getDesktopService(): DesktopManager; - getAutolockService(): AutolockService; - getArchiveService(): ArchiveManager; - getNativeExtService(): NativeExtManager; - getStatusManager(): StatusManager; - getThemeService(): ThemeManager; - getPrefsService(): PreferencesManager; - getKeyboardService(): KeyboardManager; - checkForSecurityUpdate(): Promise; - presentPasswordWizard(type: PasswordWizardType): void; - promptForChallenge(challenge: Challenge): void; - presentPrivilegesModal(action: ProtectedAction, onSuccess?: any, onCancel?: any): Promise; - presentPrivilegesManagementModal(): void; - authenticationInProgress(): boolean; - get applicationElement(): JQLite; - presentPasswordModal(callback: () => void): void; - presentRevisionPreviewModal(uuid: string, content: any): void; - openAccountSwitcher(): void; - openModalComponent(component: SNComponent): void; - presentPermissionsDialog(dialog: PermissionDialog): void; -} -export {}; diff --git a/dist/@types/app/assets/javascripts/ui_models/application_group.d.ts b/dist/@types/app/assets/javascripts/ui_models/application_group.d.ts deleted file mode 100644 index 250918e0c..000000000 --- a/dist/@types/app/assets/javascripts/ui_models/application_group.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// -import { SNApplicationGroup } from 'snjs'; -import { Bridge } from '@/services/bridge'; -export declare class ApplicationGroup extends SNApplicationGroup { - private defaultSyncServerHost; - private bridge; - $compile: ng.ICompileService; - $rootScope: ng.IRootScopeService; - $timeout: ng.ITimeoutService; - constructor($compile: ng.ICompileService, $rootScope: ng.IRootScopeService, $timeout: ng.ITimeoutService, defaultSyncServerHost: string, bridge: Bridge); - initialize(callback?: any): Promise; - private createApplication; -} diff --git a/dist/@types/app/assets/javascripts/ui_models/component_group.d.ts b/dist/@types/app/assets/javascripts/ui_models/component_group.d.ts deleted file mode 100644 index 2c2d7a925..000000000 --- a/dist/@types/app/assets/javascripts/ui_models/component_group.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { SNComponent, ComponentArea } from 'snjs'; -import { WebApplication } from './application'; -import { UuidString } from 'snjs/dist/@types/types'; -export declare class ComponentGroup { - private application; - changeObservers: any[]; - activeComponents: UuidString[]; - constructor(application: WebApplication); - get componentManager(): import("snjs/dist/@types").SNComponentManager; - deinit(): void; - activateComponent(component: SNComponent): Promise; - deactivateComponent(component: SNComponent, notify?: boolean): Promise; - deactivateComponentForArea(area: ComponentArea): Promise; - activeComponentForArea(area: ComponentArea): SNComponent; - activeComponentsForArea(area: ComponentArea): SNComponent[]; - allComponentsForArea(area: ComponentArea): SNComponent[]; - private allActiveComponents; - /** - * Notifies observer when the active editor has changed. - */ - addChangeObserver(callback: () => void): () => void; - private notifyObservers; -} diff --git a/dist/@types/app/assets/javascripts/ui_models/editor.d.ts b/dist/@types/app/assets/javascripts/ui_models/editor.d.ts deleted file mode 100644 index bc94adb66..000000000 --- a/dist/@types/app/assets/javascripts/ui_models/editor.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { SNNote, PayloadSource } from 'snjs'; -import { WebApplication } from './application'; -export declare class Editor { - note: SNNote; - private application; - private _onNoteChange?; - private _onNoteValueChange?; - private removeStreamObserver?; - isTemplateNote: boolean; - constructor(application: WebApplication, noteUuid?: string, noteTitle?: string); - private streamItems; - deinit(): void; - private handleNoteStream; - insertTemplatedNote(): Promise; - /** - * Reverts the editor to a blank state, removing any existing note from view, - * and creating a placeholder note. - */ - reset(noteTitle?: string): Promise; - /** - * Register to be notified when the editor's note changes. - */ - onNoteChange(callback: () => void): void; - clearNoteChangeListener(): void; - /** - * Register to be notified when the editor's note's values change - * (and thus a new object reference is created) - */ - onNoteValueChange(callback: (note: SNNote, source?: PayloadSource) => void): void; - /** - * Sets the editor contents by setting its note. - */ - setNote(note: SNNote, isTemplate?: boolean): void; -} diff --git a/dist/@types/app/assets/javascripts/ui_models/editor_group.d.ts b/dist/@types/app/assets/javascripts/ui_models/editor_group.d.ts deleted file mode 100644 index afcbf20a5..000000000 --- a/dist/@types/app/assets/javascripts/ui_models/editor_group.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Editor } from './editor'; -import { WebApplication } from './application'; -declare type EditorGroupChangeCallback = () => void; -export declare class EditorGroup { - editors: Editor[]; - private application; - changeObservers: EditorGroupChangeCallback[]; - constructor(application: WebApplication); - deinit(): void; - createEditor(noteUuid?: string, noteTitle?: string): void; - deleteEditor(editor: Editor): void; - closeEditor(editor: Editor): void; - closeActiveEditor(): void; - closeAllEditors(): void; - get activeEditor(): Editor; - /** - * Notifies observer when the active editor has changed. - */ - addChangeObserver(callback: EditorGroupChangeCallback): () => void; - private notifyObservers; -} -export {}; diff --git a/dist/@types/app/assets/javascripts/utils.d.ts b/dist/@types/app/assets/javascripts/utils.d.ts deleted file mode 100644 index 3b7556603..000000000 --- a/dist/@types/app/assets/javascripts/utils.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare const isDev: boolean; -export declare function getPlatformString(): string; -export declare function dateToLocalizedString(date: Date): string; -/** Via https://davidwalsh.name/javascript-debounce-function */ -export declare function debounce(this: any, func: any, wait: number, immediate?: boolean): () => void; -export declare function preventRefreshing(message: string, operation: () => Promise | void): Promise; -export declare function isDesktopApplication(): boolean; diff --git a/dist/@types/app/assets/javascripts/views/abstract/pure_view_ctrl.d.ts b/dist/@types/app/assets/javascripts/views/abstract/pure_view_ctrl.d.ts deleted file mode 100644 index 053bdd8d5..000000000 --- a/dist/@types/app/assets/javascripts/views/abstract/pure_view_ctrl.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/// -import { ApplicationEvent } from 'snjs'; -import { WebApplication } from '@/ui_models/application'; -export declare type CtrlState = Partial>; -export declare type CtrlProps = Partial>; -export declare class PureViewCtrl

{ - props: P; - $timeout: ng.ITimeoutService; - /** Passed through templates */ - application: WebApplication; - state: S; - private unsubApp; - private unsubState; - private stateTimeout?; - /** - * Subclasses can optionally add an ng-if=ctrl.templateReady to make sure that - * no Angular handlebars/syntax render in the UI before display data is ready. - */ - protected templateReady: boolean; - constructor($timeout: ng.ITimeoutService, props?: P); - $onInit(): void; - deinit(): void; - $onDestroy(): void; - get appState(): import("../../ui_models/app_state").AppState; - /** @private */ - resetState(): Promise; - /** @override */ - getInitialState(): S; - setState(state: Partial): Promise; - /** @returns a promise that resolves after the UI has been updated. */ - flushUI(): import("angular").IPromise; - initProps(props: CtrlProps): void; - addAppStateObserver(): void; - onAppStateEvent(eventName: any, data: any): void; - addAppEventObserver(): void; - onAppEvent(eventName: ApplicationEvent): void; - /** @override */ - onAppStart(): Promise; - onLocalDataLoaded(): void; - onAppLaunch(): Promise; - onAppKeyChange(): Promise; - onAppIncrementalSync(): void; - onAppFullSync(): void; -} diff --git a/dist/@types/app/assets/javascripts/views/account_switcher/account_switcher.d.ts b/dist/@types/app/assets/javascripts/views/account_switcher/account_switcher.d.ts deleted file mode 100644 index 8974f7f1d..000000000 --- a/dist/@types/app/assets/javascripts/views/account_switcher/account_switcher.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from '@/types'; -export declare class AccountSwitcher extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/views/application/application_view.d.ts b/dist/@types/app/assets/javascripts/views/application/application_view.d.ts deleted file mode 100644 index 92b407034..000000000 --- a/dist/@types/app/assets/javascripts/views/application/application_view.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from '@/types'; -export declare class ApplicationView extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/views/application_group/application_group.d.ts b/dist/@types/app/assets/javascripts/views/application_group/application_group.d.ts deleted file mode 100644 index ecb3b7d0e..000000000 --- a/dist/@types/app/assets/javascripts/views/application_group/application_group.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from '@/types'; -export declare class ApplicationGroupView extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/views/application_group/application_group_view.d.ts b/dist/@types/app/assets/javascripts/views/application_group/application_group_view.d.ts deleted file mode 100644 index ecb3b7d0e..000000000 --- a/dist/@types/app/assets/javascripts/views/application_group/application_group_view.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from '@/types'; -export declare class ApplicationGroupView extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/views/challenge_modal/challenge_modal.d.ts b/dist/@types/app/assets/javascripts/views/challenge_modal/challenge_modal.d.ts deleted file mode 100644 index be099756c..000000000 --- a/dist/@types/app/assets/javascripts/views/challenge_modal/challenge_modal.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from '@/types'; -export declare class ChallengeModal extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/views/constants.d.ts b/dist/@types/app/assets/javascripts/views/constants.d.ts deleted file mode 100644 index 3eadaa31f..000000000 --- a/dist/@types/app/assets/javascripts/views/constants.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const PANEL_NAME_NOTES = "notes"; -export declare const PANEL_NAME_TAGS = "tags"; diff --git a/dist/@types/app/assets/javascripts/views/editor/editor_view.d.ts b/dist/@types/app/assets/javascripts/views/editor/editor_view.d.ts deleted file mode 100644 index 5061db325..000000000 --- a/dist/@types/app/assets/javascripts/views/editor/editor_view.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from '@/types'; -export declare class EditorView extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/views/editor_group/editor_group.d.ts b/dist/@types/app/assets/javascripts/views/editor_group/editor_group.d.ts deleted file mode 100644 index 4c185c250..000000000 --- a/dist/@types/app/assets/javascripts/views/editor_group/editor_group.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class EditorGroupView extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/views/editor_group/editor_group_view.d.ts b/dist/@types/app/assets/javascripts/views/editor_group/editor_group_view.d.ts deleted file mode 100644 index 4c185c250..000000000 --- a/dist/@types/app/assets/javascripts/views/editor_group/editor_group_view.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class EditorGroupView extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/views/footer/footer_view.d.ts b/dist/@types/app/assets/javascripts/views/footer/footer_view.d.ts deleted file mode 100644 index 27f2ce800..000000000 --- a/dist/@types/app/assets/javascripts/views/footer/footer_view.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from '@/types'; -export declare class FooterView extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/views/index.d.ts b/dist/@types/app/assets/javascripts/views/index.d.ts deleted file mode 100644 index fc5b9525f..000000000 --- a/dist/@types/app/assets/javascripts/views/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export { PureViewCtrl } from './abstract/pure_view_ctrl'; -export { ApplicationGroupView } from './application_group/application_group_view'; -export { ApplicationView } from './application/application_view'; -export { EditorGroupView } from './editor_group/editor_group_view'; -export { EditorView } from './editor/editor_view'; -export { FooterView } from './footer/footer_view'; -export { NotesView } from './notes/notes_view'; -export { TagsView } from './tags/tags_view'; -export { ChallengeModal } from './challenge_modal/challenge_modal'; diff --git a/dist/@types/app/assets/javascripts/views/notes/note_utils.d.ts b/dist/@types/app/assets/javascripts/views/notes/note_utils.d.ts deleted file mode 100644 index 3b23a9c69..000000000 --- a/dist/@types/app/assets/javascripts/views/notes/note_utils.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { SNNote } from 'snjs'; -export declare enum NoteSortKey { - CreatedAt = "created_at", - UserUpdatedAt = "userModifiedDate", - Title = "title", - /** @legacy Use UserUpdatedAt instead */ - UpdatedAt = "updated_at", - /** @legacy Use UserUpdatedAt instead */ - ClientUpdatedAt = "client_updated_at" -} -export declare function notePassesFilter(note: SNNote, showArchived: boolean, hidePinned: boolean, filterText: string): boolean; diff --git a/dist/@types/app/assets/javascripts/views/notes/notes_view.d.ts b/dist/@types/app/assets/javascripts/views/notes/notes_view.d.ts deleted file mode 100644 index 2b50a2911..000000000 --- a/dist/@types/app/assets/javascripts/views/notes/notes_view.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from './../../types'; -export declare class NotesView extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/views/tags/tags_view.d.ts b/dist/@types/app/assets/javascripts/views/tags/tags_view.d.ts deleted file mode 100644 index e11577d22..000000000 --- a/dist/@types/app/assets/javascripts/views/tags/tags_view.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebDirective } from '@/types'; -export declare class TagsView extends WebDirective { - constructor(); -} diff --git a/dist/@types/app/assets/javascripts/web_device_interface.d.ts b/dist/@types/app/assets/javascripts/web_device_interface.d.ts deleted file mode 100644 index 2460a4b20..000000000 --- a/dist/@types/app/assets/javascripts/web_device_interface.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { DeviceInterface, SNApplication, ApplicationIdentifier } from 'snjs'; -import { Bridge } from './services/bridge'; -export declare class WebDeviceInterface extends DeviceInterface { - private bridge; - private databases; - constructor(timeout: any, bridge: Bridge); - setApplication(application: SNApplication): void; - private databaseForIdentifier; - deinit(): void; - getRawStorageValue(key: string): Promise; - getAllRawStorageKeyValues(): Promise<{ - key: string; - value: any; - }[]>; - setRawStorageValue(key: string, value: any): Promise; - removeRawStorageValue(key: string): Promise; - removeAllRawStorageValues(): Promise; - openDatabase(identifier: ApplicationIdentifier): Promise<{ - isNewDatabase?: boolean | undefined; - } | undefined>; - getAllRawDatabasePayloads(identifier: ApplicationIdentifier): Promise; - saveRawDatabasePayload(payload: any, identifier: ApplicationIdentifier): Promise; - saveRawDatabasePayloads(payloads: any[], identifier: ApplicationIdentifier): Promise; - removeRawDatabasePayloadWithId(id: string, identifier: ApplicationIdentifier): Promise; - removeAllRawDatabasePayloads(identifier: ApplicationIdentifier): Promise; - getNamespacedKeychainValue(identifier: ApplicationIdentifier): Promise; - setNamespacedKeychainValue(value: any, identifier: ApplicationIdentifier): Promise; - clearNamespacedKeychainValue(identifier: ApplicationIdentifier): Promise; - getRawKeychainValue(): Promise; - clearRawKeychainValue(): Promise; - openUrl(url: string): void; -} diff --git a/dist/@types/vendor/assets/javascripts/angular-sanitize.d.ts b/dist/@types/vendor/assets/javascripts/angular-sanitize.d.ts deleted file mode 100644 index 6d93f46fa..000000000 --- a/dist/@types/vendor/assets/javascripts/angular-sanitize.d.ts +++ /dev/null @@ -1,242 +0,0 @@ -/** - * @ngdoc module - * @name ngSanitize - * @description - * - * The `ngSanitize` module provides functionality to sanitize HTML. - * - * See {@link ngSanitize.$sanitize `$sanitize`} for usage. - */ -/** - * @ngdoc service - * @name $sanitize - * @kind function - * - * @description - * Sanitizes an html string by stripping all potentially dangerous tokens. - * - * The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are - * then serialized back to a properly escaped HTML string. This means that no unsafe input can make - * it into the returned string. - * - * The whitelist for URL sanitization of attribute values is configured using the functions - * `aHrefSanitizationWhitelist` and `imgSrcSanitizationWhitelist` of {@link $compileProvider}. - * - * The input may also contain SVG markup if this is enabled via {@link $sanitizeProvider}. - * - * @param {string} html HTML input. - * @returns {string} Sanitized HTML. - * - * @example - - - -

- Snippet: - - - - - - - - - - - - - - - - - - - - - - - - - -
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value -
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
-</div>
-
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
-
- - - it('should sanitize the html snippet by default', function() { - expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')). - toBe('

an html\nclick here\nsnippet

'); - }); - - it('should inline raw snippet if bound to a trusted value', function() { - expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')). - toBe("

an html\n" + - "click here\n" + - "snippet

"); - }); - - it('should escape snippet without any filter', function() { - expect(element(by.css('#bind-default div')).getAttribute('innerHTML')). - toBe("<p style=\"color:blue\">an html\n" + - "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + - "snippet</p>"); - }); - - it('should update', function() { - element(by.model('snippet')).clear(); - element(by.model('snippet')).sendKeys('new text'); - expect(element(by.css('#bind-html-with-sanitize div')).getAttribute('innerHTML')). - toBe('new text'); - expect(element(by.css('#bind-html-with-trust div')).getAttribute('innerHTML')).toBe( - 'new text'); - expect(element(by.css('#bind-default div')).getAttribute('innerHTML')).toBe( - "new <b onclick=\"alert(1)\">text</b>"); - }); -
- - */ -/** - * @ngdoc provider - * @name $sanitizeProvider - * @this - * - * @description - * Creates and configures {@link $sanitize} instance. - */ -declare function $SanitizeProvider(): void; -declare class $SanitizeProvider { - $get: (string | (($$sanitizeUri: any) => (html: any) => string))[]; - /** - * @ngdoc method - * @name $sanitizeProvider#enableSvg - * @kind function - * - * @description - * Enables a subset of svg to be supported by the sanitizer. - * - *
- *

By enabling this setting without taking other precautions, you might expose your - * application to click-hijacking attacks. In these attacks, sanitized svg elements could be positioned - * outside of the containing element and be rendered over other elements on the page (e.g. a login - * link). Such behavior can then result in phishing incidents.

- * - *

To protect against these, explicitly setup `overflow: hidden` css rule for all potential svg - * tags within the sanitized content:

- * - *
- * - *

-     *   .rootOfTheIncludedContent svg {
-     *     overflow: hidden !important;
-     *   }
-     *   
- *
- * - * @param {boolean=} flag Enable or disable SVG support in the sanitizer. - * @returns {boolean|$sanitizeProvider} Returns the currently configured value if called - * without an argument or self for chaining otherwise. - */ - enableSvg: (enableSvg: any) => boolean | any; - /** - * @ngdoc method - * @name $sanitizeProvider#addValidElements - * @kind function - * - * @description - * Extends the built-in lists of valid HTML/SVG elements, i.e. elements that are considered safe - * and are not stripped off during sanitization. You can extend the following lists of elements: - * - * - `htmlElements`: A list of elements (tag names) to extend the current list of safe HTML - * elements. HTML elements considered safe will not be removed during sanitization. All other - * elements will be stripped off. - * - * - `htmlVoidElements`: This is similar to `htmlElements`, but marks the elements as - * "void elements" (similar to HTML - * [void elements](https://rawgit.com/w3c/html/html5.1-2/single-page.html#void-elements)). These - * elements have no end tag and cannot have content. - * - * - `svgElements`: This is similar to `htmlElements`, but for SVG elements. This list is only - * taken into account if SVG is {@link ngSanitize.$sanitizeProvider#enableSvg enabled} for - * `$sanitize`. - * - *
- * This method must be called during the {@link angular.Module#config config} phase. Once the - * `$sanitize` service has been instantiated, this method has no effect. - *
- * - *
- * Keep in mind that extending the built-in lists of elements may expose your app to XSS or - * other vulnerabilities. Be very mindful of the elements you add. - *
- * - * @param {Array|Object} elements - A list of valid HTML elements or an object with one or - * more of the following properties: - * - **htmlElements** - `{Array}` - A list of elements to extend the current list of - * HTML elements. - * - **htmlVoidElements** - `{Array}` - A list of elements to extend the current list of - * void HTML elements; i.e. elements that do not have an end tag. - * - **svgElements** - `{Array}` - A list of elements to extend the current list of SVG - * elements. The list of SVG elements is only taken into account if SVG is - * {@link ngSanitize.$sanitizeProvider#enableSvg enabled} for `$sanitize`. - * - * Passing an array (`[...]`) is equivalent to passing `{htmlElements: [...]}`. - * - * @return {$sanitizeProvider} Returns self for chaining. - */ - addValidElements: (elements: Array | Object) => any; - /** - * @ngdoc method - * @name $sanitizeProvider#addValidAttrs - * @kind function - * - * @description - * Extends the built-in list of valid attributes, i.e. attributes that are considered safe and are - * not stripped off during sanitization. - * - * **Note**: - * The new attributes will not be treated as URI attributes, which means their values will not be - * sanitized as URIs using `$compileProvider`'s - * {@link ng.$compileProvider#aHrefSanitizationWhitelist aHrefSanitizationWhitelist} and - * {@link ng.$compileProvider#imgSrcSanitizationWhitelist imgSrcSanitizationWhitelist}. - * - *
- * This method must be called during the {@link angular.Module#config config} phase. Once the - * `$sanitize` service has been instantiated, this method has no effect. - *
- * - *
- * Keep in mind that extending the built-in list of attributes may expose your app to XSS or - * other vulnerabilities. Be very mindful of the attributes you add. - *
- * - * @param {Array} attrs - A list of valid attributes. - * - * @returns {$sanitizeProvider} Returns self for chaining. - */ - addValidAttrs: (attrs: Array) => any; -} -declare function sanitizeText(chars: any): string; -declare var $sanitizeMinErr: any; -declare var bind: any; -declare var extend: any; -declare var forEach: any; -declare var isArray: any; -declare var isDefined: any; -declare var lowercase: any; -declare var noop: any; -declare var nodeContains: any; -declare var htmlParser: any; -declare var htmlSanitizeWriter: any; diff --git a/dist/@types/vendor/assets/javascripts/zip/deflate.d.ts b/dist/@types/vendor/assets/javascripts/zip/deflate.d.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/@types/vendor/assets/javascripts/zip/inflate.d.ts b/dist/@types/vendor/assets/javascripts/zip/inflate.d.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/@types/vendor/assets/javascripts/zip/z-worker.d.ts b/dist/@types/vendor/assets/javascripts/zip/z-worker.d.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/@types/vendor/assets/javascripts/zip/zip.d.ts b/dist/@types/vendor/assets/javascripts/zip/zip.d.ts deleted file mode 100644 index e69de29bb..000000000 From d49d2e996b47738252fdb8b44cd53b6ea882b9cb Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Mon, 16 Nov 2020 17:00:01 +0100 Subject: [PATCH 04/14] fix: assign active tag when creating a new note --- app/assets/javascripts/ui_models/app_state.ts | 14 ++++++++++++-- app/assets/javascripts/ui_models/editor.ts | 19 ++++++++++++++----- .../javascripts/ui_models/editor_group.ts | 12 ++++++++---- 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/ui_models/app_state.ts b/app/assets/javascripts/ui_models/app_state.ts index 4d93f71ee..c607c894d 100644 --- a/app/assets/javascripts/ui_models/app_state.ts +++ b/app/assets/javascripts/ui_models/app_state.ts @@ -152,10 +152,20 @@ export class AppState { */ async createEditor(title?: string) { const activeEditor = this.getActiveEditor(); + const activeTagUuid = this.selectedTag + ? this.selectedTag.isSmartTag() + ? undefined + : this.selectedTag.uuid + : undefined; + if (!activeEditor || this.multiEditorEnabled) { - this.application.editorGroup.createEditor(undefined, title); + this.application.editorGroup.createEditor( + undefined, + title, + activeTagUuid + ); } else { - await activeEditor.reset(title); + await activeEditor.reset(title, activeTagUuid); } } diff --git a/app/assets/javascripts/ui_models/editor.ts b/app/assets/javascripts/ui_models/editor.ts index 7c03fbdb6..0a5eed08e 100644 --- a/app/assets/javascripts/ui_models/editor.ts +++ b/app/assets/javascripts/ui_models/editor.ts @@ -1,4 +1,4 @@ -import { SNNote, ContentType, PayloadSource } from 'snjs'; +import { SNNote, ContentType, PayloadSource, UuidString, TagMutator } from 'snjs'; import { WebApplication } from './application'; export class Editor { @@ -12,15 +12,16 @@ export class Editor { constructor( application: WebApplication, - noteUuid?: string, - noteTitle?: string + noteUuid: string | undefined, + noteTitle: string | undefined, + noteTag: UuidString | undefined ) { this.application = application; if (noteUuid) { this.note = application.findItem(noteUuid) as SNNote; this.streamItems(); } else { - this.reset(noteTitle) + this.reset(noteTitle, noteTag) .then(() => this.streamItems()) .catch(console.error); } @@ -65,7 +66,10 @@ export class Editor { * Reverts the editor to a blank state, removing any existing note from view, * and creating a placeholder note. */ - async reset(noteTitle = '') { + async reset( + noteTitle = '', + noteTag?: UuidString, + ) { const note = await this.application.createTemplateItem( ContentType.Note, { @@ -74,6 +78,11 @@ export class Editor { references: [] } ) as SNNote; + if (noteTag) { + await this.application.changeItem(noteTag, (m) => { + m.addItemAsRelationship(note); + }); + } if (!this.isTemplateNote || this.note.title !== note.title) { this.setNote(note as SNNote, true); } diff --git a/app/assets/javascripts/ui_models/editor_group.ts b/app/assets/javascripts/ui_models/editor_group.ts index 5be00f8ec..6ded5a3e0 100644 --- a/app/assets/javascripts/ui_models/editor_group.ts +++ b/app/assets/javascripts/ui_models/editor_group.ts @@ -1,4 +1,4 @@ -import { removeFromArray } from 'snjs'; +import { removeFromArray, UuidString } from 'snjs'; import { Editor } from './editor'; import { WebApplication } from './application'; @@ -21,8 +21,12 @@ export class EditorGroup { } } - createEditor(noteUuid?: string, noteTitle?: string) { - const editor = new Editor(this.application, noteUuid, noteTitle); + createEditor( + noteUuid?: string, + noteTitle?: string, + noteTag?: UuidString + ) { + const editor = new Editor(this.application, noteUuid, noteTitle, noteTag); this.editors.push(editor); this.notifyObservers(); } @@ -72,4 +76,4 @@ export class EditorGroup { observer(); } } -} \ No newline at end of file +} From 3a1614069928fe14857f64bd849fdca3ce5b3959 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Thu, 19 Nov 2020 13:37:49 +0100 Subject: [PATCH 05/14] chore(deps): upgrade snjs & sncrypto-web to npm package versions --- app/assets/javascripts/app.ts | 2 +- app/assets/javascripts/database.ts | 4 +- .../directives/views/accountMenu.ts | 6 +-- .../directives/views/actionsMenu.ts | 6 +-- .../directives/views/componentModal.ts | 2 +- .../directives/views/componentView.ts | 2 +- .../directives/views/editorMenu.ts | 4 +- .../directives/views/historyMenu.ts | 6 +-- .../directives/views/privilegesAuthModal.ts | 2 +- .../views/privilegesManagementModal.ts | 4 +- .../directives/views/revisionPreviewModal.ts | 4 +- .../javascripts/services/alertService.ts | 2 +- .../javascripts/services/archiveManager.ts | 4 +- .../javascripts/services/autolock_service.ts | 2 +- app/assets/javascripts/services/bridge.ts | 6 +-- .../javascripts/services/browserBridge.ts | 2 +- .../javascripts/services/desktopManager.ts | 4 +- .../javascripts/services/errorReporting.ts | 2 +- .../javascripts/services/keyboardManager.ts | 2 +- .../javascripts/services/nativeExtManager.ts | 6 +-- .../services/preferencesManager.ts | 2 +- .../javascripts/services/statusManager.ts | 2 +- .../javascripts/services/themeManager.ts | 2 +- app/assets/javascripts/types.ts | 4 +- app/assets/javascripts/ui_models/app_state.ts | 2 +- .../javascripts/ui_models/application.ts | 8 ++-- .../ui_models/application_group.ts | 2 +- .../javascripts/ui_models/component_group.ts | 6 +-- app/assets/javascripts/ui_models/editor.ts | 2 +- .../javascripts/ui_models/editor_group.ts | 2 +- .../views/abstract/pure_view_ctrl.ts | 2 +- .../account_switcher/account_switcher.ts | 2 +- .../views/application/application_view.ts | 2 +- .../views/challenge_modal/challenge_modal.ts | 2 +- .../javascripts/views/editor/editor_view.ts | 2 +- .../javascripts/views/footer/footer_view.ts | 2 +- .../javascripts/views/notes/note_utils.ts | 2 +- .../javascripts/views/notes/notes_view.ts | 4 +- .../javascripts/views/tags/tags_view.ts | 4 +- .../javascripts/web_device_interface.ts | 6 ++- package-lock.json | 43 +++++++++++++++---- package.json | 6 +-- 42 files changed, 106 insertions(+), 75 deletions(-) diff --git a/app/assets/javascripts/app.ts b/app/assets/javascripts/app.ts index 58ae18e44..66e9ca7de 100644 --- a/app/assets/javascripts/app.ts +++ b/app/assets/javascripts/app.ts @@ -3,7 +3,7 @@ declare const __VERSION__: string; declare const __WEB__: boolean; -import { SNLog } from 'snjs'; +import { SNLog } from '@standardnotes/snjs'; import angular from 'angular'; import { configRoutes } from './routes'; diff --git a/app/assets/javascripts/database.ts b/app/assets/javascripts/database.ts index c29449110..deac64b9e 100644 --- a/app/assets/javascripts/database.ts +++ b/app/assets/javascripts/database.ts @@ -1,4 +1,4 @@ -import { SNAlertService } from "snjs/dist/@types"; +import { SNAlertService } from "@standardnotes/snjs"; const STORE_NAME = 'items'; const READ_WRITE = 'readwrite'; @@ -216,4 +216,4 @@ export class Database { "Please close any other app instances and reload the page."; this.alertService!.alert(message); } -} \ No newline at end of file +} diff --git a/app/assets/javascripts/directives/views/accountMenu.ts b/app/assets/javascripts/directives/views/accountMenu.ts index 2f38002cf..85789c0e5 100644 --- a/app/assets/javascripts/directives/views/accountMenu.ts +++ b/app/assets/javascripts/directives/views/accountMenu.ts @@ -1,7 +1,7 @@ import { WebDirective } from './../../types'; import { isDesktopApplication, preventRefreshing } from '@/utils'; import template from '%/directives/account-menu.pug'; -import { ProtectedAction, ContentType } from 'snjs'; +import { ProtectedAction, ContentType } from '@standardnotes/snjs'; import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl'; import { STRING_ACCOUNT_MENU_UNCHECK_MERGE, @@ -22,9 +22,9 @@ import { STRING_CONFIRM_APP_QUIT_DURING_PASSCODE_REMOVAL, STRING_UNSUPPORTED_BACKUP_FILE_VERSION } from '@/strings'; -import { SyncOpStatus } from 'snjs/dist/@types/services/sync/sync_op_status'; +import { SyncOpStatus } from '@standardnotes/snjs'; import { PasswordWizardType } from '@/types'; -import { BackupFile } from 'snjs/dist/@types/services/protocol_service'; +import { BackupFile } from '@standardnotes/snjs'; import { confirmDialog, alertDialog } from '@/services/alertService'; import { autorun, IReactionDisposer } from 'mobx'; import { storage, StorageKey } from '@/services/localStorage'; diff --git a/app/assets/javascripts/directives/views/actionsMenu.ts b/app/assets/javascripts/directives/views/actionsMenu.ts index 52cdcd27c..99d60426a 100644 --- a/app/assets/javascripts/directives/views/actionsMenu.ts +++ b/app/assets/javascripts/directives/views/actionsMenu.ts @@ -2,9 +2,9 @@ import { WebApplication } from '@/ui_models/application'; import { WebDirective } from './../../types'; import template from '%/directives/actions-menu.pug'; import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl'; -import { SNItem, Action, SNActionsExtension, UuidString } from 'snjs/dist/@types'; -import { ActionResponse } from 'snjs'; -import { ActionsExtensionMutator } from 'snjs/dist/@types/models/app/extension'; +import { SNItem, Action, SNActionsExtension, UuidString } from '@standardnotes/snjs'; +import { ActionResponse } from '@standardnotes/snjs'; +import { ActionsExtensionMutator } from '@standardnotes/snjs'; import { autorun, IReactionDisposer } from 'mobx'; type ActionsMenuScope = { diff --git a/app/assets/javascripts/directives/views/componentModal.ts b/app/assets/javascripts/directives/views/componentModal.ts index fe01ee99f..d03ed2289 100644 --- a/app/assets/javascripts/directives/views/componentModal.ts +++ b/app/assets/javascripts/directives/views/componentModal.ts @@ -1,5 +1,5 @@ import { WebApplication } from '@/ui_models/application'; -import { SNComponent, LiveItem } from 'snjs'; +import { SNComponent, LiveItem } from '@standardnotes/snjs'; import { WebDirective } from './../../types'; import template from '%/directives/component-modal.pug'; diff --git a/app/assets/javascripts/directives/views/componentView.ts b/app/assets/javascripts/directives/views/componentView.ts index 776914f26..4819a002f 100644 --- a/app/assets/javascripts/directives/views/componentView.ts +++ b/app/assets/javascripts/directives/views/componentView.ts @@ -1,6 +1,6 @@ import { RootScopeMessages } from './../../messages'; import { WebApplication } from '@/ui_models/application'; -import { SNComponent, ComponentAction, LiveItem } from 'snjs'; +import { SNComponent, ComponentAction, LiveItem } from '@standardnotes/snjs'; import { WebDirective } from './../../types'; import template from '%/directives/component-view.pug'; import { isDesktopApplication } from '../../utils'; diff --git a/app/assets/javascripts/directives/views/editorMenu.ts b/app/assets/javascripts/directives/views/editorMenu.ts index 863b826e3..d4e4c4906 100644 --- a/app/assets/javascripts/directives/views/editorMenu.ts +++ b/app/assets/javascripts/directives/views/editorMenu.ts @@ -1,10 +1,10 @@ import { WebDirective } from './../../types'; import { WebApplication } from '@/ui_models/application'; -import { SNComponent, SNItem, ComponentArea } from 'snjs'; +import { SNComponent, SNItem, ComponentArea } from '@standardnotes/snjs'; import { isDesktopApplication } from '@/utils'; import template from '%/directives/editor-menu.pug'; import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl'; -import { ComponentMutator } from 'snjs/dist/@types/models'; +import { ComponentMutator } from '@standardnotes/snjs'; interface EditorMenuScope { callback: (component: SNComponent) => void diff --git a/app/assets/javascripts/directives/views/historyMenu.ts b/app/assets/javascripts/directives/views/historyMenu.ts index 10c7d2769..c933d91a1 100644 --- a/app/assets/javascripts/directives/views/historyMenu.ts +++ b/app/assets/javascripts/directives/views/historyMenu.ts @@ -1,10 +1,10 @@ import { WebDirective } from '../../types'; import { WebApplication } from '@/ui_models/application'; import template from '%/directives/history-menu.pug'; -import { SNItem, ItemHistoryEntry } from 'snjs/dist/@types'; +import { SNItem, ItemHistoryEntry } from '@standardnotes/snjs'; import { PureViewCtrl } from '@/views'; -import { ItemSessionHistory } from 'snjs/dist/@types/services/history/session/item_session_history'; -import { RevisionListEntry, SingleRevision } from 'snjs/dist/@types/services/api/responses'; +import { ItemSessionHistory } from '@standardnotes/snjs'; +import { RevisionListEntry, SingleRevision } from '@standardnotes/snjs'; import { confirmDialog } from '@/services/alertService'; type HistoryState = { diff --git a/app/assets/javascripts/directives/views/privilegesAuthModal.ts b/app/assets/javascripts/directives/views/privilegesAuthModal.ts index dba4db4ba..e715ee9c4 100644 --- a/app/assets/javascripts/directives/views/privilegesAuthModal.ts +++ b/app/assets/javascripts/directives/views/privilegesAuthModal.ts @@ -1,6 +1,6 @@ import { WebDirective } from './../../types'; import { WebApplication } from '@/ui_models/application'; -import { ProtectedAction, PrivilegeCredential, PrivilegeSessionLength } from 'snjs'; +import { ProtectedAction, PrivilegeCredential, PrivilegeSessionLength } from '@standardnotes/snjs'; import template from '%/directives/privileges-auth-modal.pug'; type PrivilegesAuthModalScope = { diff --git a/app/assets/javascripts/directives/views/privilegesManagementModal.ts b/app/assets/javascripts/directives/views/privilegesManagementModal.ts index 837d4e3b3..81403b69a 100644 --- a/app/assets/javascripts/directives/views/privilegesManagementModal.ts +++ b/app/assets/javascripts/directives/views/privilegesManagementModal.ts @@ -1,9 +1,9 @@ import { WebDirective } from './../../types'; import { WebApplication } from '@/ui_models/application'; import template from '%/directives/privileges-management-modal.pug'; -import { PrivilegeCredential, ProtectedAction, SNPrivileges, PrivilegeSessionLength } from 'snjs'; +import { PrivilegeCredential, ProtectedAction, SNPrivileges, PrivilegeSessionLength } from '@standardnotes/snjs'; import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl'; -import { PrivilegeMutator } from 'snjs/dist/@types/models'; +import { PrivilegeMutator } from '@standardnotes/snjs'; type DisplayInfo = { label: string diff --git a/app/assets/javascripts/directives/views/revisionPreviewModal.ts b/app/assets/javascripts/directives/views/revisionPreviewModal.ts index 26d2fe49d..a67755eb1 100644 --- a/app/assets/javascripts/directives/views/revisionPreviewModal.ts +++ b/app/assets/javascripts/directives/views/revisionPreviewModal.ts @@ -7,9 +7,9 @@ import { SNComponent, SNNote, ComponentArea -} from 'snjs'; +} from '@standardnotes/snjs'; import template from '%/directives/revision-preview-modal.pug'; -import { PayloadContent } from 'snjs/dist/@types/protocol/payloads/generator'; +import { PayloadContent } from '@standardnotes/snjs'; import { confirmDialog } from '@/services/alertService'; interface RevisionPreviewScope { diff --git a/app/assets/javascripts/services/alertService.ts b/app/assets/javascripts/services/alertService.ts index 38c0d457a..8ae7e7b61 100644 --- a/app/assets/javascripts/services/alertService.ts +++ b/app/assets/javascripts/services/alertService.ts @@ -1,5 +1,5 @@ /* eslint-disable prefer-promise-reject-errors */ -import { SNAlertService, ButtonType } from 'snjs'; +import { SNAlertService, ButtonType } from '@standardnotes/snjs'; import { SKAlert } from 'sn-stylekit'; /** @returns a promise resolving to true if the user confirmed, false if they canceled */ diff --git a/app/assets/javascripts/services/archiveManager.ts b/app/assets/javascripts/services/archiveManager.ts index 9901f5361..b6e7f915c 100644 --- a/app/assets/javascripts/services/archiveManager.ts +++ b/app/assets/javascripts/services/archiveManager.ts @@ -1,5 +1,5 @@ import { WebApplication } from '@/ui_models/application'; -import { EncryptionIntent, ProtectedAction, SNItem, ContentType, SNNote } from 'snjs'; +import { EncryptionIntent, ProtectedAction, SNItem, ContentType, SNNote } from '@standardnotes/snjs'; function zippableTxtName(name: string, suffix = ""): string { const sanitizedName = name @@ -111,7 +111,7 @@ export class ArchiveManager { ); zipWriter.add(fileName, new this.zip.BlobReader(blob), resolve); }); - + let index = 0; const nextFile = () => { const item = items[index]; diff --git a/app/assets/javascripts/services/autolock_service.ts b/app/assets/javascripts/services/autolock_service.ts index 544296bdd..895674dcd 100644 --- a/app/assets/javascripts/services/autolock_service.ts +++ b/app/assets/javascripts/services/autolock_service.ts @@ -1,4 +1,4 @@ -import { ApplicationService } from 'snjs'; +import { ApplicationService } from '@standardnotes/snjs'; import { WebApplication } from '@/ui_models/application'; import { isDesktopApplication } from '@/utils'; import { AppStateEvent } from '@/ui_models/app_state'; diff --git a/app/assets/javascripts/services/bridge.ts b/app/assets/javascripts/services/bridge.ts index f5f4488c6..11d65d8ca 100644 --- a/app/assets/javascripts/services/bridge.ts +++ b/app/assets/javascripts/services/bridge.ts @@ -1,8 +1,8 @@ /** - * This file will be imported by desktop, so we make sure imports are not - * carrying too much code with them that's not tree-shakeable. + * This file will be imported by desktop, so we make sure imports are carrying + * as little extra code as possible with them. */ -import { Environment } from 'snjs/lib/platforms'; +import { Environment } from '@standardnotes/snjs/dist/@types/platforms'; export { Environment }; /** Platform-specific (i-e Electron/browser) behavior is handled by a Bridge object. */ diff --git a/app/assets/javascripts/services/browserBridge.ts b/app/assets/javascripts/services/browserBridge.ts index a7d2e2dab..ff8eb9ac6 100644 --- a/app/assets/javascripts/services/browserBridge.ts +++ b/app/assets/javascripts/services/browserBridge.ts @@ -1,5 +1,5 @@ import { Bridge } from "./bridge"; -import { Environment } from 'snjs'; +import { Environment } from '@standardnotes/snjs'; const KEYCHAIN_STORAGE_KEY = 'keychain'; diff --git a/app/assets/javascripts/services/desktopManager.ts b/app/assets/javascripts/services/desktopManager.ts index fb8962565..baae0aca2 100644 --- a/app/assets/javascripts/services/desktopManager.ts +++ b/app/assets/javascripts/services/desktopManager.ts @@ -1,9 +1,9 @@ -import { SNComponent, PurePayload, ComponentMutator, AppDataField, ContentType } from 'snjs'; +import { SNComponent, PurePayload, ComponentMutator, AppDataField, ContentType } from '@standardnotes/snjs'; /* eslint-disable camelcase */ import { WebApplication } from '@/ui_models/application'; // An interface used by the Desktop app to interact with SN import { isDesktopApplication } from '@/utils'; -import { EncryptionIntent, ApplicationService, ApplicationEvent, removeFromArray } from 'snjs'; +import { EncryptionIntent, ApplicationService, ApplicationEvent, removeFromArray } from '@standardnotes/snjs'; import { Bridge } from './bridge'; type UpdateObserverCallback = (component: SNComponent) => void diff --git a/app/assets/javascripts/services/errorReporting.ts b/app/assets/javascripts/services/errorReporting.ts index 57eddf3ed..8577376c9 100644 --- a/app/assets/javascripts/services/errorReporting.ts +++ b/app/assets/javascripts/services/errorReporting.ts @@ -1,4 +1,4 @@ -import { SNLog } from 'snjs'; +import { SNLog } from '@standardnotes/snjs'; import { isDesktopApplication, isDev } from '@/utils'; import { storage, StorageKey } from './localStorage'; import Bugsnag from '@bugsnag/js'; diff --git a/app/assets/javascripts/services/keyboardManager.ts b/app/assets/javascripts/services/keyboardManager.ts index 35ab89bc4..85918c3f7 100644 --- a/app/assets/javascripts/services/keyboardManager.ts +++ b/app/assets/javascripts/services/keyboardManager.ts @@ -1,4 +1,4 @@ -import { removeFromArray } from 'snjs'; +import { removeFromArray } from '@standardnotes/snjs'; export enum KeyboardKey { Tab = "Tab", Backspace = "Backspace", diff --git a/app/assets/javascripts/services/nativeExtManager.ts b/app/assets/javascripts/services/nativeExtManager.ts index 8cec7f356..955193a3c 100644 --- a/app/assets/javascripts/services/nativeExtManager.ts +++ b/app/assets/javascripts/services/nativeExtManager.ts @@ -9,9 +9,9 @@ import { ComponentMutator, Copy, dictToArray -} from 'snjs'; -import { PayloadContent } from 'snjs/dist/@types/protocol/payloads/generator'; -import { ComponentPermission } from 'snjs/dist/@types/models/app/component'; +} from '@standardnotes/snjs'; +import { PayloadContent } from '@standardnotes/snjs'; +import { ComponentPermission } from '@standardnotes/snjs'; /** A class for handling installation of system extensions */ export class NativeExtManager extends ApplicationService { diff --git a/app/assets/javascripts/services/preferencesManager.ts b/app/assets/javascripts/services/preferencesManager.ts index 3ad9faef4..9e8ef35ae 100644 --- a/app/assets/javascripts/services/preferencesManager.ts +++ b/app/assets/javascripts/services/preferencesManager.ts @@ -8,7 +8,7 @@ import { UserPrefsMutator, FillItemContent, ApplicationEvent, -} from 'snjs'; +} from '@standardnotes/snjs'; export class PreferencesManager extends ApplicationService { private userPreferences!: SNUserPrefs; diff --git a/app/assets/javascripts/services/statusManager.ts b/app/assets/javascripts/services/statusManager.ts index fed54e1c0..1a0a7692a 100644 --- a/app/assets/javascripts/services/statusManager.ts +++ b/app/assets/javascripts/services/statusManager.ts @@ -1,4 +1,4 @@ -import { removeFromArray } from 'snjs'; +import { removeFromArray } from '@standardnotes/snjs'; type StatusCallback = (string: string) => void; diff --git a/app/assets/javascripts/services/themeManager.ts b/app/assets/javascripts/services/themeManager.ts index c3bb0797d..ef9b65eb3 100644 --- a/app/assets/javascripts/services/themeManager.ts +++ b/app/assets/javascripts/services/themeManager.ts @@ -6,7 +6,7 @@ import { SNTheme, removeFromArray, ApplicationEvent, ContentType -} from 'snjs'; +} from '@standardnotes/snjs'; const CACHED_THEMES_KEY = 'cachedThemes'; diff --git a/app/assets/javascripts/types.ts b/app/assets/javascripts/types.ts index 9042d0ee6..fd1358866 100644 --- a/app/assets/javascripts/types.ts +++ b/app/assets/javascripts/types.ts @@ -1,4 +1,4 @@ -import { SNComponent } from 'snjs'; +import { SNComponent } from '@standardnotes/snjs'; export class WebDirective implements ng.IDirective { controller?: string | ng.Injectable; controllerAs?: string; @@ -42,4 +42,4 @@ export type PanelPuppet = { export type FooterStatus = { string: string -} \ No newline at end of file +} diff --git a/app/assets/javascripts/ui_models/app_state.ts b/app/assets/javascripts/ui_models/app_state.ts index c607c894d..a935851e8 100644 --- a/app/assets/javascripts/ui_models/app_state.ts +++ b/app/assets/javascripts/ui_models/app_state.ts @@ -11,7 +11,7 @@ import { PayloadSource, DeinitSource, UuidString -} from 'snjs'; +} from '@standardnotes/snjs'; import { WebApplication } from '@/ui_models/application'; import { Editor } from '@/ui_models/editor'; import { action, makeObservable, observable } from 'mobx'; diff --git a/app/assets/javascripts/ui_models/application.ts b/app/assets/javascripts/ui_models/application.ts index ebf1323c0..59465b74f 100644 --- a/app/assets/javascripts/ui_models/application.ts +++ b/app/assets/javascripts/ui_models/application.ts @@ -1,4 +1,4 @@ -import { PermissionDialog } from 'snjs/dist/@types/services/component_manager'; +import { PermissionDialog } from '@standardnotes/snjs'; import { ComponentModalScope } from './../directives/views/componentModal'; import { AccountSwitcherScope, PermissionsModalScope } from './../types'; import { ComponentGroup } from './component_group'; @@ -10,7 +10,7 @@ import { platformFromString, Challenge, ProtectedAction, SNComponent -} from 'snjs'; +} from '@standardnotes/snjs'; import angular from 'angular'; import { getPlatformString } from '@/utils'; import { AlertService } from '@/services/alertService'; @@ -26,9 +26,9 @@ import { KeyboardManager } from '@/services'; import { AppState } from '@/ui_models/app_state'; -import { SNWebCrypto } from 'sncrypto/dist/sncrypto-web'; +import { SNWebCrypto } from '@standardnotes/sncrypto-web'; import { Bridge } from '@/services/bridge'; -import { DeinitSource } from 'snjs/dist/@types/types'; +import { DeinitSource } from '@standardnotes/snjs'; type WebServices = { appState: AppState diff --git a/app/assets/javascripts/ui_models/application_group.ts b/app/assets/javascripts/ui_models/application_group.ts index f29ed8d34..e5ea91113 100644 --- a/app/assets/javascripts/ui_models/application_group.ts +++ b/app/assets/javascripts/ui_models/application_group.ts @@ -1,6 +1,6 @@ import { WebDeviceInterface } from '@/web_device_interface'; import { WebApplication } from './application'; -import { ApplicationDescriptor, SNApplicationGroup, DeviceInterface } from 'snjs'; +import { ApplicationDescriptor, SNApplicationGroup, DeviceInterface } from '@standardnotes/snjs'; import { ArchiveManager, DesktopManager, diff --git a/app/assets/javascripts/ui_models/component_group.ts b/app/assets/javascripts/ui_models/component_group.ts index 7aa3b4c89..77e69ee5d 100644 --- a/app/assets/javascripts/ui_models/component_group.ts +++ b/app/assets/javascripts/ui_models/component_group.ts @@ -1,6 +1,6 @@ -import { SNComponent, ComponentArea, removeFromArray, addIfUnique } from 'snjs'; +import { SNComponent, ComponentArea, removeFromArray, addIfUnique } from '@standardnotes/snjs'; import { WebApplication } from './application'; -import { UuidString } from 'snjs/dist/@types/types'; +import { UuidString } from '@standardnotes/snjs'; /** Areas that only allow a single component to be active */ const SingleComponentAreas = [ @@ -99,4 +99,4 @@ export class ComponentGroup { observer(); } } -} \ No newline at end of file +} diff --git a/app/assets/javascripts/ui_models/editor.ts b/app/assets/javascripts/ui_models/editor.ts index 0a5eed08e..606d239c6 100644 --- a/app/assets/javascripts/ui_models/editor.ts +++ b/app/assets/javascripts/ui_models/editor.ts @@ -1,4 +1,4 @@ -import { SNNote, ContentType, PayloadSource, UuidString, TagMutator } from 'snjs'; +import { SNNote, ContentType, PayloadSource, UuidString, TagMutator } from '@standardnotes/snjs'; import { WebApplication } from './application'; export class Editor { diff --git a/app/assets/javascripts/ui_models/editor_group.ts b/app/assets/javascripts/ui_models/editor_group.ts index 6ded5a3e0..46e46a136 100644 --- a/app/assets/javascripts/ui_models/editor_group.ts +++ b/app/assets/javascripts/ui_models/editor_group.ts @@ -1,4 +1,4 @@ -import { removeFromArray, UuidString } from 'snjs'; +import { removeFromArray, UuidString } from '@standardnotes/snjs'; import { Editor } from './editor'; import { WebApplication } from './application'; diff --git a/app/assets/javascripts/views/abstract/pure_view_ctrl.ts b/app/assets/javascripts/views/abstract/pure_view_ctrl.ts index 7bab3ee98..c3e275a1c 100644 --- a/app/assets/javascripts/views/abstract/pure_view_ctrl.ts +++ b/app/assets/javascripts/views/abstract/pure_view_ctrl.ts @@ -1,4 +1,4 @@ -import { ApplicationEvent } from 'snjs'; +import { ApplicationEvent } from '@standardnotes/snjs'; import { WebApplication } from '@/ui_models/application'; export type CtrlState = Partial> diff --git a/app/assets/javascripts/views/account_switcher/account_switcher.ts b/app/assets/javascripts/views/account_switcher/account_switcher.ts index 2f2a64e4b..3cbb1d4ed 100644 --- a/app/assets/javascripts/views/account_switcher/account_switcher.ts +++ b/app/assets/javascripts/views/account_switcher/account_switcher.ts @@ -3,7 +3,7 @@ import { WebApplication } from '@/ui_models/application'; import template from './account-switcher.pug'; import { ApplicationDescriptor, -} from 'snjs'; +} from '@standardnotes/snjs'; import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl'; import { WebDirective } from '@/types'; diff --git a/app/assets/javascripts/views/application/application_view.ts b/app/assets/javascripts/views/application/application_view.ts index ebb346437..fe477fdd4 100644 --- a/app/assets/javascripts/views/application/application_view.ts +++ b/app/assets/javascripts/views/application/application_view.ts @@ -3,7 +3,7 @@ import { WebDirective } from '@/types'; import { getPlatformString } from '@/utils'; import template from './application-view.pug'; import { AppStateEvent } from '@/ui_models/app_state'; -import { ApplicationEvent } from 'snjs'; +import { ApplicationEvent } from '@standardnotes/snjs'; import { PANEL_NAME_NOTES, PANEL_NAME_TAGS diff --git a/app/assets/javascripts/views/challenge_modal/challenge_modal.ts b/app/assets/javascripts/views/challenge_modal/challenge_modal.ts index 98d6e77da..a605dac9f 100644 --- a/app/assets/javascripts/views/challenge_modal/challenge_modal.ts +++ b/app/assets/javascripts/views/challenge_modal/challenge_modal.ts @@ -6,7 +6,7 @@ import { Challenge, ChallengeReason, ChallengePrompt -} from 'snjs'; +} from '@standardnotes/snjs'; import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl'; import { WebDirective } from '@/types'; import { confirmDialog } from '@/services/alertService'; diff --git a/app/assets/javascripts/views/editor/editor_view.ts b/app/assets/javascripts/views/editor/editor_view.ts index 1e5bbcd91..d00e33e5c 100644 --- a/app/assets/javascripts/views/editor/editor_view.ts +++ b/app/assets/javascripts/views/editor/editor_view.ts @@ -18,7 +18,7 @@ import { ComponentAction, WebPrefKey, ComponentMutator, -} from 'snjs'; +} from '@standardnotes/snjs'; import find from 'lodash/find'; import { isDesktopApplication } from '@/utils'; import { KeyboardModifier, KeyboardKey } from '@/services/keyboardManager'; diff --git a/app/assets/javascripts/views/footer/footer_view.ts b/app/assets/javascripts/views/footer/footer_view.ts index d8ed09884..cf0f53564 100644 --- a/app/assets/javascripts/views/footer/footer_view.ts +++ b/app/assets/javascripts/views/footer/footer_view.ts @@ -11,7 +11,7 @@ import { SNTheme, ComponentArea, CollectionSort, -} from 'snjs'; +} from '@standardnotes/snjs'; import template from './footer-view.pug'; import { AppStateEvent, EventSource } from '@/ui_models/app_state'; import { diff --git a/app/assets/javascripts/views/notes/note_utils.ts b/app/assets/javascripts/views/notes/note_utils.ts index 2c7577b5f..83c860796 100644 --- a/app/assets/javascripts/views/notes/note_utils.ts +++ b/app/assets/javascripts/views/notes/note_utils.ts @@ -1,4 +1,4 @@ -import { SNNote } from 'snjs'; +import { SNNote } from '@standardnotes/snjs'; export enum NoteSortKey { CreatedAt = 'created_at', diff --git a/app/assets/javascripts/views/notes/notes_view.ts b/app/assets/javascripts/views/notes/notes_view.ts index fed7d2127..36ccba36b 100644 --- a/app/assets/javascripts/views/notes/notes_view.ts +++ b/app/assets/javascripts/views/notes/notes_view.ts @@ -9,7 +9,7 @@ import { WebPrefKey, findInArray, CollectionSort, -} from 'snjs'; +} from '@standardnotes/snjs'; import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl'; import { AppStateEvent } from '@/ui_models/app_state'; import { KeyboardModifier, KeyboardKey } from '@/services/keyboardManager'; @@ -20,7 +20,7 @@ import { NoteSortKey, notePassesFilter } from './note_utils'; -import { UuidString } from 'snjs/dist/@types/types'; +import { UuidString } from '@standardnotes/snjs'; type NotesState = { panelTitle: string diff --git a/app/assets/javascripts/views/tags/tags_view.ts b/app/assets/javascripts/views/tags/tags_view.ts index 3f17199ea..aa2f2a29e 100644 --- a/app/assets/javascripts/views/tags/tags_view.ts +++ b/app/assets/javascripts/views/tags/tags_view.ts @@ -1,4 +1,4 @@ -import { PayloadContent } from 'snjs/dist/@types/protocol/payloads/generator'; +import { PayloadContent } from '@standardnotes/snjs'; import { WebDirective, PanelPuppet } from '@/types'; import { WebApplication } from '@/ui_models/application'; import { @@ -12,7 +12,7 @@ import { WebPrefKey, UuidString, TagMutator -} from 'snjs'; +} from '@standardnotes/snjs'; import template from './tags-view.pug'; import { AppStateEvent } from '@/ui_models/app_state'; import { PANEL_NAME_TAGS } from '@/views/constants'; diff --git a/app/assets/javascripts/web_device_interface.ts b/app/assets/javascripts/web_device_interface.ts index 0df7b5b64..c49d44bdd 100644 --- a/app/assets/javascripts/web_device_interface.ts +++ b/app/assets/javascripts/web_device_interface.ts @@ -1,4 +1,4 @@ -import { DeviceInterface, getGlobalScope, SNApplication, ApplicationIdentifier } from 'snjs'; +import { DeviceInterface, getGlobalScope, SNApplication, ApplicationIdentifier } from '@standardnotes/snjs'; import { Database } from '@/database'; import { Bridge } from './services/bridge'; @@ -125,6 +125,10 @@ export class WebDeviceInterface extends DeviceInterface { return this.bridge.getKeychainValue(); } + legacy_setRawKeychainValue(value: unknown): Promise { + return this.bridge.setKeychainValue(value); + } + clearRawKeychainValue() { return this.bridge.clearKeychainValue(); } diff --git a/package-lock.json b/package-lock.json index 64a01ac23..091607997 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2559,6 +2559,28 @@ "resolved": "https://registry.npmjs.org/@bugsnag/safe-json-stringify/-/safe-json-stringify-6.0.0.tgz", "integrity": "sha512-htzFO1Zc57S8kgdRK9mLcPVTW1BY2ijfH7Dk2CeZmspTWKdKqSo1iwmqrq2WtRjFlo8aRZYgLX0wFrDXF/9DLA==" }, + "@standardnotes/sncrypto-common": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/@standardnotes/sncrypto-common/-/sncrypto-common-1.2.9.tgz", + "integrity": "sha512-xJ5IUGOZztjSgNP/6XL+Ut5+q9UgSTv6xMtKkcQC5aJxCOkJy9u6RamPLdF00WQgwibxx2tu0e43bKUjTgzMig==" + }, + "@standardnotes/sncrypto-web": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/@standardnotes/sncrypto-web/-/sncrypto-web-1.2.9.tgz", + "integrity": "sha512-OJVsoLiKoFHkEnrRImZQ6fH5H0ptk67IrVrb97Y4WEDLVABqEkX/HgdjaQwnreXWc489fqtg3BVvfgIPS7GXnQ==", + "requires": { + "@standardnotes/sncrypto-common": "^1.2.7", + "libsodium-wrappers": "^0.7.8" + } + }, + "@standardnotes/snjs": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@standardnotes/snjs/-/snjs-2.0.7.tgz", + "integrity": "sha512-S9h+ryQ225ekvCDwX4wFk7duic+j6644indtSLCiODo1SMflk8EQa7Q6Ier5lvBdUZJNxvZsN51iAgmIbT5BCQ==", + "requires": { + "@standardnotes/sncrypto-common": "^1.2.9" + } + }, "@types/angular": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/@types/angular/-/angular-1.7.0.tgz", @@ -7983,6 +8005,19 @@ "type-check": "~0.3.2" } }, + "libsodium": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.8.tgz", + "integrity": "sha512-/Qc+APf0jbeWSaeEruH0L1/tbbT+sbf884ZL0/zV/0JXaDPBzYkKbyb/wmxMHgAHzm3t6gqe7bOOXAVwfqVikQ==" + }, + "libsodium-wrappers": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.8.tgz", + "integrity": "sha512-PDhPWXBqd/SaqAFUBgH2Ux7b3VEEJgyD6BQB+VdNFJb9PbExGr/T/myc/MBoSvl8qLzfm0W0IVByOQS5L1MrCg==", + "requires": { + "libsodium": "0.7.8" + } + }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", @@ -11023,14 +11058,6 @@ "kind-of": "^3.2.0" } }, - "sncrypto": { - "version": "github:standardnotes/sncrypto#8794c88daa967eaae493cd5fdec7506d52b257ad", - "from": "github:standardnotes/sncrypto#8794c88daa967eaae493cd5fdec7506d52b257ad" - }, - "snjs": { - "version": "github:standardnotes/snjs#9e212add83688f65267c9300d7b9d2b1e5772a27", - "from": "github:standardnotes/snjs#9e212add83688f65267c9300d7b9d2b1e5772a27" - }, "sockjs": { "version": "0.3.20", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.20.tgz", diff --git a/package.json b/package.json index 1c4a1f384..5dbcfd722 100644 --- a/package.json +++ b/package.json @@ -70,8 +70,8 @@ }, "dependencies": { "@bugsnag/js": "^7.5.1", - "mobx": "^6.0.1", - "sncrypto": "github:standardnotes/sncrypto#8794c88daa967eaae493cd5fdec7506d52b257ad", - "snjs": "github:standardnotes/snjs#9e212add83688f65267c9300d7b9d2b1e5772a27" + "@standardnotes/sncrypto-web": "^1.2.9", + "@standardnotes/snjs": "^2.0.7", + "mobx": "^6.0.1" } } From a6e6044e5938c310d1bea4c10883495b22f689eb Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Thu, 19 Nov 2020 17:42:22 +0100 Subject: [PATCH 06/14] fix: async device interface keychain methods --- app/assets/javascripts/web_device_interface.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/web_device_interface.ts b/app/assets/javascripts/web_device_interface.ts index c49d44bdd..e163a93a5 100644 --- a/app/assets/javascripts/web_device_interface.ts +++ b/app/assets/javascripts/web_device_interface.ts @@ -106,7 +106,7 @@ export class WebDeviceInterface extends DeviceInterface { if (!keychain) { keychain = {}; } - this.bridge.setKeychainValue({ + return this.bridge.setKeychainValue({ ...keychain, [identifier]: value }); @@ -118,7 +118,7 @@ export class WebDeviceInterface extends DeviceInterface { return; } delete keychain[identifier]; - this.bridge.setKeychainValue(keychain); + return this.bridge.setKeychainValue(keychain); } getRawKeychainValue(): Promise { From 935ced9be63479abe8d8ad5384da5a82f361a7d4 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Thu, 19 Nov 2020 17:45:17 +0100 Subject: [PATCH 07/14] fix: correct snjs import --- app/assets/javascripts/services/bridge.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/assets/javascripts/services/bridge.ts b/app/assets/javascripts/services/bridge.ts index 11d65d8ca..3466cf1fd 100644 --- a/app/assets/javascripts/services/bridge.ts +++ b/app/assets/javascripts/services/bridge.ts @@ -2,8 +2,7 @@ * This file will be imported by desktop, so we make sure imports are carrying * as little extra code as possible with them. */ -import { Environment } from '@standardnotes/snjs/dist/@types/platforms'; -export { Environment }; +import { Environment } from '@standardnotes/snjs'; /** Platform-specific (i-e Electron/browser) behavior is handled by a Bridge object. */ export interface Bridge { From cebcbab10ebd8cc65b7b9069a6add77bd72f3808 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Fri, 20 Nov 2020 11:47:52 +0100 Subject: [PATCH 08/14] fix: make beta warning less alarming --- app/assets/javascripts/views/footer/footer-view.pug | 6 ++---- app/assets/javascripts/views/footer/footer_view.ts | 12 +++++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/views/footer/footer-view.pug b/app/assets/javascripts/views/footer/footer-view.pug index bb3dabf0a..2eb196935 100644 --- a/app/assets/javascripts/views/footer/footer-view.pug +++ b/app/assets/javascripts/views/footer/footer-view.pug @@ -37,10 +37,8 @@ ) .sk-app-bar-item.border(ng-if="ctrl.state.showBetaWarning") .sk-app-bar-item(ng-if="ctrl.state.showBetaWarning") - a.no-decoration.sk-label.title.uppercase( - href='https://github.com/standardnotes/forum/issues/1114', - rel='noopener', - target='_blank' + a.no-decoration.sk-label.title( + ng-click="ctrl.displayBetaDialog()" ) You are using a beta version of the app .center .sk-app-bar-item(ng-if='ctrl.arbitraryStatusMessage') diff --git a/app/assets/javascripts/views/footer/footer_view.ts b/app/assets/javascripts/views/footer/footer_view.ts index cf0f53564..0797ae601 100644 --- a/app/assets/javascripts/views/footer/footer_view.ts +++ b/app/assets/javascripts/views/footer/footer_view.ts @@ -23,7 +23,7 @@ import { STRING_UPGRADE_ACCOUNT_CONFIRM_BUTTON, } from '@/strings'; import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl'; -import { confirmDialog } from '@/services/alertService'; +import { alertDialog, confirmDialog } from '@/services/alertService'; import { autorun, IReactionDisposer } from 'mobx'; /** @@ -568,6 +568,16 @@ class FooterViewCtrl extends PureViewCtrl<{}, { } } + displayBetaDialog() { + alertDialog({ + title: 'You are using a beta version of the app', + text: + 'If you wish to go back to a stable version, make sure to sign out ' + + 'before installing it.
You can silence this warning in the ' + + 'Account menu.' + }); + } + clickOutsideAccountMenu() { if (this.application && this.application.authenticationInProgress()) { return; From 93876a11eb89366ff8ac6a717488c2c6b5b7bfb1 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Fri, 20 Nov 2020 12:12:58 +0100 Subject: [PATCH 09/14] chore(version): 3.5.9-beta01 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 091607997..ba4d92925 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "standard-notes-web", - "version": "3.5.8", + "version": "3.5.9-beta01", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5dbcfd722..d0a5f67d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "standard-notes-web", - "version": "3.5.8", + "version": "3.5.9-beta01", "license": "AGPL-3.0-or-later", "repository": { "type": "git", From b0ccecbd9608d985fcd52e900db25c344e8728a1 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Fri, 20 Nov 2020 12:14:39 +0100 Subject: [PATCH 10/14] fix: show the beta warning on web --- app/assets/javascripts/app.ts | 15 --------------- app/assets/javascripts/ui_models/app_state.ts | 6 ++++-- .../javascripts/ui_models/application_group.ts | 3 ++- .../javascripts/views/footer/footer_view.ts | 2 +- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/app/assets/javascripts/app.ts b/app/assets/javascripts/app.ts index 66e9ca7de..63172c94e 100644 --- a/app/assets/javascripts/app.ts +++ b/app/assets/javascripts/app.ts @@ -63,8 +63,6 @@ const startApplication: StartApplication = async function startApplication( defaultSyncServerHost: string, bridge: Bridge ) { - notifyBetaPeriodEnd(); - SNLog.onLog = console.log; startErrorReporting(); @@ -150,19 +148,6 @@ const startApplication: StartApplication = async function startApplication( }); }; -function notifyBetaPeriodEnd() { - if (window.location.hostname === 'app-beta.standardnotes.org') { - alertDialog({ - title: 'Beta period has ended', - text: - 'Thank you for trying this beta version. Please sign out, then ' + - 'sign in to ' + - 'app.standardnotes.org ' + - 'to continue using Standard Notes.', - }); - } -} - if (__WEB__) { startApplication((window as any)._default_sync_server, new BrowserBridge(__VERSION__)); } else { diff --git a/app/assets/javascripts/ui_models/app_state.ts b/app/assets/javascripts/ui_models/app_state.ts index a935851e8..732ef0fd5 100644 --- a/app/assets/javascripts/ui_models/app_state.ts +++ b/app/assets/javascripts/ui_models/app_state.ts @@ -15,6 +15,7 @@ import { import { WebApplication } from '@/ui_models/application'; import { Editor } from '@/ui_models/editor'; import { action, makeObservable, observable } from 'mobx'; +import { Bridge } from '@/services/bridge'; export enum AppStateEvent { TagChanged = 1, @@ -77,7 +78,8 @@ export class AppState { constructor( $rootScope: ng.IRootScopeService, $timeout: ng.ITimeoutService, - application: WebApplication + application: WebApplication, + private bridge: Bridge, ) { this.$timeout = $timeout; this.$rootScope = $rootScope; @@ -133,7 +135,7 @@ export class AppState { } private determineBetaWarningValue() { - if ((window as any).electronAppVersion?.includes('-beta')) { + if (this.bridge.appVersion.includes('-beta')) { switch (localStorage.getItem(SHOW_BETA_WARNING_KEY)) { case 'true': default: diff --git a/app/assets/javascripts/ui_models/application_group.ts b/app/assets/javascripts/ui_models/application_group.ts index e5ea91113..abe36b84e 100644 --- a/app/assets/javascripts/ui_models/application_group.ts +++ b/app/assets/javascripts/ui_models/application_group.ts @@ -63,7 +63,8 @@ export class ApplicationGroup extends SNApplicationGroup { const appState = new AppState( this.$rootScope, this.$timeout, - application + application, + this.bridge, ); const archiveService = new ArchiveManager( application diff --git a/app/assets/javascripts/views/footer/footer_view.ts b/app/assets/javascripts/views/footer/footer_view.ts index 0797ae601..b6491d070 100644 --- a/app/assets/javascripts/views/footer/footer_view.ts +++ b/app/assets/javascripts/views/footer/footer_view.ts @@ -573,7 +573,7 @@ class FooterViewCtrl extends PureViewCtrl<{}, { title: 'You are using a beta version of the app', text: 'If you wish to go back to a stable version, make sure to sign out ' + - 'before installing it.
You can silence this warning in the ' + + 'of this beta app first.
You can silence this warning from the ' + 'Account menu.' }); } From 8434f598ca80259a32c28d10e399b271ff6bb7f5 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Mon, 23 Nov 2020 17:06:23 +0100 Subject: [PATCH 11/14] fix: show syncing message consistently --- .../directives/views/accountMenu.ts | 16 ++++-- app/assets/javascripts/ui_models/app_state.ts | 53 ++++++++++++++++--- app/assets/stylesheets/_stylekit-sub.scss | 6 +++ .../templates/directives/account-menu.pug | 25 +++++---- 4 files changed, 78 insertions(+), 22 deletions(-) diff --git a/app/assets/javascripts/directives/views/accountMenu.ts b/app/assets/javascripts/directives/views/accountMenu.ts index 85789c0e5..c5c550582 100644 --- a/app/assets/javascripts/directives/views/accountMenu.ts +++ b/app/assets/javascripts/directives/views/accountMenu.ts @@ -22,7 +22,6 @@ import { STRING_CONFIRM_APP_QUIT_DURING_PASSCODE_REMOVAL, STRING_UNSUPPORTED_BACKUP_FILE_VERSION } from '@/strings'; -import { SyncOpStatus } from '@standardnotes/snjs'; import { PasswordWizardType } from '@/types'; import { BackupFile } from '@standardnotes/snjs'; import { confirmDialog, alertDialog } from '@/services/alertService'; @@ -67,15 +66,18 @@ type AccountMenuState = { selectedAutoLockInterval: any; showBetaWarning: boolean; errorReportingEnabled: boolean; + syncInProgress: boolean; + syncError: string; + syncPercentage: string; } class AccountMenuCtrl extends PureViewCtrl<{}, AccountMenuState> { public appVersion: string /** @template */ - syncStatus?: SyncOpStatus private closeFunction?: () => void private removeBetaWarningListener?: IReactionDisposer + private removeSyncObserver?: IReactionDisposer /* @ngInject */ constructor( @@ -130,7 +132,14 @@ class AccountMenuCtrl extends PureViewCtrl<{}, AccountMenuState> { $onInit() { super.$onInit(); - this.syncStatus = this.application!.getSyncStatus(); + const sync = this.appState.sync; + this.removeSyncObserver = autorun(() => { + this.setState({ + syncInProgress: sync.inProgress, + syncError: sync.errorMessage, + syncPercentage: sync.humanReadablePercentage, + }); + }) this.removeBetaWarningListener = autorun(() => { this.setState({ showBetaWarning: this.appState.showBetaWarning @@ -139,6 +148,7 @@ class AccountMenuCtrl extends PureViewCtrl<{}, AccountMenuState> { } deinit() { + this.removeSyncObserver?.(); this.removeBetaWarningListener?.(); super.deinit(); } diff --git a/app/assets/javascripts/ui_models/app_state.ts b/app/assets/javascripts/ui_models/app_state.ts index 732ef0fd5..9a08616e7 100644 --- a/app/assets/javascripts/ui_models/app_state.ts +++ b/app/assets/javascripts/ui_models/app_state.ts @@ -10,7 +10,8 @@ import { SNSmartTag, PayloadSource, DeinitSource, - UuidString + UuidString, + SyncOpStatus } from '@standardnotes/snjs'; import { WebApplication } from '@/ui_models/application'; import { Editor } from '@/ui_models/editor'; @@ -58,6 +59,39 @@ class ActionsMenuState { } } +export class SyncState { + inProgress = false; + errorMessage?: string; + humanReadablePercentage?: string; + + constructor() { + makeObservable(this, { + inProgress: observable, + errorMessage: observable, + humanReadablePercentage: observable, + update: action, + }); + } + + update(status: SyncOpStatus) { + this.errorMessage = status.error?.message; + this.inProgress = status.syncInProgress; + const stats = status.getStats(); + const completionPercentage = stats.uploadCompletionCount === 0 + ? 0 + : stats.uploadCompletionCount / stats.uploadTotalCount; + + if (completionPercentage === 0) { + this.humanReadablePercentage = undefined; + } else { + this.humanReadablePercentage = completionPercentage.toLocaleString( + undefined, + { style: 'percent' } + ); + } + } +} + export class AppState { $rootScope: ng.IRootScopeService; $timeout: ng.ITimeoutService; @@ -72,7 +106,8 @@ export class AppState { userPreferences?: SNUserPrefs; multiEditorEnabled = false; showBetaWarning = false; - actionsMenu = new ActionsMenuState(); + readonly actionsMenu = new ActionsMenuState(); + readonly sync = new SyncState(); /* @ngInject */ constructor( @@ -263,10 +298,16 @@ export class AppState { addAppEventObserver() { this.unsubApp = this.application.addEventObserver(async (eventName) => { - if (eventName === ApplicationEvent.Started) { - this.locked = true; - } else if (eventName === ApplicationEvent.Launched) { - this.locked = false; + switch (eventName) { + case ApplicationEvent.Started: + this.locked = true; + break; + case ApplicationEvent.Launched: + this.locked = false; + break; + case ApplicationEvent.SyncStatusChanged: + this.sync.update(this.application.getSyncStatus()); + break; } }); } diff --git a/app/assets/stylesheets/_stylekit-sub.scss b/app/assets/stylesheets/_stylekit-sub.scss index 33003133c..201a604d2 100644 --- a/app/assets/stylesheets/_stylekit-sub.scss +++ b/app/assets/stylesheets/_stylekit-sub.scss @@ -34,6 +34,12 @@ margin-left: 0.3rem; } +.sk-horizontal-group { + display: flex; + flex-direction: row; + align-items: center; +} + .sk-panel-section { &:last-child { padding-bottom: 1rem; diff --git a/app/assets/templates/directives/account-menu.pug b/app/assets/templates/directives/account-menu.pug index 799fa2c39..c521a899c 100644 --- a/app/assets/templates/directives/account-menu.pug +++ b/app/assets/templates/directives/account-menu.pug @@ -136,11 +136,11 @@ !self.state.formData.showRegister` ) .sk-panel-section(ng-if='self.state.user') - .sk-notification.danger(ng-if='self.syncStatus.error') + .sk-notification.danger(ng-if='self.state.syncError') .sk-notification-title Sync Unreachable .sk-notification-text | Hmm...we can't seem to sync your account. - | The reason: {{self.syncStatus.error.message}} + | The reason: {{self.state.syncError}} a.sk-a.info-contrast.sk-bold.sk-panel-row( href='https://standardnotes.org/help', rel='noopener', @@ -150,17 +150,16 @@ .sk-panel-column .sk-h1.sk-bold.wrap {{self.state.user.email}} .sk-subtitle.subtle.normal {{self.state.server}} - .sk-horizontal-group( - delay='1000', - delay-hide='true', - show='self.syncStatus.syncOpInProgress || self.syncStatus.needsMoreSync' - ) - .sk-spinner.small.info - .sk-sublabel - | {{"Syncing" + (self.syncStatus.total > 0 ? ":" : "")}} - span( - ng-if='self.syncStatus.total > 0' - ) {{self.syncStatus.current}}/{{self.syncStatus.total}} + .sk-horizontal-group( + delay='1000', + delay-hide='true', + show='self.state.syncInProgress' + ) + .sk-spinner.small.info + .sk-sublabel + | Syncing + span(ng-if='self.state.syncPercentage') + | ({{self.state.syncPercentage}}) .sk-panel-row a.sk-a.info.sk-panel-row.condensed( ng-click="self.openPasswordWizard()" From b7daaef2f5e3edc58c537b8e9a0778338418f6d8 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Mon, 23 Nov 2020 17:06:38 +0100 Subject: [PATCH 12/14] fix: favicon for PWA --- public/favicon/site.webmanifest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/favicon/site.webmanifest b/public/favicon/site.webmanifest index 084f60886..1edcfeffe 100644 --- a/public/favicon/site.webmanifest +++ b/public/favicon/site.webmanifest @@ -3,12 +3,12 @@ "short_name": "", "icons": [ { - "src": "favicon/android-chrome-192x192.png", + "src": "android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { - "src": "favicon/android-chrome-512x512.png", + "src": "android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } From 416ae5cfc8435a92204b5a8ac3cb1600ca8ee3ef Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Mon, 23 Nov 2020 17:13:50 +0100 Subject: [PATCH 13/14] chore(deps): upgrade snjs --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba4d92925..4c145d3a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2574,9 +2574,9 @@ } }, "@standardnotes/snjs": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@standardnotes/snjs/-/snjs-2.0.7.tgz", - "integrity": "sha512-S9h+ryQ225ekvCDwX4wFk7duic+j6644indtSLCiODo1SMflk8EQa7Q6Ier5lvBdUZJNxvZsN51iAgmIbT5BCQ==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@standardnotes/snjs/-/snjs-2.0.11.tgz", + "integrity": "sha512-5Ymdd8mez2DNFu4fRmbpZ4BXeFmFhiIFlwZURp8ZM+zqJFRwCo5SXu813DghAU3x51+cPwBMR/3kwuh9GouIpQ==", "requires": { "@standardnotes/sncrypto-common": "^1.2.9" } diff --git a/package.json b/package.json index d0a5f67d1..774dfb923 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "dependencies": { "@bugsnag/js": "^7.5.1", "@standardnotes/sncrypto-web": "^1.2.9", - "@standardnotes/snjs": "^2.0.7", + "@standardnotes/snjs": "^2.0.11", "mobx": "^6.0.1" } } From c7ff4cc3c624b4472a44285792e373610b0ed662 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Mon, 23 Nov 2020 17:13:59 +0100 Subject: [PATCH 14/14] chore(version): 3.5.9 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4c145d3a2..aeb48aefc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "standard-notes-web", - "version": "3.5.9-beta01", + "version": "3.5.9", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 774dfb923..1faef881f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "standard-notes-web", - "version": "3.5.9-beta01", + "version": "3.5.9", "license": "AGPL-3.0-or-later", "repository": { "type": "git",