@guidelytech/react-native 0.8.0 → 0.9.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
@@ -331,7 +331,7 @@ interface UiState {
331
331
  }
332
332
 
333
333
  declare const SDK_NAME = "@guidelytech/react-native";
334
- declare const SDK_VERSION = "0.8.0";
334
+ declare const SDK_VERSION = "0.9.0";
335
335
  declare const DEFAULT_API_URL = "https://guidelytech.com";
336
336
  /** Host-platform services the engine needs; the provider supplies React Native implementations. */
337
337
  interface PlatformBridge {
package/dist/index.d.ts CHANGED
@@ -331,7 +331,7 @@ interface UiState {
331
331
  }
332
332
 
333
333
  declare const SDK_NAME = "@guidelytech/react-native";
334
- declare const SDK_VERSION = "0.8.0";
334
+ declare const SDK_VERSION = "0.9.0";
335
335
  declare const DEFAULT_API_URL = "https://guidelytech.com";
336
336
  /** Host-platform services the engine needs; the provider supplies React Native implementations. */
337
337
  interface PlatformBridge {
package/dist/index.js CHANGED
@@ -96,7 +96,7 @@ function FlagsProvider({ children, client: external, payload, ...options }) {
96
96
  return /* @__PURE__ */ jsx(FlagsContext.Provider, { value, children });
97
97
  }
98
98
 
99
- // ../shared/dist/chunk-OLWGMDRX.js
99
+ // ../shared/dist/chunk-UW6NRYRY.js
100
100
  function fnv1a(input) {
101
101
  let h = 2166136261;
102
102
  for (let i = 0; i < input.length; i++) {
@@ -238,6 +238,8 @@ function resolveField(rule, ctx) {
238
238
  return ctx.userAttributes.role;
239
239
  case "user.plan":
240
240
  return ctx.userAttributes.plan ?? ctx.accountAttributes.plan;
241
+ case "user.identified":
242
+ return !!ctx.userId;
241
243
  case "url.path":
242
244
  return ctx.path;
243
245
  case "url.full":
@@ -400,6 +402,7 @@ function sanitizeProperties(props) {
400
402
  return out;
401
403
  }
402
404
  var SOURCEMAP_MAX_FILE_BYTES = 25 * 1024 * 1024;
405
+ var MAX_COMPLAINT_ATTACHMENT_BYTES = 2 * 1024 * 1024;
403
406
  var MEDIA_IMAGE_MAX_BYTES = 10 * 1024 * 1024;
404
407
  var MEDIA_VIDEO_MAX_BYTES = 200 * 1024 * 1024;
405
408
  var MEDIA_FILE_MAX_BYTES = 50 * 1024 * 1024;
@@ -737,7 +740,7 @@ async function readEventStream(body, onEvent) {
737
740
  if (buffer.trim()) dispatch(buffer);
738
741
  }
739
742
 
740
- // ../sdk-core/dist/chunk-GDF6RCHQ.js
743
+ // ../sdk-core/dist/chunk-544KSOC3.js
741
744
  var EventQueue = class {
742
745
  constructor(opts) {
743
746
  __publicField2(this, "opts", opts);
@@ -923,6 +926,10 @@ function isWithinSchedule(guide, now = Date.now()) {
923
926
  if (s.endAt && now > Date.parse(s.endAt)) return false;
924
927
  return true;
925
928
  }
929
+ function dismissedAfterMerge(local, server) {
930
+ if (server.dismissResetAt && server.dismissResetAt !== local?.dismissResetAt) return server.dismissedAt ?? null;
931
+ return local?.dismissedAt ?? server.dismissedAt ?? null;
932
+ }
926
933
 
927
934
  // src/core/client.ts
928
935
  import { createFlagsClient as createFlagsClient2 } from "@guidelytech/flags";
@@ -1822,7 +1829,7 @@ var PersistentStore = class {
1822
1829
 
1823
1830
  // src/core/client.ts
1824
1831
  var SDK_NAME = "@guidelytech/react-native";
1825
- var SDK_VERSION = "0.8.0";
1832
+ var SDK_VERSION = "0.9.0";
1826
1833
  var DEFAULT_API_URL = "https://guidelytech.com";
1827
1834
  var PAGE_SCOPED = /* @__PURE__ */ new Set(["page_load", "url_match", "element_click", "element_visible", "delay"]);
1828
1835
  var nowIso = () => (/* @__PURE__ */ new Date()).toISOString();
@@ -2140,7 +2147,8 @@ var GuidelyClient = class {
2140
2147
  checklists[id] = {
2141
2148
  completedTaskIds: Array.from(/* @__PURE__ */ new Set([...local?.completedTaskIds ?? [], ...p.completedTaskIds ?? []])),
2142
2149
  completedAt: local?.completedAt ?? p.completedAt ?? null,
2143
- dismissedAt: local?.dismissedAt ?? p.dismissedAt ?? null
2150
+ dismissedAt: dismissedAfterMerge(local, p),
2151
+ dismissResetAt: p.dismissResetAt ?? local?.dismissResetAt ?? null
2144
2152
  };
2145
2153
  }
2146
2154
  this.state = {