@zipify/wysiwyg 2.0.0-7 → 2.0.0-8

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.
Files changed (37) hide show
  1. package/config/build/cli.config.js +6 -2
  2. package/dist/cli.js +3 -3
  3. package/dist/wysiwyg.css +41 -31
  4. package/dist/wysiwyg.mjs +187 -34
  5. package/lib/assets/icons/indicator.svg +4 -0
  6. package/lib/cli/commands/Command.js +34 -0
  7. package/lib/cli/commands/ToJsonCommand.js +45 -0
  8. package/lib/cli/commands/index.js +1 -0
  9. package/lib/cli/index.js +1 -0
  10. package/lib/components/base/Button.vue +6 -0
  11. package/lib/components/base/dropdown/Dropdown.vue +7 -1
  12. package/lib/components/base/dropdown/DropdownActivator.vue +25 -4
  13. package/lib/components/base/dropdown/__tests__/DropdownActivator.test.js +23 -1
  14. package/lib/components/toolbar/controls/AlignmentControl.vue +12 -1
  15. package/lib/components/toolbar/controls/FontColorControl.vue +14 -0
  16. package/lib/components/toolbar/controls/FontFamilyControl.vue +4 -0
  17. package/lib/components/toolbar/controls/FontSizeControl.vue +6 -1
  18. package/lib/components/toolbar/controls/FontWeightControl.vue +12 -0
  19. package/lib/components/toolbar/controls/ItalicControl.vue +14 -0
  20. package/lib/components/toolbar/controls/LineHeightControl.vue +15 -0
  21. package/lib/components/toolbar/controls/UnderlineControl.vue +13 -0
  22. package/lib/components/toolbar/controls/__tests__/AlignmentControl.test.js +72 -5
  23. package/lib/components/toolbar/controls/__tests__/FontColorControl.test.js +22 -1
  24. package/lib/components/toolbar/controls/__tests__/FontFamilyControl.test.js +1 -0
  25. package/lib/components/toolbar/controls/__tests__/FontSizeControl.test.js +1 -0
  26. package/lib/components/toolbar/controls/__tests__/FontWeightControl.test.js +1 -0
  27. package/lib/components/toolbar/controls/__tests__/ItalicControl.test.js +23 -1
  28. package/lib/components/toolbar/controls/__tests__/LineHeightControl.test.js +23 -1
  29. package/lib/components/toolbar/controls/__tests__/UnderlineControl.test.js +25 -1
  30. package/lib/directives/__tests__/tooltip.test.js +22 -4
  31. package/lib/directives/tooltip.js +4 -1
  32. package/lib/entry-cli.js +6 -21
  33. package/lib/extensions/StylePreset.js +6 -0
  34. package/lib/extensions/TextDecoration.js +7 -0
  35. package/lib/extensions/__tests__/StylePreset.test.js +51 -0
  36. package/lib/extensions/__tests__/TextDecoration.test.js +20 -0
  37. package/package.json +3 -2
package/dist/wysiwyg.mjs CHANGED
@@ -14298,7 +14298,7 @@ var __component__$F = /* @__PURE__ */ normalizeComponent(
14298
14298
  staticRenderFns$F,
14299
14299
  false,
14300
14300
  __vue2_injectStyles$F,
14301
- "562f4e4a",
14301
+ "1ea5f7a2",
14302
14302
  null,
14303
14303
  null
14304
14304
  );
@@ -14427,22 +14427,23 @@ const __vite_glob_0_4 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" sty
14427
14427
  const __vite_glob_0_5 = '<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="#fff" stroke="#B3B3B3" d="M4.5 4.5h19v19h-19z"/>\n <path fill="#3B3B3B" d="M26 20.7a2.51 2.51 0 0 1-5 0c0-1.31 2.5-4.7 2.5-4.7s2.5 3.39 2.5 4.7Z"/>\n <path fill="#3B3B3B" fill-rule="evenodd" d="M19.64 19.93h-1.715a.75.75 0 0 1-.475-.145.82.82 0 0 1-.268-.359l-.89-2.433h-4.943l-.89 2.433a.78.78 0 0 1-.26.347.73.73 0 0 1-.475.157H8L12.686 8h2.269l4.686 11.93Zm-7.721-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.635l-1.452 3.952Z" clip-rule="evenodd"/>\n</svg>\n';
