Compare commits

..
Author SHA1 Message Date
StandardNotes CI 3d794bb12e chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-11-03 12:29:41 +00:00
Aman Harwara d9630c99c7 refactor: take velocity into account for mobile popover gesture [skip e2e] 2023-11-03 17:45:09 +05:30
StandardNotes CI 5ff795d636 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
2023-11-03 11:32:50 +00:00
Aman Harwara 86e9c90c10 refactor: window background color on mobile, hide webview until ready (#2618) [skip e2e] 2023-11-03 16:50:11 +05:30
Karol Sójko 0902580b79 chore: enable vaults on free internal team user accounts (#2617) 2023-11-03 11:23:42 +01:00
StandardNotes CI 202a132482 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-11-02 12:49:28 +00:00
Aman Harwara 23331788f6 chore: revert fastfile change [skip e2e] 2023-11-02 18:10:07 +05:30
Karol Sójko f95a4fe981 chore: establish websockets connection only on first party server hosts (#2616) 2023-11-02 13:33:42 +01:00
StandardNotes CI 4be9b51481 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-11-02 10:55:29 +00:00
Aman Harwara 6fdd8b3729 chore: ios window background color [skip e2e] 2023-11-02 16:06:34 +05:30
StandardNotes CI 4260c1ec4a chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-11-02 08:56:48 +00:00
Aman Harwara 63281b9998 chore: fix some enex imports [skip e2e] 2023-11-02 14:10:11 +05:30
StandardNotes CI b97ed403bf chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].9
2023-11-02 08:39:10 +00:00
Aman Harwara af6ac568f0 chore: adjust empty line placeholder contrast [skip e2e] 2023-11-02 13:55:34 +05:30
Aman Harwara de3836869d chore: trigger release [skip e2e] 2023-11-02 13:45:45 +05:30
Aman Harwara d28b20008c fix: Fixed white flash issue when starting app on iOS 2023-11-02 13:45:36 +05:30
StandardNotes CI 7bbe8d3842 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
2023-11-01 20:57:08 +00:00
Aman Harwara 8a40364c6c chore: change ios launchscreen storyboard background color [skip e2e] 2023-11-02 02:14:55 +05:30
34 changed files with 330 additions and 55 deletions
+1
View File
@@ -26,6 +26,7 @@
"build:snjs": "yarn workspaces foreach -p --topological-dev --verbose -R --from @standardnotes/snjs run build",
"build:services": "yarn workspaces foreach -pt --topological-dev --verbose -R --from @standardnotes/services run build",
"build:api": "yarn workspaces foreach -pt --topological-dev --verbose -R --from @standardnotes/api run build",
"start:web": "yarn workspace @standardnotes/web start",
"e2e": "lerna run start:test-server --scope=@standardnotes/snjs",
"e2e:test": "yarn dlx mocha-headless-chrome --timeout 3600000 -f http://localhost:9001/mocha/test.html",
"reset": "find . -type dir -name node_modules | xargs rm -rf && rm -rf yarn.lock && yarn install",
+28
View File
@@ -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.1.311](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.310](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.309](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.308](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.307](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.306](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.305](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-01)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.304](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-01)
**Note:** Version bump only for package @standardnotes/clipper
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/clipper",
"description": "Web clipper browser extension for Standard Notes",
"version": "1.1.304",
"version": "1.1.311",
"private": true,
"scripts": {
"build-mv2": "yarn clean && webpack --config ./webpack.config.prod.js",
+28
View File
@@ -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.
## [3.108.245](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.244](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.243](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.242](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.241](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.240](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.239](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-01)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.238](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-01)
**Note:** Version bump only for package @standardnotes/desktop
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/desktop",
"main": "./app/dist/index.js",
"version": "3.108.238",
"version": "3.108.245",
"license": "AGPL-3.0",
"author": "Standard Notes.",
"private": true,
+30
View File
@@ -3,6 +3,36 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.56.226](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.225](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.224](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.223](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.222](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.221](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
### Bug Fixes
* Fixed white flash issue when starting app on iOS ([d28b200](https://github.com/standardnotes/app/commit/d28b20008c6c1dcf8876ca4613e468fa5511ae3e))
## [3.56.220](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-01)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.219](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-01)
**Note:** Version bump only for package @standardnotes/mobile
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="background">#2E2E2E</color>
<color name="background">#000000</color>
</resources>
-1
View File
@@ -64,7 +64,6 @@ platform :ios do
skip_metadata: true,
skip_screenshots: true,
skip_binary_upload: true,
skip_app_version_update: true,
run_precheck_before_submit: false,
submission_information: { add_id_info_uses_idfa: false },
release_notes: {
@@ -26,6 +26,7 @@
</script>
<script src="web-src/app.js"></script>
<style>
html,
body {
background-color: black;
}
+3 -9
View File
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@@ -17,7 +16,7 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -25,9 +24,4 @@
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
+1 -1
View File
@@ -800,4 +800,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: c3b827e3c92cdf3199eddc52083480826e717b88
COCOAPODS: 1.11.3
COCOAPODS: 1.14.2
@@ -991,6 +991,7 @@
OTHER_LDFLAGS = (
"$(inherited)",
" ",
"-Wl -ld_classic ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
@@ -1059,6 +1060,7 @@
OTHER_LDFLAGS = (
"$(inherited)",
" ",
"-Wl -ld_classic ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
@@ -24,14 +24,15 @@
[self clearWebEditorCache];
NSString *CFBundleIdentifier = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
NSDictionary * initialProperties = @{@"env" : [CFBundleIdentifier isEqualToString:@"com.standardnotes.standardnotes.dev"] ? @"dev" : @"prod"};
self.moduleName = @"StandardNotes";
self.initialProps = @{};
return [super application:application didFinishLaunchingWithOptions:launchOptions];
BOOL success = [super application:application didFinishLaunchingWithOptions:launchOptions];
if (success) {
self.window.rootViewController.view.backgroundColor = [UIColor colorWithWhite:0.0 alpha:1.0];
self.window.backgroundColor = [UIColor colorWithWhite:0.0 alpha:1.0];
}
return success;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/mobile",
"version": "3.56.219",
"version": "3.56.226",
"author": "Standard Notes.",
"private": true,
"license": "AGPL-3.0",
+11 -1
View File
@@ -242,6 +242,10 @@ const MobileWebAppContents = ({ destroyAndReload }: { destroyAndReload: () => vo
setShowAndroidWebviewUpdatePrompt(true)
return
}
if (message === 'appLoaded') {
setDidLoadEnd(true)
return
}
try {
const functionData = JSON.parse(message)
void onFunctionMessage(functionData.functionName, functionData.messageId, functionData.args)
@@ -308,6 +312,8 @@ const MobileWebAppContents = ({ destroyAndReload }: { destroyAndReload: () => vo
})
}, [device])
const [didLoadEnd, setDidLoadEnd] = useState(false)
if (showAndroidWebviewUpdatePrompt) {
return (
<View
@@ -353,7 +359,10 @@ const MobileWebAppContents = ({ destroyAndReload }: { destroyAndReload: () => vo
<WebView
ref={webViewRef}
source={{ uri: sourceUri }}
style={{ backgroundColor: 'black' }}
style={{
backgroundColor: '#000000',
opacity: didLoadEnd ? 1 : 0,
}}
originWhitelist={['*']}
onError={(err) => console.error('An error has occurred', err)}
onHttpError={() => console.error('An HTTP error occurred')}
@@ -385,6 +394,7 @@ const MobileWebAppContents = ({ destroyAndReload }: { destroyAndReload: () => vo
component: CustomAndroidWebView,
} as WebViewNativeConfig,
})}
webviewDebuggingEnabled
/>
)
}
+28
View File
@@ -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.4.601](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.600](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.599](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.598](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.597](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.596](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.595](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-01)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.594](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-01)
**Note:** Version bump only for package @standardnotes/releases
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/releases",
"version": "1.4.594",
"version": "1.4.601",
"license": "AGPL-3.0",
"main": "dist/releases.json",
"types": "dist/index.d.ts",
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.65.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/services
# [1.65.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-30)
### Features
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/services",
"version": "1.65.0",
"version": "1.65.1",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -3,7 +3,7 @@ import { ComponentInterface, DecryptedItemInterface } from '@standardnotes/model
import { FeatureStatus } from './FeatureStatus'
import { SetOfflineFeaturesFunctionResponse } from './SetOfflineFeaturesFunctionResponse'
import { NativeFeatureIdentifier } from '@standardnotes/features'
import { Uuid } from '@standardnotes/domain-core'
import { RoleName, Uuid } from '@standardnotes/domain-core'
export interface FeaturesClientInterface {
getFeatureStatus(
@@ -11,7 +11,7 @@ export interface FeaturesClientInterface {
options?: { inContextOfItem?: DecryptedItemInterface },
): FeatureStatus
hasMinimumRole(role: string): boolean
hasRole(roleName: RoleName): boolean
hasFirstPartyOfflineSubscription(): boolean
setOfflineFeaturesCode(code: string): Promise<SetOfflineFeaturesFunctionResponse>
hasOfflineRepo(): boolean
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.202.106](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/snjs
## [2.202.105](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/snjs
## [2.202.104](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-30)
**Note:** Version bump only for package @standardnotes/snjs
@@ -412,6 +412,10 @@ export class FeaturesService
return Object.values(RoleName.NAMES).filter((role) => roles.includes(role))
}
hasRole(roleName: RoleName): boolean {
return this.onlineRoles.includes(roleName.value) || this.offlineRoles.includes(roleName.value)
}
public hasMinimumRole(role: string): boolean {
const sortedAllRoles = Object.values(RoleName.NAMES)
@@ -197,7 +197,9 @@ export class SessionManager
this.apiService.setSession(session, persist)
void this.webSocketsService.startWebSocketConnection()
if (this.isSignedIntoFirstPartyServer()) {
void this.webSocketsService.startWebSocketConnection()
}
}
public online() {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/snjs",
"version": "2.202.104",
"version": "2.202.106",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.33.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/ui-services
## [1.33.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)
### Bug Fixes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/ui-services",
"version": "1.33.1",
"version": "1.33.2",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+28
View File
@@ -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.
## [3.181.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/web
## [3.181.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)
**Note:** Version bump only for package @standardnotes/web
## [3.181.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/web
## [3.181.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/web
## [3.181.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/web
## [3.181.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)
**Note:** Version bump only for package @standardnotes/web
## [3.181.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-01)
**Note:** Version bump only for package @standardnotes/web
## [3.181.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-01)
**Note:** Version bump only for package @standardnotes/web
+77
View File
@@ -1,5 +1,82 @@
{
"versions": [
{
"version": "3.181.14",
"title": "[3.181.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.181.13",
"title": "[3.181.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-03)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.181.12",
"title": "[3.181.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.181.11",
"title": "[3.181.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.181.10",
"title": "[3.181.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.181.9",
"title": "[3.181.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-02)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.181.8",
"title": "[3.181.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-01)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.181.7",
"title": "[3.181.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-11-01)",
+2 -2
View File
@@ -1,9 +1,9 @@
{
"name": "@standardnotes/web",
"version": "3.181.7",
"version": "3.181.14",
"license": "AGPL-3.0",
"main": "dist/app.js",
"author": "Standard Notes.",
"author": "Standard Notes",
"private": true,
"files": [
"dist"
+7
View File
@@ -16,6 +16,9 @@ declare global {
webClient?: DesktopManagerInterface
electronRemoteBridge?: unknown
reactNativeDevice?: WebDevice
ReactNativeWebView?: {
postMessage: (message: string) => void
}
platform?: Platform
isClipper?: boolean
@@ -91,6 +94,10 @@ const startApplication: StartApplication = async function startApplication(
onDestroy={onDestroy}
/>,
)
if (window.ReactNativeWebView) {
window.ReactNativeWebView.postMessage('appLoaded')
}
}
const domReady = document.readyState === 'complete' || document.readyState === 'interactive'
@@ -72,6 +72,7 @@ const MobilePopoverContent = ({
let elementY = 0
let startY = 0
let startTimestamp = Date.now()
let closestScrollContainerScrollTop = 0
let isClosestScrollContainerScrolledAtStart = false
let containerScrollChangedAfterTouchStart = false
@@ -79,6 +80,7 @@ const MobilePopoverContent = ({
const touchStartHandler = (e: TouchEvent) => {
startY = e.touches[0].clientY
elementY = element.getBoundingClientRect().y
startTimestamp = Date.now()
closestScrollContainerScrollTop = closestScrollContainer?.scrollTop || 0
isClosestScrollContainerScrolledAtStart = !!closestScrollContainer && closestScrollContainerScrollTop > 0
containerScrollChangedAfterTouchStart = false
@@ -117,11 +119,17 @@ const MobilePopoverContent = ({
},
)
}
const touchEndHandler = () => {
const touchEndHandler = (event: TouchEvent) => {
const y = element.getBoundingClientRect().y
const threshold = window.innerHeight * 0.75
if (y > threshold && !isClosestScrollContainerScrolledAtStart) {
const endTimestamp = Date.now()
const deltaY = event.changedTouches[0].clientY - startY
const velocity = deltaY / (endTimestamp - startTimestamp)
if (y < threshold && velocity > 2) {
requestClose()
} else if (y > threshold && !isClosestScrollContainerScrolledAtStart) {
requestClose()
} else {
element.animate(
@@ -43,7 +43,7 @@ export const EmptyLinePlaceholderPlugin = () => {
if (!text && editor.isEditable()) {
placeholder.style.top = `${rect.y}px`
placeholder.style.left = `${rect.x - parentRect.x + rootRect.x}px`
placeholder.style.opacity = '1'
placeholder.style.opacity = '0.65'
} else {
placeholder.style.opacity = '0'
}
@@ -86,8 +86,7 @@ export const EmptyLinePlaceholderPlugin = () => {
className="super-empty-line-placeholder pointer-events-none fixed text-passive-1 opacity-0"
ref={placeholderElementRef}
>
Type <span className="rounded border border-border bg-passive-4-opacity-variant px-1 py-0.5">/</span> for
commands...
Type <span className="rounded bg-passive-4-opacity-variant p-0.5">/</span> for commands...
</div>
)
}
@@ -11,17 +11,25 @@ import {
ParagraphNode,
} from 'lexical'
import BlocksEditorTheme from '../Lexical/Theme/Theme'
import { SuperExportNodes } from '../Lexical/Nodes/AllNodes'
import { BlockEditorNodes, SuperExportNodes } from '../Lexical/Nodes/AllNodes'
import { MarkdownTransformers } from '../MarkdownTransformers'
import { $generateHtmlFromNodes, $generateNodesFromDOM } from '@lexical/html'
import { FileNode } from '../Plugins/EncryptedFilePlugin/Nodes/FileNode'
import { $createFileExportNode } from '../Lexical/Nodes/FileExportNode'
import { $createInlineFileNode } from '../Plugins/InlineFilePlugin/InlineFileNode'
export class HeadlessSuperConverter implements SuperConverterServiceInterface {
private editor: LexicalEditor
private importEditor: LexicalEditor
private exportEditor: LexicalEditor
constructor() {
this.editor = createHeadlessEditor({
this.importEditor = createHeadlessEditor({
namespace: 'BlocksEditor',
theme: BlocksEditorTheme,
editable: false,
onError: (error: Error) => console.error(error),
nodes: BlockEditorNodes,
})
this.exportEditor = createHeadlessEditor({
namespace: 'BlocksEditor',
theme: BlocksEditorTheme,
editable: false,
@@ -32,7 +40,7 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
isValidSuperString(superString: string): boolean {
try {
this.editor.parseEditorState(superString)
this.importEditor.parseEditorState(superString)
return true
} catch (error) {
return false
@@ -61,12 +69,12 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
throw new Error('getFileItem and getFileBase64 must be provided when embedBehavior is "inline"')
}
this.editor.setEditorState(this.editor.parseEditorState(superString))
this.exportEditor.setEditorState(this.exportEditor.parseEditorState(superString))
let content: string | undefined
await new Promise<void>((resolve) => {
this.editor.update(
this.exportEditor.update(
() => {
if (embedBehavior === 'reference') {
resolve()
@@ -88,7 +96,7 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
if (!fileBase64) {
return
}
this.editor.update(
this.exportEditor.update(
() => {
const inlineFileNode = $createInlineFileNode(fileBase64, fileItem.mimeType, fileItem.name)
fileNode.replace(inlineFileNode)
@@ -96,7 +104,7 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
{ discrete: true },
)
} else {
this.editor.update(
this.exportEditor.update(
() => {
const fileExportNode = $createFileExportNode(fileItem.name, fileItem.mimeType)
fileNode.replace(fileExportNode)
@@ -113,7 +121,7 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
)
})
this.editor.update(
this.exportEditor.update(
() => {
switch (toFormat) {
case 'txt':
@@ -128,7 +136,7 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
break
}
case 'html':
content = $generateHtmlFromNodes(this.editor)
content = $generateHtmlFromNodes(this.exportEditor)
break
case 'json':
default:
@@ -155,7 +163,7 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
return otherFormatString
}
this.editor.update(
this.importEditor.update(
() => {
$getRoot().clear()
},
@@ -166,12 +174,12 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
let didThrow = false
if (fromFormat === 'html') {
this.editor.update(
this.importEditor.update(
() => {
try {
const parser = new DOMParser()
const dom = parser.parseFromString(otherFormatString, 'text/html')
const generatedNodes = $generateNodesFromDOM(this.editor, dom)
const generatedNodes = $generateNodesFromDOM(this.importEditor, dom)
const nodesToInsert: LexicalNode[] = []
generatedNodes.forEach((node) => {
const type = node.getType()
@@ -181,9 +189,9 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
if (
type === 'text' ||
type === 'link' ||
type === 'linebreak' ||
type === 'unencrypted-image' ||
type === 'inline-file' ||
node.isParentRequired()
type === 'inline-file'
) {
const paragraphNode = $createParagraphNode()
paragraphNode.append(node)
@@ -205,7 +213,7 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
{ discrete: true },
)
} else {
this.editor.update(
this.importEditor.update(
() => {
try {
$convertFromMarkdownString(otherFormatString, MarkdownTransformers)
@@ -224,7 +232,7 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
throw new Error('Could not import note')
}
return JSON.stringify(this.editor.getEditorState())
return JSON.stringify(this.importEditor.getEditorState())
}
getEmbeddedFileIDsFromSuperString(superString: string): string[] {
@@ -232,11 +240,11 @@ export class HeadlessSuperConverter implements SuperConverterServiceInterface {
return []
}
this.editor.setEditorState(this.editor.parseEditorState(superString))
this.exportEditor.setEditorState(this.exportEditor.parseEditorState(superString))
const ids: string[] = []
this.editor.getEditorState().read(() => {
this.exportEditor.getEditorState().read(() => {
const fileNodes = $nodesOfType(FileNode)
fileNodes.forEach((fileNode) => {
ids.push(fileNode.getId())
@@ -133,7 +133,11 @@ export class FeaturesController extends AbstractViewController implements Intern
isVaultsEnabled(): boolean {
const enabled = this.features.isExperimentalFeatureEnabled(NativeFeatureIdentifier.TYPES.Vaults)
return featureTrunkVaultsEnabled() || enabled || this.features.hasMinimumRole(RoleName.NAMES.InternalTeamUser)
return (
featureTrunkVaultsEnabled() ||
enabled ||
this.features.hasRole(RoleName.create(RoleName.NAMES.InternalTeamUser).getValue())
)
}
isEntitledToSharedVaults(): boolean {