Compare commits

...
Author SHA1 Message Date
StandardNotes CI 9e2d496804 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-03-11 10:50:23 +00:00
Karol Sójko 7febc1fac6 chore: fix calling subscription settings endpoints - skip e2e 2024-03-11 11:40:58 +01:00
StandardNotes CI 6f571936c3 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-03-11 10:21:38 +00:00
Karol Sójko 065f3562f4 chore: fix muting sign in emails - skip e2e (#2859)
* chore: fix muting sign in emails - skip e2e

* chore: fix api version for e2e tests
2024-03-11 11:12:23 +01:00
StandardNotes CI 41f542d1c5 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-03-08 05:54:51 +00:00
Aman Harwara 94840a7afb chore: trigger release [skip e2e] 2024-03-08 11:15:18 +05:30
StandardNotes CI fb19b37d5b chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
2024-03-07 15:40:21 +00:00
Mo 3b2f761661 fix: use API v0 on iOS (#2858) [skip e2e] 2024-03-07 09:29:46 -06:00
StandardNotes CI b28b59e4a0 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-03-07 12:38:06 +00:00
Karol Sójko 9238759d38 chore: add building web app image - skip e2e (#2857) 2024-03-07 13:28:13 +01:00
StandardNotes CI d2404ba276 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].9
 - @standardnotes/[email protected]
2024-03-06 11:43:03 +00:00
Karol Sójko 7301acd36c chore: fix e2e tests for no cookie support setup - skip e2e 2024-03-06 12:33:30 +01:00
StandardNotes CI bf997e356c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-03-05 14:20:50 +00:00
Aman Harwara c151c3c6d7 chore: fix issue with sibling lists not being merged correctly in Super [skip e2e] 2024-03-05 19:39:49 +05:30
StandardNotes CI 6af7f66f46 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
2024-03-05 08:34:17 +00:00
Karol Sójko 1d0e8cfc7f chore: switch api to cookie based sessions - skip e2e (#2854)
* chore: switch api to cookie based sessions - skip e2e

* chore: fix legacy http service to include api version in requests - skip e2e
2024-03-05 09:25:53 +01:00
StandardNotes CI f3f5c63185 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected]
2024-03-01 13:51:47 +00:00
Karol Sójko 1651a24370 chore: replace sncrypto web with a published version - skip e2e 2024-03-01 14:41:58 +01:00
StandardNotes CI e6b6674407 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
2024-03-01 13:21:26 +00:00
Karol Sójko 7aaa92ba57 chore: publish sncrypto web to npm - skip e2e 2024-03-01 14:12:53 +01:00
StandardNotes CI 612df361d7 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
2024-03-01 11:51:21 +00:00
Karol Sójko d23f3ba4d5 chore: add required deps for snjs binary - skip e2e 2024-03-01 12:42:41 +01:00
StandardNotes CI 43dd51b7e5 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].9
2024-03-01 11:37:17 +00:00
Karol Sójko e4d85d50c9 chore: add snjs binary - skip e2e 2024-03-01 12:28:42 +01:00
StandardNotes CI 4bd44c3a6a chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
2024-02-28 15:48:02 +00:00
Aman Harwara c42bfdcd2a refactor: hide unnecessary header options on mobile when typing in super note [skip e2e] 2024-02-28 21:09:14 +05:30
Aman Harwara 89491870eb chore: make super item links wrap like normal links 2024-02-28 21:05:06 +05:30
StandardNotes CI f797128e32 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].7
2024-02-26 15:32:04 +00:00
Aman Harwara 2acb7e3808 chore: fix font size preference not working for blockquotes [skip e2e] 2024-02-26 20:53:12 +05:30
Aman Harwara f8e3c4bbbd chore: editor header not working correctly in focus mode on macOS [skip e2e] 2024-02-26 20:46:38 +05:30
Aman Harwara 06ca2bdedb chore: ignore editor width setting if window size is too small 2024-02-26 20:40:41 +05:30
Aman Harwara f9be8b3d03 chore: add extra bottom padding to plain editor on iOS so text doesn't get hidden by floating butotn 2024-02-26 20:21:41 +05:30
Karol Sójko fa2543b188 chore(snjs): fix session invalidation test 2024-02-26 10:35:11 +01:00
StandardNotes CI eb8794823c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].6
2024-02-22 12:03:51 +00:00
Karol Sójko d4c94a67e2 chore(api): add sending cookie credentials with requests - skip e2e 2024-02-22 12:54:31 +01:00
Aman Harwara 3e78e6faf1 chore: update ios ci 2024-02-21 19:12:05 +05:30
StandardNotes CI c85d7b556c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
2024-02-21 08:16:14 +00:00
Aman Harwara 5d14abe9d7 chore: fix ios ci [skip e2e] 2024-02-21 13:37:08 +05:30
StandardNotes CI 8aa4729233 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
2024-02-20 19:36:52 +00:00
Mo 8e11227e8e refactor: exclude protected previews from linking search (#2853) 2024-02-20 13:08:16 -06:00
StandardNotes CI d6cb83a2bb chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].3
2024-02-19 17:12:02 +00:00
Mo a455304a7a refactor: remove application mfa helper functions (#2852) 2024-02-19 10:43:05 -06:00
moughxyz 74da19add8 Update readme [no ci] 2024-02-19 10:32:14 -06:00
StandardNotes CI e46f1b3c39 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2024-02-18 10:28:20 +00:00
Aman Harwara 84ee718330 Merge branch 'main' of github.com:standardnotes/app 2024-02-18 15:29:40 +05:30
Aman Harwara 015660a2b3 chore: update ios dependencies [skip e2e] 2024-02-18 15:29:11 +05:30
StandardNotes CI 9a7c947038 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2024-02-18 09:18:53 +00:00
Aman Harwara 7c0bf5a9a7 chore: fix ios deploy [skip e2e] 2024-02-18 14:35:19 +05:30
StandardNotes CI d13b51697e chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2024-02-17 14:19:16 +00:00
Aman Harwara 47745cb79c feat: Added "Find in note" option to note options/context menu for Super notes 2024-02-17 19:20:16 +05:30
StandardNotes CI 85c401fa6e chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
2024-02-17 09:13:16 +00:00
Aman Harwara 79374f017b chore: fix Open button in duplicate toast not working correctly on mobile [skip e2e] 2024-02-17 14:34:29 +05:30
Aman Harwara bfbf9ab8ce feat: Themes and appeareance settings are now local to your device and not synced (#2847) 2024-02-17 14:23:37 +05:30
Aman Harwara 3d1a038393 chore: fix issue on macOS where close button on preferences header is not fully clickable 2024-02-17 14:23:00 +05:30
StandardNotes CI 8542616a5d chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
2024-02-15 15:42:08 +00:00
Aman Harwara 51600f15ad chore: update lexical patch to fix autocorrect issue on android [skip e2e] 2024-02-15 21:01:50 +05:30
StandardNotes CI 306a5e93b8 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].4
2024-02-08 15:20:34 +00:00
moughxyz 77f692fe66 fix: Fixed an issue where signing into a self-hosted account would not correctly load subscription status 2024-02-08 08:51:18 -06:00
StandardNotes CI 32c5005b0c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2024-02-07 07:52:55 +00:00
Aman Harwara 1ebe036149 chore: fix issue with PDF viewer on desktop [skip e2e] 2024-02-07 13:14:05 +05:30
StandardNotes CI 6893f02652 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].9
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2024-02-07 06:15:33 +00:00
Aman Harwara 345d188fbb chore: update lexical patch [skip e2e] 2024-02-07 11:36:23 +05:30
Aman Harwara c3dad5ae8d chore: fix UI freezing when loading a Super note with a lot of list items [skip e2e] 2024-02-07 00:49:50 +05:30
StandardNotes CI 11a17086ac chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2024-02-05 08:38:59 +00:00
Aman Harwara 5f6c8dedf2 chore: fix clipper width & height issues [skip e2e] 2024-02-05 13:59:58 +05:30
StandardNotes CI e81cf1f1e0 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2024-02-03 09:14:11 +00:00
Aman Harwara 2d168a68cf feat: Improved keyboard navigation for tags and smart views. Tags can now be expanded/closed using left and right arrow keys. 2024-02-03 14:13:29 +05:30
StandardNotes CI 700a9953dc chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2024-02-02 17:34:52 +00:00
Aman Harwara 8f15652ba1 chore: fix super table-related styling and deletion behaviors [skip e2e] 2024-02-02 22:55:24 +05:30
Mo 1c6b31f643 chore: update csp (#2826) 2024-02-02 10:59:58 -06:00
StandardNotes CI 19a515ee6e chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].0
2024-02-02 16:08:18 +00:00
Aman Harwara 16c21f40d1 chore: fix super menu contrast issues [skip e2e] 2024-02-02 21:29:04 +05:30
Aman Harwara 4c21a61dcf chore: show selected tag options by default when opening display options menu 2024-02-02 20:57:00 +05:30
Aman Harwara cfde0fd9b8 chore: fix tag context menu not closing on delete 2024-02-02 16:20:40 +05:30
Aman Harwara 28825bc2ee refactor: list keyboard navigation 2024-02-02 16:12:36 +05:30
Aman Harwara b07abaa5df feat: Added search bar to navigation panel for searching tags and smart views (#2815) 2024-02-02 16:07:55 +05:30
StandardNotes CI 50c1977410 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2024-01-31 18:15:42 +00:00
Aman Harwara 703a2898ac chore: fix freezing when pressing Enter after adding an inline link to a Super note [skip e2e] 2024-01-31 23:33:56 +05:30
StandardNotes CI e1905fa121 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].2
2024-01-30 13:36:38 +00:00
Aman Harwara 9c73a23ca0 chore: fix modal header on small window size on macOS [skip e2e] 2024-01-30 18:57:38 +05:30
Aman Harwara 2950aaa09a fix: Changed shortcut for Replace on macOS to Opt+Cmd+F 2024-01-30 18:44:56 +05:30
Aman Harwara 3c0370aae2 chore: fix macOS issue with top-half of toolbar buttons dragging the window 2024-01-30 18:09:37 +05:30
Aman Harwara 9854ca898e chore: upgrade lexical 2024-01-29 13:20:04 +05:30
StandardNotes CI 8977da3960 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].1
2024-01-28 17:31:50 +00:00
Aman Harwara 5a49005e79 fix: The shortcut for displaying the keyboard shortcut help dialog has been changed to Ctrl + / 2024-01-28 22:32:32 +05:30
StandardNotes CI 865ebe58d3 chore(release): publish
- @standardnotes/[email protected].1
 - @standardnotes/[email protected]