14428
14428
  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';
14429
14429
  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';
14430
- 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';
14431
- 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 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';
14432
- 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="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';
14433
- 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 <rect width="9" height="9" x="9.5" y="9.5" stroke="var(--zw-icon-foreground)" rx="4.5"/>\n</svg>\n';
14434
- 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 <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';
14435
- 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 <rect width="10" height="10" x="9" y="9" fill="var(--zw-icon-foreground)" rx="5"/>\n</svg>\n';
14436
- 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 <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';
14437
- 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="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';
14438
- 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="M9 9h10v10H9z"/>\n</svg>\n';
14439
- 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)" 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';
14440
- 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 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';
14441
- 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)" 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';
14442
- 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="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';
14443
- 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)" 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';
14444
- 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 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';
14445
- 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/line-height.svg": __vite_glob_0_9, "../assets/icons/link.svg": __vite_glob_0_10, "../assets/icons/list-circle.svg": __vite_glob_0_11, "../assets/icons/list-decimal.svg": __vite_glob_0_12, "../assets/icons/list-disc.svg": __vite_glob_0_13, "../assets/icons/list-latin.svg": __vite_glob_0_14, "../assets/icons/list-roman.svg": __vite_glob_0_15, "../assets/icons/list-square.svg": __vite_glob_0_16, "../assets/icons/remove-format.svg": __vite_glob_0_17, "../assets/icons/reset-styles.svg": __vite_glob_0_18, "../assets/icons/strike-through.svg": __vite_glob_0_19, "../assets/icons/superscript.svg": __vite_glob_0_20, "../assets/icons/underline.svg": __vite_glob_0_21, "../assets/icons/unlink.svg": __vite_glob_0_22 });
14430
+ const __vite_glob_0_8 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 9 9">\n <path fill="#FFAB00" d="M0 4.5a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0Z"/>\n <path fill="#fff" fill-rule="evenodd" d="M5.063 2.25H3.938v3.375h1.124V2.25Zm-1.125 4.5a.562.562 0 1 1 1.123-.001.562.562 0 0 1-1.123.001Z" clip-rule="evenodd"/>\n</svg>\n';
14431
+ 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 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';
14432
+ 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';
14433
+ 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';
14434
+ 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';
14435
+ 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';
14436
+ 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';
14437
+ 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';
14438
+ 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';
14439
+ 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';
14440
+ 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';
14441
+ 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';
14442
+ 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';
14443
+ 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';
14444
+ 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';
14445
+ 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';
14446
+ 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/indicator.svg": __vite_glob_0_8, "../assets/icons/italic.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 });
14446
14447
  function importIcon(name) {
14447
14448
  return modules[`../assets/icons/${name}.svg`] || "";
14448
14449
  }
@@ -21273,13 +21274,17 @@ const outClick = {
21273
21274
  toggleListener(false, dataStorage.get(el).callback);
21274
21275
  }
21275
21276
  };
