@trycourier/react-designer 0.0.2 → 0.0.3

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.
Files changed (149) hide show
  1. package/README.md +3 -2
  2. package/dist/channels.d.ts +7 -0
  3. package/dist/cjs/index.css +1 -1
  4. package/dist/cjs/index.css.map +2 -2
  5. package/dist/cjs/index.js +44 -30
  6. package/dist/cjs/index.js.map +4 -4
  7. package/dist/cjs/styles.css +485 -31
  8. package/dist/components/BrandEditor/BrandEditor.types.d.ts +36 -0
  9. package/dist/components/BrandEditor/Editor/BrandFooter/BrandFooter.d.ts +8 -3
  10. package/dist/components/BrandEditor/Editor/Editor.d.ts +2 -40
  11. package/dist/components/BrandEditor/Editor/SideBar/SideBar.d.ts +2 -7
  12. package/dist/components/Providers/TemplateProvider.d.ts +1 -1
  13. package/dist/components/Providers/api/template.d.ts +2 -1
  14. package/dist/components/Providers/store.d.ts +8 -9
  15. package/dist/components/TemplateEditor/Channels/Channels.d.ts +6 -0
  16. package/dist/components/TemplateEditor/Channels/Email/Email.d.ts +55 -0
  17. package/dist/components/TemplateEditor/Channels/Email/Email.test.d.ts +1 -0
  18. package/dist/components/TemplateEditor/Channels/Email/EmailEditor.d.ts +17 -0
  19. package/dist/components/TemplateEditor/Channels/Email/EmailEditor.test.d.ts +1 -0
  20. package/dist/components/TemplateEditor/Channels/Email/EmailLayout.d.ts +9 -0
  21. package/dist/components/TemplateEditor/Channels/Email/SideBar/SideBar.d.ts +7 -0
  22. package/dist/components/TemplateEditor/{Editor → Channels/Email}/SideBar/SideBarItemDetails/SideBarItemDetails.d.ts +1 -2
  23. package/dist/components/TemplateEditor/Channels/Email/SideBar/index.d.ts +2 -0
  24. package/dist/components/TemplateEditor/Channels/Email/index.d.ts +3 -0
  25. package/dist/components/TemplateEditor/Channels/Inbox/Inbox.d.ts +29 -0
  26. package/dist/components/TemplateEditor/Channels/Inbox/Inbox.test.d.ts +1 -0
  27. package/dist/components/TemplateEditor/Channels/Inbox/InboxEditor.d.ts +4 -0
  28. package/dist/components/TemplateEditor/Channels/Inbox/InboxEditor.test.d.ts +1 -0
  29. package/dist/components/TemplateEditor/Channels/Inbox/InboxLayout.d.ts +4 -0
  30. package/dist/components/TemplateEditor/Channels/Inbox/SideBar/SideBar.d.ts +1 -0
  31. package/dist/components/TemplateEditor/Channels/Inbox/index.d.ts +3 -0
  32. package/dist/components/TemplateEditor/Channels/Push/Push.d.ts +29 -0
  33. package/dist/components/TemplateEditor/Channels/Push/Push.test.d.ts +1 -0
  34. package/dist/components/TemplateEditor/Channels/Push/PushEditor.d.ts +5 -0
  35. package/dist/components/TemplateEditor/Channels/Push/PushEditor.test.d.ts +1 -0
  36. package/dist/components/TemplateEditor/Channels/Push/PushLayout.d.ts +4 -0
  37. package/dist/components/TemplateEditor/Channels/Push/index.d.ts +3 -0
  38. package/dist/components/TemplateEditor/Channels/SMS/SMS.d.ts +29 -0
  39. package/dist/components/TemplateEditor/Channels/SMS/SMS.test.d.ts +1 -0
  40. package/dist/components/TemplateEditor/Channels/SMS/SMSEditor.d.ts +5 -0
  41. package/dist/components/TemplateEditor/Channels/SMS/SMSEditor.test.d.ts +1 -0
  42. package/dist/components/TemplateEditor/Channels/SMS/SMSLayout.d.ts +4 -0
  43. package/dist/components/TemplateEditor/Channels/SMS/index.d.ts +3 -0
  44. package/dist/components/TemplateEditor/Channels/index.d.ts +6 -0
  45. package/dist/components/TemplateEditor/Channels/useChannels.d.ts +14 -0
  46. package/dist/components/TemplateEditor/Channels/useChannels.test.d.ts +1 -0
  47. package/dist/components/TemplateEditor/IPhoneFrame/IPhoneFrame.d.ts +4 -0
  48. package/dist/components/TemplateEditor/IPhoneFrame/index.d.ts +1 -0
  49. package/dist/components/TemplateEditor/Layout/Layout.d.ts +8 -0
  50. package/dist/components/TemplateEditor/Layout/index.d.ts +1 -0
  51. package/dist/components/TemplateEditor/TemplateEditor.d.ts +4 -0
  52. package/dist/components/TemplateEditor/index.d.ts +16 -0
  53. package/dist/components/TemplateEditor/store.d.ts +13 -0
  54. package/dist/components/extensions/Blockquote/Blockquote.test.d.ts +1 -0
  55. package/dist/components/extensions/Blockquote/Blockquote.types.d.ts +2 -2
  56. package/dist/components/extensions/Button/Button.test.d.ts +1 -0
  57. package/dist/components/extensions/Button/Button.types.d.ts +6 -6
  58. package/dist/components/extensions/ButtonRow/ButtonRow.d.ts +11 -0
  59. package/dist/components/extensions/ButtonRow/ButtonRow.test.d.ts +1 -0
  60. package/dist/components/extensions/ButtonRow/ButtonRow.types.d.ts +45 -0
  61. package/dist/components/extensions/ButtonRow/ButtonRowComponent.d.ts +5 -0
  62. package/dist/components/extensions/ButtonRow/index.d.ts +4 -0
  63. package/dist/components/extensions/Divider/Divider.test.d.ts +1 -0
  64. package/dist/components/extensions/DragPlaceholder/DragPlaceholder.test.d.ts +1 -0
  65. package/dist/components/extensions/FileHandler/FileHandler.test.d.ts +1 -0
  66. package/dist/components/extensions/FixedChannelPaste/FixedChannelPaste.d.ts +11 -0
  67. package/dist/components/extensions/FixedChannelPaste/FixedChannelPaste.test.d.ts +1 -0
  68. package/dist/components/extensions/FixedChannelPaste/index.d.ts +2 -0
  69. package/dist/components/extensions/FixedChannelSelection/FixedChannelSelection.d.ts +14 -0
  70. package/dist/components/extensions/FixedChannelSelection/FixedChannelSelection.test.d.ts +1 -0
  71. package/dist/components/extensions/FixedChannelSelection/index.d.ts +1 -0
  72. package/dist/components/extensions/Heading/Heading.test.d.ts +1 -0
  73. package/dist/components/extensions/Image/Image.test.d.ts +1 -0
  74. package/dist/components/extensions/ImageBlock/ImageBlock.test.d.ts +1 -0
  75. package/dist/components/extensions/Link/Link.test.d.ts +1 -0
  76. package/dist/components/extensions/Paragraph/Paragraph.test.d.ts +1 -0
  77. package/dist/components/extensions/Selection/Selection.test.d.ts +1 -0
  78. package/dist/components/extensions/TextBlock/TextBlock.test.d.ts +1 -0
  79. package/dist/components/extensions/TextBlock/TextBlock.types.d.ts +4 -4
  80. package/dist/components/extensions/UniqueId/UniqueId.test.d.ts +1 -0
  81. package/dist/components/extensions/Variable/Variable.test.d.ts +1 -0
  82. package/dist/components/extensions/Variable/VariablePaste.d.ts +2 -0
  83. package/dist/components/extensions/Variable/VariablePaste.test.d.ts +1 -0
  84. package/dist/components/extensions/Variable/index.d.ts +1 -0
  85. package/dist/components/extensions/extension-kit.d.ts +1 -4
  86. package/dist/components/extensions/index.d.ts +4 -1
  87. package/dist/components/ui/MainLayout/MainLayout.d.ts +9 -0
  88. package/dist/components/ui/MainLayout/index.d.ts +1 -0
  89. package/dist/components/ui/PreviewPanel/PreviewPanel.d.ts +3 -2
  90. package/dist/components/ui/Status/Status.d.ts +1 -1
  91. package/dist/components/ui/TextMenu/BubbleTextMenu.d.ts +6 -0
  92. package/dist/components/ui/TextMenu/TextMenu.d.ts +3 -1
  93. package/dist/components/ui/TextMenu/config.d.ts +1 -1
  94. package/dist/components/ui/TextMenu/hooks/useTextmenuStates.d.ts +3 -5
  95. package/dist/components/ui/TextMenu/store.d.ts +1 -16
  96. package/dist/components/ui/index.d.ts +1 -1
  97. package/dist/components/ui-kit/AlertDialog/AlertDialog.d.ts +20 -0
  98. package/dist/components/ui-kit/AlertDialog/index.d.ts +1 -0
  99. package/dist/components/ui-kit/Button/Button.d.ts +1 -2
  100. package/dist/components/ui-kit/Icon/BatteryIcon.d.ts +3 -0
  101. package/dist/components/ui-kit/Icon/ExpandIcon.d.ts +3 -0
  102. package/dist/components/ui-kit/Icon/HamburgerMenuIcon.d.ts +3 -0
  103. package/dist/components/ui-kit/Icon/InAppIcon.d.ts +3 -0
  104. package/dist/components/ui-kit/Icon/InboxIcon.d.ts +3 -0
  105. package/dist/components/ui-kit/Icon/MoreMenuIcon.d.ts +3 -0
  106. package/dist/components/ui-kit/Icon/PushIcon.d.ts +3 -0
  107. package/dist/components/ui-kit/Icon/SMSIcon.d.ts +3 -0
  108. package/dist/components/ui-kit/Icon/SignalIcon.d.ts +3 -0
  109. package/dist/components/ui-kit/Icon/WiFiIcon.d.ts +3 -0
  110. package/dist/components/ui-kit/Icon/index.d.ts +10 -0
  111. package/dist/components/ui-kit/Separator/Separator.d.ts +4 -0
  112. package/dist/components/ui-kit/Separator/index.d.ts +1 -0
  113. package/dist/components/ui-kit/ThemeProvider/ThemeProvider.d.ts +1 -1
  114. package/dist/components/ui-kit/index.d.ts +2 -0
  115. package/dist/components/utils/index.d.ts +1 -0
  116. package/dist/components/utils/safeGetPos.d.ts +13 -0
  117. package/dist/esm/index.css +1 -1
  118. package/dist/esm/index.css.map +2 -2
  119. package/dist/esm/index.js +44 -30
  120. package/dist/esm/index.js.map +4 -4
  121. package/dist/esm/styles.css +485 -31
  122. package/dist/lib/utils/convertElementalToTiptap/convertElementalToTiptap.d.ts +5 -1
  123. package/dist/lib/utils/convertElementalToTiptap/convertElementalToTiptap.test.d.ts +1 -0
  124. package/dist/lib/utils/convertMarkdownToTiptap/convertMarkdownToTiptap.test.d.ts +1 -0
  125. package/dist/lib/utils/convertTiptapToElemental/convertTiptapToElemental.d.ts +2 -2
  126. package/dist/lib/utils/convertTiptapToElemental/convertTiptapToElemental.test.d.ts +1 -0
  127. package/dist/lib/utils/convertTiptapToMarkdown/convertTiptapToMarkdown.test.d.ts +1 -0
  128. package/dist/lib/utils/index.d.ts +2 -1
  129. package/dist/lib/utils/updateElemental/index.d.ts +1 -0
  130. package/dist/lib/utils/updateElemental/updateElemental.d.ts +11 -0
  131. package/dist/lib/utils/updateElemental/updateElemental.test.d.ts +1 -0
  132. package/dist/store.d.ts +7 -2
  133. package/dist/styles.css +485 -31
  134. package/dist/types/elemental.schema.d.ts +3 -3
  135. package/dist/types/elemental.types.d.ts +0 -1
  136. package/package.json +14 -11
  137. package/dist/components/BrandEditor/Editor/useBlockEditor.d.ts +0 -23
  138. package/dist/components/TemplateEditor/Editor/Editor.d.ts +0 -11
  139. package/dist/components/TemplateEditor/Editor/SideBar/SideBar.d.ts +0 -7
  140. package/dist/components/TemplateEditor/Editor/index.d.ts +0 -1
  141. package/dist/components/TemplateEditor/Editor/useBlockEditor.d.ts +0 -23
  142. package/dist/components/ui/EditorLayout/EditorLayout.d.ts +0 -6
  143. package/dist/components/ui/EditorLayout/index.d.ts +0 -1
  144. /package/dist/components/TemplateEditor/{Editor → Channels/Email}/SideBar/SideBarItem/SideBarItem.d.ts +0 -0
  145. /package/dist/components/TemplateEditor/{Editor → Channels/Email}/SideBar/SideBarItem/index.d.ts +0 -0
  146. /package/dist/components/TemplateEditor/{Editor → Channels/Email}/SideBar/SideBarItemDetails/index.d.ts +0 -0
  147. /package/dist/components/TemplateEditor/{Editor → Channels/Email}/SideBar/SideBarSortableItemWrapper/SideBarSortableItemWrapper.d.ts +0 -0
  148. /package/dist/components/TemplateEditor/{Editor → Channels/Email}/SideBar/SideBarSortableItemWrapper/index.d.ts +0 -0
  149. /package/dist/components/TemplateEditor/{Editor → Channels/Inbox}/SideBar/index.d.ts +0 -0
