updated skills

This commit is contained in:
2026-06-09 21:06:27 +01:00
parent db1ce43ee1
commit 427a5bd919
1283 changed files with 24684 additions and 2313 deletions

View File

@@ -63,4 +63,3 @@ The coverage gate is 100/100/100/100 (istanbul). The package's
`tests/setup/polyfills.ts` registers an in-memory `MeterProvider` before
source modules import the OTel meter so the telemetry assertions resolve
against a real exporter, with no mocks.

View File

@@ -85,30 +85,30 @@ type error in strict-mode consumers.
## API Reference
- `CONTROLLER_CODES`
- `INVALID_OPTIONS` — Zod boundary rejected the constructor options
- `INVALID_OPTIONS` — Zod boundary rejected the constructor options
bundle; `context.issues` carries the Zod issue array.
- `INVALID_INPUT_KEY` — `setThreshold` (or future device adapters)
- `INVALID_INPUT_KEY` — `setThreshold` (or future device adapters)
received an input key not present in `CONTROLLER_INPUT_KEYS`.
- `DESTROYED_INSTANCE` — operation attempted after `destroy()` on an
- `DESTROYED_INSTANCE` — operation attempted after `destroy()` on an
instance that does not silently no-op (strict-mode opt-in).
- `KEYBOARD_TARGET_MISSING` — `KeyboardController.attach()` was
- `KEYBOARD_TARGET_MISSING` — `KeyboardController.attach()` was
called but neither an `EventTargetLike` was injected nor a global
`window` was discoverable; `context.target` reports the resolved
value.
- `INVALID_KEY_MAP` — `KeyboardController` received a `keyMap` whose
- `INVALID_KEY_MAP` — `KeyboardController` received a `keyMap` whose
value is not one of `CONTROLLER_INPUT_KEYS`; `context.entry`
carries the `[key, input]` tuple that failed validation.
- `GAMEPAD_API_UNAVAILABLE` — `GamepadController.update()` was
- `GAMEPAD_API_UNAVAILABLE` — `GamepadController.update()` was
called but neither a `GamepadSource` was injected nor a global
`navigator.getGamepads` was discoverable.
- `INVALID_GAMEPAD_MAP` — `GamepadController` received a
- `INVALID_GAMEPAD_MAP` — `GamepadController` received a
`buttonMap`/`axisMap` whose value targets an input key not present
in `CONTROLLER_INPUT_KEYS`; `context.entry` carries the failing
tuple.
- `DUPLICATE_CHILD` — `ControllerMerger.addController()` received a
- `DUPLICATE_CHILD` — `ControllerMerger.addController()` received a
child already attached, or a second child whose `id` collides with
an existing one; `context` carries the child id.
- `UNKNOWN_CHILD` — `ControllerMerger.removeController()` was called
- `UNKNOWN_CHILD` — `ControllerMerger.removeController()` was called
with a child that is not currently attached.
- `ControllerCode` — literal union of every code string.
- `class ControllerError extends SuaveplanError<ControllerCode>` —

View File

@@ -98,15 +98,15 @@ console.log(gp.getValue("right")); // 191
## API Reference
- `class GamepadController extends BaseController`
- `constructor(options?: GamepadControllerOptions)`
- `update(): void` — polls the source, diffs against last frame,
- `constructor(options?: GamepadControllerOptions)`
- `update(): void` — polls the source, diffs against last frame,
pushes updates through `setState()`. Throws
`ControllerError(GAMEPAD_API_UNAVAILABLE)` when no source is
available. No-op after `destroy()`.
- `getDeadzone(): number` — resolved deadzone.
- `getPadIndex(): number` — bound pad index.
- `getButtonMap(): GamepadButtonMap` — immutable button map.
- `getAxisMap(): GamepadAxisMap` — immutable axis map.
- `getDeadzone(): number` — resolved deadzone.
- `getPadIndex(): number` — bound pad index.
- `getButtonMap(): GamepadButtonMap` — immutable button map.
- `getAxisMap(): GamepadAxisMap` — immutable axis map.
- `DEFAULT_GAMEPAD_BUTTON_MAP: GamepadButtonMap` — W3C standard
mapping.
- `DEFAULT_GAMEPAD_AXIS_MAP: GamepadAxisMap` — W3C standard axis

View File

@@ -91,15 +91,15 @@ kb.destroy();
## API Reference
- `class KeyboardController extends BaseController`
- `constructor(options?: KeyboardControllerOptions)`
- `attach(): void` — bind `keydown`/`keyup` to the resolved
- `constructor(options?: KeyboardControllerOptions)`
- `attach(): void` — bind `keydown`/`keyup` to the resolved
target. Throws `ControllerError(KEYBOARD_TARGET_MISSING)` when
no target is available.
- `detach(): void` — idempotent removal of listeners.
- `getPressedKeys(): readonly string[]` — snapshot of physical
- `detach(): void` — idempotent removal of listeners.
- `getPressedKeys(): readonly string[]` — snapshot of physical
keys currently held down (by `code` or `key` identifier).
- `getKeyMap(): KeyboardKeyMap` — immutable key → input map.
- `destroy(): void` — detaches listeners and clears state.
- `getKeyMap(): KeyboardKeyMap` — immutable key → input map.
- `destroy(): void` — detaches listeners and clears state.
- `DEFAULT_KEYBOARD_KEY_MAP: KeyboardKeyMap` — frozen default map
used when `options.keyMap` is omitted.
- `interface KeyboardControllerOptions extends BaseControllerOptions`

View File

@@ -114,27 +114,27 @@ merger.destroy(); // destroys padB as well
## API Reference
- `class ControllerMerger extends BaseController`
- `constructor(options?: ControllerMergerOptions)` — accepts every
- `constructor(options?: ControllerMergerOptions)` — accepts every
`BaseControllerOptions` field plus `children?: readonly BaseController[]`
seeded eagerly via `addController()`.
- `addController(child: BaseController): void` — subscribes to
- `addController(child: BaseController): void` — subscribes to
`onAnyInput` + `onCombo`, captures the current snapshot, marks the
merger dirty. Throws `CONTROLLER.DUPLICATE_CHILD` on identity or
`id` collision.
- `removeController(child: BaseController): void` — disposes
- `removeController(child: BaseController): void` — disposes
subscriptions, drops the snapshot, marks dirty. Throws
`CONTROLLER.UNKNOWN_CHILD` when the child is not attached.
- `getChildren(): MergerChildren` — read-only snapshot of children
- `getChildren(): MergerChildren` — read-only snapshot of children
in insertion order.
- `get childCount(): number` — current attachment count.
- `update(): void` — polls every child, then runs the per-field max
- `get childCount(): number` — current attachment count.
- `update(): void` — polls every child, then runs the per-field max
reduction over `CONTROLLER_INPUT_KEYS` and routes diffs through
`updateInput` so threshold/deadzone gating + event emission stay
consistent.
- `destroy(): void` — disposes all subscriptions, destroys every
- `destroy(): void` — disposes all subscriptions, destroys every
child, clears local state, then defers to `BaseController.destroy`.
- `interface ControllerMergerOptions extends BaseControllerOptions`
- `children?: readonly BaseController[]` — initial seed.
- `children?: readonly BaseController[]` — initial seed.
- `type MergerChildren = readonly BaseController[]`
## Implementation Notes