/** * Copyright (c) 2026 Sergio Turolla * * This file is part of @r-machine/react, licensed under the * GNU Affero General Public License v3.0 (AGPL-3.0-only). * * You may use, modify, and distribute this file under the terms * of the AGPL-3.0. See LICENSE in this package for details. * * If you need to use this software in a proprietary project, * contact: licensing@codecarvings.com */ import type { AnyResAtlas, ExperimentalFlags, ResEquipment, SwitchableOption } from "r-machine/core"; import type { AnyLocale } from "r-machine/locale"; import { Strategy } from "r-machine/strategy"; import type { ReactPlugKitMap } from "./react-plug.js"; import { type ReactImpl, type ReactToolset } from "./react-toolset.js"; export interface ReactStrategyConfig> { readonly kit: KM; /** * Enable coexistence with React Compiler. When `true`, reactive surfaces * returned by `plug.useR()` are handed a fresh identity per reactive * re-render so the compiler re-evaluates the scopes that read them. Off by * default and DISCOURAGED: R-Machine reactivity is already read-driven, so * the compiler adds little benefit while this wrapping adds overhead. */ readonly reactCompiler: SwitchableOption; } type AnyReactStrategyConfig = ReactStrategyConfig>; export interface ReactStrategyConfigParams> { readonly kit?: KM; readonly reactCompiler?: SwitchableOption; } export declare abstract class ReactStrategyCore, EF extends ExperimentalFlags, C extends AnyReactStrategyConfig> extends Strategy { static readonly defaultConfig: ReactStrategyConfig; protected abstract createImpl(): Promise>; createToolset(): Promise>; } export {};