@wcstack/fetch 4.7.0 → 4.9.0

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/index.d.ts CHANGED
@@ -344,8 +344,10 @@ declare class Fetch extends HTMLElement {
344
344
  /**
345
345
  * A `trigger` written while `url` is empty does nothing (timing-and-firing-contract §1.5),
346
346
  * and said nothing: a `trigger` before `url` in one `data-wcs` (bindings apply in the
347
- * order written), a url that state has not computed yet. Said once per element
348
- * (docs/v4-direction-2026-10.md §5.1, the I/O command policy).
347
+ * order written), a url that state has not computed yet. Said once per outage
348
+ * (docs/v4-direction-2026-10.md §5.1, the I/O command policy): a request starting resets it.
349
+ * Once per element was once per page life — a route puts the same element back on every
350
+ * entry, so the next outage went unsaid (docs/seam-apps.md, shift-desk).
349
351
  */
350
352
  private _warnTriggerWithoutUrl;
351
353
  /**
package/dist/index.esm.js CHANGED
@@ -1479,8 +1479,10 @@ class Fetch extends HTMLElement {
1479
1479
  /**
1480
1480
  * A `trigger` written while `url` is empty does nothing (timing-and-firing-contract §1.5),
1481
1481
  * and said nothing: a `trigger` before `url` in one `data-wcs` (bindings apply in the
1482
- * order written), a url that state has not computed yet. Said once per element
1483
- * (docs/v4-direction-2026-10.md §5.1, the I/O command policy).
1482
+ * order written), a url that state has not computed yet. Said once per outage
1483
+ * (docs/v4-direction-2026-10.md §5.1, the I/O command policy): a request starting resets it.
1484
+ * Once per element was once per page life — a route puts the same element back on every
1485
+ * entry, so the next outage went unsaid (docs/seam-apps.md, shift-desk).
1484
1486
  */
1485
1487
  _warnTriggerWithoutUrl() {
1486
1488
  if (this._toldTriggerWithoutUrl)
@@ -1488,7 +1490,7 @@ class Fetch extends HTMLElement {
1488
1490
  this._toldTriggerWithoutUrl = true;
1489
1491
  console.warn("[@wcstack/fetch] [wcs/command-not-ready] trigger was refused: there is no url, so nothing is fetched. " +
1490
1492
  "Write url before trigger (bindings apply in the order written), and write trigger again once there is one. " +
1491
- "(Said once per element.)", this);
1493
+ "(Said once until a request is sent again.)", this);
1492
1494
  }
1493
1495
  /**
1494
1496
  * A `<wcs-fetch-header>` / `<wcs-fetch-body>` whose definition never loaded is a plain element, and its
@@ -1519,6 +1521,9 @@ class Fetch extends HTMLElement {
1519
1521
  // included) updates it so a later auto-write of the same url is treated as a
1520
1522
  // no-op rather than a duplicate request.
1521
1523
  this._lastFetchedUrl = this.url;
1524
+ // ready again (a request starts): a trigger refused in the next outage is said again
1525
+ if (this.url)
1526
+ this._toldTriggerWithoutUrl = false;
1522
1527
  const headers = this._collectHeaders();
1523
1528
  // Snapshot and reset `body` synchronously, before any await. The body is a
1524
1529
  // one-shot input; resetting it after the await (when another caller may have