@oyat/editor 1.7.10 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/components/editor/editor-base-kit.d.ts +300 -1
  2. package/dist/components/editor/editor-base-kit.d.ts.map +1 -1
  3. package/dist/components/editor/editor-kit.d.ts +632 -1
  4. package/dist/components/editor/editor-kit.d.ts.map +1 -1
  5. package/dist/components/editor/plate-editor.d.ts +6 -1
  6. package/dist/components/editor/plate-editor.d.ts.map +1 -1
  7. package/dist/components/editor/plugins/align-base-kit.d.ts +1 -1
  8. package/dist/components/editor/plugins/align-base-kit.d.ts.map +1 -1
  9. package/dist/components/editor/plugins/align-kit.d.ts +1 -1
  10. package/dist/components/editor/plugins/align-kit.d.ts.map +1 -1
  11. package/dist/components/editor/plugins/autoformat-kit.d.ts +1 -1
  12. package/dist/components/editor/plugins/autoformat-kit.d.ts.map +1 -1
  13. package/dist/components/editor/plugins/block-menu-kit.d.ts +165 -1
  14. package/dist/components/editor/plugins/block-menu-kit.d.ts.map +1 -1
  15. package/dist/components/editor/plugins/block-selection-kit.d.ts +137 -1
  16. package/dist/components/editor/plugins/block-selection-kit.d.ts.map +1 -1
  17. package/dist/components/editor/plugins/cursor-overlay-kit.d.ts +11 -1
  18. package/dist/components/editor/plugins/cursor-overlay-kit.d.ts.map +1 -1
  19. package/dist/components/editor/plugins/dnd-kit.d.ts.map +1 -1
  20. package/dist/components/editor/plugins/editor-media-dataurl-paste-kit.d.ts +6 -0
  21. package/dist/components/editor/plugins/editor-media-dataurl-paste-kit.d.ts.map +1 -0
  22. package/dist/components/editor/plugins/emoji-kit.d.ts +1 -1
  23. package/dist/components/editor/plugins/line-height-base-kit.d.ts +1 -1
  24. package/dist/components/editor/plugins/line-height-base-kit.d.ts.map +1 -1
  25. package/dist/components/editor/plugins/line-height-kit.d.ts +1 -1
  26. package/dist/components/editor/plugins/line-height-kit.d.ts.map +1 -1
  27. package/dist/components/editor/plugins/media-kit.d.ts.map +1 -1
  28. package/dist/components/editor/plugins/table-base-kit.d.ts +94 -1
  29. package/dist/components/editor/plugins/table-base-kit.d.ts.map +1 -1
  30. package/dist/components/editor/plugins/table-kit.d.ts +162 -1
  31. package/dist/components/editor/plugins/table-kit.d.ts.map +1 -1
  32. package/dist/components/editor/plugins/toggle-kit.d.ts +1 -1
  33. package/dist/components/editor/plugins/toggle-kit.d.ts.map +1 -1
  34. package/dist/components/ui/block-context-menu.d.ts.map +1 -1
  35. package/dist/components/ui/block-suggestion.d.ts.map +1 -1
  36. package/dist/components/ui/caption.d.ts +21 -1
  37. package/dist/components/ui/caption.d.ts.map +1 -1
  38. package/dist/components/ui/comment.d.ts.map +1 -1
  39. package/dist/contexts/editor-media-upload-context.d.ts +22 -0
  40. package/dist/contexts/editor-media-upload-context.d.ts.map +1 -0
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +845 -843
  44. package/dist/index.js.map +1 -1
  45. package/package.json +44 -44
