@stytch/vanilla-js 6.0.9 → 6.0.10

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 (53) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/{StytchSSRProxy-DjO95TII.js → StytchSSRProxy-BDhupJ0b.js} +19 -23
  3. package/dist/cjs/StytchSSRProxy-BDhupJ0b.js.map +1 -0
  4. package/dist/cjs/b2b/index.cjs +2 -2
  5. package/dist/cjs/b2b/index.headless.cjs +1 -1
  6. package/dist/cjs/index.cjs +2 -2
  7. package/dist/cjs/index.headless.cjs +1 -1
  8. package/dist/cjs/{shadcn-DnwRqCY0.js → shadcn-DbBiekGp.js} +2 -2
  9. package/dist/cjs/{shadcn-DnwRqCY0.js.map → shadcn-DbBiekGp.js.map} +1 -1
  10. package/dist/cjs-dev/{StytchSSRProxy-t6BtsVJa.js → StytchSSRProxy-hF1s3Or9.js} +19 -23
  11. package/dist/cjs-dev/StytchSSRProxy-hF1s3Or9.js.map +1 -0
  12. package/dist/cjs-dev/b2b/index.cjs +2 -2
  13. package/dist/cjs-dev/b2b/index.headless.cjs +1 -1
  14. package/dist/cjs-dev/index.cjs +2 -2
  15. package/dist/cjs-dev/index.headless.cjs +1 -1
  16. package/dist/cjs-dev/{shadcn-C7p3HE31.js → shadcn-Dc0M3w2t.js} +2 -2
  17. package/dist/cjs-dev/{shadcn-C7p3HE31.js.map → shadcn-Dc0M3w2t.js.map} +1 -1
  18. package/dist/esm/node_modules/js-cookie/dist/js.cookie.mjs +17 -21
  19. package/dist/esm/node_modules/js-cookie/dist/js.cookie.mjs.map +1 -1
  20. package/dist/esm/packages/web/src/NetworkClient.mjs +1 -1
  21. package/dist/esm-dev/_virtual/index3.mjs +5 -3
  22. package/dist/esm-dev/_virtual/index3.mjs.map +1 -1
  23. package/dist/esm-dev/_virtual/index4.mjs +3 -5
  24. package/dist/esm-dev/_virtual/index4.mjs.map +1 -1
  25. package/dist/esm-dev/node_modules/js-cookie/dist/js.cookie.mjs +17 -21
  26. package/dist/esm-dev/node_modules/js-cookie/dist/js.cookie.mjs.map +1 -1
  27. package/dist/esm-dev/packages/web/src/NetworkClient.mjs +1 -1
  28. package/dist/esm-dev/packages/web/src/adminPortal/utils/theme.mjs +1 -1
  29. package/dist/esm-dev/packages/web/src/utils/crypto.mjs +1 -1
  30. package/dist/iife/b2b/index.headless.js +1 -1
  31. package/dist/iife/b2b/index.headless.js.map +1 -1
  32. package/dist/iife/b2b/index.js +1 -1
  33. package/dist/iife/b2b/index.js.map +1 -1
  34. package/dist/iife/index.headless.js +1 -1
  35. package/dist/iife/index.headless.js.map +1 -1
  36. package/dist/iife/index.js +1 -1
  37. package/dist/iife/index.js.map +1 -1
  38. package/dist/types/{DFPProtectedAuthProvider-Cg2QSi2l.d.ts → DFPProtectedAuthProvider-DQV4qHPT.d.ts} +1 -1
  39. package/dist/types/{GoogleOneTapClient-iv3nb_kU.d.ts → GoogleOneTapClient-BITSM9oM.d.ts} +1 -1
  40. package/dist/types/{PresentationConfig-CxQiKzO8.d.ts → PresentationConfig-BjjsTM1r.d.ts} +1 -1
  41. package/dist/types/{StytchB2BClient-C-2u87oo.d.ts → StytchB2BClient-DkrU-AQy.d.ts} +2 -2
  42. package/dist/types/{StytchClient-CCLs7DV6.d.ts → StytchClient-CUz_XnTa.d.ts} +2 -2
  43. package/dist/types/adminPortal/index.d.ts +5 -5
  44. package/dist/types/b2b/index.d.ts +9 -9
  45. package/dist/types/b2b/index.headless.d.ts +5 -5
  46. package/dist/types/compat.d.ts +2 -2
  47. package/dist/types/{idpHelpers-CxSGKrN9.d.ts → idpHelpers-DsFYR_P9.d.ts} +1 -1
  48. package/dist/types/index.d.ts +9 -9
  49. package/dist/types/index.headless.d.ts +5 -5
  50. package/dist/types/{themes-MdCoynbd.d.ts → themes-LfxL9FBW.d.ts} +5 -5
  51. package/package.json +1 -1
  52. package/dist/cjs/StytchSSRProxy-DjO95TII.js.map +0 -1
  53. package/dist/cjs-dev/StytchSSRProxy-t6BtsVJa.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @stytch/vanilla-js
