@arkyn/components 3.0.4 → 3.0.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/components/richText/index.d.ts +11 -1
- package/dist/components/richText/index.d.ts.map +1 -1
- package/dist/components/richText/insertLink/index.d.ts +5 -0
- package/dist/components/richText/insertLink/index.d.ts.map +1 -0
- package/dist/components/richText/insertVideo/index.d.ts.map +1 -1
- package/dist/components/richText/leaf/index.d.ts +1 -0
- package/dist/components/richText/leaf/index.d.ts.map +1 -1
- package/dist/index.js +723 -637
- package/dist/index.js.map +1 -1
- package/dist/modules/components/richText/index.js +80 -76
- package/dist/modules/components/richText/index.js.map +1 -1
- package/dist/modules/components/richText/insertLink/index.js +68 -0
- package/dist/modules/components/richText/insertLink/index.js.map +1 -0
- package/dist/modules/components/richText/insertLink/styles.css +1 -0
- package/dist/modules/components/richText/insertVideo/index.js +45 -41
- package/dist/modules/components/richText/insertVideo/index.js.map +1 -1
- package/dist/modules/components/richText/leaf/index.js +6 -1
- package/dist/modules/components/richText/leaf/index.js.map +1 -1
- package/dist/modules/components/richText/leaf/styles.css +1 -0
- package/dist/modules/components/richText/styles.css +4 -0
- package/dist/modules/services/clearLinkMarkAtBoundary.js +12 -0
- package/dist/modules/services/clearLinkMarkAtBoundary.js.map +1 -0
- package/dist/modules/services/isValidHttpsUrl.js +12 -0
- package/dist/modules/services/isValidHttpsUrl.js.map +1 -0
- package/dist/modules/utils/richTextUtilities.js +24 -17
- package/dist/modules/utils/richTextUtilities.js.map +1 -1
- package/dist/services/clearLinkMarkAtBoundary.d.ts +4 -0
- package/dist/services/clearLinkMarkAtBoundary.d.ts.map +1 -0
- package/dist/services/isValidHttpsUrl.d.ts +3 -0
- package/dist/services/isValidHttpsUrl.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/dist/types/richTextTypes.d.ts +13 -2
- package/dist/types/richTextTypes.d.ts.map +1 -1
- package/dist/utils/richTextUtilities.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type RichTextHiddenButtonKey = "headingOne" | "headingTwo" | "blockQuote" | "bold" | "italic" | "underline" | "code" | "left" | "right" | "center" | "justify" | "image" | "video";
|
|
1
|
+
type RichTextHiddenButtonKey = "headingOne" | "headingTwo" | "blockQuote" | "bold" | "italic" | "underline" | "code" | "left" | "right" | "center" | "justify" | "image" | "video" | "link";
|
|
2
2
|
type RichTextElementFormatType = "blockQuote" | "bulletedList" | "headingOne" | "headingTwo" | "listItem" | "numberedList" | "paragraph" | "image" | "video";
|
|
3
3
|
type RichTextAlignFormatType = "center" | "left" | "right" | "justify";
|
|
4
4
|
type RichTextMarkFormatType = "bold" | "italic" | "underline" | "code";
|
|
@@ -18,6 +18,13 @@ type RichTextInsertVideoProps = {
|
|
|
18
18
|
modalConfirmButton?: string;
|
|
19
19
|
invalidUrlMessage?: string;
|
|
20
20
|
};
|
|
21
|
+
type RichTextInsertLinkProps = {
|
|
22
|
+
modalTitle?: string;
|
|
23
|
+
modalInputUrlLabel?: string;
|
|
24
|
+
modalCancelButton?: string;
|
|
25
|
+
modalConfirmButton?: string;
|
|
26
|
+
invalidUrlMessage?: string;
|
|
27
|
+
};
|
|
21
28
|
type RichTextCustomElement = {
|
|
22
29
|
type: RichTextElementFormatType;
|
|
23
30
|
align?: RichTextAlignFormatType;
|
|
@@ -30,6 +37,8 @@ type RichTextCustomText = {
|
|
|
30
37
|
italic?: boolean;
|
|
31
38
|
code?: boolean;
|
|
32
39
|
underline?: boolean;
|
|
40
|
+
link?: boolean;
|
|
41
|
+
href?: string;
|
|
33
42
|
};
|
|
34
43
|
type Descendant = RichTextCustomElement | RichTextCustomText;
|
|
35
44
|
type RichTextProps = {
|
|
@@ -48,6 +57,7 @@ type RichTextProps = {
|
|
|
48
57
|
showAsterisk?: boolean;
|
|
49
58
|
imageConfig?: RichTextInsertImageProps;
|
|
50
59
|
videoConfig?: RichTextInsertVideoProps;
|
|
60
|
+
linkConfig?: RichTextInsertLinkProps;
|
|
51
61
|
onChangeCharactersCount?: (e: number) => void;
|
|
52
62
|
onChange?: (value: Descendant[]) => void;
|
|
53
63
|
};
|
|
@@ -56,9 +66,10 @@ type ParseElement = {
|
|
|
56
66
|
type: string;
|
|
57
67
|
props: {
|
|
58
68
|
src?: string;
|
|
69
|
+
href?: string;
|
|
59
70
|
children: ParseElement[] | string;
|
|
60
71
|
className?: string;
|
|
61
72
|
};
|
|
62
73
|
};
|
|
63
|
-
export type { Descendant, ParseElement, RichTextAlignFormatType, RichTextCustomElement, RichTextCustomText, RichTextElementFormatType, RichTextHiddenButtonKey, RichTextInsertImageProps, RichTextInsertVideoProps, RichTextMarkFormatType, RichTextProps, RichTextValue, };
|
|
74
|
+
export type { Descendant, ParseElement, RichTextAlignFormatType, RichTextCustomElement, RichTextCustomText, RichTextElementFormatType, RichTextHiddenButtonKey, RichTextInsertImageProps, RichTextInsertLinkProps, RichTextInsertVideoProps, RichTextMarkFormatType, RichTextProps, RichTextValue, };
|
|
64
75
|
//# sourceMappingURL=richTextTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"richTextTypes.d.ts","sourceRoot":"","sources":["../../src/types/richTextTypes.ts"],"names":[],"mappings":"AAAA,KAAK,uBAAuB,GACzB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,WAAW,GACX,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"richTextTypes.d.ts","sourceRoot":"","sources":["../../src/types/richTextTypes.ts"],"names":[],"mappings":"AAAA,KAAK,uBAAuB,GACzB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,WAAW,GACX,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,MAAM,C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AAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QACN,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAClC,SAAS,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACF,CAAC;AAEF,YAAY,EACX,UAAU,EACV,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,aAAa,EACb,aAAa,GACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"richTextUtilities.d.ts","sourceRoot":"","sources":["../../src/utils/richTextUtilities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAG3D,iBAAS,SAAS,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"richTextUtilities.d.ts","sourceRoot":"","sources":["../../src/utils/richTextUtilities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAG3D,iBAAS,SAAS,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CAmDpC;AAGD,iBAAS,WAAW,CAAC,EAAE,EAAE,YAAY,GAAG,GAAG,CA0D1C;AAED,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkyn/components",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"@types/react-dom": "^19.2.3",
|
|
123
123
|
"@types/react-scroll": "^1.8.10",
|
|
124
124
|
"@vitejs/plugin-react": "^6.0.3",
|
|
125
|
-
"html-react-parser": "
|
|
125
|
+
"html-react-parser": "6.1.5",
|
|
126
126
|
"is-hotkey": "^0.2.0",
|
|
127
127
|
"jsdom": "^29.1.1",
|
|
128
128
|
"lucide-react": "catalog:",
|