@@ -1,2 +1,163 @@
1
- export declare const TableKit: any[];
1
+ export declare const TableKit: (import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"table", {
2
+ _cellIndices: Record<string, {
3
+ col: number;
4
+ row: number;
5
+ }>;
6
+ _selectedCellIds: string[] | null | undefined;
7
+ _selectedTableIds: string[] | null | undefined;
8
+ _selectionVersion: number;
9
+ selectedCells: import('platejs').TElement[] | null;
10
+ selectedTables: import('platejs').TElement[] | null;
11
+ disableExpandOnInsert?: boolean;
12
+ disableMarginLeft?: boolean;
13
+ disableMerge?: boolean;
14
+ enableUnsetSingleColSize?: boolean;
15
+ initialTableWidth?: number;
16
+ minColumnWidth?: number;
17
+ }, {
18
+ create: {
19
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import('@platejs/table').GetEmptyTableNodeOptions) => import('platejs').TTableElement>;
20
+ tableCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { children, header, row }?: import('@platejs/table').CreateCellOptions) => {
21
+ children: import('platejs').Descendant[];
22
+ type: string;
23
+ }>;
24
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, ...cellOptions }?: import('@platejs/table').GetEmptyRowNodeOptions) => {
25
+ children: {
26
+ children: import('platejs').Descendant[];
27
+ type: string;
28
+ }[];
29
+ type: string;
30
+ }>;
31
+ };
32
+ table: {
33
+ getCellBorders: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { cellIndices, defaultBorder, element }: {
34
+ element: import('platejs').TTableCellElement;
35
+ cellIndices?: import('@platejs/table').CellIndices;
36
+ defaultBorder?: import('platejs').TTableCellBorder;
37
+ }) => import('@platejs/table').BorderStylesDefault>;
38
+ getCellSize: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { cellIndices, colSizes, element, rowSize }: {
39
+ element: import('platejs').TTableCellElement;
40
+ cellIndices?: import('@platejs/table').CellIndices;
41
+ colSizes?: number[];
42
+ rowSize?: number;
43
+ }) => {
44
+ minHeight: number;
45
+ width: number;
46
+ }>;
47
+ getSelectedCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, id?: string | null) => import('platejs').TElement | null>;
48
+ getSelectedCellIds: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => string[] | null>;
49
+ getSelectedCells: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => import('platejs').TElement[] | null>;
50
+ getSelectedTableIds: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => string[] | null>;
51
+ getSelectedTables: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => import('platejs').TElement[] | null>;
52
+ getColSpan: (cellElem: import('platejs').TTableCellElement) => number;
53
+ getRowSpan: (cellElem: import('platejs').TTableCellElement) => number;
54
+ getCellChildren: (cell: import('platejs').TTableCellElement) => import('platejs').Descendant[];
55
+ isCellSelected: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, id?: string | null) => boolean>;
56
+ isSelectingCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => boolean>;
57
+ };
58
+ } & {
59
+ create: {
60
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import('@platejs/table').GetEmptyTableNodeOptions) => import('platejs').TTableElement>;
61
+ tableCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { children, header, row }?: import('@platejs/table').CreateCellOptions) => {
62
+ children: import('platejs').Descendant[];
63
+ type: string;
64
+ }>;
65
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, ...cellOptions }?: import('@platejs/table').GetEmptyRowNodeOptions) => {
66
+ children: {
67
+ children: import('platejs').Descendant[];
68
+ type: string;
69
+ }[];
70
+ type: string;
71
+ }>;
72
+ };
73
+ table: {
74
+ getCellBorders: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { cellIndices, defaultBorder, element }: {
75
+ element: import('platejs').TTableCellElement;
76
+ cellIndices?: import('@platejs/table').CellIndices;
77
+ defaultBorder?: import('platejs').TTableCellBorder;
78
+ }) => import('@platejs/table').BorderStylesDefault>;
79
+ getCellSize: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { cellIndices, colSizes, element, rowSize }: {
80
+ element: import('platejs').TTableCellElement;
81
+ cellIndices?: import('@platejs/table').CellIndices;
82
+ colSizes?: number[];
83
+ rowSize?: number;
84
+ }) => {
85
+ minHeight: number;
86
+ width: number;
87
+ }>;
88
+ getSelectedCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, id?: string | null) => import('platejs').TElement | null>;
89
+ getSelectedCellIds: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => string[] | null>;
90
+ getSelectedCells: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => import('platejs').TElement[] | null>;
91
+ getSelectedTableIds: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => string[] | null>;
92
+ getSelectedTables: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => import('platejs').TElement[] | null>;
93
+ getColSpan: (cellElem: import('platejs').TTableCellElement) => number;
94
+ getRowSpan: (cellElem: import('platejs').TTableCellElement) => number;
95
+ getCellChildren: (cell: import('platejs').TTableCellElement) => import('platejs').Descendant[];
96
+ isCellSelected: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, id?: string | null) => boolean>;
97
+ isSelectingCell: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => boolean>;
98
+ };
99
+ }, {
100
+ insert: {
101
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, header, rowCount }?: import('@platejs/table').GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import('platejs').InsertNodesOptions) => void>;
102
+ tableColumn: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, options?: {
103
+ at?: import('platejs').Path;
104
+ before?: boolean;
105
+ fromCell?: import('platejs').Path;
106
+ header?: boolean;
107
+ select?: boolean;
108
+ }) => void>;
109
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, options?: {
110
+ at?: import('platejs').Path;
111
+ before?: boolean;
112
+ fromRow?: import('platejs').Path;
113
+ header?: boolean;
114
+ select?: boolean;
115
+ }) => void>;
116
+ };
117
+ remove: {
118
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
119
+ tableColumn: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
120
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
121
+ };
122
+ table: {
123
+ merge: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
124
+ split: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
125
+ };
126
+ } & {
127
+ insert: {
128
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, { colCount, header, rowCount }?: import('@platejs/table').GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import('platejs').InsertNodesOptions) => void>;
129
+ tableColumn: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, options?: {
130
+ at?: import('platejs').Path;
131
+ before?: boolean;
132
+ fromCell?: import('platejs').Path;
133
+ header?: boolean;
134
+ select?: boolean;
135
+ }) => void>;
136
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor, options?: {
137
+ at?: import('platejs').Path;
138
+ before?: boolean;
139
+ fromRow?: import('platejs').Path;
140
+ header?: boolean;
141
+ select?: boolean;
142
+ }) => void>;
143
+ };
144
+ remove: {
145
+ table: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
146
+ tableColumn: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
147
+ tableRow: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
148
+ };
149
+ table: {
150
+ merge: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
151
+ split: import('platejs').OmitFirst<(editor: import('platejs').SlateEditor) => void>;
152
+ };
153
+ }, {
154
+ cellIndices?: (id: string) => import('@platejs/table').CellIndices;
155
+ isCellSelected?: (id?: string | null) => boolean;
156
+ isSelectingCell?: () => boolean;
157
+ selectedCell?: (id?: string | null) => import('platejs').TElement | null;
158
+ selectedCellIds?: () => string[] | null;
159
+ selectedCells?: () => import('platejs').TElement[] | null;
160
+ selectedTableIds?: () => string[] | null;
161
+ selectedTables?: () => import('platejs').TElement[] | null;
162
+ }>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"tr", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"td", {}, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"th", {}, {}, {}, {}>>)[];
2
163
  //# sourceMappingURL=table-kit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-kit.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/plugins/table-kit.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,QAAQ,OAKpB,CAAC"}
