@syntrologie/adapt-faq 2.8.0-canary.621 → 2.8.0-canary.623

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/cdn.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  runtime
3
- } from "./chunk-3K343VT3.js";
4
- import "./chunk-72RKX2MI.js";
3
+ } from "./chunk-YXJ4IXAQ.js";
4
+ import "./chunk-DV23USAJ.js";
5
5
  import "./chunk-KRKRB4OL.js";
6
6
  import "./chunk-3WN6VOBL.js";
7
7
 
@@ -4447,7 +4447,48 @@ var TELEMETRY_EVENTS = {
4447
4447
  subject: "tile",
4448
4448
  verb: "dismissed",
4449
4449
  scope: "open",
4450
- props: ["tile_id", "tile_kind", "visible_ms"]
4450
+ props: ["tile_id", "tile_kind", "visible_ms", "turn_id"]
4451
+ }),
4452
+ // A model-mounted live tile the shopper actually saw: once per instance,
4453
+ // after 500 ms at 50% or more visible. `turn_id` is mounted_by.turn_id as
4454
+ // the server sent it; `widget` is the tile's widget id.
4455
+ syntro_tile_seen: entry({
4456
+ subject: "tile",
4457
+ verb: "seen",
4458
+ scope: "open",
4459
+ props: ["tile_id", "turn_id", "widget"]
4460
+ }),
4461
+ // ONCE per tile life, when the life ends: the tile unmounts, or the open
4462
+ // scope ends (concierge close, removal, pagehide). A tile scrolling out of
4463
+ // view does not end its life. `visible_ms` is the total time the tile was at
4464
+ // least 50% in view, unoccluded and shown, summed across every visible
4465
+ // stretch (paused while the tab is hidden); `tapped` says whether the
4466
+ // shopper engaged one of its controls during that life. Sent only for a
4467
+ // tile that was seen. A remount, or the same tile still mounted in the next
4468
+ // open, is a new life with its own hidden; the first hidden per tile_id is
4469
+ // the life in which it was seen.
4470
+ syntro_tile_hidden: entry({
4471
+ subject: "tile",
4472
+ verb: "hidden",
4473
+ scope: "open",
4474
+ props: ["tile_id", "turn_id", "widget", "visible_ms", "tapped"]
4475
+ }),
4476
+ // The first engagement of a control inside the tile in this life (a link,
4477
+ // button, [role=button], input or select; not the tile's own dismiss X, not a
4478
+ // tap or swipe on the card surface, not Enter in an editable field), whether
4479
+ // or not the 500 ms dwell finished. A tile not yet seen reports seen first.
4480
+ syntro_tile_tapped: entry({
4481
+ subject: "tile",
4482
+ verb: "tapped",
4483
+ scope: "open",
4484
+ props: ["tile_id", "turn_id", "widget", "visible_ms"]
4485
+ }),
4486
+ // A product was added to the cart from inside the tile.
4487
+ syntro_tile_cart_added: entry({
4488
+ subject: "tile_cart",
4489
+ verb: "added",
4490
+ scope: "open",
4491
+ props: ["tile_id", "turn_id", "product"]
4451
4492
  }),
4452
4493
  // A tile's own data load finished: the network wait between the concierge
4453
4494
  // mounting a tile and the shopper seeing its content (BUG-1784767817 was a
@@ -4469,15 +4510,24 @@ var TELEMETRY_EVENTS = {
4469
4510
  subject: "chat_message",
4470
4511
  verb: "sent",
4471
4512
  scope: "open",
4472
- props: ["turn", "chars", "via"]
4473
- // via: ChatSendVia
4513
+ props: ["turn", "chars", "via", "turn_id"]
4514
+ // via: ChatSendVia; turn_id: the user message id
4474
4515
  }),
4475
4516
  syntro_chat_reply_received: entry({
4476
4517
  subject: "chat_reply",
4477
4518
  verb: "received",
4478
4519
  scope: "open",
4479
4520
  // mount_tools: the mount_* tool name of every mount this reply fired, in order (two product cards appear twice).
4480
- props: ["turn", "ttft_ms", "total_ms", "mounts", "cards", "mount_tools"]
4521
+ props: [
4522
+ "turn",
4523
+ "ttft_ms",
4524
+ "total_ms",
4525
+ "mounts",
4526
+ "cards",
4527
+ "mount_tools",
4528
+ "turn_id",
4529
+ "first_tile_ms"
4530
+ ]
4481
4531
  }),
4482
4532
  syntro_chat_interrupted: entry({
4483
4533
  subject: "chat",
@@ -4639,6 +4689,19 @@ function dispatchDiveDeeper(detail) {
4639
4689
  window.dispatchEvent(new CustomEvent(DIVE_DEEPER_EVENT, { detail }));
4640
4690
  }
4641
4691
 
4692
+ // ../../sdk-contracts/dist/bus-telemetry.js
4693
+ function callOnBus(method, events, name, props) {
4694
+ try {
4695
+ if (typeof events?.[method] === "function")
4696
+ events[method](name, props);
4697
+ } catch (error) {
4698
+ console.warn(`[syntro] could not ${method} "${name}"`, error);
4699
+ }
4700
+ }
4701
+ function emitOnBus(events, name, props) {
4702
+ callOnBus("emit", events, name, props);
4703
+ }
4704
+
4642
4705
  export {
4643
4706
  resolveColorScheme,
4644
4707
  dispatchDiveDeeper,
@@ -4648,7 +4711,8 @@ export {
4648
4711
  AuthoringFieldsZ,
4649
4712
  DecisionStrategyZ,
4650
4713
  TriggerWhenZ,
4651
- NotifyZ
4714
+ NotifyZ,
4715
+ emitOnBus
4652
4716
  };
4653
4717
  /*! Bundled license information:
4654
4718
 
@@ -4678,4 +4742,4 @@ export {
4678
4742
  * SPDX-License-Identifier: BSD-3-Clause
4679
4743
  *)
4680
4744
  */
4681
- //# sourceMappingURL=chunk-72RKX2MI.js.map
4745
+ //# sourceMappingURL=chunk-DV23USAJ.js.map