jodit-pro-react 5.5.70 → 5.5.72
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.
|
@@ -3715,6 +3715,19 @@ a + .jodit-file-browser-tree__source-title {
|
|
|
3715
3715
|
.jodit-color-picker__color-item_active_true {
|
|
3716
3716
|
border: 2px solid var(--jd-color-border-selected);
|
|
3717
3717
|
}
|
|
3718
|
+
.jodit-color-picker__extra {
|
|
3719
|
+
align-items: center;
|
|
3720
|
+
display: flex;
|
|
3721
|
+
justify-content: space-between;
|
|
3722
|
+
}
|
|
3723
|
+
.jodit-color-picker__hex input {
|
|
3724
|
+
border: 1px solid var(--jd-color-border);
|
|
3725
|
+
border-radius: var(--jd-border-radius-default);
|
|
3726
|
+
font-family: monospace;
|
|
3727
|
+
font-size: var(--jd-font-size-small,12px);
|
|
3728
|
+
padding: 2px 4px;
|
|
3729
|
+
width: 80px;
|
|
3730
|
+
}
|
|
3718
3731
|
.jodit-color-picker__native svg {
|
|
3719
3732
|
display: inline-block;
|
|
3720
3733
|
height: 16px;
|
|
@@ -193,7 +193,7 @@ var APP_VERSION, ES, IS_ES_MODERN, IS_ES_NEXT, IS_PROD, IS_TEST, FAT_MODE, HOMEP
|
|
|
193
193
|
var init_constants = __esm({
|
|
194
194
|
"node_modules/jodit/esm/core/constants.js"() {
|
|
195
195
|
"use strict";
|
|
196
|
-
APP_VERSION = "4.13.
|
|
196
|
+
APP_VERSION = "4.13.13";
|
|
197
197
|
ES = "es2020";
|
|
198
198
|
IS_ES_MODERN = true;
|
|
199
199
|
IS_ES_NEXT = true;
|
|
@@ -20961,12 +20961,36 @@ var ColorPickerWidget = (editor, callback, coldColor) => {
|
|
|
20961
20961
|
form2.appendChild(editor.c.fromHTML(`<div class="${cn}__groups">${eachColor(editor.o.colors)}</div>`));
|
|
20962
20962
|
form2.appendChild(editor.c.fromHTML(`<div data-ref="extra" class="${cn}__extra"></div>`));
|
|
20963
20963
|
const { extra } = refs(form2);
|
|
20964
|
+
extra.appendChild(editor.c.fromHTML(`<div class="${cn}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${valueHex || ""}"/></div>`));
|
|
20965
|
+
const { hexInput } = refs(form2);
|
|
20966
|
+
const applyHexInput = () => {
|
|
20967
|
+
const raw = hexInput.value.trim();
|
|
20968
|
+
const isHex = /^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(raw);
|
|
20969
|
+
const isRgb = /^rgba?\([\d\s.,%]+\)$/i.test(raw);
|
|
20970
|
+
if (!isHex && !isRgb) {
|
|
20971
|
+
return;
|
|
20972
|
+
}
|
|
20973
|
+
const color2 = normalizeColor(isHex && !raw.startsWith("#") ? "#" + raw : raw);
|
|
20974
|
+
if (color2 && isFunction(callback)) {
|
|
20975
|
+
callback(color2);
|
|
20976
|
+
}
|
|
20977
|
+
};
|
|
20978
|
+
editor.e.on(hexInput, "keydown", (e42) => {
|
|
20979
|
+
e42.stopPropagation();
|
|
20980
|
+
if (e42.key === "Enter") {
|
|
20981
|
+
e42.preventDefault();
|
|
20982
|
+
applyHexInput();
|
|
20983
|
+
}
|
|
20984
|
+
}).on(hexInput, "change", (e42) => {
|
|
20985
|
+
e42.stopPropagation();
|
|
20986
|
+
applyHexInput();
|
|
20987
|
+
});
|
|
20964
20988
|
if (editor.o.showBrowserColorPicker && hasBrowserColorPicker()) {
|
|
20965
20989
|
extra.appendChild(editor.c.fromHTML(`<div class="${cn}__native">${iconPalette}<input type="color" value="#ffffff"/></div>`));
|
|
20966
20990
|
editor.e.on(form2, "change", (e42) => {
|
|
20967
20991
|
e42.stopPropagation();
|
|
20968
20992
|
const target = e42.target;
|
|
20969
|
-
if (!target || !target.tagName || !Dom.isTag(target, "input")) {
|
|
20993
|
+
if (!target || !target.tagName || !Dom.isTag(target, "input") || target.type !== "color") {
|
|
20970
20994
|
return;
|
|
20971
20995
|
}
|
|
20972
20996
|
const color2 = target.value || "";
|
|
@@ -20977,6 +21001,10 @@ var ColorPickerWidget = (editor, callback, coldColor) => {
|
|
|
20977
21001
|
});
|
|
20978
21002
|
}
|
|
20979
21003
|
editor.e.on(form2, "mousedown touchend", (e42) => {
|
|
21004
|
+
if (Dom.isTag(e42.target, "input")) {
|
|
21005
|
+
e42.stopPropagation();
|
|
21006
|
+
return;
|
|
21007
|
+
}
|
|
20980
21008
|
e42.stopPropagation();
|
|
20981
21009
|
e42.preventDefault();
|
|
20982
21010
|
let target = e42.target;
|
package/build/esm/index.css
CHANGED
|
@@ -3715,6 +3715,19 @@ a + .jodit-file-browser-tree__source-title {
|
|
|
3715
3715
|
.jodit-color-picker__color-item_active_true {
|
|
3716
3716
|
border: 2px solid var(--jd-color-border-selected);
|
|
3717
3717
|
}
|
|
3718
|
+
.jodit-color-picker__extra {
|
|
3719
|
+
align-items: center;
|
|
3720
|
+
display: flex;
|
|
3721
|
+
justify-content: space-between;
|
|
3722
|
+
}
|
|
3723
|
+
.jodit-color-picker__hex input {
|
|
3724
|
+
border: 1px solid var(--jd-color-border);
|
|
3725
|
+
border-radius: var(--jd-border-radius-default);
|
|
3726
|
+
font-family: monospace;
|
|
3727
|
+
font-size: var(--jd-font-size-small,12px);
|
|
3728
|
+
padding: 2px 4px;
|
|
3729
|
+
width: 80px;
|
|
3730
|
+
}
|
|
3718
3731
|
.jodit-color-picker__native svg {
|
|
3719
3732
|
display: inline-block;
|
|
3720
3733
|
height: 16px;
|