2024-01-27 11:30:57 +00:00
Aman Harwara 07cba245c1 chore: fix issue on mac where app is not draggable if locked [skip e2e] 2024-01-27 16:51:38 +05:30
StandardNotes CI dc22101a7c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
2024-01-27 11:16:18 +00:00
Aman Harwara 70ec1f1b54 refactor: super export modal 2024-01-27 16:17:01 +05:30
Mae B. Morella c858e516bb fix: Fixed issue with Simplenote importer not titling multi-line documents (#2798) 2024-01-27 16:08:35 +05:30
Aman Harwara 853fab53ab feat: Added "Page size" option when exporting Super notes as PDF 2024-01-27 16:04:20 +05:30
Aman Harwara ff3c45ba35 feat: Added "Keyboard shortcuts" help dialog. Can be opened by pressing Shift + ? 2024-01-27 15:25:49 +05:30
StandardNotes CI 289849724a chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2024-01-24 18:42:55 +00:00
Mae B. Morella cf0a7a6bf1 fix: Fixed issue with Simplenote importer where empty notes would not be imported (#2793) 2024-01-24 23:40:52 +05:30
StandardNotes CI cfa2e75adc chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2024-01-24 08:34:33 +00:00
Aman Harwara 418d1a7371 feat: Super notes can now be exported as PDF (#2776) 2024-01-24 13:23:38 +05:30
StandardNotes CI 813304c959 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
2024-01-23 08:33:41 +00:00
Karol Sójko ba236a2f2b chore: add sync backoff mechanism checks (#2786) 2024-01-23 09:04:55 +01:00
StandardNotes CI 2757884d10 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2024-01-21 07:50:00 +00:00
Aman Harwara f2bcab6131 chore: fix issue with link editor position on iOS 2024-01-21 12:50:33 +05:30
Aman Harwara 327f732adc chore: fix changelog [skip e2e] 2024-01-21 12:35:59 +05:30
StandardNotes CI 909ab8ffad chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2024-01-20 15:25:38 +00:00
Aman Harwara 814afc3e6d chore: fix mobile toolbar conditional [skip e2e] 2024-01-20 20:46:47 +05:30
StandardNotes CI 2d68fb7c7d chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2024-01-20 15:14:39 +00:00
Aman Harwara 5463b7b58e chore: fix super editor menus overflowing 2024-01-20 20:16:26 +05:30
StandardNotes CI b53ae1d09b chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2024-01-20 10:23:44 +00:00
Aman Harwara cb083e2a05 chore: fix super block/item picker menu item colors 2024-01-20 15:24:56 +05:30
Aman Harwara f3276e2876 chore: re-order super toolbar items 2024-01-20 15:24:56 +05:30
Aman Harwara 396ee3f449 feat: Editing large notes (greater than 1.5MB) will result in more optimized syncing, in which changes are saved locally immediately, but sync with the server less frequently (roughly every 30 seconds rather than after every change). (#2768) 2024-01-20 15:22:09 +05:30
StandardNotes CI c6060aaab3 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
2024-01-17 16:00:53 +00:00
Aman Harwara 29a50f9353 chore: upgrade lexical & apply patches (#2757) 2024-01-17 21:00:08 +05:30
StandardNotes CI 6b7d260dda chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
2024-01-17 13:34:51 +00:00
Aman Harwara 2156e77135 chore: fix arrow down when a collapsed collapsible is the last node 2024-01-17 15:44:48 +05:30
StandardNotes CI 1bca31cdcb chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2024-01-12 14:52:59 +00:00
Karol Sójko d91402e673 chore: fix e2e matcher 2024-01-12 15:24:05 +01:00
StandardNotes CI 766f156c89 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2024-01-11 14:55:34 +00:00
Karol Sójko cf4b5ccf0a chore: global sync per minute safety limit (#2765) 2024-01-11 15:26:09 +01:00
Aman Harwara 3d895ca499 chore: memoize plain editor ref function 2024-01-11 19:39:07 +05:30
StandardNotes CI 7bafde5be7 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2024-01-10 12:07:58 +00:00
Aman Harwara 9ccbea8e0a chore: fix swipe gesture issue on iOS 2024-01-10 17:07:44 +05:30
StandardNotes CI 2298a551ed chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2024-01-08 15:17:11 +00:00
Aman Harwara 65d68f8080 refactor: zip download progress notification 2024-01-08 20:17:28 +05:30
Aman Harwara 130b63b1a5 feat: Added option to download multiple files as a zip when using the desktop app or a supported browser (#2748) 2024-01-08 19:59:28 +05:30
Aman Harwara ee895ad44d refactor: select image/file node in super when clicking inside it 2024-01-08 19:56:24 +05:30
StandardNotes CI 14a82941b8 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-01-08 09:28:20 +00:00
Aman Harwara 6e1d7926c3 refactor: toast 2024-01-08 14:29:15 +05:30
StandardNotes CI b7f8105cd6 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-01-06 22:44:38 +00:00
Mo 04106b3e15 chore: fix server selection ux [skip e2e] 2024-01-06 16:35:58 -06:00
StandardNotes CI 23efad85df chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-01-06 21:35:51 +00:00
Mo acd20dcc70 fix: Fixes issue where self-hosted accounts may not have loaded correct server 2024-01-06 15:05:56 -06:00
StandardNotes CI 604f341f8f chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-01-05 17:13:48 +00:00
Aman Harwara afaf53a7a4 chore: let user know about 429 status (#2747) 2024-01-05 22:13:54 +05:30
StandardNotes CI 121d07288a chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-01-04 18:35:23 +00:00
Mo b5a6e60146 chore: await local propagation before replacing plain text contents 2024-01-04 12:06:31 -06:00
StandardNotes CI bf18d242bf chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-01-03 17:55:15 +00:00
Aman Harwara 64351dd304 chore: fix issue with downloading multiple files on macOS 2024-01-03 22:56:01 +05:30
StandardNotes CI bc0f444ed8 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-01-03 11:16:40 +00:00
Aman Harwara 83cefb3492 refactor: file embed plugin 2024-01-03 16:17:56 +05:30
StandardNotes CI 423c62bc8e chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-01-03 09:40:49 +00:00
Aman Harwara 9019e6de81 chore: remove 5-second timeout when applying theme based on system color scheme 2024-01-03 14:42:34 +05:30
StandardNotes CI bcafb4a905 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-01-03 09:05:39 +00:00
Aman Harwara 8a3fab1024 chore: fix checklist indentation jumping 2024-01-03 14:07:07 +05:30
StandardNotes CI 990baf2a06 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-01-02 10:44:10 +00:00
Aman Harwara 948dd117d3 refactor: file download controller 2024-01-02 15:43:55 +05:30
StandardNotes CI 8418e62950 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].9
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-01-02 09:31:39 +00:00
Karol Sójko 5f5d817e04 chore: fix directory separator on windows (#2736) 2024-01-02 10:02:11 +01:00
StandardNotes CI e6d7bcecae chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2024-01-01 08:02:55 +00:00
Aman Harwara 80489cc7b6 refactor: super file insertion plugin 2024-01-01 13:04:10 +05:30
StandardNotes CI 3bb8ffbbe0 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-12-28 11:03:17 +00:00
Aman Harwara 3da5c85658 chore: fix file preview modal keyboard navigation 2023-12-28 16:04:28 +05:30
Aman Harwara 775f4d4d50 chore: update super demo initial content 2023-12-28 15:49:45 +05:30
Aman Harwara 8b5d455a6e chore: fix panel resizer double-click behavior 2023-12-28 15:38:57 +05:30
Karol SójkoandAman Harwara bc845c1633 chore: add server switcher (#2717)
* wip

* wip2

* refactor: use radio button group

* chore: add persisting host per workspace

* chore: header style

* chore: update server picker title style

* chore: margin

* chore: label

* chore: remove separator

* rename migration to latest snjs version

---------

Co-authored-by: Aman Harwara <[email protected]>
2023-12-28 10:50:14 +01:00
StandardNotes CI f376607f27 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].9
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected].9
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-12-28 09:45:09 +00:00
Karol Sójko 7a8fc49d86 chore: normalize creation and update timestamps on payloads (#2731) 2023-12-28 10:16:20 +01:00
StandardNotes CI c43f029381 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-12-23 08:49:07 +00:00
Aman Harwara 7e152774b7 chore: @lexical/clipboard patch 2023-12-23 13:49:14 +05:30
Aman Harwara 54d215e6da chore: fix lexical patch dependency 2023-12-23 13:42:51 +05:30
Aman Harwara 90afb74ce1 chore: patch lexical for ios text format bug 2023-12-23 13:31:41 +05:30
Aman Harwara 98d2f2ba23 chore: upgrade lexical 2023-12-23 13:26:39 +05:30
StandardNotes CI a656251e71 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-12-23 07:39:17 +00:00
Aman Harwara 2383d3db34 chore: fix issue with creating new Super notes [skip e2e] 2023-12-23 13:00:50 +05:30
Aman Harwara a5e2551dd0 chore: upgrade tailwind 2023-12-23 12:46:47 +05:30
StandardNotes CI 0b7372a007 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-12-22 11:41:11 +00:00
Aman Harwara 29b7e989a6 chore: show Super demo modal if user doesn't have subscription when switching editor to Super 2023-12-22 16:40:42 +05:30
StandardNotes CI 485339be86 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-12-22 08:01:08 +00:00
Aman Harwara 69a7563b4e chore: sync super markdown import implementation with lexical 2023-12-22 12:32:07 +05:30
377 changed files with 8438 additions and 1866 deletions
+5 -5
View File
@@ -77,8 +77,12 @@ jobs:
- name: Export version from package.json
run:
echo "PACKAGE_VERSION=$(grep '"version"' ../web/package.json | cut -d '"' -f 4 | cut -d "-" -f 1)" >> $GITHUB_ENV
- name: Ruby Setup for Fastlane
uses: ruby/setup-ruby@v1
with:
working-directory: 'packages/mobile'
- name: Install dependencies
run: yarn install --immutable && yarn install:pods
run: yarn install --immutable && bundle install && yarn install:pods
- run: yarn build:mobile
- name: Set ssh connection to Github
uses: webfactory/[email protected]
@@ -86,10 +90,6 @@ jobs:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Export Apple AppStore Connect API key
run: echo "${{ secrets.APPSTORE_CONNECT_KEY }}" > ios/Authkey.p8
- name: Ruby Setup for Fastlane
uses: ruby/setup-ruby@v1
with:
working-directory: 'packages/mobile'
- name: Setup fastlane
uses: maierj/[email protected]
env:
+38
View File
@@ -103,6 +103,44 @@ jobs:
trigger_workflow: true
wait_workflow: true
publish-web-docker:
name: Build and publish Docker Image for Web App
needs: [e2e-base, e2e-vaults]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.CI_PAT_TOKEN }}
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn build:web
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish SNJS Docker image for E2E testing
run: |
cd packages/web
docker build -t standardnotes/web:${{ github.sha }} .
docker tag standardnotes/web:${{ github.sha }} standardnotes/web:latest
docker push standardnotes/web:${{ github.sha }}
docker push standardnotes/web:latest
publish:
name: Publish to NPM
needs: [e2e-base, e2e-vaults]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,77 @@
diff --git a/LexicalClipboard.dev.js b/LexicalClipboard.dev.js
index 9e72de896d52d9c342e520a79b05dbf8fd9bcee3..512433f1dac08f8b8bd261315827924020035f85 100644
--- a/LexicalClipboard.dev.js
+++ b/LexicalClipboard.dev.js
@@ -102,7 +102,7 @@ function $insertDataTransferForPlainText(dataTransfer, selection) {
* @param selection the selection to use as the insertion point for the content in the DataTransfer object
* @param editor the LexicalEditor the content is being inserted into.
*/
-function $insertDataTransferForRichText(dataTransfer, selection, editor) {
+function $insertDataTransferForRichText(dataTransfer, selection, editor, event) {
const lexicalString = dataTransfer.getData('application/x-lexical-editor');
if (lexicalString) {
try {
@@ -115,15 +115,18 @@ function $insertDataTransferForRichText(dataTransfer, selection, editor) {
// Fail silently.
}
}
- const htmlString = dataTransfer.getData('text/html');
- if (htmlString) {
- try {
- const parser = new DOMParser();
- const dom = parser.parseFromString(htmlString, 'text/html');
- const nodes = html.$generateNodesFromDOM(editor, dom);
- return $insertGeneratedNodes(editor, nodes, selection);
- } catch (_unused2) {
- // Fail silently.
+ const shouldIgnoreHTML = event && event.inputType === 'insertReplacementText' && dataTransfer.types.includes('text/plain');
+ if (!shouldIgnoreHTML) {
+ const htmlString = dataTransfer.getData('text/html');
+ if (htmlString) {
+ try {
+ const parser = new DOMParser();
+ const dom = parser.parseFromString(htmlString, 'text/html');
+ const nodes = html.$generateNodesFromDOM(editor, dom);
+ return $insertGeneratedNodes(editor, nodes, selection);
+ } catch (_unused2) {
+ // Fail silently.
+ }
}
}
diff --git a/LexicalClipboard.prod.js b/LexicalClipboard.prod.js
index 494ab7597d14cfa0386f7bad294c567a8f0110c1..f60bbdf361d44ed078cf9cb403251f8976d665f9 100644
--- a/LexicalClipboard.prod.js
+++ b/LexicalClipboard.prod.js
@@ -7,11 +7,11 @@
'use strict';var f=require("@lexical/html"),m=require("@lexical/selection"),q=require("@lexical/utils"),r=require("lexical");function t(a){let b=new URLSearchParams;b.append("code",a);for(let c=1;c<arguments.length;c++)b.append("v",arguments[c]);throw Error(`Minified Lexical error #${a}; visit https://lexical.dev/docs/error?${b} for the full message or `+"use the non-minified dev environment for full errors and additional helpful warnings.");}
let u="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;function v(a){let b=r.$getSelection();if(null==b)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(b)&&b.isCollapsed()||0===b.getNodes().length?"":f.$generateHtmlFromNodes(a,b)}
function w(a){let b=r.$getSelection();if(null==b)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(b)&&b.isCollapsed()||0===b.getNodes().length?null:JSON.stringify(x(a,b))}function y(a,b,c){a.dispatchCommand(r.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,{nodes:b,selection:c})||c.insertNodes(b)}
-function z(a,b,c,d=[]){let e=null!==b?c.isSelected(b):!0,h=r.$isElementNode(c)&&c.excludeFromCopy("html");var g=c;if(null!==b){var k=m.$cloneWithProperties(c);g=k=r.$isTextNode(k)&&null!==b?m.$sliceSelectedTextNodeContent(b,k):k}let n=r.$isElementNode(g)?g.getChildren():[];var l=g;k=l.exportJSON();var p=l.constructor;k.type!==p.getType()&&t(58,p.name);r.$isElementNode(l)&&(Array.isArray(k.children)||t(59,p.name));r.$isTextNode(g)&&(g=g.__text,0<g.length?k.text=g:e=!1);for(g=0;g<n.length;g++)l=n[g],
-p=z(a,b,l,k.children),!e&&r.$isElementNode(c)&&p&&c.extractWithChild(l,b,"clone")&&(e=!0);if(e&&!h)d.push(k);else if(Array.isArray(k.children))for(a=0;a<k.children.length;a++)d.push(k.children[a]);return e}function x(a,b){let c=[],d=r.$getRoot().getChildren();for(let e=0;e<d.length;e++)z(a,b,d[e],c);return{namespace:a._config.namespace,nodes:c}}function A(a){let b=[];for(let c=0;c<a.length;c++){let d=r.$parseSerializedNode(a[c]);r.$isTextNode(d)&&m.$addNodeStyle(d);b.push(d)}return b}let B=null;
-function C(a,b){var c=u?(a._window||window).getSelection():null;if(!c)return!1;var d=c.anchorNode;c=c.focusNode;if(null!==d&&null!==c&&!r.isSelectionWithinEditor(a,d,c))return!1;b.preventDefault();b=b.clipboardData;d=r.$getSelection();if(null===b||null===d)return!1;c=v(a);a=w(a);let e="";null!==d&&(e=d.getTextContent());null!==c&&b.setData("text/html",c);null!==a&&b.setData("application/x-lexical-editor",a);b.setData("text/plain",e);return!0}exports.$generateJSONFromSelectedNodes=x;
+function z(a,b,c,e=[]){let g=null!==b?c.isSelected(b):!0,k=r.$isElementNode(c)&&c.excludeFromCopy("html");var d=c;if(null!==b){var h=m.$cloneWithProperties(c);d=h=r.$isTextNode(h)&&null!==b?m.$sliceSelectedTextNodeContent(b,h):h}let n=r.$isElementNode(d)?d.getChildren():[];var l=d;h=l.exportJSON();var p=l.constructor;h.type!==p.getType()&&t(58,p.name);r.$isElementNode(l)&&(Array.isArray(h.children)||t(59,p.name));r.$isTextNode(d)&&(d=d.__text,0<d.length?h.text=d:g=!1);for(d=0;d<n.length;d++)l=n[d],
+p=z(a,b,l,h.children),!g&&r.$isElementNode(c)&&p&&c.extractWithChild(l,b,"clone")&&(g=!0);if(g&&!k)e.push(h);else if(Array.isArray(h.children))for(a=0;a<h.children.length;a++)e.push(h.children[a]);return g}function x(a,b){let c=[],e=r.$getRoot().getChildren();for(let g=0;g<e.length;g++)z(a,b,e[g],c);return{namespace:a._config.namespace,nodes:c}}function A(a){let b=[];for(let c=0;c<a.length;c++){let e=r.$parseSerializedNode(a[c]);r.$isTextNode(e)&&m.$addNodeStyle(e);b.push(e)}return b}let B=null;
+function C(a,b){var c=u?(a._window||window).getSelection():null;if(!c)return!1;var e=c.anchorNode;c=c.focusNode;if(null!==e&&null!==c&&!r.isSelectionWithinEditor(a,e,c))return!1;b.preventDefault();b=b.clipboardData;e=r.$getSelection();if(null===b||null===e)return!1;c=v(a);a=w(a);let g="";null!==e&&(g=e.getTextContent());null!==c&&b.setData("text/html",c);null!==a&&b.setData("application/x-lexical-editor",a);b.setData("text/plain",g);return!0}exports.$generateJSONFromSelectedNodes=x;
exports.$generateNodesFromSerializedNodes=A;exports.$getHtmlContent=v;exports.$getLexicalContent=w;exports.$insertDataTransferForPlainText=function(a,b){a=a.getData("text/plain")||a.getData("text/uri-list");null!=a&&b.insertRawText(a)};
-exports.$insertDataTransferForRichText=function(a,b,c){var d=a.getData("application/x-lexical-editor");if(d)try{let h=JSON.parse(d);if(h.namespace===c._config.namespace&&Array.isArray(h.nodes)){let g=A(h.nodes);return y(c,g,b)}}catch(h){}if(d=a.getData("text/html"))try{var e=(new DOMParser).parseFromString(d,"text/html");let h=f.$generateNodesFromDOM(c,e);return y(c,h,b)}catch(h){}a=a.getData("text/plain")||a.getData("text/uri-list");if(null!=a)if(r.$isRangeSelection(b))for(a=a.split(/(\r?\n|\t)/),
-""===a[a.length-1]&&a.pop(),c=0;c<a.length;c++)e=a[c],"\n"===e||"\r\n"===e?b.insertParagraph():"\t"===e?b.insertNodes([r.$createTabNode()]):b.insertText(e);else b.insertRawText(a)};exports.$insertGeneratedNodes=y;
-exports.copyToClipboard=async function(a,b){if(null!==B)return!1;if(null!==b)return new Promise(g=>{a.update(()=>{g(C(a,b))})});var c=a.getRootElement();let d=null==a._window?window.document:a._window.document,e=u?(a._window||window).getSelection():null;if(null===c||null===e)return!1;let h=d.createElement("span");h.style.cssText="position: fixed; top: -1000px;";h.append(d.createTextNode("#"));c.append(h);c=new Range;c.setStart(h,0);c.setEnd(h,1);e.removeAllRanges();e.addRange(c);return new Promise(g=>
-{let k=a.registerCommand(r.COPY_COMMAND,n=>{q.objectKlassEquals(n,ClipboardEvent)&&(k(),null!==B&&(window.clearTimeout(B),B=null),g(C(a,n)));return!0},r.COMMAND_PRIORITY_CRITICAL);B=window.setTimeout(()=>{k();B=null;g(!1)},50);d.execCommand("copy");h.remove()})}
+exports.$insertDataTransferForRichText=function(a,b,c,e){let g=a.getData("application/x-lexical-editor");if(g)try{let d=JSON.parse(g);if(d.namespace===c._config.namespace&&Array.isArray(d.nodes)){let h=A(d.nodes);return y(c,h,b)}}catch(d){}if(!e||"insertReplacementText"!==e.inputType||!a.types.includes("text/plain"))if(e=a.getData("text/html"))try{var k=(new DOMParser).parseFromString(e,"text/html");let d=f.$generateNodesFromDOM(c,k);return y(c,d,b)}catch(d){}a=a.getData("text/plain")||a.getData("text/uri-list");
+if(null!=a)if(r.$isRangeSelection(b))for(a=a.split(/(\r?\n|\t)/),""===a[a.length-1]&&a.pop(),c=0;c<a.length;c++)k=a[c],"\n"===k||"\r\n"===k?b.insertParagraph():"\t"===k?b.insertNodes([r.$createTabNode()]):b.insertText(k);else b.insertRawText(a)};exports.$insertGeneratedNodes=y;
+exports.copyToClipboard=async function(a,b){if(null!==B)return!1;if(null!==b)return new Promise(d=>{a.update(()=>{d(C(a,b))})});var c=a.getRootElement();let e=null==a._window?window.document:a._window.document,g=u?(a._window||window).getSelection():null;if(null===c||null===g)return!1;let k=e.createElement("span");k.style.cssText="position: fixed; top: -1000px;";k.append(e.createTextNode("#"));c.append(k);c=new Range;c.setStart(k,0);c.setEnd(k,1);g.removeAllRanges();g.addRange(c);return new Promise(d=>
+{let h=a.registerCommand(r.COPY_COMMAND,n=>{q.objectKlassEquals(n,ClipboardEvent)&&(h(),null!==B&&(window.clearTimeout(B),B=null),d(C(a,n)));return!0},r.COMMAND_PRIORITY_CRITICAL);B=window.setTimeout(()=>{h();B=null;d(!1)},50);e.execCommand("copy");k.remove()})}
diff --git a/clipboard.d.ts b/clipboard.d.ts
index 99e2138389b64d298a1330d7b354ba87d2e6f24e..83250a4c2049f94e08bfdfc757e03e8a85a08dd4 100644
--- a/clipboard.d.ts
+++ b/clipboard.d.ts
@@ -44,7 +44,7 @@ export declare function $insertDataTransferForPlainText(dataTransfer: DataTransf
* @param selection the selection to use as the insertion point for the content in the DataTransfer object
* @param editor the LexicalEditor the content is being inserted into.
*/
-export declare function $insertDataTransferForRichText(dataTransfer: DataTransfer, selection: BaseSelection, editor: LexicalEditor): void;
+export declare function $insertDataTransferForRichText(dataTransfer: DataTransfer, selection: BaseSelection, editor: LexicalEditor, event?: InputEvent): void;
/**
* Inserts Lexical nodes into the editor using different strategies depending on
* some simple selection-based heuristics. If you're looking for a generic way to
@@ -0,0 +1,346 @@
diff --git a/LexicalList.dev.js b/LexicalList.dev.js
index 3b91ac0e93f7e6a9d784c7d8a19f11496369ecc0..de90d1b8de072015dc57a9174e1206c7371d0434 100644
--- a/LexicalList.dev.js
+++ b/LexicalList.dev.js
@@ -140,27 +140,6 @@ function wrapInListItem(node) {
function $isSelectingEmptyListItem(anchorNode, nodes) {
return $isListItemNode(anchorNode) && (nodes.length === 0 || nodes.length === 1 && anchorNode.is(nodes[0]) && anchorNode.getChildrenSize() === 0);
}
-function $getListItemValue(listItem) {
- const list = listItem.getParent();
- let value = 1;
- if (list != null) {
- if (!$isListNode(list)) {
- {
- throw Error(`$getListItemValue: list node is not parent of list item node`);
- }
- } else {
- value = list.getStart();
- }
- }
- const siblings = listItem.getPreviousSiblings();
- for (let i = 0; i < siblings.length; i++) {
- const sibling = siblings[i];
- if ($isListItemNode(sibling) && !$isListNode(sibling.getFirstChild())) {
- value++;
- }
- }
- return value;
-}
/**
* Inserts a new ListNode. If the selection's anchor node is an empty ListItemNode and is a child of
@@ -217,7 +196,6 @@ function insertList(editor, listType) {
const newListNode = $createListNode(listType);
append(newListNode, parent.getChildren());
parent.replace(newListNode);
- updateChildrenListItemValue(newListNode);
handled.add(parentKey);
}
break;
@@ -268,7 +246,6 @@ function createListOrMerge(node, listType) {
const list = $createListNode(listType);
list.append(listItem);
node.replace(list);
- updateChildrenListItemValue(list);
return list;
}
}
@@ -289,7 +266,6 @@ function mergeLists(list1, list2) {
const toMerge = list2.getChildren();
if (toMerge.length > 0) {
list1.append(...toMerge);
- updateChildrenListItemValue(list1);
}
list2.remove();
}
@@ -352,22 +328,23 @@ function removeList(editor) {
/**
* Takes the value of a child ListItemNode and makes it the value the ListItemNode
- * should be if it isn't already. If only certain children should be updated, they
- * can be passed optionally in an array.
+ * should be if it isn't already. Also ensures that checked is undefined if the
+ * parent does not have a list type of 'check'.
* @param list - The list whose children are updated.
- * @param children - An array of the children to be updated.
*/
-function updateChildrenListItemValue(list, children) {
- const childrenOrExisting = children || list.getChildren();
- if (childrenOrExisting !== undefined) {
- for (let i = 0; i < childrenOrExisting.length; i++) {
- const child = childrenOrExisting[i];
- if ($isListItemNode(child)) {
- const prevValue = child.getValue();
- const nextValue = $getListItemValue(child);
- if (prevValue !== nextValue) {
- child.setValue(nextValue);
- }
+function updateChildrenListItemValue(list) {
+ const isNotChecklist = list.getListType() !== 'check';
+ let value = list.getStart();
+ for (const child of list.getChildren()) {
+ if ($isListItemNode(child)) {
+ if (child.getValue() !== value) {
+ child.setValue(value);
+ }
+ if (isNotChecklist && child.getChecked() != null) {
+ child.setChecked(undefined);
+ }
+ if (!$isListNode(child.getFirstChild())) {
+ value++;
}
}
}
@@ -403,7 +380,6 @@ function $handleIndent(listItemNode) {
nextSibling.remove();
removed.add(nextSibling.getKey());
}
- updateChildrenListItemValue(innerList);
}
} else if (isNestedListNode(nextSibling)) {
// if the ListItemNode is next to a nested ListNode, merge them
@@ -413,13 +389,11 @@ function $handleIndent(listItemNode) {
if (firstChild !== null) {
firstChild.insertBefore(listItemNode);
}
- updateChildrenListItemValue(innerList);
}
} else if (isNestedListNode(previousSibling)) {
const innerList = previousSibling.getFirstChild();
if ($isListNode(innerList)) {
innerList.append(listItemNode);
- updateChildrenListItemValue(innerList);
}
} else {
// otherwise, we need to create a new nested ListNode
@@ -436,12 +410,8 @@ function $handleIndent(listItemNode) {
} else {
parent.append(newListItem);
}
- updateChildrenListItemValue(newList);
}
}
- if ($isListNode(parent)) {
- updateChildrenListItemValue(parent);
- }
}
/**
@@ -495,8 +465,6 @@ function $handleOutdent(listItemNode) {
// replace the grandparent list item (now between the siblings) with the outdented list item.
grandparentListItem.replace(listItemNode);
}
- updateChildrenListItemValue(parentList);
- updateChildrenListItemValue(greatGrandparentList);
}
}
@@ -603,12 +571,14 @@ class ListItemNode extends lexical.ElementNode {
}
static transform() {
return node => {
+ if (!$isListItemNode(node)) {
+ throw Error(`node is not a ListItemNode`);
+ }
+ if (node.__checked == null) {
+ return;
+ }
const parent = node.getParent();
if ($isListNode(parent)) {
- updateChildrenListItemValue(parent);
- if (!$isListItemNode(node)) {
- throw Error(`node is not a ListItemNode`);
- }
if (parent.getListType() !== 'check' && node.getChecked() != null) {
node.setChecked(undefined);
}
@@ -704,15 +674,10 @@ class ListItemNode extends lexical.ElementNode {
throw Error(`insertAfter: list node is not parent of list item node`);
}
}
- const siblings = this.getNextSiblings();
if ($isListItemNode(node)) {
- const after = super.insertAfter(node, restoreSelection);
- const afterListNode = node.getParentOrThrow();
- if ($isListNode(afterListNode)) {
- updateChildrenListItemValue(afterListNode);
- }
- return after;
+ return super.insertAfter(node, restoreSelection);
}
+ const siblings = this.getNextSiblings();
// Attempt to merge if the list is of the same type.
@@ -743,11 +708,6 @@ class ListItemNode extends lexical.ElementNode {
if (prevSibling && nextSibling && isNestedListNode(prevSibling) && isNestedListNode(nextSibling)) {
mergeLists(prevSibling.getFirstChild(), nextSibling.getFirstChild());
nextSibling.remove();
- } else if (nextSibling) {
- const parent = nextSibling.getParent();
- if ($isListNode(parent)) {
- updateChildrenListItemValue(parent);
- }
}
}
insertNewAfter(_, restoreSelection = true) {
@@ -839,16 +799,6 @@ class ListItemNode extends lexical.ElementNode {
}
return this;
}
- insertBefore(nodeToInsert) {
- if ($isListItemNode(nodeToInsert)) {
- const parent = this.getParentOrThrow();
- if ($isListNode(parent)) {
- const siblings = this.getNextSiblings();
- updateChildrenListItemValue(parent, siblings);
- }
- }
- return super.insertBefore(nodeToInsert);
- }
canInsertAfter(node) {
return $isListItemNode(node);
}
@@ -1018,6 +968,14 @@ class ListNode extends lexical.ElementNode {
setListThemeClassNames(dom, config.theme, this);
return false;
}
+ static transform() {
+ return node => {
+ if (!$isListNode(node)) {
+ throw Error(`node is not a ListNode`);
+ }
+ updateChildrenListItemValue(node);
+ };
+ }
static importDOM() {
return {
ol: node => ({
@@ -1087,7 +1045,6 @@ class ListNode extends lexical.ElementNode {
super.append(listItemNode);
}
}
- updateChildrenListItemValue(this);
return this;
}
extractWithChild(child) {
diff --git a/LexicalList.prod.js b/LexicalList.prod.js
index 4687f6a90633c254974aedd06538d334f84de249..54fac0766cf47224af5d0e4e05054861f1072872 100644
--- a/LexicalList.prod.js
+++ b/LexicalList.prod.js
@@ -4,32 +4,33 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-'use strict';var h=require("lexical"),k=require("@lexical/utils");function l(a){let b=new URLSearchParams;b.append("code",a);for(let c=1;c<arguments.length;c++)b.append("v",arguments[c]);throw Error(`Minified Lexical error #${a}; visit https://lexical.dev/docs/error?${b} for the full message or `+"use the non-minified dev environment for full errors and additional helpful warnings.");}
+'use strict';var g=require("lexical"),k=require("@lexical/utils");function l(a){let b=new URLSearchParams;b.append("code",a);for(let c=1;c<arguments.length;c++)b.append("v",arguments[c]);throw Error(`Minified Lexical error #${a}; visit https://lexical.dev/docs/error?${b} for the full message or `+"use the non-minified dev environment for full errors and additional helpful warnings.");}
function n(a){let b=1;for(a=a.getParent();null!=a;){if(p(a)){a=a.getParent();if(q(a)){b++;a=a.getParent();continue}l(40)}break}return b}function r(a){a=a.getParent();q(a)||l(40);let b=a;for(;null!==b;)b=b.getParent(),q(b)&&(a=b);return a}function t(a){let b=[];a=a.getChildren().filter(p);for(let c=0;c<a.length;c++){let d=a[c],e=d.getFirstChild();q(e)?b=b.concat(t(e)):b.push(d)}return b}function u(a){return p(a)&&q(a.getFirstChild())}
-function v(a){for(;null==a.getNextSibling()&&null==a.getPreviousSibling();){let b=a.getParent();if(null==b||!p(a)&&!q(a))break;a=b}a.remove()}function w(a){return y().append(a)}function z(a,b){return p(a)&&(0===b.length||1===b.length&&a.is(b[0])&&0===a.getChildrenSize())}function C(a,b){a.splice(a.getChildrenSize(),0,b)}
-function D(a,b){if(q(a))return a;let c=a.getPreviousSibling(),d=a.getNextSibling(),e=y();e.setFormat(a.getFormatType());e.setIndent(a.getIndent());C(e,a.getChildren());if(q(c)&&b===c.getListType())return c.append(e),a.remove(),q(d)&&b===d.getListType()&&(C(c,d.getChildren()),d.remove()),c;if(q(d)&&b===d.getListType())return d.getFirstChildOrThrow().insertBefore(e),a.remove(),d;b=E(b);b.append(e);a.replace(b);F(b);return b}
-function G(a,b){var c=a.getLastChild();let d=b.getFirstChild();c&&d&&u(c)&&u(d)&&(G(c.getFirstChild(),d.getFirstChild()),d.remove());c=b.getChildren();0<c.length&&(a.append(...c),F(a));b.remove()}function F(a,b){a=b||a.getChildren();if(void 0!==a)for(b=0;b<a.length;b++){let f=a[b];if(p(f)){let g=f.getValue();var c=f,d=c.getParent(),e=1;null!=d&&(q(d)?e=d.getStart():l(44));c=c.getPreviousSiblings();for(d=0;d<c.length;d++){let m=c[d];p(m)&&!q(m.getFirstChild())&&e++}g!==e&&f.setValue(e)}}}
-function H(a){if(!u(a)){var b=a.getParent(),c=b?b.getParent():void 0,d=c?c.getParent():void 0;if(q(d)&&p(c)&&q(b)){var e=b?b.getFirstChild():void 0,f=b?b.getLastChild():void 0;if(a.is(e))c.insertBefore(a),b.isEmpty()&&c.remove();else if(a.is(f))c.insertAfter(a),b.isEmpty()&&c.remove();else{var g=b.getListType();e=y();let m=E(g);e.append(m);a.getPreviousSiblings().forEach(x=>m.append(x));f=y();g=E(g);f.append(g);C(g,a.getNextSiblings());c.insertBefore(e);c.insertAfter(f);c.replace(a)}F(b);F(d)}}}
-class I extends h.ElementNode{static getType(){return"listitem"}static clone(a){return new I(a.__value,a.__checked,a.__key)}constructor(a,b,c){super(c);this.__value=void 0===a?1:a;this.__checked=b}createDOM(a){let b=document.createElement("li"),c=this.getParent();q(c)&&"check"===c.getListType()&&J(b,this,null);b.value=this.__value;K(b,a.theme,this);return b}updateDOM(a,b,c){let d=this.getParent();q(d)&&"check"===d.getListType()&&J(b,this,a);b.value=this.__value;K(b,c.theme,this);return!1}static transform(){return a=>
-{let b=a.getParent();q(b)&&(F(b),p(a)||l(144),"check"!==b.getListType()&&null!=a.getChecked()&&a.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:L,priority:0})}}static importJSON(a){let b=y();b.setChecked(a.checked);b.setValue(a.value);b.setFormat(a.format);b.setDirection(a.direction);return b}exportDOM(a){a=this.createDOM(a._config);a.style.textAlign=this.getFormatType();return{element:a}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),
-version:1}}append(...a){for(let b=0;b<a.length;b++){let c=a[b];if(h.$isElementNode(c)&&this.canMergeWith(c)){let d=c.getChildren();this.append(...d);c.remove()}else super.append(c)}return this}replace(a,b){if(p(a))return super.replace(a);this.setIndent(0);let c=this.getParentOrThrow();if(!q(c))return a;if(c.__first===this.getKey())c.insertBefore(a);else if(c.__last===this.getKey())c.insertAfter(a);else{let d=E(c.getListType()),e=this.getNextSibling();for(;e;){let f=e;e=e.getNextSibling();d.append(f)}c.insertAfter(a);
-a.insertAfter(d)}b&&(h.$isElementNode(a)||l(139),this.getChildren().forEach(d=>{a.append(d)}));this.remove();0===c.getChildrenSize()&&c.remove();return a}insertAfter(a,b=!0){var c=this.getParentOrThrow();q(c)||l(39);var d=this.getNextSiblings();if(p(a))return b=super.insertAfter(a,b),a=a.getParentOrThrow(),q(a)&&F(a),b;if(q(a)){c=a;a=a.getChildren();for(d=a.length-1;0<=d;d--)c=a[d],this.insertAfter(c,b);return c}c.insertAfter(a,b);if(0!==d.length){let e=E(c.getListType());d.forEach(f=>e.append(f));
-a.insertAfter(e,b)}return a}remove(a){let b=this.getPreviousSibling(),c=this.getNextSibling();super.remove(a);b&&c&&u(b)&&u(c)?(G(b.getFirstChild(),c.getFirstChild()),c.remove()):c&&(a=c.getParent(),q(a)&&F(a))}insertNewAfter(a,b=!0){a=y(null==this.__checked?void 0:!1);this.insertAfter(a,b);return a}collapseAtStart(a){let b=h.$createParagraphNode();this.getChildren().forEach(f=>b.append(f));var c=this.getParentOrThrow(),d=c.getParentOrThrow();let e=p(d);1===c.getChildrenSize()?e?(c.remove(),d.select()):
-(c.insertBefore(b),c.remove(),c=a.anchor,a=a.focus,d=b.getKey(),"element"===c.type&&c.getNode().is(this)&&c.set(d,c.offset,"element"),"element"===a.type&&a.getNode().is(this)&&a.set(d,a.offset,"element")):(c.insertBefore(b),this.remove());return!0}getValue(){return this.getLatest().__value}setValue(a){this.getWritable().__value=a}getChecked(){return this.getLatest().__checked}setChecked(a){this.getWritable().__checked=a}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var a=this.getParent();
-if(null===a)return this.getLatest().__indent;a=a.getParentOrThrow();let b=0;for(;p(a);)a=a.getParentOrThrow().getParentOrThrow(),b++;return b}setIndent(a){"number"===typeof a&&-1<a||l(117);let b=this.getIndent();for(;b!==a;)if(b<a){a:{var c=new Set;if(u(this)||c.has(this.getKey()))break a;let g=this.getParent();var d=this.getNextSibling(),e=this.getPreviousSibling();if(u(d)&&u(e)){if(e=e.getFirstChild(),q(e)){e.append(this);var f=d.getFirstChild();q(f)&&(f=f.getChildren(),C(e,f),d.remove(),c.add(d.getKey()));
-F(e)}}else u(d)?(d=d.getFirstChild(),q(d)&&(c=d.getFirstChild(),null!==c&&c.insertBefore(this),F(d))):u(e)?(d=e.getFirstChild(),q(d)&&(d.append(this),F(d))):q(g)&&(c=y(),f=E(g.getListType()),c.append(f),f.append(this),e?e.insertAfter(c):d?d.insertBefore(c):g.append(c),F(f));q(g)&&F(g)}b++}else H(this),b--;return this}insertBefore(a){if(p(a)){let b=this.getParentOrThrow();if(q(b)){let c=this.getNextSiblings();F(b,c)}}return super.insertBefore(a)}canInsertAfter(a){return p(a)}canReplaceWith(a){return p(a)}canMergeWith(a){return h.$isParagraphNode(a)||
-p(a)}extractWithChild(a,b){if(!h.$isRangeSelection(b))return!1;a=b.anchor.getNode();let c=b.focus.getNode();return this.isParentOf(a)&&this.isParentOf(c)&&this.getTextContent().length===b.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return E("bullet")}}
-function K(a,b,c){let d=[],e=[];var f=(b=b.list)?b.listitem:void 0;if(b&&b.nested)var g=b.nested.listitem;void 0!==f&&(f=f.split(" "),d.push(...f));if(b){f=c.getParent();f=q(f)&&"check"===f.getListType();let m=c.getChecked();f&&!m||e.push(b.listitemUnchecked);f&&m||e.push(b.listitemChecked);f&&d.push(m?b.listitemChecked:b.listitemUnchecked)}void 0!==g&&(g=g.split(" "),c.getChildren().some(m=>q(m))?d.push(...g):e.push(...g));0<e.length&&k.removeClassNamesFromElement(a,...e);0<d.length&&k.addClassNamesToElement(a,
-...d)}function J(a,b,c){q(b.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),c&&b.__checked===c.__checked||a.setAttribute("aria-checked",b.getChecked()?"true":"false"))}function L(a){a=k.isHTMLElement(a)&&"true"===a.getAttribute("aria-checked");return{node:y(a)}}function y(a){return h.$applyNodeReplacement(new I(void 0,a))}function p(a){return a instanceof I}
-class M extends h.ElementNode{static getType(){return"list"}static clone(a){return new M(a.__listType||O[a.__tag],a.__start,a.__key)}constructor(a,b,c){super(c);this.__listType=a=O[a]||a;this.__tag="number"===a?"ol":"ul";this.__start=b}getTag(){return this.__tag}setListType(a){let b=this.getWritable();b.__listType=a;b.__tag="number"===a?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(a){let b=document.createElement(this.__tag);1!==this.__start&&b.setAttribute("start",
-String(this.__start));b.__lexicalListType=this.__listType;P(b,a.theme,this);return b}updateDOM(a,b,c){if(a.__tag!==this.__tag)return!0;P(b,c.theme,this);return!1}static importDOM(){return{ol:()=>({conversion:Q,priority:0}),ul:()=>({conversion:Q,priority:0})}}static importJSON(a){let b=E(a.listType,a.start);b.setFormat(a.format);b.setIndent(a.indent);b.setDirection(a.direction);return b}exportDOM(a){({element:a}=super.exportDOM(a));a&&k.isHTMLElement(a)&&(1!==this.__start&&a.setAttribute("start",String(this.__start)),
-"check"===this.__listType&&a.setAttribute("__lexicalListType","check"));return{element:a}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...a){for(let c=0;c<a.length;c++){var b=a[c];if(p(b))super.append(b);else{let d=y();q(b)?d.append(b):h.$isElementNode(b)?(b=h.$createTextNode(b.getTextContent()),d.append(b)):d.append(b);super.append(d)}}F(this);return this}extractWithChild(a){return p(a)}}
-function P(a,b,c){let d=[],e=[];var f=b.list;if(void 0!==f){let m=f[`${c.__tag}Depth`]||[];b=n(c)-1;let x=b%m.length;var g=m[x];let N=f[c.__tag],A,B=f.nested;f=f.checklist;void 0!==B&&B.list&&(A=B.list);void 0!==N&&d.push(N);void 0!==f&&"check"===c.__listType&&d.push(f);if(void 0!==g)for(g=g.split(" "),d.push(...g),g=0;g<m.length;g++)g!==x&&e.push(c.__tag+g);void 0!==A&&(c=A.split(" "),1<b?d.push(...c):e.push(...c))}0<e.length&&k.removeClassNamesFromElement(a,...e);0<d.length&&k.addClassNamesToElement(a,
-...d)}function R(a){let b=[];for(let d=0;d<a.length;d++){var c=a[d];p(c)?(b.push(c),c=c.getChildren(),1<c.length&&c.forEach(e=>{q(e)&&b.push(w(e))})):b.push(w(c))}return b}function Q(a){let b=a.nodeName.toLowerCase(),c=null;"ol"===b?c=E("number",a.start):"ul"===b&&(c=k.isHTMLElement(a)&&"check"===a.getAttribute("__lexicallisttype")?E("check"):E("bullet"));return{after:R,node:c}}let O={ol:"number",ul:"bullet"};function E(a,b=1){return h.$applyNodeReplacement(new M(a,b))}
-function q(a){return a instanceof M}let S=h.createCommand("INSERT_UNORDERED_LIST_COMMAND"),T=h.createCommand("INSERT_ORDERED_LIST_COMMAND"),U=h.createCommand("INSERT_CHECK_LIST_COMMAND"),V=h.createCommand("REMOVE_LIST_COMMAND");exports.$createListItemNode=y;exports.$createListNode=E;exports.$getListDepth=n;
-exports.$handleListInsertParagraph=function(){var a=h.$getSelection();if(!h.$isRangeSelection(a)||!a.isCollapsed())return!1;a=a.anchor.getNode();if(!p(a)||0!==a.getChildrenSize())return!1;var b=r(a),c=a.getParent();q(c)||l(40);let d=c.getParent(),e;if(h.$isRootOrShadowRoot(d))e=h.$createParagraphNode(),b.insertAfter(e);else if(p(d))e=y(),d.insertAfter(e);else return!1;e.select();b=a.getNextSiblings();if(0<b.length){let f=E(c.getListType());h.$isParagraphNode(e)?e.insertAfter(f):(c=y(),c.append(f),
-e.insertAfter(c));b.forEach(g=>{g.remove();f.append(g)})}v(a);return!0};exports.$isListItemNode=p;exports.$isListNode=q;exports.INSERT_CHECK_LIST_COMMAND=U;exports.INSERT_ORDERED_LIST_COMMAND=T;exports.INSERT_UNORDERED_LIST_COMMAND=S;exports.ListItemNode=I;exports.ListNode=M;exports.REMOVE_LIST_COMMAND=V;
-exports.insertList=function(a,b){a.update(()=>{var c=h.$getSelection();if(null!==c){var d=c.getNodes();c=c.getStartEndPoints();null===c&&l(143);[c]=c;c=c.getNode();var e=c.getParent();if(z(c,d))d=E(b),h.$isRootOrShadowRoot(e)?(c.replace(d),e=y(),h.$isElementNode(c)&&(e.setFormat(c.getFormatType()),e.setIndent(c.getIndent())),d.append(e)):p(c)&&(c=c.getParentOrThrow(),C(d,c.getChildren()),c.replace(d));else for(c=new Set,e=0;e<d.length;e++){var f=d[e];if(h.$isElementNode(f)&&f.isEmpty()&&!p(f)&&!c.has(f.getKey()))D(f,
-b);else if(h.$isLeafNode(f))for(f=f.getParent();null!=f;){let m=f.getKey();if(q(f)){if(!c.has(m)){var g=E(b);C(g,f.getChildren());f.replace(g);F(g);c.add(m)}break}else{g=f.getParent();if(h.$isRootOrShadowRoot(g)&&!c.has(m)){c.add(m);D(f,b);break}f=g}}}}})};
-exports.removeList=function(a){a.update(()=>{let b=h.$getSelection();if(h.$isRangeSelection(b)){var c=new Set,d=b.getNodes(),e=b.anchor.getNode();if(z(e,d))c.add(r(e));else for(e=0;e<d.length;e++){var f=d[e];h.$isLeafNode(f)&&(f=k.$getNearestNodeOfType(f,I),null!=f&&c.add(r(f)))}for(let g of c){c=g;d=t(g);for(let m of d)d=h.$createParagraphNode(),C(d,m.getChildren()),c.insertAfter(d),c=d,m.__key===b.anchor.key&&b.anchor.set(d.getKey(),0,"element"),m.__key===b.focus.key&&b.focus.set(d.getKey(),0,"element"),
-m.remove();g.remove()}}})}
+function v(a){for(;null==a.getNextSibling()&&null==a.getPreviousSibling();){let b=a.getParent();if(null==b||!p(a)&&!q(a))break;a=b}a.remove()}function w(a){return x().append(a)}function A(a,b){return p(a)&&(0===b.length||1===b.length&&a.is(b[0])&&0===a.getChildrenSize())}function B(a,b){a.splice(a.getChildrenSize(),0,b)}
+function C(a,b){if(q(a))return a;let c=a.getPreviousSibling(),d=a.getNextSibling(),e=x();e.setFormat(a.getFormatType());e.setIndent(a.getIndent());B(e,a.getChildren());if(q(c)&&b===c.getListType())return c.append(e),a.remove(),q(d)&&b===d.getListType()&&(B(c,d.getChildren()),d.remove()),c;if(q(d)&&b===d.getListType())return d.getFirstChildOrThrow().insertBefore(e),a.remove(),d;b=D(b);b.append(e);a.replace(b);return b}
+function E(a,b){var c=a.getLastChild();let d=b.getFirstChild();c&&d&&u(c)&&u(d)&&(E(c.getFirstChild(),d.getFirstChild()),d.remove());c=b.getChildren();0<c.length&&a.append(...c);b.remove()}
+function F(a){if(!u(a)){var b=a.getParent(),c=b?b.getParent():void 0,d=c?c.getParent():void 0;if(q(d)&&p(c)&&q(b)){d=b?b.getFirstChild():void 0;var e=b?b.getLastChild():void 0;if(a.is(d))c.insertBefore(a),b.isEmpty()&&c.remove();else if(a.is(e))c.insertAfter(a),b.isEmpty()&&c.remove();else{e=b.getListType();b=x();let f=D(e);b.append(f);a.getPreviousSiblings().forEach(h=>f.append(h));d=x();e=D(e);d.append(e);B(e,a.getNextSiblings());c.insertBefore(b);c.insertAfter(d);c.replace(a)}}}}
+class G extends g.ElementNode{static getType(){return"listitem"}static clone(a){return new G(a.__value,a.__checked,a.__key)}constructor(a,b,c){super(c);this.__value=void 0===a?1:a;this.__checked=b}createDOM(a){let b=document.createElement("li"),c=this.getParent();q(c)&&"check"===c.getListType()&&H(b,this,null);b.value=this.__value;I(b,a.theme,this);return b}updateDOM(a,b,c){let d=this.getParent();q(d)&&"check"===d.getListType()&&H(b,this,a);b.value=this.__value;I(b,c.theme,this);return!1}static transform(){return a=>
+{p(a)||l(144);if(null!=a.__checked){var b=a.getParent();q(b)&&"check"!==b.getListType()&&null!=a.getChecked()&&a.setChecked(void 0)}}}static importDOM(){return{li:()=>({conversion:J,priority:0})}}static importJSON(a){let b=x();b.setChecked(a.checked);b.setValue(a.value);b.setFormat(a.format);b.setDirection(a.direction);return b}exportDOM(a){a=this.createDOM(a._config);a.style.textAlign=this.getFormatType();return{element:a}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",
+value:this.getValue(),version:1}}append(...a){for(let b=0;b<a.length;b++){let c=a[b];if(g.$isElementNode(c)&&this.canMergeWith(c)){let d=c.getChildren();this.append(...d);c.remove()}else super.append(c)}return this}replace(a,b){if(p(a))return super.replace(a);this.setIndent(0);let c=this.getParentOrThrow();if(!q(c))return a;if(c.__first===this.getKey())c.insertBefore(a);else if(c.__last===this.getKey())c.insertAfter(a);else{let d=D(c.getListType()),e=this.getNextSibling();for(;e;){let f=e;e=e.getNextSibling();
+d.append(f)}c.insertAfter(a);a.insertAfter(d)}b&&(g.$isElementNode(a)||l(139),this.getChildren().forEach(d=>{a.append(d)}));this.remove();0===c.getChildrenSize()&&c.remove();return a}insertAfter(a,b=!0){var c=this.getParentOrThrow();q(c)||l(39);if(p(a))return super.insertAfter(a,b);var d=this.getNextSiblings();if(q(a)){c=a;a=a.getChildren();for(d=a.length-1;0<=d;d--)c=a[d],this.insertAfter(c,b);return c}c.insertAfter(a,b);if(0!==d.length){let e=D(c.getListType());d.forEach(f=>e.append(f));a.insertAfter(e,
+b)}return a}remove(a){let b=this.getPreviousSibling(),c=this.getNextSibling();super.remove(a);b&&c&&u(b)&&u(c)&&(E(b.getFirstChild(),c.getFirstChild()),c.remove())}insertNewAfter(a,b=!0){a=x(null==this.__checked?void 0:!1);this.insertAfter(a,b);return a}collapseAtStart(a){let b=g.$createParagraphNode();this.getChildren().forEach(f=>b.append(f));var c=this.getParentOrThrow(),d=c.getParentOrThrow();let e=p(d);1===c.getChildrenSize()?e?(c.remove(),d.select()):(c.insertBefore(b),c.remove(),c=a.anchor,
+a=a.focus,d=b.getKey(),"element"===c.type&&c.getNode().is(this)&&c.set(d,c.offset,"element"),"element"===a.type&&a.getNode().is(this)&&a.set(d,a.offset,"element")):(c.insertBefore(b),this.remove());return!0}getValue(){return this.getLatest().__value}setValue(a){this.getWritable().__value=a}getChecked(){return this.getLatest().__checked}setChecked(a){this.getWritable().__checked=a}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var a=this.getParent();if(null===a)return this.getLatest().__indent;
+a=a.getParentOrThrow();let b=0;for(;p(a);)a=a.getParentOrThrow().getParentOrThrow(),b++;return b}setIndent(a){"number"===typeof a&&-1<a||l(117);let b=this.getIndent();for(;b!==a;)if(b<a){var c=new Set;if(!u(this)&&!c.has(this.getKey())){var d=this.getParent(),e=this.getNextSibling(),f=this.getPreviousSibling();if(u(e)&&u(f))d=f.getFirstChild(),q(d)&&(d.append(this),f=e.getFirstChild(),q(f)&&(f=f.getChildren(),B(d,f),e.remove(),c.add(e.getKey())));else if(u(e))e=e.getFirstChild(),q(e)&&(e=e.getFirstChild(),
+null!==e&&e.insertBefore(this));else if(u(f))e=f.getFirstChild(),q(e)&&e.append(this);else if(q(d)){c=x();let h=D(d.getListType());c.append(h);h.append(this);f?f.insertAfter(c):e?e.insertBefore(c):d.append(c)}}b++}else F(this),b--;return this}canInsertAfter(a){return p(a)}canReplaceWith(a){return p(a)}canMergeWith(a){return g.$isParagraphNode(a)||p(a)}extractWithChild(a,b){if(!g.$isRangeSelection(b))return!1;a=b.anchor.getNode();let c=b.focus.getNode();return this.isParentOf(a)&&this.isParentOf(c)&&
+this.getTextContent().length===b.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return D("bullet")}}
+function I(a,b,c){let d=[],e=[];var f=(b=b.list)?b.listitem:void 0;if(b&&b.nested)var h=b.nested.listitem;void 0!==f&&(f=f.split(" "),d.push(...f));if(b){f=c.getParent();f=q(f)&&"check"===f.getListType();let m=c.getChecked();f&&!m||e.push(b.listitemUnchecked);f&&m||e.push(b.listitemChecked);f&&d.push(m?b.listitemChecked:b.listitemUnchecked)}void 0!==h&&(h=h.split(" "),c.getChildren().some(m=>q(m))?d.push(...h):e.push(...h));0<e.length&&k.removeClassNamesFromElement(a,...e);0<d.length&&k.addClassNamesToElement(a,
+...d)}function H(a,b,c){q(b.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),c&&b.__checked===c.__checked||a.setAttribute("aria-checked",b.getChecked()?"true":"false"))}function J(a){a=k.isHTMLElement(a)&&"true"===a.getAttribute("aria-checked");return{node:x(a)}}function x(a){return g.$applyNodeReplacement(new G(void 0,a))}function p(a){return a instanceof G}
+class K extends g.ElementNode{static getType(){return"list"}static clone(a){return new K(a.__listType||N[a.__tag],a.__start,a.__key)}constructor(a,b,c){super(c);this.__listType=a=N[a]||a;this.__tag="number"===a?"ol":"ul";this.__start=b}getTag(){return this.__tag}setListType(a){let b=this.getWritable();b.__listType=a;b.__tag="number"===a?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(a){let b=document.createElement(this.__tag);1!==this.__start&&b.setAttribute("start",
+String(this.__start));b.__lexicalListType=this.__listType;O(b,a.theme,this);return b}updateDOM(a,b,c){if(a.__tag!==this.__tag)return!0;O(b,c.theme,this);return!1}static transform(){return a=>{if(!q(a))throw Error("node is not a ListNode");let b="check"!==a.getListType(),c=a.getStart();for(let d of a.getChildren())p(d)&&(d.getValue()!==c&&d.setValue(c),b&&null!=d.getChecked()&&d.setChecked(void 0),q(d.getFirstChild())||c++)}}static importDOM(){return{ol:()=>({conversion:P,priority:0}),ul:()=>({conversion:P,
+priority:0})}}static importJSON(a){let b=D(a.listType,a.start);b.setFormat(a.format);b.setIndent(a.indent);b.setDirection(a.direction);return b}exportDOM(a){({element:a}=super.exportDOM(a));a&&k.isHTMLElement(a)&&(1!==this.__start&&a.setAttribute("start",String(this.__start)),"check"===this.__listType&&a.setAttribute("__lexicalListType","check"));return{element:a}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...a){for(let c=
+0;c<a.length;c++){var b=a[c];if(p(b))super.append(b);else{let d=x();q(b)?d.append(b):g.$isElementNode(b)?(b=g.$createTextNode(b.getTextContent()),d.append(b)):d.append(b);super.append(d)}}return this}extractWithChild(a){return p(a)}}
+function O(a,b,c){let d=[],e=[];var f=b.list;if(void 0!==f){let m=f[`${c.__tag}Depth`]||[];b=n(c)-1;let L=b%m.length;var h=m[L];let M=f[c.__tag],y,z=f.nested;f=f.checklist;void 0!==z&&z.list&&(y=z.list);void 0!==M&&d.push(M);void 0!==f&&"check"===c.__listType&&d.push(f);if(void 0!==h)for(h=h.split(" "),d.push(...h),h=0;h<m.length;h++)h!==L&&e.push(c.__tag+h);void 0!==y&&(c=y.split(" "),1<b?d.push(...c):e.push(...c))}0<e.length&&k.removeClassNamesFromElement(a,...e);0<d.length&&k.addClassNamesToElement(a,
+...d)}function Q(a){let b=[];for(let d=0;d<a.length;d++){var c=a[d];p(c)?(b.push(c),c=c.getChildren(),1<c.length&&c.forEach(e=>{q(e)&&b.push(w(e))})):b.push(w(c))}return b}function P(a){let b=a.nodeName.toLowerCase(),c=null;"ol"===b?c=D("number",a.start):"ul"===b&&(c=k.isHTMLElement(a)&&"check"===a.getAttribute("__lexicallisttype")?D("check"):D("bullet"));return{after:Q,node:c}}let N={ol:"number",ul:"bullet"};function D(a,b=1){return g.$applyNodeReplacement(new K(a,b))}
+function q(a){return a instanceof K}let R=g.createCommand("INSERT_UNORDERED_LIST_COMMAND"),S=g.createCommand("INSERT_ORDERED_LIST_COMMAND"),T=g.createCommand("INSERT_CHECK_LIST_COMMAND"),U=g.createCommand("REMOVE_LIST_COMMAND");exports.$createListItemNode=x;exports.$createListNode=D;exports.$getListDepth=n;
+exports.$handleListInsertParagraph=function(){var a=g.$getSelection();if(!g.$isRangeSelection(a)||!a.isCollapsed())return!1;a=a.anchor.getNode();if(!p(a)||0!==a.getChildrenSize())return!1;var b=r(a),c=a.getParent();q(c)||l(40);let d=c.getParent(),e;if(g.$isRootOrShadowRoot(d))e=g.$createParagraphNode(),b.insertAfter(e);else if(p(d))e=x(),d.insertAfter(e);else return!1;e.select();b=a.getNextSiblings();if(0<b.length){let f=D(c.getListType());g.$isParagraphNode(e)?e.insertAfter(f):(c=x(),c.append(f),
+e.insertAfter(c));b.forEach(h=>{h.remove();f.append(h)})}v(a);return!0};exports.$isListItemNode=p;exports.$isListNode=q;exports.INSERT_CHECK_LIST_COMMAND=T;exports.INSERT_ORDERED_LIST_COMMAND=S;exports.INSERT_UNORDERED_LIST_COMMAND=R;exports.ListItemNode=G;exports.ListNode=K;exports.REMOVE_LIST_COMMAND=U;
+exports.insertList=function(a,b){a.update(()=>{var c=g.$getSelection();if(null!==c){var d=c.getNodes();c=c.getStartEndPoints();null===c&&l(143);[c]=c;c=c.getNode();var e=c.getParent();if(A(c,d))d=D(b),g.$isRootOrShadowRoot(e)?(c.replace(d),e=x(),g.$isElementNode(c)&&(e.setFormat(c.getFormatType()),e.setIndent(c.getIndent())),d.append(e)):p(c)&&(c=c.getParentOrThrow(),B(d,c.getChildren()),c.replace(d));else for(c=new Set,e=0;e<d.length;e++){var f=d[e];if(g.$isElementNode(f)&&f.isEmpty()&&!p(f)&&!c.has(f.getKey()))C(f,
+b);else if(g.$isLeafNode(f))for(f=f.getParent();null!=f;){let m=f.getKey();if(q(f)){if(!c.has(m)){var h=D(b);B(h,f.getChildren());f.replace(h);c.add(m)}break}else{h=f.getParent();if(g.$isRootOrShadowRoot(h)&&!c.has(m)){c.add(m);C(f,b);break}f=h}}}}})};
+exports.removeList=function(a){a.update(()=>{let b=g.$getSelection();if(g.$isRangeSelection(b)){var c=new Set,d=b.getNodes(),e=b.anchor.getNode();if(A(e,d))c.add(r(e));else for(e=0;e<d.length;e++){var f=d[e];g.$isLeafNode(f)&&(f=k.$getNearestNodeOfType(f,G),null!=f&&c.add(r(f)))}for(let h of c){c=h;d=t(h);for(let m of d)d=g.$createParagraphNode(),B(d,m.getChildren()),c.insertAfter(d),c=d,m.__key===b.anchor.key&&b.anchor.set(d.getKey(),0,"element"),m.__key===b.focus.key&&b.focus.set(d.getKey(),0,"element"),
+m.remove();h.remove()}}})}
diff --git a/LexicalListItemNode.d.ts b/LexicalListItemNode.d.ts
index 9fd289fd0ab65e4f63b4d2814ec97f053348f9a9..cfed87598b2882973198cbb811552340a0fdcff6 100644
--- a/LexicalListItemNode.d.ts
+++ b/LexicalListItemNode.d.ts
@@ -40,7 +40,6 @@ export declare class ListItemNode extends ElementNode {
toggleChecked(): void;
getIndent(): number;
setIndent(indent: number): this;
- insertBefore(nodeToInsert: LexicalNode): LexicalNode;
canInsertAfter(node: LexicalNode): boolean;
canReplaceWith(replacement: LexicalNode): boolean;
canMergeWith(node: LexicalNode): boolean;
diff --git a/LexicalListNode.d.ts b/LexicalListNode.d.ts
index a04521af0011a36bae4a15ad5d04ce06b887d54e..ab4e18ab7e4116a1969479ef44e84657c2c51c87 100644
--- a/LexicalListNode.d.ts
+++ b/LexicalListNode.d.ts
@@ -30,6 +30,7 @@ export declare class ListNode extends ElementNode {
getStart(): number;
createDOM(config: EditorConfig, _editor?: LexicalEditor): HTMLElement;
updateDOM(prevNode: ListNode, dom: HTMLElement, config: EditorConfig): boolean;
+ static transform(): (node: LexicalNode) => void;
static importDOM(): DOMConversionMap | null;
static importJSON(serializedNode: SerializedListNode): ListNode;
exportDOM(editor: LexicalEditor): DOMExportOutput;
diff --git a/formatList.d.ts b/formatList.d.ts
index d1f43e38e50680a1248a03ae8ea71f8541c33bc1..4359cbba12fa205eb6843ad1568e02c5efcc8ffc 100644
--- a/formatList.d.ts
+++ b/formatList.d.ts
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*
*/
-import { LexicalEditor, LexicalNode } from 'lexical';
+import { LexicalEditor } from 'lexical';
import { ListItemNode, ListNode } from './';
import { ListType } from './LexicalListNode';
/**
@@ -36,12 +36,11 @@ export declare function mergeLists(list1: ListNode, list2: ListNode): void;
export declare function removeList(editor: LexicalEditor): void;
/**
* Takes the value of a child ListItemNode and makes it the value the ListItemNode
- * should be if it isn't already. If only certain children should be updated, they
- * can be passed optionally in an array.
+ * should be if it isn't already. Also ensures that checked is undefined if the
+ * parent does not have a list type of 'check'.
* @param list - The list whose children are updated.
- * @param children - An array of the children to be updated.
*/
-export declare function updateChildrenListItemValue(list: ListNode, children?: Array<LexicalNode>): void;
+export declare function updateChildrenListItemValue(list: ListNode): void;
/**
* Adds an empty ListNode/ListItemNode chain at listItemNode, so as to
* create an indent effect. Won't indent ListItemNodes that have a ListNode as

Some files were not shown because too many files have changed in this diff Show More