@lofcz/platejs-caption 52.0.11 → 52.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BaseCaptionPlugin-jZ8QfZJZ.js +1 -2
- package/dist/index.d.ts +15 -3
- package/dist/react/index.d.ts +60 -13
- package/dist/react/index.js +1 -2
- package/package.json +3 -2
- package/dist/BaseCaptionPlugin-jZ8QfZJZ.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/index.js.map +0 -1
|
@@ -66,5 +66,4 @@ const BaseCaptionPlugin = createTSlatePlugin({
|
|
|
66
66
|
}).extendSelectors(({ getOptions }) => ({ isVisible: (elementId) => getOptions().visibleId === elementId })).overrideEditor(withCaption);
|
|
67
67
|
|
|
68
68
|
//#endregion
|
|
69
|
-
export { withCaption as n, BaseCaptionPlugin as t };
|
|
70
|
-
//# sourceMappingURL=BaseCaptionPlugin-jZ8QfZJZ.js.map
|
|
69
|
+
export { withCaption as n, BaseCaptionPlugin as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as platejs2 from "platejs";
|
|
1
2
|
import { OverrideEditor, Path, PluginConfig } from "platejs";
|
|
2
3
|
|
|
3
4
|
//#region src/lib/BaseCaptionPlugin.d.ts
|
|
@@ -15,7 +16,19 @@ type CaptionConfig = PluginConfig<'caption', {
|
|
|
15
16
|
isVisible?: (elementId: string) => boolean;
|
|
16
17
|
}>;
|
|
17
18
|
/** Enables support for caption. */
|
|
18
|
-
declare const BaseCaptionPlugin:
|
|
19
|
+
declare const BaseCaptionPlugin: platejs2.SlatePlugin<PluginConfig<"caption", {
|
|
20
|
+
/** When defined, focus end of caption textarea with the same path. */
|
|
21
|
+
focusEndPath: Path | null;
|
|
22
|
+
/** When defined, focus start of caption textarea with the same path. */
|
|
23
|
+
focusStartPath: Path | null;
|
|
24
|
+
query: {
|
|
25
|
+
/** Plugin keys to enable caption. */
|
|
26
|
+
allow: string[];
|
|
27
|
+
};
|
|
28
|
+
visibleId: string | null;
|
|
29
|
+
}, {}, {}, {
|
|
30
|
+
isVisible?: (elementId: string) => boolean;
|
|
31
|
+
}>>;
|
|
19
32
|
//#endregion
|
|
20
33
|
//#region src/lib/withCaption.d.ts
|
|
21
34
|
/** TODO: tests https://github.com/udecode/editor-protocol/issues/79 */
|
|
@@ -30,5 +43,4 @@ declare const BaseCaptionPlugin: any;
|
|
|
30
43
|
*/
|
|
31
44
|
declare const withCaption: OverrideEditor<CaptionConfig>;
|
|
32
45
|
//#endregion
|
|
33
|
-
export { BaseCaptionPlugin, CaptionConfig, withCaption };
|
|
34
|
-
//# sourceMappingURL=index.d.ts.map
|
|
46
|
+
export { BaseCaptionPlugin, CaptionConfig, withCaption };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as platejs0 from "platejs";
|
|
2
|
+
import { SlateEditor, TCaptionElement, TElement } from "platejs";
|
|
3
|
+
import * as platejs_react0 from "platejs/react";
|
|
2
4
|
import React from "react";
|
|
3
5
|
import { TextareaAutosizeProps } from "react-textarea-autosize";
|
|
4
6
|
|
|
5
7
|
//#region src/react/CaptionPlugin.d.ts
|
|
6
|
-
declare const CaptionPlugin:
|
|
8
|
+
declare const CaptionPlugin: platejs_react0.PlatePlugin<platejs0.PluginConfig<"caption", {
|
|
9
|
+
focusEndPath: platejs0.Path | null;
|
|
10
|
+
focusStartPath: platejs0.Path | null;
|
|
11
|
+
query: {
|
|
12
|
+
allow: string[];
|
|
13
|
+
};
|
|
14
|
+
visibleId: string | null;
|
|
15
|
+
}, {}, {}, {
|
|
16
|
+
isVisible?: (elementId: string) => boolean;
|
|
17
|
+
}>>;
|
|
7
18
|
//#endregion
|
|
8
19
|
//#region src/react/components/Caption.d.ts
|
|
9
20
|
type CaptionOptions = {
|
|
@@ -13,15 +24,28 @@ interface CaptionProps extends React.ComponentPropsWithoutRef<'figcaption'> {
|
|
|
13
24
|
options?: CaptionOptions;
|
|
14
25
|
}
|
|
15
26
|
declare const useCaptionState: (options?: CaptionOptions) => {
|
|
16
|
-
captionString:
|
|
27
|
+
captionString: string;
|
|
17
28
|
hidden: boolean;
|
|
18
|
-
readOnly:
|
|
19
|
-
selected:
|
|
29
|
+
readOnly: boolean;
|
|
30
|
+
selected: boolean;
|
|
20
31
|
};
|
|
21
32
|
declare const useCaption: (state: ReturnType<typeof useCaptionState>) => {
|
|
22
33
|
hidden: boolean;
|
|
23
34
|
};
|
|
24
|
-
declare const Caption:
|
|
35
|
+
declare const Caption: React.ForwardRefExoticComponent<{
|
|
36
|
+
as?: React.ElementType;
|
|
37
|
+
asChild?: boolean;
|
|
38
|
+
className?: string;
|
|
39
|
+
options?: CaptionOptions | undefined;
|
|
40
|
+
state?: {
|
|
41
|
+
captionString: string;
|
|
42
|
+
hidden: boolean;
|
|
43
|
+
readOnly: boolean;
|
|
44
|
+
selected: boolean;
|
|
45
|
+
} | undefined;
|
|
46
|
+
style?: React.CSSProperties;
|
|
47
|
+
setProps?: ((hookProps: {}) => CaptionProps) | undefined;
|
|
48
|
+
} & CaptionProps & React.RefAttributes<any>>;
|
|
25
49
|
//#endregion
|
|
26
50
|
//#region src/react/components/CaptionButton.d.ts
|
|
27
51
|
declare const useCaptionButtonState: () => any;
|
|
@@ -39,8 +63,8 @@ declare const useCaptionButton: ({
|
|
|
39
63
|
declare const useCaptionTextareaFocus: (textareaRef: React.RefObject<HTMLTextAreaElement | null>) => void;
|
|
40
64
|
declare const useCaptionTextareaState: () => {
|
|
41
65
|
captionValue: string | number | readonly string[] | undefined;
|
|
42
|
-
element:
|
|
43
|
-
readOnly:
|
|
66
|
+
element: TCaptionElement;
|
|
67
|
+
readOnly: boolean;
|
|
44
68
|
textareaRef: React.RefObject<HTMLTextAreaElement | null>;
|
|
45
69
|
handleChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
46
70
|
handleCompositionEnd: (e: React.CompositionEvent<HTMLTextAreaElement>) => void;
|
|
@@ -56,7 +80,7 @@ declare const useCaptionTextarea: ({
|
|
|
56
80
|
handleCompositionStart
|
|
57
81
|
}: ReturnType<typeof useCaptionTextareaState>) => {
|
|
58
82
|
props: {
|
|
59
|
-
readOnly:
|
|
83
|
+
readOnly: boolean;
|
|
60
84
|
value: string | number | readonly string[] | undefined;
|
|
61
85
|
onBlur: React.FocusEventHandler<HTMLTextAreaElement>;
|
|
62
86
|
onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
@@ -66,7 +90,31 @@ declare const useCaptionTextarea: ({
|
|
|
66
90
|
};
|
|
67
91
|
ref: React.RefObject<HTMLTextAreaElement | null>;
|
|
68
92
|
};
|
|
69
|
-
declare const CaptionTextarea:
|
|
93
|
+
declare const CaptionTextarea: React.ForwardRefExoticComponent<{
|
|
94
|
+
as?: React.ElementType;
|
|
95
|
+
asChild?: boolean;
|
|
96
|
+
className?: string;
|
|
97
|
+
options?: undefined;
|
|
98
|
+
state?: {
|
|
99
|
+
captionValue: string | number | readonly string[] | undefined;
|
|
100
|
+
element: TCaptionElement;
|
|
101
|
+
readOnly: boolean;
|
|
102
|
+
textareaRef: React.RefObject<HTMLTextAreaElement | null>;
|
|
103
|
+
handleChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
104
|
+
handleCompositionEnd: (e: React.CompositionEvent<HTMLTextAreaElement>) => void;
|
|
105
|
+
handleCompositionStart: () => void;
|
|
106
|
+
} | undefined;
|
|
107
|
+
style?: React.CSSProperties;
|
|
108
|
+
setProps?: ((hookProps: {
|
|
109
|
+
readOnly: boolean;
|
|
110
|
+
value: string | number | readonly string[] | undefined;
|
|
111
|
+
onBlur: React.FocusEventHandler<HTMLTextAreaElement>;
|
|
112
|
+
onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
113
|
+
onCompositionEnd: (e: React.CompositionEvent<HTMLTextAreaElement>) => void;
|
|
114
|
+
onCompositionStart: () => void;
|
|
115
|
+
onKeyDown: React.KeyboardEventHandler<HTMLTextAreaElement>;
|
|
116
|
+
}) => Omit<TextareaAutosizeProps & React.RefAttributes<HTMLTextAreaElement>, "ref">) | undefined;
|
|
117
|
+
} & Omit<TextareaAutosizeProps & React.RefAttributes<HTMLTextAreaElement>, "ref"> & React.RefAttributes<any>>;
|
|
70
118
|
//#endregion
|
|
71
119
|
//#region src/react/components/TextareaAutosize.d.ts
|
|
72
120
|
/**
|
|
@@ -78,10 +126,9 @@ declare const CaptionTextarea: any;
|
|
|
78
126
|
declare const TextareaAutosize: React.ForwardRefExoticComponent<TextareaAutosizeProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
79
127
|
//#endregion
|
|
80
128
|
//#region src/react/hooks/useCaptionString.d.ts
|
|
81
|
-
declare const useCaptionString: () =>
|
|
129
|
+
declare const useCaptionString: () => string;
|
|
82
130
|
//#endregion
|
|
83
131
|
//#region src/react/utils/showCaption.d.ts
|
|
84
132
|
declare const showCaption: (editor: SlateEditor, element: TElement) => void;
|
|
85
133
|
//#endregion
|
|
86
|
-
export { Caption, CaptionOptions, CaptionPlugin, CaptionProps, CaptionTextarea, TextareaAutosize, showCaption, useCaption, useCaptionButton, useCaptionButtonState, useCaptionState, useCaptionString, useCaptionTextarea, useCaptionTextareaFocus, useCaptionTextareaState };
|
|
87
|
-
//# sourceMappingURL=index.d.ts.map
|
|
134
|
+
export { Caption, CaptionOptions, CaptionPlugin, CaptionProps, CaptionTextarea, TextareaAutosize, showCaption, useCaption, useCaptionButton, useCaptionButtonState, useCaptionState, useCaptionString, useCaptionTextarea, useCaptionTextareaFocus, useCaptionTextareaState };
|
package/dist/react/index.js
CHANGED
|
@@ -335,5 +335,4 @@ const showCaption = (editor, element) => {
|
|
|
335
335
|
};
|
|
336
336
|
|
|
337
337
|
//#endregion
|
|
338
|
-
export { Caption, CaptionPlugin, CaptionTextarea, TextareaAutosize, showCaption, useCaption, useCaptionButton, useCaptionButtonState, useCaptionState, useCaptionString, useCaptionTextarea, useCaptionTextareaFocus, useCaptionTextareaState };
|
|
339
|
-
//# sourceMappingURL=index.js.map
|
|
338
|
+
export { Caption, CaptionPlugin, CaptionTextarea, TextareaAutosize, showCaption, useCaption, useCaptionButton, useCaptionButtonState, useCaptionState, useCaptionString, useCaptionTextarea, useCaptionTextareaFocus, useCaptionTextareaState };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lofcz/platejs-caption",
|
|
3
|
-
"version": "52.
|
|
3
|
+
"version": "52.3.6",
|
|
4
4
|
"description": "Primitive components for caption.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plate",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"react-textarea-autosize": "^8.5.9"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@plate/scripts": "1.0.0"
|
|
35
|
+
"@plate/scripts": "1.0.0",
|
|
36
|
+
"platejs": "npm:@lofcz/platejs@52.3.6"
|
|
36
37
|
},
|
|
37
38
|
"peerDependencies": {
|
|
38
39
|
"platejs": ">=52.0.11",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseCaptionPlugin-jZ8QfZJZ.js","names":["OverrideEditor","TRange","getPluginTypes","isHotkey","NodeApi","RangeApi","CaptionConfig","BaseCaptionPlugin","withCaption","editor","getOptions","tf","apply","moveLine","transforms","operation","query","type","newSelection","selection","newProperties","dom","currentKeyboardEvent","isCollapsed","types","allow","entry","api","above","at","match","node","caption","string","children","length","setTimeout","setOption","options","reverse","block","Path","PluginConfig","createTSlatePlugin","KEYS","withCaption","CaptionConfig","focusEndPath","focusStartPath","query","allow","visibleId","isVisible","elementId","BaseCaptionPlugin","key","caption","options","extendSelectors","getOptions","overrideEditor"],"sources":["../src/lib/withCaption.ts","../src/lib/BaseCaptionPlugin.ts"],"sourcesContent":["import {\n type OverrideEditor,\n type TRange,\n getPluginTypes,\n isHotkey,\n NodeApi,\n RangeApi,\n} from 'platejs';\n\nimport { type CaptionConfig, BaseCaptionPlugin } from './BaseCaptionPlugin';\n\n/** TODO: tests https://github.com/udecode/editor-protocol/issues/79 */\n\n/**\n * Selection table:\n *\n * - If anchor is in table, focus in a block before: set focus to start of table\n * - If anchor is in table, focus in a block after: set focus to end of table\n * - If focus is in table, anchor in a block before: set focus to end of table\n * - If focus is in table, anchor in a block after: set focus to the point before\n * start of table\n */\nexport const withCaption: OverrideEditor<CaptionConfig> = ({\n editor,\n getOptions,\n tf: { apply, moveLine },\n}) => {\n return {\n transforms: {\n apply(operation) {\n const { query } = getOptions();\n\n if (operation.type === 'set_selection') {\n const newSelection = {\n ...editor.selection,\n ...operation.newProperties,\n } as TRange | null;\n\n if (\n editor.dom.currentKeyboardEvent &&\n isHotkey('up', editor.dom.currentKeyboardEvent) &&\n newSelection &&\n RangeApi.isCollapsed(newSelection)\n ) {\n const types = getPluginTypes(editor, query.allow);\n\n const entry = editor.api.above({\n at: newSelection,\n match: { type: types },\n });\n\n if (entry) {\n const [node] = entry;\n\n if (\n node.caption &&\n NodeApi.string({ children: node.caption } as any).length > 0\n ) {\n setTimeout(() => {\n editor.setOption(BaseCaptionPlugin, 'focusEndPath', entry[1]);\n }, 0);\n }\n }\n }\n }\n\n apply(operation);\n },\n moveLine: (options) => {\n const apply = () => {\n // focus caption from image on down arrow\n if (!options.reverse) {\n const types = getPluginTypes(editor, getOptions().query.allow);\n\n const entry = editor.api.block({\n match: { type: types },\n });\n\n if (!entry) return;\n\n editor.setOption(BaseCaptionPlugin, 'focusEndPath', entry[1]);\n\n return true;\n }\n };\n\n if (apply()) return true;\n\n return moveLine(options);\n },\n },\n };\n};\n","import {\n type Path,\n type PluginConfig,\n createTSlatePlugin,\n KEYS,\n} from 'platejs';\n\nimport { withCaption } from './withCaption';\n\nexport type CaptionConfig = PluginConfig<\n 'caption',\n {\n /** When defined, focus end of caption textarea with the same path. */\n focusEndPath: Path | null;\n /** When defined, focus start of caption textarea with the same path. */\n focusStartPath: Path | null;\n // isVisible?: (elementId: string) => boolean;\n query: {\n /** Plugin keys to enable caption. */\n allow: string[];\n };\n visibleId: string | null;\n },\n {},\n {},\n {\n isVisible?: (elementId: string) => boolean;\n }\n>;\n\n/** Enables support for caption. */\nexport const BaseCaptionPlugin = createTSlatePlugin<CaptionConfig>({\n key: KEYS.caption,\n options: {\n focusEndPath: null,\n focusStartPath: null,\n query: { allow: [] },\n visibleId: null,\n },\n})\n .extendSelectors<CaptionConfig['selectors']>(({ getOptions }) => ({\n isVisible: (elementId) => getOptions().visibleId === elementId,\n }))\n .overrideEditor(withCaption);\n"],"mappings":";;;;;;;;;;;;;AAsBA,MAAaQ,eAA8C,EACzDC,QACAC,YACAC,IAAI,EAAEC,OAAOC,iBACT;AACJ,QAAO,EACLC,YAAY;EACVF,MAAMG,WAAW;GACf,MAAM,EAAEC,UAAUN,YAAY;AAE9B,OAAIK,UAAUE,SAAS,iBAAiB;IACtC,MAAMC,eAAe;KACnB,GAAGT,OAAOU;KACV,GAAGJ,UAAUK;KACd;AAED,QACEX,OAAOY,IAAIC,wBACXnB,SAAS,MAAMM,OAAOY,IAAIC,qBAAqB,IAC/CJ,gBACAb,SAASkB,YAAYL,aAAa,EAClC;KACA,MAAMM,QAAQtB,eAAeO,QAAQO,MAAMS,MAAM;KAEjD,MAAMC,QAAQjB,OAAOkB,IAAIC,MAAM;MAC7BC,IAAIX;MACJY,OAAO,EAAEb,MAAMO,OAAM;MACtB,CAAC;AAEF,SAAIE,OAAO;MACT,MAAM,CAACK,QAAQL;AAEf,UACEK,KAAKC,WACL5B,QAAQ6B,OAAO,EAAEC,UAAUH,KAAKC,SAAS,CAAQ,CAACG,SAAS,EAE3DC,kBAAiB;AACf3B,cAAO4B,UAAU9B,mBAAmB,gBAAgBmB,MAAM,GAAG;SAC5D,EAAE;;;;AAMbd,SAAMG,UAAU;;EAElBF,WAAWyB,YAAY;GACrB,MAAM1B,gBAAc;AAElB,QAAI,CAAC0B,QAAQC,SAAS;KACpB,MAAMf,QAAQtB,eAAeO,QAAQC,YAAY,CAACM,MAAMS,MAAM;KAE9D,MAAMC,QAAQjB,OAAOkB,IAAIa,MAAM,EAC7BV,OAAO,EAAEb,MAAMO,OAAM,EACtB,CAAC;AAEF,SAAI,CAACE,MAAO;AAEZjB,YAAO4B,UAAU9B,mBAAmB,gBAAgBmB,MAAM,GAAG;AAE7D,YAAO;;;AAIX,OAAId,SAAO,CAAE,QAAO;AAEpB,UAAOC,SAASyB,QAAQ;;EAE5B,EACD;;;;;;AC5DH,MAAagB,oBAAoBX,mBAAkC;CACjEY,KAAKX,KAAKY;CACVC,SAAS;EACPV,cAAc;EACdC,gBAAgB;EAChBC,OAAO,EAAEC,OAAO,EAAA,EAAI;EACpBC,WAAW;EACb;CACD,CAAC,CACCO,iBAA6C,EAAEC,kBAAkB,EAChEP,YAAYC,cAAcM,YAAY,CAACR,cAAcE,WACtD,EAAE,CACFO,eAAef,YAAY"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/lib/BaseCaptionPlugin.ts","../src/lib/withCaption.ts"],"sourcesContent":[],"mappings":";;;KASY,aAAA,GAAgB;;EAAhB,YAAA,EAIM,IAJO,GAAA,IAAA;EAIP;EAEE,cAAA,EAAA,IAAA,GAAA,IAAA;EANQ,KAAA,EAAA;IAAY;IAsB3B,KAAA,EAAA,MAAA,EAAA;;;;ECTA,SAAA,CAAA,EAAA,CAAA,SAsEZ,EAAA,MAtEwC,EAAA,GAAA,OAAf;;;cDSb;;;;AAtBb;;;;;AAsBA;;;;ACTa,cAAA,WAA4B,EAAf,cAAA,CAAe,aAAD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/react/CaptionPlugin.tsx","../../src/react/components/Caption.tsx","../../src/react/components/CaptionButton.tsx","../../src/react/components/CaptionTextarea.tsx","../../src/react/components/TextareaAutosize.tsx","../../src/react/hooks/useCaptionString.ts","../../src/react/utils/showCaption.ts"],"sourcesContent":[],"mappings":";;;;;cAIa;;;KCSD,cAAA;;;UAIK,YAAA,SACP,KAAA,CAAM;EDdH,OAAA,CAAA,ECeD,cDfiD;;cCkBhD,4BAA4B;;EAT7B,MAAA,EAAA,OAAA;EAIK,QAAA,EAAA,GAAA;EAKJ,QAAA,EAAA,GAAA;AAwBb,CAAA;AAIa,cAJA,UASX,EAAA,CAAA,KAAA,EATgC,UAShC,CAAA,OATkD,eASlD,CAAA,EAAA,GAAA;;;cALW;;;cC9CA;cAOA;;;GAGV,kBAAkB;;;;AFVrB,CAAA;;;;cGmBa,uCACE,KAAA,CAAM,UAAU;cAmBlB;;EHvCA,OAAA,EAAA,GAAA;;;oBGiEL,KAAA,CAAM,YAAY;EFxDd,oBAAc,EAAA,CAAA,CAAA,EEwElB,KAAA,CAAM,gBFxEY,CEwEK,mBFxEL,CAAA,EAAA,GAAA,IAAA;EAIT,sBACf,EAAA,GACU,GAAA,IAAA;AAGZ,CAAA;AAwBa,cEiEA,kBFjEuC,EAAA,CAAA;EAAA,YAAlB;EAAU,OAAA;EAAA,QAAA;EAAA,WAAA;EAAA,YAAA;EAAA,oBAAA;EAAA;AAAA,CAAA,EEyEzC,UFzEyC,CAAA,OEyEvB,uBFzEuB,CAAA,EAAA,GAAA;EAI/B,KAAA,EAAA;;;;IC9CA,QAAA,EAAA,CAAA,CAAA,ECiEL,KAAA,CAAM,WD5Db,CC4DyB,mBD5DzB,CAAA,EAAA,GAAA,IAAA;IAEY,gBAeX,EAAA,CAAA,CAAA,EC2DM,KAAA,CAAM,gBD3DZ,CC2D6B,mBD3D7B,CAAA,EAAA,GAAA,IAAA;IAf+B,kBAAA,EAAA,GAAA,GAAA,IAAA;IAAA,SAAA,4BAAA,oBAAA,CAAA;EAGZ,CAAA;EAAlB,GAAA,iBAAA,oBAAA,GAAA,IAAA,CAAA;CAAU;cC6JA;;;;;;AHvKb;;;cISM,kBAAgB,KAAA,CAAA,0BAAA,wBAAA,KAAA,CAAA,cAAA;;;cCNT;;;cCHA,sBAAuB,sBAAsB"}
|
package/dist/react/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["toPlatePlugin","BaseCaptionPlugin","CaptionPlugin","React","TCaptionElement","NodeApi","useElement","useCaptionString","$","_c","caption","t0","t1","undefined","children","text","nodeCaption","t2","string","React","createPrimitiveComponent","useElement","usePluginOption","useReadOnly","useSelected","CaptionPlugin","useCaptionString","CaptionOptions","readOnly","CaptionProps","ComponentPropsWithoutRef","options","useCaptionState","t0","$","_c","t1","undefined","element","captionString","showCaption","id","selected","_readOnly","hidden","length","t2","useCaption","state","ReturnType","Caption","propsHook","stateHook","useEditorRef","useElement","BaseCaptionPlugin","useCaptionButtonState","$","_c","editor","element","t0","useCaptionButton","ReturnType","props","onClick","path","api","findPath","setOption","id","setTimeout","React","ReactTextareaAutosize","TextareaAutosizeProps","useIsomorphicLayoutEffect","TextareaAutosize","forwardRef","HTMLTextAreaElement","props","ref","$","_c","isRerendered","setIsRerendered","useState","t0","t1","Symbol","for","t2","displayName","React","useCallback","useState","TextareaAutosizeProps","TCaptionElement","TElement","isHotkey","NodeApi","PathApi","createPrimitiveComponent","useEditorRef","useElement","usePluginOption","useReadOnly","CaptionPlugin","TextareaAutosize","useCaptionTextareaFocus","textareaRef","$","_c","editor","element","focusCaptionPath","t0","t1","current","path","api","findPath","equals","focus","setOption","useEffect","useCaptionTextareaState","isComposing","setIsComposing","caption","nodeCaption","children","text","string","captionValue","setCaptionValue","newValue","tf","setNodes","at","updateEditorCaptionValue","t2","e","newValue_0","target","value","handleChange","t3","Symbol","for","handleCompositionStart","t4","e_0","newValue_1","currentTarget","handleCompositionEnd","readOnly","useRef","t5","useCaptionTextarea","preventDefault","path_0","nextNodePath","after","onKeyDown","currentValue","length","onBlur","onChange","onCompositionEnd","onCompositionStart","props","ref","CaptionTextarea","propsHook","stateHook","SlateEditor","TElement","CaptionPlugin","showCaption","editor","element","path","api","findPath","setOption","id","setTimeout"],"sources":["../../src/react/CaptionPlugin.tsx","../../src/react/hooks/useCaptionString.ts","../../src/react/components/Caption.tsx","../../src/react/components/CaptionButton.tsx","../../src/react/components/TextareaAutosize.tsx","../../src/react/components/CaptionTextarea.tsx","../../src/react/utils/showCaption.ts"],"sourcesContent":["import { toPlatePlugin } from 'platejs/react';\n\nimport { BaseCaptionPlugin } from '../lib/BaseCaptionPlugin';\n\nexport const CaptionPlugin = toPlatePlugin(BaseCaptionPlugin);\n","import React from 'react';\n\nimport type { TCaptionElement } from 'platejs';\n\nimport { NodeApi } from 'platejs';\nimport { useElement } from 'platejs/react';\n\nexport const useCaptionString = () => {\n const { caption: nodeCaption = [{ children: [{ text: '' }] }] } =\n useElement<TCaptionElement>();\n\n return React.useMemo(\n () => NodeApi.string(nodeCaption[0] as any) || '',\n [nodeCaption]\n );\n};\n","import type React from 'react';\n\nimport {\n createPrimitiveComponent,\n useElement,\n usePluginOption,\n useReadOnly,\n useSelected,\n} from 'platejs/react';\n\nimport { CaptionPlugin } from '../CaptionPlugin';\nimport { useCaptionString } from '../hooks/useCaptionString';\n\nexport type CaptionOptions = {\n readOnly?: boolean;\n};\n\nexport interface CaptionProps\n extends React.ComponentPropsWithoutRef<'figcaption'> {\n options?: CaptionOptions;\n}\n\nexport const useCaptionState = (options: CaptionOptions = {}) => {\n const element = useElement();\n const captionString = useCaptionString();\n\n const showCaption = usePluginOption(\n CaptionPlugin,\n 'isVisible',\n element.id as string\n );\n\n const selected = useSelected();\n const _readOnly = useReadOnly();\n const readOnly = options.readOnly || _readOnly;\n\n const hidden = !showCaption && captionString.length === 0;\n\n return {\n captionString,\n hidden,\n readOnly,\n selected,\n };\n};\n\nexport const useCaption = (state: ReturnType<typeof useCaptionState>) => ({\n hidden: state.hidden,\n});\n\nexport const Caption = createPrimitiveComponent<'figcaption', CaptionProps>(\n 'figcaption'\n)({\n propsHook: useCaption,\n stateHook: useCaptionState,\n});\n","import { useEditorRef, useElement } from 'platejs/react';\n\nimport { BaseCaptionPlugin } from '../../lib';\n\nexport const useCaptionButtonState = (): any => {\n const editor = useEditorRef();\n const element = useElement();\n\n return { editor, element };\n};\n\nexport const useCaptionButton = ({\n editor,\n element,\n}: ReturnType<typeof useCaptionButtonState>) => ({\n props: {\n onClick: () => {\n const path = editor.api.findPath(element);\n editor.setOption(BaseCaptionPlugin, 'visibleId', element.id as string);\n setTimeout(() => {\n if (path) {\n editor.setOption(BaseCaptionPlugin, 'focusEndPath', path);\n }\n }, 0);\n },\n },\n});\n","import React from 'react';\nimport ReactTextareaAutosize, {\n type TextareaAutosizeProps,\n} from 'react-textarea-autosize';\n\nimport { useIsomorphicLayoutEffect } from 'platejs/react';\n\n/**\n * `<textarea />` component for React which grows with content.\n *\n * @see https://github.com/Andarist/react-textarea-autosize\n * @see https://github.com/Andarist/react-textarea-autosize/issues/337\n */\nconst TextareaAutosize = React.forwardRef<\n HTMLTextAreaElement,\n TextareaAutosizeProps\n>((props, ref) => {\n const [isRerendered, setIsRerendered] = React.useState(false);\n\n useIsomorphicLayoutEffect(() => setIsRerendered(true), []);\n\n return isRerendered ? <ReactTextareaAutosize {...props} ref={ref} /> : null;\n});\nTextareaAutosize.displayName = 'TextareaAutosize';\n\nexport { TextareaAutosize };\n","import React, { useCallback, useState } from 'react';\n\nimport type { TextareaAutosizeProps } from 'react-textarea-autosize';\n\nimport {\n type TCaptionElement,\n type TElement,\n isHotkey,\n NodeApi,\n PathApi,\n} from 'platejs';\nimport {\n createPrimitiveComponent,\n useEditorRef,\n useElement,\n usePluginOption,\n useReadOnly,\n} from 'platejs/react';\n\nimport { CaptionPlugin } from '../CaptionPlugin';\nimport { TextareaAutosize } from './TextareaAutosize';\n\n/** Focus textareaRef when focusCaptionPath is set to the image path. */\nexport const useCaptionTextareaFocus = (\n textareaRef: React.RefObject<HTMLTextAreaElement | null>\n) => {\n const editor = useEditorRef();\n const element = useElement<TCaptionElement>();\n\n const focusCaptionPath = usePluginOption(CaptionPlugin, 'focusEndPath');\n\n React.useEffect(() => {\n if (focusCaptionPath && textareaRef.current) {\n const path = editor.api.findPath(element);\n\n if (path && PathApi.equals(path, focusCaptionPath)) {\n textareaRef.current.focus();\n editor.setOption(CaptionPlugin, 'focusEndPath', null);\n }\n }\n }, [editor, element, focusCaptionPath, textareaRef]);\n};\n\nexport const useCaptionTextareaState = () => {\n const element = useElement<TCaptionElement>();\n const editor = useEditorRef();\n\n const [isComposing, setIsComposing] = useState(false);\n\n const [captionValue, setCaptionValue] = useState<\n TextareaAutosizeProps['value']\n >(() => {\n const nodeCaption =\n element.caption ?? ([{ children: [{ text: '' }] }] as [TElement]);\n\n return NodeApi.string(nodeCaption[0]);\n });\n\n const updateEditorCaptionValue = useCallback(\n (newValue: string) => {\n editor.tf.setNodes<TCaptionElement>(\n { caption: [{ text: newValue }] },\n { at: element }\n );\n },\n [editor, element]\n );\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n const newValue = e.target.value;\n setCaptionValue(newValue);\n\n if (!isComposing) {\n updateEditorCaptionValue(newValue);\n }\n },\n [isComposing, updateEditorCaptionValue]\n );\n\n const handleCompositionStart = useCallback(() => {\n setIsComposing(true);\n }, []);\n\n const handleCompositionEnd = useCallback(\n (e: React.CompositionEvent<HTMLTextAreaElement>) => {\n setIsComposing(false);\n const newValue = e.currentTarget.value;\n setCaptionValue(newValue);\n updateEditorCaptionValue(newValue);\n },\n [updateEditorCaptionValue]\n );\n\n const readOnly = useReadOnly();\n\n const textareaRef = React.useRef<HTMLTextAreaElement>(null);\n\n useCaptionTextareaFocus(textareaRef);\n\n return {\n captionValue,\n element,\n readOnly,\n textareaRef,\n handleChange,\n handleCompositionEnd,\n handleCompositionStart,\n };\n};\n\nexport const useCaptionTextarea = ({\n captionValue,\n element,\n readOnly,\n textareaRef,\n handleChange,\n handleCompositionEnd,\n handleCompositionStart,\n}: ReturnType<typeof useCaptionTextareaState>) => {\n const editor = useEditorRef();\n\n const onKeyDown: TextareaAutosizeProps['onKeyDown'] = (e) => {\n // select image\n if (isHotkey('up', e)) {\n const path = editor.api.findPath(element);\n\n if (!path) return;\n\n e.preventDefault();\n\n editor.tf.focus({ at: path });\n }\n // select next block\n if (isHotkey('down', e)) {\n const path = editor.api.findPath(element);\n\n if (!path) return;\n\n const nextNodePath = editor.api.after(path);\n\n if (!nextNodePath) return;\n\n e.preventDefault();\n\n editor.tf.focus({ at: nextNodePath });\n }\n };\n\n const onBlur: TextareaAutosizeProps['onBlur'] = (e) => {\n const currentValue = e.target.value;\n\n if (currentValue.length === 0) {\n editor.setOption(CaptionPlugin, 'visibleId', null);\n }\n };\n\n return {\n props: {\n readOnly,\n value: captionValue,\n onBlur,\n onChange: handleChange,\n onCompositionEnd: handleCompositionEnd,\n onCompositionStart: handleCompositionStart,\n onKeyDown,\n },\n ref: textareaRef,\n };\n};\n\nexport const CaptionTextarea = createPrimitiveComponent(TextareaAutosize)({\n propsHook: useCaptionTextarea,\n stateHook: useCaptionTextareaState,\n});\n","import type { SlateEditor, TElement } from 'platejs';\n\nimport { CaptionPlugin } from '../CaptionPlugin';\n\nexport const showCaption = (editor: SlateEditor, element: TElement) => {\n const path = editor.api.findPath(element);\n editor.setOption(CaptionPlugin, 'visibleId', element.id as string);\n\n setTimeout(() => {\n if (path) {\n editor.setOption(CaptionPlugin, 'focusEndPath', path);\n }\n }, 0);\n};\n"],"mappings":";;;;;;;;AAIA,MAAaE,gBAAgBF,cAAcC,kBAAkB;;;;ACG7D,MAAaM,yBAAmB;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAC9B,MAAA,EAAAC,SAAAC,OACEL,YAA6B;CAAC,IAAAM;AAAA,KAAAJ,EAAA,OAAAG,IAAA;AADfC,OAAAD,OAAAE,SAAA,CAAe,EAAAC,UAAY,CAAC,EAAAC,MAAQ,IAAI,CAAA,EAAG,CAAC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