├── .gitignore ├── .nojekyll ├── README.md ├── assets ├── highlight.css ├── main.js ├── search.js └── style.css ├── classes └── LSPluginUser.html ├── docs ├── .eslintrc.json ├── .gitignore ├── README.md ├── components │ ├── Description.tsx │ ├── Discuss.tsx │ ├── Icons.tsx │ ├── Sidebar.json │ └── Sidebar.tsx ├── helpers │ ├── env.ts │ ├── useColorScheme.ts │ ├── useLocalStorage.ts │ └── useScript.ts ├── next-env.d.ts ├── next.config.js ├── package.json ├── pages │ ├── _app.tsx │ ├── _index.md │ ├── _page.tpl │ ├── api │ │ └── hello.ts │ ├── index.tsx │ └── logseq │ │ ├── App │ │ ├── execGitCommand.tsx │ │ ├── getCurrentGraph.tsx │ │ ├── getInfo.tsx │ │ ├── getStateFromStore.tsx │ │ ├── getUserConfigs.tsx │ │ ├── getUserInfo.tsx │ │ ├── invokeExternalCommand.tsx │ │ ├── onBlockRendererSlotted.tsx │ │ ├── onCurrentGraphChanged.tsx │ │ ├── onMacroRendererSlotted.tsx │ │ ├── onPageHeadActionsSlotted.tsx │ │ ├── onRouteChanged.tsx │ │ ├── onSidebarVisibleChanged.tsx │ │ ├── onThemeModeChanged.tsx │ │ ├── openExternalLink.tsx │ │ ├── pushState.tsx │ │ ├── queryElementById.tsx │ │ ├── queryElementRect.tsx │ │ ├── quit.tsx │ │ ├── registerCommand.tsx │ │ ├── registerCommandPalette.tsx │ │ ├── registerCommandShortcut.tsx │ │ ├── registerPageMenuItem.tsx │ │ ├── registerUIItem.tsx │ │ ├── relaunch.tsx │ │ ├── replaceState.tsx │ │ ├── setFullScreen.tsx │ │ ├── setLeftSidebarVisible.tsx │ │ ├── setRightSidebarVisible.tsx │ │ ├── setZoomFactor.tsx │ │ └── showMsg.tsx │ │ ├── Assets │ │ └── listFilesOfCurrentGraph.tsx │ │ ├── DB │ │ ├── datascriptQuery.tsx │ │ ├── onBlockChanged.tsx │ │ ├── onChanged.tsx │ │ └── q.tsx │ │ ├── Editor │ │ ├── appendBlockInPage.tsx │ │ ├── checkEditing.tsx │ │ ├── createPage.tsx │ │ ├── deletePage.tsx │ │ ├── editBlock.tsx │ │ ├── exitEditingMode.tsx │ │ ├── getAllPages.tsx │ │ ├── getBlock.tsx │ │ ├── getBlockProperties.tsx │ │ ├── getBlockProperty.tsx │ │ ├── getCurrentBlock.tsx │ │ ├── getCurrentPage.tsx │ │ ├── getCurrentPageBlocksTree.tsx │ │ ├── getEditingBlockContent.tsx │ │ ├── getEditingCursorPosition.tsx │ │ ├── getNextSiblingBlock.tsx │ │ ├── getPage.tsx │ │ ├── getPageBlocksTree.tsx │ │ ├── getPageLinkedReferences.tsx │ │ ├── getPagesFromNamespace.tsx │ │ ├── getPagesTreeFromNamespace.tsx │ │ ├── getPreviousSiblingBlock.tsx │ │ ├── getSelectedBlocks.tsx │ │ ├── insertAtEditingCursor.tsx │ │ ├── insertBatchBlock.tsx │ │ ├── insertBlock.tsx │ │ ├── moveBlock.tsx │ │ ├── onInputSelectionEnd.tsx │ │ ├── openInRightSidebar.tsx │ │ ├── prependBlockInPage.tsx │ │ ├── registerBlockContextMenuItem.tsx │ │ ├── registerSlashCommand.tsx │ │ ├── removeBlock.tsx │ │ ├── removeBlockProperty.tsx │ │ ├── renamePage.tsx │ │ ├── restoreEditingCursor.tsx │ │ ├── scrollToBlockInPage.tsx │ │ ├── setBlockCollapsed.tsx │ │ ├── updateBlock.tsx │ │ └── upsertBlockProperty.tsx │ │ ├── Experiments.tsx │ │ ├── FileStorage.tsx │ │ ├── Git │ │ ├── execCommand.tsx │ │ ├── loadIgnoreFile.tsx │ │ └── saveIgnoreFile.tsx │ │ ├── UI │ │ ├── closeMsg.tsx │ │ └── showMsg.tsx │ │ ├── addListener.tsx │ │ ├── baseInfo.tsx │ │ ├── beforeunload.tsx │ │ ├── caller.tsx │ │ ├── connected.tsx │ │ ├── emit.tsx │ │ ├── eventNames.tsx │ │ ├── hideMainUI.tsx │ │ ├── hideSettingsUI.tsx │ │ ├── isMainUIVisible.tsx │ │ ├── listenerCount.tsx │ │ ├── listeners.tsx │ │ ├── onSettingsChanged.tsx │ │ ├── once.tsx │ │ ├── provideModel.tsx │ │ ├── provideStyle.tsx │ │ ├── provideTheme.tsx │ │ ├── provideUI.tsx │ │ ├── ready.tsx │ │ ├── removeAllListeners.tsx │ │ ├── removeListener.tsx │ │ ├── resolveResourceFullUrl.tsx │ │ ├── setMainUIAttrs.tsx │ │ ├── setMainUIInlineStyle.tsx │ │ ├── settings.tsx │ │ ├── showMainUI.tsx │ │ ├── showSettingsUI.tsx │ │ ├── toggleMainUI.tsx │ │ ├── updateSettings.tsx │ │ └── useSettingsSchema.tsx ├── postcss.config.js ├── public │ ├── contribute_1.png │ ├── contribute_2.png │ ├── favicon.ico │ ├── icons@2x.png │ └── vercel.svg ├── scripts │ └── build-apis.mjs ├── styles │ ├── Home.module.css │ ├── github.css │ └── globals.css ├── tailwind.config.js ├── tsconfig.json └── yarn.lock ├── functions └── setupPluginUserInstance.html ├── index.html ├── interfaces ├── AppGraphInfo.html ├── AppInfo.html ├── AppUserConfigs.html ├── AppUserInfo.html ├── BlockEntity.html ├── IAppProxy.html ├── IAssetsProxy.html ├── IDBProxy.html ├── IEditorProxy.html ├── IGitProxy.html ├── ILSPluginThemeManager.html ├── ILSPluginUser.html ├── IPluginSearchServiceHooks.html ├── IUIProxy.html ├── LSPluginBaseInfo.html ├── LSPluginPkgConfig.html ├── LegacyTheme.html ├── PageEntity.html └── Theme.html ├── lsp.js ├── modules.html ├── out.json └── types ├── BlockCommandCallback.html ├── BlockCursorPosition.html ├── BlockIdentity.html ├── BlockPageName.html ├── BlockUUID.html ├── BlockUUIDTuple.html ├── EntityID.html ├── ExternalCommandType.html ├── IBatchBlock.html ├── IDatom.html ├── IEntityID.html ├── IGitResult.html ├── IHookEvent.html ├── IUserConditionSlotHook.html ├── IUserHook.html ├── IUserOffHook.html ├── IUserSlotHook.html ├── LSPluginUserEvents.html ├── PageIdentity.html ├── PluginLocalIdentity.html ├── SearchBlockItem.html ├── SearchFileItem.html ├── SearchIndiceInitStatus.html ├── SearchPageItem.html ├── SettingSchemaDesc.html ├── SimpleCommandCallback.html ├── SimpleCommandKeybinding.html ├── SlashCommandAction.html ├── SlashCommandActionCmd.html ├── StyleOptions.html ├── StyleString.html ├── ThemeMode.html ├── UIBaseOptions.html ├── UIContainerAttrs.html ├── UIMsgKey.html ├── UIMsgOptions.html ├── UIOptions.html ├── UIPathIdentity.html ├── UIPathOptions.html ├── UISlotIdentity.html ├── UISlotOptions.html ├── UserProxyTags.html └── WithOptional.html /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.idea/ 3 | node_modules 4 | -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- 1 | TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## APIs of Logseq plugins 2 | 3 | Docs: [https://plugins-doc.logseq.com/](https://plugins-doc.logseq.com/) 4 | APIs: [https://logseq.github.io/plugins/](https://logseq.github.io/plugins/) 5 | 6 | > ⚠️ To avoid loading plugin failures occasionally and for performance reasons, 7 | > it is recommended to keep the plugin SDK [`@logseq/libs`](https://www.npmjs.com/package/@logseq/libs) as up-to-date as possible. 8 | 9 | ## License 10 | MIT 11 | -------------------------------------------------------------------------------- /assets/highlight.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --light-hl-0: #000000; 3 | --dark-hl-0: #D4D4D4; 4 | --light-hl-1: #AF00DB; 5 | --dark-hl-1: #C586C0; 6 | --light-hl-2: #A31515; 7 | --dark-hl-2: #CE9178; 8 | --light-hl-3: #001080; 9 | --dark-hl-3: #9CDCFE; 10 | --light-hl-4: #0070C1; 11 | --dark-hl-4: #4FC1FF; 12 | --light-hl-5: #795E26; 13 | --dark-hl-5: #DCDCAA; 14 | --light-hl-6: #000000; 15 | --dark-hl-6: #C8C8C8; 16 | --light-hl-7: #008000; 17 | --dark-hl-7: #6A9955; 18 | --light-hl-8: #098658; 19 | --dark-hl-8: #B5CEA8; 20 | --light-hl-9: #0000FF; 21 | --dark-hl-9: #569CD6; 22 | --light-hl-10: #000000FF; 23 | --dark-hl-10: #D4D4D4; 24 | --light-code-background: #FFFFFF; 25 | --dark-code-background: #1E1E1E; 26 | } 27 | 28 | @media (prefers-color-scheme: light) { :root { 29 | --hl-0: var(--light-hl-0); 30 | --hl-1: var(--light-hl-1); 31 | --hl-2: var(--light-hl-2); 32 | --hl-3: var(--light-hl-3); 33 | --hl-4: var(--light-hl-4); 34 | --hl-5: var(--light-hl-5); 35 | --hl-6: var(--light-hl-6); 36 | --hl-7: var(--light-hl-7); 37 | --hl-8: var(--light-hl-8); 38 | --hl-9: var(--light-hl-9); 39 | --hl-10: var(--light-hl-10); 40 | --code-background: var(--light-code-background); 41 | } } 42 | 43 | @media (prefers-color-scheme: dark) { :root { 44 | --hl-0: var(--dark-hl-0); 45 | --hl-1: var(--dark-hl-1); 46 | --hl-2: var(--dark-hl-2); 47 | --hl-3: var(--dark-hl-3); 48 | --hl-4: var(--dark-hl-4); 49 | --hl-5: var(--dark-hl-5); 50 | --hl-6: var(--dark-hl-6); 51 | --hl-7: var(--dark-hl-7); 52 | --hl-8: var(--dark-hl-8); 53 | --hl-9: var(--dark-hl-9); 54 | --hl-10: var(--dark-hl-10); 55 | --code-background: var(--dark-code-background); 56 | } } 57 | 58 | :root[data-theme='light'] { 59 | --hl-0: var(--light-hl-0); 60 | --hl-1: var(--light-hl-1); 61 | --hl-2: var(--light-hl-2); 62 | --hl-3: var(--light-hl-3); 63 | --hl-4: var(--light-hl-4); 64 | --hl-5: var(--light-hl-5); 65 | --hl-6: var(--light-hl-6); 66 | --hl-7: var(--light-hl-7); 67 | --hl-8: var(--light-hl-8); 68 | --hl-9: var(--light-hl-9); 69 | --hl-10: var(--light-hl-10); 70 | --code-background: var(--light-code-background); 71 | } 72 | 73 | :root[data-theme='dark'] { 74 | --hl-0: var(--dark-hl-0); 75 | --hl-1: var(--dark-hl-1); 76 | --hl-2: var(--dark-hl-2); 77 | --hl-3: var(--dark-hl-3); 78 | --hl-4: var(--dark-hl-4); 79 | --hl-5: var(--dark-hl-5); 80 | --hl-6: var(--dark-hl-6); 81 | --hl-7: var(--dark-hl-7); 82 | --hl-8: var(--dark-hl-8); 83 | --hl-9: var(--dark-hl-9); 84 | --hl-10: var(--dark-hl-10); 85 | --code-background: var(--dark-code-background); 86 | } 87 | 88 | .hl-0 { color: var(--hl-0); } 89 | .hl-1 { color: var(--hl-1); } 90 | .hl-2 { color: var(--hl-2); } 91 | .hl-3 { color: var(--hl-3); } 92 | .hl-4 { color: var(--hl-4); } 93 | .hl-5 { color: var(--hl-5); } 94 | .hl-6 { color: var(--hl-6); } 95 | .hl-7 { color: var(--hl-7); } 96 | .hl-8 { color: var(--hl-8); } 97 | .hl-9 { color: var(--hl-9); } 98 | .hl-10 { color: var(--hl-10); } 99 | pre, code { background: var(--code-background); } 100 | -------------------------------------------------------------------------------- /docs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | .pnpm-debug.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | pages/tests -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | ## Getting Started 2 | 3 | First, run the development server: 4 | 5 | ```bash 6 | npm run dev 7 | # or 8 | yarn dev 9 | ``` 10 | 11 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 12 | 13 | You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. 14 | 15 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. 16 | 17 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. 18 | 19 | ## Learn More 20 | 21 | To learn more about Next.js, take a look at the following resources: 22 | 23 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 24 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 25 | 26 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 27 | 28 | ## Deploy on Vercel 29 | 30 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 31 | 32 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 33 | -------------------------------------------------------------------------------- /docs/components/Description.tsx: -------------------------------------------------------------------------------- 1 | import { Box } from '@primer/react' 2 | import { useEffect, useRef, useState } from 'react' 3 | import { lspApisEndpoint } from '../helpers/env' 4 | import { MarkGithubIcon } from '@primer/octicons-react' 5 | import { useColorScheme } from '../helpers/useColorScheme' 6 | 7 | type DescriptionProps = { 8 | ns: string, 9 | name: string, 10 | comment: string 11 | } 12 | 13 | export function Skeleton () { 14 | return ( 15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | ) 28 | } 29 | 30 | export function DescriptionHeader ( 31 | props: Partial 32 | ) { 33 | return ( 34 | 35 | {props.ns ? 36 | ( 37 |
38 | logseq 39 | {props.ns != '.' && (.{props.ns})} 40 |
41 | ) : ()} 42 | 43 |
44 | 48 | @logseq/libs 52 | 53 | 57 | 58 | 59 |
60 |
61 | ) 62 | } 63 | 64 | export function Description ( 65 | props: DescriptionProps 66 | ) { 67 | const [loaded, setLoaded] = useState(false) 68 | const iframeRef = useRef(null) 69 | const readyRef = useRef(false) 70 | const colorScheme = useColorScheme(); 71 | 72 | useEffect(() => { 73 | setTimeout(() => { 74 | if (readyRef.current) return 75 | iframeRef.current?.contentWindow?.postMessage('ready', '*') 76 | readyRef.current = true 77 | }, 100) 78 | 79 | iframeRef.current?.addEventListener('load', (e) => { 80 | iframeRef.current?.contentWindow?.postMessage('ready', '*') 81 | readyRef.current = true 82 | }, { 83 | once: true 84 | }) 85 | 86 | const sizeHandler = (e: any) => { 87 | let data = e.data 88 | if (typeof data !== 'string') return 89 | 90 | try { 91 | data = JSON.parse(data) 92 | if (data?.type !== 'size') return 93 | const height = data.payload?.height 94 | if (!height) return 95 | iframeRef.current!.style.height = height + 'px' 96 | iframeRef.current!.style.visibility = 'visible' 97 | iframeRef.current!.style.colorScheme = colorScheme.scheme 98 | setLoaded(true) 99 | } catch (e) { 100 | console.log(e) 101 | } 102 | } 103 | 104 | window.addEventListener('message', sizeHandler) 105 | 106 | return () => { 107 | window.removeEventListener('message', sizeHandler) 108 | } 109 | }, [iframeRef.current]) 110 | 111 | const entryHtml = props.ns === '.' ? 112 | 'ILSPluginUser' : `I${props.ns}Proxy` 113 | return ( 114 | 117 | 118 | {!loaded && } 119 | 120 | 124 | 125 | 126 | ) 127 | } -------------------------------------------------------------------------------- /docs/components/Discuss.tsx: -------------------------------------------------------------------------------- 1 | import useScript from '../helpers/useScript' 2 | import { useEffect } from 'react' 3 | 4 | export function Discuss ( 5 | props: { ns: string, name: string } 6 | ) { 7 | 8 | const status = useScript( 9 | 'https://utteranc.es/client.js', 10 | { 11 | 'repo': 'logseq/plugins', 12 | 'issue-term': `🧩 ${props.ns === '.' ? 'logseq' : `logseq.${props.ns}`}.${props.name}`, 13 | 'theme': `preferred-color-scheme`, 14 | 'crossorigin': 'anonymous' 15 | }, '#discuss-container') 16 | 17 | useEffect(() => { 18 | console.debug('[Discuss] ', status) 19 | }, [status]) 20 | 21 | return ( 22 |
23 |
24 | ) 25 | } -------------------------------------------------------------------------------- /docs/components/Icons.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export const LogseqLogo = React.forwardRef(function LogseqLogoInner (props: { 4 | color: string, 5 | [key: string]: string 6 | }, _ref) { 7 | return ( 8 | 13 | 18 | 21 | 22 | 24 | 26 | 28 | 29 | 30 | 31 | 32 | ) 33 | }) 34 | 35 | type ISpriteIconProps = { x: number, y: number, className: string } & Record 36 | 37 | export function SpriteIcon ( 38 | props: ISpriteIconProps 39 | ) { 40 | const { x, y, className, ...rest } = props 41 | 42 | return ( 43 | 46 | ) 47 | } 48 | 49 | export function SpriteIconProperty () { 50 | return () 51 | } 52 | 53 | export function SpriteIconMethod () { 54 | return () 55 | } 56 | 57 | export function SpriteIconInterface (props: any) { 58 | return () 59 | } -------------------------------------------------------------------------------- /docs/components/Sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "logseq": [ 3 | [ 4 | "baseInfo", 5 | "Property" 6 | ], 7 | [ 8 | "caller", 9 | "Property" 10 | ], 11 | [ 12 | "connected", 13 | "Property" 14 | ], 15 | [ 16 | "isMainUIVisible", 17 | "Property" 18 | ], 19 | [ 20 | "settings", 21 | "Property" 22 | ], 23 | [ 24 | "beforeunload", 25 | "Method" 26 | ], 27 | [ 28 | "hideMainUI", 29 | "Method" 30 | ], 31 | [ 32 | "hideSettingsUI", 33 | "Method" 34 | ], 35 | [ 36 | "onSettingsChanged", 37 | "Method" 38 | ], 39 | [ 40 | "provideModel", 41 | "Method" 42 | ], 43 | [ 44 | "provideStyle", 45 | "Method" 46 | ], 47 | [ 48 | "provideTheme", 49 | "Method" 50 | ], 51 | [ 52 | "provideUI", 53 | "Method" 54 | ], 55 | [ 56 | "ready", 57 | "Method" 58 | ], 59 | [ 60 | "resolveResourceFullUrl", 61 | "Method" 62 | ], 63 | [ 64 | "setMainUIAttrs", 65 | "Method" 66 | ], 67 | [ 68 | "setMainUIInlineStyle", 69 | "Method" 70 | ], 71 | [ 72 | "showMainUI", 73 | "Method" 74 | ], 75 | [ 76 | "showSettingsUI", 77 | "Method" 78 | ], 79 | [ 80 | "toggleMainUI", 81 | "Method" 82 | ], 83 | [ 84 | "updateSettings", 85 | "Method" 86 | ], 87 | [ 88 | "useSettingsSchema", 89 | "Method" 90 | ] 91 | ], 92 | "App": [ 93 | [ 94 | "onBlockRendererSlotted", 95 | "Property" 96 | ], 97 | [ 98 | "onCurrentGraphChanged", 99 | "Property" 100 | ], 101 | [ 102 | "onMacroRendererSlotted", 103 | "Property" 104 | ], 105 | [ 106 | "onPageHeadActionsSlotted", 107 | "Property" 108 | ], 109 | [ 110 | "onRouteChanged", 111 | "Property" 112 | ], 113 | [ 114 | "onSidebarVisibleChanged", 115 | "Property" 116 | ], 117 | [ 118 | "onThemeModeChanged", 119 | "Property" 120 | ], 121 | [ 122 | "execGitCommand", 123 | "Method" 124 | ], 125 | [ 126 | "getCurrentGraph", 127 | "Method" 128 | ], 129 | [ 130 | "getInfo", 131 | "Method" 132 | ], 133 | [ 134 | "getStateFromStore", 135 | "Method" 136 | ], 137 | [ 138 | "getUserConfigs", 139 | "Method" 140 | ], 141 | [ 142 | "getUserInfo", 143 | "Method" 144 | ], 145 | [ 146 | "invokeExternalCommand", 147 | "Method" 148 | ], 149 | [ 150 | "openExternalLink", 151 | "Method" 152 | ], 153 | [ 154 | "pushState", 155 | "Method" 156 | ], 157 | [ 158 | "queryElementById", 159 | "Method" 160 | ], 161 | [ 162 | "queryElementRect", 163 | "Method" 164 | ], 165 | [ 166 | "quit", 167 | "Method" 168 | ], 169 | [ 170 | "registerCommand", 171 | "Method" 172 | ], 173 | [ 174 | "registerCommandPalette", 175 | "Method" 176 | ], 177 | [ 178 | "registerCommandShortcut", 179 | "Method" 180 | ], 181 | [ 182 | "registerPageMenuItem", 183 | "Method" 184 | ], 185 | [ 186 | "registerUIItem", 187 | "Method" 188 | ], 189 | [ 190 | "relaunch", 191 | "Method" 192 | ], 193 | [ 194 | "replaceState", 195 | "Method" 196 | ], 197 | [ 198 | "setFullScreen", 199 | "Method" 200 | ], 201 | [ 202 | "setLeftSidebarVisible", 203 | "Method" 204 | ], 205 | [ 206 | "setRightSidebarVisible", 207 | "Method" 208 | ], 209 | [ 210 | "setZoomFactor", 211 | "Method" 212 | ], 213 | [ 214 | "showMsg", 215 | "Method" 216 | ] 217 | ], 218 | "Editor": [ 219 | [ 220 | "onInputSelectionEnd", 221 | "Property" 222 | ], 223 | [ 224 | "appendBlockInPage", 225 | "Method" 226 | ], 227 | [ 228 | "checkEditing", 229 | "Method" 230 | ], 231 | [ 232 | "createPage", 233 | "Method" 234 | ], 235 | [ 236 | "deletePage", 237 | "Method" 238 | ], 239 | [ 240 | "editBlock", 241 | "Method" 242 | ], 243 | [ 244 | "exitEditingMode", 245 | "Method" 246 | ], 247 | [ 248 | "getAllPages", 249 | "Method" 250 | ], 251 | [ 252 | "getBlock", 253 | "Method" 254 | ], 255 | [ 256 | "getBlockProperties", 257 | "Method" 258 | ], 259 | [ 260 | "getBlockProperty", 261 | "Method" 262 | ], 263 | [ 264 | "getCurrentBlock", 265 | "Method" 266 | ], 267 | [ 268 | "getCurrentPage", 269 | "Method" 270 | ], 271 | [ 272 | "getCurrentPageBlocksTree", 273 | "Method" 274 | ], 275 | [ 276 | "getEditingBlockContent", 277 | "Method" 278 | ], 279 | [ 280 | "getEditingCursorPosition", 281 | "Method" 282 | ], 283 | [ 284 | "getNextSiblingBlock", 285 | "Method" 286 | ], 287 | [ 288 | "getPage", 289 | "Method" 290 | ], 291 | [ 292 | "getPageBlocksTree", 293 | "Method" 294 | ], 295 | [ 296 | "getPageLinkedReferences", 297 | "Method" 298 | ], 299 | [ 300 | "getPagesFromNamespace", 301 | "Method" 302 | ], 303 | [ 304 | "getPagesTreeFromNamespace", 305 | "Method" 306 | ], 307 | [ 308 | "getPreviousSiblingBlock", 309 | "Method" 310 | ], 311 | [ 312 | "getSelectedBlocks", 313 | "Method" 314 | ], 315 | [ 316 | "insertAtEditingCursor", 317 | "Method" 318 | ], 319 | [ 320 | "insertBatchBlock", 321 | "Method" 322 | ], 323 | [ 324 | "insertBlock", 325 | "Method" 326 | ], 327 | [ 328 | "moveBlock", 329 | "Method" 330 | ], 331 | [ 332 | "openInRightSidebar", 333 | "Method" 334 | ], 335 | [ 336 | "prependBlockInPage", 337 | "Method" 338 | ], 339 | [ 340 | "registerBlockContextMenuItem", 341 | "Method" 342 | ], 343 | [ 344 | "registerSlashCommand", 345 | "Method" 346 | ], 347 | [ 348 | "removeBlock", 349 | "Method" 350 | ], 351 | [ 352 | "removeBlockProperty", 353 | "Method" 354 | ], 355 | [ 356 | "renamePage", 357 | "Method" 358 | ], 359 | [ 360 | "restoreEditingCursor", 361 | "Method" 362 | ], 363 | [ 364 | "scrollToBlockInPage", 365 | "Method" 366 | ], 367 | [ 368 | "setBlockCollapsed", 369 | "Method" 370 | ], 371 | [ 372 | "updateBlock", 373 | "Method" 374 | ], 375 | [ 376 | "upsertBlockProperty", 377 | "Method" 378 | ] 379 | ], 380 | "DB": [ 381 | [ 382 | "onChanged", 383 | "Property" 384 | ], 385 | [ 386 | "datascriptQuery", 387 | "Method" 388 | ], 389 | [ 390 | "onBlockChanged", 391 | "Method" 392 | ], 393 | [ 394 | "q", 395 | "Method" 396 | ] 397 | ], 398 | "Git": [ 399 | [ 400 | "execCommand", 401 | "Method" 402 | ], 403 | [ 404 | "loadIgnoreFile", 405 | "Method" 406 | ], 407 | [ 408 | "saveIgnoreFile", 409 | "Method" 410 | ] 411 | ], 412 | "UI": [ 413 | [ 414 | "closeMsg", 415 | "Method" 416 | ], 417 | [ 418 | "showMsg", 419 | "Method" 420 | ] 421 | ], 422 | "Assets": [ 423 | [ 424 | "listFilesOfCurrentGraph", 425 | "Method" 426 | ] 427 | ], 428 | "FileStorage": [] 429 | } -------------------------------------------------------------------------------- /docs/components/Sidebar.tsx: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | import sidebarData from './Sidebar.json' 3 | import { ChevronDownIcon, ChevronLeftIcon, SearchIcon } from '@primer/octicons-react' 4 | import { useLocalStorage } from '../helpers/useLocalStorage' 5 | import { Dialog } from '@primer/react/lib-esm/Dialog/Dialog' 6 | import { Box, FilterList, TextInput } from '@primer/react' 7 | import { useEffect, useRef, useState } from 'react' 8 | import { LogseqLogo, SpriteIconInterface, SpriteIconMethod, SpriteIconProperty } from '@/components/Icons' 9 | import Fuse from 'fuse.js' 10 | import { useRouter } from 'next/router' 11 | 12 | let fuseInstance: any = null 13 | 14 | export function ItemLabel (props: { name: string, kind: string }) { 15 | const { name, kind } = props 16 | const isStartOnProperty = name?.startsWith('on') 17 | const isProperty = (kind === 'Property') && !isStartOnProperty 18 | const isMethod = (kind === 'Method') || isStartOnProperty 19 | 20 | return ( 21 |
22 | {isProperty ? () : ( 23 | isMethod ? () : null 24 | )} 25 | {name} 26 |
) 27 | } 28 | 29 | export function SearchDialogContent ( 30 | props: { 31 | closeDialog: () => void 32 | } 33 | ) { 34 | const router = useRouter() 35 | const inputRef = useRef(null) 36 | const elRef = useRef(null) 37 | const [searchResult, setSearchResult] = useState({ 38 | items: [], 39 | selected: 0 40 | }) 41 | const goToItem = (item: { name: string, kink: string }) => { 42 | const paths = item.name.split('.') 43 | 44 | if (paths?.[0] !== 'logseq') { 45 | paths.unshift('logseq') 46 | } 47 | 48 | router.push('/' + paths.join('/')) 49 | } 50 | 51 | useEffect(() => { 52 | if (!fuseInstance) { 53 | fuseInstance = new Fuse( 54 | Object.entries(sidebarData) 55 | .reduce((acc: any, it) => { 56 | const [ns, vs] = it 57 | vs?.forEach(v => { 58 | acc.push({ 59 | name: `${ns}.${v[0]}`, 60 | kind: v[1] 61 | }) 62 | }) 63 | return acc 64 | }, []), 65 | { 66 | includeMatches: true, 67 | includeScore: true, 68 | keys: ['name'], 69 | minMatchCharLength: 2, 70 | threshold: 0.1 71 | } 72 | ) 73 | } 74 | }, []) 75 | 76 | useEffect(() => { 77 | const dialogEl = elRef.current?.closest('div[role=dialog]') 78 | dialogEl?.classList.add('lsp-search-dialog') 79 | const dialogElWrap = dialogEl?.parentElement 80 | dialogElWrap?.classList.add('lsp-search-dialog-wrap') 81 | 82 | dialogElWrap?.addEventListener('click', (e) => { 83 | const target = e.target 84 | if (target === dialogElWrap) { 85 | props.closeDialog() 86 | } 87 | }) 88 | }, []) 89 | 90 | const onSearchHandle = (value: string) => { 91 | value = value?.trim() 92 | 93 | const result = fuseInstance?.search(value) 94 | 95 | setSearchResult({ 96 | items: result, selected: 0 97 | }) 98 | } 99 | 100 | return ( 101 |
104 | {/* search input*/} 105 |
106 | onSearchHandle(e.target.value)} 115 | onKeyDown={e => { 116 | const which = e.which 117 | const isDown = which === 40 118 | const isUp = which === 38 119 | const isEsc = which === 27 120 | const isEnter = which === 13 121 | const inResultingLength = +searchResult.items?.length 122 | const stopEvent = () => { 123 | e.stopPropagation() 124 | e.preventDefault() 125 | } 126 | 127 | if (isEsc) { 128 | if (inResultingLength) { 129 | inputRef.current!.value = '' 130 | setSearchResult({ 131 | items: [], 132 | selected: 0 133 | }) 134 | stopEvent() 135 | } 136 | 137 | return 138 | } 139 | 140 | if (isEnter && inResultingLength) { 141 | const selectedItem: any = 142 | searchResult.items[searchResult.selected] 143 | goToItem(selectedItem?.item) 144 | props.closeDialog() 145 | return 146 | } 147 | 148 | if (isDown || isUp) { 149 | if (inResultingLength) { 150 | let selected = searchResult.selected + (isDown ? 1 : -1) 151 | 152 | if (selected >= inResultingLength) { 153 | selected = 0 154 | } else if (selected < 0) { 155 | selected = inResultingLength - 1 156 | } 157 | 158 | setSearchResult({ ...searchResult, selected }) 159 | stopEvent() 160 | } 161 | } 162 | }} 163 | /> 164 |
165 | 166 | {/* search result*/} 167 | {(searchResult?.items?.length > 0) && ( 168 |
169 | 170 | {searchResult.items.map((it, idx) => { 171 | const { item }: any = it 172 | return ( 173 | { 178 | goToItem(item) 179 | props.closeDialog() 180 | }} 181 | > 182 | 183 | 184 | ) 185 | })} 186 | 187 |
)} 188 |
189 | ) 190 | } 191 | 192 | export function SearchDialog ( 193 | props: { 194 | visible: boolean, 195 | closeDialog: () => void 196 | } 197 | ) { 198 | 199 | return ( 200 | <> 201 | {props.visible && 202 | ( <>} 205 | renderBody={() => } 206 | onClose={props.closeDialog} 207 | > 208 | Some content 209 | ) 210 | } 211 | 212 | ) 213 | } 214 | 215 | export function SidebarHeader () { 216 | const [activeSearch, setActiveSearch] = useState(false) 217 | 218 | // shortcuts 219 | useEffect(() => { 220 | const keyboardHandler = (e: KeyboardEvent) => { 221 | const isCmd = e.metaKey || e.ctrlKey 222 | const which = e.which 223 | 224 | // skip active 225 | if (document.activeElement?.nodeName.toLowerCase() === 'input') { 226 | return 227 | } 228 | 229 | if (which === 191 || (isCmd && (which === 75))) { // slash || cmd + k 230 | setActiveSearch(true) 231 | e.preventDefault() 232 | } 233 | } 234 | 235 | document.addEventListener('keydown', keyboardHandler) 236 | 237 | return () => { 238 | document.removeEventListener('keydown', keyboardHandler) 239 | } 240 | }, []) 241 | 242 | return ( 243 | <> 244 | 245 | 246 | 247 | 250 | 251 | 252 | Plugin API Docs 253 | 254 | 255 | 256 | setActiveSearch(true)}> 258 | 259 | 260 | 261 | 262 | setActiveSearch(false)}/> 265 | 266 | ) 267 | } 268 | 269 | export function Sidebar () { 270 | const activeCacheKey = 'lsp-navs-active-state' 271 | const [itemActiveState, setItemActiveState] = useLocalStorage( 272 | activeCacheKey, {} 273 | ) 274 | 275 | const toggleItemActive = (key: string) => { 276 | setItemActiveState( 277 | Object.assign({}, itemActiveState, { 278 | [key]: !itemActiveState[key] 279 | }) 280 | ) 281 | } 282 | 283 | return ( 284 | 285 | 286 | 287 | 288 | {Object.entries(sidebarData).map(([k, v]) => { 289 | const isRoot = (k === 'logseq') 290 | return ( 291 |
292 |
toggleItemActive(k)} 295 | > 296 |
297 | 298 | 299 | {!isRoot && 'logseq.'}{k} 300 | 301 |
302 | 303 | {itemActiveState[k] ? 304 | : 305 | 306 | } 307 |
308 | 309 | {/* Sub items */} 310 | {itemActiveState[k] && v.map(([name, kind]) => { 311 | const href = `/${isRoot ? '' : 'logseq/'}${k}/${name}` 312 | 313 | return ( 314 | 315 |
317 | 318 |
319 | ) 320 | })} 321 |
322 | ) 323 | })} 324 |
325 |
326 | ) 327 | } -------------------------------------------------------------------------------- /docs/helpers/env.ts: -------------------------------------------------------------------------------- 1 | export const isProd = process.env.NODE_ENV === 'production' 2 | export const lspApisEndpoint = 3 | isProd ? 'https://logseq.github.io/plugins/interfaces' : 4 | `https://logseq.github.io/plugins/interfaces` // `http://127.0.0.1:8080/interfaces` -------------------------------------------------------------------------------- /docs/helpers/useColorScheme.ts: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from 'react' 2 | 3 | export const PREFERENCES = { 4 | DARK: 'dark', 5 | LIGHT: 'light', 6 | NONE: 'no-preference', 7 | } 8 | 9 | export const values = [PREFERENCES.DARK, PREFERENCES.LIGHT, PREFERENCES.NONE] 10 | 11 | export const makeQuery = (pref: any) => `(prefers-color-scheme: ${pref})` 12 | 13 | export const matchPreference = (pref: any) => global?.window?.matchMedia(makeQuery(pref)) 14 | 15 | export const getPreference = (preferences: any) => 16 | preferences 17 | .map((value: any) => ({ 18 | preference: value, 19 | matchMedia: matchPreference(value), 20 | })) 21 | .filter((pref: any) => pref.matchMedia?.matches)[0] 22 | 23 | export const attachListener = (pref: any, setScheme: any) => { 24 | let unbind: any 25 | const listener = () => { 26 | const newPref = getPreference(values) 27 | setScheme(newPref.preference) 28 | pref.matchMedia.removeListener(listener) 29 | // recursion 30 | // NOTE: we need to attach a new listener to ensure it fires on next change 31 | unbind = attachListener(newPref, setScheme) 32 | } 33 | pref.matchMedia.addListener(listener) 34 | return () => { 35 | if (unbind) { 36 | unbind() 37 | } else { 38 | pref.matchMedia.removeListener(listener) 39 | } 40 | } 41 | } 42 | 43 | // NOTE: outside hook to avoid this value recomputing 44 | const initialPreference = getPreference(values) 45 | 46 | export const useColorScheme = () => { 47 | if (typeof window !== 'undefined' && !('matchMedia' in global?.window)) { 48 | // can not detect 49 | return { scheme: PREFERENCES.NONE } 50 | } 51 | const [scheme, setScheme] = useState( 52 | initialPreference ? initialPreference.preference : PREFERENCES.NONE 53 | ) 54 | 55 | useEffect(() => { 56 | if (!initialPreference) return 57 | return attachListener(initialPreference, setScheme) 58 | }, []) 59 | 60 | return { scheme } 61 | } -------------------------------------------------------------------------------- /docs/helpers/useLocalStorage.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from 'react' 2 | 3 | export function useLocalStorage (key: string, initialValue: any) { 4 | // State to store our value 5 | // Pass initial state function to useState so logic is only executed once 6 | const [storedValue, setStoredValue] = useState(initialValue) 7 | // Return a wrapped version of useState's setter function that ... 8 | // ... persists the new value to localStorage. 9 | const setValue = (value: any) => { 10 | try { 11 | // Allow value to be a function so we have same API as useState 12 | const valueToStore = 13 | value instanceof Function ? value(storedValue) : value 14 | // Save state 15 | setStoredValue(valueToStore) 16 | // Save to local storage 17 | if (typeof window !== 'undefined') { 18 | window.localStorage.setItem(key, JSON.stringify(valueToStore)) 19 | } 20 | } catch (error) { 21 | // A more advanced implementation would handle the error case 22 | console.log(error) 23 | } 24 | } 25 | 26 | useEffect(() => { 27 | if (typeof window === 'undefined') { 28 | return 29 | } 30 | 31 | try { 32 | // Get from local storage by key 33 | const item = window.localStorage.getItem(key) 34 | // Parse stored json or if none return initialValue 35 | setValue(item ? JSON.parse(item) : initialValue) 36 | } catch (error) { 37 | // If error also return initialValue 38 | console.log(error) 39 | setValue(initialValue) 40 | } 41 | }, []) 42 | 43 | return [storedValue, setValue] 44 | } -------------------------------------------------------------------------------- /docs/helpers/useScript.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from 'react' 2 | 3 | export type Status = 'idle' | 'loading' | 'ready' | 'error' 4 | export type ScriptElt = HTMLScriptElement | null 5 | 6 | function useScript (src: string, attrs?: Record, container?: string): Status { 7 | const [status, setStatus] = useState(src ? 'loading' : 'idle') 8 | 9 | useEffect( 10 | () => { 11 | if (!src) { 12 | setStatus('idle') 13 | return 14 | } 15 | 16 | // Fetch existing script element by src 17 | // It may have been added by another instance of this hook 18 | let script: ScriptElt = document.querySelector(`script[src="${src}"]`) 19 | 20 | if (!script) { 21 | // Create script 22 | script = document.createElement('script') 23 | script.src = src 24 | script.async = true 25 | script.setAttribute('data-status', 'loading') 26 | 27 | // Custom attributes 28 | if (attrs) { 29 | Object.entries(attrs).forEach(([k, v]) => { 30 | script!.setAttribute(k, v) 31 | }) 32 | } 33 | 34 | // Add script to document body 35 | if (container) { 36 | document.querySelector(container)!.appendChild(script) 37 | } else { 38 | document.body.appendChild(script) 39 | } 40 | 41 | // Store status in attribute on script 42 | // This can be read by other instances of this hook 43 | const setAttributeFromEvent = (event: Event) => { 44 | script?.setAttribute( 45 | 'data-status', 46 | event.type === 'load' ? 'ready' : 'error', 47 | ) 48 | } 49 | 50 | script.addEventListener('load', setAttributeFromEvent) 51 | script.addEventListener('error', setAttributeFromEvent) 52 | } else { 53 | // Grab existing script status from attribute and set to state. 54 | setStatus(script.getAttribute('data-status') as Status) 55 | } 56 | 57 | // Script event handler to update status in state 58 | // Note: Even if the script already exists we still need to add 59 | // event handlers to update the state for *this* hook instance. 60 | const setStateFromEvent = (event: Event) => { 61 | setStatus(event.type === 'load' ? 'ready' : 'error') 62 | } 63 | 64 | // Add event listeners 65 | script.addEventListener('load', setStateFromEvent) 66 | script.addEventListener('error', setStateFromEvent) 67 | 68 | // Remove event listeners on cleanup 69 | return () => { 70 | if (script) { 71 | script.removeEventListener('load', setStateFromEvent) 72 | script.removeEventListener('error', setStateFromEvent) 73 | } 74 | } 75 | }, 76 | [src], // Only re-run effect if script src changes 77 | ) 78 | 79 | return status 80 | } 81 | 82 | export default useScript 83 | -------------------------------------------------------------------------------- /docs/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /docs/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | module.exports = { 3 | reactStrictMode: true, 4 | webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => { 5 | // Important: return the modified config 6 | config.devServer = { 7 | proxy: { 8 | '/apis': { 9 | target: 'http://127.0.0.1:8080', 10 | pathRewrite: { '^/apis': '' } 11 | } 12 | } 13 | } 14 | 15 | return config 16 | } 17 | } -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@primer/octicons-react": "^17.2.0", 13 | "@primer/react": "^35.2.1", 14 | "@types/marked": "^4.0.3", 15 | "fuse.js": "^6.6.2", 16 | "marked": "^4.0.16", 17 | "next": "12.1.6", 18 | "react": "^18.1.0", 19 | "react-dom": "^18.1.0", 20 | "react-markdown": "^8.0.3", 21 | "styled-components": "^5.3.5", 22 | "use-color-scheme": "^1.1.3", 23 | "use-local-storage-state": "^17.0.1" 24 | }, 25 | "devDependencies": { 26 | "@nuxt/postcss8": "^1.1.3", 27 | "@types/node": "17.0.35", 28 | "@types/react": "18.0.9", 29 | "@types/react-dom": "18.0.4", 30 | "eslint": "8.16.0", 31 | "eslint-config-next": "12.1.6", 32 | "mustache": "^4.2.0", 33 | "postcss": "^8.4.14", 34 | "tailwindcss": "^3.0.24", 35 | "typescript": "4.6.4" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /docs/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import '../styles/globals.css' 2 | import '../styles/github.css' 3 | import type { AppProps } from 'next/app' 4 | import { Box, ThemeProvider, theme } from '@primer/react' 5 | import { Sidebar } from '@/components/Sidebar' 6 | import { useColorScheme } from '../helpers/useColorScheme' 7 | 8 | function App ({ Component, pageProps }: AppProps) { 9 | const { scheme } = useColorScheme() 10 | 11 | return ( 12 | // @ts-ignore 13 | 18 | 21 | 25 | 26 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | ) 36 | } 37 | 38 | export default App 39 | -------------------------------------------------------------------------------- /docs/pages/_page.tpl: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const {{name}}: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default {{name}} -------------------------------------------------------------------------------- /docs/pages/api/hello.ts: -------------------------------------------------------------------------------- 1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction 2 | import type { NextApiRequest, NextApiResponse } from 'next' 3 | 4 | type Data = { 5 | name: string 6 | } 7 | 8 | export default function handler( 9 | req: NextApiRequest, 10 | res: NextApiResponse 11 | ) { 12 | res.status(200).json({ name: 'John Doe' }) 13 | } 14 | -------------------------------------------------------------------------------- /docs/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import type { NextPage } from 'next' 2 | import { marked } from 'marked' 3 | import { DescriptionHeader } from '@/components/Description' 4 | 5 | const mdContent = marked.parse(` 6 | ## Logseq Plugin API docs 7 | 8 | This is a community-driven documentation for Logseq plugin APIs. 9 | 10 | Samples 👉 https://github.com/logseq/logseq-plugin-samples 11 | APIs 👉 https://logseq.github.io/plugins/ 12 | 13 | ### How to contribute? 14 | 15 | - The comments doc of plugin APIs is powered by [Typedoc](https://typedoc.org/guides/doccomments/). You can improve the corresponding 16 | documentation by following the links below. 17 | 18 | ![alt](/contribute_1.png) 19 | 20 | - Another way is to provide some demo code or best practice instructions by the function of comments. 21 | 22 | ![alt](/contribute_2.png) 23 | `) 24 | 25 | const Home: NextPage = () => { 26 | return ( 27 |
28 | 29 | 30 |
33 |
34 | 35 | ) 36 | } 37 | 38 | export default Home 39 | -------------------------------------------------------------------------------- /docs/pages/logseq/App/execGitCommand.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const execGitCommand: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default execGitCommand -------------------------------------------------------------------------------- /docs/pages/logseq/App/getCurrentGraph.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getCurrentGraph: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getCurrentGraph -------------------------------------------------------------------------------- /docs/pages/logseq/App/getInfo.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getInfo: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getInfo -------------------------------------------------------------------------------- /docs/pages/logseq/App/getStateFromStore.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getStateFromStore: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default getStateFromStore -------------------------------------------------------------------------------- /docs/pages/logseq/App/getUserConfigs.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getUserConfigs: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getUserConfigs -------------------------------------------------------------------------------- /docs/pages/logseq/App/getUserInfo.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getUserInfo: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getUserInfo -------------------------------------------------------------------------------- /docs/pages/logseq/App/invokeExternalCommand.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const invokeExternalCommand: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default invokeExternalCommand -------------------------------------------------------------------------------- /docs/pages/logseq/App/onBlockRendererSlotted.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const onBlockRendererSlotted: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default onBlockRendererSlotted -------------------------------------------------------------------------------- /docs/pages/logseq/App/onCurrentGraphChanged.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const onCurrentGraphChanged: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default onCurrentGraphChanged -------------------------------------------------------------------------------- /docs/pages/logseq/App/onMacroRendererSlotted.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const onMacroRendererSlotted: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default onMacroRendererSlotted -------------------------------------------------------------------------------- /docs/pages/logseq/App/onPageHeadActionsSlotted.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const onPageHeadActionsSlotted: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default onPageHeadActionsSlotted -------------------------------------------------------------------------------- /docs/pages/logseq/App/onRouteChanged.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const onRouteChanged: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default onRouteChanged -------------------------------------------------------------------------------- /docs/pages/logseq/App/onSidebarVisibleChanged.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const onSidebarVisibleChanged: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default onSidebarVisibleChanged -------------------------------------------------------------------------------- /docs/pages/logseq/App/onThemeModeChanged.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const onThemeModeChanged: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default onThemeModeChanged -------------------------------------------------------------------------------- /docs/pages/logseq/App/openExternalLink.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const openExternalLink: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default openExternalLink -------------------------------------------------------------------------------- /docs/pages/logseq/App/pushState.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const pushState: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default pushState -------------------------------------------------------------------------------- /docs/pages/logseq/App/queryElementById.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const queryElementById: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default queryElementById -------------------------------------------------------------------------------- /docs/pages/logseq/App/queryElementRect.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const queryElementRect: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default queryElementRect -------------------------------------------------------------------------------- /docs/pages/logseq/App/quit.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const quit: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default quit -------------------------------------------------------------------------------- /docs/pages/logseq/App/registerCommand.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const registerCommand: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default registerCommand -------------------------------------------------------------------------------- /docs/pages/logseq/App/registerCommandPalette.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const registerCommandPalette: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default registerCommandPalette -------------------------------------------------------------------------------- /docs/pages/logseq/App/registerCommandShortcut.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const registerCommandShortcut: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default registerCommandShortcut -------------------------------------------------------------------------------- /docs/pages/logseq/App/registerPageMenuItem.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const registerPageMenuItem: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default registerPageMenuItem -------------------------------------------------------------------------------- /docs/pages/logseq/App/registerUIItem.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const registerUIItem: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default registerUIItem -------------------------------------------------------------------------------- /docs/pages/logseq/App/relaunch.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const relaunch: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default relaunch -------------------------------------------------------------------------------- /docs/pages/logseq/App/replaceState.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const replaceState: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default replaceState -------------------------------------------------------------------------------- /docs/pages/logseq/App/setFullScreen.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const setFullScreen: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default setFullScreen -------------------------------------------------------------------------------- /docs/pages/logseq/App/setLeftSidebarVisible.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const setLeftSidebarVisible: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default setLeftSidebarVisible -------------------------------------------------------------------------------- /docs/pages/logseq/App/setRightSidebarVisible.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const setRightSidebarVisible: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default setRightSidebarVisible -------------------------------------------------------------------------------- /docs/pages/logseq/App/setZoomFactor.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const setZoomFactor: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default setZoomFactor -------------------------------------------------------------------------------- /docs/pages/logseq/App/showMsg.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const showMsg: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default showMsg -------------------------------------------------------------------------------- /docs/pages/logseq/Assets/listFilesOfCurrentGraph.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const listFilesOfCurrentGraph: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default listFilesOfCurrentGraph -------------------------------------------------------------------------------- /docs/pages/logseq/DB/datascriptQuery.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const datascriptQuery: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default datascriptQuery -------------------------------------------------------------------------------- /docs/pages/logseq/DB/onBlockChanged.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const onBlockChanged: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default onBlockChanged -------------------------------------------------------------------------------- /docs/pages/logseq/DB/onChanged.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const onChanged: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default onChanged -------------------------------------------------------------------------------- /docs/pages/logseq/DB/q.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const q: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default q -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/appendBlockInPage.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const appendBlockInPage: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default appendBlockInPage -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/checkEditing.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const checkEditing: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default checkEditing -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/createPage.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const createPage: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default createPage -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/deletePage.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const deletePage: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default deletePage -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/editBlock.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const editBlock: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default editBlock -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/exitEditingMode.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const exitEditingMode: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default exitEditingMode -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getAllPages.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getAllPages: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getAllPages -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getBlock.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getBlock: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getBlock -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getBlockProperties.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getBlockProperties: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getBlockProperties -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getBlockProperty.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getBlockProperty: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getBlockProperty -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getCurrentBlock.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getCurrentBlock: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getCurrentBlock -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getCurrentPage.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getCurrentPage: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getCurrentPage -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getCurrentPageBlocksTree.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getCurrentPageBlocksTree: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default getCurrentPageBlocksTree -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getEditingBlockContent.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getEditingBlockContent: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getEditingBlockContent -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getEditingCursorPosition.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getEditingCursorPosition: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getEditingCursorPosition -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getNextSiblingBlock.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getNextSiblingBlock: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getNextSiblingBlock -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getPage.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getPage: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getPage -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getPageBlocksTree.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getPageBlocksTree: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default getPageBlocksTree -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getPageLinkedReferences.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getPageLinkedReferences: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default getPageLinkedReferences -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getPagesFromNamespace.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getPagesFromNamespace: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default getPagesFromNamespace -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getPagesTreeFromNamespace.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getPagesTreeFromNamespace: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default getPagesTreeFromNamespace -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getPreviousSiblingBlock.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getPreviousSiblingBlock: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getPreviousSiblingBlock -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/getSelectedBlocks.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const getSelectedBlocks: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default getSelectedBlocks -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/insertAtEditingCursor.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const insertAtEditingCursor: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default insertAtEditingCursor -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/insertBatchBlock.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const insertBatchBlock: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default insertBatchBlock -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/insertBlock.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const insertBlock: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default insertBlock -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/moveBlock.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const moveBlock: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default moveBlock -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/onInputSelectionEnd.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const onInputSelectionEnd: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default onInputSelectionEnd -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/openInRightSidebar.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const openInRightSidebar: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default openInRightSidebar -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/prependBlockInPage.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const prependBlockInPage: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default prependBlockInPage -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/registerBlockContextMenuItem.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const registerBlockContextMenuItem: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default registerBlockContextMenuItem -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/registerSlashCommand.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const registerSlashCommand: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default registerSlashCommand -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/removeBlock.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const removeBlock: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default removeBlock -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/removeBlockProperty.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const removeBlockProperty: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default removeBlockProperty -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/renamePage.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const renamePage: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default renamePage -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/restoreEditingCursor.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const restoreEditingCursor: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default restoreEditingCursor -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/scrollToBlockInPage.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const scrollToBlockInPage: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default scrollToBlockInPage -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/setBlockCollapsed.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const setBlockCollapsed: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default setBlockCollapsed -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/updateBlock.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const updateBlock: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default updateBlock -------------------------------------------------------------------------------- /docs/pages/logseq/Editor/upsertBlockProperty.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const upsertBlockProperty: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default upsertBlockProperty -------------------------------------------------------------------------------- /docs/pages/logseq/Experiments.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const Experiments: NextPage = () => { 6 | return ( 7 |
8 | 13 | 14 | 18 |
19 | ) 20 | } 21 | 22 | export default Experiments -------------------------------------------------------------------------------- /docs/pages/logseq/FileStorage.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const FileStorage: NextPage = () => { 6 | return ( 7 |
8 | 13 | 14 | 18 |
19 | ) 20 | } 21 | 22 | export default FileStorage -------------------------------------------------------------------------------- /docs/pages/logseq/Git/execCommand.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const execCommand: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default execCommand -------------------------------------------------------------------------------- /docs/pages/logseq/Git/loadIgnoreFile.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const loadIgnoreFile: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default loadIgnoreFile -------------------------------------------------------------------------------- /docs/pages/logseq/Git/saveIgnoreFile.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const saveIgnoreFile: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default saveIgnoreFile -------------------------------------------------------------------------------- /docs/pages/logseq/UI/closeMsg.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const closeMsg: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default closeMsg -------------------------------------------------------------------------------- /docs/pages/logseq/UI/showMsg.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const showMsg: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default showMsg -------------------------------------------------------------------------------- /docs/pages/logseq/addListener.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const addListener: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default addListener -------------------------------------------------------------------------------- /docs/pages/logseq/baseInfo.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const baseInfo: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default baseInfo -------------------------------------------------------------------------------- /docs/pages/logseq/beforeunload.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const beforeunload: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default beforeunload -------------------------------------------------------------------------------- /docs/pages/logseq/caller.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const caller: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default caller -------------------------------------------------------------------------------- /docs/pages/logseq/connected.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const connected: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default connected -------------------------------------------------------------------------------- /docs/pages/logseq/emit.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const emit: NextPage = () => { 6 | return ( 7 |
8 | 14 | 15 | 19 |
20 | ) 21 | } 22 | 23 | export default emit -------------------------------------------------------------------------------- /docs/pages/logseq/eventNames.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const eventNames: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default eventNames -------------------------------------------------------------------------------- /docs/pages/logseq/hideMainUI.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const hideMainUI: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default hideMainUI -------------------------------------------------------------------------------- /docs/pages/logseq/hideSettingsUI.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const hideSettingsUI: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default hideSettingsUI -------------------------------------------------------------------------------- /docs/pages/logseq/isMainUIVisible.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const isMainUIVisible: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default isMainUIVisible -------------------------------------------------------------------------------- /docs/pages/logseq/listenerCount.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const listenerCount: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default listenerCount -------------------------------------------------------------------------------- /docs/pages/logseq/listeners.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const listeners: NextPage = () => { 6 | return ( 7 |
8 | 14 | 15 | 19 |
20 | ) 21 | } 22 | 23 | export default listeners -------------------------------------------------------------------------------- /docs/pages/logseq/onSettingsChanged.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const onSettingsChanged: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default onSettingsChanged -------------------------------------------------------------------------------- /docs/pages/logseq/once.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const once: NextPage = () => { 6 | return ( 7 |
8 | 14 | 15 | 19 |
20 | ) 21 | } 22 | 23 | export default once -------------------------------------------------------------------------------- /docs/pages/logseq/provideModel.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const provideModel: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default provideModel -------------------------------------------------------------------------------- /docs/pages/logseq/provideStyle.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const provideStyle: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default provideStyle -------------------------------------------------------------------------------- /docs/pages/logseq/provideTheme.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const provideTheme: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default provideTheme -------------------------------------------------------------------------------- /docs/pages/logseq/provideUI.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const provideUI: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default provideUI -------------------------------------------------------------------------------- /docs/pages/logseq/ready.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const ready: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default ready -------------------------------------------------------------------------------- /docs/pages/logseq/removeAllListeners.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const removeAllListeners: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default removeAllListeners -------------------------------------------------------------------------------- /docs/pages/logseq/removeListener.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const removeListener: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default removeListener -------------------------------------------------------------------------------- /docs/pages/logseq/resolveResourceFullUrl.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const resolveResourceFullUrl: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default resolveResourceFullUrl -------------------------------------------------------------------------------- /docs/pages/logseq/setMainUIAttrs.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const setMainUIAttrs: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default setMainUIAttrs -------------------------------------------------------------------------------- /docs/pages/logseq/setMainUIInlineStyle.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const setMainUIInlineStyle: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default setMainUIInlineStyle -------------------------------------------------------------------------------- /docs/pages/logseq/settings.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const settings: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default settings -------------------------------------------------------------------------------- /docs/pages/logseq/showMainUI.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const showMainUI: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default showMainUI -------------------------------------------------------------------------------- /docs/pages/logseq/showSettingsUI.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const showSettingsUI: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default showSettingsUI -------------------------------------------------------------------------------- /docs/pages/logseq/toggleMainUI.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const toggleMainUI: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 19 | 20 | 24 |
25 | ) 26 | } 27 | 28 | export default toggleMainUI -------------------------------------------------------------------------------- /docs/pages/logseq/updateSettings.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const updateSettings: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default updateSettings -------------------------------------------------------------------------------- /docs/pages/logseq/useSettingsSchema.tsx: -------------------------------------------------------------------------------- 1 | import { NextPage } from 'next' 2 | import { Description, DescriptionHeader } from '@/components/Description' 3 | import { Discuss } from '@/components/Discuss' 4 | 5 | const useSettingsSchema: NextPage = () => { 6 | return ( 7 |
8 | 12 | 13 | 18 | 19 | 23 |
24 | ) 25 | } 26 | 27 | export default useSettingsSchema -------------------------------------------------------------------------------- /docs/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | }, 5 | } -------------------------------------------------------------------------------- /docs/public/contribute_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logseq/plugins/906ca3af66d82b3ce55a6724aa00423bec70cca6/docs/public/contribute_1.png -------------------------------------------------------------------------------- /docs/public/contribute_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logseq/plugins/906ca3af66d82b3ce55a6724aa00423bec70cca6/docs/public/contribute_2.png -------------------------------------------------------------------------------- /docs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logseq/plugins/906ca3af66d82b3ce55a6724aa00423bec70cca6/docs/public/favicon.ico -------------------------------------------------------------------------------- /docs/public/icons@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logseq/plugins/906ca3af66d82b3ce55a6724aa00423bec70cca6/docs/public/icons@2x.png -------------------------------------------------------------------------------- /docs/public/vercel.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /docs/scripts/build-apis.mjs: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs' 2 | import * as path from 'path' 3 | import mustache from 'mustache' 4 | 5 | const ROOT = path.resolve('..') 6 | const PAGES_ROOT = path.resolve('../pages') 7 | const LS_ROOT = path.join(PAGES_ROOT, 'logseq') 8 | const API_FILE = path.resolve('../../apis/out.json') 9 | const TEMPLATE_PAGE = path.join(PAGES_ROOT, '_page.tpl') 10 | 11 | const apisData = JSON.parse(fs.readFileSync(API_FILE).toString()) 12 | const pageTemplateContent = fs.readFileSync(TEMPLATE_PAGE).toString() 13 | 14 | const apiMaps = { 15 | 'ILSPluginUser': {}, 16 | 'IAppProxy': {}, 17 | 'IEditorProxy': {}, 18 | 'IDBProxy': {}, 19 | 'IGitProxy': {}, 20 | 'IUIProxy': {}, 21 | 'IAssetsProxy': {}, 22 | 23 | 'FileStorage': {} 24 | } 25 | 26 | function getNsKey (name) { 27 | if (name?.includes('Proxy')) { 28 | return name.substring(1).replace('Proxy', '') 29 | } else { 30 | return name 31 | } 32 | } 33 | 34 | function shouldIgnoreItem (name) { 35 | return name && 36 | (name.startsWith('_') || 37 | ['Editor', 'DB', 'Git', 'App', 'UI', 'Assets', 38 | 'FileStorage', 'Experiments', 39 | 'emit', 'on', 'off', 'once', 'listeners', 'listenerCount', 40 | 'eventNames', 'addListener', 'removeListener', 'removeAllListeners' 41 | ].some(it => { 42 | return name.toLowerCase() === it.toLowerCase() 43 | })) 44 | } 45 | 46 | function inflateApiMaps () { 47 | const nodes = apisData.children 48 | const apiKeys = Object.keys(apiMaps) 49 | 50 | nodes.forEach(it => { 51 | const name = it.name 52 | if (!name || !apiKeys.includes(name)) return 53 | it.children.forEach(it => { 54 | apiMaps[name][it.name] = it 55 | }) 56 | }) 57 | 58 | return apiMaps 59 | } 60 | 61 | function pickItemComment (item) { 62 | if (!item) return '' 63 | const ret = [item.comment?.shortText] 64 | 65 | if (item.signatures?.length) { 66 | item.signatures.forEach(it => { 67 | if (it.comment?.shortText) { 68 | ret.push(item.comment?.shortText) 69 | } 70 | }) 71 | } 72 | 73 | return ret.join('\n') 74 | } 75 | 76 | /** 77 | * build pages 78 | */ 79 | function build () { 80 | inflateApiMaps() 81 | 82 | const rootKey = 'ILSPluginUser' 83 | 84 | if (!fs.existsSync(PAGES_ROOT)) { 85 | fs.mkdirSync(PAGES_ROOT) 86 | } 87 | 88 | // region build navigate data 89 | const navigateData = Object.entries(apiMaps) 90 | .reduce((acc, [name, v]) => { 91 | const ns = (rootKey === name) ? 'logseq' : getNsKey(name) 92 | const values = Object.entries(v) 93 | .reduce((acc, [k, p]) => { 94 | if (!shouldIgnoreItem(k)) { 95 | acc.push([k, p.kindString]) 96 | } 97 | return acc 98 | }, []) 99 | // .filter(name => !shouldIgnoreItem(name)) 100 | acc[ns] = values 101 | return acc 102 | }, {}) 103 | 104 | const fileDest = path.join(ROOT, 'components', 'Sidebar.json') 105 | const fileContent = JSON.stringify(navigateData, null, 2) 106 | fs.writeFileSync(fileDest, fileContent) 107 | // endregion 108 | 109 | Object.entries(apiMaps).forEach(([k, v]) => { 110 | let ns = '' 111 | const nsDest = path.join( 112 | PAGES_ROOT, 'logseq', 113 | (ns = (rootKey === k) ? '.' : getNsKey(k)) 114 | ) 115 | 116 | if (!fs.existsSync(nsDest)) { 117 | fs.mkdirSync(nsDest) 118 | } 119 | 120 | let count = 0 121 | 122 | Object.entries(v).forEach(([name, item]) => { 123 | if (shouldIgnoreItem(name)) { 124 | return 125 | } 126 | 127 | const fileDest = path.join(nsDest, `${name}.tsx`) 128 | const comment = pickItemComment(item) 129 | const data = { ns, name, comment } 130 | const fileContent = mustache.render(pageTemplateContent, data) 131 | 132 | fs.writeFileSync(fileDest, fileContent) 133 | count += 1 134 | }) 135 | 136 | console.log(`===== ${path.basename(nsDest)} :generate ${count} pages =====`) 137 | }) 138 | } 139 | 140 | // console.log( 141 | // // mustache.render( 142 | // // pageTemplateContent, 143 | // // { name: 'ProvideUI' } 144 | // // ), 145 | // // apisData 146 | // // inflateApiMaps() 147 | // ) 148 | 149 | build() 150 | -------------------------------------------------------------------------------- /docs/styles/Home.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | padding: 0 2rem; 3 | } 4 | 5 | .main { 6 | min-height: 100vh; 7 | padding: 4rem 0; 8 | flex: 1; 9 | display: flex; 10 | flex-direction: column; 11 | justify-content: center; 12 | align-items: center; 13 | } 14 | 15 | .footer { 16 | display: flex; 17 | flex: 1; 18 | padding: 2rem 0; 19 | border-top: 1px solid #eaeaea; 20 | justify-content: center; 21 | align-items: center; 22 | } 23 | 24 | .footer a { 25 | display: flex; 26 | justify-content: center; 27 | align-items: center; 28 | flex-grow: 1; 29 | } 30 | 31 | .title a { 32 | color: #0070f3; 33 | text-decoration: none; 34 | } 35 | 36 | .title a:hover, 37 | .title a:focus, 38 | .title a:active { 39 | text-decoration: underline; 40 | } 41 | 42 | .title { 43 | margin: 0; 44 | line-height: 1.15; 45 | font-size: 4rem; 46 | } 47 | 48 | .title, 49 | .description { 50 | text-align: center; 51 | } 52 | 53 | .description { 54 | margin: 4rem 0; 55 | line-height: 1.5; 56 | font-size: 1.5rem; 57 | } 58 | 59 | .code { 60 | background: #fafafa; 61 | border-radius: 5px; 62 | padding: 0.75rem; 63 | font-size: 1.1rem; 64 | font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, 65 | Bitstream Vera Sans Mono, Courier New, monospace; 66 | } 67 | 68 | .grid { 69 | display: flex; 70 | align-items: center; 71 | justify-content: center; 72 | flex-wrap: wrap; 73 | max-width: 800px; 74 | } 75 | 76 | .card { 77 | margin: 1rem; 78 | padding: 1.5rem; 79 | text-align: left; 80 | color: inherit; 81 | text-decoration: none; 82 | border: 1px solid #eaeaea; 83 | border-radius: 10px; 84 | transition: color 0.15s ease, border-color 0.15s ease; 85 | max-width: 300px; 86 | } 87 | 88 | .card:hover, 89 | .card:focus, 90 | .card:active { 91 | color: #0070f3; 92 | border-color: #0070f3; 93 | } 94 | 95 | .card h2 { 96 | margin: 0 0 1rem 0; 97 | font-size: 1.5rem; 98 | } 99 | 100 | .card p { 101 | margin: 0; 102 | font-size: 1.25rem; 103 | line-height: 1.5; 104 | } 105 | 106 | .logo { 107 | height: 1em; 108 | margin-left: 0.5rem; 109 | } 110 | 111 | @media (max-width: 600px) { 112 | .grid { 113 | width: 100%; 114 | flex-direction: column; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /docs/styles/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | html, 6 | body { 7 | @apply dark:text-gray-800; 8 | 9 | padding: 0; 10 | margin: 0; 11 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 12 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 13 | } 14 | 15 | html ::-webkit-scrollbar-thumb { 16 | background-color: rgba(0, 0, 0, .1); 17 | } 18 | 19 | html ::-webkit-scrollbar { 20 | background-color: rgba(0, 0, 0, .05); 21 | width: 5px; 22 | height: 8px; 23 | border-radius: 2px; 24 | } 25 | 26 | html ::-webkit-scrollbar-thumb:hover { 27 | background-color: rgba(0, 0, 0, .3); 28 | } 29 | 30 | html ::-webkit-scrollbar-thumb:active { 31 | background-color: rgba(0, 0, 0, .5); 32 | } 33 | 34 | html ::-webkit-scrollbar-corner { 35 | background: transparent; 36 | } 37 | 38 | a { 39 | color: inherit; 40 | text-decoration: none; 41 | } 42 | 43 | * { 44 | box-sizing: border-box; 45 | } 46 | 47 | :root { 48 | --lsp-header-height: 48px; 49 | --lsp-content-max-width: 996px; 50 | } 51 | 52 | .main-container { 53 | @apply dark:text-gray-300; 54 | 55 | height: 100vh; 56 | justify-content: center; 57 | } 58 | 59 | .main-container > .l { 60 | min-height: 100vh; 61 | border-right-width: 1px; 62 | border-right-style: solid; 63 | } 64 | 65 | .main-container > .l .nav-sidebar-content { 66 | width: 280px; 67 | padding-bottom: 20px; 68 | } 69 | 70 | .main-description { 71 | border-bottom-width: 1px; 72 | border-bottom-style: solid; 73 | max-width: calc(var(--lsp-content-max-width) - 50px); 74 | } 75 | 76 | .main-description iframe { 77 | visibility: hidden; 78 | margin: 0 -15px; 79 | } 80 | 81 | .main-description-header { 82 | height: var(--lsp-header-height); 83 | } 84 | 85 | .nav-sidebar-container { 86 | position: relative; 87 | padding-top: var(--lsp-header-height); 88 | } 89 | 90 | .nav-sidebar-header { 91 | height: var(--lsp-header-height); 92 | position: absolute; 93 | top: 0; 94 | left: 0; 95 | width: calc(100% + 1px); 96 | } 97 | 98 | .nav-item { 99 | 100 | } 101 | 102 | .nav-sidebar-content { 103 | overflow-y: scroll; 104 | } 105 | 106 | .nav-sidebar-content dl { 107 | user-select: none; 108 | } 109 | 110 | .nav-sidebar-content dt { 111 | @apply bg-gray-50 dark:bg-black/90; 112 | 113 | font-size: 16px; 114 | font-weight: bold; 115 | position: sticky; 116 | top: 0; 117 | } 118 | 119 | .nav-sidebar-content dt, .nav-sidebar-content dd { 120 | cursor: pointer; 121 | } 122 | 123 | .nav-sidebar-content dd { 124 | @apply hover:bg-gray-100 dark:hover:bg-gray-800/50; 125 | 126 | font-size: 14px; 127 | } 128 | 129 | .nav-sidebar-content dd.active { 130 | @apply bg-blue-300/25; 131 | } 132 | 133 | .main-container > .r { 134 | flex: 1; 135 | max-height: 100vh; 136 | overflow: auto; 137 | } 138 | 139 | .main-page-content { 140 | height: 100%; 141 | overflow-y: auto; 142 | overflow-x: hidden; 143 | } 144 | 145 | .utterances { 146 | max-width: unset; 147 | } 148 | 149 | .utterances-frame { 150 | color-scheme: light; 151 | position: static; 152 | /* left: 0; */ 153 | /* right: 0; */ 154 | min-width: unset; 155 | max-width: unset; 156 | height: 100%; 157 | border: 0; 158 | width: 99%; 159 | } 160 | 161 | #discuss-container { 162 | @apply px-10 mb-60; 163 | 164 | max-width: var(--lsp-content-max-width); 165 | } 166 | 167 | 168 | .lsp-search-dialog-wrap { 169 | align-items: flex-start !important; 170 | padding-top: 128px; 171 | } 172 | 173 | .lsp-search-dialog { 174 | border-radius: 12px !important; 175 | } 176 | 177 | .lsp-sprite-icon { 178 | display: inline-block; 179 | width: 17px; 180 | height: 17px; 181 | background-image: url("../public/icons@2x.png"); 182 | background-size: 238px 204px; 183 | } 184 | 185 | .lsp-search-result-wrap { 186 | max-height: 70vh; 187 | overflow-y: auto; 188 | } 189 | 190 | .markdown-body img { 191 | width: 70%; 192 | } -------------------------------------------------------------------------------- /docs/tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | content: [ 3 | './pages/**/*.{js,ts,jsx,tsx}', 4 | './components/**/*.{js,ts,jsx,tsx}', 5 | ], 6 | theme: { 7 | extend: {}, 8 | }, 9 | plugins: [], 10 | } -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true, 17 | "baseUrl": ".", 18 | "paths": { 19 | "@/components/*": ["components/*"] 20 | } 21 | }, 22 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 23 | "exclude": ["node_modules"] 24 | } 25 | -------------------------------------------------------------------------------- /interfaces/AppGraphInfo.html: -------------------------------------------------------------------------------- 1 | AppGraphInfo | @logseq/libs
2 |
3 | 10 |
11 |
12 |
13 |
14 | 17 |

Interface AppGraphInfo

18 |
19 |

In Logseq, a graph represents a repository of connected pages and blocks

20 |
21 |
22 |

Hierarchy

23 |
    24 |
  • AppGraphInfo
25 |
26 |

Indexable

27 |
[key: string]: any
30 |
31 |
32 |
33 | 34 |
35 |
36 |

Properties

37 |
name 38 | path 39 | url 40 |
41 |
42 |

Properties

43 |
44 | 45 |
name: string
48 |
49 | 50 |
path: string
53 |
54 | 55 |
url: string
58 |
86 |
87 |

Generated using TypeDoc

88 |
-------------------------------------------------------------------------------- /interfaces/AppInfo.html: -------------------------------------------------------------------------------- 1 | AppInfo | @logseq/libs
2 |
3 | 10 |
11 |
12 |
13 |
14 | 17 |

Interface AppInfo

18 |
19 |

Hierarchy

20 |
    21 |
  • AppInfo
22 |
23 |

Indexable

24 |
[key: string]: any
27 |
28 |
29 |
30 | 31 |
32 |
33 |

Properties

34 |
version 35 |
36 |
37 |

Properties

38 |
39 | 40 |
version: string
43 |
69 |
70 |

Generated using TypeDoc

71 |
-------------------------------------------------------------------------------- /interfaces/IUIProxy.html: -------------------------------------------------------------------------------- 1 | IUIProxy | @logseq/libs
2 |
3 | 10 |
11 |
12 |
13 |
14 | 17 |

