@grapesjs/studio-sdk-plugins 1.0.38-rc.0 → 1.0.39-rc.0
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/accordionComponent/index.cjs.js +5 -5
- package/dist/accordionComponent/index.es.js +70 -67
- package/dist/accordionComponent/index.js +39 -0
- package/dist/accordionComponent/index.umd.js +4 -4
- package/dist/aiChat/components/AiChatHeader.d.ts +4 -5
- package/dist/aiChat/components/AiChatInput/index.d.ts +4 -5
- package/dist/aiChat/components/AiChatMessage.d.ts +7 -8
- package/dist/aiChat/components/index.d.ts +1 -1
- package/dist/aiChat/components/utils.d.ts +1 -1
- package/dist/aiChat/index.cjs.js +10 -376
- package/dist/aiChat/index.es.js +4569 -28851
- package/dist/aiChat/index.js +10 -376
- package/dist/aiChat/index.umd.js +11 -377
- package/dist/aiChat/server/index.cjs.d.ts +0 -1
- package/dist/aiChat/server/index.cjs.js +45 -45
- package/dist/aiChat/server/index.d.ts +0 -1
- package/dist/aiChat/server/index.es.d.ts +0 -1
- package/dist/aiChat/server/index.es.js +371 -427
- package/dist/aiChat/server/index.js +45 -45
- package/dist/aiChat/server/index.umd.js +41 -41
- package/dist/aiChat/server/stream.test.d.ts +1 -0
- package/dist/aiChat/types.d.ts +18 -4
- package/dist/aiChat/typesSchema.d.ts +13 -0
- package/dist/animationComponent/index.cjs.js +3 -3
- package/dist/animationComponent/index.es.js +49 -46
- package/dist/animationComponent/index.js +519 -0
- package/dist/animationComponent/index.umd.js +3 -3
- package/dist/canvasAbsoluteMode/index.cjs.js +1 -1
- package/dist/canvasAbsoluteMode/index.es.js +115 -112
- package/dist/canvasAbsoluteMode/index.js +1 -0
- package/dist/canvasAbsoluteMode/index.umd.js +1 -1
- package/dist/canvasEmptyState/index.cjs.js +1 -1
- package/dist/canvasEmptyState/index.es.js +71 -68
- package/dist/canvasEmptyState/index.js +1 -0
- package/dist/canvasEmptyState/index.umd.js +1 -1
- package/dist/canvasFullSize/index.cjs.js +3 -3
- package/dist/canvasFullSize/index.es.js +69 -66
- package/dist/canvasFullSize/index.js +10 -0
- package/dist/canvasFullSize/index.umd.js +4 -4
- package/dist/canvasGridMode/index.cjs.js +7 -7
- package/dist/canvasGridMode/index.es.js +142 -139
- package/dist/canvasGridMode/index.js +26 -0
- package/dist/canvasGridMode/index.umd.js +7 -7
- package/dist/canvasScreenshot/index.cjs.js +1 -1
- package/dist/canvasScreenshot/index.es.js +78 -75
- package/dist/canvasScreenshot/index.js +1 -0
- package/dist/canvasScreenshot/index.umd.js +1 -1
- package/dist/dataSourceEjs/EjsExporter.d.ts +1 -1
- package/dist/dataSourceEjs/index.cjs.js +3 -3
- package/dist/dataSourceEjs/index.es.js +40 -37
- package/dist/dataSourceEjs/index.js +21 -0
- package/dist/dataSourceEjs/index.umd.js +3 -3
- package/dist/dataSourceHandlebars/HandlebarsExporter.d.ts +2 -2
- package/dist/dataSourceHandlebars/constants.d.ts +1 -1
- package/dist/dataSourceHandlebars/index.cjs.js +4 -4
- package/dist/dataSourceHandlebars/index.es.js +58 -55
- package/dist/dataSourceHandlebars/index.js +10 -0
- package/dist/dataSourceHandlebars/index.umd.js +2 -2
- package/dist/dialogComponent/index.cjs.js +11 -11
- package/dist/dialogComponent/index.es.js +72 -69
- package/dist/dialogComponent/index.js +59 -0
- package/dist/dialogComponent/index.umd.js +11 -11
- package/dist/flexComponent/index.cjs.js +6 -6
- package/dist/flexComponent/index.es.js +151 -142
- package/dist/flexComponent/index.js +33 -0
- package/dist/flexComponent/index.umd.js +8 -8
- package/dist/flexComponent/typesSchema.d.ts +1 -1
- package/dist/fsLightboxComponent/index.cjs.js +3 -3
- package/dist/fsLightboxComponent/index.es.js +93 -90
- package/dist/fsLightboxComponent/index.js +6 -0
- package/dist/fsLightboxComponent/index.umd.js +3 -3
- package/dist/googleFontsAssetProvider/index.cjs.js +1 -1
- package/dist/googleFontsAssetProvider/index.es.js +112 -109
- package/dist/googleFontsAssetProvider/index.js +1 -0
- package/dist/googleFontsAssetProvider/index.umd.js +1 -1
- package/dist/googleFontsAssetProvider/utils.d.ts +1 -1
- package/dist/iconifyComponent/index.cjs.js +2 -2
- package/dist/iconifyComponent/index.es.js +80 -77
- package/dist/iconifyComponent/index.js +3 -0
- package/dist/iconifyComponent/index.umd.js +2 -2
- package/dist/index.cjs.d.ts +1 -0
- package/dist/index.cjs.js +970 -82
- package/dist/index.d.ts +1 -0
- package/dist/index.es.d.ts +1 -0
- package/dist/index.es.js +7422 -6145
- package/dist/index.umd.js +975 -87
- package/dist/layoutSidebarButtons/index.cjs.js +1 -1
- package/dist/layoutSidebarButtons/index.es.js +95 -92
- package/dist/layoutSidebarButtons/index.js +1 -0
- package/dist/layoutSidebarButtons/index.umd.js +1 -1
- package/dist/lightGalleryComponent/index.cjs.js +1 -1
- package/dist/lightGalleryComponent/index.es.js +164 -161
- package/dist/lightGalleryComponent/index.js +1 -0
- package/dist/lightGalleryComponent/index.umd.js +1 -1
- package/dist/lightGalleryComponent/utils.d.ts +1 -1
- package/dist/linkImageComponent/index.cjs.js +2 -2
- package/dist/linkImageComponent/index.es.js +60 -57
- package/dist/linkImageComponent/index.js +12 -0
- package/dist/linkImageComponent/index.umd.js +2 -2
- package/dist/listPagesComponent/index.cjs.js +4 -4
- package/dist/listPagesComponent/index.es.js +57 -54
- package/dist/listPagesComponent/index.js +11 -0
- package/dist/listPagesComponent/index.umd.js +4 -4
- package/dist/listPagesComponent/utils.d.ts +1 -1
- package/dist/presetBlockLibrary/blocks.d.ts +6 -0
- package/dist/presetBlockLibrary/blocks.test.d.ts +2 -0
- package/dist/presetBlockLibrary/emailBlocks.d.ts +53 -0
- package/dist/presetBlockLibrary/index.cjs.d.ts +3 -0
- package/dist/presetBlockLibrary/index.cjs.js +889 -0
- package/dist/presetBlockLibrary/index.d.ts +3 -0
- package/dist/presetBlockLibrary/index.es.d.ts +3 -0
- package/dist/presetBlockLibrary/index.es.js +1408 -0
- package/dist/presetBlockLibrary/index.js +889 -0
- package/dist/presetBlockLibrary/index.test.d.ts +1 -0
- package/dist/presetBlockLibrary/index.umd.js +889 -0
- package/dist/presetBlockLibrary/shared.d.ts +3 -0
- package/dist/presetBlockLibrary/types.d.ts +24 -0
- package/dist/presetBlockLibrary/typesSchema.d.ts +47 -0
- package/dist/presetPrintable/index.cjs.js +3 -3
- package/dist/presetPrintable/index.es.js +133 -130
- package/dist/presetPrintable/index.js +32 -0
- package/dist/presetPrintable/index.umd.js +4 -4
- package/dist/prosemirror/index.cjs.js +8 -8
- package/dist/prosemirror/index.es.js +552 -549
- package/dist/prosemirror/index.js +10 -0
- package/dist/prosemirror/index.umd.js +9 -9
- package/dist/prosemirror/toolbar.d.ts +2 -2
- package/dist/prosemirror/types.d.ts +5 -5
- package/dist/rendererReact/index.cjs.js +1 -1
- package/dist/rendererReact/index.es.js +137 -134
- package/dist/rendererReact/index.js +1 -1
- package/dist/rendererReact/index.umd.js +1 -1
- package/dist/rteTinyMce/index.cjs.js +2 -2
- package/dist/rteTinyMce/index.es.js +74 -71
- package/dist/rteTinyMce/index.js +104 -0
- package/dist/rteTinyMce/index.umd.js +2 -2
- package/dist/shapeDividerComponent/index.cjs.js +4 -4
- package/dist/shapeDividerComponent/index.es.js +91 -88
- package/dist/shapeDividerComponent/index.js +97 -0
- package/dist/shapeDividerComponent/index.umd.js +4 -4
- package/dist/swiperComponent/index.cjs.js +7 -7
- package/dist/swiperComponent/index.es.js +95 -92
- package/dist/swiperComponent/index.js +45 -0
- package/dist/swiperComponent/index.umd.js +5 -5
- package/dist/tableComponent/index.cjs.js +1 -1
- package/dist/tableComponent/index.es.js +181 -178
- package/dist/tableComponent/index.js +1 -0
- package/dist/tableComponent/index.umd.js +1 -1
- package/dist/tableComponent/types.d.ts +3 -3
- package/dist/types.d.ts +14 -14
- package/dist/utils.d.ts +3 -2
- package/dist/utilsDataSources.d.ts +1 -1
- package/dist/youtubeAssetProvider/index.cjs.js +1 -1
- package/dist/youtubeAssetProvider/index.es.js +90 -87
- package/dist/youtubeAssetProvider/index.js +1 -0
- package/dist/youtubeAssetProvider/index.umd.js +1 -1
- package/package.json +182 -34
- package/dist/aiChat/server/models.d.ts +0 -15
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ButtonProps } from '@studio/
|
|
2
|
-
import {
|
|
3
|
-
import { ChatContext, CommonComponentProps, UploadedAsset } from '../../types';
|
|
1
|
+
import { ButtonProps } from '@grapesjs/studio-sdk/dist/components/Button/index';
|
|
2
|
+
import { ChatContext, CommonComponentProps, OptionalLayoutComponent, UploadedAsset } from '../../types';
|
|
4
3
|
import { AiChatInputPropsSchema } from '../../typesSchema';
|
|
5
4
|
import { AssetsSectionProps } from './AssetsSection';
|
|
6
5
|
import { AttachButtonProps } from './AttachButton';
|
|
@@ -19,8 +18,8 @@ export interface AiChatInputProps extends Omit<CommonComponentProps, 'chatContex
|
|
|
19
18
|
files: File[];
|
|
20
19
|
}) => Promise<UploadedAsset[]>;
|
|
21
20
|
chatContext?: ChatContext;
|
|
22
|
-
layoutBefore?: (props: AiChatInputLayoutProps) =>
|
|
23
|
-
layoutAfter?: (props: AiChatInputLayoutProps) =>
|
|
21
|
+
layoutBefore?: (props: AiChatInputLayoutProps) => OptionalLayoutComponent;
|
|
22
|
+
layoutAfter?: (props: AiChatInputLayoutProps) => OptionalLayoutComponent;
|
|
24
23
|
onSubmit?: (props: {
|
|
25
24
|
event: React.FormEvent;
|
|
26
25
|
submit: () => Promise<void>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AiChatMessageLayoutProps, AiChatMessagePartLayoutProps, AiChatMessageToolDetailLayoutProps, ChatMessage, CommonComponentProps } from '../types';
|
|
1
|
+
import { AiChatMessageLayoutProps, AiChatMessagePartLayoutProps, AiChatMessageToolDetailLayoutProps, ChatMessage, CommonComponentProps, OptionalLayoutComponent } from '../types';
|
|
3
2
|
import { AiChatMessagePropsSchema } from '../typesSchema';
|
|
4
3
|
export interface AiChatMessageToolLabelLayoutProps extends AiChatMessageToolDetailLayoutProps {
|
|
5
4
|
}
|
|
@@ -7,12 +6,12 @@ export interface AiChatMessageToolResultLayoutProps extends AiChatMessageToolDet
|
|
|
7
6
|
}
|
|
8
7
|
export interface AiChatMessageProps extends CommonComponentProps, Omit<AiChatMessagePropsSchema, 'message' | 'layoutBeforeMessage' | 'layoutAfterMessage' | 'layoutPart' | 'layoutPartToolLabel' | 'layoutPartToolDetail' | 'layoutPartToolResult'> {
|
|
9
8
|
message: ChatMessage;
|
|
10
|
-
layoutBeforeMessage?: (props: AiChatMessageLayoutProps) =>
|
|
11
|
-
layoutAfterMessage?: (props: AiChatMessageLayoutProps) =>
|
|
12
|
-
layoutPart?: (props: AiChatMessagePartLayoutProps) =>
|
|
13
|
-
layoutPartToolLabel?: (props: AiChatMessageToolLabelLayoutProps) =>
|
|
14
|
-
layoutPartToolDetail?: (props: AiChatMessageToolDetailLayoutProps) =>
|
|
15
|
-
layoutPartToolResult?: (props: AiChatMessageToolResultLayoutProps) =>
|
|
9
|
+
layoutBeforeMessage?: (props: AiChatMessageLayoutProps) => OptionalLayoutComponent;
|
|
10
|
+
layoutAfterMessage?: (props: AiChatMessageLayoutProps) => OptionalLayoutComponent;
|
|
11
|
+
layoutPart?: (props: AiChatMessagePartLayoutProps) => OptionalLayoutComponent;
|
|
12
|
+
layoutPartToolLabel?: (props: AiChatMessageToolLabelLayoutProps) => OptionalLayoutComponent;
|
|
13
|
+
layoutPartToolDetail?: (props: AiChatMessageToolDetailLayoutProps) => OptionalLayoutComponent;
|
|
14
|
+
layoutPartToolResult?: (props: AiChatMessageToolResultLayoutProps) => OptionalLayoutComponent;
|
|
16
15
|
}
|
|
17
16
|
export interface AiChatMessagePartProps {
|
|
18
17
|
part: ChatMessage['parts'][0];
|
|
@@ -29,7 +29,7 @@ export interface AiChatLayoutComponentsRegistryEntries {
|
|
|
29
29
|
aiChatMessage: AiChatLayoutComponentProps<AiChatMessageProps, 'aiChatMessage'>;
|
|
30
30
|
aiChatMessagesStatus: AiChatLayoutComponentProps<AiChatMessagesStatusProps, 'aiChatMessagesStatus'>;
|
|
31
31
|
}
|
|
32
|
-
declare module '@studio/
|
|
32
|
+
declare module '@grapesjs/studio-sdk/dist/types' {
|
|
33
33
|
interface CustomLayoutComponentsRegistry extends AiChatLayoutComponentsRegistryEntries {
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -14,7 +14,7 @@ export declare const isProjectTypeEmail: (editor: Editor) => boolean;
|
|
|
14
14
|
export declare const isProjectNew: (editor: Editor) => boolean;
|
|
15
15
|
export declare const getProjectContext: (editor: Editor, opts?: ProjectContextOptions) => ProjectContext;
|
|
16
16
|
export declare const getLayoutComponentConfig: (editor: Editor, components: StudioLayoutComponentsConfig, pluginOptions?: AiChatOptions) => StudioLayoutComponentsConfig;
|
|
17
|
-
export declare const renderLayoutComponent: (editor: Editor, components: StudioLayoutComponentsConfig, pluginOptions?: AiChatOptions) =>
|
|
17
|
+
export declare const renderLayoutComponent: (editor: Editor, components: StudioLayoutComponentsConfig, pluginOptions?: AiChatOptions) => import('react').ReactNode;
|
|
18
18
|
export declare function clearGeneratedCode(code: string): string;
|
|
19
19
|
export declare const updateDomWithStreamContent: (content?: string, el?: HTMLElement, opts?: {
|
|
20
20
|
skipScroll?: boolean;
|