Compare commits

...
Author SHA1 Message Date
StandardNotes CI 306a2129a2 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2022-07-07 18:21:27 +00:00
Mo d9014615f0 fix(mobile): component viewer in mobile web 2022-07-07 13:08:52 -05:00
StandardNotes CI f484a2a920 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
2022-07-07 17:37:37 +00:00
Mo 2f9a54bef3 chore(mobile): upgrade fastlane 2022-07-07 12:27:41 -05:00
StandardNotes CI 3a20abc989 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2022-07-07 17:05:03 +00:00
Mo 9a3cdfbc1a chore: mobile web bridge concept (#1228) 2022-07-07 11:55:07 -05:00
StandardNotes CI a59065d1d6 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2022-07-07 12:32:27 +00:00
Mo 2988c71334 chore: add workflow to test web server build (#1226) 2022-07-07 07:22:30 -05:00
Mo 516b4edb6c chore: mobile workflow 2022-07-07 07:21:05 -05:00
StandardNotes CI 6e2911105b chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2022-07-07 11:12:12 +00:00
Mo 7017032893 Revert "chore: deps (#1222)"
This reverts commit ff9215c916.
2022-07-07 06:02:38 -05:00
StandardNotes CI 573c67d41c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2022-07-07 10:30:27 +00:00
Aman Harwara 50c024e643 feat: add selected file size in context menu (#1224) 2022-07-07 15:51:16 +05:30
StandardNotes CI 6ebac52cb0 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
2022-07-06 22:30:21 +00:00
Mo ff9215c916 chore: deps (#1222) 2022-07-06 17:21:07 -05:00
Mo 2415088561 chore: fix mobile gitignore 2022-07-06 17:12:21 -05:00
StandardNotes CI 2b05f35433 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2022-07-06 21:39:52 +00:00
StandardNotes CI 180a183f96 chore(release): components 2022-07-06 21:39:39 +00:00
Johnny A f7ba6588a7 fix(advanced checklist): improve editor styles (#1221) 2022-07-06 16:27:22 -05:00
StandardNotes CI bfba5b8d4f chore(release): publish
- @standardnotes/[email protected].9
 - @standardnotes/[email protected]
2022-07-06 21:11:50 +00:00
Mo 7bd94be7e2 chore: mobile workflow 2022-07-06 16:02:13 -05:00
StandardNotes CI e17366ff8e chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
2022-07-06 19:58:17 +00:00
Aman Harwara 34719c4935 fix(web): scrollbar styles (#1219) 2022-07-07 01:17:54 +05:30
StandardNotes CI 3df6acbd44 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
2022-07-06 19:42:27 +00:00
Aman Harwara 6fa6374cf2 fix(web): update modal styles (#1220) 2022-07-07 01:02:59 +05:30
StandardNotes CI 68356912f2 chore(release): publish
- @standardnotes/[email protected].6
 - @standardnotes/[email protected]
2022-07-06 17:06:28 +00:00
Mo 9bba4b5c67 chore: mobile publishing workflows 2022-07-06 11:57:00 -05:00
Mo ca6e3ca9e9 chore: snap workflow 2022-07-06 11:43:35 -05:00
Mo a900f8b493 Revert "chore(workflow+temp): disable failing step"
This reverts commit 28dbb95965.
2022-07-06 11:31:10 -05:00
StandardNotes CI c8ca316fcd chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2022-07-06 15:35:07 +00:00
StandardNotes CI 36d3b65605 chore(release): components 2022-07-06 15:34:53 +00:00
Mo d1df0d371a fix(components): dynamic panels theme 2022-07-06 10:22:38 -05:00
Mo 78271b68f6 chore(mobile): prevent beta distribution of dev app 2022-07-06 10:15:34 -05:00
StandardNotes CI 76daf4c81b chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2022-07-06 15:11:57 +00:00
Aman Harwara 2ee791259d fix: select next item when trashing or deleting item (#1218) 2022-07-06 20:32:18 +05:30
StandardNotes CI 34ebfd33c1 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2022-07-06 14:54:22 +00:00
Mo d315c8c6c1 chore(web): fix tests 2022-07-06 09:44:13 -05:00
StandardNotes CI e6859d4a8d chore(release): publish
- @standardnotes/[email protected].2
 - @standardnotes/[email protected]
2022-07-06 14:12:32 +00:00
Mo 90b453253e chore: mobile workflows 2022-07-06 09:01:05 -05:00
97 changed files with 966 additions and 354 deletions
@@ -203,3 +203,11 @@ jobs:
token: ${{ secrets.CI_PAT_TOKEN }}
repository: ${{ secrets.RELEASES_EVENT_RECEIVING_REPO }}
event-type: releases-updated-event
- name: Publish Snap
continue-on-error: true
run: |
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
+20
View File
@@ -0,0 +1,20 @@
name: Web Server PR
on:
pull_request:
branches:
- main
paths:
- 'packages/web-server/**'
jobs:
TestDockerBuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Copy default configuration
run: yarn workspace @standardnotes/web-server run sample:env
- name: Test build of the image
run: docker build -t standardnotes/web:test-build .
+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.4.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/api
## [1.4.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/api
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api",
"version": "1.4.3",
"version": "1.4.4",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+12
View File
@@ -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.
## [2.7.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
### Bug Fixes
* **advanced checklist:** improve editor styles ([#1221](https://github.com/standardnotes/app/issues/1221)) ([f7ba658](https://github.com/standardnotes/app/commit/f7ba6588a7d062e3ec82e6413042ce5d8cd075f7))
## [2.7.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
### Bug Fixes
* **components:** dynamic panels theme ([d1df0d3](https://github.com/standardnotes/app/commit/d1df0d371a8afc60c17c79f35a1416804eedb9ec))
## [2.7.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/components-meta
@@ -1,13 +1,13 @@
{
"files": {
"main.js": "./static/js/main.js",
"main.css": "./static/css/main.455c1a18.css",
"main.css": "./static/css/main.8fa7663a.css",
"index.html": "./index.html",
"main.js.map": "./static/js/main.js.map",
"main.455c1a18.css.map": "./static/css/main.455c1a18.css.map"
"main.8fa7663a.css.map": "./static/css/main.8fa7663a.css.map"
},
"entrypoints": [
"static/js/main.js",
"static/css/main.455c1a18.css"
"static/css/main.8fa7663a.css"
]
}
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="A great way to manage short-term and long-term to-do's. You can mark tasks as completed, change their order, and edit the text naturally in place."/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Advanced Checklist</title><script defer="defer" src="./static/js/main.js"></script><link href="./static/css/main.455c1a18.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div class="sn-component" id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="A great way to manage short-term and long-term to-do's. You can mark tasks as completed, change their order, and edit the text naturally in place."/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Advanced Checklist</title><script defer="defer" src="./static/js/main.js"></script><link href="./static/css/main.8fa7663a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div class="sn-component" id="root"></div></body></html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,29 +1,23 @@
#navigation.section,
.section.tags,
navigation {
#navigation {
flex: none !important;
width: 190px !important;
width: 10px !important;
transition: width 0.25s;
}
#navigation.section:hover,
.section.tags:hover,
navigation:hover {
#navigation:hover {
flex: initial;
width: 250px !important;
width: 200px !important;
transition: width 0.25s;
}
.section.notes,
notes-view {
#items-column {
flex: none !important;
width: 270px !important;
transition: width 0.25s;
}
.section.notes:hover,
notes-view:hover {
#items-column:hover {
flex: initial;
width: 420px !important;
width: 380px !important;
transition: width 0.25s;
}
+9 -9
View File
@@ -30,9 +30,9 @@
"binary": "5a00749f8930a41541589f704fff2b6e1d84224305750c7880e941085a8fef62"
},
"org.standardnotes.theme-dynamic": {
"version": "1.0.8",
"base64": "0f0232ab1bd65f562619fbd68ae593522e6127f359b5843956aaf99c9436c583",
"binary": "6f726e05c26f0e9feee775656513a034c6a437b22510e75fba863acc6342af24"
"version": "1.1.0",
"base64": "1214db7ca8962d7f56937c16463ca3131f2073a718f993e47c1dfcf233eefab8",
"binary": "6da8d19f03e724b058950eb6869e4fe9c6ba5e57d995e268aecc823a235af43d"
},
"org.standardnotes.code-editor": {
"version": "1.3.17",
@@ -75,9 +75,9 @@
"binary": "1a99a8ccac07678d0e2e2423b302e5e98cfb100777c37f1795b7874b2d31dcf9"
},
"org.standardnotes.simple-task-editor": {
"version": "1.4.0",
"base64": "7a41a934a37f74a079ab92adb90495559250576973166cb6587bf1f6d5e84008",
"binary": "a1a6b97e1f761747dbf721857deed04370a3950dcb3e1bb4c4d4baa3680959b3"
"version": "1.4.1",
"base64": "9035b03e068138876802bcd28b1099b6ef22fac5ed51e0a9ec0152327a7f8a16",
"binary": "e4549b5b3219de5a5c0799d9b33c815a5bb7d8d974ba45e476dbbe376bfa5937"
},
"org.standardnotes.token-vault": {
"version": "2.2.2",
@@ -90,9 +90,9 @@
"binary": "12b19b16adf7dfb6626be2deaa8fe47a242b6fb15c841d6b12a1427a1a2fbd5e"
},
"org.standardnotes.advanced-checklist": {
"version": "0.2.1",
"base64": "69caa0811863e4ac47641f2706084decb8b2806ca4918d05d10d0acf3217f425",
"binary": "308d8df4f898261bcad711c106c0d3f9e037ebbc2f862dae9ea7f018e81dd625"
"version": "0.2.2",
"base64": "edadcc92b3c53ab5ca8325ae710b846dde8e19d2dc33f64e6716ef9218cfbd05",
"binary": "08e146c4c54e972c4411f367b496c5ef91feb14fd66395fb01336b907d4adf34"
},
"org.standardnotes.file-safe": {
"version": "2.0.16",
Binary file not shown.
+3 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/components-meta",
"version": "2.7.1",
"version": "2.7.3",
"private": true,
"author": "Standard Notes.",
"main": "dist",
@@ -23,7 +23,8 @@
},
"dependencies": {
"@standardnotes/features": "workspace:*",
"@standardnotes/styles": "workspace:*"
"@standardnotes/styles": "workspace:*",
"@standardnotes/utils": "workspace:*"
},
"devDependencies": {
"@standardnotes/deterministic-zip": "^1.2.0",
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.2.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
### Bug Fixes
* **advanced checklist:** improve editor styles ([#1221](https://github.com/standardnotes/app/issues/1221)) ([f7ba658](https://github.com/standardnotes/app/commit/f7ba6588a7d062e3ec82e6413042ce5d8cd075f7))
## [0.2.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/advanced-checklist
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/advanced-checklist",
"version": "0.2.1",
"version": "0.2.2",
"description": "A task editor with grouping functionality.",
"author": "Standard Notes.",
"keywords": [
@@ -79,6 +79,9 @@
"^.+\\.module\\.(css|sass|scss)$"
]
},
"dependencies": {
"@standardnotes/utils": "workspace:*"
},
"devDependencies": {
"@reach/alert-dialog": "0.16.2",
"@reach/menu-button": "0.16.2",
@@ -87,7 +90,6 @@
"@reduxjs/toolkit": "1.8.0",
"@standardnotes/editor-kit": "2.2.5",
"@standardnotes/stylekit": "5.23.0",
"@standardnotes/utils": "workspace:*",
"@testing-library/dom": "8.11.3",
"@testing-library/jest-dom": "5.16.2",
"@testing-library/react": "12.1.4",
@@ -45,7 +45,7 @@ export const ConfirmDialog: React.FC<ConfirmDialogProps> = ({
<p className="color-foreground">{children}</p>
</AlertDialogDescription>
<div className="flex my-1 mt-4">
<div className="flex my-1">
<button
data-testid="cancel-dialog-button"
className="sn-button small neutral"
@@ -2,6 +2,7 @@ import styled from 'styled-components'
export const SubTitle = styled.h3`
color: var(--sn-stylekit-foreground-color);
cursor: pointer;
font-size: var(--sn-stylekit-font-size-h3);
font-weight: 500;
margin: 10px 0px;
@@ -2,7 +2,7 @@ $transition-duration: 750ms;
.checkbox-container {
display: block;
padding-left: 20px;
padding-left: 22px;
position: relative;
&:last-child {
@@ -22,17 +22,16 @@ $transition-duration: 750ms;
.checkbox-button {
bottom: 0;
cursor: pointer;
fill: none;
height: 19px;
fill: var(--sn-stylekit-contrast-background-color);
height: 18px;
left: 0;
margin: auto;
position: absolute;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 2;
stroke: var(--sn-stylekit-neutral-color);
stroke-width: 1;
top: 0;
width: 19px;
width: 18px;
}
.align-baseline {
@@ -60,8 +59,9 @@ $transition-duration: 750ms;
.checkbox-square {
stroke-dasharray: 56.1053, 56.1053;
stroke-dashoffset: 0;
stroke: var(--sn-stylekit-neutral-color);
stroke: var(--sn-stylekit-shadow-color);
transition-delay: $transition-duration * 0.2;
fill: var(--sn-stylekit-contrast-background-color);
}
.checkbox-mark {
@@ -30,7 +30,7 @@ const MigrateLegacyContent: React.FC = () => {
Are you sure you want to migrate legacy content to the new format?
</AlertDialogLabel>
<div className="flex my-1 mt-4">
<div className="flex my-1">
<button className="sn-button small neutral" onClick={handleCancel} ref={cancelRef}>
Cancel
</button>
@@ -18,7 +18,7 @@ const TaskGroupContainer = styled.div<{ isLast?: boolean }>`
border: 1px solid var(--sn-stylekit-border-color);
border-radius: 4px;
box-sizing: border-box;
padding: 16px;
padding: 16px 18px;
margin-bottom: ${({ isLast }) => (!isLast ? '9px' : '0px')};
@media only screen and (max-width: 600px) {
@@ -83,7 +83,7 @@ const TaskGroup: React.FC<TaskGroupProps> = ({
onTransitionEnd={onTransitionEnd}
isLast={isLast}
>
<div className="flex items-center justify-between h-8 mt-1 mb-1">
<div className="flex items-center justify-between h-8">
<div className="flex flex-grow items-center" onClick={handleClick}>
<MainTitle crossed={allTasksCompleted && collapsed} highlight={isDragging} {...props}>
{groupName}
@@ -60,7 +60,7 @@ it('renders the completed tasks section', () => {
const completedTasksSection = screen.getByTestId('completed-tasks-section')
expect(completedTasksSection).toBeInTheDocument()
expect(completedTasksSection).toHaveTextContent('Completed tasks')
expect(completedTasksSection).toHaveTextContent('Completed')
const taskItems = within(completedTasksSection).getAllByTestId('task-item')
expect(taskItems).toHaveLength(1)
@@ -100,7 +100,7 @@ it('renders default sections', () => {
const completedTasksSection = screen.getByTestId('completed-tasks-section')
expect(completedTasksSection).toBeInTheDocument()
expect(completedTasksSection).toHaveTextContent('Completed tasks')
expect(completedTasksSection).toHaveTextContent('Completed')
const taskItems = within(completedTasksSection).getAllByTestId('task-item')
expect(taskItems).toHaveLength(1)
@@ -6,10 +6,9 @@ import { CSSTransition, TransitionGroup } from 'react-transition-group'
import styled from 'styled-components'
import { useAppDispatch, useAppSelector, usePrevious } from '../../app/hooks'
import { RoundButton, SubTitle } from '../../common/components'
import { SubTitle } from '../../common/components'
import { SectionModel, TaskModel, tasksGroupCollapsed } from './tasks-slice'
import { ChevronDownIcon, ChevronUpIcon } from '../../common/components/icons'
import TaskItem from './TaskItem'
const SectionHeader = styled.div`
@@ -26,7 +25,7 @@ const InnerTasksContainer = styled.div`
flex-direction: column;
& > *:not(:last-child) {
margin-bottom: 7px;
margin-bottom: 9px;
}
`
@@ -101,12 +100,7 @@ const TasksSection: React.FC<TasksSectionProps> = ({ groupName, tasks, section,
{(provided) => (
<Wrapper>
<SectionHeader>
<SubTitle>{section.name}</SubTitle>
{tasks.length > 0 && (
<RoundButton onClick={handleCollapse} size="small">
{!collapsed ? <ChevronUpIcon /> : <ChevronDownIcon />}
</RoundButton>
)}
<SubTitle onClick={handleCollapse}>{section.name}</SubTitle>
</SectionHeader>
{!collapsed && (
<InnerTasksContainer
@@ -5,11 +5,11 @@ export const LATEST_SCHEMA_VERSION = '1.0.0'
export const DEFAULT_SECTIONS: SectionModel[] = [
{
id: 'open-tasks',
name: 'Open tasks',
name: 'Open',
},
{
id: 'completed-tasks',
name: 'Completed tasks',
name: 'Completed',
},
]
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
### Bug Fixes
* **advanced checklist:** improve editor styles ([#1221](https://github.com/standardnotes/app/issues/1221)) ([f7ba658](https://github.com/standardnotes/app/commit/f7ba6588a7d062e3ec82e6413042ce5d8cd075f7))
# [1.4.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-06-28)
### Features
@@ -85,7 +85,7 @@ body {
left: 0;
height: 10px;
width: 10px;
border-radius: 1px;
border-radius: 10px;
background-color: var(--sn-stylekit-contrast-background-color);;
border: 1px solid var(--sn-stylekit-contrast-border-color);
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/simple-task-editor",
"private": true,
"version": "1.4.0",
"version": "1.4.1",
"main": "dist/dist.js",
"scripts": {
"components:compile": "webpack --config webpack.prod.js",
@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.1.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
### Bug Fixes
* **components:** dynamic panels theme ([d1df0d3](https://github.com/standardnotes/app/commit/d1df0d371a8afc60c17c79f35a1416804eedb9ec))
### Features
* deprecated editors ([#1166](https://github.com/standardnotes/app/issues/1166)) ([60ca415](https://github.com/standardnotes/app/commit/60ca4150446f9a14bb6a31416686c6d07a7d0cd9))
## [1.0.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-06-22)
**Note:** Version bump only for package @standardnotes/dynamic-theme
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/dynamic-theme",
"version": "1.0.8",
"version": "1.1.0",
"main": "dist/dist.css",
"private": true,
"sn": {
@@ -1,29 +1,23 @@
#navigation.section,
.section.tags, // legacy code pre-smart tags release
navigation {
#navigation {
flex: none !important;
width: 190px !important;
width: 10px !important;
transition: width 0.25s;
}
#navigation.section:hover,
.section.tags:hover, // legacy code pre-smart tags release
navigation:hover {
#navigation:hover {
flex: initial;
width: 250px !important;
width: 200px !important;
transition: width 0.25s;
}
.section.notes,
notes-view {
#items-column {
flex: none !important;
width: 270px !important;
transition: width 0.25s;
}
.section.notes:hover,
notes-view:hover {
#items-column:hover {
flex: initial;
width: 420px !important;
width: 380px !important;
transition: width 0.25s;
}
+44
View File
@@ -3,6 +3,50 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.23.64](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.63](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.62](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.61](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.60](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.59](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.58](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.57](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.56](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.55](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.54](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/desktop
## [3.23.53](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**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.23.53",
"version": "3.23.64",
"license": "AGPL-3.0-or-later",
"author": "Standard Notes.",
"private": true,
+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.13.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/encryption
## [1.13.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/encryption
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/encryption",
"version": "1.13.2",
"version": "1.13.3",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+6
View File
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.50.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
### Bug Fixes
* **advanced checklist:** improve editor styles ([#1221](https://github.com/standardnotes/app/issues/1221)) ([f7ba658](https://github.com/standardnotes/app/commit/f7ba6588a7d062e3ec82e6413042ce5d8cd075f7))
## [1.50.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/features
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/features",
"version": "1.50.2",
"version": "1.50.3",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -8,7 +8,7 @@ import { FillEditorComponentDefaults } from './Utilities/FillEditorComponentDefa
export function experimentalFeatures(): FeatureDescription[] {
const advancedChecklist: EditorFeatureDescription = FillEditorComponentDefaults({
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
name: 'Advanced Checklist [Alpha]',
name: 'Advanced Checklist [Beta]',
identifier: FeatureIdentifier.AdvancedChecklist,
note_type: NoteType.Task,
spellcheckControl: true,
+14
View File
@@ -3,6 +3,20 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.21.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
### Reverts
* Revert "chore: deps (#1222)" ([7017032](https://github.com/standardnotes/app/commit/701703289330baee4a5082df42bb787694fe7509)), closes [#1222](https://github.com/standardnotes/app/issues/1222)
## [1.21.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.21.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/filepicker
## [1.21.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/filepicker
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/filepicker",
"version": "1.21.1",
"version": "1.21.4",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+12
View File
@@ -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.8.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/files
## [1.8.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/files
## [1.8.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/files
## [1.8.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/files
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files",
"version": "1.8.2",
"version": "1.8.5",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+3 -2
View File
@@ -21,8 +21,6 @@ DerivedData
*.ipa
*.xcuserstate
html/Web.bundle/src/web-src
.env
# Android/IntelliJ
@@ -52,6 +50,9 @@ android-release.bundle.map
app-release.aab
*.bundle
!Web.bundle
html/Web.bundle/src/web-src
html/Web.bundle/src/components
ios-release.bundle.map
# fastlane
+66
View File
@@ -3,6 +3,72 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.30.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
### Bug Fixes
* **mobile:** component viewer in mobile web ([d901461](https://github.com/standardnotes/app/commit/d9014615f0a146733fbf7d494d0d201068817086))
## [3.30.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.8](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
## [3.30.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/mobile
+33 -32
View File
@@ -17,20 +17,20 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.569.0)
aws-sdk-core (3.130.0)
aws-partitions (1.603.0)
aws-sdk-core (3.131.2)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.55.0)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.57.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.113.0)
aws-sdk-s3 (1.114.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.4.0)
aws-sigv4 (1.5.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.0.3)
@@ -86,7 +86,7 @@ GEM
escape (0.0.4)
ethon (0.15.0)
ffi (>= 1.15.0)
excon (0.92.1)
excon (0.92.3)
faraday (1.10.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
@@ -106,8 +106,8 @@ GEM
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.3)
multipart-post (>= 1.2, < 3)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
@@ -116,7 +116,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.6)
fastlane (2.205.0)
fastlane (2.207.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
@@ -160,9 +160,9 @@ GEM
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.16.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-core (0.4.2)
google-apis-androidpublisher_v3 (0.24.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-core (0.7.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
@@ -171,19 +171,19 @@ GEM
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.10.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-playcustomapp_v1 (0.7.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-storage_v1 (0.11.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-iamcredentials_v1 (0.13.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-playcustomapp_v1 (0.10.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-storage_v1 (0.17.0)
google-apis-core (>= 0.7, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.2.0)
google-cloud-storage (1.36.1)
google-cloud-storage (1.37.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
@@ -191,7 +191,7 @@ GEM
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.1.2)
googleauth (1.2.0)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
@@ -199,14 +199,14 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.4)
http-cookie (1.0.5)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
jmespath (1.6.1)
json (2.6.1)
jwt (2.3.0)
json (2.6.2)
jwt (2.4.1)
memoist (0.16.2)
mini_magick (4.11.0)
mini_mime (1.1.2)
@@ -221,9 +221,9 @@ GEM
optparse (0.1.1)
os (1.1.4)
plist (3.6.0)
public_suffix (4.0.6)
public_suffix (4.0.7)
rake (13.0.6)
representable (3.1.1)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
@@ -234,9 +234,9 @@ GEM
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.16.1)
signet (0.17.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.0)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.8)
@@ -257,14 +257,14 @@ GEM
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.1)
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
webrick (1.7.0)
word_wrap (1.0.0)
xcode-install (2.8.0)
claide (>= 0.9.1, < 1.1.0)
fastlane (>= 2.1.0, < 3.0.0)
xcodeproj (1.21.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
@@ -278,6 +278,7 @@ GEM
zeitwerk (2.5.4)
PLATFORMS
arm64-darwin-21
ruby
DEPENDENCIES
+116 -10
View File
@@ -1,27 +1,133 @@
import React from 'react'
import { MobileDeviceInterface } from '@Lib/Interface'
import React, { useMemo, useRef } from 'react'
import { Platform } from 'react-native'
import { WebView } from 'react-native-webview'
import { WebView, WebViewMessageEvent } from 'react-native-webview'
export const MobileWebAppContainer = () => {
const sourceUri = (Platform.OS === 'android' ? 'file:///android_asset/' : '') + 'Web.bundle/loader.html'
const params = 'platform=' + Platform.OS
const sourceUri = (Platform.OS === 'android' ? 'file:///android_asset/' : '') + 'Web.bundle/src/index.html'
const webViewRef = useRef<WebView>(null)
const device = useMemo(() => new MobileDeviceInterface(), [])
const functions = Object.getOwnPropertyNames(Object.getPrototypeOf(device))
const baselineFunctions: Record<string, any> = {
isDeviceDestroyed: `(){
return false
}`,
}
let stringFunctions = ''
for (const [key, value] of Object.entries(baselineFunctions)) {
stringFunctions += `${key}${value}`
}
for (const functionName of functions) {
if (functionName === 'constructor' || baselineFunctions[functionName]) {
continue
}
stringFunctions += `
${functionName}(...args) {
return this.sendMessage('${functionName}', args);
}
`
}
const WebProcessDeviceInterface = `
class WebProcessDeviceInterface {
constructor(messageSender) {
this.appVersion = '1.2.3'
this.environment = 1
this.databases = []
this.messageSender = messageSender
}
setApplication() {}
sendMessage(functionName, args) {
return this.messageSender.sendMessage(functionName, args)
}
${stringFunctions}
}
`
const WebProcessMessageSender = `
class WebProcessMessageSender {
constructor() {
this.pendingMessages = []
window.addEventListener('message', this.handleMessageFromReactNative.bind(this))
}
handleMessageFromReactNative(event) {
const message = event.data
try {
const parsed = JSON.parse(message)
const { messageId, returnValue } = parsed
const pendingMessage = this.pendingMessages.find((m) => m.messageId === messageId)
pendingMessage.resolve(returnValue)
this.pendingMessages.splice(this.pendingMessages.indexOf(pendingMessage), 1)
} catch (error) {
console.log('Error parsing message from React Native', message, error)
}
}
sendMessage(functionName, args) {
const messageId = Math.random()
window.ReactNativeWebView.postMessage(JSON.stringify({ functionName: functionName, args: args, messageId }))
return new Promise((resolve) => {
this.pendingMessages.push({
messageId,
resolve,
})
})
}
}
`
const injectedJS = `
if (!window.location.search) {
var link = document.getElementById('web-bundle-progress-bar');
link.href = './src/index.html?${params}';
link.click();
}`
console.log = (...args) => {
window.ReactNativeWebView.postMessage('[web log] ' + args.join(' '));
}
${WebProcessDeviceInterface}
${WebProcessMessageSender}
const messageSender = new WebProcessMessageSender();
window.reactNativeDevice = new WebProcessDeviceInterface(messageSender);
true;
`
const onMessage = (event: WebViewMessageEvent) => {
const message = event.nativeEvent.data
try {
const functionData = JSON.parse(message)
void onFunctionMessage(functionData.functionName, functionData.messageId, functionData.args)
} catch (error) {
console.log('onGeneralMessage', JSON.stringify(message))
}
}
const onFunctionMessage = async (functionName: string, messageId: string, args: any) => {
const returnValue = await (device as any)[functionName](...args)
console.log(`Native device function ${functionName} called`)
webViewRef.current?.postMessage(JSON.stringify({ messageId, returnValue }))
}
/* eslint-disable @typescript-eslint/no-empty-function */
return (
<WebView
ref={webViewRef}
source={{ uri: sourceUri }}
originWhitelist={['*']}
onLoad={() => {}}
onError={(err) => console.error('An error has occurred', err)}
onHttpError={() => console.error('An HTTP error occurred')}
onMessage={() => {}}
onMessage={onMessage}
allowFileAccess={true}
allowUniversalAccessFromFileURLs={true}
injectedJavaScript={injectedJS}
/>
)
@@ -0,0 +1,15 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
class WebProcessDeviceInterface {
constructor(messageSender) {
this.appVersion = '1.2.3'
this.environment = 1
this.databases = []
this.messageSender = messageSender
}
setApplication() {}
sendMessage(functionName, args) {
return this.messageSender.sendMessage(functionName, args)
}
}
@@ -0,0 +1,31 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
class WebProcessMessageSender {
constructor() {
this.pendingMessages = []
window.addEventListener('message', this.handleMessageFromReactNative.bind(this))
}
handleMessageFromReactNative(event) {
const message = event.data
try {
const parsed = JSON.parse(message)
const { messageId, returnValue } = parsed
const pendingMessage = this.pendingMessages.find((m) => m.messageId === messageId)
pendingMessage.resolve(returnValue)
this.pendingMessages.splice(this.pendingMessages.indexOf(pendingMessage), 1)
} catch (error) {
console.log('Error parsing message from React Native', message, error)
}
}
sendMessage(functionName, args) {
const messageId = Math.random()
window.ReactNativeWebView.postMessage(JSON.stringify({ functionName: functionName, args: args, messageId }))
return new Promise((resolve) => {
this.pendingMessages.push({
messageId,
resolve,
})
})
}
}
+30 -8
View File
@@ -1,6 +1,6 @@
# frozen_string_literal: true
fastlane_version '2.181.0'
fastlane_version '2.207.0'
platform :ios do
def sign_ios(type = 'appstore')
@@ -19,7 +19,7 @@ platform :ios do
version_number: ENV['PACKAGE_VERSION'],
xcodeproj: 'ios/StandardNotes.xcodeproj'
)
increment_build_number(
build_number = increment_build_number(
build_number: ENV['BUILD_NUMBER'],
xcodeproj: 'ios/StandardNotes.xcodeproj'
)
@@ -30,24 +30,46 @@ platform :ios do
silent: true,
xcargs: 'DEBUG_INFORMATION_FORMAT=dwarf-with-dsym'
)
build_number
end
def deploy_ios(scheme)
sign_ios
build_ios(scheme)
build_number = build_ios(scheme)
app_store_connect_api_key(
key_id: ENV['APPSTORE_CONNECT_KEY_ID'],
issuer_id: ENV['APPSTORE_CONNECT_KEY_ISSUER_ID'],
key_filepath: 'ios/Authkey.p8',
in_house: false # optional but may be required if using match/sigh
in_house: false
)
is_prod = scheme == 'StandardNotes'
upload_to_testflight(
apple_id: ENV['APPLE_APP_ID'],
distribute_external: true,
notify_external_testers: true,
submit_beta_review: true
distribute_external: is_prod,
groups: ['Public'],
notify_external_testers: is_prod,
submit_beta_review: is_prod,
reject_build_waiting_for_review: is_prod,
changelog: 'Fixes and improvements.'
)
# refresh_dsyms
if is_prod
upload_to_app_store(
build_number: build_number,
submit_for_review: true,
automatic_release: false,
force: true,
skip_metadata: true,
skip_screenshots: true,
skip_binary_upload: true,
release_notes: {
'default': "Fixes and improvements.",
}
)
end
end
desc 'Deploy dev app'
@@ -0,0 +1 @@
<a id="web-bundle-progress-bar" href="#"/></a>
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<link rel="stylesheet" href="web-src/app.css" />
<script>
window.defaultSyncServer = "https://api.standardnotes.com";
window.defaultFilesHost = "https://files.standardnotes.com";
window.enabledUnfinishedFeatures = "" === 'true';
window.websocketUrl = "";
window.purchaseUrl = "https://standardnotes.com/purchase";
window.plansUrl = "https://standardnotes.com/plans";
window.dashboardUrl = "https://standardnotes.com/dashboard";
</script>
<script src="web-src/app.js"></script>
</head>
<body>
</body>
</html>
+11 -11
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/mobile",
"version": "3.30.1",
"version": "3.30.17",
"author": "Standard Notes.",
"private": true,
"license": "AGPL-3.0-or-later",
@@ -8,21 +8,21 @@
"android-dev": "react-native run-android --variant devDebug --appIdSuffix dev",
"android-prod-debug": "react-native run-android --variant prodDebug",
"android-prod-release": "yarn run android:bundle && react-native run-android --variant prodRelease",
"android:bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/",
"build": "yarn web:bundle && yarn install:pods && yarn android:bundle",
"clear-cache": "watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-*",
"format:fix": "yarn format --write",
"format": "prettier ./src",
"install:pods": "yarn pod-install ios",
"ios-dev": "react-native run-ios --scheme StandardNotesDev",
"ios-prod": "react-native run-ios --scheme StandardNotes",
"clear-cache": "watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-*",
"lint": "yarn tsc && yarn eslint . --ext .ts,.tsx",
"lint:fix": "yarn lint --fix",
"format": "prettier ./src",
"format:fix": "yarn format --write",
"build": "yarn web:bundle && yarn install:pods && yarn android:bundle",
"web:bundle": "mkdir -p html/Web.bundle/src/web-src/ && cp -r ../web/dist/. html/Web.bundle/src/web-src/",
"lint": "yarn tsc && yarn eslint . --ext .ts,.tsx",
"pods": "yarn install:pods",
"tsc": "tsc --noEmit",
"start": "react-native start",
"install:pods": "yarn pod-install ios",
"android:bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/",
"upgrade:snjs": "ncu -u '@standardnotes/*'"
"tsc": "tsc --noEmit",
"upgrade:snjs": "ncu -u '@standardnotes/*'",
"web:bundle": "mkdir -p html/Web.bundle/src/web-src/ && cp -r ../web/dist/. html/Web.bundle/src/web-src/ && mkdir -p html/Web.bundle/src/components/assets && cp -r ../components/dist/assets/. html/Web.bundle/src/components/assets/"
},
"installConfig": {
"hoistingLimits": "workspaces"
+7 -2
View File
@@ -1,16 +1,17 @@
import { AppStateEventType, AppStateType, TabletModeChangeData } from '@Lib/ApplicationState'
import { useHasEditor, useIsLocked } from '@Lib/SnjsHelperHooks'
import { ScreenStatus } from '@Lib/StatusManager'
import { IsDev } from '@Lib/Utils'
import { CompositeNavigationProp, RouteProp } from '@react-navigation/native'
import { createStackNavigator, StackNavigationProp } from '@react-navigation/stack'
import { HeaderTitleView } from '@Root/Components/HeaderTitleView'
import { IoniconsHeaderButton } from '@Root/Components/IoniconsHeaderButton'
import { Compose } from '@Root/Screens/Compose/Compose'
import { Root } from '@Root/Screens/Root'
import { SCREEN_COMPOSE, SCREEN_NOTES, SCREEN_VIEW_PROTECTED_NOTE } from '@Root/Screens/screens'
import { MainSideMenu } from '@Root/Screens/SideMenu/MainSideMenu'
import { NoteSideMenu } from '@Root/Screens/SideMenu/NoteSideMenu'
import { ViewProtectedNote } from '@Root/Screens/ViewProtectedNote/ViewProtectedNote'
import { Root } from '@Screens/Root'
import { UuidString } from '@standardnotes/snjs'
import { ICON_MENU } from '@Style/Icons'
import { ThemeService } from '@Style/ThemeService'
@@ -20,10 +21,14 @@ import { Dimensions, Keyboard, ScaledSize } from 'react-native'
import DrawerLayout, { DrawerState } from 'react-native-gesture-handler/DrawerLayout'
import { HeaderButtons, Item } from 'react-navigation-header-buttons'
import { ThemeContext } from 'styled-components'
import { MobileWebAppContainer } from '../MobileWebAppContainer'
import { HeaderTitleParams } from './App'
import { ApplicationContext } from './ApplicationContext'
import { ModalStackNavigationProp } from './ModalStack'
const IS_DEBUGGING_WEB_APP = false
const DEFAULT_TO_WEB_APP = IsDev && IS_DEBUGGING_WEB_APP
export type AppStackNavigatorParamList = {
[SCREEN_NOTES]: HeaderTitleParams
[SCREEN_COMPOSE]: HeaderTitleParams & {
@@ -196,7 +201,7 @@ export const AppStackComponent = (props: ModalStackNavigationProp<'AppStack'>) =
</HeaderButtons>
),
})}
component={Root}
component={DEFAULT_TO_WEB_APP ? MobileWebAppContainer : Root}
/>
<AppStack.Screen
name={SCREEN_COMPOSE}
+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.15.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/models
## [1.15.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/models
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/models",
"version": "1.15.2",
"version": "1.15.3",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+64
View File
@@ -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.2.83](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.82](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.81](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.80](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.79](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.78](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.77](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.76](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.75](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.74](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.73](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.72](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.71](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.70](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.69](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.68](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
## [1.2.67](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/releases
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/releases",
"version": "1.2.67",
"version": "1.2.83",
"license": "AGPL-3.0-or-later",
"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.9.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/responses
## [1.9.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/responses
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/responses",
"version": "1.9.1",
"version": "1.9.2",
"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.16.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/services
## [1.16.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/services
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/services",
"version": "1.16.2",
"version": "1.16.3",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+18
View File
@@ -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.
## [2.123.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
### Bug Fixes
* **mobile:** component viewer in mobile web ([d901461](https://github.com/standardnotes/app/commit/d9014615f0a146733fbf7d494d0d201068817086))
## [2.123.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/snjs
## [2.123.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/snjs
## [2.123.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/snjs
## [2.123.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/snjs
@@ -292,7 +292,7 @@ describe('featuresService', () => {
const component = nativeComponent()
const url = manager.urlForComponent(component)
const feature = FindNativeFeature(component.identifier) as FeatureDescription
expect(url).toEqual(`http://localhost/components/assets/${component.identifier}/${feature.index_path}`)
expect(url).toEqual(`components/assets/${component.identifier}/${feature.index_path}`)
})
it('returns hosted path for third party component', () => {
@@ -285,7 +285,7 @@ export class SNComponentManager extends AbstractService<ComponentManagerEvent, E
if (!isWeb) {
throw Error('Mobile must override urlForComponent to handle native paths')
}
return `${window.location.origin}/components/assets/${component.identifier}/${nativeFeature.index_path}`
return `components/assets/${component.identifier}/${nativeFeature.index_path}`
}
let url = component.hosted_url || component.legacy_url
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/snjs",
"version": "2.123.1",
"version": "2.123.5",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
+50
View File
@@ -3,6 +3,56 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.87](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.86](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.85](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.84](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
### Reverts
* Revert "chore: deps (#1222)" ([7017032](https://github.com/standardnotes/app/commit/701703289330baee4a5082df42bb787694fe7509)), closes [#1222](https://github.com/standardnotes/app/issues/1222)
## [1.2.83](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.82](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.81](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.80](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.79](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.78](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.77](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.76](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web-server
## [1.2.75](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web-server
+3 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/web-server",
"version": "1.2.75",
"version": "1.2.87",
"license": "AGPL-3.0-or-later",
"private": true,
"author": "Standard Notes.",
@@ -12,7 +12,8 @@
"start": "bundle exec rails s -b 0.0.0.0",
"start:no-binding": "bundle exec rails s",
"copy:components": "cp -r ../../node_modules/@standardnotes/components-meta/dist/assets/. public/components/assets/",
"build": "bundle install && yarn copy:components && bundle exec rails assets:precompile"
"build": "bundle install && yarn copy:components && bundle exec rails assets:precompile",
"sample:env": "cp .env.sample .env"
},
"dependencies": {
"@standardnotes/components-meta": "workspace:*",
+48
View File
@@ -3,6 +3,54 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.38.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/web
## [3.38.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/web
## [3.38.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
**Note:** Version bump only for package @standardnotes/web
# [3.38.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-07)
### Features
* add selected file size in context menu ([#1224](https://github.com/standardnotes/app/issues/1224)) ([50c024e](https://github.com/standardnotes/app/commit/50c024e643b4c34b4d5700ee678cf1c92d1bd3cc))
## [3.37.7](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web
## [3.37.6](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web
## [3.37.5](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
### Bug Fixes
* **web:** scrollbar styles ([#1219](https://github.com/standardnotes/app/issues/1219)) ([34719c4](https://github.com/standardnotes/app/commit/34719c49357bee36ffc904d02511b66f34399e86))
## [3.37.4](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
### Bug Fixes
* **web:** update modal styles ([#1220](https://github.com/standardnotes/app/issues/1220)) ([6fa6374](https://github.com/standardnotes/app/commit/6fa6374cf2a283070977b43b0ac4542d054aee96))
## [3.37.3](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
### Bug Fixes
* select next item when trashing or deleting item ([#1218](https://github.com/standardnotes/app/issues/1218)) ([2ee7912](https://github.com/standardnotes/app/commit/2ee791259dca709d03db2ebded7972ce7c3b788e))
## [3.37.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web
## [3.37.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2022-07-06)
**Note:** Version bump only for package @standardnotes/web
+10 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/web",
"version": "3.37.1",
"version": "3.38.3",
"license": "AGPL-3.0-or-later",
"main": "dist/app.js",
"author": "Standard Notes.",
@@ -9,23 +9,23 @@
"dist"
],
"scripts": {
"start": "webpack-dev-server --config web.webpack.dev.js",
"watch": "webpack -w --config web.webpack.dev.js",
"clean": "rm -fr dist",
"prebuild": "yarn clean",
"build": "webpack --config web.webpack.prod.js && yarn tsc",
"lint": "eslint src/javascripts",
"clean": "rm -fr dist",
"format": "prettier --write src/javascripts",
"tsc": "tsc --project tsconfig.json",
"lint": "eslint src/javascripts",
"prebuild": "yarn clean",
"start": "webpack-dev-server --config web.webpack.dev.js",
"test": "jest --config jest.config.js --coverage",
"upgrade:snjs": "ncu -u '@standardnotes/*'"
"tsc": "tsc --project tsconfig.json",
"upgrade:snjs": "ncu -u '@standardnotes/*'",
"watch": "webpack -w --config web.webpack.dev.js"
},
"devDependencies": {
"@babel/core": "*",
"@babel/plugin-transform-react-jsx": "^7.17.3",
"@babel/preset-env": "*",
"@babel/preset-typescript": "^7.16.7",
"@types/jest": "^27.4.1",
"@types/jest": "^27.5.1",
"@types/react": "^17.0.42",
"@types/react-dom": "^18.0.5",
"@types/wicg-file-system-access": "^2020.9.5",
@@ -41,6 +41,7 @@
"html-webpack-plugin": "^5.5.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^27.5.1",
"jest-environment-jsdom": "^27.5.1",
"lint-staged": ">=12",
"mini-css-extract-plugin": "^2.6.0",
"node-sass": "*",
+9 -6
View File
@@ -15,6 +15,7 @@ declare global {
electronAppVersion?: string
webClient?: DesktopManagerInterface
electronRemoteBridge?: unknown
reactNativeDevice?: WebDevice
application?: WebApplication
mainApplicationGroup?: ApplicationGroup
@@ -88,12 +89,14 @@ const startApplication: StartApplication = async function startApplication(
}
if (IsWebPlatform) {
startApplication(
window.defaultSyncServer,
new WebDevice(WebAppVersion),
window.enabledUnfinishedFeatures,
window.websocketUrl,
).catch(console.error)
const ReactNativeWebViewInitializationTimeout = 0
setTimeout(() => {
const device = window.reactNativeDevice || new WebDevice(WebAppVersion)
startApplication(window.defaultSyncServer, device, window.enabledUnfinishedFeatures, window.websocketUrl).catch(
console.error,
)
}, ReactNativeWebViewInitializationTimeout)
} else {
window.startApplication = startApplication
}
@@ -8,6 +8,7 @@ import { useCloseOnBlur } from '@/Hooks/useCloseOnBlur'
import { PopoverFileSubmenuProps } from './PopoverFileItemProps'
import { PopoverFileItemActionType } from './PopoverFileItemAction'
import HorizontalSeparator from '../Shared/HorizontalSeparator'
import { formatSizeToReadableString } from '@standardnotes/filepicker'
const PopoverFileSubmenu: FunctionComponent<PopoverFileSubmenuProps> = ({
file,
@@ -188,9 +189,12 @@ const PopoverFileSubmenu: FunctionComponent<PopoverFileSubmenuProps> = ({
<span className="text-danger">Delete permanently</span>
</button>
<div className="px-3 py-1 text-xs font-medium text-neutral">
<div>
<div className="mb-1">
<span className="font-semibold">File ID:</span> {file.uuid}
</div>
<div>
<span className="font-semibold">Size:</span> {formatSizeToReadableString(file.decryptedSize)}
</div>
</div>
</>
)}
@@ -37,7 +37,7 @@ const ContentList: FunctionComponent<Props> = ({
selectedItems,
paginate,
}) => {
const { selectPreviousItem, selectNextItem } = itemListController
const { selectPreviousItem, selectNextItem } = selectionController
const { hideTags, hideDate, hideNotePreview, hideEditorIcon } = itemListController.webDisplayOptions
const { sortBy } = itemListController.displayOptions
@@ -57,11 +57,9 @@ const ContentListView: FunctionComponent<Props> = ({
panelWidth,
renderedItems,
searchBarElement,
selectNextItem,
selectPreviousItem,
} = itemListController
const { selectedItems } = selectionController
const { selectedItems, selectNextItem, selectPreviousItem } = selectionController
const isFilesSmartView = useMemo(
() => navigationController.selected?.uuid === SystemViewId.Files,
@@ -7,6 +7,7 @@ import { observer } from 'mobx-react-lite'
import { FilesController } from '@/Controllers/FilesController'
import { SelectedItemsController } from '@/Controllers/SelectedItemsController'
import HorizontalSeparator from '../Shared/HorizontalSeparator'
import { formatSizeToReadableString } from '@standardnotes/filepicker'
type Props = {
closeMenu: () => void
@@ -149,9 +150,12 @@ const FileMenuOptions: FunctionComponent<Props> = ({
</button>
{selectedFiles.length === 1 && (
<div className="px-3 pt-1.5 pb-0.5 text-xs font-medium text-neutral">
<div>
<div className="mb-1">
<span className="font-semibold">File ID:</span> {selectedFiles[0].uuid}
</div>
<div>
<span className="font-semibold">Size:</span> {formatSizeToReadableString(selectedFiles[0].decryptedSize)}
</div>
</div>
)}
</>
@@ -24,7 +24,7 @@ const NoAccountWarningContent = ({ accountMenuController, noAccountWarningContro
}, [noAccountWarningController])
return (
<div className="mt-4 grid grid-cols-1 rounded-md p-4 shadow-main">
<div className="mt-4 grid grid-cols-1 rounded-md border border-border p-4">
<h1 className="sk-h3 m-0 text-sm font-semibold">Data not backed up</h1>
<p className="col-start-1 col-end-3 m-0 mt-1 text-sm">Sign in or register to back up your notes.</p>
<Button primary small className="col-start-1 col-end-3 mt-3 justify-self-start" onClick={showAccountMenu}>
@@ -80,7 +80,7 @@ const NoteTag = ({ viewControllerManager, tag }: Props) => {
if (autocompleteInputFocused) {
return -1
}
return tags[0].uuid === tag.uuid ? 0 : -1
return tags[0]?.uuid === tag.uuid ? 0 : -1
}, [autocompleteInputFocused, tags, tag, focusedTagUuid])
const onKeyDown: KeyboardEventHandler = useCallback(
@@ -3,6 +3,10 @@ import { createRef } from 'react'
import { PureComponent } from '@/Components/Abstract/PureComponent'
import Button from '@/Components/Button/Button'
import DecoratedPasswordInput from '../Input/DecoratedPasswordInput'
import ModalDialog from '../Shared/ModalDialog'
import ModalDialogLabel from '../Shared/ModalDialogLabel'
import ModalDialogDescription from '../Shared/ModalDialogDescription'
import ModalDialogButtons from '../Shared/ModalDialogButtons'
interface Props {
application: WebApplication
@@ -224,84 +228,69 @@ class PasswordWizard extends PureComponent<Props, State> {
override render() {
return (
<div className="sn-component">
<div id="password-wizard" className="sk-modal small auto-height">
<div className="sk-modal-background" />
<div className="sk-modal-content">
<div className="sn-component">
<div className="sk-panel">
<div className="sk-panel-header">
<div className="sk-panel-header-title">{this.state.title}</div>
<a onClick={this.dismiss} className="sk-a info close-button">
Close
</a>
</div>
<div className="sk-panel-content">
{this.state.step === Steps.PasswordStep && (
<div className="sk-panel-section">
<div className="sk-panel-row">
<div className="sk-panel-column stretch">
<form className="sk-panel-form">
<label htmlFor="password-wiz-current-password" className="mb-1 block">
Current Password
</label>
<div className="sn-component" id="password-wizard">
<ModalDialog>
<ModalDialogLabel closeDialog={this.dismiss}>{this.state.title}</ModalDialogLabel>
<ModalDialogDescription>
{this.state.step === Steps.PasswordStep && (
<div className="flex flex-col pb-1.5">
<form>
<label htmlFor="password-wiz-current-password" className="mb-1 block">
Current Password
</label>
<DecoratedPasswordInput
ref={this.currentPasswordInput}
id="password-wiz-current-password"
value={this.state.formData.currentPassword}
onChange={this.handleCurrentPasswordInputChange}
type="password"
/>
<DecoratedPasswordInput
ref={this.currentPasswordInput}
id="password-wiz-current-password"
value={this.state.formData.currentPassword}
onChange={this.handleCurrentPasswordInputChange}
type="password"
/>
<div className="sk-panel-row" />
<div className="min-h-2" />
<label htmlFor="password-wiz-new-password" className="mb-1 block">
New Password
</label>
<label htmlFor="password-wiz-new-password" className="mb-1 block">
New Password
</label>
<DecoratedPasswordInput
id="password-wiz-new-password"
value={this.state.formData.newPassword}
onChange={this.handleNewPasswordInputChange}
type="password"
/>
<div className="sk-panel-row" />
<DecoratedPasswordInput
id="password-wiz-new-password"
value={this.state.formData.newPassword}
onChange={this.handleNewPasswordInputChange}
type="password"
/>
<label htmlFor="password-wiz-confirm-new-password" className="mb-1 block">
Confirm New Password
</label>
<div className="min-h-2" />
<DecoratedPasswordInput
id="password-wiz-confirm-new-password"
value={this.state.formData.newPasswordConfirmation}
onChange={this.handleNewPasswordConfirmationInputChange}
type="password"
/>
</form>
</div>
</div>
</div>
)}
{this.state.step === Steps.FinishStep && (
<div className="sk-panel-section">
<div className="mb-1 font-bold text-info">Your password has been successfully changed.</div>
<p className="sk-p">
Please ensure you are running the latest version of Standard Notes on all platforms to ensure
maximum compatibility.
</p>
</div>
)}
</div>
<div className="sk-panel-footer">
<Button primary onClick={this.nextStep} disabled={this.state.lockContinue} className="min-w-20">
{this.state.continueTitle}
</Button>
</div>
<label htmlFor="password-wiz-confirm-new-password" className="mb-1 block">
Confirm New Password
</label>
<DecoratedPasswordInput
id="password-wiz-confirm-new-password"
value={this.state.formData.newPasswordConfirmation}
onChange={this.handleNewPasswordConfirmationInputChange}
type="password"
/>
</form>
</div>
</div>
</div>
</div>
)}
{this.state.step === Steps.FinishStep && (
<div className="flex flex-col">
<div className="mb-1 font-bold text-info">Your password has been successfully changed.</div>
<p className="sk-p">
Please ensure you are running the latest version of Standard Notes on all platforms to ensure maximum
compatibility.
</p>
</div>
)}
</ModalDialogDescription>
<ModalDialogButtons>
<Button primary onClick={this.nextStep} disabled={this.state.lockContinue} className="min-w-20">
{this.state.continueTitle}
</Button>
</ModalDialogButtons>
</ModalDialog>
</div>
)
}
@@ -12,7 +12,7 @@ const labelClassName = 'block mb-1'
const ChangeEmailForm: FunctionComponent<Props> = ({ setNewEmail, setCurrentPassword }) => {
return (
<div className="flex w-full flex-col">
<div className="mt-2 mb-3">
<div className="mb-3">
<label className={labelClassName} htmlFor="change-email-email-input">
New Email:
</label>
@@ -5,7 +5,7 @@ type Props = {
}
const Bullet: FunctionComponent<Props> = ({ className = '' }) => (
<div className={`min-h-1 bg-inverted-default min-w-1 rounded-full ${className} mr-2`} />
<div className={`min-h-1 min-w-1 rounded-full bg-text ${className} mr-2`} />
)
export default Bullet
@@ -25,7 +25,7 @@ const ScanQRCode: FunctionComponent<Props> = ({ activation: act }) => {
<QRCode className="border-neutral-contrast-bg border-2 border-solid" value={act.qrCode} size={100} />
</div>
<div className="min-w-5" />
<div className="flex flex-grow flex-col">
<div className="flex flex-grow flex-col gap-2">
<div className="flex flex-row items-center">
<Bullet />
<div className="min-w-1" />
@@ -35,7 +35,6 @@ const ScanQRCode: FunctionComponent<Props> = ({ activation: act }) => {
<div className="min-w-2" />
<AuthAppInfoTooltip />
</div>
<div className="min-h-2" />
<div className="flex flex-row items-center">
<Bullet className="mt-2 self-start" />
<div className="min-w-1" />
@@ -43,7 +42,6 @@ const ScanQRCode: FunctionComponent<Props> = ({ activation: act }) => {
<b>Scan this QR code</b> or <b>add this secret key</b>:
</div>
</div>
<div className="min-h-2" />
<DecoratedInput
className={{ container: 'w-92 ml-4' }}
disabled={true}
@@ -107,9 +107,9 @@ const SessionsModalContent: FunctionComponent<{
<ModalDialog onDismiss={close} className="sessions-modal max-h-[90vh]">
<ModalDialogLabel
headerButtons={
<button className="cursor-pointer border-0 font-bold text-info" onClick={refresh}>
<Button small colorStyle="info" onClick={refresh}>
Refresh
</button>
</Button>
}
closeDialog={close}
>
@@ -1,5 +1,6 @@
import { useRef, ReactNode } from 'react'
import { AlertDialogContent, AlertDialogOverlay } from '@reach/alert-dialog'
import { classNames } from '@/Utils/ConcatenateClassNames'
type Props = {
children: ReactNode
@@ -14,7 +15,10 @@ const ModalDialog = ({ children, onDismiss, className }: Props) => {
<AlertDialogOverlay leastDestructiveRef={ldRef} onDismiss={onDismiss}>
<AlertDialogContent
tabIndex={0}
className={`flex w-160 flex-col border border-solid border-border bg-default p-0 shadow-main ${className}`}
className={classNames(
'flex w-160 flex-col rounded border border-solid border-border bg-default p-0 shadow-main',
className,
)}
>
{children}
</AlertDialogContent>
@@ -1,3 +1,4 @@
import { classNames } from '@/Utils/ConcatenateClassNames'
import { FunctionComponent } from 'react'
type Props = {
@@ -7,7 +8,7 @@ type Props = {
const ModalDialogButtons: FunctionComponent<Props> = ({ children, className }) => (
<>
<hr className="m-0 h-[1px] border-none bg-border" />
<div className={`flex flex-row items-center px-4 py-4 ${className}`}>
<div className={classNames('flex items-center justify-end px-4 py-4', className)}>
{children != undefined && Array.isArray(children)
? children.map((child, idx, arr) => (
<>
@@ -1,5 +1,7 @@
import { FunctionComponent, ReactNode } from 'react'
import { AlertDialogLabel } from '@reach/alert-dialog'
import Icon from '@/Components/Icon/Icon'
import { classNames } from '@/Utils/ConcatenateClassNames'
type Props = {
closeDialog: () => void
@@ -9,15 +11,18 @@ type Props = {
const ModalDialogLabel: FunctionComponent<Props> = ({ children, closeDialog, className, headerButtons }) => (
<AlertDialogLabel
className={`flex flex-shrink-0 items-center justify-between border-b border-solid border-border bg-contrast px-4.5 py-3 text-text ${className}`}
className={classNames(
'flex flex-shrink-0 items-center justify-between rounded-t border-b border-solid border-border bg-default px-4.5 py-3 text-text',
className,
)}
>
<div className="flex w-full flex-row items-center justify-between">
<div className="flex-grow text-base font-medium text-text">{children}</div>
<div className="flex-grow text-lg font-semibold text-text">{children}</div>
<div className="flex items-center gap-2">
{headerButtons}
<div tabIndex={0} className="cursor-pointer font-bold text-info" onClick={closeDialog}>
Close
</div>
<button tabIndex={0} className="rounded p-1 font-bold hover:bg-contrast" onClick={closeDialog}>
<Icon type="close" />
</button>
</div>
</div>
<hr className="h-1px no-border m-0 bg-border" />
@@ -370,7 +370,7 @@ export class ItemListController extends AbstractViewController implements Intern
await this.selectFirstItem()
} else if (this.shouldCloseActiveItem(activeItem) && activeController) {
this.closeItemController(activeController)
this.selectNextItem()
this.selectionController.selectNextItem()
} else if (this.shouldSelectNextItemOrCreateNewNote(activeItem)) {
await this.selectNextItemOrCreateNewNote()
} else if (this.shouldSelectActiveItem(activeItem) && activeItem) {
@@ -547,27 +547,11 @@ export class ItemListController extends AbstractViewController implements Intern
return document.getElementById(ElementIdScrollContainer)
}
selectItemWithScrollHandling = async (
item: {
uuid: ListableContentItem['uuid']
},
{ userTriggered = false, scrollIntoView = true },
): Promise<void> => {
await this.selectionController.selectItem(item.uuid, userTriggered)
if (scrollIntoView) {
const itemElement = document.getElementById(item.uuid)
itemElement?.scrollIntoView({
behavior: 'smooth',
})
}
}
selectFirstItem = async () => {
const item = this.getFirstNonProtectedItem()
if (item) {
await this.selectItemWithScrollHandling(item, {
await this.selectionController.selectItemWithScrollHandling(item, {
userTriggered: false,
scrollIntoView: false,
})
@@ -576,77 +560,21 @@ export class ItemListController extends AbstractViewController implements Intern
}
}
selectNextItem = () => {
const displayableItems = this.items
const currentIndex = displayableItems.findIndex((candidate) => {
return candidate.uuid === this.selectionController.lastSelectedItem?.uuid
})
let nextIndex = currentIndex + 1
while (nextIndex < displayableItems.length) {
const nextItem = displayableItems[nextIndex]
nextIndex++
if (nextItem.protected) {
continue
}
this.selectItemWithScrollHandling(nextItem, { userTriggered: true }).catch(console.error)
const nextNoteElement = document.getElementById(nextItem.uuid)
nextNoteElement?.focus()
return
}
}
selectNextItemOrCreateNewNote = async () => {
const item = this.getFirstNonProtectedItem()
if (item) {
await this.selectItemWithScrollHandling(item, {
userTriggered: false,
scrollIntoView: false,
}).catch(console.error)
await this.selectionController
.selectItemWithScrollHandling(item, {
userTriggered: false,
scrollIntoView: false,
})
.catch(console.error)
} else {
await this.createNewNote()
}
}
selectPreviousItem = () => {
const displayableItems = this.items
if (!this.selectionController.lastSelectedItem) {
return
}
const currentIndex = displayableItems.indexOf(this.selectionController.lastSelectedItem)
let previousIndex = currentIndex - 1
while (previousIndex >= 0) {
const previousItem = displayableItems[previousIndex]
previousIndex--
if (previousItem.protected) {
continue
}
this.selectItemWithScrollHandling(previousItem, { userTriggered: true }).catch(console.error)
const previousNoteElement = document.getElementById(previousItem.uuid)
previousNoteElement?.focus()
return
}
}
setNoteFilterText = (text: string) => {
if (text === this.noteFilterText) {
return
@@ -201,7 +201,6 @@ export class NotesController extends AbstractViewController {
const notesDeleted = await this.deleteNotes(false)
if (notesDeleted) {
runInAction(() => {
this.unselectNotes()
this.contextMenuOpen = false
})
}
@@ -210,7 +209,6 @@ export class NotesController extends AbstractViewController {
mutator.trashed = trashed
})
runInAction(() => {
this.unselectNotes()
this.contextMenuOpen = false
})
}
@@ -242,10 +240,10 @@ export class NotesController extends AbstractViewController {
confirmButtonStyle: 'danger',
})
) {
this.selectionController.selectNextItem()
if (permanently) {
for (const note of this.getSelectedNotesList()) {
await this.application.mutator.deleteItem(note)
this.selectionController.deselectItem(note)
}
} else {
await this.changeSelectedNotes((mutator) => {
@@ -221,4 +221,78 @@ export class SelectedItemsController extends AbstractViewController {
didSelect: this.selectedItems[uuid] != undefined,
}
}
selectItemWithScrollHandling = async (
item: {
uuid: ListableContentItem['uuid']
},
{ userTriggered = false, scrollIntoView = true },
): Promise<void> => {
const { didSelect } = await this.selectItem(item.uuid, userTriggered)
if (didSelect && scrollIntoView) {
const itemElement = document.getElementById(item.uuid)
itemElement?.scrollIntoView({
behavior: 'smooth',
})
}
}
selectNextItem = () => {
const displayableItems = this.itemListController.items
const currentIndex = displayableItems.findIndex((candidate) => {
return candidate.uuid === this.lastSelectedItem?.uuid
})
let nextIndex = currentIndex + 1
while (nextIndex < displayableItems.length) {
const nextItem = displayableItems[nextIndex]
nextIndex++
if (nextItem.protected) {
continue
}
this.selectItemWithScrollHandling(nextItem, { userTriggered: true }).catch(console.error)
const nextNoteElement = document.getElementById(nextItem.uuid)
nextNoteElement?.focus()
return
}
}
selectPreviousItem = () => {
const displayableItems = this.itemListController.items
if (!this.lastSelectedItem) {
return
}
const currentIndex = displayableItems.indexOf(this.lastSelectedItem)
let previousIndex = currentIndex - 1
while (previousIndex >= 0) {
const previousItem = displayableItems[previousIndex]
previousIndex--
if (previousItem.protected) {
continue
}
this.selectItemWithScrollHandling(previousItem, { userTriggered: true }).catch(console.error)
const previousNoteElement = document.getElementById(previousItem.uuid)
previousNoteElement?.focus()
return
}
}
}
@@ -1,4 +1,5 @@
import { AlertService, ButtonType, sanitizeHtmlString } from '@standardnotes/snjs'
import { AlertService, ButtonType } from '@standardnotes/services'
import { sanitizeHtmlString } from '@standardnotes/utils'
import { SKAlert } from '@standardnotes/styles'
/** @returns a promise resolving to true if the user confirmed, false if they canceled */
@@ -60,7 +60,6 @@ $content-horizontal-padding: 16px;
padding: 4px 14px;
cursor: pointer;
transition: height 0.1s ease-in-out;
position: relative;
width: 100%;
> .tag-info {
+2 -1
View File
@@ -1,5 +1,6 @@
@import '../../../styles/src/Styles/_colors.scss';
@import '../../../styles/src/Styles/_panels.scss';
@import '../../../styles/src/Styles/_scrollbar.scss';
@import '../../../styles/src/Styles/utils/_animation.scss';
@import 'theme';
@import 'main';
@@ -21,4 +22,4 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind utilities;
+4
View File
@@ -38,6 +38,10 @@ module.exports = {
89: '22.25rem',
125: '31.25rem',
},
minHeight: {
1: '0.25rem',
2: '0.5rem',
},
maxHeight: {
110: '27.5rem',
},
+1 -1
View File
@@ -16,7 +16,7 @@
"declarationDir": "dist/@types",
"baseUrl": ".",
"jsx": "react-jsx",
"typeRoots": ["./src/javascripts/Types/External", "../../node_modules/@types"],
"typeRoots": ["./src/javascripts/Types/External", "../../node_modules/@types", "node_modules/@types"],
"paths": {
"@/*": ["./src/javascripts/*"],
"@Controllers/*": ["src/javascripts/Controllers/*"],
+4 -2
View File
@@ -6403,6 +6403,7 @@ __metadata:
"@standardnotes/eslint-config-extensions": ^1.0.4
"@standardnotes/features": "workspace:*"
"@standardnotes/styles": "workspace:*"
"@standardnotes/utils": "workspace:*"
copy-webpack-plugin: ^11.0.0
mini-css-extract-plugin: ^2.6.0
minimatch: ^5.1.0
@@ -7504,7 +7505,7 @@ __metadata:
"@standardnotes/snjs": "workspace:*"
"@standardnotes/styles": "workspace:*"
"@standardnotes/toast": "workspace:*"
"@types/jest": ^27.4.1
"@types/jest": ^27.5.1
"@types/react": ^17.0.42
"@types/react-dom": ^18.0.5
"@types/wicg-file-system-access": ^2020.9.5
@@ -7521,6 +7522,7 @@ __metadata:
html-webpack-plugin: ^5.5.0
identity-obj-proxy: ^3.0.0
jest: ^27.5.1
jest-environment-jsdom: ^27.5.1
lint-staged: ">=12"
mini-css-extract-plugin: ^2.6.0
mobx: ^6.5.0
@@ -8386,7 +8388,7 @@ __metadata:
languageName: node
linkType: hard
"@types/jest@npm:^27.4.1":
"@types/jest@npm:^27.4.1, @types/jest@npm:^27.5.1":
version: 27.5.2
resolution: "@types/jest@npm:27.5.2"
dependencies: