Commit Graph

120 Commits (46433cbd6f4fca70a21a2ad295e3ea10b2c8ed89)

Author SHA1 Message Date
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 db284f1132 chore: build libs 2022-12-26 12:10:23 +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
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
charlie d04a0ac66b enhance(pdf): sync page number in highlights metafile 2022-11-22 21:43:47 +08:00
charlie 438f0b9e3d chore(plugins): build libs core 2022-11-11 17:33:15 +08:00
charlie 3068868347 fix(electron): open custom protocol links as default condition 2022-10-16 12:17:44 +08:00
Konstantinos Kaloutas d238c88afd chore: add allowed protocols for openExternal 2022-10-10 13:42:22 +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
charlie f8cc6378c3 improve(ui): update built-in icon mode 2022-09-21 14:49:20 +08:00
Konstantinos Kaloutas 73bbcc2ba0 fix: persist zoom level on navigation 2022-09-09 12:13:56 +08:00
charlie c7f17e905e chore: build libs core 2022-08-26 18:48:00 +08:00
Andelf fe99ca703f fix(windows): handle open dir
Fix #6438
2022-08-23 11:38:43 +08:00
charlie 7e3610077b chore: build libs core with more debug info 2022-08-22 21:54:17 +08:00
charlie 9fbea041ae chore: build libs core 2022-08-22 21:54:17 +08:00
charlie 040c8282be chore: build libs core 2022-08-08 15:49:11 +08:00
charlie 390a2469da chore(plugin): build libs core 2022-07-14 11:09:10 +08:00
Peng Xiao d8fe1b0b37 fix: export as html issue 2022-07-14 11:07:26 +08:00
Wojciech Nawrocki 2390846531
feat(pdf): fix formatting of copied text (#4564)
* chore(pdf): update pdfjs to 2.13.216

Also reapplied pdf_viewer fix from d3b4773.

* fix(pdf): formatting of copied text

* chore(pdf): update viewer CSS to 2.13.216

* chore(pdf): remove deprecated option

* chore(pdf): update pdfjs to 2.14.305

* doc(pdf): document some functions

* fix(pdf): highlight positioning
2022-07-12 18:30:50 +08:00
charlie f3bedb200e improve(plugin): add theme changed hook 2022-06-16 01:43:49 +08:00
Charlie 55ccdd5dba
Feature/onboarding Quick tour (#5247)
* enhance(ui): polish elements of left sidebar

* enhance(ui): active state of nav item from left sidebar

* enhance(ui): active state of nav item from left sidebar

* enhance(ui): WIP quick tour tips

* enhance(ui): WIP quick tour tips

* enhance(ui): WIP quick tour tips

* enhance(ux): add quick tour palette command

* enhance(ui): add step dots for quick tour tips

* enhance(ux): title hints for sidebar link items

* fix(ui): active state for journals from left sidebar

* enhance(ux): support quick tour command when initial app

* fix(ui): position of journal page quick tour tip box

* fix: cljs lint

* fix: remove unused method

* fix(e2e): e2e test for new left sidebar
2022-05-31 16:41:17 +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 fc0f2b75c6 chore(plugin): update resources 2022-04-29 18:51:25 +08:00
charlie 2b826f17de improve(plugin): add api of query element rect data from host 2022-04-29 18:51:25 +08:00
charlie 2c33c1111f chore: rebuild libs core 2022-04-29 18:51:25 +08:00
charlie c36a026502 chore(plugin): build libs core & update README.md 2022-04-29 18:51:25 +08:00
Tienson Qin 4e30fda343 Add lightningfs back 2022-04-24 11:17:47 +08:00
Tienson Qin b5a572ddae Remove worker.js backup file 2022-04-24 11:17:47 +08:00
Tienson Qin b3f67c69b1 misc: delete both web github integration and encryption 2022-04-24 11:17:47 +08:00
charlie c363c47a21 fix(plugin): compatible hooks strategy for old libs sdk 2022-04-22 15:51:40 +08:00
Charlie 79bc33e1e3
Enhance/more ns plugin api (#4828)
* improve(plugin): WIP add settings schema

* improve(plugin): add identity for settings modal

* improve(plugin): WIP add settings input

* fix(ui): scrollbar overlay of modal panel content

* improve(plugin): WIP add more render types of setting item

* improve(plugin): WIP polish settings items

* improve(plugin): WIP settings list of plugins

* improve(plugin): more settings types & polish releated ui

* fix(plugin): sometimes disable plugin not work

* improve(plugin): polish ui of plugin settings

* fix(dev): warning of lint

* improve(plugin): add api of settings changed

* chore: build libs core

* fix(ui): width of settings panel wrap

* improve(plugin): separate layouts data from settings aio file

* imporve(plugin): container size of single plugin settings

* fix: add missing state

* improve(plugin): add Git ns

* improve(plugin): git related api

* improve(api): type of git result

* chore: build libs core

* fix(dev): kondo lint

* fix(plugin): use cdn sdk when js entry

* chore: build libs core

* fix(plugin): env condition

* improve(plugin): add UI ns

* fix(api): arguments of datascript query

* enhance(api): manageable message instance of UI tools

* enhance(api): WIP add experiments api

* enhance(api): WIP add resources state of plugin

* improve(plugin): add status of loading script resources

* improve(plugin): more opts for script loader

* improve(plugin): WIP add fenced code renderer hook

* improve(plugin): fenced code renderer hook

* fix(plugin): resource root path of plugin fs location

* imporve(plugin): support local files for loading scripts

* improve(plugin): types of expirements api

* fix: typo of class

* enhance(api): add namespace related apis

* enhance(api): add linked refrences related apis

* enhance(plugin): add sample links to related api comments

* improve(plugin): add db changed hook & optimize strategy of caller for hooks

* improve(plugin): compatible commands registration for old sdk

* improve(plugin): collect user sdk version for plugin local

* improve(plugin): add internal callable apis for user sdk

* chore(plugin): missing files & bump libs version

* improve(plugin): compatiable for old sdk about hook messaging optimization

* improve(plugin): db hook optimization for old sdk

* enhance(ux): auto focus searchbar when open plugins list

* improve(plugin): api of a hook from specific block changed event

* improve(plugin): api of db block change hook

* improve(plugin): add show bracket user config of api

* improve(plugin): api of db block change hook

* fix(api): toggle collapsed of block

* improve(api): try to init grpah with git before exec git commands

* improve(plugin): attributes of sandbox container

* improve(dev): support register command with keybinding

* improve(plugin): add api of register shortcut command

* fix(plugin): reubild slash commands when new command registration

* fix(dev): lint

* improve(dev): lint script of libs codebase

* chore(dev): remove useless codes

* improve(plugin):sanitize path string of plugin repo value

* fix(plugin): rebuild commands list when unregister a plugin

* fix(ui): overflow width of query result table

* chore: rebuild libs core

* improve(plugin): add assets related apis

* chore: rebuild libs core

* improve(plugin): support replace state of into block in page api

* improve(plugin): prepend/append child block in page

* improve(plugin): polished exceptions message of plugin update/install

* fix(plugin): update settings within gui

* improve(ux): debounce change event of input for plugin settings gui

* chore: rebuild libs core

* enhance(plugin): catch exception of hook plugin
2022-04-21 18:43:16 +08:00
Andelf 76982e61a7 fix(deps): warning of missing sourcemaps 2022-03-24 15:44:32 +08:00
Andelf f1e59e69fd chore(dev): rm unused js 2022-02-18 18:48:46 +08:00
Andelf 54215ef196 refactor(draw): handle static assets from node_modules 2022-02-18 17:55:50 +08:00
charlie 21ce5dae99 chore: bump minor version of libs package 2022-02-17 22:18:54 +08:00
Charlie 24b0236b7d
Enhance/Settings UI of plugins (#4035)
more settings types & polish releated ui
2022-02-17 10:00:53 +08:00
Charlie 3ea7635daa
Enhance/marketplace (#3686)
Marketplace enhancement

Nested modal support
2022-01-07 19:00:35 +08:00
Peng Xiao 17b5cdb9e8
feat: add a secret global flag to load graph progammtically (#3531)
* feat: add a secret global flag to load graph from a user defined dir

* fix: use LOGSEQ_OVERWRITE_OPEN_DIR env var to overwrite the openning graph dir

* e2e: add a test for load & check saved graph data

* fix: should also pass in process.env for testing fixtures

* feat: new way to set open dir folder

* fix: e2e

* fix: remove playwright global flag check

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2022-01-05 21:05:05 +08:00
YangKeao 0a57b739eb chore: build libs core
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
2021-12-31 10:51:35 +08:00
charlie 746f2aa71f chore: build libs core 2021-12-16 19:23:43 +08:00
Charlie 9029c632ef
Enhance/plugin apis (#3355)
* improve(plugin): support autoFocus option for main ui frame

* improve(plugin): make single selected block as current block

* improve(api): get selected blocks

* improve(plugin): support call built-in command from api

* fix(plugin): sanitize key of shortcut id

* improve(plugin): add invoke built-in command api &

* fix(editor): overwritten class of collapsed block

* improve(plugin): add `getStateFromStore` api

* chore: build libs core

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2021-12-08 10:43:58 +08:00
charlie 35c785c3be chore(plugin): rebuild core 2021-11-24 11:38:06 +08:00
charlie 18c37bd573 chore(plugin): bump libs version 2021-11-24 11:38:06 +08:00
charlie 7158141637 chore(plugin): build libs & bump version 2021-11-16 18:54:49 +08:00
charlie 5a3e93f930 improve(plugin): reset option for slot container 2021-11-16 12:02:18 +08:00
Charlie 72c038e6fe
Feat/moveable plugin UI container (#3045)
* improve(plugin): add container for main ui frame

* feat(plugin): support draggable & resizable UI container for main ui

* feat: support fork sub layout container

* improve(plugin): add editor selection api

* improve(plugin): click outside configure for float container

* improve(plugin): api of journal for create-page

* improve(plugin): api of open-in-right-sidebar

* improve(plugin): add full screen api

* improve(plugin): api of register-palette-command

* improve(plugin): add apis
2021-11-15 16:57:20 +08:00
charlie d3b477309f fix(pdf): goto highlight not work sometimes 2021-10-10 00:17:23 +08:00
Tienson Qin 8823b624d9 fix: image paste 2021-10-08 22:56:50 +08:00
charlie c34c9184e2 fix(api): sanitize html for security 2021-10-08 17:37:11 +08:00