@appcues/web-sdk 7.5.1 → 7.7.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.
Files changed (17) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/LICENSE.md +1 -0
  3. package/README.md +4 -1
  4. package/build/{index.WPRReltU.js → index.BinR9cxK.js} +1 -1
  5. package/build/{index.DjALzQIQ.js → index.DFg8ECyO.js} +10 -10
  6. package/build/{index.npm.DZl5bvxr.js → index.npm.YjV8XHqR.js} +1 -1
  7. package/build/index.npm.js +1 -1
  8. package/build/{open-builder.CsZ0R4-M.js → open-builder.CBnR8jWD.js} +29 -14
  9. package/package.json +4 -2
  10. /package/build/{checklist.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css → checklist.76c21c6d771fd87653c0857b9e3a27556fd516e7.css} +0 -0
  11. /package/build/{container.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css → container.76c21c6d771fd87653c0857b9e3a27556fd516e7.css} +0 -0
  12. /package/build/{debugger.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css → debugger.76c21c6d771fd87653c0857b9e3a27556fd516e7.css} +0 -0
  13. /package/build/{modal-step-legacy-render.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css → modal-step-legacy-render.76c21c6d771fd87653c0857b9e3a27556fd516e7.css} +0 -0
  14. /package/build/{modal.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css → modal.76c21c6d771fd87653c0857b9e3a27556fd516e7.css} +0 -0
  15. /package/build/{satisfaction-survey.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css → satisfaction-survey.76c21c6d771fd87653c0857b9e3a27556fd516e7.css} +0 -0
  16. /package/build/{test-mode.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css → test-mode.76c21c6d771fd87653c0857b9e3a27556fd516e7.css} +0 -0
  17. /package/build/{tooltip.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css → tooltip.76c21c6d771fd87653c0857b9e3a27556fd516e7.css} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @appcues/web-sdk
2
2
 
3
+ ## 7.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 6096f2a: Add support for backdrop styling options in dialogs and fixes alignment issue on floating elements that could cause position to not be exact on screen axis (X or Y)
8
+
3
9
  ## 7.5.1
4
10
 
5
11
  ### Patch Changes
package/LICENSE.md ADDED
@@ -0,0 +1 @@
1
+ The software is governed by the Appcues License Terms of service available at https://www.appcues.com/terms (including any successor site).
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Appcues JavaScript SDK
2
2
 
