@tiptap/extension-audio 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
@@ -1,6 +1,6 @@
1
1
  import { Node } from "@tiptap/core";
2
2
  //#region src/audio.d.ts
3
- interface AudioOptions {
3
+ export interface AudioOptions {
4
4
  /**
5
5
  * Controls if the paste handler for audio sources should be added.
6
6
  * @default true
@@ -104,7 +104,7 @@ declare module '@tiptap/core' {
104
104
  /**
105
105
  * This extension adds support for native audio elements.
106
106
  */
107
- declare const Audio: Node<AudioOptions, any>;
107
+ export declare const Audio: Node<AudioOptions, any>;
108
108
  //#endregion
109
109
  //#region src/utils.d.ts
110
110
  /**
@@ -112,12 +112,12 @@ declare const Audio: Node<AudioOptions, any>;
112
112
  * Matches http/https URLs ending in: mp3, wav, ogg, oga, flac, m4a, aac, opus, weba, webm.
113
113
  * Supports optional query strings. Case-insensitive, single match.
114
114
  */
115
- declare const AUDIO_URL_REGEX: RegExp;
115
+ export declare const AUDIO_URL_REGEX: RegExp;
116
116
  /**
117
117
  * Global variant of AUDIO_URL_REGEX for matching multiple audio URLs in a string.
118
118
  * Use this when you need to find all audio URLs in a block of text.
119
119
  */
120
- declare const AUDIO_URL_REGEX_GLOBAL: RegExp;
120
+ export declare const AUDIO_URL_REGEX_GLOBAL: RegExp;
121
121
  /**
122
122
  * Validates whether a URL is safe for use in an audio element.
123
123
  * Allows http, https, protocol-relative, and relative paths by default.
@@ -127,7 +127,7 @@ declare const AUDIO_URL_REGEX_GLOBAL: RegExp;
127
127
  * @param allowBase64 - Whether to allow base64 data URLs (default: false)
128
128
  * @returns True if the URL is valid and safe, false otherwise
129
129
  */
130
- declare const isValidAudioUrl: (url: string, allowBase64?: boolean) => boolean;
130
+ export declare const isValidAudioUrl: (url: string, allowBase64?: boolean) => boolean;
131
131
  /**
132
132
  * Sanitizes an audio source URL by validating it against allowed protocols.
133
133
  * Returns null for invalid or potentially unsafe URLs.
@@ -136,7 +136,7 @@ declare const isValidAudioUrl: (url: string, allowBase64?: boolean) => boolean;
136
136
  * @param allowBase64 - Whether to allow base64 data URLs (default: false)
137
137
  * @returns The original URL if valid, or null if invalid/unsafe
138
138
  */
139
- declare const sanitizeAudioSrc: (url: string | null | undefined, allowBase64?: boolean) => string | null;
139
+ export declare const sanitizeAudioSrc: (url: string | null | undefined, allowBase64?: boolean) => string | null;
140
140
  //#endregion
141
- export { AUDIO_URL_REGEX, AUDIO_URL_REGEX_GLOBAL, Audio, Audio as default, AudioOptions, isValidAudioUrl, sanitizeAudioSrc };
141
+ export { Audio as default };
142
142
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/audio.ts","../src/utils.ts"],"mappings":";;UAIiB;;;;;;EAMf;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA,gBAAgB;;;;;;EAOhB;;;;;KAMG;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;;;YAIP,SAAS;IACjB;;;;;;MAME,WAAW,SAAS,oBAAoB;;;;;;;cAQjC,OAAK,KAAA;;;;;;;;cCrHL,iBAAe;;;;;cAOf,wBAAsB;;;;;;;;;;cAiBtB,kBAAmB,aAAa;;;;;;;;;cAkChC,mBAAoB,gCAAgC"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/audio.ts","../src/utils.ts"],"mappings":";;iBAIiB;;;;;;EAMf;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA,gBAAgB;;;;;;EAOhB;;;;;KAMG;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;;;YAIP,SAAS;IACjB;;;;;;MAME,WAAW,SAAS,oBAAoB;;;;;;;qBAQjC,OAAK,KAAA;;;;;;;;qBCrHL,iBAAe;;;;;qBAOf,wBAAsB;;;;;;;;;;qBAiBtB,kBAAmB,aAAa;;;;;;;;;qBAkChC,mBAAoB,gCAAgC"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Node } from "@tiptap/core";
2
2
  //#region src/audio.d.ts
