obsidian-dev-utils 84.6.1 → 85.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.
- package/CHANGELOG.md +16 -0
- package/dist/dev/main.js +32702 -0
- package/dist/dev/manifest.json +9 -0
- package/dist/lib/cjs/async-events.cjs +4 -1
- package/dist/lib/cjs/async-events.d.cts +4 -1
- package/dist/lib/cjs/generated-during-build.cjs +1 -1
- package/dist/lib/cjs/obsidian/active-file-provider.cjs +1 -1
- package/dist/lib/cjs/obsidian/active-file-provider.d.cts +1 -1
- package/dist/lib/cjs/obsidian/bases-view-registrar.cjs +1 -1
- package/dist/lib/cjs/obsidian/bases-view-registrar.d.cts +1 -1
- package/dist/lib/cjs/obsidian/case-insensitive-file-index.cjs +1 -1
- package/dist/lib/cjs/obsidian/case-insensitive-file-index.d.cts +1 -1
- package/dist/lib/cjs/obsidian/command-handlers/command-handler-component.cjs +16 -1
- package/dist/lib/cjs/obsidian/command-handlers/command-handler-component.d.cts +20 -5
- package/dist/lib/cjs/obsidian/command-handlers/index.cjs +6 -3
- package/dist/lib/cjs/obsidian/command-handlers/index.d.cts +1 -0
- package/dist/lib/cjs/obsidian/command-handlers/open-settings-command-handler.cjs +7 -1
- package/dist/lib/cjs/obsidian/command-handlers/open-settings-command-handler.d.cts +8 -2
- package/dist/lib/cjs/obsidian/command-handlers/unlock-active-note-command-handler.cjs +183 -0
- package/dist/lib/cjs/obsidian/command-handlers/unlock-active-note-command-handler.d.cts +54 -0
- package/dist/lib/cjs/obsidian/command-registrar.cjs +1 -1
- package/dist/lib/cjs/obsidian/command-registrar.d.cts +1 -1
- package/dist/lib/cjs/obsidian/components/abort-signal-component.cjs +1 -1
- package/dist/lib/cjs/obsidian/components/abort-signal-component.d.cts +1 -1
- package/dist/lib/cjs/obsidian/components/all-windows-event-component.cjs +1 -1
- package/dist/lib/cjs/obsidian/components/all-windows-event-component.d.cts +1 -1
- package/dist/lib/cjs/obsidian/components/async-error-handler-component.cjs +1 -1
- package/dist/lib/cjs/obsidian/components/async-error-handler-component.d.cts +1 -1
- package/dist/lib/cjs/obsidian/components/case-insensitive-file-index-component.cjs +7 -1
- package/dist/lib/cjs/obsidian/components/case-insensitive-file-index-component.d.cts +9 -2
- package/dist/lib/cjs/obsidian/components/console-debug-component.cjs +1 -1
- package/dist/lib/cjs/obsidian/components/console-debug-component.d.cts +1 -1
- package/dist/lib/cjs/obsidian/components/embed-extensions-component.cjs +1 -1
- package/dist/lib/cjs/obsidian/components/embed-extensions-component.d.cts +1 -1
- package/dist/lib/cjs/obsidian/components/generate-markdown-link-default-params-component.cjs +4 -1
- package/dist/lib/cjs/obsidian/components/generate-markdown-link-default-params-component.d.cts +4 -1
- package/dist/lib/cjs/obsidian/components/layout-ready-component.cjs +1 -1
- package/dist/lib/cjs/obsidian/components/layout-ready-component.d.cts +1 -1
- package/dist/lib/cjs/obsidian/components/menu-event-registrar-component.cjs +1 -1
- package/dist/lib/cjs/obsidian/components/menu-event-registrar-component.d.cts +1 -1
- package/dist/lib/cjs/obsidian/components/plugin-context-component.cjs +7 -1
- package/dist/lib/cjs/obsidian/components/plugin-context-component.d.cts +8 -2
- package/dist/lib/cjs/obsidian/components/plugin-notice-component.cjs +1 -1
- package/dist/lib/cjs/obsidian/components/plugin-notice-component.d.cts +1 -1
- package/dist/lib/cjs/obsidian/components/plugin-settings-component.cjs +13 -4
- package/dist/lib/cjs/obsidian/components/plugin-settings-component.d.cts +12 -3
- package/dist/lib/cjs/obsidian/components/plugin-settings-tab-component.cjs +7 -1
- package/dist/lib/cjs/obsidian/components/plugin-settings-tab-component.d.cts +8 -2
- package/dist/lib/cjs/obsidian/components/rename-delete-handler-component.cjs +29 -8
- package/dist/lib/cjs/obsidian/components/rename-delete-handler-component.d.cts +34 -7
- package/dist/lib/cjs/obsidian/data-handler.cjs +1 -1
- package/dist/lib/cjs/obsidian/data-handler.d.cts +1 -1
- package/dist/lib/cjs/obsidian/editor-extension-registrar.cjs +1 -1
- package/dist/lib/cjs/obsidian/editor-extension-registrar.d.cts +1 -1
- package/dist/lib/cjs/obsidian/editor-suggest-registrar.cjs +1 -1
- package/dist/lib/cjs/obsidian/editor-suggest-registrar.d.cts +1 -1
- package/dist/lib/cjs/obsidian/extensions-registrar.cjs +1 -1
- package/dist/lib/cjs/obsidian/extensions-registrar.d.cts +1 -1
- package/dist/lib/cjs/obsidian/hover-link-source-registrar.cjs +1 -1
- package/dist/lib/cjs/obsidian/hover-link-source-registrar.d.cts +1 -1
- package/dist/lib/cjs/obsidian/index.cjs +4 -1
- package/dist/lib/cjs/obsidian/index.d.cts +1 -0
- package/dist/lib/cjs/obsidian/link.cjs +93 -244
- package/dist/lib/cjs/obsidian/link.d.cts +98 -148
- package/dist/lib/cjs/obsidian/loop.cjs +2 -2
- package/dist/lib/cjs/obsidian/loop.d.cts +17 -3
- package/dist/lib/cjs/obsidian/markdown-code-block-processor-registrar.cjs +4 -1
- package/dist/lib/cjs/obsidian/markdown-code-block-processor-registrar.d.cts +4 -1
- package/dist/lib/cjs/obsidian/markdown-post-processor-registrar.cjs +1 -1
- package/dist/lib/cjs/obsidian/markdown-post-processor-registrar.d.cts +1 -1
- package/dist/lib/cjs/obsidian/metadata-cache.cjs +141 -43
- package/dist/lib/cjs/obsidian/metadata-cache.d.cts +171 -9
- package/dist/lib/cjs/obsidian/modals/minimizable-modal.cjs +7 -4
- package/dist/lib/cjs/obsidian/modals/minimizable-modal.d.cts +8 -1
- package/dist/lib/cjs/obsidian/obsidian-protocol-handler-registrar.cjs +4 -1
- package/dist/lib/cjs/obsidian/obsidian-protocol-handler-registrar.d.cts +4 -1
- package/dist/lib/cjs/obsidian/parse-link.cjs +476 -0
- package/dist/lib/cjs/obsidian/parse-link.d.cts +268 -0
- package/dist/lib/cjs/obsidian/plugin/plugin-event-source.cjs +1 -1
- package/dist/lib/cjs/obsidian/plugin/plugin-event-source.d.cts +1 -1
- package/dist/lib/cjs/obsidian/plugin-cli-handler-registrar.cjs +1 -1
- package/dist/lib/cjs/obsidian/plugin-cli-handler-registrar.d.cts +1 -1
- package/dist/lib/cjs/obsidian/resource-lock.cjs +155 -20
- package/dist/lib/cjs/obsidian/resource-lock.d.cts +93 -22
- package/dist/lib/cjs/obsidian/ribbon-icon-registrar.cjs +1 -1
- package/dist/lib/cjs/obsidian/ribbon-icon-registrar.d.cts +1 -1
- package/dist/lib/cjs/obsidian/setting-components/code-highlighter-component.cjs +28 -16
- package/dist/lib/cjs/obsidian/setting-components/code-highlighter-component.d.cts +17 -5
- package/dist/lib/cjs/obsidian/setting-components/multiple-dropdown-component.cjs +4 -1
- package/dist/lib/cjs/obsidian/setting-components/multiple-dropdown-component.d.cts +5 -2
- package/dist/lib/cjs/obsidian/setting-components/multiple-text-component.cjs +11 -2
- package/dist/lib/cjs/obsidian/setting-components/multiple-text-component.d.cts +12 -3
- package/dist/lib/cjs/obsidian/setting-components/typed-dropdown-component.cjs +8 -2
- package/dist/lib/cjs/obsidian/setting-components/typed-dropdown-component.d.cts +9 -3
- package/dist/lib/cjs/obsidian/setting-components/typed-multiple-dropdown-component.cjs +8 -2
- package/dist/lib/cjs/obsidian/setting-components/typed-multiple-dropdown-component.d.cts +9 -2
- package/dist/lib/cjs/obsidian/status-bar-item-registrar.cjs +1 -1
- package/dist/lib/cjs/obsidian/status-bar-item-registrar.d.cts +1 -1
- package/dist/lib/cjs/obsidian/vault-transaction.cjs +4 -1
- package/dist/lib/cjs/obsidian/vault-transaction.d.cts +4 -1
- package/dist/lib/cjs/obsidian/vault.cjs +2 -2
- package/dist/lib/cjs/obsidian/view-registrar.cjs +1 -1
- package/dist/lib/cjs/obsidian/view-registrar.d.cts +1 -1
- package/dist/lib/cjs/script-utils/linters/markdownlint-cli2-config.cjs +4 -2
- package/dist/lib/cjs/transformers/group-transformer.cjs +1 -1
- package/dist/lib/cjs/transformers/group-transformer.d.cts +1 -1
- package/dist/lib/cjs/url.cjs +14 -3
- package/dist/lib/cjs/url.d.cts +15 -0
- package/dist/lib/esm/async-events.d.mts +4 -1
- package/dist/lib/esm/async-events.mjs +4 -1
- package/dist/lib/esm/generated-during-build.mjs +1 -1
- package/dist/lib/esm/obsidian/active-file-provider.d.mts +1 -1
- package/dist/lib/esm/obsidian/active-file-provider.mjs +1 -1
- package/dist/lib/esm/obsidian/bases-view-registrar.d.mts +1 -1
- package/dist/lib/esm/obsidian/bases-view-registrar.mjs +1 -1
- package/dist/lib/esm/obsidian/case-insensitive-file-index.d.mts +1 -1
- package/dist/lib/esm/obsidian/case-insensitive-file-index.mjs +1 -1
- package/dist/lib/esm/obsidian/command-handlers/command-handler-component.d.mts +20 -5
- package/dist/lib/esm/obsidian/command-handlers/command-handler-component.mjs +16 -1
- package/dist/lib/esm/obsidian/command-handlers/index.d.mts +1 -0
- package/dist/lib/esm/obsidian/command-handlers/index.mjs +4 -2
- package/dist/lib/esm/obsidian/command-handlers/open-settings-command-handler.d.mts +8 -2
- package/dist/lib/esm/obsidian/command-handlers/open-settings-command-handler.mjs +7 -1
- package/dist/lib/esm/obsidian/command-handlers/unlock-active-note-command-handler.d.mts +54 -0
- package/dist/lib/esm/obsidian/command-handlers/unlock-active-note-command-handler.mjs +75 -0
- package/dist/lib/esm/obsidian/command-registrar.d.mts +1 -1
- package/dist/lib/esm/obsidian/command-registrar.mjs +1 -1
- package/dist/lib/esm/obsidian/components/abort-signal-component.d.mts +1 -1
- package/dist/lib/esm/obsidian/components/abort-signal-component.mjs +1 -1
- package/dist/lib/esm/obsidian/components/all-windows-event-component.d.mts +1 -1
- package/dist/lib/esm/obsidian/components/all-windows-event-component.mjs +1 -1
- package/dist/lib/esm/obsidian/components/async-error-handler-component.d.mts +1 -1
- package/dist/lib/esm/obsidian/components/async-error-handler-component.mjs +1 -1
- package/dist/lib/esm/obsidian/components/case-insensitive-file-index-component.d.mts +9 -2
- package/dist/lib/esm/obsidian/components/case-insensitive-file-index-component.mjs +7 -1
- package/dist/lib/esm/obsidian/components/console-debug-component.d.mts +1 -1
- package/dist/lib/esm/obsidian/components/console-debug-component.mjs +1 -1
- package/dist/lib/esm/obsidian/components/embed-extensions-component.d.mts +1 -1
- package/dist/lib/esm/obsidian/components/embed-extensions-component.mjs +1 -1
- package/dist/lib/esm/obsidian/components/generate-markdown-link-default-params-component.d.mts +4 -1
- package/dist/lib/esm/obsidian/components/generate-markdown-link-default-params-component.mjs +4 -1
- package/dist/lib/esm/obsidian/components/layout-ready-component.d.mts +1 -1
- package/dist/lib/esm/obsidian/components/layout-ready-component.mjs +1 -1
- package/dist/lib/esm/obsidian/components/menu-event-registrar-component.d.mts +1 -1
- package/dist/lib/esm/obsidian/components/menu-event-registrar-component.mjs +1 -1
- package/dist/lib/esm/obsidian/components/plugin-context-component.d.mts +8 -2
- package/dist/lib/esm/obsidian/components/plugin-context-component.mjs +7 -1
- package/dist/lib/esm/obsidian/components/plugin-notice-component.d.mts +1 -1
- package/dist/lib/esm/obsidian/components/plugin-notice-component.mjs +1 -1
- package/dist/lib/esm/obsidian/components/plugin-settings-component.d.mts +12 -3
- package/dist/lib/esm/obsidian/components/plugin-settings-component.mjs +13 -4
- package/dist/lib/esm/obsidian/components/plugin-settings-tab-component.d.mts +8 -2
- package/dist/lib/esm/obsidian/components/plugin-settings-tab-component.mjs +7 -1
- package/dist/lib/esm/obsidian/components/rename-delete-handler-component.d.mts +34 -7
- package/dist/lib/esm/obsidian/components/rename-delete-handler-component.mjs +30 -9
- package/dist/lib/esm/obsidian/data-handler.d.mts +1 -1
- package/dist/lib/esm/obsidian/data-handler.mjs +1 -1
- package/dist/lib/esm/obsidian/editor-extension-registrar.d.mts +1 -1
- package/dist/lib/esm/obsidian/editor-extension-registrar.mjs +1 -1
- package/dist/lib/esm/obsidian/editor-suggest-registrar.d.mts +1 -1
- package/dist/lib/esm/obsidian/editor-suggest-registrar.mjs +1 -1
- package/dist/lib/esm/obsidian/extensions-registrar.d.mts +1 -1
- package/dist/lib/esm/obsidian/extensions-registrar.mjs +1 -1
- package/dist/lib/esm/obsidian/hover-link-source-registrar.d.mts +1 -1
- package/dist/lib/esm/obsidian/hover-link-source-registrar.mjs +1 -1
- package/dist/lib/esm/obsidian/index.d.mts +1 -0
- package/dist/lib/esm/obsidian/index.mjs +3 -1
- package/dist/lib/esm/obsidian/link.d.mts +98 -148
- package/dist/lib/esm/obsidian/link.mjs +90 -222
- package/dist/lib/esm/obsidian/loop.d.mts +17 -3
- package/dist/lib/esm/obsidian/loop.mjs +2 -2
- package/dist/lib/esm/obsidian/markdown-code-block-processor-registrar.d.mts +4 -1
- package/dist/lib/esm/obsidian/markdown-code-block-processor-registrar.mjs +4 -1
- package/dist/lib/esm/obsidian/markdown-post-processor-registrar.d.mts +1 -1
- package/dist/lib/esm/obsidian/markdown-post-processor-registrar.mjs +1 -1
- package/dist/lib/esm/obsidian/metadata-cache.d.mts +171 -9
- package/dist/lib/esm/obsidian/metadata-cache.mjs +142 -42
- package/dist/lib/esm/obsidian/modals/minimizable-modal.d.mts +8 -1
- package/dist/lib/esm/obsidian/modals/minimizable-modal.mjs +7 -4
- package/dist/lib/esm/obsidian/obsidian-protocol-handler-registrar.d.mts +4 -1
- package/dist/lib/esm/obsidian/obsidian-protocol-handler-registrar.mjs +4 -1
- package/dist/lib/esm/obsidian/parse-link.d.mts +268 -0
- package/dist/lib/esm/obsidian/parse-link.mjs +353 -0
- package/dist/lib/esm/obsidian/plugin/plugin-event-source.d.mts +1 -1
- package/dist/lib/esm/obsidian/plugin/plugin-event-source.mjs +1 -1
- package/dist/lib/esm/obsidian/plugin-cli-handler-registrar.d.mts +1 -1
- package/dist/lib/esm/obsidian/plugin-cli-handler-registrar.mjs +1 -1
- package/dist/lib/esm/obsidian/resource-lock.d.mts +93 -22
- package/dist/lib/esm/obsidian/resource-lock.mjs +155 -20
- package/dist/lib/esm/obsidian/ribbon-icon-registrar.d.mts +1 -1
- package/dist/lib/esm/obsidian/ribbon-icon-registrar.mjs +1 -1
- package/dist/lib/esm/obsidian/setting-components/code-highlighter-component.d.mts +17 -5
- package/dist/lib/esm/obsidian/setting-components/code-highlighter-component.mjs +28 -16
- package/dist/lib/esm/obsidian/setting-components/multiple-dropdown-component.d.mts +5 -2
- package/dist/lib/esm/obsidian/setting-components/multiple-dropdown-component.mjs +4 -1
- package/dist/lib/esm/obsidian/setting-components/multiple-text-component.d.mts +12 -3
- package/dist/lib/esm/obsidian/setting-components/multiple-text-component.mjs +11 -2
- package/dist/lib/esm/obsidian/setting-components/typed-dropdown-component.d.mts +9 -3
- package/dist/lib/esm/obsidian/setting-components/typed-dropdown-component.mjs +8 -2
- package/dist/lib/esm/obsidian/setting-components/typed-multiple-dropdown-component.d.mts +9 -2
- package/dist/lib/esm/obsidian/setting-components/typed-multiple-dropdown-component.mjs +8 -2
- package/dist/lib/esm/obsidian/status-bar-item-registrar.d.mts +1 -1
- package/dist/lib/esm/obsidian/status-bar-item-registrar.mjs +1 -1
- package/dist/lib/esm/obsidian/vault-transaction.d.mts +4 -1
- package/dist/lib/esm/obsidian/vault-transaction.mjs +4 -1
- package/dist/lib/esm/obsidian/vault.mjs +2 -2
- package/dist/lib/esm/obsidian/view-registrar.d.mts +1 -1
- package/dist/lib/esm/obsidian/view-registrar.mjs +1 -1
- package/dist/lib/esm/script-utils/linters/markdownlint-cli2-config.mjs +4 -2
- package/dist/lib/esm/transformers/group-transformer.d.mts +1 -1
- package/dist/lib/esm/transformers/group-transformer.mjs +1 -1
- package/dist/lib/esm/url.d.mts +15 -0
- package/dist/lib/esm/url.mjs +11 -2
- package/obsidian/command-handlers/unlock-active-note-command-handler/package.json +6 -0
- package/obsidian/parse-link/package.json +6 -0
- package/package.json +7 -7
|
@@ -64,6 +64,7 @@ import * as metadata_cache from "./metadata-cache.mjs";
|
|
|
64
64
|
import * as modals from "./modals/index.mjs";
|
|
65
65
|
import * as obsidian_protocol_handler_registrar from "./obsidian-protocol-handler-registrar.mjs";
|
|
66
66
|
import * as obsidian_settings from "./obsidian-settings.mjs";
|
|
67
|
+
import * as parse_link from "./parse-link.mjs";
|
|
67
68
|
import * as path_settings from "./path-settings.mjs";
|
|
68
69
|
import * as pdf from "./pdf.mjs";
|
|
69
70
|
import * as plugin from "./plugin/index.mjs";
|
|
@@ -128,6 +129,7 @@ export {
|
|
|
128
129
|
modals,
|
|
129
130
|
obsidian_protocol_handler_registrar as "obsidian-protocol-handler-registrar",
|
|
130
131
|
obsidian_settings as "obsidian-settings",
|
|
132
|
+
parse_link as "parse-link",
|
|
131
133
|
path_settings as "path-settings",
|
|
132
134
|
pdf,
|
|
133
135
|
plugin,
|
|
@@ -149,4 +151,4 @@ export {
|
|
|
149
151
|
view_registrar as "view-registrar",
|
|
150
152
|
workspace
|
|
151
153
|
};
|
|
152
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
154
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vc3JjL29ic2lkaWFuL2luZGV4LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKiBUSElTIElTIEEgR0VORVJBVEVEL0JVTkRMRUQgRklMRSBCWSBCVUlMRCBTQ1JJUFQgKi9cblxuZXhwb3J0ICogYXMgJ2FjdGl2ZS1maWxlLXByb3ZpZGVyJyBmcm9tICcuL2FjdGl2ZS1maWxlLXByb3ZpZGVyLnRzJztcbmV4cG9ydCAqIGFzICdhcHAnIGZyb20gJy4vYXBwLnRzJztcbmV4cG9ydCAqIGFzICdhc3luYy13aXRoLW5vdGljZScgZnJvbSAnLi9hc3luYy13aXRoLW5vdGljZS50cyc7XG5leHBvcnQgKiBhcyAnYXR0YWNobWVudC1wYXRoJyBmcm9tICcuL2F0dGFjaG1lbnQtcGF0aC50cyc7XG5leHBvcnQgKiBhcyAnYmFja2xpbmsnIGZyb20gJy4vYmFja2xpbmsudHMnO1xuZXhwb3J0ICogYXMgJ2Jhc2VzLXZpZXctcmVnaXN0cmFyJyBmcm9tICcuL2Jhc2VzLXZpZXctcmVnaXN0cm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yLWl0ZW0tcmVnaXN0cmFyIiwgInZhdWx0LWRlbGV0ZSIsICJ2YXVsdC10cmFuc2FjdGlvbiIsICJ2aWV3LXJlZ2lzdHJhciJdCn0K
|
|
@@ -135,6 +135,28 @@ export interface EditLinksInContentParams {
|
|
|
135
135
|
* The function that converts each link.
|
|
136
136
|
*/
|
|
137
137
|
linkConverter(this: void, link: Reference): Promisable<MaybeReturn<string>>;
|
|
138
|
+
/**
|
|
139
|
+
* Whether to also edit external links parsed from the note body. When `true`, the converter also
|
|
140
|
+
* receives references for external links.
|
|
141
|
+
*
|
|
142
|
+
* @default `false`
|
|
143
|
+
*/
|
|
144
|
+
readonly shouldEditExternalLinks?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Whether to also edit external links parsed from frontmatter values. When `true`, the converter also
|
|
147
|
+
* receives references for frontmatter external links.
|
|
148
|
+
*
|
|
149
|
+
* @default `false`
|
|
150
|
+
*/
|
|
151
|
+
readonly shouldEditFrontmatterExternalLinks?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Whether to also edit external links parsed from multi-link (multi-value) frontmatter values. When
|
|
154
|
+
* `true`, the converter also receives references for each external link within a multi-link frontmatter
|
|
155
|
+
* value (each located by its offsets, so only that link is spliced back in place).
|
|
156
|
+
*
|
|
157
|
+
* @default `false`
|
|
158
|
+
*/
|
|
159
|
+
readonly shouldEditMultiValueFrontmatterExternalLinks?: boolean;
|
|
138
160
|
}
|
|
139
161
|
/**
|
|
140
162
|
* Options for {@link editLinks}.
|
|
@@ -156,6 +178,28 @@ export interface EditLinksParams extends EditLinksOptions {
|
|
|
156
178
|
* The path or file to edit the links for.
|
|
157
179
|
*/
|
|
158
180
|
readonly pathOrFile: PathOrFile;
|
|
181
|
+
/**
|
|
182
|
+
* Whether to also edit external links parsed from the note body. When `true`, the converter also
|
|
183
|
+
* receives references for external links.
|
|
184
|
+
*
|
|
185
|
+
* @default `false`
|
|
186
|
+
*/
|
|
187
|
+
readonly shouldEditExternalLinks?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Whether to also edit external links parsed from frontmatter values. When `true`, the converter also
|
|
190
|
+
* receives references for frontmatter external links.
|
|
191
|
+
*
|
|
192
|
+
* @default `false`
|
|
193
|
+
*/
|
|
194
|
+
readonly shouldEditFrontmatterExternalLinks?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Whether to also edit external links parsed from multi-link (multi-value) frontmatter values. When
|
|
197
|
+
* `true`, the converter also receives references for each external link within a multi-link frontmatter
|
|
198
|
+
* value (each located by its offsets, so only that link is spliced back in place).
|
|
199
|
+
*
|
|
200
|
+
* @default `false`
|
|
201
|
+
*/
|
|
202
|
+
readonly shouldEditMultiValueFrontmatterExternalLinks?: boolean;
|
|
159
203
|
}
|
|
160
204
|
/**
|
|
161
205
|
* Parameters for {@link extractLinkFile}.
|
|
@@ -376,113 +420,6 @@ export interface GenerateRawMarkdownLinkParams {
|
|
|
376
420
|
*/
|
|
377
421
|
readonly url: string;
|
|
378
422
|
}
|
|
379
|
-
/**
|
|
380
|
-
* A result of parsing a link.
|
|
381
|
-
*/
|
|
382
|
-
export interface ParseLinkResult {
|
|
383
|
-
/**
|
|
384
|
-
* An alias of the link.
|
|
385
|
-
*
|
|
386
|
-
* @example
|
|
387
|
-
* ```
|
|
388
|
-
* [\*alias\*](link.md) -> \*alias\*
|
|
389
|
-
* ```
|
|
390
|
-
*/
|
|
391
|
-
readonly alias?: string;
|
|
392
|
-
/**
|
|
393
|
-
* An encoded URL of the link.
|
|
394
|
-
*
|
|
395
|
-
* @example
|
|
396
|
-
* ```
|
|
397
|
-
* [alias](<link with space.md>) -> link%20with%20space.md
|
|
398
|
-
* ```
|
|
399
|
-
*/
|
|
400
|
-
readonly encodedUrl?: string;
|
|
401
|
-
/**
|
|
402
|
-
* An end offset of the link in the original text.
|
|
403
|
-
*/
|
|
404
|
-
readonly endOffset: number;
|
|
405
|
-
/**
|
|
406
|
-
* Indicates if the link has angle brackets.
|
|
407
|
-
*
|
|
408
|
-
* @example
|
|
409
|
-
* ```
|
|
410
|
-
* [alias](<link.md>) -> true
|
|
411
|
-
* [alias](link.md) -> false
|
|
412
|
-
* ```
|
|
413
|
-
*/
|
|
414
|
-
readonly hasAngleBrackets?: boolean;
|
|
415
|
-
/**
|
|
416
|
-
* Indicates if the link is an embed link.
|
|
417
|
-
*
|
|
418
|
-
* @example
|
|
419
|
-
* ```
|
|
420
|
-
* ![[alias]] -> true
|
|
421
|
-
* [[alias]] -> false
|
|
422
|
-
* ```
|
|
423
|
-
*/
|
|
424
|
-
readonly isEmbed: boolean;
|
|
425
|
-
/**
|
|
426
|
-
* Indicates if the link is external.
|
|
427
|
-
*
|
|
428
|
-
* @example
|
|
429
|
-
* ```
|
|
430
|
-
* [alias](https://example.com) -> true
|
|
431
|
-
* [alias](file.md) -> false
|
|
432
|
-
* ```
|
|
433
|
-
*/
|
|
434
|
-
readonly isExternal: boolean;
|
|
435
|
-
/**
|
|
436
|
-
* Indicates if the link is a wikilink.
|
|
437
|
-
*
|
|
438
|
-
* @example
|
|
439
|
-
* ```
|
|
440
|
-
* [[alias]] -> true
|
|
441
|
-
* [alias](link.md) -> false
|
|
442
|
-
* ```
|
|
443
|
-
*/
|
|
444
|
-
readonly isWikilink: boolean;
|
|
445
|
-
/**
|
|
446
|
-
* A raw link text.
|
|
447
|
-
*
|
|
448
|
-
* @example
|
|
449
|
-
* ```
|
|
450
|
-
* [alias](link.md) -> [alias](link.md)
|
|
451
|
-
* ```
|
|
452
|
-
*/
|
|
453
|
-
readonly raw: string;
|
|
454
|
-
/**
|
|
455
|
-
* A start offset of the link in the original text.
|
|
456
|
-
*/
|
|
457
|
-
readonly startOffset: number;
|
|
458
|
-
/**
|
|
459
|
-
* A title of the link.
|
|
460
|
-
*
|
|
461
|
-
* @example
|
|
462
|
-
* ```
|
|
463
|
-
* [alias](link.md "title") -> title
|
|
464
|
-
* ```
|
|
465
|
-
*/
|
|
466
|
-
readonly title?: string;
|
|
467
|
-
/**
|
|
468
|
-
* An unescaped alias of the link.
|
|
469
|
-
*
|
|
470
|
-
* @example
|
|
471
|
-
* ```
|
|
472
|
-
* [\*alias\*](link.md) -> *alias*
|
|
473
|
-
* ```
|
|
474
|
-
*/
|
|
475
|
-
readonly unescapedAlias?: string;
|
|
476
|
-
/**
|
|
477
|
-
* An URL of the link.
|
|
478
|
-
*
|
|
479
|
-
* @example
|
|
480
|
-
* ```
|
|
481
|
-
* [alias](link%20with%20space.md) -> link with space.md
|
|
482
|
-
* ```
|
|
483
|
-
*/
|
|
484
|
-
readonly url: string;
|
|
485
|
-
}
|
|
486
423
|
/**
|
|
487
424
|
* Params for {@link shouldResetAlias}.
|
|
488
425
|
*/
|
|
@@ -529,6 +466,48 @@ export interface SplitSubpathResult {
|
|
|
529
466
|
*/
|
|
530
467
|
readonly subpath: string;
|
|
531
468
|
}
|
|
469
|
+
/**
|
|
470
|
+
* Params for {@link updateFileUrlLinksInContent}.
|
|
471
|
+
*/
|
|
472
|
+
export interface UpdateFileUrlLinksInContentParams {
|
|
473
|
+
/**
|
|
474
|
+
* The abort signal to control the execution of the function.
|
|
475
|
+
*/
|
|
476
|
+
readonly abortSignal?: AbortSignal;
|
|
477
|
+
/**
|
|
478
|
+
* An Obsidian app instance.
|
|
479
|
+
*/
|
|
480
|
+
readonly app: App;
|
|
481
|
+
/**
|
|
482
|
+
* The content to normalize the `file://` links in.
|
|
483
|
+
*/
|
|
484
|
+
readonly content: string;
|
|
485
|
+
/**
|
|
486
|
+
* Whether to emit the normalized links with angle brackets and raw spaces instead of `%20`-encoding.
|
|
487
|
+
*
|
|
488
|
+
* @default `false`
|
|
489
|
+
*/
|
|
490
|
+
readonly shouldUseAngleBrackets?: boolean;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Params for {@link updateFileUrlLinksInFile}.
|
|
494
|
+
*/
|
|
495
|
+
export interface UpdateFileUrlLinksInFileParams extends ProcessOptions {
|
|
496
|
+
/**
|
|
497
|
+
* An Obsidian app instance.
|
|
498
|
+
*/
|
|
499
|
+
readonly app: App;
|
|
500
|
+
/**
|
|
501
|
+
* The path or file to normalize the `file://` links in.
|
|
502
|
+
*/
|
|
503
|
+
readonly pathOrFile: PathOrFile;
|
|
504
|
+
/**
|
|
505
|
+
* Whether to emit the normalized links with angle brackets and raw spaces instead of `%20`-encoding.
|
|
506
|
+
*
|
|
507
|
+
* @default `false`
|
|
508
|
+
*/
|
|
509
|
+
readonly shouldUseAngleBrackets?: boolean;
|
|
510
|
+
}
|
|
532
511
|
/**
|
|
533
512
|
* Params for {@link updateLink}.
|
|
534
513
|
*/
|
|
@@ -662,25 +641,6 @@ export declare function editLinks(params: EditLinksParams): Promise<void>;
|
|
|
662
641
|
* @returns The promise that resolves to the updated content.
|
|
663
642
|
*/
|
|
664
643
|
export declare function editLinksInContent(params: EditLinksInContentParams): Promise<string>;
|
|
665
|
-
/**
|
|
666
|
-
* Encodes a URL.
|
|
667
|
-
*
|
|
668
|
-
* @param url - The URL to encode.
|
|
669
|
-
* @returns The encoded URL.
|
|
670
|
-
*/
|
|
671
|
-
export declare function encodeUrl(url: string): string;
|
|
672
|
-
/**
|
|
673
|
-
* Escapes the alias of a markdown link.
|
|
674
|
-
*
|
|
675
|
-
* @param alias - An alias of a markdown link.
|
|
676
|
-
* @returns An escaped alias.
|
|
677
|
-
*
|
|
678
|
-
* @example
|
|
679
|
-
* ```ts
|
|
680
|
-
* escapeAlias('**alias**') // '\\*\\*alias\\*\\*'
|
|
681
|
-
* ```
|
|
682
|
-
*/
|
|
683
|
-
export declare function escapeAlias(alias: string): string;
|
|
684
644
|
/**
|
|
685
645
|
* Extracts the file associated with a link.
|
|
686
646
|
*
|
|
@@ -719,20 +679,6 @@ export declare function generateRawMarkdownLink(params: GenerateRawMarkdownLinkP
|
|
|
719
679
|
* @returns The mutable list of default-params functions.
|
|
720
680
|
*/
|
|
721
681
|
export declare function getGenerateMarkdownLinkDefaultParamsFns(): (() => Partial<GenerateMarkdownLinkParams>)[];
|
|
722
|
-
/**
|
|
723
|
-
* Parses a link into its components.
|
|
724
|
-
*
|
|
725
|
-
* @param str - The link to parse.
|
|
726
|
-
* @returns The parsed link.
|
|
727
|
-
*/
|
|
728
|
-
export declare function parseLink(str: string): null | ParseLinkResult;
|
|
729
|
-
/**
|
|
730
|
-
* Parses all links in a string.
|
|
731
|
-
*
|
|
732
|
-
* @param str - The string to parse the links in.
|
|
733
|
-
* @returns The parsed links.
|
|
734
|
-
*/
|
|
735
|
-
export declare function parseLinks(str: string): ParseLinkResult[];
|
|
736
682
|
/**
|
|
737
683
|
* Determines if the alias of a link should be reset.
|
|
738
684
|
*
|
|
@@ -790,17 +736,21 @@ export declare function testLeadingSlash(link: string): boolean;
|
|
|
790
736
|
*/
|
|
791
737
|
export declare function testWikilink(link: string): boolean;
|
|
792
738
|
/**
|
|
793
|
-
*
|
|
739
|
+
* Normalizes the `file://` links in a content string to a pretty form, converting backslashes to forward
|
|
740
|
+
* slashes. Other links are left unchanged.
|
|
794
741
|
*
|
|
795
|
-
* @param
|
|
796
|
-
* @returns
|
|
742
|
+
* @param params - The parameters for normalizing the links.
|
|
743
|
+
* @returns A {@link Promise} that resolves to the content with normalized `file://` links.
|
|
744
|
+
*/
|
|
745
|
+
export declare function updateFileUrlLinksInContent(params: UpdateFileUrlLinksInContentParams): Promise<string>;
|
|
746
|
+
/**
|
|
747
|
+
* Normalizes the `file://` links in a file to a pretty form, converting backslashes to forward slashes.
|
|
748
|
+
* Other links are left unchanged.
|
|
797
749
|
*
|
|
798
|
-
* @
|
|
799
|
-
*
|
|
800
|
-
* unescapeAlias('\\*\\*alias\\*\\*') // '**alias**'
|
|
801
|
-
* ```
|
|
750
|
+
* @param params - The parameters for normalizing the links.
|
|
751
|
+
* @returns A {@link Promise} that resolves when the links are normalized.
|
|
802
752
|
*/
|
|
803
|
-
export declare function
|
|
753
|
+
export declare function updateFileUrlLinksInFile(params: UpdateFileUrlLinksInFileParams): Promise<void>;
|
|
804
754
|
/**
|
|
805
755
|
* Updates a link based on the provided parameters.
|
|
806
756
|
*
|