hacifootprint

ActionRegistry

Class: ActionRegistry

Defined in: src/registry/registry.ts:125

Constructors

Constructor

new ActionRegistry(warn?): ActionRegistry

Defined in: src/registry/registry.ts:135

Parameters

warn?

(message) => void

Returns

ActionRegistry

Methods

bindingRegistrations()

bindingRegistrations(): BindingRegistration[]

Defined in: src/registry/registry.ts:316

Every structured live binding, without the legacy compatibility rows.

Returns

BindingRegistration[]


bindingsFor()

bindingsFor(definition): BindingRegistration[]

Defined in: src/registry/registry.ts:343

Every live binding of one definition, in connection order.

Parameters

definition

ActionDefinitionRef

Returns

BindingRegistration[]


busyOf()

busyOf(affordanceId): string | undefined

Defined in: src/registry/registry.ts:274

The app's own busy label for a registered tool, or undefined if it has not said.

Parameters

affordanceId

string

Returns

string | undefined


handlerFor()

handlerFor(affordanceId): ActionHandler | undefined

Defined in: src/registry/registry.ts:296

Parameters

affordanceId

string

Returns

ActionHandler | undefined


handlerForBinding()

handlerForBinding(binding): ActionHandler | undefined

Defined in: src/registry/registry.ts:330

Resolve the handler for one exact structured binding.

Parameters

binding

ActionBindingRef

Returns

ActionHandler | undefined


hasAny()

hasAny(): boolean

Defined in: src/registry/registry.ts:305

True when anything is registered — the signal that materialization is meaningful.

Returns

boolean


isEnabled()

isEnabled(affordanceId): boolean | undefined

Defined in: src/registry/registry.ts:269

Whether a registered tool is currently clickable. Undefined if not registered.

Parameters

affordanceId

string

Returns

boolean | undefined


isRegistered()

isRegistered(affordanceId): boolean

Defined in: src/registry/registry.ts:300

Parameters

affordanceId

string

Returns

boolean


register()

register(group, affordanceId, handler, enabled?, busy?): void

Defined in: src/registry/registry.ts:139

Parameters

group

string

affordanceId

string

handler

ActionHandler

enabled?

boolean = true

busy?

string

Returns

void


registerBinding()

registerBinding(group, binding, handler, enabled?, busy?, options?): void

Defined in: src/registry/registry.ts:183

Register one exact live binding. Unlike the compatibility door above, a second binding of the same definition coexists and receives no duplicate warning: one definition mounted in many rows is the intended shape.

Parameters

group

string

binding

ActionBindingRef

handler

ActionHandler

enabled?

boolean = true

busy?

string

options?
attached?

boolean

coverage?

BindingCoverage

humanReporting?

HumanReporting

input?

() => unknown

locators?

readonly Binding[]

readBusy?

() => string | undefined

readEnabled?

() => boolean | undefined

Returns

void


registrationFor()

registrationFor(binding): BindingRegistration | undefined

Defined in: src/registry/registry.ts:335

A copy of one exact structured registration, or nothing once disconnected.

Parameters

binding

ActionBindingRef

Returns

BindingRegistration | undefined


registrations()

registrations(): Registration[]

Defined in: src/registry/registry.ts:309

Returns

Registration[]


setBindingBusy()

setBindingBusy(binding, busy): boolean

Defined in: src/registry/registry.ts:371

Set or clear the busy label on one binding without changing any sibling.

Parameters

binding

ActionBindingRef

busy

string | undefined

Returns

boolean


setBindingEnabled()

setBindingEnabled(binding, enabled): boolean

Defined in: src/registry/registry.ts:362

Flip enabledness on one binding without changing any sibling.

Parameters

binding

ActionBindingRef

enabled

boolean

Returns

boolean


setBusy()

setBusy(affordanceId, busy): boolean

Defined in: src/registry/registry.ts:259

Say (or stop saying) that a registered tool is working right now. Same contract as setEnabled: true only on a real change, so the caller bumps the world exactly once. undefined DELETES the key rather than storing one — absence is how this library spells "the app has not said".

Parameters

affordanceId

string

busy

string | undefined

Returns

boolean


setEnabled()

setEnabled(affordanceId, enabled): boolean

Defined in: src/registry/registry.ts:245

Flip a registered tool between clickable and greyed-out. Returns true if the state actually changed (so the caller can bump the version / emit only on a real change). No-op + false if the id isn't registered.

Parameters

affordanceId

string

enabled

boolean

Returns

boolean


touchBinding()

touchBinding(binding): boolean

Defined in: src/registry/registry.ts:439

Mark an attachment-host replacement whose public facts are otherwise equal.

Parameters

binding

ActionBindingRef

Returns

boolean


unregisterBinding()

unregisterBinding(binding): boolean

Defined in: src/registry/registry.ts:447

Disconnect one exact binding. Idempotent.

Parameters

binding

ActionBindingRef

Returns

boolean


unregisterGroup()

unregisterGroup(group): string[]

Defined in: src/registry/registry.ts:279

Remove every registration currently owned by group. Returns the removed ids.

Parameters

group

string

Returns

string[]


updateBinding()

updateBinding(binding, update): boolean

Defined in: src/registry/registry.ts:381

Replace committed facts for one stable binding identity.

Parameters

binding

ActionBindingRef

update
attached?

boolean

coverage?

BindingCoverage

humanReporting?

HumanReporting

input?

() => unknown

locators?

readonly Binding[]

readBusy?

() => string | undefined

readEnabled?

() => boolean | undefined

Returns

boolean

On this page