@mnaoumov/obsidian-lib 8.0.0 → 9.0.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/dist/lib/cjs/__merged.cjs +22 -13
- package/dist/lib/cjs/__merged.d.cts +4 -3
- package/dist/lib/cjs/canvas.cjs +2 -2
- package/dist/lib/cjs/components/incremental-file-index-component.cjs +69 -5
- package/dist/lib/cjs/components/incremental-file-index-component.d.cts +16 -1
- package/dist/lib/cjs/components/rename-delete-handler-component.cjs +14 -14
- package/dist/lib/cjs/data-stores/local-data-store.cjs +16 -13
- package/dist/lib/cjs/data-stores/local-data-store.d.cts +9 -1
- package/dist/lib/cjs/generated-during-build.cjs +1 -1
- package/dist/lib/cjs/index.cjs +4 -1
- package/dist/lib/cjs/index.d.cts +1 -0
- package/dist/lib/cjs/link.cjs +99 -75
- package/dist/lib/cjs/link.d.cts +112 -65
- package/dist/lib/cjs/metadata-cache.cjs +7 -7
- package/dist/lib/cjs/metadata-cache.d.cts +14 -13
- package/dist/lib/cjs/position.cjs +113 -0
- package/dist/lib/cjs/position.d.cts +55 -0
- package/dist/lib/cjs/reference.cjs +14 -2
- package/dist/lib/cjs/reference.d.cts +21 -1
- package/dist/lib/esm/__merged.d.mts +4 -3
- package/dist/lib/esm/__merged.mjs +23 -13
- package/dist/lib/esm/canvas.mjs +3 -3
- package/dist/lib/esm/components/incremental-file-index-component.d.mts +16 -1
- package/dist/lib/esm/components/incremental-file-index-component.mjs +69 -5
- package/dist/lib/esm/components/rename-delete-handler-component.mjs +17 -17
- package/dist/lib/esm/data-stores/local-data-store.d.mts +9 -1
- package/dist/lib/esm/data-stores/local-data-store.mjs +16 -13
- package/dist/lib/esm/generated-during-build.mjs +1 -1
- package/dist/lib/esm/index.d.mts +1 -0
- package/dist/lib/esm/index.mjs +3 -1
- package/dist/lib/esm/link.d.mts +112 -65
- package/dist/lib/esm/link.mjs +96 -71
- package/dist/lib/esm/metadata-cache.d.mts +14 -13
- package/dist/lib/esm/metadata-cache.mjs +6 -6
- package/dist/lib/esm/position.d.mts +55 -0
- package/dist/lib/esm/position.mjs +23 -0
- package/dist/lib/esm/reference.d.mts +21 -1
- package/dist/lib/esm/reference.mjs +16 -2
- package/package.json +2 -2
package/dist/lib/esm/link.d.mts
CHANGED
|
@@ -72,17 +72,17 @@ export declare enum LinkStyle {
|
|
|
72
72
|
* @typeParam TPayload - The payload recorded for each link when the snapshot was built.
|
|
73
73
|
*/
|
|
74
74
|
export interface BacklinkConversionParams<TPayload> {
|
|
75
|
-
/**
|
|
76
|
-
* The link being converted.
|
|
77
|
-
*/
|
|
78
|
-
readonly link: Reference;
|
|
79
75
|
/**
|
|
80
76
|
* The payload captured for the link when the snapshot was built.
|
|
81
77
|
*
|
|
82
78
|
* `undefined` when the link is not in the snapshot, which can only happen if
|
|
83
|
-
* {@link EditBacklinksSnapshotParams.
|
|
79
|
+
* {@link EditBacklinksSnapshotParams.shouldVisitUnmatchedReferences} is `true`.
|
|
84
80
|
*/
|
|
85
81
|
readonly payload: TPayload | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* The reference being converted.
|
|
84
|
+
*/
|
|
85
|
+
readonly reference: Reference;
|
|
86
86
|
/**
|
|
87
87
|
* The path of the note holding the link.
|
|
88
88
|
*/
|
|
@@ -135,17 +135,6 @@ export interface BuildBacklinksSnapshotParams<TPayload> {
|
|
|
135
135
|
* The backlinks to record.
|
|
136
136
|
*/
|
|
137
137
|
readonly backlinks: BacklinksLike;
|
|
138
|
-
/**
|
|
139
|
-
* Computes the identity key of a link.
|
|
140
|
-
*
|
|
141
|
-
* The snapshot remembers it, so {@link editBacklinksSnapshot} looks the links up with the same function
|
|
142
|
-
* without being told. When {@link BuildBacklinksSnapshotParams.target} was built with a provider, omitting
|
|
143
|
-
* this reuses that one, and passing a different one throws: a snapshot keyed by two functions matches
|
|
144
|
-
* nothing.
|
|
145
|
-
*
|
|
146
|
-
* @default the provider `target` was built with, else `JSON.stringify`
|
|
147
|
-
*/
|
|
148
|
-
readonly linkIdentityKeyProvider?: (link: Reference) => string;
|
|
149
138
|
/**
|
|
150
139
|
* Rewrites the path of a backlink-holding note as it will be **after** the operation.
|
|
151
140
|
*
|
|
@@ -163,6 +152,17 @@ export interface BuildBacklinksSnapshotParams<TPayload> {
|
|
|
163
152
|
* @returns The payload.
|
|
164
153
|
*/
|
|
165
154
|
readonly payloadProvider: (link: Reference) => TPayload;
|
|
155
|
+
/**
|
|
156
|
+
* Computes the identity key of a link.
|
|
157
|
+
*
|
|
158
|
+
* The snapshot remembers it, so {@link editBacklinksSnapshot} looks the links up with the same function
|
|
159
|
+
* without being told. When {@link BuildBacklinksSnapshotParams.target} was built with a provider, omitting
|
|
160
|
+
* this reuses that one, and passing a different one throws: a snapshot keyed by two functions matches
|
|
161
|
+
* nothing.
|
|
162
|
+
*
|
|
163
|
+
* @default the provider `target` was built with, else `JSON.stringify`
|
|
164
|
+
*/
|
|
165
|
+
readonly referenceIdentityKeyProvider?: (link: Reference) => string;
|
|
166
166
|
/**
|
|
167
167
|
* An existing snapshot to merge into, so several sets of backlinks can be accumulated into one.
|
|
168
168
|
*
|
|
@@ -194,10 +194,6 @@ export interface ConvertLinkParams {
|
|
|
194
194
|
* @default `true`
|
|
195
195
|
*/
|
|
196
196
|
readonly isEmptyEmbedAliasAllowed?: boolean;
|
|
197
|
-
/**
|
|
198
|
-
* A reference for the link.
|
|
199
|
-
*/
|
|
200
|
-
readonly link: Reference;
|
|
201
197
|
/**
|
|
202
198
|
* A style of the link path.
|
|
203
199
|
*/
|
|
@@ -214,6 +210,10 @@ export interface ConvertLinkParams {
|
|
|
214
210
|
* An old path of the link.
|
|
215
211
|
*/
|
|
216
212
|
readonly oldSourcePathOrFile?: PathOrFile;
|
|
213
|
+
/**
|
|
214
|
+
* The reference whose link is converted.
|
|
215
|
+
*/
|
|
216
|
+
readonly reference: Reference;
|
|
217
217
|
/**
|
|
218
218
|
* Whether to escape the alias.
|
|
219
219
|
*
|
|
@@ -293,10 +293,6 @@ export interface EditBacklinksParams extends EditBacklinksOptions {
|
|
|
293
293
|
* The Obsidian application instance.
|
|
294
294
|
*/
|
|
295
295
|
readonly app: App;
|
|
296
|
-
/**
|
|
297
|
-
* The function that converts each link.
|
|
298
|
-
*/
|
|
299
|
-
readonly linkConverter: (link: Reference) => Promisable<MaybeReturn<string>>;
|
|
300
296
|
/**
|
|
301
297
|
* An optional reporter invoked once per backlink file after its links are updated, with the running
|
|
302
298
|
* count of processed files and the total. When omitted, no progress is reported.
|
|
@@ -306,6 +302,10 @@ export interface EditBacklinksParams extends EditBacklinksOptions {
|
|
|
306
302
|
* The path or file to edit the backlinks for.
|
|
307
303
|
*/
|
|
308
304
|
readonly pathOrFile: PathOrFile;
|
|
305
|
+
/**
|
|
306
|
+
* The function that converts each link.
|
|
307
|
+
*/
|
|
308
|
+
readonly referenceConverter: (link: Reference) => Promisable<MaybeReturn<string>>;
|
|
309
309
|
}
|
|
310
310
|
/**
|
|
311
311
|
* Options for {@link editBacklinksSnapshot}.
|
|
@@ -321,10 +321,15 @@ export interface EditBacklinksSnapshotParams<TPayload> extends EditBacklinksSnap
|
|
|
321
321
|
* The Obsidian application instance.
|
|
322
322
|
*/
|
|
323
323
|
readonly app: App;
|
|
324
|
+
/**
|
|
325
|
+
* An optional reporter invoked once per backlink file after its links are updated, with the running
|
|
326
|
+
* count of processed files and the total. When omitted, no progress is reported.
|
|
327
|
+
*/
|
|
328
|
+
readonly linkUpdateProgressReporter?: LinkUpdateProgressReporter;
|
|
324
329
|
/**
|
|
325
330
|
* The function that converts each link.
|
|
326
331
|
*/
|
|
327
|
-
readonly
|
|
332
|
+
readonly referenceConverter: (params: BacklinkConversionParams<TPayload>) => Promisable<MaybeReturn<string>>;
|
|
328
333
|
/**
|
|
329
334
|
* Computes the identity key of a link.
|
|
330
335
|
*
|
|
@@ -335,12 +340,7 @@ export interface EditBacklinksSnapshotParams<TPayload> extends EditBacklinksSnap
|
|
|
335
340
|
*
|
|
336
341
|
* @default the provider the snapshot was built with, else `JSON.stringify`
|
|
337
342
|
*/
|
|
338
|
-
readonly
|
|
339
|
-
/**
|
|
340
|
-
* An optional reporter invoked once per backlink file after its links are updated, with the running
|
|
341
|
-
* count of processed files and the total. When omitted, no progress is reported.
|
|
342
|
-
*/
|
|
343
|
-
readonly linkUpdateProgressReporter?: LinkUpdateProgressReporter;
|
|
343
|
+
readonly referenceIdentityKeyProvider?: (link: Reference) => string;
|
|
344
344
|
/**
|
|
345
345
|
* Whether the converter is also shown links that are **not** in the snapshot, with an `undefined`
|
|
346
346
|
* {@link BacklinkConversionParams.payload}.
|
|
@@ -352,16 +352,16 @@ export interface EditBacklinksSnapshotParams<TPayload> extends EditBacklinksSnap
|
|
|
352
352
|
*
|
|
353
353
|
* @default `false`
|
|
354
354
|
*/
|
|
355
|
-
readonly
|
|
355
|
+
readonly shouldVisitUnmatchedReferences?: boolean;
|
|
356
356
|
/**
|
|
357
357
|
* The captured backlinks to edit.
|
|
358
358
|
*/
|
|
359
359
|
readonly snapshot: BacklinksSnapshot<TPayload>;
|
|
360
360
|
}
|
|
361
361
|
/**
|
|
362
|
-
* Parameters for {@link
|
|
362
|
+
* Parameters for {@link editReferencesInContent}.
|
|
363
363
|
*/
|
|
364
|
-
export interface
|
|
364
|
+
export interface EditReferencesInContentParams {
|
|
365
365
|
/**
|
|
366
366
|
* The abort signal to control the execution of the function.
|
|
367
367
|
*/
|
|
@@ -375,11 +375,7 @@ export interface EditLinksInContentParams {
|
|
|
375
375
|
*/
|
|
376
376
|
readonly content: string;
|
|
377
377
|
/**
|
|
378
|
-
*
|
|
379
|
-
*/
|
|
380
|
-
readonly linkConverter: (link: Reference) => Promisable<MaybeReturn<string>>;
|
|
381
|
-
/**
|
|
382
|
-
* A range within {@link EditLinksInContentParams.content}, in character offsets, restricting the pass to
|
|
378
|
+
* A range within {@link EditReferencesInContentParams.content}, in character offsets, restricting the pass to
|
|
383
379
|
* the links inside it. When omitted, every link is visited.
|
|
384
380
|
*
|
|
385
381
|
* A link is edited only when it is **fully contained** in the range; one that merely overlaps it is left
|
|
@@ -392,6 +388,10 @@ export interface EditLinksInContentParams {
|
|
|
392
388
|
* @default `undefined`
|
|
393
389
|
*/
|
|
394
390
|
readonly offsetRange?: OffsetRange;
|
|
391
|
+
/**
|
|
392
|
+
* The function that converts each link.
|
|
393
|
+
*/
|
|
394
|
+
readonly referenceConverter: (link: Reference) => Promisable<MaybeReturn<string>>;
|
|
395
395
|
/**
|
|
396
396
|
* Whether to also edit external links parsed from the note body. When `true`, the converter also
|
|
397
397
|
* receives references for external links.
|
|
@@ -414,23 +414,27 @@ export interface EditLinksInContentParams {
|
|
|
414
414
|
* @default `false`
|
|
415
415
|
*/
|
|
416
416
|
readonly shouldEditMultiValueFrontmatterExternalLinks?: boolean;
|
|
417
|
+
/**
|
|
418
|
+
* Whether to leave every link inside a heading unchanged: the converter is not called for it, so it stays
|
|
419
|
+
* byte-for-byte as written. A link in a heading is part of the heading's text, so rewriting it changes
|
|
420
|
+
* that text and breaks every `#heading` subpath pointing at the heading. See {@link isReferenceInHeading}.
|
|
421
|
+
*
|
|
422
|
+
* @default `false`
|
|
423
|
+
*/
|
|
424
|
+
readonly shouldSkipReferencesInHeadings?: boolean;
|
|
417
425
|
}
|
|
418
426
|
/**
|
|
419
|
-
* Options for {@link
|
|
427
|
+
* Options for {@link editReferences}.
|
|
420
428
|
*/
|
|
421
|
-
export type
|
|
429
|
+
export type EditReferencesOptions = ProcessOptions;
|
|
422
430
|
/**
|
|
423
|
-
* Parameters for {@link
|
|
431
|
+
* Parameters for {@link editReferences}.
|
|
424
432
|
*/
|
|
425
|
-
export interface
|
|
433
|
+
export interface EditReferencesParams extends EditReferencesOptions {
|
|
426
434
|
/**
|
|
427
435
|
* The Obsidian application instance.
|
|
428
436
|
*/
|
|
429
437
|
readonly app: App;
|
|
430
|
-
/**
|
|
431
|
-
* The function that converts each link.
|
|
432
|
-
*/
|
|
433
|
-
readonly linkConverter: (link: Reference) => Promisable<MaybeReturn<string>>;
|
|
434
438
|
/**
|
|
435
439
|
* A range within the file's content, in character offsets, restricting the pass to the links inside it.
|
|
436
440
|
* When omitted, every link is visited.
|
|
@@ -455,6 +459,10 @@ export interface EditLinksParams extends EditLinksOptions {
|
|
|
455
459
|
* The path or file to edit the links for.
|
|
456
460
|
*/
|
|
457
461
|
readonly pathOrFile: PathOrFile;
|
|
462
|
+
/**
|
|
463
|
+
* The function that converts each link.
|
|
464
|
+
*/
|
|
465
|
+
readonly referenceConverter: (link: Reference) => Promisable<MaybeReturn<string>>;
|
|
458
466
|
/**
|
|
459
467
|
* Whether to also edit external links parsed from the note body. When `true`, the converter also
|
|
460
468
|
* receives references for external links.
|
|
@@ -477,19 +485,27 @@ export interface EditLinksParams extends EditLinksOptions {
|
|
|
477
485
|
* @default `false`
|
|
478
486
|
*/
|
|
479
487
|
readonly shouldEditMultiValueFrontmatterExternalLinks?: boolean;
|
|
488
|
+
/**
|
|
489
|
+
* Whether to leave every link inside a heading unchanged: the converter is not called for it, so it stays
|
|
490
|
+
* byte-for-byte as written. A link in a heading is part of the heading's text, so rewriting it changes
|
|
491
|
+
* that text and breaks every `#heading` subpath pointing at the heading. See {@link isReferenceInHeading}.
|
|
492
|
+
*
|
|
493
|
+
* @default `false`
|
|
494
|
+
*/
|
|
495
|
+
readonly shouldSkipReferencesInHeadings?: boolean;
|
|
480
496
|
}
|
|
481
497
|
/**
|
|
482
|
-
* Parameters for {@link
|
|
498
|
+
* Parameters for {@link extractReferenceFile}.
|
|
483
499
|
*/
|
|
484
|
-
export interface
|
|
500
|
+
export interface ExtractReferenceFileParams {
|
|
485
501
|
/**
|
|
486
502
|
* The Obsidian application instance.
|
|
487
503
|
*/
|
|
488
504
|
readonly app: App;
|
|
489
505
|
/**
|
|
490
|
-
* The reference
|
|
506
|
+
* The reference to resolve.
|
|
491
507
|
*/
|
|
492
|
-
readonly
|
|
508
|
+
readonly reference: Reference;
|
|
493
509
|
/**
|
|
494
510
|
* Whether to allow non-existing files.
|
|
495
511
|
*
|
|
@@ -779,6 +795,13 @@ export interface UpdateFileUrlLinksInContentParams {
|
|
|
779
795
|
* @default `undefined`
|
|
780
796
|
*/
|
|
781
797
|
readonly offsetRange?: OffsetRange;
|
|
798
|
+
/**
|
|
799
|
+
* Whether to leave every link inside a heading unchanged. See
|
|
800
|
+
* {@link EditReferencesInContentParams.shouldSkipReferencesInHeadings}.
|
|
801
|
+
*
|
|
802
|
+
* @default `false`
|
|
803
|
+
*/
|
|
804
|
+
readonly shouldSkipReferencesInHeadings?: boolean;
|
|
782
805
|
/**
|
|
783
806
|
* Whether to emit the normalized links with angle brackets and raw spaces instead of `%20`-encoding.
|
|
784
807
|
*
|
|
@@ -818,6 +841,12 @@ export interface UpdateFileUrlLinksInFileParams extends ProcessOptions {
|
|
|
818
841
|
* The path or file to normalize the `file://` links in.
|
|
819
842
|
*/
|
|
820
843
|
readonly pathOrFile: PathOrFile;
|
|
844
|
+
/**
|
|
845
|
+
* Whether to leave every link inside a heading unchanged. See {@link EditReferencesParams.shouldSkipReferencesInHeadings}.
|
|
846
|
+
*
|
|
847
|
+
* @default `false`
|
|
848
|
+
*/
|
|
849
|
+
readonly shouldSkipReferencesInHeadings?: boolean;
|
|
821
850
|
/**
|
|
822
851
|
* Whether to emit the normalized links with angle brackets and raw spaces instead of `%20`-encoding.
|
|
823
852
|
*
|
|
@@ -845,10 +874,6 @@ export interface UpdateLinkParams {
|
|
|
845
874
|
* @default `true`
|
|
846
875
|
*/
|
|
847
876
|
readonly isEmptyEmbedAliasAllowed?: boolean;
|
|
848
|
-
/**
|
|
849
|
-
* A reference for the link.
|
|
850
|
-
*/
|
|
851
|
-
readonly link: Reference;
|
|
852
877
|
/**
|
|
853
878
|
* A style of the link path.
|
|
854
879
|
*/
|
|
@@ -873,6 +898,10 @@ export interface UpdateLinkParams {
|
|
|
873
898
|
* An old path of the file.
|
|
874
899
|
*/
|
|
875
900
|
readonly oldTargetPathOrFile?: PathOrFile;
|
|
901
|
+
/**
|
|
902
|
+
* The reference whose link is updated.
|
|
903
|
+
*/
|
|
904
|
+
readonly reference: Reference;
|
|
876
905
|
/**
|
|
877
906
|
* Whether to escape the alias.
|
|
878
907
|
*
|
|
@@ -941,9 +970,9 @@ export interface UpdateLinkParams {
|
|
|
941
970
|
readonly shouldUseLeadingSlashForAbsolutePaths?: boolean;
|
|
942
971
|
}
|
|
943
972
|
/**
|
|
944
|
-
* Params for {@link
|
|
973
|
+
* Params for {@link updateReferencesInFile}.
|
|
945
974
|
*/
|
|
946
|
-
export interface
|
|
975
|
+
export interface UpdateReferencesInFileParams extends ProcessOptions {
|
|
947
976
|
/**
|
|
948
977
|
* An Obsidian app instance.
|
|
949
978
|
*/
|
|
@@ -1031,6 +1060,15 @@ export interface UpdateLinksInFileParams extends ProcessOptions {
|
|
|
1031
1060
|
* @default `false`
|
|
1032
1061
|
*/
|
|
1033
1062
|
readonly shouldIncludeAttachmentExtensionToEmbedAlias?: boolean;
|
|
1063
|
+
/**
|
|
1064
|
+
* Whether to leave every link inside a heading unchanged: it is neither converted nor restyled, so it
|
|
1065
|
+
* stays byte-for-byte as written. A link in a heading is part of the heading's text, so rewriting it
|
|
1066
|
+
* changes that text and breaks every `#heading` subpath pointing at the heading. See
|
|
1067
|
+
* {@link isReferenceInHeading}.
|
|
1068
|
+
*
|
|
1069
|
+
* @default `false`
|
|
1070
|
+
*/
|
|
1071
|
+
readonly shouldSkipReferencesInHeadings?: boolean;
|
|
1034
1072
|
/**
|
|
1035
1073
|
* Whether to update only embedded links.
|
|
1036
1074
|
*/
|
|
@@ -1079,9 +1117,9 @@ export interface UpdateLinksInFileParams extends ProcessOptions {
|
|
|
1079
1117
|
readonly shouldUseLeadingSlashForAbsolutePaths?: boolean;
|
|
1080
1118
|
}
|
|
1081
1119
|
/**
|
|
1082
|
-
* Params for {@link
|
|
1120
|
+
* Params for {@link updateReferencesInContent}.
|
|
1083
1121
|
*/
|
|
1084
|
-
interface
|
|
1122
|
+
interface UpdateReferencesInContentParams {
|
|
1085
1123
|
/**
|
|
1086
1124
|
* An Obsidian app instance.
|
|
1087
1125
|
*/
|
|
@@ -1126,7 +1164,7 @@ interface UpdateLinksInContentParams {
|
|
|
1126
1164
|
*/
|
|
1127
1165
|
readonly newSourcePathOrFile: PathOrFile;
|
|
1128
1166
|
/**
|
|
1129
|
-
* A range within {@link
|
|
1167
|
+
* A range within {@link UpdateReferencesInContentParams.content}, in character offsets, restricting the pass
|
|
1130
1168
|
* to the links inside it. When omitted, every link is visited.
|
|
1131
1169
|
*
|
|
1132
1170
|
* A link is updated only when it is **fully contained** in the range; one that merely overlaps it is left
|
|
@@ -1167,6 +1205,15 @@ interface UpdateLinksInContentParams {
|
|
|
1167
1205
|
* @default `false`
|
|
1168
1206
|
*/
|
|
1169
1207
|
readonly shouldIncludeAttachmentExtensionToEmbedAlias?: boolean;
|
|
1208
|
+
/**
|
|
1209
|
+
* Whether to leave every link inside a heading unchanged: it is neither converted nor restyled, so it
|
|
1210
|
+
* stays byte-for-byte as written. A link in a heading is part of the heading's text, so rewriting it
|
|
1211
|
+
* changes that text and breaks every `#heading` subpath pointing at the heading. See
|
|
1212
|
+
* {@link isReferenceInHeading}.
|
|
1213
|
+
*
|
|
1214
|
+
* @default `false`
|
|
1215
|
+
*/
|
|
1216
|
+
readonly shouldSkipReferencesInHeadings?: boolean;
|
|
1170
1217
|
/**
|
|
1171
1218
|
* Whether to update only embedded links.
|
|
1172
1219
|
*/
|
|
@@ -1257,21 +1304,21 @@ export declare function editBacklinksSnapshot<TPayload>(params: EditBacklinksSna
|
|
|
1257
1304
|
* @param params - The parameters for editing the links.
|
|
1258
1305
|
* @returns A {@link Promise} that resolves when the links have been edited.
|
|
1259
1306
|
*/
|
|
1260
|
-
export declare function
|
|
1307
|
+
export declare function editReferences(params: EditReferencesParams): Promise<void>;
|
|
1261
1308
|
/**
|
|
1262
1309
|
* Edits the links in a content string.
|
|
1263
1310
|
*
|
|
1264
1311
|
* @param params - The parameters for editing the links in the content.
|
|
1265
1312
|
* @returns The promise that resolves to the updated content.
|
|
1266
1313
|
*/
|
|
1267
|
-
export declare function
|
|
1314
|
+
export declare function editReferencesInContent(params: EditReferencesInContentParams): Promise<string>;
|
|
1268
1315
|
/**
|
|
1269
1316
|
* Extracts the file associated with a link.
|
|
1270
1317
|
*
|
|
1271
1318
|
* @param params - The parameters for extracting the link file.
|
|
1272
1319
|
* @returns The file associated with the link, or `null` if not found.
|
|
1273
1320
|
*/
|
|
1274
|
-
export declare function
|
|
1321
|
+
export declare function extractReferenceFile(params: ExtractReferenceFileParams): null | TFile;
|
|
1275
1322
|
/**
|
|
1276
1323
|
* Generates a markdown link based on the provided parameters.
|
|
1277
1324
|
*
|
|
@@ -1381,12 +1428,12 @@ export declare function updateLink(params: UpdateLinkParams): string;
|
|
|
1381
1428
|
* @param params - The parameters for updating the links.
|
|
1382
1429
|
* @returns A {@link Promise} that resolves to the content with updated links.
|
|
1383
1430
|
*/
|
|
1384
|
-
export declare function
|
|
1431
|
+
export declare function updateReferencesInContent(params: UpdateReferencesInContentParams): Promise<string>;
|
|
1385
1432
|
/**
|
|
1386
1433
|
* Updates the links in a file based on the provided parameters.
|
|
1387
1434
|
*
|
|
1388
1435
|
* @param params - The parameters for updating the links.
|
|
1389
1436
|
* @returns A {@link Promise} that resolves when the links are updated.
|
|
1390
1437
|
*/
|
|
1391
|
-
export declare function
|
|
1438
|
+
export declare function updateReferencesInFile(params: UpdateReferencesInFileParams): Promise<void>;
|
|
1392
1439
|
export {};
|