Interface IUIProxy

18 |
19 |

Hierarchy

20 |
    21 |
  • IUIProxy
24 |
25 |
26 |
27 | 28 |
29 |
30 |

Properties

31 |
closeMsg 32 | showMsg 33 |
34 |
35 |

Properties

36 |
37 | 38 |
closeMsg: ((key: string) => void)
39 |
40 |

Type declaration

41 |
    42 |
  • 43 |
      44 |
    • (key: string): void
    • 45 |
    • 46 |
      47 |

      Parameters

      48 |
        49 |
      • 50 |
        key: string
      51 |

      Returns void

54 |
55 | 56 |
showMsg: ((content: string, status?: string, opts?: Partial<UIMsgOptions>) => Promise<string>)
57 |
58 |

Type declaration

59 |
    60 |
  • 61 |
      62 |
    • (content: string, status?: string, opts?: Partial<UIMsgOptions>): Promise<string>
    • 63 |
    • 64 |
      65 |

      Added

      0.0.2

      66 |
      67 |
      68 |

      Parameters

      69 |
        70 |
      • 71 |
        content: string
      • 72 |
      • 73 |
        Optional status: string
      • 74 |
      • 75 |
        Optional opts: Partial<UIMsgOptions>
      76 |

      Returns Promise<string>