21276
- function tooltip(el, { value }) {
21277
+ function tooltip(el, { value, modifiers: modifiers2 }) {
21277
21278
  const options = typeof value === "string" ? { text: value } : value;
21278
21279
  const { text: text2, hotkey } = options;
21279
21280
  if (text2)
21280
21281
  el.dataset.tooltip = text2;
21281
21282
  if (text2 && hotkey)
21282
21283
  el.dataset.tooltipHotkey = hotkey;
21284
+ if (modifiers2.xs)
21285
+ el.dataset.tooltipSize = "xs";
21286
+ if (modifiers2.lg)
21287
+ el.dataset.tooltipSize = "lg";
21283
21288
  }
21284
21289
  var render$y = function __render__11() {
21285
21290
  var _vm = this;
@@ -21577,7 +21582,23 @@ var render$v = function __render__14() {
21577
21582
  }
21578
21583
  }, [_c("span", {
21579
21584
  staticClass: "zw-dropdown__activator-title zw-text--truncate"
21580
- }, [_vm._v(" " + _vm._s(_vm.activeOptionTitle) + " ")]), _c("Icon", {
21585
+ }, [_vm._v(" " + _vm._s(_vm.activeOptionTitle) + " ")]), _vm.isCustomized ? _c("Icon", {
21586
+ directives: [{
21587
+ name: "tooltip",
21588
+ rawName: "v-tooltip.xs",
21589
+ value: "Default parameter setting is changed",
21590
+ expression: "'Default parameter setting is changed'",
21591
+ modifiers: {
21592
+ "xs": true
21593
+ }
21594
+ }],
21595
+ staticClass: "zw-dropdown__customized-indicator",
21596
+ attrs: {
21597
+ "name": "indicator",
21598
+ "size": "9px",
21599
+ "data-test-selector": "customizedIndicator"
21600
+ }
21601
+ }) : _vm._e(), _c("Icon", {
21581
21602
  staticClass: "zw-dropdown__activator-arrow",
21582
21603
  attrs: {
21583
21604
  "name": "arrow",
@@ -21598,6 +21619,9 @@ const __vue2_script$v = {
21598
21619
  Icon,
21599
21620
  Button
21600
21621
  },
21622
+ directives: {
21623
+ tooltip
21624
+ },
21601
21625
  model: {
21602
21626
  event: "change"
21603
21627
  },
@@ -21606,6 +21630,11 @@ const __vue2_script$v = {
21606
21630
  type: String,
21607
21631
  required: false,
21608
21632
  default: "none"
21633
+ },
21634
+ isCustomized: {
21635
+ type: Boolean,
21636
+ required: false,
21637
+ default: false
21609
21638
  }
21610
21639
  },
21611
21640
  setup(props) {
@@ -21632,7 +21661,7 @@ var __component__$v = /* @__PURE__ */ normalizeComponent(
21632
21661
  staticRenderFns$v,
21633
21662
  false,
21634
21663
  __vue2_injectStyles$v,
21635
- "021ac370",
21664
+ "0f1c87fd",
21636
21665
  null,
21637
21666
  null
21638
21667
  );
@@ -21896,7 +21925,8 @@ var render$q = function __render__19() {
21896
21925
  staticClass: "zw-dropdown"
21897
21926
  }, [_c("DropdownActivator", {
21898
21927
  attrs: {
21899
- "color": _vm.color
21928
+ "color": _vm.color,
21929
+ "is-customized": _vm.isCustomized
21900
21930
  },
21901
21931
  scopedSlots: _vm._u([{
21902
21932
  key: "default",
@@ -21954,6 +21984,11 @@ const __vue2_script$q = {
21954
21984
  type: String,
21955
21985
  required: false,
21956
21986
  default: "none"
21987
+ },
21988
+ isCustomized: {
21989
+ type: Boolean,
21990
+ required: false,
21991
+ default: false
21957
21992
  }
21958
21993
  },
21959
21994
  setup(props, { emit }) {
@@ -21985,7 +22020,7 @@ var __component__$q = /* @__PURE__ */ normalizeComponent(
21985
22020
  staticRenderFns$q,
21986
22021
  false,
21987
22022
  __vue2_injectStyles$q,
21988
- "885109ea",
22023
+ "29e6a104",
21989
22024
  null,
21990
22025
  null
21991
22026
  );
@@ -22304,7 +22339,8 @@ var render$n = function __render__22() {
22304
22339
  staticClass: "zw-font-family-control",
22305
22340
  attrs: {
22306
22341
  "options": _vm.options,
22307
- "value": _vm.currentValue
22342
+ "value": _vm.currentValue,
22343
+ "is-customized": _vm.isCustomized
22308
22344
  },
22309
22345
  on: {
22310
22346
  "change": _vm.apply
@@ -22365,6 +22401,7 @@ const __vue2_script$n = {
22365
22401
  return { "--zw-font-family-option": `"${option.id}"` };
22366
22402
  }
22367
22403
  const currentValue = editor.commands.getFontFamily();
22404
+ const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_FAMILY);
22368
22405
  const apply2 = (fontFamily) => {
22369
22406
  recentFontNames.add(fontFamily);
22370
22407
  editor.chain().focus().applyFontFamily(fontFamily).run();
@@ -22372,6 +22409,7 @@ const __vue2_script$n = {
22372
22409
  return {
22373
22410
  options,
22374
22411
  currentValue,
22412
+ isCustomized,
22375
22413
  renderOptionStyles,
22376
22414
  apply: apply2
22377
22415
  };
@@ -22384,7 +22422,7 @@ var __component__$n = /* @__PURE__ */ normalizeComponent(
22384
22422
  staticRenderFns$n,
22385
22423
  false,
22386
22424
  __vue2_injectStyles$n,
22387
- "07a47462",
22425
+ "2f66bfa6",
22388
22426
  null,
22389
22427
  null
22390
22428
  );
@@ -22410,9 +22448,11 @@ var render$m = function __render__23() {
22410
22448
  },
22411
22449
  expression: "{ text: 'Font Weight', hotkey: 'Mod B' }"
22412
22450
  }],
22451
+ staticClass: "zw-font-weight-control",
22413
22452
  attrs: {
22414
22453
  "options": _vm.options,
22415
- "value": _vm.currentValue
22454
+ "value": _vm.currentValue,
22455
+ "is-customized": _vm.isCustomized
22416
22456
  },
22417
22457
  on: {
22418
22458
  "change": _vm.apply
@@ -22420,6 +22460,7 @@ var render$m = function __render__23() {
22420
22460
  });
22421
22461
  };
22422
22462
  var staticRenderFns$m = [];
22463
+ const FontWeightControl_vue_vue_type_style_index_0_scoped_true_lang = "";
22423
22464
  const __vue2_script$m = {
22424
22465
  name: "FontWeightControl",
22425
22466
  components: {
@@ -22433,10 +22474,12 @@ const __vue2_script$m = {
22433
22474
  const font = editor.commands.getFont();
22434
22475
  const options = computed(() => unref(font).weights.map((style2) => ({ id: style2 })));
22435
22476
  const currentValue = editor.commands.getFontWeight();
22477
+ const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_WEIGHT);
22436
22478
  const apply2 = (value) => editor.chain().focus().applyFontWeight(value).run();
22437
22479
  return {
22438
22480
  options,
22439
22481
  currentValue,
22482
+ isCustomized,
22440
22483
  apply: apply2
22441
22484
  };
22442
22485
  }
@@ -22448,7 +22491,7 @@ var __component__$m = /* @__PURE__ */ normalizeComponent(
22448
22491
  staticRenderFns$m,
22449
22492
  false,
22450
22493
  __vue2_injectStyles$m,
22451
- null,
22494
+ "5a87e48e",
22452
22495
  null,
22453
22496
  null
22454
22497
  );
@@ -22477,7 +22520,8 @@ var render$l = function __render__24() {
22477
22520
  staticClass: "zw-font-size-control",
22478
22521
  attrs: {
22479
22522
  "options": _vm.options,
22480
- "value": _vm.currentValue
22523
+ "value": _vm.currentValue,
22524
+ "is-customized": _vm.isCustomized
22481
22525
  },
22482
22526
  on: {
22483
22527
  "change": _vm.apply
@@ -22501,10 +22545,12 @@ const __vue2_script$l = {
22501
22545
  return fontSizes.map((size2) => ({ id: size2, title: `${size2}px` }));
22502
22546
  });
22503
22547
  const currentValue = editor.commands.getFontSize();
22548
+ const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_SIZE);
22504
22549
  const apply2 = (value) => editor.chain().focus().applyFontSize(value).run();
22505
22550
  return {
22506
22551
  options,
22507
22552
  currentValue,
22553
+ isCustomized,
22508
22554
  apply: apply2
22509
22555
  };
22510
22556
  }
@@ -22516,7 +22562,7 @@ var __component__$l = /* @__PURE__ */ normalizeComponent(
22516
22562
  staticRenderFns$l,
22517
22563
  false,
22518
22564
  __vue2_injectStyles$l,
22519
- "71dd7ffc",
22565
+ "3f8185ea",
22520
22566
  null,
22521
22567
  null
22522
22568
  );
@@ -22550,6 +22596,7 @@ var render$k = function __render__25() {
22550
22596
  value: "Font Color",
22551
22597
  expression: "'Font Color'"
22552
22598
  }],
22599
+ staticClass: "zw-position--relative",
22553
22600
  attrs: {
22554
22601
  "icon": "",
22555
22602
  "skin": "toolbar",
@@ -22564,7 +22611,23 @@ var render$k = function __render__25() {
22564
22611
  "size": "28px",
22565
22612
  "auto-color": ""
22566
22613
  }
22567
- })], 1)];
22614
+ }), _vm.isCustomized ? _c("Icon", {
22615
+ directives: [{
22616
+ name: "tooltip",
22617
+ rawName: "v-tooltip.xs",
22618
+ value: "Default parameter setting is changed",
22619
+ expression: "'Default parameter setting is changed'",
22620
+ modifiers: {
22621
+ "xs": true
22622
+ }
22623
+ }],
22624
+ staticClass: "zw-button__customized-indicator",
22625
+ attrs: {
22626
+ "name": "indicator",
22627
+ "size": "9px",
22628
+ "data-test-selector": "customizedIndicator"
22629
+ }
22630
+ }) : _vm._e()], 1)];
22568
22631
  }
