mirror of
https://github.com/standardnotes/app
synced 2026-09-19 09:13:53 -04:00
Compare commits
89
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1729bc4292 | ||
|
|
abe2b17cb4 | ||
|
|
d51de34daa | ||
|
|
ec0f0a2b18 | ||
|
|
a417e5ba8d | ||
|
|
02eb969e07 | ||
|
|
767d354780 | ||
|
|
052e7d2f90 | ||
|
|
e3ec8503a5 | ||
|
|
cc2762a29d | ||
|
|
96e8dfdd31 | ||
|
|
60cbd7aed2 | ||
|
|
2b0c9b188c | ||
|
|
4181a4cca0 | ||
|
|
d51ab36bbf | ||
|
|
81774d74c6 | ||
|
|
148aee441b | ||
|
|
db3069eab3 | ||
|
|
c045eb1459 | ||
|
|
e19184c2da | ||
|
|
7f6c53dfcb | ||
|
|
1c9ad49aea | ||
|
|
6fc1bb5e84 | ||
|
|
ddd7c8f889 | ||
|
|
03eb1cc6b4 | ||
|
|
ac91621271 | ||
|
|
c01fa7bb99 | ||
|
|
6db6079790 | ||
|
|
2026d8b936 | ||
|
|
645602b9d3 | ||
|
|
3c91b0cb17 | ||
|
|
8145cdb8ac | ||
|
|
d50c5fefcb | ||
|
|
745e850a5c | ||
|
|
cadf03f0ef | ||
|
|
931b674e4e | ||
|
|
a6efc5336b | ||
|
|
21611d9b45 | ||
|
|
9b91875d3d | ||
|
|
dcc8cfbe45 | ||
|
|
ff1d71c2f8 | ||
|
|
81b5123294 | ||
|
|
7a89a3cd9c | ||
|
|
08fd234e60 | ||
|
|
0fac2dd939 | ||
|
|
212e7843ec | ||
|
|
6bbf0c02bd | ||
|
|
2485bed350 | ||
|
|
2e517c985d | ||
|
|
75303b5eb8 | ||
|
|
b5997aa70e | ||
|
|
07e26915b0 | ||
|
|
4661c6cb77 | ||
|
|
0d1e0d730d | ||
|
|
7ef0db545c | ||
|
|
9f6316976c | ||
|
|
0a01ddb430 | ||
|
|
c40b17bd4c | ||
|
|
858fa6835c | ||
|
|
96babc454d | ||
|
|
8579ff39b1 | ||
|
|
99163d90d2 | ||
|
|
8a709158d6 | ||
|
|
25cf4cfd22 | ||
|
|
9f8e937766 | ||
|
|
9d5a57521e | ||
|
|
e36a1ffea0 | ||
|
|
b05c793fe9 | ||
|
|
c45417623c | ||
|
|
6704c6dd4e | ||
|
|
87cd31ae5d | ||
|
|
8755001f7e | ||
|
|
7c2e832065 | ||
|
|
096d82f7af | ||
|
|
8c8f045b9a | ||
|
|
b3140f1623 | ||
|
|
c5e104f90b | ||
|
|
09b8f00eed | ||
|
|
c39c72da7a | ||
|
|
7f28876047 | ||
|
|
24ff87c306 | ||
|
|
e8b758214d | ||
|
|
e58c563795 | ||
|
|
328bbb797d | ||
|
|
dab4f678f0 | ||
|
|
c847cc1d16 | ||
|
|
f49ba6bd4d | ||
|
|
0309912f98 | ||
|
|
0c253dc46a |
@@ -3,7 +3,7 @@ name: Desktop Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*standardnotes/*desktop*'
|
||||
- '*standardnotes/*web*'
|
||||
- '!*standardnotes/*inner-desktop*'
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
@@ -27,14 +27,14 @@ jobs:
|
||||
cache: 'yarn'
|
||||
- run: yarn install --immutable
|
||||
- run: yarn build:desktop
|
||||
- run: echo APP_VERSION=$(node -p "require('./package.json').version") >> $GITHUB_ENV
|
||||
- run: echo APP_VERSION=$(node -p "require('./../web/package.json').version") >> $GITHUB_ENV
|
||||
|
||||
- name: Compile Mac
|
||||
run: yarn run webpack --config desktop.webpack.prod.js
|
||||
- name: MacX64
|
||||
run: |
|
||||
yarn run electron-builder --mac --x64 --publish=never --c.extraMetadata.version=${{ env.APP_VERSION }}
|
||||
node scripts/fixMacZip.js
|
||||
node scripts/fixMacZip.js ${{ env.APP_VERSION }}
|
||||
- name: MacArm64
|
||||
run: yarn run electron-builder --mac --arm64 --publish=never --c.extraMetadata.version=${{ env.APP_VERSION }}
|
||||
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
- run: yarn install --immutable
|
||||
- run: yarn build:desktop
|
||||
|
||||
- run: echo APP_VERSION=$(node -p "require('./package.json').version") >> $GITHUB_ENV
|
||||
- run: echo APP_VERSION=$(node -p "require('./../web/package.json').version") >> $GITHUB_ENV
|
||||
|
||||
- name: Compile for AppImage
|
||||
run: yarn run webpack --config desktop.webpack.prod.js
|
||||
@@ -139,7 +139,7 @@ jobs:
|
||||
- run: yarn install --immutable
|
||||
- run: yarn build:desktop
|
||||
- run: yarn run webpack --config desktop.webpack.prod.js
|
||||
- run: echo APP_VERSION=$(node -p "require('./package.json').version") >> $GITHUB_ENV
|
||||
- run: echo APP_VERSION=$(node -p "require('./../web/package.json').version") >> $GITHUB_ENV
|
||||
- run: yarn run electron-builder --windows --x64 --ia32 --publish=never --c.extraMetadata.version=${{ env.APP_VERSION }}
|
||||
|
||||
- name: Upload
|
||||
@@ -160,6 +160,7 @@ jobs:
|
||||
run:
|
||||
working-directory: packages/desktop
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
@@ -167,6 +168,8 @@ jobs:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'yarn'
|
||||
|
||||
- run: echo APP_VERSION=$(node -p "require('./../web/package.json').version") >> $GITHUB_ENV
|
||||
|
||||
- run: yarn install --immutable
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
@@ -194,8 +197,8 @@ jobs:
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
tag_name: "@standardnotes/desktop@${{ steps.package-version.outputs.current-version}}"
|
||||
name: "Desktop ${{ steps.package-version.outputs.current-version }}"
|
||||
tag_name: "@standardnotes/desktop@${{ env.APP_VERSION }}"
|
||||
name: "Desktop ${{ env.APP_VERSION }}"
|
||||
body: ${{ steps.release-notes.outputs.result }}
|
||||
prerelease: true
|
||||
draft: false
|
||||
@@ -214,4 +217,4 @@ jobs:
|
||||
sudo snap install snapcraft --classic
|
||||
echo "${{ secrets.SNAPCRAFT_LOGIN_FILE }}" >> snapauth.txt
|
||||
snapcraft login --with=snapauth.txt
|
||||
snapcraft upload dist/standard-notes-${{ steps.package-version.outputs.current-version}}-linux-amd64.snap --release stable,candidate,beta,edge
|
||||
snapcraft upload dist/standard-notes-${{ env.APP_VERSION }}-linux-amd64.snap --release stable,candidate,beta,edge
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
- run: yarn install --immutable
|
||||
- run: yarn build:desktop
|
||||
- run: yarn run webpack --config desktop.webpack.prod.js
|
||||
- run: echo APP_VERSION=$(node -p "require('./package.json').version") >> $GITHUB_ENV
|
||||
- run: echo APP_VERSION=$(node -p "require('./../web/package.json').version") >> $GITHUB_ENV
|
||||
- run: yarn run electron-builder --windows --x64 --ia32 --publish=never --c.extraMetadata.version=${{ env.APP_VERSION }}
|
||||
|
||||
- name: Upload
|
||||
|
||||
@@ -3,7 +3,7 @@ name: Mobile Release Production
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*standardnotes/mobile*'
|
||||
- '*standardnotes/web*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Export version from package.json
|
||||
run:
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | cut -d "-" -f 1)" >> $GITHUB_ENV
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' ../web/package.json | cut -d '"' -f 4 | cut -d "-" -f 1)" >> $GITHUB_ENV
|
||||
- name: Setup react-native kernel and increase watchers
|
||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
- name: Decode Production Android keystore
|
||||
@@ -82,7 +82,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Export version from package.json
|
||||
run:
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | cut -d "-" -f 1)" >> $GITHUB_ENV
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' ../web/package.json | cut -d '"' -f 4 | cut -d "-" -f 1)" >> $GITHUB_ENV
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable && yarn install:pods
|
||||
- run: yarn build:mobile
|
||||
|
||||
@@ -3,7 +3,7 @@ name: Mobile TestFlight
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*standardnotes/mobile*'
|
||||
- '*standardnotes/web*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Export version from package.json
|
||||
run: |
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | cut -d "-" -f 1)" >> $GITHUB_ENV
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' ../web/package.json | cut -d '"' -f 4 | cut -d "-" -f 1)" >> $GITHUB_ENV
|
||||
- name: Setup react-native kernel and increase watchers
|
||||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
- name: Decode Dev Android keystore
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Export version from package.json
|
||||
run: |
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | cut -d "-" -f 1)" >> $GITHUB_ENV
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' ../web/package.json | cut -d '"' -f 4 | cut -d "-" -f 1)" >> $GITHUB_ENV
|
||||
- name: Ruby Setup for Fastlane
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Install dependencies
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2
-1
@@ -31,7 +31,8 @@
|
||||
"reset": "find . -type dir -name node_modules | xargs rm -rf && rm -rf yarn.lock && yarn install",
|
||||
"release:prod": "lerna version --conventional-commits --yes -m \"chore(release): publish\"",
|
||||
"publish:prod": "lerna publish from-git --yes --no-verify-access --loglevel verbose",
|
||||
"version": "yarn install --no-immutable && git add yarn.lock",
|
||||
"version": "yarn install --no-immutable && git add yarn.lock && yarn changelog:json",
|
||||
"changelog:json": "node scripts/ChangelogToJson.js && git add .",
|
||||
"postversion": "./scripts/push-tags-one-by-one.sh",
|
||||
"workspace:list": " yarn lerna list -all",
|
||||
"upgrade:snjs": "ncu -u '@standardnotes/*' && yarn workspaces foreach --verbose run upgrade:snjs"
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.20.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api
|
||||
|
||||
## [1.20.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api
|
||||
|
||||
## [1.20.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api
|
||||
|
||||
## [1.20.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api
|
||||
|
||||
## [1.20.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api
|
||||
|
||||
## [1.20.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api
|
||||
|
||||
## [1.20.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/api
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/api",
|
||||
"version": "1.20.7",
|
||||
"version": "1.20.13",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Invitation } from '@standardnotes/models'
|
||||
import { type Invitation } from '@standardnotes/models'
|
||||
|
||||
import { SubscriptionInviteAcceptResponse } from '../../Response/Subscription/SubscriptionInviteAcceptResponse'
|
||||
import { SubscriptionInviteCancelResponse } from '../../Response/Subscription/SubscriptionInviteCancelResponse'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ProtocolVersion, UserRequestType } from '@standardnotes/common'
|
||||
import { RootKeyParamsInterface } from '@standardnotes/models'
|
||||
import { type RootKeyParamsInterface } from '@standardnotes/models'
|
||||
import { UserDeletionResponse } from '../../Response/User/UserDeletionResponse'
|
||||
|
||||
import { UserRegistrationResponse } from '../../Response/User/UserRegistrationResponse'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RootKeyParamsInterface } from '@standardnotes/models'
|
||||
import { type RootKeyParamsInterface } from '@standardnotes/models'
|
||||
import { UserRequestType } from '@standardnotes/common'
|
||||
|
||||
import { ErrorMessage } from '../../Error/ErrorMessage'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { UserRequestType, Uuid } from '@standardnotes/common'
|
||||
import { RootKeyParamsInterface } from '@standardnotes/models'
|
||||
import { type RootKeyParamsInterface } from '@standardnotes/models'
|
||||
|
||||
import { UserDeletionResponse } from '../../Response/User/UserDeletionResponse'
|
||||
import { UserRegistrationResponse } from '../../Response/User/UserRegistrationResponse'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Invitation } from '@standardnotes/models'
|
||||
import { type Invitation } from '@standardnotes/models'
|
||||
|
||||
export type SubscriptionInviteListResponseBody = {
|
||||
invitations: Array<Invitation>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Invitation } from '@standardnotes/models'
|
||||
import { type Invitation } from '@standardnotes/models'
|
||||
|
||||
import { ApiVersion } from '../../Api'
|
||||
import { HttpServiceInterface } from '../../Http'
|
||||
|
||||
@@ -3,6 +3,63 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.9.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-30)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/blocks-editor
|
||||
|
||||
## [1.9.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-29)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Make super note styling consistent with plaintext notes ([#2068](https://github.com/standardnotes/app/issues/2068)) ([a417e5b](https://github.com/standardnotes/app/commit/a417e5ba8d3fc224b1527d0a9cfb0f25d197f9de))
|
||||
|
||||
## [1.9.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Only autofocus super notes when creating new note ([#2063](https://github.com/standardnotes/app/issues/2063)) ([96e8dfd](https://github.com/standardnotes/app/commit/96e8dfdd310fad88a360c4ac984b376b51a618d1))
|
||||
|
||||
## [1.9.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/blocks-editor
|
||||
|
||||
# [1.9.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
### Features
|
||||
|
||||
* dim checked list items in super editor ([#2046](https://github.com/standardnotes/app/issues/2046)) ([8a70915](https://github.com/standardnotes/app/commit/8a709158d6839b9eb1092923a14b0dcadb0da25b))
|
||||
* option to show markdown preview for super notes (skip e2e) ([#2048](https://github.com/standardnotes/app/issues/2048)) ([8579ff3](https://github.com/standardnotes/app/commit/8579ff39b1f81dbbcf22b4031ede183ab4287262))
|
||||
|
||||
# [1.8.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
### Features
|
||||
|
||||
* use line height preference in super editor (skip e2e) ([#2045](https://github.com/standardnotes/app/issues/2045)) ([87cd31a](https://github.com/standardnotes/app/commit/87cd31ae5d630a528ce6d4895b2c144bf51808f0))
|
||||
|
||||
# [1.7.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-19)
|
||||
|
||||
### Features
|
||||
|
||||
* ability to drag super list items; secure password generation blocks ([#2039](https://github.com/standardnotes/app/issues/2039)) ([c39c72d](https://github.com/standardnotes/app/commit/c39c72da7a4fb85f4da9aa4e6f8e9f7ba4486a94))
|
||||
|
||||
## [1.6.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-19)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* improved error reporting in super; improved draggable block icon padding ([24ff87c](https://github.com/standardnotes/app/commit/24ff87c30625432393ffedeada14478ebb625292))
|
||||
|
||||
## [1.6.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* issue where converting empty plain note to super would result in error ([e58c563](https://github.com/standardnotes/app/commit/e58c5637951f928efcd8c8427f06d0b6c69b5e55))
|
||||
|
||||
# [1.6.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
### Features
|
||||
|
||||
* **web:** enable block drag'n'drop in super editor ([#2029](https://github.com/standardnotes/app/issues/2029)) ([dab4f67](https://github.com/standardnotes/app/commit/dab4f678f04aee2c7dfbe7f416e7fc34e8d870cf))
|
||||
|
||||
## [1.5.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-17)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/blocks-editor
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/blocks-editor",
|
||||
"version": "1.5.3",
|
||||
"version": "1.9.4",
|
||||
"private": true,
|
||||
"main": "./src/index.ts",
|
||||
"scripts": {
|
||||
|
||||
@@ -2,17 +2,10 @@ import {FunctionComponent, useCallback, useState} from 'react';
|
||||
import {RichTextPlugin} from '@lexical/react/LexicalRichTextPlugin';
|
||||
import {ContentEditable} from '@lexical/react/LexicalContentEditable';
|
||||
import {OnChangePlugin} from '@lexical/react/LexicalOnChangePlugin';
|
||||
import {AutoFocusPlugin} from '@lexical/react/LexicalAutoFocusPlugin';
|
||||
import {CheckListPlugin} from '@lexical/react/LexicalCheckListPlugin';
|
||||
import {ClearEditorPlugin} from '@lexical/react/LexicalClearEditorPlugin';
|
||||
import {MarkdownShortcutPlugin} from '@lexical/react/LexicalMarkdownShortcutPlugin';
|
||||
import {TablePlugin} from '@lexical/react/LexicalTablePlugin';
|
||||
import {
|
||||
CHECK_LIST,
|
||||
ELEMENT_TRANSFORMERS,
|
||||
TEXT_FORMAT_TRANSFORMERS,
|
||||
TEXT_MATCH_TRANSFORMERS,
|
||||
} from '@lexical/markdown';
|
||||
import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary';
|
||||
import {HashtagPlugin} from '@lexical/react/LexicalHashtagPlugin';
|
||||
import {HistoryPlugin} from '@lexical/react/LexicalHistoryPlugin';
|
||||
@@ -30,16 +23,17 @@ import FloatingTextFormatToolbarPlugin from '../Lexical/Plugins/FloatingTextForm
|
||||
import FloatingLinkEditorPlugin from '../Lexical/Plugins/FloatingLinkEditorPlugin';
|
||||
import {truncateString} from './Utils';
|
||||
import {SuperEditorContentId} from './Constants';
|
||||
|
||||
const BlockDragEnabled = false;
|
||||
import {classNames} from '@standardnotes/utils';
|
||||
import {MarkdownTransformers} from './MarkdownTransformers';
|
||||
|
||||
type BlocksEditorProps = {
|
||||
onChange: (value: string, preview: string) => void;
|
||||
onChange?: (value: string, preview: string) => void;
|
||||
className?: string;
|
||||
children?: React.ReactNode;
|
||||
previewLength: number;
|
||||
previewLength?: number;
|
||||
spellcheck?: boolean;
|
||||
ignoreFirstChange?: boolean;
|
||||
readonly?: boolean;
|
||||
};
|
||||
|
||||
export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({
|
||||
@@ -49,6 +43,7 @@ export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({
|
||||
previewLength,
|
||||
spellcheck,
|
||||
ignoreFirstChange = false,
|
||||
readonly,
|
||||
}) => {
|
||||
const [didIgnoreFirstChange, setDidIgnoreFirstChange] = useState(false);
|
||||
const handleChange = useCallback(
|
||||
@@ -67,10 +62,19 @@ export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({
|
||||
previewText += '\n';
|
||||
}
|
||||
});
|
||||
previewText = truncateString(previewText, previewLength);
|
||||
|
||||
const stringifiedEditorState = JSON.stringify(editorState.toJSON());
|
||||
onChange(stringifiedEditorState, previewText);
|
||||
if (previewLength) {
|
||||
previewText = truncateString(previewText, previewLength);
|
||||
}
|
||||
|
||||
try {
|
||||
const stringifiedEditorState = JSON.stringify(editorState.toJSON());
|
||||
onChange?.(stringifiedEditorState, previewText);
|
||||
} catch (error) {
|
||||
window.alert(
|
||||
`An invalid change was made inside the Super editor. Your change was not saved. Please report this error to the team: ${error}`,
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
[onChange, didIgnoreFirstChange],
|
||||
@@ -94,7 +98,10 @@ export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({
|
||||
<div className="editor" ref={onRef}>
|
||||
<ContentEditable
|
||||
id={SuperEditorContentId}
|
||||
className={`ContentEditable__root ${className}`}
|
||||
className={classNames(
|
||||
'ContentEditable__root overflow-y-auto',
|
||||
className,
|
||||
)}
|
||||
spellCheck={spellcheck}
|
||||
/>
|
||||
</div>
|
||||
@@ -104,19 +111,11 @@ export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({
|
||||
ErrorBoundary={LexicalErrorBoundary}
|
||||
/>
|
||||
<ListPlugin />
|
||||
<MarkdownShortcutPlugin
|
||||
transformers={[
|
||||
CHECK_LIST,
|
||||
...ELEMENT_TRANSFORMERS,
|
||||
...TEXT_FORMAT_TRANSFORMERS,
|
||||
...TEXT_MATCH_TRANSFORMERS,
|
||||
]}
|
||||
/>
|
||||
<MarkdownShortcutPlugin transformers={MarkdownTransformers} />
|
||||
<TablePlugin />
|
||||
<OnChangePlugin onChange={handleChange} ignoreSelectionChange={true} />
|
||||
<HistoryPlugin />
|
||||
<HorizontalRulePlugin />
|
||||
<AutoFocusPlugin />
|
||||
<ClearEditorPlugin />
|
||||
<CheckListPlugin />
|
||||
<CodeHighlightPlugin />
|
||||
@@ -126,15 +125,13 @@ export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({
|
||||
<TwitterPlugin />
|
||||
<YouTubePlugin />
|
||||
<CollapsiblePlugin />
|
||||
{floatingAnchorElem && (
|
||||
{!readonly && floatingAnchorElem && (
|
||||
<>
|
||||
<FloatingTextFormatToolbarPlugin anchorElem={floatingAnchorElem} />
|
||||
<FloatingLinkEditorPlugin />
|
||||
<DraggableBlockPlugin anchorElem={floatingAnchorElem} />
|
||||
</>
|
||||
)}
|
||||
{floatingAnchorElem && BlockDragEnabled && (
|
||||
<>{<DraggableBlockPlugin anchorElem={floatingAnchorElem} />}</>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@ import {BlockEditorNodes} from '../Lexical/Nodes/AllNodes';
|
||||
import {Klass, LexicalNode} from 'lexical';
|
||||
|
||||
type BlocksEditorComposerProps = {
|
||||
initialValue: string;
|
||||
initialValue: string | undefined;
|
||||
children: React.ReactNode;
|
||||
nodes?: Array<Klass<LexicalNode>>;
|
||||
readonly?: boolean;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import {
|
||||
CHECK_LIST,
|
||||
ELEMENT_TRANSFORMERS,
|
||||
TEXT_FORMAT_TRANSFORMERS,
|
||||
TEXT_MATCH_TRANSFORMERS,
|
||||
} from '@lexical/markdown';
|
||||
|
||||
export const MarkdownTransformers = [
|
||||
CHECK_LIST,
|
||||
...ELEMENT_TRANSFORMERS,
|
||||
...TEXT_FORMAT_TRANSFORMERS,
|
||||
...TEXT_MATCH_TRANSFORMERS,
|
||||
];
|
||||
@@ -1,19 +1,21 @@
|
||||
.draggable-block-menu {
|
||||
border-radius: 4px;
|
||||
padding: 2px 1px;
|
||||
padding: 3px 1px;
|
||||
cursor: grab;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
will-change: transform;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
|
||||
.draggable-block-menu .icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
opacity: 0.3;
|
||||
background-image: url(#{$blocks-editor-icons-path}/draggable-block-menu.svg);
|
||||
width: 0.8rem;
|
||||
height: 1.1rem;
|
||||
opacity: 0.2;
|
||||
padding-left: 4.75px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.draggable-block-menu:active {
|
||||
@@ -21,16 +23,17 @@
|
||||
}
|
||||
|
||||
.draggable-block-menu:hover {
|
||||
background-color: #efefef;
|
||||
background-color: var(--sn-stylekit-contrast-background-color);
|
||||
}
|
||||
|
||||
.draggable-block-target-line {
|
||||
pointer-events: none;
|
||||
background: deepskyblue;
|
||||
height: 4px;
|
||||
background: var(--sn-stylekit-info-color);
|
||||
height: 0.25rem;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
will-change: transform;
|
||||
will-change: transform, opacity;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
import {$createListNode, $isListNode} from '@lexical/list';
|
||||
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
|
||||
import {eventFiles} from '@lexical/rich-text';
|
||||
import {mergeRegister} from '@lexical/utils';
|
||||
@@ -19,16 +20,17 @@ import {
|
||||
} from 'lexical';
|
||||
import {DragEvent as ReactDragEvent, useEffect, useRef, useState} from 'react';
|
||||
import {createPortal} from 'react-dom';
|
||||
import {BlockIcon} from '@standardnotes/icons';
|
||||
|
||||
import {isHTMLElement} from '../../Utils/guard';
|
||||
import {Point} from '../../Utils/point';
|
||||
import {Rect} from '../../Utils/rect';
|
||||
import {ContainsPointReturn, Rect} from '../../Utils/rect';
|
||||
|
||||
const SPACE = 4;
|
||||
const TARGET_LINE_HALF_HEIGHT = 2;
|
||||
const DRAGGABLE_BLOCK_MENU_CLASSNAME = 'draggable-block-menu';
|
||||
const DRAG_DATA_FORMAT = 'application/x-lexical-drag-block';
|
||||
const TEXT_BOX_HORIZONTAL_PADDING = 28;
|
||||
const TEXT_BOX_HORIZONTAL_PADDING = 24;
|
||||
|
||||
const Downward = 1;
|
||||
const Upward = -1;
|
||||
@@ -52,12 +54,56 @@ function getTopLevelNodeKeys(editor: LexicalEditor): string[] {
|
||||
return root ? root.__children : [];
|
||||
}
|
||||
|
||||
function elementContainingEventLocation(
|
||||
anchorElem: HTMLElement,
|
||||
element: HTMLElement,
|
||||
event: MouseEvent,
|
||||
): {contains: ContainsPointReturn; element: HTMLElement} {
|
||||
const anchorElementRect = anchorElem.getBoundingClientRect();
|
||||
|
||||
const eventLocation = new Point(event.x, event.y);
|
||||
const elementDomRect = Rect.fromDOM(element);
|
||||
const {marginTop, marginBottom} = window.getComputedStyle(element);
|
||||
|
||||
const rect = elementDomRect.generateNewRect({
|
||||
bottom: elementDomRect.bottom + parseFloat(marginBottom),
|
||||
left: anchorElementRect.left,
|
||||
right: anchorElementRect.right,
|
||||
top: elementDomRect.top - parseFloat(marginTop),
|
||||
});
|
||||
|
||||
const children = Array.from(element.children);
|
||||
|
||||
const shouldRecurseIntoChildren = ['UL', 'OL', 'LI'].includes(
|
||||
element.tagName,
|
||||
);
|
||||
|
||||
if (shouldRecurseIntoChildren) {
|
||||
for (const child of children) {
|
||||
const isLeaf = child.children.length === 0;
|
||||
if (isLeaf) {
|
||||
continue;
|
||||
}
|
||||
const childResult = elementContainingEventLocation(
|
||||
anchorElem,
|
||||
child as HTMLElement,
|
||||
event,
|
||||
);
|
||||
|
||||
if (childResult.contains.result) {
|
||||
return childResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {contains: rect.contains(eventLocation), element: element};
|
||||
}
|
||||
|
||||
function getBlockElement(
|
||||
anchorElem: HTMLElement,
|
||||
editor: LexicalEditor,
|
||||
event: MouseEvent,
|
||||
): HTMLElement | null {
|
||||
const anchorElementRect = anchorElem.getBoundingClientRect();
|
||||
const topLevelNodeKeys = getTopLevelNodeKeys(editor);
|
||||
|
||||
let blockElem: HTMLElement | null = null;
|
||||
@@ -72,32 +118,22 @@ function getBlockElement(
|
||||
if (elem === null) {
|
||||
break;
|
||||
}
|
||||
const point = new Point(event.x, event.y);
|
||||
const domRect = Rect.fromDOM(elem);
|
||||
const {marginTop, marginBottom} = window.getComputedStyle(elem);
|
||||
const {contains, element} = elementContainingEventLocation(
|
||||
anchorElem,
|
||||
elem,
|
||||
event,
|
||||
);
|
||||
|
||||
const rect = domRect.generateNewRect({
|
||||
bottom: domRect.bottom + parseFloat(marginBottom),
|
||||
left: anchorElementRect.left,
|
||||
right: anchorElementRect.right,
|
||||
top: domRect.top - parseFloat(marginTop),
|
||||
});
|
||||
|
||||
const {
|
||||
result,
|
||||
reason: {isOnTopSide, isOnBottomSide},
|
||||
} = rect.contains(point);
|
||||
|
||||
if (result) {
|
||||
blockElem = elem;
|
||||
if (contains.result) {
|
||||
blockElem = element;
|
||||
prevIndex = index;
|
||||
break;
|
||||
}
|
||||
|
||||
if (direction === Indeterminate) {
|
||||
if (isOnTopSide) {
|
||||
if (contains.reason.isOnTopSide) {
|
||||
direction = Upward;
|
||||
} else if (isOnBottomSide) {
|
||||
} else if (contains.reason.isOnBottomSide) {
|
||||
direction = Downward;
|
||||
} else {
|
||||
// stop search block element
|
||||
@@ -123,7 +159,6 @@ function setMenuPosition(
|
||||
) {
|
||||
if (!targetElem) {
|
||||
floatingElem.style.opacity = '0';
|
||||
floatingElem.style.transform = 'translate(-10000px, -10000px)';
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -185,13 +220,12 @@ function setTargetLine(
|
||||
targetLineElem.style.width = `${
|
||||
anchorWidth - (TEXT_BOX_HORIZONTAL_PADDING - SPACE) * 2
|
||||
}px`;
|
||||
targetLineElem.style.opacity = '.4';
|
||||
targetLineElem.style.opacity = '.6';
|
||||
}
|
||||
|
||||
function hideTargetLine(targetLineElem: HTMLElement | null) {
|
||||
if (targetLineElem) {
|
||||
targetLineElem.style.opacity = '0';
|
||||
targetLineElem.style.transform = 'translate(-10000px, -10000px)';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,18 +317,30 @@ function useDraggableBlockMenu(
|
||||
return false;
|
||||
}
|
||||
const targetNode = $getNearestNodeFromDOMNode(targetBlockElem);
|
||||
|
||||
if (!targetNode) {
|
||||
return false;
|
||||
}
|
||||
if (targetNode === draggedNode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
let nodeToInsert = draggedNode;
|
||||
const targetParent = targetNode.getParent();
|
||||
const sourceParent = draggedNode.getParent();
|
||||
|
||||
if ($isListNode(sourceParent) && !$isListNode(targetParent)) {
|
||||
const newList = $createListNode(sourceParent.getListType());
|
||||
newList.append(draggedNode);
|
||||
nodeToInsert = newList;
|
||||
}
|
||||
|
||||
const {top, height} = targetBlockElem.getBoundingClientRect();
|
||||
const shouldInsertAfter = pageY - top > height / 2;
|
||||
if (shouldInsertAfter) {
|
||||
targetNode.insertAfter(draggedNode);
|
||||
targetNode.insertAfter(nodeToInsert);
|
||||
} else {
|
||||
targetNode.insertBefore(draggedNode);
|
||||
targetNode.insertBefore(nodeToInsert);
|
||||
}
|
||||
setDraggableBlockElem(null);
|
||||
|
||||
@@ -347,7 +393,9 @@ function useDraggableBlockMenu(
|
||||
draggable={true}
|
||||
onDragStart={onDragStart}
|
||||
onDragEnd={onDragEnd}>
|
||||
<div className={isEditable ? 'icon' : ''} />
|
||||
<div className={isEditable ? 'icon' : ''}>
|
||||
<BlockIcon className="text-text pointer-events-none" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="draggable-block-target-line" ref={targetLineRef} />
|
||||
</>,
|
||||
|
||||
@@ -110,8 +110,8 @@ export function InsertTableDialog({
|
||||
|
||||
return (
|
||||
<>
|
||||
<TextInput label="No of rows" onChange={setRows} value={rows} />
|
||||
<TextInput label="No of columns" onChange={setColumns} value={columns} />
|
||||
<TextInput label="Number of rows" onChange={setRows} value={rows} />
|
||||
<TextInput label="Number of columns" onChange={setColumns} value={columns} />
|
||||
<DialogActions data-test-id="table-model-confirm-insert">
|
||||
<Button onClick={onClick}>Confirm</Button>
|
||||
</DialogActions>
|
||||
|
||||
@@ -325,6 +325,7 @@
|
||||
}
|
||||
.Lexical__listItemChecked {
|
||||
text-decoration: line-through;
|
||||
opacity: 0.4;
|
||||
}
|
||||
.Lexical__listItemUnchecked:before,
|
||||
.Lexical__listItemChecked:before {
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
border: 0px;
|
||||
background-color: #eee;
|
||||
border-radius: 5px;
|
||||
background-color: var(--sn-stylekit-contrast-background-color);
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
.Button__root:hover {
|
||||
background-color: #ddd;
|
||||
background-color: var(--sn-stylekit-info-color);
|
||||
color: var(--sn-stylekit-info-contrast-color);
|
||||
}
|
||||
.Button__small {
|
||||
padding-top: 5px;
|
||||
@@ -32,5 +32,5 @@
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.Button__disabled:hover {
|
||||
background-color: #eee;
|
||||
background-color: var(--sn-stylekit-secondary-background-color);
|
||||
}
|
||||
|
||||
@@ -17,16 +17,17 @@
|
||||
display: flex;
|
||||
flex: 1;
|
||||
color: #666;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.Input__input {
|
||||
display: flex;
|
||||
flex: 2;
|
||||
border: 1px solid #999;
|
||||
border: 1px solid var(--sn-stylekit-contrast-border-color);
|
||||
background-color: var(--sn-stylekit-contrast-background-color);
|
||||
padding-top: 7px;
|
||||
padding-bottom: 7px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
font-size: 16px;
|
||||
border-radius: 5px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
background-color: rgba(40, 40, 40, 0.6);
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
flex-grow: 0px;
|
||||
flex-shrink: 1px;
|
||||
z-index: 100;
|
||||
@@ -28,22 +28,23 @@
|
||||
min-width: 300px;
|
||||
display: flex;
|
||||
flex-grow: 0px;
|
||||
background-color: #fff;
|
||||
background-color: var(--sn-stylekit-background-color);
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
box-shadow: 0 0 20px 0 #444;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 0px 0 var(--sn-stylekit-shadow-color);
|
||||
border-radius: 0px;
|
||||
}
|
||||
.Modal__title {
|
||||
color: #444;
|
||||
color:var(--sn-stylekit-foreground-color);
|
||||
margin: 0px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid var(--sn-stylekit-border-color);
|
||||
}
|
||||
.Modal__closeButton {
|
||||
border: 0px;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 15px;
|
||||
border-radius: 20px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
@@ -52,10 +53,11 @@
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background-color: #eee;
|
||||
background-color: var(--sn-stylekit-contrast-background-color);
|
||||
}
|
||||
.Modal__closeButton:hover {
|
||||
background-color: #ddd;
|
||||
background-color: var(--sn-stylekit-info-color);
|
||||
color: var(--sn-stylekit-info-contrast-color);
|
||||
}
|
||||
.Modal__content {
|
||||
padding-top: 20px;
|
||||
|
||||
@@ -73,7 +73,7 @@ function PortalImpl({
|
||||
aria-label="Close modal"
|
||||
type="button"
|
||||
onClick={onClose}>
|
||||
X
|
||||
✕
|
||||
</button>
|
||||
<div className="Modal__content">{children}</div>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
import {isPoint, Point} from './point';
|
||||
|
||||
type ContainsPointReturn = {
|
||||
export type ContainsPointReturn = {
|
||||
result: boolean;
|
||||
reason: {
|
||||
isOnTopSide: boolean;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from './Editor/BlocksEditor';
|
||||
export * from './Editor/BlocksEditorComposer';
|
||||
export * from './Editor/Constants';
|
||||
export * from './Editor/MarkdownTransformers';
|
||||
|
||||
@@ -3,6 +3,122 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.102.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-30)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-29)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-25)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-25)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.102.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
# [3.102.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
### Features
|
||||
|
||||
* New 'What's New' section in Preferences ([#2049](https://github.com/standardnotes/app/issues/2049)) (skip e2e) ([0a01ddb](https://github.com/standardnotes/app/commit/0a01ddb430154fa4518985458c15c644855c80ea))
|
||||
|
||||
## [3.101.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.101.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
# [3.101.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
### Features
|
||||
|
||||
* display file backup status in file context menu ([#2044](https://github.com/standardnotes/app/issues/2044)) (skip e2e) ([7c2e832](https://github.com/standardnotes/app/commit/7c2e832065d45676f1b69b7c386e789e2f76775e))
|
||||
|
||||
## [3.100.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-22)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.100.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-19)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.100.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-19)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.100.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.100.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.100.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.100.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
## [3.100.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/desktop
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
import { FileBackupsDevice, FileBackupsMapping } from '@web/Application/Device/DesktopSnjsExports'
|
||||
import { FileBackupRecord, FileBackupsDevice, FileBackupsMapping } from '@web/Application/Device/DesktopSnjsExports'
|
||||
import { AppState } from 'app/AppState'
|
||||
import { shell } from 'electron'
|
||||
import { StoreKeys } from '../Store/StoreKeys'
|
||||
@@ -120,6 +120,10 @@ export class FilesBackupManager implements FileBackupsDevice {
|
||||
return this.defaultMappingFileValue()
|
||||
}
|
||||
|
||||
for (const entry of Object.values(data.files)) {
|
||||
entry.backedUpOn = new Date(entry.backedUpOn)
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
@@ -129,6 +133,10 @@ export class FilesBackupManager implements FileBackupsDevice {
|
||||
void shell.openPath(location)
|
||||
}
|
||||
|
||||
async openFileBackup(record: FileBackupRecord): Promise<void> {
|
||||
void shell.openPath(record.absolutePath)
|
||||
}
|
||||
|
||||
async saveFilesBackupsMappingFile(file: FileBackupsMapping): Promise<'success' | 'failed'> {
|
||||
await writeJSONFile(this.getMappingFileLocation(), file)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { StoreKeys } from '../Store/StoreKeys'
|
||||
const path = require('path')
|
||||
const rendererPath = path.join('file://', __dirname, '/renderer.js')
|
||||
|
||||
import { FileBackupsDevice, FileBackupsMapping } from '@web/Application/Device/DesktopSnjsExports'
|
||||
import { FileBackupsDevice, FileBackupsMapping, FileBackupRecord } from '@web/Application/Device/DesktopSnjsExports'
|
||||
import { app, BrowserWindow } from 'electron'
|
||||
import { BackupsManagerInterface } from '../Backups/BackupsManagerInterface'
|
||||
import { KeychainInterface } from '../Keychain/KeychainInterface'
|
||||
@@ -64,6 +64,7 @@ export class RemoteBridge implements CrossProcessBridge {
|
||||
changeFilesBackupsLocation: this.changeFilesBackupsLocation.bind(this),
|
||||
getFilesBackupsLocation: this.getFilesBackupsLocation.bind(this),
|
||||
openFilesBackupsLocation: this.openFilesBackupsLocation.bind(this),
|
||||
openFileBackup: this.openFileBackup.bind(this),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,4 +203,8 @@ export class RemoteBridge implements CrossProcessBridge {
|
||||
public openFilesBackupsLocation(): Promise<void> {
|
||||
return this.fileBackups.openFilesBackupsLocation()
|
||||
}
|
||||
|
||||
public openFileBackup(record: FileBackupRecord): Promise<void> {
|
||||
return this.fileBackups.openFileBackup(record)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
Environment,
|
||||
FileBackupsMapping,
|
||||
RawKeychainValue,
|
||||
FileBackupRecord,
|
||||
} from '@web/Application/Device/DesktopSnjsExports'
|
||||
import { WebOrDesktopDevice } from '@web/Application/Device/WebOrDesktopDevice'
|
||||
import { Component } from '../Main/Packages/PackageManagerInterface'
|
||||
@@ -132,6 +133,10 @@ export class DesktopDevice extends WebOrDesktopDevice implements DesktopDeviceIn
|
||||
return this.remoteBridge.openFilesBackupsLocation()
|
||||
}
|
||||
|
||||
openFileBackup(record: FileBackupRecord): Promise<void> {
|
||||
return this.remoteBridge.openFileBackup(record)
|
||||
}
|
||||
|
||||
async saveFilesBackupsFile(
|
||||
uuid: string,
|
||||
metaFile: string,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@standardnotes/desktop",
|
||||
"main": "./app/dist/index.js",
|
||||
"version": "3.100.11",
|
||||
"version": "3.102.17",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"author": "Standard Notes.",
|
||||
"private": true,
|
||||
|
||||
@@ -31,7 +31,7 @@ async function getBlockMapInfo(fileName) {
|
||||
|
||||
;(async () => {
|
||||
try {
|
||||
const { version } = JSON.parse(await fs.promises.readFile('package.json'))
|
||||
const version = process.argv.slice(2)[0]
|
||||
const zipName = `standard-notes-${version}-mac-x64.zip`
|
||||
const zipPath = `dist/${zipName}`
|
||||
console.log(`Removing ${zipPath}`)
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.19.21](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
## [1.19.20](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
## [1.19.19](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
## [1.19.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
## [1.19.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
## [1.19.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
## [1.19.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/encryption
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/encryption",
|
||||
"version": "1.19.15",
|
||||
"version": "1.19.21",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
|
||||
@@ -3,6 +3,32 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/filepicker
|
||||
|
||||
## [1.26.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/filepicker
|
||||
|
||||
## [1.26.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/filepicker
|
||||
|
||||
## [1.26.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/filepicker
|
||||
|
||||
# [1.26.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
### Features
|
||||
|
||||
* display file backup status in file context menu ([#2044](https://github.com/standardnotes/app/issues/2044)) (skip e2e) ([7c2e832](https://github.com/standardnotes/app/commit/7c2e832065d45676f1b69b7c386e789e2f76775e))
|
||||
|
||||
## [1.25.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/filepicker
|
||||
|
||||
## [1.25.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/filepicker
|
||||
|
||||
@@ -1,24 +1,17 @@
|
||||
{
|
||||
"name": "@standardnotes/filepicker",
|
||||
"version": "1.25.15",
|
||||
"version": "1.26.4",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
"description": "Web filepicker for Standard Notes projects",
|
||||
"main": "dist/index.js",
|
||||
"main": "./src/index.ts",
|
||||
"author": "Standard Notes",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"types": "./src/index.ts",
|
||||
"private": true,
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"scripts": {
|
||||
"clean": "rm -fr dist",
|
||||
"prestart": "yarn clean",
|
||||
"start": "tsc -p tsconfig.json --watch",
|
||||
"prebuild": "yarn clean",
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"build": "echo 'Empty build script required for yarn topological install'",
|
||||
"lint": "eslint src --ext .ts",
|
||||
"test": "jest"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "../../node_modules/@standardnotes/config/src/tsconfig.json",
|
||||
"extends": "../../UILib.tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"skipLibCheck": true,
|
||||
"rootDir": "./src",
|
||||
|
||||
@@ -3,6 +3,32 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.13.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/files
|
||||
|
||||
## [1.13.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/files
|
||||
|
||||
## [1.13.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/files
|
||||
|
||||
## [1.13.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/files
|
||||
|
||||
# [1.13.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
### Features
|
||||
|
||||
* display file backup status in file context menu ([#2044](https://github.com/standardnotes/app/issues/2044)) (skip e2e) ([7c2e832](https://github.com/standardnotes/app/commit/7c2e832065d45676f1b69b7c386e789e2f76775e))
|
||||
|
||||
## [1.12.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/files
|
||||
|
||||
## [1.12.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/files
|
||||
|
||||
@@ -1,26 +1,22 @@
|
||||
{
|
||||
"name": "@standardnotes/files",
|
||||
"version": "1.12.15",
|
||||
"version": "1.13.4",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
"description": "Client-side files library",
|
||||
"main": "dist/index.js",
|
||||
"main": "./src/index.ts",
|
||||
"author": "Standard Notes",
|
||||
"types": "dist/index.d.ts",
|
||||
"types": "./src/index.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"private": true,
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"scripts": {
|
||||
"clean": "rm -fr dist",
|
||||
"prestart": "yarn clean",
|
||||
"start": "tsc -p tsconfig.json --watch",
|
||||
"prebuild": "yarn clean",
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"lint": "eslint src --ext .ts",
|
||||
"test": "jest"
|
||||
"test": "jest",
|
||||
"build": "echo 'Empty build script required for yarn topological install'"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.2.3",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Uuid } from '@standardnotes/common'
|
||||
import { FileBackupsMapping } from './FileBackupsMapping'
|
||||
import { FileBackupRecord, FileBackupsMapping } from './FileBackupsMapping'
|
||||
|
||||
export interface FileBackupsDevice {
|
||||
getFilesBackupsMappingFile(): Promise<FileBackupsMapping>
|
||||
@@ -18,4 +18,5 @@ export interface FileBackupsDevice {
|
||||
changeFilesBackupsLocation(): Promise<string | undefined>
|
||||
getFilesBackupsLocation(): Promise<string>
|
||||
openFilesBackupsLocation(): Promise<void>
|
||||
openFileBackup(record: FileBackupRecord): Promise<void>
|
||||
}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
import { Uuid } from '@standardnotes/common'
|
||||
import { FileBackupsConstantsV1 } from './FileBackupsConstantsV1'
|
||||
|
||||
export type FileBackupRecord = {
|
||||
backedUpOn: Date
|
||||
absolutePath: string
|
||||
relativePath: string
|
||||
metadataFileName: typeof FileBackupsConstantsV1.MetadataFileName
|
||||
binaryFileName: typeof FileBackupsConstantsV1.BinaryFileName
|
||||
version: typeof FileBackupsConstantsV1.Version
|
||||
}
|
||||
|
||||
export interface FileBackupsMapping {
|
||||
version: typeof FileBackupsConstantsV1.Version
|
||||
files: Record<
|
||||
Uuid,
|
||||
{
|
||||
backedUpOn: Date
|
||||
absolutePath: string
|
||||
relativePath: string
|
||||
metadataFileName: typeof FileBackupsConstantsV1.MetadataFileName
|
||||
binaryFileName: typeof FileBackupsConstantsV1.BinaryFileName
|
||||
version: typeof FileBackupsConstantsV1.Version
|
||||
}
|
||||
>
|
||||
files: Record<Uuid, FileBackupRecord>
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "../../node_modules/@standardnotes/config/src/tsconfig.json",
|
||||
"extends": "../../UILib.tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"skipLibCheck": true,
|
||||
"rootDir": "./src",
|
||||
|
||||
@@ -3,6 +3,24 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.6.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add new line after embedding files ([7f6c53d](https://github.com/standardnotes/app/commit/7f6c53dfcbc8952ca9eee76b9c4af70fea3c1bf1))
|
||||
|
||||
# [1.6.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-19)
|
||||
|
||||
### Features
|
||||
|
||||
* ability to drag super list items; secure password generation blocks ([#2039](https://github.com/standardnotes/app/issues/2039)) ([c39c72d](https://github.com/standardnotes/app/commit/c39c72da7a4fb85f4da9aa4e6f8e9f7ba4486a94))
|
||||
|
||||
# [1.5.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
### Features
|
||||
|
||||
* **web:** enable block drag'n'drop in super editor ([#2029](https://github.com/standardnotes/app/issues/2029)) ([dab4f67](https://github.com/standardnotes/app/commit/dab4f678f04aee2c7dfbe7f416e7fc34e8d870cf))
|
||||
|
||||
## [1.4.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-16)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/icons
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/icons",
|
||||
"version": "1.4.10",
|
||||
"version": "1.6.1",
|
||||
"private": true,
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<svg width="9px" height="14px" viewBox="0 0 9 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Group-2" fill="currentColor" fill-rule="nonzero">
|
||||
<path d="M1.6666,3.33333 C1.2246,3.33333 0.8007,3.15774 0.4881,2.84518 C0.1755,2.53262 0,2.1087 0,1.66667 C0,1.22464 0.1755,0.80072 0.4881,0.48816 C0.8007,0.1756 1.2246,0 1.6666,0 C2.1086,0 2.5326,0.1756 2.8451,0.48816 C3.1577,0.80072 3.3333,1.22464 3.3333,1.66667 C3.3333,2.1087 3.1577,2.53262 2.8451,2.84518 C2.5326,3.15774 2.1086,3.33333 1.6666,3.33333 Z M1.6666,8.33333 C1.2246,8.33333 0.8007,8.15773 0.4881,7.84513 C0.1755,7.53263 0,7.10873 0,6.66663 C0,6.22463 0.1755,5.80073 0.4881,5.48813 C0.8007,5.17563 1.2246,5.00003 1.6666,5.00003 C2.1086,5.00003 2.5326,5.17563 2.8451,5.48813 C3.1577,5.80073 3.3333,6.22463 3.3333,6.66663 C3.3333,7.10873 3.1577,7.53263 2.8451,7.84513 C2.5326,8.15773 2.1086,8.33333 1.6666,8.33333 Z M1.6666,13.33333 C1.2246,13.33333 0.8007,13.15773 0.4881,12.84513 C0.1755,12.53263 0,12.10873 0,11.66663 C0,11.22463 0.1755,10.80073 0.4881,10.48813 C0.8007,10.17563 1.2246,10.00003 1.6666,10.00003 C2.1086,10.00003 2.5326,10.17563 2.8451,10.48813 C3.1577,10.80073 3.3333,11.22463 3.3333,11.66663 C3.3333,12.10873 3.1577,12.53263 2.8451,12.84513 C2.5326,13.15773 2.1086,13.33333 1.6666,13.33333 L1.6666,13.33333 Z M6.6666,3.33333 C6.2246,3.33333 5.8007,3.15774 5.4881,2.84518 C5.1755,2.53262 5,2.1087 5,1.66667 C5,1.22464 5.1755,0.80072 5.4881,0.48816 C5.8007,0.1756 6.2246,0 6.6666,0 C7.1086,0 7.5326,0.1756 7.8451,0.48816 C8.1577,0.80072 8.3333,1.22464 8.3333,1.66667 C8.3333,2.1087 8.1577,2.53262 7.8451,2.84518 C7.5326,3.15774 7.1086,3.33333 6.6666,3.33333 Z M6.6666,8.33333 C6.2246,8.33333 5.8007,8.15773 5.4881,7.84513 C5.1755,7.53263 5,7.10873 5,6.66663 C5,6.22463 5.1755,5.80073 5.4881,5.48813 C5.8007,5.17563 6.2246,5.00003 6.6666,5.00003 C7.1086,5.00003 7.5326,5.17563 7.8451,5.48813 C8.1577,5.80073 8.3333,6.22463 8.3333,6.66663 C8.3333,7.10873 8.1577,7.53263 7.8451,7.84513 C7.5326,8.15773 7.1086,8.33333 6.6666,8.33333 Z M6.6666,13.33333 C6.2246,13.33333 5.8007,13.15773 5.4881,12.84513 C5.1755,12.53263 5,12.10873 5,11.66663 C5,11.22463 5.1755,10.80073 5.4881,10.48813 C5.8007,10.17563 6.2246,10.00003 6.6666,10.00003 C7.1086,10.00003 7.5326,10.17563 7.8451,10.48813 C8.1577,10.80073 8.3333,11.22463 8.3333,11.66663 C8.3333,12.10873 8.1577,12.53263 7.8451,12.84513 C7.5326,13.15773 7.1086,13.33333 6.6666,13.33333 L6.6666,13.33333 Z" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -1,4 +1,4 @@
|
||||
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.99992 15C8.67384 15 7.40207 14.4732 6.46438 13.5355C5.5267 12.5978 4.99992 11.3261 4.99992 9.99998C4.99992 9.16665 5.20825 8.35831 5.58325 7.66665L4.36659 6.44998C3.71659 7.47498 3.33325 8.69165 3.33325 9.99998C3.33325 11.7681 4.03563 13.4638 5.28587 14.714C6.53612 15.9643 8.23181 16.6666 9.99992 16.6666V19.1666L13.3333 15.8333L9.99992 12.5V15ZM9.99992 3.33331V0.833313L6.66658 4.16665L9.99992 7.49998V4.99998C11.326 4.99998 12.5978 5.52676 13.5355 6.46445C14.4731 7.40213 14.9999 8.6739 14.9999 9.99998C14.9999 10.8333 14.7916 11.6416 14.4166 12.3333L15.6333 13.55C16.2833 12.525 16.6666 11.3083 16.6666 9.99998C16.6666 8.23187 15.9642 6.53618 14.714 5.28593C13.4637 4.03569 11.768 3.33331 9.99992 3.33331Z" />
|
||||
<path d="M9.99999 15C11.3261 15 12.5978 14.4732 13.5355 13.5355C14.4732 12.5979 15 11.3261 15 10C15 9.16666 14.7917 8.35833 14.4167 7.66667L15.6333 6.45C16.2833 7.475 16.6667 8.69166 16.6667 10C16.6667 11.7681 15.9643 13.4638 14.714 14.714C13.4638 15.9643 11.7681 16.6667 9.99999 16.6667V19.1667L6.66666 15.8333L9.99999 12.5V15ZM9.99999 3.33333V0.833333L13.3333 4.16667L9.99999 7.5V5C8.67391 5 7.40214 5.52678 6.46446 6.46447C5.52677 7.40215 4.99999 8.67392 4.99999 10C4.99999 10.8333 5.20832 11.6417 5.58332 12.3333L4.36666 13.55C3.71666 12.525 3.33332 11.3083 3.33332 10C3.33332 8.23189 4.0357 6.5362 5.28594 5.28595C6.53619 4.03571 8.23188 3.33333 9.99999 3.33333Z" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 810 B After Width: | Height: | Size: 756 B |
@@ -21,6 +21,7 @@ import AttachmentFileIcon from './ic-attachment-file.svg'
|
||||
import AuthenticatorIcon from './ic-authenticator.svg'
|
||||
import AuthenticatorVariantIcon from './ic-authenticator-variant.svg'
|
||||
import BackIosIcon from './ic-back-ios.svg'
|
||||
import BlockIcon from './ic-block.svg'
|
||||
import BlueDotIcon from './blue-dot.svg'
|
||||
import BoldIcon from './ic-bold.svg'
|
||||
import BoxFilledIcon from './ic-box-filled.svg'
|
||||
@@ -224,6 +225,7 @@ export {
|
||||
AuthenticatorIcon,
|
||||
AuthenticatorVariantIcon,
|
||||
BackIosIcon,
|
||||
BlockIcon,
|
||||
BlueDotIcon,
|
||||
BoldIcon,
|
||||
BoxFilledIcon,
|
||||
|
||||
@@ -27,6 +27,7 @@ import TypeSubscript from './type-subscript.svg'
|
||||
import TypeSuperscript from './type-superscript.svg'
|
||||
import TypeUnderline from './type-underline.svg'
|
||||
import LexicalPencilFill from './pencil-fill.svg'
|
||||
import LexicalDraggableBlockMenu from './draggable-block-menu.svg'
|
||||
|
||||
export {
|
||||
LexicalCaretRightFill,
|
||||
@@ -58,4 +59,5 @@ export {
|
||||
TypeSuperscript,
|
||||
TypeUnderline,
|
||||
LexicalPencilFill,
|
||||
LexicalDraggableBlockMenu,
|
||||
}
|
||||
|
||||
@@ -3,6 +3,124 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.48.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-30)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.48.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-29)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
# [3.48.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
### Features
|
||||
|
||||
* display number of files for 'Files' view ([#2065](https://github.com/standardnotes/app/issues/2065)) ([767d354](https://github.com/standardnotes/app/commit/767d3547804bc98693dcc769baeed943c24426f3))
|
||||
|
||||
## [3.47.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.47.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.47.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.47.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Super editor popover menus on iOS ([#2061](https://github.com/standardnotes/app/issues/2061)) ([148aee4](https://github.com/standardnotes/app/commit/148aee441b816c58599d95db2e5b0f3f93414511))
|
||||
|
||||
## [3.47.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.47.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.47.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.47.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.47.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.47.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.47.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-25)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.47.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-25)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.47.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.47.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
# [3.47.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
### Features
|
||||
|
||||
* New 'What's New' section in Preferences ([#2049](https://github.com/standardnotes/app/issues/2049)) (skip e2e) ([0a01ddb](https://github.com/standardnotes/app/commit/0a01ddb430154fa4518985458c15c644855c80ea))
|
||||
|
||||
## [3.46.31](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.46.30](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.46.29](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.46.28](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-22)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.46.27](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-19)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.46.26](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-19)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.46.25](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.46.24](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.46.23](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.46.22](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
## [3.46.21](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/mobile
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/mobile",
|
||||
"version": "3.46.21",
|
||||
"version": "3.48.2",
|
||||
"author": "Standard Notes.",
|
||||
"private": true,
|
||||
"license": "AGPL-3.0-or-later",
|
||||
|
||||
@@ -4,7 +4,6 @@ import { Keyboard, Platform } from 'react-native'
|
||||
import VersionInfo from 'react-native-version-info'
|
||||
import { WebView, WebViewMessageEvent } from 'react-native-webview'
|
||||
import { OnShouldStartLoadWithRequest } from 'react-native-webview/lib/WebViewTypes'
|
||||
import pjson from '../package.json'
|
||||
import { AndroidBackHandlerService } from './AndroidBackHandlerService'
|
||||
import { AppStateObserverService } from './AppStateObserverService'
|
||||
import { ColorSchemeObserverService } from './ColorSchemeObserverService'
|
||||
@@ -129,7 +128,7 @@ const MobileWebAppContents = ({ destroyAndReload }: { destroyAndReload: () => vo
|
||||
const WebProcessDeviceInterface = `
|
||||
class WebProcessDeviceInterface {
|
||||
constructor(messageSender) {
|
||||
this.appVersion = '${pjson.version} (${VersionInfo.buildVersion})'
|
||||
this.appVersion = '${VersionInfo.appVersion} (${VersionInfo.buildVersion})'
|
||||
this.environment = 3
|
||||
this.platform = ${device.platform}
|
||||
this.databases = []
|
||||
|
||||
@@ -3,6 +3,34 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.38.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
### Features
|
||||
|
||||
* display number of files for 'Files' view ([#2065](https://github.com/standardnotes/app/issues/2065)) ([767d354](https://github.com/standardnotes/app/commit/767d3547804bc98693dcc769baeed943c24426f3))
|
||||
|
||||
## [1.37.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* exclude files from being counted in 'Notes' view ([#2062](https://github.com/standardnotes/app/issues/2062)) ([2b0c9b1](https://github.com/standardnotes/app/commit/2b0c9b188cd75477c0c1611443daadb8ffa29306))
|
||||
|
||||
## [1.37.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/models
|
||||
|
||||
## [1.37.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/models
|
||||
|
||||
## [1.37.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/models
|
||||
|
||||
## [1.37.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/models
|
||||
|
||||
## [1.37.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
{
|
||||
"name": "@standardnotes/models",
|
||||
"version": "1.37.4",
|
||||
"version": "1.38.0",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
"private": true,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"description": "Models used in SNJS library",
|
||||
"author": "Standard Notes",
|
||||
"main": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"scripts": {
|
||||
"tsc": "tsc -p tsconfig.json",
|
||||
"clean": "rm -fr dist",
|
||||
"prestart": "yarn clean",
|
||||
"start": "tsc -p tsconfig.json --watch",
|
||||
"prebuild": "yarn clean",
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"lint": "eslint src --ext .ts",
|
||||
"test": "jest"
|
||||
},
|
||||
|
||||
@@ -12,6 +12,7 @@ export type TagItemCountChangeObserver = (tagUuid: Uuid | AllNotesUuidSignifier)
|
||||
export class TagItemsIndex implements SNIndex {
|
||||
private tagToItemsMap: Partial<Record<Uuid, Set<Uuid>>> = {}
|
||||
private allCountableItems = new Set<Uuid>()
|
||||
private countableItemsByType = new Map<ContentType, Set<Uuid>>()
|
||||
|
||||
constructor(private collection: ItemCollection, public observers: TagItemCountChangeObserver[] = []) {}
|
||||
|
||||
@@ -41,6 +42,14 @@ export class TagItemsIndex implements SNIndex {
|
||||
return this.allCountableItems.size
|
||||
}
|
||||
|
||||
public allCountableNotesCount(): number {
|
||||
return this.countableItemsByType.get(ContentType.Note)?.size || 0
|
||||
}
|
||||
|
||||
public allCountableFilesCount(): number {
|
||||
return this.countableItemsByType.get(ContentType.File)?.size || 0
|
||||
}
|
||||
|
||||
public countableItemsForTag(tag: SNTag): number {
|
||||
return this.tagToItemsMap[tag.uuid]?.size || 0
|
||||
}
|
||||
@@ -75,10 +84,18 @@ export class TagItemsIndex implements SNIndex {
|
||||
|
||||
for (const item of items) {
|
||||
const isCountable = this.isItemCountable(item)
|
||||
|
||||
if (isCountable) {
|
||||
this.allCountableItems.add(item.uuid)
|
||||
|
||||
if (!this.countableItemsByType.has(item.content_type)) {
|
||||
this.countableItemsByType.set(item.content_type, new Set())
|
||||
}
|
||||
|
||||
this.countableItemsByType.get(item.content_type)?.add(item.uuid)
|
||||
} else {
|
||||
this.allCountableItems.delete(item.uuid)
|
||||
this.countableItemsByType.get(item.content_type)?.delete(item.uuid)
|
||||
}
|
||||
|
||||
const associatedTagUuids = this.collection.uuidsThatReferenceUuid(item.uuid)
|
||||
|
||||
@@ -12,10 +12,7 @@ import { PayloadTimestampDefaults } from '../../Abstract/Payload'
|
||||
import { FilterDisplayOptions } from '../../Runtime/Display'
|
||||
import { FileItem } from '../File'
|
||||
|
||||
export function BuildSmartViews(
|
||||
options: FilterDisplayOptions,
|
||||
{ supportsFileNavigation = false }: { supportsFileNavigation: boolean },
|
||||
): SmartView[] {
|
||||
export function BuildSmartViews(options: FilterDisplayOptions): SmartView[] {
|
||||
const notes = new SmartView(
|
||||
new DecryptedPayload({
|
||||
uuid: SystemViewId.AllNotes,
|
||||
@@ -88,11 +85,7 @@ export function BuildSmartViews(
|
||||
}),
|
||||
)
|
||||
|
||||
if (supportsFileNavigation) {
|
||||
return [notes, starred, files, archived, trash, untagged]
|
||||
} else {
|
||||
return [notes, starred, archived, trash, untagged]
|
||||
}
|
||||
return [notes, files, starred, archived, trash, untagged]
|
||||
}
|
||||
|
||||
function allNotesPredicate(options: FilterDisplayOptions) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export type VectorIconNameOrEmoji = EmojiString | IconType
|
||||
|
||||
export type EmojiString = string
|
||||
export type EmojiString = Omit<string, IconType>
|
||||
|
||||
export type IconType =
|
||||
| 'accessibility'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "../../UILib.tsconfig.json",
|
||||
"extends": "../../node_modules/@standardnotes/config/src/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"skipLibCheck": true,
|
||||
"rootDir": "./src",
|
||||
|
||||
@@ -3,6 +3,124 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.4.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-30)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-29)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-25)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-25)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.4.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
# [1.4.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
### Features
|
||||
|
||||
* New 'What's New' section in Preferences ([#2049](https://github.com/standardnotes/app/issues/2049)) (skip e2e) ([0a01ddb](https://github.com/standardnotes/app/commit/0a01ddb430154fa4518985458c15c644855c80ea))
|
||||
|
||||
## [1.3.257](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.3.256](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.3.255](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.3.254](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-22)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.3.253](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-19)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.3.252](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-19)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.3.251](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.3.250](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.3.249](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.3.248](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
## [1.3.247](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/releases
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/releases",
|
||||
"version": "1.3.247",
|
||||
"version": "1.4.18",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"main": "dist/releases.json",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -5,13 +5,13 @@ import { writeJson, ensureDirExists } from '../../../scripts/ScriptUtils.mjs'
|
||||
|
||||
const CdnUrl = 'https://github.com/standardnotes/app/releases/download/'
|
||||
const DesktopPackageName = '@standardnotes/desktop'
|
||||
const DesktopVersion = Desktop.version
|
||||
const DesktopVersion = Web.version
|
||||
const BaseFileName = `standard-notes-${DesktopVersion}`
|
||||
const ReleaseUrl = `${CdnUrl}${DesktopPackageName}@${DesktopVersion}/${BaseFileName}`.replaceAll('@', '%40')
|
||||
|
||||
const Versions = {
|
||||
[Desktop.name]: Desktop.version,
|
||||
[Mobile.name]: Mobile.version,
|
||||
[Desktop.name]: Web.version,
|
||||
[Mobile.name]: Web.version,
|
||||
[Web.name]: Web.version,
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,40 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.48.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
### Features
|
||||
|
||||
* display number of files for 'Files' view ([#2065](https://github.com/standardnotes/app/issues/2065)) ([767d354](https://github.com/standardnotes/app/commit/767d3547804bc98693dcc769baeed943c24426f3))
|
||||
|
||||
## [1.47.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.47.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
# [1.47.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
### Features
|
||||
|
||||
* New 'What's New' section in Preferences ([#2049](https://github.com/standardnotes/app/issues/2049)) (skip e2e) ([0a01ddb](https://github.com/standardnotes/app/commit/0a01ddb430154fa4518985458c15c644855c80ea))
|
||||
|
||||
## [1.46.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
# [1.46.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
### Features
|
||||
|
||||
* display file backup status in file context menu ([#2044](https://github.com/standardnotes/app/issues/2044)) (skip e2e) ([7c2e832](https://github.com/standardnotes/app/commit/7c2e832065d45676f1b69b7c386e789e2f76775e))
|
||||
|
||||
## [1.45.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
## [1.45.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/services
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/services",
|
||||
"version": "1.45.5",
|
||||
"version": "1.48.0",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
|
||||
@@ -2,7 +2,13 @@ import { ContentType, Uuid } from '@standardnotes/common'
|
||||
import { EncryptionProviderInterface } from '@standardnotes/encryption'
|
||||
import { PayloadEmitSource, FileItem, CreateEncryptedBackupFileContextPayload } from '@standardnotes/models'
|
||||
import { ClientDisplayableError } from '@standardnotes/responses'
|
||||
import { FilesApiInterface, FileBackupMetadataFile, FileBackupsDevice, FileBackupsMapping } from '@standardnotes/files'
|
||||
import {
|
||||
FilesApiInterface,
|
||||
FileBackupMetadataFile,
|
||||
FileBackupsDevice,
|
||||
FileBackupsMapping,
|
||||
FileBackupRecord,
|
||||
} from '@standardnotes/files'
|
||||
import { InternalEventBusInterface } from '../Internal/InternalEventBusInterface'
|
||||
import { ItemManagerInterface } from '../Item/ItemManagerInterface'
|
||||
import { AbstractService } from '../Service/AbstractService'
|
||||
@@ -11,6 +17,7 @@ import { StatusServiceInterface } from '../Status/StatusServiceInterface'
|
||||
export class FilesBackupService extends AbstractService {
|
||||
private itemsObserverDisposer: () => void
|
||||
private pendingFiles = new Set<Uuid>()
|
||||
private mappingCache?: FileBackupsMapping['files']
|
||||
|
||||
constructor(
|
||||
private items: ItemManagerInterface,
|
||||
@@ -75,8 +82,30 @@ export class FilesBackupService extends AbstractService {
|
||||
return this.device.openFilesBackupsLocation()
|
||||
}
|
||||
|
||||
private async getBackupsMapping(): Promise<FileBackupsMapping['files']> {
|
||||
return (await this.device.getFilesBackupsMappingFile()).files
|
||||
private async getBackupsMappingFromDisk(): Promise<FileBackupsMapping['files']> {
|
||||
const result = (await this.device.getFilesBackupsMappingFile()).files
|
||||
|
||||
this.mappingCache = result
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
private invalidateMappingCache(): void {
|
||||
this.mappingCache = undefined
|
||||
}
|
||||
|
||||
private async getBackupsMappingFromCache(): Promise<FileBackupsMapping['files']> {
|
||||
return this.mappingCache ?? (await this.getBackupsMappingFromDisk())
|
||||
}
|
||||
|
||||
public async getFileBackupInfo(file: FileItem): Promise<FileBackupRecord | undefined> {
|
||||
const mapping = await this.getBackupsMappingFromCache()
|
||||
const record = mapping[file.uuid]
|
||||
return record
|
||||
}
|
||||
|
||||
public async openFileBackup(record: FileBackupRecord): Promise<void> {
|
||||
await this.device.openFileBackup(record)
|
||||
}
|
||||
|
||||
private async handleChangedFiles(files: FileItem[]): Promise<void> {
|
||||
@@ -88,7 +117,7 @@ export class FilesBackupService extends AbstractService {
|
||||
return
|
||||
}
|
||||
|
||||
const mapping = await this.getBackupsMapping()
|
||||
const mapping = await this.getBackupsMappingFromDisk()
|
||||
|
||||
for (const file of files) {
|
||||
if (this.pendingFiles.has(file.uuid)) {
|
||||
@@ -105,6 +134,8 @@ export class FilesBackupService extends AbstractService {
|
||||
this.pendingFiles.delete(file.uuid)
|
||||
}
|
||||
}
|
||||
|
||||
this.invalidateMappingCache()
|
||||
}
|
||||
|
||||
private async performBackupOperation(file: FileItem): Promise<'success' | 'failed' | 'aborted'> {
|
||||
|
||||
@@ -60,6 +60,7 @@ export interface ItemsClientInterface {
|
||||
addNoteCountChangeObserver(observer: TagItemCountChangeObserver): () => void
|
||||
|
||||
allCountableNotesCount(): number
|
||||
allCountableFilesCount(): number
|
||||
|
||||
countableNotesForTag(tag: SNTag | SmartView): number
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ export enum StorageKey {
|
||||
DeinitMode = 'deinit_mode',
|
||||
CodeVerifier = 'code_verifier',
|
||||
LaunchPriorityUuids = 'launch_priority_uuids',
|
||||
LastReadChangelogVersion = 'last_read_changelog_version',
|
||||
}
|
||||
|
||||
export enum NonwrappedStorageKey {
|
||||
|
||||
@@ -3,6 +3,88 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [2.154.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
### Features
|
||||
|
||||
* display number of files for 'Files' view ([#2065](https://github.com/standardnotes/app/issues/2065)) ([767d354](https://github.com/standardnotes/app/commit/767d3547804bc98693dcc769baeed943c24426f3))
|
||||
|
||||
# [2.153.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
### Features
|
||||
|
||||
* convert Super notes to Markdown behind the scenes while publishing to Listed ([#2064](https://github.com/standardnotes/app/issues/2064)) ([cc2762a](https://github.com/standardnotes/app/commit/cc2762a29d83e2e4cd646345f9d3935571b27c62))
|
||||
|
||||
## [2.152.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* exclude files from being counted in 'Notes' view ([#2062](https://github.com/standardnotes/app/issues/2062)) ([2b0c9b1](https://github.com/standardnotes/app/commit/2b0c9b188cd75477c0c1611443daadb8ffa29306))
|
||||
|
||||
## [2.152.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.152.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **snjs:** initial value of subscription ids on files test - run e2e ([81b5123](https://github.com/standardnotes/app/commit/81b51232940b5fade61ad6e72237f739607bed2b))
|
||||
* **snjs:** subscription id increments - run e2e ([7a89a3c](https://github.com/standardnotes/app/commit/7a89a3cd9cb2c364d3b22da96c894040bcf7167b))
|
||||
|
||||
## [2.152.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **snjs:** add additional sign in missing - run e2e ([6bbf0c0](https://github.com/standardnotes/app/commit/6bbf0c02bda0350772638ee19424420b6430dec3))
|
||||
* **snjs:** decrease factory sleep in order to have a continuing session - run e2e ([0fac2dd](https://github.com/standardnotes/app/commit/0fac2dd93974f7072e5e3a73ef705836e163dcac))
|
||||
* **snjs:** remove extra sign in - run e2e ([212e784](https://github.com/standardnotes/app/commit/212e7843ec2ec565c46e06a3acd52a7bbfc16f0b))
|
||||
* **snjs:** run e2e ([75303b5](https://github.com/standardnotes/app/commit/75303b5eb8c1e403541bca57b20ae293cb67f979))
|
||||
|
||||
## [2.152.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* subscription expiring event ([07e2691](https://github.com/standardnotes/app/commit/07e26915b07656e813d439a24f8d4682ba6773af))
|
||||
|
||||
# [2.152.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **snjs:** factory timeout to propagate subscription purchase ([c40b17b](https://github.com/standardnotes/app/commit/c40b17bd4cdb943b299e3cb17f0cbb5ce8e736e2))
|
||||
|
||||
### Features
|
||||
|
||||
* New 'What's New' section in Preferences ([#2049](https://github.com/standardnotes/app/issues/2049)) (skip e2e) ([0a01ddb](https://github.com/standardnotes/app/commit/0a01ddb430154fa4518985458c15c644855c80ea))
|
||||
|
||||
## [2.151.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **snjs:** adjust file bytes used expected ([e36a1ff](https://github.com/standardnotes/app/commit/e36a1ffea0aba9e860c511fa64e0b0ad87890b30))
|
||||
* **snjs:** file subscriptions tests subscription assignment ([25cf4cf](https://github.com/standardnotes/app/commit/25cf4cfd2210b4032f362b4ec86ff6c6aa485891))
|
||||
* **snjs:** remove unnecessary file uploaded event in tests ([b05c793](https://github.com/standardnotes/app/commit/b05c793fe9c0016ce744eace14871291511399a6))
|
||||
* **snjs:** subscription events in tests ([c454176](https://github.com/standardnotes/app/commit/c45417623cc65f4369183069b9df0ba97e9f9965))
|
||||
* **snjs:** wait timeout after subscription purchase ([99163d9](https://github.com/standardnotes/app/commit/99163d90d2084d118433afe311362a1f943087b7))
|
||||
|
||||
## [2.151.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.151.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.151.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-22)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **snjs:** add handling errors on creating websocket connection ([c5e104f](https://github.com/standardnotes/app/commit/c5e104f90bcd0d494b9d4adc0b27f2f942dfe71c))
|
||||
|
||||
## [2.151.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/snjs
|
||||
|
||||
## [2.151.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -291,6 +291,14 @@ export class SNApplication implements ApplicationInterface, AppGroupManagedAppli
|
||||
return this.alertService
|
||||
}
|
||||
|
||||
public get storage(): ExternalServices.StorageServiceInterface {
|
||||
return this.diskStorageService
|
||||
}
|
||||
|
||||
public get actions(): InternalServices.SNActionsService {
|
||||
return this.actionsManager
|
||||
}
|
||||
|
||||
public computePrivateUsername(username: string): Promise<string | undefined> {
|
||||
return ComputePrivateUsername(this.options.crypto, username)
|
||||
}
|
||||
@@ -1375,7 +1383,7 @@ export class SNApplication implements ApplicationInterface, AppGroupManagedAppli
|
||||
}
|
||||
|
||||
private createItemManager() {
|
||||
this.itemManager = new InternalServices.ItemManager(this.payloadManager, this.options, this.internalEventBus)
|
||||
this.itemManager = new InternalServices.ItemManager(this.payloadManager, this.internalEventBus)
|
||||
this.services.push(this.itemManager)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import { ApplicationDisplayOptions, ApplicationSyncOptions } from './OptionalOptions'
|
||||
import { ApplicationSyncOptions } from './OptionalOptions'
|
||||
|
||||
export interface ApplicationOptionsWhichHaveDefaults {
|
||||
loadBatchSize: ApplicationSyncOptions['loadBatchSize']
|
||||
supportsFileNavigation: ApplicationDisplayOptions['supportsFileNavigation']
|
||||
}
|
||||
|
||||
export const ApplicationOptionsDefaults: ApplicationOptionsWhichHaveDefaults = {
|
||||
loadBatchSize: 700,
|
||||
supportsFileNavigation: false,
|
||||
}
|
||||
|
||||
@@ -5,9 +5,8 @@ export interface ApplicationSyncOptions {
|
||||
loadBatchSize: number
|
||||
}
|
||||
|
||||
export interface ApplicationDisplayOptions {
|
||||
supportsFileNavigation: boolean
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface ApplicationDisplayOptions {}
|
||||
|
||||
export interface ApplicationOptionalConfiguratioOptions {
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { removeFromArray } from '@standardnotes/utils'
|
||||
import { SNRootKey } from '@standardnotes/encryption'
|
||||
import { ChallengeService } from '../Challenge'
|
||||
import { ListedService } from '../Listed/ListedService'
|
||||
@@ -18,6 +19,8 @@ import {
|
||||
isErrorDecryptingPayload,
|
||||
CreateEncryptedBackupFileContextPayload,
|
||||
EncryptedTransferPayload,
|
||||
TransferPayload,
|
||||
ItemContent,
|
||||
} from '@standardnotes/models'
|
||||
import { SNSyncService } from '../Sync/SyncService'
|
||||
import { PayloadManager } from '../Payloads/PayloadManager'
|
||||
@@ -34,6 +37,8 @@ import {
|
||||
Challenge,
|
||||
} from '@standardnotes/services'
|
||||
|
||||
type PayloadRequestHandler = (uuid: string) => TransferPayload | undefined
|
||||
|
||||
/**
|
||||
* The Actions Service allows clients to interact with action-based extensions.
|
||||
* Action-based extensions are mostly RESTful actions that can push a local value or
|
||||
@@ -50,6 +55,7 @@ import {
|
||||
*/
|
||||
export class SNActionsService extends AbstractService {
|
||||
private previousPasswords: string[] = []
|
||||
private payloadRequestHandlers: PayloadRequestHandler[] = []
|
||||
|
||||
constructor(
|
||||
private itemManager: ItemManager,
|
||||
@@ -77,10 +83,19 @@ export class SNActionsService extends AbstractService {
|
||||
;(this.challengeService as unknown) = undefined
|
||||
;(this.protocolService as unknown) = undefined
|
||||
;(this.syncService as unknown) = undefined
|
||||
this.payloadRequestHandlers.length = 0
|
||||
this.previousPasswords.length = 0
|
||||
super.deinit()
|
||||
}
|
||||
|
||||
public addPayloadRequestHandler(handler: PayloadRequestHandler) {
|
||||
this.payloadRequestHandlers.push(handler)
|
||||
|
||||
return () => {
|
||||
removeFromArray(this.payloadRequestHandlers, handler)
|
||||
}
|
||||
}
|
||||
|
||||
public getExtensions(): SNActionsExtension[] {
|
||||
const extensionItems = this.itemManager.getItems<SNActionsExtension>(ContentType.ActionsExtension)
|
||||
const excludingListed = extensionItems.filter((extension) => !extension.isListedExtension)
|
||||
@@ -312,7 +327,16 @@ export class SNActionsService extends AbstractService {
|
||||
return {} as ActionResponse
|
||||
}
|
||||
|
||||
private async outgoingPayloadForItem(item: DecryptedItemInterface, decrypted = false) {
|
||||
private async outgoingPayloadForItem(
|
||||
item: DecryptedItemInterface,
|
||||
decrypted = false,
|
||||
): Promise<TransferPayload<ItemContent>> {
|
||||
const payloadFromHandler = this.getPayloadFromRequestHandlers(item.uuid)
|
||||
|
||||
if (payloadFromHandler) {
|
||||
return payloadFromHandler
|
||||
}
|
||||
|
||||
if (decrypted) {
|
||||
return item.payload.ejected()
|
||||
}
|
||||
@@ -323,4 +347,15 @@ export class SNActionsService extends AbstractService {
|
||||
|
||||
return CreateEncryptedBackupFileContextPayload(encrypted)
|
||||
}
|
||||
|
||||
private getPayloadFromRequestHandlers(uuid: string): TransferPayload | undefined {
|
||||
for (const handler of this.payloadRequestHandlers) {
|
||||
const payload = handler(uuid)
|
||||
if (payload) {
|
||||
return payload
|
||||
}
|
||||
}
|
||||
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,19 +38,21 @@ export class SNWebSocketsService extends AbstractService<WebSocketsServiceEvent,
|
||||
}
|
||||
|
||||
async startWebSocketConnection(): Promise<void> {
|
||||
if (!this.webSocketUrl) {
|
||||
return
|
||||
}
|
||||
|
||||
const webSocketConectionToken = await this.createWebSocketConnectionToken()
|
||||
if (webSocketConectionToken === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
if (this.webSocketUrl) {
|
||||
try {
|
||||
this.webSocket = new WebSocket(`${this.webSocketUrl}?authToken=${webSocketConectionToken}`)
|
||||
this.webSocket.onmessage = this.onWebSocketMessage.bind(this)
|
||||
this.webSocket.onclose = this.onWebSocketClose.bind(this)
|
||||
} catch (e) {
|
||||
console.error('Error starting WebSocket connection', e)
|
||||
}
|
||||
try {
|
||||
this.webSocket = new WebSocket(`${this.webSocketUrl}?authToken=${webSocketConectionToken}`)
|
||||
this.webSocket.onmessage = this.onWebSocketMessage.bind(this)
|
||||
this.webSocket.onclose = this.onWebSocketClose.bind(this)
|
||||
} catch (e) {
|
||||
console.error('Error starting WebSocket connection', e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +72,11 @@ export class SNWebSocketsService extends AbstractService<WebSocketsServiceEvent,
|
||||
private async createWebSocketConnectionToken(): Promise<string | undefined> {
|
||||
try {
|
||||
const response = await this.webSocketApiService.createConnectionToken()
|
||||
if (response.data.error) {
|
||||
console.error(response.data.error)
|
||||
|
||||
return undefined
|
||||
}
|
||||
|
||||
return response.data.token
|
||||
} catch (error) {
|
||||
|
||||
@@ -49,7 +49,7 @@ describe('itemManager', () => {
|
||||
let internalEventBus: InternalEventBusInterface
|
||||
|
||||
const createService = () => {
|
||||
return new ItemManager(payloadManager, { supportsFileNavigation: false }, internalEventBus)
|
||||
return new ItemManager(payloadManager, internalEventBus)
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -8,7 +8,6 @@ import * as Models from '@standardnotes/models'
|
||||
import * as Services from '@standardnotes/services'
|
||||
import { PayloadManagerChangeData } from '../Payloads'
|
||||
import { DiagnosticInfo, ItemsClientInterface, ItemRelationshipDirection } from '@standardnotes/services'
|
||||
import { ApplicationDisplayOptions } from '@Lib/Application/Options/OptionalOptions'
|
||||
import { CollectionSort, DecryptedItemInterface, ItemContent, SmartViewDefaultIconName } from '@standardnotes/models'
|
||||
|
||||
type ItemsChangeObserver<I extends Models.DecryptedItemInterface = Models.DecryptedItemInterface> = {
|
||||
@@ -44,7 +43,6 @@ export class ItemManager
|
||||
|
||||
constructor(
|
||||
private payloadManager: PayloadManager,
|
||||
private readonly options: ApplicationDisplayOptions = { supportsFileNavigation: false },
|
||||
protected override internalEventBus: Services.InternalEventBusInterface,
|
||||
) {
|
||||
super(internalEventBus)
|
||||
@@ -55,7 +53,7 @@ export class ItemManager
|
||||
}
|
||||
|
||||
private rebuildSystemSmartViews(criteria: Models.FilterDisplayOptions): Models.SmartView[] {
|
||||
this.systemSmartViews = Models.BuildSmartViews(criteria, this.options)
|
||||
this.systemSmartViews = Models.BuildSmartViews(criteria)
|
||||
return this.systemSmartViews
|
||||
}
|
||||
|
||||
@@ -68,7 +66,7 @@ export class ItemManager
|
||||
{
|
||||
sortBy: 'created_at',
|
||||
sortDirection: 'dsc',
|
||||
hiddenContentTypes: !this.options.supportsFileNavigation ? [ContentType.File] : [],
|
||||
hiddenContentTypes: [],
|
||||
},
|
||||
)
|
||||
this.tagDisplayController = new Models.ItemDisplayController(this.collection, [ContentType.Tag], {
|
||||
@@ -184,12 +182,7 @@ export class ItemManager
|
||||
public getDisplayableNotes(): Models.SNNote[] {
|
||||
assert(this.navigationDisplayController.contentTypes.length === 2)
|
||||
|
||||
const fileContentTypeHidden = !this.options.supportsFileNavigation
|
||||
if (fileContentTypeHidden) {
|
||||
return this.navigationDisplayController.items() as Models.SNNote[]
|
||||
} else {
|
||||
return this.navigationDisplayController.items().filter(Models.isNote)
|
||||
}
|
||||
return this.navigationDisplayController.items().filter(Models.isNote)
|
||||
}
|
||||
|
||||
public getDisplayableFiles(): Models.FileItem[] {
|
||||
@@ -197,7 +190,6 @@ export class ItemManager
|
||||
}
|
||||
|
||||
public getDisplayableNotesAndFiles(): (Models.SNNote | Models.FileItem)[] {
|
||||
assert(this.options.supportsFileNavigation)
|
||||
return this.navigationDisplayController.items()
|
||||
}
|
||||
|
||||
@@ -215,7 +207,6 @@ export class ItemManager
|
||||
|
||||
public override deinit(): void {
|
||||
this.unsubChangeObserver()
|
||||
;(this.options as unknown) = undefined
|
||||
;(this.unsubChangeObserver as unknown) = undefined
|
||||
;(this.payloadManager as unknown) = undefined
|
||||
;(this.collection as unknown) = undefined
|
||||
@@ -289,13 +280,17 @@ export class ItemManager
|
||||
}
|
||||
|
||||
public allCountableNotesCount(): number {
|
||||
return this.tagItemsIndex.allCountableItemsCount()
|
||||
return this.tagItemsIndex.allCountableNotesCount()
|
||||
}
|
||||
|
||||
public allCountableFilesCount(): number {
|
||||
return this.tagItemsIndex.allCountableFilesCount()
|
||||
}
|
||||
|
||||
public countableNotesForTag(tag: Models.SNTag | Models.SmartView): number {
|
||||
if (tag instanceof Models.SmartView) {
|
||||
if (tag.uuid === Models.SystemViewId.AllNotes) {
|
||||
return this.tagItemsIndex.allCountableItemsCount()
|
||||
return this.tagItemsIndex.allCountableNotesCount()
|
||||
}
|
||||
|
||||
throw Error('countableItemsForTag is not meant to be used for smart views.')
|
||||
|
||||
@@ -36,7 +36,7 @@ describe('mutator service', () => {
|
||||
internalEventBus.publish = jest.fn()
|
||||
|
||||
payloadManager = new PayloadManager(internalEventBus)
|
||||
itemManager = new ItemManager(payloadManager, { supportsFileNavigation: false }, internalEventBus)
|
||||
itemManager = new ItemManager(payloadManager, internalEventBus)
|
||||
|
||||
mutatorService = new MutatorService(
|
||||
itemManager,
|
||||
|
||||
@@ -12,6 +12,7 @@ describe('files', function () {
|
||||
let context
|
||||
let fileService
|
||||
let itemManager
|
||||
let subscriptionId = 1001
|
||||
|
||||
beforeEach(function () {
|
||||
localStorage.clear()
|
||||
@@ -39,13 +40,20 @@ describe('files', function () {
|
||||
if (subscription) {
|
||||
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
||||
userEmail: context.email,
|
||||
subscriptionId: 1,
|
||||
subscriptionName: 'PLUS_PLAN',
|
||||
subscriptionId: subscriptionId++,
|
||||
subscriptionName: 'PRO_PLAN',
|
||||
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
||||
timestamp: Date.now(),
|
||||
offline: false,
|
||||
discountCode: null,
|
||||
limitedDiscountPurchased: false,
|
||||
newSubscriber: true,
|
||||
totalActiveSubscriptionsCount: 1,
|
||||
userRegisteredAt: 1,
|
||||
billingFrequency: 12,
|
||||
payAmount: 59.00
|
||||
})
|
||||
await Factory.sleep(0.25)
|
||||
await Factory.sleep(2)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +64,7 @@ describe('files', function () {
|
||||
|
||||
it('should create valet token from server', async function () {
|
||||
await setup({ fakeCrypto: true, subscription: true })
|
||||
|
||||
const remoteIdentifier = Utils.generateUuid()
|
||||
const token = await application.apiService.createFileValetToken(remoteIdentifier, 'write')
|
||||
|
||||
@@ -76,14 +85,21 @@ describe('files', function () {
|
||||
|
||||
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
||||
userEmail: context.email,
|
||||
subscriptionId: 1,
|
||||
subscriptionId: subscriptionId++,
|
||||
subscriptionName: 'PLUS_PLAN',
|
||||
subscriptionExpiresAt: (new Date().getTime() - 3_600_000) * 1_000,
|
||||
timestamp: Date.now(),
|
||||
offline: false,
|
||||
discountCode: null,
|
||||
limitedDiscountPurchased: false,
|
||||
newSubscriber: true,
|
||||
totalActiveSubscriptionsCount: 1,
|
||||
userRegisteredAt: 1,
|
||||
billingFrequency: 12,
|
||||
payAmount: 59.00
|
||||
})
|
||||
|
||||
await Factory.sleep(0.25)
|
||||
await Factory.sleep(2)
|
||||
|
||||
const remoteIdentifier = Utils.generateUuid()
|
||||
const tokenOrError = await application.apiService.createFileValetToken(remoteIdentifier, 'write')
|
||||
@@ -149,10 +165,4 @@ describe('files', function () {
|
||||
|
||||
expect(downloadError).to.be.ok
|
||||
})
|
||||
|
||||
it.skip('should cancel file download', async function () {
|
||||
await setup({ fakeCrypto: false, subscription: true })
|
||||
|
||||
// ...
|
||||
})
|
||||
})
|
||||
|
||||
@@ -5,7 +5,7 @@ chai.use(chaiAsPromised)
|
||||
const expect = chai.expect
|
||||
|
||||
describe('settings service', function () {
|
||||
this.timeout(Factory.TwentySecondTimeout)
|
||||
this.timeout(Factory.ThirtySecondTimeout)
|
||||
|
||||
const validSetting = SettingName.GoogleDriveBackupFrequency
|
||||
const fakePayload = 'Im so meta even this acronym'
|
||||
@@ -13,21 +13,21 @@ describe('settings service', function () {
|
||||
|
||||
let application
|
||||
let context
|
||||
let user
|
||||
let subscriptionId = 2001
|
||||
|
||||
beforeEach(async function () {
|
||||
localStorage.clear()
|
||||
context = await Factory.createAppContextWithFakeCrypto()
|
||||
|
||||
await context.launch()
|
||||
|
||||
application = context.application
|
||||
|
||||
const registerResponse = await Factory.registerUserToApplication({
|
||||
await Factory.registerUserToApplication({
|
||||
application: context.application,
|
||||
email: context.email,
|
||||
password: context.password,
|
||||
})
|
||||
user = registerResponse.user
|
||||
})
|
||||
|
||||
const reInitializeApplicationWithRealCrypto = async () => {
|
||||
@@ -39,16 +39,16 @@ describe('settings service', function () {
|
||||
|
||||
application = context.application
|
||||
|
||||
const registerResponse = await Factory.registerUserToApplication({
|
||||
await Factory.registerUserToApplication({
|
||||
application: context.application,
|
||||
email: context.email,
|
||||
password: context.password,
|
||||
})
|
||||
user = registerResponse.user
|
||||
}
|
||||
|
||||
afterEach(async function () {
|
||||
await Factory.safeDeinit(application)
|
||||
localStorage.clear()
|
||||
})
|
||||
|
||||
it('creates and reads a setting', async function () {
|
||||
@@ -119,14 +119,21 @@ describe('settings service', function () {
|
||||
it('reads a subscription setting', async () => {
|
||||
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
||||
userEmail: context.email,
|
||||
subscriptionId: 1,
|
||||
subscriptionId: subscriptionId++,
|
||||
subscriptionName: 'PRO_PLAN',
|
||||
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
||||
timestamp: Date.now(),
|
||||
offline: false,
|
||||
discountCode: null,
|
||||
limitedDiscountPurchased: false,
|
||||
newSubscriber: true,
|
||||
totalActiveSubscriptionsCount: 1,
|
||||
userRegisteredAt: 1,
|
||||
billingFrequency: 12,
|
||||
payAmount: 59.00
|
||||
})
|
||||
|
||||
await Factory.sleep(1)
|
||||
await Factory.sleep(2)
|
||||
|
||||
const setting = await application.settings.getSubscriptionSetting('FILE_UPLOAD_BYTES_LIMIT')
|
||||
expect(setting).to.be.a('string')
|
||||
@@ -137,11 +144,18 @@ describe('settings service', function () {
|
||||
|
||||
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
||||
userEmail: context.email,
|
||||
subscriptionId: 1,
|
||||
subscriptionId: subscriptionId,
|
||||
subscriptionName: 'PRO_PLAN',
|
||||
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
||||
timestamp: Date.now(),
|
||||
offline: false,
|
||||
discountCode: null,
|
||||
limitedDiscountPurchased: false,
|
||||
newSubscriber: true,
|
||||
totalActiveSubscriptionsCount: 1,
|
||||
userRegisteredAt: 1,
|
||||
billingFrequency: 12,
|
||||
payAmount: 59.00
|
||||
})
|
||||
await Factory.sleep(1)
|
||||
|
||||
@@ -150,37 +164,41 @@ describe('settings service', function () {
|
||||
|
||||
await Files.uploadFile(application.fileService, buffer, 'my-file', 'md', 1000)
|
||||
|
||||
await Factory.publishMockedEvent('FILE_UPLOADED', {
|
||||
userUuid: user.uuid,
|
||||
fileByteSize: 123,
|
||||
filePath: 'foobar',
|
||||
fileName: 'barbuzz',
|
||||
})
|
||||
await Factory.sleep(1)
|
||||
|
||||
const limitSettingBefore = await application.settings.getSubscriptionSetting('FILE_UPLOAD_BYTES_LIMIT')
|
||||
expect(limitSettingBefore).to.equal('107374182400')
|
||||
|
||||
const usedSettingBefore = await application.settings.getSubscriptionSetting('FILE_UPLOAD_BYTES_USED')
|
||||
expect(usedSettingBefore).to.equal('123')
|
||||
|
||||
expect(usedSettingBefore).to.equal('196')
|
||||
|
||||
await Factory.publishMockedEvent('SUBSCRIPTION_EXPIRED', {
|
||||
userEmail: context.email,
|
||||
subscriptionId: 1,
|
||||
subscriptionId: subscriptionId++,
|
||||
subscriptionName: 'PRO_PLAN',
|
||||
timestamp: Date.now(),
|
||||
offline: false,
|
||||
totalActiveSubscriptionsCount: 1,
|
||||
userExistingSubscriptionsCount: 1,
|
||||
billingFrequency: 12,
|
||||
payAmount: 59.00
|
||||
})
|
||||
await Factory.sleep(1)
|
||||
|
||||
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
||||
userEmail: context.email,
|
||||
subscriptionId: 2,
|
||||
subscriptionId: subscriptionId++,
|
||||
subscriptionName: 'PRO_PLAN',
|
||||
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
||||
timestamp: Date.now(),
|
||||
offline: false,
|
||||
discountCode: null,
|
||||
limitedDiscountPurchased: false,
|
||||
newSubscriber: false,
|
||||
totalActiveSubscriptionsCount: 2,
|
||||
userRegisteredAt: 1,
|
||||
billingFrequency: 12,
|
||||
payAmount: 59.00
|
||||
})
|
||||
await Factory.sleep(1)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ describe('subscriptions', function () {
|
||||
let application
|
||||
let context
|
||||
let subscriptionManager
|
||||
let subscriptionId = 3001
|
||||
|
||||
afterEach(async function () {
|
||||
await Factory.safeDeinit(application)
|
||||
@@ -32,13 +33,20 @@ describe('subscriptions', function () {
|
||||
|
||||
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
||||
userEmail: context.email,
|
||||
subscriptionId: 1,
|
||||
subscriptionId: subscriptionId++,
|
||||
subscriptionName: 'PRO_PLAN',
|
||||
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
||||
timestamp: Date.now(),
|
||||
offline: false,
|
||||
discountCode: null,
|
||||
limitedDiscountPurchased: false,
|
||||
newSubscriber: true,
|
||||
totalActiveSubscriptionsCount: 1,
|
||||
userRegisteredAt: 1,
|
||||
billingFrequency: 12,
|
||||
payAmount: 59.00
|
||||
})
|
||||
await Factory.sleep(0.25)
|
||||
await Factory.sleep(2)
|
||||
})
|
||||
|
||||
it('should invite a user by email to a shared subscription', async () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/snjs",
|
||||
"version": "2.151.6",
|
||||
"version": "2.154.0",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.3.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/toast
|
||||
|
||||
## [1.3.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-19)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/toast
|
||||
|
||||
## [1.3.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/toast
|
||||
|
||||
## [1.3.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-16)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/toast
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/toast",
|
||||
"version": "1.3.9",
|
||||
"version": "1.3.12",
|
||||
"private": true,
|
||||
"main": "./src/index.ts",
|
||||
"scripts": {
|
||||
|
||||
@@ -3,6 +3,70 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.17.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/ui-services
|
||||
|
||||
## [1.17.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/ui-services
|
||||
|
||||
## [1.17.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/ui-services
|
||||
|
||||
## [1.17.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-28)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/ui-services
|
||||
|
||||
## [1.17.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-27)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/ui-services
|
||||
|
||||
# [1.17.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-25)
|
||||
|
||||
### Features
|
||||
|
||||
* Markdown, HTML & JSON export options for super notes ([#2054](https://github.com/standardnotes/app/issues/2054)) ([dcc8cfb](https://github.com/standardnotes/app/commit/dcc8cfbe45644dbb77e0ade0073017e6ac66164c))
|
||||
|
||||
# [1.16.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-24)
|
||||
|
||||
### Features
|
||||
|
||||
* New 'What's New' section in Preferences ([#2049](https://github.com/standardnotes/app/issues/2049)) (skip e2e) ([0a01ddb](https://github.com/standardnotes/app/commit/0a01ddb430154fa4518985458c15c644855c80ea))
|
||||
|
||||
# [1.15.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
### Features
|
||||
|
||||
* option to show markdown preview for super notes (skip e2e) ([#2048](https://github.com/standardnotes/app/issues/2048)) ([8579ff3](https://github.com/standardnotes/app/commit/8579ff39b1f81dbbcf22b4031ede183ab4287262))
|
||||
|
||||
## [1.14.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/ui-services
|
||||
|
||||
## [1.14.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-23)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/ui-services
|
||||
|
||||
## [1.14.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-19)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/ui-services
|
||||
|
||||
## [1.14.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/ui-services
|
||||
|
||||
# [1.14.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
### Features
|
||||
|
||||
* keyboard shortcuts for primary actions ([#2030](https://github.com/standardnotes/app/issues/2030)) ([f49ba6b](https://github.com/standardnotes/app/commit/f49ba6bd4d38e4026bd88630014126a6e0086351))
|
||||
|
||||
## [1.13.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/ui-services
|
||||
|
||||
## [1.13.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-11-18)
|
||||
|
||||
**Note:** Version bump only for package @standardnotes/ui-services
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@standardnotes/ui-services",
|
||||
"version": "1.13.17",
|
||||
"version": "1.17.5",
|
||||
"engines": {
|
||||
"node": ">=16.0.0 <17.0.0"
|
||||
},
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
export type ChangelogVersion = {
|
||||
version: string | null
|
||||
title: string
|
||||
date: string | null
|
||||
body: string
|
||||
parsed: Record<string, string[]>
|
||||
}
|
||||
|
||||
export interface Changelog {
|
||||
title: string
|
||||
description: string
|
||||
versions: Array<ChangelogVersion>
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import { Environment } from '@standardnotes/models'
|
||||
import { StorageServiceInterface, StorageKey } from '@standardnotes/services'
|
||||
import { Changelog, ChangelogVersion } from './Changelog'
|
||||
import { ChangelogServiceInterface } from './ChangelogServiceInterface'
|
||||
import { LegacyWebToDesktopVersionMapping } from './LegacyDesktopMapping'
|
||||
import { LegacyWebToMobileVersionMapping } from './LegacyMobileMapping'
|
||||
|
||||
const WebChangelogUrl = 'https://raw.githubusercontent.com/standardnotes/app/main/packages/web/CHANGELOG.md.json'
|
||||
const DesktopDownloadsUrlBase = 'https://github.com/standardnotes/app/releases/tag/%40standardnotes%2Fdesktop%40'
|
||||
|
||||
export class ChangelogService implements ChangelogServiceInterface {
|
||||
private changeLog?: Changelog
|
||||
|
||||
constructor(private environment: Environment, private diskService: StorageServiceInterface) {}
|
||||
|
||||
private async performDownloadChangelog(): Promise<Changelog> {
|
||||
const response = await fetch(WebChangelogUrl)
|
||||
const changelog = await response.text()
|
||||
const parsedData = JSON.parse(changelog)
|
||||
return parsedData
|
||||
}
|
||||
|
||||
public async getChangelog(): Promise<Changelog> {
|
||||
if (this.changeLog) {
|
||||
return this.changeLog
|
||||
}
|
||||
|
||||
this.changeLog = await this.performDownloadChangelog()
|
||||
|
||||
if (this.environment !== Environment.Web) {
|
||||
const legacyMapping = this.getLegacyMapping()
|
||||
|
||||
this.changeLog.versions = this.changeLog.versions.map((versionRecord) => {
|
||||
const versionString = versionRecord.version || ''
|
||||
return {
|
||||
...versionRecord,
|
||||
version: legacyMapping[versionString] || versionRecord.version,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return this.changeLog
|
||||
}
|
||||
|
||||
public markAsRead(): void {
|
||||
if (!this.changeLog) {
|
||||
return
|
||||
}
|
||||
|
||||
this.diskService.setValue(StorageKey.LastReadChangelogVersion, this.changeLog.versions[0].version)
|
||||
}
|
||||
|
||||
public getLastReadVersion(): string | undefined {
|
||||
return this.diskService.getValue(StorageKey.LastReadChangelogVersion)
|
||||
}
|
||||
|
||||
public async getVersions(): Promise<ChangelogVersion[]> {
|
||||
const changelog = await this.getChangelog()
|
||||
|
||||
return changelog.versions
|
||||
}
|
||||
|
||||
private getLegacyMapping(): Record<string, string> {
|
||||
return this.environment === Environment.Desktop
|
||||
? LegacyWebToDesktopVersionMapping
|
||||
: this.environment === Environment.Mobile
|
||||
? LegacyWebToMobileVersionMapping
|
||||
: {}
|
||||
}
|
||||
|
||||
public getDesktopDownloadsUrl(version: string): string {
|
||||
return DesktopDownloadsUrlBase + version
|
||||
}
|
||||
|
||||
public getDesktopVersionForWebVersion(webVersion: string): string {
|
||||
return LegacyWebToDesktopVersionMapping[webVersion] ?? webVersion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { Changelog, ChangelogVersion } from './Changelog'
|
||||
|
||||
export interface ChangelogServiceInterface {
|
||||
getChangelog(): Promise<Changelog>
|
||||
getVersions(): Promise<ChangelogVersion[]>
|
||||
getDesktopDownloadsUrl(version: string): string
|
||||
getDesktopVersionForWebVersion(webVersion: string): string
|
||||
markAsRead(): void
|
||||
getLastReadVersion(): string | undefined
|
||||
}
|
||||
@@ -0,0 +1,351 @@
|
||||
/**
|
||||
* Before 11/23/2022, web and desktop used independent semantic versioning. After this point, desktop automatically
|
||||
* uses web's versioning. The mapping below allows us to see what particular web version a legacy desktop version maps to
|
||||
*/
|
||||
export const LegacyWebToDesktopVersionMapping: Record<string, string> = {
|
||||
'3.107.0': '3.101.2',
|
||||
'3.106.0': '3.101.1',
|
||||
'3.105.0': '3.101.0',
|
||||
'3.104.1': '3.100.18',
|
||||
'3.104.0': '3.100.17',
|
||||
'3.103.2': '3.100.16',
|
||||
'3.103.1': '3.100.15',
|
||||
'3.103.0': '3.100.14',
|
||||
'3.102.0': '3.100.13',
|
||||
'3.101.2': '3.100.12',
|
||||
'3.101.1': '3.100.11',
|
||||
'3.101.0': '3.100.10',
|
||||
'3.100.8': '3.100.9',
|
||||
'3.100.7': '3.100.8',
|
||||
'3.100.6': '3.100.7',
|
||||
'3.100.5': '3.100.6',
|
||||
'3.100.4': '3.100.5',
|
||||
'3.100.3': '3.100.4',
|
||||
'3.100.2': '3.100.3',
|
||||
'3.100.1': '3.100.2',
|
||||
'3.100.0': '3.100.1',
|
||||
'3.99.0': '3.100.0',
|
||||
'3.98.2': '3.23.301',
|
||||
'3.98.1': '3.23.300',
|
||||
'3.98.0': '3.23.299',
|
||||
'3.97.0': '3.23.298',
|
||||
'3.96.1': '3.23.297',
|
||||
'3.96.0': '3.23.296',
|
||||
'3.95.1': '3.23.295',
|
||||
'3.95.0': '3.23.294',
|
||||
'3.94.2': '3.23.293',
|
||||
'3.94.1': '3.23.292',
|
||||
'3.94.0': '3.23.291',
|
||||
'3.93.19': '3.23.290',
|
||||
'3.93.18': '3.23.289',
|
||||
'3.93.17': '3.23.288',
|
||||
'3.93.16': '3.23.287',
|
||||
'3.93.15': '3.23.286',
|
||||
'3.93.14': '3.23.285',
|
||||
'3.93.13': '3.23.284',
|
||||
'3.93.12': '3.23.283',
|
||||
'3.93.11': '3.23.282',
|
||||
'3.93.10': '3.23.281',
|
||||
'3.93.9': '3.23.280',
|
||||
'3.93.8': '3.23.279',
|
||||
'3.93.7': '3.23.278',
|
||||
'3.93.6': '3.23.277',
|
||||
'3.93.5': '3.23.276',
|
||||
'3.93.4': '3.23.275',
|
||||
'3.93.3': '3.23.274',
|
||||
'3.93.2': '3.23.273',
|
||||
'3.93.1': '3.23.272',
|
||||
'3.93.0': '3.23.271',
|
||||
'3.92.0': '3.23.270',
|
||||
'3.91.1': '3.23.269',
|
||||
'3.91.0': '3.23.268',
|
||||
'3.90.11': '3.23.267',
|
||||
'3.90.10': '3.23.266',
|
||||
'3.90.9': '3.23.265',
|
||||
'3.90.8': '3.23.264',
|
||||
'3.90.7': '3.23.263',
|
||||
'3.90.6': '3.23.262',
|
||||
'3.90.5': '3.23.261',
|
||||
'3.90.4': '3.23.260',
|
||||
'3.90.3': '3.23.259',
|
||||
'3.90.2': '3.23.258',
|
||||
'3.90.1': '3.23.257',
|
||||
'3.90.0': '3.23.256',
|
||||
'3.89.0': '3.23.255',
|
||||
'3.88.1': '3.23.254',
|
||||
'3.88.0': '3.23.253',
|
||||
'3.87.2': '3.23.252',
|
||||
'3.87.1': '3.23.251',
|
||||
'3.87.0': '3.23.250',
|
||||
'3.86.0': '3.23.249',
|
||||
'3.85.2': '3.23.248',
|
||||
'3.85.1': '3.23.247',
|
||||
'3.85.0': '3.23.246',
|
||||
'3.84.7': '3.23.245',
|
||||
'3.84.6': '3.23.244',
|
||||
'3.84.5': '3.23.243',
|
||||
'3.84.4': '3.23.242',
|
||||
'3.84.3': '3.23.241',
|
||||
'3.84.2': '3.23.240',
|
||||
'3.84.1': '3.23.239',
|
||||
'3.84.0': '3.23.238',
|
||||
'3.83.0': '3.23.237',
|
||||
'3.82.6': '3.23.236',
|
||||
'3.82.5': '3.23.235',
|
||||
'3.82.4': '3.23.234',
|
||||
'3.82.3': '3.23.233',
|
||||
'3.82.2': '3.23.232',
|
||||
'3.82.1': '3.23.231',
|
||||
'3.82.0': '3.23.230',
|
||||
'3.81.0': '3.23.229',
|
||||
'3.80.1': '3.23.228',
|
||||
'3.80.0': '3.23.227',
|
||||
'3.79.0': '3.23.226',
|
||||
'3.78.1': '3.23.225',
|
||||
'3.78.0': '3.23.224',
|
||||
'3.77.1': '3.23.223',
|
||||
'3.77.0': '3.23.222',
|
||||
'3.76.2': '3.23.221',
|
||||
'3.76.1': '3.23.220',
|
||||
'3.76.0': '3.23.219',
|
||||
'3.75.1': '3.23.218',
|
||||
'3.75.0': '3.23.217',
|
||||
'3.74.0': '3.23.216',
|
||||
'3.73.0': '3.23.215',
|
||||
'3.72.4': '3.23.214',
|
||||
'3.72.3': '3.23.213',
|
||||
'3.72.2': '3.23.212',
|
||||
'3.72.1': '3.23.211',
|
||||
'3.72.0': '3.23.210',
|
||||
'3.71.8': '3.23.209',
|
||||
'3.71.7': '3.23.208',
|
||||
'3.71.6': '3.23.207',
|
||||
'3.71.5': '3.23.206',
|
||||
'3.71.4': '3.23.205',
|
||||
'3.71.3': '3.23.204',
|
||||
'3.71.2': '3.23.203',
|
||||
'3.71.1': '3.23.202',
|
||||
'3.71.0': '3.23.201',
|
||||
'3.70.5': '3.23.200',
|
||||
'3.70.4': '3.23.199',
|
||||
'3.70.3': '3.23.198',
|
||||
'3.70.2': '3.23.197',
|
||||
'3.70.1': '3.23.196',
|
||||
'3.70.0': '3.23.195',
|
||||
'3.69.1': '3.23.194',
|
||||
'3.69.0': '3.23.193',
|
||||
'3.68.6': '3.23.192',
|
||||
'3.68.5': '3.23.191',
|
||||
'3.68.4': '3.23.190',
|
||||
'3.68.3': '3.23.189',
|
||||
'3.68.2': '3.23.188',
|
||||
'3.68.1': '3.23.187',
|
||||
'3.68.0': '3.23.186',
|
||||
'3.67.4': '3.23.185',
|
||||
'3.67.3': '3.23.184',
|
||||
'3.67.2': '3.23.183',
|
||||
'3.67.1': '3.23.182',
|
||||
'3.67.0': '3.23.181',
|
||||
'3.66.0': '3.23.180',
|
||||
'3.65.0': '3.23.179',
|
||||
'3.64.0': '3.23.178',
|
||||
'3.63.3': '3.23.177',
|
||||
'3.63.2': '3.23.176',
|
||||
'3.63.1': '3.23.175',
|
||||
'3.63.0': '3.23.174',
|
||||
'3.62.4': '3.23.173',
|
||||
'3.62.3': '3.23.172',
|
||||
'3.62.2': '3.23.171',
|
||||
'3.62.1': '3.23.170',
|
||||
'3.62.0': '3.23.169',
|
||||
'3.61.0': '3.23.168',
|
||||
'3.60.0': '3.23.167',
|
||||
'3.59.3': '3.23.166',
|
||||
'3.59.2': '3.23.165',
|
||||
'3.59.1': '3.23.164',
|
||||
'3.59.0': '3.23.163',
|
||||
'3.58.1': '3.23.162',
|
||||
'3.58.0': '3.23.161',
|
||||
'3.57.3': '3.23.160',
|
||||
'3.57.2': '3.23.159',
|
||||
'3.57.1': '3.23.158',
|
||||
'3.57.0': '3.23.157',
|
||||
'3.56.0': '3.23.156',
|
||||
'3.55.2': '3.23.155',
|
||||
'3.55.1': '3.23.154',
|
||||
'3.55.0': '3.23.153',
|
||||
'3.54.6': '3.23.152',
|
||||
'3.54.5': '3.23.151',
|
||||
'3.54.4': '3.23.150',
|
||||
'3.54.3': '3.23.149',
|
||||
'3.54.2': '3.23.148',
|
||||
'3.54.1': '3.23.147',
|
||||
'3.54.0': '3.23.146',
|
||||
'3.53.0': '3.23.145',
|
||||
'3.52.1': '3.23.144',
|
||||
'3.52.0': '3.23.143',
|
||||
'3.51.0': '3.23.142',
|
||||
'3.50.6': '3.23.141',
|
||||
'3.50.5': '3.23.140',
|
||||
'3.50.4': '3.23.139',
|
||||
'3.50.3': '3.23.138',
|
||||
'3.50.2': '3.23.137',
|
||||
'3.50.1': '3.23.136',
|
||||
'3.50.0': '3.23.135',
|
||||
'3.49.3': '3.23.134',
|
||||
'3.49.2': '3.23.133',
|
||||
'3.49.1': '3.23.132',
|
||||
'3.49.0': '3.23.131',
|
||||
'3.48.3': '3.23.130',
|
||||
'3.48.2': '3.23.129',
|
||||
'3.48.1': '3.23.128',
|
||||
'3.48.0': '3.23.127',
|
||||
'3.47.3': '3.23.126',
|
||||
'3.47.2': '3.23.125',
|
||||
'3.47.1': '3.23.124',
|
||||
'3.47.0': '3.23.123',
|
||||
'3.46.3': '3.23.122',
|
||||
'3.46.2': '3.23.121',
|
||||
'3.46.1': '3.23.120',
|
||||
'3.46.0': '3.23.119',
|
||||
'3.45.18': '3.23.118',
|
||||
'3.45.17': '3.23.117',
|
||||
'3.45.16': '3.23.116',
|
||||
'3.45.15': '3.23.115',
|
||||
'3.45.14': '3.23.114',
|
||||
'3.45.13': '3.23.113',
|
||||
'3.45.12': '3.23.112',
|
||||
'3.45.11': '3.23.111',
|
||||
'3.45.10': '3.23.110',
|
||||
'3.45.9': '3.23.109',
|
||||
'3.45.8': '3.23.108',
|
||||
'3.45.7': '3.23.107',
|
||||
'3.45.6': '3.23.106',
|
||||
'3.45.5': '3.23.105',
|
||||
'3.45.4': '3.23.104',
|
||||
'3.45.3': '3.23.103',
|
||||
'3.45.2': '3.23.102',
|
||||
'3.45.1': '3.23.101',
|
||||
'3.45.0': '3.23.100',
|
||||
'3.44.7': '3.23.99',
|
||||
'3.44.6': '3.23.98',
|
||||
'3.44.5': '3.23.97',
|
||||
'3.44.4': '3.23.96',
|
||||
'3.44.3': '3.23.95',
|
||||
'3.44.2': '3.23.94',
|
||||
'3.44.1': '3.23.93',
|
||||
'3.44.0': '3.23.92',
|
||||
'3.43.1': '3.23.91',
|
||||
'3.43.0': '3.23.90',
|
||||
'3.42.1': '3.23.89',
|
||||
'3.42.0': '3.23.88',
|
||||
'3.41.3': '3.23.87',
|
||||
'3.41.2': '3.23.86',
|
||||
'3.41.1': '3.23.85',
|
||||
'3.41.0': '3.23.84',
|
||||
'3.40.7': '3.23.83',
|
||||
'3.40.6': '3.23.82',
|
||||
'3.40.5': '3.23.81',
|
||||
'3.40.4': '3.23.80',
|
||||
'3.40.3': '3.23.79',
|
||||
'3.40.2': '3.23.78',
|
||||
'3.40.1': '3.23.77',
|
||||
'3.40.0': '3.23.76',
|
||||
'3.39.1': '3.23.75',
|
||||
'3.39.0': '3.23.74',
|
||||
'3.38.6': '3.23.73',
|
||||
'3.38.5': '3.23.72',
|
||||
'3.38.4': '3.23.71',
|
||||
'3.38.3': '3.23.70',
|
||||
'3.38.2': '3.23.69',
|
||||
'3.38.1': '3.23.68',
|
||||
'3.38.0': '3.23.67',
|
||||
'3.37.7': '3.23.66',
|
||||
'3.37.6': '3.23.65',
|
||||
'3.37.5': '3.23.64',
|
||||
'3.37.4': '3.23.63',
|
||||
'3.37.3': '3.23.62',
|
||||
'3.37.2': '3.23.61',
|
||||
'3.37.1': '3.23.60',
|
||||
'3.37.0': '3.23.59',
|
||||
'3.36.0': '3.23.58',
|
||||
'3.35.2': '3.23.57',
|
||||
'3.35.1': '3.23.56',
|
||||
'3.35.0': '3.23.55',
|
||||
'3.34.0': '3.23.54',
|
||||
'3.33.8': '3.23.53',
|
||||
'3.33.7': '3.23.52',
|
||||
'3.33.6': '3.23.51',
|
||||
'3.33.5': '3.23.50',
|
||||
'3.33.4': '3.23.49',
|
||||
'3.33.3': '3.23.48',
|
||||
'3.33.2': '3.23.47',
|
||||
'3.33.1': '3.23.46',
|
||||
'3.33.0': '3.23.45',
|
||||
'3.32.0': '3.23.44',
|
||||
'3.31.1': '3.23.43',
|
||||
'3.31.0': '3.23.42',
|
||||
'3.30.0': '3.23.41',
|
||||
'3.29.2': '3.23.40',
|
||||
'3.29.1': '3.23.39',
|
||||
'3.29.0': '3.23.38',
|
||||
'3.28.1': '3.23.37',
|
||||
'3.28.0': '3.23.36',
|
||||
'3.27.7': '3.23.35',
|
||||
'3.27.6': '3.23.34',
|
||||
'3.27.5': '3.23.33',
|
||||
'3.27.4': '3.23.32',
|
||||
'3.27.3': '3.23.31',
|
||||
'3.27.2': '3.23.30',
|
||||
'3.27.1': '3.23.29',
|
||||
'3.27.0': '3.23.28',
|
||||
'3.26.4': '3.23.27',
|
||||
'3.26.3': '3.23.26',
|
||||
'3.26.2': '3.23.25',
|
||||
'3.26.1': '3.23.24',
|
||||
'3.26.0': '3.23.23',
|
||||
'3.25.0': '3.23.22',
|
||||
'3.24.6': '3.23.21',
|
||||
'3.24.5': '3.23.20',
|
||||
'3.24.4': '3.23.19',
|
||||
'3.24.3': '3.23.18',
|
||||
'3.24.3-alpha.1': '3.23.17',
|
||||
'3.24.3-alpha.0': '3.23.16',
|
||||
'3.24.2': '3.23.15',
|
||||
'3.24.2-alpha.1': '3.23.14',
|
||||
'3.24.2-alpha.0': '3.23.13',
|
||||
'3.24.1': '3.23.12',
|
||||
'3.24.1-alpha.0': '3.23.11',
|
||||
'3.24.0': '3.23.10',
|
||||
'3.24.0-alpha.7': '3.23.9',
|
||||
'3.24.0-alpha.6': '3.23.8',
|
||||
'3.24.0-alpha.5': '3.23.7',
|
||||
'3.24.0-alpha.4': '3.23.6',
|
||||
'3.24.0-alpha.3': '3.23.5',
|
||||
'3.24.0-alpha.2': '3.23.4',
|
||||
'3.24.0-alpha.1': '3.23.3',
|
||||
'3.24.0-alpha.0': '3.23.2',
|
||||
'3.23.0': '3.23.1',
|
||||
'3.23.0-alpha.1': '3.23.0',
|
||||
'3.23.0-alpha.0': '3.22.21',
|
||||
'3.22.7-alpha.0': '3.22.20',
|
||||
'3.22.6': '3.22.19',
|
||||
'3.22.6-alpha.0': '3.22.18',
|
||||
'3.22.5': '3.22.17',
|
||||
'3.22.4': '3.22.13-alpha.9',
|
||||
'3.22.3': '3.22.13-alpha.8',
|
||||
'3.22.3-alpha.9': '3.22.16-alpha.1',
|
||||
'3.22.3-alpha.8': '3.22.16-alpha.0',
|
||||
'3.22.3-alpha.7': '3.22.15',
|
||||
'3.22.3-alpha.6': '3.22.15-alpha.3',
|
||||
'3.22.3-alpha.5': '3.22.15-alpha.2',
|
||||
'3.22.3-alpha.4': '3.22.15-alpha.1',
|
||||
'3.22.3-alpha.3': '3.22.15-alpha.0',
|
||||
'3.22.3-alpha.2': '3.22.14',
|
||||
'3.22.3-alpha.1': '3.22.14-alpha.0',
|
||||
'3.22.3-alpha.0': '3.22.13',
|
||||
'3.22.2': '3.22.13-alpha.10',
|
||||
'3.22.1': '3.22.13-alpha.7',
|
||||
'3.22.0': '3.22.13-alpha.6',
|
||||
'3.21.0': '3.22.13-alpha.5',
|
||||
}
|
||||
@@ -0,0 +1,351 @@
|
||||
/**
|
||||
* Before 11/23/2022, web and mobile used independent semantic versioning. After this point, mobile automatically
|
||||
* uses web's versioning. The mapping below allows us to see what particular web version a legacy mobile version maps to
|
||||
*/
|
||||
export const LegacyWebToMobileVersionMapping: Record<string, string> = {
|
||||
'3.107.0': '3.46.31',
|
||||
'3.106.0': '3.46.30',
|
||||
'3.105.0': '3.46.29',
|
||||
'3.104.1': '3.46.28',
|
||||
'3.104.0': '3.46.27',
|
||||
'3.103.2': '3.46.26',
|
||||
'3.103.1': '3.46.25',
|
||||
'3.103.0': '3.46.24',
|
||||
'3.102.0': '3.46.23',
|
||||
'3.101.2': '3.46.22',
|
||||
'3.101.1': '3.46.21',
|
||||
'3.101.0': '3.46.20',
|
||||
'3.100.8': '3.46.19',
|
||||
'3.100.7': '3.46.18',
|
||||
'3.100.6': '3.46.17',
|
||||
'3.100.5': '3.46.16',
|
||||
'3.100.4': '3.46.15',
|
||||
'3.100.3': '3.46.14',
|
||||
'3.100.2': '3.46.13',
|
||||
'3.100.1': '3.46.12',
|
||||
'3.100.0': '3.46.11',
|
||||
'3.99.0': '3.46.10',
|
||||
'3.98.2': '3.46.9',
|
||||
'3.98.1': '3.46.8',
|
||||
'3.98.0': '3.46.7',
|
||||
'3.97.0': '3.46.6',
|
||||
'3.96.1': '3.46.5',
|
||||
'3.96.0': '3.46.4',
|
||||
'3.95.1': '3.46.3',
|
||||
'3.95.0': '3.46.2',
|
||||
'3.94.2': '3.46.1',
|
||||
'3.94.1': '3.46.0',
|
||||
'3.94.0': '3.45.42',
|
||||
'3.93.19': '3.45.41',
|
||||
'3.93.18': '3.45.40',
|
||||
'3.93.17': '3.45.39',
|
||||
'3.93.16': '3.45.38',
|
||||
'3.93.15': '3.45.37',
|
||||
'3.93.14': '3.45.36',
|
||||
'3.93.13': '3.45.35',
|
||||
'3.93.12': '3.45.34',
|
||||
'3.93.11': '3.45.33',
|
||||
'3.93.10': '3.45.32',
|
||||
'3.93.9': '3.45.31',
|
||||
'3.93.8': '3.45.30',
|
||||
'3.93.7': '3.45.29',
|
||||
'3.93.6': '3.45.28',
|
||||
'3.93.5': '3.45.27',
|
||||
'3.93.4': '3.45.26',
|
||||
'3.93.3': '3.45.25',
|
||||
'3.93.2': '3.45.24',
|
||||
'3.93.1': '3.45.23',
|
||||
'3.93.0': '3.45.22',
|
||||
'3.92.0': '3.45.21',
|
||||
'3.91.1': '3.45.20',
|
||||
'3.91.0': '3.45.19',
|
||||
'3.90.11': '3.45.18',
|
||||
'3.90.10': '3.45.17',
|
||||
'3.90.9': '3.45.16',
|
||||
'3.90.8': '3.45.15',
|
||||
'3.90.7': '3.45.14',
|
||||
'3.90.6': '3.45.13',
|
||||
'3.90.5': '3.45.12',
|
||||
'3.90.4': '3.45.11',
|
||||
'3.90.3': '3.45.10',
|
||||
'3.90.2': '3.45.9',
|
||||
'3.90.1': '3.45.8',
|
||||
'3.90.0': '3.45.7',
|
||||
'3.89.0': '3.45.6',
|
||||
'3.88.1': '3.45.5',
|
||||
'3.88.0': '3.45.4',
|
||||
'3.87.2': '3.45.3',
|
||||
'3.87.1': '3.45.2',
|
||||
'3.87.0': '3.45.1',
|
||||
'3.86.0': '3.45.0',
|
||||
'3.85.2': '3.44.5',
|
||||
'3.85.1': '3.44.4',
|
||||
'3.85.0': '3.44.3',
|
||||
'3.84.7': '3.44.2',
|
||||
'3.84.6': '3.44.1',
|
||||
'3.84.5': '3.44.0',
|
||||
'3.84.4': '3.43.33',
|
||||
'3.84.3': '3.43.32',
|
||||
'3.84.2': '3.43.31',
|
||||
'3.84.1': '3.43.30',
|
||||
'3.84.0': '3.43.29',
|
||||
'3.83.0': '3.43.28',
|
||||
'3.82.6': '3.43.27',
|
||||
'3.82.5': '3.43.26',
|
||||
'3.82.4': '3.43.25',
|
||||
'3.82.3': '3.43.24',
|
||||
'3.82.2': '3.43.23',
|
||||
'3.82.1': '3.43.22',
|
||||
'3.82.0': '3.43.21',
|
||||
'3.81.0': '3.43.20',
|
||||
'3.80.1': '3.43.19',
|
||||
'3.80.0': '3.43.18',
|
||||
'3.79.0': '3.43.17',
|
||||
'3.78.1': '3.43.16',
|
||||
'3.78.0': '3.43.15',
|
||||
'3.77.1': '3.43.14',
|
||||
'3.77.0': '3.43.13',
|
||||
'3.76.2': '3.43.12',
|
||||
'3.76.1': '3.43.11',
|
||||
'3.76.0': '3.43.10',
|
||||
'3.75.1': '3.43.9',
|
||||
'3.75.0': '3.43.8',
|
||||
'3.74.0': '3.43.7',
|
||||
'3.73.0': '3.43.6',
|
||||
'3.72.4': '3.43.5',
|
||||
'3.72.3': '3.43.4',
|
||||
'3.72.2': '3.43.3',
|
||||
'3.72.1': '3.43.2',
|
||||
'3.72.0': '3.43.1',
|
||||
'3.71.8': '3.43.0',
|
||||
'3.71.7': '3.42.5',
|
||||
'3.71.6': '3.42.4',
|
||||
'3.71.5': '3.42.3',
|
||||
'3.71.4': '3.42.2',
|
||||
'3.71.3': '3.42.1',
|
||||
'3.71.2': '3.42.0',
|
||||
'3.71.1': '3.41.10',
|
||||
'3.71.0': '3.41.9',
|
||||
'3.70.5': '3.41.8',
|
||||
'3.70.4': '3.41.7',
|
||||
'3.70.3': '3.41.6',
|
||||
'3.70.2': '3.41.5',
|
||||
'3.70.1': '3.41.4',
|
||||
'3.70.0': '3.41.3',
|
||||
'3.69.1': '3.41.2',
|
||||
'3.69.0': '3.41.1',
|
||||
'3.68.6': '3.41.0',
|
||||
'3.68.5': '3.40.2',
|
||||
'3.68.4': '3.40.1',
|
||||
'3.68.3': '3.40.0',
|
||||
'3.68.2': '3.39.12',
|
||||
'3.68.1': '3.39.11',
|
||||
'3.68.0': '3.39.10',
|
||||
'3.67.4': '3.39.9',
|
||||
'3.67.3': '3.39.8',
|
||||
'3.67.2': '3.39.7',
|
||||
'3.67.1': '3.39.6',
|
||||
'3.67.0': '3.39.5',
|
||||
'3.66.0': '3.39.4',
|
||||
'3.65.0': '3.39.3',
|
||||
'3.64.0': '3.39.2',
|
||||
'3.63.3': '3.39.1',
|
||||
'3.63.2': '3.39.0',
|
||||
'3.63.1': '3.38.1',
|
||||
'3.63.0': '3.38.0',
|
||||
'3.62.4': '3.37.14',
|
||||
'3.62.3': '3.37.13',
|
||||
'3.62.2': '3.37.12',
|
||||
'3.62.1': '3.37.11',
|
||||
'3.62.0': '3.37.10',
|
||||
'3.61.0': '3.37.9',
|
||||
'3.60.0': '3.37.8',
|
||||
'3.59.3': '3.37.7',
|
||||
'3.59.2': '3.37.6',
|
||||
'3.59.1': '3.37.5',
|
||||
'3.59.0': '3.37.4',
|
||||
'3.58.1': '3.37.3',
|
||||
'3.58.0': '3.37.2',
|
||||
'3.57.3': '3.37.1',
|
||||
'3.57.2': '3.37.0',
|
||||
'3.57.1': '3.36.18',
|
||||
'3.57.0': '3.36.17',
|
||||
'3.56.0': '3.36.16',
|
||||
'3.55.2': '3.36.15',
|
||||
'3.55.1': '3.36.14',
|
||||
'3.55.0': '3.36.13',
|
||||
'3.54.6': '3.36.12',
|
||||
'3.54.5': '3.36.11',
|
||||
'3.54.4': '3.36.10',
|
||||
'3.54.3': '3.36.9',
|
||||
'3.54.2': '3.36.8',
|
||||
'3.54.1': '3.36.7',
|
||||
'3.54.0': '3.36.6',
|
||||
'3.53.0': '3.36.5',
|
||||
'3.52.1': '3.36.4',
|
||||
'3.52.0': '3.36.3',
|
||||
'3.51.0': '3.36.2',
|
||||
'3.50.6': '3.36.1',
|
||||
'3.50.5': '3.36.0',
|
||||
'3.50.4': '3.35.16',
|
||||
'3.50.3': '3.35.15',
|
||||
'3.50.2': '3.35.14',
|
||||
'3.50.1': '3.35.13',
|
||||
'3.50.0': '3.35.12',
|
||||
'3.49.3': '3.35.11',
|
||||
'3.49.2': '3.35.10',
|
||||
'3.49.1': '3.35.9',
|
||||
'3.49.0': '3.35.8',
|
||||
'3.48.3': '3.35.7',
|
||||
'3.48.2': '3.35.6',
|
||||
'3.48.1': '3.35.5',
|
||||
'3.48.0': '3.35.4',
|
||||
'3.47.3': '3.35.3',
|
||||
'3.47.2': '3.35.2',
|
||||
'3.47.1': '3.35.1',
|
||||
'3.47.0': '3.35.0',
|
||||
'3.46.3': '3.34.3',
|
||||
'3.46.2': '3.34.2',
|
||||
'3.46.1': '3.34.1',
|
||||
'3.46.0': '3.34.0',
|
||||
'3.45.18': '3.33.7',
|
||||
'3.45.17': '3.33.6',
|
||||
'3.45.16': '3.33.5',
|
||||
'3.45.15': '3.33.4',
|
||||
'3.45.14': '3.33.3',
|
||||
'3.45.13': '3.33.2',
|
||||
'3.45.12': '3.33.1',
|
||||
'3.45.11': '3.33.0',
|
||||
'3.45.10': '3.32.5',
|
||||
'3.45.9': '3.32.4',
|
||||
'3.45.8': '3.32.3',
|
||||
'3.45.7': '3.32.2',
|
||||
'3.45.6': '3.32.1',
|
||||
'3.45.5': '3.32.0',
|
||||
'3.45.4': '3.31.29',
|
||||
'3.45.3': '3.31.28',
|
||||
'3.45.2': '3.31.27',
|
||||
'3.45.1': '3.31.26',
|
||||
'3.45.0': '3.31.25',
|
||||
'3.44.7': '3.31.24',
|
||||
'3.44.6': '3.31.23',
|
||||
'3.44.5': '3.31.22',
|
||||
'3.44.4': '3.31.21',
|
||||
'3.44.3': '3.31.20',
|
||||
'3.44.2': '3.31.19',
|
||||
'3.44.1': '3.31.18',
|
||||
'3.44.0': '3.31.17',
|
||||
'3.43.1': '3.31.16',
|
||||
'3.43.0': '3.31.15',
|
||||
'3.42.1': '3.31.14',
|
||||
'3.42.0': '3.31.13',
|
||||
'3.41.3': '3.31.12',
|
||||
'3.41.2': '3.31.11',
|
||||
'3.41.1': '3.31.10',
|
||||
'3.41.0': '3.31.9',
|
||||
'3.40.7': '3.31.8',
|
||||
'3.40.6': '3.31.7',
|
||||
'3.40.5': '3.31.6',
|
||||
'3.40.4': '3.31.5',
|
||||
'3.40.3': '3.31.4',
|
||||
'3.40.2': '3.31.3',
|
||||
'3.40.1': '3.31.2',
|
||||
'3.40.0': '3.31.1',
|
||||
'3.39.1': '3.31.0',
|
||||
'3.39.0': '3.30.38',
|
||||
'3.38.6': '3.30.37',
|
||||
'3.38.5': '3.30.36',
|
||||
'3.38.4': '3.30.35',
|
||||
'3.38.3': '3.30.34',
|
||||
'3.38.2': '3.30.33',
|
||||
'3.38.1': '3.30.32',
|
||||
'3.38.0': '3.30.31',
|
||||
'3.37.7': '3.30.30',
|
||||
'3.37.6': '3.30.29',
|
||||
'3.37.5': '3.30.28',
|
||||
'3.37.4': '3.30.27',
|
||||
'3.37.3': '3.30.26',
|
||||
'3.37.2': '3.30.25',
|
||||
'3.37.1': '3.30.24',
|
||||
'3.37.0': '3.30.23',
|
||||
'3.36.0': '3.30.22',
|
||||
'3.35.2': '3.30.21',
|
||||
'3.35.1': '3.30.20',
|
||||
'3.35.0': '3.30.19',
|
||||
'3.34.0': '3.30.18',
|
||||
'3.33.8': '3.30.17',
|
||||
'3.33.7': '3.30.16',
|
||||
'3.33.6': '3.30.15',
|
||||
'3.33.5': '3.30.14',
|
||||
'3.33.4': '3.30.13',
|
||||
'3.33.3': '3.30.12',
|
||||
'3.33.2': '3.30.11',
|
||||
'3.33.1': '3.30.10',
|
||||
'3.33.0': '3.30.9',
|
||||
'3.32.0': '3.30.8',
|
||||
'3.31.1': '3.30.7',
|
||||
'3.31.0': '3.30.6',
|
||||
'3.30.0': '3.30.5',
|
||||
'3.29.2': '3.30.4',
|
||||
'3.29.1': '3.30.3',
|
||||
'3.29.0': '3.30.2',
|
||||
'3.28.1': '3.30.1',
|
||||
'3.28.0': '3.30.0',
|
||||
'3.27.7': '3.29.0',
|
||||
'3.27.6': '3.28.3',
|
||||
'3.27.5': '3.28.2',
|
||||
'3.27.4': '3.28.1',
|
||||
'3.27.3': '3.28.0',
|
||||
'3.27.2': '3.27.13',
|
||||
'3.27.1': '3.27.12',
|
||||
'3.27.0': '3.27.11',
|
||||
'3.26.4': '3.27.10',
|
||||
'3.26.3': '3.27.9',
|
||||
'3.26.2': '3.27.8',
|
||||
'3.26.1': '3.27.7',
|
||||
'3.26.0': '3.27.6',
|
||||
'3.25.0': '3.27.5',
|
||||
'3.24.6': '3.27.4',
|
||||
'3.24.5': '3.27.3',
|
||||
'3.24.4': '3.27.2',
|
||||
'3.24.3': '3.27.1',
|
||||
'3.24.3-alpha.1': '3.27.0',
|
||||
'3.24.3-alpha.0': '3.26.14',
|
||||
'3.24.2': '3.26.13',
|
||||
'3.24.2-alpha.1': '3.26.12',
|
||||
'3.24.2-alpha.0': '3.26.11',
|
||||
'3.24.1': '3.26.10',
|
||||
'3.24.1-alpha.0': '3.26.9',
|
||||
'3.24.0': '3.26.8',
|
||||
'3.24.0-alpha.7': '3.26.7',
|
||||
'3.24.0-alpha.6': '3.26.6',
|
||||
'3.24.0-alpha.5': '3.26.5',
|
||||
'3.24.0-alpha.4': '3.26.4',
|
||||
'3.24.0-alpha.3': '3.26.3',
|
||||
'3.24.0-alpha.2': '3.26.2',
|
||||
'3.24.0-alpha.1': '3.26.1',
|
||||
'3.24.0-alpha.0': '3.26.0',
|
||||
'3.23.0': '3.25.15',
|
||||
'3.23.0-alpha.1': '3.25.14',
|
||||
'3.23.0-alpha.0': '3.25.13',
|
||||
'3.22.7-alpha.0': '3.25.12',
|
||||
'3.22.6': '3.25.11',
|
||||
'3.22.6-alpha.0': '3.25.10',
|
||||
'3.22.5': '3.25.9',
|
||||
'3.22.4': '3.24.4',
|
||||
'3.22.3': '3.24.3',
|
||||
'3.22.3-alpha.9': '3.25.6',
|
||||
'3.22.3-alpha.8': '3.25.5',
|
||||
'3.22.3-alpha.7': '3.25.4',
|
||||
'3.22.3-alpha.6': '3.25.3',
|
||||
'3.22.3-alpha.5': '3.25.2',
|
||||
'3.22.3-alpha.4': '3.25.1',
|
||||
'3.22.3-alpha.3': '3.25.0',
|
||||
'3.22.3-alpha.2': '3.24.8',
|
||||
'3.22.3-alpha.1': '3.24.7',
|
||||
'3.22.3-alpha.0': '3.24.6',
|
||||
'3.22.2': '3.24.5',
|
||||
'3.22.1': '3.24.2',
|
||||
'3.22.0': '3.24.2-alpha.2',
|
||||
'3.21.0': '3.24.2-alpha.1',
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user