@innovastudio/contentbuilder 1.4.66 → 1.4.67
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -56006,6 +56006,9 @@ class ColorPicker {
|
|
56006
56006
|
if (color) {
|
56007
56007
|
this.opts.color = color;
|
56008
56008
|
this.setColor(color, true);
|
56009
|
+
} else {
|
56010
|
+
let inputColor = this.pickcolor.querySelector('.input-text');
|
56011
|
+
inputColor.value = '';
|
56009
56012
|
}
|
56010
56013
|
const handleKeyDown = e => {
|
56011
56014
|
if (e.keyCode === 27) {
|
@@ -56028,11 +56031,30 @@ class ColorPicker {
|
|
56028
56031
|
let inputColor = this.pickcolor.querySelector('.input-text');
|
56029
56032
|
inputColor.focus();
|
56030
56033
|
}
|
56034
|
+
isColorName(color) {
|
56035
|
+
const colorNamePattern = /^([a-z]+)$/i;
|
56036
|
+
return colorNamePattern.test(color);
|
56037
|
+
}
|
56038
|
+
convertColorToRGB(colorName) {
|
56039
|
+
const tempElement = document.createElement('div');
|
56040
|
+
tempElement.style.color = colorName;
|
56041
|
+
document.body.appendChild(tempElement);
|
56042
|
+
const computedColor = window.getComputedStyle(tempElement).color;
|
56043
|
+
document.body.removeChild(tempElement);
|
56044
|
+
|
56045
|
+
// Extract RGB values from the computed color
|
56046
|
+
const rgbValues = computedColor.match(/\d+/g);
|
56047
|
+
return `rgb(${rgbValues[0]}, ${rgbValues[1]}, ${rgbValues[2]})`;
|
56048
|
+
}
|
56031
56049
|
setColor(color, noCallback) {
|
56032
56050
|
let pickcolor = this.pickcolor;
|
56033
56051
|
let pickcolormore = this.pickcolormore;
|
56034
|
-
|
56052
|
+
let colorOpacity = pickcolor.querySelector('.color-opacity');
|
56035
56053
|
let colorgradient = pickcolor.querySelector('.color-gradient');
|
56054
|
+
const isColorName = this.isColorName(color);
|
56055
|
+
if (isColorName) {
|
56056
|
+
color = this.convertColorToRGB(color);
|
56057
|
+
}
|
56036
56058
|
let base = color;
|
56037
56059
|
let rgb;
|
56038
56060
|
if (base.indexOf('rgb') !== -1) {
|
@@ -77480,7 +77502,7 @@ class Dictation {
|
|
77480
77502
|
<span style="display: flex;
|
77481
77503
|
justify-content: center;
|
77482
77504
|
align-items: center;">
|
77483
|
-
${util.out('
|
77505
|
+
${util.out('AI Assistant')}</span>
|
77484
77506
|
<button class="is-modal-close" tabindex="-1" title="${util.out('Close')}">
|
77485
77507
|
<svg class="is-icon-flex"style="width:20px;height:20px"><use xlink:href="#ion-ios-close-empty"></use></svg>
|
77486
77508
|
</button>
|
@@ -77877,7 +77899,8 @@ class Similarity {
|
|
77877
77899
|
maxKey = key;
|
77878
77900
|
}
|
77879
77901
|
}
|
77880
|
-
|
77902
|
+
// console.log(maxSimilarity)
|
77903
|
+
const similarityThreshold = this.builder.similarityThreshold; //0.65;
|
77881
77904
|
if (maxSimilarity >= similarityThreshold) {
|
77882
77905
|
return maxKey;
|
77883
77906
|
}
|
@@ -78534,6 +78557,7 @@ class ContentBuilder {
|
|
78534
78557
|
capitalize: ['capitalize'],
|
78535
78558
|
clean: ['clean']
|
78536
78559
|
},
|
78560
|
+
similarityThreshold: 0.65,
|
78537
78561
|
commandList: {
|
78538
78562
|
select: ['select', 'select first'],
|
78539
78563
|
select_next: ['select next', 'select after'],
|