3
- interface AudioOptions {
3
+ export interface AudioOptions {
4
4
  /**
5
5
  * Controls if the paste handler for audio sources should be added.
6
6
  * @default true
@@ -104,7 +104,7 @@ declare module '@tiptap/core' {
104
104
  /**
105
105
  * This extension adds support for native audio elements.
106
106
  */
107
- declare const Audio: Node<AudioOptions, any>;
107
+ export declare const Audio: Node<AudioOptions, any>;
108
108
  //#endregion
109
109
  //#region src/utils.d.ts
110
110
  /**
@@ -112,12 +112,12 @@ declare const Audio: Node<AudioOptions, any>;
112
112
  * Matches http/https URLs ending in: mp3, wav, ogg, oga, flac, m4a, aac, opus, weba, webm.
113
113
  * Supports optional query strings. Case-insensitive, single match.
114
114
  */
115
- declare const AUDIO_URL_REGEX: RegExp;
115
+ export declare const AUDIO_URL_REGEX: RegExp;
116
116
  /**
117
117
  * Global variant of AUDIO_URL_REGEX for matching multiple audio URLs in a string.
118
118
  * Use this when you need to find all audio URLs in a block of text.
119
119
  */
120
- declare const AUDIO_URL_REGEX_GLOBAL: RegExp;
120
+ export declare const AUDIO_URL_REGEX_GLOBAL: RegExp;
121
121
  /**
122
122
  * Validates whether a URL is safe for use in an audio element.
123
123
  * Allows http, https, protocol-relative, and relative paths by default.
@@ -127,7 +127,7 @@ declare const AUDIO_URL_REGEX_GLOBAL: RegExp;
127
127
  * @param allowBase64 - Whether to allow base64 data URLs (default: false)
128
128
  * @returns True if the URL is valid and safe, false otherwise
129
129
  */
130
- declare const isValidAudioUrl: (url: string, allowBase64?: boolean) => boolean;
130
+ export declare const isValidAudioUrl: (url: string, allowBase64?: boolean) => boolean;
131
131
  /**
132
132
  * Sanitizes an audio source URL by validating it against allowed protocols.
133
133
  * Returns null for invalid or potentially unsafe URLs.
@@ -136,7 +136,7 @@ declare const isValidAudioUrl: (url: string, allowBase64?: boolean) => boolean;
136
136
  * @param allowBase64 - Whether to allow base64 data URLs (default: false)
137
137
  * @returns The original URL if valid, or null if invalid/unsafe
138
138
  */
139
- declare const sanitizeAudioSrc: (url: string | null | undefined, allowBase64?: boolean) => string | null;
139
+ export declare const sanitizeAudioSrc: (url: string | null | undefined, allowBase64?: boolean) => string | null;
140
140
  //#endregion
141
- export { AUDIO_URL_REGEX, AUDIO_URL_REGEX_GLOBAL, Audio, Audio as default, AudioOptions, isValidAudioUrl, sanitizeAudioSrc };
141
+ export { Audio as default };
142
142
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/audio.ts","../src/utils.ts"],"mappings":";;UAIiB;;;;;;EAMf;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA,gBAAgB;;;;;;EAOhB;;;;;KAMG;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;;;YAIP,SAAS;IACjB;;;;;;MAME,WAAW,SAAS,oBAAoB;;;;;;;cAQjC,OAAK,KAAA;;;;;;;;cCrHL,iBAAe;;;;;cAOf,wBAAsB;;;;;;;;;;cAiBtB,kBAAmB,aAAa;;;;;;;;;cAkChC,mBAAoB,gCAAgC"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/audio.ts","../src/utils.ts"],"mappings":";;iBAIiB;;;;;;EAMf;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA,gBAAgB;;;;;;EAOhB;;;;;KAMG;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;;;YAIP,SAAS;IACjB;;;;;;MAME,WAAW,SAAS,oBAAoB;;;;;;;qBAQjC,OAAK,KAAA;;;;;;;;qBCrHL,iBAAe;;;;;qBAOf,wBAAsB;;;;;;;;;;qBAiBtB,kBAAmB,aAAa;;;;;;;;;qBAkChC,mBAAoB,gCAAgC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiptap/extension-audio",
3
- "version": "3.32.0",
3
+ "version": "3.32.1",
4
4
  "description": "audio extension for tiptap",
5
5
  "keywords": [
6
6
  "tiptap",
@@ -39,10 +39,10 @@
39
39
  }
40
40
  },
41
41
  "devDependencies": {
42
- "@tiptap/core": "^3.32.0"
42
+ "@tiptap/core": "^3.32.1"
43
43
  },
44
44
  "peerDependencies": {
45
- "@tiptap/core": "3.32.0"
45
+ "@tiptap/core": "3.32.1"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "vp pack"