# yuiCommittedTextFieldAdapter

A yui committed text field adapter record carrying state, lastSequence, lastCompositionSequence, diagnostic.

Last updated: 2026-09-09

Package: frontend.yui | Status: source-declared

Tags: cpu, frontend, frontend.yui, method, source-example, thing, yeho, yui

Turn YUI models into a working frontend and its rendering/input adapters.

```yh
external thing yuiCommittedTextFieldAdapter
```

- yuiTextEditState state: Stores state as yuiTextEditState.
- int lastSequence: Stores last sequence as int.
- int lastCompositionSequence: Stores last composition sequence as int.
- text diagnostic: Stores diagnostic as text.
- yuiCommittedTextFieldAdapter(yuiTextEditState state): Yui committed text field adapter.
- Reject(text reason) returns bool: Reject.
- ApplyResult(text committed, text resultValue, yuiGraphemeMap resultMap, int resultCaret, text undoGroup) returns bool: Apply result.
- ApplyCommand(text command, bool extendSelection, text undoGroup) returns bool: Apply command.
- ApplyPointerCaret(int boundary, bool extendSelection) returns bool: Apply pointer caret.
- RequestClipboard(text operation) returns yuiClipboardRequest: Request clipboard.
- ApplyClipboardResult(yuiClipboardRequest request, text clipboardValue, text undoGroup) returns bool: Apply clipboard result.
- PollComposition(text source) returns bool: Poll composition.
- Poll(text undoGroup) returns bool: Poll.
- PollAtEnd(text undoGroup) returns bool: Poll at end.

## Use yuiCommittedTextFieldAdapter

A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.

Verification: type checked

