@voilabs/mark 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +728 -0
  3. package/dist/components/Editor.d.ts +31 -0
  4. package/dist/components/Editor.d.ts.map +1 -0
  5. package/dist/components/editor/EditorContext.d.ts +16 -0
  6. package/dist/components/editor/EditorContext.d.ts.map +1 -0
  7. package/dist/components/editor/GlobalDragHandleMenu.d.ts +8 -0
  8. package/dist/components/editor/GlobalDragHandleMenu.d.ts.map +1 -0
  9. package/dist/components/editor/StyleBar.d.ts +26 -0
  10. package/dist/components/editor/StyleBar.d.ts.map +1 -0
  11. package/dist/components/editor/StyleEditPopover.d.ts +19 -0
  12. package/dist/components/editor/StyleEditPopover.d.ts.map +1 -0
  13. package/dist/components/editor/Toolbar.d.ts +21 -0
  14. package/dist/components/editor/Toolbar.d.ts.map +1 -0
  15. package/dist/components/editor/classNames.d.ts +136 -0
  16. package/dist/components/editor/classNames.d.ts.map +1 -0
  17. package/dist/components/editor/extensions/AdvancedImage.d.ts +22 -0
  18. package/dist/components/editor/extensions/AdvancedImage.d.ts.map +1 -0
  19. package/dist/components/editor/extensions/FontFamily.d.ts +14 -0
  20. package/dist/components/editor/extensions/FontFamily.d.ts.map +1 -0
  21. package/dist/components/editor/extensions/FontSize.d.ts +14 -0
  22. package/dist/components/editor/extensions/FontSize.d.ts.map +1 -0
  23. package/dist/components/editor/extensions/ImageNodeView.d.ts +2 -0
  24. package/dist/components/editor/extensions/ImageNodeView.d.ts.map +1 -0
  25. package/dist/components/editor/extensions/TextStyleAttributes.d.ts +10 -0
  26. package/dist/components/editor/extensions/TextStyleAttributes.d.ts.map +1 -0
  27. package/dist/components/editor/extensions/Video.d.ts +21 -0
  28. package/dist/components/editor/extensions/Video.d.ts.map +1 -0
  29. package/dist/components/editor/paragraphStyles.d.ts +42 -0
  30. package/dist/components/editor/paragraphStyles.d.ts.map +1 -0
  31. package/dist/components/editor/slash-command/commands-list.d.ts +27 -0
  32. package/dist/components/editor/slash-command/commands-list.d.ts.map +1 -0
  33. package/dist/components/editor/slash-command/commands.d.ts +15 -0
  34. package/dist/components/editor/slash-command/commands.d.ts.map +1 -0
  35. package/dist/components/editor/slash-command/suggestion.d.ts +38 -0
  36. package/dist/components/editor/slash-command/suggestion.d.ts.map +1 -0
  37. package/dist/components/editor/translations.d.ts +151 -0
  38. package/dist/components/editor/translations.d.ts.map +1 -0
  39. package/dist/components/editor/useStyleStorage.d.ts +19 -0
  40. package/dist/components/editor/useStyleStorage.d.ts.map +1 -0
  41. package/dist/components/editor/utils/upload.d.ts +5 -0
  42. package/dist/components/editor/utils/upload.d.ts.map +1 -0
  43. package/dist/components/ui/Dropdown.d.ts +16 -0
  44. package/dist/components/ui/Dropdown.d.ts.map +1 -0
  45. package/dist/components/ui/DropdownMenu.d.ts +28 -0
  46. package/dist/components/ui/DropdownMenu.d.ts.map +1 -0
  47. package/dist/components/ui/Popover.d.ts +11 -0
  48. package/dist/components/ui/Popover.d.ts.map +1 -0
  49. package/dist/components/ui/Tooltip.d.ts +7 -0
  50. package/dist/components/ui/Tooltip.d.ts.map +1 -0
  51. package/dist/index.cjs.js +151 -0
  52. package/dist/index.d.ts +7 -0
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/index.es.js +22724 -0
  55. package/dist/lib/utils.d.ts +3 -0
  56. package/dist/lib/utils.d.ts.map +1 -0
  57. package/dist/plugin.cjs.js +10 -0
  58. package/dist/plugin.d.ts +4 -0
  59. package/dist/plugin.d.ts.map +1 -0
  60. package/dist/plugin.es.js +575 -0
  61. package/dist/translations/en-US.cjs.js +1 -0
  62. package/dist/translations/en-US.d.ts +4 -0
  63. package/dist/translations/en-US.d.ts.map +1 -0
  64. package/dist/translations/en-US.es.js +153 -0
  65. package/dist/translations/tr-TR.cjs.js +1 -0
  66. package/dist/translations/tr-TR.d.ts +4 -0
  67. package/dist/translations/tr-TR.d.ts.map +1 -0
  68. package/dist/translations/tr-TR.es.js +153 -0
  69. package/package.json +121 -0
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import { EditorTranslations } from "./editor/translations";
3
+ import type { EditorClassNames } from "./editor/classNames";
4
+ import type { ParagraphStyle } from "./editor/paragraphStyles";
5
+ export type { EditorClassNames } from "./editor/classNames";
6
+ export type { ParagraphStyle } from "./editor/paragraphStyles";
7
+ export { DEFAULT_PARAGRAPH_STYLES } from "./editor/paragraphStyles";
8
+ export interface EditorProps {
9
+ value?: string;
10
+ onChange?: (value: string) => void;
11
+ /** "html" | "markdown" | "auto" (default). auto detects based on value content. */
12
+ format?: "html" | "markdown" | "auto";
13
+ /** "light" | "dark" forces the theme. "auto" lets users switch and stores the choice in a cookie. */
14
+ theme?: EditorThemeMode;
15
+ onUpload?: (file: File) => Promise<{
16
+ url: string;
17
+ }>;
18
+ disableVideoUpload?: boolean;
19
+ disableImageUpload?: boolean;
20
+ classNames?: EditorClassNames;
21
+ translations?: Partial<EditorTranslations>;
22
+ /**
23
+ * Custom paragraph styles shown in the Style picker dropdown.
24
+ * Falls back to DEFAULT_PARAGRAPH_STYLES when not provided.
25
+ */
26
+ styles?: ParagraphStyle[];
27
+ }
28
+ type EditorTheme = "light" | "dark" | "auto";
29
+ type EditorThemeMode = EditorTheme | "auto";
30
+ export declare const Editor: React.FC<EditorProps>;
31
+ //# sourceMappingURL=Editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../src/components/Editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAqC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAK/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,WAAW,WAAW;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;IACtC,qGAAqG;IACrG,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC3C;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;CAC7B;AAUD,KAAK,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAC7C,KAAK,eAAe,GAAG,WAAW,GAAG,MAAM,CAAC;AAqH5C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA4sBxC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { EditorTranslations } from "./translations";
3
+ import type { EditorClassNames } from "./classNames";
4
+ import type { ParagraphStyle } from "./paragraphStyles";
5
+ export interface EditorContextType {
6
+ theme: "light" | "dark" | "auto";
7
+ translations: EditorTranslations;
8
+ classNames?: EditorClassNames;
9
+ styles?: ParagraphStyle[];
10
+ }
11
+ export declare const EditorContext: import("react").Context<EditorContextType>;
12
+ export declare const useEditorTheme: () => "light" | "dark" | "auto";
13
+ export declare const useEditorTranslations: () => EditorTranslations;
14
+ export declare const useEditorClassNames: () => EditorClassNames | undefined;
15
+ export declare const useEditorStyles: () => ParagraphStyle[] | undefined;
16
+ //# sourceMappingURL=EditorContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorContext.d.ts","sourceRoot":"","sources":["../../../src/components/editor/EditorContext.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,YAAY,EAAE,kBAAkB,CAAC;IACjC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,4CAGxB,CAAC;AAEH,eAAO,MAAM,cAAc,iCAE1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,0BAEjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,oCAE/B,CAAC;AAEF,eAAO,MAAM,eAAe,oCAE3B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Editor } from "@tiptap/react";
3
+ interface GlobalDragHandleMenuProps {
4
+ editor: Editor;
5
+ }
6
+ export declare const GlobalDragHandleMenu: React.FC<GlobalDragHandleMenuProps>;
7
+ export {};
8
+ //# sourceMappingURL=GlobalDragHandleMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GlobalDragHandleMenu.d.ts","sourceRoot":"","sources":["../../../src/components/editor/GlobalDragHandleMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAkCvC,UAAU,yBAAyB;IAClC,MAAM,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAskBpE,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * StyleBar — Word-like horizontal Quick Styles gallery strip.
3
+ *
4
+ * Each style is displayed as a small bordered card (like Word's style gallery)
5
+ * with the style name rendered in its own typography. The active card gets a
6
+ * sky-blue bottom border accent. Right-click opens the full StyleEditPopover.
7
+ */
8
+ import React from "react";
9
+ import type { Editor } from "@tiptap/react";
10
+ import type { ParagraphStyle } from "./paragraphStyles";
11
+ import type { EditorClassNames } from "./classNames";
12
+ interface StyleBarProps {
13
+ styles: ParagraphStyle[];
14
+ baseStyles: ParagraphStyle[];
15
+ editor: Editor;
16
+ theme: "light" | "dark" | "auto";
17
+ classNames?: EditorClassNames;
18
+ activeStyle: ParagraphStyle | null;
19
+ onApply: (style: ParagraphStyle) => void;
20
+ onSave: (id: string, changes: Partial<ParagraphStyle>) => void;
21
+ onReset: (id: string) => void;
22
+ keepEditorSelection: (e: React.MouseEvent) => void;
23
+ }
24
+ export declare const StyleBar: React.FC<StyleBarProps>;
25
+ export {};
26
+ //# sourceMappingURL=StyleBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StyleBar.d.ts","sourceRoot":"","sources":["../../../src/components/editor/StyleBar.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD,UAAU,aAAa;IACtB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,WAAW,EAAE,cAAc,GAAG,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC/D,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,mBAAmB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CACnD;AAQD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAkJ5C,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * StyleEditPopover — right-click context menu for editing a paragraph style.
3
+ * Fully translated via useEditorTranslations. Fixed-position, portal-rendered.
4
+ */
5
+ import React from "react";
6
+ import type { ParagraphStyle } from "./paragraphStyles";
7
+ import type { EditorClassNames } from "./classNames";
8
+ export interface StyleEditPopoverProps {
9
+ style: ParagraphStyle;
10
+ baseStyle: ParagraphStyle;
11
+ anchorX: number;
12
+ anchorY: number;
13
+ classNames?: EditorClassNames;
14
+ onSave: (id: string, changes: Partial<ParagraphStyle>) => void;
15
+ onReset: (id: string) => void;
16
+ onClose: () => void;
17
+ }
18
+ export declare const StyleEditPopover: React.FC<StyleEditPopoverProps>;
19
+ //# sourceMappingURL=StyleEditPopover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StyleEditPopover.d.ts","sourceRoot":"","sources":["../../../src/components/editor/StyleEditPopover.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD,MAAM,WAAW,qBAAqB;IAClC,KAAK,EAAE,cAAc,CAAC;IACtB,SAAS,EAAE,cAAc,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC/D,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAwBD,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkT5D,CAAC"}
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { type Editor } from "@tiptap/react";
3
+ import { type EditorClassNames } from "./classNames";
4
+ import { EditorTranslations } from "./translations";
5
+ import type { ParagraphStyle } from "./paragraphStyles";
6
+ interface ToolbarProps {
7
+ editor: Editor | null;
8
+ onUpload?: (file: File) => Promise<{
9
+ url: string;
10
+ }>;
11
+ disableVideoUpload?: boolean;
12
+ disableImageUpload?: boolean;
13
+ classNames?: EditorClassNames;
14
+ translations?: Partial<EditorTranslations>;
15
+ styles?: ParagraphStyle[];
16
+ onThemeChange?: (theme: "light" | "dark") => void;
17
+ showThemeToggle?: boolean;
18
+ }
19
+ export declare const Toolbar: React.FC<ToolbarProps>;
20
+ export {};
21
+ //# sourceMappingURL=Toolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/editor/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAoD5C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIxD,UAAU,YAAY;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,KAAK,IAAI,CAAC;IAClD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AA+RD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAusC1C,CAAC"}
@@ -0,0 +1,136 @@
1
+ export interface EditorClassNames {
2
+ root?: string;
3
+ content?: string;
4
+ contentScroller?: string;
5
+ contentInner?: string;
6
+ editorContent?: string;
7
+ prose?: string;
8
+ footer?: string;
9
+ footerWordCount?: string;
10
+ footerControls?: string;
11
+ footerButton?: string;
12
+ footerButtonDisabled?: string;
13
+ footerZoomGroup?: string;
14
+ footerZoomButton?: string;
15
+ footerZoomValue?: string;
16
+ footerFullscreenButton?: string;
17
+ toolbar?: string;
18
+ toolbarInner?: string;
19
+ toolbarGroup?: string;
20
+ toolbarButton?: string;
21
+ toolbarButtonActive?: string;
22
+ toolbarButtonDisabled?: string;
23
+ toolbarButtonIcon?: string;
24
+ toolbarTrigger?: string;
25
+ toolbarTriggerActive?: string;
26
+ toolbarTriggerIcon?: string;
27
+ toolbarTriggerLabel?: string;
28
+ toolbarTriggerChevron?: string;
29
+ toolbarSeparator?: string;
30
+ toolbarFileInput?: string;
31
+ toolbarUploadButton?: string;
32
+ toolbarUploadIcon?: string;
33
+ toolbarUploadLabel?: string;
34
+ styleBar?: string;
35
+ styleBarItem?: string;
36
+ styleBarItemActive?: string;
37
+ styleEditPopover?: string;
38
+ styleEditInput?: string;
39
+ styleEditSaveButton?: string;
40
+ styleEditResetButton?: string;
41
+ toolbarFontFamilyTrigger?: string;
42
+ toolbarFontFamilyPopover?: string;
43
+ toolbarFontFamilySearch?: string;
44
+ toolbarFontFamilyList?: string;
45
+ toolbarFontFamilyItem?: string;
46
+ toolbarFontFamilyItemActive?: string;
47
+ toolbarFontSizeControl?: string;
48
+ toolbarFontSizeControlActive?: string;
49
+ toolbarFontSizeIcon?: string;
50
+ toolbarFontSizeInput?: string;
51
+ toolbarFontSizeUnit?: string;
52
+ toolbarFontSizeStepButton?: string;
53
+ toolbarFontSizeResetButton?: string;
54
+ toolbarLinkButton?: string;
55
+ toolbarLinkPopoverBody?: string;
56
+ toolbarLinkPopoverLabel?: string;
57
+ toolbarLinkInput?: string;
58
+ toolbarLinkActions?: string;
59
+ toolbarLinkApplyButton?: string;
60
+ toolbarLinkUnlinkButton?: string;
61
+ toolbarHighlightButton?: string;
62
+ toolbarHighlightIndicator?: string;
63
+ toolbarHighlightPopoverBody?: string;
64
+ toolbarHighlightPopoverLabel?: string;
65
+ toolbarHighlightGrid?: string;
66
+ toolbarHighlightSwatch?: string;
67
+ toolbarHighlightSwatchActive?: string;
68
+ toolbarHighlightClearButton?: string;
69
+ tooltipContent?: string;
70
+ tooltipArrow?: string;
71
+ popoverContent?: string;
72
+ dropdownContent?: string;
73
+ dropdownSubContent?: string;
74
+ dropdownSubTrigger?: string;
75
+ dropdownSubTriggerChevron?: string;
76
+ dropdownItem?: string;
77
+ dropdownItemActive?: string;
78
+ dropdownItemIcon?: string;
79
+ dropdownItemLabel?: string;
80
+ dropdownItemCheck?: string;
81
+ dropdownCheckboxItem?: string;
82
+ dropdownRadioItem?: string;
83
+ dropdownIndicator?: string;
84
+ dropdownLabel?: string;
85
+ dropdownSeparator?: string;
86
+ dropdownShortcut?: string;
87
+ slashCommandMenu?: string;
88
+ slashCommandItem?: string;
89
+ slashCommandItemActive?: string;
90
+ slashCommandIcon?: string;
91
+ slashCommandTitle?: string;
92
+ slashCommandEmpty?: string;
93
+ slashCommandEmptyIcon?: string;
94
+ dragHandleRoot?: string;
95
+ dragHandleAddButton?: string;
96
+ dragHandleMenuButton?: string;
97
+ dragHandleMenuContent?: string;
98
+ dragHandleSubContent?: string;
99
+ dragHandleColorSectionLabel?: string;
100
+ dragHandleColorTextPreview?: string;
101
+ dragHandleColorSwatch?: string;
102
+ dragHandleCheckIcon?: string;
103
+ dragHandleDeleteItem?: string;
104
+ imageNodeWrapper?: string;
105
+ imageContainer?: string;
106
+ imageCropArea?: string;
107
+ imageCropToolbar?: string;
108
+ imageCropButton?: string;
109
+ imageCropCancelButton?: string;
110
+ imageCropApplyButton?: string;
111
+ imageFrame?: string;
112
+ imageElement?: string;
113
+ imageLoadingOverlay?: string;
114
+ imageLoadingBox?: string;
115
+ imageLoadingIcon?: string;
116
+ imagePanHintOverlay?: string;
117
+ imagePanHint?: string;
118
+ imageToolbar?: string;
119
+ imageToolbarButton?: string;
120
+ imageToolbarSeparator?: string;
121
+ imageDeleteButton?: string;
122
+ imageAltButton?: string;
123
+ imageAltPopover?: string;
124
+ imageAltLabel?: string;
125
+ imageAltInput?: string;
126
+ imageAltActions?: string;
127
+ imageAltApplyButton?: string;
128
+ imageAltClearButton?: string;
129
+ imageResizeHandle?: string;
130
+ imageResizeHandleRight?: string;
131
+ imageResizeHandleBottom?: string;
132
+ imageResizeHandleBottomRight?: string;
133
+ imageModeBadge?: string;
134
+ imageModeText?: string;
135
+ }
136
+ //# sourceMappingURL=classNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classNames.d.ts","sourceRoot":"","sources":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AM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1,22 @@
1
+ import { Node } from "@tiptap/core";
2
+ export interface AdvancedImageOptions {
3
+ inline: boolean;
4
+ allowBase64: boolean;
5
+ HTMLAttributes: Record<string, any>;
6
+ }
7
+ declare module "@tiptap/core" {
8
+ interface Commands<ReturnType> {
9
+ image: {
10
+ /**
11
+ * Add an advanced image (registered as 'image' node for markdown compat)
12
+ */
13
+ setAdvancedImage: (options: {
14
+ src: string;
15
+ alt?: string;
16
+ title?: string;
17
+ }) => ReturnType;
18
+ };
19
+ }
20
+ }
21
+ export declare const AdvancedImage: Node<AdvancedImageOptions, any>;
22
+ //# sourceMappingURL=AdvancedImage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdvancedImage.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/extensions/AdvancedImage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,cAAc,CAAC;AA0BrD,MAAM,WAAW,oBAAoB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACvC;AAED,OAAO,QAAQ,cAAc,CAAC;IAC1B,UAAU,QAAQ,CAAC,UAAU;QACzB,KAAK,EAAE;YACH;;eAEG;YACH,gBAAgB,EAAE,CAAC,OAAO,EAAE;gBACxB,GAAG,EAAE,MAAM,CAAC;gBACZ,GAAG,CAAC,EAAE,MAAM,CAAC;gBACb,KAAK,CAAC,EAAE,MAAM,CAAC;aAClB,KAAK,UAAU,CAAC;SACpB,CAAC;KACL;CACJ;AAED,eAAO,MAAM,aAAa,iCAuGxB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Extension } from "@tiptap/core";
2
+ export interface FontFamilyOptions {
3
+ types: string[];
4
+ }
5
+ declare module "@tiptap/core" {
6
+ interface Commands<ReturnType> {
7
+ fontFamily: {
8
+ setFontFamily: (fontFamily: string) => ReturnType;
9
+ unsetFontFamily: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const FontFamily: Extension<FontFamilyOptions, any>;
14
+ //# sourceMappingURL=FontFamily.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontFamily.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/extensions/FontFamily.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,OAAO,QAAQ,cAAc,CAAC;IAC7B,UAAU,QAAQ,CAAC,UAAU;QAC5B,UAAU,EAAE;YACX,aAAa,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,UAAU,CAAC;YAClD,eAAe,EAAE,MAAM,UAAU,CAAC;SAClC,CAAC;KACF;CACD;AAED,eAAO,MAAM,UAAU,mCAgDrB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Extension } from "@tiptap/core";
2
+ export interface FontSizeOptions {
3
+ types: string[];
4
+ }
5
+ declare module "@tiptap/core" {
6
+ interface Commands<ReturnType> {
7
+ fontSize: {
8
+ setFontSize: (fontSize: string) => ReturnType;
9
+ unsetFontSize: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const FontSize: Extension<FontSizeOptions, any>;
14
+ //# sourceMappingURL=FontSize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontSize.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/extensions/FontSize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,MAAM,EAAE,CAAC;CAChB;AAWD,OAAO,QAAQ,cAAc,CAAC;IAC7B,UAAU,QAAQ,CAAC,UAAU;QAC5B,QAAQ,EAAE;YACT,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,UAAU,CAAC;YAC9C,aAAa,EAAE,MAAM,UAAU,CAAC;SAChC,CAAC;KACF;CACD;AAED,eAAO,MAAM,QAAQ,iCAmDnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const ImageNodeView: (props: any) => import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=ImageNodeView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageNodeView.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/extensions/ImageNodeView.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,aAAa,UAAW,GAAG,4CAooBvC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * TextStyleAttributes — extends the base TextStyle mark with additional
3
+ * CSS attributes needed by the paragraph style system:
4
+ * fontWeight, fontStyle, letterSpacing, lineHeight, textTransform.
5
+ *
6
+ * This uses the same `addGlobalAttributes` pattern as FontSize / FontFamily.
7
+ */
8
+ import { Extension } from "@tiptap/core";
9
+ export declare const TextStyleAttributes: Extension<any, any>;
10
+ //# sourceMappingURL=TextStyleAttributes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextStyleAttributes.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/extensions/TextStyleAttributes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,mBAAmB,qBA0C9B,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { Node } from "@tiptap/core";
2
+ export interface VideoOptions {
3
+ allowBase64: boolean;
4
+ HTMLAttributes: Record<string, any>;
5
+ }
6
+ declare module "@tiptap/core" {
7
+ interface Commands<ReturnType> {
8
+ video: {
9
+ /**
10
+ * Add a video
11
+ */
12
+ setVideo: (options: {
13
+ src: string;
14
+ alt?: string;
15
+ title?: string;
16
+ }) => ReturnType;
17
+ };
18
+ }
19
+ }
20
+ export declare const Video: Node<VideoOptions, any>;
21
+ //# sourceMappingURL=Video.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Video.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/extensions/Video.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,cAAc,CAAC;AAWrD,MAAM,WAAW,YAAY;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC;AAED,OAAO,QAAQ,cAAc,CAAC;IAC7B,UAAU,QAAQ,CAAC,UAAU;QAC5B,KAAK,EAAE;YACN;;eAEG;YACH,QAAQ,EAAE,CAAC,OAAO,EAAE;gBACnB,GAAG,EAAE,MAAM,CAAC;gBACZ,GAAG,CAAC,EAAE,MAAM,CAAC;gBACb,KAAK,CAAC,EAAE,MAAM,CAAC;aACf,KAAK,UAAU,CAAC;SACjB,CAAC;KACF;CACD;AAED,eAAO,MAAM,KAAK,yBA8GhB,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Paragraph Style system — Word-like named text styles.
3
+ *
4
+ * Each style bundles a block type (paragraph / heading level) with
5
+ * optional inline typography overrides (font, size, weight, colour, etc.).
6
+ *
7
+ * Pass a `styles` array to the <Editor> prop to customise or extend the list.
8
+ * Styles are applied with a single click from the Style picker in the toolbar.
9
+ */
10
+ export interface ParagraphStyle {
11
+ /** Unique identifier — used to detect the "active" style. */
12
+ id: string;
13
+ /** Human-readable label shown in the dropdown. */
14
+ label: string;
15
+ /**
16
+ * Short preview string rendered *in the style's own typography* inside
17
+ * the dropdown row. Falls back to `label` if omitted.
18
+ */
19
+ preview?: string;
20
+ /** Block node to use. Default: "paragraph". */
21
+ type?: "paragraph" | "heading" | "blockquote";
22
+ /** Heading level (1–5). Only meaningful when `type === "heading"`. */
23
+ level?: 1 | 2 | 3 | 4 | 5;
24
+ /** Font family name, e.g. "Inter" or "Georgia, serif". */
25
+ fontFamily?: string;
26
+ /** Font size with unit, e.g. "24px" or "1.5rem". */
27
+ fontSize?: string;
28
+ /** CSS font-weight value, e.g. "700" or "bold". */
29
+ fontWeight?: string;
30
+ /** "normal" | "italic". */
31
+ fontStyle?: "normal" | "italic";
32
+ /** Text colour as a hex or CSS colour string. */
33
+ color?: string;
34
+ /** CSS letter-spacing value. */
35
+ letterSpacing?: string;
36
+ /** CSS line-height value. */
37
+ lineHeight?: string;
38
+ /** CSS text-transform value. */
39
+ textTransform?: "none" | "uppercase" | "capitalize" | "lowercase";
40
+ }
41
+ export declare const DEFAULT_PARAGRAPH_STYLES: ParagraphStyle[];
42
+ //# sourceMappingURL=paragraphStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paragraphStyles.d.ts","sourceRoot":"","sources":["../../../src/components/editor/paragraphStyles.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,cAAc;IAC9B,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC;IAEX,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAIjB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,YAAY,CAAC;IAE9C,sEAAsE;IACtE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAI1B,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAEhC,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,gCAAgC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,gCAAgC;IAChC,aAAa,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,CAAC;CAClE;AAID,eAAO,MAAM,wBAAwB,EAAE,cAAc,EAwEpD,CAAC"}
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ import type { Editor } from "@tiptap/core";
3
+ import type { LucideIcon } from "lucide-react";
4
+ import type { EditorClassNames } from "../classNames";
5
+ export type SlashItem = {
6
+ title: string;
7
+ icon: LucideIcon;
8
+ command: (params: {
9
+ editor: Editor;
10
+ range: {
11
+ from: number;
12
+ to: number;
13
+ };
14
+ }) => void;
15
+ };
16
+ type CommandsListProps = {
17
+ items: SlashItem[];
18
+ command: (item: SlashItem) => void;
19
+ classNames?: EditorClassNames;
20
+ noResults?: string;
21
+ };
22
+ export type CommandsListHandle = {
23
+ onKeyDown: (event: KeyboardEvent) => boolean;
24
+ };
25
+ declare const CommandsList: React.ForwardRefExoticComponent<CommandsListProps & React.RefAttributes<CommandsListHandle>>;
26
+ export default CommandsList;
27
+ //# sourceMappingURL=commands-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands-list.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/slash-command/commands-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,MAAM,SAAS,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,CAAC,MAAM,EAAE;QACd,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;KACvC,KAAK,IAAI,CAAC;CACd,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACrB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC7B,SAAS,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC;CAChD,CAAC;AAEF,QAAA,MAAM,YAAY,8FAsHjB,CAAC;AAIF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Extension } from "@tiptap/core";
2
+ import { type ImagePickerFileResult, type ImagePickerHandler, type ImagePickerContext, type SlashImageFallback } from "./suggestion";
3
+ import { type EditorTranslations } from "../translations";
4
+ import type { EditorClassNames } from "../classNames";
5
+ export type SlashCommandsOptions = {
6
+ onRequestImage: ImagePickerHandler | null;
7
+ onInsertLocalImageFile: ((context: ImagePickerContext & Omit<ImagePickerFileResult, "kind">) => void | Promise<void>) | null;
8
+ enableImages: boolean;
9
+ imageSlashFallback: SlashImageFallback;
10
+ translations?: EditorTranslations;
11
+ classNames?: EditorClassNames;
12
+ };
13
+ declare const SlashCommands: Extension<SlashCommandsOptions, any>;
14
+ export default SlashCommands;
15
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/slash-command/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAyB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,MAAM,oBAAoB,GAAG;IAClC,cAAc,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC1C,sBAAsB,EACnB,CAAC,CACD,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,KAC5D,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAC1B,IAAI,CAAC;IACR,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF,QAAA,MAAM,aAAa,sCAiCjB,CAAC;AAEH,eAAe,aAAa,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { Editor } from "@tiptap/core";
2
+ import type { SuggestionOptions as TiptapSuggestionOptions } from "@tiptap/suggestion";
3
+ import { type EditorTranslations } from "../translations";
4
+ import type { EditorClassNames } from "../classNames";
5
+ export type ImagePickerUrlResult = {
6
+ kind: "url";
7
+ src: string;
8
+ alt?: string;
9
+ title?: string;
10
+ };
11
+ export type ImagePickerFileResult = {
12
+ kind: "file";
13
+ file: File;
14
+ alt?: string;
15
+ title?: string;
16
+ };
17
+ export type ImagePickerResult = ImagePickerUrlResult | ImagePickerFileResult;
18
+ export type ImagePickerContext = {
19
+ editor: Editor;
20
+ range: {
21
+ from: number;
22
+ to: number;
23
+ };
24
+ };
25
+ export type ImagePickerHandler = (context: ImagePickerContext) => ImagePickerResult | null | Promise<ImagePickerResult | null>;
26
+ export type SlashImageFallback = "prompt-url" | "none";
27
+ export type SuggestionOptions = {
28
+ onRequestImage?: ImagePickerHandler | null;
29
+ onInsertLocalImageFile?: ((context: ImagePickerContext & Omit<ImagePickerFileResult, "kind">) => void | Promise<void>) | null;
30
+ enableImages?: boolean;
31
+ imageSlashFallback?: SlashImageFallback;
32
+ translations?: EditorTranslations;
33
+ classNames?: EditorClassNames;
34
+ };
35
+ type SlashSuggestion = Pick<TiptapSuggestionOptions, "items" | "render">;
36
+ declare const createSuggestion: (options?: SuggestionOptions) => SlashSuggestion;
37
+ export default createSuggestion;
38
+ //# sourceMappingURL=suggestion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/slash-command/suggestion.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAkB3C,OAAO,KAAK,EAAE,iBAAiB,IAAI,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,MAAM,MAAM,oBAAoB,GAAG;IAC/B,IAAI,EAAE,KAAK,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,GAAG,qBAAqB,CAAC;AAE7E,MAAM,MAAM,kBAAkB,GAAG;IAC7B,MAA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