@commercetools-uikit/rich-text-utils 19.8.0 → 19.10.0

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.
@@ -2841,7 +2841,7 @@ RichTextEditorBody.defaultProps = defaultProps;
2841
2841
  var RichTextEditorBody$1 = RichTextEditorBody;
2842
2842
 
2843
2843
  // NOTE: This string will be replaced on build time with the package version.
2844
- var version = "19.8.0";
2844
+ var version = "19.10.0";
2845
2845
 
2846
2846
  exports.Element = Element;
2847
2847
  exports.HiddenInput = HiddenInput$1;
@@ -2717,7 +2717,7 @@ RichTextEditorBody.defaultProps = defaultProps;
2717
2717
  var RichTextEditorBody$1 = RichTextEditorBody;
2718
2718
 
2719
2719
  // NOTE: This string will be replaced on build time with the package version.
2720
- var version = "19.8.0";
2720
+ var version = "19.10.0";
2721
2721
 
2722
2722
  exports.Element = Element;
2723
2723
  exports.HiddenInput = HiddenInput$1;
@@ -2804,6 +2804,6 @@ RichTextEditorBody.defaultProps = defaultProps;
2804
2804
  var RichTextEditorBody$1 = RichTextEditorBody;
2805
2805
 
2806
2806
  // NOTE: This string will be replaced on build time with the package version.
2807
- var version = "19.8.0";
2807
+ var version = "19.10.0";
2808
2808
 
2809
2809
  export { Element, HiddenInput$1 as HiddenInput, Leaf, RichTextEditorBody$1 as RichTextBody, Softbreaker, focusEditor, html$1 as html, isBlockActive, isRichTextEmpty as isEmpty, isMarkActive, index as localized, resetEditor, toggleBlock, toggleMark, validSlateStateAdapter, version };
@@ -10,12 +10,31 @@ declare const toggleBlock: (editor: TEditor, format: Format) => void;
10
10
  declare const validSlateStateAdapter: (value: Deserialized | Deserialized[]) => Descendant[];
11
11
  declare const resetEditor: (editor: Editor, resetValue?: string) => void;
12
12
  declare const focusEditor: (editor: Editor) => void;
13
+ /**
14
+ * Softbreaker is a helper that is used to ensure
15
+ * that slate editor can handle html-linebreaks correctly.
16
+ */
13
17
  declare const Softbreaker: {
18
+ /**
19
+ * The character that slate-editor considers a soft-linebreak
20
+ */
14
21
  placeholderCharacter: string;
22
+ /**
23
+ * Returns a formatted version of the soft-linebreak character
24
+ * which can be used by internal slate editor functions
25
+ */
15
26
  getSlatePlaceholder(): {
16
27
  text: string;
17
28
  };
29
+ /**
30
+ * replaces the slate-placeholder character with the html
31
+ * equivalent = <br/>
32
+ */
18
33
  serialize(str: string): string;
34
+ /**
35
+ * Initial HMTL needs to be cleaned from soft-linebreak characters,
36
+ * otherwise they are being transformed into <br/> tags
37
+ */
19
38
  cleanHtml(html: string): string;
20
39
  };
21
40
  export { Element, Leaf, Softbreaker, isMarkActive, isBlockActive, toggleMark, toggleBlock, validSlateStateAdapter, resetEditor, focusEditor, };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/rich-text-utils",
3
3
  "description": "Utilities for working with rich-text components.",
4
- "version": "19.8.0",
4
+ "version": "19.10.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,12 +24,12 @@
24
24
  "dependencies": {
25
25
  "@babel/runtime": "^7.20.13",
26
26
  "@babel/runtime-corejs3": "^7.20.13",
27
- "@commercetools-uikit/design-system": "19.8.0",
28
- "@commercetools-uikit/icons": "19.8.0",
29
- "@commercetools-uikit/input-utils": "19.8.0",
30
- "@commercetools-uikit/spacings-inline": "19.8.0",
31
- "@commercetools-uikit/tooltip": "19.8.0",
32
- "@commercetools-uikit/utils": "19.8.0",
27
+ "@commercetools-uikit/design-system": "19.10.0",
28
+ "@commercetools-uikit/icons": "19.10.0",
29
+ "@commercetools-uikit/input-utils": "19.10.0",
30
+ "@commercetools-uikit/spacings-inline": "19.10.0",
31
+ "@commercetools-uikit/tooltip": "19.10.0",
32
+ "@commercetools-uikit/utils": "19.10.0",
33
33
  "@emotion/react": "^11.10.5",
34
34
  "@emotion/styled": "^11.10.5",
35
35
  "@types/escape-html": "1.0.4",