79 |
106 |
107 |

Generated using TypeDoc

108 |
-------------------------------------------------------------------------------- /interfaces/LSPluginBaseInfo.html: -------------------------------------------------------------------------------- 1 | LSPluginBaseInfo | @logseq/libs
2 |
3 | 10 |
11 |
12 |
13 |
14 | 17 |

Interface LSPluginBaseInfo

18 |
19 |

Hierarchy

20 |
    21 |
  • LSPluginBaseInfo
22 |
23 |

Indexable

24 |
[key: string]: any
27 |
28 |
29 |
30 | 31 |
32 |
33 |

Properties

34 |
id 35 | mode 36 | settings 37 |
38 |
39 |

Properties

40 |
41 | 42 |
id: string
45 |
46 | 47 |
mode: "iframe" | "shadow"
50 |
51 | 52 |
settings: {
    disabled: boolean;
    [key: string]: any;
}
53 |
54 |

Type declaration

55 |
    56 |
  • 57 |
    [key: string]: any
  • 58 |
  • 59 |
    disabled: boolean
62 |
90 |
91 |

Generated using TypeDoc

92 |
-------------------------------------------------------------------------------- /interfaces/LegacyTheme.html: -------------------------------------------------------------------------------- 1 | LegacyTheme | @logseq/libs
2 |
3 | 10 |
11 |
12 |
13 |
14 | 17 |