22569
22632
  }])
22570
22633
  });
@@ -22583,9 +22646,11 @@ const __vue2_script$k = {
22583
22646
  setup() {
22584
22647
  const editor = inject(InjectionTokens$1.EDITOR);
22585
22648
  const currentValue = editor.commands.getFontColor();
22649
+ const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_COLOR);
22586
22650
  const apply2 = (color) => editor.chain().applyFontColor(color).run();
22587
22651
  return {
22588
22652
  currentValue,
22653
+ isCustomized,
22589
22654
  apply: apply2
22590
22655
  };
22591
22656
  }
@@ -22704,6 +22769,7 @@ var render$i = function __render__27() {
22704
22769
  },
22705
22770
  expression: "{ text: 'Italic', hotkey: 'Mod I' }"
22706
22771
  }],
22772
+ staticClass: "zw-position--relative",
22707
22773
  attrs: {
22708
22774
  "skin": "toolbar",
22709
22775
  "icon": "",
@@ -22719,7 +22785,23 @@ var render$i = function __render__27() {
22719
22785
  "size": "28px",
22720
22786
  "auto-color": ""
22721
22787
  }
22722
- })], 1);
22788
+ }), _vm.isCustomized ? _c("Icon", {
22789
+ directives: [{
22790
+ name: "tooltip",
22791
+ rawName: "v-tooltip.xs",
22792
+ value: "Default parameter setting is changed",
22793
+ expression: "'Default parameter setting is changed'",
22794
+ modifiers: {
22795
+ "xs": true
22796
+ }
22797
+ }],
22798
+ staticClass: "zw-button__customized-indicator",
22799
+ attrs: {
22800
+ "name": "indicator",
22801
+ "size": "9px",
22802
+ "data-test-selector": "customizedIndicator"
22803
+ }
22804
+ }) : _vm._e()], 1);
22723
22805
  };
