1
0
mirror of https://github.com/laurent22/joplin.git synced 2026-06-18 20:16:34 +02:00

Compare commits

...

128 Commits

Author SHA1 Message Date
Laurent Cozic 9b88c7c8a3 Slow down Renovate updates 2023-01-06 20:06:55 +00:00
Laurent Cozic 8b7d1c463f update 2023-01-06 19:55:04 +00:00
Laurent Cozic fce9d6429a update 2023-01-06 19:24:40 +00:00
Laurent Cozic c895601712 udpate 2023-01-06 18:03:59 +00:00
Laurent Cozic 98f22d49d0 update 2023-01-06 17:21:10 +00:00
Laurent Cozic 2331d66a6d update 2023-01-06 12:26:23 +00:00
Laurent Cozic b091499b09 Profile switcher: Init 2023-01-05 23:36:17 +00:00
Laurent Cozic b60a94bb6e Merge branch 'pr/react-native-paper-action-buttons' of https://github.com/personalizedrefrigerator/joplin into personalizedrefrigerator-pr/react-native-paper-action-buttons 2023-01-05 23:31:53 +00:00
Laurent Cozic 0bc55bff7f Tools: Add delay before creating Renovate PR 2023-01-05 21:33:41 +00:00
Laurent Cozic d9215b044f Tools: Add delay before creating Renovate PR 2023-01-05 21:31:12 +00:00
Laurent Cozic 2f9384f891 lock file 2023-01-05 21:13:08 +00:00
Joplin Bot a172b1380e Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-01-05 18:17:06 +00:00
Laurent Cozic 0d4c074e84 Tools: Refactor Discourse code 2023-01-05 17:05:40 +00:00
Laurent Cozic 9eff7e6060 Mobile: Fixed biometics prompt on new devices 2023-01-05 13:30:09 +00:00
renovate[bot] 1edb345e85 Update dependency react-native-share to v8.1.0 (#7582) 2023-01-05 13:10:18 +00:00
Laurent Cozic 54ed374af6 Android 2.10.3 2023-01-05 13:08:48 +00:00
Laurent Cozic 9866e5912c Desktop release v2.10.4 2023-01-05 11:19:35 +00:00
Laurent Cozic 4058f624f4 lock file 2023-01-05 11:19:23 +00:00
Laurent Cozic 0bc15f40b3 Merge branch 'dev' into release-2.10 2023-01-05 11:12:09 +00:00
Laurent Cozic 7a55a08fec Android 2.10.2 2023-01-05 11:11:52 +00:00
Laurent Cozic 4efb6003dc Desktop: Fixes #7018: Plugin API DirectoryPath edit problems when path contain spaces 2023-01-05 11:05:23 +00:00
Laurent Cozic f4f96cfe89 Update plugin types 2023-01-05 10:41:17 +00:00
Laurent Cozic a43ce33adf Desktop: Fixed certain plugins that were using the sqlite3 database 2023-01-05 10:21:26 +00:00
renovate[bot] f95ccd6700 Update dependency aws-sdk to v2.1288.0 (#7581)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-05 06:28:14 +00:00
Joplin Bot 07184301d1 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-01-05 00:43:41 +00:00
Laurent Cozic 0678dad2d6 Tools: Speed up building mobile CodeMirror when nothing has changed 2023-01-04 20:39:33 +00:00
Laurent Cozic b2d59002bb Fix build 2023-01-04 20:25:09 +00:00
Laurent Cozic 7557791230 Remove debug code 2023-01-04 20:19:51 +00:00
Laurent Cozic f10d9f75b0 Mobile: Add support for locking the app using biometrics 2023-01-04 20:18:51 +00:00
Laurent Cozic 5a05cc5797 Chore: Mobile: Suppress useless Icon.loadFont() warning 2023-01-04 20:18:24 +00:00
Joplin Bot 488394ff47 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-01-04 18:17:18 +00:00
renovate[bot] b2ba0ee849 Update dependency @types/yargs to v17.0.19 (#7577)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-04 04:32:14 +00:00
renovate[bot] 6c108bbf6c Update dependency aws-sdk to v2.1287.0 (#7575)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-04 02:05:55 +00:00
Laurent Cozic 275c80ade5 Mobile: Fixed proxy timeout setting UI 2023-01-03 20:22:44 +00:00
Laurent Cozic 00bc25ed5c Revert "Mobile: Fixed proxy timeout setting UI"
Will cause unnecessary backward compatibility issues with plugins.

This reverts commit ff355b9f4d.
2023-01-03 20:19:27 +00:00
Laurent Cozic f5ef318f70 Mobile: Make the new text editor the default one 2023-01-03 19:49:08 +00:00
Laurent Cozic ff355b9f4d Mobile: Fixed proxy timeout setting UI 2023-01-03 19:49:05 +00:00
renovate[bot] 9a9d51caaf Update dependency eslint-config-prettier to v8.6.0 (#7570) 2023-01-03 12:41:01 +00:00
Laurent Cozic 3e6e75c27b Update renovate.json5 2023-01-03 10:27:01 +00:00
renovate[bot] a8689816bf Update typescript-eslint monorepo to v5.48.0 (#7571)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-03 00:01:20 +00:00
Laurent Cozic 27d1a0ee7c Mobile: Fixes #7503: Settings save button visible even when no settings have been changed 2023-01-02 18:36:39 +00:00
Laurent Cozic 8e12ace3ed Android 2.10.2 2023-01-02 17:49:12 +00:00
Joplin Bot d5c6690606 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-01-01 12:19:30 +00:00
Joplin Bot f6741cf342 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-01-01 00:46:00 +00:00
renovate[bot] 44fad32ee5 Update dependency gettext-extractor to v3.6.1 (#7563)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-31 23:42:28 +00:00
Joplin Bot bae7ff0ca5 Doc: Auto-update documentation
Auto-updated using release-website.sh
2022-12-31 18:15:31 +00:00
renovate[bot] 074d02da56 Update dependency eslint to v8.31.0 (#7562)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-31 14:18:12 +00:00
renovate[bot] 70b01b70c6 Update dependency aws-sdk to v2.1286.0 (#7557)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-31 11:48:11 +00:00
renovate[bot] d29e4c434c Update dependency @types/react-redux to v7.1.25 (#7561)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-31 08:42:54 +00:00
renovate[bot] 423191bda9 Update dependency @types/jest to v29.2.5 (#7560)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-31 05:22:59 +00:00
Laurent Cozic 7a0af66c63 Desktop release v2.10.3 2022-12-31 00:39:20 +00:00
Laurent Cozic 49e444e73b Desktop: Fixes #7528: Fixed crash when closing PDF 2022-12-31 00:36:16 +00:00
Laurent Cozic 0db0a565b7 Desktop: Fixes #7499: Random crash when searching 2022-12-30 23:54:20 +00:00
Betty Alagwu 5fb01b5c7a Desktop: Fixes #7520: Search field doesn't get focus when pressing Ctrl+F (#7529) 2022-12-30 23:54:04 +00:00
Laurent Cozic 854f1163cd Desktop: Fixes #7493: Press Enter to select a tag 2022-12-30 23:39:45 +00:00
Roman Musin d55f6aeb2a Linux: Revert "Linux: Fix AppImage icon when installing using Joplin_install_and_update.sh (#7346)" (#7559)
This reverts commit cb563f7e60.
2022-12-30 23:21:29 +00:00
Henry Heino ea30a6bd38 Mobile: Fixes #6175: Enable autocorrect with spellcheck (#7532) 2022-12-30 23:20:56 +00:00
github-actions[bot] e09b26b99b @roman-r-m has signed the CLA from Pull Request #7559 2022-12-30 21:35:38 +00:00
Henry Heino e7386e6fe3 Chore: Mobile: Fix CodeMirror test failures (#7522) 2022-12-30 17:25:31 +00:00
Laurent Cozic 767213cdc1 Mobile: Add support for realtime search 2022-12-30 14:12:07 +00:00
Laurent Cozic a189b2eff0 lock file 2022-12-30 13:36:19 +00:00
github-actions[bot] 655ea6945d @k33pn3xtlvl has signed the CLA from Pull Request #6722 2022-12-30 13:34:52 +00:00
renovate[bot] 5106ccee91 Update dependency aws-sdk to v2.1285.0 (#7556)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-30 06:12:21 +00:00
renovate[bot] 1ee515454a Update aws-sdk-js-v3 monorepo to v3.241.0 (#7555)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-30 03:53:44 +00:00
renovate[bot] fc46c87ef7 Update dependency @types/yargs to v17.0.18 (#7554)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-30 01:02:53 +00:00
Laurent Cozic 422b81ae24 Android 2.10.1 2022-12-29 14:11:12 +00:00
Henry Heino c0d0c16d7a Update Podfile.lock after merge 2022-12-28 19:56:40 -08:00
renovate[bot] 17124e86d1 Update dependency aws-sdk to v2.1284.0 (#7549)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-28 22:04:12 +00:00
Laurent Cozic d2aab6536c Fixed linter error 2022-12-28 16:12:36 +00:00
Laurent Cozic ed71f68e1d iOS 12.10.1 2022-12-28 15:09:21 +00:00
Gavin Mogan 01d451f72a Server: Add in ability to use Postgres connection string in configuration (#6836) 2022-12-28 14:38:30 +00:00
renovate[bot] 5b3f07f3c5 Update dependency aws-sdk to v2.1283.0 (#7543)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-28 14:31:37 +00:00
renovate[bot] edf7cab1ef Update dependency joplin-rn-alarm-notification to v1.0.7 (#7545)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-28 11:25:49 +00:00
github-actions[bot] caaac5c1a2 @adarsh-sgh has signed the CLA from Pull Request #7546 2022-12-28 08:38:37 +00:00
Laurent Cozic 5a28a6bc90 Ignore package 2022-12-27 20:38:28 +00:00
Laurent Cozic f9f7c86915 Chore: Remove obsolete patch 2022-12-27 19:38:41 +00:00
Laurent Cozic e2d59ee1fa Mobile: Upgrade to react-native 0.68.5 2022-12-27 19:37:15 +00:00
Laurent Cozic d81802e7d2 Mobile: Upgrade to react-native 0.67.5 2022-12-27 17:59:16 +00:00
Laurent Cozic 73bb79b558 Tools: Add suport for npm-package-json-lint 2022-12-27 17:39:48 +00:00
github-actions[bot] c41ebe8d9d @asrient has signed the CLA from Pull Request #6845 2022-12-27 17:34:17 +00:00
Hitarth Thummar 8e2e7eccd9 Desktop: Resolve #6254: <details> elements remain closed when exporting to PDF (#7515) 2022-12-27 16:57:00 +00:00
Wartijn 527a7da2ff Desktop: Fixes #7329: Fixes import of tasklists from enex files (#7344) 2022-12-27 15:17:42 +00:00
Laurent Cozic d3ca725395 Merge branch 'dev' into pr/react-native-paper-action-buttons 2022-12-27 14:30:30 +00:00
github-actions[bot] 40399cf3e1 @ManavSarkar has signed the CLA from Pull Request #7541 2022-12-27 10:48:33 +00:00
renovate[bot] 873808a66a Update typescript-eslint monorepo to v5.47.1 (#7539)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-27 00:23:59 +00:00
renovate[bot] cf300bc842 Update dependency @types/node to v18.11.18 (#7538)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-26 21:57:47 +00:00
Laurent Cozic 9a06824fde Server v2.10.5 2022-12-26 12:09:27 +00:00
Laurent Cozic 186316bb8b lock file 2022-12-26 11:56:47 +00:00
Laurent Cozic 5c8861cbd1 Server: Fixes #7525: Fixed regression that would prevent styles from being loaded in published notes 2022-12-26 11:56:34 +00:00
github-actions[bot] c710cfd273 @ken1kob has signed the CLA from Pull Request #6469 2022-12-26 11:02:08 +00:00
Henry Heino d14ec824b4 Merge remote-tracking branch 'upstream/dev' into pr/react-native-paper-action-buttons 2022-12-25 00:27:18 -08:00
Mr-Kanister 3ef41016b5 All: Translation: Update de_DE.po (#7531) 2022-12-24 21:19:15 -05:00
github-actions[bot] 85423fd835 @Mr-Kanister has signed the CLA from Pull Request #7531 2022-12-24 18:40:34 +00:00
Laurent Cozic d690146f9f Chore: Make it easier to test publishing notes 2022-12-24 12:30:52 +00:00
renovate[bot] 944e0ef304 Update dependency aws-sdk to v2.1282.0 (#7527)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-24 06:36:12 +00:00
github-actions[bot] 409dcea0c6 @betty-alagwu has signed the CLA from Pull Request #7529 2022-12-24 03:09:03 +00:00
renovate[bot] 6c20cdefd4 Update aws-sdk-js-v3 monorepo to v3.238.0 (#7526)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-24 01:47:48 +00:00
renovate[bot] 300f1590ba Update dependency @types/react-dom to v18.0.10 (#7524)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-23 19:18:31 +00:00
github-actions[bot] f6c2013df8 @Wartijn has signed the CLA from Pull Request #6886 2022-12-23 16:13:36 +00:00
renovate[bot] e3dc77357c Update dependency aws-sdk to v2.1281.0 (#7514)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-22 22:37:33 +00:00
github-actions[bot] a739636ce6 @halkeye has signed the CLA from Pull Request #6836 2022-12-22 17:52:40 +00:00
Laurent Cozic 7620c2b0b7 Tools: Disable CodeMirror flaky test 2022-12-22 14:30:04 +00:00
Laurent Cozic 60c4045000 Merge branch 'dev' of github.com:laurent22/joplin into dev 2022-12-22 13:19:35 +00:00
Laurent Cozic 39fb40dc37 Merge branch 'release-2.9' into dev 2022-12-22 13:18:10 +00:00
Laurent Cozic 145cb6c41e iOS 12.9.2 2022-12-22 12:42:38 +00:00
Laurent Cozic de9f9985d1 Merge branch 'release-2.9' into dev 2022-12-22 12:40:57 +00:00
Laurent Cozic 23277aaf85 Mobile: Fixes #7471: Could not attach images to notes anymore 2022-12-22 12:38:11 +00:00
Henry Heino e9e7a1d0df iOS: Fixes #7469: Note viewer inertial scroll is slower than native inertial scrolling (#7470) 2022-12-22 12:15:20 +00:00
github-actions[bot] 3453240833 @gtlsgamr has signed the CLA from Pull Request #7515 2022-12-22 09:35:15 +00:00
renovate[bot] 1882aac628 Update aws-sdk-js-v3 monorepo to v3.236.0 (#7513)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-22 08:59:20 +00:00
renovate[bot] 6868e7086b Update dependency sharp to v0.31.3 (#7512)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-22 06:31:50 +00:00
renovate[bot] b35eeb6626 Update dependency react-native-image-picker to v4.10.3 (#7508)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-22 03:45:32 +00:00
renovate[bot] 98c56818bb Update contributor-assistant/github-action action to v2.2.1 (#7511)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-22 00:20:50 +00:00
github-actions[bot] 722a0df681 @personalizedrefrigerator has signed the CLA from Pull Request #7470 2022-12-21 21:22:46 +00:00
github-actions[bot] 115cf116a2 @wh201906 has signed the CLA from Pull Request #6865 2022-12-21 17:40:11 +00:00
Laurent Cozic f34e048fad Update cla.md 2022-12-21 17:10:54 +00:00
github-actions[bot] a754659ab9 @laurent22 has signed the CLA from Pull Request #7510 2022-12-21 16:54:28 +00:00
github-actions[bot] 0517d1e5d6 Creating file for storing CLA Signatures 2022-12-21 16:44:53 +00:00
Henry Heino f7a003fbf1 Merge remote-tracking branch 'upstream/dev' into pr/react-native-paper-action-buttons 2022-12-18 14:07:11 -08:00
Henry Heino 887e03e338 Run npx pod-install 2022-12-18 13:22:40 -08:00
Henry Heino b169283ea8 Update yarn.lock 2022-12-18 13:19:24 -08:00
Henry Heino b0c898839d Reset to newer version ios directory 2022-12-18 12:41:03 -08:00
Henry Heino 54aa68baad Reset entire iOS directory. npx pod-install will need to be re-run 2022-12-18 12:37:29 -08:00
Henry Heino 3b7fdd5019 Restore project.pbxproj 2022-12-18 12:31:17 -08:00
Henry Heino 63a9c571bb Spaces -> tabs in ActionButton.tsx 2022-12-17 16:52:53 -08:00
Henry Heino 22a10b0abb Update react-native-paper and Merge remote-tracking branch 'upstream/dev' into pr/react-native-paper-action-buttons 2022-12-17 16:45:11 -08:00
Henry Heino ad5a21193e Commit yarn.lock 2022-10-01 15:28:56 -07:00
Henry Heino 7af794d8c6 Migrate to React Native Paper 2022-10-01 15:28:55 -07:00
345 changed files with 6693 additions and 2177 deletions
+39
View File
@@ -864,6 +864,9 @@ packages/app-desktop/utils/markupLanguageUtils.js.map
packages/app-mobile/PluginAssetsLoader.d.ts
packages/app-mobile/PluginAssetsLoader.js
packages/app-mobile/PluginAssetsLoader.js.map
packages/app-mobile/components/ActionButton.d.ts
packages/app-mobile/components/ActionButton.js
packages/app-mobile/components/ActionButton.js.map
packages/app-mobile/components/BackButtonDialogBox.d.ts
packages/app-mobile/components/BackButtonDialogBox.js
packages/app-mobile/components/BackButtonDialogBox.js.map
@@ -933,6 +936,9 @@ packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/createEditor.js.ma
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/forceFullParse.d.ts
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/forceFullParse.js
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/forceFullParse.js.map
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/loadLanguages.d.ts
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/loadLanguages.js
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/loadLanguages.js.map
packages/app-mobile/components/NoteEditor/CodeMirror/theme.d.ts
packages/app-mobile/components/NoteEditor/CodeMirror/theme.js
packages/app-mobile/components/NoteEditor/CodeMirror/theme.js.map
@@ -978,6 +984,15 @@ packages/app-mobile/components/NoteEditor/SelectionFormatting.js.map
packages/app-mobile/components/NoteEditor/types.d.ts
packages/app-mobile/components/NoteEditor/types.js
packages/app-mobile/components/NoteEditor/types.js.map
packages/app-mobile/components/ProfileSwitcher/ProfileEditor.d.ts
packages/app-mobile/components/ProfileSwitcher/ProfileEditor.js
packages/app-mobile/components/ProfileSwitcher/ProfileEditor.js.map
packages/app-mobile/components/ProfileSwitcher/ProfileSwitcher.d.ts
packages/app-mobile/components/ProfileSwitcher/ProfileSwitcher.js
packages/app-mobile/components/ProfileSwitcher/ProfileSwitcher.js.map
packages/app-mobile/components/ProfileSwitcher/useProfileConfig.d.ts
packages/app-mobile/components/ProfileSwitcher/useProfileConfig.js
packages/app-mobile/components/ProfileSwitcher/useProfileConfig.js.map
packages/app-mobile/components/ScreenHeader.d.ts
packages/app-mobile/components/ScreenHeader.js
packages/app-mobile/components/ScreenHeader.js.map
@@ -987,6 +1002,15 @@ packages/app-mobile/components/SelectDateTimeDialog.js.map
packages/app-mobile/components/SideMenu.d.ts
packages/app-mobile/components/SideMenu.js
packages/app-mobile/components/SideMenu.js.map
packages/app-mobile/components/TextInput.d.ts
packages/app-mobile/components/TextInput.js
packages/app-mobile/components/TextInput.js.map
packages/app-mobile/components/biometrics/BiometricPopup.d.ts
packages/app-mobile/components/biometrics/BiometricPopup.js
packages/app-mobile/components/biometrics/BiometricPopup.js.map
packages/app-mobile/components/biometrics/sensorInfo.d.ts
packages/app-mobile/components/biometrics/sensorInfo.js
packages/app-mobile/components/biometrics/sensorInfo.js.map
packages/app-mobile/components/getResponsiveValue.d.ts
packages/app-mobile/components/getResponsiveValue.js
packages/app-mobile/components/getResponsiveValue.js.map
@@ -1005,6 +1029,9 @@ packages/app-mobile/components/screens/UpgradeSyncTargetScreen.js.map
packages/app-mobile/components/screens/encryption-config.d.ts
packages/app-mobile/components/screens/encryption-config.js
packages/app-mobile/components/screens/encryption-config.js.map
packages/app-mobile/components/screens/search.d.ts
packages/app-mobile/components/screens/search.js
packages/app-mobile/components/screens/search.js.map
packages/app-mobile/components/side-menu-content.d.ts
packages/app-mobile/components/side-menu-content.js
packages/app-mobile/components/side-menu-content.js.map
@@ -1023,6 +1050,9 @@ packages/app-mobile/services/AlarmServiceDriver.ios.js.map
packages/app-mobile/services/e2ee/RSA.react-native.d.ts
packages/app-mobile/services/e2ee/RSA.react-native.js
packages/app-mobile/services/e2ee/RSA.react-native.js.map
packages/app-mobile/services/profiles/index.d.ts
packages/app-mobile/services/profiles/index.js
packages/app-mobile/services/profiles/index.js.map
packages/app-mobile/setupQuickActions.d.ts
packages/app-mobile/setupQuickActions.js
packages/app-mobile/setupQuickActions.js.map
@@ -1041,6 +1071,9 @@ packages/app-mobile/utils/TlsUtils.js.map
packages/app-mobile/utils/checkPermissions.d.ts
packages/app-mobile/utils/checkPermissions.js
packages/app-mobile/utils/checkPermissions.js.map
packages/app-mobile/utils/createRootStyle.d.ts
packages/app-mobile/utils/createRootStyle.js
packages/app-mobile/utils/createRootStyle.js.map
packages/app-mobile/utils/debounce.d.ts
packages/app-mobile/utils/debounce.js
packages/app-mobile/utils/debounce.js.map
@@ -1878,6 +1911,9 @@ packages/lib/services/searchengine/filterParser.js.map
packages/lib/services/searchengine/filterParser.test.d.ts
packages/lib/services/searchengine/filterParser.test.js
packages/lib/services/searchengine/filterParser.test.js.map
packages/lib/services/searchengine/gotoAnythingStyleQuery.d.ts
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.js.map
packages/lib/services/searchengine/queryBuilder.d.ts
packages/lib/services/searchengine/queryBuilder.js
packages/lib/services/searchengine/queryBuilder.js.map
@@ -2313,6 +2349,9 @@ packages/tools/update-readme-sponsors.js.map
packages/tools/updateMarkdownDoc.d.ts
packages/tools/updateMarkdownDoc.js
packages/tools/updateMarkdownDoc.js.map
packages/tools/utils/discourse.d.ts
packages/tools/utils/discourse.js
packages/tools/utils/discourse.js.map
packages/tools/utils/translation.d.ts
packages/tools/utils/translation.js
packages/tools/utils/translation.js.map
+6
View File
@@ -107,6 +107,12 @@ if [ "$IS_PULL_REQUEST" == "1" ] || [ "$IS_DEV_BRANCH" = "1" ]; then
if [ $testResult -ne 0 ]; then
exit $testResult
fi
yarn run packageJsonLint
testResult=$?
if [ $testResult -ne 0 ]; then
exit $testResult
fi
fi
# =============================================================================
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
# Beta Release
uses: contributor-assistant/github-action@v2.2.0
uses: contributor-assistant/github-action@v2.2.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
+40 -3
View File
@@ -852,6 +852,9 @@ packages/app-desktop/utils/markupLanguageUtils.js.map
packages/app-mobile/PluginAssetsLoader.d.ts
packages/app-mobile/PluginAssetsLoader.js
packages/app-mobile/PluginAssetsLoader.js.map
packages/app-mobile/components/ActionButton.d.ts
packages/app-mobile/components/ActionButton.js
packages/app-mobile/components/ActionButton.js.map
packages/app-mobile/components/BackButtonDialogBox.d.ts
packages/app-mobile/components/BackButtonDialogBox.js
packages/app-mobile/components/BackButtonDialogBox.js.map
@@ -921,6 +924,9 @@ packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/createEditor.js.ma
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/forceFullParse.d.ts
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/forceFullParse.js
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/forceFullParse.js.map
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/loadLanguages.d.ts
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/loadLanguages.js
packages/app-mobile/components/NoteEditor/CodeMirror/testUtil/loadLanguages.js.map
packages/app-mobile/components/NoteEditor/CodeMirror/theme.d.ts
packages/app-mobile/components/NoteEditor/CodeMirror/theme.js
packages/app-mobile/components/NoteEditor/CodeMirror/theme.js.map
@@ -966,6 +972,15 @@ packages/app-mobile/components/NoteEditor/SelectionFormatting.js.map
packages/app-mobile/components/NoteEditor/types.d.ts
packages/app-mobile/components/NoteEditor/types.js
packages/app-mobile/components/NoteEditor/types.js.map
packages/app-mobile/components/ProfileSwitcher/ProfileEditor.d.ts
packages/app-mobile/components/ProfileSwitcher/ProfileEditor.js
packages/app-mobile/components/ProfileSwitcher/ProfileEditor.js.map
packages/app-mobile/components/ProfileSwitcher/ProfileSwitcher.d.ts
packages/app-mobile/components/ProfileSwitcher/ProfileSwitcher.js
packages/app-mobile/components/ProfileSwitcher/ProfileSwitcher.js.map
packages/app-mobile/components/ProfileSwitcher/useProfileConfig.d.ts
packages/app-mobile/components/ProfileSwitcher/useProfileConfig.js
packages/app-mobile/components/ProfileSwitcher/useProfileConfig.js.map
packages/app-mobile/components/ScreenHeader.d.ts
packages/app-mobile/components/ScreenHeader.js
packages/app-mobile/components/ScreenHeader.js.map
@@ -975,6 +990,15 @@ packages/app-mobile/components/SelectDateTimeDialog.js.map
packages/app-mobile/components/SideMenu.d.ts
packages/app-mobile/components/SideMenu.js
packages/app-mobile/components/SideMenu.js.map
packages/app-mobile/components/TextInput.d.ts
packages/app-mobile/components/TextInput.js
packages/app-mobile/components/TextInput.js.map
packages/app-mobile/components/biometrics/BiometricPopup.d.ts
packages/app-mobile/components/biometrics/BiometricPopup.js
packages/app-mobile/components/biometrics/BiometricPopup.js.map
packages/app-mobile/components/biometrics/sensorInfo.d.ts
packages/app-mobile/components/biometrics/sensorInfo.js
packages/app-mobile/components/biometrics/sensorInfo.js.map
packages/app-mobile/components/getResponsiveValue.d.ts
packages/app-mobile/components/getResponsiveValue.js
packages/app-mobile/components/getResponsiveValue.js.map
@@ -993,6 +1017,9 @@ packages/app-mobile/components/screens/UpgradeSyncTargetScreen.js.map
packages/app-mobile/components/screens/encryption-config.d.ts
packages/app-mobile/components/screens/encryption-config.js
packages/app-mobile/components/screens/encryption-config.js.map
packages/app-mobile/components/screens/search.d.ts
packages/app-mobile/components/screens/search.js
packages/app-mobile/components/screens/search.js.map
packages/app-mobile/components/side-menu-content.d.ts
packages/app-mobile/components/side-menu-content.js
packages/app-mobile/components/side-menu-content.js.map
@@ -1011,6 +1038,9 @@ packages/app-mobile/services/AlarmServiceDriver.ios.js.map
packages/app-mobile/services/e2ee/RSA.react-native.d.ts
packages/app-mobile/services/e2ee/RSA.react-native.js
packages/app-mobile/services/e2ee/RSA.react-native.js.map
packages/app-mobile/services/profiles/index.d.ts
packages/app-mobile/services/profiles/index.js
packages/app-mobile/services/profiles/index.js.map
packages/app-mobile/setupQuickActions.d.ts
packages/app-mobile/setupQuickActions.js
packages/app-mobile/setupQuickActions.js.map
@@ -1029,6 +1059,9 @@ packages/app-mobile/utils/TlsUtils.js.map
packages/app-mobile/utils/checkPermissions.d.ts
packages/app-mobile/utils/checkPermissions.js
packages/app-mobile/utils/checkPermissions.js.map
packages/app-mobile/utils/createRootStyle.d.ts
packages/app-mobile/utils/createRootStyle.js
packages/app-mobile/utils/createRootStyle.js.map
packages/app-mobile/utils/debounce.d.ts
packages/app-mobile/utils/debounce.js
packages/app-mobile/utils/debounce.js.map
@@ -1866,6 +1899,9 @@ packages/lib/services/searchengine/filterParser.js.map
packages/lib/services/searchengine/filterParser.test.d.ts
packages/lib/services/searchengine/filterParser.test.js
packages/lib/services/searchengine/filterParser.test.js.map
packages/lib/services/searchengine/gotoAnythingStyleQuery.d.ts
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.js.map
packages/lib/services/searchengine/queryBuilder.d.ts
packages/lib/services/searchengine/queryBuilder.js
packages/lib/services/searchengine/queryBuilder.js.map
@@ -2301,6 +2337,9 @@ packages/tools/update-readme-sponsors.js.map
packages/tools/updateMarkdownDoc.d.ts
packages/tools/updateMarkdownDoc.js
packages/tools/updateMarkdownDoc.js.map
packages/tools/utils/discourse.d.ts
packages/tools/utils/discourse.js
packages/tools/utils/discourse.js.map
packages/tools/utils/translation.d.ts
packages/tools/utils/translation.js
packages/tools/utils/translation.js.map
@@ -2350,6 +2389,4 @@ packages/tools/website/utils/types.d.ts
packages/tools/website/utils/types.js
packages/tools/website/utils/types.js.map
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
packages/app-mobile/components/get-responsive-value.test.js
packages/app-mobile/components/get-responsive-value.test.js
packages/app-mobile/components/get-responsive-value.test.js
+2
View File
@@ -0,0 +1,2 @@
packages/app-clipper/popup/
packages/app-cli/tests/support/plugins/
+22
View File
@@ -0,0 +1,22 @@
{
"rules": {
"prefer-absolute-version-dependencies": ["error",
{
"exceptions": [
"@joplin/lib",
"@joplin/renderer",
"@joplin/pdf-viewer",
"@joplin/fork-htmlparser2",
"@joplin/fork-sax",
"@joplin/fork-uslug",
"@joplin/htmlpack",
"@joplin/turndown",
"@joplin/turndown-plugin-gfm",
"@joplin/tools",
"@joplin/react-native-saf-x"
]
}
]
}
}
@@ -1,33 +0,0 @@
diff --git a/android/build.gradle b/android/build.gradle
index 1ae415331855895ed6c65d72e155ff91d02b4b39..a7548535a7fb08800fb4731c1d8e36efa8afa1ae 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -22,7 +22,7 @@ def safeExtGet(prop, fallback) {
}
apply plugin: 'com.android.library'
-apply plugin: 'maven'
+apply plugin: 'maven-publish'
buildscript {
// The Android Gradle plugin is only required when opening the android folder stand-alone.
@@ -41,7 +41,7 @@ buildscript {
}
apply plugin: 'com.android.library'
-apply plugin: 'maven'
+apply plugin: 'maven-publish'
android {
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
@@ -140,10 +140,5 @@ afterEvaluate { project ->
task installArchives(type: Upload) {
configuration = configurations.archives
- repositories.mavenDeployer {
- // Deploy to react-native-event-bridge/maven, ready to publish to npm
- repository url: "file://${projectDir}/../android/maven"
- configureReactNativePom pom
- }
}
}
+1 -1
View File
@@ -216,7 +216,7 @@ then
Name=Joplin
Comment=Joplin for Desktop
Exec=${HOME}/.joplin/Joplin.AppImage ${SANDBOXPARAM} %u
Icon=@joplinapp-desktop
Icon=joplin
StartupWMClass=Joplin
Type=Application
Categories=Office;
-2
View File
@@ -13,7 +13,5 @@ module.exports = {
'*.{js,jsx,ts,tsx}': [
'yarn run linter-precommit',
'yarn run checkLibPaths',
// 'yarn run spellcheck',
// 'git add',
],
};
+7 -8
View File
@@ -33,6 +33,7 @@
"linter-precommit": "eslint --resolve-plugins-relative-to . --fix --ext .js --ext .jsx --ext .ts --ext .tsx",
"linter": "eslint --resolve-plugins-relative-to . --fix --quiet --ext .js --ext .jsx --ext .ts --ext .tsx",
"linter-interactive": "eslint-interactive --resolve-plugins-relative-to . --fix --quiet --ext .js --ext .jsx --ext .ts --ext .tsx",
"packageJsonLint": "npmPkgJsonLint --configFile .npmpackagejsonlintrc.json --quiet .",
"postinstall": "gulp build",
"publishAll": "git pull && yarn run buildParallel && lerna version --yes --no-private --no-git-tag-version && gulp completePublishAll",
"releaseAndroid": "PATH=\"/usr/local/opt/openjdk@11/bin:$PATH\" node packages/tools/release-android.js",
@@ -59,15 +60,15 @@
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
"pre-commit": "lint-staged && yarn run packageJsonLint"
}
},
"devDependencies": {
"@seiyab/eslint-plugin-react-hooks": "4.5.1-beta.0",
"@typescript-eslint/eslint-plugin": "5.47.0",
"@typescript-eslint/parser": "5.47.0",
"@typescript-eslint/eslint-plugin": "5.48.0",
"@typescript-eslint/parser": "5.48.0",
"cspell": "5.21.2",
"eslint": "8.30.0",
"eslint": "8.31.0",
"eslint-interactive": "10.3.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-promise": "6.1.1",
@@ -79,6 +80,7 @@
"lerna": "3.22.1",
"lint-staged": "13.1.0",
"madge": "5.0.1",
"npm-package-json-lint": "6.4.0",
"typedoc": "0.17.8",
"typescript": "4.9.4"
},
@@ -88,8 +90,5 @@
"node-gyp": "9.3.1",
"nodemon": "2.0.20"
},
"packageManager": "yarn@3.3.1",
"resolutions": {
"joplin-rn-alarm-notification@1.0.5": "patch:joplin-rn-alarm-notification@npm:1.0.5#.yarn/patches/joplin-rn-alarm-notification-npm-1.0.5-662e871c03"
}
"packageManager": "yarn@3.3.1"
}
+4 -4
View File
@@ -42,7 +42,7 @@
"dependencies": {
"@joplin/lib": "~2.10",
"@joplin/renderer": "~2.10",
"aws-sdk": "2.1279.0",
"aws-sdk": "2.1288.0",
"chalk": "4.1.2",
"compare-version": "0.1.2",
"fs-extra": "11.1.0",
@@ -55,7 +55,7 @@
"proper-lockfile": "4.1.2",
"read-chunk": "2.1.0",
"server-destroy": "1.0.1",
"sharp": "0.31.2",
"sharp": "0.31.3",
"sprintf-js": "1.1.2",
"sqlite3": "5.1.4",
"string-padding": "1.0.2",
@@ -70,8 +70,8 @@
"devDependencies": {
"@joplin/tools": "~2.10",
"@types/fs-extra": "9.0.13",
"@types/jest": "29.2.4",
"@types/node": "18.11.17",
"@types/jest": "29.2.5",
"@types/node": "18.11.18",
"gulp": "4.0.2",
"jest": "29.3.1",
"temp": "0.9.4",
@@ -0,0 +1,11 @@
<en-note>
<div>
<p>In Evernote a checklist is not the same as a list with checkboxes.</p>
<ul style="--en-todo:true;">
<li style="--en-checked:false;"><div>One</div></li>
<li style="--en-checked:true;"><div>Two</div>
</li><li style="--en-checked:false;"><div>Three</div></li>
</ul>
</div>
</en-note>
@@ -0,0 +1,19 @@
<en-note>
<div>
<p>In Evernote a checklist is not the same as a list with checkboxes.</p>
<ul style="--en-todo:true;">
<li style="--en-checked:false;">
<input type="checkbox" onclick="return false;">
<div>One</div>
</li>
<li style="--en-checked:true;">
<input checked="checked" type="checkbox" onclick="return false;">
<div>Two</div>
</li>
<li style="--en-checked:false;">
<input type="checkbox" onclick="return false;">
<div>Three</div>
</li>
</ul>
</div>
</en-note>
@@ -0,0 +1,7 @@
<ul style="--en-todo:true;">
<li style="--en-checked:false;"><div>One</div></li>
<li style="--en-checked:true;"><div>Two</div>
</li><li style="--en-checked:false;"><div>Three</div></li>
</ul>
<p>More text</p>
@@ -0,0 +1,7 @@
- [ ] One
- [X] Two
- [ ] Three
More text
@@ -13,17 +13,14 @@ import JoplinWindow from './JoplinWindow';
/**
* This is the main entry point to the Joplin API. You can access various services using the provided accessors.
*
* **This is a beta API**
* The API is now relatively stable and in general maintaining backward compatibility is a top priority, so you shouldn't except much breakages.
*
* Please note that the plugin API is relatively new and should be considered Beta state. Besides possible bugs, what it means is that there might be necessary breaking changes from one version to the next. Whenever such change is needed, best effort will be done to:
* If a breaking change ever becomes needed, best effort will be done to:
*
* - Maintain backward compatibility;
* - When possible, deprecate features instead of removing them;
* - Deprecate features instead of removing them, so as to give you time to fix the issue;
* - Document breaking changes in the changelog;
*
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code. There won't be any major API rewrite or architecture changes, but possibly small tweaks like function signature change, type change, etc.
*
* Eventually, the plugin API will be versioned to make this process smoother.
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code.
*/
export default class Joplin {
private data_;
@@ -15,7 +15,7 @@ import { Command } from './types';
*
* * [Main screen commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/MainScreen/commands)
* * [Global commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/commands)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/commands/editorCommandDeclarations.ts)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.ts)
*
* To view what arguments are supported, you can open any of these files
* and look at the `execute()` command.
@@ -49,7 +49,7 @@ import { Command } from './types';
*
*/
export default class JoplinCommands {
/**
/**
* <span class="platform-desktop">desktop</span> Executes the given
* command.
*
@@ -68,8 +68,8 @@ export default class JoplinCommands {
* await joplin.commands.execute('newFolder', "SOME_FOLDER_ID");
* ```
*/
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
* <span class="platform-desktop">desktop</span> Registers a new command.
*
* ```typescript
@@ -85,5 +85,5 @@ export default class JoplinCommands {
* });
* ```
*/
register(command: Command): Promise<void>;
register(command: Command): Promise<void>;
}
@@ -1,3 +1,4 @@
import { ModelType } from '../../../BaseModel';
import { Path } from './types';
/**
* This module provides access to the Joplin data API: https://joplinapp.org/api/references/rest_api/
@@ -44,4 +45,6 @@ export default class JoplinData {
post(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
put(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
delete(path: Path, query?: any): Promise<any>;
itemType(itemId: string): Promise<ModelType>;
resourcePath(resourceId: string): Promise<string>;
}
@@ -5,6 +5,6 @@
* so for now disable filters.
*/
export default class JoplinFilters {
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
}
@@ -12,6 +12,6 @@ import { ExportModule, ImportModule } from './types';
* You may also want to refer to the Joplin API documentation to see the list of properties for each item (note, notebook, etc.) - https://joplinapp.org/api/references/rest_api/
*/
export default class JoplinInterop {
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
}
@@ -6,7 +6,7 @@ export interface ChangeEvent {
*/
keys: string[];
}
export declare type ChangeHandler = (event: ChangeEvent)=> void;
export declare type ChangeHandler = (event: ChangeEvent) => void;
/**
* This API allows registering new settings and setting sections, as well as getting and setting settings. Once a setting has been registered it will appear in the config screen and be editable by the user.
*
@@ -61,8 +61,7 @@ export default class JoplinViewsDialogs {
open(handle: ViewHandle): Promise<DialogResult>;
/**
* Toggle on whether to fit the dialog size to the content or not.
* When set to false, the dialog stretches to fill the application
* window.
* When set to false, the dialog is set to 90vw and 80vh
* @default true
*/
setFitToContent(handle: ViewHandle, status: boolean): Promise<boolean>;
@@ -46,6 +46,23 @@ export default class JoplinViewsPanels {
*
*/
onMessage(handle: ViewHandle, callback: Function): Promise<void>;
/**
* Sends a message to the webview.
*
* The webview must have registered a message handler prior, otherwise the message is ignored. Use;
*
* ```javascript
* webviewApi.onMessage((message) => { ... });
* ```
*
* - `message` can be any JavaScript object, string or number
*
* The view API may have only one onMessage handler defined.
* This method is fire and forget so no response is returned.
*
* It is particularly useful when the webview needs to react to events emitted by the plugin or the joplin api.
*/
postMessage(handle: ViewHandle, message: any): void;
/**
* Shows the panel
*/
@@ -1,9 +1,13 @@
import { FolderEntity } from '../../database/types';
import { Disposable } from './types';
import { Disposable, MenuItem } from './types';
export interface EditContextMenuFilterObject {
items: MenuItem[];
}
declare type FilterHandler<T> = (object: T) => Promise<void>;
declare enum ItemChangeEventType {
Create = 1,
Update = 2,
Delete = 3,
Delete = 3
}
interface ItemChangeEvent {
id: string;
@@ -12,8 +16,12 @@ interface ItemChangeEvent {
interface SyncStartEvent {
withErrors: boolean;
}
declare type ItemChangeHandler = (event: ItemChangeEvent)=> void;
declare type SyncStartHandler = (event: SyncStartEvent)=> void;
interface ResourceChangeEvent {
id: string;
}
declare type ItemChangeHandler = (event: ItemChangeEvent) => void;
declare type SyncStartHandler = (event: SyncStartEvent) => void;
declare type ResourceChangeHandler = (event: ResourceChangeEvent) => void;
/**
* The workspace service provides access to all the parts of Joplin that
* are being worked on - i.e. the currently selected notes or notebooks as
@@ -38,6 +46,11 @@ export default class JoplinWorkspace {
* Called when the content of the current note changes.
*/
onNoteChange(handler: ItemChangeHandler): Promise<Disposable>;
/**
* Called when a resource is changed. Currently this handled will not be
* called when a resource is added or deleted.
*/
onResourceChange(handler: ResourceChangeHandler): Promise<void>;
/**
* Called when an alarm associated with a to-do is triggered.
*/
@@ -50,6 +63,11 @@ export default class JoplinWorkspace {
* Called when the synchronisation process has finished.
*/
onSyncComplete(callback: Function): Promise<Disposable>;
/**
* Called just before the editor context menu is about to open. Allows
* adding items to it.
*/
filterEditorContextMenu(handler: FilterHandler<EditContextMenuFilterObject>): void;
/**
* Gets the currently selected note
*/
@@ -202,6 +202,25 @@ export interface Disposable {
// dispose():void;
}
export enum ModelType {
Note = 1,
Folder = 2,
Setting = 3,
Resource = 4,
Tag = 5,
NoteTag = 6,
Search = 7,
Alarm = 8,
MasterKey = 9,
ItemChange = 10,
NoteResource = 11,
ResourceLocalState = 12,
Revision = 13,
Migration = 14,
SmartFilter = 15,
Command = 16,
}
// =================================================================
// Menu types
// =================================================================
@@ -269,6 +288,17 @@ export interface MenuItem {
*/
commandName?: string;
/**
* Arguments that should be passed to the command. They will be as rest
* parameters.
*/
commandArgs?: any[];
/**
* Set to "separator" to create a divider line
*/
type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio');
/**
* Accelerator associated with the menu item
*/
@@ -334,6 +364,12 @@ export enum SettingItemType {
Button = 6,
}
export enum SettingItemSubType {
FilePathAndArgs = 'file_path_and_args',
FilePath = 'file_path', // Not supported on mobile!
DirectoryPath = 'directory_path', // Not supported on mobile!
}
export enum AppType {
Desktop = 'desktop',
Mobile = 'mobile',
@@ -351,6 +387,12 @@ export interface SettingItem {
value: any;
type: SettingItemType;
/**
* Currently only used to display a file or directory selector. Always set
* `type` to `SettingItemType.String` when using this property.
*/
subType?: SettingItemSubType;
label: string;
description?: string;
@@ -14,15 +14,18 @@
"devDependencies": {
"@types/node": "^14.0.14",
"copy-webpack-plugin": "^6.1.0",
"fs-extra": "9.1.0",
"glob": "7.2.0",
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"on-build-webpack": "^0.1.0",
"tar": "6.1.11",
"tar": "^6.0.5",
"ts-loader": "^7.0.5",
"typescript": "^3.9.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"chalk": "4.1.2",
"yargs": "16.2.0"
}
}
"chalk": "^4.1.0",
"yargs": "^16.2.0"
},
"files": [
"publish"
]
}
@@ -29,6 +29,7 @@ const userConfig = Object.assign({}, {
const manifestPath = `${srcDir}/manifest.json`;
const packageJsonPath = `${rootDir}/package.json`;
const allPossibleCategories = ['appearance', 'developer tools', 'productivity', 'themes', 'integrations', 'viewer', 'search', 'tags', 'editor', 'files', 'personal knowledge management'];
const manifest = readManifest(manifestPath);
const pluginArchiveFilePath = path.resolve(publishDir, `${manifest.id}.jpl`);
const pluginInfoFilePath = path.resolve(publishDir, `${manifest.id}.json`);
@@ -67,10 +68,19 @@ function currentGitInfo() {
}
}
function validateCategories(categories) {
if (!categories) return null;
if ((categories.length !== new Set(categories).size)) throw new Error('Repeated categories are not allowed');
categories.forEach(category => {
if (!allPossibleCategories.includes(category)) throw new Error(`${category} is not a valid category. Please make sure that the category name is lowercase. Valid Categories are: \n${allPossibleCategories}\n`);
});
}
function readManifest(manifestPath) {
const content = fs.readFileSync(manifestPath, 'utf8');
const output = JSON.parse(content);
if (!output.id) throw new Error(`Manifest plugin ID is not set in ${manifestPath}`);
validateCategories(output.categories);
return output;
}
@@ -137,7 +147,7 @@ const pluginConfig = Object.assign({}, baseConfig, {
},
// JSON files can also be required from scripts so we include this.
// https://github.com/joplin/plugin-bibtex/pull/2
extensions: ['.tsx', '.ts', '.js', '.json'],
extensions: ['.js', '.tsx', '.ts', '.json'],
},
output: {
filename: 'index.js',
@@ -169,7 +179,7 @@ const extraScriptConfig = Object.assign({}, baseConfig, {
alias: {
api: path.resolve(__dirname, 'api'),
},
extensions: ['.tsx', '.ts', '.js', '.json'],
extensions: ['.js', '.tsx', '.ts', '.json'],
},
});
@@ -13,17 +13,14 @@ import JoplinWindow from './JoplinWindow';
/**
* This is the main entry point to the Joplin API. You can access various services using the provided accessors.
*
* **This is a beta API**
* The API is now relatively stable and in general maintaining backward compatibility is a top priority, so you shouldn't except much breakages.
*
* Please note that the plugin API is relatively new and should be considered Beta state. Besides possible bugs, what it means is that there might be necessary breaking changes from one version to the next. Whenever such change is needed, best effort will be done to:
* If a breaking change ever becomes needed, best effort will be done to:
*
* - Maintain backward compatibility;
* - When possible, deprecate features instead of removing them;
* - Deprecate features instead of removing them, so as to give you time to fix the issue;
* - Document breaking changes in the changelog;
*
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code. There won't be any major API rewrite or architecture changes, but possibly small tweaks like function signature change, type change, etc.
*
* Eventually, the plugin API will be versioned to make this process smoother.
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code.
*/
export default class Joplin {
private data_;
@@ -15,7 +15,7 @@ import { Command } from './types';
*
* * [Main screen commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/MainScreen/commands)
* * [Global commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/commands)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/commands/editorCommandDeclarations.ts)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.ts)
*
* To view what arguments are supported, you can open any of these files
* and look at the `execute()` command.
@@ -49,7 +49,7 @@ import { Command } from './types';
*
*/
export default class JoplinCommands {
/**
/**
* <span class="platform-desktop">desktop</span> Executes the given
* command.
*
@@ -68,8 +68,8 @@ export default class JoplinCommands {
* await joplin.commands.execute('newFolder', "SOME_FOLDER_ID");
* ```
*/
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
* <span class="platform-desktop">desktop</span> Registers a new command.
*
* ```typescript
@@ -85,5 +85,5 @@ export default class JoplinCommands {
* });
* ```
*/
register(command: Command): Promise<void>;
register(command: Command): Promise<void>;
}
@@ -1,3 +1,4 @@
import { ModelType } from '../../../BaseModel';
import { Path } from './types';
/**
* This module provides access to the Joplin data API: https://joplinapp.org/api/references/rest_api/
@@ -44,4 +45,6 @@ export default class JoplinData {
post(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
put(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
delete(path: Path, query?: any): Promise<any>;
itemType(itemId: string): Promise<ModelType>;
resourcePath(resourceId: string): Promise<string>;
}
@@ -5,6 +5,6 @@
* so for now disable filters.
*/
export default class JoplinFilters {
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
}
@@ -12,6 +12,6 @@ import { ExportModule, ImportModule } from './types';
* You may also want to refer to the Joplin API documentation to see the list of properties for each item (note, notebook, etc.) - https://joplinapp.org/api/references/rest_api/
*/
export default class JoplinInterop {
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
}
@@ -6,7 +6,7 @@ export interface ChangeEvent {
*/
keys: string[];
}
export declare type ChangeHandler = (event: ChangeEvent)=> void;
export declare type ChangeHandler = (event: ChangeEvent) => void;
/**
* This API allows registering new settings and setting sections, as well as getting and setting settings. Once a setting has been registered it will appear in the config screen and be editable by the user.
*
@@ -61,8 +61,7 @@ export default class JoplinViewsDialogs {
open(handle: ViewHandle): Promise<DialogResult>;
/**
* Toggle on whether to fit the dialog size to the content or not.
* When set to false, the dialog stretches to fill the application
* window.
* When set to false, the dialog is set to 90vw and 80vh
* @default true
*/
setFitToContent(handle: ViewHandle, status: boolean): Promise<boolean>;
@@ -46,6 +46,23 @@ export default class JoplinViewsPanels {
*
*/
onMessage(handle: ViewHandle, callback: Function): Promise<void>;
/**
* Sends a message to the webview.
*
* The webview must have registered a message handler prior, otherwise the message is ignored. Use;
*
* ```javascript
* webviewApi.onMessage((message) => { ... });
* ```
*
* - `message` can be any JavaScript object, string or number
*
* The view API may have only one onMessage handler defined.
* This method is fire and forget so no response is returned.
*
* It is particularly useful when the webview needs to react to events emitted by the plugin or the joplin api.
*/
postMessage(handle: ViewHandle, message: any): void;
/**
* Shows the panel
*/
@@ -1,9 +1,13 @@
import { FolderEntity } from '../../database/types';
import { Disposable } from './types';
import { Disposable, MenuItem } from './types';
export interface EditContextMenuFilterObject {
items: MenuItem[];
}
declare type FilterHandler<T> = (object: T) => Promise<void>;
declare enum ItemChangeEventType {
Create = 1,
Update = 2,
Delete = 3,
Delete = 3
}
interface ItemChangeEvent {
id: string;
@@ -12,8 +16,12 @@ interface ItemChangeEvent {
interface SyncStartEvent {
withErrors: boolean;
}
declare type ItemChangeHandler = (event: ItemChangeEvent)=> void;
declare type SyncStartHandler = (event: SyncStartEvent)=> void;
interface ResourceChangeEvent {
id: string;
}
declare type ItemChangeHandler = (event: ItemChangeEvent) => void;
declare type SyncStartHandler = (event: SyncStartEvent) => void;
declare type ResourceChangeHandler = (event: ResourceChangeEvent) => void;
/**
* The workspace service provides access to all the parts of Joplin that
* are being worked on - i.e. the currently selected notes or notebooks as
@@ -38,6 +46,11 @@ export default class JoplinWorkspace {
* Called when the content of the current note changes.
*/
onNoteChange(handler: ItemChangeHandler): Promise<Disposable>;
/**
* Called when a resource is changed. Currently this handled will not be
* called when a resource is added or deleted.
*/
onResourceChange(handler: ResourceChangeHandler): Promise<void>;
/**
* Called when an alarm associated with a to-do is triggered.
*/
@@ -50,6 +63,11 @@ export default class JoplinWorkspace {
* Called when the synchronisation process has finished.
*/
onSyncComplete(callback: Function): Promise<Disposable>;
/**
* Called just before the editor context menu is about to open. Allows
* adding items to it.
*/
filterEditorContextMenu(handler: FilterHandler<EditContextMenuFilterObject>): void;
/**
* Gets the currently selected note
*/
@@ -202,6 +202,25 @@ export interface Disposable {
// dispose():void;
}
export enum ModelType {
Note = 1,
Folder = 2,
Setting = 3,
Resource = 4,
Tag = 5,
NoteTag = 6,
Search = 7,
Alarm = 8,
MasterKey = 9,
ItemChange = 10,
NoteResource = 11,
ResourceLocalState = 12,
Revision = 13,
Migration = 14,
SmartFilter = 15,
Command = 16,
}
// =================================================================
// Menu types
// =================================================================
@@ -269,6 +288,17 @@ export interface MenuItem {
*/
commandName?: string;
/**
* Arguments that should be passed to the command. They will be as rest
* parameters.
*/
commandArgs?: any[];
/**
* Set to "separator" to create a divider line
*/
type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio');
/**
* Accelerator associated with the menu item
*/
@@ -334,6 +364,12 @@ export enum SettingItemType {
Button = 6,
}
export enum SettingItemSubType {
FilePathAndArgs = 'file_path_and_args',
FilePath = 'file_path', // Not supported on mobile!
DirectoryPath = 'directory_path', // Not supported on mobile!
}
export enum AppType {
Desktop = 'desktop',
Mobile = 'mobile',
@@ -351,6 +387,12 @@ export interface SettingItem {
value: any;
type: SettingItemType;
/**
* Currently only used to display a file or directory selector. Always set
* `type` to `SettingItemType.String` when using this property.
*/
subType?: SettingItemSubType;
label: string;
description?: string;
@@ -14,18 +14,21 @@
"devDependencies": {
"@types/node": "^14.0.14",
"copy-webpack-plugin": "^6.1.0",
"fs-extra": "9.1.0",
"glob": "7.2.0",
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"on-build-webpack": "^0.1.0",
"tar": "6.1.11",
"tar": "^6.0.5",
"ts-loader": "^7.0.5",
"typescript": "^3.9.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"chalk": "4.1.2",
"yargs": "16.2.0"
"chalk": "^4.1.0",
"yargs": "^16.2.0"
},
"dependencies": {
"left-pad": "1.3.0"
}
}
},
"files": [
"publish"
]
}
@@ -29,6 +29,7 @@ const userConfig = Object.assign({}, {
const manifestPath = `${srcDir}/manifest.json`;
const packageJsonPath = `${rootDir}/package.json`;
const allPossibleCategories = ['appearance', 'developer tools', 'productivity', 'themes', 'integrations', 'viewer', 'search', 'tags', 'editor', 'files', 'personal knowledge management'];
const manifest = readManifest(manifestPath);
const pluginArchiveFilePath = path.resolve(publishDir, `${manifest.id}.jpl`);
const pluginInfoFilePath = path.resolve(publishDir, `${manifest.id}.json`);
@@ -67,10 +68,19 @@ function currentGitInfo() {
}
}
function validateCategories(categories) {
if (!categories) return null;
if ((categories.length !== new Set(categories).size)) throw new Error('Repeated categories are not allowed');
categories.forEach(category => {
if (!allPossibleCategories.includes(category)) throw new Error(`${category} is not a valid category. Please make sure that the category name is lowercase. Valid Categories are: \n${allPossibleCategories}\n`);
});
}
function readManifest(manifestPath) {
const content = fs.readFileSync(manifestPath, 'utf8');
const output = JSON.parse(content);
if (!output.id) throw new Error(`Manifest plugin ID is not set in ${manifestPath}`);
validateCategories(output.categories);
return output;
}
@@ -137,7 +147,7 @@ const pluginConfig = Object.assign({}, baseConfig, {
},
// JSON files can also be required from scripts so we include this.
// https://github.com/joplin/plugin-bibtex/pull/2
extensions: ['.tsx', '.ts', '.js', '.json'],
extensions: ['.js', '.tsx', '.ts', '.json'],
},
output: {
filename: 'index.js',
@@ -169,7 +179,7 @@ const extraScriptConfig = Object.assign({}, baseConfig, {
alias: {
api: path.resolve(__dirname, 'api'),
},
extensions: ['.tsx', '.ts', '.js', '.json'],
extensions: ['.js', '.tsx', '.ts', '.json'],
},
});
@@ -13,17 +13,14 @@ import JoplinWindow from './JoplinWindow';
/**
* This is the main entry point to the Joplin API. You can access various services using the provided accessors.
*
* **This is a beta API**
* The API is now relatively stable and in general maintaining backward compatibility is a top priority, so you shouldn't except much breakages.
*
* Please note that the plugin API is relatively new and should be considered Beta state. Besides possible bugs, what it means is that there might be necessary breaking changes from one version to the next. Whenever such change is needed, best effort will be done to:
* If a breaking change ever becomes needed, best effort will be done to:
*
* - Maintain backward compatibility;
* - When possible, deprecate features instead of removing them;
* - Deprecate features instead of removing them, so as to give you time to fix the issue;
* - Document breaking changes in the changelog;
*
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code. There won't be any major API rewrite or architecture changes, but possibly small tweaks like function signature change, type change, etc.
*
* Eventually, the plugin API will be versioned to make this process smoother.
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code.
*/
export default class Joplin {
private data_;
@@ -15,7 +15,7 @@ import { Command } from './types';
*
* * [Main screen commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/MainScreen/commands)
* * [Global commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/commands)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/commands/editorCommandDeclarations.ts)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.ts)
*
* To view what arguments are supported, you can open any of these files
* and look at the `execute()` command.
@@ -49,7 +49,7 @@ import { Command } from './types';
*
*/
export default class JoplinCommands {
/**
/**
* <span class="platform-desktop">desktop</span> Executes the given
* command.
*
@@ -68,8 +68,8 @@ export default class JoplinCommands {
* await joplin.commands.execute('newFolder', "SOME_FOLDER_ID");
* ```
*/
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
* <span class="platform-desktop">desktop</span> Registers a new command.
*
* ```typescript
@@ -85,5 +85,5 @@ export default class JoplinCommands {
* });
* ```
*/
register(command: Command): Promise<void>;
register(command: Command): Promise<void>;
}
@@ -1,3 +1,4 @@
import { ModelType } from '../../../BaseModel';
import { Path } from './types';
/**
* This module provides access to the Joplin data API: https://joplinapp.org/api/references/rest_api/
@@ -44,4 +45,6 @@ export default class JoplinData {
post(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
put(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
delete(path: Path, query?: any): Promise<any>;
itemType(itemId: string): Promise<ModelType>;
resourcePath(resourceId: string): Promise<string>;
}
@@ -5,6 +5,6 @@
* so for now disable filters.
*/
export default class JoplinFilters {
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
}
@@ -12,6 +12,6 @@ import { ExportModule, ImportModule } from './types';
* You may also want to refer to the Joplin API documentation to see the list of properties for each item (note, notebook, etc.) - https://joplinapp.org/api/references/rest_api/
*/
export default class JoplinInterop {
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
}
@@ -6,7 +6,7 @@ export interface ChangeEvent {
*/
keys: string[];
}
export declare type ChangeHandler = (event: ChangeEvent)=> void;
export declare type ChangeHandler = (event: ChangeEvent) => void;
/**
* This API allows registering new settings and setting sections, as well as getting and setting settings. Once a setting has been registered it will appear in the config screen and be editable by the user.
*
@@ -61,8 +61,7 @@ export default class JoplinViewsDialogs {
open(handle: ViewHandle): Promise<DialogResult>;
/**
* Toggle on whether to fit the dialog size to the content or not.
* When set to false, the dialog stretches to fill the application
* window.
* When set to false, the dialog is set to 90vw and 80vh
* @default true
*/
setFitToContent(handle: ViewHandle, status: boolean): Promise<boolean>;
@@ -46,6 +46,23 @@ export default class JoplinViewsPanels {
*
*/
onMessage(handle: ViewHandle, callback: Function): Promise<void>;
/**
* Sends a message to the webview.
*
* The webview must have registered a message handler prior, otherwise the message is ignored. Use;
*
* ```javascript
* webviewApi.onMessage((message) => { ... });
* ```
*
* - `message` can be any JavaScript object, string or number
*
* The view API may have only one onMessage handler defined.
* This method is fire and forget so no response is returned.
*
* It is particularly useful when the webview needs to react to events emitted by the plugin or the joplin api.
*/
postMessage(handle: ViewHandle, message: any): void;
/**
* Shows the panel
*/
@@ -1,9 +1,13 @@
import { FolderEntity } from '../../database/types';
import { Disposable } from './types';
import { Disposable, MenuItem } from './types';
export interface EditContextMenuFilterObject {
items: MenuItem[];
}
declare type FilterHandler<T> = (object: T) => Promise<void>;
declare enum ItemChangeEventType {
Create = 1,
Update = 2,
Delete = 3,
Delete = 3
}
interface ItemChangeEvent {
id: string;
@@ -12,8 +16,12 @@ interface ItemChangeEvent {
interface SyncStartEvent {
withErrors: boolean;
}
declare type ItemChangeHandler = (event: ItemChangeEvent)=> void;
declare type SyncStartHandler = (event: SyncStartEvent)=> void;
interface ResourceChangeEvent {
id: string;
}
declare type ItemChangeHandler = (event: ItemChangeEvent) => void;
declare type SyncStartHandler = (event: SyncStartEvent) => void;
declare type ResourceChangeHandler = (event: ResourceChangeEvent) => void;
/**
* The workspace service provides access to all the parts of Joplin that
* are being worked on - i.e. the currently selected notes or notebooks as
@@ -38,6 +46,11 @@ export default class JoplinWorkspace {
* Called when the content of the current note changes.
*/
onNoteChange(handler: ItemChangeHandler): Promise<Disposable>;
/**
* Called when a resource is changed. Currently this handled will not be
* called when a resource is added or deleted.
*/
onResourceChange(handler: ResourceChangeHandler): Promise<void>;
/**
* Called when an alarm associated with a to-do is triggered.
*/
@@ -50,6 +63,11 @@ export default class JoplinWorkspace {
* Called when the synchronisation process has finished.
*/
onSyncComplete(callback: Function): Promise<Disposable>;
/**
* Called just before the editor context menu is about to open. Allows
* adding items to it.
*/
filterEditorContextMenu(handler: FilterHandler<EditContextMenuFilterObject>): void;
/**
* Gets the currently selected note
*/
@@ -202,6 +202,25 @@ export interface Disposable {
// dispose():void;
}
export enum ModelType {
Note = 1,
Folder = 2,
Setting = 3,
Resource = 4,
Tag = 5,
NoteTag = 6,
Search = 7,
Alarm = 8,
MasterKey = 9,
ItemChange = 10,
NoteResource = 11,
ResourceLocalState = 12,
Revision = 13,
Migration = 14,
SmartFilter = 15,
Command = 16,
}
// =================================================================
// Menu types
// =================================================================
@@ -269,6 +288,17 @@ export interface MenuItem {
*/
commandName?: string;
/**
* Arguments that should be passed to the command. They will be as rest
* parameters.
*/
commandArgs?: any[];
/**
* Set to "separator" to create a divider line
*/
type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio');
/**
* Accelerator associated with the menu item
*/
@@ -334,6 +364,12 @@ export enum SettingItemType {
Button = 6,
}
export enum SettingItemSubType {
FilePathAndArgs = 'file_path_and_args',
FilePath = 'file_path', // Not supported on mobile!
DirectoryPath = 'directory_path', // Not supported on mobile!
}
export enum AppType {
Desktop = 'desktop',
Mobile = 'mobile',
@@ -351,6 +387,12 @@ export interface SettingItem {
value: any;
type: SettingItemType;
/**
* Currently only used to display a file or directory selector. Always set
* `type` to `SettingItemType.String` when using this property.
*/
subType?: SettingItemSubType;
label: string;
description?: string;
@@ -14,15 +14,18 @@
"devDependencies": {
"@types/node": "^14.0.14",
"copy-webpack-plugin": "^6.1.0",
"fs-extra": "9.1.0",
"glob": "7.2.0",
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"on-build-webpack": "^0.1.0",
"tar": "6.1.11",
"tar": "^6.0.5",
"ts-loader": "^7.0.5",
"typescript": "^3.9.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"chalk": "4.1.2",
"yargs": "16.2.0"
}
}
"chalk": "^4.1.0",
"yargs": "^16.2.0"
},
"files": [
"publish"
]
}
@@ -29,6 +29,7 @@ const userConfig = Object.assign({}, {
const manifestPath = `${srcDir}/manifest.json`;
const packageJsonPath = `${rootDir}/package.json`;
const allPossibleCategories = ['appearance', 'developer tools', 'productivity', 'themes', 'integrations', 'viewer', 'search', 'tags', 'editor', 'files', 'personal knowledge management'];
const manifest = readManifest(manifestPath);
const pluginArchiveFilePath = path.resolve(publishDir, `${manifest.id}.jpl`);
const pluginInfoFilePath = path.resolve(publishDir, `${manifest.id}.json`);
@@ -67,10 +68,19 @@ function currentGitInfo() {
}
}
function validateCategories(categories) {
if (!categories) return null;
if ((categories.length !== new Set(categories).size)) throw new Error('Repeated categories are not allowed');
categories.forEach(category => {
if (!allPossibleCategories.includes(category)) throw new Error(`${category} is not a valid category. Please make sure that the category name is lowercase. Valid Categories are: \n${allPossibleCategories}\n`);
});
}
function readManifest(manifestPath) {
const content = fs.readFileSync(manifestPath, 'utf8');
const output = JSON.parse(content);
if (!output.id) throw new Error(`Manifest plugin ID is not set in ${manifestPath}`);
validateCategories(output.categories);
return output;
}
@@ -137,7 +147,7 @@ const pluginConfig = Object.assign({}, baseConfig, {
},
// JSON files can also be required from scripts so we include this.
// https://github.com/joplin/plugin-bibtex/pull/2
extensions: ['.tsx', '.ts', '.js', '.json'],
extensions: ['.js', '.tsx', '.ts', '.json'],
},
output: {
filename: 'index.js',
@@ -169,7 +179,7 @@ const extraScriptConfig = Object.assign({}, baseConfig, {
alias: {
api: path.resolve(__dirname, 'api'),
},
extensions: ['.tsx', '.ts', '.js', '.json'],
extensions: ['.js', '.tsx', '.ts', '.json'],
},
});
@@ -13,17 +13,14 @@ import JoplinWindow from './JoplinWindow';
/**
* This is the main entry point to the Joplin API. You can access various services using the provided accessors.
*
* **This is a beta API**
* The API is now relatively stable and in general maintaining backward compatibility is a top priority, so you shouldn't except much breakages.
*
* Please note that the plugin API is relatively new and should be considered Beta state. Besides possible bugs, what it means is that there might be necessary breaking changes from one version to the next. Whenever such change is needed, best effort will be done to:
* If a breaking change ever becomes needed, best effort will be done to:
*
* - Maintain backward compatibility;
* - When possible, deprecate features instead of removing them;
* - Deprecate features instead of removing them, so as to give you time to fix the issue;
* - Document breaking changes in the changelog;
*
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code. There won't be any major API rewrite or architecture changes, but possibly small tweaks like function signature change, type change, etc.
*
* Eventually, the plugin API will be versioned to make this process smoother.
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code.
*/
export default class Joplin {
private data_;
@@ -15,7 +15,7 @@ import { Command } from './types';
*
* * [Main screen commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/MainScreen/commands)
* * [Global commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/commands)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/commands/editorCommandDeclarations.ts)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.ts)
*
* To view what arguments are supported, you can open any of these files
* and look at the `execute()` command.
@@ -49,7 +49,7 @@ import { Command } from './types';
*
*/
export default class JoplinCommands {
/**
/**
* <span class="platform-desktop">desktop</span> Executes the given
* command.
*
@@ -68,8 +68,8 @@ export default class JoplinCommands {
* await joplin.commands.execute('newFolder', "SOME_FOLDER_ID");
* ```
*/
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
* <span class="platform-desktop">desktop</span> Registers a new command.
*
* ```typescript
@@ -85,5 +85,5 @@ export default class JoplinCommands {
* });
* ```
*/
register(command: Command): Promise<void>;
register(command: Command): Promise<void>;
}
@@ -1,3 +1,4 @@
import { ModelType } from '../../../BaseModel';
import { Path } from './types';
/**
* This module provides access to the Joplin data API: https://joplinapp.org/api/references/rest_api/
@@ -44,4 +45,6 @@ export default class JoplinData {
post(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
put(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
delete(path: Path, query?: any): Promise<any>;
itemType(itemId: string): Promise<ModelType>;
resourcePath(resourceId: string): Promise<string>;
}
@@ -5,6 +5,6 @@
* so for now disable filters.
*/
export default class JoplinFilters {
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
}
@@ -12,6 +12,6 @@ import { ExportModule, ImportModule } from './types';
* You may also want to refer to the Joplin API documentation to see the list of properties for each item (note, notebook, etc.) - https://joplinapp.org/api/references/rest_api/
*/
export default class JoplinInterop {
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
}
@@ -6,7 +6,7 @@ export interface ChangeEvent {
*/
keys: string[];
}
export declare type ChangeHandler = (event: ChangeEvent)=> void;
export declare type ChangeHandler = (event: ChangeEvent) => void;
/**
* This API allows registering new settings and setting sections, as well as getting and setting settings. Once a setting has been registered it will appear in the config screen and be editable by the user.
*
@@ -61,8 +61,7 @@ export default class JoplinViewsDialogs {
open(handle: ViewHandle): Promise<DialogResult>;
/**
* Toggle on whether to fit the dialog size to the content or not.
* When set to false, the dialog stretches to fill the application
* window.
* When set to false, the dialog is set to 90vw and 80vh
* @default true
*/
setFitToContent(handle: ViewHandle, status: boolean): Promise<boolean>;
@@ -46,6 +46,23 @@ export default class JoplinViewsPanels {
*
*/
onMessage(handle: ViewHandle, callback: Function): Promise<void>;
/**
* Sends a message to the webview.
*
* The webview must have registered a message handler prior, otherwise the message is ignored. Use;
*
* ```javascript
* webviewApi.onMessage((message) => { ... });
* ```
*
* - `message` can be any JavaScript object, string or number
*
* The view API may have only one onMessage handler defined.
* This method is fire and forget so no response is returned.
*
* It is particularly useful when the webview needs to react to events emitted by the plugin or the joplin api.
*/
postMessage(handle: ViewHandle, message: any): void;
/**
* Shows the panel
*/
@@ -1,9 +1,13 @@
import { FolderEntity } from '../../database/types';
import { Disposable } from './types';
import { Disposable, MenuItem } from './types';
export interface EditContextMenuFilterObject {
items: MenuItem[];
}
declare type FilterHandler<T> = (object: T) => Promise<void>;
declare enum ItemChangeEventType {
Create = 1,
Update = 2,
Delete = 3,
Delete = 3
}
interface ItemChangeEvent {
id: string;
@@ -12,8 +16,12 @@ interface ItemChangeEvent {
interface SyncStartEvent {
withErrors: boolean;
}
declare type ItemChangeHandler = (event: ItemChangeEvent)=> void;
declare type SyncStartHandler = (event: SyncStartEvent)=> void;
interface ResourceChangeEvent {
id: string;
}
declare type ItemChangeHandler = (event: ItemChangeEvent) => void;
declare type SyncStartHandler = (event: SyncStartEvent) => void;
declare type ResourceChangeHandler = (event: ResourceChangeEvent) => void;
/**
* The workspace service provides access to all the parts of Joplin that
* are being worked on - i.e. the currently selected notes or notebooks as
@@ -38,6 +46,11 @@ export default class JoplinWorkspace {
* Called when the content of the current note changes.
*/
onNoteChange(handler: ItemChangeHandler): Promise<Disposable>;
/**
* Called when a resource is changed. Currently this handled will not be
* called when a resource is added or deleted.
*/
onResourceChange(handler: ResourceChangeHandler): Promise<void>;
/**
* Called when an alarm associated with a to-do is triggered.
*/
@@ -50,6 +63,11 @@ export default class JoplinWorkspace {
* Called when the synchronisation process has finished.
*/
onSyncComplete(callback: Function): Promise<Disposable>;
/**
* Called just before the editor context menu is about to open. Allows
* adding items to it.
*/
filterEditorContextMenu(handler: FilterHandler<EditContextMenuFilterObject>): void;
/**
* Gets the currently selected note
*/
@@ -202,6 +202,25 @@ export interface Disposable {
// dispose():void;
}
export enum ModelType {
Note = 1,
Folder = 2,
Setting = 3,
Resource = 4,
Tag = 5,
NoteTag = 6,
Search = 7,
Alarm = 8,
MasterKey = 9,
ItemChange = 10,
NoteResource = 11,
ResourceLocalState = 12,
Revision = 13,
Migration = 14,
SmartFilter = 15,
Command = 16,
}
// =================================================================
// Menu types
// =================================================================
@@ -269,6 +288,17 @@ export interface MenuItem {
*/
commandName?: string;
/**
* Arguments that should be passed to the command. They will be as rest
* parameters.
*/
commandArgs?: any[];
/**
* Set to "separator" to create a divider line
*/
type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio');
/**
* Accelerator associated with the menu item
*/
@@ -334,6 +364,12 @@ export enum SettingItemType {
Button = 6,
}
export enum SettingItemSubType {
FilePathAndArgs = 'file_path_and_args',
FilePath = 'file_path', // Not supported on mobile!
DirectoryPath = 'directory_path', // Not supported on mobile!
}
export enum AppType {
Desktop = 'desktop',
Mobile = 'mobile',
@@ -351,6 +387,12 @@ export interface SettingItem {
value: any;
type: SettingItemType;
/**
* Currently only used to display a file or directory selector. Always set
* `type` to `SettingItemType.String` when using this property.
*/
subType?: SettingItemSubType;
label: string;
description?: string;
@@ -14,15 +14,18 @@
"devDependencies": {
"@types/node": "^14.0.14",
"copy-webpack-plugin": "^6.1.0",
"fs-extra": "9.1.0",
"glob": "7.2.0",
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"on-build-webpack": "^0.1.0",
"tar": "6.1.11",
"tar": "^6.0.5",
"ts-loader": "^7.0.5",
"typescript": "^3.9.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"chalk": "4.1.2",
"yargs": "16.2.0"
}
}
"chalk": "^4.1.0",
"yargs": "^16.2.0"
},
"files": [
"publish"
]
}
@@ -29,6 +29,7 @@ const userConfig = Object.assign({}, {
const manifestPath = `${srcDir}/manifest.json`;
const packageJsonPath = `${rootDir}/package.json`;
const allPossibleCategories = ['appearance', 'developer tools', 'productivity', 'themes', 'integrations', 'viewer', 'search', 'tags', 'editor', 'files', 'personal knowledge management'];
const manifest = readManifest(manifestPath);
const pluginArchiveFilePath = path.resolve(publishDir, `${manifest.id}.jpl`);
const pluginInfoFilePath = path.resolve(publishDir, `${manifest.id}.json`);
@@ -67,10 +68,19 @@ function currentGitInfo() {
}
}
function validateCategories(categories) {
if (!categories) return null;
if ((categories.length !== new Set(categories).size)) throw new Error('Repeated categories are not allowed');
categories.forEach(category => {
if (!allPossibleCategories.includes(category)) throw new Error(`${category} is not a valid category. Please make sure that the category name is lowercase. Valid Categories are: \n${allPossibleCategories}\n`);
});
}
function readManifest(manifestPath) {
const content = fs.readFileSync(manifestPath, 'utf8');
const output = JSON.parse(content);
if (!output.id) throw new Error(`Manifest plugin ID is not set in ${manifestPath}`);
validateCategories(output.categories);
return output;
}
@@ -137,7 +147,7 @@ const pluginConfig = Object.assign({}, baseConfig, {
},
// JSON files can also be required from scripts so we include this.
// https://github.com/joplin/plugin-bibtex/pull/2
extensions: ['.tsx', '.ts', '.js', '.json'],
extensions: ['.js', '.tsx', '.ts', '.json'],
},
output: {
filename: 'index.js',
@@ -169,7 +179,7 @@ const extraScriptConfig = Object.assign({}, baseConfig, {
alias: {
api: path.resolve(__dirname, 'api'),
},
extensions: ['.tsx', '.ts', '.js', '.json'],
extensions: ['.js', '.tsx', '.ts', '.json'],
},
});
@@ -13,17 +13,14 @@ import JoplinWindow from './JoplinWindow';
/**
* This is the main entry point to the Joplin API. You can access various services using the provided accessors.
*
* **This is a beta API**
* The API is now relatively stable and in general maintaining backward compatibility is a top priority, so you shouldn't except much breakages.
*
* Please note that the plugin API is relatively new and should be considered Beta state. Besides possible bugs, what it means is that there might be necessary breaking changes from one version to the next. Whenever such change is needed, best effort will be done to:
* If a breaking change ever becomes needed, best effort will be done to:
*
* - Maintain backward compatibility;
* - When possible, deprecate features instead of removing them;
* - Deprecate features instead of removing them, so as to give you time to fix the issue;
* - Document breaking changes in the changelog;
*
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code. There won't be any major API rewrite or architecture changes, but possibly small tweaks like function signature change, type change, etc.
*
* Eventually, the plugin API will be versioned to make this process smoother.
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code.
*/
export default class Joplin {
private data_;
@@ -15,7 +15,7 @@ import { Command } from './types';
*
* * [Main screen commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/MainScreen/commands)
* * [Global commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/commands)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/commands/editorCommandDeclarations.ts)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.ts)
*
* To view what arguments are supported, you can open any of these files
* and look at the `execute()` command.
@@ -49,7 +49,7 @@ import { Command } from './types';
*
*/
export default class JoplinCommands {
/**
/**
* <span class="platform-desktop">desktop</span> Executes the given
* command.
*
@@ -68,8 +68,8 @@ export default class JoplinCommands {
* await joplin.commands.execute('newFolder', "SOME_FOLDER_ID");
* ```
*/
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
* <span class="platform-desktop">desktop</span> Registers a new command.
*
* ```typescript
@@ -85,5 +85,5 @@ export default class JoplinCommands {
* });
* ```
*/
register(command: Command): Promise<void>;
register(command: Command): Promise<void>;
}
@@ -1,3 +1,4 @@
import { ModelType } from '../../../BaseModel';
import { Path } from './types';
/**
* This module provides access to the Joplin data API: https://joplinapp.org/api/references/rest_api/
@@ -44,4 +45,6 @@ export default class JoplinData {
post(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
put(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
delete(path: Path, query?: any): Promise<any>;
itemType(itemId: string): Promise<ModelType>;
resourcePath(resourceId: string): Promise<string>;
}
@@ -5,6 +5,6 @@
* so for now disable filters.
*/
export default class JoplinFilters {
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
}
@@ -12,6 +12,6 @@ import { ExportModule, ImportModule } from './types';
* You may also want to refer to the Joplin API documentation to see the list of properties for each item (note, notebook, etc.) - https://joplinapp.org/api/references/rest_api/
*/
export default class JoplinInterop {
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
}
@@ -6,7 +6,7 @@ export interface ChangeEvent {
*/
keys: string[];
}
export declare type ChangeHandler = (event: ChangeEvent)=> void;
export declare type ChangeHandler = (event: ChangeEvent) => void;
/**
* This API allows registering new settings and setting sections, as well as getting and setting settings. Once a setting has been registered it will appear in the config screen and be editable by the user.
*
@@ -61,8 +61,7 @@ export default class JoplinViewsDialogs {
open(handle: ViewHandle): Promise<DialogResult>;
/**
* Toggle on whether to fit the dialog size to the content or not.
* When set to false, the dialog stretches to fill the application
* window.
* When set to false, the dialog is set to 90vw and 80vh
* @default true
*/
setFitToContent(handle: ViewHandle, status: boolean): Promise<boolean>;
@@ -46,6 +46,23 @@ export default class JoplinViewsPanels {
*
*/
onMessage(handle: ViewHandle, callback: Function): Promise<void>;
/**
* Sends a message to the webview.
*
* The webview must have registered a message handler prior, otherwise the message is ignored. Use;
*
* ```javascript
* webviewApi.onMessage((message) => { ... });
* ```
*
* - `message` can be any JavaScript object, string or number
*
* The view API may have only one onMessage handler defined.
* This method is fire and forget so no response is returned.
*
* It is particularly useful when the webview needs to react to events emitted by the plugin or the joplin api.
*/
postMessage(handle: ViewHandle, message: any): void;
/**
* Shows the panel
*/
@@ -1,9 +1,13 @@
import { FolderEntity } from '../../database/types';
import { Disposable } from './types';
import { Disposable, MenuItem } from './types';
export interface EditContextMenuFilterObject {
items: MenuItem[];
}
declare type FilterHandler<T> = (object: T) => Promise<void>;
declare enum ItemChangeEventType {
Create = 1,
Update = 2,
Delete = 3,
Delete = 3
}
interface ItemChangeEvent {
id: string;
@@ -12,8 +16,12 @@ interface ItemChangeEvent {
interface SyncStartEvent {
withErrors: boolean;
}
declare type ItemChangeHandler = (event: ItemChangeEvent)=> void;
declare type SyncStartHandler = (event: SyncStartEvent)=> void;
interface ResourceChangeEvent {
id: string;
}
declare type ItemChangeHandler = (event: ItemChangeEvent) => void;
declare type SyncStartHandler = (event: SyncStartEvent) => void;
declare type ResourceChangeHandler = (event: ResourceChangeEvent) => void;
/**
* The workspace service provides access to all the parts of Joplin that
* are being worked on - i.e. the currently selected notes or notebooks as
@@ -38,6 +46,11 @@ export default class JoplinWorkspace {
* Called when the content of the current note changes.
*/
onNoteChange(handler: ItemChangeHandler): Promise<Disposable>;
/**
* Called when a resource is changed. Currently this handled will not be
* called when a resource is added or deleted.
*/
onResourceChange(handler: ResourceChangeHandler): Promise<void>;
/**
* Called when an alarm associated with a to-do is triggered.
*/
@@ -50,6 +63,11 @@ export default class JoplinWorkspace {
* Called when the synchronisation process has finished.
*/
onSyncComplete(callback: Function): Promise<Disposable>;
/**
* Called just before the editor context menu is about to open. Allows
* adding items to it.
*/
filterEditorContextMenu(handler: FilterHandler<EditContextMenuFilterObject>): void;
/**
* Gets the currently selected note
*/
@@ -202,6 +202,25 @@ export interface Disposable {
// dispose():void;
}
export enum ModelType {
Note = 1,
Folder = 2,
Setting = 3,
Resource = 4,
Tag = 5,
NoteTag = 6,
Search = 7,
Alarm = 8,
MasterKey = 9,
ItemChange = 10,
NoteResource = 11,
ResourceLocalState = 12,
Revision = 13,
Migration = 14,
SmartFilter = 15,
Command = 16,
}
// =================================================================
// Menu types
// =================================================================
@@ -269,6 +288,17 @@ export interface MenuItem {
*/
commandName?: string;
/**
* Arguments that should be passed to the command. They will be as rest
* parameters.
*/
commandArgs?: any[];
/**
* Set to "separator" to create a divider line
*/
type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio');
/**
* Accelerator associated with the menu item
*/
@@ -334,6 +364,12 @@ export enum SettingItemType {
Button = 6,
}
export enum SettingItemSubType {
FilePathAndArgs = 'file_path_and_args',
FilePath = 'file_path', // Not supported on mobile!
DirectoryPath = 'directory_path', // Not supported on mobile!
}
export enum AppType {
Desktop = 'desktop',
Mobile = 'mobile',
@@ -351,6 +387,12 @@ export interface SettingItem {
value: any;
type: SettingItemType;
/**
* Currently only used to display a file or directory selector. Always set
* `type` to `SettingItemType.String` when using this property.
*/
subType?: SettingItemSubType;
label: string;
description?: string;
@@ -14,15 +14,18 @@
"devDependencies": {
"@types/node": "^14.0.14",
"copy-webpack-plugin": "^6.1.0",
"fs-extra": "9.1.0",
"glob": "7.2.0",
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"on-build-webpack": "^0.1.0",
"tar": "6.1.11",
"tar": "^6.0.5",
"ts-loader": "^7.0.5",
"typescript": "^3.9.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"chalk": "4.1.2",
"yargs": "16.2.0"
}
}
"chalk": "^4.1.0",
"yargs": "^16.2.0"
},
"files": [
"publish"
]
}
@@ -29,6 +29,7 @@ const userConfig = Object.assign({}, {
const manifestPath = `${srcDir}/manifest.json`;
const packageJsonPath = `${rootDir}/package.json`;
const allPossibleCategories = ['appearance', 'developer tools', 'productivity', 'themes', 'integrations', 'viewer', 'search', 'tags', 'editor', 'files', 'personal knowledge management'];
const manifest = readManifest(manifestPath);
const pluginArchiveFilePath = path.resolve(publishDir, `${manifest.id}.jpl`);
const pluginInfoFilePath = path.resolve(publishDir, `${manifest.id}.json`);
@@ -67,10 +68,19 @@ function currentGitInfo() {
}
}
function validateCategories(categories) {
if (!categories) return null;
if ((categories.length !== new Set(categories).size)) throw new Error('Repeated categories are not allowed');
categories.forEach(category => {
if (!allPossibleCategories.includes(category)) throw new Error(`${category} is not a valid category. Please make sure that the category name is lowercase. Valid Categories are: \n${allPossibleCategories}\n`);
});
}
function readManifest(manifestPath) {
const content = fs.readFileSync(manifestPath, 'utf8');
const output = JSON.parse(content);
if (!output.id) throw new Error(`Manifest plugin ID is not set in ${manifestPath}`);
validateCategories(output.categories);
return output;
}
@@ -137,7 +147,7 @@ const pluginConfig = Object.assign({}, baseConfig, {
},
// JSON files can also be required from scripts so we include this.
// https://github.com/joplin/plugin-bibtex/pull/2
extensions: ['.tsx', '.ts', '.js', '.json'],
extensions: ['.js', '.tsx', '.ts', '.json'],
},
output: {
filename: 'index.js',
@@ -169,7 +179,7 @@ const extraScriptConfig = Object.assign({}, baseConfig, {
alias: {
api: path.resolve(__dirname, 'api'),
},
extensions: ['.tsx', '.ts', '.js', '.json'],
extensions: ['.js', '.tsx', '.ts', '.json'],
},
});
@@ -13,17 +13,14 @@ import JoplinWindow from './JoplinWindow';
/**
* This is the main entry point to the Joplin API. You can access various services using the provided accessors.
*
* **This is a beta API**
* The API is now relatively stable and in general maintaining backward compatibility is a top priority, so you shouldn't except much breakages.
*
* Please note that the plugin API is relatively new and should be considered Beta state. Besides possible bugs, what it means is that there might be necessary breaking changes from one version to the next. Whenever such change is needed, best effort will be done to:
* If a breaking change ever becomes needed, best effort will be done to:
*
* - Maintain backward compatibility;
* - When possible, deprecate features instead of removing them;
* - Deprecate features instead of removing them, so as to give you time to fix the issue;
* - Document breaking changes in the changelog;
*
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code. There won't be any major API rewrite or architecture changes, but possibly small tweaks like function signature change, type change, etc.
*
* Eventually, the plugin API will be versioned to make this process smoother.
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code.
*/
export default class Joplin {
private data_;
@@ -15,7 +15,7 @@ import { Command } from './types';
*
* * [Main screen commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/MainScreen/commands)
* * [Global commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/commands)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/commands/editorCommandDeclarations.ts)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.ts)
*
* To view what arguments are supported, you can open any of these files
* and look at the `execute()` command.
@@ -49,7 +49,7 @@ import { Command } from './types';
*
*/
export default class JoplinCommands {
/**
/**
* <span class="platform-desktop">desktop</span> Executes the given
* command.
*
@@ -68,8 +68,8 @@ export default class JoplinCommands {
* await joplin.commands.execute('newFolder', "SOME_FOLDER_ID");
* ```
*/
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
* <span class="platform-desktop">desktop</span> Registers a new command.
*
* ```typescript
@@ -85,5 +85,5 @@ export default class JoplinCommands {
* });
* ```
*/
register(command: Command): Promise<void>;
register(command: Command): Promise<void>;
}
@@ -1,3 +1,4 @@
import { ModelType } from '../../../BaseModel';
import { Path } from './types';
/**
* This module provides access to the Joplin data API: https://joplinapp.org/api/references/rest_api/
@@ -44,4 +45,6 @@ export default class JoplinData {
post(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
put(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
delete(path: Path, query?: any): Promise<any>;
itemType(itemId: string): Promise<ModelType>;
resourcePath(resourceId: string): Promise<string>;
}
@@ -5,6 +5,6 @@
* so for now disable filters.
*/
export default class JoplinFilters {
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
}
@@ -12,6 +12,6 @@ import { ExportModule, ImportModule } from './types';
* You may also want to refer to the Joplin API documentation to see the list of properties for each item (note, notebook, etc.) - https://joplinapp.org/api/references/rest_api/
*/
export default class JoplinInterop {
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
}
@@ -6,7 +6,7 @@ export interface ChangeEvent {
*/
keys: string[];
}
export declare type ChangeHandler = (event: ChangeEvent)=> void;
export declare type ChangeHandler = (event: ChangeEvent) => void;
/**
* This API allows registering new settings and setting sections, as well as getting and setting settings. Once a setting has been registered it will appear in the config screen and be editable by the user.
*
@@ -61,8 +61,7 @@ export default class JoplinViewsDialogs {
open(handle: ViewHandle): Promise<DialogResult>;
/**
* Toggle on whether to fit the dialog size to the content or not.
* When set to false, the dialog stretches to fill the application
* window.
* When set to false, the dialog is set to 90vw and 80vh
* @default true
*/
setFitToContent(handle: ViewHandle, status: boolean): Promise<boolean>;
@@ -46,6 +46,23 @@ export default class JoplinViewsPanels {
*
*/
onMessage(handle: ViewHandle, callback: Function): Promise<void>;
/**
* Sends a message to the webview.
*
* The webview must have registered a message handler prior, otherwise the message is ignored. Use;
*
* ```javascript
* webviewApi.onMessage((message) => { ... });
* ```
*
* - `message` can be any JavaScript object, string or number
*
* The view API may have only one onMessage handler defined.
* This method is fire and forget so no response is returned.
*
* It is particularly useful when the webview needs to react to events emitted by the plugin or the joplin api.
*/
postMessage(handle: ViewHandle, message: any): void;
/**
* Shows the panel
*/
@@ -1,9 +1,13 @@
import { FolderEntity } from '../../database/types';
import { Disposable } from './types';
import { Disposable, MenuItem } from './types';
export interface EditContextMenuFilterObject {
items: MenuItem[];
}
declare type FilterHandler<T> = (object: T) => Promise<void>;
declare enum ItemChangeEventType {
Create = 1,
Update = 2,
Delete = 3,
Delete = 3
}
interface ItemChangeEvent {
id: string;
@@ -12,8 +16,12 @@ interface ItemChangeEvent {
interface SyncStartEvent {
withErrors: boolean;
}
declare type ItemChangeHandler = (event: ItemChangeEvent)=> void;
declare type SyncStartHandler = (event: SyncStartEvent)=> void;
interface ResourceChangeEvent {
id: string;
}
declare type ItemChangeHandler = (event: ItemChangeEvent) => void;
declare type SyncStartHandler = (event: SyncStartEvent) => void;
declare type ResourceChangeHandler = (event: ResourceChangeEvent) => void;
/**
* The workspace service provides access to all the parts of Joplin that
* are being worked on - i.e. the currently selected notes or notebooks as
@@ -38,6 +46,11 @@ export default class JoplinWorkspace {
* Called when the content of the current note changes.
*/
onNoteChange(handler: ItemChangeHandler): Promise<Disposable>;
/**
* Called when a resource is changed. Currently this handled will not be
* called when a resource is added or deleted.
*/
onResourceChange(handler: ResourceChangeHandler): Promise<void>;
/**
* Called when an alarm associated with a to-do is triggered.
*/
@@ -50,6 +63,11 @@ export default class JoplinWorkspace {
* Called when the synchronisation process has finished.
*/
onSyncComplete(callback: Function): Promise<Disposable>;
/**
* Called just before the editor context menu is about to open. Allows
* adding items to it.
*/
filterEditorContextMenu(handler: FilterHandler<EditContextMenuFilterObject>): void;
/**
* Gets the currently selected note
*/
@@ -202,6 +202,25 @@ export interface Disposable {
// dispose():void;
}
export enum ModelType {
Note = 1,
Folder = 2,
Setting = 3,
Resource = 4,
Tag = 5,
NoteTag = 6,
Search = 7,
Alarm = 8,
MasterKey = 9,
ItemChange = 10,
NoteResource = 11,
ResourceLocalState = 12,
Revision = 13,
Migration = 14,
SmartFilter = 15,
Command = 16,
}
// =================================================================
// Menu types
// =================================================================
@@ -269,6 +288,17 @@ export interface MenuItem {
*/
commandName?: string;
/**
* Arguments that should be passed to the command. They will be as rest
* parameters.
*/
commandArgs?: any[];
/**
* Set to "separator" to create a divider line
*/
type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio');
/**
* Accelerator associated with the menu item
*/
@@ -334,6 +364,12 @@ export enum SettingItemType {
Button = 6,
}
export enum SettingItemSubType {
FilePathAndArgs = 'file_path_and_args',
FilePath = 'file_path', // Not supported on mobile!
DirectoryPath = 'directory_path', // Not supported on mobile!
}
export enum AppType {
Desktop = 'desktop',
Mobile = 'mobile',
@@ -351,6 +387,12 @@ export interface SettingItem {
value: any;
type: SettingItemType;
/**
* Currently only used to display a file or directory selector. Always set
* `type` to `SettingItemType.String` when using this property.
*/
subType?: SettingItemSubType;
label: string;
description?: string;
@@ -12,16 +12,19 @@
],
"devDependencies": {
"@types/node": "^14.0.14",
"chalk": "4.1.2",
"chalk": "^4.1.0",
"copy-webpack-plugin": "^6.1.0",
"fs-extra": "9.1.0",
"glob": "7.2.0",
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"on-build-webpack": "^0.1.0",
"tar": "6.1.11",
"tar": "^6.0.5",
"ts-loader": "^7.0.5",
"typescript": "^3.9.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"yargs": "16.2.0"
}
}
"yargs": "^16.2.0"
},
"files": [
"publish"
]
}
@@ -29,6 +29,7 @@ const userConfig = Object.assign({}, {
const manifestPath = `${srcDir}/manifest.json`;
const packageJsonPath = `${rootDir}/package.json`;
const allPossibleCategories = ['appearance', 'developer tools', 'productivity', 'themes', 'integrations', 'viewer', 'search', 'tags', 'editor', 'files', 'personal knowledge management'];
const manifest = readManifest(manifestPath);
const pluginArchiveFilePath = path.resolve(publishDir, `${manifest.id}.jpl`);
const pluginInfoFilePath = path.resolve(publishDir, `${manifest.id}.json`);
@@ -67,10 +68,19 @@ function currentGitInfo() {
}
}
function validateCategories(categories) {
if (!categories) return null;
if ((categories.length !== new Set(categories).size)) throw new Error('Repeated categories are not allowed');
categories.forEach(category => {
if (!allPossibleCategories.includes(category)) throw new Error(`${category} is not a valid category. Please make sure that the category name is lowercase. Valid Categories are: \n${allPossibleCategories}\n`);
});
}
function readManifest(manifestPath) {
const content = fs.readFileSync(manifestPath, 'utf8');
const output = JSON.parse(content);
if (!output.id) throw new Error(`Manifest plugin ID is not set in ${manifestPath}`);
validateCategories(output.categories);
return output;
}
@@ -137,7 +147,7 @@ const pluginConfig = Object.assign({}, baseConfig, {
},
// JSON files can also be required from scripts so we include this.
// https://github.com/joplin/plugin-bibtex/pull/2
extensions: ['.tsx', '.ts', '.js', '.json'],
extensions: ['.js', '.tsx', '.ts', '.json'],
},
output: {
filename: 'index.js',
@@ -169,7 +179,7 @@ const extraScriptConfig = Object.assign({}, baseConfig, {
alias: {
api: path.resolve(__dirname, 'api'),
},
extensions: ['.tsx', '.ts', '.js', '.json'],
extensions: ['.js', '.tsx', '.ts', '.json'],
},
});
@@ -13,17 +13,14 @@ import JoplinWindow from './JoplinWindow';
/**
* This is the main entry point to the Joplin API. You can access various services using the provided accessors.
*
* **This is a beta API**
* The API is now relatively stable and in general maintaining backward compatibility is a top priority, so you shouldn't except much breakages.
*
* Please note that the plugin API is relatively new and should be considered Beta state. Besides possible bugs, what it means is that there might be necessary breaking changes from one version to the next. Whenever such change is needed, best effort will be done to:
* If a breaking change ever becomes needed, best effort will be done to:
*
* - Maintain backward compatibility;
* - When possible, deprecate features instead of removing them;
* - Deprecate features instead of removing them, so as to give you time to fix the issue;
* - Document breaking changes in the changelog;
*
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code. There won't be any major API rewrite or architecture changes, but possibly small tweaks like function signature change, type change, etc.
*
* Eventually, the plugin API will be versioned to make this process smoother.
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code.
*/
export default class Joplin {
private data_;
@@ -15,7 +15,7 @@ import { Command } from './types';
*
* * [Main screen commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/MainScreen/commands)
* * [Global commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/commands)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/commands/editorCommandDeclarations.ts)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.ts)
*
* To view what arguments are supported, you can open any of these files
* and look at the `execute()` command.
@@ -49,7 +49,7 @@ import { Command } from './types';
*
*/
export default class JoplinCommands {
/**
/**
* <span class="platform-desktop">desktop</span> Executes the given
* command.
*
@@ -68,8 +68,8 @@ export default class JoplinCommands {
* await joplin.commands.execute('newFolder', "SOME_FOLDER_ID");
* ```
*/
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
* <span class="platform-desktop">desktop</span> Registers a new command.
*
* ```typescript
@@ -85,5 +85,5 @@ export default class JoplinCommands {
* });
* ```
*/
register(command: Command): Promise<void>;
register(command: Command): Promise<void>;
}
@@ -1,3 +1,4 @@
import { ModelType } from '../../../BaseModel';
import { Path } from './types';
/**
* This module provides access to the Joplin data API: https://joplinapp.org/api/references/rest_api/
@@ -44,4 +45,6 @@ export default class JoplinData {
post(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
put(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
delete(path: Path, query?: any): Promise<any>;
itemType(itemId: string): Promise<ModelType>;
resourcePath(resourceId: string): Promise<string>;
}
@@ -5,6 +5,6 @@
* so for now disable filters.
*/
export default class JoplinFilters {
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
}
@@ -12,6 +12,6 @@ import { ExportModule, ImportModule } from './types';
* You may also want to refer to the Joplin API documentation to see the list of properties for each item (note, notebook, etc.) - https://joplinapp.org/api/references/rest_api/
*/
export default class JoplinInterop {
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
}
@@ -6,7 +6,7 @@ export interface ChangeEvent {
*/
keys: string[];
}
export declare type ChangeHandler = (event: ChangeEvent)=> void;
export declare type ChangeHandler = (event: ChangeEvent) => void;
/**
* This API allows registering new settings and setting sections, as well as getting and setting settings. Once a setting has been registered it will appear in the config screen and be editable by the user.
*
@@ -61,8 +61,7 @@ export default class JoplinViewsDialogs {
open(handle: ViewHandle): Promise<DialogResult>;
/**
* Toggle on whether to fit the dialog size to the content or not.
* When set to false, the dialog stretches to fill the application
* window.
* When set to false, the dialog is set to 90vw and 80vh
* @default true
*/
setFitToContent(handle: ViewHandle, status: boolean): Promise<boolean>;
@@ -46,6 +46,23 @@ export default class JoplinViewsPanels {
*
*/
onMessage(handle: ViewHandle, callback: Function): Promise<void>;
/**
* Sends a message to the webview.
*
* The webview must have registered a message handler prior, otherwise the message is ignored. Use;
*
* ```javascript
* webviewApi.onMessage((message) => { ... });
* ```
*
* - `message` can be any JavaScript object, string or number
*
* The view API may have only one onMessage handler defined.
* This method is fire and forget so no response is returned.
*
* It is particularly useful when the webview needs to react to events emitted by the plugin or the joplin api.
*/
postMessage(handle: ViewHandle, message: any): void;
/**
* Shows the panel
*/
@@ -1,9 +1,13 @@
import { FolderEntity } from '../../database/types';
import { Disposable } from './types';
import { Disposable, MenuItem } from './types';
export interface EditContextMenuFilterObject {
items: MenuItem[];
}
declare type FilterHandler<T> = (object: T) => Promise<void>;
declare enum ItemChangeEventType {
Create = 1,
Update = 2,
Delete = 3,
Delete = 3
}
interface ItemChangeEvent {
id: string;
@@ -12,8 +16,12 @@ interface ItemChangeEvent {
interface SyncStartEvent {
withErrors: boolean;
}
declare type ItemChangeHandler = (event: ItemChangeEvent)=> void;
declare type SyncStartHandler = (event: SyncStartEvent)=> void;
interface ResourceChangeEvent {
id: string;
}
declare type ItemChangeHandler = (event: ItemChangeEvent) => void;
declare type SyncStartHandler = (event: SyncStartEvent) => void;
declare type ResourceChangeHandler = (event: ResourceChangeEvent) => void;
/**
* The workspace service provides access to all the parts of Joplin that
* are being worked on - i.e. the currently selected notes or notebooks as
@@ -38,6 +46,11 @@ export default class JoplinWorkspace {
* Called when the content of the current note changes.
*/
onNoteChange(handler: ItemChangeHandler): Promise<Disposable>;
/**
* Called when a resource is changed. Currently this handled will not be
* called when a resource is added or deleted.
*/
onResourceChange(handler: ResourceChangeHandler): Promise<void>;
/**
* Called when an alarm associated with a to-do is triggered.
*/
@@ -50,6 +63,11 @@ export default class JoplinWorkspace {
* Called when the synchronisation process has finished.
*/
onSyncComplete(callback: Function): Promise<Disposable>;
/**
* Called just before the editor context menu is about to open. Allows
* adding items to it.
*/
filterEditorContextMenu(handler: FilterHandler<EditContextMenuFilterObject>): void;
/**
* Gets the currently selected note
*/
@@ -202,6 +202,25 @@ export interface Disposable {
// dispose():void;
}
export enum ModelType {
Note = 1,
Folder = 2,
Setting = 3,
Resource = 4,
Tag = 5,
NoteTag = 6,
Search = 7,
Alarm = 8,
MasterKey = 9,
ItemChange = 10,
NoteResource = 11,
ResourceLocalState = 12,
Revision = 13,
Migration = 14,
SmartFilter = 15,
Command = 16,
}
// =================================================================
// Menu types
// =================================================================
@@ -269,6 +288,17 @@ export interface MenuItem {
*/
commandName?: string;
/**
* Arguments that should be passed to the command. They will be as rest
* parameters.
*/
commandArgs?: any[];
/**
* Set to "separator" to create a divider line
*/
type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio');
/**
* Accelerator associated with the menu item
*/
@@ -334,6 +364,12 @@ export enum SettingItemType {
Button = 6,
}
export enum SettingItemSubType {
FilePathAndArgs = 'file_path_and_args',
FilePath = 'file_path', // Not supported on mobile!
DirectoryPath = 'directory_path', // Not supported on mobile!
}
export enum AppType {
Desktop = 'desktop',
Mobile = 'mobile',
@@ -351,6 +387,12 @@ export interface SettingItem {
value: any;
type: SettingItemType;
/**
* Currently only used to display a file or directory selector. Always set
* `type` to `SettingItemType.String` when using this property.
*/
subType?: SettingItemSubType;
label: string;
description?: string;
@@ -14,15 +14,18 @@
"devDependencies": {
"@types/node": "^14.0.14",
"copy-webpack-plugin": "^6.1.0",
"fs-extra": "9.1.0",
"glob": "7.2.0",
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"on-build-webpack": "^0.1.0",
"tar": "6.1.11",
"tar": "^6.0.5",
"ts-loader": "^7.0.5",
"typescript": "^3.9.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"chalk": "4.1.2",
"yargs": "16.2.0"
}
}
"chalk": "^4.1.0",
"yargs": "^16.2.0"
},
"files": [
"publish"
]
}

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