@modelnex/sdk 0.5.54 → 0.5.55

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.js CHANGED
@@ -5265,10 +5265,13 @@ function useTourPlayback({
5265
5265
  }
5266
5266
  const tour = tourData.tourContext ?? tourRef.current;
5267
5267
  const expType = experienceTypeRef.current;
5268
- if (tour?.type && tour.type !== expType) {
5268
+ const matchesType = !tour?.type || tour.type === expType;
5269
+ const isCompatibleResumption = !!tourData.resumed && (expType === "onboarding" && tour?.type === "tour" || expType === "tour" && tour?.type === "onboarding");
5270
+ if (!matchesType && !isCompatibleResumption) {
5269
5271
  emitSdkDebugLog("[TourClient] Ignoring tour start for mismatched experience type", {
5270
- incomingType: tour.type,
5271
- hookType: expType
5272
+ incomingType: tour?.type,
5273
+ hookType: expType,
5274
+ resumed: tourData.resumed
5272
5275
  }, { devMode: devModeRef.current });
5273
5276
  return;
5274
5277
  }
package/dist/index.mjs CHANGED
@@ -4436,10 +4436,13 @@ function useTourPlayback({
4436
4436
  }
4437
4437
  const tour = tourData.tourContext ?? tourRef.current;
4438
4438
  const expType = experienceTypeRef.current;
4439
- if (tour?.type && tour.type !== expType) {
4439
+ const matchesType = !tour?.type || tour.type === expType;
4440
+ const isCompatibleResumption = !!tourData.resumed && (expType === "onboarding" && tour?.type === "tour" || expType === "tour" && tour?.type === "onboarding");
4441
+ if (!matchesType && !isCompatibleResumption) {
4440
4442
  emitSdkDebugLog("[TourClient] Ignoring tour start for mismatched experience type", {
4441
- incomingType: tour.type,
4442
- hookType: expType
4443
+ incomingType: tour?.type,
4444
+ hookType: expType,
4445
+ resumed: tourData.resumed
4443
4446
  }, { devMode: devModeRef.current });
4444
4447
  return;
4445
4448
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelnex/sdk",
3
- "version": "0.5.54",
3
+ "version": "0.5.55",
4
4
  "description": "React SDK for natural language control of web apps via AI agents",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",