@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/chunk-5X2WFSIL.js +2 -0
- package/dist/chunk-5X2WFSIL.js.map +7 -0
- package/dist/{deeplink-IBFUWANV.js → deeplink-KCGMGNIR.js} +81 -5
- package/dist/deeplink-KCGMGNIR.js.map +1 -0
- package/dist/{deeplink-QW3VRPOY.js → deeplink-X7IQDBCR.js} +82 -7
- package/dist/deeplink-X7IQDBCR.js.map +1 -0
- package/dist/embed.js +1 -1
- package/dist/embed.js.map +3 -3
- package/dist/index.cjs +87 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +121 -11
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +14 -1
- package/dist/react.d.ts +14 -1
- package/dist/react.js +41 -7
- package/dist/react.js.map +1 -1
- package/examples/embed-demo/src/App.tsx +2 -2
- package/package.json +1 -1
- package/dist/chunk-QVNE5FQV.js +0 -2
- package/dist/chunk-QVNE5FQV.js.map +0 -7
- package/dist/deeplink-IBFUWANV.js.map +0 -1
- package/dist/deeplink-QW3VRPOY.js.map +0 -1
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
|
-
*
|
|
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
|
-
*
|
|
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.
|
|
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
|
-
|
|
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(
|
|
418
|
-
|
|
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
|
}
|