@paroicms/quill-editor-plugin 1.23.2 → 1.24.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.
@@ -66,6 +66,7 @@ async function imgBlotProcessing(service, value, options) {
66
66
  const align = (0, data_formatters_lib_1.strValOrUndef)(value.align);
67
67
  const zoom = (0, data_formatters_lib_1.strValOrUndef)(value.zoom);
68
68
  const hasZoom = zoom !== "none";
69
+ const href = (0, data_formatters_lib_1.strValOrUndef)(value.href, { varName: "href" });
69
70
  let imgAttributes;
70
71
  if (uid && variant && (0, public_server_lib_1.isImageSize)(variant)) {
71
72
  const realSize = (0, public_server_lib_1.applyRatioToImageSize)(variant, themeConf.pixelRatio);
@@ -83,6 +84,7 @@ async function imgBlotProcessing(service, value, options) {
83
84
  src: options?.absoluteUrls ? (0, public_server_lib_1.toAbsoluteUrl)(service, image.url) : image.url,
84
85
  width: Math.round(image.width / themeConf.pixelRatio),
85
86
  height: Math.round(image.height / themeConf.pixelRatio),
87
+ href,
86
88
  };
87
89
  }
88
90
  else {
@@ -96,6 +98,7 @@ async function imgBlotProcessing(service, value, options) {
96
98
  src,
97
99
  width: (0, data_formatters_lib_1.nbValOrUndef)(value.width),
98
100
  height: (0, data_formatters_lib_1.nbValOrUndef)(value.height),
101
+ href,
99
102
  };
100
103
  }
101
104
  const attributes = [];
@@ -105,10 +108,11 @@ async function imgBlotProcessing(service, value, options) {
105
108
  attributes.push(`src="${(0, public_server_lib_1.escapeHtml)(imgAttributes.src)}"`);
106
109
  attributes.push(`class="Img${align ? ` ${(0, public_server_lib_1.escapeHtml)(align)}` : ""}"`);
107
110
  attributes.push(`loading="lazy"`);
108
- if (imgAttributes.width !== undefined)
109
- attributes.push(`width="${imgAttributes.width}"`);
110
- if (imgAttributes.height !== undefined)
111
- attributes.push(`height="${imgAttributes.height}"`);
111
+ attributes.push(`width="${imgAttributes.width}"`);
112
+ attributes.push(`height="${imgAttributes.height}"`);
113
+ if (imgAttributes.href) {
114
+ return `<a href="${imgAttributes.href}"><img ${attributes.join(" ")}></a>`;
115
+ }
112
116
  return `<img ${attributes.join(" ")}>`;
113
117
  }
114
118
  function preprocessDelta(ops) {
@@ -1,4 +1,4 @@
1
- .QpBtn{background-color:#6366f1;border:1px solid #6366f1;border-radius:6px;color:#fff;cursor:pointer;font-size:1rem;padding:.75rem 1.25rem;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s}.QpBtn.secondary{background-color:#64748b;border:1px solid #64748b}.QpBtn.danger{background-color:#ef4444;border:1px solid #ef4444}.QpBtn.outlined{background-color:transparent;color:inherit}.QpBtn.outlined:hover{background-color:#c6c7f6}.QpBtn.secondary.outlined{color:#64748b}.QpBtn.secondary.outlined:hover{background-color:#64748b0a}.QpBtn.danger.outlined{color:#ef4444}.QpBtn.danger.outlined:hover{background-color:#ef44440a}.QpInput{appearance:none;background:#fff;border:1px solid #d1d5db;border-radius:6px;color:#4b5563;font-size:10px;padding:10px;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s}.QpInput:hover{border-color:#06b6d4}.QpInput:focus{border-color:#06b6d4;box-shadow:0 0 0 .2rem #a5f3fc;outline:0 none;outline-offset:0}.QpHtmlSnippetInput{width:100%}.QpOption{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:20px;width:100%}/*!
1
+ .QpBtn{background-color:#6366f1;border:1px solid #6366f1;border-radius:6px;color:#fff;cursor:pointer;font-size:1rem;padding:.75rem 1.25rem;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s}.QpBtn.secondary{background-color:#64748b;border:1px solid #64748b}.QpBtn.danger{background-color:#ef4444;border:1px solid #ef4444}.QpBtn.outlined{background-color:transparent;color:inherit}.QpBtn.outlined:hover{background-color:#c6c7f6}.QpBtn.secondary.outlined{color:#64748b}.QpBtn.secondary.outlined:hover{background-color:#64748b0a}.QpBtn.danger.outlined{color:#ef4444}.QpBtn.danger.outlined:hover{background-color:#ef44440a}.QpInput{appearance:none;background:#fff;border:1px solid #d1d5db;border-radius:6px;color:#4b5563;font-size:10px;padding:10px;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s}.QpInput:hover{border-color:#06b6d4}.QpInput:focus{border-color:#06b6d4;box-shadow:0 0 0 .2rem #a5f3fc;outline:0 none;outline-offset:0}.QpHtmlSnippetInput{width:100%}.QpOption{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:20px;width:100%}.QpOption-input{background:#fff;border:1px solid #d1d5db;border-radius:6px;color:#4b5563;font-size:1rem;padding:10px;margin-left:8px;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s}/*!
2
2
  * Quill Editor v2.0.3
3
3
  * https://quilljs.com
4
4
  * Copyright (c) 2017-2024, Slab
@@ -13,4 +13,4 @@
13
13
 
14
14
  Outdated base version: https://github.com/primer/github-syntax-dark
15
15
  Current colors taken from GitHub's CSS
16
- */.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#79c0ff}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-comment,.hljs-code,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}.QpTooltip{border-bottom:1px dotted #64748b;display:inline-block;position:relative}.QpTooltip-text{background-color:#64748b;border-radius:6px;color:#fff;left:110%;padding:5px;position:absolute;text-align:center;top:-5px;visibility:hidden;width:120px;z-index:1}.QpTooltip-text:after{border-color:transparent #64748b transparent transparent;border-style:solid;border-width:5px;content:"";margin-top:-5px;position:absolute;right:100%;top:50%}.QpTooltip:hover .QpTooltip-text{visibility:visible}.InternalLinkPlugin{border:2px dashed rgb(241,136,6);border-radius:3px;cursor:pointer;padding:3px 5px}.ObfuscateBlot{border:2px dashed #8d5151;border-radius:3px;cursor:pointer;padding:0 2px}.VideoPlugin{align-items:center;background-position:center;background-repeat:no-repeat;border:2px dotted bisque;cursor:pointer;display:flex;height:100px;justify-content:center;margin:10px;width:100%}.VideoPlugin-playButton{background-color:red;border-radius:3px;color:#fff;padding:5px 10px}
16
+ */.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#79c0ff}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-comment,.hljs-code,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}.QpTooltip{border-bottom:1px dotted #64748b;display:inline-block;position:relative}.QpTooltip-text{background-color:#64748b;border-radius:6px;color:#fff;left:110%;padding:5px;position:absolute;text-align:center;top:-5px;visibility:hidden;width:120px;z-index:1}.QpTooltip-text:after{border-color:transparent #64748b transparent transparent;border-style:solid;border-width:5px;content:"";margin-top:-5px;position:absolute;right:100%;top:50%}.QpTooltip:hover .QpTooltip-text{visibility:visible}.Img{display:block;margin:auto;position:relative;width:fit-content}.Img:after{bottom:10px;height:20px;position:absolute;right:10px;width:20px}.Img>img{display:block;max-width:100%;height:auto}.Img.zoomable:after{content:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m18 11l-6-6'/%3E%3C/svg%3E")}.Img.asLink:after{content:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none'%3E%3Cpath d='m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z'/%3E%3Cpath fill='%23000' d='M10.232 10.231a5 5 0 0 1 6.89-.172l.181.172l2.828 2.829a5 5 0 0 1-6.89 7.243l-.18-.172l-2.122-2.122a1 1 0 0 1 1.32-1.497l.094.083l2.122 2.122a3 3 0 0 0 4.377-4.1l-.135-.143l-2.828-2.828a3 3 0 0 0-4.243 0a1 1 0 0 1-1.414-1.415M3.868 3.867a5 5 0 0 1 6.89-.172l.181.172L13.06 5.99a1 1 0 0 1-1.32 1.497l-.094-.083l-2.121-2.121A3 3 0 0 0 5.147 9.38l.135.144l2.829 2.829a3 3 0 0 0 4.242 0a1 1 0 1 1 1.415 1.414a5 5 0 0 1-6.89.172l-.182-.172l-2.828-2.829a5 5 0 0 1 0-7.07Z'/%3E%3C/g%3E%3C/svg%3E")}.InternalLinkPlugin{border:2px dashed rgb(241,136,6);border-radius:3px;cursor:pointer;padding:3px 5px}.ObfuscateBlot{border:2px dashed #8d5151;border-radius:3px;cursor:pointer;padding:0 2px}.VideoPlugin{align-items:center;background-position:center;background-repeat:no-repeat;border:2px dotted bisque;cursor:pointer;display:flex;height:100px;justify-content:center;margin:10px;width:100%}.VideoPlugin-playButton{background-color:red;border-radius:3px;color:#fff;padding:5px 10px}