riginalCreateHeadlessContext();
                        return { ...ctx, ...api };
                    };

                    console.log('‚úÖ useState APIs injected into context creation methods');
                    if (props.debug) {
                        console.log('Available methods:', Object.keys(api));
                    }
                },

                onUnregister: () => {
                    stateCache.clear();
                    subscriberCache.clear();
                    console