@bbl-digital/snorre 4.0.93 → 4.0.94

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/bundle.js CHANGED
@@ -35386,10 +35386,27 @@ to {top: 100vh;}
35386
35386
 
35387
35387
  /** @jsxImportSource @emotion/react */
35388
35388
  const Parchment = Quill__default["default"].import('parchment');
35389
+
35390
+ // Colors
35391
+ Quill__default["default"].register(Quill__default["default"].import('attributors/style/color'), true);
35392
+ // Background colors
35393
+ Quill__default["default"].register(Quill__default["default"].import('attributors/style/background'), true);
35389
35394
  //Text direction
35390
35395
  Quill__default["default"].register(Quill__default["default"].import('attributors/style/direction'), true);
35391
35396
  //Alignment
35392
35397
  Quill__default["default"].register(Quill__default["default"].import('attributors/style/align'), true);
35398
+ // Image
35399
+ Quill__default["default"].register('attributors/style/image', true);
35400
+ // Video
35401
+ Quill__default["default"].register('attributors/style/video', true);
35402
+ // Strike
35403
+ Quill__default["default"].register('attributors/style/strike', true);
35404
+ // Table
35405
+ Quill__default["default"].register('attributors/style/table', true);
35406
+ // Underline
35407
+ Quill__default["default"].register('attributors/style/underline', true);
35408
+ // Bold
35409
+ Quill__default["default"].register('attributors/style/bold', true);
35393
35410
  // Text sizes
35394
35411
  const Size = Quill__default["default"].import('attributors/style/size');
35395
35412
  Size.whitelist = ['0.75em', '1em', '1.5em', '2.5em'];
@@ -35398,6 +35415,11 @@ to {top: 100vh;}
35398
35415
  scope: Parchment.Scope.BLOCK,
35399
35416
  whitelist: ['1em', '2em', '3em', '4em', '5em', '6em', '7em', '8em', '9em']
35400
35417
  });
35418
+
35419
+ // Font
35420
+ const Font = Quill__default["default"].import('formats/font');
35421
+ Font.whitelist = ['Source Sans Pro', 'sans-serif'];
35422
+ Quill__default["default"].register(Font, true);
35401
35423
  const Container = MyListContainer;
35402
35424
  Container.allowedChildren = [MyListItem];
35403
35425
  Quill__default["default"].register(IndentStyle, true);
@@ -35445,7 +35467,10 @@ to {top: 100vh;}
35445
35467
  custom: customModules.toolbar
35446
35468
  };
35447
35469
  const modules = {
35448
- toolbar: toolbars[type || 'basic']
35470
+ toolbar: toolbars[type || 'basic'],
35471
+ clipboard: {
35472
+ matchVisual: false
35473
+ }
35449
35474
  };