Interface LegacyTheme

18 |
19 |

Hierarchy

20 |
    21 |
  • LegacyTheme 22 |
26 |
27 |
28 |
29 | 30 |
31 |
32 |

Properties

33 |
description? 34 | mode? 35 | name 36 | pid 37 | url 38 |
39 |
40 |

Properties

41 |
42 | 43 |
description?: string
46 |
47 | 48 |
mode?: ThemeMode
51 |
52 | 53 |
name: string
56 |
57 | 58 |
pid: string
61 |
62 | 63 |
url: string
66 |
96 |
97 |

Generated using TypeDoc

98 |
-------------------------------------------------------------------------------- /lsp.js: -------------------------------------------------------------------------------- 1 | function hide (el) { 2 | el.style.display = 'none' 3 | } 4 | 5 | function show (el, display = 'block') { 6 | el.style.display = display 7 | } 8 | 9 | function hideVisibility (el) { 10 | el.style.visibility = 'hidden' 11 | } 12 | 13 | function showVisibility (el) { 14 | el.style.visibility = 'visible' 15 | } 16 | 17 | function hideElements () { 18 | [ 19 | '.col-content > .tsd-panel', 20 | '.container-main .col-menu.menu-highlight', 21 | '.container-main > .col-content > .tsd-sources', 22 | '.tsd-page-title', 23 | '.tsd-page-toolbar', 24 | '.tsd-index-group', 25 | '.tsd-hierarchy' 26 | ].forEach(selector => { 27 | const els = document.querySelectorAll(selector) 28 | if (!els) return 29 | Array.from(els).forEach(it => { 30 | hide(it) 31 | }) 32 | }) 33 | 34 | const panelThs = document.querySelectorAll('.tsd-panel-group > h2') 35 | panelThs.forEach(it => { 36 | it.style.display = 'none' 37 | }) 38 | 39 | const footerEl = [...document.querySelectorAll('body > .container')].pop() 40 | footerEl.style.display = 'none' 41 | 42 | const genEl = document.querySelector('.tsd-generator') 43 | genEl.style.display = 'none' 44 | 45 | // region hide all-of-other panels 46 | const hashId = window.location.hash.replace('#', '') 47 | if (!hashId) { 48 | return 49 | } 50 | 51 | let targetSize = {} 52 | 53 | const memberEls = document.querySelectorAll('.tsd-member') 54 | memberEls.forEach(it => { 55 | const anchorEl = it.children.item(0) 56 | if (!anchorEl || anchorEl.tagName?.toLowerCase() !== 'a') { 57 | console.error('[Error anchorEl]', it) 58 | return 59 | } 60 | 61 | const memberKey = anchorEl.id.toLowerCase() 62 | 63 | if (memberKey !== hashId.toLowerCase()) { 64 | it.style.display = 'none' 65 | } else { 66 | it.style.position = 'fixed' 67 | it.style.left = '0px' 68 | it.style.top = '0px' 69 | it.style.width = '100%' 70 | it.style.zIndex = 999 71 | it.style.marginTop = '0px' 72 | 73 | // hide tsd-parameters 74 | ;[it.querySelector('.tsd-parameters'), 75 | it.querySelector('.tsd-parameters-title'), 76 | it.querySelector('.tsd-returns-title'), 77 | it.querySelector('.tsd-type-parameters-title'), 78 | it.querySelector('.tsd-type-parameters') 79 | ].forEach(it => it && hide(it)) 80 | 81 | // apply size of body 82 | const { height } = it.getBoundingClientRect() 83 | Object.assign( 84 | document.body.style, 85 | { 86 | height: height + 'px', 87 | overflow: 'hidden', 88 | background: 'transparent' 89 | } 90 | ) 91 | 92 | // apply link top open in new panel 93 | it.querySelectorAll('a').forEach(link => { 94 | if (!link.href) return 95 | link.setAttribute('target', '_blank') 96 | }) 97 | 98 | targetSize.height = height 99 | } 100 | }) 101 | // endregion 102 | 103 | return targetSize 104 | } 105 | 106 | function adjustElements () { 107 | const panels = document.querySelectorAll('.tsd-panel') 108 | 109 | Array.from(panels).forEach(it => { 110 | it.style.boxShadow = 'none' 111 | it.style.background = 'transparent' 112 | }) 113 | 114 | const main = document.querySelector('.container-main .col-content') 115 | main.style.width = 'auto' 116 | } 117 | 118 | // entry 119 | (function () { 120 | if (top !== this) { 121 | hideVisibility(document.documentElement) 122 | 123 | window.onmessage = (e) => { 124 | if (e?.data === 'ready') { 125 | 126 | try { 127 | const targetSize = hideElements() 128 | adjustElements() 129 | 130 | top.postMessage(JSON.stringify({ 131 | type: 'size', 132 | payload: targetSize 133 | }), '*') 134 | } catch (e) { 135 | console.error('LSP:', e) 136 | } 137 | 138 | setTimeout(() => { 139 | showVisibility(document.documentElement) 140 | }, 50) 141 | } 142 | } 143 | } 144 | }()) --------------------------------------------------------------------------------