@wix/editor-react-types 1.0.36 → 1.0.38
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.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/statics/docs-ts-model.json +400 -187
- package/dist/visualMedia.d.ts +46 -0
- package/dist/visualMedia.d.ts.map +1 -0
- package/dist/visualMedia.js +2 -0
- package/dist/visualMedia.js.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/visualMedia.ts +50 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Link } from './links';
|
|
2
|
+
import type { Phone, Email } from './base';
|
|
3
|
+
interface VisualMediaBase {
|
|
4
|
+
/** The URL of the media file */
|
|
5
|
+
src: string;
|
|
6
|
+
/** The slug for the media */
|
|
7
|
+
slug?: string;
|
|
8
|
+
/** Description of the media for accessibility purposes */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** The title of the media */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** The height of the media in pixels */
|
|
13
|
+
height?: number;
|
|
14
|
+
/** The width of the media in pixels */
|
|
15
|
+
width?: number;
|
|
16
|
+
/** An action when the item is clicked */
|
|
17
|
+
action?: {
|
|
18
|
+
/** The URL to navigate to when the media is clicked */
|
|
19
|
+
link: Link | Phone | Email;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export type VisualMedia = (VisualMediaBase & {
|
|
23
|
+
type: 'image';
|
|
24
|
+
/** Additional parameters specific to images, such as focal point and alt text. */
|
|
25
|
+
parameters?: ImageParameters;
|
|
26
|
+
}) | (VisualMediaBase & {
|
|
27
|
+
type: 'video';
|
|
28
|
+
/** Additional parameters specific to videos, such as thumbnail, alt text, and whether the video has audio. */
|
|
29
|
+
parameters?: VideoParameters;
|
|
30
|
+
});
|
|
31
|
+
type VideoParameters = {
|
|
32
|
+
/** The URL of the video thumbnail */
|
|
33
|
+
thumbnail?: string;
|
|
34
|
+
/** Alternative text for the video */
|
|
35
|
+
alt?: string;
|
|
36
|
+
/** Whether the video has audio */
|
|
37
|
+
hasAudio?: boolean;
|
|
38
|
+
};
|
|
39
|
+
type ImageParameters = {
|
|
40
|
+
/** The focal point for the image */
|
|
41
|
+
focalPoint?: [number, number];
|
|
42
|
+
/** The alt text for the image */
|
|
43
|
+
alt?: string;
|
|
44
|
+
};
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=visualMedia.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visualMedia.d.ts","sourceRoot":"","sources":["../src/visualMedia.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE1C,UAAU,eAAe;IACrB,gCAAgC;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,6BAA6B;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yCAAyC;IACzC,MAAM,CAAC,EAAE;QACL,uDAAuD;QACvD,IAAI,EAAE,IAAI,GAAG,KAAK,GAAG,KAAK,CAAA;KAC7B,CAAA;CACJ;AAED,MAAM,MAAM,WAAW,GACjB,CAAC,eAAe,GAAG;IACf,IAAI,EAAE,OAAO,CAAA;IACb,kFAAkF;IAClF,UAAU,CAAC,EAAE,eAAe,CAAA;CAC/B,CAAC,GACF,CAAC,eAAe,GAAG;IACf,IAAI,EAAE,OAAO,CAAA;IACb,8GAA8G;IAC9G,UAAU,CAAC,EAAE,eAAe,CAAA;CAC/B,CAAC,CAAA;AAER,KAAK,eAAe,GAAG;IACnB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qCAAqC;IACrC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,KAAK,eAAe,GAAG;IACnB,oCAAoC;IACpC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAA;CACf,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visualMedia.js","sourceRoot":"","sources":["../src/visualMedia.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.38",
|
|
4
4
|
"description": "React types for Wix Editor components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"type": "module",
|
|
53
|
-
"falconPackageHash": "
|
|
53
|
+
"falconPackageHash": "d02c5de5ad53b8f7244067a23d7cf15123367dab1a10892ceb436b2e"
|
|
54
54
|
}
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Link } from './links'
|
|
2
|
+
import type { Phone, Email } from './base'
|
|
3
|
+
|
|
4
|
+
interface VisualMediaBase {
|
|
5
|
+
/** The URL of the media file */
|
|
6
|
+
src: string
|
|
7
|
+
/** The slug for the media */
|
|
8
|
+
slug?: string
|
|
9
|
+
/** Description of the media for accessibility purposes */
|
|
10
|
+
description?: string
|
|
11
|
+
/** The title of the media */
|
|
12
|
+
title?: string
|
|
13
|
+
/** The height of the media in pixels */
|
|
14
|
+
height?: number
|
|
15
|
+
/** The width of the media in pixels */
|
|
16
|
+
width?: number
|
|
17
|
+
/** An action when the item is clicked */
|
|
18
|
+
action?: {
|
|
19
|
+
/** The URL to navigate to when the media is clicked */
|
|
20
|
+
link: Link | Phone | Email
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type VisualMedia =
|
|
25
|
+
| (VisualMediaBase & {
|
|
26
|
+
type: 'image'
|
|
27
|
+
/** Additional parameters specific to images, such as focal point and alt text. */
|
|
28
|
+
parameters?: ImageParameters
|
|
29
|
+
})
|
|
30
|
+
| (VisualMediaBase & {
|
|
31
|
+
type: 'video'
|
|
32
|
+
/** Additional parameters specific to videos, such as thumbnail, alt text, and whether the video has audio. */
|
|
33
|
+
parameters?: VideoParameters
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
type VideoParameters = {
|
|
37
|
+
/** The URL of the video thumbnail */
|
|
38
|
+
thumbnail?: string
|
|
39
|
+
/** Alternative text for the video */
|
|
40
|
+
alt?: string
|
|
41
|
+
/** Whether the video has audio */
|
|
42
|
+
hasAudio?: boolean
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type ImageParameters = {
|
|
46
|
+
/** The focal point for the image */
|
|
47
|
+
focalPoint?: [number, number]
|
|
48
|
+
/** The alt text for the image */
|
|
49
|
+
alt?: string
|
|
50
|
+
}
|