@zipify/wysiwyg 1.0.0-dev.55 → 1.0.0-dev.58
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/config/vite/lib.config.js +0 -2
- package/dist/wysiwyg.mjs +7 -6
- package/lib/Wysiwyg.vue +2 -2
- package/lib/components/base/colorPicker/composables/usePickerApi.js +2 -2
- package/lib/extensions/list/List.js +1 -2
- package/lib/extensions/list/__tests__/__snapshots__/List.test.js.snap +15 -5
- package/package.json +5 -2
- package/dist/wysiwyg.mjs.map +0 -1
package/dist/wysiwyg.mjs
CHANGED
|
@@ -13994,13 +13994,15 @@ function iN({ pickerRef: r, initialColorRef: e, onClosed: t, onBeforeOpened: n }
|
|
|
13994
13994
|
n(), i.value = e.value, r.value.open(r.value.$el);
|
|
13995
13995
|
}
|
|
13996
13996
|
function a() {
|
|
13997
|
-
|
|
13997
|
+
var c;
|
|
13998
|
+
(c = r.value) == null || c.close(i.value), t(i.value);
|
|
13998
13999
|
}
|
|
13999
14000
|
function l() {
|
|
14000
14001
|
o.value ? a() : s();
|
|
14001
14002
|
}
|
|
14002
14003
|
function u() {
|
|
14003
|
-
|
|
14004
|
+
var c;
|
|
14005
|
+
i.value = e.value, (c = r.value) == null || c.close(i.value);
|
|
14004
14006
|
}
|
|
14005
14007
|
return {
|
|
14006
14008
|
isOpened: o,
|
|
@@ -16870,9 +16872,9 @@ const rB = te.create({
|
|
|
16870
16872
|
r.applyDefaultPreset();
|
|
16871
16873
|
return;
|
|
16872
16874
|
}
|
|
16873
|
-
return e().
|
|
16875
|
+
return e().applyDefaultPreset()._addList(t).run();
|
|
16874
16876
|
}),
|
|
16875
|
-
_addList: O(({ chain: r }, e) => r().
|
|
16877
|
+
_addList: O(({ chain: r }, e) => r().toggleList(ee.LIST, ee.LIST_ITEM).setBlockAttributes("bullet", { type: e }).run()),
|
|
16876
16878
|
removeList: O(({ commands: r }) => {
|
|
16877
16879
|
r.liftListItem(ee.LIST_ITEM);
|
|
16878
16880
|
})
|
|
@@ -18271,7 +18273,7 @@ const Ra = 5, dp = 112, mL = {
|
|
|
18271
18273
|
})
|
|
18272
18274
|
}), f = new Array(dp - Ra + 1).fill(0).map((h, p) => String(p + Ra)), d = new sI({
|
|
18273
18275
|
listRef: fe(r, "favoriteColors"),
|
|
18274
|
-
triggerUpdate: (h) => e("
|
|
18276
|
+
triggerUpdate: (h) => e("update-favorite-colors", h)
|
|
18275
18277
|
});
|
|
18276
18278
|
return ut(L.EDITOR, c), ut(L.FONTS, t), ut(L.FONT_SIZES, f), ut(L.LOCAL_STORAGE, new oI(localStorage)), ut(L.FAVORITE_COLORS, d), ut(L.PAGE_BLOCKS, u), {
|
|
18277
18279
|
editor: c,
|
|
@@ -18302,4 +18304,3 @@ const SL = /* @__PURE__ */ function() {
|
|
|
18302
18304
|
export {
|
|
18303
18305
|
SL as Wysiwyg
|
|
18304
18306
|
};
|
|
18305
|
-
//# sourceMappingURL=wysiwyg.mjs.map
|
package/lib/Wysiwyg.vue
CHANGED
|
@@ -112,7 +112,7 @@ export default {
|
|
|
112
112
|
|
|
113
113
|
emits: [
|
|
114
114
|
'input',
|
|
115
|
-
'
|
|
115
|
+
'update-favorite-colors'
|
|
116
116
|
],
|
|
117
117
|
|
|
118
118
|
setup(props, { emit }) {
|
|
@@ -162,7 +162,7 @@ export default {
|
|
|
162
162
|
|
|
163
163
|
const favoriteColors = new FavoriteColors({
|
|
164
164
|
listRef: toRef(props, 'favoriteColors'),
|
|
165
|
-
triggerUpdate: (colors) => emit('
|
|
165
|
+
triggerUpdate: (colors) => emit('update-favorite-colors', colors)
|
|
166
166
|
});
|
|
167
167
|
|
|
168
168
|
provide(InjectionTokens.EDITOR, editor);
|
|
@@ -11,7 +11,7 @@ export function usePickerApi({ pickerRef, initialColorRef, onClosed, onBeforeOpe
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
function close() {
|
|
14
|
-
pickerRef.value
|
|
14
|
+
pickerRef.value?.close(editingColor.value);
|
|
15
15
|
onClosed(editingColor.value);
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ export function usePickerApi({ pickerRef, initialColorRef, onClosed, onBeforeOpe
|
|
|
21
21
|
|
|
22
22
|
function cancel() {
|
|
23
23
|
editingColor.value = initialColorRef.value;
|
|
24
|
-
pickerRef.value
|
|
24
|
+
pickerRef.value?.close(editingColor.value);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
return {
|
|
@@ -80,12 +80,11 @@ export const List = Node.create({
|
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
return chain().
|
|
83
|
+
return chain().applyDefaultPreset()._addList(type).run();
|
|
84
84
|
}),
|
|
85
85
|
|
|
86
86
|
_addList: createCommand(({ chain }, type) => {
|
|
87
87
|
return chain()
|
|
88
|
-
.removePreset()
|
|
89
88
|
.toggleList(NodeTypes.LIST, NodeTypes.LIST_ITEM)
|
|
90
89
|
.setBlockAttributes('bullet', { type })
|
|
91
90
|
.run();
|
|
@@ -14,7 +14,9 @@ Object {
|
|
|
14
14
|
"content": Array [
|
|
15
15
|
Object {
|
|
16
16
|
"attrs": Object {
|
|
17
|
-
"preset":
|
|
17
|
+
"preset": Object {
|
|
18
|
+
"id": "regular-1",
|
|
19
|
+
},
|
|
18
20
|
},
|
|
19
21
|
"content": Array [
|
|
20
22
|
Object {
|
|
@@ -49,7 +51,9 @@ Object {
|
|
|
49
51
|
"content": Array [
|
|
50
52
|
Object {
|
|
51
53
|
"attrs": Object {
|
|
52
|
-
"preset":
|
|
54
|
+
"preset": Object {
|
|
55
|
+
"id": "regular-1",
|
|
56
|
+
},
|
|
53
57
|
},
|
|
54
58
|
"content": Array [
|
|
55
59
|
Object {
|
|
@@ -66,7 +70,9 @@ Object {
|
|
|
66
70
|
"content": Array [
|
|
67
71
|
Object {
|
|
68
72
|
"attrs": Object {
|
|
69
|
-
"preset":
|
|
73
|
+
"preset": Object {
|
|
74
|
+
"id": "regular-1",
|
|
75
|
+
},
|
|
70
76
|
},
|
|
71
77
|
"content": Array [
|
|
72
78
|
Object {
|
|
@@ -137,7 +143,9 @@ Object {
|
|
|
137
143
|
"content": Array [
|
|
138
144
|
Object {
|
|
139
145
|
"attrs": Object {
|
|
140
|
-
"preset":
|
|
146
|
+
"preset": Object {
|
|
147
|
+
"id": "regular-1",
|
|
148
|
+
},
|
|
141
149
|
},
|
|
142
150
|
"content": Array [
|
|
143
151
|
Object {
|
|
@@ -154,7 +162,9 @@ Object {
|
|
|
154
162
|
"content": Array [
|
|
155
163
|
Object {
|
|
156
164
|
"attrs": Object {
|
|
157
|
-
"preset":
|
|
165
|
+
"preset": Object {
|
|
166
|
+
"id": "regular-1",
|
|
167
|
+
},
|
|
158
168
|
},
|
|
159
169
|
"content": Array [
|
|
160
170
|
Object {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zipify/wysiwyg",
|
|
3
|
-
"version": "1.0.0-dev.
|
|
3
|
+
"version": "1.0.0-dev.58",
|
|
4
4
|
"description": "Zipify modification of TipTap text editor",
|
|
5
5
|
"main": "dist/wysiwyg.mjs",
|
|
6
6
|
"repository": {
|
|
@@ -14,11 +14,14 @@
|
|
|
14
14
|
"url": "https://github.com/ZipifyApps/ZipifyWysiwyg/issues"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
|
-
"lib:build": "
|
|
17
|
+
"lib:pre-build": "npm run lint:js && npm run lint:css && npm run test:unit",
|
|
18
|
+
"lib:build": "npm run lib:pre-build && vite build --config ./config/vite/lib.config.js",
|
|
18
19
|
"lib:release": "export $(cat ./.env | xargs) && npm run lib:build && release-it",
|
|
19
20
|
"example:start": "NODE_ENV=development vite serve --config ./config/vite/example.config.js",
|
|
20
21
|
"example:build": "NODE_ENV=production vite build --config ./config/vite/example.config.js",
|
|
21
22
|
"test:unit": "jest .",
|
|
23
|
+
"lint:js": "eslint ./lib/**/*.{js,vue}",
|
|
24
|
+
"lint:css": "stylelint ./lib/**/*.{css,vue}",
|
|
22
25
|
"optimize-svg": "svgo --config ./config/svgo.js",
|
|
23
26
|
"gzip": "gzipper compress",
|
|
24
27
|
"prepare": "husky install"
|