Commit Graph

92 Commits

Author SHA1 Message Date
charlie
e362cfa0ae enhance(plugins): types 2025-03-20 10:44:23 +08:00
charlie
03592a26b6 chore: typo 2025-01-14 17:51:53 +08:00
charlie
9224df59cc enhance(apis): add remove property & types 2025-01-14 17:51:15 +08:00
charlie
99998e25e9 enhance(libs): utils apis 2025-01-09 17:35:55 +08:00
charlie
72c09e5c30 enhance(libs): types 2025-01-09 14:22:30 +08:00
charlie
25adb80b96 enhance(plugin): app proxy call 2025-01-06 17:34:03 +08:00
charlie
87e01f116b enhance(apis): add types 2025-01-06 15:54:21 +08:00
charlie
27b9f6b5c6 enhance(api): WIP adjust property related APIs 2024-09-14 16:05:38 +08:00
charlie
e05dc085a2 fix(plugin): incorrect normalize data case for the hashmap value 2024-09-05 20:12:45 +08:00
charlie
fccef5e904 enhance(plugin): api types for the property entity 2024-09-05 17:12:17 +08:00
charlie
35a2c8ec40 enhance(plugin): api types 2024-09-03 11:14:21 +08:00
charlie
b755369a0b enhance(apis): get blocks from batch blocks insertion 2024-08-15 17:26:51 +08:00
charlie
7209540fe2 fix(api): compatible block content/title for the classic APIs 2024-07-31 12:05:44 +08:00
charlie
73757c0f21 enhance(api): enhancements & types 2024-06-21 09:57:05 +08:00
charlie
bdfda0b9db enhance(api): block related types 2024-06-04 15:32:09 +08:00
charlie
de9940dc9b enhance(plugin): more args extensible for the exported editor component 2024-04-09 23:30:36 +08:00
Charlie
7db164ab47 Enhance: APIs related issues (#10782)
* fix(plugins): load unpacked package for the existed plugin

* enhance(plugin): increase timeout time for the plugin handshake

* enhance(api): support option to insert block with auto ordered list

* fix(api): skip empty target for the batch insertion blocks

* fix(api): before option for the batch blocks insertion

* enhance(api): types

* chore: bump minor version

* fix(apis): Empty `payload.uuid` when executing onMacroRendererSlotted inside query table
2024-01-16 15:47:56 +08:00
Charlie
036df25a17 Enhance: plugin APIs (#10399)
* enhance(plugin): call apis with the sdk ns

* enhance(plugin): types

* enhance(api): get value from the computed style

* enhance(api): types

* enhance(plugin): types

* enhance(plugin): types

* fix: lint

* fix(apis): incorrect shortcut command registion for block editing mode #10392

* fix(api): types

* enhance(apis): support register shortcuts with multi binding vals

* fix(plugins): normalize command key to make the internal keyword legal

* chore(plugin): build libs core

* chore(plugin): bump version

* enhance(apis): normalize apis cljs data

* chore(plugin): update libs user sdk

* chore(plugin): CHANGELOG.md

* fix: typo

* fix(ux): support querying plugins with right space chars
2023-12-13 15:42:21 +08:00
Tienson Qin
88acf53303 fix: lint warnings 2023-11-13 22:59:34 +08:00
Tienson Qin
b91fd4e6c8 Remove old cmdk && command palette 2023-11-06 15:25:35 +08:00
hkgnp
1c0e18daaa chore: add marker prop to BlockEntity interface 2023-10-05 11:08:53 +09:00
Charlie
331afbc04f Enhance/plugins apis (#10127)
* enhance(api): add page to recent for route api

* enhance(api): support open block in right sidebar with entity id
2023-09-06 14:49:18 +00:00
Charlie
6d6da2046c Enhance/shortcuts (#9803)
* refactor(shortcuts): simplify to build handler category map

* fix(shortcuts): redundant re-mount for the pdf shortcuts

* refactor(shortcuts): simplify names

* refactor(shortcuts): simplify user keynames

* fix(shortcuts): persist inited state for dev mode

* refactor(shortcuts): simplify handlers installation

* refactor(shortcuts): optimize shortcuts mixin

* fix: incorrect function ref

* refactor(shortcuts): shortcuts mixin

* fix(shortcuts): incorrect initialization for the pdf shortcut handler

* refactor(shortcuts): optimize binding keys map

* refactor(shortcuts): optimize shortcuts conflicts detection

* refactor(shortcuts): optimize binding ids map

* refactor(shortcuts): WIP the new keymap page

* refactor(shortcuts): WIP the new keymap related components

* feat(shortcuts): WIP fuzzy search for the shortcuts

* refactor(shortcuts): WIP the new keymap related components

* feat(shortcuts): WIP the new shorcuts record component

* feat(shortcuts): WIP the new shorcuts record component

* feat(shortcuts): WIP check shortcut conflicts component

* feat(shortcuts): WIP the new shorcuts record component

* refactor(shortcuts): WIP persist user shortcuts

* fix(shortcuts): detection for the conflicts

* feat(shortcuts): WIP detection for the conflicts

* feat(shortcuts): WIP persist user shortcuts

* refactor(shortcuts): add unit tests

* enhance(ux): search pane for the shortcuts

* feat(shortcuts): remove the existent shortcut item

* feat(shortcuts): fold/unfold categories

* feat(shortcuts): add shortcuts filters

* enhance(shortcuts): resove binding map description

* enhance(shortcuts): reactive category shortcuts

* enhance(shortcuts): register api for plugins

* feat(shortcuts): add keyboard shortcuts filters

* feat(shortcuts): impl keyboard shortcuts filters

* enhance(shortcuts): leader keys for the shortcut conflicts detection

* enhance(tests): leader keys conflicts for the shortucts

* enhance(shortcuts): parse conflicts from current binding list

* enhance(ui): polish the component of the restore shortcut action

* enhance(shortcuts): get conflicts with specific handler id

* enhance(shortcuts): polish the confilts component

* enhance(shortcuts): polish keymap conflicts component

* enhance(shortcuts): ux for handling shorcuts conflicts

* enhance(ui): polish notifications cp

* fix(shortcuts): remove reduplicate shortcuts for category

* enhance(shortcuts): polish ux for handling shorcuts conflicts

* chore(plugin): build libs core

* enhance(plugin): support shortcut command lifecycle hooks

* enhance(plugin): support shortcut command lifecycle hooks

* chore(plugin): build libs core

* enhance(shortcuts): support shortcuts saved to global config

* enhance(shortcuts): support shortcuts be saved to global config

* feat(shortcuts): support keymap manager to global settings

* enhance(shortcuts): shortcut to open keymap settings

* fix(units): tests

* fix: lints

* enhance(shortcuts): unlisten all shortcuts

* fix: lints

* fix: lints

* fix(units): tests

* fix(units): tests

* fix(units): tests

* enhance(shortcuts): unlisten/listen all shortcuts

* enhance(shortcuts): polish conflicts component

* fix(ui): modal size

* fix(ui): modal panel container

* enhance(shortcuts): i18n

* enhance(ui): layout of the shortcuts recorder component

* fix(lint): i18n

* enhance(ui): keyboard icon for the keymap settings tab

* fix(shortcuts): incorrect filters for the collaspsed shortcuts

* enhance(ui): polish details for the keymap settings

* enhance(ui): polish details for the keymap settings

* fix(shortcuts): get shortcut description error when the associated handler-id not exist

* fix(ui): the shortcut disabled label overlaps with section headers.

* refactor(shortcuts): names

* enhance(ui): filter icons
2023-08-29 19:33:48 +08:00
Gabriel Horner
2b90b0462a Remove explicit :block/unordered that should already be deleted 2023-07-24 10:26:02 -04:00
Phil Denhoff
ec658d1e67 enhance: IAppProxy, IEditorProxy, BlockEntity and PageEntity have strict interfaces (#9520)
* types: remove problematic Record<string, any>

* types: remove `[key: string]: any` which clobbers all other type info

* fix: support alternative dev entrypoint

* fix: normalize boolean value to string

* fix: identify field used for legacy themes (?)

* fix: add missing `effect` and `iir` properties, which are likely internal only

* docs: move comment to JS Doc so it should show up in docs

* fix: add missing internal `lsr` field

* bump package to 0.1.15 to indicate breaking API change

* fix: ensure that Plugins can access their settings... if they exist

* Revert "bump package to 0.1.15 to indicate breaking API change"

This reverts commit 6e0d1094f2.

---------

Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
2023-06-20 16:59:55 -04:00
Charlie
60fbfdf2f7 Enhance: plugin-related improvements (#8787)
- fix: Select and Input elements rendered using provideUI via onMacroRendererSlotted don't function #8374
 - fix: logseq.Editor.getPageBlocksTree does not work when page uuid is passed in as param #4920
 - feat: add a plug-in flag for the plugin slash commands item
 - feat: add logseq.App.setCurrentGraphConfigs: (configs: {}) => Promise<void>
 - feat: add hook logseq.App.onTodayJournalCreated: IUserHook<{ title: string }
 - enhance: auto-check updates for the installed plugins from Marketplace
 - feat: expose template-related APIs to SDK
2023-04-12 21:27:40 +08:00
Zhizhen He
25c15053d6 feat: add typos to GitHub action
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
2023-02-21 12:01:58 -05:00
Junyi Du
05ff96ebf9 fix: search service plugin API typo 2023-01-12 00:47:44 +08:00
Charlie
675811ccde Enhance/plugins (#8202)
* improve(plugins): install hooks with user options

* improve(plugin): remove todos

* improve(plugin): hook for a specific plugin

* e2e tests

* improve(ui): global search bar for the results from the custom search service
2023-01-05 19:30:41 +08:00
Charlie
020317911f Enhance/plugin APIs (#7555)
* feat: WIP native cli command support

* Add :shell/command-whitelist option

* Integrate cli to code block

* Add :code-block/command-whitelist option

* fix: size of icon

* improve(shell): cache user shell whitelist on application configures file

* improve(electron): promisify run cli command

* chore(libs): update version

* fix(plugin): incorrect payload of pdf highlights section hook

* improve(plugin): block renderer with specific block uuid

* improve(plugin): expose logger for user lib

* improve(plugin): block hooks type

* improve(plugin): block slot hook with specific block

* improve(plugin): auto generate key for provide UI options

* improve(plugin): style of injected ui container

* improve(plugin): types

* improve(plugin): async messaging api from host to plugin

* improve(plugin): add types

* improve(apis): get external plugin metadata

* improve(apis): invoke external plugin impls

* improve(apis): call external plugin impls for simple commands

* enhance(apis): datascript query api for predicate inputs

* enhance(apis): datascript query api for predicate inputs

* fix(apis): redundant args of datascript query api

* enhance(plugins): position of float ui container

* enhance(plugins): style of setting options

* enhance(plugins): layouts data for float ui

* chore(plugins): update CHANGELOG.md

* improve(apis): add types

* chore: fix some inclusive terms

* improve(apis): types

* chore(plugins): update CHANGELOG.md

* chore(plugins): build libs

* chore: update CHANGELOG.md

* chore: remove experiemental alda integration

* fix(lint): remove unused methods

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Co-authored-by: Andelf <andelf@gmail.com>
2022-12-19 20:23:25 +08:00
Manu [tennox]
8a6e0bdcc2 feat(api): add keepUUID option to insertBatchBlock 2022-12-05 11:15:48 +08:00
Charlie
dda1f9bd9f Enhance / Plugin APIs (#6945)
Added
1. All configurations of current graph.
App.getCurrentGraphConfigs: () => Promise<any>
2. All favorite pages list of current graph.
App.getCurrentGraphFavorites: () => Promise<Array<string> | null>
3. All recent pages list of current graph.
App.getCurrentGraphRecent: () => Promise<Array<string> | null>
4. Clear right sidebar blocks.
App.clearRightSidebarBlocks: (opts?: { close: boolean }) => void
5. Support register CodeMirror enhancer. #Experiment feature
Experiments.registerExtensionsEnhancer<T = any>(type: 'katex' | 'codemirror', enhancer: (v: T) => Promise<any>)
6. Support hooks for app search service. #Alpha stage
App.registerSearchService<T extends IPluginSearchServiceHooks>(s: T): void
7. Support focus option for App.insertBlock. Credit to [[tennox]] #PR

Fixed
1. Adjust build script to be compatible for shadow-cljs bundler.
How to set up a clojurescript project with shadow-cljs?
https://github.com/rlhk/logseq-url-plus/blob/main/doc/dev-notes.md
2022-11-22 22:00:29 +08:00
Manu [tennox]
4217057a44 Add option to insert block without focusing it afterwards 2022-11-17 15:48:43 +08:00
Charlie
d53ac94bfc Enhance/pdf improvements (#6475)
Full-text search, highlights and assets alias support 
It also exposes a plugin API for highlight context menu   
    ```ts
    /**
       * Current it's only available for pdf viewer
       * @param label - displayed name of command
       * @param action - callback for the clickable item
       * @param opts - clearSelection: clear highlight selection when callback invoked
       */
      registerHighlightContextMenuItem: (
        label: string,
        action: SimpleCommandCallback,
        opts?: {
          clearSelection: boolean
        }
      ) => unknown
    ```
2022-10-09 20:44:18 +08:00
Tienson Qin
f4262cf919 Enhance/api storages for graph assets (#6488)
* improve(api): assets storage for plugin

Co-authored-by: charlie <xyhp915@qq.com>
2022-10-04 12:30:19 +08:00
lord63
5dd7312342 Guide developer to use logseq.UI.showMsg 2022-09-19 15:00:16 +08:00
charlie
85aeba99ab improve(api): types & typos 2022-08-22 21:54:17 +08:00
charlie
09d43983f2 improve(api): event hook of after graph indexed 2022-08-22 21:54:17 +08:00
charlie
5815f37df1 improve(api): expose more values for user configures 2022-08-22 21:54:17 +08:00
charlie
eb72f2e3c7 improve(plugin): api to create block uuid 2022-08-22 21:54:17 +08:00
charlie
af49427ef1 improve(plugin): api of select single block 2022-08-08 15:49:11 +08:00
charlie
3e7c20fd80 improve(plugin): support textarea for settings input item 2022-08-08 15:49:11 +08:00
yoyurec
3b383a918b Add heading in plugin settings 2022-07-09 23:20:27 +08:00
Scott Block
d15fb1c56a (chore): Update getAllPages typescript (#5908)
* Update getAllPages typescript

* Optionally add updatedAt to PageEntity
2022-07-04 15:40:44 +08:00
charlie
f3bedb200e improve(plugin): add theme changed hook 2022-06-16 01:43:49 +08:00
charlie
3b0e1c58a3 improve(plugin): WIP api of http request 2022-06-16 01:43:49 +08:00
charlie
a9c02b87fd improve(plugin): update types 2022-06-16 01:43:49 +08:00
charlie
2aa50f6199 feat(plugin): WIP request api 2022-06-16 01:43:49 +08:00
Yue Yang
17b91e51c3 feat: custom theme switching (#4741)
* feat: custom theme switching

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: handle reset-custom-theme

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: unregisterTheme

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: format with ts-standard

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: reset extra formats

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: simplify array types

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* Update lsplugin.core.js

* fix: sync upstream

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: add `no mode` themes into panel

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: ci

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: remove first <hr />

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: lockfile

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: update

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* chore: set-theme! => set-theme-mode!

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* fix: selectTheme

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* perf: reduce unnecessary logic

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
2022-05-19 10:18:43 +08:00
charlie
7a7dbd5e68 enhance(shortcut): support intuitional keyboard chars for binding key 2022-05-06 23:39:51 +08:00