@syntrologie/adapt-search 2.8.0-canary.643 → 2.8.0-canary.645

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 +1 @@
1
- {"version":3,"file":"FilterStrip.d.ts","sourceRoot":"","sources":["../src/FilterStrip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAKV,kBAAkB,EAEnB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAa,UAAU,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1E,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAMtD,0FAA0F;AAC1F,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAe5B,qBAAa,kBAAmB,SAAQ,UAAU;;IAChD,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;MAQf;IAEM,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACnC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;;IAkB5B,MAAM,CAAC,MAAM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AC;IACtB,yEAAyE;IACjE,SAAS,EAAE,aAAa,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;;IAuB5B,OAAgB,MAAM,0BA+EpB;IAIF,yFAAyF;IACzF,cAAc,IAAI,OAAO;IAUzB;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,aAAa,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAa1E;;;;OAIG;IACH,IAAI,eAAe,IAAI,MAAM,CAE5B;IAED;;;OAGG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAG7B;IAED,oCAAoC;IACpC,aAAa,IAAI,OAAO;IAgCf,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAYxD,iFAAiF;IACxE,oBAAoB,IAAI,IAAI;IAK5B,OAAO,IAAI,IAAI;IAoFf,MAAM;CAsDhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,iBAAiB,CAAC;KACzC;CACF;AAED,qEAAqE;AACrE,wBAAgB,yBAAyB,IAAI,IAAI,CAMhD;AAyBD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB;qBACb,WAAW,WAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,MAAM,IAAI;CA0FnF,CAAC"}
package/dist/cdn.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runtime
3
- } from "./chunk-7BSCJSUF.js";
3
+ } from "./chunk-LFOALNVY.js";
4
4
  import "./chunk-XQZY6PWC.js";
5
5
 
6
6
  // src/cdn.ts
@@ -4234,6 +4234,17 @@ var stageStyles = css3`
4234
4234
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
4235
4235
  }
4236
4236
 
4237
+ /* A stage turn's line (conversation down): the working line, then the
4238
+ reply, at most two lines, as an agent bubble (its surface and colour,
4239
+ so it reads on any backdrop). */
4240
+ [data-stage-line] {
4241
+ margin: 0 4px;
4242
+ display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
4243
+ overflow: hidden;
4244
+ }
4245
+ [data-stage-line] p { margin: 0; display: inline; }
4246
+ [data-stage-line] a { color: inherit; text-decoration: underline; }
4247
+
4237
4248
  /* The conversation, the strip and the bar. In the thread the conversation
4238
4249
  is the dock's scroll area, so the dock fills the stage; on the overlay
4239
4250
  layout the dock is only the strip and the bar, and the conversation and
@@ -4657,7 +4668,7 @@ function within(node, el) {
4657
4668
  return false;
4658
4669
  }
4659
4670
  var EMPTY_HANDOFF = JSON.stringify([null, [], []]);
4660
- var _turns, _openedToRead, _warnedOrphans, _firstSeen, _revealedTurnId, _dismissed, _drag, _swallowTileClick, _composerWatch, _watchedRoot, _hasComposerSeen, _provider, _pendingQuestion, _pendingBefore, _resize, _width, _handedOff, _ChatStage_instances, lowerForTiles_fn, raiseIfWordsOnly_fn, provideRegistry_fn, applyColumns_fn, pendingText_fn, newestId_fn, deriveTurns_fn, watchComposer_fn, syncComposer_fn, revealNewest_fn, handOffSuggestions_fn, visible_fn, cards_fn, chips_fn, region_fn, composer_fn, _onTranscript, _onBarFocusIn, _onBarFocusOut, _collapseChat, _showChat, raiseChat_fn, _onBarPointer, _onBarKey, recall_fn, _onTileDown, _onTileMove, _onTileUp, _onTileCancel, _onTileDragStart, _onTileClickCapture, springBack_fn, afterSettle_fn, dismiss_fn, neighbourOf_fn, focusAfterDismiss_fn, moreLikeThis_fn, chatTile_fn, renderReply_fn, renderChatTile_fn, renderTileCard_fn, renderRecallChips_fn, renderNavChips_fn, renderTiles_fn, navChipsShown_fn, renderStage_fn, renderAnnouncement_fn;
4671
+ var _turns, _openedToRead, _warnedOrphans, _firstSeen, _revealedTurnId, _dismissed, _drag, _swallowTileClick, _composerWatch, _watchedRoot, _hasComposerSeen, _provider, _pendingQuestion, _pendingBefore, _resize, _width, _handedOff, _ChatStage_instances, lowerForTiles_fn, raiseIfWordsOnly_fn, provideRegistry_fn, applyColumns_fn, pendingText_fn, newestId_fn, deriveTurns_fn, watchComposer_fn, syncComposer_fn, revealNewest_fn, handOffSuggestions_fn, visible_fn, cards_fn, chips_fn, region_fn, composer_fn, _onTranscript, _onBarFocusIn, _onBarFocusOut, _collapseChat, _showChat, raiseChat_fn, _onBarPointer, _onBarKey, recall_fn, _onTileDown, _onTileMove, _onTileUp, _onTileCancel, _onTileDragStart, _onTileClickCapture, springBack_fn, afterSettle_fn, dismiss_fn, neighbourOf_fn, focusAfterDismiss_fn, moreLikeThis_fn, chatTile_fn, renderReply_fn, renderChatTile_fn, renderTileCard_fn, renderRecallChips_fn, renderNavChips_fn, renderTiles_fn, navChipsShown_fn, renderStage_fn, renderStageLine_fn, renderAnnouncement_fn;
4661
4672
  var _ChatStage = class _ChatStage extends LitElement3 {
4662
4673
  constructor() {
4663
4674
  super();
@@ -5022,7 +5033,7 @@ var _ChatStage = class _ChatStage extends LitElement3 {
5022
5033
  @click=${__privateGet(this, _showChat)}
5023
5034
  ><span aria-hidden="true">⌃</span></button>` : nothing2;
