@everframe/react-native 1.3.0 → 1.4.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.
@@ -1,6 +1,8 @@
1
- import { E as ErrorCaptureStatus, P as PromiseRejectionStatus, R as ReportDeliveryStatus } from './promise-rejection-types-CiyBTz7v.js';
2
- export { a as ErrorCaptureCounters, b as ErrorCaptureOutcome, c as ErrorCapturePath, d as PromiseRejectionCounters, e as RejectionReason, f as ReportCaptureOutcome, g as ReportCapturePath, h as ReportCapturePathStatus, i as ReportDeliveryReason, j as ReportQueueOperation, k as ReportQueueStatus, l as ReportStorageFailure, m as ReportTransportOrigin, n as ReportTransportOutcome, o as ReportTransportStatus } from './promise-rejection-types-CiyBTz7v.js';
1
+ import { E as ErrorCaptureStatus, P as PromiseRejectionStatus, R as ReportDeliveryStatus, c as ReporterTrigger, k as PermissionResult, L as LaunchContext, e as InteractionHookOptions, C as ControlChangeInput, S as ScrollInput, d as InteractionTargetAnnotation } from './launch-BvE4IjRk.js';
2
+ export { f as ErrorCaptureCounters, g as ErrorCaptureOutcome, h as ErrorCapturePath, H as HelperType, I as InteractionPolicyOptions, l as PromiseRejectionCounters, m as RejectionReason, n as ReportCaptureOutcome, o as ReportCapturePath, p as ReportCapturePathStatus, q as ReportDeliveryReason, s as ReportQueueOperation, t as ReportQueueStatus, u as ReportStorageFailure, v as ReportTransportOrigin, w as ReportTransportOutcome, x as ReportTransportStatus, a as ReporterOpenOptions } from './launch-BvE4IjRk.js';
3
+ import * as React from 'react';
3
4
  export * from '@everframe/react';
5
+ import 'zod';
4
6
 
5
7
  /** Hermes observation is separate from the browser SDK's own rejection handling. */
6
8
  declare function getPromiseRejectionStatus(): PromiseRejectionStatus;
@@ -10,4 +12,25 @@ declare function getErrorCaptureStatus(): ErrorCaptureStatus;
10
12
 
11
13
  declare function getReportDeliveryStatus(): ReportDeliveryStatus;
12
14
 
