@appilots/sdk 0.7.0 → 0.8.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.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkKYFAXT6V_js = require('./chunk-KYFAXT6V.js');
4
- var chunkHFRIB4YN_js = require('./chunk-HFRIB4YN.js');
5
- var chunkDZ7QRFHD_js = require('./chunk-DZ7QRFHD.js');
3
+ var chunkH7BMQTXH_js = require('./chunk-H7BMQTXH.js');
4
+ var chunkN7EAOLBP_js = require('./chunk-N7EAOLBP.js');
5
+ var chunkAYWMBMSN_js = require('./chunk-AYWMBMSN.js');
6
6
  var React7 = require('react');
7
7
  var reactNative = require('react-native');
8
8
  var reactNativeSafeAreaContext = require('react-native-safe-area-context');
@@ -33,14 +33,14 @@ var Svg__default = /*#__PURE__*/_interopDefault(Svg);
33
33
 
34
34
  // src/components/breadcrumbPresentation.ts
35
35
  var DEFAULT_BREADCRUMB_PALETTE = {
36
- primary: chunkDZ7QRFHD_js.defaultLightTheme.colors.primary,
37
- text: chunkDZ7QRFHD_js.defaultLightTheme.colors.text,
38
- textSecondary: chunkDZ7QRFHD_js.defaultLightTheme.colors.textSecondary,
39
- surface: chunkDZ7QRFHD_js.defaultLightTheme.colors.surface,
40
- border: chunkDZ7QRFHD_js.defaultLightTheme.colors.border,
41
- success: chunkDZ7QRFHD_js.defaultLightTheme.colors.success,
42
- warning: chunkDZ7QRFHD_js.defaultLightTheme.colors.warning,
43
- error: chunkDZ7QRFHD_js.defaultLightTheme.colors.error
36
+ primary: chunkAYWMBMSN_js.defaultLightTheme.colors.primary,
37
+ text: chunkAYWMBMSN_js.defaultLightTheme.colors.text,
38
+ textSecondary: chunkAYWMBMSN_js.defaultLightTheme.colors.textSecondary,
39
+ surface: chunkAYWMBMSN_js.defaultLightTheme.colors.surface,
40
+ border: chunkAYWMBMSN_js.defaultLightTheme.colors.border,
41
+ success: chunkAYWMBMSN_js.defaultLightTheme.colors.success,
42
+ warning: chunkAYWMBMSN_js.defaultLightTheme.colors.warning,
43
+ error: chunkAYWMBMSN_js.defaultLightTheme.colors.error
44
44
  };
