@zipify/wysiwyg 4.12.0-beta.3 → 4.13.0-beta.0
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/cli.js +25 -25
- package/dist/node.js +19 -19
- package/dist/types/components/toolbar/controls/LetterSpacingControl.vue.d.ts +2 -0
- package/dist/types/enums/TextSetting.d.ts +1 -0
- package/dist/types/extensions/LetterSpacing.d.ts +2 -0
- package/dist/types/utils/convertEmToPx.d.ts +1 -0
- package/dist/types/utils/convertLetterSpacing.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/wysiwyg.css +46 -28
- package/dist/wysiwyg.mjs +312 -148
- package/example/presets.js +227 -203
- package/lib/assets/icons/letter-spacing.svg +3 -0
- package/lib/components/base/NumberField.vue +2 -2
- package/lib/components/toolbar/controls/LetterSpacingControl.vue +96 -0
- package/lib/components/toolbar/controls/index.js +1 -0
- package/lib/components/toolbar/layouts/ToolbarDesktop.vue +2 -0
- package/lib/components/toolbar/layouts/ToolbarMobile.vue +2 -0
- package/lib/enums/TextSetting.ts +2 -0
- package/lib/extensions/LetterSpacing.js +79 -0
- package/lib/extensions/__tests__/LetterSpacing.test.js +129 -0
- package/lib/extensions/__tests__/__snapshots__/LetterSpacing.test.js.snap +151 -0
- package/lib/extensions/core/NodeProcessor.js +1 -1
- package/lib/extensions/index.js +2 -0
- package/lib/styles/content.css +3 -0
- package/lib/utils/convertEmToPx.ts +8 -0
- package/lib/utils/convertFontSize.js +2 -7
- package/lib/utils/convertLetterSpacing.ts +5 -0
- package/lib/utils/index.ts +1 -0
- package/package.json +1 -1
package/dist/wysiwyg.mjs
CHANGED
|
@@ -19334,6 +19334,7 @@ var TextSetting = /* @__PURE__ */ ((TextSetting2) => {
|
|
|
19334
19334
|
TextSetting2["FONT_STYLE"] = "font_style";
|
|
19335
19335
|
TextSetting2["FONT_WEIGHT"] = "font_weight";
|
|
19336
19336
|
TextSetting2["LINE_HEIGHT"] = "line_height";
|
|
19337
|
+
TextSetting2["LETTER_SPACING"] = "letter_spacing";
|
|
19337
19338
|
TextSetting2["TEXT_DECORATION"] = "text_decoration";
|
|
19338
19339
|
TextSetting2["SUPERSCRIPT"] = "superscript";
|
|
19339
19340
|
TextSetting2["MARGIN"] = "margin";
|
|
@@ -19365,6 +19366,7 @@ const TextBlockMarkList = [
|
|
|
19365
19366
|
"font_size",
|
|
19366
19367
|
"font_style",
|
|
19367
19368
|
"font_weight",
|
|
19369
|
+
"letter_spacing",
|
|
19368
19370
|
"text_decoration",
|
|
19369
19371
|
"superscript"
|
|
19370
19372
|
/* SUPERSCRIPT */
|
|
@@ -19391,17 +19393,17 @@ const _export_sfc = (sfc, props) => {
|
|
|
19391
19393
|
}
|
|
19392
19394
|
return target;
|
|
19393
19395
|
};
|
|
19394
|
-
const _sfc_main$
|
|
19396
|
+
const _sfc_main$M = {
|
|
19395
19397
|
name: "ToolbarGroup"
|
|
19396
19398
|
};
|
|
19397
|
-
const _hoisted_1$
|
|
19399
|
+
const _hoisted_1$q = { class: "zw-toolbar__group" };
|
|
19398
19400
|
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19399
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
19401
|
+
return openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
19400
19402
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
19401
19403
|
]);
|
|
19402
19404
|
}
|
|
19403
|
-
const ToolbarGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
19404
|
-
const _sfc_main$
|
|
19405
|
+
const ToolbarGroup = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$4], ["__scopeId", "data-v-8467d9b8"]]);
|
|
19406
|
+
const _sfc_main$L = {
|
|
19405
19407
|
name: "ToolbarDivider",
|
|
19406
19408
|
props: {
|
|
19407
19409
|
vertical: {
|
|
@@ -19428,17 +19430,17 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19428
19430
|
class: normalizeClass(["zw-toolbar__divider", $setup.classes])
|
|
19429
19431
|
}, null, 2);
|
|
19430
19432
|
}
|
|
19431
|
-
const ToolbarDivider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
19432
|
-
const _sfc_main$
|
|
19433
|
+
const ToolbarDivider = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$3], ["__scopeId", "data-v-1a453fb5"]]);
|
|
19434
|
+
const _sfc_main$K = {
|
|
19433
19435
|
name: "ToolbarRow"
|
|
19434
19436
|
};
|
|
19435
|
-
const _hoisted_1$
|
|
19437
|
+
const _hoisted_1$p = { class: "zw-toolbar__row" };
|
|
19436
19438
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19437
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
19439
|
+
return openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
19438
19440
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
19439
19441
|
]);
|
|
19440
19442
|
}
|
|
19441
|
-
const ToolbarRow = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
19443
|
+
const ToolbarRow = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$2], ["__scopeId", "data-v-14a4e361"]]);
|
|
19442
19444
|
const InjectionTokens$1 = Object.freeze({
|
|
19443
19445
|
FONTS: Symbol("fonts"),
|
|
19444
19446
|
FONT_SIZES: Symbol("fontSizes"),
|
|
@@ -21327,11 +21329,13 @@ function createKeyboardShortcut(command2, ...args) {
|
|
|
21327
21329
|
function convertColor(raw) {
|
|
21328
21330
|
return normalizeColor(raw);
|
|
21329
21331
|
}
|
|
21330
|
-
function
|
|
21331
|
-
if (!value.includes("em")) return parseInt(value);
|
|
21332
|
+
function convertEmToPx(value, wrapperEl) {
|
|
21332
21333
|
const containerValue = ContextWindow.getComputedStyle(wrapperEl).fontSize;
|
|
21333
21334
|
const size = parseFloat(value) * parseFloat(containerValue);
|
|
21334
|
-
return Math.round(size);
|
|
21335
|
+
return Math.round(size * 10) / 10;
|
|
21336
|
+
}
|
|
21337
|
+
function convertFontSize(value, wrapperEl) {
|
|
21338
|
+
return String(value).includes("em") ? Math.round(convertEmToPx(value, wrapperEl)) : parseInt(value);
|
|
21335
21339
|
}
|
|
21336
21340
|
function getFontSize(sourceEl, wrapperEl) {
|
|
21337
21341
|
const source = sourceEl.firstElementChild || sourceEl;
|
|
@@ -21344,6 +21348,9 @@ function convertLineHeight(value, sourceEl, wrapperEl) {
|
|
|
21344
21348
|
const fontSize = convertFontSize(rawFontSize, wrapperEl);
|
|
21345
21349
|
return fontSize ? (parseInt(value) / fontSize).toFixed(2) : null;
|
|
21346
21350
|
}
|
|
21351
|
+
function convertLetterSpacing(value, wrapperEl) {
|
|
21352
|
+
return String(value).includes("em") ? convertEmToPx(value, wrapperEl) : parseFloat(value);
|
|
21353
|
+
}
|
|
21347
21354
|
const MAPPING = {
|
|
21348
21355
|
start: Alignment.LEFT,
|
|
21349
21356
|
end: Alignment.RIGHT
|
|
@@ -21361,21 +21368,22 @@ const __vite_glob_0_5 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" sty
|
|
|
21361
21368
|
const __vite_glob_0_6 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M16.64 19.93h-1.715a.75.75 0 0 1-.475-.145.82.82 0 0 1-.268-.359l-.89-2.433H8.35l-.891 2.433a.78.78 0 0 1-.26.347.73.73 0 0 1-.475.157H5L9.686 8h2.269l4.686 11.93Zm-7.72-4.505h3.803l-1.452-3.968a18.048 18.048 0 0 1-.219-.623c-.08-.24-.158-.5-.235-.78-.077.28-.152.542-.227.784a8.742 8.742 0 0 1-.218.635L8.92 15.425Zm14.968 4.505h-.915a.987.987 0 0 1-.454-.087c-.11-.058-.192-.175-.248-.35l-.181-.603a7.005 7.005 0 0 1-.631.507c-.206.146-.42.269-.64.368a3.26 3.26 0 0 1-.7.222c-.248.05-.523.075-.826.075-.357 0-.687-.049-.99-.145a2.134 2.134 0 0 1-.78-.433 1.967 1.967 0 0 1-.507-.718 2.545 2.545 0 0 1-.181-.998c0-.319.084-.634.251-.945.168-.31.447-.59.838-.841.39-.25.91-.458 1.559-.623.649-.165 1.455-.258 2.417-.28v-.495c0-.567-.12-.986-.359-1.259-.239-.272-.587-.408-1.043-.408-.33 0-.605.039-.825.116a3.17 3.17 0 0 0-.574.26 25.11 25.11 0 0 1-.45.26.912.912 0 0 1-.453.115.59.59 0 0 1-.355-.107.843.843 0 0 1-.239-.264l-.371-.652c.973-.891 2.148-1.337 3.523-1.337.494 0 .936.081 1.324.244.387.162.716.387.985.676.27.289.475.634.615 1.036.14.401.21.841.21 1.32v5.346Zm-3.96-1.271c.21 0 .402-.02.578-.058.176-.038.342-.096.5-.173.156-.077.307-.172.453-.285a4.13 4.13 0 0 0 .441-.4v-1.427c-.594.027-1.09.078-1.489.153a3.967 3.967 0 0 0-.961.284c-.242.116-.414.25-.516.404a.894.894 0 0 0-.152.504c0 .357.106.613.317.767.212.154.489.231.83.231Z" clip-rule="evenodd"/>\n</svg>\n';
|
|
21362
21369
|
const __vite_glob_0_7 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M22 20.62a2.42 2.42 0 0 1-4.84 0c0-1.25 2.42-4.54 2.42-4.54S22 19.37 22 20.62ZM9.92 15.425l1.452-3.951c.071-.182.145-.394.219-.636.074-.242.149-.503.226-.783a17.223 17.223 0 0 0 .454 1.402l1.452 3.968H9.919Zm5.411 4.199c.226-.795.658-1.684 1.184-2.562L12.955 8h-2.269L6 19.93h1.725a.736.736 0 0 0 .474-.157.792.792 0 0 0 .26-.347l.891-2.434h4.941l.891 2.434c.031.079.097.134.148.198Z" clip-rule="evenodd"/>\n</svg>\n';
|
|
21363
21370
|
const __vite_glob_0_8 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M18 9V7h-7v2h2.64l-1.22 10H10v2h7v-2h-2.83L15.4 9H18Z"/>\n</svg>\n';
|
|
21364
|
-
const __vite_glob_0_9 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0
|
|
21365
|
-
const __vite_glob_0_10 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="
|
|
21366
|
-
const __vite_glob_0_11 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <
|
|
21367
|
-
const __vite_glob_0_12 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <
|
|
21368
|
-
const __vite_glob_0_13 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <
|
|
21369
|
-
const __vite_glob_0_14 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <
|
|
21370
|
-
const __vite_glob_0_15 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="
|
|
21371
|
-
const __vite_glob_0_16 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="
|
|
21372
|
-
const __vite_glob_0_17 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)"
|
|
21373
|
-
const __vite_glob_0_18 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M14
|
|
21374
|
-
const __vite_glob_0_19 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)"
|
|
21375
|
-
const __vite_glob_0_20 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="
|
|
21376
|
-
const __vite_glob_0_21 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)"
|
|
21377
|
-
const __vite_glob_0_22 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0
|
|
21378
|
-
const
|
|
21371
|
+
const __vite_glob_0_9 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 24 24">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M3 19V5h1.8v14zm16.2 0V5H21v14zM7.815 16.375l3.375-8.75h1.62l3.375 8.75h-1.552l-.81-2.231h-3.645l-.81 2.231zm2.835-3.5h2.7l-1.305-3.631h-.09z" clip-rule="evenodd"/>\n</svg>\n';
|
|
21372
|
+
const __vite_glob_0_10 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="m5 10 3-3 3 3H9v8h2l-3 3-3-3h2v-8H5Zm8-3h10v2H13V7Zm10 6H13v2h10v-2Zm0 6H13v2h10v-2Z" clip-rule="evenodd"/>\n</svg>\n';
|
|
21373
|
+
const __vite_glob_0_11 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M12 17.5h-2a3.5 3.5 0 1 1 0-7h2V9h-2a5 5 0 0 0 0 10h2v-1.5Zm6-4.5h-8v2h8v-2Zm-2-4h2a5 5 0 0 1 0 10h-2v-1.5h2a3.5 3.5 0 1 0 0-7h-2V9Z" clip-rule="evenodd"/>\n</svg>\n';
|
|
21374
|
+
const __vite_glob_0_12 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <rect width="9" height="9" x="9.5" y="9.5" stroke="var(--zw-icon-foreground)" rx="4.5"/>\n</svg>\n';
|
|
21375
|
+
const __vite_glob_0_13 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M15.108 18.184V19H10.5v-.816h1.842v-5.862c0-.176.006-.354.018-.534l-1.53 1.314a.375.375 0 0 1-.156.084.373.373 0 0 1-.27-.048.318.318 0 0 1-.084-.078l-.336-.462 2.562-2.214h.87v7.8h1.692Zm1.519.156a.8.8 0 0 1 .054-.294.829.829 0 0 1 .156-.24.77.77 0 0 1 .534-.222.77.77 0 0 1 .696.462c.04.092.06.19.06.294a.744.744 0 0 1-.222.534.692.692 0 0 1-.24.156.73.73 0 0 1-.294.06.73.73 0 0 1-.294-.06.692.692 0 0 1-.396-.39.816.816 0 0 1-.054-.3Z"/>\n</svg>\n';
|
|
21376
|
+
const __vite_glob_0_14 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <rect width="10" height="10" x="9" y="9" fill="var(--zw-icon-foreground)" rx="5"/>\n</svg>\n';
|
|
21377
|
+
const __vite_glob_0_15 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M12.086 9.802h.834v11.292h-.834V9.802Zm2.592 8.538a.8.8 0 0 1 .054-.294.829.829 0 0 1 .156-.24.77.77 0 0 1 .534-.222.77.77 0 0 1 .696.462c.04.092.06.19.06.294a.744.744 0 0 1-.222.534.692.692 0 0 1-.24.156.73.73 0 0 1-.294.06.73.73 0 0 1-.294-.06.692.692 0 0 1-.396-.39.816.816 0 0 1-.054-.3Z"/>\n</svg>\n';
|
|
21378
|
+
const __vite_glob_0_16 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="m13.664 15.808-1.35-3.498a7.11 7.11 0 0 1-.252-.804c-.084.324-.17.594-.258.81l-1.35 3.492h3.21ZM16.088 19h-.9a.387.387 0 0 1-.252-.078.48.48 0 0 1-.144-.198l-.804-2.076H10.13l-.804 2.076a.421.421 0 0 1-.138.192.383.383 0 0 1-.252.084h-.9l3.438-8.598h1.176L16.088 19Zm.7-.66a.8.8 0 0 1 .053-.294.829.829 0 0 1 .156-.24.77.77 0 0 1 .534-.222.77.77 0 0 1 .696.462c.04.092.06.19.06.294a.744.744 0 0 1-.222.534.692.692 0 0 1-.24.156.73.73 0 0 1-.294.06.73.73 0 0 1-.294-.06.692.692 0 0 1-.396-.39.816.816 0 0 1-.054-.3Z"/>\n</svg>\n';
|
|
21379
|
+
const __vite_glob_0_17 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M9 9h10v10H9z"/>\n</svg>\n';
|
|
21380
|
+
const __vite_glob_0_18 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M14.089 6.726a1 1 0 0 1 1.425-.003l6.8 6.882a1 1 0 0 1 .007 1.398L17.2 20.3l-.2.2c-2.2 2.1-5.7 2-7.8-.2l-3.516-3.6a1 1 0 0 1 0-1.399l8.405-8.575Zm1.81 12.674c.1 0 .2 0 .2-.1l4.8-5-6.1-6.2-5 5.1 6.1 6.2Z" clip-rule="evenodd"/>\n</svg>\n';
|
|
21381
|
+
const __vite_glob_0_19 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M14 9.333V6.666l-3.334 3.333L14 13.333v-2.667c2.206 0 4 1.793 4 4s-1.794 4-4 4c-2.207 0-4-1.793-4-4H8.666A5.332 5.332 0 0 0 14 19.999a5.332 5.332 0 0 0 5.333-5.333A5.332 5.332 0 0 0 14 9.333Z"/>\n</svg>\n';
|
|
21382
|
+
const __vite_glob_0_20 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="m14 12.731.77.27H20v2H8v-2h2.84a2.892 2.892 0 0 1-.46-.71 3.61 3.61 0 0 1-.29-1.52c0-.484.1-.964.29-1.41a3.5 3.5 0 0 1 .83-1.2 4 4 0 0 1 1.35-.84 4.74 4.74 0 0 1 1.83-.32 6 6 0 0 1 2.11.41 5 5 0 0 1 1.68 1l-.46.88a.69.69 0 0 1-.18.22.41.41 0 0 1-.25.07.69.69 0 0 1-.39-.16 5.551 5.551 0 0 0-.56-.36 4.641 4.641 0 0 0-.8-.36 3.44 3.44 0 0 0-1.14-.16 3.16 3.16 0 0 0-1.11.17 2.29 2.29 0 0 0-.8.45 1.87 1.87 0 0 0-.49.67 2.138 2.138 0 0 0-.11.79c-.023.357.08.711.29 1 .206.267.465.489.76.65.338.187.693.34 1.06.46Zm1.99 6.06c.24-.22.427-.49.55-.79.135-.315.2-.657.19-1h1.74a4.58 4.58 0 0 1-.25 1.38 4 4 0 0 1-.91 1.37 4.231 4.231 0 0 1-1.46.92 5.503 5.503 0 0 1-2 .33 6.13 6.13 0 0 1-2.5-.46 5.66 5.66 0 0 1-1.89-1.31l.54-.88a.61.61 0 0 1 .19-.17.45.45 0 0 1 .25-.07.5.5 0 0 1 .28.1c.128.077.251.16.37.25l.46.33c.19.13.391.243.6.34.245.107.5.191.76.25.328.076.664.11 1 .1a3.67 3.67 0 0 0 1.19-.18c.328-.109.63-.282.89-.51Z" clip-rule="evenodd"/>\n</svg>\n';
|
|
21383
|
+
const __vite_glob_0_21 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M21.985 8.625h-1.75V9.5h2.625v.875h-3.5v-1.75c0-.481.394-.875.875-.875h1.75v-.875H19.36V6h2.625c.481 0 .875.394.875.875v.875a.878.878 0 0 1-.875.875ZM7.88 20h2.327l2.975-4.742h.105L16.262 20h2.328l-4.069-6.361L18.32 7.75h-2.345l-2.687 4.366h-.105L10.48 7.75H8.15l3.78 5.889L7.88 20Z"/>\n</svg>\n';
|
|
21384
|
+
const __vite_glob_0_22 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M15.4 16.06a3.3 3.3 0 0 1-1.4.29 3.12 3.12 0 0 1-1.39-.29 2.88 2.88 0 0 1-1.05-.81 3.711 3.711 0 0 1-.65-1.25 5.659 5.659 0 0 1-.22-1.6V7H9v5.41a6.89 6.89 0 0 0 .34 2.22 5.29 5.29 0 0 0 1 1.77c.437.501.975.904 1.58 1.18A5 5 0 0 0 14 18a5 5 0 0 0 2.08-.42 4.61 4.61 0 0 0 1.57-1.18 5.27 5.27 0 0 0 1-1.77 6.89 6.89 0 0 0 .35-2.22V7h-1.69v5.41a5.659 5.659 0 0 1-.22 1.59 3.71 3.71 0 0 1-.69 1.25c-.27.34-.61.617-1 .81ZM20 19H8v2h12v-2Z" clip-rule="evenodd"/>\n</svg>\n';
|
|
21385
|
+
const __vite_glob_0_23 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 20 20">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M18.96 10a5 5 0 0 0-5-5h-2v1.5h2a3.49 3.49 0 0 1 1.58 6.61L13.43 11h.53V9h-2.53l-7-7-1.47 1.47L17.49 18l1.47-1.47-2.34-2.34A4.93 4.93 0 0 0 18.96 10Zm-13 1h1.59L5.96 9.41V11ZM3.81 7.26A3.47 3.47 0 0 0 2.46 10a3.5 3.5 0 0 0 3.5 3.5h2V15h-2a5 5 0 0 1-3.21-8.8l1.06 1.06Z" clip-rule="evenodd"/>\n</svg>\n';
|
|
21386
|
+
const modules = /* @__PURE__ */ Object.assign({ "../assets/icons/alignment-center.svg": __vite_glob_0_0, "../assets/icons/alignment-justify.svg": __vite_glob_0_1, "../assets/icons/alignment-left.svg": __vite_glob_0_2, "../assets/icons/alignment-right.svg": __vite_glob_0_3, "../assets/icons/arrow.svg": __vite_glob_0_4, "../assets/icons/background-color.svg": __vite_glob_0_5, "../assets/icons/case-style.svg": __vite_glob_0_6, "../assets/icons/font-color.svg": __vite_glob_0_7, "../assets/icons/italic.svg": __vite_glob_0_8, "../assets/icons/letter-spacing.svg": __vite_glob_0_9, "../assets/icons/line-height.svg": __vite_glob_0_10, "../assets/icons/link.svg": __vite_glob_0_11, "../assets/icons/list-circle.svg": __vite_glob_0_12, "../assets/icons/list-decimal.svg": __vite_glob_0_13, "../assets/icons/list-disc.svg": __vite_glob_0_14, "../assets/icons/list-latin.svg": __vite_glob_0_15, "../assets/icons/list-roman.svg": __vite_glob_0_16, "../assets/icons/list-square.svg": __vite_glob_0_17, "../assets/icons/remove-format.svg": __vite_glob_0_18, "../assets/icons/reset-styles.svg": __vite_glob_0_19, "../assets/icons/strike-through.svg": __vite_glob_0_20, "../assets/icons/superscript.svg": __vite_glob_0_21, "../assets/icons/underline.svg": __vite_glob_0_22, "../assets/icons/unlink.svg": __vite_glob_0_23 });
|
|
21379
21387
|
function importIcon(name) {
|
|
21380
21388
|
return modules[`../assets/icons/${name}.svg`] || "";
|
|
21381
21389
|
}
|
|
@@ -23246,7 +23254,7 @@ const NodeProcessor = Extension.create({
|
|
|
23246
23254
|
return computed(() => {
|
|
23247
23255
|
for (const attrs of unref(selectionRef)) {
|
|
23248
23256
|
const value = attrs[unref(deviceRef)];
|
|
23249
|
-
if (value) return value;
|
|
23257
|
+
if (value || value === 0) return value;
|
|
23250
23258
|
}
|
|
23251
23259
|
return unref(defaultRef);
|
|
23252
23260
|
});
|
|
@@ -24316,6 +24324,65 @@ const LineHeight = Extension.create({
|
|
|
24316
24324
|
};
|
|
24317
24325
|
}
|
|
24318
24326
|
});
|
|
24327
|
+
const LetterSpacing = Mark2.create({
|
|
24328
|
+
name: TextSetting.LETTER_SPACING,
|
|
24329
|
+
group: MarkGroup.SETTINGS,
|
|
24330
|
+
addAttributes: () => ({
|
|
24331
|
+
mobile: { default: null },
|
|
24332
|
+
tablet: { default: null },
|
|
24333
|
+
desktop: { default: null }
|
|
24334
|
+
}),
|
|
24335
|
+
addCommands() {
|
|
24336
|
+
return {
|
|
24337
|
+
getLetterSpacing: createCommand(({ commands: commands2 }) => {
|
|
24338
|
+
return commands2.getDeviceSettingMark(this.name, commands2.getDefaultLetterSpacing());
|
|
24339
|
+
}),
|
|
24340
|
+
getDefaultLetterSpacing: createCommand(({ commands: commands2 }) => {
|
|
24341
|
+
const device = commands2.getDevice();
|
|
24342
|
+
const preset = commands2.getPreset();
|
|
24343
|
+
return computed(() => unref(preset)[unref(device)].letter_spacing ?? null);
|
|
24344
|
+
}),
|
|
24345
|
+
applyLetterSpacing: createCommand(({ commands: commands2 }, value) => {
|
|
24346
|
+
const targetDevices = commands2.getTargetDevices();
|
|
24347
|
+
const attrs = Object.fromEntries(targetDevices.map((device) => [device, value]));
|
|
24348
|
+
commands2.applyMark(this.name, attrs);
|
|
24349
|
+
})
|
|
24350
|
+
};
|
|
24351
|
+
},
|
|
24352
|
+
parseHTML() {
|
|
24353
|
+
const parse = (value) => {
|
|
24354
|
+
if (!value) return null;
|
|
24355
|
+
const wrapperEl = unref(this.options.wrapperRef);
|
|
24356
|
+
const converted = convertLetterSpacing(value, wrapperEl);
|
|
24357
|
+
return `${converted}px`;
|
|
24358
|
+
};
|
|
24359
|
+
return [
|
|
24360
|
+
{
|
|
24361
|
+
tag: '[style*="--zw-letter-spacing"]',
|
|
24362
|
+
getAttrs: ({ style: style2 }) => ({
|
|
24363
|
+
mobile: parse(style2.getPropertyValue("--zw-letter-spacing-mobile")),
|
|
24364
|
+
tablet: parse(style2.getPropertyValue("--zw-letter-spacing-tablet")),
|
|
24365
|
+
desktop: parse(style2.getPropertyValue("--zw-letter-spacing-desktop"))
|
|
24366
|
+
})
|
|
24367
|
+
},
|
|
24368
|
+
{
|
|
24369
|
+
style: "letter-spacing",
|
|
24370
|
+
getAttrs: (input) => {
|
|
24371
|
+
const value = parse(input);
|
|
24372
|
+
return { desktop: value, tablet: value, mobile: value };
|
|
24373
|
+
}
|
|
24374
|
+
}
|
|
24375
|
+
];
|
|
24376
|
+
},
|
|
24377
|
+
renderHTML({ HTMLAttributes: attrs }) {
|
|
24378
|
+
const addUnits = (value) => value ? `${value}px` : null;
|
|
24379
|
+
return renderMark({
|
|
24380
|
+
letter_spacing_mobile: addUnits(attrs.mobile),
|
|
24381
|
+
letter_spacing_tablet: addUnits(attrs.tablet),
|
|
24382
|
+
letter_spacing_desktop: addUnits(attrs.desktop)
|
|
24383
|
+
});
|
|
24384
|
+
}
|
|
24385
|
+
});
|
|
24319
24386
|
const ListItem$1 = Node$1.create({
|
|
24320
24387
|
name: "listItem",
|
|
24321
24388
|
addOptions() {
|
|
@@ -25035,6 +25102,7 @@ function buildExtensions(options) {
|
|
|
25035
25102
|
LineHeight.configure({
|
|
25036
25103
|
wrapperRef: options.wrapperRef
|
|
25037
25104
|
}),
|
|
25105
|
+
LetterSpacing,
|
|
25038
25106
|
Link.configure({
|
|
25039
25107
|
preset: toRef(presetsMap, "link"),
|
|
25040
25108
|
basePresetClass: options.basePresetClass,
|
|
@@ -26044,8 +26112,8 @@ function tooltip(el, { value, modifiers: modifiers2 }) {
|
|
|
26044
26112
|
if (modifiers2.xs) el.dataset.tooltipSize = "xs";
|
|
26045
26113
|
if (modifiers2.lg) el.dataset.tooltipSize = "lg";
|
|
26046
26114
|
}
|
|
26047
|
-
const _hoisted_1$
|
|
26048
|
-
const _sfc_main$
|
|
26115
|
+
const _hoisted_1$o = ["disabled"];
|
|
26116
|
+
const _sfc_main$J = {
|
|
26049
26117
|
__name: "Button",
|
|
26050
26118
|
props: {
|
|
26051
26119
|
skin: {
|
|
@@ -26086,13 +26154,13 @@ const _sfc_main$I = {
|
|
|
26086
26154
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
|
26087
26155
|
}, [
|
|
26088
26156
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
26089
|
-
], 10, _hoisted_1$
|
|
26157
|
+
], 10, _hoisted_1$o);
|
|
26090
26158
|
};
|
|
26091
26159
|
}
|
|
26092
26160
|
};
|
|
26093
|
-
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
26094
|
-
const _hoisted_1$
|
|
26095
|
-
const _sfc_main$
|
|
26161
|
+
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-9ea2a71b"]]);
|
|
26162
|
+
const _hoisted_1$n = { class: "zw-button-toggle" };
|
|
26163
|
+
const _sfc_main$I = {
|
|
26096
26164
|
__name: "ButtonToggle",
|
|
26097
26165
|
props: {
|
|
26098
26166
|
value: {
|
|
@@ -26107,7 +26175,7 @@ const _sfc_main$H = {
|
|
|
26107
26175
|
emits: ["change"],
|
|
26108
26176
|
setup(__props) {
|
|
26109
26177
|
return (_ctx, _cache) => {
|
|
26110
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
26178
|
+
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
26111
26179
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(__props.options, (option) => {
|
|
26112
26180
|
return renderSlot(_ctx.$slots, "option", {
|
|
26113
26181
|
option,
|
|
@@ -26119,9 +26187,9 @@ const _sfc_main$H = {
|
|
|
26119
26187
|
};
|
|
26120
26188
|
}
|
|
26121
26189
|
};
|
|
26122
|
-
const ButtonToggle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
26123
|
-
const _hoisted_1$
|
|
26124
|
-
const _sfc_main$
|
|
26190
|
+
const ButtonToggle = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-bbdc7b20"]]);
|
|
26191
|
+
const _hoisted_1$m = ["innerHTML"];
|
|
26192
|
+
const _sfc_main$H = {
|
|
26125
26193
|
__name: "Icon",
|
|
26126
26194
|
props: {
|
|
26127
26195
|
name: {
|
|
@@ -26161,11 +26229,11 @@ const _sfc_main$G = {
|
|
|
26161
26229
|
class: normalizeClass(["zw-icon", iconClasses.value]),
|
|
26162
26230
|
style: normalizeStyle(iconStyles.value),
|
|
26163
26231
|
innerHTML: source.value
|
|
26164
|
-
}, null, 14, _hoisted_1$
|
|
26232
|
+
}, null, 14, _hoisted_1$m);
|
|
26165
26233
|
};
|
|
26166
26234
|
}
|
|
26167
26235
|
};
|
|
26168
|
-
const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
26236
|
+
const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-09bee8af"]]);
|
|
26169
26237
|
function useValidator({ validations }) {
|
|
26170
26238
|
const error = ref(null);
|
|
26171
26239
|
function validate() {
|
|
@@ -26305,7 +26373,7 @@ function useScrollView() {
|
|
|
26305
26373
|
}
|
|
26306
26374
|
return { scrollToElement };
|
|
26307
26375
|
}
|
|
26308
|
-
const _sfc_main$
|
|
26376
|
+
const _sfc_main$G = {
|
|
26309
26377
|
__name: "ScrollView",
|
|
26310
26378
|
setup(__props) {
|
|
26311
26379
|
const hostRef = ref(null);
|
|
@@ -26328,9 +26396,9 @@ const _sfc_main$F = {
|
|
|
26328
26396
|
};
|
|
26329
26397
|
}
|
|
26330
26398
|
};
|
|
26331
|
-
const ScrollView = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
26332
|
-
const _hoisted_1$
|
|
26333
|
-
const _sfc_main$
|
|
26399
|
+
const ScrollView = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-07fd5408"]]);
|
|
26400
|
+
const _hoisted_1$l = ["for"];
|
|
26401
|
+
const _sfc_main$F = {
|
|
26334
26402
|
__name: "FieldLabel",
|
|
26335
26403
|
props: {
|
|
26336
26404
|
fieldId: {
|
|
@@ -26346,13 +26414,13 @@ const _sfc_main$E = {
|
|
|
26346
26414
|
for: __props.fieldId
|
|
26347
26415
|
}, [
|
|
26348
26416
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
26349
|
-
], 8, _hoisted_1$
|
|
26417
|
+
], 8, _hoisted_1$l);
|
|
26350
26418
|
};
|
|
26351
26419
|
}
|
|
26352
26420
|
};
|
|
26353
|
-
const FieldLabel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
26354
|
-
const _hoisted_1$
|
|
26355
|
-
const _sfc_main$
|
|
26421
|
+
const FieldLabel = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-7ab8105c"]]);
|
|
26422
|
+
const _hoisted_1$k = ["id", "min", "max", "step", "value"];
|
|
26423
|
+
const _sfc_main$E = {
|
|
26356
26424
|
__name: "Range",
|
|
26357
26425
|
props: {
|
|
26358
26426
|
min: {
|
|
@@ -26408,19 +26476,19 @@ const _sfc_main$D = {
|
|
|
26408
26476
|
value: unref(tempValue),
|
|
26409
26477
|
style: normalizeStyle(inputStyles.value),
|
|
26410
26478
|
onInput: _cache[0] || (_cache[0] = ($event) => update($event))
|
|
26411
|
-
}, null, 44, _hoisted_1$
|
|
26479
|
+
}, null, 44, _hoisted_1$k);
|
|
26412
26480
|
};
|
|
26413
26481
|
}
|
|
26414
26482
|
};
|
|
26415
|
-
const Range = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
26416
|
-
const _hoisted_1$
|
|
26417
|
-
const _hoisted_2$
|
|
26483
|
+
const Range = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-c0059745"]]);
|
|
26484
|
+
const _hoisted_1$j = ["id", "disabled", "value"];
|
|
26485
|
+
const _hoisted_2$7 = { class: "zw-number-field__controls" };
|
|
26418
26486
|
const _hoisted_3$2 = { class: "zw-number-field__buttons" };
|
|
26419
26487
|
const _hoisted_4$1 = {
|
|
26420
26488
|
key: 0,
|
|
26421
26489
|
class: "zw-number-field__units"
|
|
26422
26490
|
};
|
|
26423
|
-
const _sfc_main$
|
|
26491
|
+
const _sfc_main$D = {
|
|
26424
26492
|
__name: "NumberField",
|
|
26425
26493
|
props: {
|
|
26426
26494
|
value: {
|
|
@@ -26493,8 +26561,8 @@ const _sfc_main$C = {
|
|
|
26493
26561
|
disabled: __props.disabled,
|
|
26494
26562
|
value: tempValue.value,
|
|
26495
26563
|
onChange
|
|
26496
|
-
}, null, 40, _hoisted_1$
|
|
26497
|
-
createElementVNode("div", _hoisted_2$
|
|
26564
|
+
}, null, 40, _hoisted_1$j),
|
|
26565
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
26498
26566
|
createElementVNode("div", _hoisted_3$2, [
|
|
26499
26567
|
createVNode(unref(Button), {
|
|
26500
26568
|
class: "zw-number-field__increment-button",
|
|
@@ -26517,7 +26585,7 @@ const _sfc_main$C = {
|
|
|
26517
26585
|
};
|
|
26518
26586
|
}
|
|
26519
26587
|
};
|
|
26520
|
-
const NumberField = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
26588
|
+
const NumberField = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-962cf185"]]);
|
|
26521
26589
|
const min = Math.min;
|
|
26522
26590
|
const max = Math.max;
|
|
26523
26591
|
const round = Math.round;
|
|
@@ -27974,7 +28042,7 @@ function useFloating(reference2, floating, options) {
|
|
|
27974
28042
|
update
|
|
27975
28043
|
};
|
|
27976
28044
|
}
|
|
27977
|
-
const _sfc_main$
|
|
28045
|
+
const _sfc_main$C = {
|
|
27978
28046
|
__name: "ModalFloating",
|
|
27979
28047
|
props: {
|
|
27980
28048
|
referenceRef: {
|
|
@@ -28040,8 +28108,8 @@ const _sfc_main$B = {
|
|
|
28040
28108
|
};
|
|
28041
28109
|
}
|
|
28042
28110
|
};
|
|
28043
|
-
const ModalFloating = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28044
|
-
const _sfc_main$
|
|
28111
|
+
const ModalFloating = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-b3c0b9ad"]]);
|
|
28112
|
+
const _sfc_main$B = {
|
|
28045
28113
|
__name: "Modal",
|
|
28046
28114
|
props: {
|
|
28047
28115
|
referenceRef: {
|
|
@@ -28146,16 +28214,16 @@ const _sfc_main$A = {
|
|
|
28146
28214
|
};
|
|
28147
28215
|
}
|
|
28148
28216
|
};
|
|
28149
|
-
const Modal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28150
|
-
const _hoisted_1$
|
|
28151
|
-
const _hoisted_2$
|
|
28217
|
+
const Modal = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-72ecfd23"]]);
|
|
28218
|
+
const _hoisted_1$i = { class: "zw-field" };
|
|
28219
|
+
const _hoisted_2$6 = ["for"];
|
|
28152
28220
|
const _hoisted_3$1 = ["value", "id", "placeholder"];
|
|
28153
28221
|
const _hoisted_4 = {
|
|
28154
28222
|
key: 0,
|
|
28155
28223
|
class: "zw-field__label--error",
|
|
28156
28224
|
"data-test-selector": "error"
|
|
28157
28225
|
};
|
|
28158
|
-
const _sfc_main$
|
|
28226
|
+
const _sfc_main$A = {
|
|
28159
28227
|
__name: "TextField",
|
|
28160
28228
|
props: {
|
|
28161
28229
|
value: {
|
|
@@ -28186,12 +28254,12 @@ const _sfc_main$z = {
|
|
|
28186
28254
|
return props.label.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (m, chr) => chr.toUpperCase());
|
|
28187
28255
|
});
|
|
28188
28256
|
return (_ctx, _cache) => {
|
|
28189
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
28257
|
+
return openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
28190
28258
|
createElementVNode("label", {
|
|
28191
28259
|
class: "zw-field__label",
|
|
28192
28260
|
for: fieldId.value,
|
|
28193
28261
|
"data-test-selector": "label"
|
|
28194
|
-
}, toDisplayString(__props.label), 9, _hoisted_2$
|
|
28262
|
+
}, toDisplayString(__props.label), 9, _hoisted_2$6),
|
|
28195
28263
|
createElementVNode("input", {
|
|
28196
28264
|
class: "zw-field__input",
|
|
28197
28265
|
type: "text",
|
|
@@ -28206,11 +28274,11 @@ const _sfc_main$z = {
|
|
|
28206
28274
|
};
|
|
28207
28275
|
}
|
|
28208
28276
|
};
|
|
28209
|
-
const TextField = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28210
|
-
const _hoisted_1$
|
|
28211
|
-
const _hoisted_2$
|
|
28277
|
+
const TextField = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-dfa0d6f0"]]);
|
|
28278
|
+
const _hoisted_1$h = { class: "zw-checkbox" };
|
|
28279
|
+
const _hoisted_2$5 = ["checked"];
|
|
28212
28280
|
const _hoisted_3 = { class: "zw-checkbox__label" };
|
|
28213
|
-
const _sfc_main$
|
|
28281
|
+
const _sfc_main$z = {
|
|
28214
28282
|
__name: "Checkbox",
|
|
28215
28283
|
props: {
|
|
28216
28284
|
value: {
|
|
@@ -28229,20 +28297,20 @@ const _sfc_main$y = {
|
|
|
28229
28297
|
const emit = __emit;
|
|
28230
28298
|
const onCheckedChanged = () => emit("input", !props.value);
|
|
28231
28299
|
return (_ctx, _cache) => {
|
|
28232
|
-
return openBlock(), createElementBlock("label", _hoisted_1$
|
|
28300
|
+
return openBlock(), createElementBlock("label", _hoisted_1$h, [
|
|
28233
28301
|
createElementVNode("input", {
|
|
28234
28302
|
class: "zw-checkbox__field",
|
|
28235
28303
|
type: "checkbox",
|
|
28236
28304
|
checked: __props.value,
|
|
28237
28305
|
onClick: onCheckedChanged
|
|
28238
|
-
}, null, 8, _hoisted_2$
|
|
28306
|
+
}, null, 8, _hoisted_2$5),
|
|
28239
28307
|
_cache[0] || (_cache[0] = createElementVNode("span", { class: "zw-checkbox__indicator zw-margin-right--xs" }, null, -1)),
|
|
28240
28308
|
createElementVNode("span", _hoisted_3, toDisplayString(__props.label), 1)
|
|
28241
28309
|
]);
|
|
28242
28310
|
};
|
|
28243
28311
|
}
|
|
28244
28312
|
};
|
|
28245
|
-
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28313
|
+
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-e1624b5d"]]);
|
|
28246
28314
|
const InjectionTokens = Object.freeze({
|
|
28247
28315
|
ACTIVE_MANAGER: Symbol("dropdownActiveManager"),
|
|
28248
28316
|
TOGGLER: Symbol("dropdownToggler"),
|
|
@@ -28269,13 +28337,13 @@ function useDropdownEntityTitle(entityRef) {
|
|
|
28269
28337
|
return ((_a = entityRef.value) == null ? void 0 : _a.title) || ((_b = entityRef.value) == null ? void 0 : _b.id) || "";
|
|
28270
28338
|
});
|
|
28271
28339
|
}
|
|
28272
|
-
const _hoisted_1$
|
|
28273
|
-
const _hoisted_2$
|
|
28340
|
+
const _hoisted_1$g = { class: "zw-dropdown__activator-title zw-text--truncate" };
|
|
28341
|
+
const _hoisted_2$4 = {
|
|
28274
28342
|
key: 0,
|
|
28275
28343
|
class: "zw-dropdown__customized-indicator",
|
|
28276
28344
|
"data-test-selector": "customizedIndicator"
|
|
28277
28345
|
};
|
|
28278
|
-
const _sfc_main$
|
|
28346
|
+
const _sfc_main$y = {
|
|
28279
28347
|
__name: "DropdownActivator",
|
|
28280
28348
|
props: {
|
|
28281
28349
|
color: {
|
|
@@ -28311,8 +28379,8 @@ const _sfc_main$x = {
|
|
|
28311
28379
|
onClick: unref(dropdownToggler).open
|
|
28312
28380
|
}, {
|
|
28313
28381
|
default: withCtx(() => [
|
|
28314
|
-
createElementVNode("span", _hoisted_1$
|
|
28315
|
-
__props.isCustomized ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$
|
|
28382
|
+
createElementVNode("span", _hoisted_1$g, toDisplayString(unref(activeOptionTitle)), 1),
|
|
28383
|
+
__props.isCustomized ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$4, null, 512)), [
|
|
28316
28384
|
[
|
|
28317
28385
|
unref(tooltip),
|
|
28318
28386
|
"Style differs from Page Styles",
|
|
@@ -28333,8 +28401,8 @@ const _sfc_main$x = {
|
|
|
28333
28401
|
};
|
|
28334
28402
|
}
|
|
28335
28403
|
};
|
|
28336
|
-
const DropdownActivator = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28337
|
-
const _sfc_main$
|
|
28404
|
+
const DropdownActivator = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-678de368"]]);
|
|
28405
|
+
const _sfc_main$x = {
|
|
28338
28406
|
__name: "DropdownOption",
|
|
28339
28407
|
props: {
|
|
28340
28408
|
option: {
|
|
@@ -28385,10 +28453,10 @@ const _sfc_main$w = {
|
|
|
28385
28453
|
};
|
|
28386
28454
|
}
|
|
28387
28455
|
};
|
|
28388
|
-
const DropdownOption = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28389
|
-
const _hoisted_1$
|
|
28390
|
-
const _hoisted_2$
|
|
28391
|
-
const _sfc_main$
|
|
28456
|
+
const DropdownOption = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-2e8320d2"]]);
|
|
28457
|
+
const _hoisted_1$f = { class: "zw-dropdown__group" };
|
|
28458
|
+
const _hoisted_2$3 = { class: "zw-dropdown__group-title" };
|
|
28459
|
+
const _sfc_main$w = {
|
|
28392
28460
|
__name: "DropdownGroup",
|
|
28393
28461
|
props: {
|
|
28394
28462
|
group: {
|
|
@@ -28400,8 +28468,8 @@ const _sfc_main$v = {
|
|
|
28400
28468
|
const props = __props;
|
|
28401
28469
|
const groupTitle = useDropdownEntityTitle(toRef(props, "group"));
|
|
28402
28470
|
return (_ctx, _cache) => {
|
|
28403
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
28404
|
-
createElementVNode("p", _hoisted_2$
|
|
28471
|
+
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
28472
|
+
createElementVNode("p", _hoisted_2$3, toDisplayString(unref(groupTitle)), 1),
|
|
28405
28473
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(__props.group.options, (option) => {
|
|
28406
28474
|
return renderSlot(_ctx.$slots, "option", { option }, () => [
|
|
28407
28475
|
createVNode(unref(DropdownOption), { option }, null, 8, ["option"])
|
|
@@ -28411,18 +28479,18 @@ const _sfc_main$v = {
|
|
|
28411
28479
|
};
|
|
28412
28480
|
}
|
|
28413
28481
|
};
|
|
28414
|
-
const DropdownGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28415
|
-
const _sfc_main$
|
|
28416
|
-
const _hoisted_1$
|
|
28482
|
+
const DropdownGroup = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-2239aa7b"]]);
|
|
28483
|
+
const _sfc_main$v = {};
|
|
28484
|
+
const _hoisted_1$e = { class: "zw-dropdown__divider" };
|
|
28417
28485
|
function _sfc_render$1(_ctx, _cache) {
|
|
28418
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
28486
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e);
|
|
28419
28487
|
}
|
|
28420
|
-
const DropdownDivider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28421
|
-
const _hoisted_1$
|
|
28488
|
+
const DropdownDivider = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$1], ["__scopeId", "data-v-91a22273"]]);
|
|
28489
|
+
const _hoisted_1$d = {
|
|
28422
28490
|
class: "zw-dropdown__menu",
|
|
28423
28491
|
"data-test-selector": "dropdownMenu"
|
|
28424
28492
|
};
|
|
28425
|
-
const _sfc_main$
|
|
28493
|
+
const _sfc_main$u = {
|
|
28426
28494
|
__name: "DropdownMenu",
|
|
28427
28495
|
props: {
|
|
28428
28496
|
options: {
|
|
@@ -28435,7 +28503,7 @@ const _sfc_main$t = {
|
|
|
28435
28503
|
return (_ctx, _cache) => {
|
|
28436
28504
|
return openBlock(), createBlock(unref(ScrollView), null, {
|
|
28437
28505
|
default: withCtx(() => [
|
|
28438
|
-
createElementVNode("div", _hoisted_1$
|
|
28506
|
+
createElementVNode("div", _hoisted_1$d, [
|
|
28439
28507
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(__props.options, (option, index) => {
|
|
28440
28508
|
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
28441
28509
|
option.options ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
@@ -28466,7 +28534,7 @@ const _sfc_main$t = {
|
|
|
28466
28534
|
};
|
|
28467
28535
|
}
|
|
28468
28536
|
};
|
|
28469
|
-
const _sfc_main$
|
|
28537
|
+
const _sfc_main$t = {
|
|
28470
28538
|
__name: "Dropdown",
|
|
28471
28539
|
props: {
|
|
28472
28540
|
value: {
|
|
@@ -28530,7 +28598,7 @@ const _sfc_main$s = {
|
|
|
28530
28598
|
"reference-ref": dropdownRef.value
|
|
28531
28599
|
}, {
|
|
28532
28600
|
default: withCtx(() => [
|
|
28533
|
-
createVNode(unref(_sfc_main$
|
|
28601
|
+
createVNode(unref(_sfc_main$u), { options: __props.options }, {
|
|
28534
28602
|
option: withCtx((attrs) => [
|
|
28535
28603
|
renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps(attrs)), void 0, true)
|
|
28536
28604
|
]),
|
|
@@ -28543,7 +28611,7 @@ const _sfc_main$s = {
|
|
|
28543
28611
|
};
|
|
28544
28612
|
}
|
|
28545
28613
|
};
|
|
28546
|
-
const Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28614
|
+
const Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-0d65726d"]]);
|
|
28547
28615
|
function usePickerApi({ pickerRef, colorRef, onChange, onClosed, onBeforeOpened }) {
|
|
28548
28616
|
const isOpened = computed(() => {
|
|
28549
28617
|
var _a;
|
|
@@ -28608,7 +28676,7 @@ function usePickerHotkeys({ isOpenedRef, onCancel, onApply }) {
|
|
|
28608
28676
|
options: { capture: true }
|
|
28609
28677
|
});
|
|
28610
28678
|
}
|
|
28611
|
-
const _sfc_main$
|
|
28679
|
+
const _sfc_main$s = {
|
|
28612
28680
|
__name: "ColorPicker",
|
|
28613
28681
|
props: {
|
|
28614
28682
|
value: {
|
|
@@ -28679,11 +28747,11 @@ function useRecentFonts({ limit }) {
|
|
|
28679
28747
|
const isEmpty = computed(() => !fonts.value.length);
|
|
28680
28748
|
return { fonts, isEmpty, add };
|
|
28681
28749
|
}
|
|
28682
|
-
const _hoisted_1$
|
|
28750
|
+
const _hoisted_1$c = {
|
|
28683
28751
|
key: 0,
|
|
28684
28752
|
class: "zw-dropdown__default-option"
|
|
28685
28753
|
};
|
|
28686
|
-
const _sfc_main$
|
|
28754
|
+
const _sfc_main$r = {
|
|
28687
28755
|
__name: "FontFamilyControl",
|
|
28688
28756
|
setup(__props) {
|
|
28689
28757
|
const fonts = inject(InjectionTokens$1.FONTS);
|
|
@@ -28738,7 +28806,7 @@ const _sfc_main$q = {
|
|
|
28738
28806
|
}, {
|
|
28739
28807
|
default: withCtx(() => [
|
|
28740
28808
|
createTextVNode(toDisplayString(option.id) + " ", 1),
|
|
28741
|
-
option.isDefault ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
28809
|
+
option.isDefault ? (openBlock(), createElementBlock("span", _hoisted_1$c, "(Default)")) : createCommentVNode("", true)
|
|
28742
28810
|
]),
|
|
28743
28811
|
_: 2
|
|
28744
28812
|
}, 1032, ["option", "style"])), [
|
|
@@ -28752,12 +28820,12 @@ const _sfc_main$q = {
|
|
|
28752
28820
|
};
|
|
28753
28821
|
}
|
|
28754
28822
|
};
|
|
28755
|
-
const FontFamilyControl = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28756
|
-
const _hoisted_1$
|
|
28823
|
+
const FontFamilyControl = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-e3657967"]]);
|
|
28824
|
+
const _hoisted_1$b = {
|
|
28757
28825
|
key: 0,
|
|
28758
28826
|
class: "zw-dropdown__default-option"
|
|
28759
28827
|
};
|
|
28760
|
-
const _sfc_main$
|
|
28828
|
+
const _sfc_main$q = {
|
|
28761
28829
|
__name: "FontWeightControl",
|
|
28762
28830
|
setup(__props) {
|
|
28763
28831
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
@@ -28787,7 +28855,7 @@ const _sfc_main$p = {
|
|
|
28787
28855
|
}, {
|
|
28788
28856
|
default: withCtx(() => [
|
|
28789
28857
|
createTextVNode(toDisplayString(option.id) + " ", 1),
|
|
28790
|
-
option.isDefault ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
28858
|
+
option.isDefault ? (openBlock(), createElementBlock("span", _hoisted_1$b, "(Default)")) : createCommentVNode("", true)
|
|
28791
28859
|
]),
|
|
28792
28860
|
_: 2
|
|
28793
28861
|
}, 1032, ["option"])), [
|
|
@@ -28801,12 +28869,12 @@ const _sfc_main$p = {
|
|
|
28801
28869
|
};
|
|
28802
28870
|
}
|
|
28803
28871
|
};
|
|
28804
|
-
const FontWeightControl = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28805
|
-
const _hoisted_1$
|
|
28872
|
+
const FontWeightControl = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-6c8237c7"]]);
|
|
28873
|
+
const _hoisted_1$a = {
|
|
28806
28874
|
key: 0,
|
|
28807
28875
|
class: "zw-dropdown__default-option"
|
|
28808
28876
|
};
|
|
28809
|
-
const _sfc_main$
|
|
28877
|
+
const _sfc_main$p = {
|
|
28810
28878
|
__name: "FontSizeControl",
|
|
28811
28879
|
setup(__props) {
|
|
28812
28880
|
const fontSizes = inject(InjectionTokens$1.FONT_SIZES);
|
|
@@ -28837,7 +28905,7 @@ const _sfc_main$o = {
|
|
|
28837
28905
|
}, {
|
|
28838
28906
|
default: withCtx(() => [
|
|
28839
28907
|
createTextVNode(toDisplayString(option.title) + " ", 1),
|
|
28840
|
-
option.isDefault ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
28908
|
+
option.isDefault ? (openBlock(), createElementBlock("span", _hoisted_1$a, "(Default)")) : createCommentVNode("", true)
|
|
28841
28909
|
]),
|
|
28842
28910
|
_: 2
|
|
28843
28911
|
}, 1032, ["option"])), [
|
|
@@ -28851,13 +28919,13 @@ const _sfc_main$o = {
|
|
|
28851
28919
|
};
|
|
28852
28920
|
}
|
|
28853
28921
|
};
|
|
28854
|
-
const FontSizeControl = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
28855
|
-
const _hoisted_1$
|
|
28922
|
+
const FontSizeControl = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-779fe48e"]]);
|
|
28923
|
+
const _hoisted_1$9 = {
|
|
28856
28924
|
key: 0,
|
|
28857
28925
|
class: "zw-button__customized-indicator",
|
|
28858
28926
|
"data-test-selector": "customizedIndicator"
|
|
28859
28927
|
};
|
|
28860
|
-
const _sfc_main$
|
|
28928
|
+
const _sfc_main$o = {
|
|
28861
28929
|
__name: "FontColorControl",
|
|
28862
28930
|
setup(__props) {
|
|
28863
28931
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
@@ -28865,7 +28933,7 @@ const _sfc_main$n = {
|
|
|
28865
28933
|
const isCustomized = editor.commands.isSettingCustomized(TextSetting.FONT_COLOR);
|
|
28866
28934
|
const apply2 = (color) => editor.chain().applyFontColor(color).run();
|
|
28867
28935
|
return (_ctx, _cache) => {
|
|
28868
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
28936
|
+
return openBlock(), createBlock(unref(_sfc_main$s), {
|
|
28869
28937
|
value: unref(currentValue),
|
|
28870
28938
|
onChange: apply2
|
|
28871
28939
|
}, {
|
|
@@ -28883,7 +28951,7 @@ const _sfc_main$n = {
|
|
|
28883
28951
|
size: "28px",
|
|
28884
28952
|
"auto-color": ""
|
|
28885
28953
|
}),
|
|
28886
|
-
unref(isCustomized) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$
|
|
28954
|
+
unref(isCustomized) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$9, null, 512)), [
|
|
28887
28955
|
[
|
|
28888
28956
|
unref(tooltip),
|
|
28889
28957
|
"Style differs from Page Styles",
|
|
@@ -28902,14 +28970,14 @@ const _sfc_main$n = {
|
|
|
28902
28970
|
};
|
|
28903
28971
|
}
|
|
28904
28972
|
};
|
|
28905
|
-
const _sfc_main$
|
|
28973
|
+
const _sfc_main$n = {
|
|
28906
28974
|
__name: "BackgroundColorControl",
|
|
28907
28975
|
setup(__props) {
|
|
28908
28976
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
28909
28977
|
const currentValue = editor.commands.getBackgroundColor();
|
|
28910
28978
|
const apply2 = (color) => editor.chain().applyBackgroundColor(color).run();
|
|
28911
28979
|
return (_ctx, _cache) => {
|
|
28912
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
28980
|
+
return openBlock(), createBlock(unref(_sfc_main$s), {
|
|
28913
28981
|
value: unref(currentValue),
|
|
28914
28982
|
onChange: apply2
|
|
28915
28983
|
}, {
|
|
@@ -28937,12 +29005,12 @@ const _sfc_main$m = {
|
|
|
28937
29005
|
};
|
|
28938
29006
|
}
|
|
28939
29007
|
};
|
|
28940
|
-
const _hoisted_1$
|
|
29008
|
+
const _hoisted_1$8 = {
|
|
28941
29009
|
key: 0,
|
|
28942
29010
|
class: "zw-button__customized-indicator",
|
|
28943
29011
|
"data-test-selector": "customizedIndicator"
|
|
28944
29012
|
};
|
|
28945
|
-
const _sfc_main$
|
|
29013
|
+
const _sfc_main$m = {
|
|
28946
29014
|
__name: "ItalicControl",
|
|
28947
29015
|
setup(__props) {
|
|
28948
29016
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
@@ -28965,7 +29033,7 @@ const _sfc_main$l = {
|
|
|
28965
29033
|
size: "28px",
|
|
28966
29034
|
"auto-color": ""
|
|
28967
29035
|
}),
|
|
28968
|
-
unref(isCustomized) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$
|
|
29036
|
+
unref(isCustomized) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$8, null, 512)), [
|
|
28969
29037
|
[
|
|
28970
29038
|
unref(tooltip),
|
|
28971
29039
|
"Style differs from Page Styles",
|
|
@@ -28981,12 +29049,12 @@ const _sfc_main$l = {
|
|
|
28981
29049
|
};
|
|
28982
29050
|
}
|
|
28983
29051
|
};
|
|
28984
|
-
const _hoisted_1$
|
|
29052
|
+
const _hoisted_1$7 = {
|
|
28985
29053
|
key: 0,
|
|
28986
29054
|
class: "zw-button__customized-indicator",
|
|
28987
29055
|
"data-test-selector": "customizedIndicator"
|
|
28988
29056
|
};
|
|
28989
|
-
const _sfc_main$
|
|
29057
|
+
const _sfc_main$l = {
|
|
28990
29058
|
__name: "UnderlineControl",
|
|
28991
29059
|
setup(__props) {
|
|
28992
29060
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
@@ -29007,7 +29075,7 @@ const _sfc_main$k = {
|
|
|
29007
29075
|
size: "28px",
|
|
29008
29076
|
"auto-color": ""
|
|
29009
29077
|
}),
|
|
29010
|
-
unref(isCustomized) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$
|
|
29078
|
+
unref(isCustomized) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$7, null, 512)), [
|
|
29011
29079
|
[
|
|
29012
29080
|
unref(tooltip),
|
|
29013
29081
|
"Style differs from Page Styles",
|
|
@@ -29023,7 +29091,7 @@ const _sfc_main$k = {
|
|
|
29023
29091
|
};
|
|
29024
29092
|
}
|
|
29025
29093
|
};
|
|
29026
|
-
const _sfc_main$
|
|
29094
|
+
const _sfc_main$k = {
|
|
29027
29095
|
__name: "StrikeThroughControl",
|
|
29028
29096
|
setup(__props) {
|
|
29029
29097
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
@@ -29050,7 +29118,7 @@ const _sfc_main$j = {
|
|
|
29050
29118
|
};
|
|
29051
29119
|
}
|
|
29052
29120
|
};
|
|
29053
|
-
const _sfc_main$
|
|
29121
|
+
const _sfc_main$j = {
|
|
29054
29122
|
__name: "SuperscriptControl",
|
|
29055
29123
|
setup(__props) {
|
|
29056
29124
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
@@ -29077,7 +29145,7 @@ const _sfc_main$i = {
|
|
|
29077
29145
|
};
|
|
29078
29146
|
}
|
|
29079
29147
|
};
|
|
29080
|
-
const _sfc_main$
|
|
29148
|
+
const _sfc_main$i = {
|
|
29081
29149
|
__name: "CaseStyleControl",
|
|
29082
29150
|
setup(__props) {
|
|
29083
29151
|
const styles = [
|
|
@@ -29116,7 +29184,7 @@ const _sfc_main$h = {
|
|
|
29116
29184
|
};
|
|
29117
29185
|
}
|
|
29118
29186
|
};
|
|
29119
|
-
const _sfc_main$
|
|
29187
|
+
const _sfc_main$h = {
|
|
29120
29188
|
__name: "AlignmentControl",
|
|
29121
29189
|
emits: ["applied"],
|
|
29122
29190
|
setup(__props, { emit: __emit }) {
|
|
@@ -29191,13 +29259,13 @@ const _sfc_main$g = {
|
|
|
29191
29259
|
};
|
|
29192
29260
|
}
|
|
29193
29261
|
};
|
|
29194
|
-
const _hoisted_1$
|
|
29262
|
+
const _hoisted_1$6 = {
|
|
29195
29263
|
key: 0,
|
|
29196
29264
|
class: "zw-button__customized-indicator",
|
|
29197
29265
|
"data-test-selector": "customizedIndicator"
|
|
29198
29266
|
};
|
|
29199
|
-
const _hoisted_2$
|
|
29200
|
-
const _sfc_main$
|
|
29267
|
+
const _hoisted_2$2 = { class: "zw-line-height-control__row" };
|
|
29268
|
+
const _sfc_main$g = {
|
|
29201
29269
|
__name: "LineHeightControl",
|
|
29202
29270
|
setup(__props) {
|
|
29203
29271
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
@@ -29225,7 +29293,7 @@ const _sfc_main$f = {
|
|
|
29225
29293
|
size: "28px",
|
|
29226
29294
|
"auto-color": ""
|
|
29227
29295
|
}),
|
|
29228
|
-
unref(isCustomized) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$
|
|
29296
|
+
unref(isCustomized) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$6, null, 512)), [
|
|
29229
29297
|
[
|
|
29230
29298
|
unref(tooltip),
|
|
29231
29299
|
"Style differs from Page Styles",
|
|
@@ -29253,7 +29321,7 @@ const _sfc_main$f = {
|
|
|
29253
29321
|
])),
|
|
29254
29322
|
_: 1
|
|
29255
29323
|
}),
|
|
29256
|
-
createElementVNode("div", _hoisted_2$
|
|
29324
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
29257
29325
|
createVNode(unref(Range), {
|
|
29258
29326
|
class: "zw-line-height-control__range",
|
|
29259
29327
|
step: "0.1",
|
|
@@ -29279,7 +29347,101 @@ const _sfc_main$f = {
|
|
|
29279
29347
|
};
|
|
29280
29348
|
}
|
|
29281
29349
|
};
|
|
29282
|
-
const LineHeightControl = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
29350
|
+
const LineHeightControl = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-643242a1"]]);
|
|
29351
|
+
const _hoisted_1$5 = {
|
|
29352
|
+
key: 0,
|
|
29353
|
+
class: "zw-button__customized-indicator",
|
|
29354
|
+
"data-test-selector": "customizedIndicator"
|
|
29355
|
+
};
|
|
29356
|
+
const _hoisted_2$1 = { class: "zw-letter-spacing-control__row" };
|
|
29357
|
+
const MIN_VALUE = -1.6;
|
|
29358
|
+
const MAX_VALUE = 3.2;
|
|
29359
|
+
const STEP = 0.1;
|
|
29360
|
+
const _sfc_main$f = {
|
|
29361
|
+
__name: "LetterSpacingControl",
|
|
29362
|
+
setup(__props) {
|
|
29363
|
+
const editor = inject(InjectionTokens$1.EDITOR);
|
|
29364
|
+
const wrapperRef = ref(null);
|
|
29365
|
+
const toggler = useModalToggler();
|
|
29366
|
+
const valueRef = editor.commands.getLetterSpacing();
|
|
29367
|
+
const currentValue = computed(() => valueRef.value ?? 0);
|
|
29368
|
+
const isCustomized = editor.commands.isSettingCustomized(TextSetting.LETTER_SPACING);
|
|
29369
|
+
const apply2 = (value) => editor.commands.applyLetterSpacing(value);
|
|
29370
|
+
return (_ctx, _cache) => {
|
|
29371
|
+
return openBlock(), createElementBlock("div", {
|
|
29372
|
+
class: "zw-position--relative",
|
|
29373
|
+
ref_key: "wrapperRef",
|
|
29374
|
+
ref: wrapperRef
|
|
29375
|
+
}, [
|
|
29376
|
+
withDirectives((openBlock(), createBlock(unref(Button), {
|
|
29377
|
+
class: "zw-position--relative",
|
|
29378
|
+
icon: "",
|
|
29379
|
+
skin: "toolbar",
|
|
29380
|
+
active: unref(toggler).isOpened,
|
|
29381
|
+
onClick: unref(toggler).open
|
|
29382
|
+
}, {
|
|
29383
|
+
default: withCtx(() => [
|
|
29384
|
+
createVNode(unref(Icon), {
|
|
29385
|
+
name: "letter-spacing",
|
|
29386
|
+
size: "28px",
|
|
29387
|
+
"auto-color": ""
|
|
29388
|
+
}),
|
|
29389
|
+
unref(isCustomized) ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$5, null, 512)), [
|
|
29390
|
+
[
|
|
29391
|
+
unref(tooltip),
|
|
29392
|
+
"Style differs from Page Styles",
|
|
29393
|
+
void 0,
|
|
29394
|
+
{ lg: true }
|
|
29395
|
+
]
|
|
29396
|
+
]) : createCommentVNode("", true)
|
|
29397
|
+
]),
|
|
29398
|
+
_: 1
|
|
29399
|
+
}, 8, ["active", "onClick"])), [
|
|
29400
|
+
[unref(tooltip), "Letter Spacing"]
|
|
29401
|
+
]),
|
|
29402
|
+
createVNode(unref(Modal), {
|
|
29403
|
+
class: "zw-letter-spacing-control__modal",
|
|
29404
|
+
toggler: unref(toggler),
|
|
29405
|
+
"reference-ref": wrapperRef.value
|
|
29406
|
+
}, {
|
|
29407
|
+
default: withCtx(() => [
|
|
29408
|
+
createVNode(unref(FieldLabel), {
|
|
29409
|
+
class: "zw-margin-bottom--xs",
|
|
29410
|
+
"field-id": "wswg-letter-spacing"
|
|
29411
|
+
}, {
|
|
29412
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
29413
|
+
createTextVNode(" Letter Spacing ")
|
|
29414
|
+
])),
|
|
29415
|
+
_: 1
|
|
29416
|
+
}),
|
|
29417
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
29418
|
+
createVNode(unref(Range), {
|
|
29419
|
+
class: "zw-letter-spacing-control__range",
|
|
29420
|
+
step: STEP,
|
|
29421
|
+
min: MIN_VALUE,
|
|
29422
|
+
max: MAX_VALUE,
|
|
29423
|
+
value: currentValue.value,
|
|
29424
|
+
onInput: apply2
|
|
29425
|
+
}, null, 8, ["value"]),
|
|
29426
|
+
createVNode(unref(NumberField), {
|
|
29427
|
+
step: STEP,
|
|
29428
|
+
min: MIN_VALUE,
|
|
29429
|
+
max: MAX_VALUE,
|
|
29430
|
+
units: "px",
|
|
29431
|
+
class: "zw-letter-spacing-control__field",
|
|
29432
|
+
"field-id": "wswg-letter-spacing",
|
|
29433
|
+
value: currentValue.value,
|
|
29434
|
+
onInput: apply2
|
|
29435
|
+
}, null, 8, ["value"])
|
|
29436
|
+
])
|
|
29437
|
+
]),
|
|
29438
|
+
_: 1
|
|
29439
|
+
}, 8, ["toggler", "reference-ref"])
|
|
29440
|
+
], 512);
|
|
29441
|
+
};
|
|
29442
|
+
}
|
|
29443
|
+
};
|
|
29444
|
+
const LetterSpacingControl = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-62d3e8b2"]]);
|
|
29283
29445
|
const _hoisted_1$4 = { class: "zpa-list-control" };
|
|
29284
29446
|
const _sfc_main$e = {
|
|
29285
29447
|
__name: "ListControl",
|
|
@@ -29935,8 +30097,8 @@ const _sfc_main$5 = {
|
|
|
29935
30097
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
29936
30098
|
createVNode(unref(ToolbarGroup), null, {
|
|
29937
30099
|
default: withCtx(() => [
|
|
29938
|
-
createVNode(unref(_sfc_main$
|
|
29939
|
-
createVNode(unref(_sfc_main$
|
|
30100
|
+
createVNode(unref(_sfc_main$o)),
|
|
30101
|
+
createVNode(unref(_sfc_main$n))
|
|
29940
30102
|
]),
|
|
29941
30103
|
_: 1
|
|
29942
30104
|
})
|
|
@@ -29948,18 +30110,19 @@ const _sfc_main$5 = {
|
|
|
29948
30110
|
default: withCtx(() => [
|
|
29949
30111
|
createVNode(unref(ToolbarGroup), null, {
|
|
29950
30112
|
default: withCtx(() => [
|
|
30113
|
+
createVNode(unref(_sfc_main$m)),
|
|
29951
30114
|
createVNode(unref(_sfc_main$l)),
|
|
29952
30115
|
createVNode(unref(_sfc_main$k)),
|
|
29953
30116
|
createVNode(unref(_sfc_main$j)),
|
|
29954
|
-
createVNode(unref(_sfc_main$i))
|
|
29955
|
-
createVNode(unref(_sfc_main$h))
|
|
30117
|
+
createVNode(unref(_sfc_main$i))
|
|
29956
30118
|
]),
|
|
29957
30119
|
_: 1
|
|
29958
30120
|
}),
|
|
29959
30121
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
29960
|
-
createVNode(unref(_sfc_main$
|
|
30122
|
+
createVNode(unref(_sfc_main$h)),
|
|
29961
30123
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
29962
30124
|
createVNode(unref(LineHeightControl)),
|
|
30125
|
+
createVNode(unref(LetterSpacingControl)),
|
|
29963
30126
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
29964
30127
|
createVNode(unref(ListControl)),
|
|
29965
30128
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
@@ -29999,19 +30162,19 @@ const _sfc_main$4 = {
|
|
|
29999
30162
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
30000
30163
|
createVNode(unref(ToolbarGroup), null, {
|
|
30001
30164
|
default: withCtx(() => [
|
|
30002
|
-
createVNode(unref(_sfc_main$
|
|
30003
|
-
createVNode(unref(_sfc_main$
|
|
30165
|
+
createVNode(unref(_sfc_main$o)),
|
|
30166
|
+
createVNode(unref(_sfc_main$n))
|
|
30004
30167
|
]),
|
|
30005
30168
|
_: 1
|
|
30006
30169
|
}),
|
|
30007
30170
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
30008
30171
|
createVNode(unref(ToolbarGroup), null, {
|
|
30009
30172
|
default: withCtx(() => [
|
|
30173
|
+
createVNode(unref(_sfc_main$m)),
|
|
30010
30174
|
createVNode(unref(_sfc_main$l)),
|
|
30011
30175
|
createVNode(unref(_sfc_main$k)),
|
|
30012
30176
|
createVNode(unref(_sfc_main$j)),
|
|
30013
|
-
createVNode(unref(_sfc_main$i))
|
|
30014
|
-
createVNode(unref(_sfc_main$h))
|
|
30177
|
+
createVNode(unref(_sfc_main$i))
|
|
30015
30178
|
]),
|
|
30016
30179
|
_: 1
|
|
30017
30180
|
})
|
|
@@ -30021,9 +30184,10 @@ const _sfc_main$4 = {
|
|
|
30021
30184
|
createVNode(unref(ToolbarDivider), { horizontal: "" }),
|
|
30022
30185
|
createVNode(unref(ToolbarRow), null, {
|
|
30023
30186
|
default: withCtx(() => [
|
|
30024
|
-
createVNode(unref(_sfc_main$
|
|
30187
|
+
createVNode(unref(_sfc_main$h)),
|
|
30025
30188
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
30026
30189
|
createVNode(unref(LineHeightControl)),
|
|
30190
|
+
createVNode(unref(LetterSpacingControl)),
|
|
30027
30191
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
30028
30192
|
createVNode(unref(ListControl)),
|
|
30029
30193
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
@@ -30069,19 +30233,19 @@ const _sfc_main$3 = {
|
|
|
30069
30233
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
30070
30234
|
createVNode(unref(ToolbarGroup), null, {
|
|
30071
30235
|
default: withCtx(() => [
|
|
30072
|
-
createVNode(unref(_sfc_main$
|
|
30073
|
-
createVNode(unref(_sfc_main$
|
|
30236
|
+
createVNode(unref(_sfc_main$o)),
|
|
30237
|
+
createVNode(unref(_sfc_main$n))
|
|
30074
30238
|
]),
|
|
30075
30239
|
_: 1
|
|
30076
30240
|
}),
|
|
30077
30241
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
30078
30242
|
createVNode(unref(ToolbarGroup), null, {
|
|
30079
30243
|
default: withCtx(() => [
|
|
30244
|
+
createVNode(unref(_sfc_main$m)),
|
|
30080
30245
|
createVNode(unref(_sfc_main$l)),
|
|
30081
30246
|
createVNode(unref(_sfc_main$k)),
|
|
30082
30247
|
createVNode(unref(_sfc_main$j)),
|
|
30083
|
-
createVNode(unref(_sfc_main$i))
|
|
30084
|
-
createVNode(unref(_sfc_main$h))
|
|
30248
|
+
createVNode(unref(_sfc_main$i))
|
|
30085
30249
|
]),
|
|
30086
30250
|
_: 1
|
|
30087
30251
|
})
|
|
@@ -30091,7 +30255,7 @@ const _sfc_main$3 = {
|
|
|
30091
30255
|
createVNode(unref(ToolbarDivider), { horizontal: "" }),
|
|
30092
30256
|
createVNode(unref(ToolbarRow), null, {
|
|
30093
30257
|
default: withCtx(() => [
|
|
30094
|
-
createVNode(unref(_sfc_main$
|
|
30258
|
+
createVNode(unref(_sfc_main$h)),
|
|
30095
30259
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
30096
30260
|
createVNode(unref(LineHeightControl)),
|
|
30097
30261
|
createVNode(unref(ToolbarDivider), { vertical: "" }),
|
|
@@ -30442,7 +30606,7 @@ export {
|
|
|
30442
30606
|
ButtonToggle,
|
|
30443
30607
|
CaseStyle,
|
|
30444
30608
|
Checkbox,
|
|
30445
|
-
_sfc_main$
|
|
30609
|
+
_sfc_main$s as ColorPicker,
|
|
30446
30610
|
Device,
|
|
30447
30611
|
DeviceList,
|
|
30448
30612
|
Dropdown,
|