35450
35475
  const handleChange = React.useCallback((delta, oldDelta, source) => {
35451
35476
  if (quill && onChange) {
@@ -10,7 +10,7 @@ export const Default = {
10
10
  onChange: e => console.log(e),
11
11
  onBlur: () => console.log('blur'),
12
12
  onFocus: () => console.log('focus'),
13
- overrideValue: "<p>Initial value</p>",
13
+ initialValue: "<p>Initial value</p>",
14
14
  onSelectionChange: (range, source, quill) => console.log(range, source, quill)
15
15
  });
16
16
  },
@@ -12,10 +12,27 @@ import { MyListContainer } from './Attributors/ListContainer';
12
12
  import { IndentAttributor } from './Attributors/IndentAttributor';
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
14
14
  const Parchment = Quill.import('parchment');
15
+
16
+ // Colors
17
+ Quill.register(Quill.import('attributors/style/color'), true);
18
+ // Background colors
19
+ Quill.register(Quill.import('attributors/style/background'), true);
15
20
  //Text direction
16
21
  Quill.register(Quill.import('attributors/style/direction'), true);
17
22
  //Alignment
18
23
  Quill.register(Quill.import('attributors/style/align'), true);
24
+ // Image
25
+ Quill.register('attributors/style/image', true);
26
+ // Video
27
+ Quill.register('attributors/style/video', true);
28
+ // Strike
29
+ Quill.register('attributors/style/strike', true);
30
+ // Table
31
+ Quill.register('attributors/style/table', true);
32
+ // Underline
33
+ Quill.register('attributors/style/underline', true);
34
+ // Bold
35
+ Quill.register('attributors/style/bold', true);
19
36
  // Text sizes
20
37
  const Size = Quill.import('attributors/style/size');
21
38
  Size.whitelist = ['0.75em', '1em', '1.5em', '2.5em'];
@@ -24,6 +41,11 @@ let IndentStyle = new IndentAttributor('indent', 'margin-left', {
24
41
  scope: Parchment.Scope.BLOCK,
25
42
  whitelist: ['1em', '2em', '3em', '4em', '5em', '6em', '7em', '8em', '9em']
26
43
  });
44
+
45
+ // Font
46
+ const Font = Quill.import('formats/font');
47
+ Font.whitelist = ['Source Sans Pro', 'sans-serif'];
48
+ Quill.register(Font, true);
27
49
  const Container = MyListContainer;
28
50
  Container.allowedChildren = [MyListItem];
29
51
  Quill.register(IndentStyle, true);
@@ -71,7 +93,10 @@ const QuillEditor = ({
71
93
  custom: customModules.toolbar
72
94
  };
73
95
  const modules = {
74
- toolbar: toolbars[type || 'basic']
96
+ toolbar: toolbars[type || 'basic'],
97
+ clipboard: {
98
+ matchVisual: false
99
+ }
75
100
  };
76
101
  const handleChange = useCallback((delta, oldDelta, source) => {
77
102
  if (quill && onChange) {
@@ -10,7 +10,7 @@ export const Default = {
10
10
  onChange: e => console.log(e),
11
11
  onBlur: () => console.log('blur'),
12
12
  onFocus: () => console.log('focus'),
13
- overrideValue: "<p>Initial value</p>",
13
+ initialValue: "<p>Initial value</p>",
14
14
  onSelectionChange: (range, source, quill) => console.log(range, source, quill)
15
15
  });
16
16
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AAGA,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAqC3C,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA0K3C,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AAGA,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AA2D3C,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6K3C,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -12,10 +12,27 @@ import { MyListContainer } from './Attributors/ListContainer';
12
12
  import { IndentAttributor } from './Attributors/IndentAttributor';
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
14
14
  const Parchment = Quill.import('parchment');
15
+
16
+ // Colors
17
+ Quill.register(Quill.import('attributors/style/color'), true);
18
+ // Background colors
19
+ Quill.register(Quill.import('attributors/style/background'), true);
15
20
  //Text direction
16
21
  Quill.register(Quill.import('attributors/style/direction'), true);
17
22
  //Alignment
18
23
  Quill.register(Quill.import('attributors/style/align'), true);
24
+ // Image
25
+ Quill.register('attributors/style/image', true);
26
+ // Video
27
+ Quill.register('attributors/style/video', true);
28
+ // Strike
29
+ Quill.register('attributors/style/strike', true);
30
+ // Table
31
+ Quill.register('attributors/style/table', true);
32
+ // Underline
33
+ Quill.register('attributors/style/underline', true);
34
+ // Bold
35
+ Quill.register('attributors/style/bold', true);
19
36
  // Text sizes
20
37
  const Size = Quill.import('attributors/style/size');
21
38
  Size.whitelist = ['0.75em', '1em', '1.5em', '2.5em'];
@@ -24,6 +41,11 @@ let IndentStyle = new IndentAttributor('indent', 'margin-left', {
24
41
  scope: Parchment.Scope.BLOCK,
25
42
  whitelist: ['1em', '2em', '3em', '4em', '5em', '6em', '7em', '8em', '9em']
26
43
  });
44
+
45
+ // Font
46
+ const Font = Quill.import('formats/font');
47
+ Font.whitelist = ['Source Sans Pro', 'sans-serif'];
48
+ Quill.register(Font, true);
27
49
  const Container = MyListContainer;
28
50
  Container.allowedChildren = [MyListItem];
29
51
  Quill.register(IndentStyle, true);
@@ -71,7 +93,10 @@ const QuillEditor = ({
71
93
  custom: customModules.toolbar
72
94
  };
73
95
  const modules = {
74
- toolbar: toolbars[type || 'basic']
96
+ toolbar: toolbars[type || 'basic'],
97
+ clipboard: {
98
+ matchVisual: false
99
+ }
75
100
  };
76
101
  const handleChange = useCallback((delta, oldDelta, source) => {
77
102
  if (quill && onChange) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "4.0.93",
3
+ "version": "4.0.94",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",