```yh
using frontend.yui

// Turn YUI models into a working frontend and its rendering/input adapters.
yuiCommittedTextFieldAdapter sample = yuiCommittedTextFieldAdapter(yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook"))
Console.Log(Text.From(sample.lastSequence))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.frontend_yui__yuicommittedtextfieldadapter"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "frontend.yui"
version = "0.2.0"
path = "../../../yeho/packages/frontend/yui"

[[dependencies]]
package = "graphics.canvas"
version = "0.1.0"
path = "../../../yeho/packages/graphics/canvas"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.image.processing"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image/processing"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "input.text"
version = "0.1.0"
path = "../../../yeho/packages/input/text"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/frontend.yui--yuiCommittedTextFieldAdapter/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCommittedTextFieldAdapter.Reject

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using frontend.yui

// Reject.
yuiCommittedTextFieldAdapter instance = yuiCommittedTextFieldAdapter(yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook"))
text argument_reason = "argument reason"
bool result = instance.Reject(argument_reason)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.frontend_yui__yuicommittedtextfieldadapter"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "frontend.yui"
version = "0.2.0"
path = "../../../yeho/packages/frontend/yui"

[[dependencies]]
package = "graphics.canvas"
version = "0.1.0"
path = "../../../yeho/packages/graphics/canvas"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.image.processing"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image/processing"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "input.text"
version = "0.1.0"
path = "../../../yeho/packages/input/text"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/frontend.yui--yuiCommittedTextFieldAdapter/method-Reject-5 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCommittedTextFieldAdapter.ApplyResult

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using frontend.yui

// Apply result.
yuiCommittedTextFieldAdapter instance = yuiCommittedTextFieldAdapter(yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook"))
text argument_committed = "argument committed"
text argument_resultValue = "argument result Value"
yuiGraphemeMap argument_resultMap = yuiGraphemeMap(1, "example")
int argument_resultCaret = 1
text argument_undoGroup = "argument undo Group"
bool result = instance.ApplyResult(argument_committed, argument_resultValue, argument_resultMap, argument_resultCaret, argument_undoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.frontend_yui__yuicommittedtextfieldadapter"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "frontend.yui"
version = "0.2.0"
path = "../../../yeho/packages/frontend/yui"

[[dependencies]]
package = "graphics.canvas"
version = "0.1.0"
path = "../../../yeho/packages/graphics/canvas"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.image.processing"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image/processing"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "input.text"
version = "0.1.0"
path = "../../../yeho/packages/input/text"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/frontend.yui--yuiCommittedTextFieldAdapter/method-ApplyResult-6 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCommittedTextFieldAdapter.ApplyCommand

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using frontend.yui

// Apply command.
yuiCommittedTextFieldAdapter instance = yuiCommittedTextFieldAdapter(yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook"))
text argument_command = "argument command"
bool argument_extendSelection = true
text argument_undoGroup = "argument undo Group"
bool result = instance.ApplyCommand(argument_command, argument_extendSelection, argument_undoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.frontend_yui__yuicommittedtextfieldadapter"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "frontend.yui"
version = "0.2.0"
path = "../../../yeho/packages/frontend/yui"

[[dependencies]]
package = "graphics.canvas"
version = "0.1.0"
path = "../../../yeho/packages/graphics/canvas"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.image.processing"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image/processing"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "input.text"
version = "0.1.0"
path = "../../../yeho/packages/input/text"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/frontend.yui--yuiCommittedTextFieldAdapter/method-ApplyCommand-7 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCommittedTextFieldAdapter.ApplyPointerCaret

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using frontend.yui

// Apply pointer caret.
yuiCommittedTextFieldAdapter instance = yuiCommittedTextFieldAdapter(yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook"))
int argument_boundary = 1
bool argument_extendSelection = true
bool result = instance.ApplyPointerCaret(argument_boundary, argument_extendSelection)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.frontend_yui__yuicommittedtextfieldadapter"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "frontend.yui"
version = "0.2.0"
path = "../../../yeho/packages/frontend/yui"

[[dependencies]]
package = "graphics.canvas"
version = "0.1.0"
path = "../../../yeho/packages/graphics/canvas"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.image.processing"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image/processing"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "input.text"
version = "0.1.0"
path = "../../../yeho/packages/input/text"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/frontend.yui--yuiCommittedTextFieldAdapter/method-ApplyPointerCaret-8 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCommittedTextFieldAdapter.RequestClipboard

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using frontend.yui

// Request clipboard.
yuiCommittedTextFieldAdapter instance = yuiCommittedTextFieldAdapter(yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook"))
text argument_operation = "argument operation"
yuiClipboardRequest result = instance.RequestClipboard(argument_operation)
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.frontend_yui__yuicommittedtextfieldadapter"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "frontend.yui"
version = "0.2.0"
path = "../../../yeho/packages/frontend/yui"

[[dependencies]]
package = "graphics.canvas"
version = "0.1.0"
path = "../../../yeho/packages/graphics/canvas"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.image.processing"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image/processing"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "input.text"
version = "0.1.0"
path = "../../../yeho/packages/input/text"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/frontend.yui--yuiCommittedTextFieldAdapter/method-RequestClipboard-9 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCommittedTextFieldAdapter.ApplyClipboardResult

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using frontend.yui

// Apply clipboard result.
yuiCommittedTextFieldAdapter instance = yuiCommittedTextFieldAdapter(yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook"))
yuiClipboardRequest argument_request = yuiClipboardRequest("operation", "hook", "value", 1, 1, 1)
text argument_clipboardValue = "argument clipboard Value"
text argument_undoGroup = "argument undo Group"
bool result = instance.ApplyClipboardResult(argument_request, argument_clipboardValue, argument_undoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.frontend_yui__yuicommittedtextfieldadapter"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "frontend.yui"
version = "0.2.0"
path = "../../../yeho/packages/frontend/yui"

[[dependencies]]
package = "graphics.canvas"
version = "0.1.0"
path = "../../../yeho/packages/graphics/canvas"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.image.processing"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image/processing"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "input.text"
version = "0.1.0"
path = "../../../yeho/packages/input/text"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/frontend.yui--yuiCommittedTextFieldAdapter/method-ApplyClipboardResult-10 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCommittedTextFieldAdapter.PollComposition

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using frontend.yui

// Poll composition.
yuiCommittedTextFieldAdapter instance = yuiCommittedTextFieldAdapter(yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook"))
text argument_source = "argument source"
bool result = instance.PollComposition(argument_source)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.frontend_yui__yuicommittedtextfieldadapter"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "frontend.yui"
version = "0.2.0"
path = "../../../yeho/packages/frontend/yui"

[[dependencies]]
package = "graphics.canvas"
version = "0.1.0"
path = "../../../yeho/packages/graphics/canvas"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.image.processing"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image/processing"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "input.text"
version = "0.1.0"
path = "../../../yeho/packages/input/text"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/frontend.yui--yuiCommittedTextFieldAdapter/method-PollComposition-11 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCommittedTextFieldAdapter.Poll

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using frontend.yui

// Poll.
yuiCommittedTextFieldAdapter instance = yuiCommittedTextFieldAdapter(yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook"))
text argument_undoGroup = "argument undo Group"
bool result = instance.Poll(argument_undoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.frontend_yui__yuicommittedtextfieldadapter"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "frontend.yui"
version = "0.2.0"
path = "../../../yeho/packages/frontend/yui"

[[dependencies]]
package = "graphics.canvas"
version = "0.1.0"
path = "../../../yeho/packages/graphics/canvas"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.image.processing"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image/processing"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "input.text"
version = "0.1.0"
path = "../../../yeho/packages/input/text"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/frontend.yui--yuiCommittedTextFieldAdapter/method-Poll-12 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCommittedTextFieldAdapter.PollAtEnd

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using frontend.yui

// Poll at end.
yuiCommittedTextFieldAdapter instance = yuiCommittedTextFieldAdapter(yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook"))
text argument_undoGroup = "argument undo Group"
bool result = instance.PollAtEnd(argument_undoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.frontend_yui__yuicommittedtextfieldadapter"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "frontend.yui"
version = "0.2.0"
path = "../../../yeho/packages/frontend/yui"

[[dependencies]]
package = "graphics.canvas"
version = "0.1.0"
path = "../../../yeho/packages/graphics/canvas"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.image.processing"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image/processing"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "input.text"
version = "0.1.0"
path = "../../../yeho/packages/input/text"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/frontend.yui--yuiCommittedTextFieldAdapter/method-PollAtEnd-13 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.

Source: yeho/packages/frontend/yui/input-text_input.yh

AI training permission: https://demonhunterlabs.com/ai-use
