babel-plugin-react-compiler 0.0.0-experimental-0fa1c14-20250606 → 0.0.0-experimental-87dbe21-20250610

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.ts CHANGED
@@ -109,7 +109,7 @@ type TypeId = number & {
109
109
  [opaqueTypeId]: 'IdentifierId';
110
110
  };
111
111
 
112
- type HookKind = 'useContext' | 'useState' | 'useActionState' | 'useReducer' | 'useRef' | 'useEffect' | 'useLayoutEffect' | 'useInsertionEffect' | 'useMemo' | 'useCallback' | 'useTransition' | 'useImperativeHandle' | 'Custom';
112
+ type HookKind = 'useContext' | 'useState' | 'useActionState' | 'useReducer' | 'useRef' | 'useEffect' | 'useLayoutEffect' | 'useInsertionEffect' | 'useMemo' | 'useCallback' | 'useTransition' | 'useImperativeHandle' | 'useEffectEvent' | 'Custom';
113
113
  type FunctionSignature = {
114
114
  positionalParams: Array<Effect>;
115
115
  restParam: Effect | null;
package/dist/index.js CHANGED
@@ -68600,6 +68600,9 @@ function isDispatcherType(id) {
68600
68600
  function isFireFunctionType(id) {
68601
68601
  return id.type.kind === "Function" && id.type.shapeId === "BuiltInFireFunction";
68602
68602
  }
68603
+ function isEffectEventFunctionType(id) {
68604
+ return id.type.kind === "Function" && id.type.shapeId === "BuiltInEffectEventFunction";
68605
+ }
68603
68606
  function isStableType(id) {
68604
68607
  return isSetStateType(id) || isSetActionStateType(id) || isDispatcherType(id) || isUseRefType(id) || isStartTransitionType(id);
68605
68608
  }
@@ -71805,6 +71808,8 @@ var BuiltInUseTransitionId = "BuiltInUseTransition";
71805
71808
  var BuiltInStartTransitionId = "BuiltInStartTransition";
71806
71809
  var BuiltInFireId = "BuiltInFire";
71807
71810
  var BuiltInFireFunctionId = "BuiltInFireFunction";
71811
+ var BuiltInUseEffectEventId = "BuiltInUseEffectEvent";
71812
+ var BuiltinEffectEventId = "BuiltInEffectEventFunction";
71808
71813
  var ReanimatedSharedValueId = "ReanimatedSharedValueId";
71809
71814
  var BUILTIN_SHAPES = /* @__PURE__ */ new Map();
71810
71815
  addObject(BUILTIN_SHAPES, BuiltInPropsId, [
@@ -72506,6 +72511,18 @@ addObject(BUILTIN_SHAPES, BuiltInUseRefId, [
72506
72511
  addObject(BUILTIN_SHAPES, BuiltInRefValueId, [
72507
72512
  ["*", { kind: "Object", shapeId: BuiltInRefValueId }]
72508
72513
  ]);
72514
+ addFunction(
72515
+ BUILTIN_SHAPES,
72516
+ [],
72517
+ {
72518
+ positionalParams: [],
72519
+ restParam: "mutate?" /* ConditionallyMutate */,
72520
+ returnType: { kind: "Poly" },
72521
+ calleeEffect: "mutate?" /* ConditionallyMutate */,
72522
+ returnValueKind: "mutable" /* Mutable */
72523
+ },
72524
+ BuiltinEffectEventId
72525
+ );
72509
72526
  addObject(BUILTIN_SHAPES, BuiltInMixedReadonlyId, [
72510
72527
  [
72511
72528
  "toString",
@@ -77393,6 +77410,27 @@ var REACT_APIS = [
77393
77410
  },
77394
77411
  BuiltInFireId
77395
77412
  )
77413
+ ],
77414
+ [
77415
+ "useEffectEvent",
77416
+ addHook(
77417
+ DEFAULT_SHAPES,
77418
+ {
77419
+ positionalParams: [],
77420
+ restParam: "freeze" /* Freeze */,
77421
+ returnType: {
77422
+ kind: "Function",
77423
+ return: { kind: "Poly" },
77424
+ shapeId: BuiltinEffectEventId,
77425
+ isConstructor: false
77426
+ },
77427
+ calleeEffect: "read" /* Read */,
77428
+ hookKind: "useEffectEvent",
77429
+ // Frozen because it should not mutate any locally-bound values
77430
+ returnValueKind: "frozen" /* Frozen */
77431
+ },
77432
+ BuiltInUseEffectEventId
77433
+ )
77396
77434
  ]
77397
77435
  ];
77398
77436
  TYPED_GLOBALS.push(
@@ -92021,7 +92059,7 @@ function inferEffectDependencies(fn) {
92021
92059
  }
92022
92060
  const usedDeps = [];
92023
92061
  for (const maybeDep of minimalDeps) {
92024
- if ((isUseRefType(maybeDep.identifier) || isSetStateType(maybeDep.identifier)) && !reactiveIds.has(maybeDep.identifier.id) || isFireFunctionType(maybeDep.identifier)) {
92062
+ if ((isUseRefType(maybeDep.identifier) || isSetStateType(maybeDep.identifier)) && !reactiveIds.has(maybeDep.identifier.id) || isFireFunctionType(maybeDep.identifier) || isEffectEventFunctionType(maybeDep.identifier)) {
92025
92063
  continue;
92026
92064
  }
92027
92065
  const dep = truncateDepAtCurrent(maybeDep);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babel-plugin-react-compiler",
3
- "version": "0.0.0-experimental-0fa1c14-20250606",
3
+ "version": "0.0.0-experimental-87dbe21-20250610",
4
4
  "description": "Babel plugin for React Compiler.",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",