# Bone Flow #119 — State

Status: Development Candidate  
Package: 1.0.26  
Runtime: BoneState 1.0.0  
HTML Functional Class Runtime: 1.0.4  
HTML Functional Class: `bf-state`

## Purpose

#119 State holds **what state a Target UI / Part is in now**. `Normal / Hover / Focus / Active / Disabled / Selected / Checked / Error` are representative examples, not a closed enum.

## Basic use

1. choose Target UI and Part KEY
2. set Current State
3. downstream logic reads Current/Previous State or the OUT payload

The Preview makes State changes visible, but its borders/opacity/error look are Consumer-side demonstration only.

## Runtime

```js
const state = BoneState.create({
  stateUiNo: "UI-119-001",
  targetUiNo: "UI-042-001",
  targetPart: "whole",
  state: "Normal"
});
BoneState.attach(state, targetElement);
BoneState.setState(state, "Error");
BoneState.getState(state);
```

## HTML Functional Class

`bf-state` is the normal HTML entry for a **State Relation Controller**. The controller and Target UI are separate.

```html
<div class="bf-state"
     data-state-ui-no="UI-119-001"
     data-target-ui-no="UI-042-001"
     data-target-part="whole"
     data-state="Error"></div>
<button data-ui-no="UI-042-001">Save</button>
```

## State Relation Image

#119 owns State semantics. The visible relation lines/endpoints/error markers are drawn by **#002 Bone Joint v1.1.36**. The technical relation section checks attached, missing Target UI, and missing Target Part cases. It does not use a CSS pseudo-line as the formal Joint rendering.

## Security

Security Test is isolated from the normal Preview. Unsafe semantic state input, unsafe Target tokens, and accessor/getter payloads are blocked while preserving the normal Preview. The Security relation path and BLOCK marker are also rendered with #002 Bone Joint.

## OUT WAIT / FIFO / BLOCKED

Delivery state is delegated to #002 Joint:

- WAIT keeps the Joint connected, shows the official WAIT spinner, queues State OUT payloads, then drains FIFO when Target becomes READY.
- BLOCKED keeps the Joint connected, shows the official blocked marker, and does not deliver the blocked State payload.

## Smoke / Validation

Use `Smoke Test 実行`, `Validation 実行`, or `全テスト実行`. `Overall` is ALL PASS only after both suites execute with zero failures. Runtime Console is diagnostic output; it does not force PASS.

## Completion

Completion is available only after the Runtime QA gate and required visual confirmation. User localhost confirmation remains separate from package-build QA.

## Package boundary

Package 1.0.26 does not include or overwrite the cumulative regression runner or `index.html`. Frozen Components remain outside this package.
