@lapis-notes/api 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (400) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/LICENSE.md +4 -0
  3. package/README.md +43 -0
  4. package/dist/__tests__/data-adapter-conformance.js +205 -0
  5. package/dist/__tests__/lapis-runtime-manifest.js +32 -0
  6. package/dist/__tests__/svelte-internal-client.d.ts +3 -0
  7. package/dist/agent-result-views.d.ts +52 -0
  8. package/dist/agent-result-views.js +89 -0
  9. package/dist/agent-skills.d.ts +99 -0
  10. package/dist/agent-skills.js +182 -0
  11. package/dist/agent-tools.d.ts +92 -0
  12. package/dist/agent-tools.js +139 -0
  13. package/dist/app-database-host.d.ts +4 -0
  14. package/dist/app-database-host.js +4 -0
  15. package/dist/app-shell-plugin-persistence.d.ts +15 -0
  16. package/dist/app-shell-plugin-persistence.js +34 -0
  17. package/dist/app-url.d.ts +54 -0
  18. package/dist/app-url.js +269 -0
  19. package/dist/application-compatibility.d.ts +31 -0
  20. package/dist/application-compatibility.js +64 -0
  21. package/dist/application-state.svelte.d.ts +14 -0
  22. package/dist/application-state.svelte.js +30 -0
  23. package/dist/assets/lapis-logo.svg +471 -0
  24. package/dist/bases.d.ts +281 -0
  25. package/dist/bases.js +475 -0
  26. package/dist/cache.svelte.d.ts +569 -0
  27. package/dist/cache.svelte.js +1433 -0
  28. package/dist/command.svelte.d.ts +337 -0
  29. package/dist/command.svelte.js +571 -0
  30. package/dist/compat.d.ts +29 -0
  31. package/dist/compat.js +30 -0
  32. package/dist/components/configuration/configuration.css +199 -0
  33. package/dist/components/configuration/date-setting.svelte +71 -0
  34. package/dist/components/configuration/date-setting.svelte.d.ts +8 -0
  35. package/dist/components/configuration/list-setting.svelte +128 -0
  36. package/dist/components/configuration/list-setting.svelte.d.ts +13 -0
  37. package/dist/components/configuration/object-array-row-grip.svelte +78 -0
  38. package/dist/components/configuration/object-array-row-grip.svelte.d.ts +9 -0
  39. package/dist/components/configuration/object-array-row.svelte +163 -0
  40. package/dist/components/configuration/object-array-row.svelte.d.ts +19 -0
  41. package/dist/components/configuration/object-array-setting.svelte +196 -0
  42. package/dist/components/configuration/object-array-setting.svelte.d.ts +15 -0
  43. package/dist/components/configuration/object-array-table-dnd.d.ts +8 -0
  44. package/dist/components/configuration/object-array-table-dnd.js +10 -0
  45. package/dist/components/configuration/object-array-utils.d.ts +11 -0
  46. package/dist/components/configuration/object-array-utils.js +103 -0
  47. package/dist/components/configuration/object-grid-setting.svelte +79 -0
  48. package/dist/components/configuration/object-grid-setting.svelte.d.ts +10 -0
  49. package/dist/components/configuration/object-map-row.svelte +147 -0
  50. package/dist/components/configuration/object-map-row.svelte.d.ts +15 -0
  51. package/dist/components/configuration/object-map-setting.svelte +137 -0
  52. package/dist/components/configuration/object-map-setting.svelte.d.ts +14 -0
  53. package/dist/components/configuration/object-map-types.d.ts +5 -0
  54. package/dist/components/configuration/object-map-types.js +1 -0
  55. package/dist/components/configuration/options-combobox-setting.svelte +129 -0
  56. package/dist/components/configuration/options-combobox-setting.svelte.d.ts +12 -0
  57. package/dist/components/copy-button/button.svelte +93 -0
  58. package/dist/components/copy-button/button.svelte.d.ts +13 -0
  59. package/dist/components/copy-button/index.d.ts +2 -0
  60. package/dist/components/copy-button/index.js +2 -0
  61. package/dist/components/editor/editor.css +565 -0
  62. package/dist/components/editor/editor.d.ts +33 -0
  63. package/dist/components/editor/editor.js +132 -0
  64. package/dist/components/editor/editor.svelte +176 -0
  65. package/dist/components/editor/editor.svelte.d.ts +15 -0
  66. package/dist/components/editor/embedded-editor-surface.d.ts +12 -0
  67. package/dist/components/editor/embedded-editor-surface.js +22 -0
  68. package/dist/components/editor/embedded-editor-surface.svelte +115 -0
  69. package/dist/components/editor/embedded-editor-surface.svelte.d.ts +17 -0
  70. package/dist/components/editor/extensions/autocomplete/index.d.ts +2 -0
  71. package/dist/components/editor/extensions/autocomplete/index.js +2 -0
  72. package/dist/components/editor/extensions/autocomplete/lapis-code-mirror-autocomplete.d.ts +16 -0
  73. package/dist/components/editor/extensions/autocomplete/lapis-code-mirror-autocomplete.js +34 -0
  74. package/dist/components/editor/extensions/autocomplete/vault-completion-sources.d.ts +27 -0
  75. package/dist/components/editor/extensions/autocomplete/vault-completion-sources.js +55 -0
  76. package/dist/components/editor/extensions/class-highlighter/index.d.ts +1 -0
  77. package/dist/components/editor/extensions/class-highlighter/index.js +47 -0
  78. package/dist/components/editor/extensions/fold-gutter/index.d.ts +8 -0
  79. package/dist/components/editor/extensions/fold-gutter/index.js +40 -0
  80. package/dist/components/editor/extensions/gutter-line-style-sync/index.d.ts +2 -0
  81. package/dist/components/editor/extensions/gutter-line-style-sync/index.js +118 -0
  82. package/dist/components/editor/extensions/lint/index.d.ts +4 -0
  83. package/dist/components/editor/extensions/lint/index.js +4 -0
  84. package/dist/components/editor/extensions/lint/lapis-code-mirror-lint.d.ts +26 -0
  85. package/dist/components/editor/extensions/lint/lapis-code-mirror-lint.js +101 -0
  86. package/dist/components/editor/extensions/lint/lapis-lint-diagnostic-helpers.d.ts +8 -0
  87. package/dist/components/editor/extensions/lint/lapis-lint-diagnostic-helpers.js +7 -0
  88. package/dist/components/editor/extensions/lint/lapis-lint-diagnostic.d.ts +20 -0
  89. package/dist/components/editor/extensions/lint/lapis-lint-diagnostic.js +47 -0
  90. package/dist/components/editor/extensions/lint/lapis-lint-hover-tooltip.d.ts +9 -0
  91. package/dist/components/editor/extensions/lint/lapis-lint-hover-tooltip.js +373 -0
  92. package/dist/components/editor/extensions/lint/lapis-lint-inline-widget.d.ts +31 -0
  93. package/dist/components/editor/extensions/lint/lapis-lint-inline-widget.js +191 -0
  94. package/dist/components/editor/extensions/lint/lapis-lint-tooltip.svelte +176 -0
  95. package/dist/components/editor/extensions/lint/lapis-lint-tooltip.svelte.d.ts +15 -0
  96. package/dist/components/editor/extensions/lint/lint-tooltip-actions.d.ts +11 -0
  97. package/dist/components/editor/extensions/lint/lint-tooltip-actions.js +21 -0
  98. package/dist/components/editor/extensions/lint/mount-lint-tooltip.d.ts +16 -0
  99. package/dist/components/editor/extensions/lint/mount-lint-tooltip.js +60 -0
  100. package/dist/components/editor/extensions/search/dom.d.ts +2 -0
  101. package/dist/components/editor/extensions/search/dom.js +6 -0
  102. package/dist/components/editor/extensions/search/index.d.ts +35 -0
  103. package/dist/components/editor/extensions/search/index.js +44 -0
  104. package/dist/components/editor/extensions/search/search.svelte +335 -0
  105. package/dist/components/editor/extensions/search/search.svelte.d.ts +8 -0
  106. package/dist/components/editor/index.d.ts +9 -0
  107. package/dist/components/editor/index.js +9 -0
  108. package/dist/components/editor/language-service/dom.d.ts +1 -0
  109. package/dist/components/editor/language-service/dom.js +6 -0
  110. package/dist/components/editor/language-service/index.d.ts +28 -0
  111. package/dist/components/editor/language-service/index.js +342 -0
  112. package/dist/components/empty-view/empty-view.css +39 -0
  113. package/dist/components/empty-view/empty-view.svelte +26 -0
  114. package/dist/components/empty-view/empty-view.svelte.d.ts +9 -0
  115. package/dist/components/empty-view/index.d.ts +2 -0
  116. package/dist/components/empty-view/index.js +2 -0
  117. package/dist/components/icon/icon-list.css +74 -0
  118. package/dist/components/icon/icon-list.svelte +213 -0
  119. package/dist/components/icon/icon-list.svelte.d.ts +11 -0
  120. package/dist/components/icon/icon.svelte +15 -0
  121. package/dist/components/icon/icon.svelte.d.ts +7 -0
  122. package/dist/components/icon/index.d.ts +3 -0
  123. package/dist/components/icon/index.js +3 -0
  124. package/dist/components/menu/context-menu.svelte +89 -0
  125. package/dist/components/menu/context-menu.svelte.d.ts +11 -0
  126. package/dist/components/menu/drawer-menu.svelte +83 -0
  127. package/dist/components/menu/drawer-menu.svelte.d.ts +8 -0
  128. package/dist/components/menu/dropdown-menu.svelte +89 -0
  129. package/dist/components/menu/dropdown-menu.svelte.d.ts +11 -0
  130. package/dist/components/menu/index.d.ts +6 -0
  131. package/dist/components/menu/index.js +6 -0
  132. package/dist/components/menu/menu.css +139 -0
  133. package/dist/components/menu/menu.svelte +37 -0
  134. package/dist/components/menu/menu.svelte.d.ts +11 -0
  135. package/dist/components/menu/mobile-menu-query.svelte.d.ts +3 -0
  136. package/dist/components/menu/mobile-menu-query.svelte.js +21 -0
  137. package/dist/components/menu/popover-menu.svelte +90 -0
  138. package/dist/components/menu/popover-menu.svelte.d.ts +10 -0
  139. package/dist/components/select/index.d.ts +2 -0
  140. package/dist/components/select/index.js +2 -0
  141. package/dist/components/select/select.svelte +72 -0
  142. package/dist/components/select/select.svelte.d.ts +25 -0
  143. package/dist/configuration-option-source-providers.d.ts +17 -0
  144. package/dist/configuration-option-source-providers.js +59 -0
  145. package/dist/configuration-option-source-registry.d.ts +59 -0
  146. package/dist/configuration-option-source-registry.js +123 -0
  147. package/dist/configuration.svelte.d.ts +258 -0
  148. package/dist/configuration.svelte.js +887 -0
  149. package/dist/context-keys.svelte.d.ts +42 -0
  150. package/dist/context-keys.svelte.js +278 -0
  151. package/dist/context.svelte.d.ts +247 -0
  152. package/dist/context.svelte.js +540 -0
  153. package/dist/daily-document-provider.d.ts +38 -0
  154. package/dist/daily-document-provider.js +176 -0
  155. package/dist/design-core-button-types.d.ts +7 -0
  156. package/dist/design-core-button-types.js +1 -0
  157. package/dist/diagnostics.d.ts +93 -0
  158. package/dist/diagnostics.js +84 -0
  159. package/dist/dialog-portal.d.ts +3 -0
  160. package/dist/dialog-portal.js +3 -0
  161. package/dist/docs-api.d.ts +44 -0
  162. package/dist/docs-api.js +29 -0
  163. package/dist/editor-view-registry.d.ts +35 -0
  164. package/dist/editor-view-registry.js +112 -0
  165. package/dist/editor.svelte.d.ts +126 -0
  166. package/dist/editor.svelte.js +454 -0
  167. package/dist/embed-registry.d.ts +15 -0
  168. package/dist/embed-registry.js +16 -0
  169. package/dist/enhance.d.ts +111 -0
  170. package/dist/enhance.js +309 -0
  171. package/dist/events.d.ts +28 -0
  172. package/dist/events.js +49 -0
  173. package/dist/file-manager.d.ts +90 -0
  174. package/dist/file-manager.js +289 -0
  175. package/dist/file-tools/app-tools.d.ts +3 -0
  176. package/dist/file-tools/app-tools.js +242 -0
  177. package/dist/file-tools/index.d.ts +3 -0
  178. package/dist/file-tools/index.js +3 -0
  179. package/dist/file-tools/paths.d.ts +14 -0
  180. package/dist/file-tools/paths.js +33 -0
  181. package/dist/file-tools/vault-operations.d.ts +3 -0
  182. package/dist/file-tools/vault-operations.js +60 -0
  183. package/dist/generated/plugin-host-modules.schema.generated.d.ts +371 -0
  184. package/dist/generated/plugin-host-modules.schema.generated.js +374 -0
  185. package/dist/glob.d.ts +15 -0
  186. package/dist/glob.js +68 -0
  187. package/dist/history.svelte.d.ts +24 -0
  188. package/dist/history.svelte.js +74 -0
  189. package/dist/hooks/createVirtualizer.svelte.d.ts +7 -0
  190. package/dist/hooks/createVirtualizer.svelte.js +70 -0
  191. package/dist/hooks/index.d.ts +5 -0
  192. package/dist/hooks/index.js +5 -0
  193. package/dist/hooks/is-mobile.svelte.d.ts +5 -0
  194. package/dist/hooks/is-mobile.svelte.js +23 -0
  195. package/dist/hooks/mountComponent.svelte.d.ts +7 -0
  196. package/dist/hooks/mountComponent.svelte.js +16 -0
  197. package/dist/hooks/use-text-highlight.d.ts +17 -0
  198. package/dist/hooks/use-text-highlight.js +82 -0
  199. package/dist/hooks/useBoundingRect.svelte.d.ts +11 -0
  200. package/dist/hooks/useBoundingRect.svelte.js +46 -0
  201. package/dist/icons/index.d.ts +57 -0
  202. package/dist/icons/index.js +288 -0
  203. package/dist/index.d.ts +87 -0
  204. package/dist/index.js +87 -0
  205. package/dist/language-service/index.d.ts +9 -0
  206. package/dist/language-service/index.js +7 -0
  207. package/dist/language-service/manager.d.ts +47 -0
  208. package/dist/language-service/manager.js +404 -0
  209. package/dist/language-service/types.d.ts +92 -0
  210. package/dist/language-service/types.js +1 -0
  211. package/dist/language-service/virtual-document.d.ts +11 -0
  212. package/dist/language-service/virtual-document.js +45 -0
  213. package/dist/language-service/worker-protocol.d.ts +63 -0
  214. package/dist/language-service/worker-protocol.js +1 -0
  215. package/dist/language-service/worker-provider.d.ts +9 -0
  216. package/dist/language-service/worker-provider.js +38 -0
  217. package/dist/lapis-extension.d.ts +244 -0
  218. package/dist/lapis-extension.js +591 -0
  219. package/dist/links.d.ts +34 -0
  220. package/dist/links.js +191 -0
  221. package/dist/loaders.d.ts +9 -0
  222. package/dist/loaders.js +59 -0
  223. package/dist/localization-manager.svelte.d.ts +56 -0
  224. package/dist/localization-manager.svelte.js +157 -0
  225. package/dist/logging.d.ts +172 -0
  226. package/dist/logging.js +352 -0
  227. package/dist/markdown-extension-registry.d.ts +31 -0
  228. package/dist/markdown-extension-registry.js +31 -0
  229. package/dist/markdown-file-surface-registry.d.ts +25 -0
  230. package/dist/markdown-file-surface-registry.js +23 -0
  231. package/dist/markdown.d.ts +205 -0
  232. package/dist/markdown.js +147 -0
  233. package/dist/menu-utils.d.ts +1 -0
  234. package/dist/menu-utils.js +47 -0
  235. package/dist/menu.svelte.d.ts +121 -0
  236. package/dist/menu.svelte.js +295 -0
  237. package/dist/metadata-value.d.ts +10 -0
  238. package/dist/metadata-value.js +173 -0
  239. package/dist/metadata.svelte.d.ts +106 -0
  240. package/dist/metadata.svelte.js +608 -0
  241. package/dist/notifications.d.ts +209 -0
  242. package/dist/notifications.js +338 -0
  243. package/dist/open-file.d.ts +23 -0
  244. package/dist/open-file.js +102 -0
  245. package/dist/platform.d.ts +86 -0
  246. package/dist/platform.js +86 -0
  247. package/dist/plugin-asset-server.d.ts +60 -0
  248. package/dist/plugin-asset-server.js +222 -0
  249. package/dist/plugin-assets.d.ts +4 -0
  250. package/dist/plugin-assets.js +3 -0
  251. package/dist/plugin-capability-facade.d.ts +104 -0
  252. package/dist/plugin-capability-facade.js +61 -0
  253. package/dist/plugin-dependency-resolver.d.ts +36 -0
  254. package/dist/plugin-dependency-resolver.js +54 -0
  255. package/dist/plugin-dependency-scanner.d.ts +9 -0
  256. package/dist/plugin-dependency-scanner.js +274 -0
  257. package/dist/plugin-distribution/canonical-json.d.ts +1 -0
  258. package/dist/plugin-distribution/canonical-json.js +40 -0
  259. package/dist/plugin-distribution/compatibility.d.ts +5 -0
  260. package/dist/plugin-distribution/compatibility.js +38 -0
  261. package/dist/plugin-distribution/errors.d.ts +11 -0
  262. package/dist/plugin-distribution/errors.js +13 -0
  263. package/dist/plugin-distribution/hashes.d.ts +2 -0
  264. package/dist/plugin-distribution/hashes.js +17 -0
  265. package/dist/plugin-distribution/index.d.ts +18 -0
  266. package/dist/plugin-distribution/index.js +18 -0
  267. package/dist/plugin-distribution/installed-plugin-state.d.ts +20 -0
  268. package/dist/plugin-distribution/installed-plugin-state.js +73 -0
  269. package/dist/plugin-distribution/installer.d.ts +89 -0
  270. package/dist/plugin-distribution/installer.js +395 -0
  271. package/dist/plugin-distribution/manager.d.ts +128 -0
  272. package/dist/plugin-distribution/manager.js +358 -0
  273. package/dist/plugin-distribution/path-safety.d.ts +2 -0
  274. package/dist/plugin-distribution/path-safety.js +20 -0
  275. package/dist/plugin-distribution/plugin-bundle-verifier.d.ts +28 -0
  276. package/dist/plugin-distribution/plugin-bundle-verifier.js +96 -0
  277. package/dist/plugin-distribution/plugin-bundle-worker.d.ts +34 -0
  278. package/dist/plugin-distribution/plugin-bundle-worker.js +99 -0
  279. package/dist/plugin-distribution/plugin-bundle.d.ts +16 -0
  280. package/dist/plugin-distribution/plugin-bundle.js +244 -0
  281. package/dist/plugin-distribution/plugin-bundle.worker.d.ts +1 -0
  282. package/dist/plugin-distribution/plugin-bundle.worker.js +38 -0
  283. package/dist/plugin-distribution/registry-cache.d.ts +26 -0
  284. package/dist/plugin-distribution/registry-cache.js +85 -0
  285. package/dist/plugin-distribution/registry-client.d.ts +36 -0
  286. package/dist/plugin-distribution/registry-client.js +115 -0
  287. package/dist/plugin-distribution/reserved-ids.d.ts +4 -0
  288. package/dist/plugin-distribution/reserved-ids.js +10 -0
  289. package/dist/plugin-distribution/runtime-validation.d.ts +14 -0
  290. package/dist/plugin-distribution/runtime-validation.js +388 -0
  291. package/dist/plugin-distribution/schemas.d.ts +4895 -0
  292. package/dist/plugin-distribution/schemas.js +299 -0
  293. package/dist/plugin-distribution/signing.d.ts +5 -0
  294. package/dist/plugin-distribution/signing.js +38 -0
  295. package/dist/plugin-distribution/types.d.ts +217 -0
  296. package/dist/plugin-distribution/types.js +1 -0
  297. package/dist/plugin-install-progress.d.ts +15 -0
  298. package/dist/plugin-install-progress.js +86 -0
  299. package/dist/plugin-manager.d.ts +306 -0
  300. package/dist/plugin-manager.js +2848 -0
  301. package/dist/plugin-runtime-entry.d.ts +19 -0
  302. package/dist/plugin-runtime-entry.js +135 -0
  303. package/dist/plugin.d.ts +350 -0
  304. package/dist/plugin.js +754 -0
  305. package/dist/popover.d.ts +20 -0
  306. package/dist/popover.js +32 -0
  307. package/dist/promise-worker.d.ts +22 -0
  308. package/dist/promise-worker.js +65 -0
  309. package/dist/prompt-confirm.d.ts +9 -0
  310. package/dist/prompt-confirm.js +33 -0
  311. package/dist/search-document-provider.d.ts +45 -0
  312. package/dist/search-document-provider.js +54 -0
  313. package/dist/search-query/index.d.ts +78 -0
  314. package/dist/search-query/index.js +426 -0
  315. package/dist/search-query/parser.d.ts +3 -0
  316. package/dist/search-query/parser.js +16 -0
  317. package/dist/search-query/parser.terms.js +26 -0
  318. package/dist/search-query/search-query.grammar +128 -0
  319. package/dist/search.d.ts +19 -0
  320. package/dist/search.js +104 -0
  321. package/dist/setting-section-layout.d.ts +19 -0
  322. package/dist/setting-section-layout.js +194 -0
  323. package/dist/settings.svelte.d.ts +474 -0
  324. package/dist/settings.svelte.js +1421 -0
  325. package/dist/source-text-file-view.d.ts +25 -0
  326. package/dist/source-text-file-view.js +78 -0
  327. package/dist/status-bar.svelte.d.ts +29 -0
  328. package/dist/status-bar.svelte.js +72 -0
  329. package/dist/storage/app-database.d.ts +860 -0
  330. package/dist/storage/app-database.js +2372 -0
  331. package/dist/storage/blob-store.d.ts +12 -0
  332. package/dist/storage/blob-store.js +1 -0
  333. package/dist/storage/browser-app-database-coordination.d.ts +35 -0
  334. package/dist/storage/browser-app-database-coordination.js +207 -0
  335. package/dist/storage/browser-coordinated-app-database.d.ts +109 -0
  336. package/dist/storage/browser-coordinated-app-database.js +704 -0
  337. package/dist/storage/browser.d.ts +153 -0
  338. package/dist/storage/browser.js +794 -0
  339. package/dist/storage/desktop-native.d.ts +184 -0
  340. package/dist/storage/desktop-native.js +415 -0
  341. package/dist/storage/fs.d.ts +188 -0
  342. package/dist/storage/fs.js +307 -0
  343. package/dist/storage/index-projection.d.ts +236 -0
  344. package/dist/storage/index-projection.js +402 -0
  345. package/dist/storage/index.d.ts +17 -0
  346. package/dist/storage/index.js +17 -0
  347. package/dist/storage/keyval.d.ts +94 -0
  348. package/dist/storage/keyval.js +199 -0
  349. package/dist/storage/memory-vault-adapter.d.ts +44 -0
  350. package/dist/storage/memory-vault-adapter.js +351 -0
  351. package/dist/storage/native-vault-bootstrap-kv.d.ts +22 -0
  352. package/dist/storage/native-vault-bootstrap-kv.js +96 -0
  353. package/dist/storage/path.d.ts +22 -0
  354. package/dist/storage/path.js +110 -0
  355. package/dist/storage/search-embedding-provider.d.ts +75 -0
  356. package/dist/storage/search-embedding-provider.js +446 -0
  357. package/dist/storage/search-embedding-worker.d.ts +1 -0
  358. package/dist/storage/search-embedding-worker.js +63 -0
  359. package/dist/storage/search-query-evaluator.d.ts +14 -0
  360. package/dist/storage/search-query-evaluator.js +678 -0
  361. package/dist/storage/task-projection.d.ts +152 -0
  362. package/dist/storage/task-projection.js +154 -0
  363. package/dist/storage/turso-app-database.d.ts +150 -0
  364. package/dist/storage/turso-app-database.js +2671 -0
  365. package/dist/storage/vault-session.d.ts +37 -0
  366. package/dist/storage/vault-session.js +196 -0
  367. package/dist/storage/vault-state.d.ts +74 -0
  368. package/dist/storage/vault-state.js +181 -0
  369. package/dist/storage/vault.svelte.d.ts +257 -0
  370. package/dist/storage/vault.svelte.js +661 -0
  371. package/dist/suggest.d.ts +193 -0
  372. package/dist/suggest.js +391 -0
  373. package/dist/tasks.d.ts +7 -0
  374. package/dist/tasks.js +18 -0
  375. package/dist/telemetry.d.ts +116 -0
  376. package/dist/telemetry.js +103 -0
  377. package/dist/utils.d.ts +55 -0
  378. package/dist/utils.js +314 -0
  379. package/dist/vault-api.d.ts +5 -0
  380. package/dist/vault-api.js +3 -0
  381. package/dist/vault-maintenance-commands.d.ts +5 -0
  382. package/dist/vault-maintenance-commands.js +32 -0
  383. package/dist/view.svelte.d.ts +215 -0
  384. package/dist/view.svelte.js +381 -0
  385. package/dist/vite-env.d.ts +2 -0
  386. package/dist/workspace-host-internal.d.ts +7 -0
  387. package/dist/workspace-host-internal.js +7 -0
  388. package/dist/workspace-host.d.ts +10 -0
  389. package/dist/workspace-host.js +14 -0
  390. package/dist/workspace-layout-commands.d.ts +3 -0
  391. package/dist/workspace-layout-commands.js +72 -0
  392. package/dist/workspace-layout-normalizer.d.ts +92 -0
  393. package/dist/workspace-layout-normalizer.js +301 -0
  394. package/dist/workspace-layouts.d.ts +7 -0
  395. package/dist/workspace-layouts.js +23 -0
  396. package/dist/workspace-trust.d.ts +32 -0
  397. package/dist/workspace-trust.js +72 -0
  398. package/dist/workspace.svelte.d.ts +796 -0
  399. package/dist/workspace.svelte.js +4380 -0
  400. package/package.json +240 -0
