@bbl-digital/snorre 4.1.4 → 4.1.5

Sign up to get free protection for your applications and to get access to all the features.
package/dist/bundle.js CHANGED
@@ -35592,14 +35592,14 @@ to {top: 100vh;}
35592
35592
  }, (range, context) => {
35593
35593
  return handleBackspaceWithIndentetList(range, context, quillInstance);
35594
35594
  });
35595
+ // Move the last binding in the list, to the top. Ensure that the custom binding is called first.
35596
+ quillInstance.keyboard.bindings['Backspace'].unshift(quillInstance.keyboard.bindings['Backspace'].pop());
35595
35597
  quillInstance.keyboard.addBinding({
35596
35598
  key: 'Escape'
35597
35599
  }, () => {
35598
35600
  // Remove focus from editor
35599
35601
  quillInstance.blur();
35600
35602
  });
35601
- // Move the last binding in the list, to the top. Ensure that the custom binding is called first.
35602
- quillInstance.keyboard.bindings['Backspace'].unshift(quillInstance.keyboard.bindings['Backspace'].pop());
35603
35603
  if (initialValue !== undefined) {
35604
35604
  if (quillInstance.root.innerHTML !== initialValue) {
35605
35605
  const delta = quillInstance.clipboard.convert({
@@ -35652,18 +35652,18 @@ to {top: 100vh;}
35652
35652
  if (!quill) return;
35653
35653
  quill.on('text-change', handleChange);
35654
35654
  quill.on('selection-change', (range, oldRange, source) => {
35655
+ // onSelectionChange && onSelectionChange(range, source, quill)
35655
35656
  if (range) {
35656
35657
  handelFocus();
35657
35658
  } else {
35658
35659
  handleBlur();
35659
35660
  }
35660
- onSelectionChange && onSelectionChange(range, source, quill);
35661
35661
  });
35662
35662
  return () => {
35663
35663
  quill.off('text-change', handleChange);
35664
35664
  quill.off('selection-change');
35665
35665
  };
35666
- }, [quill?.container]);
35666
+ }, [quill]);
35667
35667
  return jsxRuntime.jsxs("div", {
35668
35668
  css: theme => [styles.default(theme, maxHeight)],
35669
35669
  children: [label && jsxRuntime.jsx(Label, {
@@ -189,14 +189,14 @@ const QuillEditor = ({
189
189
  }, (range, context) => {
190
190
  return handleBackspaceWithIndentetList(range, context, quillInstance);
191
191
  });
192
+ // Move the last binding in the list, to the top. Ensure that the custom binding is called first.
193
+ quillInstance.keyboard.bindings['Backspace'].unshift(quillInstance.keyboard.bindings['Backspace'].pop());
192
194
  quillInstance.keyboard.addBinding({
193
195
  key: 'Escape'
194
196
  }, () => {
195
197
  // Remove focus from editor
196
198
  quillInstance.blur();
197
199
  });
198
- // Move the last binding in the list, to the top. Ensure that the custom binding is called first.
199
- quillInstance.keyboard.bindings['Backspace'].unshift(quillInstance.keyboard.bindings['Backspace'].pop());
200
200
  if (initialValue !== undefined) {
201
201
  if (quillInstance.root.innerHTML !== initialValue) {
202
202
  const delta = quillInstance.clipboard.convert({
@@ -249,18 +249,18 @@ const QuillEditor = ({
249
249
  if (!quill) return;
250
250
  quill.on('text-change', handleChange);
251
251
  quill.on('selection-change', (range, oldRange, source) => {
252
+ // onSelectionChange && onSelectionChange(range, source, quill)
252
253
  if (range) {
253
254
  handelFocus();
254
255
  } else {
255
256
  handleBlur();
256
257
  }
257
- onSelectionChange && onSelectionChange(range, source, quill);
258
258
  });
259
259
  return () => {
260
260
  quill.off('text-change', handleChange);
261
261
  quill.off('selection-change');
262
262
  };
263
- }, [quill?.container]);
263
+ }, [quill]);
264
264
  return _jsxs("div", {
265
265
  css: theme => [styles.default(theme, maxHeight)],
266
266
  children: [label && _jsx(Label, {
@@ -189,14 +189,14 @@ const QuillEditor = ({
189
189
  }, (range, context) => {
190
190
  return handleBackspaceWithIndentetList(range, context, quillInstance);
191
191
  });
192
+ // Move the last binding in the list, to the top. Ensure that the custom binding is called first.
193
+ quillInstance.keyboard.bindings['Backspace'].unshift(quillInstance.keyboard.bindings['Backspace'].pop());
192
194
  quillInstance.keyboard.addBinding({
193
195
  key: 'Escape'
194
196
  }, () => {
195
197
  // Remove focus from editor
196
198
  quillInstance.blur();
197
199
  });
198
- // Move the last binding in the list, to the top. Ensure that the custom binding is called first.
199
- quillInstance.keyboard.bindings['Backspace'].unshift(quillInstance.keyboard.bindings['Backspace'].pop());
200
200
  if (initialValue !== undefined) {
201
201
  if (quillInstance.root.innerHTML !== initialValue) {
202
202
  const delta = quillInstance.clipboard.convert({
@@ -249,18 +249,18 @@ const QuillEditor = ({
249
249
  if (!quill) return;
250
250
  quill.on('text-change', handleChange);
251
251
  quill.on('selection-change', (range, oldRange, source) => {
252
+ // onSelectionChange && onSelectionChange(range, source, quill)
252
253
  if (range) {
253
254
  handelFocus();
254
255
  } else {
255
256
  handleBlur();
256
257
  }
257
- onSelectionChange && onSelectionChange(range, source, quill);
258
258
  });
259
259
  return () => {
260
260
  quill.off('text-change', handleChange);
261
261
  quill.off('selection-change');
262
262
  };
263
- }, [quill?.container]);
263
+ }, [quill]);
264
264
  return _jsxs("div", {
265
265
  css: theme => [styles.default(theme, maxHeight)],
266
266
  children: [label && _jsx(Label, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "4.1.4",
3
+ "version": "4.1.5",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",