@tiptap/extension-find-and-replace 3.32.0 → 3.32.1

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/index.d.cts CHANGED
@@ -27,7 +27,7 @@ type SearchRegex = RegExp | RE2JS;
27
27
  * @param options Case sensitivity, regex mode, and whole word matching.
28
28
  * @returns A compiled matcher, or `null` when the term is invalid or unsupported.
29
29
  */
30
- declare function createSearchRegex(term: string, options: SearchOptions): SearchRegex | null;
30
+ export declare function createSearchRegex(term: string, options: SearchOptions): SearchRegex | null;
31
31
  //#endregion
32
32
  //#region src/search/search.d.ts
33
33
  /**
@@ -37,7 +37,7 @@ declare function createSearchRegex(term: string, options: SearchOptions): Search
37
37
  * @param options Case sensitivity, regex mode, and whole word matching.
38
38
  * @returns The list of matched ranges in textblock order.
39
39
  */
40
- declare function searchTextblocks(textblocks: readonly TextblockSearchTarget[], term: string, options: SearchOptions): SearchResult[];
40
+ export declare function searchTextblocks(textblocks: readonly TextblockSearchTarget[], term: string, options: SearchOptions): SearchResult[];
41
41
  /**
42
42
  * Searches all textblocks of a document for a term and returns the matched ranges.
43
43
  * Matches may span multiple text nodes (e.g. across marks), but never leave a textblock.
@@ -46,7 +46,7 @@ declare function searchTextblocks(textblocks: readonly TextblockSearchTarget[],
46
46
  * @param options Case sensitivity, regex mode, and whole word matching.
47
47
  * @returns The list of matched ranges in document order.
48
48
  */
49
- declare function searchDocument(doc: Node, term: string, options: SearchOptions): SearchResult[];
49
+ export declare function searchDocument(doc: Node, term: string, options: SearchOptions): SearchResult[];
50
50
  /**
51
51
  * Finds the index of the first result at or after a position, wrapping around
52
52
  * to the first result when the position is behind the last result.
@@ -54,10 +54,10 @@ declare function searchDocument(doc: Node, term: string, options: SearchOptions)
54
54
  * @param from The position to search from.
55
55
  * @returns The result index, or `null` when there are no results.
56
56
  */
57
- declare function findNextIndex(results: SearchResult[], from: number): number | null;
57
+ export declare function findNextIndex(results: SearchResult[], from: number): number | null;
58
58
  //#endregion
59
59
  //#region src/types.d.ts
