@mnaoumov/obsidian-lib 10.0.0 → 10.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/dist/lib/cjs/generated-during-build.cjs +1 -1
- package/dist/lib/cjs/link.cjs +18 -2
- package/dist/lib/cjs/link.d.cts +60 -0
- package/dist/lib/cjs/resource-lock.cjs +20 -2
- package/dist/lib/cjs/resource-lock.d.cts +13 -0
- package/dist/lib/esm/generated-during-build.mjs +1 -1
- package/dist/lib/esm/link.d.mts +60 -0
- package/dist/lib/esm/link.mjs +18 -2
- package/dist/lib/esm/resource-lock.d.mts +13 -0
- package/dist/lib/esm/resource-lock.mjs +20 -2
- package/package.json +1 -1
package/dist/lib/cjs/link.d.cts
CHANGED
|
@@ -414,6 +414,16 @@ export interface EditReferencesInContentParams {
|
|
|
414
414
|
* @default `false`
|
|
415
415
|
*/
|
|
416
416
|
readonly shouldEditMultiValueFrontmatterExternalLinks?: boolean;
|
|
417
|
+
/**
|
|
418
|
+
* A predicate choosing links to leave unchanged: for each reference it returns `true` for, the converter is
|
|
419
|
+
* not called, so the link stays byte-for-byte as written — its path, style, angle brackets and leading dot
|
|
420
|
+
* included. Use it to exclude links the caller decides on, for example by their resolved target path.
|
|
421
|
+
*
|
|
422
|
+
* Applied after the {@link isReferenceInHeading | heading} skip and the offset range.
|
|
423
|
+
*
|
|
424
|
+
* @default `undefined`
|
|
425
|
+
*/
|
|
426
|
+
readonly shouldSkipReference?: (reference: Reference) => boolean;
|
|
417
427
|
/**
|
|
418
428
|
* Whether to leave every link inside a heading unchanged: the converter is not called for it, so it stays
|
|
419
429
|
* byte-for-byte as written. A link in a heading is part of the heading's text, so rewriting it changes
|
|
@@ -485,6 +495,16 @@ export interface EditReferencesParams extends EditReferencesOptions {
|
|
|
485
495
|
* @default `false`
|
|
486
496
|
*/
|
|
487
497
|
readonly shouldEditMultiValueFrontmatterExternalLinks?: boolean;
|
|
498
|
+
/**
|
|
499
|
+
* A predicate choosing links to leave unchanged: for each reference it returns `true` for, the converter is
|
|
500
|
+
* not called, so the link stays byte-for-byte as written — its path, style, angle brackets and leading dot
|
|
501
|
+
* included. Use it to exclude links the caller decides on, for example by their resolved target path.
|
|
502
|
+
*
|
|
503
|
+
* Applied after the {@link isReferenceInHeading | heading} skip and the offset range.
|
|
504
|
+
*
|
|
505
|
+
* @default `undefined`
|
|
506
|
+
*/
|
|
507
|
+
readonly shouldSkipReference?: (reference: Reference) => boolean;
|
|
488
508
|
/**
|
|
489
509
|
* Whether to leave every link inside a heading unchanged: the converter is not called for it, so it stays
|
|
490
510
|
* byte-for-byte as written. A link in a heading is part of the heading's text, so rewriting it changes
|
|
@@ -795,6 +815,16 @@ export interface UpdateFileUrlLinksInContentParams {
|
|
|
795
815
|
* @default `undefined`
|
|
796
816
|
*/
|
|
797
817
|
readonly offsetRange?: OffsetRange;
|
|
818
|
+
/**
|
|
819
|
+
* A predicate choosing links to leave unchanged: for each reference it returns `true` for, the converter is
|
|
820
|
+
* not called, so the link stays byte-for-byte as written — its path, style, angle brackets and leading dot
|
|
821
|
+
* included. Use it to exclude links the caller decides on, for example by their resolved target path.
|
|
822
|
+
*
|
|
823
|
+
* Applied after the {@link isReferenceInHeading | heading} skip and the offset range.
|
|
824
|
+
*
|
|
825
|
+
* @default `undefined`
|
|
826
|
+
*/
|
|
827
|
+
readonly shouldSkipReference?: (reference: Reference) => boolean;
|
|
798
828
|
/**
|
|
799
829
|
* Whether to leave every link inside a heading unchanged. See
|
|
800
830
|
* {@link EditReferencesInContentParams.shouldSkipReferencesInHeadings}.
|
|
@@ -841,6 +871,16 @@ export interface UpdateFileUrlLinksInFileParams extends ProcessOptions {
|
|
|
841
871
|
* The path or file to normalize the `file://` links in.
|
|
842
872
|
*/
|
|
843
873
|
readonly pathOrFile: PathOrFile;
|
|
874
|
+
/**
|
|
875
|
+
* A predicate choosing links to leave unchanged: for each reference it returns `true` for, the converter is
|
|
876
|
+
* not called, so the link stays byte-for-byte as written — its path, style, angle brackets and leading dot
|
|
877
|
+
* included. Use it to exclude links the caller decides on, for example by their resolved target path.
|
|
878
|
+
*
|
|
879
|
+
* Applied after the {@link isReferenceInHeading | heading} skip and the offset range.
|
|
880
|
+
*
|
|
881
|
+
* @default `undefined`
|
|
882
|
+
*/
|
|
883
|
+
readonly shouldSkipReference?: (reference: Reference) => boolean;
|
|
844
884
|
/**
|
|
845
885
|
* Whether to leave every link inside a heading unchanged. See {@link EditReferencesParams.shouldSkipReferencesInHeadings}.
|
|
846
886
|
*
|
|
@@ -1060,6 +1100,16 @@ export interface UpdateReferencesInFileParams extends ProcessOptions {
|
|
|
1060
1100
|
* @default `false`
|
|
1061
1101
|
*/
|
|
1062
1102
|
readonly shouldIncludeAttachmentExtensionToEmbedAlias?: boolean;
|
|
1103
|
+
/**
|
|
1104
|
+
* A predicate choosing links to leave unchanged: for each reference it returns `true` for, the converter is
|
|
1105
|
+
* not called, so the link stays byte-for-byte as written — its path, style, angle brackets and leading dot
|
|
1106
|
+
* included. Use it to exclude links the caller decides on, for example by their resolved target path.
|
|
1107
|
+
*
|
|
1108
|
+
* Applied after the {@link isReferenceInHeading | heading} skip and the offset range.
|
|
1109
|
+
*
|
|
1110
|
+
* @default `undefined`
|
|
1111
|
+
*/
|
|
1112
|
+
readonly shouldSkipReference?: (reference: Reference) => boolean;
|
|
1063
1113
|
/**
|
|
1064
1114
|
* Whether to leave every link inside a heading unchanged: it is neither converted nor restyled, so it
|
|
1065
1115
|
* stays byte-for-byte as written. A link in a heading is part of the heading's text, so rewriting it
|
|
@@ -1205,6 +1255,16 @@ interface UpdateReferencesInContentParams {
|
|
|
1205
1255
|
* @default `false`
|
|
1206
1256
|
*/
|
|
1207
1257
|
readonly shouldIncludeAttachmentExtensionToEmbedAlias?: boolean;
|
|
1258
|
+
/**
|
|
1259
|
+
* A predicate choosing links to leave unchanged: for each reference it returns `true` for, the converter is
|
|
1260
|
+
* not called, so the link stays byte-for-byte as written — its path, style, angle brackets and leading dot
|
|
1261
|
+
* included. Use it to exclude links the caller decides on, for example by their resolved target path.
|
|
1262
|
+
*
|
|
1263
|
+
* Applied after the {@link isReferenceInHeading | heading} skip and the offset range.
|
|
1264
|
+
*
|
|
1265
|
+
* @default `undefined`
|
|
1266
|
+
*/
|
|
1267
|
+
readonly shouldSkipReference?: (reference: Reference) => boolean;
|
|
1208
1268
|
/**
|
|
1209
1269
|
* Whether to leave every link inside a heading unchanged: it is neither converted nor restyled, so it
|
|
1210
1270
|
* stays byte-for-byte as written. A link in a heading is part of the heading's text, so rewriting it
|