@zipify/wysiwyg 1.0.0-dev.74 → 1.0.0-dev.77

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/wysiwyg.mjs CHANGED
@@ -14391,6 +14391,12 @@ function importIcon(name) {
14391
14391
  }
14392
14392
  return icon;
14393
14393
  }
14394
+ function isWysiwygContent(content) {
14395
+ return typeof content === "object" && content.__wswg__;
14396
+ }
14397
+ function markWysiwygContent(content) {
14398
+ return { ...content, __wswg__: true };
14399
+ }
14394
14400
  var render$E = function __render__6() {
14395
14401
  var _vm = this;
14396
14402
  var _h = _vm.$createElement;
@@ -18963,6 +18969,7 @@ function useModalToggler({ onBeforeOpened, onClosed, wrapperRef, modalRef } = {}
18963
18969
  const modalEl = useElementRef(modalRef);
18964
18970
  popper2 = createPopper(wrapperEl.value, modalEl.value, {
18965
18971
  placement: "bottom",
18972
+ strategy: "fixed",
18966
18973
  modifiers: [
18967
18974
  {
18968
18975
  name: "offset",
@@ -20484,6 +20491,7 @@ var render$q = function __render__20() {
20484
20491
  ref: "pickerRef",
20485
20492
  attrs: {
20486
20493
  "placement": "bottom-end",
20494
+ "placement-strategy": "fixed",
20487
20495
  "favorite-colors": _vm.favoriteColors,
20488
20496
  "window": _vm.window
20489
20497
  },
@@ -22797,6 +22805,7 @@ function useToolbar({ wrapperRef, offsets, isActiveRef }) {
22797
22805
  function mount(element) {
22798
22806
  popper2 = createPopper(wrapperEl.value, element, {
22799
22807
  placement: "top-start",
22808
+ strategy: "fixed",
22800
22809
  modifiers: [
22801
22810
  {
22802
22811
  name: "offset",
@@ -25952,7 +25961,7 @@ const __vue2_script = {
25952
25961
  });
25953
25962
  const updateToolbar = () => toolbar.update();
25954
25963
  function onChange(content) {
25955
- emit("input", content);
25964
+ emit("input", markWysiwygContent(content));
25956
25965
  updateToolbar();
25957
25966
  }
25958
25967
  const pageBlocks = toRef(props, "pageBlocks");
@@ -26020,5 +26029,6 @@ export {
26020
26029
  NodeFactory,
26021
26030
  NodeTypes,
26022
26031
  TextSettings,
26023
- Wysiwyg
26032
+ Wysiwyg,
26033
+ isWysiwygContent
26024
26034
  };
package/lib/Wysiwyg.vue CHANGED
@@ -21,6 +21,7 @@ import { ContextWindow, FavoriteColors, Storage } from './services';
21
21
  import { Devices } from './enums';
22
22
  import { outClick } from './directives';
23
23
  import { Font } from './models';
24
+ import { markWysiwygContent } from './utils';
24
25
 
25
26
  const MIN_FONT_SIZE = 5;
26
27
  const MAX_FONT_SIZE = 112;
@@ -150,7 +151,7 @@ export default {
150
151
  const updateToolbar = () => toolbar.update();
151
152
 
152
153
  function onChange(content) {
153
- emit('input', content);
154
+ emit('input', markWysiwygContent(content));
154
155
  updateToolbar();
155
156
  }
156
157
 
@@ -2,6 +2,7 @@
2
2
  <ZipifyColorPicker
3
3
  ref="pickerRef"
4
4
  placement="bottom-end"
5
+ placement-strategy="fixed"
5
6
  :favorite-colors="favoriteColors"
6
7
  :window="window"
7
8
  @changeFavoriteColors="updateFavoriteColors"
@@ -14,6 +14,7 @@ export function useModalToggler({ onBeforeOpened, onClosed, wrapperRef, modalRef
14
14
 
15
15
  popper = createPopper(wrapperEl.value, modalEl.value, {
16
16
  placement: 'bottom',
17
+ strategy: 'fixed',
17
18
  modifiers: [
18
19
  {
19
20
  name: 'offset',
@@ -8,6 +8,7 @@ export function useToolbar({ wrapperRef, offsets, isActiveRef }) {
8
8
  function mount(element) {
9
9
  popper = createPopper(wrapperEl.value, element, {
10
10
  placement: 'top-start',
11
+ strategy: 'fixed',
11
12
  modifiers: [
12
13
  {
13
14
  name: 'offset',
package/lib/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { default as Wysiwyg } from './Wysiwyg';
2
2
  export { NodeFactory } from './services';
3
3
  export { NodeTypes, TextSettings, Alignments } from './enums';
4
+ export { isWysiwygContent } from './utils';
@@ -7,3 +7,4 @@ export { convertLineHeight } from './convertLineHeight';
7
7
  export { convertFontSize } from './convertFontSize';
8
8
  export { convertAlignment } from './convertAlignment';
9
9
  export { importIcon } from './importIcon';
10
+ export { isWysiwygContent, markWysiwygContent } from './isWysiwygContent';
@@ -0,0 +1,7 @@
1
+ export function isWysiwygContent(content) {
2
+ return typeof content === 'object' && content.__wswg__;
3
+ }
4
+
5
+ export function markWysiwygContent(content) {
6
+ return { ...content, __wswg__: true };
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zipify/wysiwyg",
3
- "version": "1.0.0-dev.74",
3
+ "version": "1.0.0-dev.77",
4
4
  "description": "Zipify modification of TipTap text editor",
5
5
  "main": "dist/wysiwyg.mjs",
6
6
  "repository": {
@@ -43,7 +43,7 @@
43
43
  "simplebar": "^5.3.8"
44
44
  },
45
45
  "peerDependencies": {
46
- "@zipify/colorpicker": "^2.1",
46
+ "@zipify/colorpicker": "^2.2",
47
47
  "vue": "^2.7"
48
48
  },
49
49
  "devDependencies": {