@panphora/clayjs 1.8.0 → 1.8.1

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.
@@ -1,4 +1,4 @@
1
- /* clayjs 1.8.0 standalone build: every clayjs module in one file. https://clayjs.com/offline
1
+ /* clayjs 1.8.1 standalone build: every clayjs module in one file. https://clayjs.com/offline
2
2
  Third-party code inside keeps its own license (Sortable MIT, Squire MIT, DOMPurify Apache-2.0 OR MPL-2.0, MicroModal MIT, parse5 MIT): https://clayjs.com/THIRD-PARTY-NOTICES.md */
3
3
  (() => {
4
4
  var __create = Object.create;
@@ -29913,7 +29913,7 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
29913
29913
  barStop = part(bevelButton("Stop", { extra: ["flex:none"] }), "bar-stop");
29914
29914
  barKeep = part(bevelButton("Keep", { variant: "primary", extra: ["flex:none"] }), "bar-keep");
29915
29915
  barRevert = part(bevelButton("Revert", { variant: "quiet", extra: ["flex:none"] }), "bar-revert");
29916
- barClose = part(bevelIconButton(GLYPHS.toastClose, { label: "Keep and close" }), "bar-close");
29916
+ barClose = part(bevelIconButton(GLYPHS.toastClose, { label: "Dismiss error" }), "bar-close");
29917
29917
  barClose.pin({ flex: "none" });
29918
29918
  for (const control of [barStop, barKeep, barRevert, barClose]) setShown(control, false, "inline-flex");
29919
29919
  bar.append(barStatus, barStop, barKeep, barRevert, barClose);
@@ -29938,8 +29938,7 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
29938
29938
  closeBar();
29939
29939
  });
29940
29940
  barClose.addEventListener("click", () => {
29941
- if (barMode === "ready") keepSession();
29942
- else closeBar();
29941
+ if (barMode === "error") closeBar();
29943
29942
  });
29944
29943
  textarea.addEventListener("keydown", (event) => {
29945
29944
  if (event.key === "Enter" && !event.shiftKey) {
@@ -30112,7 +30111,7 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
30112
30111
  barMode = mode2;
30113
30112
  const controls = {
30114
30113
  working: [barStop],
30115
- ready: [barKeep, barRevert, barClose],
30114
+ ready: [barKeep, barRevert],
30116
30115
  error: [barClose],
30117
30116
  saving: []
30118
30117
  }[mode2] || [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panphora/clayjs",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "type": "module",
5
5
  "description": "clayjs: malleable HTML files. Save lifecycle for self-saving HTML.",
6
6
  "license": "MIT-0",
@@ -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/X, and then the save, so no part of a running edit
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: 'Keep and close' }), 'bar-close');
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
- // X means Keep while the edit waits to be decided, and only closes the bar once the
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, barClose],
813
+ ready: [barKeep, barRevert],
816
814
  error: [barClose],
817
815
  saving: [],
818
816
  }[mode] || [];