charlie eb80a4ba75 Merge branch 'master' into refactor/apis-types пре 4 недеља
..
cljs-sdk 4fb291f08d chore: bump cljs-libs пре 2 месеци
scripts d8809f0b7e feat: cljs sdk (#12168) пре 3 месеци
src 2d2a44e6b6 enhances(apis): add apis for retrieving tags by name пре 1 месец
.gitignore 01d879c18e feat!: File Sync (#5355) пре 3 година
.npmignore d8809f0b7e feat: cljs sdk (#12168) пре 3 месеци
.prettierrc.js 79bc33e1e3 Enhance/more ns plugin api (#4828) пре 3 година
CHANGELOG.md 036df25a17 Enhance: plugin APIs (#10399) пре 2 година
README.md a630835cee chore: update libs links so they are compatible with DB пре 1 месец
babel.config.json dda1f9bd9f Enhance / Plugin APIs (#6945) пре 3 година
index.d.ts f3edb9b77f feat(plugin): merge implementation пре 4 година
package.json 941ecd4934 chore(libs): update typedoc-plugin-lsp-docs to version 0.0.2 and fix build:docs command пре 1 месец
tsconfig.json 94c3857da4 improve(plugin): simplify caller пре 4 година
webpack.config.core.js 9029c632ef Enhance/plugin apis (#3355) пре 4 година
webpack.config.js 488d376262 fix(plugin): correct parameters of datascript query api пре 3 година
yarn.lock e8d06f6fa8 chore(ci): update dependencies and add GitHub Actions workflow for syncing plugin documentation пре 1 месец

README.md

@logseq/libs

🚀 Logseq SDK libraries.

Installation

yarn add @logseq/libs

Usage

Load logseq plugin sdk as global namespace

import "@logseq/libs"

APIs & Samples

Community templates

  1. https://github.com/logseq/cljs-plugin-example
  2. https://github.com/YU000jp/logseq-plugin-sample-kit-typescript

Feedback

If you have any feedback or encounter any issues, feel free to join Logseq's discord group. https://discord.gg/KpN4eHY

Generate CLJS SDK wrappers

To regenerate the ClojureScript facade from the JS SDK declarations (keeping the same argument shapes as the JS APIs while auto-converting to/from CLJS data):

yarn run generate:schema              # emits dist/logseq-sdk-schema.json
bb libs:generate-cljs-sdk            # emits logseq/core.cljs and per-proxy files under target/generated-cljs

Non-proxy methods (those defined on ILSPluginUser, e.g. ready, provide-ui) land in logseq.core. Each proxy (IAppProxy, IEditorProxy, ...) is emitted to its own namespace such as logseq.app or logseq.editor, preserving the original JS argument ordering while automatically bean-converting CLJS data.

Pass --out-dir to change the output location or --ns-prefix to pick a different namespace root.