5024
5035
  return html3`
5025
- ${overlay && this.shown ? __privateMethod(this, _ChatStage_instances, renderStage_fn).call(this, stageTurns, skeletonsFor, up) : nothing2}
5036
+ ${overlay && this.shown ? __privateMethod(this, _ChatStage_instances, renderStage_fn).call(this, stageTurns, skeletonsFor, up, busy ? newestId : null) : nothing2}
5026
5037
  <div data-announcer data-sr-only aria-live="polite"
5027
5038
  >${__privateMethod(this, _ChatStage_instances, renderAnnouncement_fn).call(this, newest, busy)}</div
5028
5039
  >
@@ -5519,10 +5530,13 @@ navChipsShown_fn = function(turn) {
5519
5530
  * The stage (overlay layout): every turn that has cards, newest first, each
5520
5531
  * under its question (a question-less turn keeps a hidden heading, so a
5521
5532
  * tile's own h3 still sits under an h2). The turn being answered joins it
5522
- * with its skeletons while it has none.
5533
+ * with its skeletons while it has none. While the conversation is down,
5534
+ * each turn's line (`#renderStageLine`) sits between its question and its
5535
+ * tiles, so the shopper sees words, not only skeletons.
5523
5536
  */
5524
- renderStage_fn = function(turns, skeletonsFor, underChat) {
5525
- const shown = [...turns].reverse().filter((t2) => __privateMethod(this, _ChatStage_instances, cards_fn).call(this, t2).length > 0 || skeletonsFor(t2.id) > 0);
5537
+ renderStage_fn = function(turns, skeletonsFor, underChat, workingId) {
5538
+ const shown = [...turns].reverse().filter((t2) => __privateMethod(this, _ChatStage_instances, cards_fn).call(this, t2).length > 0 || skeletonsFor(t2.id) > 0 || // The turn being answered says so even before it has anything to show.
5539
+ !underChat && t2.id === workingId);
5526
5540
  return html3`<section
5527
5541
  data-region="stage"
5528
5542
  part="stage"
@@ -5533,10 +5547,29 @@ renderStage_fn = function(turns, skeletonsFor, underChat) {
5533
5547
  >
5534
5548
  ${repeat(shown, (t2) => t2.id, (t2) => html3`<div data-stage-turn data-turn-id=${t2.id}>
5535
5549
  ${t2.question ? html3`<h2>${t2.question}</h2>` : html3`<h2 data-sr-only>Suggested for you</h2>`}
5550
+ ${underChat ? nothing2 : __privateMethod(this, _ChatStage_instances, renderStageLine_fn).call(this, t2, t2.id === workingId)}
5536
5551
  ${__privateMethod(this, _ChatStage_instances, renderTiles_fn).call(this, t2, skeletonsFor(t2.id), false)}
5537
5552
  </div>`)}
5538
5553
  </section>`;
5539
5554
  };
5555
+ /**
5556
+ * A stage turn's line while the conversation is down: the working line
5557
+ * until the reply starts, then the reply (clamped to two lines; the whole
5558
+ * of it is one tap away in the conversation), or its failure. Up, the
5559
+ * conversation shows these, so the stage does not repeat them.
5560
+ */
5561
+ renderStageLine_fn = function(turn, working) {
5562
+ const reply = turn.reply.trim();
5563
+ if (working && !reply) {
5564
+ return html3`<p data-stage-line data-bubble="agent" data-working>Working on it…</p>`;
5565
+ }
5566
+ if (turn.errorText) {
5567
+ return html3`<p data-stage-line data-bubble="agent">${turn.errorText}</p>`;
5568
+ }
5569
+ if (!reply)
5570
+ return nothing2;
5571
+ return html3`<div data-stage-line data-bubble="agent">${unsafeHTML(renderMarkdown(stripTrailingWhitespace(reply)))}</div>`;
5572
+ };
5540
5573
  /**
5541
5574
  * What the live region says: "Working on it" while the newest question
5542
5575
  * waits, then its reply once it is complete (never per streamed chunk),
@@ -5620,7 +5653,7 @@ function priceText(value, range) {
5620
5653
  if (!currency || value === "" || !Number.isFinite(cap)) return value;
5621
5654
  return formatProductPrice({ min: cap, max: cap, currency })?.price ?? value;
5622
5655
  }
5623
- var _media, _restoreFocus, _focusOnUpdate, _FilterStripElement_instances, isPhone_fn, _onMedia, _onOutside, _focusHost, _focusedBefore, nudgePopover_fn, openPopover_fn, closePopover_fn, returnFocus_fn, openSheet_fn, closeSheet_fn, q_fn, chipOpener_fn, emit_fn, choose_fn, remove_fn, open_reset_fn, applyPrice_fn, onListKey_fn, onKeydown_fn, trap_fn, renderOptions_fn, renderPrice_fn, renderValues_fn, chipText_fn, renderFilter_fn, addableKeys_fn, renderAdd_fn, renderEditor_fn, renderSteps_fn, renderSheet_fn;
5656
+ var _media, _restoreFocus, _focusOnUpdate, _resize2, _markMore, _onStepsWheel, _FilterStripElement_instances, isPhone_fn, _onMedia, _onOutside, _focusHost, _focusedBefore, nudgePopover_fn, openPopover_fn, closePopover_fn, returnFocus_fn, openSheet_fn, closeSheet_fn, q_fn, chipOpener_fn, emit_fn, choose_fn, remove_fn, open_reset_fn, applyPrice_fn, onListKey_fn, onKeydown_fn, trap_fn, renderOptions_fn, renderPrice_fn, renderValues_fn, chipText_fn, renderFilter_fn, addableKeys_fn, renderAdd_fn, renderEditor_fn, renderSteps_fn, renderSheet_fn;
5624
5657
  var FilterStripElement = class extends LitElement4 {
5625
5658
  constructor() {
5626
5659
  super();
@@ -5629,6 +5662,24 @@ var FilterStripElement = class extends LitElement4 {
5629
5662
  /** The control to hand focus back to when the thing it opened closes. */
5630
5663
  __privateAdd(this, _restoreFocus, null);
5631
5664
  __privateAdd(this, _focusOnUpdate, false);
5665
+ __privateAdd(this, _resize2, null);
5666
+ /** Marks the step row `data-more` while a step lies past its right edge. */
5667
+ __privateAdd(this, _markMore, () => {
5668
+ const row = __privateMethod(this, _FilterStripElement_instances, q_fn).call(this, "[data-steps]");
5669
+ if (!row) return;
5670
+ row.toggleAttribute("data-more", row.scrollLeft + row.clientWidth < row.scrollWidth - 1);
5671
+ });
5672
+ /**
5673
+ * A mouse wheel turns the step row sideways: its scrollbar is hidden and a
5674
+ * vertical wheel would otherwise never reach the steps past the edge.
5675
+ */
5676
+ __privateAdd(this, _onStepsWheel, (e3) => {
5677
+ const row = e3.currentTarget;
5678
+ if (row.scrollWidth <= row.clientWidth) return;
5679
+ if (Math.abs(e3.deltaX) >= Math.abs(e3.deltaY)) return;
5680
+ e3.preventDefault();
5681
+ row.scrollLeft += e3.deltaY;
5682
+ });
5632
5683
  __privateAdd(this, _onMedia, () => {
5633
5684
  this._narrow = __privateMethod(this, _FilterStripElement_instances, isPhone_fn).call(this);
5634
5685
  if (!this._narrow) this._sheet = false;
@@ -5656,11 +5707,17 @@ var FilterStripElement = class extends LitElement4 {
5656
5707
  __privateGet(this, _media).addEventListener?.("change", __privateGet(this, _onMedia));
5657
5708
  }
5658
5709
  document.addEventListener("pointerdown", __privateGet(this, _onOutside), true);
5710
+ if (typeof ResizeObserver === "function") {
5711
+ __privateSet(this, _resize2, new ResizeObserver(() => __privateGet(this, _markMore).call(this)));
5712
+ __privateGet(this, _resize2).observe(this);
5713
+ }
5659
5714
  }
5660
5715
  disconnectedCallback() {
5661
5716
  __privateGet(this, _media)?.removeEventListener?.("change", __privateGet(this, _onMedia));
5662
5717
  __privateSet(this, _media, null);
5663
5718
  document.removeEventListener("pointerdown", __privateGet(this, _onOutside), true);
5719
+ __privateGet(this, _resize2)?.disconnect();
5720
+ __privateSet(this, _resize2, null);
5664
5721
  super.disconnectedCallback();
5665
5722
  }
5666
5723
  willUpdate(changed) {
@@ -5679,6 +5736,7 @@ var FilterStripElement = class extends LitElement4 {
5679
5736
  );
5680
5737
  }
5681
5738
  __privateMethod(this, _FilterStripElement_instances, nudgePopover_fn).call(this);
5739
+ __privateGet(this, _markMore).call(this);
5682
5740
  const lost = __privateGet(this, _focusedBefore);
5683
5741
  __privateSet(this, _focusedBefore, null);
5684
5742
  if (lost && !lost.isConnected && !this.shadowRoot?.activeElement) __privateSet(this, _focusHost, true);
@@ -5712,6 +5770,9 @@ var FilterStripElement = class extends LitElement4 {
5712
5770
  _media = new WeakMap();
5713
5771
  _restoreFocus = new WeakMap();
5714
5772
  _focusOnUpdate = new WeakMap();
5773
+ _resize2 = new WeakMap();
5774
+ _markMore = new WeakMap();
5775
+ _onStepsWheel = new WeakMap();
5715
5776
  _FilterStripElement_instances = new WeakSet();
5716
5777
  isPhone_fn = function() {
5717
5778
  if (typeof window.matchMedia === "function") return window.matchMedia(PHONE_QUERY).matches;
@@ -5981,7 +6042,13 @@ renderEditor_fn = function() {
5981
6042
  renderSteps_fn = function(steps) {
5982
6043
  const navChips = steps.navChips.filter((t2) => isSafeProductHref(t2.props?.url));
5983
6044
  if (!steps.suggestions.length && !navChips.length) return nothing3;
5984
- return html4`<div data-steps role="group" aria-label="Suggested next steps">
6045
+ return html4`<div
6046
+ data-steps
6047
+ role="group"
6048
+ aria-label="Suggested next steps"
6049
+ @wheel=${__privateGet(this, _onStepsWheel)}
6050
+ @scroll=${__privateGet(this, _markMore)}
6051
+ >
5985
6052
  ${steps.suggestions.map(
5986
6053
  (text2) => html4`<button
5987
6054
  type="button"
@@ -5994,7 +6061,7 @@ renderSteps_fn = function(steps) {
5994
6061
  composed: true
5995
6062
  })
5996
6063
  )}
5997
- >${text2}</button>`
6064
+ ><span>${text2}</span></button>`
5998
6065
  )}
5999
6066
  ${navChips.map((t2) => {
6000
6067
  const url = String(t2.props?.url);
@@ -6048,6 +6115,29 @@ FilterStripElement.styles = css4`
6048
6115
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
6049
6116
  position: relative;
6050
6117
  }
6118
+ /* Next steps are one row above the bar, however many: the ones that do
6119
+ not fit scroll sideways. No popover opens from them, so the scroller
6120
+ clips nothing. */
6121
+ [data-steps] {
6122
+ flex-wrap: nowrap;
6123
+ overflow-x: auto; overscroll-behavior-x: contain;
6124
+ scrollbar-width: none;
6125
+ /* Room for the focus ring inside the scroller. */
6126
+ padding: 3px 3px; margin: -3px -3px;
6127
+ }
6128
+ [data-steps]::-webkit-scrollbar { display: none; }
6129
+ /* One step is never wider than the row (a long one on a phone): it ends
6130
+ in an ellipsis; its whole text is still its accessible name. */
6131
+ [data-steps] > button {
6132
+ flex: 0 0 auto; max-width: 100%;
6133
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
6134
+ }
6135
+ [data-steps] > button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
6136
+ /* More past the edge: the row fades out there, so the shopper knows. */
6137
+ [data-steps][data-more] {
6138
+ -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
6139
+ mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
6140
+ }
6051
6141
  .chip-group {
6052
6142
  display: inline-flex; align-items: stretch;
6053
6143
  border: 1px solid var(--sc-color-primary, currentColor);
@@ -6548,10 +6638,13 @@ SearchChatElement.styles = css5`
6548
6638
  outline-offset: 2px;
6549
6639
  }
6550
6640
  syntro-chat-stage { flex: 1 1 auto; min-height: 0; }
6641
+ /* One row above the bar: the strip takes what is left and scrolls its
6642
+ next steps; "See store results" keeps its place at the end. */
6551
6643
  [data-strip-row] {
6552
- display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
6644
+ display: flex; flex-wrap: nowrap; align-items: center; gap: 8px;
6553
6645
  }
6554
6646
  [data-strip-row] syntro-filter-strip { flex: 0 1 auto; min-width: 0; }
6647
+ [data-strip-row] [data-see-store-results] { flex: 0 0 auto; white-space: nowrap; }
6555
6648
  @media (forced-colors: active) {
6556
6649
  [data-close], [data-see-store-results] { border: 1px solid CanvasText; }
6557
6650
  }
@@ -7619,4 +7712,4 @@ export {
7619
7712
  dompurify/dist/purify.es.mjs:
7620
7713
  (*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE *)
7621
7714
  */
7622
- //# sourceMappingURL=chunk-7BSCJSUF.js.map
7715
+ //# sourceMappingURL=chunk-LFOALNVY.js.map