@farmzone/fz-react-ui 1.1.15 → 1.1.17
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/index.cjs +335 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -3
- package/dist/index.d.ts +21 -3
- package/dist/index.js +338 -58
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -95,9 +95,7 @@ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
95
95
|
onClear?: () => void;
|
|
96
96
|
/** 값의 첫 글자로 스페이스를 입력할 수 있는지 (기본 true) */
|
|
97
97
|
allowLeadingSpace?: boolean;
|
|
98
|
-
/** 값
|
|
99
|
-
allowMiddleSpace?: boolean;
|
|
100
|
-
/** 포커스를 벗어날 때(blur) 값 끝에 스페이스가 남아있을 수 있는지 (기본 true) */
|
|
98
|
+
/** 값 끝에 스페이스가 남아있을 수 있는지 — 매 onChange마다 적용된다 (기본 true) */
|
|
101
99
|
allowTrailingSpace?: boolean;
|
|
102
100
|
}
|
|
103
101
|
declare function Input(props: InputProps): react.JSX.Element;
|
|
@@ -1334,6 +1332,15 @@ interface RichEditorThemeOverride {
|
|
|
1334
1332
|
mention?: Partial<RichEditorThemeTokens["mention"]>;
|
|
1335
1333
|
}
|
|
1336
1334
|
|
|
1335
|
+
interface FileAttachment {
|
|
1336
|
+
id: string;
|
|
1337
|
+
name: string;
|
|
1338
|
+
size: number;
|
|
1339
|
+
mimeType: string;
|
|
1340
|
+
file: File;
|
|
1341
|
+
url: string;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1337
1344
|
type RichEditorHeadingLevel = 1 | 2 | 3 | 4;
|
|
1338
1345
|
interface MentionItem {
|
|
1339
1346
|
id: string;
|
|
@@ -1365,6 +1372,7 @@ interface RichEditorHandle {
|
|
|
1365
1372
|
clearContent: () => void;
|
|
1366
1373
|
focus: () => void;
|
|
1367
1374
|
isEmpty: boolean;
|
|
1375
|
+
attachments: FileAttachment[];
|
|
1368
1376
|
editor: _tiptap_core.Editor | null;
|
|
1369
1377
|
}
|
|
1370
1378
|
interface RichEditorProps {
|
|
@@ -1392,6 +1400,9 @@ interface RichEditorProps {
|
|
|
1392
1400
|
editable?: boolean;
|
|
1393
1401
|
autofocus?: boolean | "start" | "end" | "all" | null;
|
|
1394
1402
|
onSubmit?: () => void;
|
|
1403
|
+
fileFormat?: ReadonlyArray<string>;
|
|
1404
|
+
onFileUpload?: (file: File) => string | Promise<string>;
|
|
1405
|
+
renderFilePreview?: (attachment: FileAttachment, onRemove: () => void) => ReactNode;
|
|
1395
1406
|
}
|
|
1396
1407
|
interface UseRichEditorOptions {
|
|
1397
1408
|
defaultValue?: string;
|
|
@@ -1408,6 +1419,8 @@ interface UseRichEditorOptions {
|
|
|
1408
1419
|
autofocus?: boolean | "start" | "end" | "all" | null;
|
|
1409
1420
|
editorClassName?: string;
|
|
1410
1421
|
additionalExtensions?: Extensions;
|
|
1422
|
+
fileFormat?: ReadonlyArray<string>;
|
|
1423
|
+
onFileUpload?: (file: File) => string | Promise<string>;
|
|
1411
1424
|
onChange?: (html: string) => void;
|
|
1412
1425
|
onSubmit?: () => void;
|
|
1413
1426
|
}
|
|
@@ -1423,6 +1436,7 @@ interface RichEditorToolbarProps {
|
|
|
1423
1436
|
toolbar?: RichEditorToolbarConfig;
|
|
1424
1437
|
className?: string;
|
|
1425
1438
|
zIndex?: number;
|
|
1439
|
+
onImageButtonClick?: () => void;
|
|
1426
1440
|
}
|
|
1427
1441
|
|
|
1428
1442
|
interface UseRichEditorReturn {
|
|
@@ -1433,6 +1447,10 @@ interface UseRichEditorReturn {
|
|
|
1433
1447
|
clearContent: () => void;
|
|
1434
1448
|
focus: () => void;
|
|
1435
1449
|
isEmpty: boolean;
|
|
1450
|
+
attachments: FileAttachment[];
|
|
1451
|
+
removeAttachment: (id: string) => void;
|
|
1452
|
+
processFiles: (files: File[]) => void;
|
|
1453
|
+
isUploading: boolean;
|
|
1436
1454
|
}
|
|
1437
1455
|
declare function useRichEditor(options?: UseRichEditorOptions): UseRichEditorReturn;
|
|
1438
1456
|
|
package/dist/index.d.ts
CHANGED
|
@@ -95,9 +95,7 @@ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
95
95
|
onClear?: () => void;
|
|
96
96
|
/** 값의 첫 글자로 스페이스를 입력할 수 있는지 (기본 true) */
|
|
97
97
|
allowLeadingSpace?: boolean;
|
|
98
|
-
/** 값
|
|
99
|
-
allowMiddleSpace?: boolean;
|
|
100
|
-
/** 포커스를 벗어날 때(blur) 값 끝에 스페이스가 남아있을 수 있는지 (기본 true) */
|
|
98
|
+
/** 값 끝에 스페이스가 남아있을 수 있는지 — 매 onChange마다 적용된다 (기본 true) */
|
|
101
99
|
allowTrailingSpace?: boolean;
|
|
102
100
|
}
|
|
103
101
|
declare function Input(props: InputProps): react.JSX.Element;
|
|
@@ -1334,6 +1332,15 @@ interface RichEditorThemeOverride {
|
|
|
1334
1332
|
mention?: Partial<RichEditorThemeTokens["mention"]>;
|
|
1335
1333
|
}
|
|
1336
1334
|
|
|
1335
|
+
interface FileAttachment {
|
|
1336
|
+
id: string;
|
|
1337
|
+
name: string;
|
|
1338
|
+
size: number;
|
|
1339
|
+
mimeType: string;
|
|
1340
|
+
file: File;
|
|
1341
|
+
url: string;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1337
1344
|
type RichEditorHeadingLevel = 1 | 2 | 3 | 4;
|
|
1338
1345
|
interface MentionItem {
|
|
1339
1346
|
id: string;
|
|
@@ -1365,6 +1372,7 @@ interface RichEditorHandle {
|
|
|
1365
1372
|
clearContent: () => void;
|
|
1366
1373
|
focus: () => void;
|
|
1367
1374
|
isEmpty: boolean;
|
|
1375
|
+
attachments: FileAttachment[];
|
|
1368
1376
|
editor: _tiptap_core.Editor | null;
|
|
1369
1377
|
}
|
|
1370
1378
|
interface RichEditorProps {
|
|
@@ -1392,6 +1400,9 @@ interface RichEditorProps {
|
|
|
1392
1400
|
editable?: boolean;
|
|
1393
1401
|
autofocus?: boolean | "start" | "end" | "all" | null;
|
|
1394
1402
|
onSubmit?: () => void;
|
|
1403
|
+
fileFormat?: ReadonlyArray<string>;
|
|
1404
|
+
onFileUpload?: (file: File) => string | Promise<string>;
|
|
1405
|
+
renderFilePreview?: (attachment: FileAttachment, onRemove: () => void) => ReactNode;
|
|
1395
1406
|
}
|
|
1396
1407
|
interface UseRichEditorOptions {
|
|
1397
1408
|
defaultValue?: string;
|
|
@@ -1408,6 +1419,8 @@ interface UseRichEditorOptions {
|
|
|
1408
1419
|
autofocus?: boolean | "start" | "end" | "all" | null;
|
|
1409
1420
|
editorClassName?: string;
|
|
1410
1421
|
additionalExtensions?: Extensions;
|
|
1422
|
+
fileFormat?: ReadonlyArray<string>;
|
|
1423
|
+
onFileUpload?: (file: File) => string | Promise<string>;
|
|
1411
1424
|
onChange?: (html: string) => void;
|
|
1412
1425
|
onSubmit?: () => void;
|
|
1413
1426
|
}
|
|
@@ -1423,6 +1436,7 @@ interface RichEditorToolbarProps {
|
|
|
1423
1436
|
toolbar?: RichEditorToolbarConfig;
|
|
1424
1437
|
className?: string;
|
|
1425
1438
|
zIndex?: number;
|
|
1439
|
+
onImageButtonClick?: () => void;
|
|
1426
1440
|
}
|
|
1427
1441
|
|
|
1428
1442
|
interface UseRichEditorReturn {
|
|
@@ -1433,6 +1447,10 @@ interface UseRichEditorReturn {
|
|
|
1433
1447
|
clearContent: () => void;
|
|
1434
1448
|
focus: () => void;
|
|
1435
1449
|
isEmpty: boolean;
|
|
1450
|
+
attachments: FileAttachment[];
|
|
1451
|
+
removeAttachment: (id: string) => void;
|
|
1452
|
+
processFiles: (files: File[]) => void;
|
|
1453
|
+
isUploading: boolean;
|
|
1436
1454
|
}
|
|
1437
1455
|
declare function useRichEditor(options?: UseRichEditorOptions): UseRichEditorReturn;
|
|
1438
1456
|
|