@arkyn/types 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,30 @@
|
|
1
1
|
type RichTextHiddenButtonKey = "headingOne" | "headingTwo" | "blockQuote" | "bold" | "italic" | "underline" | "code" | "left" | "right" | "center" | "justify";
|
2
|
-
type
|
3
|
-
type
|
4
|
-
type
|
5
|
-
|
6
|
-
|
2
|
+
type RichTextElementFormatType = "blockQuote" | "bulletedList" | "headingOne" | "headingTwo" | "listItem" | "numberedList" | "paragraph" | "image";
|
3
|
+
type RichTextAlignFormatType = "center" | "left" | "right" | "justify";
|
4
|
+
type RichTextMarkFormatType = "bold" | "italic" | "underline" | "code";
|
5
|
+
type RichTextInsertImageProps = {
|
6
|
+
action: string;
|
7
|
+
tabLabels?: [string, string];
|
8
|
+
modalTitle?: string;
|
9
|
+
modalInputUrlLabel?: string;
|
10
|
+
modalInputImageLabel?: string;
|
11
|
+
modalCancelButton?: string;
|
12
|
+
modalConfirmButton?: string;
|
13
|
+
};
|
14
|
+
type RichTextCustomElement = {
|
15
|
+
type: RichTextElementFormatType;
|
16
|
+
align?: RichTextAlignFormatType;
|
17
|
+
src?: string;
|
7
18
|
children?: any;
|
8
19
|
};
|
9
|
-
type
|
20
|
+
type RichTextCustomText = {
|
10
21
|
bold?: boolean;
|
11
22
|
text: string;
|
12
23
|
italic?: boolean;
|
13
24
|
code?: boolean;
|
14
25
|
underline?: boolean;
|
15
26
|
};
|
16
|
-
type Descendant =
|
27
|
+
type Descendant = RichTextCustomElement | RichTextCustomText;
|
17
28
|
type RichTextProps = {
|
18
29
|
name: string;
|
19
30
|
hiddenButtons?: RichTextHiddenButtonKey[];
|
@@ -21,9 +32,10 @@ type RichTextProps = {
|
|
21
32
|
enforceCharacterLimit?: boolean;
|
22
33
|
defaultValue?: string;
|
23
34
|
isError?: boolean;
|
35
|
+
imageConfig?: RichTextInsertImageProps;
|
24
36
|
onChangeCharactersCount?: (e: number) => void;
|
25
37
|
onChange?: (value: Descendant[]) => void;
|
26
38
|
};
|
27
39
|
type RichTextValue = Descendant[];
|
28
|
-
export type {
|
40
|
+
export type { Descendant, RichTextAlignFormatType, RichTextCustomElement, RichTextCustomText, RichTextElementFormatType, RichTextHiddenButtonKey, RichTextInsertImageProps, RichTextMarkFormatType, RichTextProps, RichTextValue, };
|
29
41
|
//# sourceMappingURL=RichTextProps.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RichTextProps.d.ts","sourceRoot":"","sources":["../../src/components/RichTextProps.ts"],"names":[],"mappings":"AAAA,KAAK,uBAAuB,GACxB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,WAAW,GACX,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,CAAC;AAEd,KAAK,
|
1
|
+
{"version":3,"file":"RichTextProps.d.ts","sourceRoot":"","sources":["../../src/components/RichTextProps.ts"],"names":[],"mappings":"AAAA,KAAK,uBAAuB,GACxB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,WAAW,GACX,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,CAAC;AAEd,KAAK,yBAAyB,GAC1B,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,cAAc,GACd,WAAW,GACX,OAAO,CAAC;AAEZ,KAAK,uBAAuB,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvE,KAAK,sBAAsB,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAC;AAEvE,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,k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,aAAa,GACd,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arkyn/types",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.3",
|
4
4
|
"main": "./dist/bundle.js",
|
5
5
|
"module": "./src/index.ts",
|
6
6
|
"type": "module",
|
@@ -22,6 +22,6 @@
|
|
22
22
|
"@types/react": "^18.3.12",
|
23
23
|
"@types/react-dom": "^18.3.1",
|
24
24
|
"bun-types": "latest",
|
25
|
-
"typescript": "^5.
|
25
|
+
"typescript": "^5.7.2"
|
26
26
|
}
|
27
27
|
}
|
@@ -11,24 +11,38 @@ type RichTextHiddenButtonKey =
|
|
11
11
|
| "center"
|
12
12
|
| "justify";
|
13
13
|
|
14
|
-
type
|
14
|
+
type RichTextElementFormatType =
|
15
15
|
| "blockQuote"
|
16
16
|
| "bulletedList"
|
17
17
|
| "headingOne"
|
18
18
|
| "headingTwo"
|
19
19
|
| "listItem"
|
20
20
|
| "numberedList"
|
21
|
-
| "paragraph"
|
21
|
+
| "paragraph"
|
22
|
+
| "image";
|
22
23
|
|
23
|
-
type
|
24
|
+
type RichTextAlignFormatType = "center" | "left" | "right" | "justify";
|
24
25
|
|
25
|
-
type
|
26
|
-
|
27
|
-
|
26
|
+
type RichTextMarkFormatType = "bold" | "italic" | "underline" | "code";
|
27
|
+
|
28
|
+
type RichTextInsertImageProps = {
|
29
|
+
action: string;
|
30
|
+
tabLabels?: [string, string];
|
31
|
+
modalTitle?: string;
|
32
|
+
modalInputUrlLabel?: string;
|
33
|
+
modalInputImageLabel?: string;
|
34
|
+
modalCancelButton?: string;
|
35
|
+
modalConfirmButton?: string;
|
36
|
+
};
|
37
|
+
|
38
|
+
type RichTextCustomElement = {
|
39
|
+
type: RichTextElementFormatType;
|
40
|
+
align?: RichTextAlignFormatType;
|
41
|
+
src?: string;
|
28
42
|
children?: any;
|
29
43
|
};
|
30
44
|
|
31
|
-
type
|
45
|
+
type RichTextCustomText = {
|
32
46
|
bold?: boolean;
|
33
47
|
text: string;
|
34
48
|
italic?: boolean;
|
@@ -36,7 +50,7 @@ type CustomText = {
|
|
36
50
|
underline?: boolean;
|
37
51
|
};
|
38
52
|
|
39
|
-
type Descendant =
|
53
|
+
type Descendant = RichTextCustomElement | RichTextCustomText;
|
40
54
|
|
41
55
|
type RichTextProps = {
|
42
56
|
name: string;
|
@@ -45,10 +59,22 @@ type RichTextProps = {
|
|
45
59
|
enforceCharacterLimit?: boolean;
|
46
60
|
defaultValue?: string;
|
47
61
|
isError?: boolean;
|
62
|
+
imageConfig?: RichTextInsertImageProps;
|
48
63
|
onChangeCharactersCount?: (e: number) => void;
|
49
64
|
onChange?: (value: Descendant[]) => void;
|
50
65
|
};
|
51
66
|
|
52
67
|
type RichTextValue = Descendant[];
|
53
68
|
|
54
|
-
export type {
|
69
|
+
export type {
|
70
|
+
Descendant,
|
71
|
+
RichTextAlignFormatType,
|
72
|
+
RichTextCustomElement,
|
73
|
+
RichTextCustomText,
|
74
|
+
RichTextElementFormatType,
|
75
|
+
RichTextHiddenButtonKey,
|
76
|
+
RichTextInsertImageProps,
|
77
|
+
RichTextMarkFormatType,
|
78
|
+
RichTextProps,
|
79
|
+
RichTextValue,
|
80
|
+
};
|