2
2
 
3
+ ## 6.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - f18b888: Update bundled js-cookie version.
8
+ Update error code types.
9
+
3
10
  ## 6.0.9
4
11
 
5
12
  ### Patch Changes
@@ -2139,7 +2139,7 @@ class NetworkClient {
2139
2139
  sdk: {
2140
2140
  // eslint-disable-next-line lingui/no-unlocalized-strings
2141
2141
  identifier: 'Stytch.js Javascript SDK',
2142
- version: "@stytch/vanilla-js" + '@' + "6.0.9"
2142
+ version: "@stytch/vanilla-js" + '@' + "6.0.10"
2143
2143
  }
2144
2144
  };
2145
2145
  }
@@ -2249,20 +2249,18 @@ class PKCEManager {
2249
2249
  }
2250
2250
  }
2251
2251
 
2252
- /*! js-cookie v3.0.1 | MIT */
2253
- /* eslint-disable no-var */
2252
+ /*! js-cookie v3.0.8 | MIT */
2254
2253
  function assign (target) {
2255
2254
  for (var i = 1; i < arguments.length; i++) {
2256
2255
  var source = arguments[i];
2257
2256
  for (var key in source) {
2257
+ if (key === '__proto__') continue
2258
2258
  target[key] = source[key];
2259
2259
  }
2260
2260
  }
2261
2261
  return target
2262
2262
  }
2263
- /* eslint-enable no-var */
2264
2263
 
2265
- /* eslint-disable no-var */
2266
2264
  var defaultConverter = {
2267
2265
  read: function (value) {
2268
2266
  if (value[0] === '"') {
@@ -2277,12 +2275,9 @@ var defaultConverter = {
2277
2275
  )
2278
2276
  }
2279
2277
  };
2280
- /* eslint-enable no-var */
2281
2278
 
2282
- /* eslint-disable no-var */
2283
-
2284
- function init (converter, defaultAttributes) {
2285
- function set (key, value, attributes) {
2279
+ function init(converter, defaultAttributes) {
2280
+ function set(name, value, attributes) {
2286
2281
  if (typeof document === 'undefined') {
2287
2282
  return
2288
2283
  }
@@ -2296,7 +2291,7 @@ function init (converter, defaultAttributes) {
2296
2291
  attributes.expires = attributes.expires.toUTCString();
2297
2292
  }
2298
2293
 
2299
- key = encodeURIComponent(key)
2294
+ name = encodeURIComponent(name)
2300
2295
  .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
2301
2296
  .replace(/[()]/g, escape);
2302
2297
 
@@ -2323,11 +2318,11 @@ function init (converter, defaultAttributes) {
2323
2318
  }
2324
2319
 
2325
2320
  return (document.cookie =
2326
- key + '=' + converter.write(value, key) + stringifiedAttributes)
2321
+ name + '=' + converter.write(value, name) + stringifiedAttributes)
2327
2322
  }
2328
2323
 
2329
- function get (key) {
2330
- if (typeof document === 'undefined' || (arguments.length && !key)) {
2324
+ function get(name) {
2325
+ if (typeof document === 'undefined' || (arguments.length && !name)) {
2331
2326
  return
2332
2327
  }
2333
2328
 
@@ -2340,25 +2335,26 @@ function init (converter, defaultAttributes) {
2340
2335
  var value = parts.slice(1).join('=');
2341
2336
 
2342
2337
  try {
2343
- var foundKey = decodeURIComponent(parts[0]);
2344
- jar[foundKey] = converter.read(value, foundKey);
2345
-
2346
- if (key === foundKey) {
2338
+ var found = decodeURIComponent(parts[0]);
2339
+ if (!(found in jar)) jar[found] = converter.read(value, found);
2340
+ if (name === found) {
2347
2341
  break
2348
2342
  }
2349
- } catch (e) {}
2343
+ } catch (_e) {
2344
+ // Do nothing...
2345
+ }
2350
2346
  }
2351
2347
 
2352
- return key ? jar[key] : jar
2348
+ return name ? jar[name] : jar
2353
2349
  }
2354
2350
 
2355
2351
  return Object.create(
2356
2352
  {
2357
2353
  set: set,
2358
2354
  get: get,
2359
- remove: function (key, attributes) {
2355
+ remove: function (name, attributes) {
2360
2356
  set(
2361
- key,
2357
+ name,
2362
2358
  '',
2363
2359
  assign({}, attributes, {
2364
2360
  expires: -1
@@ -3092,4 +3088,4 @@ exports.parseOAuthAuthorizeParams = parseOAuthAuthorizeParams;
3092
3088
  exports.parseOAuthLogoutParams = parseOAuthLogoutParams;
3093
3089
  exports.removeResponseCommon = removeResponseCommon;
3094
3090
  exports.ssrSafeClientFactory = ssrSafeClientFactory;
3095
- //# sourceMappingURL=StytchSSRProxy-DjO95TII.js.map
3091
+ //# sourceMappingURL=StytchSSRProxy-BDhupJ0b.js.map