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