@appilots/sdk 0.4.0 → 0.4.1

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.
@@ -3676,6 +3676,10 @@ function isDebugEnabled() {
3676
3676
  if (debugOverride !== void 0) return debugOverride;
3677
3677
  return getGlobalConfig()?.debug === true;
3678
3678
  }
3679
+ function appilotsDebugLog(...args) {
3680
+ if (!isDebugEnabled()) return;
3681
+ console.log("[Appilots]", ...args);
3682
+ }
3679
3683
  function appilotsDebugWarn(...args) {
3680
3684
  if (!isDebugEnabled()) return;
3681
3685
  console.log("[Appilots]", ...args);
@@ -4265,4 +4269,4 @@ function clearScreenRegistry() {
4265
4269
  screenRegistry.clear();
4266
4270
  }
4267
4271
 
4268
- export { ActionQueueMachine, AppilotsClient, AppilotsProvider, AppilotsRegistryProvider, ChatSessionMachine, OPTIONAL_STEP_AUTOMATION_HINT, SDK_VERSION, _patchJsxRuntimes, actionPressTargetId, appilotsDebugWarn, attachElementIdsToChoiceGroups, clearAppilotsDebugTraces, clearScreenRegistry, componentRegistry, createComponentRegistry, createElementRegistry, createListRegistry, defaultDarkTheme, defaultLightTheme, deriveInteractionElements, describeAction, elementRegistry, enableAppilotsAutoTracking, getActiveRouteNames, getAllScreens, getAppilotsDebugTraces, getCurrentScreen, getCurrentScreenSignature, getDefaultRegistry, getFiberRoot, getGlobalConfig, getNavigationRef, getNavigationStateSnapshot, getScreenMetadata, humanizeError, idLooselyMatches, initAppilots, isAutoTrackingEnabled, isGenericSelectValue, isListItemPressTarget, isOptionalStepAutomationFailure, listRegistry, looksDestructiveActionLabel, matchScore, mergeThemeTokens, normalize3, parseStableElementId, probeLoadingState, recordAppilotsDebugTrace, registerScreen, resolveBaseTheme, routesBelongToSameFeature, screenDepartedBaseline, setCurrentScreen, setNavigationRef, snapshotShowsOpenCreateForm, subscribeAppilotsDebugTraces, useAppilotsContext, useResolvedRegistry, waitForLoadingSettle, waitForScreenSettle };
4272
+ export { ActionQueueMachine, AppilotsClient, AppilotsProvider, AppilotsRegistryProvider, ChatSessionMachine, OPTIONAL_STEP_AUTOMATION_HINT, SDK_VERSION, _patchJsxRuntimes, actionPressTargetId, appilotsDebugLog, appilotsDebugWarn, attachElementIdsToChoiceGroups, clearAppilotsDebugTraces, clearScreenRegistry, componentRegistry, createComponentRegistry, createElementRegistry, createListRegistry, defaultDarkTheme, defaultLightTheme, deriveInteractionElements, describeAction, elementRegistry, enableAppilotsAutoTracking, getActiveRouteNames, getAllScreens, getAppilotsDebugTraces, getCurrentScreen, getCurrentScreenSignature, getDefaultRegistry, getFiberRoot, getGlobalConfig, getNavigationRef, getNavigationStateSnapshot, getScreenMetadata, humanizeError, idLooselyMatches, initAppilots, isAutoTrackingEnabled, isGenericSelectValue, isListItemPressTarget, isOptionalStepAutomationFailure, listRegistry, looksDestructiveActionLabel, matchScore, mergeThemeTokens, normalize3, parseStableElementId, probeLoadingState, recordAppilotsDebugTrace, registerScreen, resolveBaseTheme, routesBelongToSameFeature, screenDepartedBaseline, setCurrentScreen, setNavigationRef, snapshotShowsOpenCreateForm, subscribeAppilotsDebugTraces, useAppilotsContext, useResolvedRegistry, waitForLoadingSettle, waitForScreenSettle };
@@ -3682,6 +3682,10 @@ function isDebugEnabled() {
3682
3682
  if (debugOverride !== void 0) return debugOverride;
3683
3683
  return getGlobalConfig()?.debug === true;
3684
3684
  }
3685
+ function appilotsDebugLog(...args) {
3686
+ if (!isDebugEnabled()) return;
3687
+ console.log("[Appilots]", ...args);
3688
+ }
3685
3689
  function appilotsDebugWarn(...args) {
3686
3690
  if (!isDebugEnabled()) return;
3687
3691
  console.log("[Appilots]", ...args);
@@ -4280,6 +4284,7 @@ exports.OPTIONAL_STEP_AUTOMATION_HINT = OPTIONAL_STEP_AUTOMATION_HINT;
4280
4284
  exports.SDK_VERSION = SDK_VERSION;
4281
4285
  exports._patchJsxRuntimes = _patchJsxRuntimes;
4282
4286
  exports.actionPressTargetId = actionPressTargetId;
4287
+ exports.appilotsDebugLog = appilotsDebugLog;
4283
4288
  exports.appilotsDebugWarn = appilotsDebugWarn;
4284
4289
  exports.attachElementIdsToChoiceGroups = attachElementIdsToChoiceGroups;
4285
4290
  exports.clearAppilotsDebugTraces = clearAppilotsDebugTraces;
@@ -1,4 +1,4 @@
1
- import { getFiberRoot, getCurrentScreen, getActiveRouteNames, deriveInteractionElements, attachElementIdsToChoiceGroups, elementRegistry, appilotsDebugWarn, getDefaultRegistry, useAppilotsContext, ChatSessionMachine, getCurrentScreenSignature, ActionQueueMachine, getScreenMetadata, setCurrentScreen, useResolvedRegistry, listRegistry, componentRegistry, probeLoadingState, isListItemPressTarget, waitForLoadingSettle, waitForScreenSettle, screenDepartedBaseline, routesBelongToSameFeature, actionPressTargetId, getNavigationStateSnapshot, getNavigationRef, isOptionalStepAutomationFailure, OPTIONAL_STEP_AUTOMATION_HINT, normalize3, matchScore, idLooselyMatches, parseStableElementId, getAllScreens, snapshotShowsOpenCreateForm, looksDestructiveActionLabel, isGenericSelectValue } from './chunk-JBOLV5AM.mjs';
1
+ import { getFiberRoot, getCurrentScreen, getActiveRouteNames, deriveInteractionElements, attachElementIdsToChoiceGroups, elementRegistry, appilotsDebugWarn, getDefaultRegistry, useAppilotsContext, ChatSessionMachine, getCurrentScreenSignature, ActionQueueMachine, getScreenMetadata, setCurrentScreen, useResolvedRegistry, listRegistry, componentRegistry, probeLoadingState, isListItemPressTarget, waitForLoadingSettle, appilotsDebugLog, waitForScreenSettle, screenDepartedBaseline, routesBelongToSameFeature, actionPressTargetId, getNavigationStateSnapshot, getNavigationRef, isOptionalStepAutomationFailure, OPTIONAL_STEP_AUTOMATION_HINT, normalize3, matchScore, idLooselyMatches, parseStableElementId, getAllScreens, snapshotShowsOpenCreateForm, looksDestructiveActionLabel, isGenericSelectValue } from './chunk-4GUPZDWT.mjs';
2
2
  import { useMemo, useRef, useSyncExternalStore, useEffect, useCallback, useState } from 'react';
3
3
  import { Alert } from 'react-native';
4
4
 
@@ -3267,7 +3267,9 @@ async function formFillHandler(payload, context) {
3267
3267
  const fieldEntry = findField(fieldId, registry);
3268
3268
  if (fieldEntry) {
3269
3269
  try {
3270
- console.log(`[Appilots] formFillHandler: found field "${fieldId}" via registry, calling setValue("${value}")`);
3270
+ appilotsDebugLog(
3271
+ `formFillHandler: found field "${fieldId}" via registry, calling setValue(<${String(value).length} chars>)`
3272
+ );
3271
3273
  const beforeValue = effectiveFieldType === "date" ? fieldEntry.getValue?.() ?? "" : void 0;
3272
3274
  fieldEntry.focus?.();
3273
3275
  fieldEntry.setValue(String(value));
@@ -3297,7 +3299,7 @@ async function formFillHandler(payload, context) {
3297
3299
  }
3298
3300
  if (!selectValueApplied(fieldId, value, after, registry)) {
3299
3301
  appilotsDebugWarn(
3300
- `formFillHandler: select field "${fieldId}" setValue("${value}") did not stick (current="${after}"), trying visible choice fallback`
3302
+ `formFillHandler: select field "${fieldId}" setValue did not stick (wrote <${String(value).length} chars>, current is <${String(after ?? "").length} chars>), trying visible choice fallback`
3301
3303
  );
3302
3304
  const selectResult = await selectVisibleChoice(fieldId, value, registry, {
3303
3305
  allowFirstVisibleWhenNoCue: !selectedChoiceThisBatch
@@ -1,4 +1,4 @@
1
- import { useAppilotsContext, setNavigationRef, setCurrentScreen } from './chunk-JBOLV5AM.mjs';
1
+ import { useAppilotsContext, setNavigationRef, setCurrentScreen } from './chunk-4GUPZDWT.mjs';
2
2
  import React, { useRef, useCallback, useEffect } from 'react';
3
3
 
4
4
  function getActiveRouteName(state) {