Skip to content

Supplied component participation

All eleven supplied elements have registration-free @atheory-ai/kitsune-ui/elements/kit-* class entries and /components/kit-* factory entries. The root package provides generic authoring; select /register explicitly for the catalog and /theme/tokens.css for default CSS. Build each artifact definition once per immutable version, then use app attachment/delivery with a trusted host connection. No supplied factory creates a runtime or chooses storage.

The additional factories accept exact requirements/object slots, optional property query bindings, fixed semantic interactions mapped to commands, and a trusted synchronous render(element, properties) callback for rich slots. Return cleanup for owned nodes/listeners. Callbacks belong in executable modules; retained envelopes contain JSON metadata. Tabs retain their existing keyed text-panel factory contract.

ComponentCommand event/detailBinding properties
Buttonkit-button-activate: {}type, disabled
CardNoneSlotted header/body/footer
Disclosurekit-disclosure-request: { open }open, summary
Dialogkit-dialog-close-request: { returnValue }open, modal, label
FieldNonelabel, description, error, required, invalid
Formkit-form-submit-request: { formName, values }; kit-form-reset-request: {}name, noValidate
Inputkit-input-change: { name, value, formName? }Input properties including value/validation
Selectkit-select-change: { name, value, formName? }name, value, required, disabled
TableNoneNative table slot
Toast regionNoneautoDismissMs, notifications

A binding returns the declared property’s JSON value. Invalid output reports unavailable state and gates commands. kitParticipation and composed kit-participation-change expose phase/pending/errors/commands/draftConflict/draftRecovery; the containing UI renders feedback. aria-busy and data-kit-phase mirror state. Attachment reports missing hosts/incompatible requirements before creating the hook.

Buttons preserve focus while pending. Controlled disclosures/dialogs request changes while bound open state remains authoritative, including native keyboard/Escape behavior. Silent query updates create no command. An unavailable dialog binding closes the modal to release focus; a valid open snapshot can reopen it silently. Original standalone behavior and semantic events remain available.

Input/select drafts retain native form association, validation, input/change/reset behavior. Pristine values hydrate silently; edited values survive conflicting snapshots, acknowledgment and submit. Reattachment preserves the draft and flags it for host review. Input/select factories also support opt-in scoped persisted recovery through their public value/form APIs; storage writes and resolution policy remain host work. Pending projections are suppressed without replay.

Form commands project strings/repeated string arrays. The original event retains DOM/FormData/file values; files produce a projection error for the JSON path and require an upload capability. Field projections exclude surrounding form data. Generated input/select tags keep field labels/descriptions on their native controls.

Cards/tables preserve rich slots without invented operations. Notification snapshots preserve live-region/status/alert roles and schedule no dismissal timers; local imperative methods retain timed behavior and release timers on detach/session cleanup. The host chooses persistence and authority separately.

For input/select factories, configure recovery: { object: 'record', draftId: { source: 'property', name: 'draftId' }, field: { source: 'property', name: 'name' } }. Literal string selectors are also supported. Supply name/draftId as view properties, and configure the trusted browser host with a ready surface restorer and exact view ID. Use matching object/value query revision semantics.

The optional kitParticipation.draftRecovery reports empty/waiting/applied/conflict/retained/unavailable, including validated records, revision/error details and restoration origin. Eligible string fields restore through public value/ElementInternals APIs without edit, submit or command events. Queries and records stay distinct from working drafts. Once restored, later notifications do not overwrite edits or native resets.

Initial conflicts show current authority and retain the saved draft for review; live conflicts preserve the existing working value. Working edits made before recovery retain both values. Missing drafts allow normal fresh interaction; unresolved/conflicting/unavailable recovery gates mapped field commands. A host explicitly resolves/merges/discards conflicts and replaces the view when required. No operation is replayed or draft automatically cleared.

Select values must match an existing option. Non-string or browser-sanitized input values, wrong objects/scopes, corrupt/unsupported records and removed options are reported without substitution. Removal/session changes suppress late application and release listeners while the environment remains borrowed.

Hosts choose storage and persist scoped draft records only for new user edits, preserving their original base revision. Restoration/status events must not trigger writes. Local reload acceptance proves silence and byte retention for this profile; remote production storage/transport requires its own integration.

Use core createKitDraftResolution outside the input/select renderer for explicit keep/current/edited-value decisions and Save/Inspect actions. Capture the revision presented to the user, validate native controls before Save, and apply revised drafts through restoration plus explicit replacement when required. Choosing current values still retains a draft until a matching save acknowledgment. The host atomically stores draft plus pinned submission and projects the active draft into the read-only restorer.

Accepted/unknown saves retain identity across reload and block resending. Inspect the original receipt; equal current values and missing receipts are inconclusive. Clear only the exact acknowledged submitted draft, preserving newer edits and recoverable pending data on cleanup failure. The native resolution fixture proves both controls, silent choices, validation, local reload and no replay; production storage/transport and product merge policy remain host responsibilities.