45
45
  var KNOWN_TINTS = {
46
46
  [DEFAULT_BREADCRUMB_PALETTE.primary.toUpperCase()]: "#EEF2FF",
@@ -162,7 +162,7 @@ function RegularBreadcrumbRow({
162
162
  onApprove,
163
163
  onReject
164
164
  }) {
165
- const { label, state } = chunkDZ7QRFHD_js.describeAction(action);
165
+ const { label, state } = chunkAYWMBMSN_js.describeAction(action);
166
166
  const tone = deriveStateTone(palette)[state];
167
167
  const fade = React7.useRef(new reactNative.Animated.Value(0)).current;
168
168
  const pulse = React7.useRef(new reactNative.Animated.Value(1)).current;
@@ -862,7 +862,7 @@ var styles2 = reactNative.StyleSheet.create({
862
862
  textDecorationLine: "underline"
863
863
  }
864
864
  });
865
- var ThemeContext = React7.createContext(chunkDZ7QRFHD_js.defaultLightTheme);
865
+ var ThemeContext = React7.createContext(chunkAYWMBMSN_js.defaultLightTheme);
866
866
  function AppilotsThemeProvider({
867
867
  theme,
868
868
  mode = "auto",
@@ -870,7 +870,7 @@ function AppilotsThemeProvider({
870
870
  }) {
871
871
  const systemScheme = reactNative.useColorScheme();
872
872
  const tokens = React7.useMemo(
873
- () => chunkDZ7QRFHD_js.mergeThemeTokens(chunkDZ7QRFHD_js.resolveBaseTheme(mode, systemScheme), theme ?? void 0),
873
+ () => chunkAYWMBMSN_js.mergeThemeTokens(chunkAYWMBMSN_js.resolveBaseTheme(mode, systemScheme), theme ?? void 0),
874
874
  [mode, systemScheme, theme]
875
875
  );
876
876
  return /* @__PURE__ */ React7__namespace.default.createElement(ThemeContext.Provider, { value: tokens }, children);
@@ -1151,7 +1151,12 @@ var APPILOTS_SKIP_PROPS = {
1151
1151
  __appilotsInternal: true
1152
1152
  };
1153
1153
  function AppilotsChat(props) {
1154
- const { remotePersonalization } = chunkDZ7QRFHD_js.useAppilotsContext();
1154
+ const { degraded } = chunkAYWMBMSN_js.useAppilotsContext();
1155
+ if (degraded) return null;
1156
+ return /* @__PURE__ */ React7__namespace.default.createElement(chunkAYWMBMSN_js.AppilotsErrorBoundary, { surface: "chat", fallback: null }, /* @__PURE__ */ React7__namespace.default.createElement(AppilotsChatSurface, { ...props }));
1157
+ }
1158
+ function AppilotsChatSurface(props) {
1159
+ const { remotePersonalization } = chunkAYWMBMSN_js.useAppilotsContext();
1155
1160
  const themeProp = React7.useMemo(() => {
1156
1161
  if (!props.theme) return void 0;
1157
1162
  return isLegacyTheme(props.theme) ? translateLegacyTheme(props.theme) : props.theme;
@@ -1194,7 +1199,7 @@ function AppilotsChatInner({
1194
1199
  clearMessages,
1195
1200
  escalation,
1196
1201
  requestHuman
1197
- } = chunkHFRIB4YN_js.useAppilotsChat({
1202
+ } = chunkN7EAOLBP_js.useAppilotsChat({
1198
1203
  errorPrefix: t("somethingWentWrong"),
1199
1204
  escalationStrings: {
1200
1205
  requested: t("escalationRequested"),
@@ -1209,8 +1214,8 @@ function AppilotsChatInner({
1209
1214
  completedActions,
1210
1215
  approveAction,
1211
1216
  rejectAction
1212
- } = chunkHFRIB4YN_js.useAppilotsActions({ autoExecute });
1213
- const { emit, remotePersonalization } = chunkDZ7QRFHD_js.useAppilotsContext();
1217
+ } = chunkN7EAOLBP_js.useAppilotsActions({ autoExecute });
1218
+ const { emit, remotePersonalization } = chunkAYWMBMSN_js.useAppilotsContext();
1214
1219
  const {
1215
1220
  headerTitle: resolvedTitle,
1216
1221
  assistantAvatar,
@@ -1246,12 +1251,12 @@ function AppilotsChatInner({
1246
1251
  const flatListRef = React7.useRef(null);
1247
1252
  const slideAnim = React7.useRef(new reactNative.Animated.Value(SCREEN_HEIGHT)).current;
1248
1253
  const isVisible = mode === "inline" ? true : controlledVisible !== void 0 ? controlledVisible : internalVisible;
1249
- const showSuggestedPrompts = chunkHFRIB4YN_js.shouldShowSuggestedPrompts({
1254
+ const showSuggestedPrompts = chunkN7EAOLBP_js.shouldShowSuggestedPrompts({
1250
1255
  isVisible,
1251
1256
  messageCount: messages.length,
1252
1257
  inputText
1253
1258
  });
1254
- const { prompts: suggestedPrompts } = chunkHFRIB4YN_js.useSuggestedPrompts({
1259
+ const { prompts: suggestedPrompts } = chunkN7EAOLBP_js.useSuggestedPrompts({
1255
1260
  enabled: showSuggestedPrompts,
1256
1261
  limit: 3
1257
1262
  });
@@ -2167,9 +2172,9 @@ function createAppilotsInput(WrappedComponent) {
2167
2172
  label: label ?? fieldId,
2168
2173
  screen: appilotsScreen
2169
2174
  };
2170
- chunkDZ7QRFHD_js.componentRegistry.register(fieldId, entry);
2175
+ chunkAYWMBMSN_js.componentRegistry.register(fieldId, entry);
2171
2176
  return () => {
2172
- chunkDZ7QRFHD_js.componentRegistry.unregister(fieldId);
2177
+ chunkAYWMBMSN_js.componentRegistry.unregister(fieldId);
2173
2178
  };
2174
2179
  }, [fieldId, appilotsEnabled, getValue, setValue, focus, appilotsFieldType, label, appilotsScreen]);
2175
2180
  const mergedRef = React7.useCallback(
@@ -2218,9 +2223,9 @@ function createAppilotsButton(WrappedComponent) {
2218
2223
  label: title ?? targetId,
2219
2224
  screen: appilotsScreen
2220
2225
  };
2221
- chunkDZ7QRFHD_js.componentRegistry.register(targetId, entry);
2226
+ chunkAYWMBMSN_js.componentRegistry.register(targetId, entry);
2222
2227
  return () => {
2223
- chunkDZ7QRFHD_js.componentRegistry.unregister(targetId);
2228
+ chunkAYWMBMSN_js.componentRegistry.unregister(targetId);
2224
2229
  };
2225
2230
  }, [targetId, appilotsEnabled, press, title, appilotsScreen]);
2226
2231
  return /* @__PURE__ */ React7__namespace.default.createElement(
@@ -2266,9 +2271,9 @@ function createAppilotsSwitch(WrappedComponent) {
2266
2271
  label: label ?? toggleId,
2267
2272
  screen: appilotsScreen
2268
2273
  };
2269
- chunkDZ7QRFHD_js.componentRegistry.register(toggleId, entry);
2274
+ chunkAYWMBMSN_js.componentRegistry.register(toggleId, entry);
2270
2275
  return () => {
2271
- chunkDZ7QRFHD_js.componentRegistry.unregister(toggleId);
2276
+ chunkAYWMBMSN_js.componentRegistry.unregister(toggleId);
2272
2277
  };
2273
2278
  }, [toggleId, appilotsEnabled, getValue, setValue, label, appilotsScreen]);
2274
2279
  return /* @__PURE__ */ React7__namespace.default.createElement(
@@ -2286,167 +2291,167 @@ function createAppilotsSwitch(WrappedComponent) {
2286
2291
 
2287
2292
  Object.defineProperty(exports, "AppilotsNavigationContainer", {
2288
2293
  enumerable: true,
2289
- get: function () { return chunkKYFAXT6V_js.AppilotsNavigationContainer; }
2294
+ get: function () { return chunkH7BMQTXH_js.AppilotsNavigationContainer; }
2290
2295
  });
2291
2296
  Object.defineProperty(exports, "captureSnapshot", {
2292
2297
  enumerable: true,
2293
- get: function () { return chunkHFRIB4YN_js.captureSnapshot; }
2298
+ get: function () { return chunkN7EAOLBP_js.captureSnapshot; }
2294
2299
  });
2295
2300
  Object.defineProperty(exports, "executeAction", {
2296
2301
  enumerable: true,
2297
- get: function () { return chunkHFRIB4YN_js.executeAction; }
2302
+ get: function () { return chunkN7EAOLBP_js.executeAction; }
2298
2303
  });
2299
2304
  Object.defineProperty(exports, "useAppilots", {
2300
2305
  enumerable: true,
2301
- get: function () { return chunkHFRIB4YN_js.useAppilots; }
2306
+ get: function () { return chunkN7EAOLBP_js.useAppilots; }
2302
2307
  });
2303
2308
  Object.defineProperty(exports, "useAppilotsActions", {
2304
2309
  enumerable: true,
2305
- get: function () { return chunkHFRIB4YN_js.useAppilotsActions; }
2310
+ get: function () { return chunkN7EAOLBP_js.useAppilotsActions; }
2306
2311
  });
2307
2312
  Object.defineProperty(exports, "useAppilotsChat", {
2308
2313
  enumerable: true,
2309
- get: function () { return chunkHFRIB4YN_js.useAppilotsChat; }
2314
+ get: function () { return chunkN7EAOLBP_js.useAppilotsChat; }
2310
2315
  });
2311
2316
  Object.defineProperty(exports, "useAppilotsField", {
2312
2317
  enumerable: true,
2313
- get: function () { return chunkHFRIB4YN_js.useAppilotsField; }
2318
+ get: function () { return chunkN7EAOLBP_js.useAppilotsField; }
2314
2319
  });
2315
2320
  Object.defineProperty(exports, "useAppilotsNavigation", {
2316
2321
  enumerable: true,
2317
- get: function () { return chunkHFRIB4YN_js.useAppilotsNavigation; }
2322
+ get: function () { return chunkN7EAOLBP_js.useAppilotsNavigation; }
2318
2323
  });
2319
2324
  Object.defineProperty(exports, "useAppilotsSlider", {
2320
2325
  enumerable: true,
2321
- get: function () { return chunkHFRIB4YN_js.useAppilotsSlider; }
2326
+ get: function () { return chunkN7EAOLBP_js.useAppilotsSlider; }
2322
2327
  });
2323
2328
  Object.defineProperty(exports, "useAppilotsTarget", {
2324
2329
  enumerable: true,
2325
- get: function () { return chunkHFRIB4YN_js.useAppilotsTarget; }
2330
+ get: function () { return chunkN7EAOLBP_js.useAppilotsTarget; }
2326
2331
  });
2327
2332
  Object.defineProperty(exports, "useAppilotsToggle", {
2328
2333
  enumerable: true,
2329
- get: function () { return chunkHFRIB4YN_js.useAppilotsToggle; }
2334
+ get: function () { return chunkN7EAOLBP_js.useAppilotsToggle; }
2330
2335
  });
2331
2336
  Object.defineProperty(exports, "useSuggestedPrompts", {
2332
2337
  enumerable: true,
2333
- get: function () { return chunkHFRIB4YN_js.useSuggestedPrompts; }
2338
+ get: function () { return chunkN7EAOLBP_js.useSuggestedPrompts; }
2334
2339
  });
2335
2340
  Object.defineProperty(exports, "AppilotsClient", {
2336
2341
  enumerable: true,
2337
- get: function () { return chunkDZ7QRFHD_js.AppilotsClient; }
2342
+ get: function () { return chunkAYWMBMSN_js.AppilotsClient; }
2338
2343
  });
2339
2344
  Object.defineProperty(exports, "AppilotsProvider", {
2340
2345
  enumerable: true,
2341
- get: function () { return chunkDZ7QRFHD_js.AppilotsProvider; }
2346
+ get: function () { return chunkAYWMBMSN_js.AppilotsProvider; }
2342
2347
  });
2343
2348
  Object.defineProperty(exports, "AppilotsRegistryProvider", {
2344
2349
  enumerable: true,
2345
- get: function () { return chunkDZ7QRFHD_js.AppilotsRegistryProvider; }
2350
+ get: function () { return chunkAYWMBMSN_js.AppilotsRegistryProvider; }
2346
2351
  });
2347
2352
  Object.defineProperty(exports, "RateLimitedError", {
2348
2353
  enumerable: true,
2349
- get: function () { return chunkDZ7QRFHD_js.RateLimitedError; }
2354
+ get: function () { return chunkAYWMBMSN_js.RateLimitedError; }
2350
2355
  });
2351
2356
  Object.defineProperty(exports, "SDK_VERSION", {
2352
2357
  enumerable: true,
2353
- get: function () { return chunkDZ7QRFHD_js.SDK_VERSION; }
2358
+ get: function () { return chunkAYWMBMSN_js.SDK_VERSION; }
2354
2359
  });
2355
2360
  Object.defineProperty(exports, "_patchJsxRuntimes", {
2356
2361
  enumerable: true,
2357
- get: function () { return chunkDZ7QRFHD_js._patchJsxRuntimes; }
2362
+ get: function () { return chunkAYWMBMSN_js._patchJsxRuntimes; }
2358
2363
  });
2359
2364
  Object.defineProperty(exports, "clearAppilotsDebugTraces", {
2360
2365
  enumerable: true,
2361
- get: function () { return chunkDZ7QRFHD_js.clearAppilotsDebugTraces; }
2366
+ get: function () { return chunkAYWMBMSN_js.clearAppilotsDebugTraces; }
2362
2367
  });
2363
2368
  Object.defineProperty(exports, "componentRegistry", {
2364
2369
  enumerable: true,
2365
- get: function () { return chunkDZ7QRFHD_js.componentRegistry; }
2370
+ get: function () { return chunkAYWMBMSN_js.componentRegistry; }
2366
2371
  });
2367
2372
  Object.defineProperty(exports, "createComponentRegistry", {
2368
2373
  enumerable: true,
2369
- get: function () { return chunkDZ7QRFHD_js.createComponentRegistry; }
2374
+ get: function () { return chunkAYWMBMSN_js.createComponentRegistry; }
2370
2375
  });
2371
2376
  Object.defineProperty(exports, "createElementRegistry", {
2372
2377
  enumerable: true,
2373
- get: function () { return chunkDZ7QRFHD_js.createElementRegistry; }
2378
+ get: function () { return chunkAYWMBMSN_js.createElementRegistry; }
2374
2379
  });
2375
2380
  Object.defineProperty(exports, "createListRegistry", {
2376
2381
  enumerable: true,
2377
- get: function () { return chunkDZ7QRFHD_js.createListRegistry; }
2382
+ get: function () { return chunkAYWMBMSN_js.createListRegistry; }
2378
2383
  });
2379
2384
  Object.defineProperty(exports, "defaultDarkTheme", {
2380
2385
  enumerable: true,
2381
- get: function () { return chunkDZ7QRFHD_js.defaultDarkTheme; }
2386
+ get: function () { return chunkAYWMBMSN_js.defaultDarkTheme; }
2382
2387
  });
2383
2388
  Object.defineProperty(exports, "defaultLightTheme", {
2384
2389
  enumerable: true,
2385
- get: function () { return chunkDZ7QRFHD_js.defaultLightTheme; }
2390
+ get: function () { return chunkAYWMBMSN_js.defaultLightTheme; }
2386
2391
  });
2387
2392
  Object.defineProperty(exports, "describeAction", {
2388
2393
  enumerable: true,
2389
- get: function () { return chunkDZ7QRFHD_js.describeAction; }
2394
+ get: function () { return chunkAYWMBMSN_js.describeAction; }
2390
2395
  });
2391
2396
  Object.defineProperty(exports, "elementRegistry", {
2392
2397
  enumerable: true,
2393
- get: function () { return chunkDZ7QRFHD_js.elementRegistry; }
2398
+ get: function () { return chunkAYWMBMSN_js.elementRegistry; }
2394
2399
  });
2395
2400
  Object.defineProperty(exports, "enableAppilotsAutoTracking", {
2396
2401
  enumerable: true,
2397
- get: function () { return chunkDZ7QRFHD_js.enableAppilotsAutoTracking; }
2402
+ get: function () { return chunkAYWMBMSN_js.enableAppilotsAutoTracking; }
2398
2403
  });
2399
2404
  Object.defineProperty(exports, "getAppilotsDebugTraces", {
2400
2405
  enumerable: true,
2401
- get: function () { return chunkDZ7QRFHD_js.getAppilotsDebugTraces; }
2406
+ get: function () { return chunkAYWMBMSN_js.getAppilotsDebugTraces; }
2402
2407
  });
2403
2408
  Object.defineProperty(exports, "getGlobalConfig", {
2404
2409
  enumerable: true,
2405
- get: function () { return chunkDZ7QRFHD_js.getGlobalConfig; }
2410
+ get: function () { return chunkAYWMBMSN_js.getGlobalConfig; }
2406
2411
  });
2407
2412
  Object.defineProperty(exports, "getIntrospectionDiagnostics", {
2408
2413
  enumerable: true,
2409
- get: function () { return chunkDZ7QRFHD_js.getIntrospectionDiagnostics; }
2414
+ get: function () { return chunkAYWMBMSN_js.getIntrospectionDiagnostics; }
2410
2415
  });
2411
2416
  Object.defineProperty(exports, "humanizeError", {
2412
2417
  enumerable: true,
2413
- get: function () { return chunkDZ7QRFHD_js.humanizeError; }
2418
+ get: function () { return chunkAYWMBMSN_js.humanizeError; }
2414
2419
  });
2415
2420
  Object.defineProperty(exports, "initAppilots", {
2416
2421
  enumerable: true,
2417
- get: function () { return chunkDZ7QRFHD_js.initAppilots; }
2422
+ get: function () { return chunkAYWMBMSN_js.initAppilots; }
2418
2423
  });
2419
2424
  Object.defineProperty(exports, "isAutoTrackingEnabled", {
2420
2425
  enumerable: true,
2421
- get: function () { return chunkDZ7QRFHD_js.isAutoTrackingEnabled; }
2426
+ get: function () { return chunkAYWMBMSN_js.isAutoTrackingEnabled; }
2422
2427
  });
2423
2428
  Object.defineProperty(exports, "listRegistry", {
2424
2429
  enumerable: true,
2425
- get: function () { return chunkDZ7QRFHD_js.listRegistry; }
2430
+ get: function () { return chunkAYWMBMSN_js.listRegistry; }
2426
2431
  });
2427
2432
  Object.defineProperty(exports, "mergeThemeTokens", {
2428
2433
  enumerable: true,
2429
- get: function () { return chunkDZ7QRFHD_js.mergeThemeTokens; }
2434
+ get: function () { return chunkAYWMBMSN_js.mergeThemeTokens; }
2430
2435
  });
2431
2436
  Object.defineProperty(exports, "recordAppilotsDebugTrace", {
2432
2437
  enumerable: true,
2433
- get: function () { return chunkDZ7QRFHD_js.recordAppilotsDebugTrace; }
2438
+ get: function () { return chunkAYWMBMSN_js.recordAppilotsDebugTrace; }
2434
2439
  });
2435
2440
  Object.defineProperty(exports, "registerScreen", {
2436
2441
  enumerable: true,
2437
- get: function () { return chunkDZ7QRFHD_js.registerScreen; }
2442
+ get: function () { return chunkAYWMBMSN_js.registerScreen; }
2438
2443
  });
2439
2444
  Object.defineProperty(exports, "subscribeAppilotsDebugTraces", {
2440
2445
  enumerable: true,
2441
- get: function () { return chunkDZ7QRFHD_js.subscribeAppilotsDebugTraces; }
2446
+ get: function () { return chunkAYWMBMSN_js.subscribeAppilotsDebugTraces; }
2442
2447
  });
2443
2448
  Object.defineProperty(exports, "useAppilotsContext", {
2444
2449
  enumerable: true,
2445
- get: function () { return chunkDZ7QRFHD_js.useAppilotsContext; }
2450
+ get: function () { return chunkAYWMBMSN_js.useAppilotsContext; }
2446
2451
  });
2447
2452
  Object.defineProperty(exports, "useResolvedRegistry", {
2448
2453
  enumerable: true,
2449
- get: function () { return chunkDZ7QRFHD_js.useResolvedRegistry; }
2454
+ get: function () { return chunkAYWMBMSN_js.useResolvedRegistry; }
2450
2455
  });
2451
2456
  exports.ActionBreadcrumb = ActionBreadcrumb;
2452
2457
  exports.AppilotsChat = AppilotsChat;
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- export { AppilotsNavigationContainer } from './chunk-DR75QTYK.mjs';
2
- import { useAppilotsChat, useAppilotsActions, shouldShowSuggestedPrompts, useSuggestedPrompts } from './chunk-KUFWRJC4.mjs';
3
- export { captureSnapshot, executeAction, useAppilots, useAppilotsActions, useAppilotsChat, useAppilotsField, useAppilotsNavigation, useAppilotsSlider, useAppilotsTarget, useAppilotsToggle, useSuggestedPrompts } from './chunk-KUFWRJC4.mjs';
4
- import { defaultLightTheme, describeAction, mergeThemeTokens, resolveBaseTheme, useAppilotsContext, componentRegistry } from './chunk-R4D34FEW.mjs';
5
- export { AppilotsClient, AppilotsProvider, AppilotsRegistryProvider, RateLimitedError, SDK_VERSION, _patchJsxRuntimes, clearAppilotsDebugTraces, componentRegistry, createComponentRegistry, createElementRegistry, createListRegistry, defaultDarkTheme, defaultLightTheme, describeAction, elementRegistry, enableAppilotsAutoTracking, getAppilotsDebugTraces, getGlobalConfig, getIntrospectionDiagnostics, humanizeError, initAppilots, isAutoTrackingEnabled, listRegistry, mergeThemeTokens, recordAppilotsDebugTrace, registerScreen, subscribeAppilotsDebugTraces, useAppilotsContext, useResolvedRegistry } from './chunk-R4D34FEW.mjs';
1
+ export { AppilotsNavigationContainer } from './chunk-ZSEACJKU.mjs';
2
+ import { useAppilotsChat, useAppilotsActions, shouldShowSuggestedPrompts, useSuggestedPrompts } from './chunk-MHWVRZYF.mjs';
3
+ export { captureSnapshot, executeAction, useAppilots, useAppilotsActions, useAppilotsChat, useAppilotsField, useAppilotsNavigation, useAppilotsSlider, useAppilotsTarget, useAppilotsToggle, useSuggestedPrompts } from './chunk-MHWVRZYF.mjs';
4
+ import { defaultLightTheme, describeAction, mergeThemeTokens, resolveBaseTheme, useAppilotsContext, AppilotsErrorBoundary, componentRegistry } from './chunk-C2KVVJ5K.mjs';
5
+ export { AppilotsClient, AppilotsProvider, AppilotsRegistryProvider, RateLimitedError, SDK_VERSION, _patchJsxRuntimes, clearAppilotsDebugTraces, componentRegistry, createComponentRegistry, createElementRegistry, createListRegistry, defaultDarkTheme, defaultLightTheme, describeAction, elementRegistry, enableAppilotsAutoTracking, getAppilotsDebugTraces, getGlobalConfig, getIntrospectionDiagnostics, humanizeError, initAppilots, isAutoTrackingEnabled, listRegistry, mergeThemeTokens, recordAppilotsDebugTrace, registerScreen, subscribeAppilotsDebugTraces, useAppilotsContext, useResolvedRegistry } from './chunk-C2KVVJ5K.mjs';
6
6
  import * as React7 from 'react';
7
7
  import React7__default, { createContext, useRef, useEffect, useMemo, useContext, useState, useCallback } from 'react';
8
8
  import { StyleSheet, Dimensions, Platform, View, Animated, Text, TouchableOpacity, ActivityIndicator, useColorScheme, NativeModules, FlatList, Image, TextInput, Modal, KeyboardAvoidingView, Linking } from 'react-native';
@@ -1129,6 +1129,11 @@ var APPILOTS_SKIP_PROPS = {
1129
1129
  __appilotsInternal: true
1130
1130
  };
1131
1131
  function AppilotsChat(props) {
1132
+ const { degraded } = useAppilotsContext();
1133
+ if (degraded) return null;
1134
+ return /* @__PURE__ */ React7__default.createElement(AppilotsErrorBoundary, { surface: "chat", fallback: null }, /* @__PURE__ */ React7__default.createElement(AppilotsChatSurface, { ...props }));
1135
+ }
1136
+ function AppilotsChatSurface(props) {
1132
1137
  const { remotePersonalization } = useAppilotsContext();
1133
1138
  const themeProp = useMemo(() => {
1134
1139
  if (!props.theme) return void 0;
@@ -1,51 +1,51 @@
1
1
  'use strict';
2
2
 
3
- var chunkKYFAXT6V_js = require('../chunk-KYFAXT6V.js');
4
- var chunkDZ7QRFHD_js = require('../chunk-DZ7QRFHD.js');
3
+ var chunkH7BMQTXH_js = require('../chunk-H7BMQTXH.js');
4
+ var chunkAYWMBMSN_js = require('../chunk-AYWMBMSN.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "AppilotsNavigationContainer", {
9
9
  enumerable: true,
10
- get: function () { return chunkKYFAXT6V_js.AppilotsNavigationContainer; }
10
+ get: function () { return chunkH7BMQTXH_js.AppilotsNavigationContainer; }
11
11
  });
12
12
  Object.defineProperty(exports, "clearScreenRegistry", {
13
13
  enumerable: true,
14
- get: function () { return chunkDZ7QRFHD_js.clearScreenRegistry; }
14
+ get: function () { return chunkAYWMBMSN_js.clearScreenRegistry; }
15
15
  });
16
16
  Object.defineProperty(exports, "getActiveRouteNames", {
17
17
  enumerable: true,
18
- get: function () { return chunkDZ7QRFHD_js.getActiveRouteNames; }
18
+ get: function () { return chunkAYWMBMSN_js.getActiveRouteNames; }
19
19
  });
20
20
  Object.defineProperty(exports, "getAllScreens", {
21
21
  enumerable: true,
22
- get: function () { return chunkDZ7QRFHD_js.getAllScreens; }
22
+ get: function () { return chunkAYWMBMSN_js.getAllScreens; }
23
23
  });
24
24
  Object.defineProperty(exports, "getCurrentScreen", {
25
25
  enumerable: true,
26
- get: function () { return chunkDZ7QRFHD_js.getCurrentScreen; }
26
+ get: function () { return chunkAYWMBMSN_js.getCurrentScreen; }
27
27
  });
28
28
  Object.defineProperty(exports, "getNavigationRef", {
29
29
  enumerable: true,
30
- get: function () { return chunkDZ7QRFHD_js.getNavigationRef; }
30
+ get: function () { return chunkAYWMBMSN_js.getNavigationRef; }
31
31
  });
32
32
  Object.defineProperty(exports, "getNavigationStateSnapshot", {
33
33
  enumerable: true,
34
- get: function () { return chunkDZ7QRFHD_js.getNavigationStateSnapshot; }
34
+ get: function () { return chunkAYWMBMSN_js.getNavigationStateSnapshot; }
35
35
  });
36
36
  Object.defineProperty(exports, "getScreenMetadata", {
37
37
  enumerable: true,
38
- get: function () { return chunkDZ7QRFHD_js.getScreenMetadata; }
38
+ get: function () { return chunkAYWMBMSN_js.getScreenMetadata; }
39
39
  });
40
40
  Object.defineProperty(exports, "registerScreen", {
41
41
  enumerable: true,
42
- get: function () { return chunkDZ7QRFHD_js.registerScreen; }
42
+ get: function () { return chunkAYWMBMSN_js.registerScreen; }
43
43
  });
44
44
  Object.defineProperty(exports, "setCurrentScreen", {
45
45
  enumerable: true,
46
- get: function () { return chunkDZ7QRFHD_js.setCurrentScreen; }
46
+ get: function () { return chunkAYWMBMSN_js.setCurrentScreen; }
47
47
  });
48
48
  Object.defineProperty(exports, "setNavigationRef", {
49
49
  enumerable: true,
50
- get: function () { return chunkDZ7QRFHD_js.setNavigationRef; }
50
+ get: function () { return chunkAYWMBMSN_js.setNavigationRef; }
51
51
  });
@@ -1,2 +1,2 @@
1
- export { AppilotsNavigationContainer } from '../chunk-DR75QTYK.mjs';
2
- export { clearScreenRegistry, getActiveRouteNames, getAllScreens, getCurrentScreen, getNavigationRef, getNavigationStateSnapshot, getScreenMetadata, registerScreen, setCurrentScreen, setNavigationRef } from '../chunk-R4D34FEW.mjs';
1
+ export { AppilotsNavigationContainer } from '../chunk-ZSEACJKU.mjs';
2
+ export { clearScreenRegistry, getActiveRouteNames, getAllScreens, getCurrentScreen, getNavigationRef, getNavigationStateSnapshot, getScreenMetadata, registerScreen, setCurrentScreen, setNavigationRef } from '../chunk-C2KVVJ5K.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appilots/sdk",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "AI-powered chat component and navigation SDK for React Native apps",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -80,13 +80,15 @@
80
80
  "scripts": {
81
81
  "build": "tsup && node scripts/check-private-specifiers.mjs && node scripts/check-entrypoints.mjs",
82
82
  "dev": "tsup --watch",
83
- "lint": "eslint src --ext .ts,.tsx,.js,.jsx",
84
- "lint:fix": "eslint src --ext .ts,.tsx,.js,.jsx --fix",
85
- "test": "vitest run",
83
+ "lint": "eslint src test --ext .ts,.tsx,.js,.jsx,.cjs",
84
+ "lint:fix": "eslint src test --ext .ts,.tsx,.js,.jsx,.cjs --fix",
85
+ "test": "pnpm test:react18 && pnpm test:react19",
86
+ "test:react18": "vitest run",
87
+ "test:react19": "vitest run --config vitest.react19.config.ts",
86
88
  "test:watch": "vitest",
87
89
  "test:coverage": "vitest run --coverage",
88
90
  "typecheck": "tsc --noEmit",
89
- "clean": "rm -rf dist .turbo"
91
+ "clean": "rm -rf dist .turbo node_modules/.cache/appilots-rn-babel"
90
92
  },
91
93
  "peerDependencies": {
92
94
  "react": ">=18.0.0",
@@ -97,12 +99,18 @@
97
99
  "devDependencies": {
98
100
  "@appilots/client-core": "workspace:*",
99
101
  "@appilots/shared": "workspace:*",
102
+ "@babel/core": "^7.29.0",
103
+ "@react-native/babel-preset": "0.76.9",
100
104
  "@types/react": "^18.3.0",
101
105
  "@types/react-native": "^0.73.0",
106
+ "@types/react-test-renderer": "^18.3.0",
102
107
  "react": "^18.3.0",
108
+ "react-19": "npm:react@^19.0.0",
103
109
  "react-native": "^0.76.0",
104
110
  "react-native-safe-area-context": "^5.0.0",
105
111
  "react-native-svg": "15.8.0",
112
+ "react-test-renderer": "^18.3.1",
113
+ "react-test-renderer-19": "npm:react-test-renderer@^19.0.0",
106
114
  "tsup": "^8.3.0",
107
115
  "typescript": "^5.6.0",
108
116
  "vitest": "^2.1.0"