22724
22806
  var staticRenderFns$i = [];
22725
22807
  const __vue2_script$i = {
@@ -22734,11 +22816,13 @@ const __vue2_script$i = {
22734
22816
  setup() {
22735
22817
  const editor = inject(InjectionTokens$1.EDITOR);
22736
22818
  const currentValue = editor.commands.isItalic();
22819
+ const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_STYLE);
22737
22820
  const isAvailable = editor.commands.isItalicAvailable();
22738
22821
  const apply2 = () => editor.chain().focus().toggleItalic().run();
22739
22822
  return {
22740
22823
  isAvailable,
22741
22824
  currentValue,
22825
+ isCustomized,
22742
22826
  apply: apply2
22743
22827
  };
22744
22828
  }
@@ -22776,6 +22860,7 @@ var render$h = function __render__28() {
22776
22860
  },
22777
22861
  expression: "{ text: 'Underline', hotkey: 'Mod U' }"
22778
22862
  }],
22863
+ staticClass: "zw-position--relative",
22779
22864
  attrs: {
22780
22865
  "skin": "toolbar",
22781
22866
  "icon": "",
@@ -22790,7 +22875,23 @@ var render$h = function __render__28() {
22790
22875
  "size": "28px",
22791
22876
  "auto-color": ""
22792
22877
  }
22793
- })], 1);
22878
+ }), _vm.isCustomized ? _c("Icon", {
22879
+ directives: [{
22880
+ name: "tooltip",
22881
+ rawName: "v-tooltip.xs",
22882
+ value: "Default parameter setting is changed",
22883
+ expression: "'Default parameter setting is changed'",
22884
+ modifiers: {
22885
+ "xs": true
22886
+ }
22887
+ }],
22888
+ staticClass: "zw-button__customized-indicator",
22889
+ attrs: {
22890
+ "name": "indicator",
22891
+ "size": "9px",
22892
+ "data-test-selector": "customizedIndicator"
22893
+ }
22894
+ }) : _vm._e()], 1);
22794
22895
  };
