@innovastudio/contentbox 1.5.69 → 1.5.70
Sign up to get free protection for your applications and to get access to all the features.
@@ -20692,6 +20692,12 @@ class Util$1 {
|
|
20692
20692
|
localStorage.removeItem('_mic');
|
20693
20693
|
localStorage.removeItem('_autosendcommand');
|
20694
20694
|
localStorage.removeItem('_sampleshown');
|
20695
|
+
localStorage.removeItem('_disclaimershown');
|
20696
|
+
localStorage.removeItem('_temp');
|
20697
|
+
localStorage.removeItem('_top_p');
|
20698
|
+
localStorage.removeItem('_autosend_delay');
|
20699
|
+
localStorage.removeItem('_auto_editblock');
|
20700
|
+
localStorage.removeItem('_command_lang');
|
20695
20701
|
|
20696
20702
|
//NOT USED
|
20697
20703
|
localStorage.removeItem('_scrollableeditor');
|
@@ -66786,16 +66792,16 @@ class ButtonEditor {
|
|
66786
66792
|
const val = btn.getAttribute('data-command');
|
66787
66793
|
const activeButton = this.builder.activeButton || this.builder.activeLinkButton;
|
66788
66794
|
if (val === 'auto') {
|
66789
|
-
|
66790
|
-
|
66791
|
-
|
66792
|
-
|
66795
|
+
activeButton.classList.remove('flex');
|
66796
|
+
activeButton.classList.remove('justify-center');
|
66797
|
+
activeButton.classList.remove('items-center');
|
66798
|
+
activeButton.classList.add('inline-block');
|
66793
66799
|
}
|
66794
66800
|
if (val === 'full') {
|
66795
|
-
|
66796
|
-
|
66797
|
-
|
66798
|
-
|
66801
|
+
activeButton.classList.remove('inline-block');
|
66802
|
+
activeButton.classList.add('flex');
|
66803
|
+
activeButton.classList.add('justify-center');
|
66804
|
+
activeButton.classList.add('items-center');
|
66799
66805
|
}
|
66800
66806
|
this.applyDefault(activeButton);
|
66801
66807
|
|
@@ -91964,6 +91970,7 @@ class Lib$1 {
|
|
91964
91970
|
activeBox.classList.add('is-content-bottom');
|
91965
91971
|
activeBox.classList.add('edge-y-2');
|
91966
91972
|
}
|
91973
|
+
this.builder.hideElementTools();
|
91967
91974
|
}
|
91968
91975
|
updateContentSize(activeBox, val) {
|
91969
91976
|
const container = activeBox.querySelector('.is-container');
|
@@ -92563,6 +92570,81 @@ class Lib$1 {
|
|
92563
92570
|
}
|
92564
92571
|
return null;
|
92565
92572
|
}
|
92573
|
+
moveBlockContent(target) {
|
92574
|
+
const cell = this.builder.activeCol;
|
92575
|
+
if (!cell) return false;
|
92576
|
+
if (!(target === 'top' || target === 'bottom' || target === 'left' || target === 'right' || target === 'topleft' || target === 'topcenter' || target === 'topright' || target === 'bottomleft' || target === 'bottomcenter' || target === 'bottomright' || target === 'center')) return;
|
92577
|
+
this.builder.saveForUndo();
|
92578
|
+
const dom = this.builder.dom;
|
92579
|
+
let classes = this.builder.cssClasses.display;
|
92580
|
+
dom.addCssClass(cell, classes.flex, classes);
|
92581
|
+
classes = this.builder.cssClasses.flexDirection;
|
92582
|
+
dom.addCssClass(cell, classes.column, classes);
|
92583
|
+
if (target === 'top') {
|
92584
|
+
let classes = this.builder.cssClasses.justifyContent;
|
92585
|
+
dom.addCssClass(cell, classes.start, classes);
|
92586
|
+
classes = this.builder.cssClasses.alignItems;
|
92587
|
+
dom.addCssClass(cell, classes.center, classes);
|
92588
|
+
} else if (target === 'bottom') {
|
92589
|
+
let classes = this.builder.cssClasses.justifyContent;
|
92590
|
+
dom.addCssClass(cell, classes.end, classes);
|
92591
|
+
classes = this.builder.cssClasses.alignItems;
|
92592
|
+
dom.addCssClass(cell, classes.center, classes);
|
92593
|
+
} else if (target === 'left') {
|
92594
|
+
let classes = this.builder.cssClasses.justifyContent;
|
92595
|
+
dom.addCssClass(cell, classes.center, classes);
|
92596
|
+
classes = this.builder.cssClasses.alignItems;
|
92597
|
+
dom.addCssClass(cell, classes.start, classes);
|
92598
|
+
} else if (target === 'right') {
|
92599
|
+
let classes = this.builder.cssClasses.justifyContent;
|
92600
|
+
dom.addCssClass(cell, classes.center, classes);
|
92601
|
+
classes = this.builder.cssClasses.alignItems;
|
92602
|
+
dom.addCssClass(cell, classes.end, classes);
|
92603
|
+
} else if (target === 'topleft') {
|
92604
|
+
let classes = this.builder.cssClasses.justifyContent;
|
92605
|
+
dom.addCssClass(cell, classes.start, classes);
|
92606
|
+
classes = this.builder.cssClasses.alignItems;
|
92607
|
+
dom.addCssClass(cell, classes.start, classes);
|
92608
|
+
} else if (target === 'topcenter') {
|
92609
|
+
let classes = this.builder.cssClasses.justifyContent;
|
92610
|
+
dom.addCssClass(cell, classes.start, classes);
|
92611
|
+
classes = this.builder.cssClasses.alignItems;
|
92612
|
+
dom.addCssClass(cell, classes.center, classes);
|
92613
|
+
} else if (target === 'topright') {
|
92614
|
+
let classes = this.builder.cssClasses.justifyContent;
|
92615
|
+
dom.addCssClass(cell, classes.start, classes);
|
92616
|
+
classes = this.builder.cssClasses.alignItems;
|
92617
|
+
dom.addCssClass(cell, classes.end, classes);
|
92618
|
+
} else if (target === 'bottomleft') {
|
92619
|
+
let classes = this.builder.cssClasses.justifyContent;
|
92620
|
+
dom.addCssClass(cell, classes.end, classes);
|
92621
|
+
classes = this.builder.cssClasses.alignItems;
|
92622
|
+
dom.addCssClass(cell, classes.start, classes);
|
92623
|
+
} else if (target === 'bottomcenter') {
|
92624
|
+
let classes = this.builder.cssClasses.justifyContent;
|
92625
|
+
dom.addCssClass(cell, classes.end, classes);
|
92626
|
+
classes = this.builder.cssClasses.alignItems;
|
92627
|
+
dom.addCssClass(cell, classes.center, classes);
|
92628
|
+
} else if (target === 'bottomright') {
|
92629
|
+
let classes = this.builder.cssClasses.justifyContent;
|
92630
|
+
dom.addCssClass(cell, classes.end, classes);
|
92631
|
+
classes = this.builder.cssClasses.alignItems;
|
92632
|
+
dom.addCssClass(cell, classes.end, classes);
|
92633
|
+
} else if (target === 'center') {
|
92634
|
+
let classes = this.builder.cssClasses.justifyContent;
|
92635
|
+
dom.addCssClass(cell, classes.center, classes);
|
92636
|
+
classes = this.builder.cssClasses.alignItems;
|
92637
|
+
dom.addCssClass(cell, classes.center, classes);
|
92638
|
+
} else {
|
92639
|
+
let classes = this.builder.cssClasses.justifyContent;
|
92640
|
+
dom.addCssClass(cell, classes.center, classes);
|
92641
|
+
classes = this.builder.cssClasses.alignItems;
|
92642
|
+
dom.addCssClass(cell, classes.center, classes);
|
92643
|
+
}
|
92644
|
+
cell.style.justifyContent = '';
|
92645
|
+
cell.style.alignItems = '';
|
92646
|
+
this.builder.onChange();
|
92647
|
+
}
|
92566
92648
|
}
|
92567
92649
|
|
92568
92650
|
// import RecordRTC from 'recordrtc';
|
@@ -92585,32 +92667,56 @@ class Dictation {
|
|
92585
92667
|
}
|
92586
92668
|
|
92587
92669
|
this.builder.isInProgress = false;
|
92588
|
-
const commandInfo = this.builder.commandInfo;
|
92589
|
-
let htmlList = '';
|
92590
|
-
for (const key in commandInfo) {
|
92591
|
-
if (Object.prototype.hasOwnProperty.call(commandInfo, key)) {
|
92592
|
-
const {
|
92593
|
-
title,
|
92594
|
-
list,
|
92595
|
-
width
|
92596
|
-
} = commandInfo[key];
|
92597
|
-
if (!this.builder.enableShortCommands) {
|
92598
|
-
if (key === 'general') {
|
92599
|
-
htmlList += `<h2>${title}</h2>`;
|
92600
|
-
for (const item of list) {
|
92601
|
-
if (width) htmlList += `<div role="button" tabindex="0" class="command-item" style="width:${width}">${item}</div>`;else htmlList += `<div role="button" tabindex="0" class="command-item">${item}</div>`;
|
92602
|
-
}
|
92603
|
-
}
|
92604
|
-
} else {
|
92605
|
-
htmlList += `<h2>${title}</h2>`;
|
92606
|
-
for (const item of list) {
|
92607
|
-
if (width) htmlList += `<div role="button" tabindex="0" class="command-item" style="width:${width}">${item}</div>`;else htmlList += `<div role="button" tabindex="0" class="command-item">${item}</div>`;
|
92608
|
-
}
|
92609
|
-
}
|
92610
|
-
}
|
92611
|
-
}
|
92612
92670
|
let html = `
|
92613
92671
|
<style>
|
92672
|
+
#_cbhtml .is-modal.page-command {
|
92673
|
+
width: 25vw;
|
92674
|
+
min-width: 393px;
|
92675
|
+
max-width: 600px;
|
92676
|
+
height: 230px;
|
92677
|
+
top: auto;
|
92678
|
+
bottom: 30px;
|
92679
|
+
left: auto;
|
92680
|
+
right: 30px;
|
92681
|
+
z-index: 10005;
|
92682
|
+
font-size: 12px;
|
92683
|
+
border-radius: 6px;
|
92684
|
+
}
|
92685
|
+
#_cbhtml .is-modal.page-command textarea {
|
92686
|
+
border:none;border-top: rgb(133 133 133 / 14%) 1px solid;resize:none;width:100%;
|
92687
|
+
height:170px;outline:none;background:transparent;line-height: 1.2;
|
92688
|
+
font-family: sans-serif;font-weight: 300;font-size: 17px;padding-top:12px;
|
92689
|
+
}
|
92690
|
+
.page-command-overlay {
|
92691
|
+
position: fixed;
|
92692
|
+
background: rgb(148 148 148 / 22%);
|
92693
|
+
display: none;
|
92694
|
+
z-index: 10004;
|
92695
|
+
justify-content: center;
|
92696
|
+
align-items:center;
|
92697
|
+
}
|
92698
|
+
#_cbhtml .div-assistant-mode button {
|
92699
|
+
padding: 0 17px;height:26px;border-radius:20px;box-shadow:none;
|
92700
|
+
}
|
92701
|
+
#_cbhtml .div-assistant-mode button[disabled] {
|
92702
|
+
pointer-events: none;
|
92703
|
+
opacity: 0.5;
|
92704
|
+
background: transparent;
|
92705
|
+
}
|
92706
|
+
/*
|
92707
|
+
.is-modal.commandconfig,
|
92708
|
+
#_cbhtml .is-modal.commandconfig label {
|
92709
|
+
font-size: 14px;
|
92710
|
+
}
|
92711
|
+
*/
|
92712
|
+
.is-modal.commandconfig ul {
|
92713
|
+
margin: 0;
|
92714
|
+
padding: 0 0 0 16px;
|
92715
|
+
}
|
92716
|
+
.is-modal.commandconfig ul li {
|
92717
|
+
font-size: inherit;
|
92718
|
+
line-height: 1.2;
|
92719
|
+
}
|
92614
92720
|
.is-modal.commandlist {
|
92615
92721
|
z-index: 10005 !important
|
92616
92722
|
}
|
@@ -92650,9 +92756,18 @@ class Dictation {
|
|
92650
92756
|
flex: none;
|
92651
92757
|
font-family: "Open Sans", sans-serif;
|
92652
92758
|
font-weight: 300;
|
92653
|
-
margin-bottom:
|
92759
|
+
margin-bottom: 10px;
|
92654
92760
|
font-size: 28px;
|
92655
92761
|
}
|
92762
|
+
.is-modal.commandlist .is-modal-content > div > p {
|
92763
|
+
display: block;
|
92764
|
+
width: 100%;
|
92765
|
+
flex: none;
|
92766
|
+
font-family: "Open Sans", sans-serif;
|
92767
|
+
font-weight: 300;
|
92768
|
+
font-size: 17px !important;
|
92769
|
+
margin: 0 0 30px;
|
92770
|
+
}
|
92656
92771
|
.is-modal.commandlist .is-modal-content > div > div {
|
92657
92772
|
margin-right: 2.2rem;
|
92658
92773
|
margin-bottom: 2.2rem;
|
@@ -92681,24 +92796,6 @@ class Dictation {
|
|
92681
92796
|
.dark .is-modal.commandlist .is-modal-content > div > div:hover {
|
92682
92797
|
background: rgba(255, 255, 255, 0.05);
|
92683
92798
|
}
|
92684
|
-
.is-modal.page-command {
|
92685
|
-
width: 340px !important;
|
92686
|
-
height: 200px !important;
|
92687
|
-
top: auto !important;
|
92688
|
-
bottom: 30px !important;
|
92689
|
-
left: auto !important;
|
92690
|
-
right: 30px !important;
|
92691
|
-
z-index: 10005 !important;
|
92692
|
-
font-size: 12px;
|
92693
|
-
}
|
92694
|
-
.page-command-overlay {
|
92695
|
-
position: fixed;
|
92696
|
-
background: rgb(148 148 148 / 22%);
|
92697
|
-
display: none;
|
92698
|
-
z-index: 10004;
|
92699
|
-
justify-content: center;
|
92700
|
-
align-items:center;
|
92701
|
-
}
|
92702
92799
|
|
92703
92800
|
.spinner {
|
92704
92801
|
-webkit-animation: rotator 1.4s linear infinite;
|
@@ -92757,6 +92854,11 @@ class Dictation {
|
|
92757
92854
|
.inp-command::placeholder {
|
92758
92855
|
color: #aaa;
|
92759
92856
|
}
|
92857
|
+
|
92858
|
+
.label-chk-autosend-command,
|
92859
|
+
.label-input-autosend-command {
|
92860
|
+
display: none !important;
|
92861
|
+
}
|
92760
92862
|
</style>
|
92761
92863
|
<div class="is-overlay page-command-overlay">
|
92762
92864
|
<svg class="spinner" width="40px" height="40px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
|
@@ -92769,25 +92871,36 @@ class Dictation {
|
|
92769
92871
|
justify-content: center;
|
92770
92872
|
align-items: center;">
|
92771
92873
|
${util.out('AI Assistant')}</span>
|
92874
|
+
|
92772
92875
|
<button class="is-modal-close" tabindex="-1" title="${util.out('Close')}">
|
92773
|
-
<svg class="is-icon-flex"style="width:
|
92876
|
+
<svg class="is-icon-flex"style="width:22px;height:22px"><use xlink:href="#ion-ios-close-empty"></use></svg>
|
92774
92877
|
</button>
|
92775
92878
|
</div>
|
92776
92879
|
<div style="display:flex;flex-direction:column;justify-content:space-between;position:absolute;box-sizing:border-box;top:0;left:0;width:100%;height:100%;border-top:transparent 35px solid;overflow-y:hidden;overflow-x:auto;">
|
92777
|
-
|
92778
|
-
|
92779
|
-
|
92780
|
-
|
92880
|
+
<div style="display:flex;align-items:center;justify-content:center;padding: 2px 13px 10px;">
|
92881
|
+
<div class="div-assistant-mode" style="display:flex;align-items: center;">
|
92882
|
+
<button class="scope-section on" title="${util.out('General')}" data-value="general" style="margin-right:5px">${util.out('General')}</button>
|
92883
|
+
<button class="scope-others" title="${util.out('Ask Questions')}" data-value="others">${util.out('Ask Questions')}</button>
|
92884
|
+
<button class="scope-block" title="${util.out('Edit Selected Block')}" data-value="block" style="">${util.out('Edit Selected Block')}</button>
|
92885
|
+
</div>
|
92886
|
+
</div>
|
92887
|
+
<textarea class="inp-command"></textarea>
|
92888
|
+
<div style="display:flex;padding-left:3px;">
|
92889
|
+
<button title="${util.out('Settings')}" class="cmd-command-config classic-secondary" style="width:40px;height:43px;flex:none;padding:0;outline-offset:-2px;">
|
92890
|
+
<svg class="is-icon-flex" style="width:15px;height:15px;flex:none;"><use xlink:href="#icon-settings"></use></svg>
|
92891
|
+
</button>
|
92781
92892
|
<button title="${util.out('Mic')}" class="cmd-enable-dictation classic-secondary" style="width:40px;height:43px;flex:none;padding:0;outline-offset:-2px;">
|
92782
92893
|
<svg class="is-icon-flex" style="width: 18px; height: 18px;"><use xlink:href="#icon-microphone"></use></svg>
|
92783
92894
|
</button>
|
92784
|
-
<button title="${util.out('
|
92895
|
+
<button title="${util.out('Command Examples')}" class="cmd-command-list classic-secondary" style="width:40px;height:43px;flex:none;padding:0;outline-offset:-2px;">
|
92785
92896
|
<svg class="is-icon-flex" style="width: 18px; height: 18px;"><use xlink:href="#icon-message-search"></use></svg>
|
92786
92897
|
</button>
|
92787
|
-
<button title="${util.out('Clear')}" class="cmd-clear-command classic-secondary" style="width:40px;height:43px;flex:none;padding:0;outline-offset:-2px;">
|
92898
|
+
<button title="${util.out('Clear')}" class="cmd-clear-command classic-secondary" style="margin-right:6px;width:40px;height:43px;flex:none;padding:0;outline-offset:-2px;">
|
92788
92899
|
<svg class="is-icon-flex" style="width: 18px; height: 18px;"><use xlink:href="#icon-eraser"></use></svg>
|
92789
92900
|
</button>
|
92790
|
-
|
92901
|
+
|
92902
|
+
<label class="label-chk-autosend-command" for="chkAutoSendCommand" style="margin:0;display:flex;padding-left:10px;padding-right:25px;white-space:nowrap;align-items:center;letter-spacing:0"><input id="chkAutoSendCommand" type="checkbox"> <span style="margin-left:3px">${util.out('Auto Send')}</span></label>
|
92903
|
+
|
92791
92904
|
<button title="${util.out('Send')}" class="cmd-send-command classic-primary" style="width:100%;padding-left:5px;padding-right:5px;height:43px;outline-offset:-2px;">Send</button>
|
92792
92905
|
</div>
|
92793
92906
|
</div>
|
@@ -92800,10 +92913,55 @@ class Dictation {
|
|
92800
92913
|
<button class="is-modal-close" tabindex="-1" title="${util.out('Close')}">
|
92801
92914
|
<svg class="is-icon-flex"><use xlink:href="#ion-ios-close-empty"></use></svg>
|
92802
92915
|
</button>
|
92803
|
-
<div>
|
92916
|
+
<div class="div-command-list">
|
92804
92917
|
|
92805
|
-
|
92918
|
+
</div>
|
92919
|
+
</div>
|
92920
|
+
</div>
|
92806
92921
|
|
92922
|
+
<div class="is-modal commandconfig" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
92923
|
+
<div class="is-modal-content" style="max-width:380px;padding:55px 40px 35px;">
|
92924
|
+
<div class="is-modal-bar is-draggable">
|
92925
|
+
${util.out('Settings')}
|
92926
|
+
<button class="is-modal-close" tabindex="-1" title="${util.out('Close')}">✕</button>
|
92927
|
+
</div>
|
92928
|
+
|
92929
|
+
<div class="is-label"><span>${util.out('Temperature')}</span>: <span class="val-temp">0.6</span></div>
|
92930
|
+
<div style="padding-top:4px">
|
92931
|
+
<input type="range" min="0" max="2" step="0.01" value="0.6" class="temperature-slider is-rangeslider" style="margin:0 !important;">
|
92932
|
+
</div>
|
92933
|
+
|
92934
|
+
<div class="is-label" style="margin-top:15px"><span>${util.out('Top P')}</span>: <span class="val-top-p">0.9</span></div>
|
92935
|
+
<div style="padding-top:4px">
|
92936
|
+
<input type="range" min="0" max="1" step="0.01" value="0.9" class="top-p-slider is-rangeslider" style="margin:0 !important;">
|
92937
|
+
</div>
|
92938
|
+
|
92939
|
+
<div style="text-align:right">
|
92940
|
+
<button title="${util.out('Reset')}" class="input-reset classic-secondary" style="text-decoration: underline;padding: 0;box-shadow: none;">${util.out('Reset')}</button>
|
92941
|
+
</div>
|
92942
|
+
|
92943
|
+
<label for="chkAutoEditBlock" style="margin:0;display:flex;align-items:center;letter-spacing:0">
|
92944
|
+
<input id="chkAutoEditBlock" type="checkbox" style="margin:0 5px 0 0;">
|
92945
|
+
<span style="line-height: 1;">${util.out('Auto select \'Edit Selected Block\' mode.')}</span>
|
92946
|
+
</label>
|
92947
|
+
|
92948
|
+
<label class="label-input-autosend-command" style="margin:18px 0 0 0;display:flex;align-items:center;letter-spacing:0">
|
92949
|
+
<span>${util.out('Auto send command delay')}</soan>:
|
92950
|
+
<input class="input-autosend-delay" style="width:60px;text-align:center;padding-left:0;height:33px;margin-right:3px;" type="text" value="4000"> <span>ms</span>
|
92951
|
+
</label>
|
92952
|
+
|
92953
|
+
<div class="command-settings-info" style="display:none"></div>
|
92954
|
+
|
92955
|
+
<label class="label-input-command-lang" style="display:none;flex-direction:column;letter-spacing:0;margin:18px 0 0 0;">
|
92956
|
+
<span>${util.out('Language')}:</span>
|
92957
|
+
<div style="display:flex; align-items: baseline;flex-direction: row;">
|
92958
|
+
<input class="input-command-lang" style="width:70px;text-align:center;padding-left:0;height:33px;margin-top:5px;margin-right:10px" type="text" value="en-us">
|
92959
|
+
<span>(${util.out('BCP-47 format')})</span>
|
92960
|
+
</div>
|
92961
|
+
</label>
|
92962
|
+
|
92963
|
+
<div style="text-align:right;margin-top:25px;">
|
92964
|
+
<button title="${util.out('Ok')}" class="input-ok classic-primary" style="width:100%;">${util.out('Ok')}</button>
|
92807
92965
|
</div>
|
92808
92966
|
</div>
|
92809
92967
|
</div>
|
@@ -92813,10 +92971,47 @@ class Dictation {
|
|
92813
92971
|
this.modalCommand = modalCommand;
|
92814
92972
|
const modalCommandList = builderStuff.querySelector('.commandlist');
|
92815
92973
|
this.modalCommandList = modalCommandList;
|
92974
|
+
const modalConfig = builderStuff.querySelector('.commandconfig');
|
92975
|
+
this.modalConfig = modalConfig;
|
92976
|
+
const btnConfig = builderStuff.querySelector('.cmd-command-config');
|
92816
92977
|
const btnDictation = builderStuff.querySelector('.cmd-enable-dictation');
|
92817
92978
|
const btnClear = builderStuff.querySelector('.cmd-clear-command');
|
92818
92979
|
const chkAutoSend = builderStuff.querySelector('#chkAutoSendCommand');
|
92819
92980
|
const btnCommandList = builderStuff.querySelector('.cmd-command-list');
|
92981
|
+
const divInfo = builderStuff.querySelector('.command-settings-info');
|
92982
|
+
let info = `
|
92983
|
+
<div style="font-weight:500;margin: 25px 0 7px;">${util.out('Dictation')}</div>
|
92984
|
+
<div style="line-height: 1.4;margin: 0 0 7px;">${util.out('These words trigger command actions')}:</div>
|
92985
|
+
<ul>`;
|
92986
|
+
const triggerWords = this.builder.triggerWords;
|
92987
|
+
for (const key in triggerWords) {
|
92988
|
+
if (key === 'send') {
|
92989
|
+
let s = '';
|
92990
|
+
triggerWords[key].forEach(word => {
|
92991
|
+
s += `, ${word}`;
|
92992
|
+
});
|
92993
|
+
s = s.substring(1);
|
92994
|
+
info += `<li><span>${s}</span></li>`;
|
92995
|
+
}
|
92996
|
+
if (key === 'abort') {
|
92997
|
+
let s = '';
|
92998
|
+
triggerWords[key].forEach(word => {
|
92999
|
+
s += `, ${word}`;
|
93000
|
+
});
|
93001
|
+
s = s.substring(1);
|
93002
|
+
info += `<li><span>${s}</span></li>`;
|
93003
|
+
}
|
93004
|
+
if (key === 'clear') {
|
93005
|
+
let s = '';
|
93006
|
+
triggerWords[key].forEach(word => {
|
93007
|
+
s += `, ${word}`;
|
93008
|
+
});
|
93009
|
+
s = s.substring(1);
|
93010
|
+
info += `<li><span>${s}</span></li>`;
|
93011
|
+
}
|
93012
|
+
}
|
93013
|
+
info += '</ul>';
|
93014
|
+
divInfo.innerHTML = info;
|
92820
93015
|
const inpCommand = this.builderStuff.querySelector('.inp-command');
|
92821
93016
|
if (localStorage.getItem('_sampleshown') === null) {
|
92822
93017
|
inpCommand.setAttribute('placeholder', this.builder.commandPlaceholderText);
|
@@ -92840,7 +93035,6 @@ class Dictation {
|
|
92840
93035
|
if (localStorage.getItem('_mic') === '0') {
|
92841
93036
|
btnDictation.innerHTML = '<svg class="is-icon-flex" style="width:18px; height:18px;"><use xlink:href="#icon-microphone-off"></use></svg>';
|
92842
93037
|
chkAutoSend.parentNode.style.display = 'none';
|
92843
|
-
btnClear.style.marginRight = '6px';
|
92844
93038
|
}
|
92845
93039
|
}
|
92846
93040
|
if (localStorage.getItem('_autosendcommand') !== null) {
|
@@ -92854,48 +93048,148 @@ class Dictation {
|
|
92854
93048
|
util.saveSelection(); // must be called in case used by formatText()
|
92855
93049
|
});
|
92856
93050
|
|
93051
|
+
btnConfig.addEventListener('click', () => {
|
93052
|
+
this.config();
|
93053
|
+
|
93054
|
+
// util.showModal(this.modalConfig, false, ()=>{
|
93055
|
+
|
93056
|
+
// btnConfig.removeAttribute('data-focus');
|
93057
|
+
// btnConfig.focus();
|
93058
|
+
|
93059
|
+
// }, false);
|
93060
|
+
|
93061
|
+
// btnConfig.setAttribute('data-focus',true);
|
93062
|
+
});
|
93063
|
+
|
93064
|
+
if (localStorage.getItem('_temp') !== null) {
|
93065
|
+
let val = localStorage.getItem('_temp');
|
93066
|
+
this.builder.temperature = val;
|
93067
|
+
}
|
93068
|
+
if (localStorage.getItem('_top_p') !== null) {
|
93069
|
+
let val = localStorage.getItem('_top_p');
|
93070
|
+
this.builder.topP = val;
|
93071
|
+
}
|
93072
|
+
if (localStorage.getItem('_autosend_delay') !== null) {
|
93073
|
+
let val = localStorage.getItem('_autosend_delay');
|
93074
|
+
this.builder.autoSendDelay = val;
|
93075
|
+
}
|
93076
|
+
if (localStorage.getItem('_auto_editblock') !== null) {
|
93077
|
+
let val = localStorage.getItem('_auto_editblock');
|
93078
|
+
this.builder.autoEditBlock = val;
|
93079
|
+
}
|
93080
|
+
if (localStorage.getItem('_command_lang') !== null) {
|
93081
|
+
let val = localStorage.getItem('_command_lang');
|
93082
|
+
this.builder.speechRecognitionLang = val;
|
93083
|
+
}
|
93084
|
+
const btnConfigOk = this.modalConfig.querySelector('.input-ok');
|
93085
|
+
btnConfigOk.addEventListener('click', () => {
|
93086
|
+
const tempSlider = this.modalConfig.querySelector('.temperature-slider');
|
93087
|
+
localStorage.setItem('_temp', tempSlider.value);
|
93088
|
+
this.builder.temperature = tempSlider.value;
|
93089
|
+
const topPSlider = this.modalConfig.querySelector('.top-p-slider');
|
93090
|
+
localStorage.setItem('_top_p', topPSlider.value);
|
93091
|
+
this.builder.topP = topPSlider.value;
|
93092
|
+
const chkAutoEditBlock = this.modalConfig.querySelector('#chkAutoEditBlock');
|
93093
|
+
if (chkAutoEditBlock.checked) {
|
93094
|
+
localStorage.setItem('_auto_editblock', 1);
|
93095
|
+
this.builder.autoEditBlock = true;
|
93096
|
+
} else {
|
93097
|
+
localStorage.setItem('_auto_editblock', 0);
|
93098
|
+
this.builder.autoEditBlock = false;
|
93099
|
+
}
|
93100
|
+
const inpAutoSendDelay = this.modalConfig.querySelector('.input-autosend-delay');
|
93101
|
+
localStorage.setItem('_autosend_delay', inpAutoSendDelay.value);
|
93102
|
+
this.builder.autoSendDelay = inpAutoSendDelay.value;
|
93103
|
+
const inpCommandLang = this.modalConfig.querySelector('.input-command-lang');
|
93104
|
+
localStorage.setItem('_command_lang', inpCommandLang.value);
|
93105
|
+
this.builder.speechRecognitionLang = inpCommandLang.value;
|
93106
|
+
this.builder.hideModal(this.modalConfig);
|
93107
|
+
});
|
93108
|
+
const btnConfigReset = this.modalConfig.querySelector('.input-reset');
|
93109
|
+
btnConfigReset.addEventListener('click', () => {
|
93110
|
+
this.resetConfig();
|
93111
|
+
});
|
93112
|
+
const valTemp = this.modalConfig.querySelector('.val-temp');
|
93113
|
+
const tempSlider = this.modalConfig.querySelector('.temperature-slider');
|
93114
|
+
tempSlider.oninput = () => {
|
93115
|
+
valTemp.innerHTML = tempSlider.value;
|
93116
|
+
};
|
93117
|
+
const valTopP = this.modalConfig.querySelector('.val-top-p');
|
93118
|
+
const topPSlider = this.modalConfig.querySelector('.top-p-slider');
|
93119
|
+
topPSlider.oninput = () => {
|
93120
|
+
valTopP.innerHTML = topPSlider.value;
|
93121
|
+
};
|
92857
93122
|
btnCommandList.addEventListener('click', () => {
|
93123
|
+
let htmlList = '';
|
93124
|
+
const commandInfo = this.builder.commandInfo;
|
93125
|
+
for (const key in commandInfo) {
|
93126
|
+
if (Object.prototype.hasOwnProperty.call(commandInfo, key)) {
|
93127
|
+
const {
|
93128
|
+
title,
|
93129
|
+
description,
|
93130
|
+
list,
|
93131
|
+
width
|
93132
|
+
} = commandInfo[key];
|
93133
|
+
if (!this.builder.enableShortCommands) {
|
93134
|
+
if (description) {
|
93135
|
+
htmlList += `<h2>${title}</h2>`;
|
93136
|
+
htmlList += `<p>${description}</p>`;
|
93137
|
+
} else {
|
93138
|
+
htmlList += `<h2 style="margin-bottom:30px">${title}</h2>`;
|
93139
|
+
}
|
93140
|
+
for (const item of list) {
|
93141
|
+
if (width) htmlList += `<div role="button" tabindex="0" class="command-item" style="width:${width}">${item}</div>`;else htmlList += `<div role="button" tabindex="0" class="command-item">${item}</div>`;
|
93142
|
+
}
|
93143
|
+
} else {
|
93144
|
+
htmlList += `<h2>${title}</h2>`;
|
93145
|
+
for (const item of list) {
|
93146
|
+
if (width) htmlList += `<div role="button" tabindex="0" class="command-item" style="width:${width}">${item}</div>`;else htmlList += `<div role="button" tabindex="0" class="command-item">${item}</div>`;
|
93147
|
+
}
|
93148
|
+
}
|
93149
|
+
}
|
93150
|
+
}
|
93151
|
+
const divCommandList = this.modalCommandList.querySelector('.div-command-list');
|
93152
|
+
divCommandList.innerHTML = htmlList;
|
93153
|
+
const handleSelect = s => {
|
93154
|
+
const inpCommand = this.builderStuff.querySelector('.inp-command');
|
93155
|
+
inpCommand.value = s;
|
93156
|
+
this.builder.commandText = inpCommand.value;
|
93157
|
+
util.hideModal(this.modalCommandList);
|
93158
|
+
};
|
93159
|
+
let items = this.modalCommandList.querySelectorAll('.command-item');
|
93160
|
+
items.forEach(elm => {
|
93161
|
+
elm.addEventListener('click', () => {
|
93162
|
+
handleSelect(elm.innerText);
|
93163
|
+
inpCommand.focus();
|
93164
|
+
});
|
93165
|
+
elm.addEventListener('keydown', e => {
|
93166
|
+
if (e.which === 13 && !e.shiftKey) {
|
93167
|
+
e.preventDefault();
|
93168
|
+
e.stopImmediatePropagation();
|
93169
|
+
handleSelect(elm.innerText);
|
93170
|
+
setTimeout(() => {
|
93171
|
+
inpCommand.focus();
|
93172
|
+
}, 300);
|
93173
|
+
}
|
93174
|
+
});
|
93175
|
+
});
|
92858
93176
|
util.showModal(this.modalCommandList, false, () => {
|
92859
93177
|
btnCommandList.removeAttribute('data-focus');
|
92860
93178
|
btnCommandList.focus();
|
92861
93179
|
}, false);
|
92862
93180
|
btnCommandList.setAttribute('data-focus', true);
|
92863
93181
|
});
|
92864
|
-
const handleSelect = s => {
|
92865
|
-
const inpCommand = this.builderStuff.querySelector('.inp-command');
|
92866
|
-
inpCommand.value = s;
|
92867
|
-
util.hideModal(this.modalCommandList);
|
92868
|
-
};
|
92869
|
-
let items = modalCommandList.querySelectorAll('.command-item');
|
92870
|
-
items.forEach(elm => {
|
92871
|
-
elm.addEventListener('click', () => {
|
92872
|
-
handleSelect(elm.innerText);
|
92873
|
-
inpCommand.focus();
|
92874
|
-
});
|
92875
|
-
elm.addEventListener('keydown', e => {
|
92876
|
-
if (e.which === 13 && !e.shiftKey) {
|
92877
|
-
e.preventDefault();
|
92878
|
-
e.stopImmediatePropagation();
|
92879
|
-
handleSelect(elm.innerText);
|
92880
|
-
setTimeout(() => {
|
92881
|
-
inpCommand.focus();
|
92882
|
-
}, 300);
|
92883
|
-
}
|
92884
|
-
});
|
92885
|
-
});
|
92886
93182
|
btnDictation.addEventListener('click', () => {
|
92887
93183
|
if (!this.checkMic()) {
|
92888
93184
|
this.startDictation();
|
92889
93185
|
btnDictation.innerHTML = '<svg class="is-icon-flex" style="width:18px; height:18px;"><use xlink:href="#icon-microphone"></use></svg>';
|
92890
93186
|
localStorage.setItem('_mic', '1');
|
92891
93187
|
chkAutoSend.parentNode.style.display = 'flex';
|
92892
|
-
btnClear.style.marginRight = '';
|
92893
93188
|
} else {
|
92894
93189
|
this.stopDictation();
|
92895
93190
|
btnDictation.innerHTML = '<svg class="is-icon-flex" style="width:18px; height:18px;"><use xlink:href="#icon-microphone-off"></use></svg>';
|
92896
93191
|
localStorage.setItem('_mic', '0');
|
92897
93192
|
chkAutoSend.parentNode.style.display = 'none';
|
92898
|
-
btnClear.style.marginRight = '6px';
|
92899
93193
|
}
|
92900
93194
|
});
|
92901
93195
|
chkAutoSend.addEventListener('change', () => {
|
@@ -92919,6 +93213,8 @@ class Dictation {
|
|
92919
93213
|
// Abort
|
92920
93214
|
|
92921
93215
|
this.opts.abort();
|
93216
|
+
const inpCommand = this.builderStuff.querySelector('.inp-command');
|
93217
|
+
this.builder.commandText = inpCommand.value;
|
92922
93218
|
return;
|
92923
93219
|
}
|
92924
93220
|
const inpCommand = this.modalCommand.querySelector('.inp-command');
|
@@ -92930,6 +93226,8 @@ class Dictation {
|
|
92930
93226
|
|
92931
93227
|
// this.startSending();
|
92932
93228
|
|
93229
|
+
// Clear
|
93230
|
+
this.builder.commandText = '';
|
92933
93231
|
this.opts.send(question);
|
92934
93232
|
});
|
92935
93233
|
inpCommand.addEventListener('keydown', e => {
|
@@ -92952,9 +93250,123 @@ class Dictation {
|
|
92952
93250
|
this.stopDictation();
|
92953
93251
|
localStorage.setItem('_dictation', '0');
|
92954
93252
|
});
|
93253
|
+
const btnScopeSection = this.modalCommand.querySelector('.scope-section');
|
93254
|
+
const btnScopeBlock = this.modalCommand.querySelector('.scope-block');
|
93255
|
+
const btnScopeOthers = this.modalCommand.querySelector('.scope-others');
|
93256
|
+
btnScopeBlock.disabled = true;
|
93257
|
+
const assistModeBtns = modalCommand.querySelectorAll('.div-assistant-mode button');
|
93258
|
+
assistModeBtns.forEach(btn => {
|
93259
|
+
btn.addEventListener('click', () => {
|
93260
|
+
assistModeBtns.forEach(item => {
|
93261
|
+
item.classList.remove('on');
|
93262
|
+
});
|
93263
|
+
btn.classList.add('on');
|
93264
|
+
const val = btn.getAttribute('data-value');
|
93265
|
+
this.builder.assistantMode = val; // general, block, others
|
93266
|
+
|
93267
|
+
/*
|
93268
|
+
// ContentBox
|
93269
|
+
if(val==='general') {
|
93270
|
+
if(!this.builder.activeCol) return;
|
93271
|
+
const box = this.builder.activeCol.closest('.is-box');
|
93272
|
+
const section = this.builder.activeCol.closest('.is-section');
|
93273
|
+
const wrapper = this.builder.activeCol.closest('.is-wrapper');
|
93274
|
+
if(!(box && section && wrapper)) return;
|
93275
|
+
|
93276
|
+
box.click();
|
93277
|
+
|
93278
|
+
if(!wrapper.classList.contains('hard-select')) box.click();
|
93279
|
+
}
|
93280
|
+
*/
|
93281
|
+
});
|
93282
|
+
});
|
93283
|
+
|
93284
|
+
//Extend onSelectionChange
|
93285
|
+
let old = this.builder.settings.onSelectionChange;
|
93286
|
+
this.builder.settings.onSelectionChange = () => {
|
93287
|
+
if (old) old.call(this); // call user's defined onRender
|
93288
|
+
|
93289
|
+
if (this.builder.activeCol) {
|
93290
|
+
if (this.builder.autoEditBlock) {
|
93291
|
+
// change
|
93292
|
+
this.builder.assistantMode = 'block';
|
93293
|
+
btnScopeBlock.classList.add('on');
|
93294
|
+
btnScopeSection.classList.remove('on');
|
93295
|
+
btnScopeOthers.classList.remove('on');
|
93296
|
+
}
|
93297
|
+
btnScopeBlock.removeAttribute('disabled');
|
93298
|
+
} else {
|
93299
|
+
btnScopeBlock.disabled = true;
|
93300
|
+
if (btnScopeOthers.classList.contains('on')) return;
|
93301
|
+
|
93302
|
+
// change
|
93303
|
+
this.builder.assistantMode = 'general';
|
93304
|
+
btnScopeSection.classList.add('on');
|
93305
|
+
btnScopeBlock.classList.remove('on');
|
93306
|
+
btnScopeOthers.classList.remove('on');
|
93307
|
+
}
|
93308
|
+
};
|
92955
93309
|
this.initialStart = false; // for Safari
|
92956
93310
|
}
|
92957
93311
|
|
93312
|
+
resetConfig() {
|
93313
|
+
const tempSlider = this.modalConfig.querySelector('.temperature-slider');
|
93314
|
+
const valTemp = this.modalConfig.querySelector('.val-temp');
|
93315
|
+
tempSlider.value = this.builder.temperature;
|
93316
|
+
valTemp.innerHTML = this.builder.temperature;
|
93317
|
+
const topPSlider = this.modalConfig.querySelector('.top-p-slider');
|
93318
|
+
const valTopP = this.modalConfig.querySelector('.val-top-p');
|
93319
|
+
topPSlider.value = this.builder.topP;
|
93320
|
+
valTopP.innerHTML = this.builder.topP;
|
93321
|
+
}
|
93322
|
+
config() {
|
93323
|
+
this.builder.showModal(this.modalConfig, false);
|
93324
|
+
const tempSlider = this.modalConfig.querySelector('.temperature-slider');
|
93325
|
+
const valTemp = this.modalConfig.querySelector('.val-temp');
|
93326
|
+
if (localStorage.getItem('_temp') !== null) {
|
93327
|
+
let val = localStorage.getItem('_temp');
|
93328
|
+
tempSlider.value = val;
|
93329
|
+
valTemp.innerHTML = val;
|
93330
|
+
} else {
|
93331
|
+
tempSlider.value = this.builder.temperature;
|
93332
|
+
valTemp.innerHTML = this.builder.temperature;
|
93333
|
+
}
|
93334
|
+
const topPSlider = this.modalConfig.querySelector('.top-p-slider');
|
93335
|
+
const valTopP = this.modalConfig.querySelector('.val-top-p');
|
93336
|
+
if (localStorage.getItem('_top_p') !== null) {
|
93337
|
+
let val = localStorage.getItem('_top_p');
|
93338
|
+
topPSlider.value = val;
|
93339
|
+
valTopP.innerHTML = val;
|
93340
|
+
} else {
|
93341
|
+
topPSlider.value = this.builder.topP;
|
93342
|
+
valTopP.innerHTML = this.builder.topP;
|
93343
|
+
}
|
93344
|
+
const chkAutoEditBlock = this.modalConfig.querySelector('#chkAutoEditBlock');
|
93345
|
+
if (localStorage.getItem('_auto_editblock') !== null) {
|
93346
|
+
let val = localStorage.getItem('_auto_editblock');
|
93347
|
+
if (val === '1') {
|
93348
|
+
chkAutoEditBlock.checked = true;
|
93349
|
+
} else {
|
93350
|
+
chkAutoEditBlock.checked = false;
|
93351
|
+
}
|
93352
|
+
} else {
|
93353
|
+
chkAutoEditBlock.checked = this.builder.autoEditBlock;
|
93354
|
+
}
|
93355
|
+
const inpAutoSendDelay = this.modalConfig.querySelector('.input-autosend-delay');
|
93356
|
+
if (localStorage.getItem('_autosend_delay') !== null) {
|
93357
|
+
let val = localStorage.getItem('_autosend_delay');
|
93358
|
+
inpAutoSendDelay.value = val;
|
93359
|
+
} else {
|
93360
|
+
inpAutoSendDelay.value = this.builder.autoSendDelay;
|
93361
|
+
}
|
93362
|
+
const inpCommandLang = this.modalConfig.querySelector('.input-command-lang');
|
93363
|
+
if (localStorage.getItem('_command_lang') !== null) {
|
93364
|
+
let val = localStorage.getItem('_command_lang');
|
93365
|
+
inpCommandLang.value = val;
|
93366
|
+
} else {
|
93367
|
+
inpCommandLang.value = this.builder.speechRecognitionLang;
|
93368
|
+
}
|
93369
|
+
}
|
92958
93370
|
checkMic() {
|
92959
93371
|
if (localStorage.getItem('_mic') !== null) {
|
92960
93372
|
if (localStorage.getItem('_mic') === '0') {
|
@@ -92979,16 +93391,13 @@ class Dictation {
|
|
92979
93391
|
inpCommand.focus();
|
92980
93392
|
localStorage.setItem('_dictation', '1');
|
92981
93393
|
const chkAutoSend = this.builderStuff.querySelector('#chkAutoSendCommand');
|
92982
|
-
const btnClear = this.builderStuff.querySelector('.cmd-clear-command');
|
92983
93394
|
if (this.checkMic()) {
|
92984
93395
|
// Do Nothing
|
92985
93396
|
chkAutoSend.parentNode.style.display = 'flex';
|
92986
|
-
btnClear.style.marginRight = '';
|
92987
93397
|
} else {
|
92988
93398
|
const btnDictation = this.builderStuff.querySelector('.cmd-enable-dictation');
|
92989
93399
|
btnDictation.innerHTML = '<svg class="is-icon-flex" style="width:18px; height:18px;"><use xlink:href="#icon-microphone-off"></use></svg>';
|
92990
93400
|
chkAutoSend.parentNode.style.display = 'none';
|
92991
|
-
btnClear.style.marginRight = '6px';
|
92992
93401
|
return;
|
92993
93402
|
}
|
92994
93403
|
this.startDictation();
|
@@ -93024,13 +93433,11 @@ class Dictation {
|
|
93024
93433
|
if (this.builder.onlineDemo) {
|
93025
93434
|
setTimeout(() => {
|
93026
93435
|
const btnDictation = this.builderStuff.querySelector('.cmd-enable-dictation');
|
93027
|
-
const btnClear = this.builderStuff.querySelector('.cmd-clear-command');
|
93028
93436
|
const chkAutoSend = this.builderStuff.querySelector('#chkAutoSendCommand');
|
93029
93437
|
this.stopDictation();
|
93030
93438
|
btnDictation.innerHTML = '<svg class="is-icon-flex" style="width:18px; height:18px;"><use xlink:href="#icon-microphone-off"></use></svg>';
|
93031
93439
|
localStorage.setItem('_mic', '0');
|
93032
93440
|
chkAutoSend.parentNode.style.display = 'none';
|
93033
|
-
btnClear.style.marginRight = '6px';
|
93034
93441
|
}, 1); // to give delay from the btnDictation click
|
93035
93442
|
|
93036
93443
|
//Show info
|
@@ -93048,13 +93455,11 @@ class Dictation {
|
|
93048
93455
|
} catch (e) {
|
93049
93456
|
setTimeout(() => {
|
93050
93457
|
const btnDictation = this.builderStuff.querySelector('.cmd-enable-dictation');
|
93051
|
-
const btnClear = this.builderStuff.querySelector('.cmd-clear-command');
|
93052
93458
|
const chkAutoSend = this.builderStuff.querySelector('#chkAutoSendCommand');
|
93053
93459
|
this.stopDictation();
|
93054
93460
|
btnDictation.innerHTML = '<svg class="is-icon-flex" style="width:18px; height:18px;"><use xlink:href="#icon-microphone-off"></use></svg>';
|
93055
93461
|
localStorage.setItem('_mic', '0');
|
93056
93462
|
chkAutoSend.parentNode.style.display = 'none';
|
93057
|
-
btnClear.style.marginRight = '6px';
|
93058
93463
|
}, 1); // to give delay from the btnDictation click
|
93059
93464
|
|
93060
93465
|
//Show info
|
@@ -93075,10 +93480,6 @@ class Dictation {
|
|
93075
93480
|
this.mediaRecorder = new MediaRecorder(stream);
|
93076
93481
|
this.mediaRecorder.addEventListener('dataavailable', event => {
|
93077
93482
|
if (this.aborted) return;
|
93078
|
-
|
93079
|
-
// console.log(event.data);
|
93080
|
-
// if (event.data.size > 0) {
|
93081
|
-
// }
|
93082
93483
|
this.websocket.send(event.data);
|
93083
93484
|
});
|
93084
93485
|
|
@@ -93130,6 +93531,7 @@ class Dictation {
|
|
93130
93531
|
this.startDictation();
|
93131
93532
|
}, 2000);
|
93132
93533
|
}
|
93534
|
+
this.builder.commandText = '';
|
93133
93535
|
let finalTranscripts = '';
|
93134
93536
|
let speechTimeout;
|
93135
93537
|
this.websocket.onmessage = event => {
|
@@ -93143,28 +93545,74 @@ class Dictation {
|
|
93143
93545
|
this.recorder.start(); // Using Recorder
|
93144
93546
|
} */
|
93145
93547
|
|
93146
|
-
// console.log('Start Dictation');
|
93147
93548
|
this.aborted = false;
|
93148
93549
|
}
|
93149
93550
|
if (message.event === 'transcript-result') {
|
93551
|
+
const transcript = message.data.channel.alternatives[0].transcript;
|
93552
|
+
|
93553
|
+
// Actions
|
93554
|
+
const triggerWords = this.builder.triggerWords;
|
93555
|
+
const findMatchingTrigger = transcript => {
|
93556
|
+
transcript = transcript.toLowerCase();
|
93557
|
+
transcript = transcript.replace('.', '');
|
93558
|
+
for (const key in triggerWords) {
|
93559
|
+
if (triggerWords[key].some(word => transcript.includes(word))) {
|
93560
|
+
return key;
|
93561
|
+
}
|
93562
|
+
let result;
|
93563
|
+
triggerWords[key].forEach(word => {
|
93564
|
+
const similarity = this.builder.similarity.checkSimilarity(transcript, word);
|
93565
|
+
if (similarity > 0.5) {
|
93566
|
+
result = key;
|
93567
|
+
return;
|
93568
|
+
}
|
93569
|
+
});
|
93570
|
+
if (result) return result;
|
93571
|
+
}
|
93572
|
+
return null; // No match found
|
93573
|
+
};
|
93574
|
+
|
93575
|
+
if (transcript && message.data.is_final) {
|
93576
|
+
const matchingKey = findMatchingTrigger(transcript);
|
93577
|
+
if (matchingKey) {
|
93578
|
+
if (matchingKey === 'send') {
|
93579
|
+
if (inpCommand.value.trim() === '') return;
|
93580
|
+
const btnSend = this.modalCommand.querySelector('.cmd-send-command');
|
93581
|
+
btnSend.click();
|
93582
|
+
return;
|
93583
|
+
} else if (matchingKey === 'abort') {
|
93584
|
+
if (this.builder.isInProgress) {
|
93585
|
+
// Abort
|
93586
|
+
this.opts.abort();
|
93587
|
+
const inpCommand = this.builderStuff.querySelector('.inp-command');
|
93588
|
+
this.builder.commandText = inpCommand.value;
|
93589
|
+
}
|
93590
|
+
return;
|
93591
|
+
} else if (matchingKey === 'clear') {
|
93592
|
+
this.builder.commandText = '';
|
93593
|
+
inpCommand.value = '';
|
93594
|
+
return;
|
93595
|
+
}
|
93596
|
+
}
|
93597
|
+
}
|
93150
93598
|
if (this.builder.isInProgress || this.aborted) {
|
93151
93599
|
return;
|
93152
93600
|
}
|
93153
|
-
|
93601
|
+
finalTranscripts = this.builder.commandText;
|
93154
93602
|
if (transcript && message.data.is_final) {
|
93155
|
-
finalTranscripts += ' ' + transcript;
|
93603
|
+
finalTranscripts += ' ' + transcript.trim();
|
93156
93604
|
}
|
93157
93605
|
|
93158
93606
|
// Format
|
93159
93607
|
finalTranscripts = finalTranscripts.charAt(0).toUpperCase() + finalTranscripts.slice(1);
|
93160
93608
|
finalTranscripts = finalTranscripts.trim();
|
93161
|
-
|
93609
|
+
this.builder.commandText = finalTranscripts;
|
93610
|
+
if (transcript && message.data.is_final) {
|
93611
|
+
this.builder.commandText = finalTranscripts;
|
93612
|
+
inpCommand.value = finalTranscripts;
|
93613
|
+
}
|
93162
93614
|
clearTimeout(speechTimeout);
|
93163
|
-
console.log('Writing..');
|
93164
93615
|
speechTimeout = setTimeout(() => {
|
93165
|
-
console.log('Clear');
|
93166
|
-
this.builder.commandText = '';
|
93167
|
-
finalTranscripts = '';
|
93168
93616
|
if (this.builder.autoSendCommand) {
|
93169
93617
|
if (inpCommand.value.trim() === '') return;
|
93170
93618
|
const btnSend = this.modalCommand.querySelector('.cmd-send-command');
|
@@ -93184,30 +93632,71 @@ class Dictation {
|
|
93184
93632
|
this.recognition.start();
|
93185
93633
|
this.speechTimeout;
|
93186
93634
|
this.builder.commandText = '';
|
93635
|
+
let finalTranscripts = '';
|
93187
93636
|
this.recognition.onresult = event => {
|
93188
|
-
|
93189
|
-
return;
|
93190
|
-
}
|
93191
|
-
let interimTranscripts = '';
|
93192
|
-
let finalTranscripts = '';
|
93637
|
+
let transcript = '';
|
93193
93638
|
for (var i = event.resultIndex; i < event.results.length; ++i) {
|
93194
93639
|
if (event.results[i].isFinal) {
|
93195
|
-
|
93196
|
-
} else {
|
93197
|
-
interimTranscripts += event.results[i][0].transcript;
|
93640
|
+
transcript = event.results[i][0].transcript;
|
93198
93641
|
}
|
93199
93642
|
}
|
93200
|
-
if (
|
93201
|
-
|
93202
|
-
|
93643
|
+
if (!transcript) return;
|
93644
|
+
|
93645
|
+
// Actions
|
93646
|
+
const triggerWords = this.builder.triggerWords;
|
93647
|
+
const findMatchingTrigger = transcript => {
|
93648
|
+
transcript = transcript.toLowerCase();
|
93649
|
+
for (const key in triggerWords) {
|
93650
|
+
if (triggerWords[key].some(word => transcript.includes(word))) {
|
93651
|
+
return key;
|
93652
|
+
}
|
93653
|
+
let result;
|
93654
|
+
triggerWords[key].forEach(word => {
|
93655
|
+
const similarity = this.builder.similarity.checkSimilarity(transcript, word);
|
93656
|
+
if (similarity > 0.5) {
|
93657
|
+
result = key;
|
93658
|
+
return;
|
93659
|
+
}
|
93660
|
+
});
|
93661
|
+
if (result) return result;
|
93662
|
+
}
|
93663
|
+
return null; // No match found
|
93664
|
+
};
|
93665
|
+
|
93666
|
+
const matchingKey = findMatchingTrigger(transcript);
|
93667
|
+
if (matchingKey) {
|
93668
|
+
if (matchingKey === 'send') {
|
93669
|
+
if (inpCommand.value.trim() === '') return;
|
93670
|
+
const btnSend = this.modalCommand.querySelector('.cmd-send-command');
|
93671
|
+
btnSend.click();
|
93672
|
+
return;
|
93673
|
+
} else if (matchingKey === 'abort') {
|
93674
|
+
if (this.builder.isInProgress) {
|
93675
|
+
// Abort
|
93676
|
+
this.opts.abort();
|
93677
|
+
const inpCommand = this.builderStuff.querySelector('.inp-command');
|
93678
|
+
this.builder.commandText = inpCommand.value;
|
93679
|
+
}
|
93680
|
+
return;
|
93681
|
+
} else if (matchingKey === 'clear') {
|
93682
|
+
this.builder.commandText = '';
|
93683
|
+
inpCommand.value = '';
|
93684
|
+
return;
|
93685
|
+
}
|
93686
|
+
}
|
93687
|
+
if (this.builder.isInProgress) {
|
93203
93688
|
return;
|
93204
93689
|
}
|
93205
|
-
this.builder.commandText
|
93690
|
+
finalTranscripts = this.builder.commandText;
|
93691
|
+
finalTranscripts += ' ' + transcript.trim();
|
93206
93692
|
|
93207
|
-
|
93693
|
+
// Format
|
93694
|
+
finalTranscripts = finalTranscripts.trim();
|
93695
|
+
finalTranscripts = finalTranscripts.charAt(0).toUpperCase() + finalTranscripts.slice(1);
|
93696
|
+
this.builder.commandText = finalTranscripts;
|
93697
|
+
inpCommand.value = finalTranscripts;
|
93208
93698
|
clearTimeout(this.speechTimeout);
|
93209
93699
|
this.speechTimeout = setTimeout(() => {
|
93210
|
-
this.builder.commandText = '';
|
93211
93700
|
if (this.builder.autoSendCommand) {
|
93212
93701
|
if (inpCommand.value.trim() === '') return;
|
93213
93702
|
const btnSend = this.modalCommand.querySelector('.cmd-send-command');
|
@@ -93228,13 +93717,11 @@ class Dictation {
|
|
93228
93717
|
// See btnDictation click
|
93229
93718
|
setTimeout(() => {
|
93230
93719
|
const btnDictation = this.builderStuff.querySelector('.cmd-enable-dictation');
|
93231
|
-
const btnClear = this.builderStuff.querySelector('.cmd-clear-command');
|
93232
93720
|
const chkAutoSend = this.builderStuff.querySelector('#chkAutoSendCommand');
|
93233
93721
|
this.stopDictation();
|
93234
93722
|
btnDictation.innerHTML = '<svg class="is-icon-flex" style="width:18px; height:18px;"><use xlink:href="#icon-microphone-off"></use></svg>';
|
93235
93723
|
localStorage.setItem('_mic', '0');
|
93236
93724
|
chkAutoSend.parentNode.style.display = 'none';
|
93237
|
-
btnClear.style.marginRight = '6px';
|
93238
93725
|
}, 1); // to give delay from the btnDictation click
|
93239
93726
|
|
93240
93727
|
//Show info
|
@@ -93312,6 +93799,12 @@ class Similarity {
|
|
93312
93799
|
constructor(builder) {
|
93313
93800
|
this.builder = builder;
|
93314
93801
|
}
|
93802
|
+
checkSimilarity(word1, word2) {
|
93803
|
+
word1 = word1.toLowerCase();
|
93804
|
+
word2 = word2.toLowerCase();
|
93805
|
+
const similarity = stringSimilarity.stringSimilarity(word1, word2);
|
93806
|
+
return similarity;
|
93807
|
+
}
|
93315
93808
|
check(command) {
|
93316
93809
|
const {
|
93317
93810
|
commandList
|
@@ -93968,9 +94461,20 @@ class ContentBuilder {
|
|
93968
94461
|
// speechTranscribeUrl: 'http://192.168.1.7:8081',
|
93969
94462
|
onlineDemo: false,
|
93970
94463
|
autoSendDelay: 4000,
|
94464
|
+
autoEditBlock: false,
|
93971
94465
|
commandPlaceholderText: '',
|
93972
94466
|
enableShortCommands: true,
|
93973
94467
|
speechRecognitionLang: 'en-US',
|
94468
|
+
assistantMode: 'general',
|
94469
|
+
triggerWords: {
|
94470
|
+
send: ['send', 'okay', 'execute', 'run'],
|
94471
|
+
abort: ['abort', 'cancel'],
|
94472
|
+
clear: ['clear', 'erase']
|
94473
|
+
},
|
94474
|
+
temperature: 0.6,
|
94475
|
+
//0.4,
|
94476
|
+
topP: 0.9,
|
94477
|
+
//0.6,
|
93974
94478
|
useMediaRecorder: true,
|
93975
94479
|
// do not change
|
93976
94480
|
encoderPath: '',
|
@@ -94578,6 +95082,7 @@ class ContentBuilder {
|
|
94578
95082
|
if (this.toolbarDisplay !== 'auto') {
|
94579
95083
|
this.rte.showDefaultToolbar();
|
94580
95084
|
}
|
95085
|
+
if (this.settings.onSelectionChange) this.settings.onSelectionChange(e);
|
94581
95086
|
}
|
94582
95087
|
}
|
94583
95088
|
this.element.hyperlink.buttonEditor.hide();
|
@@ -96622,6 +97127,7 @@ class ContentBuilder {
|
|
96622
97127
|
this.resize.enable();
|
96623
97128
|
}
|
96624
97129
|
}
|
97130
|
+
if (this.settings.onSelectionChange) this.settings.onSelectionChange(e);
|
96625
97131
|
}
|
96626
97132
|
handleCellKeypress(e) {
|
96627
97133
|
if (e.ctrlKey || e.metaKey) {
|
@@ -97684,6 +98190,19 @@ class ContentBuilder {
|
|
97684
98190
|
});
|
97685
98191
|
}
|
97686
98192
|
}
|
98193
|
+
hideElementTools() {
|
98194
|
+
let elmTool = document.querySelector('.is-element-tool');
|
98195
|
+
let divImageTool = document.querySelector('#divImageTool');
|
98196
|
+
let divImageResizer = document.querySelector('#divImageResizer');
|
98197
|
+
if (divImageTool) if (divImageTool.style.display === 'flex') {
|
98198
|
+
if (this.editor.moveable) this.editor.moveable.updateRect();
|
98199
|
+
let controlBox = this.doc.querySelector('.moveable-control-box');
|
98200
|
+
if (controlBox) controlBox.style.display = 'none';
|
98201
|
+
}
|
98202
|
+
if (elmTool) elmTool.style.display = '';
|
98203
|
+
if (divImageTool) divImageTool.style.display = '';
|
98204
|
+
if (divImageResizer) divImageResizer.style.display = '';
|
98205
|
+
}
|
97687
98206
|
}
|
97688
98207
|
|
97689
98208
|
var pace = {exports: {}};
|
@@ -101754,6 +102273,7 @@ class AnimateScroll {
|
|
101754
102273
|
if (box) {
|
101755
102274
|
box.classList.add('box-select');
|
101756
102275
|
box.removeAttribute('data-save-box');
|
102276
|
+
this.builder.activeBox = box;
|
101757
102277
|
}
|
101758
102278
|
|
101759
102279
|
let section = this.builder.doc.querySelector('[data-save-section]');
|
@@ -101761,6 +102281,7 @@ class AnimateScroll {
|
|
101761
102281
|
if (section) {
|
101762
102282
|
section.classList.add('section-select');
|
101763
102283
|
section.removeAttribute('data-save-section');
|
102284
|
+
this.builder.activeSection = section;
|
101764
102285
|
}
|
101765
102286
|
|
101766
102287
|
if (reOpen) {
|
@@ -106261,7 +106782,7 @@ const contextList = {
|
|
106261
106782
|
new_section_with_list: `
|
106262
106783
|
To create a section with a list:
|
106263
106784
|
- Use the example below as a template.
|
106264
|
-
- Replace all the text in the example with
|
106785
|
+
- Replace all the text in the example with the requested content.
|
106265
106786
|
- For 3 list items, use 3 columns in a row. For 2 or 4 list items, use 2 columns per row.
|
106266
106787
|
|
106267
106788
|
Example:
|
@@ -106318,7 +106839,7 @@ Example:
|
|
106318
106839
|
new_section_with_list_numbering: [`
|
106319
106840
|
To create a section with a list and numbering:
|
106320
106841
|
- Use the example below as a template.
|
106321
|
-
- Replace all the text in the example with
|
106842
|
+
- Replace all the text in the example with the requested content.
|
106322
106843
|
- For 3 list items, use 3 columns in a row. For 2 or 4 list items, use 2 columns per row.
|
106323
106844
|
|
106324
106845
|
Example:
|
@@ -106370,7 +106891,7 @@ Example:
|
|
106370
106891
|
`, `
|
106371
106892
|
To create a section with a list and numbering:
|
106372
106893
|
- Use the example below as a template.
|
106373
|
-
- Replace all the text in the example with
|
106894
|
+
- Replace all the text in the example with the requested content.
|
106374
106895
|
- For 3 list items, use 3 columns in a row. For 2 or 4 list items, use 2 columns per row.
|
106375
106896
|
|
106376
106897
|
Example:
|
@@ -106420,7 +106941,7 @@ Example:
|
|
106420
106941
|
To create a section with list icons:
|
106421
106942
|
- Use the example below as a template.
|
106422
106943
|
- For 3 list items, use 3 columns in a row. For 2 or 4 list items, use 2 columns per row.
|
106423
|
-
- Replace all the text in the example with
|
106944
|
+
- Replace all the text in the example with the requested content.
|
106424
106945
|
|
106425
106946
|
Example:
|
106426
106947
|
|
@@ -106440,7 +106961,7 @@ Example:
|
|
106440
106961
|
</div>
|
106441
106962
|
<div class="row">
|
106442
106963
|
<div class="column">
|
106443
|
-
<div class="spacer height-
|
106964
|
+
<div class="spacer height-80"></div>
|
106444
106965
|
</div>
|
106445
106966
|
</div>
|
106446
106967
|
<div class="row">
|
@@ -106476,7 +106997,7 @@ Example:
|
|
106476
106997
|
To create a section with a list of photos or a photo gallery:
|
106477
106998
|
- Use the example below as a template.
|
106478
106999
|
- Images must use this image URL: '{{_IMAGEURL}}'. Replace the {{IMAGEURL}} with this URL.
|
106479
|
-
- Replace all the text in the example with
|
107000
|
+
- Replace all the text in the example with the requested content.
|
106480
107001
|
|
106481
107002
|
Example:
|
106482
107003
|
|
@@ -106544,7 +107065,7 @@ Example:
|
|
106544
107065
|
To create a section:
|
106545
107066
|
- Use the example below as a template.
|
106546
107067
|
- Images must use this image URL: '{{_IMAGEURL}}'. Replace the {{IMAGEURL}} with this URL.
|
106547
|
-
- Replace all the text in the example with
|
107068
|
+
- Replace all the text in the example with the requested content.
|
106548
107069
|
|
106549
107070
|
Example:
|
106550
107071
|
|
@@ -106581,7 +107102,7 @@ Example:
|
|
106581
107102
|
To create a section with a list of photos or a photo gallery:
|
106582
107103
|
- Use the example below as a template.
|
106583
107104
|
- Images must use this image URL: '{{_IMAGEURL}}'. Replace the {{IMAGEURL}} with this URL.
|
106584
|
-
- Replace all the text in the example with
|
107105
|
+
- Replace all the text in the example with the requested content.
|
106585
107106
|
|
106586
107107
|
Example:
|
106587
107108
|
|
@@ -106621,7 +107142,7 @@ Example:
|
|
106621
107142
|
new_section: [`
|
106622
107143
|
To create a section:
|
106623
107144
|
- Use the example below as a template.
|
106624
|
-
- Replace all the text in the example with
|
107145
|
+
- Replace all the text in the example with the requested content.
|
106625
107146
|
|
106626
107147
|
Example:
|
106627
107148
|
|
@@ -106652,39 +107173,45 @@ Example:
|
|
106652
107173
|
</div>
|
106653
107174
|
|
106654
107175
|
`],
|
106655
|
-
new_section_others: `
|
106656
|
-
To create a section:
|
106657
|
-
- Use the example below as a template.
|
106658
|
-
- Replace all the text in the example with well-written copy that aligns with the requested subject.
|
107176
|
+
new_section_others: `Use one of these templates that is more suitable:
|
106659
107177
|
|
106660
|
-
|
107178
|
+
|
107179
|
+
Template 1: (Suitable for one short paragraph content, a tweet, quick information.)
|
106661
107180
|
|
106662
107181
|
<div class="is-section is-box type-poppins box-autofit min-height-60 is-section-100">
|
106663
107182
|
<div class="is-overlay"></div>
|
106664
|
-
<div class="is-container v2 leading-13 size-19 is-content-800 content-pt-
|
107183
|
+
<div class="is-container v2 leading-13 size-19 is-content-800 content-pt-60 content-pb-60">
|
106665
107184
|
<div class="row">
|
106666
107185
|
<div class="column">
|
106667
|
-
<
|
107186
|
+
<p class="size-32">{{CONTENT}}</p>
|
106668
107187
|
</div>
|
106669
107188
|
</div>
|
107189
|
+
</div>
|
107190
|
+
</div>
|
107191
|
+
|
107192
|
+
Template 2: (Suitable for short content with a title and paragraph content. Ensure that there is a space between the title and the content.)
|
107193
|
+
|
107194
|
+
<div class="is-section is-box type-poppins box-autofit min-height-60 is-section-100">
|
107195
|
+
<div class="is-overlay"></div>
|
107196
|
+
<div class="is-container v2 leading-13 size-19 is-content-800 content-pt-60 content-pb-60">
|
106670
107197
|
<div class="row">
|
106671
107198
|
<div class="column">
|
106672
|
-
<
|
107199
|
+
<div class="spacer height-100"></div>
|
106673
107200
|
</div>
|
106674
107201
|
</div>
|
106675
107202
|
<div class="row">
|
106676
107203
|
<div class="column">
|
106677
|
-
<
|
107204
|
+
<h1 class="font-normal leading-11 size-64">{{TITLE}}</h1>
|
106678
107205
|
</div>
|
106679
107206
|
</div>
|
106680
107207
|
<div class="row">
|
106681
107208
|
<div class="column">
|
106682
|
-
<
|
107209
|
+
<div class="spacer height-20"></div>
|
106683
107210
|
</div>
|
106684
107211
|
</div>
|
106685
107212
|
<div class="row">
|
106686
107213
|
<div class="column">
|
106687
|
-
<p>
|
107214
|
+
<p>{{CONTENT}}</p>
|
106688
107215
|
</div>
|
106689
107216
|
</div>
|
106690
107217
|
<div class="row">
|
@@ -106695,16 +107222,12 @@ Example:
|
|
106695
107222
|
</div>
|
106696
107223
|
</div>
|
106697
107224
|
|
106698
|
-
`,
|
106699
|
-
new_section_article: [`To create a section:
|
106700
|
-
- Use the example below as a template.
|
106701
|
-
- Replace all the text in the example with well-written copy that aligns with the requested subject.
|
106702
107225
|
|
106703
|
-
|
107226
|
+
Template 3: (Suitable for long content with multiple subtopics. Ensure that there is a space between subtopics.)
|
106704
107227
|
|
106705
107228
|
<div class="is-section is-box type-poppins box-autofit min-height-60 is-section-100">
|
106706
107229
|
<div class="is-overlay"></div>
|
106707
|
-
<div class="is-container v2 leading-13 size-19 is-content-800 content-pt-
|
107230
|
+
<div class="is-container v2 leading-13 size-19 is-content-800 content-pt-60 content-pb-60">
|
106708
107231
|
<div class="row">
|
106709
107232
|
<div class="column">
|
106710
107233
|
<div class="spacer height-100"></div>
|
@@ -106712,29 +107235,28 @@ Example:
|
|
106712
107235
|
</div>
|
106713
107236
|
<div class="row">
|
106714
107237
|
<div class="column">
|
106715
|
-
<h1 class="font-normal leading-11 size-64">
|
107238
|
+
<h1 class="font-normal leading-11 size-64">{{TITLE}}</h1>
|
106716
107239
|
</div>
|
106717
107240
|
</div>
|
106718
107241
|
<div class="row">
|
106719
107242
|
<div class="column">
|
106720
|
-
<div class="spacer height-
|
107243
|
+
<div class="spacer height-20"></div>
|
106721
107244
|
</div>
|
106722
107245
|
</div>
|
106723
107246
|
<div class="row">
|
106724
107247
|
<div class="column">
|
106725
|
-
<p>
|
107248
|
+
<p>{{CONTENT}}</p>
|
106726
107249
|
</div>
|
106727
107250
|
</div>
|
106728
|
-
|
106729
107251
|
<div class="row">
|
106730
107252
|
<div class="column">
|
106731
|
-
<div class="spacer height-
|
107253
|
+
<div class="spacer height-20"></div>
|
106732
107254
|
</div>
|
106733
107255
|
</div>
|
106734
|
-
|
106735
107256
|
<div class="row">
|
106736
107257
|
<div class="column">
|
106737
|
-
<h2
|
107258
|
+
<h2>{{SUBTITLE}}</h2>
|
107259
|
+
<p>{{CONTENT}}</p>
|
106738
107260
|
</div>
|
106739
107261
|
</div>
|
106740
107262
|
<div class="row">
|
@@ -106744,18 +107266,70 @@ Example:
|
|
106744
107266
|
</div>
|
106745
107267
|
<div class="row">
|
106746
107268
|
<div class="column">
|
106747
|
-
<
|
107269
|
+
<h2>{{SUBTITLE}}</h2>
|
107270
|
+
<p>{{CONTENT}}</p>
|
106748
107271
|
</div>
|
106749
107272
|
</div>
|
106750
107273
|
<div class="row">
|
106751
107274
|
<div class="column">
|
106752
|
-
<
|
107275
|
+
<div class="spacer height-80"></div>
|
106753
107276
|
</div>
|
106754
107277
|
</div>
|
107278
|
+
</div>
|
107279
|
+
</div>
|
107280
|
+
|
107281
|
+
`,
|
107282
|
+
// same as new_section_others (Ensure that there is a space between subtopics.)
|
107283
|
+
new_section_article: [`This is the template:
|
106755
107284
|
|
107285
|
+
<div class="is-section is-box type-poppins box-autofit min-height-60 is-section-100">
|
107286
|
+
<div class="is-overlay"></div>
|
107287
|
+
<div class="is-container v2 leading-13 size-19 is-content-800 content-pt-60 content-pb-60">
|
106756
107288
|
<div class="row">
|
106757
107289
|
<div class="column">
|
106758
|
-
<div class="spacer height-
|
107290
|
+
<div class="spacer height-100"></div>
|
107291
|
+
</div>
|
107292
|
+
</div>
|
107293
|
+
<div class="row">
|
107294
|
+
<div class="column">
|
107295
|
+
<h1 class="font-normal leading-11 size-64">{{TITLE}}</h1>
|
107296
|
+
</div>
|
107297
|
+
</div>
|
107298
|
+
<div class="row">
|
107299
|
+
<div class="column">
|
107300
|
+
<div class="spacer height-20"></div>
|
107301
|
+
</div>
|
107302
|
+
</div>
|
107303
|
+
<div class="row">
|
107304
|
+
<div class="column">
|
107305
|
+
<p>{{CONTENT}}</p>
|
107306
|
+
</div>
|
107307
|
+
</div>
|
107308
|
+
<div class="row">
|
107309
|
+
<div class="column">
|
107310
|
+
<div class="spacer height-20"></div>
|
107311
|
+
</div>
|
107312
|
+
</div>
|
107313
|
+
<div class="row">
|
107314
|
+
<div class="column">
|
107315
|
+
<h2>{{SUBTITLE}}</h2>
|
107316
|
+
<p>{{CONTENT}}</p>
|
107317
|
+
</div>
|
107318
|
+
</div>
|
107319
|
+
<div class="row">
|
107320
|
+
<div class="column">
|
107321
|
+
<div class="spacer height-20"></div>
|
107322
|
+
</div>
|
107323
|
+
</div>
|
107324
|
+
<div class="row">
|
107325
|
+
<div class="column">
|
107326
|
+
<h2>{{SUBTITLE}}</h2>
|
107327
|
+
<p>{{CONTENT}}</p>
|
107328
|
+
</div>
|
107329
|
+
</div>
|
107330
|
+
<div class="row">
|
107331
|
+
<div class="column">
|
107332
|
+
<div class="spacer height-80"></div>
|
106759
107333
|
</div>
|
106760
107334
|
</div>
|
106761
107335
|
</div>
|
@@ -106765,7 +107339,7 @@ Example:
|
|
106765
107339
|
new_section_article_with_image: [`To create a section:
|
106766
107340
|
- Use the example below as a template.
|
106767
107341
|
- Images must use this image URL: '{{_IMAGEURL}}'. Replace the {{IMAGEURL}} with this URL.
|
106768
|
-
- Replace all the text in the example with
|
107342
|
+
- Replace all the text in the example with the requested content.
|
106769
107343
|
|
106770
107344
|
Example:
|
106771
107345
|
|
@@ -106845,7 +107419,7 @@ Example:
|
|
106845
107419
|
To create a section:
|
106846
107420
|
- Use the example below as a template.
|
106847
107421
|
- Images must use this image URL: '{{_IMAGEURL}}'. Replace the {{IMAGEURL}} with this URL.
|
106848
|
-
- Replace all the text in the example with
|
107422
|
+
- Replace all the text in the example with the requested content.
|
106849
107423
|
|
106850
107424
|
Example:
|
106851
107425
|
|
@@ -106934,7 +107508,7 @@ Example:
|
|
106934
107508
|
To create a section with 2 boxes:
|
106935
107509
|
- Create one section with 'div.is-section' element and add 2 'div.is-box' elements inside it.
|
106936
107510
|
- Use the example below as a template.
|
106937
|
-
- Replace all the text in the example with
|
107511
|
+
- Replace all the text in the example with the requested content.
|
106938
107512
|
|
106939
107513
|
Example result:
|
106940
107514
|
|
@@ -106992,7 +107566,7 @@ Example result:
|
|
106992
107566
|
To create a section with 3 boxes:
|
106993
107567
|
- Create 1 (one) section with 'div.is-section' element and add 3 'div.is-box' elements inside it.
|
106994
107568
|
- Use the example below as a template.
|
106995
|
-
- Replace all the text in the example with
|
107569
|
+
- Replace all the text in the example with the requested content.
|
106996
107570
|
|
106997
107571
|
Example result:
|
106998
107572
|
|
@@ -107063,7 +107637,7 @@ Example result:
|
|
107063
107637
|
new_section_four_boxes: `To create a section with 4 boxes:
|
107064
107638
|
- Create 1 (one) section with 'div.is-section' element and add 4 'div.is-box' elements inside it.
|
107065
107639
|
- Use the example below as a template.
|
107066
|
-
- Replace all the text in the example with
|
107640
|
+
- Replace all the text in the example with the requested content.
|
107067
107641
|
|
107068
107642
|
Example result:
|
107069
107643
|
|
@@ -107248,19 +107822,22 @@ Important: include all images from the original section in the returned result!
|
|
107248
107822
|
`],
|
107249
107823
|
redesign_layout: [
|
107250
107824
|
/* 1 */
|
107251
|
-
`
|
107252
|
-
|
107253
|
-
|
107254
|
-
|
107825
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
107826
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
107827
|
+
Important: group all image columns together in a single row.
|
107828
|
+
|
107255
107829
|
This is the template:
|
107256
107830
|
|
107257
107831
|
<div class="is-section is-box is-section-100 box-autofit min-height-70 type-poppins">
|
107258
107832
|
<div class="is-overlay" style="background-color: rgb(255, 255, 255);">
|
107259
107833
|
</div>
|
107260
|
-
<div class="is-container v2 leading-14
|
107834
|
+
<div class="is-container v2 leading-14 is-content-1100 size-18 content-pt-60 content-pb-60">
|
107261
107835
|
<div class="row">
|
107262
107836
|
<div class="column">
|
107263
|
-
{{
|
107837
|
+
<h1 class="size-54 font-medium leading-none">{{TITLE}}</h1>
|
107838
|
+
</div>
|
107839
|
+
<div class="column">
|
107840
|
+
<div class="spacer height-60"></div>
|
107264
107841
|
</div>
|
107265
107842
|
</div>
|
107266
107843
|
<div class="row">
|
@@ -107289,7 +107866,7 @@ This is the template:
|
|
107289
107866
|
{{CONTENT}}
|
107290
107867
|
</div>
|
107291
107868
|
<div class="column">
|
107292
|
-
|
107869
|
+
{{CONTENT}}
|
107293
107870
|
</div>
|
107294
107871
|
</div>
|
107295
107872
|
</div>
|
@@ -107297,18 +107874,31 @@ This is the template:
|
|
107297
107874
|
|
107298
107875
|
`,
|
107299
107876
|
/* 2 */
|
107300
|
-
`
|
107301
|
-
|
107302
|
-
|
107877
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
107878
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
107879
|
+
Important: group all image columns together in a single row.
|
107303
107880
|
|
107304
107881
|
This is the template:
|
107305
107882
|
|
107306
|
-
<div class="is-section is-box is-section-100 type-
|
107883
|
+
<div class="is-section is-box is-section-100 type-heebo-ibmplexmono min-height-60">
|
107307
107884
|
<div class="is-overlay"></div>
|
107308
|
-
<div class="is-container v2 is-content-
|
107885
|
+
<div class="is-container v2 is-content-1100 size-18 leading-13 content-pt-60 content-pb-60">
|
107309
107886
|
<div class="row">
|
107310
107887
|
<div class="column">
|
107311
|
-
<
|
107888
|
+
<h1 class="size-116 font-medium leading-09">{{TITLE}}</h1>
|
107889
|
+
</div>
|
107890
|
+
<div class="column">
|
107891
|
+
<div class="spacer height-60"></div>
|
107892
|
+
</div>
|
107893
|
+
</div>
|
107894
|
+
<div class="row">
|
107895
|
+
<div class="column">
|
107896
|
+
<div class="spacer height-60"></div>
|
107897
|
+
</div>
|
107898
|
+
</div>
|
107899
|
+
<div class="row">
|
107900
|
+
<div class="column">
|
107901
|
+
{{CONTENT}}
|
107312
107902
|
</div>
|
107313
107903
|
<div class="column">
|
107314
107904
|
{{CONTENT}}
|
@@ -107316,7 +107906,7 @@ This is the template:
|
|
107316
107906
|
</div>
|
107317
107907
|
<div class="row">
|
107318
107908
|
<div class="column">
|
107319
|
-
<div class="spacer height-
|
107909
|
+
<div class="spacer height-60"></div>
|
107320
107910
|
</div>
|
107321
107911
|
</div>
|
107322
107912
|
<div class="row">
|
@@ -107327,45 +107917,57 @@ This is the template:
|
|
107327
107917
|
{{CONTENT}}
|
107328
107918
|
</div>
|
107329
107919
|
<div class="column">
|
107330
|
-
|
107920
|
+
{{CONTENT}}
|
107331
107921
|
</div>
|
107332
107922
|
</div>
|
107333
107923
|
</div>
|
107334
107924
|
</div>
|
107335
107925
|
|
107336
107926
|
`,
|
107337
|
-
/* 3 */
|
107338
|
-
`
|
107339
|
-
|
107340
|
-
|
107927
|
+
/* 3 (very good) */
|
107928
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
107929
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
107930
|
+
Important: group all image columns together in a single row.
|
107341
107931
|
|
107342
107932
|
This is the template:
|
107343
107933
|
|
107344
107934
|
<div class="is-section is-box is-section-100 type-poppins-lekton min-height-60">
|
107345
107935
|
<div class="is-overlay">
|
107346
107936
|
</div>
|
107347
|
-
<div class="is-container v2 is-content-1100 size-18 leading-13 content-
|
107348
|
-
<div class="row
|
107937
|
+
<div class="is-container v2 is-content-1100 size-18 leading-13 content-pt-60 content-pb-60">
|
107938
|
+
<div class="row">
|
107349
107939
|
<div class="column">
|
107350
|
-
{{
|
107940
|
+
<h1 class="size-76 font-normal leading-none">{{TITLE}}</h1>
|
107941
|
+
</div>
|
107942
|
+
<div class="column">
|
107943
|
+
<div class="spacer height-60"></div>
|
107351
107944
|
</div>
|
107352
107945
|
</div>
|
107353
107946
|
<div class="row">
|
107354
107947
|
<div class="column">
|
107355
|
-
<div class="spacer height-
|
107948
|
+
<div class="spacer height-60"></div>
|
107356
107949
|
</div>
|
107357
107950
|
</div>
|
107358
107951
|
<div class="row">
|
107359
107952
|
<div class="column">
|
107360
107953
|
{{CONTENT}}
|
107361
107954
|
</div>
|
107955
|
+
<div class="column">
|
107956
|
+
{{CONTENT}}
|
107957
|
+
</div>
|
107362
107958
|
</div>
|
107363
|
-
<div class="row
|
107959
|
+
<div class="row">
|
107364
107960
|
<div class="column">
|
107365
|
-
<div class="spacer height-
|
107961
|
+
<div class="spacer height-60"></div>
|
107366
107962
|
</div>
|
107367
107963
|
</div>
|
107368
|
-
<div class="row
|
107964
|
+
<div class="row">
|
107965
|
+
<div class="column">
|
107966
|
+
{{CONTENT}}
|
107967
|
+
</div>
|
107968
|
+
<div class="column">
|
107969
|
+
{{CONTENT}}
|
107970
|
+
</div>
|
107369
107971
|
<div class="column">
|
107370
107972
|
{{CONTENT}}
|
107371
107973
|
</div>
|
@@ -107375,17 +107977,33 @@ This is the template:
|
|
107375
107977
|
|
107376
107978
|
`,
|
107377
107979
|
/* 4 */
|
107378
|
-
`
|
107379
|
-
|
107380
|
-
|
107980
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
107981
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
107982
|
+
Important: group all image columns together in a single row.
|
107381
107983
|
|
107382
107984
|
This is the template:
|
107383
107985
|
|
107384
107986
|
<div class="is-section is-box is-section-100 type-raleway-lato box-autofit min-height-70">
|
107385
107987
|
<div class="is-overlay">
|
107386
107988
|
</div>
|
107387
|
-
<div class="is-container v2 h-full flex flex-col justify-between size-19 leading-none content-
|
107989
|
+
<div class="is-container v2 h-full flex flex-col justify-between size-19 leading-none is-content-1000 content-pt-60 content-pb-60">
|
107990
|
+
<div class="row">
|
107991
|
+
<div class="column">
|
107992
|
+
<h1 class="uppercase size-72 font-semibold leading-09">{{TITLE}}</h1>
|
107993
|
+
</div>
|
107994
|
+
<div class="column">
|
107995
|
+
<div class="spacer height-60"></div>
|
107996
|
+
</div>
|
107997
|
+
</div>
|
107388
107998
|
<div class="row">
|
107999
|
+
<div class="column">
|
108000
|
+
<div class="spacer height-60"></div>
|
108001
|
+
</div>
|
108002
|
+
</div>
|
108003
|
+
<div class="row">
|
108004
|
+
<div class="column">
|
108005
|
+
{{CONTENT}}
|
108006
|
+
</div>
|
107389
108007
|
<div class="column">
|
107390
108008
|
{{CONTENT}}
|
107391
108009
|
</div>
|
@@ -107403,7 +108021,7 @@ This is the template:
|
|
107403
108021
|
{{CONTENT}}
|
107404
108022
|
</div>
|
107405
108023
|
<div class="column">
|
107406
|
-
|
108024
|
+
{{CONTENT}}
|
107407
108025
|
</div>
|
107408
108026
|
</div>
|
107409
108027
|
</div>
|
@@ -107411,24 +108029,40 @@ This is the template:
|
|
107411
108029
|
|
107412
108030
|
`,
|
107413
108031
|
/* 5 */
|
107414
|
-
`
|
107415
|
-
|
107416
|
-
|
108032
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108033
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
108034
|
+
Important: group all image columns together in a single row.
|
107417
108035
|
|
107418
108036
|
This is the template:
|
107419
108037
|
|
107420
108038
|
<div class="is-section is-box is-section-100 type-alegreya-lato min-height-60">
|
107421
108039
|
<div class="is-overlay">
|
107422
108040
|
</div>
|
107423
|
-
<div class="is-container v2 leading-13 size-
|
108041
|
+
<div class="is-container v2 leading-13 size-18 is-content-1000 content-pt-60 content-pb-60">
|
108042
|
+
<div class="row">
|
108043
|
+
<div class="column">
|
108044
|
+
<h1 class="size-76 font-normal leading-none">{{TITLE}}</h1>
|
108045
|
+
</div>
|
108046
|
+
<div class="column">
|
108047
|
+
<div class="spacer height-60"></div>
|
108048
|
+
</div>
|
108049
|
+
</div>
|
108050
|
+
<div class="row">
|
108051
|
+
<div class="column">
|
108052
|
+
<div class="spacer height-60"></div>
|
108053
|
+
</div>
|
108054
|
+
</div>
|
107424
108055
|
<div class="row">
|
107425
108056
|
<div class="column">
|
107426
108057
|
{{CONTENT}}
|
107427
108058
|
</div>
|
108059
|
+
<div class="column">
|
108060
|
+
{{CONTENT}}
|
108061
|
+
</div>
|
107428
108062
|
</div>
|
107429
108063
|
<div class="row">
|
107430
108064
|
<div class="column">
|
107431
|
-
<div class="spacer height-
|
108065
|
+
<div class="spacer height-60"></div>
|
107432
108066
|
</div>
|
107433
108067
|
</div>
|
107434
108068
|
<div class="row">
|
@@ -107439,7 +108073,7 @@ This is the template:
|
|
107439
108073
|
{{CONTENT}}
|
107440
108074
|
</div>
|
107441
108075
|
<div class="column">
|
107442
|
-
|
108076
|
+
{{CONTENT}}
|
107443
108077
|
</div>
|
107444
108078
|
</div>
|
107445
108079
|
</div>
|
@@ -107447,20 +108081,23 @@ This is the template:
|
|
107447
108081
|
|
107448
108082
|
`,
|
107449
108083
|
/* 6 */
|
107450
|
-
`
|
107451
|
-
|
107452
|
-
|
108084
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108085
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
108086
|
+
Important: group all image columns together in a single row.
|
107453
108087
|
|
107454
108088
|
This is the template:
|
107455
108089
|
|
107456
108090
|
<div class="is-section is-box is-section-100 type-montserrat-roboto is-content-top edge-y-1 min-height-60">
|
107457
108091
|
<div class="is-overlay"></div>
|
107458
|
-
<div class="is-container v2 size-18 leading-12 is-content-
|
108092
|
+
<div class="is-container v2 size-18 leading-12 is-content-1000 is-content-left edge-x-1">
|
107459
108093
|
<div class="row">
|
107460
108094
|
<div class="column">
|
107461
|
-
{{
|
108095
|
+
<h1 class="text-left size-64 font-medium leading-none tracking-tight">{{TITLE}}</h1>
|
107462
108096
|
<p style="border-bottom: 2px solid #333; width: 80px;"></p>
|
107463
108097
|
</div>
|
108098
|
+
<div class="column">
|
108099
|
+
<div class="spacer height-60"></div>
|
108100
|
+
</div>
|
107464
108101
|
</div>
|
107465
108102
|
<div class="row">
|
107466
108103
|
<div class="column">
|
@@ -107474,28 +108111,44 @@ This is the template:
|
|
107474
108111
|
<div class="column">
|
107475
108112
|
{{CONTENT}}
|
107476
108113
|
</div>
|
108114
|
+
</div>
|
108115
|
+
<div class="row">
|
107477
108116
|
<div class="column">
|
107478
108117
|
<div class="spacer height-60"></div>
|
107479
108118
|
</div>
|
107480
108119
|
</div>
|
108120
|
+
<div class="row">
|
108121
|
+
<div class="column">
|
108122
|
+
{{CONTENT}}
|
108123
|
+
</div>
|
108124
|
+
<div class="column">
|
108125
|
+
{{CONTENT}}
|
108126
|
+
</div>
|
108127
|
+
<div class="column">
|
108128
|
+
{{CONTENT}}
|
108129
|
+
</div>
|
108130
|
+
</div>
|
107481
108131
|
</div>
|
107482
108132
|
</div>
|
107483
108133
|
|
107484
108134
|
`,
|
107485
108135
|
/* 7 */
|
107486
|
-
`
|
107487
|
-
|
107488
|
-
|
108136
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108137
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
108138
|
+
Important: group all image columns together in a single row.
|
107489
108139
|
|
107490
108140
|
This is the template:
|
107491
108141
|
|
107492
108142
|
<div class="is-section is-box is-section-100 type-poppins box-autofit min-height-70">
|
107493
108143
|
<div class="is-overlay">
|
107494
108144
|
</div>
|
107495
|
-
<div class="is-container v2 is-content-1300 size-18 leading-13">
|
108145
|
+
<div class="is-container v2 is-content-1300 size-18 leading-13 content-pt-60 content-pb-60">
|
107496
108146
|
<div class="row">
|
107497
108147
|
<div class="column">
|
107498
|
-
{{
|
108148
|
+
<h1 class="size-88 font-medium leading-09">{{TITLE}}</h1>
|
108149
|
+
</div>
|
108150
|
+
<div class="column">
|
108151
|
+
<div class="spacer height-60"></div>
|
107499
108152
|
</div>
|
107500
108153
|
</div>
|
107501
108154
|
<div class="row">
|
@@ -107524,7 +108177,7 @@ This is the template:
|
|
107524
108177
|
{{CONTENT}}
|
107525
108178
|
</div>
|
107526
108179
|
<div class="column">
|
107527
|
-
|
108180
|
+
{{CONTENT}}
|
107528
108181
|
</div>
|
107529
108182
|
</div>
|
107530
108183
|
</div>
|
@@ -107532,19 +108185,22 @@ This is the template:
|
|
107532
108185
|
|
107533
108186
|
`,
|
107534
108187
|
/* 08 */
|
107535
|
-
`
|
107536
|
-
|
107537
|
-
|
108188
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108189
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
108190
|
+
Important: group all image columns together in a single row.
|
107538
108191
|
|
107539
108192
|
This is the template:
|
107540
108193
|
|
107541
108194
|
<div class="is-section is-box is-section-100 type-frankruhllibre-lato box-autofit min-height-70">
|
107542
108195
|
<div class="is-overlay">
|
107543
108196
|
</div>
|
107544
|
-
<div class="is-container v2 is-content-
|
108197
|
+
<div class="is-container v2 is-content-1100 leading-12 size-19 content-pt-60 content-pb-60">
|
107545
108198
|
<div class="row">
|
107546
108199
|
<div class="column">
|
107547
|
-
{{
|
108200
|
+
<h1 class="size-68 font-normal leading-09 tracking-tighter">{{TITLE}}</h1>
|
108201
|
+
</div>
|
108202
|
+
<div class="column">
|
108203
|
+
<div class="spacer height-60"></div>
|
107548
108204
|
</div>
|
107549
108205
|
</div>
|
107550
108206
|
<div class="row">
|
@@ -107559,42 +108215,68 @@ This is the template:
|
|
107559
108215
|
<div class="column">
|
107560
108216
|
{{CONTENT}}
|
107561
108217
|
</div>
|
108218
|
+
</div>
|
108219
|
+
<div class="row">
|
107562
108220
|
<div class="column">
|
107563
108221
|
<div class="spacer height-60"></div>
|
107564
108222
|
</div>
|
107565
108223
|
</div>
|
108224
|
+
<div class="row">
|
108225
|
+
<div class="column">
|
108226
|
+
{{CONTENT}}
|
108227
|
+
</div>
|
108228
|
+
<div class="column">
|
108229
|
+
{{CONTENT}}
|
108230
|
+
</div>
|
108231
|
+
<div class="column">
|
108232
|
+
{{CONTENT}}
|
108233
|
+
</div>
|
108234
|
+
</div>
|
107566
108235
|
</div>
|
107567
108236
|
</div>
|
107568
108237
|
|
107569
108238
|
`,
|
107570
108239
|
/* 09 (very good) */
|
107571
|
-
`
|
107572
|
-
|
107573
|
-
|
108240
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108241
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
108242
|
+
Important: group all image columns together in a single row.
|
107574
108243
|
|
107575
108244
|
This is the template:
|
107576
108245
|
|
107577
108246
|
<div class="is-section is-box is-section-100 min-height-60 type-alegreyasanssc-hind">
|
107578
108247
|
<div class="is-overlay">
|
107579
108248
|
</div>
|
107580
|
-
<div class="is-container v2 is-content-1000
|
108249
|
+
<div class="is-container v2 is-content-1000 size-19 leading-12 content-pt-60 content-pb-60">
|
107581
108250
|
<div class="row">
|
107582
108251
|
<div class="column">
|
107583
|
-
{{
|
108252
|
+
<h1 class="size-68 font-normal leading-none tracking-tighter">{{TITLE}}</h1>
|
107584
108253
|
</div>
|
107585
108254
|
<div class="column">
|
107586
|
-
<div class="spacer height-
|
108255
|
+
<div class="spacer height-60"></div>
|
107587
108256
|
</div>
|
107588
108257
|
</div>
|
107589
108258
|
<div class="row">
|
107590
108259
|
<div class="column">
|
107591
|
-
<div class="spacer height-
|
108260
|
+
<div class="spacer height-60"></div>
|
108261
|
+
</div>
|
108262
|
+
</div>
|
108263
|
+
<div class="row">
|
108264
|
+
<div class="column">
|
108265
|
+
{{CONTENT}}
|
108266
|
+
</div>
|
108267
|
+
<div class="column">
|
108268
|
+
{{CONTENT}}
|
107592
108269
|
</div>
|
107593
108270
|
</div>
|
107594
108271
|
<div class="row">
|
107595
108272
|
<div class="column">
|
107596
108273
|
<div class="spacer height-60"></div>
|
107597
108274
|
</div>
|
108275
|
+
</div>
|
108276
|
+
<div class="row">
|
108277
|
+
<div class="column">
|
108278
|
+
{{CONTENT}}
|
108279
|
+
</div>
|
107598
108280
|
<div class="column">
|
107599
108281
|
{{CONTENT}}
|
107600
108282
|
</div>
|
@@ -107607,18 +108289,18 @@ This is the template:
|
|
107607
108289
|
|
107608
108290
|
`,
|
107609
108291
|
/* 10 (very good) */
|
107610
|
-
`
|
107611
|
-
|
107612
|
-
|
108292
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108293
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
108294
|
+
Important: group all image columns together in a single row.
|
107613
108295
|
|
107614
108296
|
This is the template:
|
107615
108297
|
|
107616
108298
|
<div class="is-section is-box is-section-100 type-oranienbaum-sourcesanspro box-autofit">
|
107617
108299
|
<div class="is-overlay"></div>
|
107618
|
-
<div class="is-container v2 size-17 is-content-1000 leading-12">
|
108300
|
+
<div class="is-container v2 size-17 is-content-1000 leading-12 content-pt-60 content-pb-60">
|
107619
108301
|
<div class="row">
|
107620
108302
|
<div class="column">
|
107621
|
-
{{
|
108303
|
+
<h1 class="size-76 font-normal leading-09">{{TITLE}}</h1>
|
107622
108304
|
</div>
|
107623
108305
|
<div class="column">
|
107624
108306
|
<div class="spacer height-60"></div>
|
@@ -107629,10 +108311,23 @@ This is the template:
|
|
107629
108311
|
<div class="spacer height-60"></div>
|
107630
108312
|
</div>
|
107631
108313
|
</div>
|
108314
|
+
<div class="row">
|
108315
|
+
<div class="column">
|
108316
|
+
{{CONTENT}}
|
108317
|
+
</div>
|
108318
|
+
<div class="column">
|
108319
|
+
{{CONTENT}}
|
108320
|
+
</div>
|
108321
|
+
</div>
|
107632
108322
|
<div class="row">
|
107633
108323
|
<div class="column">
|
107634
108324
|
<div class="spacer height-60"></div>
|
107635
108325
|
</div>
|
108326
|
+
</div>
|
108327
|
+
<div class="row">
|
108328
|
+
<div class="column">
|
108329
|
+
{{CONTENT}}
|
108330
|
+
</div>
|
107636
108331
|
<div class="column">
|
107637
108332
|
{{CONTENT}}
|
107638
108333
|
</div>
|
@@ -107645,17 +108340,33 @@ This is the template:
|
|
107645
108340
|
|
107646
108341
|
`,
|
107647
108342
|
/* 11 */
|
107648
|
-
`
|
107649
|
-
|
107650
|
-
|
108343
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108344
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
108345
|
+
Important: group all image columns together in a single row.
|
107651
108346
|
|
107652
108347
|
This is the template:
|
107653
108348
|
|
107654
108349
|
<div class="is-section is-box is-section-100 type-anonymouspro-catamaran box-autofit min-height-70">
|
107655
108350
|
<div class="is-overlay">
|
107656
108351
|
</div>
|
107657
|
-
<div class="is-container v2 h-full flex flex-col justify-between size-19 leading-none content-
|
108352
|
+
<div class="is-container v2 h-full flex flex-col justify-between size-19 leading-none is-content-1000 content-pt-60 content-pb-60">
|
108353
|
+
<div class="row">
|
108354
|
+
<div class="column">
|
108355
|
+
<h1 class="uppercase size-84 font-normal leading-09">{{TITLE}}</h1>
|
108356
|
+
</div>
|
108357
|
+
<div class="column">
|
108358
|
+
<div class="spacer height-60"></div>
|
108359
|
+
</div>
|
108360
|
+
</div>
|
107658
108361
|
<div class="row">
|
108362
|
+
<div class="column">
|
108363
|
+
<div class="spacer height-60"></div>
|
108364
|
+
</div>
|
108365
|
+
</div>
|
108366
|
+
<div class="row">
|
108367
|
+
<div class="column">
|
108368
|
+
{{CONTENT}}
|
108369
|
+
</div>
|
107659
108370
|
<div class="column">
|
107660
108371
|
{{CONTENT}}
|
107661
108372
|
</div>
|
@@ -107673,7 +108384,7 @@ This is the template:
|
|
107673
108384
|
{{CONTENT}}
|
107674
108385
|
</div>
|
107675
108386
|
<div class="column">
|
107676
|
-
|
108387
|
+
{{CONTENT}}
|
107677
108388
|
</div>
|
107678
108389
|
</div>
|
107679
108390
|
</div>
|
@@ -107682,19 +108393,19 @@ This is the template:
|
|
107682
108393
|
`],
|
107683
108394
|
change_layout_of_box: [
|
107684
108395
|
/* 1 */
|
107685
|
-
`
|
107686
|
-
|
107687
|
-
|
108396
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108397
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
108398
|
+
Also, move the heading above the paragraph content to create a logical flow from the title to the text.
|
107688
108399
|
|
107689
108400
|
This is the template:
|
107690
108401
|
|
107691
108402
|
<div class="is-box type-poppins box-auto min-height-70">
|
107692
108403
|
<div class="is-overlay" style="background-color: rgb(255, 255, 255);">
|
107693
108404
|
</div>
|
107694
|
-
<div class="is-container v2 leading-14
|
108405
|
+
<div class="is-container v2 leading-14 is-content-800 size-18 content-pt-60 content-pb-60">
|
107695
108406
|
<div class="row">
|
107696
108407
|
<div class="column">
|
107697
|
-
{{
|
108408
|
+
<h1 class="size-54 font-medium leading-none">{{TITLE}}</h1>
|
107698
108409
|
</div>
|
107699
108410
|
</div>
|
107700
108411
|
<div class="row">
|
@@ -107715,23 +108426,22 @@ This is the template:
|
|
107715
108426
|
|
107716
108427
|
`,
|
107717
108428
|
/* 2 */
|
107718
|
-
`
|
107719
|
-
|
107720
|
-
- You must update the title class with 'size-88 font-extrabold leading-09'.
|
108429
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108430
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
107721
108431
|
|
107722
108432
|
This is the template:
|
107723
108433
|
|
107724
|
-
<div class="is-box type-
|
108434
|
+
<div class="is-box type-heebo-ibmplexmono box-auto min-height-60">
|
107725
108435
|
<div class="is-overlay"></div>
|
107726
|
-
<div class="is-container v2 is-content-900 size-
|
108436
|
+
<div class="is-container v2 is-content-900 size-18 leading-13 content-pt-60 content-pb-60">
|
107727
108437
|
<div class="row">
|
107728
108438
|
<div class="column">
|
107729
|
-
{{
|
108439
|
+
<h1 class="size-88 font-medium leading-09">{{TITLE}}</h1>
|
107730
108440
|
</div>
|
107731
108441
|
</div>
|
107732
108442
|
<div class="row">
|
107733
108443
|
<div class="column">
|
107734
|
-
<div class="spacer height-
|
108444
|
+
<div class="spacer height-60"></div>
|
107735
108445
|
</div>
|
107736
108446
|
</div>
|
107737
108447
|
<div class="row">
|
@@ -107739,7 +108449,7 @@ This is the template:
|
|
107739
108449
|
{{CONTENT}}
|
107740
108450
|
</div>
|
107741
108451
|
<div class="column">
|
107742
|
-
|
108452
|
+
{{CONTENT}}
|
107743
108453
|
</div>
|
107744
108454
|
</div>
|
107745
108455
|
</div>
|
@@ -107747,37 +108457,29 @@ This is the template:
|
|
107747
108457
|
|
107748
108458
|
`,
|
107749
108459
|
/* 3 */
|
107750
|
-
`
|
107751
|
-
|
107752
|
-
- You must update the title class with 'size-68 font-normal leading-none'.
|
108460
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108461
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
107753
108462
|
|
107754
108463
|
This is the template:
|
107755
108464
|
|
107756
108465
|
<div class="is-box type-poppins-lekton box-auto min-height-60">
|
107757
108466
|
<div class="is-overlay">
|
107758
108467
|
</div>
|
107759
|
-
<div class="is-container v2 is-content-1100 size-18 leading-13 content-
|
108468
|
+
<div class="is-container v2 is-content-1100 size-18 leading-13 content-pt-60 content-pb-60">
|
107760
108469
|
<div class="row clearfix">
|
107761
108470
|
<div class="column">
|
107762
|
-
{{
|
108471
|
+
<h1 class="size-68 font-normal leading-none">{{TITLE}}</h1>
|
107763
108472
|
</div>
|
107764
108473
|
</div>
|
107765
108474
|
<div class="row">
|
107766
108475
|
<div class="column">
|
107767
|
-
<div class="spacer height-
|
108476
|
+
<div class="spacer height-60"></div>
|
107768
108477
|
</div>
|
107769
108478
|
</div>
|
107770
108479
|
<div class="row">
|
107771
108480
|
<div class="column">
|
107772
108481
|
{{CONTENT}}
|
107773
108482
|
</div>
|
107774
|
-
</div>
|
107775
|
-
<div class="row clearfix">
|
107776
|
-
<div class="column">
|
107777
|
-
<div class="spacer height-40"></div>
|
107778
|
-
</div>
|
107779
|
-
</div>
|
107780
|
-
<div class="row clearfix">
|
107781
108483
|
<div class="column">
|
107782
108484
|
{{CONTENT}}
|
107783
108485
|
</div>
|
@@ -107787,19 +108489,18 @@ This is the template:
|
|
107787
108489
|
|
107788
108490
|
`,
|
107789
108491
|
/* 4 */
|
107790
|
-
`
|
107791
|
-
|
107792
|
-
- You must update the title class with 'uppercase size-68 font-semibold leading-none'.
|
108492
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108493
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
107793
108494
|
|
107794
108495
|
This is the template:
|
107795
108496
|
|
107796
108497
|
<div class="is-box type-raleway-lato box-auto min-height-60">
|
107797
108498
|
<div class="is-overlay">
|
107798
108499
|
</div>
|
107799
|
-
<div class="is-container v2 h-full flex flex-col justify-between size-19 leading-none content-
|
108500
|
+
<div class="is-container v2 h-full flex flex-col justify-between size-19 leading-none is-content-900 content-pt-60 content-pb-60">
|
107800
108501
|
<div class="row">
|
107801
108502
|
<div class="column">
|
107802
|
-
{{
|
108503
|
+
<h1 class="uppercase size-68 font-semibold leading-none">{{TITLE}}</h1>
|
107803
108504
|
</div>
|
107804
108505
|
</div>
|
107805
108506
|
<div class="row">
|
@@ -107820,27 +108521,23 @@ This is the template:
|
|
107820
108521
|
|
107821
108522
|
`,
|
107822
108523
|
/* 5 */
|
107823
|
-
`
|
107824
|
-
|
107825
|
-
- You must update the title class with 'size-68 font-normal leading-none'.
|
108524
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108525
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
107826
108526
|
|
107827
108527
|
This is the template:
|
107828
108528
|
|
107829
108529
|
<div class="is-box type-alegreya-lato box-auto min-height-60">
|
107830
108530
|
<div class="is-overlay">
|
107831
108531
|
</div>
|
107832
|
-
<div class="is-container v2 leading-13 size-
|
108532
|
+
<div class="is-container v2 leading-13 size-18 is-content-860 content-pt-60 content-pb-60">
|
107833
108533
|
<div class="row">
|
107834
108534
|
<div class="column">
|
107835
|
-
{{
|
107836
|
-
</div>
|
107837
|
-
<div class="column">
|
107838
|
-
<div class="spacer height-60"></div>
|
108535
|
+
<h1 class="size-68 font-normal leading-none">{{TITLE}}</h1>
|
107839
108536
|
</div>
|
107840
108537
|
</div>
|
107841
108538
|
<div class="row">
|
107842
108539
|
<div class="column">
|
107843
|
-
<div class="spacer height-
|
108540
|
+
<div class="spacer height-60"></div>
|
107844
108541
|
</div>
|
107845
108542
|
</div>
|
107846
108543
|
<div class="row">
|
@@ -107856,9 +108553,8 @@ This is the template:
|
|
107856
108553
|
|
107857
108554
|
`,
|
107858
108555
|
/* 6 */
|
107859
|
-
`
|
107860
|
-
|
107861
|
-
- You must update the title class with 'size-64 font-medium leading-none tracking-tight'.
|
108556
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108557
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
107862
108558
|
|
107863
108559
|
This is the template:
|
107864
108560
|
|
@@ -107867,7 +108563,7 @@ This is the template:
|
|
107867
108563
|
<div class="is-container v2 size-18 leading-12 is-content-800 is-content-left edge-x-1">
|
107868
108564
|
<div class="row">
|
107869
108565
|
<div class="column">
|
107870
|
-
{{
|
108566
|
+
<h1 class="size-64 font-medium leading-none tracking-tight">{{TITLE}}</h1>
|
107871
108567
|
<p style="border-bottom: 2px solid #333; width: 80px;"></p>
|
107872
108568
|
</div>
|
107873
108569
|
<div class="column">
|
@@ -107876,7 +108572,7 @@ This is the template:
|
|
107876
108572
|
</div>
|
107877
108573
|
<div class="row">
|
107878
108574
|
<div class="column">
|
107879
|
-
<div class="spacer height-
|
108575
|
+
<div class="spacer height-60"></div>
|
107880
108576
|
</div>
|
107881
108577
|
</div>
|
107882
108578
|
<div class="row">
|
@@ -107892,24 +108588,23 @@ This is the template:
|
|
107892
108588
|
|
107893
108589
|
`,
|
107894
108590
|
/* 7 */
|
107895
|
-
`
|
107896
|
-
|
107897
|
-
- You must update the title class with 'size-88 font-normal leading-09'.
|
108591
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108592
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
107898
108593
|
|
107899
108594
|
This is the template:
|
107900
108595
|
|
107901
108596
|
<div class="is-box type-poppins box-auto min-height-60">
|
107902
108597
|
<div class="is-overlay">
|
107903
108598
|
</div>
|
107904
|
-
<div class="is-container v2 is-content-860 size-18 leading-13">
|
108599
|
+
<div class="is-container v2 is-content-860 size-18 leading-13 content-pt-60 content-pb-60">
|
107905
108600
|
<div class="row">
|
107906
108601
|
<div class="column">
|
107907
|
-
{{
|
108602
|
+
<h1 class="size-88 font-normal leading-09">{{TITLE}}</h1>
|
107908
108603
|
</div>
|
107909
108604
|
</div>
|
107910
108605
|
<div class="row">
|
107911
108606
|
<div class="column">
|
107912
|
-
<div class="spacer height-
|
108607
|
+
<div class="spacer height-60"></div>
|
107913
108608
|
</div>
|
107914
108609
|
</div>
|
107915
108610
|
<div class="row">
|
@@ -107925,27 +108620,23 @@ This is the template:
|
|
107925
108620
|
|
107926
108621
|
`,
|
107927
108622
|
/* 08 */
|
107928
|
-
`
|
107929
|
-
|
107930
|
-
- You must update the title class with 'size-68 font-normal leading-09 tracking-tighter'.
|
108623
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108624
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
107931
108625
|
|
107932
108626
|
This is the template:
|
107933
108627
|
|
107934
108628
|
<div class="is-box type-frankruhllibre-lato box-auto min-height-60">
|
107935
108629
|
<div class="is-overlay">
|
107936
108630
|
</div>
|
107937
|
-
<div class="is-container v2 is-content-860 leading-12 content-
|
108631
|
+
<div class="is-container v2 is-content-860 leading-12 size-19 content-pt-60 content-pb-60">
|
107938
108632
|
<div class="row">
|
107939
108633
|
<div class="column">
|
107940
|
-
{{
|
107941
|
-
</div>
|
107942
|
-
<div class="column">
|
107943
|
-
<div class="spacer height-60"></div>
|
108634
|
+
<h1 class="size-68 font-normal leading-09 tracking-tighter">{{TITLE}}</h1>
|
107944
108635
|
</div>
|
107945
108636
|
</div>
|
107946
108637
|
<div class="row">
|
107947
108638
|
<div class="column">
|
107948
|
-
<div class="spacer height-
|
108639
|
+
<div class="spacer height-60"></div>
|
107949
108640
|
</div>
|
107950
108641
|
</div>
|
107951
108642
|
<div class="row">
|
@@ -107961,24 +108652,23 @@ This is the template:
|
|
107961
108652
|
|
107962
108653
|
`,
|
107963
108654
|
/* 09 */
|
107964
|
-
`
|
107965
|
-
|
107966
|
-
- You must update the title class with 'size-68 font-normal leading-none tracking-tighter'.
|
108655
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108656
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
107967
108657
|
|
107968
108658
|
This is the template:
|
107969
108659
|
|
107970
108660
|
<div class="is-box type-alegreyasanssc-hind box-auto min-height-60">
|
107971
108661
|
<div class="is-overlay">
|
107972
108662
|
</div>
|
107973
|
-
<div class="is-container v2 is-content-860
|
108663
|
+
<div class="is-container v2 is-content-860 size-19 leading-12 content-pt-60 content-pb-60">
|
107974
108664
|
<div class="row">
|
107975
108665
|
<div class="column">
|
107976
|
-
{{
|
108666
|
+
<h1 class="size-68 font-normal leading-none tracking-tighter">{{TITLE}}</h1>
|
107977
108667
|
</div>
|
107978
108668
|
</div>
|
107979
108669
|
<div class="row">
|
107980
108670
|
<div class="column">
|
107981
|
-
<div class="spacer height-
|
108671
|
+
<div class="spacer height-60"></div>
|
107982
108672
|
</div>
|
107983
108673
|
</div>
|
107984
108674
|
<div class="row">
|
@@ -107986,7 +108676,7 @@ This is the template:
|
|
107986
108676
|
{{CONTENT}}
|
107987
108677
|
</div>
|
107988
108678
|
<div class="column">
|
107989
|
-
|
108679
|
+
{{CONTENT}}
|
107990
108680
|
</div>
|
107991
108681
|
</div>
|
107992
108682
|
</div>
|
@@ -107994,9 +108684,8 @@ This is the template:
|
|
107994
108684
|
|
107995
108685
|
`,
|
107996
108686
|
/* 10 */
|
107997
|
-
`
|
107998
|
-
|
107999
|
-
- You must update the title class with 'size-76 font-normal leading-09'.
|
108687
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108688
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
108000
108689
|
|
108001
108690
|
This is the template:
|
108002
108691
|
|
@@ -108005,10 +108694,7 @@ This is the template:
|
|
108005
108694
|
<div class="is-container v2 size-17 is-content-860 leading-12 is-content-left edge-x-1">
|
108006
108695
|
<div class="row">
|
108007
108696
|
<div class="column">
|
108008
|
-
{{
|
108009
|
-
</div>
|
108010
|
-
<div class="column">
|
108011
|
-
<div class="spacer height-60"></div>
|
108697
|
+
<h1 class="size-76 font-normal leading-09">{{TITLE}}</h1>
|
108012
108698
|
</div>
|
108013
108699
|
</div>
|
108014
108700
|
<div class="row">
|
@@ -108021,7 +108707,7 @@ This is the template:
|
|
108021
108707
|
{{CONTENT}}
|
108022
108708
|
</div>
|
108023
108709
|
<div class="column">
|
108024
|
-
|
108710
|
+
{{CONTENT}}
|
108025
108711
|
</div>
|
108026
108712
|
</div>
|
108027
108713
|
</div>
|
@@ -108029,19 +108715,18 @@ This is the template:
|
|
108029
108715
|
|
108030
108716
|
`,
|
108031
108717
|
/* 11 */
|
108032
|
-
`
|
108033
|
-
|
108034
|
-
- You must update the title class with 'uppercase size-84 font-normal leading-09'.
|
108718
|
+
`Re-arrange the placement of the title, paragraph, spaces, or images based the grid template below.
|
108719
|
+
Feel free to change the layout to create a visually appealing design and enhance readability.
|
108035
108720
|
|
108036
108721
|
This is the template:
|
108037
108722
|
|
108038
108723
|
<div class="is-box type-anonymouspro-catamaran box-auto min-height-70">
|
108039
108724
|
<div class="is-overlay">
|
108040
108725
|
</div>
|
108041
|
-
<div class="is-container v2 size-19 leading-none content-
|
108726
|
+
<div class="is-container v2 size-19 leading-none is-content-700 content-pt-60 content-pb-60">
|
108042
108727
|
<div class="row">
|
108043
108728
|
<div class="column">
|
108044
|
-
{{
|
108729
|
+
<h1 class="uppercase size-84 font-normal leading-09">{{TITLE}}</h1>
|
108045
108730
|
</div>
|
108046
108731
|
</div>
|
108047
108732
|
<div class="row">
|
@@ -108065,7 +108750,7 @@ This is the template:
|
|
108065
108750
|
- Create the necessary rows and columns.
|
108066
108751
|
- Use the example below as a template.
|
108067
108752
|
- Images must use this image URL: '{{_IMAGEURL}}'. Replace the {{IMAGEURL}} with this URL.
|
108068
|
-
- Replace all the text in the example with
|
108753
|
+
- Replace all the text in the example with the requested content.
|
108069
108754
|
|
108070
108755
|
Example:
|
108071
108756
|
|
@@ -108090,7 +108775,7 @@ Example:
|
|
108090
108775
|
- Create the necessary rows and columns.
|
108091
108776
|
- Use the example below as a template.
|
108092
108777
|
- Images must use this image URL: '{{_IMAGEURL}}'. Replace the {{IMAGEURL}} with this URL.
|
108093
|
-
- Replace all the text in the example with
|
108778
|
+
- Replace all the text in the example with the requested content.
|
108094
108779
|
|
108095
108780
|
Example :
|
108096
108781
|
|
@@ -108124,7 +108809,7 @@ Example :
|
|
108124
108809
|
- Use the example below as a template.
|
108125
108810
|
- For 3 list items, use 3 columns in a row. For 2 or 4 list items, use 2 columns per row.
|
108126
108811
|
- Each list item has <h3> as item title. Use example below.
|
108127
|
-
- Replace all the text in the example with
|
108812
|
+
- Replace all the text in the example with the requested content.
|
108128
108813
|
|
108129
108814
|
Example:
|
108130
108815
|
|
@@ -108181,7 +108866,7 @@ Example:
|
|
108181
108866
|
- Use the example below as a template.
|
108182
108867
|
- Images must use this image URL: '{{_IMAGEURL}}'. Replace the {{IMAGEURL}} with this URL.
|
108183
108868
|
- Each list item has <h3> as item title.
|
108184
|
-
- Replace all the text in the example with
|
108869
|
+
- Replace all the text in the example with the requested content.
|
108185
108870
|
|
108186
108871
|
Example result (Use it as the template):
|
108187
108872
|
|
@@ -108245,7 +108930,7 @@ Example result (Use it as the template):
|
|
108245
108930
|
- For 3 list items, use 3 columns in a row. For 2 or 4 list items, use 2 columns per row.
|
108246
108931
|
- Use the example below as a template.
|
108247
108932
|
- Each list item has <h3> as item title.
|
108248
|
-
- Replace all the text in the example with
|
108933
|
+
- Replace all the text in the example with the requested content.
|
108249
108934
|
|
108250
108935
|
Example:
|
108251
108936
|
|
@@ -108294,7 +108979,7 @@ Example:
|
|
108294
108979
|
// INFO: The {{ICONCLASS}} replacement works well. No processing required.
|
108295
108980
|
update_section_with_list_numbering: [`To add a list and numbering:
|
108296
108981
|
- Create the required rows and column and add them inside the current 'div.is-container'.
|
108297
|
-
- Replace all the text in the example with
|
108982
|
+
- Replace all the text in the example with the requested content.
|
108298
108983
|
- For 3 list items, use 3 columns in a row. For 2 or 4 list items, use 2 columns per row.
|
108299
108984
|
|
108300
108985
|
Example:
|
@@ -108340,7 +109025,7 @@ Example:
|
|
108340
109025
|
|
108341
109026
|
`, `To add a list and numbering:
|
108342
109027
|
- Create the required rows and column and add them inside the current 'div.is-container'.
|
108343
|
-
- Replace all the text in the example with
|
109028
|
+
- Replace all the text in the example with the requested content.
|
108344
109029
|
- For 3 list items, use 3 columns in a row. For 2 or 4 list items, use 2 columns per row.
|
108345
109030
|
|
108346
109031
|
Example:
|
@@ -108392,7 +109077,7 @@ Example:
|
|
108392
109077
|
`],
|
108393
109078
|
update_section_article_with_image: `To add an article:
|
108394
109079
|
- Create the required rows and column and add them inside the current 'div.is-container'.
|
108395
|
-
- Replace all the text in the example with
|
109080
|
+
- Replace all the text in the example with the requested content.
|
108396
109081
|
|
108397
109082
|
Example:
|
108398
109083
|
|
@@ -108535,6 +109220,215 @@ class Lib {
|
|
108535
109220
|
this.builder = builder;
|
108536
109221
|
}
|
108537
109222
|
|
109223
|
+
getFunctions_block() {
|
109224
|
+
return [{
|
109225
|
+
name: 'get_intent',
|
109226
|
+
description: 'analyze user command to modify or create section/content',
|
109227
|
+
parameters: {
|
109228
|
+
type: 'object',
|
109229
|
+
properties: {
|
109230
|
+
enhance_writings: {
|
109231
|
+
type: 'boolean',
|
109232
|
+
description: 'User requests to enhance the writings, rewrite, paraphrase or change text.'
|
109233
|
+
},
|
109234
|
+
editing: {
|
109235
|
+
type: 'boolean',
|
109236
|
+
description: 'If requested to modify the current content or style.'
|
109237
|
+
},
|
109238
|
+
add_headline: {
|
109239
|
+
type: 'boolean',
|
109240
|
+
description: 'User requests to add a headline.'
|
109241
|
+
},
|
109242
|
+
add_space: {
|
109243
|
+
type: 'boolean',
|
109244
|
+
description: 'User requests to add a space.'
|
109245
|
+
},
|
109246
|
+
adjust_space: {
|
109247
|
+
type: 'boolean',
|
109248
|
+
description: 'User requests to increase or decrease a space.'
|
109249
|
+
},
|
109250
|
+
add_button: {
|
109251
|
+
type: 'boolean',
|
109252
|
+
description: 'User requests to add a button.'
|
109253
|
+
},
|
109254
|
+
add_youtube: {
|
109255
|
+
type: 'boolean',
|
109256
|
+
description: 'User requests to add a youtube/vimeo video.'
|
109257
|
+
},
|
109258
|
+
add_video: {
|
109259
|
+
type: 'boolean',
|
109260
|
+
description: 'User requests to add a video.'
|
109261
|
+
},
|
109262
|
+
add_audio: {
|
109263
|
+
type: 'boolean',
|
109264
|
+
description: 'User requests to add an audio.'
|
109265
|
+
},
|
109266
|
+
add_map: {
|
109267
|
+
type: 'boolean',
|
109268
|
+
description: 'User requests to add a google map.'
|
109269
|
+
},
|
109270
|
+
add_image: {
|
109271
|
+
type: 'boolean',
|
109272
|
+
description: 'User requests to add an image'
|
109273
|
+
},
|
109274
|
+
align_text: {
|
109275
|
+
type: 'boolean',
|
109276
|
+
description: 'User requests to align text'
|
109277
|
+
},
|
109278
|
+
line_height: {
|
109279
|
+
type: 'boolean',
|
109280
|
+
description: 'User requests to change or adjust line height'
|
109281
|
+
},
|
109282
|
+
font_size: {
|
109283
|
+
type: 'boolean',
|
109284
|
+
description: 'User requests to change or adjust font size'
|
109285
|
+
},
|
109286
|
+
|
109287
|
+
/*
|
109288
|
+
change_section_height: {
|
109289
|
+
type: 'number',
|
109290
|
+
description: 'Requested height (percentage) of the section. Possible value: 10, 15, 20, 25, 30, 40, 50, 60, 70, 75, 80, 85, 90, 100',
|
109291
|
+
},
|
109292
|
+
section_background: {
|
109293
|
+
type: 'string',
|
109294
|
+
description: 'User request to add or remove section background that can be a background image, video or slider. Possible value: image, video, slider, remove'
|
109295
|
+
},
|
109296
|
+
change_color_individual_text: {
|
109297
|
+
type: 'boolean',
|
109298
|
+
description: 'User requests to change the color of a headline, paragraph of specific element/text.',
|
109299
|
+
},
|
109300
|
+
change_content_dark: {
|
109301
|
+
type: 'boolean',
|
109302
|
+
description: 'If requested to change text/content color to dark/black.',
|
109303
|
+
},
|
109304
|
+
change_content_light: {
|
109305
|
+
type: 'boolean',
|
109306
|
+
description: 'If requested to change text/content color to light/white.',
|
109307
|
+
},
|
109308
|
+
align_individual_text: {
|
109309
|
+
type: 'boolean',
|
109310
|
+
description: 'If requested to align an individual text/element, such as a headline, a paragraph, buttons, etc to left, center or right',
|
109311
|
+
},
|
109312
|
+
align_whole_content: {
|
109313
|
+
type: 'string',
|
109314
|
+
description: 'User requests to align the whole text/content. Possible value: left, center or right',
|
109315
|
+
},
|
109316
|
+
move_content_left: {
|
109317
|
+
type: 'boolean',
|
109318
|
+
description: 'Move content to the left',
|
109319
|
+
},
|
109320
|
+
move_content_center: {
|
109321
|
+
type: 'boolean',
|
109322
|
+
description: 'Move content to the center',
|
109323
|
+
},
|
109324
|
+
move_content_right: {
|
109325
|
+
type: 'boolean',
|
109326
|
+
description: 'Move content to the right',
|
109327
|
+
},
|
109328
|
+
move_content_top: {
|
109329
|
+
type: 'boolean',
|
109330
|
+
description: 'Move content to the top',
|
109331
|
+
},
|
109332
|
+
move_content_bottom: {
|
109333
|
+
type: 'boolean',
|
109334
|
+
description: 'Move content to the bottom',
|
109335
|
+
},
|
109336
|
+
|
109337
|
+
content_width: {
|
109338
|
+
type: 'string',
|
109339
|
+
description: 'User requests to increase or decrease content/container width. Possible value: increase, decrease'
|
109340
|
+
},
|
109341
|
+
line_height_paragraph: {
|
109342
|
+
type: 'string',
|
109343
|
+
description: 'User requests to increase/decrease the line height of the paragraph. Possible value: increase, decrease',
|
109344
|
+
},
|
109345
|
+
line_height_individual_text: {
|
109346
|
+
type: 'boolean',
|
109347
|
+
description: 'User requests to increase/decrease the line height of an individual text/element (eg. headline).',
|
109348
|
+
},
|
109349
|
+
|
109350
|
+
font_size_paragraph: {
|
109351
|
+
type: 'string',
|
109352
|
+
description: 'User requests to increase/decrease the font size of the paragraph. Possible value: increase, decrease',
|
109353
|
+
},
|
109354
|
+
font_size_individual_text: {
|
109355
|
+
type: 'boolean',
|
109356
|
+
description: 'User requests to increase/decrease the font size of an individual text/element (eg. headline).',
|
109357
|
+
},
|
109358
|
+
animation: {
|
109359
|
+
type: 'string',
|
109360
|
+
description: 'User requests to add animation. Possible value: fade-in, slide-up, zoom-in, remove'
|
109361
|
+
},
|
109362
|
+
*/
|
109363
|
+
new_block: {
|
109364
|
+
type: 'boolean',
|
109365
|
+
description: 'User requests to add a new block.'
|
109366
|
+
},
|
109367
|
+
block_task: {
|
109368
|
+
type: 'string',
|
109369
|
+
description: 'User requests to move, duplicate, or delete block/row. Possible values: move-up, move-down, duplicate, remove'
|
109370
|
+
},
|
109371
|
+
new_column_onright: {
|
109372
|
+
type: 'boolean',
|
109373
|
+
description: 'User requests to add a new column.'
|
109374
|
+
},
|
109375
|
+
new_column_onleft: {
|
109376
|
+
type: 'boolean',
|
109377
|
+
description: 'User requests to add a new column on the left.'
|
109378
|
+
},
|
109379
|
+
column_task: {
|
109380
|
+
type: 'string',
|
109381
|
+
description: 'User requests to duplicate column, or delete column. Possible values: duplicate, remove'
|
109382
|
+
},
|
109383
|
+
move_column: {
|
109384
|
+
type: 'string',
|
109385
|
+
description: 'User requests to move column. Possible values: move-up, move-down, move-left, move-right'
|
109386
|
+
},
|
109387
|
+
increase_decrease_column: {
|
109388
|
+
type: 'string',
|
109389
|
+
description: 'User requests to increase/enlarge or decrease/reduce column size/width. Possible values: increase, decrease'
|
109390
|
+
},
|
109391
|
+
move_content_left: {
|
109392
|
+
type: 'boolean',
|
109393
|
+
description: 'Move content to the left'
|
109394
|
+
},
|
109395
|
+
move_content_center: {
|
109396
|
+
type: 'boolean',
|
109397
|
+
description: 'Move content to the center'
|
109398
|
+
},
|
109399
|
+
move_content_right: {
|
109400
|
+
type: 'boolean',
|
109401
|
+
description: 'Move content to the right'
|
109402
|
+
},
|
109403
|
+
move_content_top: {
|
109404
|
+
type: 'boolean',
|
109405
|
+
description: 'Move content to the top'
|
109406
|
+
},
|
109407
|
+
move_content_bottom: {
|
109408
|
+
type: 'boolean',
|
109409
|
+
description: 'Move content to the bottom'
|
109410
|
+
},
|
109411
|
+
section_task: {
|
109412
|
+
type: 'string',
|
109413
|
+
description: 'User requests to move, duplicate, or delet section. Possible values: move-up, move-top, move-down, move-bottom, duplicate, remove'
|
109414
|
+
},
|
109415
|
+
select_section: {
|
109416
|
+
type: 'string',
|
109417
|
+
description: 'User requests to select a section. Value can be: current, next, previous, first, last.'
|
109418
|
+
},
|
109419
|
+
select_block: {
|
109420
|
+
type: 'string',
|
109421
|
+
description: 'User requests to select a block. Value can be: block, headline, title, paragraph, image, next, previous, first, last'
|
109422
|
+
},
|
109423
|
+
unselect_block: {
|
109424
|
+
type: 'boolean',
|
109425
|
+
description: 'User requests to unselect block'
|
109426
|
+
}
|
109427
|
+
}
|
109428
|
+
}
|
109429
|
+
}];
|
109430
|
+
}
|
109431
|
+
|
108538
109432
|
getFunctions() {
|
108539
109433
|
return [{
|
108540
109434
|
name: 'get_intent',
|
@@ -108542,17 +109436,21 @@ class Lib {
|
|
108542
109436
|
parameters: {
|
108543
109437
|
type: 'object',
|
108544
109438
|
properties: {
|
108545
|
-
|
109439
|
+
asking_info: {
|
108546
109440
|
type: 'boolean',
|
108547
|
-
description: 'User request
|
109441
|
+
description: 'User request an information'
|
108548
109442
|
},
|
108549
109443
|
|
108550
109444
|
/*
|
108551
109445
|
To make 2 columns not mixed with 2 boxes, each has to be identified separately
|
108552
109446
|
*/
|
109447
|
+
// new_section: {
|
109448
|
+
// type: 'string', // => Not Accurate. Value can be 'article','gallery'
|
109449
|
+
// description: 'User requests to add a new section (normal section, section with 2 or 3 columns).Possible values: new-section, new-section-2-columns, new-section-3-columns',
|
109450
|
+
// },
|
108553
109451
|
new_section: {
|
108554
|
-
type: '
|
108555
|
-
description: 'User requests to add a new section
|
109452
|
+
type: 'boolean',
|
109453
|
+
description: 'User requests to add a new section.'
|
108556
109454
|
},
|
108557
109455
|
redesign_layout: {
|
108558
109456
|
type: 'boolean',
|
@@ -108560,7 +109458,11 @@ class Lib {
|
|
108560
109458
|
},
|
108561
109459
|
change_text: {
|
108562
109460
|
type: 'boolean',
|
108563
|
-
description: 'User explicitely requests to update text of the current content'
|
109461
|
+
description: 'User explicitely requests to update text of the current content, rewrite, paraphrase or change text.'
|
109462
|
+
},
|
109463
|
+
write_based_on_the_current_content: {
|
109464
|
+
type: 'boolean',
|
109465
|
+
description: 'User request create new content based on the current content, such as to summarize, expand, make short, add more info, etc'
|
108564
109466
|
},
|
108565
109467
|
change_style: {
|
108566
109468
|
type: 'boolean',
|
@@ -108686,7 +109588,7 @@ class Lib {
|
|
108686
109588
|
},
|
108687
109589
|
content_width: {
|
108688
109590
|
type: 'string',
|
108689
|
-
description: 'User requests to increase or decrease content
|
109591
|
+
description: 'User requests to increase or decrease content width/size. Possible value: increase, decrease'
|
108690
109592
|
},
|
108691
109593
|
line_height_paragraph: {
|
108692
109594
|
type: 'string',
|
@@ -108712,6 +109614,18 @@ class Lib {
|
|
108712
109614
|
type: 'string',
|
108713
109615
|
description: 'User requests to move, duplicate, or delet section. Possible values: move-up, move-top, move-down, move-bottom, duplicate, remove'
|
108714
109616
|
},
|
109617
|
+
select_section: {
|
109618
|
+
type: 'string',
|
109619
|
+
description: 'User requests to select a section. Value can be: current, next, previous, first, last.'
|
109620
|
+
},
|
109621
|
+
select_block: {
|
109622
|
+
type: 'string',
|
109623
|
+
description: 'User requests to select a block. Value can be: block, headline, title, paragraph, image, next, previous, first, last'
|
109624
|
+
},
|
109625
|
+
unselect_block: {
|
109626
|
+
type: 'boolean',
|
109627
|
+
description: 'User requests to unselect block'
|
109628
|
+
},
|
108715
109629
|
|
108716
109630
|
/* Must be placed on the last for more precise */
|
108717
109631
|
new_section_two_boxes: {
|
@@ -108794,6 +109708,194 @@ class Lib {
|
|
108794
109708
|
return true;
|
108795
109709
|
}
|
108796
109710
|
|
109711
|
+
elementContext(context, args) {
|
109712
|
+
if (args.add_headline) {
|
109713
|
+
let info = `- To add a headline, use this class: 'font-normal leading-11 size-64':
|
109714
|
+
<h1 class="font-normal leading-11 size-64">Headline Text Here</h1>
|
109715
|
+
|
109716
|
+
`;
|
109717
|
+
context = context + '\n' + info;
|
109718
|
+
}
|
109719
|
+
|
109720
|
+
if (args.add_space) {
|
109721
|
+
let info = `- To add a space, you must add 'div.spacer' element:
|
109722
|
+
|
109723
|
+
<div class="spacer height-40"></div
|
109724
|
+
|
109725
|
+
`;
|
109726
|
+
context = context + '\n' + info;
|
109727
|
+
}
|
109728
|
+
|
109729
|
+
if (args.adjust_space) {
|
109730
|
+
let info = `- To increase or decrease a space, use one of these classes:
|
109731
|
+
- height-40
|
109732
|
+
- height-60
|
109733
|
+
- height-80
|
109734
|
+
- height-100
|
109735
|
+
- height-120
|
109736
|
+
- height-140
|
109737
|
+
- height-160
|
109738
|
+
- height-180
|
109739
|
+
- height-200
|
109740
|
+
|
109741
|
+
`;
|
109742
|
+
context = context + '\n' + info;
|
109743
|
+
}
|
109744
|
+
|
109745
|
+
if (args.add_button) {
|
109746
|
+
let info = `- To add a buttons, use the example below as a template. Wrap the button in a <div> element.
|
109747
|
+
|
109748
|
+
Button Example:
|
109749
|
+
|
109750
|
+
<div>
|
109751
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-9 text-black leading-relaxed rounded-full border-transparent hover:border-transparent font-normal tracking-wide" title="" style="background-color: rgb(240, 240, 240);">Our Works</a>
|
109752
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-9 border-current hover:border-current font-normal leading-relaxed rounded-full tracking-wide" title="">Get in Touch</a>
|
109753
|
+
</div>
|
109754
|
+
|
109755
|
+
`;
|
109756
|
+
context = context + '\n' + info;
|
109757
|
+
}
|
109758
|
+
|
109759
|
+
if (args.add_youtube) {
|
109760
|
+
// Choose random youtube
|
109761
|
+
let videoList = this.builder.media.youtube_videos;
|
109762
|
+
let videoUrl = this.chooseMedia(videoList);
|
109763
|
+
let info = `- To embed a YouTube or Vimeo video, wrap the <iframe> element in a <div> element with the classes 'embed-responsive' and 'embed-responsive-16by9' and add add it inside a column (Youtube and Vimeo links are case sensitive):
|
109764
|
+
<div class="embed-responsive embed-responsive-16by9">
|
109765
|
+
<iframe width="560" height="315" src="${videoUrl}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
|
109766
|
+
</div>
|
109767
|
+
`;
|
109768
|
+
context = context + '\n' + info;
|
109769
|
+
}
|
109770
|
+
|
109771
|
+
if (args.add_video) {
|
109772
|
+
// Choose random video
|
109773
|
+
let videoList = this.builder.media.videos;
|
109774
|
+
let videoUrl = this.chooseMedia(videoList);
|
109775
|
+
let info = `- To embed a video (MP4), use the <video> element, specify the source using the <source> element and add it inside a column:
|
109776
|
+
<video style="width: 100%;" loop="" autoplay="">
|
109777
|
+
<source src="${videoUrl}" type="video/mp4">
|
109778
|
+
</video>
|
109779
|
+
`;
|
109780
|
+
context = context + '\n' + info;
|
109781
|
+
}
|
109782
|
+
|
109783
|
+
if (args.add_audio) {
|
109784
|
+
// Choose random audio
|
109785
|
+
let audioList = this.builder.media.audios;
|
109786
|
+
let audioUrl = this.chooseMedia(audioList);
|
109787
|
+
let info = `- To embed an audio (MP3), wrap the <audio> element in a <div> with the default style and class as shown below and add it inside a column:
|
109788
|
+
<div style="width: 100%; position: relative; margin: 15px 0px; background: transparent;" class="flex">
|
109789
|
+
<audio controls="" style="width:100%">
|
109790
|
+
<source src="${audioUrl}" type="audio/mpeg">Your browser does not support the audio element.
|
109791
|
+
</audio>
|
109792
|
+
</div>
|
109793
|
+
`;
|
109794
|
+
context = context + '\n' + info;
|
109795
|
+
}
|
109796
|
+
|
109797
|
+
if (args.add_map) {
|
109798
|
+
let info = `- To embed a google map, wrap the <iframe> element in a <div> element with the classes 'embed-responsive' and 'embed-responsive-16by9' and add add it inside a column:
|
109799
|
+
<div class="embed-responsive embed-responsive-16by9">
|
109800
|
+
<iframe width="100%" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" class="mg1" src="https://maps.google.com/maps?q=Melbourne,+Victoria,+Australia&hl=en&sll=-7.981898,112.626504&sspn=0.009084,0.016512&oq=melbourne&hnear=Melbourne+Victoria,+Australia&t=m&z=10&output=embed"></iframe>
|
109801
|
+
</div>
|
109802
|
+
`;
|
109803
|
+
context = context + '\n' + info;
|
109804
|
+
}
|
109805
|
+
|
109806
|
+
if (args.add_image) {
|
109807
|
+
// to differentiate from bg image
|
109808
|
+
let info = `- To add an image, use "{{IMAGEURL}}" as the image src.
|
109809
|
+
|
109810
|
+
`;
|
109811
|
+
context = context + '\n' + info;
|
109812
|
+
}
|
109813
|
+
|
109814
|
+
if (args.align_text) {
|
109815
|
+
let info = `- To align text or element, use one of these classes: 'text-left', text-center' or 'texr-right'.
|
109816
|
+
|
109817
|
+
`;
|
109818
|
+
context = context + '\n' + info;
|
109819
|
+
}
|
109820
|
+
|
109821
|
+
if (args.line_height) {
|
109822
|
+
let info = `- To increase or decrease the line height of an individual text/element, apply this class on the requested element:
|
109823
|
+
|
109824
|
+
- leading-08
|
109825
|
+
- leading-09
|
109826
|
+
- leading-none
|
109827
|
+
- leading-11
|
109828
|
+
- leading-12
|
109829
|
+
- leading-13
|
109830
|
+
- leading-14
|
109831
|
+
- leading-15
|
109832
|
+
- leading-16
|
109833
|
+
- leading-17
|
109834
|
+
- leading-18
|
109835
|
+
- leading-19
|
109836
|
+
- leading-20
|
109837
|
+
|
109838
|
+
`;
|
109839
|
+
context = context + '\n' + info;
|
109840
|
+
}
|
109841
|
+
|
109842
|
+
if (args.font_size) {
|
109843
|
+
let info = `- To increase or decrease the font size, apply this class on the requested element:
|
109844
|
+
|
109845
|
+
- size-12
|
109846
|
+
- size-13
|
109847
|
+
- size-14
|
109848
|
+
- size-15
|
109849
|
+
- size-16
|
109850
|
+
- size-17
|
109851
|
+
- size-18
|
109852
|
+
- size-19
|
109853
|
+
- size-20
|
109854
|
+
- size-21
|
109855
|
+
- size-24
|
109856
|
+
- size-28
|
109857
|
+
- size-32
|
109858
|
+
- size-35
|
109859
|
+
- size-38
|
109860
|
+
- size-42
|
109861
|
+
- size-46
|
109862
|
+
- size-48
|
109863
|
+
- size-50
|
109864
|
+
- size-54
|
109865
|
+
- size-60
|
109866
|
+
- size-64
|
109867
|
+
- size-68
|
109868
|
+
- size-72
|
109869
|
+
- size-76
|
109870
|
+
- size-80
|
109871
|
+
- size-84
|
109872
|
+
- size-88
|
109873
|
+
- size-92
|
109874
|
+
- size-96
|
109875
|
+
- size-100
|
109876
|
+
- size-104
|
109877
|
+
- size-108
|
109878
|
+
- size-112
|
109879
|
+
- size-116
|
109880
|
+
- size-120
|
109881
|
+
- size-124
|
109882
|
+
- size-128
|
109883
|
+
- size-132
|
109884
|
+
- size-136
|
109885
|
+
- size-140
|
109886
|
+
- size-144
|
109887
|
+
- size-148
|
109888
|
+
- size-152
|
109889
|
+
- size-156
|
109890
|
+
- size-160
|
109891
|
+
|
109892
|
+
`;
|
109893
|
+
context = context + '\n' + info;
|
109894
|
+
}
|
109895
|
+
|
109896
|
+
return context;
|
109897
|
+
}
|
109898
|
+
|
108797
109899
|
addElementContext(context, args) {
|
108798
109900
|
/*
|
108799
109901
|
Check for elements: space, button, youtube, video, audio, map, code.
|
@@ -109568,7 +110670,7 @@ class Command {
|
|
109568
110670
|
<option value="random">${out('Random')}</option>
|
109569
110671
|
<option value="">${out('None (Same Style)')}</option>
|
109570
110672
|
<option value="0">01: Poppins</option>
|
109571
|
-
<option value="1">02:
|
110673
|
+
<option value="1">02: Heebo & IBM Plex Mono</option>
|
109572
110674
|
<option value="2">03: Poppins & Lekton</option>
|
109573
110675
|
<option value="3">04: Raleway & Lato</option>
|
109574
110676
|
<option value="4">05: Alegreya & Lato </option>
|
@@ -109661,7 +110763,291 @@ class Command {
|
|
109661
110763
|
|
109662
110764
|
this.dictation = this.builder.editor.dictation;
|
109663
110765
|
|
109664
|
-
|
110766
|
+
const localProcess = question => {
|
110767
|
+
// Get Selected
|
110768
|
+
let activeBox = this.builder.activeBox;
|
110769
|
+
|
110770
|
+
if (!activeBox) {
|
110771
|
+
this.builder.selectSection();
|
110772
|
+
activeBox = this.builder.activeBox;
|
110773
|
+
}
|
110774
|
+
|
110775
|
+
if (this.builder.enableShortCommands) {
|
110776
|
+
// Process Short Commands
|
110777
|
+
question = this.builder.editor.lib.processShortCommand(question); // Process the shortCommandList
|
110778
|
+
|
110779
|
+
if (!question) return false;
|
110780
|
+
const intent = this.builder.editor.similarity.check(question); // Find similarity with commandList
|
110781
|
+
|
110782
|
+
question = this.processPrompt(intent, question); // Process the commandList
|
110783
|
+
|
110784
|
+
if (!question) return false;
|
110785
|
+
}
|
110786
|
+
|
110787
|
+
return question;
|
110788
|
+
};
|
110789
|
+
|
110790
|
+
const sendBlockCommand = async question => {
|
110791
|
+
let block = this.builder.editor.activeCol;
|
110792
|
+
|
110793
|
+
if (!block) {
|
110794
|
+
this.builder.showMessage(out('Please select a block or content.'));
|
110795
|
+
this.dictation.finish(); // Must be called after finished
|
110796
|
+
|
110797
|
+
return;
|
110798
|
+
}
|
110799
|
+
|
110800
|
+
let blockContent = block.innerHTML;
|
110801
|
+
let context = '';
|
110802
|
+
this.sendCommand('analyze', `This is the command: "${question}"`, '', 'You will analyze the user\'s command and return what the user needs.', this.lib.getFunctions_block(), response => {
|
110803
|
+
const args = JSON.parse(response);
|
110804
|
+
if (this.builder.consoleLog) console.log(args);
|
110805
|
+
const numberOfIntents = Object.keys(args).length;
|
110806
|
+
|
110807
|
+
if (numberOfIntents === 1) {
|
110808
|
+
let result = this.quickAction(args);
|
110809
|
+
|
110810
|
+
if (result) {
|
110811
|
+
this.dictation.finish();
|
110812
|
+
return;
|
110813
|
+
}
|
110814
|
+
|
110815
|
+
result = this.blockAction(args);
|
110816
|
+
|
110817
|
+
if (result) {
|
110818
|
+
this.dictation.finish();
|
110819
|
+
return;
|
110820
|
+
}
|
110821
|
+
}
|
110822
|
+
|
110823
|
+
let result = this.moveBlockContent(args);
|
110824
|
+
|
110825
|
+
if (result) {
|
110826
|
+
this.dictation.finish(); // Must be called after finished
|
110827
|
+
|
110828
|
+
return true;
|
110829
|
+
}
|
110830
|
+
|
110831
|
+
let systemCmd;
|
110832
|
+
|
110833
|
+
if (args.new_block) {
|
110834
|
+
systemCmd = 'You will be asked to create content (in HTML) and return the HTML without any additional explanation.';
|
110835
|
+
context = `To add a content/block:
|
110836
|
+
- Create the required rows and column and add them inside the 'div.column' element:
|
110837
|
+
|
110838
|
+
<div class="row">
|
110839
|
+
<div class="column">
|
110840
|
+
{{CONTENT}}
|
110841
|
+
</div>
|
110842
|
+
</div>
|
110843
|
+
|
110844
|
+
Example: To create a block with a headline and a paragraph:
|
110845
|
+
|
110846
|
+
<div class="row">
|
110847
|
+
<div class="column">
|
110848
|
+
<h2 class="font-normal leading-none size-48">Heading here</h2>
|
110849
|
+
<p>Paragraph here.</p>
|
110850
|
+
</div>
|
110851
|
+
</div>
|
110852
|
+
|
110853
|
+
`;
|
110854
|
+
} else if (args.new_column_onright || args.new_column_onleft) {
|
110855
|
+
systemCmd = 'You will be asked to create content (in HTML) and return the HTML without any additional explanation.';
|
110856
|
+
context = `To add a column with content:
|
110857
|
+
- Create the required column and add them inside the 'div.column' element:
|
110858
|
+
|
110859
|
+
<div class="column">
|
110860
|
+
{{CONTENT}}
|
110861
|
+
</div>
|
110862
|
+
|
110863
|
+
Example: To create a column with a headline and a paragraph:
|
110864
|
+
|
110865
|
+
<div class="column">
|
110866
|
+
<h2 class="font-normal leading-none size-48">Heading here</h2>
|
110867
|
+
<p>Paragraph here.</p>
|
110868
|
+
</div>
|
110869
|
+
|
110870
|
+
`;
|
110871
|
+
} else {
|
110872
|
+
systemCmd = 'You will be asked to modify content (in HTML) and return only the modified HTML without any additional explanation.'; // Update prompt
|
110873
|
+
|
110874
|
+
question = `${question}. Modify my content according to this instruction and returns the modified content HTML.
|
110875
|
+
|
110876
|
+
This is my content:
|
110877
|
+
|
110878
|
+
${blockContent}
|
110879
|
+
`;
|
110880
|
+
}
|
110881
|
+
|
110882
|
+
context = this.lib.elementContext(context, args);
|
110883
|
+
|
110884
|
+
if (this.builder.consoleLog) {
|
110885
|
+
console.log(systemCmd);
|
110886
|
+
console.log(question);
|
110887
|
+
console.log(context);
|
110888
|
+
}
|
110889
|
+
|
110890
|
+
const callback = answer => {
|
110891
|
+
if (this.builder.consoleLog) console.log(answer);
|
110892
|
+
html = this.fixHtmlBlock(answer);
|
110893
|
+
|
110894
|
+
if (!html) {
|
110895
|
+
this.dictation.finish(true);
|
110896
|
+
return false;
|
110897
|
+
}
|
110898
|
+
|
110899
|
+
this.builder.editor.saveForUndo();
|
110900
|
+
|
110901
|
+
if (args.new_block) {
|
110902
|
+
if (block) {
|
110903
|
+
const row = block.parentNode;
|
110904
|
+
|
110905
|
+
if (row) {
|
110906
|
+
row.insertAdjacentHTML('afterend', html);
|
110907
|
+
setTimeout(() => {
|
110908
|
+
row.nextElementSibling.firstElementChild.click();
|
110909
|
+
}, 300);
|
110910
|
+
}
|
110911
|
+
}
|
110912
|
+
} else if (args.new_column_onright) {
|
110913
|
+
if (block) {
|
110914
|
+
block.insertAdjacentHTML('afterend', html);
|
110915
|
+
setTimeout(() => {
|
110916
|
+
block.nextElementSibling.click();
|
110917
|
+
}, 300);
|
110918
|
+
}
|
110919
|
+
} else if (args.new_column_onleft) {
|
110920
|
+
if (block) {
|
110921
|
+
block.insertAdjacentHTML('beforebegin', html);
|
110922
|
+
setTimeout(() => {
|
110923
|
+
block.previousElementSibling.click();
|
110924
|
+
}, 300);
|
110925
|
+
}
|
110926
|
+
} else {
|
110927
|
+
block.innerHTML = html;
|
110928
|
+
let elmActive = block.querySelector('.elm-active');
|
110929
|
+
|
110930
|
+
if (elmActive) {
|
110931
|
+
this.builder.editor.activeElement = elmActive;
|
110932
|
+
elmActive.focus();
|
110933
|
+
}
|
110934
|
+
} // See addContent() in ContentBuilder's util.js
|
110935
|
+
|
110936
|
+
|
110937
|
+
let builderActive = this.builder.doc.querySelector('.builder-active');
|
110938
|
+
if (builderActive) this.builder.editor.applyBehaviorOn(builderActive); //Trigger Change event
|
110939
|
+
|
110940
|
+
this.builder.settings.onChange(); //Trigger Render event
|
110941
|
+
|
110942
|
+
this.builder.settings.onRender();
|
110943
|
+
this.dictation.finish();
|
110944
|
+
};
|
110945
|
+
|
110946
|
+
this.sendCommand('assistant', question, context, systemCmd, [], callback);
|
110947
|
+
});
|
110948
|
+
};
|
110949
|
+
|
110950
|
+
const sendOtherCommand = async question => {
|
110951
|
+
let systemCmd = '';
|
110952
|
+
let context = 'You are a helpful assistant. You will provide direct answers without a prologue.';
|
110953
|
+
|
110954
|
+
const callback = answer => {
|
110955
|
+
if (this.builder.consoleLog) console.log(answer);
|
110956
|
+
let systemCmd = '';
|
110957
|
+
let question = `I have this content:
|
110958
|
+
|
110959
|
+
${answer}
|
110960
|
+
|
110961
|
+
Please use this content to create a new section using the provided template.
|
110962
|
+
|
110963
|
+
`;
|
110964
|
+
let context = this.chooseContext(cl.new_section_article);
|
110965
|
+
|
110966
|
+
const callback = html => {
|
110967
|
+
if (this.builder.consoleLog) console.log(html);
|
110968
|
+
html = this.fixHtml(html);
|
110969
|
+
|
110970
|
+
if (!html) {
|
110971
|
+
this.dictation.finish(true);
|
110972
|
+
return false;
|
110973
|
+
} // html = this.fixNewSection(html); // for new section only => Not needed (no icons or images here on the template)
|
110974
|
+
|
110975
|
+
|
110976
|
+
this.builder.editor.saveForUndo(); // Render
|
110977
|
+
|
110978
|
+
this.renderResult_NewSection(html);
|
110979
|
+
this.dictation.finish();
|
110980
|
+
};
|
110981
|
+
|
110982
|
+
this.sendCommand('html', question, context, systemCmd, [], callback);
|
110983
|
+
};
|
110984
|
+
|
110985
|
+
this.sendCommand('assistant', question, context, systemCmd, [], callback);
|
110986
|
+
};
|
110987
|
+
|
110988
|
+
const sendRewriteCommand = async question => {
|
110989
|
+
let activeBox = this.builder.activeBox;
|
110990
|
+
|
110991
|
+
if (!activeBox) {
|
110992
|
+
this.builder.showMessage(out('Please select a box.'));
|
110993
|
+
this.dictation.finish(); // Must be called after finished
|
110994
|
+
|
110995
|
+
return;
|
110996
|
+
}
|
110997
|
+
|
110998
|
+
let currentHtml = activeBox.innerText; //this.builder.editor.lib.getHtml(activeBox);
|
110999
|
+
// Update prompt
|
111000
|
+
|
111001
|
+
question = `${question}.
|
111002
|
+
|
111003
|
+
This is my current content:
|
111004
|
+
|
111005
|
+
${currentHtml}
|
111006
|
+
`;
|
111007
|
+
let systemCmd = '';
|
111008
|
+
let context = 'You are a helpful assistant. You will provide direct answers without a prologue.';
|
111009
|
+
|
111010
|
+
const callback = answer => {
|
111011
|
+
if (this.builder.consoleLog) console.log(answer);
|
111012
|
+
let systemCmd = '';
|
111013
|
+
let question = `I have this content:
|
111014
|
+
|
111015
|
+
${answer}
|
111016
|
+
|
111017
|
+
Place this content into the provided template. Adjust the template so that the content doesn't change. Remove unecessary element on the template that are not needed.
|
111018
|
+
|
111019
|
+
`;
|
111020
|
+
let context = cl.new_section_others;
|
111021
|
+
|
111022
|
+
const callback = html => {
|
111023
|
+
if (this.builder.consoleLog) console.log(html);
|
111024
|
+
html = this.fixHtml(html);
|
111025
|
+
|
111026
|
+
if (!html) {
|
111027
|
+
this.dictation.finish(true);
|
111028
|
+
return false;
|
111029
|
+
} // html = this.fixNewSection(html); // for new section only => Not needed (no icons or images here on the template)
|
111030
|
+
|
111031
|
+
|
111032
|
+
this.builder.editor.saveForUndo(); // Render
|
111033
|
+
|
111034
|
+
this.renderResult_NewSection(html);
|
111035
|
+
this.dictation.finish();
|
111036
|
+
};
|
111037
|
+
|
111038
|
+
this.sendCommand('html', question, context, systemCmd, [], callback);
|
111039
|
+
};
|
111040
|
+
|
111041
|
+
if (this.builder.consoleLog) {
|
111042
|
+
console.log(systemCmd);
|
111043
|
+
console.log(question);
|
111044
|
+
console.log(context);
|
111045
|
+
}
|
111046
|
+
|
111047
|
+
this.sendCommand('assistant', question, context, systemCmd, [], callback);
|
111048
|
+
};
|
111049
|
+
|
111050
|
+
const sendGeneralCommand = async question => {
|
109665
111051
|
// Get Selected
|
109666
111052
|
let activeBox = this.builder.activeBox;
|
109667
111053
|
let activeSection = this.builder.activeSection;
|
@@ -109681,29 +111067,31 @@ class Command {
|
|
109681
111067
|
}
|
109682
111068
|
}
|
109683
111069
|
|
109684
|
-
if (this.builder.enableShortCommands) {
|
109685
|
-
// Process Short Commands
|
109686
|
-
question = this.builder.editor.lib.processShortCommand(question); // Process the shortCommandList
|
109687
|
-
|
109688
|
-
if (!question) return;
|
109689
|
-
const intent = this.builder.editor.similarity.check(question); // Find similarity with commandList
|
109690
|
-
|
109691
|
-
question = this.processPrompt(intent, question); // Process the commandList
|
109692
|
-
|
109693
|
-
if (!question) return;
|
109694
|
-
} // Go to OpenAI
|
109695
|
-
|
109696
|
-
|
109697
111070
|
if (this.builder.sendCommandUrl === '') return;
|
109698
111071
|
this.sendCommand('analyze', `This is the command: "${question}"`, '', 'You will analyze the user\'s command and return what the user needs.', this.lib.getFunctions(), response => {
|
109699
111072
|
const args = JSON.parse(response);
|
109700
|
-
if (this.builder.consoleLog) console.log(args);
|
111073
|
+
if (this.builder.consoleLog) console.log(args);
|
111074
|
+
|
111075
|
+
if (args.asking_info) {
|
111076
|
+
if (this.builder.consoleLog) console.log('asking_info');
|
111077
|
+
sendOtherCommand(question);
|
111078
|
+
return;
|
111079
|
+
}
|
111080
|
+
|
111081
|
+
if (args.write_based_on_the_current_content) {
|
111082
|
+
// summarize, expand, make short, add more info, etc'
|
111083
|
+
if (this.builder.consoleLog) console.log('write_based_on_the_current_content');
|
111084
|
+
sendRewriteCommand(question);
|
111085
|
+
return;
|
111086
|
+
} // SIMPLE/SINGLE INTENT (like Short Commands)
|
111087
|
+
|
109701
111088
|
|
109702
111089
|
const numberOfIntents = Object.keys(args).length;
|
109703
111090
|
|
109704
111091
|
if (activeBox && numberOfIntents === 1) {
|
109705
111092
|
/*
|
109706
|
-
|
111093
|
+
// If single intent creates new section:
|
111094
|
+
if(activeBox && (args.move_content_left || args.move_content_center || args.move_content_right ||
|
109707
111095
|
args.move_content_top || args.move_content_bottom) &&
|
109708
111096
|
!(args.align_individual_text || args.align_whole_content)) {
|
109709
111097
|
activeBox.setAttribute('data-selectbox',1);
|
@@ -109867,13 +111255,7 @@ class Command {
|
|
109867
111255
|
const val = args.align_whole_content;
|
109868
111256
|
|
109869
111257
|
if (val === 'left' || val === 'center' || val === 'right') {
|
109870
|
-
this.builder.editor.saveForUndo();
|
109871
|
-
// if(elm) {
|
109872
|
-
// this.builder.editor.lib.alignText(elm, val);
|
109873
|
-
// } else {
|
109874
|
-
// this.builder.editor.lib.alignContent(activeBox, val);
|
109875
|
-
// }
|
109876
|
-
|
111258
|
+
this.builder.editor.saveForUndo();
|
109877
111259
|
this.builder.editor.lib.alignContent(activeBox, val);
|
109878
111260
|
this.builder.settings.onChange();
|
109879
111261
|
this.dictation.finish(); // Must be called after finished
|
@@ -109939,42 +111321,29 @@ class Command {
|
|
109939
111321
|
}
|
109940
111322
|
}
|
109941
111323
|
|
109942
|
-
|
109943
|
-
const val = args.section_task;
|
109944
|
-
|
109945
|
-
if (val === 'move-up' || val === 'move-top' || val === 'move-down' || val === 'move-bottom' || val === 'duplicate' || val === 'remove') {
|
109946
|
-
this.builder.editor.saveForUndo();
|
109947
|
-
if (val === 'move-up') this.builder.editsection.sectionUp();
|
109948
|
-
if (val === 'move-top') this.builder.editsection.sectionTop();
|
109949
|
-
if (val === 'move-down') this.builder.editsection.sectionDown();
|
109950
|
-
if (val === 'move-bottom') this.builder.editsection.sectionBottom();
|
111324
|
+
const result = this.quickAction(args);
|
109951
111325
|
|
109952
|
-
|
109953
|
-
|
109954
|
-
|
109955
|
-
|
109956
|
-
|
109957
|
-
|
109958
|
-
|
109959
|
-
if (
|
109960
|
-
|
109961
|
-
|
109962
|
-
|
109963
|
-
this.builder.activeBox = null;
|
109964
|
-
}
|
109965
|
-
|
109966
|
-
this.builder.sectionStack();
|
109967
|
-
this.builder.settings.onChange();
|
111326
|
+
if (result) {
|
111327
|
+
this.dictation.finish();
|
111328
|
+
return;
|
111329
|
+
}
|
111330
|
+
/*
|
111331
|
+
if(args.add_paragraph) {
|
111332
|
+
let container = activeBox.querySelector('.is-container');
|
111333
|
+
if(!container) this.builder.editbox.addContent(); // if no container, add.
|
111334
|
+
this.builder.editor.lib.addBlock(activeBox, 'paragraph', 'after');
|
111335
|
+
this.builder.settings.onChange();
|
111336
|
+
|
109968
111337
|
this.dictation.finish(); // Must be called after finished
|
109969
|
-
|
109970
111338
|
return false;
|
109971
|
-
}
|
109972
111339
|
}
|
111340
|
+
*/
|
111341
|
+
|
109973
111342
|
} // If no activeBox
|
109974
111343
|
|
109975
111344
|
|
109976
111345
|
if (!(args.new_section || args.new_section_two_boxes || args.new_section_three_boxes || args.new_section_four_boxes) && !activeBox) {
|
109977
|
-
// args.new_section =
|
111346
|
+
// args.new_section = true;
|
109978
111347
|
// if(this.builder.consoleLog) console.log('new_section set true');
|
109979
111348
|
// if(args.redesign_layout||args.change_text||args.change_style) {
|
109980
111349
|
// this.builder.showMessage(out('Please select a box.'));
|
@@ -109995,16 +111364,16 @@ class Command {
|
|
109995
111364
|
|
109996
111365
|
let context = '';
|
109997
111366
|
|
109998
|
-
if (args.
|
111367
|
+
if (args.asking_info) {
|
109999
111368
|
/*
|
110000
111369
|
Handle Unrelated Request
|
110001
111370
|
*/
|
110002
|
-
args.new_section =
|
110003
|
-
context = cl.new_section_others; // Update prompt
|
111371
|
+
args.new_section = true;
|
111372
|
+
context = cl.cl.new_section_others; // Update prompt
|
110004
111373
|
|
110005
111374
|
question = `Add a new section containing your response on this user request: ${question}`;
|
110006
111375
|
} else if (args.new_section || args.new_section_two_boxes || args.new_section_three_boxes || args.new_section_four_boxes) {
|
110007
|
-
if (args.new_section
|
111376
|
+
if (args.new_section) {
|
110008
111377
|
if (args.add_image === 'gallery') {
|
110009
111378
|
context = cl.new_section_with_gallery;
|
110010
111379
|
} else if (args.add_list_with_image) {
|
@@ -110079,6 +111448,8 @@ class Command {
|
|
110079
111448
|
const imageUrl = this.lib.chooseMedia(imageList);
|
110080
111449
|
context = context.replaceAll('{{_IMAGEURL}}', imageUrl);
|
110081
111450
|
}
|
111451
|
+
} else {
|
111452
|
+
context = this.chooseContext(cl.new_section_article);
|
110082
111453
|
}
|
110083
111454
|
} else {
|
110084
111455
|
//if(args.redesign_layout || args.change_text || args.change_style) {
|
@@ -110099,9 +111470,17 @@ class Command {
|
|
110099
111470
|
let redesign_request = '';
|
110100
111471
|
|
110101
111472
|
if (args.redesign_layout) {
|
110102
|
-
//
|
110103
|
-
|
110104
|
-
|
111473
|
+
// get title tag
|
111474
|
+
const container = activeBox.querySelector('.is-container');
|
111475
|
+
let titleElm, titleTag;
|
111476
|
+
|
111477
|
+
if (container) {
|
111478
|
+
titleElm = container.querySelector('h1,h2');
|
111479
|
+
if (titleElm) titleTag = titleElm.tagName.toLowerCase();
|
111480
|
+
} // Update prompt
|
111481
|
+
|
111482
|
+
|
111483
|
+
redesign_request = 'Change the placement of the title, paragraph and all elements in my section based on the layout template. '; // Update context
|
110105
111484
|
|
110106
111485
|
let val;
|
110107
111486
|
|
@@ -110127,14 +111506,18 @@ class Command {
|
|
110127
111506
|
} else {
|
110128
111507
|
context = this.chooseContext(cl.change_layout_of_box, val);
|
110129
111508
|
}
|
111509
|
+
} // set title tag
|
111510
|
+
|
111511
|
+
|
111512
|
+
if (titleTag === 'h2') {
|
111513
|
+
context = context.replaceAll('h1', 'h2');
|
110130
111514
|
}
|
110131
111515
|
} // Update prompt
|
110132
111516
|
|
110133
111517
|
|
110134
|
-
question = `${question}. Modify
|
110135
|
-
${redesign_request}
|
111518
|
+
question = `${redesign_request}${question}. Modify my section according to this instruction and returns the modified section HTML.
|
110136
111519
|
|
110137
|
-
This is my
|
111520
|
+
This is my section:
|
110138
111521
|
|
110139
111522
|
${currentHtml}
|
110140
111523
|
`;
|
@@ -110171,8 +111554,12 @@ ${currentHtml}
|
|
110171
111554
|
|
110172
111555
|
context = this.lib.addElementContext(context, args); // Send
|
110173
111556
|
|
110174
|
-
|
110175
|
-
|
111557
|
+
let systemCmd = `You will be provided with HTML code to modify, and your task is to return only the modified HTML code, excluding any introductions or explanations
|
111558
|
+
`;
|
111559
|
+
|
111560
|
+
if (args.new_section || args.new_section_two_boxes || args.new_section_three_boxes || args.new_section_four_boxes) {
|
111561
|
+
systemCmd = 'Your task it to create and return HTML content, excluding any introductions or explanations.';
|
111562
|
+
}
|
110176
111563
|
|
110177
111564
|
const callback = html => {
|
110178
111565
|
if (this.builder.consoleLog) console.log(html);
|
@@ -110228,10 +111615,11 @@ ${currentHtml}
|
|
110228
111615
|
this.renderResult(html);
|
110229
111616
|
} else {
|
110230
111617
|
// New Section
|
110231
|
-
// html = this.fixIcons(html);
|
110232
111618
|
html = this.fixButtons(html);
|
110233
111619
|
html = this.fixBgImage(html); // only if box has inline bg image, which is incorrect
|
110234
111620
|
|
111621
|
+
html = this.fixNewSection(html); // for new section only
|
111622
|
+
|
110235
111623
|
if (args.section_background && args.section_background === 'image') {
|
110236
111624
|
html = this.setBgImage(html, true); // Change the bg image (also fix incorrect structure)
|
110237
111625
|
}
|
@@ -110254,6 +111642,7 @@ ${currentHtml}
|
|
110254
111642
|
};
|
110255
111643
|
|
110256
111644
|
if (this.builder.consoleLog) {
|
111645
|
+
console.log(systemCmd);
|
110257
111646
|
console.log(question);
|
110258
111647
|
console.log(context);
|
110259
111648
|
} // Check if a command includes redesign request
|
@@ -110282,9 +111671,29 @@ ${currentHtml}
|
|
110282
111671
|
|
110283
111672
|
this.sendCommand('html', question, context, systemCmd, [], callback);
|
110284
111673
|
});
|
110285
|
-
};
|
111674
|
+
};
|
111675
|
+
|
111676
|
+
this.dictation.opts.send = question => {
|
111677
|
+
// Get Selected
|
111678
|
+
let activeBox = this.builder.activeBox;
|
111679
|
+
|
111680
|
+
if (!activeBox) {
|
111681
|
+
this.builder.selectSection();
|
111682
|
+
} // Local Process
|
110286
111683
|
|
110287
111684
|
|
111685
|
+
question = localProcess(question);
|
111686
|
+
if (!question) return; // Go to OpenAI
|
111687
|
+
|
111688
|
+
if (this.builder.editor.assistantMode === 'general') {
|
111689
|
+
sendGeneralCommand(question);
|
111690
|
+
} else if (this.builder.editor.assistantMode === 'others') {
|
111691
|
+
sendOtherCommand(question);
|
111692
|
+
} else if (this.builder.editor.assistantMode === 'block') {
|
111693
|
+
sendBlockCommand(question);
|
111694
|
+
}
|
111695
|
+
};
|
111696
|
+
|
110288
111697
|
this.dictation.opts.abort = () => {
|
110289
111698
|
this.controller.abort();
|
110290
111699
|
this.dictation.finish(true); // Must be called after finished (true = do not clear command text)
|
@@ -110398,7 +111807,8 @@ ${currentHtml}
|
|
110398
111807
|
this.dictation.finish(); // Must be called after finished
|
110399
111808
|
};
|
110400
111809
|
|
110401
|
-
|
111810
|
+
let systemCmd = `You will be provided with HTML code to modify, and your task is to return only the modified HTML code, excluding any introductions or explanations
|
111811
|
+
`;
|
110402
111812
|
this.sendCommand('html', question, context, systemCmd, [], callback);
|
110403
111813
|
}
|
110404
111814
|
|
@@ -110449,11 +111859,13 @@ ${currentHtml}
|
|
110449
111859
|
// Change the placement of the title, paragraph and all elements. Make it the same as the template's grid layout.
|
110450
111860
|
// You have to determine a suitable placement for the title, paragraph, and all other elements.
|
110451
111861
|
|
110452
|
-
question = `Change the
|
111862
|
+
question = `Change the placement of the title, paragraph and all elements in my section based on the layout template. ${question}
|
110453
111863
|
|
110454
111864
|
This is my section:
|
110455
111865
|
|
110456
|
-
${currentHtml}
|
111866
|
+
${currentHtml}
|
111867
|
+
|
111868
|
+
`;
|
110457
111869
|
let cl = contextList;
|
110458
111870
|
if (this.builder.contextList) cl = this.builder.contextList;
|
110459
111871
|
let context;
|
@@ -110487,7 +111899,7 @@ ${currentHtml}`;
|
|
110487
111899
|
context = this.chooseContext(cl.change_layout_of_box, val);
|
110488
111900
|
}
|
110489
111901
|
} // Experiment
|
110490
|
-
// context = cl.redesign_layout2[
|
111902
|
+
// context = cl.redesign_layout2[1];
|
110491
111903
|
|
110492
111904
|
|
110493
111905
|
if (useSavedSection) {
|
@@ -110506,7 +111918,21 @@ ${currentHtml}`;
|
|
110506
111918
|
// contentWidth=item;
|
110507
111919
|
// }
|
110508
111920
|
// });
|
111921
|
+
// get title tag
|
111922
|
+
|
111923
|
+
|
111924
|
+
const container = activeBox.querySelector('.is-container');
|
111925
|
+
let titleElm, titleTag;
|
111926
|
+
|
111927
|
+
if (container) {
|
111928
|
+
titleElm = container.querySelector('h1,h2');
|
111929
|
+
if (titleElm) titleTag = titleElm.tagName.toLowerCase();
|
111930
|
+
} // set title tag
|
111931
|
+
|
110509
111932
|
|
111933
|
+
if (titleTag === 'h2') {
|
111934
|
+
context = context.replaceAll('h1', 'h2');
|
111935
|
+
}
|
110510
111936
|
|
110511
111937
|
if (this.builder.consoleLog) console.log(context); // get typo class.
|
110512
111938
|
|
@@ -110549,7 +111975,8 @@ ${currentHtml}`;
|
|
110549
111975
|
this.dictation.finish(); // Must be called after finished
|
110550
111976
|
};
|
110551
111977
|
|
110552
|
-
|
111978
|
+
let systemCmd = `You will be provided with HTML code to modify, and your task is to return only the modified HTML code, excluding any introductions or explanations
|
111979
|
+
`;
|
110553
111980
|
this.sendCommand('html', question, context, systemCmd, [], callback);
|
110554
111981
|
}
|
110555
111982
|
|
@@ -110614,14 +112041,13 @@ ${currentHtml}`;
|
|
110614
112041
|
|
110615
112042
|
if (col) elm = col.querySelector(':first-child');
|
110616
112043
|
if (elm) elm.click(); // select element
|
110617
|
-
};
|
112044
|
+
}; // const selectFirst = () => {
|
112045
|
+
// const container = activeBox.querySelector('.is-container');
|
112046
|
+
// if(!container) return false;
|
112047
|
+
// let row = container.querySelector(':first-child');
|
112048
|
+
// selectElement(row);
|
112049
|
+
// };
|
110618
112050
|
|
110619
|
-
const selectFirst = () => {
|
110620
|
-
const container = activeBox.querySelector('.is-container');
|
110621
|
-
if (!container) return false;
|
110622
|
-
let row = container.querySelector(':first-child');
|
110623
|
-
selectElement(row);
|
110624
|
-
};
|
110625
112051
|
|
110626
112052
|
const selectLast = () => {
|
110627
112053
|
const container = activeBox.querySelector('.is-container');
|
@@ -110646,7 +112072,11 @@ ${currentHtml}`;
|
|
110646
112072
|
|
110647
112073
|
|
110648
112074
|
if (intent === 'select') {
|
110649
|
-
|
112075
|
+
let elm = activeBox.querySelector('h1, p, h2, h3');
|
112076
|
+
if (elm) elm.click();else {
|
112077
|
+
elm = activeBox.querySelector('.is-container > div > div');
|
112078
|
+
if (elm) elm.click();
|
112079
|
+
}
|
110650
112080
|
return false;
|
110651
112081
|
} else if (intent === 'select_next') {
|
110652
112082
|
let row = activeBox.querySelector('.row-active');
|
@@ -110661,6 +112091,17 @@ ${currentHtml}`;
|
|
110661
112091
|
} else if (intent === 'select_last') {
|
110662
112092
|
selectLast();
|
110663
112093
|
return false;
|
112094
|
+
} else if (intent === 'select_block') {
|
112095
|
+
let elm = activeBox.querySelector('h1, p, h2, h3');
|
112096
|
+
if (elm) elm.click();else {
|
112097
|
+
elm = activeBox.querySelector('.is-container > div > div');
|
112098
|
+
if (elm) elm.click();
|
112099
|
+
}
|
112100
|
+
return false;
|
112101
|
+
} else if (intent === 'unselect_block') {
|
112102
|
+
activeBox.click();
|
112103
|
+
activeBox.click();
|
112104
|
+
return false;
|
110664
112105
|
} else if (intent === 'select_headline') {
|
110665
112106
|
const elm = activeBox.querySelector('h1,h2,h3');
|
110666
112107
|
if (elm) elm.click();
|
@@ -111606,7 +113047,8 @@ ${currentHtml}`;
|
|
111606
113047
|
}
|
111607
113048
|
|
111608
113049
|
getHtmlResult(html) {
|
111609
|
-
// if(html.indexOf('```')!==-1) {
|
113050
|
+
if (this.builder.consoleLog) console.log(html); // if(html.indexOf('```')!==-1) {
|
113051
|
+
|
111610
113052
|
const regex = /<div[^>]*>[\s\S]*<\/div>/;
|
111611
113053
|
const matches = html.match(regex);
|
111612
113054
|
const extractedString = matches && matches[0];
|
@@ -111614,7 +113056,7 @@ ${currentHtml}`;
|
|
111614
113056
|
|
111615
113057
|
if (!this.isHTMLString(html)) {
|
111616
113058
|
// Response is not an HTML
|
111617
|
-
if
|
113059
|
+
// if(this.builder.consoleLog) console.log(html);
|
111618
113060
|
return false;
|
111619
113061
|
}
|
111620
113062
|
|
@@ -111868,6 +113310,7 @@ ${currentHtml}`;
|
|
111868
113310
|
|
111869
113311
|
fixCommon(html) {
|
111870
113312
|
html = html.replaceAll('{{CONTENT}}', '');
|
113313
|
+
html = html.replaceAll('{{TITLE}}', '');
|
111871
113314
|
const parser = new DOMParser();
|
111872
113315
|
let doc = parser.parseFromString(html, 'text/html');
|
111873
113316
|
|
@@ -111883,15 +113326,69 @@ ${currentHtml}`;
|
|
111883
113326
|
|
111884
113327
|
if (container && section && !section.contains(container)) {
|
111885
113328
|
section.appendChild(container);
|
111886
|
-
}
|
111887
|
-
|
113329
|
+
}
|
111888
113330
|
|
111889
|
-
const cols = container.querySelectorAll('column');
|
113331
|
+
const cols = container.querySelectorAll('.column');
|
111890
113332
|
cols.forEach(col => {
|
113333
|
+
// Remove column inline width=100%
|
111891
113334
|
if (col.style.width === '100%') {
|
111892
113335
|
col.style.width = '';
|
111893
113336
|
col.style.flex = '';
|
111894
113337
|
}
|
113338
|
+
/*
|
113339
|
+
Fix incorrect structure:
|
113340
|
+
<div class="column">
|
113341
|
+
<div class="flex flex-col justify-end items-start" style="width: 43.915%; flex: 0 0 auto;">
|
113342
|
+
...
|
113343
|
+
</div>
|
113344
|
+
</div>
|
113345
|
+
*/
|
113346
|
+
|
113347
|
+
|
113348
|
+
if (col.firstElementChild) {
|
113349
|
+
if (col.firstElementChild.style.width && col.firstElementChild.style.flex === '0 0 auto') {
|
113350
|
+
col.firstElementChild.outerHTML = col.firstElementChild.innerHTML;
|
113351
|
+
}
|
113352
|
+
/*else if(col.firstElementChild.classList.contains('flex')) {
|
113353
|
+
col.firstElementChild.outerHTML = col.firstElementChild.innerHTML;
|
113354
|
+
}*/
|
113355
|
+
|
113356
|
+
} // Fix column inside column
|
113357
|
+
|
113358
|
+
|
113359
|
+
const colsInside = col.querySelectorAll('.column');
|
113360
|
+
colsInside.forEach(item => {
|
113361
|
+
item.outerHTML = item.innerHTML;
|
113362
|
+
});
|
113363
|
+
/*
|
113364
|
+
Fix:
|
113365
|
+
<div class="column" style="width: 30%;">
|
113366
|
+
*/
|
113367
|
+
|
113368
|
+
if (col.style.width && col.style.flex !== '0 0 auto') {
|
113369
|
+
col.style.width = '';
|
113370
|
+
} // Remove data-filename attr
|
113371
|
+
|
113372
|
+
|
113373
|
+
const imgs = col.querySelectorAll('[data-filename]');
|
113374
|
+
imgs.forEach(img => {
|
113375
|
+
img.removeAttribute('data-filename');
|
113376
|
+
}); // Default headings' class
|
113377
|
+
|
113378
|
+
let headings = col.querySelectorAll('h1');
|
113379
|
+
headings.forEach(heading => {
|
113380
|
+
if (!heading.getAttribute('class')) {
|
113381
|
+
heading.classList.add('font-normal');
|
113382
|
+
heading.classList.add('size-35');
|
113383
|
+
}
|
113384
|
+
});
|
113385
|
+
headings = col.querySelectorAll('h2');
|
113386
|
+
headings.forEach(heading => {
|
113387
|
+
if (!heading.getAttribute('class')) {
|
113388
|
+
heading.classList.add('font-normal');
|
113389
|
+
heading.classList.add('size-28');
|
113390
|
+
}
|
113391
|
+
});
|
111895
113392
|
}); // Fix grid (width)
|
111896
113393
|
|
111897
113394
|
const rows = container.querySelectorAll('.row');
|
@@ -111911,13 +113408,13 @@ ${currentHtml}`;
|
|
111911
113408
|
});
|
111912
113409
|
|
111913
113410
|
if (totalWidth > 100) {
|
111914
|
-
console.log('FIX: clear width. Total: ' + totalWidth);
|
113411
|
+
// console.log('FIX: clear width. Total: ' + totalWidth);
|
111915
113412
|
cols.forEach(col => {
|
111916
113413
|
col.style.width = '';
|
111917
113414
|
col.style.flex = '';
|
111918
113415
|
});
|
111919
113416
|
} else if (totalWidth < 100 && !hasAutoWidthCol) {
|
111920
|
-
console.log('FIX: add col. Total: ' + totalWidth);
|
113417
|
+
// console.log('FIX: add col. Total: ' + totalWidth);
|
111921
113418
|
if (lastCol) lastCol.insertAdjacentHTML('afterend', '<div class="column"><div class="spacer height-60"></div></div>');
|
111922
113419
|
}
|
111923
113420
|
}); // Replace element style with class
|
@@ -112056,13 +113553,25 @@ ${currentHtml}`;
|
|
112056
113553
|
}
|
112057
113554
|
|
112058
113555
|
return doc.documentElement.innerHTML;
|
112059
|
-
}
|
112060
|
-
|
112061
|
-
|
112062
|
-
|
112063
|
-
|
112064
|
-
|
113556
|
+
}
|
113557
|
+
|
113558
|
+
fixNewSection(html) {
|
113559
|
+
// Fix icons
|
113560
|
+
const replacementClass = 'ion-checkmark';
|
113561
|
+
const regexPattern = /(<i class="icon )(ion-\S+)/g;
|
113562
|
+
html = html.replace(regexPattern, `$1${replacementClass}`);
|
113563
|
+
const parser = new DOMParser();
|
113564
|
+
let doc = parser.parseFromString(html, 'text/html'); // Fix embedded images
|
112065
113565
|
|
113566
|
+
const gallery = this.builder.media.images;
|
113567
|
+
const imageList = gallery.square;
|
113568
|
+
const imageUrl = this.lib.chooseMedia(imageList);
|
113569
|
+
const imgs = doc.querySelectorAll('img');
|
113570
|
+
imgs.forEach(img => {
|
113571
|
+
img.setAttribute('src', imageUrl);
|
113572
|
+
});
|
113573
|
+
return doc.documentElement.innerHTML;
|
113574
|
+
}
|
112066
113575
|
|
112067
113576
|
fixButtons(html) {
|
112068
113577
|
const parser = new DOMParser();
|
@@ -112106,6 +113615,102 @@ ${currentHtml}`;
|
|
112106
113615
|
}
|
112107
113616
|
}
|
112108
113617
|
|
113618
|
+
fixCommonBlock(html) {
|
113619
|
+
const parser = new DOMParser();
|
113620
|
+
let doc = parser.parseFromString(html, 'text/html'); // Replace element style with class
|
113621
|
+
|
113622
|
+
const elements = doc.querySelectorAll('*');
|
113623
|
+
elements.forEach(element => {
|
113624
|
+
if (element.style.textDecoration === 'line-through') {
|
113625
|
+
element.classList.add('line-through');
|
113626
|
+
element.style.textDecoration = '';
|
113627
|
+
}
|
113628
|
+
|
113629
|
+
if (element.style.textDecoration === 'underline') {
|
113630
|
+
element.classList.add('underline');
|
113631
|
+
element.style.textDecoration = '';
|
113632
|
+
}
|
113633
|
+
});
|
113634
|
+
return doc.documentElement.innerHTML;
|
113635
|
+
}
|
113636
|
+
|
113637
|
+
getHtmlBlock(html) {
|
113638
|
+
const startIndex = html.indexOf('<');
|
113639
|
+
const endIndex = html.lastIndexOf('>') + 1;
|
113640
|
+
|
113641
|
+
if (startIndex !== -1 && endIndex !== -1) {
|
113642
|
+
const extractedHTML = html.substring(startIndex, endIndex);
|
113643
|
+
html = extractedHTML;
|
113644
|
+
}
|
113645
|
+
|
113646
|
+
const extraProcess = html => {
|
113647
|
+
/*
|
113648
|
+
to fix mixed result (unwanted explanation) like this:
|
113649
|
+
|
113650
|
+
<div class="is-section is-box is-section-100 type-poppins box-autofit box-select section-select"><div class="is-overlay"></div>
|
113651
|
+
...
|
113652
|
+
</div>
|
113653
|
+
Modified code:
|
113654
|
+
<div class="is-section is-box is-section-100 type-poppins box-autofit box-select section-select"><div class="is-overlay"></div>
|
113655
|
+
...
|
113656
|
+
</div>
|
113657
|
+
*/
|
113658
|
+
let separator = '';
|
113659
|
+
const parser = new DOMParser();
|
113660
|
+
const doc = parser.parseFromString(html, 'text/html');
|
113661
|
+
const children = doc.body.childNodes;
|
113662
|
+
|
113663
|
+
for (const child of children) {
|
113664
|
+
if (child.nodeType === 3) {
|
113665
|
+
let s = child.textContent.trim();
|
113666
|
+
|
113667
|
+
if (s !== '') {
|
113668
|
+
separator = s;
|
113669
|
+
}
|
113670
|
+
}
|
113671
|
+
}
|
113672
|
+
|
113673
|
+
if (separator !== '') {
|
113674
|
+
html = html.split(separator)[1];
|
113675
|
+
return html.trim();
|
113676
|
+
} else {
|
113677
|
+
return html;
|
113678
|
+
}
|
113679
|
+
};
|
113680
|
+
|
113681
|
+
html = extraProcess(html);
|
113682
|
+
return html;
|
113683
|
+
}
|
113684
|
+
|
113685
|
+
fixHtmlBlock(html) {
|
113686
|
+
html = this.getHtmlBlock(html);
|
113687
|
+
|
113688
|
+
if (!html) {
|
113689
|
+
this.builder.showMessage(out('Oops! The response received is insufficient. Please try again.'));
|
113690
|
+
return false;
|
113691
|
+
}
|
113692
|
+
|
113693
|
+
if (html.includes('{{IMAGEURL}}')) {
|
113694
|
+
// Fix {{IMAGEURL}} that failed to replace
|
113695
|
+
const gallery = this.builder.media.images;
|
113696
|
+
const imageList = gallery.square;
|
113697
|
+
const imageUrl = this.lib.chooseMedia(imageList);
|
113698
|
+
html = html.replaceAll('{{IMAGEURL}}', imageUrl);
|
113699
|
+
} // Fix {{ICONCLASS}} that failed to replace
|
113700
|
+
|
113701
|
+
|
113702
|
+
html = html.replaceAll('{{ICONCLASS}}', 'ion-checkmark');
|
113703
|
+
html = this.replaceButtonsWithAnchorTags(html);
|
113704
|
+
html = this.replaceStrongTag(html);
|
113705
|
+
html = this.replaceEmTag(html);
|
113706
|
+
html = this.replaceUnderlineTag(html);
|
113707
|
+
html = this.replaceLineThroughTag(html);
|
113708
|
+
html = this.fixCommonBlock(html);
|
113709
|
+
html = this.fixButtons(html);
|
113710
|
+
if (!html) return false;
|
113711
|
+
return html;
|
113712
|
+
}
|
113713
|
+
|
112109
113714
|
fixHtml(html) {
|
112110
113715
|
// Fix overlay structure when "is-overlay" containing background image in the style attribute
|
112111
113716
|
let regex = /<div class="is-overlay"([^>]*)style="([^"]*background-image:[^;"]+;)([^"]*)"([^>]*)>/g;
|
@@ -112319,6 +113924,11 @@ ${currentHtml}`;
|
|
112319
113924
|
|
112320
113925
|
callback(html);
|
112321
113926
|
});
|
113927
|
+
} else if (mode === 'assistant') {
|
113928
|
+
data.answer.choices.forEach(item => {
|
113929
|
+
let answer = item.message.content;
|
113930
|
+
callback(answer);
|
113931
|
+
});
|
112322
113932
|
} else {
|
112323
113933
|
/*
|
112324
113934
|
Handle Unrelated Request
|
@@ -112330,7 +113940,7 @@ ${currentHtml}`;
|
|
112330
113940
|
*/
|
112331
113941
|
if (data.answer.role && data.answer.content) {
|
112332
113942
|
callback(JSON.stringify({
|
112333
|
-
new_section:
|
113943
|
+
new_section: true,
|
112334
113944
|
others: true
|
112335
113945
|
})); // Just create a new section
|
112336
113946
|
|
@@ -112347,17 +113957,19 @@ ${currentHtml}`;
|
|
112347
113957
|
this.dictation.finish(); // Must be called after finished
|
112348
113958
|
// Debug
|
112349
113959
|
|
112350
|
-
if (
|
112351
|
-
|
112352
|
-
|
112353
|
-
|
112354
|
-
|
112355
|
-
|
112356
|
-
|
112357
|
-
|
112358
|
-
|
112359
|
-
|
112360
|
-
|
113960
|
+
if (this.builder.consoleLog) {
|
113961
|
+
if (!(error + '').includes('Failed to fetch')) {
|
113962
|
+
// Only if not CORS error
|
113963
|
+
const response = await fetch(this.builder.sendCommandUrl, {
|
113964
|
+
method: 'POST',
|
113965
|
+
headers: {
|
113966
|
+
'Content-Type': 'application/json'
|
113967
|
+
},
|
113968
|
+
body: JSON.stringify(messages)
|
113969
|
+
});
|
113970
|
+
const data = await response.text();
|
113971
|
+
console.log('Response:\n' + data); // Shows code error
|
113972
|
+
}
|
112361
113973
|
}
|
112362
113974
|
|
112363
113975
|
this.builder.showMessage(out('Service Unavailable.'));
|
@@ -112384,9 +113996,9 @@ ${currentHtml}`;
|
|
112384
113996
|
// // Select
|
112385
113997
|
// if(this.builder.activeSection) this.builder.positionTool(newSection);
|
112386
113998
|
} //Trigger Change event
|
113999
|
+
// this.builder.settings.onChange();
|
112387
114000
|
|
112388
114001
|
|
112389
|
-
this.builder.settings.onChange();
|
112390
114002
|
this.dictation.finish(); // Must be called after finished
|
112391
114003
|
}
|
112392
114004
|
|
@@ -112503,9 +114115,9 @@ ${currentHtml}`;
|
|
112503
114115
|
this.reSelect(newSection);
|
112504
114116
|
}
|
112505
114117
|
} //Trigger Change event
|
114118
|
+
// this.builder.settings.onChange();
|
112506
114119
|
|
112507
114120
|
|
112508
|
-
this.builder.settings.onChange();
|
112509
114121
|
this.dictation.finish(); // Must be called after finished
|
112510
114122
|
}
|
112511
114123
|
|
@@ -112563,6 +114175,311 @@ ${currentHtml}`;
|
|
112563
114175
|
}
|
112564
114176
|
}
|
112565
114177
|
|
114178
|
+
blockAction(args) {
|
114179
|
+
const activeCol = this.builder.editor.activeCol;
|
114180
|
+
if (!activeCol) return false;
|
114181
|
+
|
114182
|
+
if (args.block_task) {
|
114183
|
+
const val = args.block_task;
|
114184
|
+
|
114185
|
+
if (val === 'move-up' || val === 'move-down' || val === 'duplicate' || val === 'remove') {
|
114186
|
+
this.builder.editor.saveForUndo();
|
114187
|
+
const grid = this.builder.editor._rowTool.grid;
|
114188
|
+
if (val === 'move-up') grid.moveRowUp();
|
114189
|
+
if (val === 'move-down') grid.moveRowDown();
|
114190
|
+
if (val === 'duplicate') grid.duplicateRow();
|
114191
|
+
|
114192
|
+
if (val === 'remove') {
|
114193
|
+
grid.removeRow();
|
114194
|
+
if (this.builder.activeBox) this.builder.activeBox.click();
|
114195
|
+
}
|
114196
|
+
|
114197
|
+
this.builder.settings.onChange();
|
114198
|
+
this.dictation.finish(); // Must be called after finished
|
114199
|
+
|
114200
|
+
return true;
|
114201
|
+
}
|
114202
|
+
}
|
114203
|
+
|
114204
|
+
if (args.move_column) {
|
114205
|
+
const val = args.move_column;
|
114206
|
+
|
114207
|
+
if (val === 'move-up' || val === 'move-down' || val === 'move-left' || val === 'move-right') {
|
114208
|
+
this.builder.editor.saveForUndo();
|
114209
|
+
const grid = this.builder.editor._rowTool.grid;
|
114210
|
+
if (val === 'move-up') grid.moveColumnUp();
|
114211
|
+
if (val === 'move-down') grid.moveColumnDown();
|
114212
|
+
if (val === 'move-left') grid.moveColumnPrevious();
|
114213
|
+
if (val === 'move-right') grid.moveColumnNext();
|
114214
|
+
this.builder.settings.onChange();
|
114215
|
+
this.dictation.finish(); // Must be called after finished
|
114216
|
+
|
114217
|
+
return true;
|
114218
|
+
}
|
114219
|
+
}
|
114220
|
+
|
114221
|
+
if (args.column_task) {
|
114222
|
+
const val = args.column_task;
|
114223
|
+
|
114224
|
+
if (val === 'duplicate' || val === 'remove') {
|
114225
|
+
this.builder.editor.saveForUndo();
|
114226
|
+
const grid = this.builder.editor._rowTool.grid;
|
114227
|
+
if (val === 'duplicate') grid.duplicateColumn();
|
114228
|
+
|
114229
|
+
if (val === 'remove') {
|
114230
|
+
grid.removeColumn();
|
114231
|
+
if (this.builder.activeBox) this.builder.activeBox.click();
|
114232
|
+
}
|
114233
|
+
|
114234
|
+
this.builder.settings.onChange();
|
114235
|
+
this.dictation.finish(); // Must be called after finished
|
114236
|
+
|
114237
|
+
return true;
|
114238
|
+
}
|
114239
|
+
}
|
114240
|
+
|
114241
|
+
if (args.increase_decrease_column) {
|
114242
|
+
const val = args.increase_decrease_column;
|
114243
|
+
|
114244
|
+
if (val === 'increase' || val === 'decrease') {
|
114245
|
+
this.builder.editor.saveForUndo();
|
114246
|
+
const grid = this.builder.editor._rowTool.grid;
|
114247
|
+
if (val === 'increase') grid.increaseColumn();
|
114248
|
+
if (val === 'decrease') grid.decreaseColumn();
|
114249
|
+
this.builder.settings.onChange();
|
114250
|
+
this.dictation.finish(); // Must be called after finished
|
114251
|
+
|
114252
|
+
return true;
|
114253
|
+
}
|
114254
|
+
}
|
114255
|
+
|
114256
|
+
return false;
|
114257
|
+
}
|
114258
|
+
|
114259
|
+
moveBlockContent(args) {
|
114260
|
+
const cell = this.builder.editor.activeCol;
|
114261
|
+
if (!cell) return false;
|
114262
|
+
if (!cell || !args) return false;
|
114263
|
+
if (!(args.move_content_left || args.move_content_center || args.move_content_right || args.move_content_top || args.move_content_bottom)) return false;
|
114264
|
+
let moveHorizontal = false;
|
114265
|
+
if (args.move_content_left || args.move_content_right) moveHorizontal = true;
|
114266
|
+
let moveVertical = false;
|
114267
|
+
if (args.move_content_top || args.move_content_bottom) moveVertical = true;
|
114268
|
+
|
114269
|
+
if (args.move_content_top && !moveHorizontal) {
|
114270
|
+
this.builder.editor.lib.moveBlockContent('top');
|
114271
|
+
} else if (args.move_content_bottom && !moveHorizontal) {
|
114272
|
+
this.builder.editor.lib.moveBlockContent('bottom');
|
114273
|
+
} else if (args.move_content_left && !moveVertical) {
|
114274
|
+
this.builder.editor.lib.moveBlockContent('left');
|
114275
|
+
} else if (args.move_content_right && !moveVertical) {
|
114276
|
+
this.builder.editor.lib.moveBlockContent('right');
|
114277
|
+
} else if (args.move_content_top && args.move_content_left) {
|
114278
|
+
this.builder.editor.lib.moveBlockContent('topleft');
|
114279
|
+
} else if (args.move_content_top && args.move_content_center) {
|
114280
|
+
this.builder.editor.lib.moveBlockContent('topcenter');
|
114281
|
+
} else if (args.move_content_top && args.move_content_right) {
|
114282
|
+
this.builder.editor.lib.moveBlockContent('topright');
|
114283
|
+
} else if (args.move_content_bottom && args.move_content_left) {
|
114284
|
+
this.builder.editor.lib.moveBlockContent('bottomleft');
|
114285
|
+
} else if (args.move_content_bottom && args.move_content_center) {
|
114286
|
+
this.builder.editor.lib.moveBlockContent('bottomcenter');
|
114287
|
+
} else if (args.move_content_bottom && args.move_content_right) {
|
114288
|
+
this.builder.editor.lib.moveBlockContent('bottomright');
|
114289
|
+
} else if (args.move_content_center) {
|
114290
|
+
this.builder.editor.lib.moveBlockContent('center');
|
114291
|
+
} else {
|
114292
|
+
this.builder.editor.lib.moveBlockContent('center');
|
114293
|
+
}
|
114294
|
+
|
114295
|
+
return true;
|
114296
|
+
}
|
114297
|
+
|
114298
|
+
quickAction(args) {
|
114299
|
+
const activeBox = this.builder.activeBox;
|
114300
|
+
if (!activeBox) return false;
|
114301
|
+
|
114302
|
+
if (args.section_task) {
|
114303
|
+
const val = args.section_task;
|
114304
|
+
|
114305
|
+
if (val === 'move-up' || val === 'move-top' || val === 'move-down' || val === 'move-bottom' || val === 'duplicate' || val === 'remove') {
|
114306
|
+
this.builder.editor.saveForUndo();
|
114307
|
+
if (val === 'move-up') this.builder.editsection.sectionUp();
|
114308
|
+
if (val === 'move-top') this.builder.editsection.sectionTop();
|
114309
|
+
if (val === 'move-down') this.builder.editsection.sectionDown();
|
114310
|
+
if (val === 'move-bottom') this.builder.editsection.sectionBottom();
|
114311
|
+
|
114312
|
+
if (val === 'duplicate') {
|
114313
|
+
this.builder.editsection.sectionDuplicate();
|
114314
|
+
setTimeout(() => {
|
114315
|
+
this.builder.refreshAnim();
|
114316
|
+
}, 600);
|
114317
|
+
}
|
114318
|
+
|
114319
|
+
if (val === 'remove') {
|
114320
|
+
const activeSection = this.builder.activeSection;
|
114321
|
+
activeSection.parentNode.removeChild(activeSection);
|
114322
|
+
this.builder.activeSection = null;
|
114323
|
+
this.builder.activeBox = null;
|
114324
|
+
}
|
114325
|
+
|
114326
|
+
this.builder.sectionStack();
|
114327
|
+
this.builder.settings.onChange();
|
114328
|
+
this.dictation.finish(); // Must be called after finished
|
114329
|
+
|
114330
|
+
return true;
|
114331
|
+
}
|
114332
|
+
}
|
114333
|
+
|
114334
|
+
if (args.select_section) {
|
114335
|
+
const activeSection = this.builder.activeSection;
|
114336
|
+
|
114337
|
+
if (activeSection) {
|
114338
|
+
if (args.select_section === 'current') {
|
114339
|
+
this.builder.scrollTo(activeSection, 600); // this.clearSelection();
|
114340
|
+
|
114341
|
+
activeSection.click();
|
114342
|
+
this.reSelect(activeSection);
|
114343
|
+
return true;
|
114344
|
+
} else if (args.select_section === 'next') {
|
114345
|
+
this.builder.scrollTo(activeSection.nextElementSibling, 600); // this.clearSelection();
|
114346
|
+
|
114347
|
+
activeSection.click();
|
114348
|
+
this.reSelect(activeSection.nextElementSibling);
|
114349
|
+
return true;
|
114350
|
+
} else if (args.select_section === 'previous') {
|
114351
|
+
this.builder.scrollTo(activeSection.previousElementSibling, 600); // this.clearSelection();
|
114352
|
+
|
114353
|
+
activeSection.click();
|
114354
|
+
this.reSelect(activeSection.previousElementSibling);
|
114355
|
+
return true;
|
114356
|
+
} else if (args.select_section === 'first') {
|
114357
|
+
const firstSection = this.builder.wrapperEl.querySelector('.is-section');
|
114358
|
+
|
114359
|
+
if (firstSection) {
|
114360
|
+
this.builder.scrollTo(firstSection, 600); // this.clearSelection();
|
114361
|
+
|
114362
|
+
activeSection.click();
|
114363
|
+
this.reSelect(firstSection);
|
114364
|
+
return true;
|
114365
|
+
}
|
114366
|
+
} else if (args.select_section === 'last') {
|
114367
|
+
const lastSection = this.builder.wrapperEl.querySelectorAll('.is-section:last-child');
|
114368
|
+
|
114369
|
+
if (lastSection) {
|
114370
|
+
this.builder.scrollTo(lastSection[0], 600); // this.clearSelection();
|
114371
|
+
|
114372
|
+
activeSection.click();
|
114373
|
+
this.reSelect(lastSection[0]);
|
114374
|
+
return true;
|
114375
|
+
}
|
114376
|
+
}
|
114377
|
+
}
|
114378
|
+
}
|
114379
|
+
|
114380
|
+
if (args.select_block) {
|
114381
|
+
const selectElement = row => {
|
114382
|
+
if (!row) return;
|
114383
|
+
let col, elm;
|
114384
|
+
if (row) col = row.querySelector(':first-child');
|
114385
|
+
if (col) col.click(); // select column
|
114386
|
+
|
114387
|
+
if (col) elm = col.querySelector(':first-child');
|
114388
|
+
if (elm) elm.click(); // select element
|
114389
|
+
};
|
114390
|
+
|
114391
|
+
const selectFirst = () => {
|
114392
|
+
const container = activeBox.querySelector('.is-container');
|
114393
|
+
if (!container) return true;
|
114394
|
+
let row = container.querySelector(':first-child');
|
114395
|
+
selectElement(row);
|
114396
|
+
};
|
114397
|
+
|
114398
|
+
const selectLast = () => {
|
114399
|
+
const container = activeBox.querySelector('.is-container');
|
114400
|
+
if (!container) return true;
|
114401
|
+
let lastRow;
|
114402
|
+
const childElements = container.children;
|
114403
|
+
|
114404
|
+
for (let i = childElements.length - 1; i >= 0; i--) {
|
114405
|
+
const childElement = childElements[i]; // Check if the child element has at least one grandchild element
|
114406
|
+
|
114407
|
+
if (childElement.querySelector(':first-child')) {
|
114408
|
+
// Found a child element with a grandchild
|
114409
|
+
lastRow = childElement;
|
114410
|
+
break; // Exit the loop after finding the last one
|
114411
|
+
}
|
114412
|
+
}
|
114413
|
+
|
114414
|
+
if (lastRow) {
|
114415
|
+
selectElement(lastRow);
|
114416
|
+
}
|
114417
|
+
};
|
114418
|
+
|
114419
|
+
if (args.select_block === 'block') {
|
114420
|
+
let elm = activeBox.querySelector('h1, p, h2, h3');
|
114421
|
+
if (elm) elm.click();else {
|
114422
|
+
elm = activeBox.querySelector('.is-container > div > div');
|
114423
|
+
if (elm) elm.click();
|
114424
|
+
}
|
114425
|
+
return true;
|
114426
|
+
} else if (args.select_block === 'headline' || args.select_block === 'title') {
|
114427
|
+
const elm = activeBox.querySelector('h1,h2,h3');
|
114428
|
+
if (elm) elm.click();
|
114429
|
+
return true;
|
114430
|
+
} else if (args.select_block === 'paragraph') {
|
114431
|
+
const elm = activeBox.querySelector('p');
|
114432
|
+
if (elm) elm.click();
|
114433
|
+
return true;
|
114434
|
+
} else if (args.select_block === 'image') {
|
114435
|
+
const elm = activeBox.querySelector('img');
|
114436
|
+
if (elm) elm.click();
|
114437
|
+
return true;
|
114438
|
+
} else if (args.select_block === 'space') {
|
114439
|
+
const elm = activeBox.querySelector('div.spacer');
|
114440
|
+
if (elm) elm.click();
|
114441
|
+
return true;
|
114442
|
+
} else if (args.select_block === 'button') {
|
114443
|
+
const elm = activeBox.querySelector('a[role="button"]');
|
114444
|
+
if (elm) elm.click();
|
114445
|
+
return true;
|
114446
|
+
} else if (args.select_block === 'next') {
|
114447
|
+
let row = activeBox.querySelector('.row-active');
|
114448
|
+
if (row) row = row.nextElementSibling;
|
114449
|
+
selectElement(row);
|
114450
|
+
return true;
|
114451
|
+
} else if (args.select_block === 'previous') {
|
114452
|
+
let row = activeBox.querySelector('.row-active');
|
114453
|
+
if (row) row = row.previousElementSibling;
|
114454
|
+
selectElement(row);
|
114455
|
+
return true;
|
114456
|
+
} else if (args.select_block === 'first') {
|
114457
|
+
selectFirst();
|
114458
|
+
return true;
|
114459
|
+
} else if (args.select_block === 'last') {
|
114460
|
+
selectLast();
|
114461
|
+
return true;
|
114462
|
+
}
|
114463
|
+
/*else {
|
114464
|
+
let elm = activeBox.querySelector('h1, p, h2, h3');
|
114465
|
+
if(elm) elm.click();
|
114466
|
+
else {
|
114467
|
+
elm = activeBox.querySelector('.is-container > div > div');
|
114468
|
+
if(elm) elm.click();
|
114469
|
+
}
|
114470
|
+
return true;
|
114471
|
+
}*/
|
114472
|
+
|
114473
|
+
}
|
114474
|
+
|
114475
|
+
if (args.unselect_block) {
|
114476
|
+
activeBox.click();
|
114477
|
+
return true;
|
114478
|
+
}
|
114479
|
+
|
114480
|
+
return false;
|
114481
|
+
}
|
114482
|
+
|
112566
114483
|
openMore() {
|
112567
114484
|
const pop = this.popAIMore;
|
112568
114485
|
let btn = this.builder.activeBox.querySelector('.input-box-more');
|
@@ -115191,6 +117108,11 @@ class ContentBox {
|
|
115191
117108
|
showDisclaimer: true,
|
115192
117109
|
enableShortCommands: true,
|
115193
117110
|
speechRecognitionLang: 'en-US',
|
117111
|
+
triggerWords: {
|
117112
|
+
send: ['send', 'okay', 'execute', 'run'],
|
117113
|
+
abort: ['abort', 'cancel'],
|
117114
|
+
clear: ['clear', 'erase']
|
117115
|
+
},
|
115194
117116
|
similarityThreshold: 0.65,
|
115195
117117
|
// for commandList similarity checking
|
115196
117118
|
headlineList: ['We\'re [CompanyName]. Full stack development with a spark of creativity.'],
|
@@ -115199,8 +117121,8 @@ class ContentBox {
|
|
115199
117121
|
slider: ['slide-01.jpg', 'slide-02.jpg'],
|
115200
117122
|
blank_video: 'blank.mp4',
|
115201
117123
|
videos: ['beach1.mp4', 'beach2.mp4'],
|
115202
|
-
youtube_videos: ['https://www.youtube.com/embed/P5yHEKqx86U?rel=0'],
|
115203
|
-
maps: ['https://www.youtube.com/embed/P5yHEKqx86U?rel=0'],
|
117124
|
+
youtube_videos: ['https://www.youtube-nocookie.com/embed/P5yHEKqx86U?rel=0&autoplay=1&color=white'],
|
117125
|
+
maps: ['https://www.youtube-nocookie.com/embed/P5yHEKqx86U?rel=0&autoplay=1&color=white'],
|
115204
117126
|
audios: ['example.mp3'],
|
115205
117127
|
images: {
|
115206
117128
|
square: ['person-01.jpg', 'person-02.jpg', 'person-03.jpg', 'person-04.jpg', 'person-05.jpg', 'person-06.jpg', 'person-08.jpg']
|
@@ -115254,10 +117176,12 @@ class ContentBox {
|
|
115254
117176
|
redesign: ['redesign layout', 'change layout', 'change placement', 'decide placement', 'decide layout'],
|
115255
117177
|
// Others:
|
115256
117178
|
two_boxes: ['2 boxes', 'two boxes'],
|
115257
|
-
select: ['select', 'select first'],
|
115258
|
-
select_next: ['select next', 'select after'],
|
115259
|
-
select_previous: ['select previous', 'select before'],
|
115260
|
-
select_last: ['select last'],
|
117179
|
+
select: ['select', 'select first', 'select first block'],
|
117180
|
+
select_next: ['select next', 'select after', 'select next block', 'select next row'],
|
117181
|
+
select_previous: ['select previous', 'select before', 'select previous block', 'select previous row'],
|
117182
|
+
select_last: ['select last', 'select last block'],
|
117183
|
+
select_block: ['select block'],
|
117184
|
+
unselect_block: ['unselect', 'unselect block'],
|
115261
117185
|
select_headline: ['select headline'],
|
115262
117186
|
select_paragraph: ['select paragraph'],
|
115263
117187
|
select_button: ['select button'],
|
@@ -115370,17 +117294,25 @@ class ContentBox {
|
|
115370
117294
|
commandInfo: {
|
115371
117295
|
general: {
|
115372
117296
|
title: 'General',
|
117297
|
+
description: 'Commands for designing or editing.',
|
115373
117298
|
list: [// 'Create a section containing a short article with ideas for outdoor activities. Divide into subtopics.',
|
115374
|
-
'
|
115375
|
-
|
117299
|
+
'Add a section that highlights our AI-powered web solutions. Include a compelling headline, a paragraph, and two buttons named \'Our Works\' and \'Get in Touch\'. Also, add a background image.', 'Create a section containing an article on ideas for outdoor activities. Include a minimum of 300 words.', 'Can you suggest a captivating headline for us and replace the current one?', 'Add a section showcasing our AI-powered innovations. Craft an attention-grabbing headline, provide explanations, incorporate an image, and add an enticing call-to-action.', // 'Add a new header section for our development studio, which uniquely integrates AI into its solutions. Include a compelling headline, a paragraph, and two buttons named \'Our Works\' and \'Get Started\'. Also, add a background image.',
|
117300
|
+
// `Add a new header section for our web studio. Include a compelling headline, a paragraph, and two buttons named 'Our Works' and 'Get in Touch'.<br>
|
117301
|
+
// Also, add a background image.`,
|
117302
|
+
`Create a section containing a feature list of our wood cabin for rent:<br>
|
115376
117303
|
- Scenic forest view<br>
|
115377
117304
|
- Modern comforts<br>
|
115378
117305
|
- Outdoor escape<br>
|
115379
|
-
Add an icon for each list item
|
115380
|
-
- Hands-on projects and assignments<br>
|
115381
|
-
- Feedback and guidance from experts<br>
|
115382
|
-
Include an image for each feature.
|
115383
|
-
Provide an engaging headline.`,
|
117306
|
+
Add an icon for each list item.`, // `Add a section highlighting the features of our creative arts courses:<br>
|
117307
|
+
// - Hands-on projects and assignments<br>
|
117308
|
+
// - Feedback and guidance from experts<br>
|
117309
|
+
// Include an image for each feature.
|
117310
|
+
// Provide an engaging headline.`,
|
117311
|
+
// 'Create a new section showcasing a photo gallery of our latest photography workshop. Includes up to 3 photo placeholders. Additionally, please add a title.',
|
117312
|
+
`Add a section highlighting the features of our creative arts courses:<br>
|
117313
|
+
- Hands-on projects<br>
|
117314
|
+
- Guidance from experts<br>
|
117315
|
+
Add an image for each feature.`, 'Revise the headline, paragraph, and all the text using alternative ideas.', 'Let\'s redesign the layout. Surprise me with a new idea!', 'Create a new section showcasing a photo gallery of our latest photography workshop. Includes up to 3 photo placeholders.', 'Do you see the button with a gray background? Please change the background color to light green.', 'Underline the phrase \'every monday\' and change the color to dark blue.', 'Summarize this content in 100 words.' // Create a new section that highlights our web studio. It should include an attention-grabbing headline, an engaging paragraph, an image, and a compelling call-to-action button.
|
115384
117316
|
// Add a new section consisting of two boxes. The first box should feature a captivating headline about our Arts courses, an informative paragraph, and a button labeled 'Browse Courses'. The second box should remain empty but have a background image.
|
115385
117317
|
// Create a new section highlighting what sets our web development studio apart. Include a maximum of 3 list items, each with an item title and a short paragraph with less than 20 words. Also, add a numbering.
|
115386
117318
|
// Create a section containing a short article introducing the timeless classic novel 'The Brothers Karamazov' by Fyodor Dostoevsky. Divide into subtopics.
|
@@ -115394,6 +117326,19 @@ Provide an engaging headline.`, 'Create a new section showcasing a photo gallery
|
|
115394
117326
|
] // width: '400px'
|
115395
117327
|
|
115396
117328
|
},
|
117329
|
+
others: {
|
117330
|
+
title: 'Ask Questions or Request Information',
|
117331
|
+
description: 'Commands that are <u>not related to designing and editing of the current content</u>.',
|
117332
|
+
list: ['Provide well-researched information about bookstores in the Melbourne city area that offer collections of classic titles. Include specific details such as locations, website links, the range of classic titles they offer, and any unique features they have.', 'Can you explain the process of baking a classic chocolate cake from scratch?', 'Give me a list of effective home workouts for beginners without any equipment.', // 'Give me ideas for designing a cozy and functional home office space.',
|
117333
|
+
'Provide me with a 10-hour plan for learning practical data science.' // 'Can you explain how to set up a new React project?'
|
117334
|
+
]
|
117335
|
+
},
|
117336
|
+
block: {
|
117337
|
+
title: 'Edit Selected Block',
|
117338
|
+
description: 'Specifically target the selected block for editing, providing more precise results.',
|
117339
|
+
list: ['Enhance the content by including introductory paragraphs after the title.', 'Add a space between the title and the button.', 'Increase the space between the title and the paragraph.', 'Apply a gradient text color from red to orange horizontally to the title.', 'Paraphrase the title.', 'Reduce the title font size.', // 'Align the text to the center.',
|
117340
|
+
'Add a link on the text \'Download\' that directs to: https://example.com/download', 'Add a new block containing a Google map showing local cafes in the Perth city area.']
|
117341
|
+
},
|
115397
117342
|
selection: {
|
115398
117343
|
title: 'Selection & Layout',
|
115399
117344
|
list: ['Select the headline', // 'Select the paragraph',
|
@@ -115669,7 +117614,10 @@ Provide an engaging headline.`, 'Create a new section showcasing a photo gallery
|
|
115669
117614
|
speechTranscribeUrl: this.settings.speechTranscribeUrl,
|
115670
117615
|
autoSendDelay: this.settings.autoSendDelay,
|
115671
117616
|
onlineDemo: this.settings.onlineDemo,
|
117617
|
+
temperature: this.settings.temperature,
|
117618
|
+
topP: this.settings.topP,
|
115672
117619
|
speechRecognitionLang: this.settings.speechRecognitionLang,
|
117620
|
+
triggerWords: this.settings.triggerWords,
|
115673
117621
|
headlineList: this.settings.headlineList,
|
115674
117622
|
commandList: this.settings.commandList,
|
115675
117623
|
enableShortCommands: this.settings.enableShortCommands,
|
@@ -115690,7 +117638,8 @@ Provide an engaging headline.`, 'Create a new section showcasing a photo gallery
|
|
115690
117638
|
let mainCss = this.mainCss();
|
115691
117639
|
localStorage.setItem('preview-maincss', mainCss);
|
115692
117640
|
let sectionCss = this.sectionCss();
|
115693
|
-
localStorage.setItem('preview-sectioncss', sectionCss);
|
117641
|
+
localStorage.setItem('preview-sectioncss', sectionCss);
|
117642
|
+
localStorage.removeItem('_lastscrollpos'); // const btnOpenPreviewWindow = this.sidebar.pageQuickSettings.querySelector('.cmd-open-preview-window');
|
115694
117643
|
// btnOpenPreviewWindow.classList.add('on');
|
115695
117644
|
},
|
115696
117645
|
onPreviewClose: () => {
|
@@ -116576,6 +118525,7 @@ Provide an engaging headline.`, 'Create a new section showcasing a photo gallery
|
|
116576
118525
|
const modalEditSection = this.builderStuff.querySelector('.editsection');
|
116577
118526
|
modalEditSection.style.display = '';
|
116578
118527
|
if (this.settings.onPageContentClick) this.settings.onPageContentClick(e);
|
118528
|
+
this.rePositionTool();
|
116579
118529
|
} else {
|
116580
118530
|
// Outside Wrapper
|
116581
118531
|
if (document.activeElement) if (document.activeElement.tagName.toLowerCase() === 'input') return;
|