60
- interface FindAndReplaceOptions {
60
+ export interface FindAndReplaceOptions {
61
61
  /**
62
62
  * The initial search term.
63
63
  * @default ''
@@ -101,7 +101,7 @@ interface FindAndReplaceOptions {
101
101
  */
102
102
  injectNonce: string | undefined;
103
103
  }
104
- interface FindAndReplaceStorage {
104
+ export interface FindAndReplaceStorage {
105
105
  /**
106
106
  * The current search term.
107
107
  */
@@ -200,11 +200,11 @@ declare module '@tiptap/core' {
200
200
  };
201
201
  }
202
202
  }
203
- declare const FindAndReplace: Extension<FindAndReplaceOptions, FindAndReplaceStorage>;
203
+ export declare const FindAndReplace: Extension<FindAndReplaceOptions, FindAndReplaceStorage>;
204
204
  //#endregion
205
205
  //#region src/constants/constants.d.ts
206
- declare const resultClass = "find-and-replace-result";
207
- declare const currentResultClass = "find-and-replace-result-current";
206
+ export declare const resultClass = "find-and-replace-result";
207
+ export declare const currentResultClass = "find-and-replace-result-current";
208
208
  //#endregion
209
209
  //#region src/plugin/plugin-state.d.ts
210
210
  interface FindAndReplacePluginState {
@@ -231,8 +231,8 @@ interface FindAndReplaceMeta {
231
231
  }
232
232
  //#endregion
233
233
  //#region src/plugin/plugin.d.ts
234
- declare const FindAndReplacePluginKey: PluginKey<FindAndReplacePluginState>;
235
- declare const FindAndReplacePlugin: (options: FindAndReplaceOptions, onCreate: (pluginState: FindAndReplacePluginState) => void) => Plugin<FindAndReplacePluginState>;
234
+ export declare const FindAndReplacePluginKey: PluginKey<FindAndReplacePluginState>;
235
+ export declare const FindAndReplacePlugin: (options: FindAndReplaceOptions, onCreate: (pluginState: FindAndReplacePluginState) => void) => Plugin<FindAndReplacePluginState>;
236
236
  //#endregion
237
- export { FindAndReplace, FindAndReplace as default, type FindAndReplaceMeta, FindAndReplaceOptions, FindAndReplacePlugin, FindAndReplacePluginKey, type FindAndReplacePluginState, FindAndReplaceStorage, type SearchOptions, type SearchResult, type TextblockSearchTarget, createSearchRegex, currentResultClass, findNextIndex, resultClass, searchDocument, searchTextblocks };
237
+ export { FindAndReplace as default, type FindAndReplaceMeta, type FindAndReplacePluginState, type SearchOptions, type SearchResult, type TextblockSearchTarget };
238
238
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/search/types.ts","../src/search/regex.ts","../src/search/search.ts","../src/types.ts","../src/find-and-replace.ts","../src/constants/constants.ts","../src/plugin/plugin-state.ts","../src/plugin/plugin.ts"],"mappings":";;;;;;UAEiB;EACf;EACA;;UAGe;EACf,MAAM;EACN;;UAGe;EACf;EACA;EACA;;;;KCXU,cAAc,SAAS;;;;;;;;iBA2CnB,kBAAkB,cAAc,SAAS,gBAAgB;;;;;;;;;;iBC/BzD,iBACd,qBAAqB,yBACrB,cACA,SAAS,gBACR;;;;;;;;;iBAkBa,eAAe,KAAK,MAAM,cAAc,SAAS,gBAAgB;;;;;;;;iBAuBjE,cAAc,SAAS,gBAAgB;;;UC3DtC;;;;;EAKf;;;;;EAMA;;;;;EAMA;;;;;;EAOA;;;;;EAMA;;;;;;EAOA;;;;;EAMA;;;;;EAMA;;UAGe;;;;EAIf;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA,SAAS;;;;EAKT;;;YAIU;IACR,gBAAgB;;;;;;YC5ER,SAAS;IACjB;;;;;;MAME,gBAAgB,iBAAiB;;;;;;MAOjC,iBAAiB,iBAAiB;;;;;;MAOlC,mBAAmB,2BAA2B;;;;;;;MAQ9C,cAAc,sBAAsB;;;;;;MAOpC,eAAe,uBAAuB;;;;;MAMtC,eAAe;;;;;MAMf,kBAAkB;;;;;MAMlB,sBAAsB;;;;;MAMtB,0BAA0B;;;;;MAM1B,mBAAmB;;;;cAuHZ,gBAAc,UAAA,uBAAA;;;cC1Md;cACA;;;UCGI;EACf;EACA;EACA;EACA;EACA;EACA,SAAS;EACT;EACA,aAAa;;;;;;UAOE;EACf;EACA;EACA;EACA;EACA;EACA;;;;cCbW,yBAAuB,UAAA;cAEvB,uBACX,SAAS,uBACT,WAAW,aAAa,uCAAkC,OAAA"}
1
+ {"version":3,"file":"index.d.cts","names":["_0"],"sources":["../src/search/types.ts","../src/search/regex.ts","../src/search/search.ts","../src/types.ts","../src/find-and-replace.ts","../src/constants/constants.ts","../src/plugin/plugin-state.ts","../src/plugin/plugin.ts"],"mappings":";;;;;;UAEiB;EACf;EACA;;UAGe;EACf,MAAM;EACN;;UAGe;EACf;EACA;EACA;;;;KCXU,cAAc,SAAS;;;;;;;;wBA2CnB,kBAAkB,cAAc,SAAS,gBAAgB;;;;;;;;;;wBC/BzD,iBACd,qBAAqB,yBACrB,cACA,SAAS,gBACR;;;;;;;;;wBAkBa,eAAe,KAAK,MAAM,cAAc,SAAS,gBAAgB;;;;;;;;wBAuBjE,cAAc,SAAS,gBAAgB;;;iBC3DtC;;;;;EAKf;;;;;EAMA;;;;;EAMA;;;;;;EAOA;;;;;EAMA;;;;;;EAOA;;;;;EAMA;;;;;EAMA;;iBAGe;;;;EAIf;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA,SAAS;;;;EAKT;;;YAIU;IACR,gBAAgB;;;;;;YC5ER,SAAS;IACjB;;;;;;MAME,gBAAgB,iBAAiB;;;;;;MAOjC,iBAAiB,iBAAiB;;;;;;MAOlC,mBAAmB,2BAA2B;;;;;;;MAQ9C,cAAc,sBAAsB;;;;;;MAOpC,eAAe,uBAAuB;;;;;MAMtC,eAAe;;;;;MAMf,kBAAkB;;;;;MAMlB,sBAAsB;;;;;MAMtB,0BAA0B;;;;;MAM1B,mBAAmB;;;;qBAuHZ,gBAAc,UAAA,uBAAA;;;qBC1Md;qBACA;;;UCGI;EACf;EACA;EACA;EACA;EACA;EACA,SAAS;EACT;EACA,aAAa;;;;;;UAOE;EACf;EACA;EACA;EACA;EACA;EACA;;;;qBCbW,yBAAuB,UAAA;qBAEvB,uBACX,SAAS,uBACT,WAAW,aAAa,uCAAkC,OAAA"}
package/dist/index.d.ts CHANGED
@@ -27,7 +27,7 @@ type SearchRegex = RegExp | RE2JS;
27
27
  * @param options Case sensitivity, regex mode, and whole word matching.
28
28
  * @returns A compiled matcher, or `null` when the term is invalid or unsupported.
29
29
  */
30
- declare function createSearchRegex(term: string, options: SearchOptions): SearchRegex | null;
30
+ export declare function createSearchRegex(term: string, options: SearchOptions): SearchRegex | null;
31
31
  //#endregion
32
32
  //#region src/search/search.d.ts
33
33
  /**
@@ -37,7 +37,7 @@ declare function createSearchRegex(term: string, options: SearchOptions): Search
37
37
  * @param options Case sensitivity, regex mode, and whole word matching.
38
38
  * @returns The list of matched ranges in textblock order.
39
39
  */
40
- declare function searchTextblocks(textblocks: readonly TextblockSearchTarget[], term: string, options: SearchOptions): SearchResult[];
40
+ export declare function searchTextblocks(textblocks: readonly TextblockSearchTarget[], term: string, options: SearchOptions): SearchResult[];
41
41
  /**
42
42
  * Searches all textblocks of a document for a term and returns the matched ranges.
43
43
  * Matches may span multiple text nodes (e.g. across marks), but never leave a textblock.
@@ -46,7 +46,7 @@ declare function searchTextblocks(textblocks: readonly TextblockSearchTarget[],
46
46
  * @param options Case sensitivity, regex mode, and whole word matching.
47
47
  * @returns The list of matched ranges in document order.
48
48
  */
49
- declare function searchDocument(doc: Node, term: string, options: SearchOptions): SearchResult[];
49
+ export declare function searchDocument(doc: Node, term: string, options: SearchOptions): SearchResult[];
50
50
  /**
51
51
  * Finds the index of the first result at or after a position, wrapping around
52
52
  * to the first result when the position is behind the last result.
@@ -54,10 +54,10 @@ declare function searchDocument(doc: Node, term: string, options: SearchOptions)
54
54
  * @param from The position to search from.
55
55
  * @returns The result index, or `null` when there are no results.
56
56
  */
57
- declare function findNextIndex(results: SearchResult[], from: number): number | null;
57
+ export declare function findNextIndex(results: SearchResult[], from: number): number | null;
58
58
  //#endregion
59
59
  //#region src/types.d.ts
60
- interface FindAndReplaceOptions {
60
+ export interface FindAndReplaceOptions {
61
61
  /**
62
62
  * The initial search term.
63
63
  * @default ''
@@ -101,7 +101,7 @@ interface FindAndReplaceOptions {
101
101
  */
102
102
  injectNonce: string | undefined;
103
103
  }
104
- interface FindAndReplaceStorage {
104
+ export interface FindAndReplaceStorage {
105
105
  /**
106
106
  * The current search term.
107
107
  */
@@ -200,11 +200,11 @@ declare module '@tiptap/core' {
200
200
  };
201
201
  }
202
202
  }
203
- declare const FindAndReplace: Extension<FindAndReplaceOptions, FindAndReplaceStorage>;
203
+ export declare const FindAndReplace: Extension<FindAndReplaceOptions, FindAndReplaceStorage>;
204
204
  //#endregion
205
205
  //#region src/constants/constants.d.ts
206
- declare const resultClass = "find-and-replace-result";
207
- declare const currentResultClass = "find-and-replace-result-current";
206
+ export declare const resultClass = "find-and-replace-result";
207
+ export declare const currentResultClass = "find-and-replace-result-current";
208
208
  //#endregion
209
209
  //#region src/plugin/plugin-state.d.ts
210
210
  interface FindAndReplacePluginState {
@@ -231,8 +231,8 @@ interface FindAndReplaceMeta {
231
231
  }
232
232
  //#endregion
233
233
  //#region src/plugin/plugin.d.ts
234
- declare const FindAndReplacePluginKey: PluginKey<FindAndReplacePluginState>;
235
- declare const FindAndReplacePlugin: (options: FindAndReplaceOptions, onCreate: (pluginState: FindAndReplacePluginState) => void) => Plugin<FindAndReplacePluginState>;
234
+ export declare const FindAndReplacePluginKey: PluginKey<FindAndReplacePluginState>;
235
+ export declare const FindAndReplacePlugin: (options: FindAndReplaceOptions, onCreate: (pluginState: FindAndReplacePluginState) => void) => Plugin<FindAndReplacePluginState>;
236
236
  //#endregion
237
- export { FindAndReplace, FindAndReplace as default, type FindAndReplaceMeta, FindAndReplaceOptions, FindAndReplacePlugin, FindAndReplacePluginKey, type FindAndReplacePluginState, FindAndReplaceStorage, type SearchOptions, type SearchResult, type TextblockSearchTarget, createSearchRegex, currentResultClass, findNextIndex, resultClass, searchDocument, searchTextblocks };
237
+ export { FindAndReplace as default, type FindAndReplaceMeta, type FindAndReplacePluginState, type SearchOptions, type SearchResult, type TextblockSearchTarget };
238
238
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/search/types.ts","../src/search/regex.ts","../src/search/search.ts","../src/types.ts","../src/find-and-replace.ts","../src/constants/constants.ts","../src/plugin/plugin-state.ts","../src/plugin/plugin.ts"],"mappings":";;;;;;UAEiB;EACf;EACA;;UAGe;EACf,MAAM;EACN;;UAGe;EACf;EACA;EACA;;;;KCXU,cAAc,SAAS;;;;;;;;iBA2CnB,kBAAkB,cAAc,SAAS,gBAAgB;;;;;;;;;;iBC/BzD,iBACd,qBAAqB,yBACrB,cACA,SAAS,gBACR;;;;;;;;;iBAkBa,eAAe,KAAK,MAAM,cAAc,SAAS,gBAAgB;;;;;;;;iBAuBjE,cAAc,SAAS,gBAAgB;;;UC3DtC;;;;;EAKf;;;;;EAMA;;;;;EAMA;;;;;;EAOA;;;;;EAMA;;;;;;EAOA;;;;;EAMA;;;;;EAMA;;UAGe;;;;EAIf;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA,SAAS;;;;EAKT;;;YAIU;IACR,gBAAgB;;;;;;YC5ER,SAAS;IACjB;;;;;;MAME,gBAAgB,iBAAiB;;;;;;MAOjC,iBAAiB,iBAAiB;;;;;;MAOlC,mBAAmB,2BAA2B;;;;;;;MAQ9C,cAAc,sBAAsB;;;;;;MAOpC,eAAe,uBAAuB;;;;;MAMtC,eAAe;;;;;MAMf,kBAAkB;;;;;MAMlB,sBAAsB;;;;;MAMtB,0BAA0B;;;;;MAM1B,mBAAmB;;;;cAuHZ,gBAAc,UAAA,uBAAA;;;cC1Md;cACA;;;UCGI;EACf;EACA;EACA;EACA;EACA;EACA,SAAS;EACT;EACA,aAAa;;;;;;UAOE;EACf;EACA;EACA;EACA;EACA;EACA;;;;cCbW,yBAAuB,UAAA;cAEvB,uBACX,SAAS,uBACT,WAAW,aAAa,uCAAkC,OAAA"}
1
+ {"version":3,"file":"index.d.ts","names":["_0"],"sources":["../src/search/types.ts","../src/search/regex.ts","../src/search/search.ts","../src/types.ts","../src/find-and-replace.ts","../src/constants/constants.ts","../src/plugin/plugin-state.ts","../src/plugin/plugin.ts"],"mappings":";;;;;;UAEiB;EACf;EACA;;UAGe;EACf,MAAM;EACN;;UAGe;EACf;EACA;EACA;;;;KCXU,cAAc,SAAS;;;;;;;;wBA2CnB,kBAAkB,cAAc,SAAS,gBAAgB;;;;;;;;;;wBC/BzD,iBACd,qBAAqB,yBACrB,cACA,SAAS,gBACR;;;;;;;;;wBAkBa,eAAe,KAAK,MAAM,cAAc,SAAS,gBAAgB;;;;;;;;wBAuBjE,cAAc,SAAS,gBAAgB;;;iBC3DtC;;;;;EAKf;;;;;EAMA;;;;;EAMA;;;;;;EAOA;;;;;EAMA;;;;;;EAOA;;;;;EAMA;;;;;EAMA;;iBAGe;;;;EAIf;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA,SAAS;;;;EAKT;;;YAIU;IACR,gBAAgB;;;;;;YC5ER,SAAS;IACjB;;;;;;MAME,gBAAgB,iBAAiB;;;;;;MAOjC,iBAAiB,iBAAiB;;;;;;MAOlC,mBAAmB,2BAA2B;;;;;;;MAQ9C,cAAc,sBAAsB;;;;;;MAOpC,eAAe,uBAAuB;;;;;MAMtC,eAAe;;;;;MAMf,kBAAkB;;;;;MAMlB,sBAAsB;;;;;MAMtB,0BAA0B;;;;;MAM1B,mBAAmB;;;;qBAuHZ,gBAAc,UAAA,uBAAA;;;qBC1Md;qBACA;;;UCGI;EACf;EACA;EACA;EACA;EACA;EACA,SAAS;EACT;EACA,aAAa;;;;;;UAOE;EACf;EACA;EACA;EACA;EACA;EACA;;;;qBCbW,yBAAuB,UAAA;qBAEvB,uBACX,SAAS,uBACT,WAAW,aAAa,uCAAkC,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiptap/extension-find-and-replace",
3
- "version": "3.32.0",
3
+ "version": "3.32.1",
4
4
  "description": "find and replace extension for tiptap",
5
5
  "keywords": [
6
6
  "tiptap",
@@ -42,12 +42,12 @@
42
42
  "re2js": "^2.8.6"
43
43
  },
44
44
  "devDependencies": {
45
- "@tiptap/core": "^3.32.0",
46
- "@tiptap/pm": "^3.32.0"
45
+ "@tiptap/core": "^3.32.1",
46
+ "@tiptap/pm": "^3.32.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@tiptap/core": "3.32.0",
50
- "@tiptap/pm": "3.32.0"
49
+ "@tiptap/core": "3.32.1",
50
+ "@tiptap/pm": "3.32.1"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "vp pack"