13
- export { ErrorCaptureStatus, PromiseRejectionStatus, ReportDeliveryStatus, getErrorCaptureStatus, getPromiseRejectionStatus, getReportDeliveryStatus };
15
+ /** Native target annotations are a harmless no-op on web. */
16
+ declare function useEverframeTarget<T>(_annotation?: InteractionTargetAnnotation): React.RefCallback<T>;
17
+
18
+ /** Native semantic helpers are inert on the browser entry. */
19
+ declare function useEverframeInteraction<T>(_options?: InteractionHookOptions): {
20
+ ref: React.RefCallback<T>;
21
+ textChanged: (text: string, options?: {
22
+ composing?: boolean;
23
+ reason?: "change" | "end" | "submit";
24
+ }) => void;
25
+ controlChanged: (change: ControlChangeInput) => void;
26
+ scrollSettled: (change: ScrollInput) => void;
27
+ };
28
+
29
+ declare function observePermissionRequest<T>(_permission: string, operation: () => Promise<T>, _mapResult?: (result: T) => PermissionResult): Promise<T>;
30
+ declare function recordLaunchContext(_context: LaunchContext): void;
31
+
32
+ /** Native reporter lifecycle markers are inert on the browser entry. */
33
+ declare function markReporterOpened(_trigger: ReporterTrigger): Promise<void>;
34
+ declare function markReporterClosed(): Promise<void>;
35
+
36
+ export { ControlChangeInput, ErrorCaptureStatus, InteractionHookOptions, InteractionTargetAnnotation, LaunchContext, PermissionResult, PromiseRejectionStatus, ReportDeliveryStatus, ReporterTrigger, ScrollInput, getErrorCaptureStatus, getPromiseRejectionStatus, getReportDeliveryStatus, markReporterClosed, markReporterOpened, observePermissionRequest, recordLaunchContext, useEverframeInteraction, useEverframeTarget };
package/dist/index.web.js CHANGED
@@ -1 +1 @@
1
- import{a as r,c as e,e as o}from"./chunk-UN3Q4UGZ.js";import{a as t}from"./chunk-XUSV3KOD.js";export*from"@everframe/react";function a(){return o("unsupported","platform")}t(a,"getPromiseRejectionStatus");function s(){return e("unsupported","platform")}t(s,"getErrorCaptureStatus");function n(){return r("unsupported","platform")}t(n,"getReportDeliveryStatus");export{s as getErrorCaptureStatus,a as getPromiseRejectionStatus,n as getReportDeliveryStatus};
1
+ import{a as o,c as n,e as p}from"./chunk-UN3Q4UGZ.js";import{a as t}from"./chunk-XUSV3KOD.js";export*from"@everframe/react";function m(){return p("unsupported","platform")}t(m,"getPromiseRejectionStatus");function l(){return n("unsupported","platform")}t(l,"getErrorCaptureStatus");function f(){return o("unsupported","platform")}t(f,"getReportDeliveryStatus");var i=t(r=>{},"noopTargetRef");function y(r){return i}t(y,"useEverframeTarget");var e=t(()=>{},"noopInteraction");function g(r){return{ref:i,textChanged:e,controlChanged:e,scrollSettled:e}}t(g,"useEverframeInteraction");async function x(r,s,a){return s()}t(x,"observePermissionRequest");function C(r){}t(C,"recordLaunchContext");async function j(r){}t(j,"markReporterOpened");async function S(){}t(S,"markReporterClosed");export{l as getErrorCaptureStatus,m as getPromiseRejectionStatus,f as getReportDeliveryStatus,S as markReporterClosed,j as markReporterOpened,x as observePermissionRequest,C as recordLaunchContext,g as useEverframeInteraction,y as useEverframeTarget};
@@ -1 +1 @@
1
- import{j as c}from"../chunk-MIWWEGLO.js";import"../chunk-UN3Q4UGZ.js";import{a as i}from"../chunk-XUSV3KOD.js";var g={log:"info",info:"info",warn:"warn",error:"error",debug:"debug"},a=2048;function p(t){let l=[...new Set(t?.levels??["log","info","warn","error"])];return{name:"console",setup(){let n=!1,e=[];for(let o of l){let r=console[o];if(typeof r!="function")continue;e.push({level:o,fn:r});let u=r.bind(console);console[o]=(...f)=>{if(u(...f),!n){n=!0;try{let s=v(f);s&&!s.startsWith("[everframe]")&&c({message:s,kind:"console",level:g[o]})}catch{}finally{n=!1}}}}return()=>{for(let{level:o,fn:r}of e)console[o]=r}}}}i(p,"consoleIntegration");function v(t){let n=t.map(e=>{if(typeof e=="string")return e;if(e instanceof Error)return e.message;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}).join(" ");return n.length>a?n.slice(0,a):n}i(v,"serializeArgs");export{p as consoleIntegration};
1
+ import{k as c}from"../chunk-FZHLCD3Z.js";import"../chunk-UN3Q4UGZ.js";import{a as i}from"../chunk-XUSV3KOD.js";var g={log:"info",info:"info",warn:"warn",error:"error",debug:"debug"},a=2048;function p(t){let l=[...new Set(t?.levels??["log","info","warn","error"])];return{name:"console",setup(){let n=!1,e=[];for(let o of l){let r=console[o];if(typeof r!="function")continue;e.push({level:o,fn:r});let u=r.bind(console);console[o]=(...f)=>{if(u(...f),!n){n=!0;try{let s=v(f);s&&!s.startsWith("[everframe]")&&c({message:s,kind:"console",level:g[o]})}catch{}finally{n=!1}}}}return()=>{for(let{level:o,fn:r}of e)console[o]=r}}}}i(p,"consoleIntegration");function v(t){let n=t.map(e=>{if(typeof e=="string")return e;if(e instanceof Error)return e.message;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}).join(" ");return n.length>a?n.slice(0,a):n}i(v,"serializeArgs");export{p as consoleIntegration};
@@ -1 +1 @@
1
- import{k as i}from"../chunk-MIWWEGLO.js";import"../chunk-UN3Q4UGZ.js";import{a as n}from"../chunk-XUSV3KOD.js";function o(t){let e=n(()=>{try{let a=t.navigationRef.getCurrentRoute?.()?.name;a&&i(a)}catch{}},"emit");return{name:"react-navigation",onReady:e,onStateChange:e,setup(){try{t.navigationRef.isReady()&&e()}catch{}try{return t.navigationRef.addListener("state",e)}catch{return}}}}n(o,"reactNavigationIntegration");export{o as reactNavigationIntegration};
1
+ import{l as i}from"../chunk-FZHLCD3Z.js";import"../chunk-UN3Q4UGZ.js";import{a as n}from"../chunk-XUSV3KOD.js";function o(t){let e=n(()=>{try{let a=t.navigationRef.getCurrentRoute?.()?.name;a&&i(a)}catch{}},"emit");return{name:"react-navigation",onReady:e,onStateChange:e,setup(){try{t.navigationRef.isReady()&&e()}catch{}try{return t.navigationRef.addListener("state",e)}catch{return}}}}n(o,"reactNavigationIntegration");export{o as reactNavigationIntegration};
@@ -1 +1 @@
1
- import{d as n,g as a}from"../chunk-MIWWEGLO.js";import"../chunk-UN3Q4UGZ.js";import{a as c}from"../chunk-XUSV3KOD.js";var d=Reflect.apply,u;function l(t,i){let r=a();if(!r){s();return}let p=n(),o;try{if(i!=null){let e=Object.getOwnPropertyDescriptor(i,"componentStack");e&&"value"in e&&typeof e.value=="string"&&(o=e.value)}}catch{}try{let e=r.captureException;if(a()!==r||n()!==p)return;d(e,r,[t,{context:"react.error-boundary",...o!==void 0?{metadata:{componentStack:o}}:{}}])}catch{}}c(l,"captureReactError");function s(){try{let t=n();if(u===t||typeof __DEV__>"u"||!__DEV__)return;u=t,console.warn("[everframe] captureReactError: no EverframeProvider is mounted, so this error was not captured. Render the error boundary inside <EverframeProvider>; errors caught during its first commit are not captured.")}catch{}}c(s,"warnNotMounted");export{l as captureReactError};
1
+ import{e as n,h as a}from"../chunk-FZHLCD3Z.js";import"../chunk-UN3Q4UGZ.js";import{a as c}from"../chunk-XUSV3KOD.js";var d=Reflect.apply,u;function l(t,i){let r=a();if(!r){s();return}let p=n(),o;try{if(i!=null){let e=Object.getOwnPropertyDescriptor(i,"componentStack");e&&"value"in e&&typeof e.value=="string"&&(o=e.value)}}catch{}try{let e=r.captureException;if(a()!==r||n()!==p)return;d(e,r,[t,{context:"react.error-boundary",...o!==void 0?{metadata:{componentStack:o}}:{}}])}catch{}}c(l,"captureReactError");function s(){try{let t=n();if(u===t||typeof __DEV__>"u"||!__DEV__)return;u=t,console.warn("[everframe] captureReactError: no EverframeProvider is mounted, so this error was not captured. Render the error boundary inside <EverframeProvider>; errors caught during its first commit are not captured.")}catch{}}c(s,"warnNotMounted");export{l as captureReactError};