22795
22896
  var staticRenderFns$h = [];
22796
22897
  const __vue2_script$h = {
@@ -22805,9 +22906,11 @@ const __vue2_script$h = {
22805
22906
  setup() {
22806
22907
  const editor = inject(InjectionTokens$1.EDITOR);
22807
22908
  const currentValue = editor.commands.isUnderline();
22909
+ const isCustomized = editor.commands.isUnderlineCustomized();
22808
22910
  const apply2 = () => editor.chain().focus().toggleUnderline().run();
22809
22911
  return {
22810
22912
  currentValue,
22913
+ isCustomized,
22811
22914
  apply: apply2
22812
22915
  };
22813
22916
  }
@@ -23068,6 +23171,7 @@ var render$d = function __render__32() {
23068
23171
  value: option.tooltip,
23069
23172
  expression: "option.tooltip"
23070
23173
  }],
23174
+ staticClass: "zw-position--relative",
23071
23175
  attrs: {
23072
23176
  "icon": "",
23073
23177
  "skin": "toolbar",
@@ -23076,7 +23180,23 @@ var render$d = function __render__32() {
23076
23180
  on: {
23077
23181
  "click": activate
23078
23182
  }
23079
- }, [_c("Icon", {
23183
+ }, [_vm.isCustomized && isActive2 ? _c("Icon", {
23184
+ directives: [{
23185
+ name: "tooltip",
23186
+ rawName: "v-tooltip.xs",
23187
+ value: "Default parameter setting is changed",
23188
+ expression: "'Default parameter setting is changed'",
23189
+ modifiers: {
23190
+ "xs": true
23191
+ }
23192
+ }],
23193
+ staticClass: "zw-button__customized-indicator",
23194
+ attrs: {
23195
+ "name": "indicator",
23196
+ "size": "9px",
23197
+ "data-test-selector": "customizedIndicator"
23198
+ }
23199
+ }) : _vm._e(), _c("Icon", {
23080
23200
  attrs: {
23081
23201
  "name": "alignment-".concat(option.id),
23082
23202
  "size": "28px",
@@ -23119,12 +23239,14 @@ const __vue2_script$d = {
23119
23239
  setup(_, { emit }) {
23120
23240
  const editor = inject(InjectionTokens$1.EDITOR);
23121
23241
  const currentValue = editor.commands.getAlignment();
23242
+ const isCustomized = editor.commands.isSettingCustomized("attributes", TextSettings.ALIGNMENT);
23122
23243
  function apply2(value) {
23123
23244
  editor.chain().focus().applyAlignment(value).run();
23124
23245
  emit("applied");
23125
23246
  }
23126
23247
  return {
23127
23248
  currentValue,
23249
+ isCustomized,
23128
23250
  apply: apply2
23129
23251
  };
23130
23252
  }
@@ -23250,6 +23372,7 @@ var render$b = function __render__34() {
23250
23372
  value: "Line Height",
23251
23373
  expression: "'Line Height'"
23252
23374
  }],
23375
+ staticClass: "zw-position--relative",
23253
23376
  attrs: {
23254
23377
  "icon": "",
23255
23378
  "skin": "toolbar",
@@ -23264,7 +23387,23 @@ var render$b = function __render__34() {
23264
23387
  "size": "28px",
23265
23388
  "auto-color": ""
23266
23389
  }
23267
- })], 1), _c("Modal", {
23390
+ }), _vm.isCustomized ? _c("Icon", {
23391
+ directives: [{
23392
+ name: "tooltip",
23393
+ rawName: "v-tooltip.xs",
23394
+ value: "Default parameter setting is changed",
23395
+ expression: "'Default parameter setting is changed'",
23396
+ modifiers: {
23397
+ "xs": true
23398
+ }
23399
+ }],
23400
+ staticClass: "zw-button__customized-indicator",
23401
+ attrs: {
23402
+ "name": "indicator",
23403
+ "size": "9px",
23404
+ "data-test-selector": "customizedIndicator"
23405
+ }
23406
+ }) : _vm._e()], 1), _c("Modal", {
23268
23407
  ref: "modalRef",
23269
23408
  staticClass: "zw-line-height-control__modal",
23270
23409
  attrs: {
@@ -23323,11 +23462,13 @@ const __vue2_script$b = {
23323
23462
  const editor = inject(InjectionTokens$1.EDITOR);
23324
23463
  const toggler = useModalToggler({ wrapperRef, modalRef });
23325
23464
  const currentValue = editor.commands.getLineHeight();
23465
+ const isCustomized = editor.commands.isSettingCustomized("attributes", TextSettings.LINE_HEIGHT);
23326
23466
  const apply2 = (value) => editor.commands.applyLineHeight(String(value));
23327
23467
  return {
23328
23468
  wrapperRef,
23329
23469
  modalRef,
23330
23470
  isOpened: toggler.isOpened,
23471
+ isCustomized,
23331
23472
  toggler,
23332
23473
  currentValue,
23333
23474
  apply: apply2
@@ -23341,7 +23482,7 @@ var __component__$b = /* @__PURE__ */ normalizeComponent(
23341
23482
  staticRenderFns$b,
23342
23483
  false,
23343
23484
  __vue2_injectStyles$b,
23344
- "9ea28b80",
23485
+ "c316d7dc",
23345
23486
  null,
23346
23487
  null
23347
23488
  );
@@ -24580,6 +24721,13 @@ const StylePreset = Extension.create({
24580
24721
  };
24581
24722
  });
24582
24723
  }),
24724
+ isSettingCustomized: createCommand(({ commands: commands2 }, group, name) => {
24725
+ const customization = commands2.getPresetCustomization();
24726
+ return computed(() => {
24727
+ var _a, _b;
24728
+ return (_b = (_a = unref(customization)[group]) == null ? void 0 : _a.includes(name)) != null ? _b : false;
24729
+ });
24730
+ }),
24583
24731
  removePresetCustomization: createCommand(({ chain }) => {
24584
24732
  chain().storeSelection().expandSelectionToBlock().removeMarks(TextSettings.marks).resetAttributes(NodeTypes.PARAGRAPH, TextSettings.attributes).resetAttributes(NodeTypes.HEADING, TextSettings.attributes).restoreSelection().run();
24585
24733
  }),
@@ -24936,6 +25084,11 @@ const TextDecoration = Mark.create({
24936
25084
  };
24937
25085
  });
24938
25086
  }),
25087
+ isUnderlineCustomized: createCommand(({ commands: commands2 }) => {
25088
+ const currentValue = commands2.isUnderline();
25089
+ const defaultValue = commands2.getDefaultTextDecoration();
25090
+ return computed(() => unref(currentValue) !== unref(defaultValue).underline);
25091
+ }),
24939
25092
  getDefaultTextDecoration: createCommand(({ commands: commands2 }) => {
24940
25093
  const preset = commands2.getPreset();
24941
25094
  return computed(() => {
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 9 9">
2
+ <path fill="#FFAB00" d="M0 4.5a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0Z"/>
3
+ <path fill="#fff" fill-rule="evenodd" d="M5.063 2.25H3.938v3.375h1.124V2.25Zm-1.125 4.5a.562.562 0 1 1 1.123-.001.562.562 0 0 1-1.123.001Z" clip-rule="evenodd"/>
4
+ </svg>
@@ -0,0 +1,34 @@
1
+ export class Command {
2
+ name;
3
+ argument;
4
+ options = [];
5
+
6
+ doCommand() {
7
+ throw new Error('Command "doCommand" is required');
8
+ }
9
+
10
+ install(program) {
11
+ if (!this.name) {
12
+ throw new Error('Command "name" is required');
13
+ }
14
+
15
+ let building = program.command(this.name);
16
+
17
+ if (this.argument) {
18
+ building = building.argument(this.argument);
19
+ }
20
+
21
+ if (this.options.length) {
22
+ for (const option of this.options) {
23
+ building = building.option(option.flags, option.description, option.default);
24
+ }
25
+ }
26
+
27
+ building.action(this.doCommand.bind(this));
28
+ }
29
+
30
+ output(data) {
31
+ // eslint-disable-next-line no-console
32
+ console.log(data);
33
+ }
34
+ }
@@ -0,0 +1,45 @@
1
+ import { resolve } from 'path';
2
+ import { ContentSerializer } from '../ContentSerializer';
3
+ import { Command } from './Command';
4
+
5
+ export class ToJsonCommand extends Command {
6
+ name = 'to-json';
7
+ argument = '<html>';
8
+
9
+ options = [
10
+ {
11
+ flags: '--config <path>',
12
+ description: 'Generator config',
13
+ // Relative to dist folder
14
+ default: resolve(__dirname, '../bin/zp.config.json')
15
+ }
16
+ ];
17
+
18
+ doCommand(html, { config }) {
19
+ const configPath = resolve(process.cwd(), config);
20
+ const serializer = ContentSerializer.build(require(configPath).editor);
21
+ const json = serializer.toJSON(this.#formatInputHtml(html));
22
+
23
+ this.output(this.#formatOutputJson(json));
24
+ }
25
+
26
+ #formatInputHtml(html) {
27
+ return html
28
+ .replace(/\\(["'])/g, '$1')
29
+ .replace(/rgba\(\d{1,3}, ?\d{1,3}, ?\d{1,3}, (\d{1,2}%)\)/g, (substring, alpha) => {
30
+ return substring.replace(alpha, parseFloat(alpha) / 100);
31
+ });
32
+ }
33
+
34
+ #formatOutputJson(object) {
35
+ const skipNullValue = (_, value) => value === null ? undefined : value;
36
+ const json = JSON.stringify(object, skipNullValue, 2);
37
+
38
+ return json
39
+ .replace(/\\"/g, '"')
40
+ .replace(/font-family: ?'(.+)'/g, 'font-family: "$1"')
41
+ .replace(/'/g, '\\\'')
42
+ .replace(/^[\t ]*"[^:\n\r]+(?<!\\)":/gm, (match) => match.replace(/"/g, ''))
43
+ .replace(/: "(.+)"([,\n])/g, ': \'$1\'$2');
44
+ }
45
+ }