@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
|
@@ -3,7 +3,8 @@ import "./styles.css";
|
|
|
3
3
|
/**
|
|
4
4
|
* RichText, WYSIWYG rich-text editor built on Slate.js with a configurable toolbar.
|
|
5
5
|
*
|
|
6
|
-
* **Toolbar features:** bold, italic, underline, code, H1/H2, block quote, alignment (left/center/right/justify), image and
|
|
6
|
+
* **Toolbar features:** bold, italic, underline, code, H1/H2, block quote, alignment (left/center/right/justify), image, video, and link insertion.
|
|
7
|
+
* Pressing Space or Enter right after a link automatically stops new text from continuing to be part of that link.
|
|
7
8
|
*
|
|
8
9
|
* Editor content is stored as a Slate JSON string in a hidden `<input>` for form submission.
|
|
9
10
|
* Integrates with `useForm` to display validation errors by field name.
|
|
@@ -12,6 +13,8 @@ import "./styles.css";
|
|
|
12
13
|
* @param props.label - Label text displayed above the editor.
|
|
13
14
|
* @param props.hiddenButtons - Toolbar button keys to hide (e.g. `["image", "code"]`).
|
|
14
15
|
* @param props.imageConfig - Enables image insertion; contains the upload endpoint and modal labels.
|
|
16
|
+
* @param props.videoConfig - Customizes the video insertion modal labels.
|
|
17
|
+
* @param props.linkConfig - Customizes the link insertion modal labels.
|
|
15
18
|
* @param props.defaultValue - Initial editor content as a Slate JSON string. Default: "[]"
|
|
16
19
|
* @param props.maxLimit - Maximum character count. Default: 10000
|
|
17
20
|
* @param props.enforceCharacterLimit - Prevents typing past `maxLimit`. Default: false
|
|
@@ -47,6 +50,13 @@ import "./styles.css";
|
|
|
47
50
|
* label="Article Body"
|
|
48
51
|
* imageConfig={{ action: "/api/upload" }}
|
|
49
52
|
* />
|
|
53
|
+
*
|
|
54
|
+
* // With custom link insertion modal labels
|
|
55
|
+
* <RichText
|
|
56
|
+
* name="article"
|
|
57
|
+
* label="Article Body"
|
|
58
|
+
* linkConfig={{ modalTitle: "Add a link" }}
|
|
59
|
+
* />
|
|
50
60
|
* ```
|
|
51
61
|
*/
|
|
52
62
|
declare function RichText(props: RichTextProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/richText/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/richText/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAEX,aAAa,EACb,MAAM,2BAA2B,CAAC;AASnC,OAAO,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAEH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,+BA8MrC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/richText/insertLink/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAQ5E,OAAO,cAAc,CAAC;AAEtB,iBAAS,UAAU,CAAC,KAAK,EAAE,uBAAuB,+BAgGjD;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/richText/insertVideo/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/richText/insertVideo/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAQ7E,OAAO,cAAc,CAAC;AAEtB,iBAAS,WAAW,CAAC,KAAK,EAAE,wBAAwB,+BAiHnD;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/richText/leaf/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/richText/leaf/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,cAAc,CAAC;AAEtB,iBAAS,IAAI,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,eAAe,+BAc5D;AAED,OAAO,EAAE,IAAI,EAAE,CAAC"}
|