import { CustomCommandRegistration, CustomCommandRegistrationResult, SuperDocUIScope } from './types.js';
/**
 * Internal collaborator the scope needs from its owner (the
 * controller, or a parent scope). Kept narrow so the scope module
 * does not transitively depend on the entire controller surface.
 */
export interface ScopeOwner {
    /**
     * Forward a custom-command registration to whoever owns the
     * underlying registry (always the controller in practice). Child
     * scopes share their parent's `register`, which ultimately points at
     * the same `customCommandsRegistry.register` instance.
     */
    register<TPayload, TValue>(registration: CustomCommandRegistration<TPayload, TValue>): CustomCommandRegistrationResult<TPayload, TValue>;
    /**
     * Tell the owner this scope is alive so the owner can cascade-destroy.
     * Returns an `untrack` function the scope calls during its own
     * teardown so the owner does not hold a stale reference after the
     * scope is gone.
     */
    trackScope(scope: SuperDocUIScope): () => void;
}
/**
 * Create a new {@link SuperDocUIScope}. Internal helper: the public
 * entry point is `ui.createScope()`, which calls this with the
 * controller as the owner.
 */
export declare function createScope(owner: ScopeOwner): SuperDocUIScope;
//# sourceMappingURL=scope.d.ts.map