@@ -0,0 +1,569 @@
1
+ import type { App } from "./context.svelte";
2
+ import { EventDispatcher } from "./events";
3
+ import {
4
+ TFile,
5
+ type AppDatabaseChangeSet,
6
+ type AppDatabaseIndexedMetadataPage,
7
+ type AppDatabaseIndexedMetadataPageQuery,
8
+ type AppDatabaseIndexedMetadataQuery,
9
+ type AppDatabaseIndexedMetadataRow,
10
+ type AppDatabaseLinkRecord,
11
+ type AppDatabaseMetadataFacetQuery,
12
+ type AppDatabaseMetadataFacetRow,
13
+ type AppDatabaseMetadataLinkQuery,
14
+ type MetadataCacheSnapshot,
15
+ } from "./storage";
16
+ export declare const METADATA_CACHE_BACKUP_PATH = ".lapis/cache/metadata-cache.json";
17
+ export declare const METADATA_CACHE_HOT_LIMIT = 512;
18
+ /**
19
+ * Location within a Markdown document
20
+ *
21
+ * @public
22
+ */
23
+ export interface Loc {
24
+ /**
25
+ * Line number. 0-based.
26
+ *
27
+ * @public
28
+ */
29
+ line: number;
30
+ /**
31
+ * Column number.
32
+ *
33
+ * @public
34
+ */
35
+ col: number;
36
+ /**
37
+ * Number of characters from the beginning of the file.
38
+ *
39
+ * @public
40
+ */
41
+ offset: number;
42
+ }
43
+ /**
44
+ * Describes a text range in a Markdown document.
45
+ *
46
+ * @public
47
+ */
48
+ export interface Pos {
49
+ /**
50
+ * Starting location.
51
+ *
52
+ * @public
53
+ */
54
+ start: Loc;
55
+ /**
56
+ * End location.
57
+ *
58
+ * @public
59
+ */
60
+ end: Loc;
61
+ }
62
+ export interface CacheItem {
63
+ /**
64
+ * Position of this item in the note.
65
+ *
66
+ * @public
67
+ */
68
+ position: Pos;
69
+ }
70
+ export interface HeadingCache extends CacheItem {
71
+ /** @public */
72
+ heading: string;
73
+ /**
74
+ * Number between 1 and 6.
75
+ *
76
+ * @public
77
+ */
78
+ level: number;
79
+ }
80
+ export interface TagCache extends CacheItem {
81
+ /** @public */
82
+ tag: string;
83
+ }
84
+ export interface FootnoteCache extends CacheItem {
85
+ /** @public */
86
+ id: string;
87
+ }
88
+ export interface BlockCache extends CacheItem {
89
+ /** @public */
90
+ id: string;
91
+ }
92
+ /**
93
+ * Base interface for items that point to a different location.
94
+ *
95
+ * @public
96
+ */
97
+ export interface Reference {
98
+ /**
99
+ * Link destination.
100
+ *
101
+ * @public
102
+ */
103
+ link: string;
104
+ /**
105
+ * Contains the text as it's written in the document. Not available on
106
+ * Publish.
107
+ *
108
+ * @public
109
+ */
110
+ original: string;
111
+ /**
112
+ * Available if title is different from link text, in the case of `[[page
113
+ * name|display name]]` this will return `display name`
114
+ *
115
+ * @public
116
+ */
117
+ displayText?: string;
118
+ }
119
+ export interface ReferenceCache extends Reference, CacheItem {
120
+ }
121
+ export interface LinkCache extends ReferenceCache {
122
+ heading?: string;
123
+ }
124
+ export interface EmbedCache extends ReferenceCache {
125
+ }
126
+ export interface SectionCache extends CacheItem {
127
+ /**
128
+ * The block ID of this section, if defined.
129
+ *
130
+ * @public
131
+ */
132
+ id?: string | undefined;
133
+ /**
134
+ * The type string generated by the parser. Typing is non-exhaustive, more
135
+ * types can be available than are documented here.
136
+ *
137
+ * @public
138
+ */
139
+ type: "blockquote" | "callout" | "code" | "element" | "footnoteDefinition" | "heading" | "html" | "list" | "paragraph" | "table" | "text" | "thematicBreak" | "yaml" | string;
140
+ }
141
+ export interface ListItemCache extends CacheItem {
142
+ /**
143
+ * The block ID of this list item, if defined.
144
+ *
145
+ * @public
146
+ */
147
+ id?: string | undefined;
148
+ /**
149
+ * A single character indicating the checked status of a task. The space
150
+ * character `' '` is interpreted as an incomplete task. An other character is
151
+ * interpreted as completed task. `undefined` if this item isn't a task.
152
+ *
153
+ * @public
154
+ */
155
+ task?: string | undefined;
156
+ /**
157
+ * Line number of the parent list item (position.start.line). If this item has
158
+ * no parent (e.g. it's a root level list), then this value is the negative of
159
+ * the line number of the first list item (start of the list).
160
+ *
161
+ * Can be used to deduce which list items belongs to the same group
162
+ * (item1.parent === item2.parent). Can be used to reconstruct hierarchy
163
+ * information (parentItem.position.start.line === childItem.parent).
164
+ *
165
+ * @public
166
+ */
167
+ parent: number;
168
+ }
169
+ export interface FootnoteRefCache extends CacheItem {
170
+ /** @public */
171
+ id: string;
172
+ }
173
+ export interface ReferenceLinkCache extends CacheItem {
174
+ /** @public */
175
+ id: string;
176
+ /** @public */
177
+ link: string;
178
+ }
179
+ export interface FrontMatterCache {
180
+ /** @public */
181
+ [key: string]: any;
182
+ }
183
+ export interface FrontMatterInfo {
184
+ /** @public Whether this file has a frontmatter block */
185
+ exists: boolean;
186
+ /** @public String representation of the frontmatter */
187
+ frontmatter: string;
188
+ /** @public Start of the frontmatter contents (excluding the ---) */
189
+ from: number;
190
+ /** @public End of the frontmatter contents (excluding the ---) */
191
+ to: number;
192
+ /** @public Offset where the frontmatter block ends (including the ---) */
193
+ contentStart: number;
194
+ }
195
+ export declare function getFrontMatterInfo(content: string): FrontMatterInfo;
196
+ export declare function parseFrontMatterTags(frontmatter: any | null): string[] | null;
197
+ export declare function parseFrontMatterStringArray(frontmatter: any | null, key: string): string[] | null;
198
+ export declare function parseFrontMatterAliases(frontmatter: any | null): string[] | null;
199
+ export declare function parseFrontMatterEntry(frontmatter: any | null, key: string): any | null;
200
+ export interface FrontmatterLinkCache extends Reference {
201
+ /** @public */
202
+ key: string;
203
+ }
204
+ export interface CachedMetadata {
205
+ /**
206
+ * Position of the frontmatter in the file.
207
+ *
208
+ * @public
209
+ */
210
+ frontmatterPosition?: Pos;
211
+ links?: LinkCache[];
212
+ embeds?: EmbedCache[];
213
+ tags?: TagCache[];
214
+ /**
215
+ * Sections are root level markdown blocks, which can be used to divide the
216
+ * document up.
217
+ *
218
+ * @public
219
+ */
220
+ sections?: SectionCache[];
221
+ listItems?: ListItemCache[];
222
+ frontmatter?: FrontMatterCache;
223
+ headings?: HeadingCache[];
224
+ footnotes?: FootnoteCache[];
225
+ footnoteRefs?: FootnoteRefCache[];
226
+ referenceLinks?: ReferenceLinkCache[];
227
+ blocks?: Record<string, BlockCache>;
228
+ }
229
+ export interface SubpathResult {
230
+ start: Loc;
231
+ end: Loc | null;
232
+ }
233
+ export interface HeadingSubpathResult extends SubpathResult {
234
+ type: "heading";
235
+ current: HeadingCache;
236
+ next: HeadingCache | null;
237
+ }
238
+ export interface BlockSubpathResult extends SubpathResult {
239
+ type: "block";
240
+ block: BlockCache;
241
+ list?: ListItemCache;
242
+ }
243
+ export interface FootnoteSubpathResult extends SubpathResult {
244
+ type: "footnote";
245
+ footnote: FootnoteCache;
246
+ }
247
+ export declare function iterateRefs(refs: Reference[], cb: (ref: Reference) => boolean | void): boolean;
248
+ export declare function iterateCacheRefs(cache: CachedMetadata, cb: (ref: ReferenceCache) => boolean | void): boolean;
249
+ export declare function resolveSubpath(cache: CachedMetadata, subpath: string): HeadingSubpathResult | BlockSubpathResult | FootnoteSubpathResult | null;
250
+ export type MetadataProcessor = {
251
+ read: (data: string, context: {
252
+ cache: CachedMetadata;
253
+ file: TFile;
254
+ }) => Promise<CachedMetadata>;
255
+ write: (cache: CachedMetadata) => string;
256
+ };
257
+ export type IndexedProjectionContribution = {
258
+ task?: import("./storage/task-projection").AppDatabaseTaskRecord | null;
259
+ };
260
+ export type IndexedProjectionContributor = {
261
+ project(input: {
262
+ file: TFile;
263
+ content: string;
264
+ cache: CachedMetadata;
265
+ }): IndexedProjectionContribution | null | Promise<IndexedProjectionContribution | null>;
266
+ };
267
+ export interface MetadataCacheSnapshotLease {
268
+ readonly snapshot: MetadataCacheSnapshot;
269
+ release(): void;
270
+ }
271
+ export interface MetadataCacheQueryWatch<T> {
272
+ dispose(): void;
273
+ refresh(): Promise<void>;
274
+ readonly current: T | undefined;
275
+ }
276
+ /**
277
+ * Indexes parsed markdown metadata, tags, headings, and resolved links for the
278
+ * active vault.
279
+ *
280
+ * @public
281
+ */
282
+ export declare class MetadataCache extends EventDispatcher<{
283
+ /**
284
+ * Called when a file has been indexed, and its (updated) cache is now
285
+ * available.
286
+ *
287
+ * Note: This is not called when a file is renamed for performance reasons.
288
+ * You must hook the vault rename event for those.
289
+ *
290
+ * @public
291
+ */
292
+ changed: [file: TFile, data: string, cache: CachedMetadata];
293
+ /**
294
+ * Called when a file has been deleted. A best-effort previous version of the
295
+ * cached metadata is presented, but it could be null in case the file was not
296
+ * successfully cached previously.
297
+ *
298
+ * @public
299
+ */
300
+ deleted: [file: TFile, prevCache: CachedMetadata | null];
301
+ /** Called once the persisted metadata index is queryable. */
302
+ loaded: [];
303
+ /** Called after an indexed database mutation commits. */
304
+ "index-changed": [change: AppDatabaseChangeSet];
305
+ }> {
306
+ #private;
307
+ readonly app: App;
308
+ processors: Map<string, Set<MetadataProcessor>>;
309
+ projectionContributors: Set<IndexedProjectionContributor>;
310
+ readonly logger: import("./logging").Logger;
311
+ private readonly saveSnapshotDebounced;
312
+ constructor(app: App);
313
+ get metadataCache(): Record<string, CachedMetadata>;
314
+ get resolvedLinks(): Record<string, Record<string, number>>;
315
+ get unresolvedLinks(): Record<string, Record<string, number>>;
316
+ get fileCache(): Record<string, {
317
+ mtime: number;
318
+ size: number;
319
+ hash: string;
320
+ }>;
321
+ get initialized(): boolean;
322
+ getAllItems(): Map<TFile, CachedMetadata>;
323
+ scheduleSnapshotSave(): void;
324
+ flushSnapshotSave(): Promise<void>;
325
+ dispose(options?: {
326
+ persist?: boolean;
327
+ }): Promise<void>;
328
+ saveSnapshotNow(options?: {
329
+ forceBackup?: boolean;
330
+ }): Promise<void>;
331
+ toJSON(): {
332
+ fileCache: {
333
+ [x: string]: {
334
+ mtime: number;
335
+ size: number;
336
+ hash: string;
337
+ };
338
+ };
339
+ metadataCache: {
340
+ [x: string]: {
341
+ frontmatterPosition?: {
342
+ start: {
343
+ line: number;
344
+ col: number;
345
+ offset: number;
346
+ };
347
+ end: {
348
+ line: number;
349
+ col: number;
350
+ offset: number;
351
+ };
352
+ } | undefined;
353
+ links?: {
354
+ link: string;
355
+ original: string;
356
+ displayText?: string | undefined;
357
+ position: {
358
+ start: {
359
+ line: number;
360
+ col: number;
361
+ offset: number;
362
+ };
363
+ end: {
364
+ line: number;
365
+ col: number;
366
+ offset: number;
367
+ };
368
+ };
369
+ }[] | undefined;
370
+ embeds?: {
371
+ link: string;
372
+ original: string;
373
+ displayText?: string | undefined;
374
+ position: {
375
+ start: {
376
+ line: number;
377
+ col: number;
378
+ offset: number;
379
+ };
380
+ end: {
381
+ line: number;
382
+ col: number;
383
+ offset: number;
384
+ };
385
+ };
386
+ }[] | undefined;
387
+ tags?: {
388
+ tag: string;
389
+ position: {
390
+ start: {
391
+ line: number;
392
+ col: number;
393
+ offset: number;
394
+ };
395
+ end: {
396
+ line: number;
397
+ col: number;
398
+ offset: number;
399
+ };
400
+ };
401
+ }[] | undefined;
402
+ sections?: {
403
+ id?: string | undefined | undefined;
404
+ type: "blockquote" | "callout" | "code" | "element" | "footnoteDefinition" | "heading" | "html" | "list" | "paragraph" | "table" | "text" | "thematicBreak" | "yaml" | string;
405
+ position: {
406
+ start: {
407
+ line: number;
408
+ col: number;
409
+ offset: number;
410
+ };
411
+ end: {
412
+ line: number;
413
+ col: number;
414
+ offset: number;
415
+ };
416
+ };
417
+ }[] | undefined;
418
+ listItems?: {
419
+ id?: string | undefined | undefined;
420
+ task?: string | undefined | undefined;
421
+ parent: number;
422
+ position: {
423
+ start: {
424
+ line: number;
425
+ col: number;
426
+ offset: number;
427
+ };
428
+ end: {
429
+ line: number;
430
+ col: number;
431
+ offset: number;
432
+ };
433
+ };
434
+ }[] | undefined;
435
+ frontmatter?: {
436
+ [x: string]: any;
437
+ } | undefined;
438
+ headings?: {
439
+ heading: string;
440
+ level: number;
441
+ position: {
442
+ start: {
443
+ line: number;
444
+ col: number;
445
+ offset: number;
446
+ };
447
+ end: {
448
+ line: number;
449
+ col: number;
450
+ offset: number;
451
+ };
452
+ };
453
+ }[] | undefined;
454
+ footnotes?: {
455
+ id: string;
456
+ position: {
457
+ start: {
458
+ line: number;
459
+ col: number;
460
+ offset: number;
461
+ };
462
+ end: {
463
+ line: number;
464
+ col: number;
465
+ offset: number;
466
+ };
467
+ };
468
+ }[] | undefined;
469
+ footnoteRefs?: {
470
+ id: string;
471
+ position: {
472
+ start: {
473
+ line: number;
474
+ col: number;
475
+ offset: number;
476
+ };
477
+ end: {
478
+ line: number;
479
+ col: number;
480
+ offset: number;
481
+ };
482
+ };
483
+ }[] | undefined;
484
+ referenceLinks?: {
485
+ id: string;
486
+ link: string;
487
+ position: {
488
+ start: {
489
+ line: number;
490
+ col: number;
491
+ offset: number;
492
+ };
493
+ end: {
494
+ line: number;
495
+ col: number;
496
+ offset: number;
497
+ };
498
+ };
499
+ }[] | undefined;
500
+ blocks?: {
501
+ [x: string]: {
502
+ id: string;
503
+ position: {
504
+ start: {
505
+ line: number;
506
+ col: number;
507
+ offset: number;
508
+ };
509
+ end: {
510
+ line: number;
511
+ col: number;
512
+ offset: number;
513
+ };
514
+ };
515
+ };
516
+ } | undefined;
517
+ };
518
+ };
519
+ resolvedLinks: {
520
+ [x: string]: {
521
+ [x: string]: number;
522
+ };
523
+ };
524
+ unresolvedLinks: {
525
+ [x: string]: {
526
+ [x: string]: number;
527
+ };
528
+ };
529
+ };
530
+ private applySnapshot;
531
+ private loadPortableBackupSnapshot;
532
+ private savePortableBackup;
533
+ private loadLegacySnapshot;
534
+ load(): Promise<void>;
535
+ private loadPrimarySnapshot;
536
+ private hydrateDatabaseFromSnapshot;
537
+ private reconcileSnapshotWithVault;
538
+ getReconciliationFingerprint(): string;
539
+ getFileCache(file: TFile): CachedMetadata | null;
540
+ getCache(path: string): CachedMetadata | null;
541
+ getFileCacheAsync(file: TFile | string): Promise<CachedMetadata | null>;
542
+ queryMetadataPage(query?: AppDatabaseIndexedMetadataPageQuery): Promise<AppDatabaseIndexedMetadataPage>;
543
+ queryMetadata(query?: AppDatabaseIndexedMetadataQuery): Promise<AppDatabaseIndexedMetadataRow[]>;
544
+ queryFacets(query: AppDatabaseMetadataFacetQuery): Promise<AppDatabaseMetadataFacetRow[]>;
545
+ queryLinks(query: AppDatabaseMetadataLinkQuery): Promise<AppDatabaseLinkRecord[]>;
546
+ watchQuery(query: AppDatabaseIndexedMetadataPageQuery, listener: (page: AppDatabaseIndexedMetadataPage) => void, onError?: (error: unknown) => void): MetadataCacheQueryWatch<AppDatabaseIndexedMetadataPage>;
547
+ acquireMetadataSnapshotLease(): Promise<MetadataCacheSnapshotLease>;
548
+ getDirectReferencePaths(sourcePath: string): string[];
549
+ pathDirectlyReferences(sourcePath: string, targetPath: string): boolean;
550
+ getDirectReferencingPaths(targetPath: string): string[];
551
+ isDirectlyAffectedByPathChange(watchedPath: string | null | undefined, changedPath: string | null | undefined): boolean;
552
+ getFirstLinkpathDest(linkpath: string, sourcePath: string): TFile | null;
553
+ fileToLinktext(file: TFile, sourcePath: string, omitMdExtension?: boolean): string;
554
+ rebuild(): Promise<void>;
555
+ addProcessor(ext: string, processor: MetadataProcessor): void;
556
+ removeProcessor(ext: string, processor: MetadataProcessor): boolean;
557
+ addIndexedProjectionContributor(contributor: IndexedProjectionContributor): void;
558
+ removeIndexedProjectionContributor(contributor: IndexedProjectionContributor): boolean;
559
+ private handleChange;
560
+ private handleRename;
561
+ private processFile;
562
+ private extractLink;
563
+ private processLink;
564
+ private toDatabaseRecord;
565
+ processFileCache(file: TFile | string | null): Promise<CachedMetadata | null>;
566
+ read(content: string, file: TFile): Promise<CachedMetadata | null>;
567
+ writeFrontmatter(file: TFile, data: FrontMatterCache): string;
568
+ }
569
+ export declare function getAllTags(cache: CachedMetadata): string[] | null;