@panphora/clayjs 1.8.0 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clay.standalone.js +1298 -1294
- package/package.json +1 -1
- package/src/plugins/ai-edit.js +4 -6
- package/src/vendor/hyper-morph.vendor.js +4 -4
package/package.json
CHANGED
package/src/plugins/ai-edit.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* The comment box is compose only: a click anywhere outside it closes it, keeping the
|
|
30
30
|
* text as a draft for that target, and Send moves the whole live state to one compact
|
|
31
31
|
* bar at the bottom of the viewport. The bar carries the host's progress and Stop, the
|
|
32
|
-
* reply's warnings and Keep/Revert
|
|
32
|
+
* reply's warnings and Keep/Revert, and then the save, so no part of a running edit
|
|
33
33
|
* depends on a popover the person may want out of the way.
|
|
34
34
|
*
|
|
35
35
|
* Undo integration: observers pause at request start. On Keep the element is rewound
|
|
@@ -587,7 +587,7 @@ function buildChrome() {
|
|
|
587
587
|
barStop = part(bevelButton('Stop', { extra: ['flex:none'] }), 'bar-stop');
|
|
588
588
|
barKeep = part(bevelButton('Keep', { variant: 'primary', extra: ['flex:none'] }), 'bar-keep');
|
|
589
589
|
barRevert = part(bevelButton('Revert', { variant: 'quiet', extra: ['flex:none'] }), 'bar-revert');
|
|
590
|
-
barClose = part(bevelIconButton(GLYPHS.toastClose, { label: '
|
|
590
|
+
barClose = part(bevelIconButton(GLYPHS.toastClose, { label: 'Dismiss error' }), 'bar-close');
|
|
591
591
|
barClose.pin({ flex: 'none' });
|
|
592
592
|
for (const control of [barStop, barKeep, barRevert, barClose]) setShown(control, false, 'inline-flex');
|
|
593
593
|
bar.append(barStatus, barStop, barKeep, barRevert, barClose);
|
|
@@ -612,9 +612,7 @@ function buildChrome() {
|
|
|
612
612
|
barStop.addEventListener('click', stopSession);
|
|
613
613
|
barKeep.addEventListener('click', keepSession);
|
|
614
614
|
barRevert.addEventListener('click', () => { revertSession(); closeBar(); });
|
|
615
|
-
|
|
616
|
-
// edit has been rewound out of the page.
|
|
617
|
-
barClose.addEventListener('click', () => { if (barMode === 'ready') keepSession(); else closeBar(); });
|
|
615
|
+
barClose.addEventListener('click', () => { if (barMode === 'error') closeBar(); });
|
|
618
616
|
textarea.addEventListener('keydown', (event) => {
|
|
619
617
|
if (event.key === 'Enter' && !event.shiftKey) {
|
|
620
618
|
event.preventDefault();
|
|
@@ -812,7 +810,7 @@ function showBar(mode) {
|
|
|
812
810
|
barMode = mode;
|
|
813
811
|
const controls = {
|
|
814
812
|
working: [barStop],
|
|
815
|
-
ready: [barKeep, barRevert
|
|
813
|
+
ready: [barKeep, barRevert],
|
|
816
814
|
error: [barClose],
|
|
817
815
|
saving: [],
|
|
818
816
|
}[mode] || [];
|