@trycourier/react-designer 0.0.7 → 0.0.9
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/README.md +21 -0
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.css.map +2 -2
- package/dist/cjs/index.js +46 -46
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/styles.css +113 -67
- package/dist/components/Providers/Providers.types.d.ts +2 -2
- package/dist/components/Providers/TemplateProvider.d.ts +12 -8
- package/dist/components/Providers/TemplateProvider.test.d.ts +1 -0
- package/dist/components/Providers/index.d.ts +1 -1
- package/dist/components/Providers/store.d.ts +0 -19
- package/dist/components/Providers/useBrandActions.d.ts +2 -3
- package/dist/components/Providers/useTemplateActions.d.ts +2 -3
- package/dist/components/TemplateEditor/Channels/Email/Email.d.ts +2 -1
- package/dist/components/TemplateEditor/Channels/Email/EmailLayout.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/Inbox/Inbox.d.ts +2 -1
- package/dist/components/TemplateEditor/Channels/Inbox/InboxEditor.d.ts +2 -1
- package/dist/components/TemplateEditor/Channels/Inbox/InboxLayout.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/Push/Push.d.ts +2 -1
- package/dist/components/TemplateEditor/Channels/Push/PushEditor.d.ts +2 -1
- package/dist/components/TemplateEditor/Channels/Push/PushLayout.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/SMS/SMS.d.ts +2 -1
- package/dist/components/TemplateEditor/Channels/SMS/SMSEditor.d.ts +2 -1
- package/dist/components/TemplateEditor/Channels/SMS/SMSLayout.d.ts +1 -1
- package/dist/components/TemplateEditor/Layout/Layout.d.ts +2 -0
- package/dist/components/TemplateEditor/TemplateEditor.d.ts +3 -1
- package/dist/components/TemplateEditor/index.d.ts +3 -1
- package/dist/components/TemplateEditor/store.d.ts +3 -0
- package/dist/components/extensions/CustomCode/CustomCode.d.ts +11 -0
- package/dist/components/extensions/CustomCode/CustomCode.test.d.ts +1 -0
- package/dist/components/extensions/CustomCode/CustomCode.types.d.ts +11 -0
- package/dist/components/extensions/CustomCode/CustomCodeComponent.d.ts +9 -0
- package/dist/components/extensions/CustomCode/CustomCodeForm.d.ts +8 -0
- package/dist/components/extensions/CustomCode/MonacoCodeEditor.d.ts +22 -0
- package/dist/components/extensions/CustomCode/index.d.ts +6 -0
- package/dist/components/extensions/index.d.ts +1 -0
- package/dist/components/ui/Blocks/CustomCodeBlock/CustomCodeBlock.d.ts +3 -0
- package/dist/components/ui/Blocks/CustomCodeBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/index.d.ts +1 -0
- package/dist/components/ui/ContentIcon/ContentIcon.d.ts +1 -0
- package/dist/components/ui/FormHeader/FormHeader.d.ts +1 -1
- package/dist/components/ui/MainLayout/MainLayout.d.ts +3 -1
- package/dist/components/ui-kit/Icon/RightToLineIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/index.d.ts +1 -0
- package/dist/components/ui-kit/ThemeProvider/ThemeProvider.d.ts +2 -0
- package/dist/components/ui-kit/ThemeProvider/ThemeProvider.types.d.ts +3 -0
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.css.map +2 -2
- package/dist/esm/index.js +47 -47
- package/dist/esm/index.js.map +4 -4
- package/dist/esm/styles.css +113 -67
- package/dist/styles.css +113 -67
- package/package.json +3 -1
|
@@ -6,10 +6,10 @@ export interface BasicProviderProps {
|
|
|
6
6
|
token: string;
|
|
7
7
|
}
|
|
8
8
|
export interface ImageUploadConfig {
|
|
9
|
-
file:
|
|
9
|
+
file: Blob;
|
|
10
10
|
onProgress?: (progress: number) => void;
|
|
11
11
|
}
|
|
12
12
|
export interface ImageUploadResponse {
|
|
13
13
|
url: string;
|
|
14
14
|
}
|
|
15
|
-
export type UploadImageFunction = (config: ImageUploadConfig) => Promise<ImageUploadResponse
|
|
15
|
+
export type UploadImageFunction = ((file: Blob) => Promise<string>) | ((file: File) => Promise<string>) | ((config: ImageUploadConfig) => Promise<ImageUploadResponse>);
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import type { BasicProviderProps, UploadImageFunction } from "./Providers.types";
|
|
2
|
-
|
|
2
|
+
export declare const useTemplateStore: () => {
|
|
3
|
+
store: {
|
|
4
|
+
get: <Value>(atom: import("jotai").Atom<Value>) => Value;
|
|
5
|
+
set: <Value, Args extends unknown[], Result>(atom: import("jotai").WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
6
|
+
sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
|
|
7
|
+
} | ({
|
|
8
|
+
get: <Value>(atom: import("jotai").Atom<Value>) => Value;
|
|
9
|
+
set: <Value, Args extends unknown[], Result>(atom: import("jotai").WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
10
|
+
sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
|
|
11
|
+
} & import("jotai/vanilla/store").INTERNAL_DevStoreRev4);
|
|
12
|
+
};
|
|
13
|
+
export declare const useUploadImage: () => UploadImageFunction | null;
|
|
3
14
|
type TemplateProviderProps = BasicProviderProps & {
|
|
4
15
|
templateId: string;
|
|
5
|
-
getTemplate?: (actions: TemplateActions) => Promise<void>;
|
|
6
|
-
saveTemplate?: (actions: TemplateActions, options?: MessageRouting) => Promise<void>;
|
|
7
16
|
uploadImage?: UploadImageFunction;
|
|
8
17
|
};
|
|
9
|
-
export declare const overrideFunctions: {
|
|
10
|
-
getTemplate: TemplateProviderProps["getTemplate"] | null;
|
|
11
|
-
saveTemplate: TemplateProviderProps["saveTemplate"] | null;
|
|
12
|
-
uploadImage: TemplateProviderProps["uploadImage"] | null;
|
|
13
|
-
};
|
|
14
18
|
export declare const TemplateProvider: import("react").NamedExoticComponent<TemplateProviderProps>;
|
|
15
19
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { BrandProvider } from "./BrandProvider";
|
|
2
2
|
export * from "./store";
|
|
3
|
-
export { TemplateProvider } from "./TemplateProvider";
|
|
3
|
+
export { TemplateProvider, useTemplateStore } from "./TemplateProvider";
|
|
4
4
|
export { useBrandActions } from "./useBrandActions";
|
|
5
5
|
export { useTemplateActions } from "./useTemplateActions";
|
|
6
6
|
export { useImageUpload } from "./useImageUpload";
|
|
@@ -72,15 +72,6 @@ export interface TenantData {
|
|
|
72
72
|
};
|
|
73
73
|
[key: string]: unknown;
|
|
74
74
|
}
|
|
75
|
-
export declare const editorStore: {
|
|
76
|
-
get: <Value>(atom: import("jotai").Atom<Value>) => Value;
|
|
77
|
-
set: <Value, Args extends unknown[], Result>(atom: import("jotai").WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
78
|
-
sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
|
|
79
|
-
} | ({
|
|
80
|
-
get: <Value>(atom: import("jotai").Atom<Value>) => Value;
|
|
81
|
-
set: <Value, Args extends unknown[], Result>(atom: import("jotai").WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
82
|
-
sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
|
|
83
|
-
} & import("jotai/vanilla/store").INTERNAL_DevStoreRev4);
|
|
84
75
|
export declare const apiUrlAtom: import("jotai").PrimitiveAtom<string> & {
|
|
85
76
|
init: string;
|
|
86
77
|
};
|
|
@@ -132,13 +123,3 @@ export interface TemplateActions {
|
|
|
132
123
|
createCustomError: (message: string, details?: Record<string, unknown>) => TemplateError;
|
|
133
124
|
convertLegacyError: (error: string | TemplateError) => TemplateError;
|
|
134
125
|
}
|
|
135
|
-
export declare const getTemplateOverrideAtom: import("jotai").PrimitiveAtom<((options?: {
|
|
136
|
-
includeBrand?: boolean;
|
|
137
|
-
}) => Promise<void>) | null> & {
|
|
138
|
-
init: ((options?: {
|
|
139
|
-
includeBrand?: boolean;
|
|
140
|
-
}) => Promise<void>) | null;
|
|
141
|
-
};
|
|
142
|
-
export declare const saveTemplateOverrideAtom: import("jotai").PrimitiveAtom<((actions: TemplateActions, options?: MessageRouting) => Promise<void>) | null> & {
|
|
143
|
-
init: ((actions: TemplateActions, options?: MessageRouting) => Promise<void>) | null;
|
|
144
|
-
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type TemplateError } from "@/lib/utils/errors";
|
|
2
|
-
import { type MessageRouting } from "./store";
|
|
3
2
|
export declare function useBrandActions(): {
|
|
4
3
|
getTemplate: (options?: {
|
|
5
4
|
includeBrand?: boolean;
|
|
6
|
-
}) => Promise<void>;
|
|
7
|
-
saveTemplate: (
|
|
5
|
+
} | undefined) => Promise<void>;
|
|
6
|
+
saveTemplate: (routing?: import("./store").MessageRouting | undefined) => Promise<any>;
|
|
8
7
|
saveBrand: (settings?: Record<string, unknown> | undefined) => Promise<any>;
|
|
9
8
|
publishBrand: () => Promise<any>;
|
|
10
9
|
isTemplateLoading: boolean | null;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type TemplateError } from "@/lib/utils/errors";
|
|
2
|
-
import { type MessageRouting } from "./store";
|
|
3
2
|
export declare function useTemplateActions(): {
|
|
4
3
|
getTemplate: (options?: {
|
|
5
4
|
includeBrand?: boolean;
|
|
6
|
-
}) => Promise<void>;
|
|
7
|
-
saveTemplate: (
|
|
5
|
+
} | undefined) => Promise<void>;
|
|
6
|
+
saveTemplate: (routing?: import("./store").MessageRouting | undefined) => Promise<any>;
|
|
8
7
|
publishTemplate: () => Promise<any>;
|
|
9
8
|
isTemplateLoading: boolean | null;
|
|
10
9
|
setIsTemplateLoading: (args_0: boolean | ((prev: boolean | null) => boolean | null) | null) => void;
|
|
@@ -5,6 +5,7 @@ import type { UniqueIdentifier } from "@dnd-kit/core";
|
|
|
5
5
|
import type { SortingStrategy } from "@dnd-kit/sortable";
|
|
6
6
|
import type { Node } from "@tiptap/pm/model";
|
|
7
7
|
import type { Editor } from "@tiptap/react";
|
|
8
|
+
import type { HTMLAttributes } from "react";
|
|
8
9
|
import type { MessageRouting, TenantData } from "../../../Providers/store";
|
|
9
10
|
import type { TemplateEditorProps } from "../../TemplateEditor";
|
|
10
11
|
interface BrandSettingsData {
|
|
@@ -20,7 +21,7 @@ interface BrandSettingsData {
|
|
|
20
21
|
mediumLink?: string;
|
|
21
22
|
xLink?: string;
|
|
22
23
|
}
|
|
23
|
-
export interface EmailProps extends Pick<TemplateEditorProps, "hidePublish" | "brandEditor" | "channels" | "variables" | "theme" | "routing" | "value"> {
|
|
24
|
+
export interface EmailProps extends Pick<TemplateEditorProps, "hidePublish" | "brandEditor" | "channels" | "variables" | "theme" | "routing" | "value" | "dataMode">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
24
25
|
isLoading?: boolean;
|
|
25
26
|
headerRenderer?: ({ hidePublish, channels, routing, }: {
|
|
26
27
|
hidePublish?: boolean;
|
|
@@ -6,4 +6,4 @@ export declare const EmailEditorMain: import("react").ForwardRefExoticComponent<
|
|
|
6
6
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
7
|
export interface EmailLayoutProps extends EmailProps {
|
|
8
8
|
}
|
|
9
|
-
export declare const EmailLayout: ({ variables, theme, isLoading, hidePublish, channels, brandEditor, routing, }: EmailLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const EmailLayout: ({ variables, theme, isLoading, hidePublish, channels, brandEditor, routing, dataMode, ...rest }: EmailLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,7 @@ import type { TiptapDoc } from "@/lib/utils";
|
|
|
4
4
|
import type { ChannelType } from "@/store";
|
|
5
5
|
import type { ElementalNode } from "@/types/elemental.types";
|
|
6
6
|
import type { AnyExtension, Editor } from "@tiptap/react";
|
|
7
|
+
import type { HTMLAttributes } from "react";
|
|
7
8
|
import type { TemplateEditorProps } from "../../TemplateEditor";
|
|
8
9
|
export declare const defaultInboxContent: ElementalNode[];
|
|
9
10
|
export declare const InboxConfig: TextMenuConfig;
|
|
@@ -20,7 +21,7 @@ export interface InboxRenderProps {
|
|
|
20
21
|
editor: Editor;
|
|
21
22
|
}) => void;
|
|
22
23
|
}
|
|
23
|
-
export interface InboxProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value"> {
|
|
24
|
+
export interface InboxProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
24
25
|
readOnly?: boolean;
|
|
25
26
|
headerRenderer?: ({ hidePublish, channels, routing, }: {
|
|
26
27
|
hidePublish?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InboxRenderProps } from "./Inbox";
|
|
2
2
|
export interface InboxEditorProps extends InboxRenderProps {
|
|
3
|
+
readOnly?: boolean;
|
|
3
4
|
}
|
|
4
|
-
export declare const InboxEditor: ({ content, extensions, editable, autofocus, onUpdate, }: InboxEditorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
export declare const InboxEditor: ({ content, extensions, editable, autofocus, onUpdate, readOnly, }: InboxEditorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { InboxProps } from "./Inbox";
|
|
2
2
|
export interface InboxLayoutProps extends InboxProps {
|
|
3
3
|
}
|
|
4
|
-
export declare const InboxLayout: ({ hidePublish, theme, variables, channels, routing, }: InboxLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const InboxLayout: ({ hidePublish, theme, variables, channels, routing, ...rest }: InboxLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,7 @@ import type { TextMenuConfig } from "@/components/ui/TextMenu/config";
|
|
|
3
3
|
import type { TiptapDoc } from "@/lib/utils";
|
|
4
4
|
import type { ChannelType } from "@/store";
|
|
5
5
|
import type { AnyExtension, Editor } from "@tiptap/react";
|
|
6
|
+
import type { HTMLAttributes } from "react";
|
|
6
7
|
import type { TemplateEditorProps } from "../../TemplateEditor";
|
|
7
8
|
export declare const PushEditorContent: ({ value }: {
|
|
8
9
|
value?: TiptapDoc | null;
|
|
@@ -16,7 +17,7 @@ export interface PushRenderProps {
|
|
|
16
17
|
editor: Editor;
|
|
17
18
|
}) => void;
|
|
18
19
|
}
|
|
19
|
-
export interface PushProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value"> {
|
|
20
|
+
export interface PushProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
20
21
|
readOnly?: boolean;
|
|
21
22
|
headerRenderer?: ({ hidePublish, channels, routing, }: {
|
|
22
23
|
hidePublish?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes } from "react";
|
|
2
2
|
import { type PushRenderProps } from "./Push";
|
|
3
3
|
export interface PushEditorProps extends PushRenderProps, Omit<HTMLAttributes<HTMLDivElement>, "content"> {
|
|
4
|
+
readOnly?: boolean;
|
|
4
5
|
}
|
|
5
|
-
export declare const PushEditor: ({ content, extensions, editable, autofocus, onUpdate, className, }: PushEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const PushEditor: ({ content, extensions, editable, autofocus, onUpdate, className, readOnly, }: PushEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PushProps } from "./Push";
|
|
2
2
|
export interface PushLayoutProps extends PushProps {
|
|
3
3
|
}
|
|
4
|
-
export declare const PushLayout: ({ hidePublish, theme, variables, channels, routing, }: PushLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const PushLayout: ({ hidePublish, theme, variables, channels, routing, ...rest }: PushLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TextMenuConfig } from "@/components/ui/TextMenu/config";
|
|
2
2
|
import type { TiptapDoc } from "@/lib/utils";
|
|
3
3
|
import type { AnyExtension, Editor } from "@tiptap/react";
|
|
4
|
+
import type { HTMLAttributes } from "react";
|
|
4
5
|
import type { MessageRouting } from "../../../Providers/store";
|
|
5
6
|
import type { ChannelType } from "@/store";
|
|
6
7
|
import type { TemplateEditorProps } from "../../TemplateEditor";
|
|
@@ -21,7 +22,7 @@ export interface SMSRenderProps {
|
|
|
21
22
|
editor: Editor;
|
|
22
23
|
}) => void;
|
|
23
24
|
}
|
|
24
|
-
export interface SMSProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value"> {
|
|
25
|
+
export interface SMSProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value" | "dataMode">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
25
26
|
readOnly?: boolean;
|
|
26
27
|
headerRenderer?: ({ hidePublish, channels, routing, }: {
|
|
27
28
|
hidePublish?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes } from "react";
|
|
2
2
|
import type { SMSRenderProps } from "./SMS";
|
|
3
3
|
export interface SMSEditorProps extends SMSRenderProps, Omit<HTMLAttributes<HTMLDivElement>, "content"> {
|
|
4
|
+
readOnly?: boolean;
|
|
4
5
|
}
|
|
5
|
-
export declare const SMSEditor: ({ content, extensions, editable, autofocus, onUpdate, className, }: SMSEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const SMSEditor: ({ content, extensions, editable, autofocus, onUpdate, className, readOnly, }: SMSEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SMSProps } from "./SMS";
|
|
2
2
|
export interface SMSLayoutProps extends SMSProps {
|
|
3
3
|
}
|
|
4
|
-
export declare const SMSLayout: ({ hidePublish, theme, variables, channels, routing }: SMSLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const SMSLayout: ({ hidePublish, theme, variables, channels, routing, dataMode, ...rest }: SMSLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,4 +5,6 @@ export declare const ChannelRootContainer: import("react").ForwardRefExoticCompo
|
|
|
5
5
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export declare const EditorSidebar: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
7
7
|
previewMode: "desktop" | "mobile" | undefined;
|
|
8
|
+
skipExpanded?: boolean;
|
|
9
|
+
width?: string;
|
|
8
10
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { ElementalContent } from "@/types/elemental.types";
|
|
2
|
+
import type { HTMLAttributes } from "react";
|
|
2
3
|
import type { ChannelType } from "../../store";
|
|
3
4
|
import type { BrandEditorProps } from "../BrandEditor";
|
|
4
5
|
import { type MessageRouting } from "../Providers/store";
|
|
5
6
|
import type { Theme } from "../ui-kit/ThemeProvider/ThemeProvider.types";
|
|
6
|
-
export interface TemplateEditorProps {
|
|
7
|
+
export interface TemplateEditorProps extends Omit<HTMLAttributes<HTMLDivElement>, "autoSave" | "value" | "onChange"> {
|
|
7
8
|
theme?: Theme | string;
|
|
8
9
|
value?: ElementalContent | null;
|
|
9
10
|
onChange?: (value: ElementalContent) => void;
|
|
@@ -16,5 +17,6 @@ export interface TemplateEditorProps {
|
|
|
16
17
|
/** @deprecated Use routing.channels instead. Will be removed in a future version. */
|
|
17
18
|
channels?: ChannelType[];
|
|
18
19
|
routing?: MessageRouting;
|
|
20
|
+
dataMode?: "light" | "dark";
|
|
19
21
|
}
|
|
20
22
|
export declare const TemplateEditor: import("react").NamedExoticComponent<TemplateEditorProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { BrandFooter } from "@/components/BrandEditor/Editor/BrandFooter";
|
|
2
2
|
export { PreviewPanel } from "@/components/ui/PreviewPanel";
|
|
3
3
|
export { TextMenu } from "@/components/ui/TextMenu";
|
|
4
|
-
export { cn } from "@/lib/utils";
|
|
4
|
+
export { cn, convertElementalToTiptap, convertTiptapToElemental } from "@/lib/utils";
|
|
5
5
|
export { SortableContext } from "@dnd-kit/sortable";
|
|
6
6
|
export { useChannels } from "./Channels";
|
|
7
7
|
export { default as EmailEditor } from "./Channels/Email/EmailEditor";
|
|
@@ -19,3 +19,5 @@ export { ChannelRootContainer, EditorSidebar } from "./Layout";
|
|
|
19
19
|
export { InboxEditor, PushEditor, SMSEditor } from "./Channels";
|
|
20
20
|
export { useAutoSave } from "@/hooks/useAutoSave";
|
|
21
21
|
export { Status as TemplateStatus } from "@/components/ui/Status";
|
|
22
|
+
export { MonacoCodeEditor } from "@/components/extensions/CustomCode/MonacoCodeEditor";
|
|
23
|
+
export { ToggleGroup } from "@/components/ui-kit";
|
|
@@ -21,3 +21,6 @@ export declare const brandEditorAtom: import("jotai").PrimitiveAtom<Editor | nul
|
|
|
21
21
|
export declare const isTemplateTransitioningAtom: import("jotai").PrimitiveAtom<boolean> & {
|
|
22
22
|
init: boolean;
|
|
23
23
|
};
|
|
24
|
+
export declare const isSidebarExpandedAtom: import("jotai").PrimitiveAtom<boolean> & {
|
|
25
|
+
init: boolean;
|
|
26
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Node } from "@tiptap/core";
|
|
2
|
+
import type { CustomCodeProps } from "./CustomCode.types";
|
|
3
|
+
declare module "@tiptap/core" {
|
|
4
|
+
interface Commands<ReturnType> {
|
|
5
|
+
customCode: {
|
|
6
|
+
setCustomCode: (props: Partial<CustomCodeProps>) => ReturnType;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare const defaultCustomCodeProps: CustomCodeProps;
|
|
11
|
+
export declare const CustomCode: Node<any, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type NodeViewProps } from "@tiptap/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { CustomCodeProps } from "./CustomCode.types";
|
|
4
|
+
export declare const CustomCodeComponent: React.FC<CustomCodeProps & {
|
|
5
|
+
nodeKey?: string;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
updateAttributes?: (attrs: Partial<CustomCodeProps>) => void;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const CustomCodeComponentNode: (props: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
|
|
2
|
+
import type { Editor } from "@tiptap/react";
|
|
3
|
+
interface CustomCodeFormProps {
|
|
4
|
+
element?: ProseMirrorNode;
|
|
5
|
+
editor: Editor | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const CustomCodeForm: ({ element, editor }: CustomCodeFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Monaco } from "@monaco-editor/react";
|
|
3
|
+
import type { editor } from "monaco-editor";
|
|
4
|
+
export type HTMLValidator = (code: string, editor: editor.IStandaloneCodeEditor, monaco: Monaco) => boolean;
|
|
5
|
+
interface MonacoCodeEditorProps {
|
|
6
|
+
code: string;
|
|
7
|
+
onSave: (code: string) => void;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
onValidationChange?: (isValid: boolean) => void;
|
|
10
|
+
validator?: HTMLValidator;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Default HTML validator using Monaco's markers and DOMParser
|
|
14
|
+
* Checks for:
|
|
15
|
+
* - Monaco language service errors
|
|
16
|
+
* - Incomplete/malformed tags
|
|
17
|
+
* - Mismatched angle brackets
|
|
18
|
+
* - Unclosed tags
|
|
19
|
+
*/
|
|
20
|
+
export declare const defaultHTMLValidator: HTMLValidator;
|
|
21
|
+
export declare const MonacoCodeEditor: React.FC<MonacoCodeEditorProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { CustomCode, defaultCustomCodeProps } from "./CustomCode";
|
|
2
|
+
export { CustomCodeComponent, CustomCodeComponentNode } from "./CustomCodeComponent";
|
|
3
|
+
export { MonacoCodeEditor } from "./MonacoCodeEditor";
|
|
4
|
+
export { CustomCodeForm } from "./CustomCodeForm";
|
|
5
|
+
export type { CustomCodeProps } from "./CustomCode.types";
|
|
6
|
+
export { customCodeSchema } from "./CustomCode.types";
|
|
@@ -10,6 +10,7 @@ export { StarterKit } from "@tiptap/starter-kit";
|
|
|
10
10
|
export { Blockquote } from "./Blockquote";
|
|
11
11
|
export { Button } from "./Button";
|
|
12
12
|
export { ButtonRow } from "./ButtonRow";
|
|
13
|
+
export { CustomCode } from "./CustomCode";
|
|
13
14
|
export { Divider } from "./Divider";
|
|
14
15
|
export { Document } from "./Document";
|
|
15
16
|
export * from "./DragPlaceholder";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CustomCodeBlock } from "./CustomCodeBlock";
|
|
@@ -5,3 +5,4 @@ export declare const ButtonElementIcon: ({ ...props }: IconProps) => import("rea
|
|
|
5
5
|
export declare const ImageElementIcon: ({ ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare const DividerElementIcon: ({ ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const VariableElementIcon: ({ ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const CustomCodeElementIcon: ({ ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface FormHeaderProps {
|
|
2
|
-
type: "text" | "image" | "spacer" | "divider" | "button" | "blockquote" | "heading";
|
|
2
|
+
type: "text" | "image" | "spacer" | "divider" | "button" | "blockquote" | "heading" | "customCode";
|
|
3
3
|
}
|
|
4
4
|
export declare const FormHeader: ({ type }: FormHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { Theme } from "@/components/ui-kit/ThemeProvider/ThemeProvider.types";
|
|
2
|
-
|
|
2
|
+
import { type HTMLAttributes } from "react";
|
|
3
|
+
export interface MainLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
4
|
theme?: Theme | string;
|
|
4
5
|
children: React.ReactNode;
|
|
5
6
|
isLoading?: boolean;
|
|
6
7
|
SideBar?: React.ReactNode;
|
|
7
8
|
Header?: React.ReactNode;
|
|
9
|
+
dataMode?: "light" | "dark";
|
|
8
10
|
}
|
|
9
11
|
export declare const MainLayout: import("react").ForwardRefExoticComponent<MainLayoutProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -42,6 +42,7 @@ export { QuoteIcon } from "./QuoteIcon";
|
|
|
42
42
|
export { RemoveFormattingIcon } from "./RemoveFormattingIcon";
|
|
43
43
|
export { RightAlignIcon } from "./RightAlignIcon";
|
|
44
44
|
export { RightArrowIcon } from "./RightArrowIcon";
|
|
45
|
+
export { RightToLineIcon } from "./RightToLineIcon";
|
|
45
46
|
export { SignalIcon } from "./SignalIcon";
|
|
46
47
|
export { SMSIcon } from "./SMSIcon";
|
|
47
48
|
export { StrikethroughIcon } from "./StrikethroughIcon";
|
|
@@ -3,6 +3,8 @@ import type { Theme } from "./ThemeProvider.types";
|
|
|
3
3
|
interface ThemeProviderProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
theme?: Theme | string;
|
|
6
|
+
dataMode?: "light" | "dark";
|
|
7
|
+
className?: string;
|
|
6
8
|
}
|
|
7
9
|
export declare const ThemeProvider: import("react").ForwardRefExoticComponent<ThemeProviderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
10
|
export declare const useTheme: () => Theme;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export interface Theme {
|
|
2
|
+
colorScheme?: "light" | "dark";
|
|
2
3
|
background?: string;
|
|
3
4
|
foreground?: string;
|
|
4
5
|
muted?: string;
|
|
@@ -21,3 +22,5 @@ export interface Theme {
|
|
|
21
22
|
radius?: string;
|
|
22
23
|
}
|
|
23
24
|
export declare const defaultTheme: Theme;
|
|
25
|
+
export declare const lightTheme: Theme;
|
|
26
|
+
export declare const darkTheme: Theme;
|
package/dist/esm/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.ProseMirror{h1{@apply courier-text-3xl;}h2{@apply courier-text-2xl;}h3{@apply courier-text-xl;}h4{@apply courier-text-lg;}h5{@apply courier-text-base;}h6{@apply courier-text-sm;}h1,h2,h3,h4,h5,h6{@apply courier-font-bold first:courier-mt-0 last:courier-mb-0;}h1,h2,h3{@apply courier-mt-12;}h4,h5,h6{@apply courier-mt-8;}a.link{@apply courier-text-blue-700 courier-underline;}mark{@apply courier-bg-red-500 courier-rounded-sm courier-decoration-clone courier-text-inherit courier-py-1 courier-px-0 dark:courier-bg-red-400;}& img{@apply courier-h-auto courier-w-full courier-max-w-full;}[data-type=divider]{@apply courier-py-4 courier-transition-all courier-duration-100 courier-ease-in-out courier-cursor-pointer;&.ProseMirror-selectednode{@apply courier-bg-black/5 dark:courier-bg-white/10;hr{@apply courier-border-t-black/30 dark:courier-border-t-white/30;}}hr{@apply courier-border-0 courier-border-t courier-border-black/20 courier-bg-black/80 courier-m-0 courier-h-px;@apply dark:courier-border-white/20 dark:courier-bg-white/80;}}[data-type=emoji]{display:inline-block;img{width:1em;height:1em;object-fit:cover;display:block}}}.lightTheme{--background: #ffffff;--foreground: #292929;--muted: #D9D9D9;--muted-foreground: #A3A3A3;--popover: #ffffff;--popover-foreground: #292929;--border: #DCDEE4;--input: #DCDEE4;--card: #FAF9F8;--card-foreground: #292929;--primary: #ffffff;--primary-foreground: #696F8C;--secondary: #F5F5F5;--secondary-foreground: #171717;--accent: #E5F3FF;--accent-foreground: #1D4ED8;--destructive: #292929;--destructive-foreground: #FF3363;--ring: #80849D;--radius: 6px}.ProseMirror{>*:first-child,[data-type=column]>*{@apply first:courier-mt-0 last:courier-mb-0;}>*+*{margin-top:.75em}.node-imageUpload{@apply courier-rounded courier-border-2 courier-border-dotted courier-border-black courier-border-opacity-10 courier-p-2 dark:courier-border-neutral-500;transition:border .16s cubic-bezier(.45,.05,.55,.95);&:hover{@apply courier-border-opacity-30;}&:has(.is-active),&.has-focus{@apply courier-border-opacity-40;}}[data-type=columns]{&.has-focus [data-type=column],&:hover [data-type=column]{@apply courier-border-neutral-300 dark:courier-border-neutral-700;}[data-type=column].has-focus{@apply courier-border-neutral-400 dark:courier-border-neutral-600;}}[data-type=column]{@apply courier-rounded courier-border-2 courier-border-dotted courier-border-transparent courier-p-1;transition:border .16s cubic-bezier(.45,.05,.55,.95);&:hover{@apply courier-border-neutral-100 dark:courier-border-neutral-900;}&:has(.is-active),&.has-focus{@apply courier-border-neutral-100 dark:courier-border-neutral-900;}}.node-imageBlock{& img{@apply courier-border-2 courier-border-transparent courier-rounded-xl courier-overflow-hidden;}&:hover img{@apply courier-border-2 courier-border-neutral-100 dark:courier-border-neutral-900;}&:has(.is-active) img,&.has-focus img{@apply courier-border-2 courier-border-neutral-800 dark:courier-border-neutral-200;}}.node-aiWriter,.node-aiImage,.node-tableOfContentsNode{&.has-focus [data-node-view-wrapper]>*{@apply courier-shadow-[0_0_0_2px] courier-shadow-black/30 dark:courier-shadow-white/30 courier-transition-all courier-rounded-lg;}}.ProseMirror-gapcursor+.node-imageBlock,.ProseMirror-gapcursor+.node-imageUpload,.ProseMirror-gapcursor+.node-blockquote{@apply courier-outline-neutral-700 hover:courier-outline-neutral-600 dark:courier-outline-neutral-300 dark:hover:courier-outline-neutral-400;}}@tailwind base;@tailwind components;@tailwind utilities;@keyframes pop{0%{transform:scale(1);box-shadow:var(--box-shadow)}to{transform:scale(var(--scale));box-shadow:var(--box-shadow-picked-up)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.lightTheme{height:100%}@layer base{*{@apply courier-border-border courier-outline-ring;}body{@apply courier-font-sans courier-antialiased courier-bg-background courier-text-foreground;}}.courier-main-layout{@apply courier-relative courier-flex-grow courier-rounded-sm courier-border courier-border-border courier-bg-card courier-flex courier-flex-col courier-text-foreground courier-min-w-[812px] courier-min-h-[600px] courier-overflow-hidden courier-z-10;&:before{@apply courier-absolute courier-inset-0 -courier-z-10;content:"";background:radial-gradient(#0A0A0A32 1px,transparent 1px);background-size:15px 15px}}.courier-editor-container{@apply courier-relative courier-flex-1 courier-flex courier-flex-col courier-p-6 courier-overflow-y-auto courier-transition-all courier-duration-300 courier-ease-in-out;}.courier-editor-sidebar{@apply courier-rounded-br-sm courier-border-border courier-bg-white courier-border-l courier-overflow-y-auto courier-transition-all courier-duration-300 courier-ease-in-out;}.courier-editor-loading{@apply courier-w-full courier-h-full courier-flex courier-items-center courier-justify-center courier-grow courier-z-50 courier-absolute courier-top-0 courier-left-0 courier-right-0 courier-bottom-0 courier-bg-card;}.courier-brand-editor-readonly{@apply courier-pointer-events-none;.ProseMirror{@apply courier-cursor-default courier-p-0;.react-renderer{@apply courier-cursor-default;&.node-paragraph{p{@apply courier-text-sm;}.is-empty{p{&:after{content:""}}}}.draggable-item{@apply courier-p-0;}}}}.courier-theme-editor-main{@apply courier-bg-white courier-rounded-lg courier-border courier-border-border courier-shadow-sm courier-max-w-2xl courier-select-none courier-self-center courier-w-full;>div{@apply courier-w-full;.ProseMirror{@apply courier-p-0;.react-renderer{&.node-paragraph{.selected-element{.node-element{&:before{@apply courier-hidden;}}.courier-actions-panel{@apply courier-hidden;}}p{@apply courier-text-sm;}.is-empty{p{&:after{content:"Write footer text..."}}}&:hover{.draggable-item{>button{@apply courier-hidden;}}}.draggable-item{@apply courier-p-0;}}}}}}.courier-editor-main{@apply courier-relative courier-bg-white courier-rounded-lg courier-border courier-border-border courier-shadow-sm courier-max-w-2xl courier-select-none courier-self-center courier-w-full;>div{@apply courier-w-full;}}.courier-editor-preview-mode,.courier-editor-readonly{&.courier-editor-preview-mode-mobile{.courier-editor-main{@apply courier-max-w-sm;&:hover{>button{@apply courier-hidden;}}}}.ProseMirror{@apply courier-pointer-events-none;>.react-renderer{&.node-imageBlock,&.node-button,&.node-divider,&.node-paragraph,&.node-heading,&.node-blockquote,&.node-buttonRow{*{@apply courier-cursor-default courier-pointer-events-none;}[data-cypress=draggable-handle]{@apply courier-hidden;}.selected-element{.courier-actions-panel{@apply courier-hidden;}.node-element{&:before{@apply courier-hidden;}}}&:hover,&:active{[data-cypress=draggable-handle]{@apply courier-hidden;}.node-element{>div,>hr,&.courier-empty-image{&:before{@apply courier-hidden;}}}}}&.node-imageBlock{.courier-empty-image{@apply courier-hidden;}}&.node-paragraph,&.node-blockquote{.is-empty{p,blockquote{&:after{@apply courier-hidden;}}}}&.node-heading{.is-empty{h1,h2,h3{&:after{@apply courier-hidden;}}}}}}}.courier-sms-editor{@apply courier-flex courier-flex-col courier-py-2 courier-rounded-lg courier-bg-card courier-m-6 courier-mr-14 courier-mt-10;.ProseMirror{@apply courier-p-0;>.react-renderer{.draggable-item{@apply courier-px-4;}&.node-paragraph{.selected-element{.node-element{&:before{@apply courier-hidden;}}.courier-actions-panel{@apply courier-hidden;}}}&:hover{.draggable-item{@apply courier-px-4;}[data-cypress=draggable-handle]{@apply courier-hidden;}.node-element{>div{&:before{@apply courier-hidden;}}}}}}}.courier-push-editor{@apply courier-py-2 courier-pr-4 courier-rounded-lg courier-bg-card courier-m-6 courier-relative;&:before{content:"now";@apply courier-absolute courier-top-3 courier-right-3 courier-z-10 courier-text-xs courier-text-gray-500;}.ProseMirror{@apply courier-p-0 courier-gap-0.5 courier-flex courier-flex-col;>.react-renderer{.node-element{>div{@apply !courier-p-0;}h2,p{@apply courier-text-sm;}}.draggable-item{@apply courier-px-4;}&.node-paragraph,&.node-heading{.selected-element{.node-element{&:before{@apply courier-hidden;}}.courier-actions-panel{@apply courier-hidden;}}}&:hover{.draggable-item{@apply courier-px-4;}[data-cypress=draggable-handle]{@apply courier-hidden;}.node-element{>div{&:before{@apply courier-hidden;}}}}}}}.courier-inbox-editor{@apply courier-overflow-auto courier-flex-1 courier-border-y courier-border-border;max-height:calc(90% - 56px);.ProseMirror{@apply courier-p-4 courier-pr-10 courier-gap-0.5 courier-flex courier-flex-col;&:before{content:"now";@apply courier-absolute courier-top-4 courier-right-4 courier-z-10 courier-text-sm courier-text-gray-500;}>.react-renderer{.node-element{>div{@apply !courier-p-0;}h2,p{@apply courier-text-sm;}}&.node-button{@apply courier-mt-2;.node-element{>div{>div{@apply courier-py-1 courier-px-2 courier-text-sm;}}}}&.node-buttonRow{@apply courier-mt-2;.draggable-item{justify-content:flex-start!important}[data-cypress=draggable-handle]{@apply courier-hidden;}}.draggable-item{@apply courier-p-0;}&.node-paragraph,&.node-heading,&.node-buttonRow{.selected-element{.node-element{&:before{@apply courier-hidden;}}.courier-actions-panel{@apply courier-hidden;}}}&:hover{[data-cypress=draggable-handle]{@apply courier-hidden;}.node-element{>div{&:before{@apply courier-hidden;}}}}}}}.ProseMirror{@apply courier-caret-black dark:courier-caret-white courier-outline-0 courier-pr-10 courier-pl-4 courier-py-10 courier-z-0 lg:courier-pl-2 lg:courier-pr-10 courier-max-w-2xl courier-h-full;.selection{@apply courier-inline;}.selection,*::selection{@apply courier-bg-black/10 dark:courier-bg-white/20 courier-inline;}>.react-renderer{@apply courier-my-12 first:courier-mt-0 last:courier-mb-0;&.node-divider{@apply courier-flex courier-flex-col courier-justify-center;}&.node-variable{@apply courier-inline-block courier-m-0;}&.node-dragPlaceholder{@apply courier-m-0;}&.node-paragraph{@apply courier-m-0;&:focus,&:focus-visible{outline:none}}&.node-paragraph,&.node-blockquote{p{>div{@apply courier-block courier-relative courier-cursor-text;&[contenteditable=true]{outline:none;caret-color:currentColor}}}.is-empty{p,blockquote{position:relative;&:after{content:"Write body text...";@apply courier-absolute courier-top-0 courier-left-0 courier-text-neutral-500 dark:courier-text-neutral-400 -courier-z-10;}}}}&.node-heading{h1,h2,h3{>div{@apply courier-block courier-relative courier-cursor-text;&[contenteditable=true]{outline:none;caret-color:currentColor}}}.is-empty{h1,h2,h3{position:relative;&:after{content:"Write heading...";@apply courier-absolute courier-top-0 courier-left-0 courier-text-neutral-500 dark:courier-text-neutral-400 -courier-z-10;}}}}&.node-imageBlock,&.node-button,&.node-divider,&.node-paragraph,&.node-heading,&.node-blockquote{@apply courier-m-0 courier-relative;[data-cypress=draggable-handle]{@apply courier-invisible;}&:hover,&:active{[data-cypress=draggable-handle]{@apply courier-visible;}.node-element{>div,>hr,&.courier-empty-image{&:before{@apply courier-left-[-12px] courier-right-[-12px] courier-top-0 courier-bottom-0 courier-rounded-md courier-border-2 courier-border-border courier-absolute courier-content-[""];}}}}.node-element{@apply courier-relative;&:focus,&:focus-visible{outline:none}}.selected-element{.node-element{@apply courier-relative courier-z-20;&:before{@apply courier-left-[-12px] courier-right-[-12px] courier-top-0 courier-bottom-0 courier-rounded-md courier-border courier-border-[#0085FF] courier-absolute courier-content-[""] -courier-z-10;}.node-element{&:before{@apply courier-hidden;}}}.courier-actions-panel{@apply courier-block;}}}&.node-blockquote{@apply courier-m-0;@apply courier-text-foreground;@apply dark:courier-text-white;&:hover,&:active{[data-cypress=draggable-handle]{@apply courier-visible;}.node-element{&:before{@apply courier-left-[-12px] courier-right-[-12px] courier-top-0 courier-bottom-0 courier-rounded-md !courier-border-2 !courier-border-border courier-absolute courier-content-[""] -courier-z-20;}>div{&:before{@apply courier-hidden;}}.node-element{&:before{@apply courier-hidden;}}}.selected-element{.node-element{.node-element{&:before{@apply courier-hidden -courier-z-20;}}}}}}}&.resize-cursor{@apply courier-cursor-col-resize;}.ProseMirror-gapcursor{@apply courier-relative courier-w-full courier-max-w-2xl courier-mx-auto;&:after{@apply courier-border-t-black/40 dark:courier-border-t-white/40 courier-w-full courier-top-[-1.5em] courier-max-w-2xl courier-mx-auto courier-left-0 courier-right-0;}}}[data-theme=slash-command]{@apply courier-w-full;}.tiptap{outline:none;:first-child{margin-top:0}ul,ol{padding:0 1rem;margin:1.25rem 1rem 1.25rem .4rem;li p{margin-top:.25em;margin-bottom:.25em}}h1,h2,h3,h4,h5,h6{line-height:1.1;margin-top:2.5rem;text-wrap:pretty}h1,h2{margin-top:3.5rem;margin-bottom:1.5rem}h1{font-size:1.4rem}h2{font-size:1.2rem}h3{font-size:1.1rem}h4,h5,h6{font-size:1rem}code{background-color:var(--purple-light);border-radius:.4rem;color:var(--black);font-size:.85rem;padding:.25em .3em}pre{background:var(--black);border-radius:.5rem;color:var(--white);font-family:JetBrainsMono,monospace;margin:1.5rem 0;padding:.75rem 1rem;code{background:none;color:inherit;font-size:.8rem;padding:0}}}@layer utilities{.animate-pop{animation:pop .2s cubic-bezier(.18,.67,.6,1.22)}.animate-fadeIn{animation:fadeIn .5s ease}.touch-transparent{-webkit-tap-highlight-color:transparent}.courier-editor-preview-mode{&.courier-main-content{flex-grow:1;width:100%}>div:last-child{width:0}}}
|
|
1
|
+
.ProseMirror{h1{@apply courier-text-3xl;}h2{@apply courier-text-2xl;}h3{@apply courier-text-xl;}h4{@apply courier-text-lg;}h5{@apply courier-text-base;}h6{@apply courier-text-sm;}h1,h2,h3,h4,h5,h6{@apply courier-font-bold first:courier-mt-0 last:courier-mb-0;}h1,h2,h3{@apply courier-mt-12;}h4,h5,h6{@apply courier-mt-8;}a.link{@apply courier-text-blue-700 courier-underline;}mark{@apply courier-bg-red-500 courier-rounded-sm courier-decoration-clone courier-text-inherit courier-py-1 courier-px-0 dark:courier-bg-red-400;}& img{@apply courier-h-auto courier-w-full courier-max-w-full;}[data-type=divider]{@apply courier-py-4 courier-transition-all courier-duration-100 courier-ease-in-out courier-cursor-pointer;&.ProseMirror-selectednode{@apply courier-bg-black/5 dark:courier-bg-white/10;hr{@apply courier-border-t-black/30 dark:courier-border-t-white/30;}}hr{@apply courier-border-0 courier-border-t courier-border-black/20 courier-bg-black/80 courier-m-0 courier-h-px;@apply dark:courier-border-white/20 dark:courier-bg-white/80;}}[data-type=emoji]{display:inline-block;img{width:1em;height:1em;object-fit:cover;display:block}}}.theme-container{--color-scheme: light;--background: #ffffff;--foreground: #404040;--muted: #D9D9D9;--muted-foreground: #A3A3A3;--popover: #ffffff;--popover-foreground: #292929;--border: #DCDEE4;--input: #DCDEE4;--card: #FAF9F8;--card-foreground: #292929;--primary: #ffffff;--primary-foreground: #696F8C;--secondary: #F5F5F5;--secondary-foreground: #171717;--accent: #E5F3FF;--accent-foreground: #1D4ED8;--destructive: #292929;--destructive-foreground: #FF3363;--ring: #80849D;--radius: 6px}.ProseMirror{>*:first-child,[data-type=column]>*{@apply first:courier-mt-0 last:courier-mb-0;}>*+*{margin-top:.75em}.node-imageUpload{@apply courier-rounded courier-border-2 courier-border-dotted courier-border-black courier-border-opacity-10 courier-p-2 dark:courier-border-neutral-500;transition:border .16s cubic-bezier(.45,.05,.55,.95);&:hover{@apply courier-border-opacity-30;}&:has(.is-active),&.has-focus{@apply courier-border-opacity-40;}}[data-type=columns]{&.has-focus [data-type=column],&:hover [data-type=column]{@apply courier-border-neutral-300 dark:courier-border-neutral-700;}[data-type=column].has-focus{@apply courier-border-neutral-400 dark:courier-border-neutral-600;}}[data-type=column]{@apply courier-rounded courier-border-2 courier-border-dotted courier-border-transparent courier-p-1;transition:border .16s cubic-bezier(.45,.05,.55,.95);&:hover{@apply courier-border-neutral-100 dark:courier-border-neutral-900;}&:has(.is-active),&.has-focus{@apply courier-border-neutral-100 dark:courier-border-neutral-900;}}.node-imageBlock{& img{@apply courier-border-2 courier-border-transparent courier-rounded-xl courier-overflow-hidden;}&:hover img{@apply courier-border-2 courier-border-neutral-100 dark:courier-border-neutral-900;}&:has(.is-active) img,&.has-focus img{@apply courier-border-2 courier-border-neutral-800 dark:courier-border-neutral-200;}}.node-aiWriter,.node-aiImage,.node-tableOfContentsNode{&.has-focus [data-node-view-wrapper]>*{@apply courier-shadow-[0_0_0_2px] courier-shadow-black/30 dark:courier-shadow-white/30 courier-transition-all courier-rounded-lg;}}.ProseMirror-gapcursor+.node-imageBlock,.ProseMirror-gapcursor+.node-imageUpload,.ProseMirror-gapcursor+.node-blockquote{@apply courier-outline-neutral-700 hover:courier-outline-neutral-600 dark:courier-outline-neutral-300 dark:hover:courier-outline-neutral-400;}}@tailwind base;@tailwind components;@tailwind utilities;@keyframes pop{0%{transform:scale(1);box-shadow:var(--box-shadow)}to{transform:scale(var(--scale));box-shadow:var(--box-shadow-picked-up)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@layer base{*{@apply courier-border-border courier-outline-ring;}body{@apply courier-font-sans courier-antialiased courier-bg-background courier-text-foreground;}}.courier-main-layout{@apply courier-relative courier-flex-grow courier-rounded-sm courier-border courier-border-border courier-bg-card courier-flex courier-flex-col courier-text-foreground courier-min-w-[812px] courier-h-[700px] courier-overflow-hidden courier-z-10;&:before{@apply courier-absolute courier-inset-0 -courier-z-10;content:"";background:radial-gradient(#0A0A0A32 1px,transparent 1px);background-size:15px 15px}}.courier-editor-container{@apply courier-relative courier-flex-1 courier-flex courier-flex-col courier-p-6 courier-overflow-y-auto courier-transition-all courier-duration-300 courier-ease-in-out;}.courier-editor-sidebar{@apply courier-rounded-br-sm courier-border-border courier-bg-white courier-border-l courier-overflow-y-auto courier-transition-all courier-duration-300 courier-ease-in-out dark:courier-bg-black;}.courier-editor-loading{@apply courier-w-full courier-h-full courier-flex courier-items-center courier-justify-center courier-grow courier-z-50 courier-absolute courier-top-0 courier-left-0 courier-right-0 courier-bottom-0 courier-bg-card;}.courier-brand-editor-readonly{@apply courier-pointer-events-none;.ProseMirror{@apply courier-cursor-default courier-p-0;.react-renderer{@apply courier-cursor-default;&.node-paragraph{p{@apply courier-text-sm;}.is-empty{p{&:after{content:""}}}}.draggable-item{@apply courier-p-0;}}}}.courier-theme-editor-main{@apply courier-bg-white courier-rounded-lg courier-border courier-border-border courier-shadow-sm courier-max-w-2xl courier-select-none courier-self-center courier-w-full;>div{@apply courier-w-full;.ProseMirror{@apply courier-p-0;.react-renderer{&.node-paragraph{.selected-element{.node-element{&:before{@apply courier-hidden;}}.courier-actions-panel{@apply courier-hidden;}}p{@apply courier-text-sm;}.is-empty{p{&:after{content:"Write footer text..."}}}&:hover{.draggable-item{>button{@apply courier-hidden;}}}.draggable-item{@apply courier-p-0;}}}}}}.courier-editor-main{@apply courier-relative courier-bg-white courier-rounded-lg courier-border courier-border-border courier-shadow-sm courier-max-w-2xl courier-select-none courier-self-center courier-w-full;>div{@apply courier-w-full;}}.courier-editor-preview-mode,.courier-editor-readonly{&.courier-editor-preview-mode-mobile{.courier-editor-main{@apply courier-max-w-sm;&:hover{>button{@apply courier-hidden;}}}}.ProseMirror{@apply courier-pointer-events-none;>.react-renderer{&.node-imageBlock,&.node-button,&.node-divider,&.node-paragraph,&.node-heading,&.node-blockquote,&.node-buttonRow,&.node-customCode{*{@apply courier-cursor-default courier-pointer-events-none;}[data-cypress=draggable-handle]{@apply courier-hidden;}.selected-element{.courier-actions-panel{@apply courier-hidden;}.node-element{&:before{@apply courier-hidden;}}}&:hover,&:active{[data-cypress=draggable-handle]{@apply courier-hidden;}.node-element{>div,>hr,&.courier-empty-image{&:before{@apply courier-hidden;}}}}}&.node-imageBlock{.courier-empty-image{@apply courier-hidden;}}&.node-paragraph,&.node-blockquote{.is-empty{p,blockquote{&:after{@apply courier-hidden;}}}}&.node-heading{.is-empty{h1,h2,h3{&:after{@apply courier-hidden;}}}}}}}.courier-sms-editor{@apply courier-flex courier-flex-col courier-py-2 courier-rounded-lg courier-bg-card courier-m-6 courier-mr-14 courier-mt-10;.ProseMirror{@apply courier-p-0;>.react-renderer{.draggable-item{@apply courier-px-4;}&.node-paragraph{.selected-element{.node-element{&:before{@apply courier-hidden;}}.courier-actions-panel{@apply courier-hidden;}}}&:hover{.draggable-item{@apply courier-px-4;}[data-cypress=draggable-handle]{@apply courier-hidden;}.node-element{>div{&:before{@apply courier-hidden;}}}}}}}.courier-push-editor{@apply courier-py-2 courier-pr-4 courier-rounded-lg courier-bg-card courier-m-6 courier-relative;&:before{content:"now";@apply courier-absolute courier-top-3 courier-right-3 courier-z-10 courier-text-xs courier-text-gray-500;}.ProseMirror{@apply courier-p-0 courier-gap-0.5 courier-flex courier-flex-col;>.react-renderer{.node-element{>div{@apply !courier-p-0;}h2,p{@apply courier-text-sm;}}.draggable-item{@apply courier-px-4;}&.node-paragraph,&.node-heading{.selected-element{.node-element{&:before{@apply courier-hidden;}}.courier-actions-panel{@apply courier-hidden;}}}&:hover{.draggable-item{@apply courier-px-4;}[data-cypress=draggable-handle]{@apply courier-hidden;}.node-element{>div{&:before{@apply courier-hidden;}}}}}}}.courier-inbox-editor{@apply courier-overflow-auto courier-flex-1 courier-border-y courier-border-border;max-height:calc(90% - 56px);.ProseMirror{@apply courier-p-4 courier-pr-10 courier-gap-0.5 courier-flex courier-flex-col;&:before{content:"now";@apply courier-absolute courier-top-4 courier-right-4 courier-z-10 courier-text-sm courier-text-gray-500;}>.react-renderer{.node-element{>div{@apply !courier-p-0;}h2,p{@apply courier-text-sm;}}&.node-button{@apply courier-mt-2;.node-element{>div{>div{@apply courier-py-1 courier-px-2 courier-text-sm;}}}}&.node-buttonRow{@apply courier-mt-2;.draggable-item{justify-content:flex-start!important}[data-cypress=draggable-handle]{@apply courier-hidden;}}.draggable-item{@apply courier-p-0;}&.node-paragraph,&.node-heading,&.node-buttonRow{.selected-element{.node-element{&:before{@apply courier-hidden;}}.courier-actions-panel{@apply courier-hidden;}}}&:hover{[data-cypress=draggable-handle]{@apply courier-hidden;}.node-element{>div{&:before{@apply courier-hidden;}}}}}}}.ProseMirror{@apply courier-caret-black dark:courier-caret-white courier-outline-0 courier-pr-10 courier-pl-4 courier-py-10 courier-z-0 lg:courier-pl-2 lg:courier-pr-10 courier-max-w-2xl courier-h-full;.selection{@apply courier-inline;}.selection,*::selection{@apply courier-bg-black/10 dark:courier-bg-white/20 courier-inline;}>.react-renderer{@apply courier-my-12 first:courier-mt-0 last:courier-mb-0;&.node-divider{@apply courier-flex courier-flex-col courier-justify-center;}&.node-variable{@apply courier-inline-block courier-m-0;}&.node-dragPlaceholder{@apply courier-m-0;}&.node-paragraph{@apply courier-m-0;&:focus,&:focus-visible{outline:none}}&.node-paragraph,&.node-blockquote,&.node-customCode{p{>div{@apply courier-block courier-relative courier-cursor-text;&[contenteditable=true]{outline:none;caret-color:currentColor}}}.is-empty{p,blockquote{position:relative;&:after{content:"Write body text...";@apply courier-absolute courier-top-0 courier-left-0 courier-text-neutral-500 dark:courier-text-neutral-400 -courier-z-10;}}.courier-custom-code{&:after{content:"Add custom HTML code...";@apply courier-absolute courier-left-0 courier-text-neutral-500 dark:courier-text-neutral-400 -courier-z-10;}}}}&.node-heading{h1,h2,h3{>div{@apply courier-block courier-relative courier-cursor-text;&[contenteditable=true]{outline:none;caret-color:currentColor}}}.is-empty{h1,h2,h3{position:relative;&:after{content:"Write heading...";@apply courier-absolute courier-top-0 courier-left-0 courier-text-neutral-500 dark:courier-text-neutral-400 -courier-z-10;}}}}&.node-imageBlock,&.node-button,&.node-divider,&.node-paragraph,&.node-heading,&.node-blockquote,&.node-customCode{@apply courier-m-0 courier-relative;[data-cypress=draggable-handle]{@apply courier-invisible;}&:hover,&:active{[data-cypress=draggable-handle]{@apply courier-visible;}.node-element{>div,>hr,&.courier-empty-image{&:before{@apply courier-left-[-12px] courier-right-[-12px] courier-top-0 courier-bottom-0 courier-rounded-md courier-border-2 courier-border-border courier-absolute courier-content-[""];}}}}.node-element{@apply courier-relative;&:focus,&:focus-visible{outline:none}}.selected-element{.node-element{@apply courier-relative courier-z-20;&:before{@apply courier-left-[-12px] courier-right-[-12px] courier-top-0 courier-bottom-0 courier-rounded-md courier-border courier-border-[#0085FF] courier-absolute courier-content-[""] -courier-z-10;}.node-element{&:before{@apply courier-hidden;}}}.courier-actions-panel{@apply courier-block;}}}&.node-blockquote{@apply courier-m-0;@apply courier-text-foreground;@apply dark:courier-text-white;&:hover,&:active{[data-cypress=draggable-handle]{@apply courier-visible;}.node-element{&:before{@apply courier-left-[-12px] courier-right-[-12px] courier-top-0 courier-bottom-0 courier-rounded-md !courier-border-2 !courier-border-border courier-absolute courier-content-[""] -courier-z-20;}>div{&:before{@apply courier-hidden;}}.node-element{&:before{@apply courier-hidden;}}}.selected-element{.node-element{.node-element{&:before{@apply courier-hidden -courier-z-20;}}}}}}}&.resize-cursor{@apply courier-cursor-col-resize;}.ProseMirror-gapcursor{@apply courier-relative courier-w-full courier-max-w-2xl courier-mx-auto;&:after{@apply courier-border-t-black/40 dark:courier-border-t-white/40 courier-w-full courier-top-[-1.5em] courier-max-w-2xl courier-mx-auto courier-left-0 courier-right-0;}}}[data-theme=slash-command]{@apply courier-w-full;}.tiptap{outline:none;:first-child{margin-top:0}ul,ol{padding:0 1rem;margin:1.25rem 1rem 1.25rem .4rem;li p{margin-top:.25em;margin-bottom:.25em}}h1,h2,h3,h4,h5,h6{line-height:1.1;margin-top:2.5rem;text-wrap:pretty}h1,h2{margin-top:3.5rem;margin-bottom:1.5rem}h1{font-size:1.4rem}h2{font-size:1.2rem}h3{font-size:1.1rem}h4,h5,h6{font-size:1rem}code{background-color:var(--purple-light);border-radius:.4rem;color:var(--black);font-size:.85rem;padding:.25em .3em}pre{background:var(--black);border-radius:.5rem;color:var(--white);font-family:JetBrainsMono,monospace;margin:1.5rem 0;padding:.75rem 1rem;code{background:none;color:inherit;font-size:.8rem;padding:0}}}@layer utilities{.animate-pop{animation:pop .2s cubic-bezier(.18,.67,.6,1.22)}.animate-fadeIn{animation:fadeIn .5s ease}.touch-transparent{-webkit-tap-highlight-color:transparent}.courier-editor-preview-mode{&.courier-main-content{flex-grow:1;width:100%}>div:last-child{width:0}}}
|
|
2
2
|
/*# sourceMappingURL=index.css.map */
|