@matterfact/embed 0.17.0 → 0.18.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.cts CHANGED
@@ -694,7 +694,10 @@ interface LoaderConfig {
694
694
  * and this loader watches the host URL for a match so a visitor landing on one opens
695
695
  * that conversation. Exactly one `{share_token}`, as a whole path segment or whole
696
696
  * query value, e.g. `https://portal.acme.com/assistant?mf_share={share_token}`.
697
- * Absent no watch is installed and the widget keeps its own share route.
697
+ * `{path}` directly after the origin makes it dynamic links carry the page the
698
+ * sharer is on and pickup fires on any page (token must be a query value; the
699
+ * current pathname then reaches the widget). Absent ⇒ no watch is installed and
700
+ * the widget keeps its own share route.
698
701
  */
699
702
  shareDeeplinkFormat?: string;
700
703
  }
package/dist/index.d.ts CHANGED
@@ -694,7 +694,10 @@ interface LoaderConfig {
694
694
  * and this loader watches the host URL for a match so a visitor landing on one opens
695
695
  * that conversation. Exactly one `{share_token}`, as a whole path segment or whole
696
696
  * query value, e.g. `https://portal.acme.com/assistant?mf_share={share_token}`.
697
- * Absent no watch is installed and the widget keeps its own share route.
697
+ * `{path}` directly after the origin makes it dynamic links carry the page the
698
+ * sharer is on and pickup fires on any page (token must be a query value; the
699
+ * current pathname then reaches the widget). Absent ⇒ no watch is installed and
700
+ * the widget keeps its own share route.
698
701
  */
699
702
  shareDeeplinkFormat?: string;
700
703
  }
package/dist/index.js CHANGED
@@ -222,7 +222,7 @@ function dockBox(g, vw, _vh) {
222
222
 
223
223
  // src/loader.ts
224
224
  var DEFAULT_ORIGIN = "https://app.matterfact.com";
225
- var EMBED_VERSION = "0.17.0";
225
+ var EMBED_VERSION = "0.18.0";
226
226
  function devRequested() {
227
227
  try {
228
228
  if (new URLSearchParams(location.search).get("mfdev") === "1") return true;
@@ -411,12 +411,13 @@ var EmbedHost = class {
411
411
  }
412
412
  const fmt = this.config.shareDeeplinkFormat;
413
413
  if (fmt) {
414
- this.send({ type: "host.deeplinkFormat", format: fmt });
415
- void import('./deeplink-QW3VRPOY.js').then((m) => {
414
+ void import('./deeplink-X7IQDBCR.js').then((m) => {
416
415
  if (this.destroyed) return;
417
- this.deeplinkStop = m.installDeeplinkWatch(fmt, (token) => {
418
- this.send({ type: "host.openShare", token });
419
- });
416
+ this.deeplinkStop = m.installDeeplinkWatch(
417
+ fmt,
418
+ (token) => this.send({ type: "host.openShare", token }),
419
+ (format) => this.send({ type: "host.deeplinkFormat", format })
420
+ );
420
421
  }).catch(() => {
421
422
  });
422
423
  }