@arkyn/components 3.0.4 → 3.0.5

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.
Files changed (31) hide show
  1. package/dist/components/richText/index.d.ts +10 -1
  2. package/dist/components/richText/index.d.ts.map +1 -1
  3. package/dist/components/richText/insertLink/index.d.ts +5 -0
  4. package/dist/components/richText/insertLink/index.d.ts.map +1 -0
  5. package/dist/components/richText/insertVideo/index.d.ts.map +1 -1
  6. package/dist/components/richText/leaf/index.d.ts +1 -0
  7. package/dist/components/richText/leaf/index.d.ts.map +1 -1
  8. package/dist/index.js +710 -633
  9. package/dist/index.js.map +1 -1
  10. package/dist/modules/components/richText/index.js +58 -56
  11. package/dist/modules/components/richText/index.js.map +1 -1
  12. package/dist/modules/components/richText/insertLink/index.js +68 -0
  13. package/dist/modules/components/richText/insertLink/index.js.map +1 -0
  14. package/dist/modules/components/richText/insertLink/styles.css +1 -0
  15. package/dist/modules/components/richText/insertVideo/index.js +45 -41
  16. package/dist/modules/components/richText/insertVideo/index.js.map +1 -1
  17. package/dist/modules/components/richText/leaf/index.js +6 -1
  18. package/dist/modules/components/richText/leaf/index.js.map +1 -1
  19. package/dist/modules/components/richText/leaf/styles.css +1 -0
  20. package/dist/modules/components/richText/styles.css +4 -0
  21. package/dist/modules/services/isValidHttpsUrl.js +12 -0
  22. package/dist/modules/services/isValidHttpsUrl.js.map +1 -0
  23. package/dist/modules/utils/richTextUtilities.js +24 -17
  24. package/dist/modules/utils/richTextUtilities.js.map +1 -1
  25. package/dist/services/isValidHttpsUrl.d.ts +3 -0
  26. package/dist/services/isValidHttpsUrl.d.ts.map +1 -0
  27. package/dist/style.css +1 -1
  28. package/dist/types/richTextTypes.d.ts +13 -2
  29. package/dist/types/richTextTypes.d.ts.map +1 -1
  30. package/dist/utils/richTextUtilities.d.ts.map +1 -1
  31. package/package.json +2 -2
@@ -3,7 +3,7 @@ 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 video insertion.
6
+ * **Toolbar features:** bold, italic, underline, code, H1/H2, block quote, alignment (left/center/right/justify), image, video, and link insertion.
7
7
  *
8
8
  * Editor content is stored as a Slate JSON string in a hidden `<input>` for form submission.
9
9
  * Integrates with `useForm` to display validation errors by field name.
@@ -12,6 +12,8 @@ import "./styles.css";
12
12
  * @param props.label - Label text displayed above the editor.
13
13
  * @param props.hiddenButtons - Toolbar button keys to hide (e.g. `["image", "code"]`).
14
14
  * @param props.imageConfig - Enables image insertion; contains the upload endpoint and modal labels.
15
+ * @param props.videoConfig - Customizes the video insertion modal labels.
16
+ * @param props.linkConfig - Customizes the link insertion modal labels.
15
17
  * @param props.defaultValue - Initial editor content as a Slate JSON string. Default: "[]"
16
18
  * @param props.maxLimit - Maximum character count. Default: 10000
17
19
  * @param props.enforceCharacterLimit - Prevents typing past `maxLimit`. Default: false
@@ -47,6 +49,13 @@ import "./styles.css";
47
49
  * label="Article Body"
48
50
  * imageConfig={{ action: "/api/upload" }}
49
51
  * />
52
+ *
53
+ * // With custom link insertion modal labels
54
+ * <RichText
55
+ * name="article"
56
+ * label="Article Body"
57
+ * linkConfig={{ modalTitle: "Add a link" }}
58
+ * />
50
59
  * ```
51
60
  */
52
61
  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":"AAuBA,OAAO,KAAK,EAEX,aAAa,EACb,MAAM,2BAA2B,CAAC;AAQnC,OAAO,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,+BAuMrC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/richText/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAEX,aAAa,EACb,MAAM,2BAA2B,CAAC;AASnC,OAAO,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,+BA0MrC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { RichTextInsertLinkProps } from "../../../types/richTextTypes";
2
+ import "./styles.css";
3
+ declare function InsertLink(props: RichTextInsertLinkProps): import("react").JSX.Element;
4
+ export { InsertLink };
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAQ7E,OAAO,cAAc,CAAC;AAEtB,iBAAS,WAAW,CAAC,KAAK,EAAE,wBAAwB,+BA4GnD;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
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,4 +1,5 @@
1
1
  import type { RenderLeafProps } from "slate-react";
2
+ import "./styles.css";
2
3
  declare function Leaf({ attributes, children, leaf }: RenderLeafProps): import("react").JSX.Element;
3
4
  export { Leaf };
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -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;AAEnD,iBAAS,IAAI,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,eAAe,+BAO5D;AAED,OAAO,EAAE,IAAI,EAAE,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"}