3
+ > **ℹ️**
4
+ > The Appcues JavaScript SDK is currently in **beta testing** when installed via npm. We recommend evaluating carefully and providing feedback as you integrate. Please refer to our [official documentation](https://docs.appcues.com/install-appcues-web) for the latest updates, setup instructions, and support resources.
5
+
3
6
  The Appcues JavaScript SDK allows you to integrate Appcues into your web application. Track user events, identify users, and trigger personalized in-app experiences.
4
7
 
5
8
  ## Installation
@@ -53,4 +56,4 @@ Then open the CHANGELOG.md file from the package directory.
53
56
 
54
57
  ## License
55
58
 
56
- See LICENSE file for details.
59
+ See license in LICENSE.md
@@ -1,4 +1,4 @@
1
- import { c as vt, g as gi, o as mi, a as $i, n as fe, b as bi } from "./index.DjALzQIQ.js";
1
+ import { c as vt, g as gi, o as mi, a as $i, n as fe, b as bi } from "./index.DFg8ECyO.js";
2
2
  const gt = window, ie = gt.ShadowRoot && (gt.ShadyCSS === void 0 || gt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, We = Symbol(), ve = /* @__PURE__ */ new WeakMap();
3
3
  let yi = class {
4
4
  constructor(t, e, s) {
@@ -1,4 +1,4 @@
1
- import { C as z, a as Un, A as Tt, M as Sd, b as Td, c as ee, d as Vt, V as ho, e as Cr, f as Ke, g as Ut, B as mt, T as $i, h as Cd, i as _d, j as Id, k as Mo, l as Pn, F as Y, G as $o, m as bl, E as on, n as Ad, D as Bo, o as vd, p as hi, L as De, S as Ms, q as Vo, r as Ae, s as pn, t as Wo, N as Dn, u as wl, v as bd, w as mo, W as wd, x as ni, y as Nd, z as Cn, U as Go, H as kd, I as Od, J as jo, K as sn, O as Eo, P as mi, Q as ri, R as Rd, X as Bi, Y as Nl, Z as Hn, _ as Vi, $ as Rn, a0 as go, a1 as $s, a2 as Ld } from "./index.npm.DZl5bvxr.js";
1
+ import { C as z, a as Un, A as Tt, M as Sd, b as Td, c as ee, d as Vt, V as ho, e as Cr, f as Ke, g as Ut, B as mt, T as $i, h as Cd, i as _d, j as Id, k as Mo, l as Pn, F as Y, G as $o, m as bl, E as on, n as Ad, D as Bo, o as vd, p as hi, L as De, S as Ms, q as Vo, r as Ae, s as pn, t as Wo, N as Dn, u as wl, v as bd, w as mo, W as wd, x as ni, y as Nd, z as Cn, U as Go, H as kd, I as Od, J as jo, K as sn, O as Eo, P as mi, Q as ri, R as Rd, X as Bi, Y as Nl, Z as Hn, _ as Vi, $ as Rn, a0 as go, a1 as $s, a2 as Ld } from "./index.npm.YjV8XHqR.js";
2
2
  var xd = Object.assign || function(e) {
3
3
  for (var t = 1; t < arguments.length; t++) {
4
4
  var n = arguments[t];
@@ -2153,7 +2153,7 @@ function Mt(e) {
2153
2153
  }
2154
2154
  return `https://fast.appcues.com${e}`;
2155
2155
  }
2156
- const Ih = "/generic/main/7.5.1/checklist.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css", Ah = "CIdJsbqZD3OCb40Kncy+q/MzuR2VTtMLi6Unvcp2N9c=", Yi = Mt(Ih), lc = 30, vh = -300, bh = "//cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/";
2156
+ const Ih = "/generic/main/7.7.0/checklist.76c21c6d771fd87653c0857b9e3a27556fd516e7.css", Ah = "CIdJsbqZD3OCb40Kncy+q/MzuR2VTtMLi6Unvcp2N9c=", Yi = Mt(Ih), lc = 30, vh = -300, bh = "//cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/";
2157
2157
  let ar = null, ur = null;
2158
2158
  const wh = (e) => {
2159
2159
  const {
@@ -5984,7 +5984,7 @@ function ms(e, t, n, r) {
5984
5984
  ph(e.defaultView, i), window.setTimeout(i, 200);
5985
5985
  }
5986
5986
  }
5987
- const Ag = "/generic/main/7.5.1/modal.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css", vg = "/generic/main/7.5.1/modal-step-legacy-render.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css", bg = "1ap2xJXPA6+zfau+TTrgl+tyKnVZGWa7bl1nMr+fKvs=", wg = "f+k+n1UzKXzuja/FHkSACvNlJl9YXs1gpc/Z01OXj48=", Ng = Mt(vg), Gr = Mt(Ag), Vc = /* @__PURE__ */ new Set(["shorty", "slideout"]);
5987
+ const Ag = "/generic/main/7.7.0/modal.76c21c6d771fd87653c0857b9e3a27556fd516e7.css", vg = "/generic/main/7.7.0/modal-step-legacy-render.76c21c6d771fd87653c0857b9e3a27556fd516e7.css", bg = "1ap2xJXPA6+zfau+TTrgl+tyKnVZGWa7bl1nMr+fKvs=", wg = "f+k+n1UzKXzuja/FHkSACvNlJl9YXs1gpc/Z01OXj48=", Ng = Mt(vg), Gr = Mt(Ag), Vc = /* @__PURE__ */ new Set(["shorty", "slideout"]);
5988
5988
  function Wc(e) {
5989
5989
  if (!e) return;
5990
5990
  const { style: t } = e, n = t.transform;
@@ -6256,7 +6256,7 @@ function Lg({ patternType: e, hidden: t }) {
6256
6256
  }
6257
6257
  );
6258
6258
  }
6259
- const xg = "/generic/main/7.5.1/tooltip.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css", Pg = "igg3p8Bk45sB0Q7EEhfzxPQN6dMtsQ/8P1+LBIDEddE=", jr = Mt(xg), jc = "//twemoji.maxcdn.com/2/svg/", Dg = "//cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/", Sr = "hs", qc = "pattern-title", Kc = "Hide these tips";
6259
+ const xg = "/generic/main/7.7.0/tooltip.76c21c6d771fd87653c0857b9e3a27556fd516e7.css", Pg = "igg3p8Bk45sB0Q7EEhfzxPQN6dMtsQ/8P1+LBIDEddE=", jr = Mt(xg), jc = "//twemoji.maxcdn.com/2/svg/", Dg = "//cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/", Sr = "hs", qc = "pattern-title", Kc = "Hide these tips";
6260
6260
  function Fg(e, t) {
6261
6261
  return {
6262
6262
  skippable: e.skippable,
@@ -7561,7 +7561,7 @@ function cy(e) {
7561
7561
  )
7562
7562
  )));
7563
7563
  }
7564
- const ly = "/generic/main/7.5.1/satisfaction-survey.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css", ay = "LCTGoWhoNncfzk7b8jDhPPF8b0PTs04uNa7LjCILym4=", io = Mt(ly);
7564
+ const ly = "/generic/main/7.7.0/satisfaction-survey.76c21c6d771fd87653c0857b9e3a27556fd516e7.css", ay = "LCTGoWhoNncfzk7b8jDhPPF8b0PTs04uNa7LjCILym4=", io = Mt(ly);
7565
7565
  let el, qr;
7566
7566
  function uy(e) {
7567
7567
  const t = ye(e), n = wr(e), r = Ve(e), i = tt(e), o = st(e), s = Gt(e, o), c = i[s], l = t.attributes.pattern_type, { position: u } = t.attributes, d = e.views.callbacks[z.SATISFACTION_SURVEY], f = n.cssLoaded, p = Ni(e.settings), y = r !== ee.SHOWING;
@@ -12869,7 +12869,7 @@ function Cl({ user: e }) {
12869
12869
  };
12870
12870
  return /* @__PURE__ */ a.html("table", null, /* @__PURE__ */ a.html("thead", null, /* @__PURE__ */ a.html("tr", null, /* @__PURE__ */ a.html("th", null, "Property"), /* @__PURE__ */ a.html("th", null, "Value"))), /* @__PURE__ */ a.html("tbody", null, n.sort(r).map((i) => /* @__PURE__ */ a.html("tr", null, /* @__PURE__ */ a.html("td", null, i.name), /* @__PURE__ */ a.html("td", null, JSON.stringify(i.value))))));
12871
12871
  }
12872
- const a_ = "/generic/main/7.5.1/debugger.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css", u_ = "ahFr2ozGgr3TQI5KHlN9wZPypwaSYoQUyVsCyMv8vgg=", d_ = Mt(a_), uo = Xn(
12872
+ const a_ = "/generic/main/7.7.0/debugger.76c21c6d771fd87653c0857b9e3a27556fd516e7.css", u_ = "ahFr2ozGgr3TQI5KHlN9wZPypwaSYoQUyVsCyMv8vgg=", d_ = Mt(a_), uo = Xn(
12873
12873
  [
12874
12874
  er,
12875
12875
  Zn,
@@ -12973,7 +12973,7 @@ const m_ = "https://docs.appcues.com/user-experiences-faq/faq-test-mode", E_ = (
12973
12973
  },
12974
12974
  "Restart"
12975
12975
  ), /* @__PURE__ */ a.html("div", { "class-clickable": !0, "on-click": t.onCancelClicked }, "End Test"))));
12976
- }, g_ = "/generic/main/7.5.1/test-mode.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css", y_ = "royxrv5ISPWNXk8sIb8ykOuJZkg3+vchIFFlvBuV/2Y=", S_ = Mt(g_), fo = Xn(
12976
+ }, g_ = "/generic/main/7.7.0/test-mode.76c21c6d771fd87653c0857b9e3a27556fd516e7.css", y_ = "royxrv5ISPWNXk8sIb8ykOuJZkg3+vchIFFlvBuV/2Y=", S_ = Mt(g_), fo = Xn(
12977
12977
  [
12978
12978
  er,
12979
12979
  Zn,
@@ -14071,7 +14071,7 @@ const RI = "v2", LI = (e) => {
14071
14071
  return window.createAppcues(t);
14072
14072
  }, xI = async () => {
14073
14073
  {
14074
- const e = await import("./open-builder.CsZ0R4-M.js");
14074
+ const e = await import("./open-builder.CBnR8jWD.js");
14075
14075
  window.createAppcues = e.default;
14076
14076
  }
14077
14077
  return LI;
@@ -14115,7 +14115,7 @@ function* DI({ payload: e }) {
14115
14115
  if (n.some(
14116
14116
  (i) => i.type === "launchpad"
14117
14117
  )) {
14118
- yield import("./index.WPRReltU.js");
14118
+ yield import("./index.BinR9cxK.js");
14119
14119
  const i = yield v(ye);
14120
14120
  if (!(i?.type === z.HOTSPOTS) && i) {
14121
14121
  const { experiences: s, launchpads: c } = Ps(n);
@@ -14318,7 +14318,7 @@ function* JI() {
14318
14318
  )
14319
14319
  ];
14320
14320
  }
14321
- const QI = "/generic/main/7.5.1/container.c59bdb8d4afa48850a5a865e5fa00fb2f06b3f4b.css", ZI = "oAzWkIGu2eINiA7AHWZtghnvS5DuvILEICBpL1HdPkY=";
14321
+ const QI = "/generic/main/7.7.0/container.76c21c6d771fd87653c0857b9e3a27556fd516e7.css", ZI = "oAzWkIGu2eINiA7AHWZtghnvS5DuvILEICBpL1HdPkY=";
14322
14322
  window.performance && window.performance.mark && window.performance.mark("apc-init");
14323
14323
  qS();
14324
14324
  const bt = window.AppcuesBundleSettings;
@@ -214,7 +214,7 @@ function O(t, s) {
214
214
  };
215
215
  }
216
216
  async function u() {
217
- await import("./index.DjALzQIQ.js").then((t) => t.i), E = !0;
217
+ await import("./index.DFg8ECyO.js").then((t) => t.i), E = !0;
218
218
  }
219
219
  async function d() {
220
220
  window.Appcues.forEach((t) => {
@@ -1,4 +1,4 @@
1
- import { a4 as s, a3 as t } from "./index.npm.DZl5bvxr.js";
1
+ import { a4 as s, a3 as t } from "./index.npm.YjV8XHqR.js";
2
2
  export {
3
3
  s as default,
4
4
  t as setup
@@ -8881,21 +8881,33 @@ function Wp(t, e, n, r) {
8881
8881
  };
8882
8882
  }
8883
8883
  }
8884
- function Xp(t, e, n) {
8885
- const r = rs[n] || "px";
8884
+ function Xp(t, e, n, r) {
8885
+ const i = rs[n] || "px";
8886
8886
  switch (t) {
8887
8887
  case "top":
8888
- return { top: 0, transform: `translateY(${e}${r})` };
8888
+ return {
8889
+ top: 0,
8890
+ transform: `translateY(${e}${i})`,
8891
+ ...r && {
8892
+ bottom: "unset"
8893
+ }
8894
+ };
8889
8895
  case "center":
8890
8896
  return {
8891
8897
  top: "50%",
8892
- transform: `translateY(calc(-50% + ${e}${r}))`
8898
+ transform: `translateY(calc(-50% + ${e}${i}))`,
8899
+ ...r && {
8900
+ bottom: "unset"
8901
+ }
8893
8902
  };
8894
8903
  case "bottom":
8895
8904
  default:
8896
8905
  return {
8897
8906
  bottom: 0,
8898
- transform: `translateY(-${e}${r})`
8907
+ transform: `translateY(-${e}${i})`,
8908
+ ...r && {
8909
+ top: "unset"
8910
+ }
8899
8911
  };
8900
8912
  }
8901
8913
  }
@@ -8921,7 +8933,8 @@ const Qp = "@appcues/floating", th = ({ addHook: t }) => {
8921
8933
  Xp(
8922
8934
  h,
8923
8935
  s,
8924
- y
8936
+ y,
8937
+ l
8925
8938
  )
8926
8939
  ].reduce((m, b) => {
8927
8940
  const { transform: E, ...v } = b;
@@ -9058,16 +9071,18 @@ const bh = "@appcues/sequential", Eh = ({ addHook: t, registerAction: e }) => {
9058
9071
  wt(bh, Eh);
9059
9072
  const xh = "@appcues/dialog", wh = `
9060
9073
  dialog { all: unset; }
9061
- ::backdrop { all: unset; }
9062
- dialog:-internal-dialog-in-top-layer { all: unset; }
9074
+ ::backdrop { backdrop-filter: var(--backdrop-blur); background-color: var(--backdrop-color); }
9075
+ :-internal-dialog-in-top-layer { all: unset; }
9063
9076
  `, Sh = ({ addHook: t }, e) => {
9064
- const { backdrop: n } = e, r = document.createElement("style");
9065
- r.textContent = wh;
9066
- let i;
9067
- t("step.postrender", ({ querySelector: o }) => {
9068
- [i] = o("dialog") ?? [], i && (i.prepend(r), n ? i.showModal() : i.show());
9077
+ const { backdrop: n, variables: r = {} } = e, i = document.createElement("style");
9078
+ i.textContent = wh;
9079
+ let o;
9080
+ t("step.begin", ({ updateRootStyle: a }) => {
9081
+ a(r, { forceUpdate: !0 });
9082
+ }), t("step.postrender", ({ querySelector: a }) => {
9083
+ [o] = a("dialog") ?? [], o && (o.prepend(i), n ? o.showModal() : o.show());
9069
9084
  }), t("step.end", () => {
9070
- i?.close();
9085
+ o?.close(), i.remove();
9071
9086
  });
9072
9087
  };
9073
9088
  wt(xh, Sh);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcues/web-sdk",
3
- "version": "7.5.1",
3
+ "version": "7.7.0",
4
4
  "description": "The Appcues Javascript SDK",
5
5
  "main": "build/index.npm.js",
6
6
  "types": "build/index.npm.d.ts",
@@ -10,8 +10,10 @@
10
10
  },
11
11
  "files": [
12
12
  "build/**/**",
13
- "./CHANGELOG.md"
13
+ "./CHANGELOG.md",
14
+ "./LICENSE.md"
14
15
  ],
16
+ "license": "See license in LICENSE.md",
15
17
  "exports": {
16
18
  ".": {
17
19
  "types": "./build/index.npm.d.ts",