@@ -17,12 +17,12 @@ export declare const buttonSchema: z.ZodObject<{
17
17
  }, "strip", z.ZodTypeAny, {
18
18
  padding: number;
19
19
  borderWidth: number;
20
+ label: string;
21
+ backgroundColor: string;
22
+ textColor: string;
20
23
  borderColor: string;
21
24
  size: "full" | "default";
22
25
  borderRadius: number;
23
- textColor: string;
24
- backgroundColor: string;
25
- label: string;
26
26
  alignment: "left" | "center" | "right";
27
27
  fontStyle: "italic" | "normal";
28
28
  fontWeight: "bold" | "normal";
@@ -32,12 +32,12 @@ export declare const buttonSchema: z.ZodObject<{
32
32
  }, {
33
33
  padding: number;
34
34
  borderWidth: number;
35
+ label: string;
36
+ backgroundColor: string;
37
+ textColor: string;
35
38
  borderColor: string;
36
39
  size: "full" | "default";
37
40
  borderRadius: number;
38
- textColor: string;
39
- backgroundColor: string;
40
- label: string;
41
41
  alignment: "left" | "center" | "right";
42
42
  fontStyle: "italic" | "normal";
43
43
  fontWeight: "bold" | "normal";
@@ -0,0 +1,11 @@
1
+ import { Node } from "@tiptap/core";
2
+ import type { ButtonRowProps } from "./ButtonRow.types";
3
+ declare module "@tiptap/core" {
4
+ interface Commands<ReturnType> {
5
+ buttonRow: {
6
+ setButtonRow: (props: Partial<ButtonRowProps>) => ReturnType;
7
+ };
8
+ }
9
+ }
10
+ export declare const defaultButtonRowProps: ButtonRowProps;
11
+ export declare const ButtonRow: Node<any, any>;
@@ -0,0 +1,45 @@
1
+ import { z } from "zod";
2
+ export interface ButtonRowProps {
3
+ id?: string;
4
+ button1Label: string;
5
+ button1Link: string;
6
+ button1BackgroundColor: string;
7
+ button1TextColor: string;
8
+ button2Label: string;
9
+ button2Link: string;
10
+ button2BackgroundColor: string;
11
+ button2TextColor: string;
12
+ padding?: number;
13
+ }
14
+ export declare const buttonRowSchema: z.ZodObject<{
15
+ button1Label: z.ZodString;
16
+ button1Link: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
17
+ button1BackgroundColor: z.ZodOptional<z.ZodString>;
18
+ button1TextColor: z.ZodOptional<z.ZodString>;
19
+ button2Label: z.ZodString;
20
+ button2Link: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
21
+ button2BackgroundColor: z.ZodOptional<z.ZodString>;
22
+ button2TextColor: z.ZodOptional<z.ZodString>;
23
+ padding: z.ZodOptional<z.ZodNumber>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ button1Label: string;
26
+ button2Label: string;
27
+ padding?: number | undefined;
28
+ button1Link?: string | undefined;
29
+ button1BackgroundColor?: string | undefined;
30
+ button1TextColor?: string | undefined;
31
+ button2Link?: string | undefined;
32
+ button2BackgroundColor?: string | undefined;
33
+ button2TextColor?: string | undefined;
34
+ }, {
35
+ button1Label: string;
36
+ button2Label: string;
37
+ padding?: number | undefined;
38
+ button1Link?: string | undefined;
39
+ button1BackgroundColor?: string | undefined;
40
+ button1TextColor?: string | undefined;
41
+ button2Link?: string | undefined;
42
+ button2BackgroundColor?: string | undefined;
43
+ button2TextColor?: string | undefined;
44
+ }>;
45
+ export type ButtonRowFormData = z.infer<typeof buttonRowSchema>;
@@ -0,0 +1,5 @@
1
+ import { type NodeViewProps } from "@tiptap/react";
2
+ import React from "react";
3
+ import type { ButtonRowProps } from "./ButtonRow.types";
4
+ export declare const ButtonRowComponent: React.FC<ButtonRowProps>;
5
+ export declare const ButtonRowComponentNode: (props: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export { ButtonRow, defaultButtonRowProps } from "./ButtonRow";
2
+ export { ButtonRowComponent, ButtonRowComponentNode } from "./ButtonRowComponent";
3
+ export type { ButtonRowProps, ButtonRowFormData } from "./ButtonRow.types";
4
+ export { buttonRowSchema } from "./ButtonRow.types";
@@ -0,0 +1,11 @@
1
+ import { Extension } from "@tiptap/core";
2
+ import { PluginKey } from "@tiptap/pm/state";
3
+ export interface FixedChannelPasteOptions {
4
+ /**
5
+ * Channels that have fixed element structure (like PushEditor, SMS, Inbox)
6
+ * For these channels, multi-element paste should be converted to merged text
7
+ */
8
+ fixedChannels?: string[];
9
+ }
10
+ export declare const FixedChannelPastePlugin: PluginKey<any>;
11
+ export declare const FixedChannelPaste: Extension<FixedChannelPasteOptions, any>;
@@ -0,0 +1,2 @@
1
+ export { FixedChannelPaste } from "./FixedChannelPaste";
2
+ export type { FixedChannelPasteOptions } from "./FixedChannelPaste";
@@ -0,0 +1,14 @@
1
+ import { Extension } from "@tiptap/core";
2
+ import { PluginKey } from "@tiptap/pm/state";
3
+ export interface FixedChannelSelectionOptions {
4
+ channels: Array<"push" | "sms" | "inbox">;
5
+ }
6
+ declare module "@tiptap/core" {
7
+ interface Commands<ReturnType> {
8
+ fixedChannelSelection: {
9
+ constrainSelectionToElement: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const FixedChannelSelectionPlugin: PluginKey<any>;
14
+ export declare const FixedChannelSelection: Extension<FixedChannelSelectionOptions, any>;
@@ -0,0 +1 @@
1
+ export { FixedChannelSelection, type FixedChannelSelectionOptions } from "./FixedChannelSelection";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import "@testing-library/jest-dom/vitest";
@@ -12,23 +12,23 @@ export declare const textBlockSchema: z.ZodObject<{
12
12
  id: z.ZodOptional<z.ZodString>;
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  borderWidth: number;
15
+ backgroundColor: string;
16
+ textColor: string;
15
17
  paddingVertical: number;
16
18
  paddingHorizontal: number;
17
19
  borderColor: string;
18
20
  borderRadius: number;
19
21
  textAlign: "left" | "center" | "right" | "justify";
20
- textColor: string;
21
- backgroundColor: string;
22
22
  selected: boolean;
23
23
  id?: string | undefined;
24
24
  }, {
25
25
  borderWidth: number;
26
+ backgroundColor: string;
27
+ textColor: string;
26
28
  paddingVertical: number;
27
29
  paddingHorizontal: number;
28
30
  borderColor: string;
29
31
  borderRadius: number;
30
- textColor: string;
31
- backgroundColor: string;
32
32
  id?: string | undefined;
33
33
  textAlign?: "left" | "center" | "right" | "justify" | undefined;
34
34
  selected?: boolean | undefined;
@@ -0,0 +1,2 @@
1
+ import { Extension } from "@tiptap/core";
2
+ export declare const VariablePaste: Extension<any, any>;
@@ -1,2 +1,3 @@
1
1
  export * from "./Variable";
2
2
  export * from "./Variable.types";
3
+ export * from "./VariablePaste";
@@ -2,8 +2,5 @@ import type { Node } from "@tiptap/pm/model";
2
2
  export declare const ExtensionKit: (options?: {
3
3
  variables?: Record<string, unknown>;
4
4
  setSelectedNode?: (node: Node) => void;
5
- }) => (import("@tiptap/core").Node<any, any> | import("@tiptap/core").Extension<import("./FileHandler/FileHandler").FileHandlerOptions, any> | import("@tiptap/core").Extension<import("./Selection").SelectionOptions, any> | import("@tiptap/core").Extension<import("./Variable").VariableOptions, any> | import("@tiptap/core").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | {
6
- new (): History;
7
- prototype: History;
8
- } | import("@tiptap/core").Extension<import("@tiptap/extension-color").ColorOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-underline").UnderlineOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-typography").TypographyOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-placeholder").PlaceholderOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-dropcursor").DropcursorOptions, any>)[];
5
+ }) => (import("@tiptap/core").Node<any, any> | import("@tiptap/core").Extension<any, any> | import("@tiptap/core").Mark<import("@tiptap/extension-underline").UnderlineOptions, any>)[];
9
6
  export default ExtensionKit;
@@ -9,10 +9,13 @@ export { Underline } from "@tiptap/extension-underline";
9
9
  export { StarterKit } from "@tiptap/starter-kit";
10
10
  export { Blockquote } from "./Blockquote";
11
11
  export { Button } from "./Button";
12
+ export { ButtonRow } from "./ButtonRow";
12
13
  export { Divider } from "./Divider";
13
14
  export { Document } from "./Document";
14
15
  export * from "./DragPlaceholder";
15
16
  export { FileHandler } from "./FileHandler";
17
+ export { FixedChannelPaste } from "./FixedChannelPaste";
18
+ export { FixedChannelSelection } from "./FixedChannelSelection";
16
19
  export { Heading } from "./Heading";
17
20
  export { ImageBlock } from "./ImageBlock";
18
21
  export { Link } from "./Link";
@@ -20,4 +23,4 @@ export { Paragraph } from "./Paragraph";
20
23
  export { Selection } from "./Selection";
21
24
  export { SlashMenu } from "./SlashMenu";
22
25
  export { UniqueId } from "./UniqueId";
23
- export { Variable, VariableNode } from "./Variable";
26
+ export { Variable, VariableNode, VariablePaste } from "./Variable";
@@ -0,0 +1,9 @@
1
+ import type { Theme } from "@/components/ui-kit/ThemeProvider/ThemeProvider.types";
2
+ export interface MainLayoutProps {
3
+ theme?: Theme | string;
4
+ children: React.ReactNode;
5
+ isLoading?: boolean;
6
+ SideBar?: React.ReactNode;
7
+ Header?: React.ReactNode;
8
+ }
9
+ export declare const MainLayout: import("react").ForwardRefExoticComponent<MainLayoutProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from "./MainLayout";
@@ -1,6 +1,7 @@
1
- interface PreviewPanelProps {
1
+ import type { HTMLAttributes } from "react";
2
+ interface PreviewPanelProps extends HTMLAttributes<HTMLDivElement> {
2
3
  previewMode: "desktop" | "mobile" | undefined;
3
4
  togglePreviewMode: (mode?: "desktop" | "mobile" | undefined) => void;
4
5
  }
5
- export declare const PreviewPanel: ({ previewMode, togglePreviewMode }: PreviewPanelProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const PreviewPanel: ({ previewMode, togglePreviewMode, ...props }: PreviewPanelProps) => import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -1,6 +1,6 @@
1
1
  interface StatusProps {
2
2
  isError?: boolean;
3
- isSaving?: boolean;
3
+ isSaving?: boolean | null;
4
4
  isLoading?: boolean;
5
5
  }
6
6
  export declare const Status: ({ isError, isSaving, isLoading }: StatusProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ import type { TextMenuConfig } from "./config";
2
+ interface BubbleTextMenuProps {
3
+ config?: TextMenuConfig;
4
+ }
5
+ export declare const BubbleTextMenu: ({ config }: BubbleTextMenuProps) => import("react/jsx-runtime").JSX.Element | null;
6
+ export {};
@@ -1,5 +1,7 @@
1
1
  import type { Editor } from "@tiptap/react";
2
+ import type { TextMenuConfig } from "./config";
2
3
  export interface TextMenuProps {
3
4
  editor: Editor;
5
+ config?: TextMenuConfig;
4
6
  }
5
- export declare const TextMenu: ({ editor }: TextMenuProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const TextMenu: ({ editor, config }: TextMenuProps) => import("react/jsx-runtime").JSX.Element;
@@ -17,4 +17,4 @@ export interface TextMenuConfig {
17
17
  variable?: TextMenuItem;
18
18
  }
19
19
  export declare const defaultTextMenuConfig: TextMenuConfig;
20
- export declare const getTextMenuConfigForNode: (nodeName: string) => TextMenuConfig;
20
+ export declare const getTextMenuConfigForNode: (nodeName: string, hasTextSelection?: boolean) => TextMenuConfig;
@@ -1,6 +1,5 @@
1
1
  import type { Editor } from "@tiptap/react";
2
- import type { EditorView } from "@tiptap/pm/view";
3
- export declare const useTextmenuStates: (editor: Editor) => {
2
+ export declare const useTextmenuStates: (editor: Editor | null) => {
4
3
  isBold: boolean;
5
4
  isItalic: boolean;
6
5
  isUnderline: boolean;
@@ -11,8 +10,7 @@ export declare const useTextmenuStates: (editor: Editor) => {
11
10
  isAlignJustify: boolean;
12
11
  isQuote: boolean;
13
12
  isLink: boolean;
14
- shouldShow: ({ view, from }: {
15
- view: EditorView;
16
- from: number;
13
+ shouldShow: ({ editor }: {
14
+ editor: Editor;
17
15
  }) => boolean;
18
16
  };
@@ -39,22 +39,7 @@ export declare const textInputStateAtom: import("jotai").PrimitiveAtom<{
39
39
  showVariablePopup: boolean;
40
40
  };
41
41
  };
42
- export declare const getNodeConfigAtom: import("jotai").Atom<(nodeName: string) => TextMenuConfig | {
43
- variable: {
44
- state: string;
45
- };
46
- contentType?: import("./config").TextMenuItem;
47
- bold?: import("./config").TextMenuItem;
48
- italic?: import("./config").TextMenuItem;
49
- underline?: import("./config").TextMenuItem;
50
- strike?: import("./config").TextMenuItem;
51
- alignLeft?: import("./config").TextMenuItem;
52
- alignCenter?: import("./config").TextMenuItem;
53
- alignRight?: import("./config").TextMenuItem;
54
- alignJustify?: import("./config").TextMenuItem;
55
- quote?: import("./config").TextMenuItem;
56
- link?: import("./config").TextMenuItem;
57
- }>;
42
+ export declare const getNodeConfigAtom: import("jotai").Atom<(nodeName: string, hasTextSelection?: boolean) => TextMenuConfig>;
58
43
  export declare const setNodeConfigAtom: import("jotai").WritableAtom<null, [{
59
44
  nodeName: string;
60
45
  config: Partial<TextMenuConfig>;
@@ -1,5 +1,5 @@
1
1
  export * from "./Blocks";
2
- export * from "./EditorLayout";
2
+ export * from "./MainLayout";
3
3
  export * from "./FormHeader";
4
4
  export * from "./Handle";
5
5
  export * from "./PreviewPanel";
@@ -0,0 +1,20 @@
1
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
2
+ import * as React from "react";
3
+ declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
4
+ declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
6
+ declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const AlertDialogHeader: {
9
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ declare const AlertDialogFooter: {
13
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
14
+ displayName: string;
15
+ };
16
+ declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
17
+ declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
18
+ declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
+ declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
20
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
@@ -0,0 +1 @@
1
+ export * from "./AlertDialog";
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
2
2
  import type { ButtonHTMLAttributes } from "react";
3
3
  export type ButtonVariant = "primary" | "secondary" | "tertiary" | "quaternary" | "outline" | "ghost" | "link";
4
4
  export type ButtonSize = "medium" | "small" | "icon" | "iconSmall";
5
- declare const buttonVariants: (props?: ({
5
+ export declare const buttonVariants: (props?: ({
6
6
  variant?: "link" | "primary" | "secondary" | "tertiary" | "quaternary" | "outline" | "ghost" | null | undefined;
7
7
  size?: "small" | "medium" | "icon" | "iconSmall" | null | undefined;
8
8
  active?: boolean | null | undefined;
@@ -16,4 +16,3 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, Va
16
16
  buttonSize?: ButtonSize;
17
17
  }
18
18
  export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
19
- export {};
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "./Icon";
2
+ export declare const BatteryIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default BatteryIcon;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "./Icon";
2
+ export declare const ExpandIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default ExpandIcon;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "./Icon";
2
+ export declare const HamburgerMenuIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default HamburgerMenuIcon;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "./Icon";
2
+ export declare const InAppIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default InAppIcon;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "./Icon";
2
+ export declare const InboxIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default InboxIcon;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "./Icon";
2
+ export declare const MoreMenuIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default MoreMenuIcon;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "./Icon";
2
+ export declare const PushIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default PushIcon;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "./Icon";
2
+ export declare const SMSIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default SMSIcon;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "./Icon";
2
+ export declare const SignalIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default SignalIcon;
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from "./Icon";
2
+ export declare const WiFiIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default WiFiIcon;
@@ -1,4 +1,5 @@
1
1
  export { ArrowUpIcon } from "./ArrowUpIcon";
2
+ export { BatteryIcon } from "./BatteryIcon";
2
3
  export { BinIcon } from "./BinIcon";
3
4
  export { BoldIcon } from "./BoldIcon";
4
5
  export { BorderRadiusIcon } from "./BorderRadiusIcon";
@@ -12,12 +13,16 @@ export { DesktopIcon } from "./DesktopIcon";
12
13
  export { DistributeIcon } from "./DistributeIcon";
13
14
  export { DownIcon } from "./DownIcon";
14
15
  export { DuplicateIcon } from "./DuplicateIcon";
16
+ export { ExpandIcon } from "./ExpandIcon";
15
17
  export { FacebookIcon } from "./FacebookIcon";
16
18
  export { FontSizeIcon } from "./FontSizeIcon";
17
19
  export { H1Icon } from "./H1Icon";
18
20
  export { H2Icon } from "./H2Icon";
19
21
  export { H3Icon } from "./H3Icon";
22
+ export { HamburgerMenuIcon } from "./HamburgerMenuIcon";
20
23
  export { Icon, Path, type IconProps } from "./Icon";
24
+ export { InAppIcon } from "./InAppIcon";
25
+ export { InboxIcon } from "./InboxIcon";
21
26
  export { InstagramIcon } from "./InstagramIcon";
22
27
  export { ItalicIcon } from "./ItalicIcon";
23
28
  export { LeftAlignIcon } from "./LeftAlignIcon";
@@ -27,16 +32,21 @@ export { LinkedinIcon } from "./LinkedinIcon";
27
32
  export { LinkIcon } from "./LinkIcon";
28
33
  export { MediumIcon } from "./MediumIcon";
29
34
  export { MobileIcon } from "./MobileIcon";
35
+ export { MoreMenuIcon } from "./MoreMenuIcon";
30
36
  export { NumberedListIcon } from "./NumberedListIcon";
31
37
  export { PaddingHorizontalIcon } from "./PaddingHorizontalIcon";
32
38
  export { PaddingVerticalIcon } from "./PaddingVerticalIcon";
33
39
  export { ParagraphIcon } from "./ParagraphIcon";
40
+ export { PushIcon } from "./PushIcon";
34
41
  export { QuoteIcon } from "./QuoteIcon";
35
42
  export { RemoveFormattingIcon } from "./RemoveFormattingIcon";
36
43
  export { RightAlignIcon } from "./RightAlignIcon";
37
44
  export { RightArrowIcon } from "./RightArrowIcon";
45
+ export { SignalIcon } from "./SignalIcon";
46
+ export { SMSIcon } from "./SMSIcon";
38
47
  export { StrikethroughIcon } from "./StrikethroughIcon";
39
48
  export { UnderlineIcon } from "./UnderlineIcon";
40
49
  export { UpIcon } from "./UpIcon";
41
50
  export { VariableIcon } from "./VariableIcon";
51
+ export { WiFiIcon } from "./WiFiIcon";
42
52
  export { XIcon } from "./XIcon";
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
3
+ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export { Separator };
@@ -0,0 +1 @@
1
+ export * from "./Separator";
@@ -4,6 +4,6 @@ interface ThemeProviderProps {
4
4
  children: ReactNode;
5
5
  theme?: Theme | string;
6
6
  }
7
- export declare const ThemeProvider: ({ children, theme }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const ThemeProvider: import("react").ForwardRefExoticComponent<ThemeProviderProps & import("react").RefAttributes<HTMLDivElement>>;
8
8
  export declare const useTheme: () => Theme;
9
9
  export {};
@@ -2,10 +2,12 @@ export * from "./Button";
2
2
  export * from "./Divider";
3
3
  export * from "./DropdownMenu";
4
4
  export * from "./Form";
5
+ export * from "./AlertDialog";
5
6
  export * from "./Input";
6
7
  export * from "./InputColor";
7
8
  export * from "./Label";
8
9
  export * from "./Popover";
10
+ export * from "./Separator";
9
11
  export * from "./Slider";
10
12
  export * from "./Switch";
11
13
  export * from "./Tabs";
@@ -4,3 +4,4 @@ export * from "./isTextSelected";
4
4
  export * from "./generateNodeIds";
5
5
  export * from "./createOrDuplicateNode";
6
6
  export * from "./multipleContainersKeyboardCoordinates";
7
+ export * from "./safeGetPos";
@@ -0,0 +1,13 @@
1
+ import type { NodeViewProps } from "@tiptap/react";
2
+ /**
3
+ * Safely gets the position from a NodeViewProps getPos function
4
+ * @param getPos The getPos function from NodeViewProps
5
+ * @returns The position as a number, or null if undefined
6
+ */
7
+ export declare const safeGetPos: (getPos: NodeViewProps["getPos"]) => number | null;
8
+ /**
9
+ * Safely gets a node at the position returned by getPos
10
+ * @param props NodeViewProps containing editor and getPos
11
+ * @returns The node or null if position is invalid
12
+ */
13
+ export declare const safeGetNodeAtPos: (props: NodeViewProps) => import("prosemirror-model").Node | null;