Compare commits

...
Author SHA1 Message Date
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
StandardNotes CI 752448f9e6 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
2023-11-01 15:12:45 +00:00
Aman Harwara 79b47150d6 chore: fix mac release step [skip e2e] 2023-11-01 20:25:58 +05:30
StandardNotes CI ed30fec2ba chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-11-01 08:07:07 +00:00
Aman Harwara 61cb95dc4a chore: update fastfile [skip e2e] 2023-11-01 13:22:31 +05:30
StandardNotes CI 00317fda88 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
2023-11-01 07:46:24 +00:00
Aman Harwara 83a731b076 chore: trigger release [skip e2e] 2023-11-01 13:03:08 +05:30
StandardNotes CI f4479feae7 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
2023-10-31 13:36:26 +00:00
Aman Harwara f37bd487a2 chore: toolbar color [skip e2e] 2023-10-31 18:50:45 +05:30
Aman Harwara 9c43c87f14 chore: update electron notarize dep [skip e2e] 2023-10-31 18:47:15 +05:30
24 changed files with 261 additions and 59 deletions
@@ -13,6 +13,7 @@ jobs:
env:
CSC_LINK: ${{ secrets.MAC_CI_KEYS }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CI_KEYS_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
NOTARIZE_APPLE_ID: ${{ secrets.NOTARIZE_APPLE_ID }}
NOTARIZE_APPLE_ID_PASSWORD: ${{ secrets.NOTARIZE_APPLE_ID_PASSWORD }}
defaults:
Binary file not shown.
+24
View File
@@ -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.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.303](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.302](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.301](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)
**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.301",
"version": "1.1.307",
"private": true,
"scripts": {
"build-mv2": "yarn clean && webpack --config ./webpack.config.prod.js",
+24
View File
@@ -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.
## [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
## [3.108.237](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.236](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.235](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)
**Note:** Version bump only for package @standardnotes/desktop
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/desktop",
"main": "./app/dist/index.js",
"version": "3.108.235",
"version": "3.108.241",
"license": "AGPL-3.0",
"author": "Standard Notes.",
"private": true,
@@ -53,6 +53,7 @@
"devDependencies": {
"@babel/core": "*",
"@babel/preset-env": "*",
"@electron/notarize": "^2.1.0",
"@types/fs-extra": "^11.0.1",
"@types/lodash": "^4.14.189",
"@types/mime-types": "^2.1.1",
@@ -63,7 +64,6 @@
"babel-loader": "^9.1.0",
"copy-webpack-plugin": "^11.0.0",
"electron-builder": "23.6.0",
"electron-notarize": "^1.2.1",
"eslint": "*",
"eslint-config-prettier": "^8.9.0",
"eslint-plugin-import": "^2.26.0",
+2 -1
View File
@@ -2,7 +2,7 @@
const fs = require('fs')
const path = require('path')
const electronNotarize = require('electron-notarize')
const electronNotarize = require('@electron/notarize')
module.exports = async function (params) {
const platformName = params.electronPlatformName
@@ -21,6 +21,7 @@ module.exports = async function (params) {
try {
electronNotarize
.notarize({
teamId: process.env.APPLE_TEAM_ID,
appBundleId: appId,
appPath: appPath,
appleId: process.env.NOTARIZE_APPLE_ID,
+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.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
## [3.56.218](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.217](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.216](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.215](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)
**Note:** Version bump only for package @standardnotes/mobile
+1
View File
@@ -64,6 +64,7 @@ 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: {
+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,14 @@
[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];
}
return success;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/mobile",
"version": "3.56.215",
"version": "3.56.222",
"author": "Standard Notes.",
"private": true,
"license": "AGPL-3.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.
## [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.4.593](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.592](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.591](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.590](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)
**Note:** Version bump only for package @standardnotes/releases
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/releases",
"version": "1.4.590",
"version": "1.4.597",
"license": "AGPL-3.0",
"main": "dist/releases.json",
"types": "dist/index.d.ts",
+24
View File
@@ -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.
## [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
## [3.181.6](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.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)
**Note:** Version bump only for package @standardnotes/web
## [3.181.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)
### Bug Fixes
+66
View File
@@ -1,5 +1,71 @@
{
"versions": [
{
"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)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.181.6",
"title": "[3.181.6](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.5",
"title": "[3.181.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.181.4",
"title": "[3.181.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-10-31)",
+2 -2
View File
@@ -1,9 +1,9 @@
{
"name": "@standardnotes/web",
"version": "3.181.4",
"version": "3.181.10",
"license": "AGPL-3.0",
"main": "dist/app.js",
"author": "Standard Notes",
"author": "Standard Notes.",
"private": true,
"files": [
"dist"
@@ -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>
)
}
@@ -580,11 +580,10 @@ const ToolbarPlugin = () => {
'bg-contrast',
!isEditable ? 'hidden opacity-0' : '',
isMobile && !canShowToolbarOnMobile ? 'hidden' : '',
!isMobile &&
'border-b border-border translucent-ui:border-[--popover-border-color] translucent-ui:bg-[--popover-background-color] translucent-ui:[backdrop-filter:var(--popover-backdrop-filter)]',
!isMobile && 'border-b border-border bg-default',
!isMobile
? !isToolbarFixedToTop
? 'fixed left-0 top-0 z-tooltip translate-x-[--translate-x] translate-y-[--translate-y] rounded border py-0.5 opacity-0'
? 'fixed left-0 top-0 z-tooltip translate-x-[--translate-x] translate-y-[--translate-y] rounded border py-0.5 opacity-0 translucent-ui:border-[--popover-border-color] translucent-ui:bg-[--popover-background-color] translucent-ui:[backdrop-filter:var(--popover-backdrop-filter)]'
: 'w-full px-1 py-1'
: '',
)}
@@ -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())
+12 -11
View File
@@ -2035,6 +2035,17 @@ __metadata:
languageName: node
linkType: hard
"@electron/notarize@npm:^2.1.0":
version: 2.1.0
resolution: "@electron/notarize@npm:2.1.0"
dependencies:
debug: ^4.1.1
fs-extra: ^9.0.1
promise-retry: ^2.0.1
checksum: ac58f39f4b2370ea929837cef50ebeedb4108ed9bd2a3fef0b89254891014a745da2db703b18b8e0d097a17000cc8fa984bcff3f087368986cb4a59753365a2f
languageName: node
linkType: hard
"@electron/remote@npm:^2.0.12":
version: 2.0.12
resolution: "@electron/remote@npm:2.0.12"
@@ -4288,6 +4299,7 @@ __metadata:
dependencies:
"@babel/core": "*"
"@babel/preset-env": "*"
"@electron/notarize": ^2.1.0
"@electron/remote": ^2.0.12
"@standardnotes/domain-core": ^1.40.0
"@standardnotes/electron-clear-data": 1.1.1
@@ -4308,7 +4320,6 @@ __metadata:
electron: 27.0.0
electron-builder: 23.6.0
electron-log: ^4.4.8
electron-notarize: ^1.2.1
electron-updater: ^6.1.4
eslint: "*"
eslint-config-prettier: ^8.9.0
@@ -10474,16 +10485,6 @@ __metadata:
languageName: node
linkType: hard
"electron-notarize@npm:^1.2.1":
version: 1.2.2
resolution: "electron-notarize@npm:1.2.2"
dependencies:
debug: ^4.1.1
fs-extra: ^9.0.1
checksum: 98909bc90f0840a4bd3da0edc6895d719eb0d17942812a8c8f5a130d323c7fbaafd819245cfe9a6c5b5abfa8dd3b0eb2bd8ee9c0b2dcf0c3b238b6845730c368
languageName: node
linkType: hard
"electron-osx-sign@npm:^0.6.0":
version: 0.6.0
resolution: "electron-osx-sign@npm:0.6.0"