1
+ {"version":3,"file":"table-kit.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/plugins/table-kit.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAM62T,CAAC;yBAA8B,CAAC;;;;uBAAyT,CAAC;oBAAyB,CAAC;mBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA1Y,CAAC;yBAA8B,CAAC;;;;uBAAyT,CAAC;oBAAyB,CAAC;mBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;cAA43G,CAAC;kBAAsF,CAAC;oBAA0E,CAAC;kBAAgB,CAAC;kBAAmB,CAAC;;;cAA8S,CAAC;kBAAgF,CAAC;mBAAoB,CAAC;kBAAgB,CAAC;kBAAmB,CAAC;;;;;;;;;;;;;;;;cAAloB,CAAC;kBAAsF,CAAC;oBAA0E,CAAC;kBAAgB,CAAC;kBAAmB,CAAC;;;cAA8S,CAAC;kBAAgF,CAAC;mBAAoB,CAAC;kBAAgB,CAAC;kBAAmB,CAAC;;;;;;;;;;;;;;wBAA99T,CAAC;;sBAAoF,CAAC;;;;;0RADj4I,CAAC"}
@@ -5,7 +5,7 @@ export declare const ToggleKit: (import('platejs/react').PlatePlugin<import('pla
5
5
  }, {}, {}, {}>> | import('platejs/react').PlatePlugin<import('platejs').PluginConfig<"toggle", {
6
6
  openIds?: Set<string>;
7
7
  } & {
8
- toggleIndex?: ReturnType<(elements: import('platejs').Value) => Map<string, string[]>>;
8
+ toggleIndex?: ReturnType<(elements: any[]) => Map<string, string[]>>;
9
9
  }, {
10
10
  toggle: {
11
11
  toggleIds: (ids: string[], force?: boolean | null) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-kit.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/plugins/toggle-kit.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS;;;;;;;;;;wCAIi3B,CAAC;;;;;MADv4B,CAAC"}
1
+ {"version":3,"file":"toggle-kit.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/plugins/toggle-kit.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS;;;;;;;;;;wCAIs2B,CAAC;;;;;MAD53B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"block-context-menu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/block-context-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyB/B,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,yTAqL3E"}
1
+ {"version":3,"file":"block-context-menu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/block-context-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA6B/B,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,yTA8K3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"block-suggestion.d.ts","sourceRoot":"","sources":["../../../src/components/ui/block-suggestion.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAU/D,OAAO,EACL,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,eAAe,EAKrB,MAAM,SAAS,CAAC;AAKjB,OAAO,EACL,KAAK,WAAW,EAEjB,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EACL,KAAK,QAAQ,EAId,MAAM,WAAW,CAAC;AAEnB,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,QAAQ,EAAE,QAAQ,EAAE,CAAC;CACtB;AAqCD,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,MAAM,EACN,UAAU,GACX,EAAE;IACD,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,kBAAkB,CAAC;CAChC,2CAkLA;AAED,eAAO,MAAM,oBAAoB,GAC/B,iBAAiB,SAAS,CAAC,QAAQ,GAAG,eAAe,CAAC,EAAE,EACxD,WAAW,IAAI,yBA8NhB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,YAAY,kBAAkB,GAAG,WAAW,KAC3C,UAAU,IAAI,kBAAkD,CAAC"}
1
+ {"version":3,"file":"block-suggestion.d.ts","sourceRoot":"","sources":["../../../src/components/ui/block-suggestion.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAU/D,OAAO,EACL,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,eAAe,EAKrB,MAAM,SAAS,CAAC;AAKjB,OAAO,EACL,KAAK,WAAW,EAEjB,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EACL,KAAK,QAAQ,EAId,MAAM,WAAW,CAAC;AAEnB,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,QAAQ,EAAE,QAAQ,EAAE,CAAC;CACtB;AAqCD,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,MAAM,EACN,UAAU,GACX,EAAE;IACD,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,kBAAkB,CAAC;CAChC,2CAmLA;AAED,eAAO,MAAM,oBAAoB,GAC/B,iBAAiB,SAAS,CAAC,QAAQ,GAAG,eAAe,CAAC,EAAE,EACxD,WAAW,IAAI,yBA8NhB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,YAAY,kBAAkB,GAAG,WAAW,KAC3C,UAAU,IAAI,kBAAkD,CAAC"}
@@ -6,6 +6,26 @@ declare const captionVariants: (props?: ({
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export declare function Caption({ align, className, ...props }: React.ComponentProps<typeof CaptionPrimitive> & VariantProps<typeof captionVariants>): import("react/jsx-runtime").JSX.Element;
8
8
  export declare function CaptionTextarea(props: React.ComponentProps<typeof CaptionTextareaPrimitive>): import("react/jsx-runtime").JSX.Element;
9
- export declare const CaptionButton: any;
9
+ export declare const CaptionButton: React.ForwardRefExoticComponent<{
10
+ as?: React.ElementType;
11
+ asChild?: boolean;
12
+ className?: string;
13
+ options?: undefined;
14
+ state?: any;
15
+ style?: React.CSSProperties;
16
+ setProps?: ((hookProps: {
17
+ onClick: () => void;
18
+ }) => Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<(props?: ({
19
+ variant?: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost" | null | undefined;
20
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
21
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string> & {
22
+ asChild?: boolean;
23
+ }, "ref">) | undefined;
24
+ } & Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<(props?: ({
25
+ variant?: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost" | null | undefined;
26
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
27
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string> & {
28
+ asChild?: boolean;
29
+ }, "ref"> & React.RefAttributes<any>>;
10
30
  export {};
11
31
  //# sourceMappingURL=caption.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"caption.d.ts","sourceRoot":"","sources":["../../../src/components/ui/caption.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EACL,OAAO,IAAI,gBAAgB,EAC3B,eAAe,IAAI,wBAAwB,EAG5C,MAAM,wBAAwB,CAAC;AAOhC,QAAA,MAAM,eAAe;;8EAWnB,CAAC;AAEH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,GAC9C,YAAY,CAAC,OAAO,eAAe,CAAC,2CAOrC;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,2CAa7D;AAGD,eAAO,MAAM,aAAa,EAAE,GAG1B,CAAC"}
1
+ {"version":3,"file":"caption.d.ts","sourceRoot":"","sources":["../../../src/components/ui/caption.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EACL,OAAO,IAAI,gBAAgB,EAC3B,eAAe,IAAI,wBAAwB,EAG5C,MAAM,wBAAwB,CAAC;AAOhC,QAAA,MAAM,eAAe;;8EAWnB,CAAC;AAEH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,GAC9C,YAAY,CAAC,OAAO,eAAe,CAAC,2CAOrC;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,2CAa7D;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;qCAGxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../src/components/ui/comment.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoB/B,OAAO,EAGL,KAAK,KAAK,EAIX,MAAM,SAAS,CAAC;AA4BjB,M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,EAAE,IAAI,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAC7B,OAAO,EAAE,QAAQ,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IAClE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B,2CA+NA;AAuHD,wBAAgB,iBAAiB,CAAC,EAChC,SAAiB,EACjB,SAAS,EACT,YAAY,EAAE,gBAAgB,EAC9B,YAAoB,GACrB,EAAE;IACD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,2CA+LA;AAED,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,WAiB3C,CAAC"}
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ /** Result shape aligned with UploadThing / Plate placeholder expectations */
3
+ export interface EditorMediaUploadResult {
4
+ url: string;
5
+ key?: string;
6
+ name: string;
7
+ size: number;
8
+ type: string;
9
+ }
10
+ export type EditorMediaUploadFn = (file: File, options: {
11
+ onProgress?: (percent: number) => void;
12
+ }) => Promise<EditorMediaUploadResult>;
13
+ export interface EditorMediaUploadContextValue {
14
+ uploadEditorMedia?: EditorMediaUploadFn;
15
+ }
16
+ export declare const EditorMediaUploadContext: React.Context<EditorMediaUploadContextValue>;
17
+ export declare function EditorMediaUploadProvider({ children, uploadEditorMedia, }: {
18
+ children: React.ReactNode;
19
+ uploadEditorMedia?: EditorMediaUploadFn;
20
+ }): import("react/jsx-runtime").JSX.Element;
21
+ export declare function useEditorMediaUploadContext(): EditorMediaUploadContextValue;
22
+ //# sourceMappingURL=editor-media-upload-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-media-upload-context.d.ts","sourceRoot":"","sources":["../../src/contexts/editor-media-upload-context.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,6EAA6E;AAC7E,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,mBAAmB,GAAG,CAChC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;IAAE,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,KAChD,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAEtC,MAAM,WAAW,6BAA6B;IAC5C,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;CACzC;AAED,eAAO,MAAM,wBAAwB,8CACmB,CAAC;AAEzD,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACR,iBAAiB,GAClB,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;CACzC,2CAUA;AAED,wBAAgB,2BAA2B,IAAI,6BAA6B,CAE3E"}
package/dist/index.d.ts CHANGED
@@ -41,6 +41,7 @@ export { TocKit } from './components/editor/plugins/toc-kit';
41
41
  export { ToggleKit } from './components/editor/plugins/toggle-kit';
42
42
  export { TooltipProvider } from './components/ui/tooltip';
43
43
  export type { MediaPickerApi, MediaPickerRenderProp, } from './contexts/media-picker-context';
44
+ export type { EditorMediaUploadFn, EditorMediaUploadResult, } from './contexts/editor-media-upload-context';
44
45
  export type { TDiscussion } from './components/editor/plugins/discussion-kit';
45
46
  export { parseUserId } from './lib/user-id';
46
47
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,YAAY,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG/D,YAAY,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG5D,OAAO,EACL,KAAK,EACL,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,KAAK,cAAc,GACpB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,WAAW,EACX,0BAA0B,EAC1B,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8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