@tiptap/extension-twitch 3.31.4 → 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 +11 -11
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Node } from "@tiptap/core";
|
|
2
2
|
//#region src/twitch.d.ts
|
|
3
|
-
interface TwitchOptions {
|
|
3
|
+
export interface TwitchOptions {
|
|
4
4
|
/**
|
|
5
5
|
* Controls if the paste handler for Twitch videos should be added.
|
|
6
6
|
* @default true
|
|
@@ -108,7 +108,7 @@ declare module '@tiptap/core' {
|
|
|
108
108
|
* })
|
|
109
109
|
* ```
|
|
110
110
|
*/
|
|
111
|
-
declare const Twitch: Node<TwitchOptions, any>;
|
|
111
|
+
export declare const Twitch: Node<TwitchOptions, any>;
|
|
112
112
|
//#endregion
|
|
113
113
|
//#region src/utils.d.ts
|
|
114
114
|
/**
|
|
@@ -123,8 +123,8 @@ declare const Twitch: Node<TwitchOptions, any>;
|
|
|
123
123
|
* - https://twitch.tv/examplechannel (channel)
|
|
124
124
|
* - https://www.twitch.tv/examplechannel
|
|
125
125
|
*/
|
|
126
|
-
declare const TWITCH_REGEX: RegExp;
|
|
127
|
-
declare const TWITCH_REGEX_GLOBAL: RegExp;
|
|
126
|
+
export declare const TWITCH_REGEX: RegExp;
|
|
127
|
+
export declare const TWITCH_REGEX_GLOBAL: RegExp;
|
|
128
128
|
/**
|
|
129
129
|
* Validates if a URL is a valid Twitch video, clip or channel URL
|
|
130
130
|
*
|
|
@@ -140,8 +140,8 @@ declare const TWITCH_REGEX_GLOBAL: RegExp;
|
|
|
140
140
|
* isValidTwitchUrl('invalid') // false
|
|
141
141
|
* ```
|
|
142
142
|
*/
|
|
143
|
-
declare const isValidTwitchUrl: (url: string) => RegExpMatchArray | null;
|
|
144
|
-
interface GetEmbedUrlOptions {
|
|
143
|
+
export declare const isValidTwitchUrl: (url: string) => RegExpMatchArray | null;
|
|
144
|
+
export interface GetEmbedUrlOptions {
|
|
145
145
|
url: string;
|
|
146
146
|
allowFullscreen?: boolean;
|
|
147
147
|
autoplay?: boolean;
|
|
@@ -149,7 +149,7 @@ interface GetEmbedUrlOptions {
|
|
|
149
149
|
time?: string;
|
|
150
150
|
parent?: string;
|
|
151
151
|
}
|
|
152
|
-
interface TwitchEmbedAttributes {
|
|
152
|
+
export interface TwitchEmbedAttributes {
|
|
153
153
|
src: string;
|
|
154
154
|
autoplay?: boolean;
|
|
155
155
|
muted?: boolean;
|
|
@@ -173,7 +173,7 @@ interface TwitchEmbedAttributes {
|
|
|
173
173
|
* // { type: 'channel', id: 'examplechannel' }
|
|
174
174
|
* ```
|
|
175
175
|
*/
|
|
176
|
-
declare const getTwitchIdentifier: (url: string) => {
|
|
176
|
+
export declare const getTwitchIdentifier: (url: string) => {
|
|
177
177
|
type: "video" | "clip" | "channel";
|
|
178
178
|
id: string;
|
|
179
179
|
} | null;
|
|
@@ -208,7 +208,7 @@ declare const getTwitchIdentifier: (url: string) => {
|
|
|
208
208
|
* // Returns: https://player.twitch.tv/?channel=examplechannel&parent=example.com
|
|
209
209
|
* ```
|
|
210
210
|
*/
|
|
211
|
-
declare const getEmbedUrlFromTwitchUrl: (options: GetEmbedUrlOptions) => string | null;
|
|
211
|
+
export declare const getEmbedUrlFromTwitchUrl: (options: GetEmbedUrlOptions) => string | null;
|
|
212
212
|
/**
|
|
213
213
|
* Parses a Twitch embed URL into canonical Twitch node attributes.
|
|
214
214
|
*
|
|
@@ -224,7 +224,7 @@ declare const getEmbedUrlFromTwitchUrl: (options: GetEmbedUrlOptions) => string
|
|
|
224
224
|
* // Returns: { src: 'https://clips.twitch.tv/ExampleClipName-ABC123' }
|
|
225
225
|
* ```
|
|
226
226
|
*/
|
|
227
|
-
declare const getAttributesFromTwitchEmbedUrl: (url: string) => TwitchEmbedAttributes | null;
|
|
227
|
+
export declare const getAttributesFromTwitchEmbedUrl: (url: string) => TwitchEmbedAttributes | null;
|
|
228
228
|
//#endregion
|
|
229
|
-
export {
|
|
229
|
+
export { Twitch as default };
|
|
230
230
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/twitch.ts","../src/utils.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/twitch.ts","../src/utils.ts"],"mappings":";;iBA2CiB;;;;;;EAMf;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;;EAQA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA,gBAAgB;;;;;;EAOhB;;;;;KAMG;EACH;EACA;EACA;EACA;EACA;EACA;;;YAIU,SAAS;IACjB;;;;;;MAME,iBAAiB,SAAS,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2B7C,QAAM,KAAA;;;;;;;;;;;;;;;qBCvJN,cAAY;qBAGZ,qBAAmB;;;;;;;;;;;;;;;;qBAkBnB,mBAAoB,gBAAW;iBAI3B;EACf;EACA;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;;;;;;;;;;;;;;;;;;;;qBAqBW,sBACX;EACG;EAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAyE5B,2BAA4B,SAAS;;;;;;;;;;;;;;;;qBA4FrC,kCAAmC,gBAAc"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Node } from "@tiptap/core";
|
|
2
2
|
//#region src/twitch.d.ts
|
|
3
|
-
interface TwitchOptions {
|
|
3
|
+
export interface TwitchOptions {
|
|
4
4
|
/**
|
|
5
5
|
* Controls if the paste handler for Twitch videos should be added.
|
|
6
6
|
* @default true
|
|
@@ -108,7 +108,7 @@ declare module '@tiptap/core' {
|
|
|
108
108
|
* })
|
|
109
109
|
* ```
|
|
110
110
|
*/
|
|
111
|
-
declare const Twitch: Node<TwitchOptions, any>;
|
|
111
|
+
export declare const Twitch: Node<TwitchOptions, any>;
|
|
112
112
|
//#endregion
|
|
113
113
|
//#region src/utils.d.ts
|
|
114
114
|
/**
|
|
@@ -123,8 +123,8 @@ declare const Twitch: Node<TwitchOptions, any>;
|
|
|
123
123
|
* - https://twitch.tv/examplechannel (channel)
|
|
124
124
|
* - https://www.twitch.tv/examplechannel
|
|
125
125
|
*/
|
|
126
|
-
declare const TWITCH_REGEX: RegExp;
|
|
127
|
-
declare const TWITCH_REGEX_GLOBAL: RegExp;
|
|
126
|
+
export declare const TWITCH_REGEX: RegExp;
|
|
127
|
+
export declare const TWITCH_REGEX_GLOBAL: RegExp;
|
|
128
128
|
/**
|
|
129
129
|
* Validates if a URL is a valid Twitch video, clip or channel URL
|
|
130
130
|
*
|
|
@@ -140,8 +140,8 @@ declare const TWITCH_REGEX_GLOBAL: RegExp;
|
|
|
140
140
|
* isValidTwitchUrl('invalid') // false
|
|
141
141
|
* ```
|
|
142
142
|
*/
|
|
143
|
-
declare const isValidTwitchUrl: (url: string) => RegExpMatchArray | null;
|
|
144
|
-
interface GetEmbedUrlOptions {
|
|
143
|
+
export declare const isValidTwitchUrl: (url: string) => RegExpMatchArray | null;
|
|
144
|
+
export interface GetEmbedUrlOptions {
|
|
145
145
|
url: string;
|
|
146
146
|
allowFullscreen?: boolean;
|
|
147
147
|
autoplay?: boolean;
|
|
@@ -149,7 +149,7 @@ interface GetEmbedUrlOptions {
|
|
|
149
149
|
time?: string;
|
|
150
150
|
parent?: string;
|
|
151
151
|
}
|
|
152
|
-
interface TwitchEmbedAttributes {
|
|
152
|
+
export interface TwitchEmbedAttributes {
|
|
153
153
|
src: string;
|
|
154
154
|
autoplay?: boolean;
|
|
155
155
|
muted?: boolean;
|
|
@@ -173,7 +173,7 @@ interface TwitchEmbedAttributes {
|
|
|
173
173
|
* // { type: 'channel', id: 'examplechannel' }
|
|
174
174
|
* ```
|
|
175
175
|
*/
|
|
176
|
-
declare const getTwitchIdentifier: (url: string) => {
|
|
176
|
+
export declare const getTwitchIdentifier: (url: string) => {
|
|
177
177
|
type: "video" | "clip" | "channel";
|
|
178
178
|
id: string;
|
|
179
179
|
} | null;
|
|
@@ -208,7 +208,7 @@ declare const getTwitchIdentifier: (url: string) => {
|
|
|
208
208
|
* // Returns: https://player.twitch.tv/?channel=examplechannel&parent=example.com
|
|
209
209
|
* ```
|
|
210
210
|
*/
|
|
211
|
-
declare const getEmbedUrlFromTwitchUrl: (options: GetEmbedUrlOptions) => string | null;
|
|
211
|
+
export declare const getEmbedUrlFromTwitchUrl: (options: GetEmbedUrlOptions) => string | null;
|
|
212
212
|
/**
|
|
213
213
|
* Parses a Twitch embed URL into canonical Twitch node attributes.
|
|
214
214
|
*
|
|
@@ -224,7 +224,7 @@ declare const getEmbedUrlFromTwitchUrl: (options: GetEmbedUrlOptions) => string
|
|
|
224
224
|
* // Returns: { src: 'https://clips.twitch.tv/ExampleClipName-ABC123' }
|
|
225
225
|
* ```
|
|
226
226
|
*/
|
|
227
|
-
declare const getAttributesFromTwitchEmbedUrl: (url: string) => TwitchEmbedAttributes | null;
|
|
227
|
+
export declare const getAttributesFromTwitchEmbedUrl: (url: string) => TwitchEmbedAttributes | null;
|
|
228
228
|
//#endregion
|
|
229
|
-
export {
|
|
229
|
+
export { Twitch as default };
|
|
230
230
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/twitch.ts","../src/utils.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/twitch.ts","../src/utils.ts"],"mappings":";;iBA2CiB;;;;;;EAMf;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;;EAQA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA,gBAAgB;;;;;;EAOhB;;;;;KAMG;EACH;EACA;EACA;EACA;EACA;EACA;;;YAIU,SAAS;IACjB;;;;;;MAME,iBAAiB,SAAS,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2B7C,QAAM,KAAA;;;;;;;;;;;;;;;qBCvJN,cAAY;qBAGZ,qBAAmB;;;;;;;;;;;;;;;;qBAkBnB,mBAAoB,gBAAW;iBAI3B;EACf;EACA;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;;;;;;;;;;;;;;;;;;;;qBAqBW,sBACX;EACG;EAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAyE5B,2BAA4B,SAAS;;;;;;;;;;;;;;;;qBA4FrC,kCAAmC,gBAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiptap/extension-twitch",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.32.1",
|
|
4
4
|
"description": "a twitch embed extension for tiptap",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tiptap",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tiptap/core": "^3.
|
|
42
|
+
"@tiptap/core": "^3.32.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@tiptap/core": "3.
|
|
45
|
+
"@tiptap/core": "3.32.1"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "vp pack"
|