@grapesjs/studio-sdk-plugins 1.0.12 → 1.0.13-rc.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/iconifyComponent/index.d.ts +3 -0
- package/dist/iconifyComponent/types.d.ts +42 -0
- package/dist/iconifyComponent/typesSchema.d.ts +19 -0
- package/dist/iconifyComponent/utils.d.ts +18 -0
- package/dist/index.cjs.d.ts +2 -0
- package/dist/index.cjs.js +182 -170
- package/dist/index.d.ts +2 -0
- package/dist/index.es.d.ts +2 -0
- package/dist/index.es.js +21738 -16239
- package/dist/index.umd.js +182 -170
- package/dist/lightGalleryComponent/index.cjs.js +1 -1
- package/dist/lightGalleryComponent/index.es.js +29 -30
- package/dist/lightGalleryComponent/index.umd.js +1 -1
- package/dist/prosemirror/index.cjs.js +6 -6
- package/dist/prosemirror/index.es.js +97 -96
- package/dist/prosemirror/index.umd.js +6 -6
- package/dist/prosemirror/types.d.ts +3 -3
- package/dist/rteTinyMce/index.cjs.js +81 -71
- package/dist/rteTinyMce/index.es.js +9747 -4641
- package/dist/rteTinyMce/index.umd.js +81 -71
- package/dist/swiperComponent/index.cjs.js +3 -3
- package/dist/swiperComponent/index.es.js +50 -53
- package/dist/swiperComponent/index.umd.js +3 -3
- package/dist/tableComponent/index.cjs.js +1 -1
- package/dist/tableComponent/index.es.js +121 -121
- package/dist/tableComponent/index.umd.js +1 -1
- package/dist/youtubeAssetProvider/assetProviders/youtube.d.ts +3 -0
- package/dist/youtubeAssetProvider/index.cjs.d.ts +3 -0
- package/dist/youtubeAssetProvider/index.cjs.js +1 -0
- package/dist/youtubeAssetProvider/index.d.ts +3 -0
- package/dist/youtubeAssetProvider/index.es.d.ts +3 -0
- package/dist/youtubeAssetProvider/index.es.js +242 -0
- package/dist/youtubeAssetProvider/index.umd.js +1 -0
- package/dist/youtubeAssetProvider/types.d.ts +202 -0
- package/package.json +2 -2
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BlockProperties, Editor, Component } from 'grapesjs';
|
|
2
|
+
import { IconifyComponentOptions as IconifyComponentOptionsSchema } from './typesSchema';
|
|
3
|
+
export interface IconifyComponentOptions extends Omit<IconifyComponentOptionsSchema, 'block'> {
|
|
4
|
+
block?: Partial<BlockProperties> | false;
|
|
5
|
+
}
|
|
6
|
+
export interface IconifyCollection {
|
|
7
|
+
prefix: string;
|
|
8
|
+
icons: Record<string, {
|
|
9
|
+
body: string;
|
|
10
|
+
}>[];
|
|
11
|
+
height: number;
|
|
12
|
+
width: number;
|
|
13
|
+
}
|
|
14
|
+
export interface OpenIconPickerProps {
|
|
15
|
+
collectionIds?: string[];
|
|
16
|
+
editor: Editor;
|
|
17
|
+
component: Component;
|
|
18
|
+
}
|
|
19
|
+
export interface IconPickerListProps {
|
|
20
|
+
editor: Editor;
|
|
21
|
+
handleClick: IconClickHandler;
|
|
22
|
+
collectionId: string;
|
|
23
|
+
collection: IconifyCollection;
|
|
24
|
+
collectionFiltered?: IconifyCollection;
|
|
25
|
+
}
|
|
26
|
+
export interface IconPickerHeaderProps extends Omit<IconPickerListProps, 'collection' | 'collectionFiltered'> {
|
|
27
|
+
collectionsList: Array<IconifyCollections & {
|
|
28
|
+
id: string;
|
|
29
|
+
}>;
|
|
30
|
+
}
|
|
31
|
+
export type IconifyCollections = Record<string, {
|
|
32
|
+
category: string;
|
|
33
|
+
name: string;
|
|
34
|
+
total: number;
|
|
35
|
+
height?: number;
|
|
36
|
+
displayHeight?: number;
|
|
37
|
+
}>;
|
|
38
|
+
export type IconClickHandler = ({ icon, collectionId, iconId }: {
|
|
39
|
+
icon: string;
|
|
40
|
+
collectionId: string;
|
|
41
|
+
iconId: string;
|
|
42
|
+
}) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SDKPluginOptions } from '../utils';
|
|
2
|
+
export interface IconifyComponentOptions extends SDKPluginOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Additional Block properties of the component. Pass `false` to avoid adding the block.
|
|
5
|
+
* @example
|
|
6
|
+
* { category: 'Extra', label: 'My label' }
|
|
7
|
+
*/
|
|
8
|
+
block?: 'Block';
|
|
9
|
+
/**
|
|
10
|
+
* List of icon collections to load.
|
|
11
|
+
* @example ['mdi', 'fa-solid']
|
|
12
|
+
*/
|
|
13
|
+
collections?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Extend the default icon component.
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
extendIconComponent?: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Editor } from 'grapesjs';
|
|
2
|
+
import { OpenIconPickerProps } from './types';
|
|
3
|
+
export declare const resizableAnglesIcons: {
|
|
4
|
+
ratioDefault: boolean;
|
|
5
|
+
tc: boolean;
|
|
6
|
+
cl: boolean;
|
|
7
|
+
cr: boolean;
|
|
8
|
+
bc: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const svgContentIcons = "<svg viewBox=\"0 0 24 24\">\n <path d=\"M19 0H9C7.9 0 7 .9 7 2V18C7 19.1 7.9 20 9 20H19C20.1 20 21 19.1 21 18V2C21 .9 20.1 0 19 0M19 18H9V2H19V18M3 4V22C3 23.1 3.9 24 5 24H17V22H5V4H3M14 5L11 10L14 15L17 10L14 5Z\" />\n</svg>";
|
|
11
|
+
export declare function getIconPickerButtonTrait(): {
|
|
12
|
+
type: string;
|
|
13
|
+
label: string;
|
|
14
|
+
name: string;
|
|
15
|
+
changeProp: boolean;
|
|
16
|
+
command(editor: Editor): void;
|
|
17
|
+
};
|
|
18
|
+
export declare function openIconPicker({ collectionIds, editor, component }: OpenIconPickerProps): Promise<void>;
|
package/dist/index.cjs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as dialogComponent } from './dialogComponent';
|
|
2
|
+
export { default as iconifyComponent } from './iconifyComponent';
|
|
2
3
|
export { default as tableComponent } from './tableComponent';
|
|
3
4
|
export { default as listPagesComponent } from './listPagesComponent';
|
|
4
5
|
export { default as fsLightboxComponent } from './fsLightboxComponent';
|
|
@@ -6,3 +7,4 @@ export { default as lightGalleryComponent } from './lightGalleryComponent';
|
|
|
6
7
|
export { default as swiperComponent } from './swiperComponent';
|
|
7
8
|
export { default as rteTinyMce } from './rteTinyMce';
|
|
8
9
|
export { default as rteProseMirror } from './prosemirror';
|
|
10
|
+
export { default as youtubeAssetProvider } from './youtubeAssetProvider';
|