@zipify/wysiwyg 1.0.0-dev.46 → 1.0.0-dev.49
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 +3 -1
- package/dist/wysiwyg.mjs +24 -14
- package/dist/wysiwyg.mjs.map +1 -0
- package/example/ExampleApp.vue +1 -1
- package/jest.config.js +2 -2
- package/lib/Wysiwyg.vue +14 -2
- package/lib/components/base/colorPicker/ColorPicker.vue +1 -1
- package/lib/composables/useToolbar.js +3 -4
- package/lib/utils/convertColor.js +1 -1
- package/package.json +5 -5
|
@@ -4,6 +4,8 @@ import { resolvePath } from './settings';
|
|
|
4
4
|
|
|
5
5
|
export default defineConfig({
|
|
6
6
|
build: {
|
|
7
|
+
sourcemap: true,
|
|
8
|
+
|
|
7
9
|
lib: {
|
|
8
10
|
entry: resolvePath('./lib/index.js'),
|
|
9
11
|
fileName: 'wysiwyg',
|
|
@@ -11,7 +13,7 @@ export default defineConfig({
|
|
|
11
13
|
},
|
|
12
14
|
|
|
13
15
|
rollupOptions: {
|
|
14
|
-
external: ['vue', 'zipify
|
|
16
|
+
external: ['vue', '@zipify/colorpicker'],
|
|
15
17
|
output: {
|
|
16
18
|
assetFileNames: (asset) => {
|
|
17
19
|
return asset.name === 'style.css' ? 'wysiwyg.css' : asset.name;
|
package/dist/wysiwyg.mjs
CHANGED
|
@@ -2,7 +2,7 @@ var ty = Object.defineProperty;
|
|
|
2
2
|
var ry = (r, e, t) => e in r ? ty(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var xn = (r, e, t) => (ry(r, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import { computed as T, ref as q, watch as tn, inject as z, onUnmounted as Dl, nextTick as pp, provide as ut, onMounted as mp, toRef as fe, reactive as ny } from "vue";
|
|
5
|
-
import { ColorModel as iy, ZipifyColorPicker as oy } from "zipify
|
|
5
|
+
import { ColorModel as iy, ZipifyColorPicker as oy } from "@zipify/colorpicker";
|
|
6
6
|
function ce(r) {
|
|
7
7
|
this.content = r;
|
|
8
8
|
}
|
|
@@ -16049,7 +16049,6 @@ function QP({ wrapperRef: r, offsets: e, isActiveRef: t }) {
|
|
|
16049
16049
|
});
|
|
16050
16050
|
}
|
|
16051
16051
|
return {
|
|
16052
|
-
toolbar: i,
|
|
16053
16052
|
update: () => i == null ? void 0 : i.update(),
|
|
16054
16053
|
mount: o,
|
|
16055
16054
|
isActiveRef: t,
|
|
@@ -18237,22 +18236,26 @@ const Ra = 5, dp = 112, mL = {
|
|
|
18237
18236
|
default: () => window
|
|
18238
18237
|
}
|
|
18239
18238
|
},
|
|
18239
|
+
emits: [
|
|
18240
|
+
"input",
|
|
18241
|
+
"updateFavoriteColors"
|
|
18242
|
+
],
|
|
18240
18243
|
setup(r, { emit: e }) {
|
|
18241
18244
|
wt.use(r.window);
|
|
18242
|
-
const t = r.fonts.map((
|
|
18243
|
-
var
|
|
18244
|
-
return ((
|
|
18245
|
+
const t = r.fonts.map((h) => new dL(h)), n = q(null), i = q(null), o = T(() => {
|
|
18246
|
+
var h;
|
|
18247
|
+
return ((h = i.value) == null ? void 0 : h.$el) || document.body;
|
|
18245
18248
|
}), s = QP({
|
|
18246
18249
|
wrapperRef: i,
|
|
18247
18250
|
isActiveRef: fe(r, "active"),
|
|
18248
18251
|
offsets: r.toolbarOffsets
|
|
18249
|
-
});
|
|
18250
|
-
function
|
|
18251
|
-
e("input",
|
|
18252
|
+
}), a = () => s.update();
|
|
18253
|
+
function l(h) {
|
|
18254
|
+
e("input", h), a();
|
|
18252
18255
|
}
|
|
18253
|
-
const
|
|
18256
|
+
const u = fe(r, "pageBlocks"), c = ZP({
|
|
18254
18257
|
content: fe(r, "value"),
|
|
18255
|
-
onChange: (
|
|
18258
|
+
onChange: (h) => l(h),
|
|
18256
18259
|
extensions: fL({
|
|
18257
18260
|
fonts: t,
|
|
18258
18261
|
minFontSize: Ra,
|
|
@@ -18263,14 +18266,20 @@ const Ra = 5, dp = 112, mL = {
|
|
|
18263
18266
|
basePresetClass: r.basePresetClass,
|
|
18264
18267
|
baseListClass: r.baseListClass,
|
|
18265
18268
|
deviceRef: fe(r, "device"),
|
|
18266
|
-
pageBlocksRef:
|
|
18269
|
+
pageBlocksRef: u,
|
|
18267
18270
|
wrapperRef: o
|
|
18268
18271
|
})
|
|
18269
|
-
}),
|
|
18272
|
+
}), f = new Array(dp - Ra + 1).fill(0).map((h, p) => String(p + Ra)), d = new sI({
|
|
18270
18273
|
listRef: fe(r, "favoriteColors"),
|
|
18271
|
-
triggerUpdate: (
|
|
18274
|
+
triggerUpdate: (h) => e("updateFavoriteColors", h)
|
|
18272
18275
|
});
|
|
18273
|
-
return ut(L.EDITOR,
|
|
18276
|
+
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
|
+
editor: c,
|
|
18278
|
+
toolbarRef: n,
|
|
18279
|
+
wysiwygRef: i,
|
|
18280
|
+
toolbar: s,
|
|
18281
|
+
updateToolbar: a
|
|
18282
|
+
};
|
|
18274
18283
|
}
|
|
18275
18284
|
}, hp = {};
|
|
18276
18285
|
var vL = /* @__PURE__ */ $(
|
|
@@ -18293,3 +18302,4 @@ const SL = /* @__PURE__ */ function() {
|
|
|
18293
18302
|
export {
|
|
18294
18303
|
SL as Wysiwyg
|
|
18295
18304
|
};
|
|
18305
|
+
//# sourceMappingURL=wysiwyg.mjs.map
|