-`drevops/tui` is a PHP library for panel-based terminal forms: keyboard-driven questionnaires that collect a set of answers and hand them back to your code as typed values.
+`drevops/phptui` is a PHP library for panel-based terminal forms: keyboard-driven questionnaires that collect a set of answers and hand them back to your code as typed values.
- **Declarative form model.** A form is declared with a fluent builder (`Form` / `PanelBuilder` / `FieldBuilder`): panels of typed fields, each with its own options, conditions, derivation rules and behavior.
- **Two collection modes, one declaration.** The same form runs as a full-screen interactive TUI on a terminal, or resolves non-interactively from a JSON payload, per-field environment variables, discovery rules and defaults.
@@ -83,7 +83,7 @@ Every feature has a reference page and a runnable, self-contained example in [`p
| ⚡ Inline editing | A field's editor opens in place on the panel row; `->standalone()` opts a field out to full-screen | [panels](https://phptui.dev/panels#inline-editing) | [`04-inline-editing`](playground/04-inline-editing.php) |
| 🧩 Fields | 15 field types: text, template, number, rating, calendar, textarea, password, select, reorder, suggest, search, file picker, confirm, toggle, pause - plus markup and progress blocks, which collect nothing | [fields](https://phptui.dev/fields) | [`02-fields-*`](playground) |
| 🏗️ Builder-driven | The form is declared in PHP with a fluent builder; the common cases need no code | [configuration](https://phptui.dev/configuration) | [`01-quickstart`](playground/01-quickstart.php) |
-| 🎛️ Interactive or unattended | `run()` picks the mode: keyboard on a terminal, otherwise JSON payload + `TUI_` environment variables | [headless collection](https://phptui.dev/headless-collection) | [`08-headless-*`](playground) |
+| 🎛️ Interactive or unattended | `run()` picks the mode: keyboard on a terminal, otherwise JSON payload + `PHPTUI_` environment variables | [headless collection](https://phptui.dev/headless-collection) | [`08-headless-*`](playground) |
| 🔗 Derived values | Fields computed from other answers via `{{field}}` templates and str2name transforms, settling to a fixpoint | [configuration](https://phptui.dev/configuration#derived-values) | [`05-form-logic-*`](playground) |
| 🔀 Conditional fields | `->when()` conditions (eq/ne/in/contains, composable with all/any/not) drive visibility; form-level fix-ups reconcile answers, and an opt-in indent steps each field in from the answer that reveals it | [configuration](https://phptui.dev/configuration#conditional-fields) | [`05-form-logic-*`](playground) |
| ⚙️ Declared behavior | `->required()` rejects an empty value with a label-derived or declared message; dynamic defaults, validation and transforms as field closures, or as per-field handler classes resolved by naming convention | [field behavior](https://phptui.dev/field-behaviour) | [`06-field-behaviour-*`](playground) |
@@ -102,7 +102,7 @@ Every feature has a reference page and a runnable, self-contained example in [`p
## Installation
```bash
-composer require drevops/tui
+composer require drevops/phptui
```
## Quick start
@@ -110,9 +110,9 @@ composer require drevops/tui
Declare a form with the `Form` builder, then drive it through the `Tui` facade - the one class that wires up collection, the input resolver, the schema tools and the interactive screen for you:
```php
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Tui;
$form = Form::create('Quick start')
->panel('order', 'New order', function (PanelBuilder $p): void {
diff --git a/composer.json b/composer.json
index 21dd9dd9..080c6c46 100644
--- a/composer.json
+++ b/composer.json
@@ -1,5 +1,5 @@
{
- "name": "drevops/tui",
+ "name": "drevops/phptui",
"description": "Provides terminal UI form-building functionality.",
"license": "GPL-2.0-or-later",
"type": "library",
@@ -13,8 +13,8 @@
],
"homepage": "https://phptui.dev/",
"support": {
- "issues": "https://github.com/drevops/tui/issues",
- "source": "https://github.com/drevops/tui"
+ "issues": "https://github.com/drevops/phptui/issues",
+ "source": "https://github.com/drevops/phptui"
},
"require": {
"php": ">=8.3",
@@ -39,12 +39,12 @@
"prefer-stable": true,
"autoload": {
"psr-4": {
- "DrevOps\\Tui\\": "src/"
+ "DrevOps\\PhpTui\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
- "DrevOps\\Tui\\Tests\\": "tests/phpunit"
+ "DrevOps\\PhpTui\\Tests\\": "tests/phpunit"
}
},
"config": {
diff --git a/docs/architecture/README.md b/docs/architecture/README.md
index 20f1bb35..7e11fa0c 100644
--- a/docs/architecture/README.md
+++ b/docs/architecture/README.md
@@ -1,6 +1,6 @@
# How the TUI works
-This is a walkthrough of the `drevops/tui` library - what you assemble to build a form, and what happens when it runs. The diagrams are rendered from the PlantUML sources in this directory by the [`render-tui-diagrams`](../../.claude/skills/render-tui-diagrams/SKILL.md) skill; everything below is derived from `src/`, so if the prose and the code disagree, the code wins.
+This is a walkthrough of the `drevops/phptui` library - what you assemble to build a form, and what happens when it runs. The diagrams are rendered from the PlantUML sources in this directory by the [`render-phptui-diagrams`](../../.claude/skills/render-phptui-diagrams/SKILL.md) skill; everything below is derived from `src/`, so if the prose and the code disagree, the code wins.
The model the whole library is built on - four levels, seventeen capabilities, one canonical tree - is written out on the [specification](https://phptui.dev/specification) page. This walkthrough is the same thing seen from the outside: which class does which part, and in what order.
@@ -88,4 +88,4 @@ The diagrams are PlantUML (`.puml`) rendered to a light `.svg`, each with a dark
plantuml -tsvg docs/architecture/*.puml
node docs/util/derive-dark-diagram.js docs/architecture/*.svg
-The [`render-tui-diagrams`](../../.claude/skills/render-tui-diagrams/SKILL.md) skill covers rendering, adding a new data-flow diagram, and keeping this walkthrough current.
+The [`render-phptui-diagrams`](../../.claude/skills/render-phptui-diagrams/SKILL.md) skill covers rendering, adding a new data-flow diagram, and keeping this walkthrough current.
diff --git a/docs/architecture/architecture-dark.svg b/docs/architecture/architecture-dark.svg
index 321f1e55..97fcd847 100644
--- a/docs/architecture/architecture-dark.svg
+++ b/docs/architecture/architecture-dark.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/architecture/architecture.puml b/docs/architecture/architecture.puml
index f8a5b598..a05f0585 100644
--- a/docs/architecture/architecture.puml
+++ b/docs/architecture/architecture.puml
@@ -1,5 +1,5 @@
@startuml
-' drevops/tui - component architecture.
+' drevops/phptui - component architecture.
' Packages group the src/ classes by what they do; arrows show the main
' dependencies.
' Regenerate every SVG with: plantuml -tsvg docs/architecture/*.puml
@@ -8,7 +8,7 @@ skinparam backgroundColor white
skinparam defaultFontName Helvetica
skinparam shadowing false
skinparam componentStyle rectangle
-title drevops/tui - component architecture
+title drevops/phptui - component architecture
package "Declaring" #F0F4C3 {
[Tui]
diff --git a/docs/architecture/architecture.svg b/docs/architecture/architecture.svg
index 0b0ab6f3..e7c866c6 100644
--- a/docs/architecture/architecture.svg
+++ b/docs/architecture/architecture.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/architecture/dataflow-collect-dark.svg b/docs/architecture/dataflow-collect-dark.svg
index bb5dd680..a21f438e 100644
--- a/docs/architecture/dataflow-collect-dark.svg
+++ b/docs/architecture/dataflow-collect-dark.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/architecture/dataflow-collect.puml b/docs/architecture/dataflow-collect.puml
index a971287e..1e4391cf 100644
--- a/docs/architecture/dataflow-collect.puml
+++ b/docs/architecture/dataflow-collect.puml
@@ -1,5 +1,5 @@
@startuml
-' drevops/tui - data flow for headless collection.
+' drevops/phptui - data flow for headless collection.
' Traced from src/Tui.php (collect) and src/Screen/Collector.php
' (answers -> fetched -> settle -> resolveAll -> transformSupplied -> stabilize
' -> refusal).
diff --git a/docs/architecture/dataflow-collect.svg b/docs/architecture/dataflow-collect.svg
index 2255e63f..5d2e7a57 100644
--- a/docs/architecture/dataflow-collect.svg
+++ b/docs/architecture/dataflow-collect.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/architecture/dataflow-tui-dark.svg b/docs/architecture/dataflow-tui-dark.svg
index 3c24851e..d65b9e59 100644
--- a/docs/architecture/dataflow-tui-dark.svg
+++ b/docs/architecture/dataflow-tui-dark.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/architecture/dataflow-tui.puml b/docs/architecture/dataflow-tui.puml
index 7961ad52..bb3b12e7 100644
--- a/docs/architecture/dataflow-tui.puml
+++ b/docs/architecture/dataflow-tui.puml
@@ -1,5 +1,5 @@
@startuml
-' drevops/tui - data flow for the interactive screen session.
+' drevops/phptui - data flow for the interactive screen session.
' Traced from src/Screen/ScreenController.php (run -> paint/handle), with
' src/Screen/ScreenRenderer.php drawing outward from the Screen, src/Screen/
' KeyRouter.php sending each key inward, src/Input/ resolving a key press to a
diff --git a/docs/architecture/dataflow-tui.svg b/docs/architecture/dataflow-tui.svg
index e605175b..7d72c16d 100644
--- a/docs/architecture/dataflow-tui.svg
+++ b/docs/architecture/dataflow-tui.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/content/ai-agents.mdx b/docs/content/ai-agents.mdx
index 5a48b578..1ee81aae 100644
--- a/docs/content/ai-agents.mdx
+++ b/docs/content/ai-agents.mdx
@@ -13,7 +13,7 @@ A form built with this library is self-describing: it hands an AI agent (or any
`agentHelp()` returns a JSON Schema (draft 2020-12) of the answers - the object an agent supplies, keyed by question id. Each property carries its `type` and allowed values (a `select`'s `enum`, a number's `minimum`/`maximum`), its `title` and `description`, its `default`, and the `env` variable that sets it. What it deliberately doesn't name is CLI flags: the flags an agent ultimately calls are yours to define. You retrieve the schema and fold it into your own help - an "AI agents" section of `--help`, a dedicated flag, a generated README:
```php
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Tui;
// The library hands back the schema; the consumer decides where it goes.
echo (new Tui($form))->agentHelp();
@@ -29,14 +29,14 @@ The schema the produce-order form emits:
"name": {
"type": "string",
"title": "Order name",
- "env": "TUI_NAME"
+ "env": "PHPTUI_NAME"
},
"fruit": {
"type": "string",
"enum": ["apple", "banana", "cherry"],
"title": "Fruit",
"default": "banana",
- "env": "TUI_FRUIT"
+ "env": "PHPTUI_FRUIT"
},
"quantity": {
"type": "integer",
@@ -44,20 +44,20 @@ The schema the produce-order form emits:
"maximum": 99,
"title": "Quantity",
"default": 6,
- "env": "TUI_QUANTITY"
+ "env": "PHPTUI_QUANTITY"
},
"organic": {
"type": "boolean",
"title": "Organic only?",
"default": false,
- "env": "TUI_ORGANIC"
+ "env": "PHPTUI_ORGANIC"
},
"certifier": {
"type": "string",
"title": "Certifier",
"x-asked-when": {"field": "organic", "eq": true},
"x-required-when-asked": true,
- "env": "TUI_CERTIFIER"
+ "env": "PHPTUI_CERTIFIER"
}
},
"required": ["name"],
@@ -65,7 +65,7 @@ The schema the produce-order form emits:
}
```
-Each `env` is the variable that sets its answer - the uppercased id under the active prefix, which defaults to `TUI_` and changes with `->envPrefix('MYAPP_')` on the form or `new Tui($form, env_prefix: 'MYAPP_')`. A field that names its own variable advertises that name instead, and any further names it answers to appear beside it in `x-env-aliases` - see [naming the variables](/headless-collection#naming-the-variables). The root `x-precedence` is the resolution order described below.
+Each `env` is the variable that sets its answer - the uppercased id under the active prefix, which defaults to `PHPTUI_` and changes with `->envPrefix('MYAPP_')` on the form or `new Tui($form, env_prefix: 'MYAPP_')`. A field that names its own variable advertises that name instead, and any further names it answers to appear beside it in `x-env-aliases` - see [naming the variables](/headless-collection#naming-the-variables). The root `x-precedence` is the resolution order described below.
### Required, and required when asked
@@ -84,7 +84,7 @@ A field's other two [guidance texts](/field-behaviour#guidance-texts) travel bes
"description": "The crop this basket was picked from.",
"x-help": "Type a few letters to filter.",
"x-placeholder": "E.g. Golden Beetroot",
- "env": "TUI_CROP"
+ "env": "PHPTUI_CROP"
}
```
@@ -110,7 +110,7 @@ Dynamic defaults - the `fn (Context $c): mixed` closures from [field behavior](/
"options_dynamic": false,
"default": "",
"required": true,
- "env": "TUI_NAME",
+ "env": "PHPTUI_NAME",
"env_aliases": [],
"min": null,
"max": null,
@@ -176,13 +176,13 @@ $tui->validate(['name' => 'Weekly Box', 'organic' => true]);
The schema's `x-precedence` spells out how every field resolves - the first source that provides a value wins:
1. **Provided** - an explicit value you pass in, however your interface accepts one. Highest precedence.
-2. **Environment** - the per-question variable named in `env` (e.g. `TUI_NAME`), which is the uppercased id under the active prefix unless the field named its own, followed by each name in `x-env-aliases` in declaration order; the first one that is set wins.
+2. **Environment** - the per-question variable named in `env` (e.g. `PHPTUI_NAME`), which is the uppercased id under the active prefix unless the field named its own, followed by each name in `x-env-aliases` in declaration order; the first one that is set wins.
3. **Discovered** - a value detected from the target directory (see [Discovery](/field-behaviour#discovery)).
4. **Derived** - a value computed from other fields.
5. **Default** - the declared default.
## Runnable example
-[`playground/08-headless-agent-cli.php`](https://github.com/drevops/tui/tree/main/playground/08-headless-agent-cli.php) folds `agentHelp()` into a consumer tool's help, and `agentHelp()`, `schema()` and `validate()` each have a script of their own beside it in [`playground/08-headless-*`](https://github.com/drevops/tui/tree/main/playground).
+[`playground/08-headless-agent-cli.php`](https://github.com/drevops/phptui/tree/main/playground/08-headless-agent-cli.php) folds `agentHelp()` into a consumer tool's help, and `agentHelp()`, `schema()` and `validate()` each have a script of their own beside it in [`playground/08-headless-*`](https://github.com/drevops/phptui/tree/main/playground).
See also [Headless collection](/headless-collection) for driving the same form from CI and [self-describing answers](/headless-collection#self-describing-answers) for what comes back.
diff --git a/docs/content/architecture.mdx b/docs/content/architecture.mdx
index 9ffef380..63f62efb 100644
--- a/docs/content/architecture.mdx
+++ b/docs/content/architecture.mdx
@@ -9,7 +9,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
# How the TUI works
-A walkthrough of `drevops/tui`: what you assemble to build a form, and what happens when it runs. The diagrams are rendered from the PlantUML sources in [`docs/architecture/`](https://github.com/drevops/tui/tree/main/docs/architecture); everything below is derived from `src/`, so if the prose and the code ever disagree, the code wins.
+A walkthrough of `drevops/phptui`: what you assemble to build a form, and what happens when it runs. The diagrams are rendered from the PlantUML sources in [`docs/architecture/`](https://github.com/drevops/phptui/tree/main/docs/architecture); everything below is derived from `src/`, so if the prose and the code ever disagree, the code wins.
The model underneath it - four levels, seventeen capabilities, one canonical tree - is written out on the [specification](/specification). This page is the same thing seen from the outside: which class does which part, and in what order.
diff --git a/docs/content/configuration.mdx b/docs/content/configuration.mdx
index 10373e6e..d16a4d8b 100644
--- a/docs/content/configuration.mdx
+++ b/docs/content/configuration.mdx
@@ -12,10 +12,10 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
A form is a tree of panels, each holding fields, and you build it fluently. Rules are named-argument spec objects, so your IDE completes them and a typo fails at declaration time - not half-way through a session:
```php
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Condition\Condition;
-use DrevOps\Tui\Derive\Derive;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Condition\Condition;
+use DrevOps\PhpTui\Derive\Derive;
$form = Form::create('My form')
->panel('general', 'General', function (PanelBuilder $p): void {
@@ -88,4 +88,4 @@ The steps follow the rules rather than the declaration order: a rule naming seve
-Derived values, conditional fields and fix-ups each have a runnable script in [`playground/05-form-logic-*`](https://github.com/drevops/tui/tree/main/playground).
+Derived values, conditional fields and fix-ups each have a runnable script in [`playground/05-form-logic-*`](https://github.com/drevops/phptui/tree/main/playground).
diff --git a/docs/content/contributing.mdx b/docs/content/contributing.mdx
index 98aa75db..07316a05 100644
--- a/docs/content/contributing.mdx
+++ b/docs/content/contributing.mdx
@@ -6,12 +6,12 @@ keywords: ['contributing', 'development', 'tests', 'linting', 'pull request']
# Contributing
-Contributions are welcome. The project lives at [github.com/drevops/tui](https://github.com/drevops/tui) - open an [issue](https://github.com/drevops/tui/issues) to report a bug or propose a feature, or send a pull request.
+Contributions are welcome. The project lives at [github.com/drevops/phptui](https://github.com/drevops/phptui) - open an [issue](https://github.com/drevops/phptui/issues) to report a bug or propose a feature, or send a pull request.
## Getting set up
```bash
-git clone https://github.com/drevops/tui.git
+git clone https://github.com/drevops/phptui.git
cd tui
composer install
```
@@ -58,7 +58,7 @@ Prefer data providers, cover new behavior with both unit and functional tests wh
## Documentation
-This site is built from the `.mdx` pages in [`docs/content/`](https://github.com/drevops/tui/tree/main/docs/content). To work on it locally:
+This site is built from the `.mdx` pages in [`docs/content/`](https://github.com/drevops/phptui/tree/main/docs/content). To work on it locally:
```bash
cd docs
@@ -66,7 +66,7 @@ npm install
npm start
```
-The terminal-demo SVGs are regenerated with `php docs/util/update-assets.php` (it needs `asciinema`, `expect`, `node` and `npm`). The architecture diagrams under `docs/architecture/` are PlantUML sources rendered to SVG - update them after any structural change with the `render-tui-diagrams` workflow.
+The terminal-demo SVGs are regenerated with `php docs/util/update-assets.php` (it needs `asciinema`, `expect`, `node` and `npm`). The architecture diagrams under `docs/architecture/` are PlantUML sources rendered to SVG - update them after any structural change with the `render-phptui-diagrams` workflow.
## Pull requests
diff --git a/docs/content/display-modes.mdx b/docs/content/display-modes.mdx
index 72d90f4f..9d0d062d 100644
--- a/docs/content/display-modes.mdx
+++ b/docs/content/display-modes.mdx
@@ -29,4 +29,4 @@ The TUI adapts to the terminal it lands on: glyphs follow the locale (a `UTF` lo
-The forcing seams and the environment conventions each have a runnable script in [`playground/11-display-modes-*`](https://github.com/drevops/tui/tree/main/playground).
+The forcing seams and the environment conventions each have a runnable script in [`playground/11-display-modes-*`](https://github.com/drevops/phptui/tree/main/playground).
diff --git a/docs/content/field-behaviour.mdx b/docs/content/field-behaviour.mdx
index 5547db63..35f5b8df 100644
--- a/docs/content/field-behaviour.mdx
+++ b/docs/content/field-behaviour.mdx
@@ -12,7 +12,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
Behavior beyond a static value is declared on the field itself: a dynamic default, validation and a value transform, each a closure right in the form:
```php
-use DrevOps\Tui\Handler\Context;
+use DrevOps\PhpTui\Handler\Context;
$p->text('name', 'Produce name')
->default(fn(Context $c): string => basename($c->directory))
@@ -32,7 +32,7 @@ Reusable validators and transformers live as public static methods on a class in
The TUI only collects. It presents answers and never applies them - **writing files, renaming directories, acting on the answers is your job**. A consumer that processes answers defines its own processor interface, keeping the form for collection and the processors for side effects; one class per field can carry both its `process()` and the reusable static behavior. (This is exactly what a consumer CLI does.)
-Both declaration styles are runnable in [`playground/06-field-behaviour-*`](https://github.com/drevops/tui/tree/main/playground).
+Both declaration styles are runnable in [`playground/06-field-behaviour-*`](https://github.com/drevops/phptui/tree/main/playground).
## Guidance texts
@@ -84,7 +84,7 @@ Emptying the name shows the label-derived message in the editor; leaving the bas
A choice field's list does not have to be fixed. Hand `->options()` a callback that asks for the run context, and one field's choices narrow by another's answer:
```php
-use DrevOps\Tui\Handler\Context;
+use DrevOps\PhpTui\Handler\Context;
$catalog = [
'fruit' => ['apple' => 'Apple', 'banana' => 'Banana', 'cherry' => 'Cherry'],
@@ -116,7 +116,7 @@ A choice the narrowed list no longer holds does not survive in the answers: it i
Keep the resolver cheap. It runs for the whole form on every settle, not once per panel, and it is called again whenever the answers change - though a settle that changes nothing costs nothing, since the list already answers those answers. For a list that is expensive to build, drop the context parameter and it loads [once, on panel entry](/progress#inside-the-form); for one that lives behind a search API, [`->optionsFrom()`](/progress#options-from-a-query) follows the query instead.
-Runnable in [`playground/19-dynamic-options.php`](https://github.com/drevops/tui/blob/main/playground/19-dynamic-options.php).
+Runnable in [`playground/19-dynamic-options.php`](https://github.com/drevops/phptui/blob/main/playground/19-dynamic-options.php).
## Discovery
@@ -135,4 +135,4 @@ Discovered values are badged in the panels and the summary alike, and explicit i
-Every rule type runs against a bundled sample project in [`playground/07-discovery.php`](https://github.com/drevops/tui/blob/main/playground/07-discovery.php).
+Every rule type runs against a bundled sample project in [`playground/07-discovery.php`](https://github.com/drevops/phptui/blob/main/playground/07-discovery.php).
diff --git a/docs/content/fields/anatomy.mdx b/docs/content/fields/anatomy.mdx
index 182e2043..4171a836 100644
--- a/docs/content/fields/anatomy.mdx
+++ b/docs/content/fields/anatomy.mdx
@@ -331,11 +331,11 @@ The [primitives](/output) collect nothing and never run inside a panel, so they
Subclassing a theme is the full answer, and overkill when all you want is a different glyph. Hand `->theme()` a closure instead of a name and it is given a `ThemeBuilder`, whose groups are the blocks that declare the elements - so the prefix is implied, and `->separator()` means one thing under `->breadcrumb()` and another under `->legend()`:
```php
-use DrevOps\Tui\Theme\Override\BreadcrumbOverrides;
-use DrevOps\Tui\Theme\Override\FieldOverrides;
-use DrevOps\Tui\Theme\Override\LegendOverrides;
-use DrevOps\Tui\Theme\Sgr;
-use DrevOps\Tui\Theme\ThemeBuilder;
+use DrevOps\PhpTui\Theme\Override\BreadcrumbOverrides;
+use DrevOps\PhpTui\Theme\Override\FieldOverrides;
+use DrevOps\PhpTui\Theme\Override\LegendOverrides;
+use DrevOps\PhpTui\Theme\Sgr;
+use DrevOps\PhpTui\Theme\ThemeBuilder;
$tui->theme(fn(ThemeBuilder $t) => $t
->breadcrumb(fn(BreadcrumbOverrides $b) => $b
@@ -372,7 +372,7 @@ Reading `->entryMarker('◼', '[x]')`: the two arguments are the Unicode mark a
Anything the patch doesn't name keeps the theme's own answer. Taking a patch is itself a [capability](#what-a-theme-is-allowed-to-do): a theme that declares `OverrideCapableInterface` - every shipped one does - applies it, and one that doesn't keeps all of its own answers and the patch goes nowhere. That's deliberate, because a patch is a preference and can never be what decides whether a form draws at all.
-Reach for a subclass when you're changing a palette; reach for this when you're changing a handful of glyphs. Runnable in [`playground/09-themes-elements.php`](https://github.com/drevops/tui/blob/main/playground/09-themes-elements.php).
+Reach for a subclass when you're changing a palette; reach for this when you're changing a handful of glyphs. Runnable in [`playground/09-themes-elements.php`](https://github.com/drevops/phptui/blob/main/playground/09-themes-elements.php).
## What a theme is allowed to do
diff --git a/docs/content/fields/calendar.mdx b/docs/content/fields/calendar.mdx
index b11d3735..af57334a 100644
--- a/docs/content/fields/calendar.mdx
+++ b/docs/content/fields/calendar.mdx
@@ -16,7 +16,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
A month-grid date picker. It collects a single **normalized ISO `YYYY-MM-DD` string**; give it no default and it opens on today.
```php
-use DrevOps\Tui\Block\Weekday;
+use DrevOps\PhpTui\Block\Weekday;
$p->calendar('harvest', 'Harvest date')
->default('2026-07-15') // Date the grid opens on.
@@ -25,7 +25,7 @@ $p->calendar('harvest', 'Harvest date')
->weekStart(Weekday::Sunday); // Day the week grid starts on.
```
-Runnable script: [`playground/02-fields-calendar.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-calendar.php).
+Runnable script: [`playground/02-fields-calendar.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-calendar.php).
## Options
diff --git a/docs/content/fields/confirm.mdx b/docs/content/fields/confirm.mdx
index 88906ade..3fbacc68 100644
--- a/docs/content/fields/confirm.mdx
+++ b/docs/content/fields/confirm.mdx
@@ -20,7 +20,7 @@ $p->confirm('organic', 'Organic only?')
->default(TRUE); // Which choice starts highlighted (defaults to No).
```
-Runnable script: [`playground/02-fields-confirm.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-confirm.php).
+Runnable script: [`playground/02-fields-confirm.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-confirm.php).
## Options
diff --git a/docs/content/fields/filepicker.mdx b/docs/content/fields/filepicker.mdx
index 83a9b2c0..83003c28 100644
--- a/docs/content/fields/filepicker.mdx
+++ b/docs/content/fields/filepicker.mdx
@@ -24,7 +24,7 @@ $p->filePicker('list', 'Price list')
->showHidden(); // Show hidden (dot) entries when the browser opens.
```
-Runnable scripts: [`playground/02-fields-filepicker.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-filepicker.php) and [`filepicker-multiple.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-filepicker-multiple.php).
+Runnable scripts: [`playground/02-fields-filepicker.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-filepicker.php) and [`filepicker-multiple.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-filepicker-multiple.php).
## Options
@@ -154,4 +154,4 @@ $p->filePicker('price_lists', 'Price lists')
-Runnable script: [`playground/02-fields-filepicker-multiple-limited.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-filepicker-multiple-limited.php).
+Runnable script: [`playground/02-fields-filepicker-multiple-limited.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-filepicker-multiple-limited.php).
diff --git a/docs/content/fields/index.mdx b/docs/content/fields/index.mdx
index bd8b4d8c..93604eba 100644
--- a/docs/content/fields/index.mdx
+++ b/docs/content/fields/index.mdx
@@ -9,7 +9,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
# Fields
-The fields cover text entry, choices, filesystem browsing and gates. Every field of the form opens its field in an editor, and the same fields also run standalone (see [`playground/02-fields-*`](https://github.com/drevops/tui/tree/main/playground)). Fields pull their glyphs and colors from the theme, so each one is shown in all four display modes.
+The fields cover text entry, choices, filesystem browsing and gates. Every field of the form opens its field in an editor, and the same fields also run standalone (see [`playground/02-fields-*`](https://github.com/drevops/phptui/tree/main/playground)). Fields pull their glyphs and colors from the theme, so each one is shown in all four display modes.
diff --git a/docs/content/fields/number.mdx b/docs/content/fields/number.mdx
index 77601aa1..f6feee97 100644
--- a/docs/content/fields/number.mdx
+++ b/docs/content/fields/number.mdx
@@ -23,7 +23,7 @@ $p->number('weight', 'Basket weight (g)')
->default(1200); // Initial value.
```
-Runnable script: [`playground/02-fields-number.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-number.php).
+Runnable script: [`playground/02-fields-number.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-number.php).
## Options
diff --git a/docs/content/fields/option-groups.mdx b/docs/content/fields/option-groups.mdx
index 43aac686..04f5943b 100644
--- a/docs/content/fields/option-groups.mdx
+++ b/docs/content/fields/option-groups.mdx
@@ -22,7 +22,7 @@ $p->select('item', 'Item')
->option('cherry', 'Cherry', disabled: TRUE, disabled_reason: 'out of season');
```
-Runnable scripts: [`playground/02-fields-select-groups.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-select-groups.php) and [`select-multiple-groups.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-select-multiple-groups.php).
+Runnable scripts: [`playground/02-fields-select-groups.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-select-groups.php) and [`select-multiple-groups.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-select-multiple-groups.php).
## Builder methods
diff --git a/docs/content/fields/password.mdx b/docs/content/fields/password.mdx
index ffd58c12..cbfbc82a 100644
--- a/docs/content/fields/password.mdx
+++ b/docs/content/fields/password.mdx
@@ -21,7 +21,7 @@ $p->password('code', 'Order code')
->confirmation(); // Prompt for the value twice and reject a mismatch.
```
-Runnable scripts: [`playground/02-fields-password.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-password.php) and [`password-reveal.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-password-reveal.php).
+Runnable scripts: [`playground/02-fields-password.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-password.php) and [`password-reveal.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-password-reveal.php).
## Options
diff --git a/docs/content/fields/pause.mdx b/docs/content/fields/pause.mdx
index 1eaa598f..fa35d08b 100644
--- a/docs/content/fields/pause.mdx
+++ b/docs/content/fields/pause.mdx
@@ -19,7 +19,7 @@ An acknowledgment gate: it shows its label and waits for the reader to continue.
$p->pause('ready', 'Review your basket'); // A gate; it takes no options.
```
-Runnable script: [`playground/02-fields-pause.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-pause.php).
+Runnable script: [`playground/02-fields-pause.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-pause.php).
## Options
diff --git a/docs/content/fields/rating.mdx b/docs/content/fields/rating.mdx
index ab0b02fa..0e734e4e 100644
--- a/docs/content/fields/rating.mdx
+++ b/docs/content/fields/rating.mdx
@@ -27,7 +27,7 @@ $p->rating('freshness', 'Freshness')
]);
```
-Runnable script: [`playground/02-fields-rating.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-rating.php).
+Runnable script: [`playground/02-fields-rating.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-rating.php).
## Options
diff --git a/docs/content/fields/reorder.mdx b/docs/content/fields/reorder.mdx
index a9cfe66a..fc8ae2cd 100644
--- a/docs/content/fields/reorder.mdx
+++ b/docs/content/fields/reorder.mdx
@@ -26,7 +26,7 @@ $p->reorder('basket', 'Rank your basket')
->pageSize(10); // Items visible before the list pages around the cursor.
```
-Runnable script: [`playground/02-fields-reorder.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-reorder.php).
+Runnable script: [`playground/02-fields-reorder.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-reorder.php).
## Options
diff --git a/docs/content/fields/search.mdx b/docs/content/fields/search.mdx
index 7abf38f9..0186b697 100644
--- a/docs/content/fields/search.mdx
+++ b/docs/content/fields/search.mdx
@@ -27,7 +27,7 @@ $p->search('vegetable', 'Vegetable')
->pageSize(8); // Matches visible before the list pages around the cursor.
```
-Runnable scripts: [`playground/02-fields-search.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-search.php) and [`search-multiple.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-search-multiple.php).
+Runnable scripts: [`playground/02-fields-search.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-search.php) and [`search-multiple.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-search-multiple.php).
## Options
@@ -148,7 +148,7 @@ $p->search('basket', 'Basket')
-Runnable script: [`playground/02-fields-search-multiple-limited.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-search-multiple-limited.php).
+Runnable script: [`playground/02-fields-search-multiple-limited.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-search-multiple-limited.php).
## Option descriptions
diff --git a/docs/content/fields/select.mdx b/docs/content/fields/select.mdx
index 534fe4d5..43fadff2 100644
--- a/docs/content/fields/select.mdx
+++ b/docs/content/fields/select.mdx
@@ -26,7 +26,7 @@ $p->select('fruit', 'Fruit')
->pageSize(10); // Options visible before the list pages around the cursor.
```
-Runnable scripts: [`playground/02-fields-select.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-select.php) and [`select-multiple.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-select-multiple.php).
+Runnable scripts: [`playground/02-fields-select.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-select.php) and [`select-multiple.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-select-multiple.php).
## Options
@@ -73,7 +73,7 @@ In all four [display modes](/display-modes) - Unicode or ASCII, color on or off:
-Descriptions work the same on [`search`](/fields/search), [`suggest`](/fields/suggest) and [`reorder`](/fields/reorder). Runnable script: [`playground/02-fields-select-descriptions.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-select-descriptions.php).
+Descriptions work the same on [`search`](/fields/search), [`suggest`](/fields/suggest) and [`reorder`](/fields/reorder). Runnable script: [`playground/02-fields-select-descriptions.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-select-descriptions.php).
## Keyboard
@@ -180,4 +180,4 @@ $p->select('basket', 'Basket')
-Runnable script: [`playground/02-fields-select-multiple-limited.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-select-multiple-limited.php).
+Runnable script: [`playground/02-fields-select-multiple-limited.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-select-multiple-limited.php).
diff --git a/docs/content/fields/suggest.mdx b/docs/content/fields/suggest.mdx
index e72a9913..1dcd8f47 100644
--- a/docs/content/fields/suggest.mdx
+++ b/docs/content/fields/suggest.mdx
@@ -29,7 +29,7 @@ $p->suggest('fruit', 'Fruit')
->ghost(); // Preview the leading match inline as you type.
```
-Runnable script: [`playground/02-fields-suggest.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-suggest.php).
+Runnable script: [`playground/02-fields-suggest.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-suggest.php).
## Options
diff --git a/docs/content/fields/template.mdx b/docs/content/fields/template.mdx
index 39b2c09b..4912a5a4 100644
--- a/docs/content/fields/template.mdx
+++ b/docs/content/fields/template.mdx
@@ -28,7 +28,7 @@ $p->template('crate', 'Crate label')
->slot('grade', 'Grade', fn(string $value): ?string => preg_match('/^[a-c]$/', $value) === 1 ? NULL : 'use a single letter a-c');
```
-Runnable script: [`playground/02-fields-template.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-template.php).
+Runnable script: [`playground/02-fields-template.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-template.php).
## Options
diff --git a/docs/content/fields/text.mdx b/docs/content/fields/text.mdx
index 85042d02..fe33e745 100644
--- a/docs/content/fields/text.mdx
+++ b/docs/content/fields/text.mdx
@@ -29,7 +29,7 @@ $p->text('variety', 'Variety')
->complete(fn(array $answers): array => [($answers['fruit'] ?? 'Apple') . ' - Gala']);
```
-Runnable script: [`playground/02-fields-text.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-text.php).
+Runnable script: [`playground/02-fields-text.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-text.php).
## Options
diff --git a/docs/content/fields/textarea.mdx b/docs/content/fields/textarea.mdx
index 56c86a32..07e8b4d6 100644
--- a/docs/content/fields/textarea.mdx
+++ b/docs/content/fields/textarea.mdx
@@ -21,7 +21,7 @@ $p->textarea('notes', 'Tasting notes')
->externalEditor(); // Allow a handoff to $EDITOR / $VISUAL.
```
-Runnable script: [`playground/02-fields-textarea.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-textarea.php).
+Runnable script: [`playground/02-fields-textarea.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-textarea.php).
## Options
diff --git a/docs/content/fields/toggle.mdx b/docs/content/fields/toggle.mdx
index a6e5a16f..39ebcb20 100644
--- a/docs/content/fields/toggle.mdx
+++ b/docs/content/fields/toggle.mdx
@@ -24,7 +24,7 @@ $p->toggle('ripeness', 'Ripeness')
->default('ripe'); // Which value starts selected (defaults to the first).
```
-Runnable script: [`playground/02-fields-toggle.php`](https://github.com/drevops/tui/blob/main/playground/02-fields-toggle.php).
+Runnable script: [`playground/02-fields-toggle.php`](https://github.com/drevops/phptui/blob/main/playground/02-fields-toggle.php).
## Options
diff --git a/docs/content/headless-collection.mdx b/docs/content/headless-collection.mdx
index 0ccb8811..abecec84 100644
--- a/docs/content/headless-collection.mdx
+++ b/docs/content/headless-collection.mdx
@@ -13,11 +13,11 @@ $answers = $tui->collect('{"name":"Weekly Box"}');
$answers = $tui->run($prompts, '1.0.0'); // Headless when prompts are supplied; otherwise the TUI on a TTY.
```
-A value the form refuses ends the whole call with a `DrevOps\Tui\CollectException` naming the field and the reason. There is nobody to retype it and no row to say so on, so the collection fails rather than handing back answers one of which was never accepted.
+A value the form refuses ends the whole call with a `DrevOps\PhpTui\CollectException` naming the field and the reason. There is nobody to retype it and no row to say so on, so the collection fails rather than handing back answers one of which was never accepted.
## Naming the variables
-Environment overrides are named `` - the uppercased field id under a prefix. `->envPrefix('MYAPP_')` declares that namespace on the form, a `new Tui($form, env_prefix: 'MYAPP_')` constructor argument overrides it, and if you set neither, the prefix is `TUI_`:
+Environment overrides are named `` - the uppercased field id under a prefix. `->envPrefix('MYAPP_')` declares that namespace on the form, a `new Tui($form, env_prefix: 'MYAPP_')` constructor argument overrides it, and if you set neither, the prefix is `PHPTUI_`:
```bash
MYAPP_TIMEZONE=UTC php my-installer.php
@@ -41,4 +41,4 @@ Both names reach machine-readable output: `agentHelp()` advertises the canonical
The `Answers` set that comes back needs no form configuration to present or process: each answer carries a snapshot of its question (label, kind, panel trail) taken at collection time, plus its provenance - default, detected, edited, derived, or override (a user value pinning a derived one). `$answers->toSummary()` prints the provenance-badged, panel-grouped summary, `$answers->toJson()` the raw values, and `$answers->items` exposes the per-answer snapshots.
-For automation and AI agents, the form describes itself: `schema()`, `agentHelp()` and `validate()` let a tool discover and drive it without prompting. See [AI agents](/ai-agents) for the full surface, with the runnable scripts in [`playground/08-headless-*`](https://github.com/drevops/tui/tree/main/playground).
+For automation and AI agents, the form describes itself: `schema()`, `agentHelp()` and `validate()` let a tool discover and drive it without prompting. See [AI agents](/ai-agents) for the full surface, with the runnable scripts in [`playground/08-headless-*`](https://github.com/drevops/phptui/tree/main/playground).
diff --git a/docs/content/index.mdx b/docs/content/index.mdx
index 6595ee7b..12543188 100644
--- a/docs/content/index.mdx
+++ b/docs/content/index.mdx
@@ -43,9 +43,9 @@ The engine doesn't know (or care) what application it serves. It stays generic:
Declare a form with the fluent `Form` builder - a panel of fields, each one a [field](/fields) - then hand it to the `Tui` facade, the one class that wires up collection, the input resolver, the schema tools and the interactive screen for you:
```php
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Tui;
$form = Form::create('Quick start')
->panel('order', 'New order', function (PanelBuilder $p): void {
@@ -91,4 +91,4 @@ Run it on a terminal and the panel opens on the form's fields, ready to fill:
`run()` picks the mode for you - the interactive panel TUI on a terminal, headless otherwise. The facade also exposes `schema()`, `agentHelp()` and `validate()`, and - when you want finer control - `root()` for the declared [block tree](/specification) and `registry()` for the handler registry.
-This is the runnable [`playground/01-quickstart.php`](https://github.com/drevops/tui/blob/main/playground/01-quickstart.php) example, so you don't have to type it out. See [Installation](/installation) to get set up, and the [playground](/playground) for more complete examples.
+This is the runnable [`playground/01-quickstart.php`](https://github.com/drevops/phptui/blob/main/playground/01-quickstart.php) example, so you don't have to type it out. See [Installation](/installation) to get set up, and the [playground](/playground) for more complete examples.
diff --git a/docs/content/installation.mdx b/docs/content/installation.mdx
index da0693b3..a45354fa 100644
--- a/docs/content/installation.mdx
+++ b/docs/content/installation.mdx
@@ -9,22 +9,22 @@ keywords: ['installation', 'composer', 'php', 'quick start', 'setup']
Install the package with [Composer](https://getcomposer.org/):
```bash
-composer require drevops/tui
+composer require drevops/phptui
```
The package is a library you consume programmatically - it has no CLI entry point of its own. You'll work with two classes:
-- **`DrevOps\Tui\Tui`** - the facade: collects a form's answers, headlessly or through the interactive panel TUI.
-- **`DrevOps\Tui\Builder\Form`** - the fluent builder for declaring a form's panels and fields.
+- **`DrevOps\PhpTui\Tui`** - the facade: collects a form's answers, headlessly or through the interactive panel TUI.
+- **`DrevOps\PhpTui\Builder\Form`** - the fluent builder for declaring a form's panels and fields.
## Usage
Declare a form with the fluent `Form` builder, then hand it to the `Tui` facade - one class that wires up collection, the input resolver, the schema tools and the interactive screen so you don't have to:
```php
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Tui;
$form = Form::create('Quick start')
->panel('order', 'New order', function (PanelBuilder $p): void {
@@ -66,10 +66,10 @@ $answers = $tui->interact(); // interactive panel TUI
## Aborting with Ctrl-C or Cancel
-Pressing Ctrl-C part-way through an interactive session aborts it: the panel TUI restores the terminal, clears the screen, and the facade raises a `DrevOps\Tui\InterruptException` instead of returning the partial answers - so an abort can never be mistaken for a completed submission. The **Cancel** button aborts the same way, raising `DrevOps\Tui\CancelException`. That's a subclass of `InterruptException`, so one catch covers both:
+Pressing Ctrl-C part-way through an interactive session aborts it: the panel TUI restores the terminal, clears the screen, and the facade raises a `DrevOps\PhpTui\InterruptException` instead of returning the partial answers - so an abort can never be mistaken for a completed submission. The **Cancel** button aborts the same way, raising `DrevOps\PhpTui\CancelException`. That's a subclass of `InterruptException`, so one catch covers both:
```php
-use DrevOps\Tui\InterruptException;
+use DrevOps\PhpTui\InterruptException;
try {
$answers = $tui->run();
@@ -84,7 +84,7 @@ echo $answers->toSummary();
Catch `CancelException` first when an explicit cancel should react differently from a Ctrl-C. Only the interactive session raises these: headless collection - `collect()`, or `run()` when prompts are supplied or the input is piped - never interacts, so it never aborts this way.
-Headless collection has its own ending. A value the form refuses raises `DrevOps\Tui\CollectException` naming the field and the reason: with no screen there is nobody to retype it, so the whole collection fails rather than handing back answers one of which was never accepted. It sits in the same namespace as the other two, so one import covers every way a collection ends short.
+Headless collection has its own ending. A value the form refuses raises `DrevOps\PhpTui\CollectException` naming the field and the reason: with no screen there is nobody to retype it, so the whole collection fails rather than handing back answers one of which was never accepted. It sits in the same namespace as the other two, so one import covers every way a collection ends short.
## Next steps
diff --git a/docs/content/key-bindings.mdx b/docs/content/key-bindings.mdx
index f9ff13b8..984d70f2 100644
--- a/docs/content/key-bindings.mdx
+++ b/docs/content/key-bindings.mdx
@@ -89,11 +89,11 @@ Not everything on the keyboard routes through the map: a few field keys are fixe
Bindings are layered by **scope**: a base layer shared by every field, a navigation layer for the panel browser, and one layer per field type that overrides the base only where it differs (Enter inserts a newline in a textarea, Space toggles a checkbox option). To retune individual bindings, pass overrides on top of a preset - each names a scope, an action and its keys. Later bindings win, so re-declaring a scope-and-action pair replaces the preset's keys for it:
```php
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Binding;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Input\Scope;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Binding;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Input\Scope;
$tui = (new Tui($form))->keys('default', [
// Quit with x as well as q.
@@ -117,4 +117,4 @@ Bindings are validated the moment they're set, so a bad key map is caught at con
- a printable character bound in the base scope, or in a scope whose field consumes typed input (text, template, number, rating, password, textarea, search, suggest, toggle, file picker, and the multiple select), would be un-typeable and is rejected - control characters like Ctrl-E are exempt, since they're command keys, never typed content;
- an unknown preset name, or a character binding that is not exactly one character, is rejected.
-See [`playground/10-key-bindings-*`](https://github.com/drevops/tui/tree/main/playground) for the default map, the vim preset and a custom override side by side.
+See [`playground/10-key-bindings-*`](https://github.com/drevops/phptui/tree/main/playground) for the default map, the vim preset and a custom override side by side.
diff --git a/docs/content/layouts.mdx b/docs/content/layouts.mdx
index 79263fdb..c2659e78 100644
--- a/docs/content/layouts.mdx
+++ b/docs/content/layouts.mdx
@@ -78,7 +78,7 @@ Both calls resolve through the same registry, which is the whole of what _reuse_
The grid is the one arrangement built from a shape rather than picked by a name:
```php
-use DrevOps\Tui\Screen\Layout\GridLayout;
+use DrevOps\PhpTui\Screen\Layout\GridLayout;
// One window on the first visual row, two sharing the second.
$panel->layout(new GridLayout(1, 2));
@@ -164,7 +164,7 @@ public function __construct() {
Use it where no single region can do the moving, which is exactly what a [grid](#a-grid-of-windows) needs: its lines have to move together, and none of them sees its siblings. The layout is then drawn whole and shows what its space has room for, marking whichever edge the rest is past - the region rules, one level up.
-[`playground/20-layouts-scrolling.php`](https://github.com/drevops/tui/blob/main/playground/20-layouts-scrolling.php) runs one grid in a frame deliberately too short for it, so the arrow keys move the whole surface and the panel's own rows travel with the windows.
+[`playground/20-layouts-scrolling.php`](https://github.com/drevops/phptui/blob/main/playground/20-layouts-scrolling.php) runs one grid in a frame deliberately too short for it, so the arrow keys move the whole surface and the panel's own rows travel with the windows.
## Drawing a region's edges
@@ -185,7 +185,7 @@ The box **spends the region's own cells**: a row top and bottom and a column eac
Passing no caption writes the region's own name.
-[`playground/20-layouts-nested.php`](https://github.com/drevops/tui/blob/main/playground/20-layouts-nested.php) stacks four arrangements in one form - a custom screen layout, a custom two-column panel layout, a grid of windows, and the shipped `two-column` on a panel inside one of those windows - and runs it twice, once as it ships and once inspected.
+[`playground/20-layouts-nested.php`](https://github.com/drevops/phptui/blob/main/playground/20-layouts-nested.php) stacks four arrangements in one form - a custom screen layout, a custom two-column panel layout, a grid of windows, and the shipped `two-column` on a panel inside one of those windows - and runs it twice, once as it ships and once inspected.
## Flow: two blocks on one line
@@ -239,15 +239,15 @@ Flow is what a layout and a region share; sizing is what only a layout does. Bot
| Areas that scroll independently | a layout |
| Somewhere you can navigate into | a [panel](/panels), which nests a layout |
-[`playground/20-layouts-region-flow.php`](https://github.com/drevops/tui/blob/main/playground/20-layouts-region-flow.php) runs the same form twice, the same two blocks placed in both, with only the regions turned - across, where the note shares the header row and the version string the footer row, then down, where the note stacks under the trail and the one-row footer cuts the version.
+[`playground/20-layouts-region-flow.php`](https://github.com/drevops/phptui/blob/main/playground/20-layouts-region-flow.php) runs the same form twice, the same two blocks placed in both, with only the regions turned - across, where the note shares the header row and the version string the footer row, then down, where the note stacks under the trail and the one-row footer cuts the version.
## Putting your own blocks in a region
The regions around the form are the **session's** rather than the form's, so what stands in them is stated on the facade rather than declared on a panel. `->place()` puts a block in a named region and `->flow()` turns that region:
```php
-use DrevOps\Tui\Block\Markup;
-use DrevOps\Tui\Screen\Axis;
+use DrevOps\PhpTui\Block\Markup;
+use DrevOps\PhpTui\Screen\Axis;
(new Tui($form))
->layout('market')
@@ -268,8 +268,8 @@ A region running down gives each block a row and clips what outruns it, so a one
Every layout is a class extending `AbstractLayout`, shipped ones included. `AbstractLayout` carries every line of the sizing arithmetic, so a subclass declares an axis and its regions and inherits the rest:
```php
-use DrevOps\Tui\Screen\Axis;
-use DrevOps\Tui\Screen\Layout\AbstractLayout;
+use DrevOps\PhpTui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Layout\AbstractLayout;
final class StallLayout extends AbstractLayout {
@@ -296,7 +296,7 @@ Two more are not arithmetic at all. `natural(array $measured = []): int` says wh
Three ways reach a layout, and they are the same three a [theme](/themes) offers:
```php
-use DrevOps\Tui\Screen\Layout\LayoutManager;
+use DrevOps\PhpTui\Screen\Layout\LayoutManager;
LayoutManager::create('two-column'); // shipped
LayoutManager::register('stall', StallLayout::class);
@@ -310,7 +310,7 @@ Each call builds its own instance, because two forms picking the same layout mus
That last check is why a [grid](#a-grid-of-windows) is reached by none of these three routes: all of them hand over a name and nothing else, and a name carries no shape. A layout whose constructor takes an argument is left out of the shipped names and refused by the other two routes, naming the class rather than failing at the first frame - so `layout('grid')` throws exactly as a misspelled name does, and a grid is written where its shape is.
-Both routes are in [`playground/20-layouts-custom.php`](https://github.com/drevops/tui/blob/main/playground/20-layouts-custom.php), which registers one layout for a panel and another for the screen.
+Both routes are in [`playground/20-layouts-custom.php`](https://github.com/drevops/phptui/blob/main/playground/20-layouts-custom.php), which registers one layout for a panel and another for the screen.
## Where the standard furniture goes
@@ -327,7 +327,7 @@ Those are the conventional names, so a layout that uses them is furnished withou
A layout that calls its regions something else, or wants a piece somewhere else, says so:
```php
-use DrevOps\Tui\Screen\Furniture;
+use DrevOps\PhpTui\Screen\Furniture;
final class StallLayout extends AbstractLayout {
diff --git a/docs/content/markdown.mdx b/docs/content/markdown.mdx
index 3058bd4b..7a80c483 100644
--- a/docs/content/markdown.mdx
+++ b/docs/content/markdown.mdx
@@ -77,4 +77,4 @@ The same markdown note in all four [display modes](/display-modes) - the color-o
-A runnable example is [`playground/11-display-modes-markdown.php`](https://github.com/drevops/tui/blob/main/playground/11-display-modes-markdown.php).
+A runnable example is [`playground/11-display-modes-markdown.php`](https://github.com/drevops/phptui/blob/main/playground/11-display-modes-markdown.php).
diff --git a/docs/content/markup.mdx b/docs/content/markup.mdx
index 911068f2..556ef187 100644
--- a/docs/content/markup.mdx
+++ b/docs/content/markup.mdx
@@ -21,7 +21,7 @@ $p->markup('weighing', 'Every crate is weighed at the packing bench.');
The title and body take the same `{{field}}` templating derived values use, so markup can reflect earlier answers, and `->when()` gates it on one.
-Runnable scripts: [`playground/02-markup.php`](https://github.com/drevops/tui/blob/main/playground/02-markup.php) and [`playground/02-markup-table.php`](https://github.com/drevops/tui/blob/main/playground/02-markup-table.php).
+Runnable scripts: [`playground/02-markup.php`](https://github.com/drevops/phptui/blob/main/playground/02-markup.php) and [`playground/02-markup-table.php`](https://github.com/drevops/phptui/blob/main/playground/02-markup-table.php).
## Three presentations, one block
diff --git a/docs/content/output.mdx b/docs/content/output.mdx
index 7e24b289..5e2751de 100644
--- a/docs/content/output.mdx
+++ b/docs/content/output.mdx
@@ -11,7 +11,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
A form is rarely the whole program. A market-stall order opens with a welcome box, says what it is doing between steps, and closes with a summary and its next steps. The `output()` primitives draw that chrome with the same theme the panel uses, so the text around the form belongs to the same program as the form itself.
-`output()` returns a `DrevOps\Tui\Primitive\Output` carrying the pieces: a **box** and a **card**, an aligned **table**, five **status lines**, a **definition list**, wrapped **text**, a **rule** and a **banner**. Like [`progress()`](/progress), it is a primitive: it collects no answer and never runs inside the interactive panel. Hold onto the object and call it as often as you need - every call returns it, so the calls chain.
+`output()` returns a `DrevOps\PhpTui\Primitive\Output` carrying the pieces: a **box** and a **card**, an aligned **table**, five **status lines**, a **definition list**, wrapped **text**, a **rule** and a **banner**. Like [`progress()`](/progress), it is a primitive: it collects no answer and never runs inside the interactive panel. Hold onto the object and call it as often as you need - every call returns it, so the calls chain.
```php
$out = $tui->output();
@@ -43,7 +43,7 @@ $out->box('Welcome to the produce box', [
Long lines wrap inside the border rather than being clipped by it, so you can hand `box()` a paragraph and let it fit itself to the terminal.
-Runnable in [`playground/18-output-box.php`](https://github.com/drevops/tui/blob/main/playground/18-output-box.php).
+Runnable in [`playground/18-output-box.php`](https://github.com/drevops/phptui/blob/main/playground/18-output-box.php).
In all four [display modes](/display-modes) - Unicode or ASCII, color on or off:
@@ -83,7 +83,7 @@ $out->table(['Item', 'Crates', 'Picked'], [
Pass an empty header list to draw the rows with no header row. When the natural width exceeds the terminal, the widest columns shrink and over-long cells are cut short with an ellipsis, so the borders always stay whole.
-Runnable in [`playground/18-output-table.php`](https://github.com/drevops/tui/blob/main/playground/18-output-table.php).
+Runnable in [`playground/18-output-table.php`](https://github.com/drevops/phptui/blob/main/playground/18-output-table.php).
@@ -141,12 +141,12 @@ The glyph carries the meaning on its own, so the five stay distinguishable with
To choose the kind at runtime, pass a `Status` case to `status()`:
```php
-use DrevOps\Tui\Primitive\Status;
+use DrevOps\PhpTui\Primitive\Status;
$out->status($ok ? Status::Success : Status::Error, 'Packed the box');
```
-Runnable in [`playground/18-output-status.php`](https://github.com/drevops/tui/blob/main/playground/18-output-status.php).
+Runnable in [`playground/18-output-status.php`](https://github.com/drevops/phptui/blob/main/playground/18-output-status.php).
@@ -184,7 +184,7 @@ $out->definitions([
]);
```
-Runnable in [`playground/18-output-definitions.php`](https://github.com/drevops/tui/blob/main/playground/18-output-definitions.php).
+Runnable in [`playground/18-output-definitions.php`](https://github.com/drevops/phptui/blob/main/playground/18-output-definitions.php).
@@ -226,7 +226,7 @@ $out = $tui->markdown()->output();
$out->text("**Before you order:**\n\n- Pick a *delivery day* between Monday and Saturday\n- Leave a note if the gate code is not `1234`");
```
-Runnable in [`playground/18-output-text.php`](https://github.com/drevops/tui/blob/main/playground/18-output-text.php).
+Runnable in [`playground/18-output-text.php`](https://github.com/drevops/phptui/blob/main/playground/18-output-text.php).
## Theme-drawn
@@ -252,7 +252,7 @@ The frames, glyphs and alignment survive, because they are text. Forcing wins ov
To write somewhere other than standard error - standard output, or a stream you control - pass your own terminal:
```php
-use DrevOps\Tui\Terminal\Terminal;
+use DrevOps\PhpTui\Terminal\Terminal;
$out = $tui->output(new Terminal(STDOUT));
```
diff --git a/docs/content/panels.mdx b/docs/content/panels.mdx
index f2e54d9e..754bf770 100644
--- a/docs/content/panels.mdx
+++ b/docs/content/panels.mdx
@@ -208,4 +208,4 @@ Four sizing options bound the stretch, each a non-negative integer:
Fullscreen affects only the interactive TUI; headless collection ignores it. The frame's layout width is resolved once at start-up, while the live terminal size is still sampled every frame for the minimum-size guard and frame positioning - so a window resized mid-session reflows on height but keeps its layout width until the next run.
-Nesting, modal dialogs, both border looks and the fullscreen stretch are runnable in [`playground/03-panels-*`](https://github.com/drevops/tui/tree/main/playground), and inline editing in [`playground/04-inline-editing.php`](https://github.com/drevops/tui/blob/main/playground/04-inline-editing.php).
+Nesting, modal dialogs, both border looks and the fullscreen stretch are runnable in [`playground/03-panels-*`](https://github.com/drevops/phptui/tree/main/playground), and inline editing in [`playground/04-inline-editing.php`](https://github.com/drevops/phptui/blob/main/playground/04-inline-editing.php).
diff --git a/docs/content/playground.mdx b/docs/content/playground.mdx
index 440bdca6..d2773f4b 100644
--- a/docs/content/playground.mdx
+++ b/docs/content/playground.mdx
@@ -6,7 +6,7 @@ keywords: ['playground', 'examples', 'scripts', 'demos', 'php']
# Playground
-Runnable examples live in [`playground/`](https://github.com/drevops/tui/tree/main/playground) - one file per example, grouped by a numbered prefix that follows this documentation's order, from the quick start to the capstone form:
+Runnable examples live in [`playground/`](https://github.com/drevops/phptui/tree/main/playground) - one file per example, grouped by a numbered prefix that follows this documentation's order, from the quick start to the capstone form:
| Group | Demonstrates |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -36,7 +36,7 @@ Runnable examples live in [`playground/`](https://github.com/drevops/tui/tree/ma
The reusable helper classes the scripts load sit beside them - `themes/`, `layouts/` and `handlers/` - with the fixtures the examples read from in `sample-project/` and `translations/`.
-Every script is self-contained: it requires the Composer autoloader directly and declares its whole form inline, so you can copy any single file out as a starting point. Most take no CLI options - each demonstrates exactly one thing, variants are separate scripts, and unattended runs are driven by piping stdin and setting `TUI_` environment variables. The exception is `03-panels-fullscreen.php`, which takes `--halign`/`--valign` and `--max-width` to pick one alignment from its grid.
+Every script is self-contained: it requires the Composer autoloader directly and declares its whole form inline, so you can copy any single file out as a starting point. Most take no CLI options - each demonstrates exactly one thing, variants are separate scripts, and unattended runs are driven by piping stdin and setting `PHPTUI_` environment variables. The exception is `03-panels-fullscreen.php`, which takes `--halign`/`--valign` and `--max-width` to pick one alignment from its grid.
```bash
composer install
diff --git a/docs/content/progress-row.mdx b/docs/content/progress-row.mdx
index 57f22be0..1d50171b 100644
--- a/docs/content/progress-row.mdx
+++ b/docs/content/progress-row.mdx
@@ -16,7 +16,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
A place to do work inside the form: select the row, press Enter, and its work runs with a **determinate bar** (when it declares a step count) or an **indeterminate spinner** (when it does not), drawn in the row itself as the work advances. It collects **no value** - it sits beside the fields it depends on, not among the answers, so it's a block of its own rather than a kind of field.
```php
-use DrevOps\Tui\Primitive\ProgressReporter;
+use DrevOps\PhpTui\Primitive\ProgressReporter;
$p->progress('pack', 'Packing the box')
->steps(6) // Omit for an indeterminate spinner.
@@ -28,7 +28,7 @@ $p->progress('pack', 'Packing the box')
});
```
-Runnable script: [`playground/02-progress-row.php`](https://github.com/drevops/tui/blob/main/playground/02-progress-row.php).
+Runnable script: [`playground/02-progress-row.php`](https://github.com/drevops/phptui/blob/main/playground/02-progress-row.php).
## Options
diff --git a/docs/content/progress.mdx b/docs/content/progress.mdx
index fb757f8f..077e26f6 100644
--- a/docs/content/progress.mdx
+++ b/docs/content/progress.mdx
@@ -14,7 +14,7 @@ Collection sometimes triggers slow work: a discovery scan of a target directory,
`progress()` is one of the facade's **primitives**: it collects no answer and never runs inside the interactive panel. It is for slow work that happens _around_ the form - before it opens, after it closes, or wrapping a slow `->default` / `->discover`. The active theme draws it, so it matches the panel's look and honors the color and Unicode switches. Off a TTY, or in headless collection, it degrades to a single plain caption line with no control sequences. The callback receives the primitive and drives it with `advance()`.
```php
-use DrevOps\Tui\Primitive\Progress;
+use DrevOps\PhpTui\Primitive\Progress;
// No total: an indeterminate spinner. Each advance() ticks a frame.
$total = $tui->progress(null, 'Counting the baskets', function (Progress $progress): int {
@@ -44,7 +44,7 @@ With a `null` total the indicator is an animated spinner: an accent glyph beside
-Runnable in [`playground/15-progress-spinner.php`](https://github.com/drevops/tui/blob/main/playground/15-progress-spinner.php).
+Runnable in [`playground/15-progress-spinner.php`](https://github.com/drevops/phptui/blob/main/playground/15-progress-spinner.php).
In all four [display modes](/display-modes) - Unicode or ASCII, color on or off:
@@ -74,7 +74,7 @@ With a known total the indicator is a determinate bar: it fills as it advances,
-Runnable in [`playground/15-progress-bar.php`](https://github.com/drevops/tui/blob/main/playground/15-progress-bar.php).
+Runnable in [`playground/15-progress-bar.php`](https://github.com/drevops/phptui/blob/main/playground/15-progress-bar.php).
@@ -127,7 +127,7 @@ $form->panel('order', 'New order', function (PanelBuilder $p) use ($pack): void
});
```
-Runnable in [`playground/16-loading-data.php`](https://github.com/drevops/tui/blob/main/playground/16-loading-data.php) and [`playground/02-progress-row.php`](https://github.com/drevops/tui/blob/main/playground/02-progress-row.php).
+Runnable in [`playground/16-loading-data.php`](https://github.com/drevops/phptui/blob/main/playground/16-loading-data.php) and [`playground/02-progress-row.php`](https://github.com/drevops/phptui/blob/main/playground/02-progress-row.php).
## Options from a query
@@ -155,4 +155,4 @@ A source that throws does not end the session: the field shows `Could not load o
Headless collection has nothing typed to query with, so it looks the supplied value up **as** the query and checks the value against what comes back - a value no query can produce is rejected, exactly as one outside a static option list is. A suggest field's candidates are hints rather than a closed set, so its value is not checked in either mode.
-Runnable in [`playground/17-query-options.php`](https://github.com/drevops/tui/blob/main/playground/17-query-options.php).
+Runnable in [`playground/17-query-options.php`](https://github.com/drevops/phptui/blob/main/playground/17-query-options.php).
diff --git a/docs/content/specification.mdx b/docs/content/specification.mdx
index fd50400d..863252dd 100644
--- a/docs/content/specification.mdx
+++ b/docs/content/specification.mdx
@@ -1188,4 +1188,4 @@ Every level, every capability and every element on this page is implemented and
Two endings are worth naming beside them, because they are what a caller sees when a collection does not finish: `CollectException` when the answers cannot be taken as they were given, and `CancelException` when the form is abandoned through its cancel button.
-[`playground/12-specification-screen.php`](https://github.com/drevops/tui/blob/main/playground/12-specification-screen.php) draws a form from these, opens a field, collects the same panel headlessly, and shows a refused value naming the field and the reason. [`playground/20-layouts-custom.php`](https://github.com/drevops/tui/blob/main/playground/20-layouts-custom.php) registers two layouts of its own and arranges a panel and a screen with them, and [`playground/09-themes-elements.php`](https://github.com/drevops/tui/blob/main/playground/09-themes-elements.php) patches a handful of elements without a theme class.
+[`playground/12-specification-screen.php`](https://github.com/drevops/phptui/blob/main/playground/12-specification-screen.php) draws a form from these, opens a field, collects the same panel headlessly, and shows a refused value naming the field and the reason. [`playground/20-layouts-custom.php`](https://github.com/drevops/phptui/blob/main/playground/20-layouts-custom.php) registers two layouts of its own and arranges a panel and a screen with them, and [`playground/09-themes-elements.php`](https://github.com/drevops/phptui/blob/main/playground/09-themes-elements.php) patches a handful of elements without a theme class.
diff --git a/docs/content/testing.mdx b/docs/content/testing.mdx
index 79784b04..12ef39d5 100644
--- a/docs/content/testing.mdx
+++ b/docs/content/testing.mdx
@@ -21,9 +21,9 @@ Keystrokes are `Key` objects and/or raw byte strings (the bytes a terminal emits
`TuiTester` wraps the `Tui` facade, so it runs exactly what a consumer's `run()` would.
```php
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Testing\TuiTester;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Testing\TuiTester;
$tester = new TuiTester($form);
@@ -46,16 +46,16 @@ $this->assertFalse($tester->isCancelled());
`run()` returns the collected `Answers`. `display()` is the ANSI-stripped output for substring assertions, `output()` the raw frames, and `isCancelled()` / `isInterrupted()` report how the run ended. `theme()`, `layout()`, `options()`, `rows()`, `cols()`, `version()`, `directory()` and `update()` tune the run before it starts.
-The harness outside PHPUnit is shown in [`playground/13-testing.php`](https://github.com/drevops/tui/blob/main/playground/13-testing.php).
+The harness outside PHPUnit is shown in [`playground/13-testing.php`](https://github.com/drevops/phptui/blob/main/playground/13-testing.php).
## One screen
`ScreenTester` is the screen-native companion. It takes the block tree directly - `$form->root()`, or a `Panel` you built yourself - and drives the same session loop, so it is the tool for asserting on **what was drawn** rather than on what came back.
```php
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Testing\ScreenTester;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Testing\ScreenTester;
$tester = new ScreenTester($form->root());
diff --git a/docs/content/themes.mdx b/docs/content/themes.mdx
index 034eeefe..0e8ed600 100644
--- a/docs/content/themes.mdx
+++ b/docs/content/themes.mdx
@@ -15,8 +15,8 @@ Three classes carry the arrangement. `AbstractTheme` is the floor: it implements
Six themes ship built-in, each selectable by name:
```php
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Tui;
$tui = (new Tui(Form::create('My form')))->theme('midnight');
```
@@ -32,7 +32,7 @@ $tui = (new Tui(Form::create('My form')))->theme('midnight');
The colorful themes use 256-color palettes, `mono` the grayscale ramp and `dos` the classic 16-color CGA set. Every one renders across all fields and degrades to plain text when color is off. An unknown theme name fails loudly, so a typo never silently lands you back on the default.
-Each adaptive theme below is shown in four looks: the dark and light palettes, each rendered once inside the default rounded [border](/panels#bordered-panels) and once with the frame explicitly stripped (`['border' => 'none']`). Every adaptive theme has a runnable script in [`playground/09-themes-*`](https://github.com/drevops/tui/tree/main/playground).
+Each adaptive theme below is shown in four looks: the dark and light palettes, each rendered once inside the default rounded [border](/panels#bordered-panels) and once with the frame explicitly stripped (`['border' => 'none']`). Every adaptive theme has a runnable script in [`playground/09-themes-*`](https://github.com/drevops/phptui/tree/main/playground).
### midnight
@@ -154,7 +154,7 @@ Every theme built on `DefaultTheme` takes the same options array, validated in i
| `max_width` | any non-negative integer | the widest the frame will grow; `0` is uncapped |
| `max_height` | any non-negative integer | the tallest it will grow; `0` is uncapped |
-Each enum case is interchangeable with its string value, so `['border' => Border::Rounded]` and `['border' => 'rounded']` mean the same thing. A theme can declare options of its own by merging over `optionSchema()`, and the [playground's accent theme](https://github.com/drevops/tui/blob/main/playground/themes/AccentTheme.php) is that recipe in fifteen lines.
+Each enum case is interchangeable with its string value, so `['border' => Border::Rounded]` and `['border' => 'rounded']` mean the same thing. A theme can declare options of its own by merging over `optionSchema()`, and the [playground's accent theme](https://github.com/drevops/phptui/blob/main/playground/themes/AccentTheme.php) is that recipe in fifteen lines.
## Writing a theme
@@ -175,8 +175,8 @@ A custom theme subclasses `DefaultTheme` and repaints. Most of what a palette wa
| `error()` | something that failed |
```php
-use DrevOps\Tui\Theme\DefaultTheme;
-use DrevOps\Tui\Theme\Sgr;
+use DrevOps\PhpTui\Theme\DefaultTheme;
+use DrevOps\PhpTui\Theme\Sgr;
class AquaTheme extends DefaultTheme {
@@ -215,10 +215,10 @@ class AquaTheme extends DefaultTheme {
The lowest-friction route to using it: name the class directly on the facade, no registration needed:
```php
-$tui = (new \DrevOps\Tui\Tui($form))->theme(AquaTheme::class);
+$tui = (new \DrevOps\PhpTui\Tui($form))->theme(AquaTheme::class);
```
-Or register a short alias with `ThemeManager::register('aqua', AquaTheme::class)`, then `->theme('aqua')`. Either way the class must implement `ThemeInterface`, take a frame width and an options array, and answer for every element a form is drawn from - all of which is what extending `AbstractTheme` or `DefaultTheme` gives you - and both naming and registering say so up front rather than failing at the first frame. The [playground's ocean theme](https://github.com/drevops/tui/blob/main/playground/09-themes-custom.php) goes further, repainting many voices and elements for a distinct look with a start banner:
+Or register a short alias with `ThemeManager::register('aqua', AquaTheme::class)`, then `->theme('aqua')`. Either way the class must implement `ThemeInterface`, take a frame width and an options array, and answer for every element a form is drawn from - all of which is what extending `AbstractTheme` or `DefaultTheme` gives you - and both naming and registering say so up front rather than failing at the first frame. The [playground's ocean theme](https://github.com/drevops/phptui/blob/main/playground/09-themes-custom.php) goes further, repainting many voices and elements for a distinct look with a start banner:
@@ -250,11 +250,11 @@ A theme built on the floor is selected like any other - `->theme(MyFloorTheme::c
Restyling a handful of glyphs doesn't need a class at all. Hand `->theme()` a closure instead of a name and it is given a `ThemeBuilder`, whose groups are the blocks that declare the elements - so the prefix is implied, and `->separator()` means one thing under `->breadcrumb()` and another under `->legend()`:
```php
-use DrevOps\Tui\Theme\Override\BreadcrumbOverrides;
-use DrevOps\Tui\Theme\Override\FieldOverrides;
-use DrevOps\Tui\Theme\Override\LegendOverrides;
-use DrevOps\Tui\Theme\Sgr;
-use DrevOps\Tui\Theme\ThemeBuilder;
+use DrevOps\PhpTui\Theme\Override\BreadcrumbOverrides;
+use DrevOps\PhpTui\Theme\Override\FieldOverrides;
+use DrevOps\PhpTui\Theme\Override\LegendOverrides;
+use DrevOps\PhpTui\Theme\Sgr;
+use DrevOps\PhpTui\Theme\ThemeBuilder;
$tui = (new Tui($form))
->theme('midnight')
@@ -268,4 +268,4 @@ The name picks the theme; the closure states what that theme draws differently.
A glyph takes two arguments, the mark and its ASCII stand-in, so a patch can't set one display mode and silently leave the other broken. Text takes one, and a color takes `Sgr` parts in order. [Anatomy](/fields/anatomy#patching-an-element) lists the nine elements this reaches, which is the closed set - naming anything else is a type error rather than a knob that quietly does nothing.
-Anything the patch doesn't name keeps the theme's own answer, which is what makes it a patch rather than a replacement. Reach for a subclass when you're changing a palette; reach for this when you're changing a handful of glyphs. Runnable in [`playground/09-themes-elements.php`](https://github.com/drevops/tui/blob/main/playground/09-themes-elements.php).
+Anything the patch doesn't name keeps the theme's own answer, which is what makes it a patch rather than a replacement. Reach for a subclass when you're changing a palette; reach for this when you're changing a handful of glyphs. Runnable in [`playground/09-themes-elements.php`](https://github.com/drevops/phptui/blob/main/playground/09-themes-elements.php).
diff --git a/docs/content/translations.mdx b/docs/content/translations.mdx
index 8a83e910..d64d7462 100644
--- a/docs/content/translations.mdx
+++ b/docs/content/translations.mdx
@@ -13,9 +13,9 @@ Every string the TUI shows can be presented in another language - both the libra
Translation is off by default. Turn it on by giving the `Tui` facade a `Translator` - the active language, and optionally the sources your own catalogs come from - the same way you'd set a theme or key map:
```php
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Translation\Translator;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Translation\Translator;
+use DrevOps\PhpTui\Tui;
// The bundled chrome catalogs load automatically, so this
// alone renders the chrome in Ukrainian:
@@ -99,7 +99,7 @@ Some strings carry `@name` placeholders (for example `Enter a number @constraint
A message whose wording depends on a count - "1 apple" versus "5 apples" - is rendered with `Translator::formatPlural($count, $singular, $plural)`. The count picks the form, and `@count` is bound to it:
```php
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Translation\Translator;
Translator::formatPlural($count, '1 apple', '@count apples');
```
@@ -119,7 +119,7 @@ A language with more forms supplies its own rule under the reserved `Translator:
declare(strict_types=1);
// translations/uk.php
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Translation\Translator;
return [
Translator::PLURAL_RULE => static function (int $count): int {
@@ -151,7 +151,7 @@ Without a rule the default applies: the first form when the count is one, the se
The package ships `translations/en.php` - the canonical list of every chrome string the library emits, as an English `key => key` map. Copy it to a locale file and translate the values, and you have a complete chrome catalog to start from:
```bash
-cp vendor/drevops/tui/translations/en.php translations/de.php
+cp vendor/drevops/phptui/translations/en.php translations/de.php
```
A ready-to-use Ukrainian catalog, `translations/uk.php`, ships alongside it and loads automatically whenever the active language is Ukrainian.
@@ -160,4 +160,4 @@ A ready-to-use Ukrainian catalog, `translations/uk.php`, ships alongside it and
The bundled catalogs load from inside the package, and your own catalogs are ordinary files loaded with `require` - so both bundle into a consumer-built PHAR with no extra configuration. Reference yours by a path relative to your application (for example `__DIR__ . '/translations'`), which resolves inside the archive.
-A runnable demo in [`playground/12-translations.php`](https://github.com/drevops/tui/blob/main/playground/12-translations.php) localizes chrome and questions into Ukrainian - the bundled `uk.php` supplies the chrome automatically, a small local catalog adds the form's own labels - and exercises pluralized rendering in its multi-select summary.
+A runnable demo in [`playground/12-translations.php`](https://github.com/drevops/phptui/blob/main/playground/12-translations.php) localizes chrome and questions into Ukrainian - the bundled `uk.php` supplies the chrome automatically, a small local catalog adds the form's own labels - and exercises pluralized rendering in its multi-select summary.
diff --git a/docs/cspell.json b/docs/cspell.json
index 98186e8a..fa5e7a3d 100644
--- a/docs/cspell.json
+++ b/docs/cspell.json
@@ -46,6 +46,8 @@
"Netlify",
"normalisation",
"PHAR",
+ "PHPTUI",
+ "phptui",
"POSIX",
"questionnaires",
"recolour",
diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js
index e7758e10..7aca965b 100644
--- a/docs/docusaurus.config.js
+++ b/docs/docusaurus.config.js
@@ -16,8 +16,8 @@ const oneLight = {...prismThemes.oneLight, styles: [...prismThemes.oneLight.styl
/** @type {import('@docusaurus/types').Config} */
const config = {
// The official slogan: it suffixes every page's
diff --git a/docs/util/derive-dark-diagram.js b/docs/util/derive-dark-diagram.js
index 28fbc50e..39e6293a 100644
--- a/docs/util/derive-dark-diagram.js
+++ b/docs/util/derive-dark-diagram.js
@@ -34,7 +34,7 @@ const BACKGROUND = {from: 'background:#FFFFFF', to: 'background:transparent'};
// become a raised surface (kept lighter than every package tint so component
// boxes still read as cards); black text and strokes become light grey; each
// pastel package fill becomes a dark tint of the same hue. Keep this table in
-// step with the palette documented in the render-tui-diagrams skill.
+// step with the palette documented in the render-phptui-diagrams skill.
const COLORS = {
'#FFFFFF': '#3b3b3d',
'#000000': '#e3e3e3',
diff --git a/docs/util/render-anatomy-svgs.php b/docs/util/render-anatomy-svgs.php
index 5a4eeb7b..6e102d4a 100644
--- a/docs/util/render-anatomy-svgs.php
+++ b/docs/util/render-anatomy-svgs.php
@@ -17,13 +17,13 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Testing\TuiTester;
-use DrevOps\Tui\Theme\Mode;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Testing\TuiTester;
+use DrevOps\PhpTui\Theme\Mode;
require dirname(__DIR__, 2) . '/vendor/autoload.php';
require __DIR__ . '/svg-light-twin.php';
diff --git a/docs/util/render-field-svgs.php b/docs/util/render-field-svgs.php
index 0773235e..584f5095 100644
--- a/docs/util/render-field-svgs.php
+++ b/docs/util/render-field-svgs.php
@@ -27,14 +27,14 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Primitive\ProgressReporter;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Testing\TuiTester;
-use DrevOps\Tui\Theme\Mode;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Primitive\ProgressReporter;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Testing\TuiTester;
+use DrevOps\PhpTui\Theme\Mode;
require dirname(__DIR__, 2) . '/vendor/autoload.php';
require_once __DIR__ . '/svg-slowdown.php';
@@ -74,7 +74,7 @@
* @param string $tree
* The fixture directory the file-picker fields browse.
*
- * @return array, rows: int, static_keys?: list, subject?: string}>
+ * @return array, rows: int, static_keys?: list, subject?: string}>
* The specs keyed by name. A spec may add "static_keys" when the opened
* editor needs a keystroke before its static frame is worth capturing, and
* "subject" when what it draws is not a field, so its assets carry the name
@@ -283,7 +283,7 @@ function fieldSpecs(string $tree): array {
*
* @param string $name
* The spec name.
- * @param array{form: callable(): \DrevOps\Tui\Builder\Form, keys: list, rows: int} $spec
+ * @param array{form: callable(): \DrevOps\PhpTui\Builder\Form, keys: list, rows: int} $spec
* The spec.
* @param string $assets_dir
* The output directory.
@@ -349,7 +349,7 @@ function assetSubject(string $name, array $spec): string {
*
* @param string $name
* The spec name.
- * @param array{form: callable(): \DrevOps\Tui\Builder\Form, keys: list, rows: int} $spec
+ * @param array{form: callable(): \DrevOps\PhpTui\Builder\Form, keys: list, rows: int} $spec
* The spec.
* @param string $assets_dir
* The output directory.
diff --git a/docs/util/render-output-svgs.php b/docs/util/render-output-svgs.php
index 8498435f..4a340dce 100644
--- a/docs/util/render-output-svgs.php
+++ b/docs/util/render-output-svgs.php
@@ -8,7 +8,7 @@
* The output primitives write finished lines and return - there is nothing to
* animate, unlike the progress primitive that redraws one line in place - so
* each subject renders as a single static frame rather than an animation. This
- * drives the real {@see \DrevOps\Tui\Primitive\Output} against an in-memory
+ * drives the real {@see \DrevOps\PhpTui\Primitive\Output} against an in-memory
* terminal, lays the captured lines into an asciicast for the shared svg-term
* renderer, and does it in all four glyph and colour display modes. Each dark
* SVG derives its light twin in the same pass. The result is reproducible on
@@ -25,15 +25,15 @@
declare(strict_types=1);
-use DrevOps\Tui\Primitive\Output;
-use DrevOps\Tui\Primitive\Status;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Terminal\TerminalControl;
-use DrevOps\Tui\Testing\BufferedTerminal;
-use DrevOps\Tui\Theme\DefaultTheme;
-use DrevOps\Tui\Theme\Mode;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Theme\ThemeManager;
+use DrevOps\PhpTui\Primitive\Output;
+use DrevOps\PhpTui\Primitive\Status;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Terminal\TerminalControl;
+use DrevOps\PhpTui\Testing\BufferedTerminal;
+use DrevOps\PhpTui\Theme\DefaultTheme;
+use DrevOps\PhpTui\Theme\Mode;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Theme\ThemeManager;
require dirname(__DIR__, 2) . '/vendor/autoload.php';
require_once __DIR__ . '/svg-light-twin.php';
@@ -59,7 +59,7 @@
* Each mirrors a playground/18-output-* script - same content and calls - so
* the rendered cards match the code a reader runs.
*
- * @return array
+ * @return array
* The subject writers keyed by asset name.
*/
function outputSpecs(): array {
@@ -116,7 +116,7 @@ function outputSpecs(): array {
*
* @param string $name
* The asset name (box, status or definitions).
- * @param callable(\DrevOps\Tui\Primitive\Output): void $spec
+ * @param callable(\DrevOps\PhpTui\Primitive\Output): void $spec
* The subject writer.
* @param string $assets_dir
* The output directory.
@@ -148,9 +148,9 @@ function renderOutput(string $name, callable $spec, string $assets_dir, string $
/**
* Drive the real primitive and capture the lines it writes.
*
- * @param \DrevOps\Tui\Theme\DefaultTheme $theme
+ * @param \DrevOps\PhpTui\Theme\DefaultTheme $theme
* The theme that draws the pieces.
- * @param callable(\DrevOps\Tui\Primitive\Output): void $spec
+ * @param callable(\DrevOps\PhpTui\Primitive\Output): void $spec
* The subject writer.
*
* @return list
diff --git a/docs/util/render-progress-svgs.php b/docs/util/render-progress-svgs.php
index 2a17ae61..72097fdf 100644
--- a/docs/util/render-progress-svgs.php
+++ b/docs/util/render-progress-svgs.php
@@ -7,7 +7,7 @@
*
* The progress primitive is not a keystroke-driven field: it is a single line
* the theme redraws in place with a carriage return while a callback runs. So
- * this drives the real {@see \DrevOps\Tui\Primitive\Progress} against an
+ * this drives the real {@see \DrevOps\PhpTui\Primitive\Progress} against an
* in-memory terminal, splits the captured output into frames on the carriage
* return, and lays them into an asciicast for the shared svg-term renderer -
* both an animation (every frame) and a single static frame - in all four glyph
@@ -25,14 +25,14 @@
declare(strict_types=1);
-use DrevOps\Tui\Primitive\Progress;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Terminal\TerminalControl;
-use DrevOps\Tui\Testing\BufferedTerminal;
-use DrevOps\Tui\Theme\DefaultTheme;
-use DrevOps\Tui\Theme\Mode;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Theme\ThemeManager;
+use DrevOps\PhpTui\Primitive\Progress;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Terminal\TerminalControl;
+use DrevOps\PhpTui\Testing\BufferedTerminal;
+use DrevOps\PhpTui\Theme\DefaultTheme;
+use DrevOps\PhpTui\Theme\Mode;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Theme\ThemeManager;
require dirname(__DIR__, 2) . '/vendor/autoload.php';
require_once __DIR__ . '/svg-slowdown.php';
@@ -132,7 +132,7 @@ function renderProgress(string $name, array $spec, string $assets_dir, string $u
* are stripped to leave the visible line, and the finish repaint (a duplicate of
* the last state) is folded away.
*
- * @param \DrevOps\Tui\Theme\DefaultTheme $theme
+ * @param \DrevOps\PhpTui\Theme\DefaultTheme $theme
* The theme that draws the line.
* @param array{total: int|null, caption: string, labels: list} $spec
* The subject spec.
diff --git a/docs/util/render-social-card.php b/docs/util/render-social-card.php
index ff24b248..642cd3a8 100644
--- a/docs/util/render-social-card.php
+++ b/docs/util/render-social-card.php
@@ -191,8 +191,8 @@ function cardHtml(string $terminal_uri, string $logo_svg): string {
throw new \RuntimeException('Logo asset missing: ' . $logo_path);
}
-info('TUI - Social card');
-info('=================');
+info('PHPTUI - Social card');
+info('====================');
$tmp_dir = $project_dir . '/.artifacts/tmp/social-card';
@@ -210,7 +210,7 @@ function cardHtml(string $terminal_uri, string $logo_svg): string {
info('Rendering ' . CARD_WIDTH . 'x' . CARD_HEIGHT . ' via agent-browser...');
-$session = 'tui-social-card';
+$session = 'phptui-social-card';
run(['agent-browser', '--session', $session, 'open', 'file://' . $html_path]);
try {
diff --git a/docs/util/render-theme-svgs.php b/docs/util/render-theme-svgs.php
index 272ec1a7..6b2509a3 100644
--- a/docs/util/render-theme-svgs.php
+++ b/docs/util/render-theme-svgs.php
@@ -29,13 +29,13 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Testing\TuiTester;
-use DrevOps\Tui\Theme\Mode;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Testing\TuiTester;
+use DrevOps\PhpTui\Theme\Mode;
require dirname(__DIR__, 2) . '/vendor/autoload.php';
@@ -46,7 +46,7 @@
/**
* The preview form every theme renders - the playground/09-themes-* form.
*
- * @return \DrevOps\Tui\Builder\Form
+ * @return \DrevOps\PhpTui\Builder\Form
* The form.
*/
function previewForm(): Form {
@@ -73,7 +73,7 @@ function previewForm(): Form {
*
* @param string $theme
* The theme name.
- * @param \DrevOps\Tui\Theme\Mode $mode
+ * @param \DrevOps\PhpTui\Theme\Mode $mode
* The palette mode.
* @param bool $bordered
* Whether the rounded border frames the panel.
diff --git a/docs/util/update-assets.php b/docs/util/update-assets.php
index fd3d53a6..63ff45ae 100644
--- a/docs/util/update-assets.php
+++ b/docs/util/update-assets.php
@@ -1067,7 +1067,7 @@ function getJobs(string $project_dir): array {
// box name is a dynamic default read off the directory the demo runs from,
// and the derived slug, code and label all follow it - so the run is pinned
// to a directory named for a box, and the whole chain reads as produce.
- // Only an unattended run resolves TUI_* overrides, so an interactive
+ // Only an unattended run resolves PHPTUI_* overrides, so an interactive
// recording cannot be pinned through the environment.
foreach ($env_variants as $suffix => $env) {
$jobs['produce-box' . $suffix] = [
diff --git a/playground/01-quickstart.php b/playground/01-quickstart.php
index 29b6440f..76b4cabd 100644
--- a/playground/01-quickstart.php
+++ b/playground/01-quickstart.php
@@ -12,18 +12,18 @@
* Usage:
* php playground/01-quickstart.php
*
- * # Unattended: answers come from TUI_ environment variables and
+ * # Unattended: answers come from PHPTUI_ environment variables and
* # defaults, no terminal needed ("name" is required, so it must be given).
- * TUI_NAME='Weekly Box' php playground/01-quickstart.php < /dev/null
+ * PHPTUI_NAME='Weekly Box' php playground/01-quickstart.php < /dev/null
*/
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-all-fields.php b/playground/02-fields-all-fields.php
index ee903e90..19765e06 100644
--- a/playground/02-fields-all-fields.php
+++ b/playground/02-fields-all-fields.php
@@ -17,11 +17,11 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-calendar.php b/playground/02-fields-calendar.php
index 306a7dcf..35f9466a 100644
--- a/playground/02-fields-calendar.php
+++ b/playground/02-fields-calendar.php
@@ -15,10 +15,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-confirm.php b/playground/02-fields-confirm.php
index 9a35e4b8..aea93514 100644
--- a/playground/02-fields-confirm.php
+++ b/playground/02-fields-confirm.php
@@ -13,10 +13,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-filepicker-multiple-limited.php b/playground/02-fields-filepicker-multiple-limited.php
index 157925ef..9bdafd8d 100644
--- a/playground/02-fields-filepicker-multiple-limited.php
+++ b/playground/02-fields-filepicker-multiple-limited.php
@@ -15,10 +15,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-filepicker-multiple.php b/playground/02-fields-filepicker-multiple.php
index 29996c50..30b98b5c 100644
--- a/playground/02-fields-filepicker-multiple.php
+++ b/playground/02-fields-filepicker-multiple.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-filepicker.php b/playground/02-fields-filepicker.php
index 4d5d060d..f5bb960a 100644
--- a/playground/02-fields-filepicker.php
+++ b/playground/02-fields-filepicker.php
@@ -17,10 +17,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-number.php b/playground/02-fields-number.php
index 92cd06ea..8e7d8955 100644
--- a/playground/02-fields-number.php
+++ b/playground/02-fields-number.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-password-reveal.php b/playground/02-fields-password-reveal.php
index 9cc4ff20..0af61a7e 100644
--- a/playground/02-fields-password-reveal.php
+++ b/playground/02-fields-password-reveal.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-password.php b/playground/02-fields-password.php
index e770495b..01a4c2ec 100644
--- a/playground/02-fields-password.php
+++ b/playground/02-fields-password.php
@@ -15,10 +15,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-pause.php b/playground/02-fields-pause.php
index 182b6fbd..c4d8e935 100644
--- a/playground/02-fields-pause.php
+++ b/playground/02-fields-pause.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-rating.php b/playground/02-fields-rating.php
index 723b72f4..61ea7691 100644
--- a/playground/02-fields-rating.php
+++ b/playground/02-fields-rating.php
@@ -15,10 +15,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-reorder.php b/playground/02-fields-reorder.php
index 99e2c322..1f9dc251 100644
--- a/playground/02-fields-reorder.php
+++ b/playground/02-fields-reorder.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-search-multiple-limited.php b/playground/02-fields-search-multiple-limited.php
index 638f8092..54f9cf8e 100644
--- a/playground/02-fields-search-multiple-limited.php
+++ b/playground/02-fields-search-multiple-limited.php
@@ -15,10 +15,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-search-multiple.php b/playground/02-fields-search-multiple.php
index 73dc3a0f..8611760e 100644
--- a/playground/02-fields-search-multiple.php
+++ b/playground/02-fields-search-multiple.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-search.php b/playground/02-fields-search.php
index b44063c6..6b77e656 100644
--- a/playground/02-fields-search.php
+++ b/playground/02-fields-search.php
@@ -15,10 +15,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-select-descriptions.php b/playground/02-fields-select-descriptions.php
index 5dc81e4e..a24f8544 100644
--- a/playground/02-fields-select-descriptions.php
+++ b/playground/02-fields-select-descriptions.php
@@ -17,10 +17,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-select-groups.php b/playground/02-fields-select-groups.php
index c1f2fa12..a98fb711 100644
--- a/playground/02-fields-select-groups.php
+++ b/playground/02-fields-select-groups.php
@@ -15,10 +15,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-select-multiple-groups.php b/playground/02-fields-select-multiple-groups.php
index 44cbe5b1..fd24aa15 100644
--- a/playground/02-fields-select-multiple-groups.php
+++ b/playground/02-fields-select-multiple-groups.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-select-multiple-limited.php b/playground/02-fields-select-multiple-limited.php
index 5e6519ba..c7467b44 100644
--- a/playground/02-fields-select-multiple-limited.php
+++ b/playground/02-fields-select-multiple-limited.php
@@ -15,10 +15,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-select-multiple.php b/playground/02-fields-select-multiple.php
index 68d22909..dd8435b3 100644
--- a/playground/02-fields-select-multiple.php
+++ b/playground/02-fields-select-multiple.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-select.php b/playground/02-fields-select.php
index b11aa433..c4e22350 100644
--- a/playground/02-fields-select.php
+++ b/playground/02-fields-select.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-suggest.php b/playground/02-fields-suggest.php
index d0d1b7f9..f117d710 100644
--- a/playground/02-fields-suggest.php
+++ b/playground/02-fields-suggest.php
@@ -17,10 +17,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-template.php b/playground/02-fields-template.php
index 24dabfc9..beae9a26 100644
--- a/playground/02-fields-template.php
+++ b/playground/02-fields-template.php
@@ -15,10 +15,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-text.php b/playground/02-fields-text.php
index 2fde1666..722057f6 100644
--- a/playground/02-fields-text.php
+++ b/playground/02-fields-text.php
@@ -13,10 +13,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-textarea.php b/playground/02-fields-textarea.php
index 99c11882..f10a3f78 100644
--- a/playground/02-fields-textarea.php
+++ b/playground/02-fields-textarea.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-fields-toggle.php b/playground/02-fields-toggle.php
index f4bdd045..bb99dc6a 100644
--- a/playground/02-fields-toggle.php
+++ b/playground/02-fields-toggle.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-markup-table.php b/playground/02-markup-table.php
index 0cc04cf3..067865d9 100644
--- a/playground/02-markup-table.php
+++ b/playground/02-markup-table.php
@@ -17,10 +17,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-markup.php b/playground/02-markup.php
index e14eb5d4..41e352af 100644
--- a/playground/02-markup.php
+++ b/playground/02-markup.php
@@ -17,10 +17,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/02-progress-row.php b/playground/02-progress-row.php
index b2d2782f..0673fd6e 100644
--- a/playground/02-progress-row.php
+++ b/playground/02-progress-row.php
@@ -18,11 +18,11 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Primitive\ProgressReporter;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Primitive\ProgressReporter;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/03-panels-bordered.php b/playground/03-panels-bordered.php
index d82946ea..d3b3f3fc 100644
--- a/playground/03-panels-bordered.php
+++ b/playground/03-panels-bordered.php
@@ -18,13 +18,13 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Theme\Spacing;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Theme\Spacing;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/03-panels-borderless.php b/playground/03-panels-borderless.php
index 70458b88..3587be9c 100644
--- a/playground/03-panels-borderless.php
+++ b/playground/03-panels-borderless.php
@@ -14,13 +14,13 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Theme\Spacing;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Theme\Spacing;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/03-panels-fullscreen.php b/playground/03-panels-fullscreen.php
index 22fea67f..a0234409 100644
--- a/playground/03-panels-fullscreen.php
+++ b/playground/03-panels-fullscreen.php
@@ -23,14 +23,14 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Theme\HAlign;
-use DrevOps\Tui\Theme\VAlign;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Theme\HAlign;
+use DrevOps\PhpTui\Theme\VAlign;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/03-panels-layout.php b/playground/03-panels-layout.php
index 8902a8d8..d3361cff 100644
--- a/playground/03-panels-layout.php
+++ b/playground/03-panels-layout.php
@@ -30,12 +30,12 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/03-panels-modal.php b/playground/03-panels-modal.php
index 3d453b76..3e08a94d 100644
--- a/playground/03-panels-modal.php
+++ b/playground/03-panels-modal.php
@@ -16,12 +16,12 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/03-panels-nested.php b/playground/03-panels-nested.php
index d8d9aec2..aea590f5 100644
--- a/playground/03-panels-nested.php
+++ b/playground/03-panels-nested.php
@@ -15,14 +15,14 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Condition\Condition;
-use DrevOps\Tui\Derive\Derive;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Condition\Condition;
+use DrevOps\PhpTui\Derive\Derive;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/04-inline-editing.php b/playground/04-inline-editing.php
index 72efd097..98275fe1 100644
--- a/playground/04-inline-editing.php
+++ b/playground/04-inline-editing.php
@@ -17,11 +17,11 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/05-form-logic-conditional-fields.php b/playground/05-form-logic-conditional-fields.php
index a74d2b76..c1e8eb7c 100644
--- a/playground/05-form-logic-conditional-fields.php
+++ b/playground/05-form-logic-conditional-fields.php
@@ -16,12 +16,12 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Condition\Condition;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Condition\Condition;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/05-form-logic-conditional-indent.php b/playground/05-form-logic-conditional-indent.php
index 2affab1b..a6d9559a 100644
--- a/playground/05-form-logic-conditional-indent.php
+++ b/playground/05-form-logic-conditional-indent.php
@@ -16,12 +16,12 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Condition\Condition;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Condition\Condition;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/05-form-logic-conditional-section.php b/playground/05-form-logic-conditional-section.php
index 4476a88c..a65e83c6 100644
--- a/playground/05-form-logic-conditional-section.php
+++ b/playground/05-form-logic-conditional-section.php
@@ -15,17 +15,18 @@
*
* Usage:
* php playground/05-form-logic-conditional-section.php
- * TUI_GIFT=1 php playground/05-form-logic-conditional-section.php < /dev/null
+ * PHPTUI_GIFT=1 php playground/05-form-logic-conditional-section.php \
+ * < /dev/null
*/
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Condition\Condition;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Condition\Condition;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/05-form-logic-derived-values.php b/playground/05-form-logic-derived-values.php
index cb9c9f49..fc9e3bd6 100644
--- a/playground/05-form-logic-derived-values.php
+++ b/playground/05-form-logic-derived-values.php
@@ -17,12 +17,12 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Derive\Derive;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Derive\Derive;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/05-form-logic-fixup-rules.php b/playground/05-form-logic-fixup-rules.php
index cf8ab88f..00296a54 100644
--- a/playground/05-form-logic-fixup-rules.php
+++ b/playground/05-form-logic-fixup-rules.php
@@ -16,13 +16,13 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Fixup;
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Condition\Condition;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Fixup;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Condition\Condition;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/06-field-behaviour-closures.php b/playground/06-field-behaviour-closures.php
index 2873c846..e9db1d54 100644
--- a/playground/06-field-behaviour-closures.php
+++ b/playground/06-field-behaviour-closures.php
@@ -18,12 +18,12 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Handler\Context;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Handler\Context;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/06-field-behaviour-handlers.php b/playground/06-field-behaviour-handlers.php
index 45e8c415..a1b7a112 100644
--- a/playground/06-field-behaviour-handlers.php
+++ b/playground/06-field-behaviour-handlers.php
@@ -14,16 +14,16 @@
* php playground/06-field-behaviour-handlers.php
*
* # Unattended inputs run the same handler:
- * TUI_ORDER_CODE=PLUM99 php playground/06-field-behaviour-handlers.php
+ * PHPTUI_ORDER_CODE=PLUM99 php playground/06-field-behaviour-handlers.php
*/
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
// The require makes the handler class loadable; a real consumer would
diff --git a/playground/07-discovery.php b/playground/07-discovery.php
index 6f3b770f..d6b59207 100644
--- a/playground/07-discovery.php
+++ b/playground/07-discovery.php
@@ -9,7 +9,7 @@
* bundled sample-project/ directory. Four rule types are shown: a .env key, a
* JSON dot-path, a path-exists check and a directory scan; ->discover() also
* takes a closure for anything custom. Per-field environment variables use the
- * form-declared BOX_ prefix instead of the default TUI_.
+ * form-declared BOX_ prefix instead of the default PHPTUI_.
*
* Usage:
* php playground/07-discovery.php
@@ -20,20 +20,20 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Discovery\Dotenv;
-use DrevOps\Tui\Discovery\JsonValue;
-use DrevOps\Tui\Discovery\PathExists;
-use DrevOps\Tui\Discovery\Scan;
-use DrevOps\Tui\Discovery\ScanType;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Discovery\Dotenv;
+use DrevOps\PhpTui\Discovery\JsonValue;
+use DrevOps\PhpTui\Discovery\PathExists;
+use DrevOps\PhpTui\Discovery\Scan;
+use DrevOps\PhpTui\Discovery\ScanType;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
$form = Form::create('Discovery demo')
- // Per-field env overrides read BOX_ instead of the default TUI_.
+ // Per-field env overrides read BOX_ instead of the default PHPTUI_.
->envPrefix('BOX_')
->panel('box', 'Box', function (PanelBuilder $p): void {
// A dot-path into a JSON file: sample-project/box.json carries a "name"
diff --git a/playground/08-headless-agent-cli.php b/playground/08-headless-agent-cli.php
index 55d2cec3..34bbd606 100644
--- a/playground/08-headless-agent-cli.php
+++ b/playground/08-headless-agent-cli.php
@@ -17,9 +17,9 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/08-headless-agent-help.php b/playground/08-headless-agent-help.php
index b9665a27..bf18c88e 100644
--- a/playground/08-headless-agent-help.php
+++ b/playground/08-headless-agent-help.php
@@ -16,9 +16,9 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/08-headless-collect.php b/playground/08-headless-collect.php
index 333de4cc..9426e7c0 100644
--- a/playground/08-headless-collect.php
+++ b/playground/08-headless-collect.php
@@ -5,7 +5,7 @@
* Headless collection: the same form answered without a terminal.
*
* The collect() call resolves every field from, in order of precedence:
- * the prompts JSON, per-field environment variables (TUI_ by default),
+ * the prompts JSON, per-field environment variables (PHPTUI_ by default),
* discovered values, derived values, then the declared default. Nothing
* prompts, so the same form drives CI and automation unchanged.
*
@@ -15,10 +15,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
@@ -34,14 +34,14 @@
$p->confirm('organic', 'Organic only?')->default(FALSE);
});
-// A per-field environment variable: the uppercased field id under the TUI_
+// A per-field environment variable: the uppercased field id under the PHPTUI_
// prefix. Exported by the calling shell in real use; set here so the demo is
// self-contained. Form::envPrefix() or the facade can change the prefix.
-putenv('TUI_ORGANIC=1');
+putenv('PHPTUI_ORGANIC=1');
// Answers arrive as a JSON object keyed by field id - inline here, but
// collect() also accepts a path to a JSON file. The prompts win over the
-// environment, so "fruit" is cherry even if TUI_FRUIT were set.
+// environment, so "fruit" is cherry even if PHPTUI_FRUIT were set.
$prompts = '{"name": "Weekly Box", "fruit": "cherry"}';
try {
diff --git a/playground/08-headless-schema.php b/playground/08-headless-schema.php
index c7eb4e53..87e0cd02 100644
--- a/playground/08-headless-schema.php
+++ b/playground/08-headless-schema.php
@@ -15,9 +15,9 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/09-themes-custom.php b/playground/09-themes-custom.php
index 80f83d1f..27ea72b8 100644
--- a/playground/09-themes-custom.php
+++ b/playground/09-themes-custom.php
@@ -16,12 +16,12 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Tui;
use Playground\Themes\OceanTheme;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/09-themes-dos.php b/playground/09-themes-dos.php
index e68e3489..8737d46b 100644
--- a/playground/09-themes-dos.php
+++ b/playground/09-themes-dos.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/09-themes-elements.php b/playground/09-themes-elements.php
index 6104ca32..56a7fce4 100644
--- a/playground/09-themes-elements.php
+++ b/playground/09-themes-elements.php
@@ -29,16 +29,16 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Override\BreadcrumbOverrides;
-use DrevOps\Tui\Theme\Override\FieldOverrides;
-use DrevOps\Tui\Theme\Override\LegendOverrides;
-use DrevOps\Tui\Theme\Sgr;
-use DrevOps\Tui\Theme\ThemeBuilder;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Override\BreadcrumbOverrides;
+use DrevOps\PhpTui\Theme\Override\FieldOverrides;
+use DrevOps\PhpTui\Theme\Override\LegendOverrides;
+use DrevOps\PhpTui\Theme\Sgr;
+use DrevOps\PhpTui\Theme\ThemeBuilder;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/09-themes-ember.php b/playground/09-themes-ember.php
index 415b1477..2f293b55 100644
--- a/playground/09-themes-ember.php
+++ b/playground/09-themes-ember.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/09-themes-field-boxed.php b/playground/09-themes-field-boxed.php
index 8f986348..09b59560 100644
--- a/playground/09-themes-field-boxed.php
+++ b/playground/09-themes-field-boxed.php
@@ -17,12 +17,12 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\FieldStyle;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\FieldStyle;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/09-themes-field-underline.php b/playground/09-themes-field-underline.php
index 3754ecbb..36a2777a 100644
--- a/playground/09-themes-field-underline.php
+++ b/playground/09-themes-field-underline.php
@@ -16,12 +16,12 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\FieldStyle;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\FieldStyle;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/09-themes-floor.php b/playground/09-themes-floor.php
index 3c1304ab..38b88c94 100644
--- a/playground/09-themes-floor.php
+++ b/playground/09-themes-floor.php
@@ -26,11 +26,11 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
use Playground\Themes\PlainTheme;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/09-themes-frost.php b/playground/09-themes-frost.php
index 6febb165..8fe82e92 100644
--- a/playground/09-themes-frost.php
+++ b/playground/09-themes-frost.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/09-themes-midnight.php b/playground/09-themes-midnight.php
index a43987c8..671b3d0f 100644
--- a/playground/09-themes-midnight.php
+++ b/playground/09-themes-midnight.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/09-themes-mono.php b/playground/09-themes-mono.php
index b795a6b4..fb3982fa 100644
--- a/playground/09-themes-mono.php
+++ b/playground/09-themes-mono.php
@@ -14,10 +14,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/09-themes-options.php b/playground/09-themes-options.php
index 1556ff09..759ef415 100644
--- a/playground/09-themes-options.php
+++ b/playground/09-themes-options.php
@@ -19,14 +19,14 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Theme\Spacing;
-use DrevOps\Tui\Theme\ThemeManager;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Theme\Spacing;
+use DrevOps\PhpTui\Theme\ThemeManager;
+use DrevOps\PhpTui\Tui;
use Playground\Themes\AccentTheme;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/10-key-bindings-custom.php b/playground/10-key-bindings-custom.php
index 8429ef16..a0b3286d 100644
--- a/playground/10-key-bindings-custom.php
+++ b/playground/10-key-bindings-custom.php
@@ -15,16 +15,16 @@
declare(strict_types=1);
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Binding;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Binding;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/10-key-bindings-vim.php b/playground/10-key-bindings-vim.php
index 58e1325b..d6a39c02 100644
--- a/playground/10-key-bindings-vim.php
+++ b/playground/10-key-bindings-vim.php
@@ -16,11 +16,11 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/11-display-modes-ascii.php b/playground/11-display-modes-ascii.php
index b1b32f36..45b5c42a 100644
--- a/playground/11-display-modes-ascii.php
+++ b/playground/11-display-modes-ascii.php
@@ -16,11 +16,11 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/11-display-modes-glyph-gallery.php b/playground/11-display-modes-glyph-gallery.php
index 0f0bf179..2a19bbe2 100644
--- a/playground/11-display-modes-glyph-gallery.php
+++ b/playground/11-display-modes-glyph-gallery.php
@@ -16,21 +16,21 @@
declare(strict_types=1);
-use DrevOps\Tui\Field\Calendar;
-use DrevOps\Tui\Field\Confirm;
-use DrevOps\Tui\Field\FieldInterface;
-use DrevOps\Tui\Field\Number;
-use DrevOps\Tui\Field\Password;
-use DrevOps\Tui\Field\Pause;
-use DrevOps\Tui\Field\Reorder;
-use DrevOps\Tui\Field\Search;
-use DrevOps\Tui\Field\Select;
-use DrevOps\Tui\Field\Suggest;
-use DrevOps\Tui\Field\Text;
-use DrevOps\Tui\Field\Textarea;
-use DrevOps\Tui\Field\Toggle;
-use DrevOps\Tui\Theme\DefaultTheme;
-use DrevOps\Tui\Utils\Strings;
+use DrevOps\PhpTui\Field\Calendar;
+use DrevOps\PhpTui\Field\Confirm;
+use DrevOps\PhpTui\Field\FieldInterface;
+use DrevOps\PhpTui\Field\Number;
+use DrevOps\PhpTui\Field\Password;
+use DrevOps\PhpTui\Field\Pause;
+use DrevOps\PhpTui\Field\Reorder;
+use DrevOps\PhpTui\Field\Search;
+use DrevOps\PhpTui\Field\Select;
+use DrevOps\PhpTui\Field\Suggest;
+use DrevOps\PhpTui\Field\Text;
+use DrevOps\PhpTui\Field\Textarea;
+use DrevOps\PhpTui\Field\Toggle;
+use DrevOps\PhpTui\Theme\DefaultTheme;
+use DrevOps\PhpTui\Utils\Strings;
require __DIR__ . '/../vendor/autoload.php';
@@ -41,7 +41,7 @@
/**
* The fields to showcase, each built freshly (fields are stateful).
*
- * @var array
+ * @var array
*/
$fields = [
'Text' => static fn(): FieldInterface => new Text('Pear'),
diff --git a/playground/11-display-modes-markdown.php b/playground/11-display-modes-markdown.php
index e630b386..b211a86d 100644
--- a/playground/11-display-modes-markdown.php
+++ b/playground/11-display-modes-markdown.php
@@ -20,11 +20,11 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/11-display-modes-mode-auto.php b/playground/11-display-modes-mode-auto.php
index 1f666c28..bd5cb58f 100644
--- a/playground/11-display-modes-mode-auto.php
+++ b/playground/11-display-modes-mode-auto.php
@@ -16,11 +16,11 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/11-display-modes-mode-forced.php b/playground/11-display-modes-mode-forced.php
index 009c4ed7..99017606 100644
--- a/playground/11-display-modes-mode-forced.php
+++ b/playground/11-display-modes-mode-forced.php
@@ -14,12 +14,12 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Mode;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Mode;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/11-display-modes-no-color.php b/playground/11-display-modes-no-color.php
index e3da89f4..dc986961 100644
--- a/playground/11-display-modes-no-color.php
+++ b/playground/11-display-modes-no-color.php
@@ -15,11 +15,11 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/12-specification-screen.php b/playground/12-specification-screen.php
index bf4402a2..bb201af3 100644
--- a/playground/12-specification-screen.php
+++ b/playground/12-specification-screen.php
@@ -20,22 +20,22 @@
declare(strict_types=1);
-use DrevOps\Tui\Block\Breadcrumb;
-use DrevOps\Tui\Block\Legend;
-use DrevOps\Tui\Block\Markup;
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Screen\Assembler;
-use DrevOps\Tui\Screen\Axis;
-use DrevOps\Tui\Screen\Collector;
-use DrevOps\Tui\Screen\KeyRouter;
-use DrevOps\Tui\Screen\ScreenRenderer;
-use DrevOps\Tui\Testing\ScreenTester;
-use DrevOps\Tui\Theme\DefaultTheme;
+use DrevOps\PhpTui\Block\Breadcrumb;
+use DrevOps\PhpTui\Block\Legend;
+use DrevOps\PhpTui\Block\Markup;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Screen\Assembler;
+use DrevOps\PhpTui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Collector;
+use DrevOps\PhpTui\Screen\KeyRouter;
+use DrevOps\PhpTui\Screen\ScreenRenderer;
+use DrevOps\PhpTui\Testing\ScreenTester;
+use DrevOps\PhpTui\Theme\DefaultTheme;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/12-translations.php b/playground/12-translations.php
index 352db0a4..e100ae32 100644
--- a/playground/12-translations.php
+++ b/playground/12-translations.php
@@ -30,12 +30,12 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Translation\Translator;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Translation\Translator;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/13-testing.php b/playground/13-testing.php
index a2bede0a..ed3b2a11 100644
--- a/playground/13-testing.php
+++ b/playground/13-testing.php
@@ -16,12 +16,12 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Testing\TuiTester;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Testing\TuiTester;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/14-produce-box.php b/playground/14-produce-box.php
index 99aed12a..fc90b766 100644
--- a/playground/14-produce-box.php
+++ b/playground/14-produce-box.php
@@ -14,20 +14,20 @@
* php playground/14-produce-box.php
*
* # Unattended, with per-field environment overrides:
- * TUI_NAME='Summer Box' php playground/14-produce-box.php < /dev/null
+ * PHPTUI_NAME='Summer Box' php playground/14-produce-box.php < /dev/null
*/
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Condition\Condition;
-use DrevOps\Tui\Derive\Derive;
-use DrevOps\Tui\Handler\Context;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Condition\Condition;
+use DrevOps\PhpTui\Derive\Derive;
+use DrevOps\PhpTui\Handler\Context;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/15-progress-bar.php b/playground/15-progress-bar.php
index fe2db46a..477cebaa 100644
--- a/playground/15-progress-bar.php
+++ b/playground/15-progress-bar.php
@@ -23,10 +23,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Primitive\Progress;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Primitive\Progress;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/15-progress-spinner.php b/playground/15-progress-spinner.php
index 30bc61fe..bcf8f941 100644
--- a/playground/15-progress-spinner.php
+++ b/playground/15-progress-spinner.php
@@ -23,10 +23,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Primitive\Progress;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Primitive\Progress;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/16-loading-data.php b/playground/16-loading-data.php
index 2a1ce8d8..9a73ba4e 100644
--- a/playground/16-loading-data.php
+++ b/playground/16-loading-data.php
@@ -16,10 +16,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/17-query-options.php b/playground/17-query-options.php
index e695d209..80c47f70 100644
--- a/playground/17-query-options.php
+++ b/playground/17-query-options.php
@@ -17,10 +17,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/18-output-box.php b/playground/18-output-box.php
index fef40807..50eef7a2 100644
--- a/playground/18-output-box.php
+++ b/playground/18-output-box.php
@@ -23,9 +23,9 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/18-output-definitions.php b/playground/18-output-definitions.php
index 69b92ef1..267409db 100644
--- a/playground/18-output-definitions.php
+++ b/playground/18-output-definitions.php
@@ -19,9 +19,9 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/18-output-status.php b/playground/18-output-status.php
index bc127c3f..715cbb25 100644
--- a/playground/18-output-status.php
+++ b/playground/18-output-status.php
@@ -21,10 +21,10 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Primitive\Status;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Primitive\Status;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/18-output-table.php b/playground/18-output-table.php
index 687d3571..760e9c60 100644
--- a/playground/18-output-table.php
+++ b/playground/18-output-table.php
@@ -22,9 +22,9 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/18-output-text.php b/playground/18-output-text.php
index 561aa88a..f45b2cd2 100644
--- a/playground/18-output-text.php
+++ b/playground/18-output-text.php
@@ -21,9 +21,9 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/19-dynamic-options.php b/playground/19-dynamic-options.php
index 8be50769..dff26baa 100644
--- a/playground/19-dynamic-options.php
+++ b/playground/19-dynamic-options.php
@@ -18,11 +18,11 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\Handler\Context;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\Handler\Context;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/20-layouts-custom.php b/playground/20-layouts-custom.php
index 7429d677..748db372 100644
--- a/playground/20-layouts-custom.php
+++ b/playground/20-layouts-custom.php
@@ -26,13 +26,13 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Screen\Layout\LayoutManager;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Screen\Layout\LayoutManager;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Tui;
use Playground\Layouts\MarketLayout;
use Playground\Layouts\StallLayout;
diff --git a/playground/20-layouts-nested.php b/playground/20-layouts-nested.php
index ff982d5e..65252cd9 100644
--- a/playground/20-layouts-nested.php
+++ b/playground/20-layouts-nested.php
@@ -35,16 +35,16 @@
declare(strict_types=1);
-use DrevOps\Tui\Answers\Answers;
-use DrevOps\Tui\Block\Markup;
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Screen\Layout\LayoutManager;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Theme\Spacing;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Answers\Answers;
+use DrevOps\PhpTui\Block\Markup;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Screen\Layout\LayoutManager;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Theme\Spacing;
+use DrevOps\PhpTui\Tui;
use Playground\Layouts\MarketHallLayout;
use Playground\Layouts\StallFloorLayout;
diff --git a/playground/20-layouts-region-flow.php b/playground/20-layouts-region-flow.php
index 4a4220e2..b80adbe8 100644
--- a/playground/20-layouts-region-flow.php
+++ b/playground/20-layouts-region-flow.php
@@ -30,16 +30,16 @@
declare(strict_types=1);
-use DrevOps\Tui\Block\Markup;
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Screen\Axis;
-use DrevOps\Tui\Screen\Layout\LayoutManager;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Theme\Spacing;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Block\Markup;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Layout\LayoutManager;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Theme\Spacing;
+use DrevOps\PhpTui\Tui;
use Playground\Layouts\MarketLayout;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/20-layouts-scrolling.php b/playground/20-layouts-scrolling.php
index ec4bd5a7..9fb20f39 100644
--- a/playground/20-layouts-scrolling.php
+++ b/playground/20-layouts-scrolling.php
@@ -27,13 +27,13 @@
declare(strict_types=1);
-use DrevOps\Tui\Builder\Form;
-use DrevOps\Tui\Builder\PanelBuilder;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Theme\Spacing;
-use DrevOps\Tui\Tui;
+use DrevOps\PhpTui\Builder\Form;
+use DrevOps\PhpTui\Builder\PanelBuilder;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Theme\Spacing;
+use DrevOps\PhpTui\Tui;
require __DIR__ . '/../vendor/autoload.php';
diff --git a/playground/README.md b/playground/README.md
index b9e26e24..4aa20272 100644
--- a/playground/README.md
+++ b/playground/README.md
@@ -1,6 +1,6 @@
# TUI playground
-Runnable examples of the `drevops/tui` engine, one file per example, grouped by a numbered `NN-topic-` prefix that follows the [documentation](https://phptui.dev) order. Every script is self-contained: it requires the Composer autoloader directly, declares its whole form inline and handles its own output, so any single file can be copied out as a starting point. Most take no CLI options - each demonstrates exactly one thing, and variants are separate scripts - with one exception: [`03-panels-fullscreen.php`](03-panels-fullscreen.php) picks its alignment with `--halign`/`--valign` (plus `--max-width`) rather than spreading nine near-identical files.
+Runnable examples of the `drevops/phptui` engine, one file per example, grouped by a numbered `NN-topic-` prefix that follows the [documentation](https://phptui.dev) order. Every script is self-contained: it requires the Composer autoloader directly, declares its whole form inline and handles its own output, so any single file can be copied out as a starting point. Most take no CLI options - each demonstrates exactly one thing, and variants are separate scripts - with one exception: [`03-panels-fullscreen.php`](03-panels-fullscreen.php) picks its alignment with `--halign`/`--valign` (plus `--max-width`) rather than spreading nine near-identical files.
Reusable helper classes the scripts load sit in [`themes/`](themes), [`layouts/`](layouts) and [`handlers/`](handlers); the fixtures the examples read from are in [`sample-project/`](sample-project) - one example project the file-picker and discovery demos share - and [`translations/`](translations).
@@ -9,7 +9,7 @@ composer install
php playground/01-quickstart.php
```
-Every interactive script also runs unattended: pipe stdin (or run it from CI) and the answers resolve from defaults and `TUI_` environment variables instead of prompting.
+Every interactive script also runs unattended: pipe stdin (or run it from CI) and the answers resolve from defaults and `PHPTUI_` environment variables instead of prompting.
## Examples
@@ -48,7 +48,7 @@ Each script prints how to invoke it in its `@file` docblock. The common patterns
php playground/14-produce-box.php
# Unattended: defaults and environment answer instead of a keyboard.
-TUI_NAME='Summer Box' php playground/14-produce-box.php < /dev/null
+PHPTUI_NAME='Summer Box' php playground/14-produce-box.php < /dev/null
# Discovery uses its own env prefix, declared by the form.
BOX_SEASON=winter php playground/07-discovery.php
diff --git a/playground/layouts/MarketHallLayout.php b/playground/layouts/MarketHallLayout.php
index 7375131e..52fff629 100644
--- a/playground/layouts/MarketHallLayout.php
+++ b/playground/layouts/MarketHallLayout.php
@@ -4,9 +4,9 @@
namespace Playground\Layouts;
-use DrevOps\Tui\Screen\Axis;
-use DrevOps\Tui\Screen\Furniture;
-use DrevOps\Tui\Screen\Layout\AbstractLayout;
+use DrevOps\PhpTui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Furniture;
+use DrevOps\PhpTui\Screen\Layout\AbstractLayout;
/**
* A screen with a two-row masthead, a scrolling body and a status bar.
diff --git a/playground/layouts/MarketLayout.php b/playground/layouts/MarketLayout.php
index 6715dfe5..705212a3 100644
--- a/playground/layouts/MarketLayout.php
+++ b/playground/layouts/MarketLayout.php
@@ -4,8 +4,8 @@
namespace Playground\Layouts;
-use DrevOps\Tui\Screen\Axis;
-use DrevOps\Tui\Screen\Layout\AbstractLayout;
+use DrevOps\PhpTui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Layout\AbstractLayout;
/**
* The default arrangement with a taller trail: two rows of it instead of one.
diff --git a/playground/layouts/StallFloorLayout.php b/playground/layouts/StallFloorLayout.php
index da506554..7528aa5a 100644
--- a/playground/layouts/StallFloorLayout.php
+++ b/playground/layouts/StallFloorLayout.php
@@ -4,9 +4,9 @@
namespace Playground\Layouts;
-use DrevOps\Tui\Screen\Axis;
-use DrevOps\Tui\Screen\Layout\AbstractLayout;
-use DrevOps\Tui\Theme\BorderSide;
+use DrevOps\PhpTui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Layout\AbstractLayout;
+use DrevOps\PhpTui\Theme\BorderSide;
/**
* The stalls beside a standing noticeboard, in two columns of unequal width.
diff --git a/playground/layouts/StallLayout.php b/playground/layouts/StallLayout.php
index c11821b1..dd39bb89 100644
--- a/playground/layouts/StallLayout.php
+++ b/playground/layouts/StallLayout.php
@@ -4,8 +4,8 @@
namespace Playground\Layouts;
-use DrevOps\Tui\Screen\Axis;
-use DrevOps\Tui\Screen\Layout\AbstractLayout;
+use DrevOps\PhpTui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Layout\AbstractLayout;
/**
* The produce beside the delivery notes, in two columns of unequal width.
diff --git a/playground/themes/AccentTheme.php b/playground/themes/AccentTheme.php
index 03d13eb6..5e7abe24 100644
--- a/playground/themes/AccentTheme.php
+++ b/playground/themes/AccentTheme.php
@@ -4,8 +4,8 @@
namespace Playground\Themes;
-use DrevOps\Tui\Theme\DefaultTheme;
-use DrevOps\Tui\Theme\Sgr;
+use DrevOps\PhpTui\Theme\DefaultTheme;
+use DrevOps\PhpTui\Theme\Sgr;
/**
* The default theme plus one theme-invented option: a value "accent" colour.
diff --git a/playground/themes/OceanTheme.php b/playground/themes/OceanTheme.php
index 80e6f935..28b92772 100644
--- a/playground/themes/OceanTheme.php
+++ b/playground/themes/OceanTheme.php
@@ -4,9 +4,9 @@
namespace Playground\Themes;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Theme\DefaultTheme;
-use DrevOps\Tui\Theme\Sgr;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Theme\DefaultTheme;
+use DrevOps\PhpTui\Theme\Sgr;
/**
* A custom theme that overrides as much as it sensibly can.
diff --git a/playground/themes/PlainTheme.php b/playground/themes/PlainTheme.php
index 9575d208..e6721b6c 100644
--- a/playground/themes/PlainTheme.php
+++ b/playground/themes/PlainTheme.php
@@ -4,8 +4,8 @@
namespace Playground\Themes;
-use DrevOps\Tui\Theme\AbstractTheme;
-use DrevOps\Tui\Utils\Strings;
+use DrevOps\PhpTui\Theme\AbstractTheme;
+use DrevOps\PhpTui\Utils\Strings;
/**
* A theme built on the floor rather than on the default one.
diff --git a/src/Answers/Answer.php b/src/Answers/Answer.php
index 2112e070..0aaba56b 100644
--- a/src/Answers/Answer.php
+++ b/src/Answers/Answer.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Answers;
+namespace DrevOps\PhpTui\Answers;
-use DrevOps\Tui\Block\FieldType;
+use DrevOps\PhpTui\Block\FieldType;
/**
* A single collected answer with a snapshot of the question it answers.
@@ -13,7 +13,7 @@
* consumers can present or process an answer set without holding the form
* configuration.
*
- * @package DrevOps\Tui\Answers
+ * @package DrevOps\PhpTui\Answers
*/
final readonly class Answer {
@@ -24,11 +24,11 @@
* The question id.
* @param mixed $value
* The answer value.
- * @param \DrevOps\Tui\Answers\Provenance $provenance
+ * @param \DrevOps\PhpTui\Answers\Provenance $provenance
* How the value came to be.
* @param string $label
* The question's human-readable label.
- * @param \DrevOps\Tui\Block\FieldType $type
+ * @param \DrevOps\PhpTui\Block\FieldType $type
* The question kind.
* @param list $panels
* The titles of the panels the question lives under, outermost first.
diff --git a/src/Answers/Answers.php b/src/Answers/Answers.php
index 8030c130..9068f9c6 100644
--- a/src/Answers/Answers.php
+++ b/src/Answers/Answers.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Answers;
+namespace DrevOps\PhpTui\Answers;
-use DrevOps\Tui\Block\Panel;
-use DrevOps\Tui\Terminal\Terminal;
+use DrevOps\PhpTui\Block\Panel;
+use DrevOps\PhpTui\Terminal\Terminal;
/**
* The collected answer set: values plus provenance, keyed by question id.
@@ -19,7 +19,7 @@
* question (label, kind, panel trail) in $items, so summaries and processing
* need no form configuration.
*
- * @package DrevOps\Tui\Answers
+ * @package DrevOps\PhpTui\Answers
*/
final readonly class Answers {
@@ -28,9 +28,9 @@
*
* @param array $values
* The answer values keyed by question id.
- * @param array $provenance
+ * @param array $provenance
* The provenance keyed by question id.
- * @param array $items
+ * @param array $items
* The self-describing answers keyed by question id, in form order (empty
* when the set was assembled without a configuration).
*/
@@ -48,11 +48,11 @@ public function __construct(
* contributes no heading: the trail each answer carries starts at the panel
* it was asked in.
*
- * @param \DrevOps\Tui\Block\Panel $root
+ * @param \DrevOps\PhpTui\Block\Panel $root
* The panel every declared panel hangs from.
* @param array $values
* The answer values keyed by question id.
- * @param array $provenance
+ * @param array $provenance
* The provenance keyed by question id.
*
* @return self
@@ -71,16 +71,16 @@ public static function forTree(Panel $root, array $values, array $provenance): s
/**
* Walk a panel block and the panels beneath it, snapshotting each answer.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to walk.
* @param list $trail
* The titles of the ancestor panels, outermost first.
* @param array $values
* The answer values keyed by question id.
- * @param array $provenance
+ * @param array $provenance
* The provenance keyed by question id.
*
- * @return array
+ * @return array
* The self-describing answers keyed by question id.
*/
protected static function walkTree(Panel $panel, array $trail, array $values, array $provenance): array {
@@ -98,16 +98,16 @@ protected static function walkTree(Panel $panel, array $trail, array $values, ar
/**
* Snapshot the questions one panel asked, in the order it asked them.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel.
* @param list $trail
* The titles of the panels the questions live under, outermost first.
* @param array $values
* The answer values keyed by question id.
- * @param array $provenance
+ * @param array $provenance
* The provenance keyed by question id.
*
- * @return array
+ * @return array
* The self-describing answers keyed by question id.
*/
protected static function snapshot(Panel $panel, array $trail, array $values, array $provenance): array {
@@ -173,7 +173,7 @@ public function parts(string $id): array {
* @param string $id
* The question id.
*
- * @return \DrevOps\Tui\Answers\Provenance
+ * @return \DrevOps\PhpTui\Answers\Provenance
* The provenance (Default when absent).
*/
public function provenanceOf(string $id): Provenance {
@@ -186,7 +186,7 @@ public function provenanceOf(string $id): Provenance {
* @param string $id
* The question id.
*
- * @return \DrevOps\Tui\Answers\Answer|null
+ * @return \DrevOps\PhpTui\Answers\Answer|null
* The answer, or NULL when absent (or the set carries no snapshots).
*/
public function item(string $id): ?Answer {
diff --git a/src/Answers/Provenance.php b/src/Answers/Provenance.php
index 7f6487d4..2cff6dc3 100644
--- a/src/Answers/Provenance.php
+++ b/src/Answers/Provenance.php
@@ -2,14 +2,14 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Answers;
+namespace DrevOps\PhpTui\Answers;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Translation\Translator;
/**
* How an answer's value came to be.
*
- * @package DrevOps\Tui\Answers
+ * @package DrevOps\PhpTui\Answers
*/
enum Provenance: string {
diff --git a/src/Answers/SummaryFormatter.php b/src/Answers/SummaryFormatter.php
index 827862ce..84d8adf4 100644
--- a/src/Answers/SummaryFormatter.php
+++ b/src/Answers/SummaryFormatter.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Answers;
+namespace DrevOps\PhpTui\Answers;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Terminal\Markup;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Terminal\Markup;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Formats a self-describing answer set as a human summary grouped by panel.
@@ -15,7 +15,7 @@
* active answers appear; each value is rendered readably and non-default
* answers carry a provenance badge.
*
- * @package DrevOps\Tui\Answers
+ * @package DrevOps\PhpTui\Answers
*/
class SummaryFormatter {
@@ -32,7 +32,7 @@ public function __construct(protected bool $hyperlinks = FALSE) {
/**
* Format the answers grouped by their panel trails.
*
- * @param \DrevOps\Tui\Answers\Answers $answers
+ * @param \DrevOps\PhpTui\Answers\Answers $answers
* The answer set, however it was collected.
*
* @return string
@@ -96,7 +96,7 @@ protected function label(string $source): string {
/**
* Render an answer's value readably, masking secret values.
*
- * @param \DrevOps\Tui\Answers\Answer $answer
+ * @param \DrevOps\PhpTui\Answers\Answer $answer
* The answer.
*
* @return string
@@ -116,7 +116,7 @@ protected function renderValue(Answer $answer): string {
/**
* The provenance badge for a value (empty for defaults).
*
- * @param \DrevOps\Tui\Answers\Provenance $provenance
+ * @param \DrevOps\PhpTui\Answers\Provenance $provenance
* The provenance.
*
* @return string
diff --git a/src/Answers/ValueFormatter.php b/src/Answers/ValueFormatter.php
index 28a149e4..dfe36bcf 100644
--- a/src/Answers/ValueFormatter.php
+++ b/src/Answers/ValueFormatter.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Answers;
+namespace DrevOps\PhpTui\Answers;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Renders an answer value readably, one rule for every display surface.
@@ -16,7 +16,7 @@
* fixed-length mask conceals both a secret's value and its length, whatever
* glyph the surface masks with.
*
- * @package DrevOps\Tui\Answers
+ * @package DrevOps\PhpTui\Answers
*/
final class ValueFormatter {
diff --git a/src/Block/AbstractBlock.php b/src/Block/AbstractBlock.php
index 4031c164..c3af6792 100644
--- a/src/Block/AbstractBlock.php
+++ b/src/Block/AbstractBlock.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\Screen\Capability\BorderCapableInterface;
-use DrevOps\Tui\Screen\Capability\BorderCapableTrait;
-use DrevOps\Tui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Screen\Capability\BorderCapableInterface;
+use DrevOps\PhpTui\Screen\Capability\BorderCapableTrait;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* Behaviour every block shares: drawing through a theme's elements.
@@ -19,7 +19,7 @@
* what a block occupies is known where it is drawn - so the renderer sizes
* the box.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
abstract class AbstractBlock implements BlockInterface, BorderCapableInterface {
@@ -28,7 +28,7 @@ abstract class AbstractBlock implements BlockInterface, BorderCapableInterface {
/**
* The theme, narrowed to the elements this block draws with.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
* @param class-string $elements
* The elements interface this block declares.
diff --git a/src/Block/Actions.php b/src/Block/Actions.php
index 3619c2f5..b3d5247f 100644
--- a/src/Block/Actions.php
+++ b/src/Block/Actions.php
@@ -2,17 +2,17 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
-
-use DrevOps\Tui\Block\Capability\ActivateCapableInterface;
-use DrevOps\Tui\Block\Capability\FocusCapableInterface;
-use DrevOps\Tui\Block\Capability\FocusCapableTrait;
-use DrevOps\Tui\Block\Capability\RejectCapableInterface;
-use DrevOps\Tui\Block\Element\ActionsElementsInterface;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+namespace DrevOps\PhpTui\Block;
+
+use DrevOps\PhpTui\Block\Capability\ActivateCapableInterface;
+use DrevOps\PhpTui\Block\Capability\FocusCapableInterface;
+use DrevOps\PhpTui\Block\Capability\FocusCapableTrait;
+use DrevOps\PhpTui\Block\Capability\RejectCapableInterface;
+use DrevOps\PhpTui\Block\Element\ActionsElementsInterface;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* The buttons that end the form.
@@ -24,7 +24,7 @@
* so. Withholding it is drawn here too: the reason a form cannot be ended yet
* is what the buttons say about themselves.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final class Actions extends AbstractBlock implements ActivateCapableInterface, FocusCapableInterface, RejectCapableInterface {
@@ -89,7 +89,7 @@ public function names(): array {
* @return static
* The block.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the action name is unknown.
*/
public function select(string $name): static {
diff --git a/src/Block/BlockInterface.php b/src/Block/BlockInterface.php
index 217d66ae..c08a61fc 100644
--- a/src/Block/BlockInterface.php
+++ b/src/Block/BlockInterface.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* Anything drawn in a region.
@@ -14,14 +14,14 @@
* colour and glyph belong to the theme, so render() takes the elements from
* the theme rather than choosing either itself.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
interface BlockInterface {
/**
* Draw this block.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme supplying the elements it composes.
*
* @return string
diff --git a/src/Block/Breadcrumb.php b/src/Block/Breadcrumb.php
index 66464f4d..b20dd045 100644
--- a/src/Block/Breadcrumb.php
+++ b/src/Block/Breadcrumb.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\Block\Element\BreadcrumbElementsInterface;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Block\Element\BreadcrumbElementsInterface;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* The trail of panels you have entered.
@@ -15,7 +15,7 @@
* It gains a segment as you descend and loses one as you come back, so its
* content changes while the block itself never moves.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final class Breadcrumb extends AbstractBlock {
diff --git a/src/Block/Buttons.php b/src/Block/Buttons.php
index 12edf329..1eb6c4e2 100644
--- a/src/Block/Buttons.php
+++ b/src/Block/Buttons.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
/**
* The submit/cancel action pair that closes a form or a modal.
@@ -12,7 +12,7 @@
* closes the dialog. The labels are configurable; a dialog always shows its
* pair, because it is the only way out of one, while a form may hide it.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final readonly class Buttons {
diff --git a/src/Block/Capability/ActivateCapableInterface.php b/src/Block/Capability/ActivateCapableInterface.php
index f84bf013..a647a6a4 100644
--- a/src/Block/Capability/ActivateCapableInterface.php
+++ b/src/Block/Capability/ActivateCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
/**
* A block that does something when it is activated.
@@ -10,7 +10,7 @@
* Activating runs work or ends the form; it reveals nothing. Nothing it does
* reaches the collected result, so holding a value is a separate capability.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
interface ActivateCapableInterface {
diff --git a/src/Block/Capability/BindCapableInterface.php b/src/Block/Capability/BindCapableInterface.php
index 56824c84..cb709647 100644
--- a/src/Block/Capability/BindCapableInterface.php
+++ b/src/Block/Capability/BindCapableInterface.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyMap;
-use DrevOps\Tui\Input\ScopedKeyMap;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyMap;
+use DrevOps\PhpTui\Input\ScopedKeyMap;
/**
* A block that says which keys apply while it is in play.
@@ -22,14 +22,14 @@
*
* {@see BindCapableTrait} carries the default implementation.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
interface BindCapableInterface {
/**
* Answer to a set of bindings rather than to the default ones.
*
- * @param \DrevOps\Tui\Input\KeyMap $keys
+ * @param \DrevOps\PhpTui\Input\KeyMap $keys
* The resolved bindings for the whole form.
*
* @return static
@@ -40,7 +40,7 @@ public function bind(KeyMap $keys): static;
/**
* The keys that apply while this block is in play.
*
- * @return \DrevOps\Tui\Input\ScopedKeyMap
+ * @return \DrevOps\PhpTui\Input\ScopedKeyMap
* The bindings resolved for this block's scope.
*/
public function bindings(): ScopedKeyMap;
@@ -48,7 +48,7 @@ public function bindings(): ScopedKeyMap;
/**
* Whether a key stops at this block rather than travelling outward.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key.
*
* @return bool
@@ -62,7 +62,7 @@ public function binds(Key $key): bool;
* The same fragments a legend is written from, so the line advertising a key
* and the block answering it can never disagree about which keys are live.
*
- * @return list<\DrevOps\Tui\Input\Hint>
+ * @return list<\DrevOps\PhpTui\Input\Hint>
* The fragments, in the order they are advertised.
*/
public function hints(): array;
diff --git a/src/Block/Capability/BindCapableTrait.php b/src/Block/Capability/BindCapableTrait.php
index 25db04e9..548efb06 100644
--- a/src/Block/Capability/BindCapableTrait.php
+++ b/src/Block/Capability/BindCapableTrait.php
@@ -2,19 +2,19 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyMap;
-use DrevOps\Tui\Input\KeyMapManager;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Input\ScopedKeyMap;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyMap;
+use DrevOps\PhpTui\Input\KeyMapManager;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Input\ScopedKeyMap;
/**
* Binding behaviour: the keys that apply while a block is in play.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
trait BindCapableTrait {
@@ -49,7 +49,7 @@ public function binds(Key $key): bool {
/**
* The bindings this block resolves its scope against.
*
- * @return \DrevOps\Tui\Input\KeyMap
+ * @return \DrevOps\PhpTui\Input\KeyMap
* The bindings it was given, else the default preset.
*/
protected function keyMap(): KeyMap {
@@ -59,10 +59,10 @@ protected function keyMap(): KeyMap {
/**
* What a key means here.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key.
*
- * @return \DrevOps\Tui\Input\Action|null
+ * @return \DrevOps\PhpTui\Input\Action|null
* The action it triggers, or NULL when it triggers none here.
*/
protected function boundAction(Key $key): ?Action {
@@ -80,7 +80,7 @@ protected function boundAction(Key $key): ?Action {
/**
* The scope this block's keys resolve in.
*
- * @return \DrevOps\Tui\Input\Scope
+ * @return \DrevOps\PhpTui\Input\Scope
* The scope.
*/
abstract protected function keyScope(): Scope;
diff --git a/src/Block/Capability/CaptureCapableInterface.php b/src/Block/Capability/CaptureCapableInterface.php
index 5c2e5688..523245bd 100644
--- a/src/Block/Capability/CaptureCapableInterface.php
+++ b/src/Block/Capability/CaptureCapableInterface.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
-use DrevOps\Tui\Block\Mode;
-use DrevOps\Tui\Input\Key;
+use DrevOps\PhpTui\Block\Mode;
+use DrevOps\PhpTui\Input\Key;
/**
* A block that opens in place to capture something, then closes again.
@@ -20,14 +20,14 @@
* the keys it answers to, the draft is what it holds, and closing is what
* decides whether any of it becomes the answer.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
interface CaptureCapableInterface {
/**
* Which of its two shapes this block is drawing.
*
- * @return \DrevOps\Tui\Block\Mode
+ * @return \DrevOps\PhpTui\Block\Mode
* The mode.
*/
public function mode(): Mode;
@@ -62,7 +62,7 @@ public function draft(mixed $draft): static;
/**
* Send a key to what this block opened onto.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key.
*
* @return bool
diff --git a/src/Block/Capability/CollectCapableInterface.php b/src/Block/Capability/CollectCapableInterface.php
index f55f9233..7fb5eb5b 100644
--- a/src/Block/Capability/CollectCapableInterface.php
+++ b/src/Block/Capability/CollectCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
/**
* A block that holds a value which ends up in the result.
@@ -15,7 +15,7 @@
* is normalized are all facts about the value rather than about the screen, so
* they belong here beside it.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
interface CollectCapableInterface {
diff --git a/src/Block/Capability/ConstrainCapableInterface.php b/src/Block/Capability/ConstrainCapableInterface.php
index 84d278db..f20d3c5a 100644
--- a/src/Block/Capability/ConstrainCapableInterface.php
+++ b/src/Block/Capability/ConstrainCapableInterface.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
-use DrevOps\Tui\Block\DateBounds;
-use DrevOps\Tui\Block\NumberBounds;
-use DrevOps\Tui\Block\SelectionBounds;
+use DrevOps\PhpTui\Block\DateBounds;
+use DrevOps\PhpTui\Block\NumberBounds;
+use DrevOps\PhpTui\Block\SelectionBounds;
/**
* A block that says what it will accept, before you act.
@@ -20,7 +20,7 @@
* surface measures with, so the panel, the headless path and the schema cannot
* disagree about what is in range.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
interface ConstrainCapableInterface {
@@ -46,7 +46,7 @@ public function constraint(): ?string;
/**
* Bound how large a number may be.
*
- * @param \DrevOps\Tui\Block\NumberBounds $bounds
+ * @param \DrevOps\PhpTui\Block\NumberBounds $bounds
* The minimum, maximum and keyboard step.
*
* @return static
@@ -57,7 +57,7 @@ public function bounds(NumberBounds $bounds): static;
/**
* How large a number may be.
*
- * @return \DrevOps\Tui\Block\NumberBounds|null
+ * @return \DrevOps\PhpTui\Block\NumberBounds|null
* The bounds, or NULL when the magnitude is unbounded.
*/
public function numberBounds(): ?NumberBounds;
@@ -65,7 +65,7 @@ public function numberBounds(): ?NumberBounds;
/**
* Bound how early or late a date may be.
*
- * @param \DrevOps\Tui\Block\DateBounds $bounds
+ * @param \DrevOps\PhpTui\Block\DateBounds $bounds
* The range, and the day its calendar week begins on.
*
* @return static
@@ -76,7 +76,7 @@ public function dates(DateBounds $bounds): static;
/**
* How early or late a date may be.
*
- * @return \DrevOps\Tui\Block\DateBounds|null
+ * @return \DrevOps\PhpTui\Block\DateBounds|null
* The bounds, or NULL when the range is unbounded.
*/
public function dateBounds(): ?DateBounds;
@@ -84,7 +84,7 @@ public function dateBounds(): ?DateBounds;
/**
* Bound how many values a list may hold.
*
- * @param \DrevOps\Tui\Block\SelectionBounds $bounds
+ * @param \DrevOps\PhpTui\Block\SelectionBounds $bounds
* The minimum and maximum count.
*
* @return static
@@ -95,7 +95,7 @@ public function selections(SelectionBounds $bounds): static;
/**
* How many values a list may hold.
*
- * @return \DrevOps\Tui\Block\SelectionBounds|null
+ * @return \DrevOps\PhpTui\Block\SelectionBounds|null
* The bounds, or NULL when the count is unbounded.
*/
public function selectionBounds(): ?SelectionBounds;
diff --git a/src/Block/Capability/DependCapableInterface.php b/src/Block/Capability/DependCapableInterface.php
index 32d5e927..b543403e 100644
--- a/src/Block/Capability/DependCapableInterface.php
+++ b/src/Block/Capability/DependCapableInterface.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
-use DrevOps\Tui\Condition\ConditionInterface;
+use DrevOps\PhpTui\Condition\ConditionInterface;
/**
* A block that appears or disappears depending on other answers.
@@ -22,14 +22,14 @@
*
* {@see DependCapableTrait} carries the default implementation.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
interface DependCapableInterface {
/**
* Decide whether this block is there at all.
*
- * @param \Closure|\DrevOps\Tui\Condition\ConditionInterface $when
+ * @param \Closure|\DrevOps\PhpTui\Condition\ConditionInterface $when
* A declared condition matched against the answers, or an
* `fn (array $answers): bool` deciding for itself.
*
@@ -41,7 +41,7 @@ public function when(\Closure|ConditionInterface $when): static;
/**
* What decides whether this block is there at all.
*
- * @return \Closure|\DrevOps\Tui\Condition\ConditionInterface|null
+ * @return \Closure|\DrevOps\PhpTui\Condition\ConditionInterface|null
* The condition, or NULL when the block is always there.
*/
public function condition(): \Closure|ConditionInterface|null;
diff --git a/src/Block/Capability/DependCapableTrait.php b/src/Block/Capability/DependCapableTrait.php
index 6db213f7..c232a81c 100644
--- a/src/Block/Capability/DependCapableTrait.php
+++ b/src/Block/Capability/DependCapableTrait.php
@@ -2,14 +2,14 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
-use DrevOps\Tui\Condition\ConditionInterface;
+use DrevOps\PhpTui\Condition\ConditionInterface;
/**
* Dependency behaviour: whether a block is there at all.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
trait DependCapableTrait {
@@ -51,7 +51,7 @@ public function condition(): \Closure|ConditionInterface|null {
* absent here: anything describing the form has to be able to say which
* answers a dependency is about.
*
- * @return \DrevOps\Tui\Condition\ConditionInterface|null
+ * @return \DrevOps\PhpTui\Condition\ConditionInterface|null
* The rule, or NULL when the block is always there or decides for itself.
*/
public function rule(): ?ConditionInterface {
diff --git a/src/Block/Capability/DescendCapableInterface.php b/src/Block/Capability/DescendCapableInterface.php
index eb8623a6..901c6621 100644
--- a/src/Block/Capability/DescendCapableInterface.php
+++ b/src/Block/Capability/DescendCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
/**
* A block you go into: the screen becomes its contents, and you can come back.
@@ -11,7 +11,7 @@
* is the capability nothing else has - a container holds things and an
* arrangement places them, but neither is somewhere you go.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
interface DescendCapableInterface {
diff --git a/src/Block/Capability/FocusCapableInterface.php b/src/Block/Capability/FocusCapableInterface.php
index 9713a43c..c02ea413 100644
--- a/src/Block/Capability/FocusCapableInterface.php
+++ b/src/Block/Capability/FocusCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
/**
* A block you can move onto, so your keys then act on it.
@@ -13,7 +13,7 @@
*
* {@see FocusCapableTrait} carries the default implementation.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
interface FocusCapableInterface {
diff --git a/src/Block/Capability/FocusCapableTrait.php b/src/Block/Capability/FocusCapableTrait.php
index 89c734d6..eb80cdab 100644
--- a/src/Block/Capability/FocusCapableTrait.php
+++ b/src/Block/Capability/FocusCapableTrait.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
/**
* Focus behaviour: whether the cursor is on a block.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
trait FocusCapableTrait {
diff --git a/src/Block/Capability/OverlayCapableInterface.php b/src/Block/Capability/OverlayCapableInterface.php
index 1e47656a..a0ada809 100644
--- a/src/Block/Capability/OverlayCapableInterface.php
+++ b/src/Block/Capability/OverlayCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
/**
* A block that draws over everything else rather than replacing it.
@@ -10,7 +10,7 @@
* It is the same block either way: overlaying changes what is behind it, and
* nothing about the block itself.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
interface OverlayCapableInterface {
diff --git a/src/Block/Capability/RejectCapableInterface.php b/src/Block/Capability/RejectCapableInterface.php
index fac4d9bb..d28baa53 100644
--- a/src/Block/Capability/RejectCapableInterface.php
+++ b/src/Block/Capability/RejectCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Capability;
+namespace DrevOps\PhpTui\Block\Capability;
/**
* A block that can reject what you gave it, and say why.
@@ -10,7 +10,7 @@
* Refusing and holding are separate jobs: a block can refuse a value without
* ever holding one, and only what is held reaches the result.
*
- * @package DrevOps\Tui\Block\Capability
+ * @package DrevOps\PhpTui\Block\Capability
*/
interface RejectCapableInterface {
diff --git a/src/Block/DateBounds.php b/src/Block/DateBounds.php
index a4381fc1..c96f5459 100644
--- a/src/Block/DateBounds.php
+++ b/src/Block/DateBounds.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Optional min/max date range and the calendar's week-start day.
@@ -16,7 +16,7 @@
* all agree. The week-start day is a display concern that rides along the way
* the number field's keyboard step rides along in {@see NumberBounds}.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final readonly class DateBounds {
@@ -27,10 +27,10 @@
* The inclusive earliest date, or NULL for an open lower bound.
* @param \DateTimeImmutable|null $max
* The inclusive latest date, or NULL for an open upper bound.
- * @param \DrevOps\Tui\Block\Weekday $weekStart
+ * @param \DrevOps\PhpTui\Block\Weekday $weekStart
* The day the calendar week begins on.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When both bounds are declared and the minimum falls after the maximum.
*/
public function __construct(
diff --git a/src/Block/Element/ActionsElementsInterface.php b/src/Block/Element/ActionsElementsInterface.php
index 15828ec4..4dbf6285 100644
--- a/src/Block/Element/ActionsElementsInterface.php
+++ b/src/Block/Element/ActionsElementsInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Element;
+namespace DrevOps\PhpTui\Block\Element;
/**
* The elements the actions block composes.
@@ -21,7 +21,7 @@
* the reason is an element here rather than a note somebody else draws above
* them: nothing can come between a refusal and what it refuses.
*
- * @package DrevOps\Tui\Block\Element
+ * @package DrevOps\PhpTui\Block\Element
*/
interface ActionsElementsInterface {
diff --git a/src/Block/Element/BorderElementsInterface.php b/src/Block/Element/BorderElementsInterface.php
index f0f0baa0..0c9cea0e 100644
--- a/src/Block/Element/BorderElementsInterface.php
+++ b/src/Block/Element/BorderElementsInterface.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Element;
+namespace DrevOps\PhpTui\Block\Element;
-use DrevOps\Tui\Theme\Border;
+use DrevOps\PhpTui\Theme\Border;
/**
* The glyphs a border is drawn with.
@@ -17,14 +17,14 @@
* without restating the rest, and a reader sees which character is which
* without counting positions in a packed string.
*
- * @package DrevOps\Tui\Block\Element
+ * @package DrevOps\PhpTui\Block\Element
*/
interface BorderElementsInterface {
/**
* The corner where the top edge meets the left.
*
- * @param \DrevOps\Tui\Theme\Border $style
+ * @param \DrevOps\PhpTui\Theme\Border $style
* The style.
*
* @return string
@@ -35,7 +35,7 @@ public function borderTopLeft(Border $style): string;
/**
* The corner where the top edge meets the right.
*
- * @param \DrevOps\Tui\Theme\Border $style
+ * @param \DrevOps\PhpTui\Theme\Border $style
* The style.
*
* @return string
@@ -46,7 +46,7 @@ public function borderTopRight(Border $style): string;
/**
* The corner where the bottom edge meets the left.
*
- * @param \DrevOps\Tui\Theme\Border $style
+ * @param \DrevOps\PhpTui\Theme\Border $style
* The style.
*
* @return string
@@ -57,7 +57,7 @@ public function borderBottomLeft(Border $style): string;
/**
* The corner where the bottom edge meets the right.
*
- * @param \DrevOps\Tui\Theme\Border $style
+ * @param \DrevOps\PhpTui\Theme\Border $style
* The style.
*
* @return string
@@ -68,7 +68,7 @@ public function borderBottomRight(Border $style): string;
/**
* The junction where a rule meets the left edge.
*
- * @param \DrevOps\Tui\Theme\Border $style
+ * @param \DrevOps\PhpTui\Theme\Border $style
* The style.
*
* @return string
@@ -79,7 +79,7 @@ public function borderLeftJunction(Border $style): string;
/**
* The junction where a rule meets the right edge.
*
- * @param \DrevOps\Tui\Theme\Border $style
+ * @param \DrevOps\PhpTui\Theme\Border $style
* The style.
*
* @return string
@@ -90,7 +90,7 @@ public function borderRightJunction(Border $style): string;
/**
* The run a horizontal edge is filled with.
*
- * @param \DrevOps\Tui\Theme\Border $style
+ * @param \DrevOps\PhpTui\Theme\Border $style
* The style.
*
* @return string
@@ -101,7 +101,7 @@ public function borderHorizontal(Border $style): string;
/**
* The run a vertical edge is filled with.
*
- * @param \DrevOps\Tui\Theme\Border $style
+ * @param \DrevOps\PhpTui\Theme\Border $style
* The style.
*
* @return string
diff --git a/src/Block/Element/BreadcrumbElementsInterface.php b/src/Block/Element/BreadcrumbElementsInterface.php
index 82280db5..fb072cf3 100644
--- a/src/Block/Element/BreadcrumbElementsInterface.php
+++ b/src/Block/Element/BreadcrumbElementsInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Element;
+namespace DrevOps\PhpTui\Block\Element;
/**
* The elements the breadcrumb block composes.
@@ -11,7 +11,7 @@
* type error rather than a blank line, and so adding a block adds an interface
* instead of growing one theme class that knows about everything.
*
- * @package DrevOps\Tui\Block\Element
+ * @package DrevOps\PhpTui\Block\Element
*/
interface BreadcrumbElementsInterface {
diff --git a/src/Block/Element/ChromeElementsInterface.php b/src/Block/Element/ChromeElementsInterface.php
index 75ef120e..28ed0e97 100644
--- a/src/Block/Element/ChromeElementsInterface.php
+++ b/src/Block/Element/ChromeElementsInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Element;
+namespace DrevOps\PhpTui\Block\Element;
/**
* The elements no single block owns.
@@ -22,7 +22,7 @@
* named for its owner, so a theme implements all of them on one class without
* collisions.
*
- * @package DrevOps\Tui\Block\Element
+ * @package DrevOps\PhpTui\Block\Element
*/
interface ChromeElementsInterface {
diff --git a/src/Block/Element/FieldElementsInterface.php b/src/Block/Element/FieldElementsInterface.php
index ed57ebc9..9f901b12 100644
--- a/src/Block/Element/FieldElementsInterface.php
+++ b/src/Block/Element/FieldElementsInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Element;
+namespace DrevOps\PhpTui\Block\Element;
/**
* The elements the field block composes.
@@ -19,7 +19,7 @@
* scalars and nothing else, so the piece is the theme's to arrange without the
* field having to hand over any of its state.
*
- * @package DrevOps\Tui\Block\Element
+ * @package DrevOps\PhpTui\Block\Element
*/
interface FieldElementsInterface {
diff --git a/src/Block/Element/LegendElementsInterface.php b/src/Block/Element/LegendElementsInterface.php
index 470c127a..d58b20f4 100644
--- a/src/Block/Element/LegendElementsInterface.php
+++ b/src/Block/Element/LegendElementsInterface.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Element;
+namespace DrevOps\PhpTui\Block\Element;
/**
* The elements the legend block composes.
*
- * @package DrevOps\Tui\Block\Element
+ * @package DrevOps\PhpTui\Block\Element
*/
interface LegendElementsInterface {
diff --git a/src/Block/Element/MarkupElementsInterface.php b/src/Block/Element/MarkupElementsInterface.php
index ee2a1f8a..8c8c6015 100644
--- a/src/Block/Element/MarkupElementsInterface.php
+++ b/src/Block/Element/MarkupElementsInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Element;
+namespace DrevOps\PhpTui\Block\Element;
/**
* The elements the markup block composes.
@@ -12,7 +12,7 @@
* own element. A theme that restyles what is emphatic restyles it wherever a
* passage is drawn rather than in the one place that happened to compose it.
*
- * @package DrevOps\Tui\Block\Element
+ * @package DrevOps\PhpTui\Block\Element
*/
interface MarkupElementsInterface {
diff --git a/src/Block/Element/PanelElementsInterface.php b/src/Block/Element/PanelElementsInterface.php
index 66015beb..6a229b75 100644
--- a/src/Block/Element/PanelElementsInterface.php
+++ b/src/Block/Element/PanelElementsInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Element;
+namespace DrevOps\PhpTui\Block\Element;
/**
* The elements the panel block composes when it is nested.
@@ -10,7 +10,7 @@
* A panel draws a row of its own only as a sub-panel, which is the shape you
* select to enter it. Once entered it draws nothing itself: its blocks do.
*
- * @package DrevOps\Tui\Block\Element
+ * @package DrevOps\PhpTui\Block\Element
*/
interface PanelElementsInterface {
diff --git a/src/Block/Element/ProgressElementsInterface.php b/src/Block/Element/ProgressElementsInterface.php
index 9a8a02c9..24a27fb3 100644
--- a/src/Block/Element/ProgressElementsInterface.php
+++ b/src/Block/Element/ProgressElementsInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block\Element;
+namespace DrevOps\PhpTui\Block\Element;
/**
* The elements the progress block composes.
@@ -12,7 +12,7 @@
* element of its own - and a glyph, so a terminal drawing no colour still
* answers it.
*
- * @package DrevOps\Tui\Block\Element
+ * @package DrevOps\PhpTui\Block\Element
*/
interface ProgressElementsInterface {
diff --git a/src/Block/Field.php b/src/Block/Field.php
index 9f3090ec..74053e4c 100644
--- a/src/Block/Field.php
+++ b/src/Block/Field.php
@@ -2,36 +2,36 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
-
-use DrevOps\Tui\Answers\ValueFormatter;
-use DrevOps\Tui\Block\Capability\BindCapableInterface;
-use DrevOps\Tui\Block\Capability\BindCapableTrait;
-use DrevOps\Tui\Block\Capability\CaptureCapableInterface;
-use DrevOps\Tui\Block\Capability\CollectCapableInterface;
-use DrevOps\Tui\Block\Capability\ConstrainCapableInterface;
-use DrevOps\Tui\Block\Capability\DependCapableInterface;
-use DrevOps\Tui\Block\Capability\DependCapableTrait;
-use DrevOps\Tui\Block\Capability\FocusCapableInterface;
-use DrevOps\Tui\Block\Capability\FocusCapableTrait;
-use DrevOps\Tui\Block\Capability\RejectCapableInterface;
-use DrevOps\Tui\Block\Element\ChromeElementsInterface;
-use DrevOps\Tui\Block\Element\FieldElementsInterface;
-use DrevOps\Tui\Block\Element\MarkupElementsInterface;
-use DrevOps\Tui\Derive\Derive;
-use DrevOps\Tui\Discovery\DiscoverInterface;
-use DrevOps\Tui\Field\FieldFactory;
-use DrevOps\Tui\Field\FieldInterface;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Input\ScopedKeyMap;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Theme\Capability\OccupyCapableInterface;
-use DrevOps\Tui\Theme\Spacing;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+namespace DrevOps\PhpTui\Block;
+
+use DrevOps\PhpTui\Answers\ValueFormatter;
+use DrevOps\PhpTui\Block\Capability\BindCapableInterface;
+use DrevOps\PhpTui\Block\Capability\BindCapableTrait;
+use DrevOps\PhpTui\Block\Capability\CaptureCapableInterface;
+use DrevOps\PhpTui\Block\Capability\CollectCapableInterface;
+use DrevOps\PhpTui\Block\Capability\ConstrainCapableInterface;
+use DrevOps\PhpTui\Block\Capability\DependCapableInterface;
+use DrevOps\PhpTui\Block\Capability\DependCapableTrait;
+use DrevOps\PhpTui\Block\Capability\FocusCapableInterface;
+use DrevOps\PhpTui\Block\Capability\FocusCapableTrait;
+use DrevOps\PhpTui\Block\Capability\RejectCapableInterface;
+use DrevOps\PhpTui\Block\Element\ChromeElementsInterface;
+use DrevOps\PhpTui\Block\Element\FieldElementsInterface;
+use DrevOps\PhpTui\Block\Element\MarkupElementsInterface;
+use DrevOps\PhpTui\Derive\Derive;
+use DrevOps\PhpTui\Discovery\DiscoverInterface;
+use DrevOps\PhpTui\Field\FieldFactory;
+use DrevOps\PhpTui\Field\FieldInterface;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Input\ScopedKeyMap;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Theme\Capability\OccupyCapableInterface;
+use DrevOps\PhpTui\Theme\Spacing;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* The block that collects.
@@ -51,7 +51,7 @@
* Depend's. What is left over - the text around the row, and the per-kind
* switches a single kind of editor honours - is the field's own.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final class Field extends AbstractBlock implements
BindCapableInterface,
@@ -102,7 +102,7 @@ final class Field extends AbstractBlock implements
/**
* The rows edit mode opens onto, in the order they were declared.
*
- * @var list<\DrevOps\Tui\Block\Option>
+ * @var list<\DrevOps\PhpTui\Block\Option>
*/
protected array $options = [];
@@ -327,7 +327,7 @@ final class Field extends AbstractBlock implements
* The id it is addressed by.
* @param string $label
* The name it draws.
- * @param \DrevOps\Tui\Block\FieldType $fieldType
+ * @param \DrevOps\PhpTui\Block\FieldType $fieldType
* The kind of answer it collects, which is what decides the editor it
* opens onto and the keys that editor binds.
*/
@@ -360,7 +360,7 @@ public function label(): string {
/**
* The kind of answer this field collects.
*
- * @return \DrevOps\Tui\Block\FieldType
+ * @return \DrevOps\PhpTui\Block\FieldType
* The type.
*/
public function type(): FieldType {
@@ -442,7 +442,7 @@ public function capture(Key $key): bool {
/**
* What this field opened onto.
*
- * @return \DrevOps\Tui\Field\FieldInterface|null
+ * @return \DrevOps\PhpTui\Field\FieldInterface|null
* The editor, or NULL while the field is settled.
*/
public function editor(): ?FieldInterface {
@@ -759,7 +759,7 @@ public function isMultiChoice(): bool {
/**
* Compute this field's answer from the others.
*
- * @param \DrevOps\Tui\Derive\Derive $derive
+ * @param \DrevOps\PhpTui\Derive\Derive $derive
* The rule.
*
* @return static
@@ -774,7 +774,7 @@ public function derive(Derive $derive): static {
/**
* What computes this field's answer from the others.
*
- * @return \DrevOps\Tui\Derive\Derive|null
+ * @return \DrevOps\PhpTui\Derive\Derive|null
* The rule, or NULL when the answer is not computed.
*/
public function derivation(): ?Derive {
@@ -784,7 +784,7 @@ public function derivation(): ?Derive {
/**
* Detect an answer that already exists outside the form.
*
- * @param \DrevOps\Tui\Discovery\DiscoverInterface|\Closure $discover
+ * @param \DrevOps\PhpTui\Discovery\DiscoverInterface|\Closure $discover
* The rule, or an `fn (string $directory): mixed` detector of its own.
*
* @return static
@@ -799,7 +799,7 @@ public function discover(DiscoverInterface|\Closure $discover): static {
/**
* What detects an answer that already exists outside the form.
*
- * @return \DrevOps\Tui\Discovery\DiscoverInterface|\Closure|null
+ * @return \DrevOps\PhpTui\Discovery\DiscoverInterface|\Closure|null
* The rule, or NULL when nothing is detected.
*/
public function discovery(): DiscoverInterface|\Closure|null {
@@ -818,7 +818,7 @@ public function discovery(): DiscoverInterface|\Closure|null {
* @return static
* The field.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the name could not be set portably from a shell.
*/
public function env(string $name): static {
@@ -850,7 +850,7 @@ public function envName(): string {
* @return static
* The field.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When a name could not be set portably from a shell, or an alias repeats
* a name it would never be reached behind.
*/
@@ -990,7 +990,7 @@ public function separator(): static {
/**
* The rows edit mode opens onto.
*
- * @return list<\DrevOps\Tui\Block\Option>
+ * @return list<\DrevOps\PhpTui\Block\Option>
* The rows, in the order they were declared.
*/
public function options(): array {
@@ -1006,7 +1006,7 @@ public function options(): array {
* @param string $value
* The value.
*
- * @return \DrevOps\Tui\Block\Option|null
+ * @return \DrevOps\PhpTui\Block\Option|null
* The option, or NULL when nothing carries that value. Headings and
* separators carry none and are never returned.
*/
@@ -1061,7 +1061,7 @@ public function loader(): ?\Closure {
* Resolve the options from the answers, again whenever they change.
*
* @param \Closure $resolver
- * An `fn (\DrevOps\Tui\Handler\Context $context): array`
+ * An `fn (\DrevOps\PhpTui\Handler\Context $context): array`
* returning the value => label map, read from the answers the context
* carries and the run it describes.
*
@@ -1123,7 +1123,7 @@ public function source(): ?\Closure {
* @return static
* The field.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the length is below one character.
*/
public function minQuery(int $length): static {
@@ -1262,7 +1262,7 @@ public function boundsViolation(mixed $value): ?string {
/**
* Limit what may be picked from the filesystem.
*
- * @param \DrevOps\Tui\Block\FilePickerConstraints $constraints
+ * @param \DrevOps\PhpTui\Block\FilePickerConstraints $constraints
* The type, extension and size limits.
*
* @return static
@@ -1277,7 +1277,7 @@ public function picker(FilePickerConstraints $constraints): static {
/**
* What may be picked from the filesystem.
*
- * @return \DrevOps\Tui\Block\FilePickerConstraints
+ * @return \DrevOps\PhpTui\Block\FilePickerConstraints
* The limits; unconstrained when none were declared.
*/
public function pickerConstraints(): FilePickerConstraints {
@@ -1357,7 +1357,7 @@ public function showsHidden(): bool {
/**
* Fix the shape of the answer, leaving named slots to fill in.
*
- * @param \DrevOps\Tui\Block\Template $template
+ * @param \DrevOps\PhpTui\Block\Template $template
* The shape.
*
* @return static
@@ -1372,7 +1372,7 @@ public function pattern(Template $template): static {
/**
* The shape the answer is filled into.
*
- * @return \DrevOps\Tui\Block\Template|null
+ * @return \DrevOps\PhpTui\Block\Template|null
* The template, or NULL when the answer has no fixed shape.
*/
public function template(): ?Template {
@@ -1427,7 +1427,7 @@ public function templateParts(mixed $value): array {
* @return static
* The field.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When a caption names a point outside the scale.
*/
public function captions(array $captions): static {
@@ -1662,7 +1662,7 @@ public function isGhost(): bool {
* @return static
* The field.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the size is below one row.
*/
public function paginate(int $size): static {
@@ -1806,7 +1806,7 @@ public function standalone(bool $standalone = TRUE): static {
/**
* Where the editor is drawn.
*
- * @return \DrevOps\Tui\Block\RenderMode
+ * @return \DrevOps\PhpTui\Block\RenderMode
* In place on the panel, or full-screen on its own.
*/
public function renderMode(): RenderMode {
@@ -1888,7 +1888,7 @@ protected function keyScope(): Scope {
* @param mixed $current
* The value it starts from.
*
- * @return \DrevOps\Tui\Field\FieldInterface
+ * @return \DrevOps\PhpTui\Field\FieldInterface
* The editor.
*/
protected function editorFor(mixed $current): FieldInterface {
@@ -2119,7 +2119,7 @@ protected function rankingViolation(array $items): ?string {
* @param string $name
* The declared name.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the name could not be set portably from a shell.
*/
protected function assertEnvName(string $name): void {
@@ -2135,7 +2135,7 @@ protected function assertEnvName(string $name): void {
* so somewhere that quotes an answer rather than asking for it - a panel
* saying what it holds - reads it exactly as the row does.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
@@ -2155,9 +2155,9 @@ public function valueText(ThemeInterface $theme): string {
* the frame it is drawn in, so each line of the answer is a row of its own,
* aligned under the first.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Element\FieldElementsInterface $elements
+ * @param \DrevOps\PhpTui\Block\Element\FieldElementsInterface $elements
* The same theme, narrowed to the elements a field draws with.
* @param string $label
* The already-styled label.
@@ -2203,9 +2203,9 @@ protected function settledLines(ThemeInterface $theme, FieldElementsInterface $e
* be a block working out its own space, and taking it from the region would
* be a second answer free to disagree with the first.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Element\FieldElementsInterface $elements
+ * @param \DrevOps\PhpTui\Block\Element\FieldElementsInterface $elements
* The same theme, narrowed to the elements a field draws with.
* @param string $row
* The row the badge trails.
@@ -2226,9 +2226,9 @@ protected function badged(ThemeInterface $theme, FieldElementsInterface $element
/**
* The rows this field draws while it is open.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Element\FieldElementsInterface $elements
+ * @param \DrevOps\PhpTui\Block\Element\FieldElementsInterface $elements
* The same theme, narrowed to the elements a field draws with.
* @param string $label
* The already-styled label.
@@ -2268,7 +2268,7 @@ protected function openLines(ThemeInterface $theme, FieldElementsInterface $elem
* the reason already shows it where its own expectation would have gone, so
* nothing is said twice.
*
- * @param \DrevOps\Tui\Block\Element\FieldElementsInterface $elements
+ * @param \DrevOps\PhpTui\Block\Element\FieldElementsInterface $elements
* The theme, narrowed to the elements a field draws with.
*
* @return string
@@ -2288,9 +2288,9 @@ protected function trailer(FieldElementsInterface $elements): string {
* The explanation is secondary to the question it explains, so a theme with
* no room to spare drops it rather than crowding the answer with it.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Element\FieldElementsInterface $elements
+ * @param \DrevOps\PhpTui\Block\Element\FieldElementsInterface $elements
* The same theme, narrowed to the elements a field draws with.
*
* @return list
@@ -2313,9 +2313,9 @@ protected function explanation(ThemeInterface $theme, FieldElementsInterface $el
/**
* What fills the region right of the label while the field is open.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Element\FieldElementsInterface $elements
+ * @param \DrevOps\PhpTui\Block\Element\FieldElementsInterface $elements
* The same theme, narrowed to the elements a field draws with.
*
* @return list
@@ -2338,9 +2338,9 @@ protected function valueRegion(ThemeInterface $theme, FieldElementsInterface $el
/**
* One option as it is drawn.
*
- * @param \DrevOps\Tui\Block\Element\FieldElementsInterface $elements
+ * @param \DrevOps\PhpTui\Block\Element\FieldElementsInterface $elements
* The theme narrowed to the field elements.
- * @param \DrevOps\Tui\Block\Option $option
+ * @param \DrevOps\PhpTui\Block\Option $option
* The option.
*
* @return string
@@ -2368,7 +2368,7 @@ protected function optionLine(FieldElementsInterface $elements, Option $option):
/**
* Whether an option is the one picked.
*
- * @param \DrevOps\Tui\Block\Option $option
+ * @param \DrevOps\PhpTui\Block\Option $option
* The option.
*
* @return bool
@@ -2399,9 +2399,9 @@ protected function isChosen(Option $option): bool {
* those rules lives here, so the row, and the region an open field hands to
* whatever has no rows of its own, can never disagree about one answer.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Element\FieldElementsInterface $elements
+ * @param \DrevOps\PhpTui\Block\Element\FieldElementsInterface $elements
* The same theme, narrowed to the elements a field draws with.
*
* @return string
@@ -2447,7 +2447,7 @@ protected function readable(ThemeInterface $theme, FieldElementsInterface $eleme
/**
* The point a scale is sitting on, drawn as the whole scale.
*
- * @param \DrevOps\Tui\Block\Element\FieldElementsInterface $elements
+ * @param \DrevOps\PhpTui\Block\Element\FieldElementsInterface $elements
* The theme, narrowed to the elements a field draws with.
* @param mixed $value
* The chosen point.
diff --git a/src/Block/FieldType.php b/src/Block/FieldType.php
index 68f5341c..18b9aabb 100644
--- a/src/Block/FieldType.php
+++ b/src/Block/FieldType.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
/**
* The kinds of answer a field collects.
@@ -11,7 +11,7 @@
* reader can supply. A block that shows content or runs work is a block kind
* of its own, not a kind of answer.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
enum FieldType: string {
diff --git a/src/Block/FilePickerConstraints.php b/src/Block/FilePickerConstraints.php
index c961cb9d..120e8d9e 100644
--- a/src/Block/FilePickerConstraints.php
+++ b/src/Block/FilePickerConstraints.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Optional type, extension and size limits on what a file picker may accept.
@@ -17,7 +17,7 @@
* agree - mirroring {@see NumberBounds} and {@see SelectionBounds}, but
* constraining a filesystem path rather than a number or a count.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final readonly class FilePickerConstraints {
@@ -31,7 +31,7 @@
/**
* Construct file picker constraints.
*
- * @param \DrevOps\Tui\Block\FilePickerMode $mode
+ * @param \DrevOps\PhpTui\Block\FilePickerMode $mode
* Which entries may be selected (any, files or directories).
* @param list $extensions
* The extensions selectable files are limited to (dot-less,
@@ -39,7 +39,7 @@
* @param int|null $maxSize
* The inclusive maximum file size in bytes, or NULL for no size limit.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the maximum size is below one byte (a size limit below one byte can
* never be met; omit it instead).
*/
diff --git a/src/Block/FilePickerMode.php b/src/Block/FilePickerMode.php
index cb8234e3..a2aaa71a 100644
--- a/src/Block/FilePickerMode.php
+++ b/src/Block/FilePickerMode.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
/**
* What a file picker may select: any entry, files only or directories only.
@@ -11,7 +11,7 @@
* directory is always enterable so files beneath it stay reachable, even when
* only files may be chosen.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
enum FilePickerMode {
diff --git a/src/Block/FileSizeUnit.php b/src/Block/FileSizeUnit.php
index fdcc2aa1..5d2c5b42 100644
--- a/src/Block/FileSizeUnit.php
+++ b/src/Block/FileSizeUnit.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
/**
* The units a byte count is scaled through when formatted for display.
@@ -10,7 +10,7 @@
* Ordered smallest to largest, each a factor of 1024 above the previous, so a
* formatter can walk the cases while a value stays above one unit.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
enum FileSizeUnit: string {
diff --git a/src/Block/Legend.php b/src/Block/Legend.php
index 606aed6d..a62b0898 100644
--- a/src/Block/Legend.php
+++ b/src/Block/Legend.php
@@ -2,15 +2,15 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\Block\Element\LegendElementsInterface;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\ScopedKeyMap;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Block\Element\LegendElementsInterface;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\ScopedKeyMap;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* The keys that apply right now.
@@ -24,7 +24,7 @@
* against and the fragments naming what those keys do, and reads the glyphs
* back out of it.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final class Legend extends AbstractBlock {
@@ -36,16 +36,16 @@ final class Legend extends AbstractBlock {
/**
* What the bound keys do, in the order they are advertised.
*
- * @var list<\DrevOps\Tui\Input\Hint>
+ * @var list<\DrevOps\PhpTui\Input\Hint>
*/
protected array $hints = [];
/**
* Advertise whatever a set of bindings makes live.
*
- * @param \DrevOps\Tui\Input\ScopedKeyMap $keys
+ * @param \DrevOps\PhpTui\Input\ScopedKeyMap $keys
* The bindings a key press resolves against.
- * @param \DrevOps\Tui\Input\Hint ...$hints
+ * @param \DrevOps\PhpTui\Input\Hint ...$hints
* What those keys do, each naming the actions whose keys illustrate it.
*
* @return static
@@ -104,7 +104,7 @@ public function render(ThemeInterface $theme): string {
/**
* The entries to draw, one per fragment the bindings can illustrate.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme, which is what says how a key is written.
*
* @return list
@@ -131,9 +131,9 @@ protected function written(ThemeInterface $theme): array {
/**
* The keys illustrating one fragment, as the theme writes them.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Input\Hint $hint
+ * @param \DrevOps\PhpTui\Input\Hint $hint
* The fragment.
*
* @return string
diff --git a/src/Block/Markup.php b/src/Block/Markup.php
index fd5b00e5..7eb604cb 100644
--- a/src/Block/Markup.php
+++ b/src/Block/Markup.php
@@ -2,16 +2,16 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\Block\Capability\DependCapableInterface;
-use DrevOps\Tui\Block\Capability\DependCapableTrait;
-use DrevOps\Tui\Block\Element\ChromeElementsInterface;
-use DrevOps\Tui\Block\Element\MarkupElementsInterface;
-use DrevOps\Tui\Primitive\Element\PrimitiveElementsInterface;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Block\Capability\DependCapableInterface;
+use DrevOps\PhpTui\Block\Capability\DependCapableTrait;
+use DrevOps\PhpTui\Block\Element\ChromeElementsInterface;
+use DrevOps\PhpTui\Block\Element\MarkupElementsInterface;
+use DrevOps\PhpTui\Primitive\Element\PrimitiveElementsInterface;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Formatted content, and nothing else.
@@ -26,7 +26,7 @@
* wrap it and align it - so both go to the theme's card renderer, the same
* one that draws a card everywhere else in the library.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final class Markup extends AbstractBlock implements DependCapableInterface {
@@ -146,7 +146,7 @@ public function table(array $headers, array $rows): static {
/**
* The grid drawn beneath this block's body.
*
- * @return \DrevOps\Tui\Block\TableSpec|null
+ * @return \DrevOps\PhpTui\Block\TableSpec|null
* The grid, or NULL when it carries none.
*/
public function tableSpec(): ?TableSpec {
diff --git a/src/Block/Mode.php b/src/Block/Mode.php
index 63493c18..08bc873b 100644
--- a/src/Block/Mode.php
+++ b/src/Block/Mode.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
/**
* Which of its two shapes a field is drawing.
@@ -11,7 +11,7 @@
* the value region changes shape, which is why a field in edit mode is still
* one row of its panel rather than something new on the screen.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
enum Mode: string {
diff --git a/src/Block/NumberBounds.php b/src/Block/NumberBounds.php
index 7ca16691..f92d8624 100644
--- a/src/Block/NumberBounds.php
+++ b/src/Block/NumberBounds.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Optional integer bounds and step for a number field.
@@ -15,7 +15,7 @@
* human range phrase live here once, so the interactive field, the headless
* collection and the answer-set validator all agree.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final readonly class NumberBounds {
@@ -29,7 +29,7 @@
* @param int|null $step
* The Up/Down increment, or NULL to step by one.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When both bounds are declared and the minimum exceeds the maximum -
* mirroring the {@see DateBounds} constructor guard.
*/
diff --git a/src/Block/Option.php b/src/Block/Option.php
index 48029c33..73d1aad1 100644
--- a/src/Block/Option.php
+++ b/src/Block/Option.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\Terminal\Ansi;
+use DrevOps\PhpTui\Terminal\Ansi;
/**
* A single row in a select, search or suggest option list.
@@ -17,7 +17,7 @@
* Every row reaches this constructor, whether a field declares it or a loader,
* a resolver or a query source returns it. Row text is filtered here only.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final readonly class Option {
@@ -52,7 +52,7 @@
* @param string $description
* The option's description. Shown for the highlighted option as a secondary
* line beneath the choice list, and carried into the machine schema.
- * @param \DrevOps\Tui\Block\OptionType $kind
+ * @param \DrevOps\PhpTui\Block\OptionType $kind
* The row kind.
* @param bool $disabled
* Whether a selectable Option row is shown but cannot be selected.
@@ -92,10 +92,10 @@ public function isSelectable(): bool {
* options) are passed as {@see Option} instances. A label defaults to its
* value when empty.
*
- * @param array $options
+ * @param array $options
* Either a value => label map, a list of options, or a mix.
*
- * @return list<\DrevOps\Tui\Block\Option>
+ * @return list<\DrevOps\PhpTui\Block\Option>
* The normalized option list.
*/
public static function list(array $options): array {
@@ -125,7 +125,7 @@ public static function list(array $options): array {
* @param mixed $result
* The callable's return value.
*
- * @return list<\DrevOps\Tui\Block\Option>
+ * @return list<\DrevOps\PhpTui\Block\Option>
* The normalized option list; empty when the result was not a map of
* strings.
*/
@@ -136,7 +136,7 @@ public static function resolved(mixed $result): array {
/**
* The values of the selectable rows, in display order.
*
- * @param list<\DrevOps\Tui\Block\Option> $options
+ * @param list<\DrevOps\PhpTui\Block\Option> $options
* The option rows.
*
* @return list
diff --git a/src/Block/OptionType.php b/src/Block/OptionType.php
index ee0683e0..9b978a44 100644
--- a/src/Block/OptionType.php
+++ b/src/Block/OptionType.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
/**
* The kind of a row in a choice field's option list.
@@ -10,7 +10,7 @@
* Only Option rows are selectable; Separator and Heading rows are visual
* structure that navigation skips and never collects.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
enum OptionType: string {
diff --git a/src/Block/Panel.php b/src/Block/Panel.php
index a134ace0..65efccd1 100644
--- a/src/Block/Panel.php
+++ b/src/Block/Panel.php
@@ -2,33 +2,33 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
-
-use DrevOps\Tui\Block\Capability\BindCapableInterface;
-use DrevOps\Tui\Block\Capability\BindCapableTrait;
-use DrevOps\Tui\Block\Capability\DependCapableInterface;
-use DrevOps\Tui\Block\Capability\DependCapableTrait;
-use DrevOps\Tui\Block\Capability\DescendCapableInterface;
-use DrevOps\Tui\Block\Capability\FocusCapableInterface;
-use DrevOps\Tui\Block\Capability\FocusCapableTrait;
-use DrevOps\Tui\Block\Capability\OverlayCapableInterface;
-use DrevOps\Tui\Block\Element\ChromeElementsInterface;
-use DrevOps\Tui\Block\Element\MarkupElementsInterface;
-use DrevOps\Tui\Block\Element\PanelElementsInterface;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Screen\Axis;
-use DrevOps\Tui\Screen\Furniture;
-use DrevOps\Tui\Screen\Layout\LayoutInterface;
-use DrevOps\Tui\Screen\Region;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Theme\Capability\OccupyCapableInterface;
-use DrevOps\Tui\Theme\Spacing;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+namespace DrevOps\PhpTui\Block;
+
+use DrevOps\PhpTui\Block\Capability\BindCapableInterface;
+use DrevOps\PhpTui\Block\Capability\BindCapableTrait;
+use DrevOps\PhpTui\Block\Capability\DependCapableInterface;
+use DrevOps\PhpTui\Block\Capability\DependCapableTrait;
+use DrevOps\PhpTui\Block\Capability\DescendCapableInterface;
+use DrevOps\PhpTui\Block\Capability\FocusCapableInterface;
+use DrevOps\PhpTui\Block\Capability\FocusCapableTrait;
+use DrevOps\PhpTui\Block\Capability\OverlayCapableInterface;
+use DrevOps\PhpTui\Block\Element\ChromeElementsInterface;
+use DrevOps\PhpTui\Block\Element\MarkupElementsInterface;
+use DrevOps\PhpTui\Block\Element\PanelElementsInterface;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Furniture;
+use DrevOps\PhpTui\Screen\Layout\LayoutInterface;
+use DrevOps\PhpTui\Screen\Region;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Theme\Capability\OccupyCapableInterface;
+use DrevOps\PhpTui\Theme\Spacing;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* A block that navigation enters and leaves.
@@ -45,7 +45,7 @@
* decides a single row. An absent section takes everything it holds with it,
* so a question inside one is never asked, drawn or entered.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final class Panel extends AbstractBlock implements BindCapableInterface, DependCapableInterface, DescendCapableInterface, FocusCapableInterface, OverlayCapableInterface {
@@ -172,13 +172,13 @@ public function descriptionText(): string {
/**
* Set the button pair that closes this panel.
*
- * @param \DrevOps\Tui\Block\Buttons $buttons
+ * @param \DrevOps\PhpTui\Block\Buttons $buttons
* The pair that closes it.
*
* @return static
* The panel.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the pair is hidden on a modal panel, whose buttons are its only
* way out.
*/
@@ -192,7 +192,7 @@ public function buttons(Buttons $buttons): static {
/**
* The button pair that closes this panel.
*
- * @return \DrevOps\Tui\Block\Buttons
+ * @return \DrevOps\PhpTui\Block\Buttons
* The pair that closes it.
*/
public function currentButtons(): Buttons {
@@ -246,7 +246,7 @@ public function prepare(): bool {
/**
* Arrange this panel's blocks with a layout.
*
- * @param \DrevOps\Tui\Screen\Layout\LayoutInterface $layout
+ * @param \DrevOps\PhpTui\Screen\Layout\LayoutInterface $layout
* The layout.
*
* @return static
@@ -261,7 +261,7 @@ public function layout(LayoutInterface $layout): static {
/**
* The layout arranging this panel's blocks.
*
- * @return \DrevOps\Tui\Screen\Layout\LayoutInterface
+ * @return \DrevOps\PhpTui\Screen\Layout\LayoutInterface
* The layout.
*/
public function currentLayout(): LayoutInterface {
@@ -278,7 +278,7 @@ public function currentLayout(): LayoutInterface {
* @param string $name
* The region name.
*
- * @return \DrevOps\Tui\Screen\Region
+ * @return \DrevOps\PhpTui\Screen\Region
* The region.
*/
public function in(string $name): Region {
@@ -313,7 +313,7 @@ public function isEntered(): bool {
/**
* {@inheritdoc}
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When its buttons are hidden; a modal panel's buttons are its only way
* out.
*/
@@ -371,7 +371,7 @@ public function hints(): array {
* Its own only: a nested panel's fields belong to that panel and are not
* included.
*
- * @return list<\DrevOps\Tui\Block\Field>
+ * @return list<\DrevOps\PhpTui\Block\Field>
* The fields.
*/
public function fields(): array {
@@ -412,7 +412,7 @@ public function ids(): array {
/**
* The panels that can be entered from this one.
*
- * @return list<\DrevOps\Tui\Block\Panel>
+ * @return list<\DrevOps\PhpTui\Block\Panel>
* The sub-panels, in the order they were placed.
*/
public function children(): array {
@@ -430,7 +430,7 @@ public function children(): array {
/**
* Everything placed in this panel, region by region, in placement order.
*
- * @return list<\DrevOps\Tui\Block\BlockInterface>
+ * @return list<\DrevOps\PhpTui\Block\BlockInterface>
* The blocks; empty while the panel has no layout to hold any.
*/
public function blocks(): array {
@@ -475,7 +475,7 @@ public function render(ThemeInterface $theme): string {
/**
* This panel drawn as its headline row only.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
@@ -496,7 +496,7 @@ public function wayIn(ThemeInterface $theme): string {
* headline line only: the full row with a description and a summary
* belongs to a list, which has a whole width to spend on it.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
@@ -536,7 +536,7 @@ public function preview(ThemeInterface $theme): string {
* region is read off the layout's Body furnishing rather than found by a
* fixed name.
*
- * @return \DrevOps\Tui\Screen\Region
+ * @return \DrevOps\PhpTui\Screen\Region
* The region.
*/
public function place(): Region {
@@ -546,10 +546,10 @@ public function place(): Region {
/**
* The theme this panel draws through, rejecting an entered panel.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
- * @return \DrevOps\Tui\Block\Element\PanelElementsInterface
+ * @return \DrevOps\PhpTui\Block\Element\PanelElementsInterface
* The theme, narrowed to the elements a panel draws with.
*
* @throws \LogicException
@@ -568,7 +568,7 @@ protected function guard(ThemeInterface $theme): PanelElementsInterface {
/**
* The gutter this panel's rows are stepped in by.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
@@ -581,7 +581,7 @@ protected function gutter(ThemeInterface $theme): string {
/**
* The row joining the selector, the title and the descend mark.
*
- * @param \DrevOps\Tui\Block\Element\PanelElementsInterface $elements
+ * @param \DrevOps\PhpTui\Block\Element\PanelElementsInterface $elements
* The theme, narrowed to the elements a panel draws with.
*
* @return string
@@ -594,9 +594,9 @@ protected function headline(PanelElementsInterface $elements): string {
/**
* This panel's description, drawn as rows.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Element\PanelElementsInterface $elements
+ * @param \DrevOps\PhpTui\Block\Element\PanelElementsInterface $elements
* The same theme, narrowed to the elements a panel draws with.
*
* @return list
@@ -617,9 +617,9 @@ protected function guidance(ThemeInterface $theme, PanelElementsInterface $eleme
/**
* The answers this panel holds, as one line.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Element\PanelElementsInterface $elements
+ * @param \DrevOps\PhpTui\Block\Element\PanelElementsInterface $elements
* The same theme, narrowed to the elements a panel draws with.
*
* @return string
@@ -655,9 +655,9 @@ protected function summary(ThemeInterface $theme, PanelElementsInterface $elemen
* a longer one is shown as a count, so the summary line stays a summary
* rather than the panel's whole content.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field holding the answer.
*
* @return string
@@ -676,7 +676,7 @@ protected function held(ThemeInterface $theme, Field $field): string {
/**
* Whether the theme is set to compact spacing.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return bool
@@ -698,10 +698,10 @@ protected function keyScope(): Scope {
*
* @param bool $modal
* Whether the panel draws over what is behind it.
- * @param \DrevOps\Tui\Block\Buttons $buttons
+ * @param \DrevOps\PhpTui\Block\Buttons $buttons
* The pair that closes it.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When such a panel hides its buttons.
*/
protected function assertWayOut(bool $modal, Buttons $buttons): void {
diff --git a/src/Block/Progress.php b/src/Block/Progress.php
index f02ab589..94268d85 100644
--- a/src/Block/Progress.php
+++ b/src/Block/Progress.php
@@ -2,26 +2,26 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
-
-use DrevOps\Tui\Block\Capability\ActivateCapableInterface;
-use DrevOps\Tui\Block\Capability\DependCapableInterface;
-use DrevOps\Tui\Block\Capability\DependCapableTrait;
-use DrevOps\Tui\Block\Capability\FocusCapableInterface;
-use DrevOps\Tui\Block\Capability\FocusCapableTrait;
-use DrevOps\Tui\Block\Element\ChromeElementsInterface;
-use DrevOps\Tui\Block\Element\ProgressElementsInterface;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Primitive\ProgressReporter;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Theme\ThemeInterface;
+namespace DrevOps\PhpTui\Block;
+
+use DrevOps\PhpTui\Block\Capability\ActivateCapableInterface;
+use DrevOps\PhpTui\Block\Capability\DependCapableInterface;
+use DrevOps\PhpTui\Block\Capability\DependCapableTrait;
+use DrevOps\PhpTui\Block\Capability\FocusCapableInterface;
+use DrevOps\PhpTui\Block\Capability\FocusCapableTrait;
+use DrevOps\PhpTui\Block\Element\ChromeElementsInterface;
+use DrevOps\PhpTui\Block\Element\ProgressElementsInterface;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Primitive\ProgressReporter;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* Work that runs when activated, with an indicator while it does.
*
* The block takes focus and acts, and nothing it does becomes an answer.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final class Progress extends AbstractBlock implements ActivateCapableInterface, DependCapableInterface, FocusCapableInterface {
@@ -51,7 +51,7 @@ final class Progress extends AbstractBlock implements ActivateCapableInterface,
/**
* The work activating this block runs, or NULL when it has none.
*
- * @var \Closure(\DrevOps\Tui\Primitive\ProgressReporter): void|null
+ * @var \Closure(\DrevOps\PhpTui\Primitive\ProgressReporter): void|null
*/
protected ?\Closure $work = NULL;
@@ -109,7 +109,7 @@ public function caption(): string {
* @return static
* The block.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the declared step count is below one.
*/
public function steps(int $total): static {
@@ -171,7 +171,7 @@ public function labelText(): string {
* Set the work this block runs.
*
* @param \Closure $work
- * An `fn(\DrevOps\Tui\Primitive\ProgressReporter $reporter): void` doing
+ * An `fn(\DrevOps\PhpTui\Primitive\ProgressReporter $reporter): void` doing
* the work, calling `advance()` on the reporter once per step.
*
* @return static
diff --git a/src/Block/Prose.php b/src/Block/Prose.php
index 14ae638d..bd48a119 100644
--- a/src/Block/Prose.php
+++ b/src/Block/Prose.php
@@ -2,13 +2,13 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\Block\Element\MarkupElementsInterface;
-use DrevOps\Tui\Terminal\Markup as Parser;
-use DrevOps\Tui\Terminal\MarkupType;
-use DrevOps\Tui\Terminal\MarkupSegment;
-use DrevOps\Tui\Theme\Capability\MarkdownCapableInterface;
+use DrevOps\PhpTui\Block\Element\MarkupElementsInterface;
+use DrevOps\PhpTui\Terminal\Markup as Parser;
+use DrevOps\PhpTui\Terminal\MarkupType;
+use DrevOps\PhpTui\Terminal\MarkupSegment;
+use DrevOps\PhpTui\Theme\Capability\MarkdownCapableInterface;
/**
* Text a reader reads, drawn one span at a time.
@@ -23,7 +23,7 @@
* standing note, the long text behind a help key - and none of them owns how
* one is drawn, so it lives beside them rather than inside any one of them.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final class Prose {
@@ -32,7 +32,7 @@ final class Prose {
*
* @param string $source
* The passage; newlines separate physical lines.
- * @param \DrevOps\Tui\Block\Element\MarkupElementsInterface $theme
+ * @param \DrevOps\PhpTui\Block\Element\MarkupElementsInterface $theme
* The theme, narrowed to the elements that draw a span.
* @param \Closure|null $plain
* An `fn (string $text): string` drawing the spans that carry no markup of
@@ -62,9 +62,9 @@ public static function lines(string $source, MarkupElementsInterface $theme, ?\C
/**
* Draw one span with the element that owns it.
*
- * @param \DrevOps\Tui\Terminal\MarkupSegment $segment
+ * @param \DrevOps\PhpTui\Terminal\MarkupSegment $segment
* The span.
- * @param \DrevOps\Tui\Block\Element\MarkupElementsInterface $theme
+ * @param \DrevOps\PhpTui\Block\Element\MarkupElementsInterface $theme
* The theme.
* @param \Closure $plain
* What draws a span carrying no markup of its own.
@@ -87,7 +87,7 @@ protected static function span(MarkupSegment $segment, MarkupElementsInterface $
/**
* Whether the theme draws the markdown subset or leaves it literal.
*
- * @param \DrevOps\Tui\Block\Element\MarkupElementsInterface $theme
+ * @param \DrevOps\PhpTui\Block\Element\MarkupElementsInterface $theme
* The theme.
*
* @return bool
diff --git a/src/Block/RenderMode.php b/src/Block/RenderMode.php
index 6dd8eb1f..3deec032 100644
--- a/src/Block/RenderMode.php
+++ b/src/Block/RenderMode.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
/**
* Where a field's editor is drawn: inline in the panel, or on its own screen.
@@ -14,7 +14,7 @@
* for a field that wants the whole viewport. Fields are inline by default; a
* consumer opts one out with the builder's standalone() method.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
enum RenderMode {
diff --git a/src/Block/SelectionBounds.php b/src/Block/SelectionBounds.php
index 3b932145..a7c86be1 100644
--- a/src/Block/SelectionBounds.php
+++ b/src/Block/SelectionBounds.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Optional minimum and maximum selection counts for a multi-value field.
@@ -16,7 +16,7 @@
* {@see NumberBounds}, but constraining how many values a list holds rather
* than the magnitude of a single number.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final readonly class SelectionBounds {
@@ -28,7 +28,7 @@
* @param int|null $max
* The inclusive maximum number of selections, or NULL for no ceiling.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When a declared bound is below one (a count bound below one is
* meaningless; omit the bound instead), or the minimum exceeds the maximum.
*/
diff --git a/src/Block/TableSpec.php b/src/Block/TableSpec.php
index 11bda683..78f60cf6 100644
--- a/src/Block/TableSpec.php
+++ b/src/Block/TableSpec.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\Terminal\Ansi;
+use DrevOps\PhpTui\Terminal\Ansi;
/**
* A presentational table: header cells and body rows, coerced to strings.
@@ -12,7 +12,7 @@
* The cells are stored as plain strings; how they are styled and interpolated
* is the renderer's concern, not this value object's.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final readonly class TableSpec {
diff --git a/src/Block/Template.php b/src/Block/Template.php
index 6bdbbe67..f3ccdfa8 100644
--- a/src/Block/Template.php
+++ b/src/Block/Template.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Translation\Translator;
/**
* A fixed string shape with named `{{placeholder}}` slots to fill in.
@@ -17,7 +17,7 @@
* declared pattern. Filling the slots ({@see assemble()}) and recovering them
* from a filled string ({@see extract()}) are therefore exact inverses.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final class Template {
@@ -53,7 +53,7 @@ final class Template {
* The validator `fn (string $value): ?string` of each slot, keyed by slot
* name, returning an error message or NULL when the part is valid.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the pattern declares no slot, repeats a name or places two slots
* side by side, or when a label or validator names an absent slot.
*/
@@ -364,7 +364,7 @@ protected function split(string $pattern): void {
/**
* Reject a pattern that cannot be filled in or read back unambiguously.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the pattern declares no slot, repeats a name, or places two slots
* side by side.
*/
@@ -395,7 +395,7 @@ protected function assertShape(): void {
* @param string $kind
* The kind of configuration, named in the error message.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When a name is not one of the pattern's slots.
*/
protected function assertDeclared(array $names, string $kind): void {
diff --git a/src/Block/Tree.php b/src/Block/Tree.php
index ba04afe6..9beb98a5 100644
--- a/src/Block/Tree.php
+++ b/src/Block/Tree.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\Block\Capability\DependCapableInterface;
-use DrevOps\Tui\Condition\Condition;
-use DrevOps\Tui\Condition\ConditionInterface;
+use DrevOps\PhpTui\Block\Capability\DependCapableInterface;
+use DrevOps\PhpTui\Condition\Condition;
+use DrevOps\PhpTui\Condition\ConditionInterface;
/**
* A declared block tree, read as a flat list.
@@ -18,17 +18,17 @@
* The order is declaration order: a panel's own rows first, then everything
* beneath it, panel by panel.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
final class Tree {
/**
* Every field a panel and the panels beneath it hold.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to walk.
*
- * @return list<\DrevOps\Tui\Block\Field>
+ * @return list<\DrevOps\PhpTui\Block\Field>
* The fields, in declaration order.
*/
public static function fields(Panel $panel): array {
@@ -44,10 +44,10 @@ public static function fields(Panel $panel): array {
/**
* Every panel beneath a panel, the panel itself included.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to walk.
*
- * @return list<\DrevOps\Tui\Block\Panel>
+ * @return list<\DrevOps\PhpTui\Block\Panel>
* The panels, in declaration order, outermost first.
*/
public static function panels(Panel $panel): array {
@@ -71,7 +71,7 @@ public static function panels(Panel $panel): array {
* Keyed by object rather than by id: a section and a row it holds may
* share a name, and only one set of ids is ever checked for collisions.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to walk.
* @param array $answers
* The answers every condition is measured against.
@@ -109,7 +109,7 @@ public static function within(Panel $panel, array $answers, bool $inside = TRUE)
*
* Keyed by object rather than by id, for the reason {@see within()} is.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to walk.
* @param array $answers
* The answers every condition is measured against.
@@ -140,7 +140,7 @@ public static function settled(Panel $panel, array $answers): array {
/**
* The answers left once those belonging to absent blocks are dropped.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to walk.
* @param array $answers
* The answers as they were supplied.
@@ -175,12 +175,12 @@ public static function held(Panel $panel, array $answers, array $there): array {
*
* Keyed by object rather than by id, for the reason {@see within()} is.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to walk.
- * @param \DrevOps\Tui\Condition\ConditionInterface|null $inherited
+ * @param \DrevOps\PhpTui\Condition\ConditionInterface|null $inherited
* The rule the sections holding this one already impose.
*
- * @return array
+ * @return array
* The rule each block waits on, or NULL where it is always there, keyed by
* its object id.
*/
@@ -212,7 +212,7 @@ public static function gates(Panel $panel, ?ConditionInterface $inherited = NULL
*
* Keyed by object rather than by id, for the reason {@see within()} is.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to walk.
* @param bool $inside
* Whether the sections holding this one already depend on something.
@@ -241,12 +241,12 @@ public static function gated(Panel $panel, bool $inside = FALSE): array {
/**
* The single rule two rules amount to.
*
- * @param \DrevOps\Tui\Condition\ConditionInterface|null $outer
+ * @param \DrevOps\PhpTui\Condition\ConditionInterface|null $outer
* The rule the section imposes, or NULL when it imposes none.
- * @param \DrevOps\Tui\Condition\ConditionInterface|null $own
+ * @param \DrevOps\PhpTui\Condition\ConditionInterface|null $own
* The block's own rule, or NULL when it declares none.
*
- * @return \DrevOps\Tui\Condition\ConditionInterface|null
+ * @return \DrevOps\PhpTui\Condition\ConditionInterface|null
* Both rules combined, the one that exists, or NULL when neither does. A
* single rule is returned as it is rather than wrapped, so a reader is
* never given an "all" of one condition to unpick.
@@ -262,7 +262,7 @@ protected static function both(?ConditionInterface $outer, ?ConditionInterface $
/**
* The ids of every row a panel and the panels beneath it hold.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to walk.
*
* @return list
diff --git a/src/Block/Weekday.php b/src/Block/Weekday.php
index 7c305848..e001da36 100644
--- a/src/Block/Weekday.php
+++ b/src/Block/Weekday.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Block;
+namespace DrevOps\PhpTui\Block;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Translation\Translator;
/**
* A day of the week, backed by its ISO-8601 number (Monday = 1 ... Sunday = 7).
@@ -12,7 +12,7 @@
* The calendar's week-start day is one of these, and the field builds its
* weekday header and column layout from the sequence starting at that day.
*
- * @package DrevOps\Tui\Block
+ * @package DrevOps\PhpTui\Block
*/
enum Weekday: int {
diff --git a/src/Builder/FieldBuilder.php b/src/Builder/FieldBuilder.php
index f3d27b7a..8a9acef6 100644
--- a/src/Builder/FieldBuilder.php
+++ b/src/Builder/FieldBuilder.php
@@ -2,21 +2,21 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Builder;
-
-use DrevOps\Tui\Block\DateBounds;
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\FilePickerConstraints;
-use DrevOps\Tui\Block\FilePickerMode;
-use DrevOps\Tui\Block\NumberBounds;
-use DrevOps\Tui\Block\SelectionBounds;
-use DrevOps\Tui\Block\Template;
-use DrevOps\Tui\Block\Weekday;
-use DrevOps\Tui\Condition\ConditionInterface;
-use DrevOps\Tui\Derive\Derive;
-use DrevOps\Tui\Discovery\DiscoverInterface;
-use DrevOps\Tui\FormException;
+namespace DrevOps\PhpTui\Builder;
+
+use DrevOps\PhpTui\Block\DateBounds;
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\FilePickerConstraints;
+use DrevOps\PhpTui\Block\FilePickerMode;
+use DrevOps\PhpTui\Block\NumberBounds;
+use DrevOps\PhpTui\Block\SelectionBounds;
+use DrevOps\PhpTui\Block\Template;
+use DrevOps\PhpTui\Block\Weekday;
+use DrevOps\PhpTui\Condition\ConditionInterface;
+use DrevOps\PhpTui\Derive\Derive;
+use DrevOps\PhpTui\Discovery\DiscoverInterface;
+use DrevOps\PhpTui\FormException;
/**
* A fluent builder for a single field: the block that collects.
@@ -30,7 +30,7 @@
* declaration the kind has nowhere to put is rejected where it was written
* rather than quietly dropped, so the error points at the line that made it.
*
- * @package DrevOps\Tui\Builder
+ * @package DrevOps\PhpTui\Builder
*/
final class FieldBuilder {
@@ -142,7 +142,7 @@ final class FieldBuilder {
* The unique field id.
* @param string $label
* The human-readable label.
- * @param \DrevOps\Tui\Block\FieldType $fieldType
+ * @param \DrevOps\PhpTui\Block\FieldType $fieldType
* The field type.
*/
public function __construct(protected string $id, protected string $label, protected FieldType $fieldType) {
@@ -152,7 +152,7 @@ public function __construct(protected string $id, protected string $label, prote
/**
* The block this builder is declaring.
*
- * @return \DrevOps\Tui\Block\Field
+ * @return \DrevOps\PhpTui\Block\Field
* The field, whose identity never changes, so it can be placed in a region
* as it is declared.
*/
@@ -163,7 +163,7 @@ public function block(): Field {
/**
* Finish the declaration, writing what was stated in parts onto the block.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the finished declaration contradicts itself.
*/
public function seal(): void {
@@ -238,7 +238,7 @@ public function help(string $help): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field draws no input buffer to ghost.
*/
public function placeholder(string $placeholder): self {
@@ -356,7 +356,7 @@ public function required(bool $required = TRUE, string $message = ''): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field type does not support collecting several values.
*/
public function multiple(bool $multiple = TRUE): self {
@@ -375,7 +375,7 @@ public function multiple(bool $multiple = TRUE): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field masks nothing to reveal.
*/
public function revealable(bool $revealable = TRUE): self {
@@ -394,7 +394,7 @@ public function revealable(bool $revealable = TRUE): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field keeps no secret to confirm.
*/
public function confirmation(bool $confirm = TRUE): self {
@@ -416,7 +416,7 @@ public function confirmation(bool $confirm = TRUE): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field composes no long-form text to hand off.
*/
public function externalEditor(bool $enabled = TRUE): self {
@@ -456,7 +456,7 @@ public function standalone(bool $standalone = TRUE): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field counts through no numbers.
*/
public function min(int $min): self {
@@ -475,7 +475,7 @@ public function min(int $min): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field counts through no numbers.
*/
public function max(int $max): self {
@@ -494,7 +494,7 @@ public function max(int $max): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the step is not positive, or the field draws a scale whose points
* are already its steps.
*/
@@ -531,7 +531,7 @@ public function step(int $step): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field draws no scale to caption.
*/
public function captions(array $captions): self {
@@ -550,7 +550,7 @@ public function captions(array $captions): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field does not collect several values.
*/
public function minSelections(int $min): self {
@@ -569,7 +569,7 @@ public function minSelections(int $min): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field does not collect several values.
*/
public function maxSelections(int $max): self {
@@ -592,7 +592,7 @@ public function maxSelections(int $max): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field browses no filesystem.
*/
public function startIn(string $directory): self {
@@ -610,7 +610,7 @@ public function startIn(string $directory): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field browses no filesystem.
*/
public function filesOnly(): self {
@@ -626,7 +626,7 @@ public function filesOnly(): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field browses no filesystem.
*/
public function directoriesOnly(): self {
@@ -646,7 +646,7 @@ public function directoriesOnly(): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field browses no filesystem.
*/
public function extensions(array $extensions): self {
@@ -665,7 +665,7 @@ public function extensions(array $extensions): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field browses no filesystem.
*/
public function showHidden(bool $show = TRUE): self {
@@ -687,7 +687,7 @@ public function showHidden(bool $show = TRUE): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field browses no filesystem, or the size is not positive.
*/
public function maxSize(int $bytes): self {
@@ -713,7 +713,7 @@ public function maxSize(int $bytes): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field draws no list to page, or the size is not positive.
*/
public function pageSize(int $size): self {
@@ -737,7 +737,7 @@ public function pageSize(int $size): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field picks no date, or the value is not a valid `Y-m-d` date.
*/
public function minDate(string $date): self {
@@ -756,7 +756,7 @@ public function minDate(string $date): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field picks no date, or the value is not a valid `Y-m-d` date.
*/
public function maxDate(string $date): self {
@@ -769,13 +769,13 @@ public function maxDate(string $date): self {
/**
* Calendar only: set the day the calendar week begins on.
*
- * @param \DrevOps\Tui\Block\Weekday $weekday
+ * @param \DrevOps\PhpTui\Block\Weekday $weekday
* The week-start day.
*
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field picks no date.
*/
public function weekStart(Weekday $weekday): self {
@@ -788,7 +788,7 @@ public function weekStart(Weekday $weekday): self {
/**
* Set the conditional-visibility rule.
*
- * @param \DrevOps\Tui\Condition\ConditionInterface $condition
+ * @param \DrevOps\PhpTui\Condition\ConditionInterface $condition
* The condition gating the field, evaluated as the answers settle.
*
* @return $this
@@ -803,7 +803,7 @@ public function when(ConditionInterface $condition): self {
/**
* Set the derive rule.
*
- * @param \DrevOps\Tui\Derive\Derive $derive
+ * @param \DrevOps\PhpTui\Derive\Derive $derive
* The derive rule, evaluated as the answers settle.
*
* @return $this
@@ -818,7 +818,7 @@ public function derive(Derive $derive): self {
/**
* Set the discovery rule.
*
- * @param \DrevOps\Tui\Discovery\DiscoverInterface|\Closure $discover
+ * @param \DrevOps\PhpTui\Discovery\DiscoverInterface|\Closure $discover
* The discovery rule - or a custom `fn (Context): mixed` detector -
* evaluated in update mode.
*
@@ -877,7 +877,7 @@ public function transform(\Closure $transformer): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field completes no typed text.
*/
public function complete(array|\Closure $source): self {
@@ -901,7 +901,7 @@ public function complete(array|\Closure $source): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field ranks no options to preview.
*/
public function ghost(bool $ghost = TRUE): self {
@@ -924,7 +924,7 @@ public function ghost(bool $ghost = TRUE): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field fills in no fixed shape.
*/
public function pattern(string $pattern): self {
@@ -950,7 +950,7 @@ public function pattern(string $pattern): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field fills in no fixed shape.
*/
public function slot(string $name, string $label = '', ?\Closure $validate = NULL): self {
@@ -984,7 +984,7 @@ public function slot(string $name, string $label = '', ?\Closure $validate = NUL
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field shows no options.
*/
public function option(string $value, string $label = '', string $description = '', bool $disabled = FALSE, string $disabled_reason = ''): self {
@@ -1000,7 +1000,7 @@ public function option(string $value, string $label = '', string $description =
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field shows no options.
*/
public function separator(): self {
@@ -1019,7 +1019,7 @@ public function separator(): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field shows no options.
*/
public function heading(string $label): self {
@@ -1058,7 +1058,7 @@ public function heading(string $label): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field shows no options.
*/
public function options(array|\Closure $options): self {
@@ -1106,7 +1106,7 @@ public function options(array|\Closure $options): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field runs no query.
*/
public function optionsFrom(\Closure $source): self {
@@ -1129,7 +1129,7 @@ public function optionsFrom(\Closure $source): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the field runs no query, or the length is below one character.
*/
public function minQuery(int $length): self {
@@ -1206,7 +1206,7 @@ protected static function fillsShape(): \Closure {
* @param string $method
* The refused method, without its parentheses.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When this field's kind is not one the declaration applies to.
*/
protected function scoped(\Closure $applies, string $lacks, string $method): void {
@@ -1222,10 +1222,10 @@ protected function scoped(\Closure $applies, string $lacks, string $method): voi
/**
* Assemble the template of a template field from the declared pattern.
*
- * @return \DrevOps\Tui\Block\Template|null
+ * @return \DrevOps\PhpTui\Block\Template|null
* The template, or NULL for any other field type or an absent pattern.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the pattern cannot be filled in or read back unambiguously.
*/
protected function buildTemplate(): ?Template {
@@ -1295,10 +1295,10 @@ protected function reorderDefault(): array {
/**
* Assemble the number bounds from the declared min/max/step, if any.
*
- * @return \DrevOps\Tui\Block\NumberBounds|null
+ * @return \DrevOps\PhpTui\Block\NumberBounds|null
* The bounds, or NULL when none were declared.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When min exceeds max.
*/
protected function buildBounds(): ?NumberBounds {
@@ -1324,10 +1324,10 @@ protected function buildBounds(): ?NumberBounds {
* draws - so both ends always resolve, and the arrows walk the range one
* point at a time rather than by a declared increment.
*
- * @return \DrevOps\Tui\Block\NumberBounds
+ * @return \DrevOps\PhpTui\Block\NumberBounds
* The scale.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the range holds fewer than two points.
*/
protected function buildScale(): NumberBounds {
@@ -1344,10 +1344,10 @@ protected function buildScale(): NumberBounds {
/**
* Assemble the selection bounds from the declared min/max selections, if any.
*
- * @return \DrevOps\Tui\Block\SelectionBounds|null
+ * @return \DrevOps\PhpTui\Block\SelectionBounds|null
* The bounds, or NULL when no selection limit was declared.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When selection limits are declared on a non-multiple field, or the
* minimum exceeds the maximum.
*/
@@ -1370,7 +1370,7 @@ protected function buildSelectionBounds(): ?SelectionBounds {
/**
* Assemble the file picker constraints from the declared type/extension/size.
*
- * @return \DrevOps\Tui\Block\FilePickerConstraints
+ * @return \DrevOps\PhpTui\Block\FilePickerConstraints
* The constraints; unconstrained when nothing was declared.
*/
protected function buildPickerConstraints(): FilePickerConstraints {
@@ -1380,10 +1380,10 @@ protected function buildPickerConstraints(): FilePickerConstraints {
/**
* Assemble the date bounds for a date field from the declared min/max/start.
*
- * @return \DrevOps\Tui\Block\DateBounds|null
+ * @return \DrevOps\PhpTui\Block\DateBounds|null
* The bounds for a date field, or NULL for any other field type.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When a declared date is not a valid `Y-m-d` date, or min is after max.
*/
protected function buildDateBounds(): ?DateBounds {
@@ -1410,7 +1410,7 @@ protected function buildDateBounds(): ?DateBounds {
* @return \DateTimeImmutable
* The parsed date.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the value is not a valid `Y-m-d` date.
*/
protected function parseBoundDate(string $value): \DateTimeImmutable {
@@ -1426,7 +1426,7 @@ protected function parseBoundDate(string $value): \DateTimeImmutable {
/**
* The default a field type settles on when none is declared.
*
- * @param \DrevOps\Tui\Block\FieldType $type
+ * @param \DrevOps\PhpTui\Block\FieldType $type
* The field type.
*
* @return mixed
diff --git a/src/Builder/Fixup.php b/src/Builder/Fixup.php
index bb9732f6..2b1c0a8d 100644
--- a/src/Builder/Fixup.php
+++ b/src/Builder/Fixup.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Builder;
+namespace DrevOps\PhpTui\Builder;
-use DrevOps\Tui\Condition\ConditionInterface;
-use DrevOps\Tui\Terminal\Ansi;
+use DrevOps\PhpTui\Condition\ConditionInterface;
+use DrevOps\PhpTui\Terminal\Ansi;
/**
* A post-settle fix-up: set a field's value when a condition holds.
@@ -15,7 +15,7 @@
* or a copy of another field's value when `from` names one. With no condition
* the fix-up always applies.
*
- * @package DrevOps\Tui\Builder
+ * @package DrevOps\PhpTui\Builder
*/
final readonly class Fixup {
@@ -33,7 +33,7 @@
* The literal value to set (ignored when $from names a field).
* @param string $from
* The id of a field whose value is copied (empty to use $to).
- * @param \DrevOps\Tui\Condition\ConditionInterface|null $when
+ * @param \DrevOps\PhpTui\Condition\ConditionInterface|null $when
* The guard condition (NULL to always apply).
*/
public function __construct(
diff --git a/src/Builder/Form.php b/src/Builder/Form.php
index 1ff3cb39..cde9e660 100644
--- a/src/Builder/Form.php
+++ b/src/Builder/Form.php
@@ -2,20 +2,20 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Builder;
-
-use DrevOps\Tui\Block\Buttons;
-use DrevOps\Tui\Block\Capability\DependCapableInterface;
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\Option;
-use DrevOps\Tui\Block\Panel;
-use DrevOps\Tui\Block\Template;
-use DrevOps\Tui\Block\Tree;
-use DrevOps\Tui\Condition\ConditionInterface;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Screen\Layout\GridLayout;
-use DrevOps\Tui\Screen\Layout\PanelLayout;
+namespace DrevOps\PhpTui\Builder;
+
+use DrevOps\PhpTui\Block\Buttons;
+use DrevOps\PhpTui\Block\Capability\DependCapableInterface;
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\Option;
+use DrevOps\PhpTui\Block\Panel;
+use DrevOps\PhpTui\Block\Template;
+use DrevOps\PhpTui\Block\Tree;
+use DrevOps\PhpTui\Condition\ConditionInterface;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Screen\Layout\GridLayout;
+use DrevOps\PhpTui\Screen\Layout\PanelLayout;
/**
* A fluent builder declaring a form: its panels, fields and own chrome.
@@ -23,9 +23,9 @@
* Declares only what belongs to a specific questionnaire - its title, panels
* and fields, its start banner and submit/cancel buttons, its fix-ups and
* env-variable prefix. The global TUI runtime (theme, key bindings, colour,
- * language) is configured on the {@see \DrevOps\Tui\Tui} facade, not here.
+ * language) is configured on the {@see \DrevOps\PhpTui\Tui} facade, not here.
*
- * @package DrevOps\Tui\Builder
+ * @package DrevOps\PhpTui\Builder
*/
final class Form {
@@ -62,14 +62,14 @@ final class Form {
/**
* The post-settle fix-up rules.
*
- * @var \DrevOps\Tui\Builder\Fixup[]
+ * @var \DrevOps\PhpTui\Builder\Fixup[]
*/
protected array $fixups = [];
/**
* The top-level panel builders, in declaration order.
*
- * @var \DrevOps\Tui\Builder\PanelBuilder[]
+ * @var \DrevOps\PhpTui\Builder\PanelBuilder[]
*/
protected array $panels = [];
@@ -133,7 +133,7 @@ public function banner(string $banner): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the form's tree has already been built.
*/
public function buttons(bool $show, string $submit_label = 'Submit', string $cancel_label = 'Cancel'): self {
@@ -164,7 +164,7 @@ public function envPrefix(string $prefix): self {
/**
* Add a post-settle fix-up rule.
*
- * @param \DrevOps\Tui\Builder\Fixup $fixup
+ * @param \DrevOps\PhpTui\Builder\Fixup $fixup
* The fix-up, evaluated once the answers have settled.
*
* @return $this
@@ -189,7 +189,7 @@ public function fixup(Fixup $fixup): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the form's tree has already been built.
*/
public function panel(string $id, string $title, \Closure $build): self {
@@ -207,7 +207,7 @@ public function panel(string $id, string $title, \Closure $build): self {
*
* Each argument declares one visual row and names how many panels sit side
* by side in it; the panels fill the rows in declaration order. Mirrors
- * {@see \DrevOps\Tui\Builder\PanelBuilder::layout()}, which arranges a
+ * {@see \DrevOps\PhpTui\Builder\PanelBuilder::layout()}, which arranges a
* drilled-in panel's own children.
*
* @param int ...$rows
@@ -216,7 +216,7 @@ public function panel(string $id, string $title, \Closure $build): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the form's tree has already been built, or a visual row holds fewer
* than one panel.
*/
@@ -236,10 +236,10 @@ public function layout(int ...$rows): self {
* collection traverses. The tree is built once; later calls return the same
* instance.
*
- * @return \DrevOps\Tui\Block\Panel
+ * @return \DrevOps\PhpTui\Block\Panel
* The root panel, carrying the form's own name.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When a declaration contradicts itself.
*/
public function root(): Panel {
@@ -297,7 +297,7 @@ public function currentEnvPrefix(): string {
/**
* The rules this form applies once its answers have settled.
*
- * @return \DrevOps\Tui\Builder\Fixup[]
+ * @return \DrevOps\PhpTui\Builder\Fixup[]
* The rules, in declaration order.
*/
public function currentFixups(): array {
@@ -313,7 +313,7 @@ public function currentFixups(): array {
* @param string $declaration
* What is being declared, as a fragment naming it.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the tree has already been built.
*/
protected function assertUnbuilt(string $declaration): void {
@@ -325,7 +325,7 @@ protected function assertUnbuilt(string $declaration): void {
/**
* Assert that every field id is unique across the panel tree.
*
- * @param \DrevOps\Tui\Block\Panel $root
+ * @param \DrevOps\PhpTui\Block\Panel $root
* The root panel holding every declared panel.
*/
protected function assertUniqueFieldIds(Panel $root): void {
@@ -347,7 +347,7 @@ protected function assertUniqueFieldIds(Panel $root): void {
* holds, so a block's depth is a fact about the whole form: it can only be
* computed once every panel has been placed.
*
- * @param \DrevOps\Tui\Block\Panel $root
+ * @param \DrevOps\PhpTui\Block\Panel $root
* The root panel holding every declared panel.
*/
protected function nestConditionals(Panel $root): void {
@@ -369,13 +369,13 @@ protected function nestConditionals(Panel $root): void {
/**
* Every block a condition can hide, and the panel holding each.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to walk.
- * @param array $holders
+ * @param array $holders
* The section each block sits in, keyed by the block's object id,
* populated as the walk proceeds.
*
- * @return list<\DrevOps\Tui\Block\Capability\DependCapableInterface>
+ * @return list<\DrevOps\PhpTui\Block\Capability\DependCapableInterface>
* The blocks, in declaration order.
*/
protected function conditionals(Panel $panel, array &$holders): array {
@@ -407,11 +407,11 @@ protected function conditionals(Panel $panel, array &$holders): array {
* Measured by object rather than by id, because a section and a row it
* holds may share the same id.
*
- * @param \DrevOps\Tui\Block\Capability\DependCapableInterface $block
+ * @param \DrevOps\PhpTui\Block\Capability\DependCapableInterface $block
* The block to measure.
- * @param array $holders
+ * @param array $holders
* The section each block sits in, keyed by the block's object id.
- * @param array $by_id
+ * @param array $by_id
* Every field in the form, keyed by id.
* @param array $resolved
* The depths measured so far, so a block named by several rules is walked
@@ -460,7 +460,7 @@ protected function nesting(DependCapableInterface $block, array $holders, array
/**
* Assert that nothing is declared on a field that never draws it.
*
- * @param \DrevOps\Tui\Block\Panel $root
+ * @param \DrevOps\PhpTui\Block\Panel $root
* The root panel holding every declared panel.
*/
protected function assertFieldSurfaces(Panel $root): void {
@@ -483,7 +483,7 @@ protected function assertFieldSurfaces(Panel $root): void {
* field offered two of them has no one set, and a field offered any of them
* on a kind that shows no list has nowhere to put them.
*
- * @param \DrevOps\Tui\Block\Panel $root
+ * @param \DrevOps\PhpTui\Block\Panel $root
* The root panel holding every declared panel.
*/
protected function assertOptionSources(Panel $root): void {
@@ -516,7 +516,7 @@ protected function assertOptionSources(Panel $root): void {
/**
* Assert that every toggle field declares exactly two options.
*
- * @param \DrevOps\Tui\Block\Panel $root
+ * @param \DrevOps\PhpTui\Block\Panel $root
* The root panel holding every declared panel.
*/
protected function assertToggleOptions(Panel $root): void {
@@ -558,7 +558,7 @@ protected function assertToggleOptions(Panel $root): void {
* A ranking arranges a flat list, so headings, separators and disabled rows
* are not allowed in it, and fewer than two items leaves nothing to reorder.
*
- * @param \DrevOps\Tui\Block\Panel $root
+ * @param \DrevOps\PhpTui\Block\Panel $root
* The root panel holding every declared panel.
*/
protected function assertReorderOptions(Panel $root): void {
@@ -588,7 +588,7 @@ protected function assertReorderOptions(Panel $root): void {
/**
* Assert that every template field declares the shape it fills in.
*
- * @param \DrevOps\Tui\Block\Panel $root
+ * @param \DrevOps\PhpTui\Block\Panel $root
* The root panel holding every declared panel.
*/
protected function assertTemplateShapes(Panel $root): void {
@@ -610,7 +610,7 @@ protected function assertTemplateShapes(Panel $root): void {
* fields and a description, but nesting panels (or another modal) inside it
* has no defined layout.
*
- * @param \DrevOps\Tui\Block\Panel $root
+ * @param \DrevOps\PhpTui\Block\Panel $root
* The root panel holding every declared panel.
*/
protected function assertModalPanels(Panel $root): void {
@@ -624,7 +624,7 @@ protected function assertModalPanels(Panel $root): void {
/**
* Whether a field's options stand as declared.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
*
* @return bool
diff --git a/src/Builder/PanelBuilder.php b/src/Builder/PanelBuilder.php
index 108a52d1..b4ab462c 100644
--- a/src/Builder/PanelBuilder.php
+++ b/src/Builder/PanelBuilder.php
@@ -2,20 +2,20 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Builder;
-
-use DrevOps\Tui\Block\BlockInterface;
-use DrevOps\Tui\Block\Buttons;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\Markup;
-use DrevOps\Tui\Block\Panel;
-use DrevOps\Tui\Block\Progress;
-use DrevOps\Tui\Condition\ConditionInterface;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Screen\Layout\GridLayout;
-use DrevOps\Tui\Screen\Layout\LayoutInterface;
-use DrevOps\Tui\Screen\Layout\LayoutManager;
-use DrevOps\Tui\Screen\Layout\PanelLayout;
+namespace DrevOps\PhpTui\Builder;
+
+use DrevOps\PhpTui\Block\BlockInterface;
+use DrevOps\PhpTui\Block\Buttons;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\Markup;
+use DrevOps\PhpTui\Block\Panel;
+use DrevOps\PhpTui\Block\Progress;
+use DrevOps\PhpTui\Condition\ConditionInterface;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Screen\Layout\GridLayout;
+use DrevOps\PhpTui\Screen\Layout\LayoutInterface;
+use DrevOps\PhpTui\Screen\Layout\LayoutManager;
+use DrevOps\PhpTui\Screen\Layout\PanelLayout;
/**
* A fluent builder for a panel: what it holds, and how it is arranged.
@@ -26,7 +26,7 @@
* block then names the region it goes in rather than depending on the order
* it was declared in.
*
- * @package DrevOps\Tui\Builder
+ * @package DrevOps\PhpTui\Builder
*/
final class PanelBuilder {
@@ -38,14 +38,14 @@ final class PanelBuilder {
/**
* The field builders, in declaration order.
*
- * @var \DrevOps\Tui\Builder\FieldBuilder[]
+ * @var \DrevOps\PhpTui\Builder\FieldBuilder[]
*/
protected array $fields = [];
/**
* The nested panel builders, in declaration order.
*
- * @var \DrevOps\Tui\Builder\PanelBuilder[]
+ * @var \DrevOps\PhpTui\Builder\PanelBuilder[]
*/
protected array $panels = [];
@@ -75,7 +75,7 @@ public function __construct(protected string $id, protected string $title) {
/**
* The panel this builder is declaring.
*
- * @return \DrevOps\Tui\Block\Panel
+ * @return \DrevOps\PhpTui\Block\Panel
* The panel, whose identity never changes, so it can be placed in a region
* as it is declared.
*/
@@ -86,7 +86,7 @@ public function block(): Panel {
/**
* Finish the declaration, so everything it holds is finished too.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the declared grid does not match the panels it arranges.
*/
public function seal(): void {
@@ -127,7 +127,7 @@ public function description(string $description): self {
* everything it holds: while the condition does not hold, its questions are
* not asked, not drawn and not in the answers.
*
- * @param \DrevOps\Tui\Condition\ConditionInterface $condition
+ * @param \DrevOps\PhpTui\Condition\ConditionInterface $condition
* The condition gating the panel, evaluated as the answers settle.
*
* @return $this
@@ -186,7 +186,7 @@ public function in(string $name): self {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function text(string $id, string $label = ''): FieldBuilder {
@@ -200,14 +200,14 @@ public function text(string $id, string $label = ''): FieldBuilder {
* context and each `{{name}}` slot is filled separately - and
* `->slot()` to label or validate one slot. The answer is the
* assembled string; its parts are read back with
- * {@see \DrevOps\Tui\Answers\Answers::parts()}.
+ * {@see \DrevOps\PhpTui\Answers\Answers::parts()}.
*
* @param string $id
* The field id.
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function template(string $id, string $label = ''): FieldBuilder {
@@ -222,7 +222,7 @@ public function template(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function select(string $id, string $label = ''): FieldBuilder {
@@ -237,7 +237,7 @@ public function select(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function reorder(string $id, string $label = ''): FieldBuilder {
@@ -252,7 +252,7 @@ public function reorder(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function confirm(string $id, string $label = ''): FieldBuilder {
@@ -267,7 +267,7 @@ public function confirm(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function toggle(string $id, string $label = ''): FieldBuilder {
@@ -282,7 +282,7 @@ public function toggle(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function suggest(string $id, string $label = ''): FieldBuilder {
@@ -297,7 +297,7 @@ public function suggest(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function number(string $id, string $label = ''): FieldBuilder {
@@ -316,7 +316,7 @@ public function number(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function rating(string $id, string $label = ''): FieldBuilder {
@@ -331,7 +331,7 @@ public function rating(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function calendar(string $id, string $label = ''): FieldBuilder {
@@ -346,7 +346,7 @@ public function calendar(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function textarea(string $id, string $label = ''): FieldBuilder {
@@ -361,7 +361,7 @@ public function textarea(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function password(string $id, string $label = ''): FieldBuilder {
@@ -378,7 +378,7 @@ public function password(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function search(string $id, string $label = ''): FieldBuilder {
@@ -395,7 +395,7 @@ public function search(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function filePicker(string $id, string $label = ''): FieldBuilder {
@@ -410,7 +410,7 @@ public function filePicker(string $id, string $label = ''): FieldBuilder {
* @param string $label
* The label (defaults to the id).
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
public function pause(string $id, string $label = ''): FieldBuilder {
@@ -429,7 +429,7 @@ public function pause(string $id, string $label = ''): FieldBuilder {
* @param string $title
* The title (optional; an empty title draws the body alone).
*
- * @return \DrevOps\Tui\Block\Markup
+ * @return \DrevOps\PhpTui\Block\Markup
* The markup block.
*/
public function note(string $id, string $title = ''): Markup {
@@ -451,7 +451,7 @@ public function note(string $id, string $title = ''): Markup {
* @param string $title
* An optional title above the body.
*
- * @return \DrevOps\Tui\Block\Markup
+ * @return \DrevOps\PhpTui\Block\Markup
* The markup block.
*/
public function markup(string $id, string $body, string $title = ''): Markup {
@@ -466,14 +466,14 @@ public function markup(string $id, string $body, string $title = ''): Markup {
*
* Chain `->steps(int)` for a determinate bar (omit it for a spinner) and
* `->work(\Closure)` for the work; the callback drives the indicator through
- * the {@see \DrevOps\Tui\Primitive\ProgressReporter} it receives.
+ * the {@see \DrevOps\PhpTui\Primitive\ProgressReporter} it receives.
*
* @param string $id
* The block id.
* @param string $caption
* The caption shown beside the indicator (defaults to the id).
*
- * @return \DrevOps\Tui\Block\Progress
+ * @return \DrevOps\PhpTui\Block\Progress
* The progress block.
*/
public function progress(string $id, string $caption = ''): Progress {
@@ -511,7 +511,7 @@ public function panel(string $id, string $title, \Closure $build): self {
* A name picks the arrangement of the panel's own blocks - a shipped layout,
* or any one a consumer registered - and each of its regions then takes the
* blocks that name it through
- * {@see \DrevOps\Tui\Builder\PanelBuilder::in()}.
+ * {@see \DrevOps\PhpTui\Builder\PanelBuilder::in()}.
*
* Counts arrange the sub-panels instead: each argument declares one visual
* row and names how many sub-panels sit side by side in it, filled in
@@ -527,7 +527,7 @@ public function panel(string $id, string $title, \Closure $build): self {
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When a name is mixed with counts, more than one name is given, a visual
* row holds fewer than one sub-panel, or the panel already holds blocks
* the named layout has nowhere to put.
@@ -583,7 +583,7 @@ public function preload(\Closure $work): self {
/**
* Add a block to the current region.
*
- * @param \DrevOps\Tui\Block\BlockInterface $block
+ * @param \DrevOps\PhpTui\Block\BlockInterface $block
* The block.
*
* @return $this
@@ -603,10 +603,10 @@ public function add(BlockInterface $block): self {
* is a region, so the region a sub-panel goes in is settled here rather
* than derived later from declaration order.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The sub-panel.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the grid has no window left to draw it in.
*/
protected function descend(Panel $panel): void {
@@ -635,13 +635,13 @@ protected function descend(Panel $panel): void {
/**
* Arrange the panel with a layout.
*
- * @param \DrevOps\Tui\Screen\Layout\LayoutInterface $layout
+ * @param \DrevOps\PhpTui\Screen\Layout\LayoutInterface $layout
* The layout.
*
* @return $this
* The builder.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the panel already holds blocks the layout has nowhere to put.
*/
protected function arrange(LayoutInterface $layout): self {
@@ -661,7 +661,7 @@ protected function arrange(LayoutInterface $layout): self {
* @return string
* The first region the panel's layout declares.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the layout declares no region, so there is nowhere for a block to
* go.
*/
@@ -682,10 +682,10 @@ protected function firstRegion(): string {
* The field id.
* @param string $label
* The label (defaults to the id).
- * @param \DrevOps\Tui\Block\FieldType $type
+ * @param \DrevOps\PhpTui\Block\FieldType $type
* The field type.
*
- * @return \DrevOps\Tui\Builder\FieldBuilder
+ * @return \DrevOps\PhpTui\Builder\FieldBuilder
* The field builder.
*/
protected function field(string $id, string $label, FieldType $type): FieldBuilder {
diff --git a/src/CancelException.php b/src/CancelException.php
index 0090a49c..1fb69bb4 100644
--- a/src/CancelException.php
+++ b/src/CancelException.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui;
+namespace DrevOps\PhpTui;
/**
* Thrown when the user dismisses an interactive session via the cancel button.
@@ -12,7 +12,7 @@
* {@see InterruptException} so one catch covers both aborts; a caller that
* treats an explicit cancel differently catches this class first.
*
- * @package DrevOps\Tui
+ * @package DrevOps\PhpTui
*/
class CancelException extends InterruptException {
diff --git a/src/CollectException.php b/src/CollectException.php
index 0e05b8f4..8ee97091 100644
--- a/src/CollectException.php
+++ b/src/CollectException.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui;
+namespace DrevOps\PhpTui;
/**
* Thrown when a collection cannot take the answers it was given.
@@ -14,7 +14,7 @@
* collection without a complete answer set, so one import covers every
* ending.
*
- * @package DrevOps\Tui
+ * @package DrevOps\PhpTui
*/
class CollectException extends \RuntimeException {
diff --git a/src/Condition/CompositeCondition.php b/src/Condition/CompositeCondition.php
index be5c51b2..b6bb5baa 100644
--- a/src/Condition/CompositeCondition.php
+++ b/src/Condition/CompositeCondition.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Condition;
+namespace DrevOps\PhpTui\Condition;
/**
* A composite condition: all / any / not over other conditions.
@@ -10,16 +10,16 @@
* Construct via {@see Condition::all()}, {@see Condition::any()} and
* {@see Condition::not()}.
*
- * @package DrevOps\Tui\Condition
+ * @package DrevOps\PhpTui\Condition
*/
final readonly class CompositeCondition implements ConditionInterface {
/**
* Construct a composite condition.
*
- * @param \DrevOps\Tui\Condition\CompositeOperator $compositeOperator
+ * @param \DrevOps\PhpTui\Condition\CompositeOperator $compositeOperator
* How the conditions combine.
- * @param list<\DrevOps\Tui\Condition\ConditionInterface> $conditions
+ * @param list<\DrevOps\PhpTui\Condition\ConditionInterface> $conditions
* The combined conditions (exactly one for Not).
*/
public function __construct(protected CompositeOperator $compositeOperator, protected array $conditions) {
diff --git a/src/Condition/CompositeOperator.php b/src/Condition/CompositeOperator.php
index 6fa506b7..bc571b0c 100644
--- a/src/Condition/CompositeOperator.php
+++ b/src/Condition/CompositeOperator.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Condition;
+namespace DrevOps\PhpTui\Condition;
/**
* How a composite condition combines its parts.
*
- * @package DrevOps\Tui\Condition
+ * @package DrevOps\PhpTui\Condition
*/
enum CompositeOperator: string {
diff --git a/src/Condition/Condition.php b/src/Condition/Condition.php
index df4866b7..e2c7331e 100644
--- a/src/Condition/Condition.php
+++ b/src/Condition/Condition.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Condition;
+namespace DrevOps\PhpTui\Condition;
/**
* A leaf condition: a field reference and one operator.
@@ -12,7 +12,7 @@
* the referenced field is tested for a truthy value. Compose conditions with
* {@see all()}, {@see any()} and {@see not()}.
*
- * @package DrevOps\Tui\Condition
+ * @package DrevOps\PhpTui\Condition
*/
final readonly class Condition implements ConditionInterface {
@@ -43,10 +43,10 @@ public function __construct(
/**
* A composite matching when every condition matches.
*
- * @param \DrevOps\Tui\Condition\ConditionInterface ...$conditions
+ * @param \DrevOps\PhpTui\Condition\ConditionInterface ...$conditions
* The conditions to combine.
*
- * @return \DrevOps\Tui\Condition\CompositeCondition
+ * @return \DrevOps\PhpTui\Condition\CompositeCondition
* The composite condition.
*/
public static function all(ConditionInterface ...$conditions): CompositeCondition {
@@ -56,10 +56,10 @@ public static function all(ConditionInterface ...$conditions): CompositeConditio
/**
* A composite matching when at least one condition matches.
*
- * @param \DrevOps\Tui\Condition\ConditionInterface ...$conditions
+ * @param \DrevOps\PhpTui\Condition\ConditionInterface ...$conditions
* The conditions to combine.
*
- * @return \DrevOps\Tui\Condition\CompositeCondition
+ * @return \DrevOps\PhpTui\Condition\CompositeCondition
* The composite condition.
*/
public static function any(ConditionInterface ...$conditions): CompositeCondition {
@@ -69,10 +69,10 @@ public static function any(ConditionInterface ...$conditions): CompositeConditio
/**
* A composite matching when the condition does not match.
*
- * @param \DrevOps\Tui\Condition\ConditionInterface $condition
+ * @param \DrevOps\PhpTui\Condition\ConditionInterface $condition
* The condition to negate.
*
- * @return \DrevOps\Tui\Condition\CompositeCondition
+ * @return \DrevOps\PhpTui\Condition\CompositeCondition
* The composite condition.
*/
public static function not(ConditionInterface $condition): CompositeCondition {
diff --git a/src/Condition/ConditionInterface.php b/src/Condition/ConditionInterface.php
index 6d3c0652..c2a147cc 100644
--- a/src/Condition/ConditionInterface.php
+++ b/src/Condition/ConditionInterface.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Condition;
+namespace DrevOps\PhpTui\Condition;
/**
* A condition evaluated against a set of answers.
*
- * @package DrevOps\Tui\Condition
+ * @package DrevOps\PhpTui\Condition
*/
interface ConditionInterface {
diff --git a/src/Derive/Derive.php b/src/Derive/Derive.php
index 0494f80d..d46565ea 100644
--- a/src/Derive/Derive.php
+++ b/src/Derive/Derive.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Derive;
+namespace DrevOps\PhpTui\Derive;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Utils\Strings;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Utils\Strings;
/**
* A derive rule: a `{{field}}` template and an optional named transform.
@@ -15,7 +15,7 @@
* construction, so a typo fails at declaration time instead of silently
* passing values through.
*
- * @package DrevOps\Tui\Derive
+ * @package DrevOps\PhpTui\Derive
*/
final readonly class Derive {
diff --git a/src/Derive/Deriver.php b/src/Derive/Deriver.php
index c20e1ef9..124dea0f 100644
--- a/src/Derive/Deriver.php
+++ b/src/Derive/Deriver.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Derive;
+namespace DrevOps\PhpTui\Derive;
-use DrevOps\Tui\Terminal\Ansi;
+use DrevOps\PhpTui\Terminal\Ansi;
/**
* Recomputes derived field values until chains settle to a fixpoint.
@@ -12,14 +12,14 @@
* Each rule is a {@see Derive} owning its own computation; fields the user
* has pinned (overridden) are left untouched.
*
- * @package DrevOps\Tui\Derive
+ * @package DrevOps\PhpTui\Derive
*/
class Deriver {
/**
* Recompute derived values until they stop changing.
*
- * @param array $rules
+ * @param array $rules
* Derive rules keyed by field id.
* @param array $values
* The current values keyed by field id.
diff --git a/src/Derive/Transform.php b/src/Derive/Transform.php
index 26997779..f5b49016 100644
--- a/src/Derive/Transform.php
+++ b/src/Derive/Transform.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Derive;
+namespace DrevOps\PhpTui\Derive;
use AlexSkrypnyk\Str2Name\Str2Name;
@@ -13,7 +13,7 @@
* pascal, host, initials, ...) as derive transforms. {@see Derive} validates
* a declared name against supports() at declaration time.
*
- * @package DrevOps\Tui\Derive
+ * @package DrevOps\PhpTui\Derive
*/
class Transform extends Str2Name {
diff --git a/src/Discovery/AbstractDiscover.php b/src/Discovery/AbstractDiscover.php
index 56ee256b..1d94263d 100644
--- a/src/Discovery/AbstractDiscover.php
+++ b/src/Discovery/AbstractDiscover.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Discovery;
+namespace DrevOps\PhpTui\Discovery;
/**
* Base discovery rule with shared path handling.
*
- * @package DrevOps\Tui\Discovery
+ * @package DrevOps\PhpTui\Discovery
*/
abstract class AbstractDiscover implements DiscoverInterface {
diff --git a/src/Discovery/DiscoverInterface.php b/src/Discovery/DiscoverInterface.php
index f2b02185..a26e38d4 100644
--- a/src/Discovery/DiscoverInterface.php
+++ b/src/Discovery/DiscoverInterface.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Discovery;
+namespace DrevOps\PhpTui\Discovery;
/**
* A declarative discovery rule evaluated against a project directory.
*
- * @package DrevOps\Tui\Discovery
+ * @package DrevOps\PhpTui\Discovery
*/
interface DiscoverInterface {
diff --git a/src/Discovery/Dotenv.php b/src/Discovery/Dotenv.php
index 004641ab..13c4b287 100644
--- a/src/Discovery/Dotenv.php
+++ b/src/Discovery/Dotenv.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Discovery;
+namespace DrevOps\PhpTui\Discovery;
/**
* Discovers a value by reading a key from the project's `.env` file.
*
- * @package DrevOps\Tui\Discovery
+ * @package DrevOps\PhpTui\Discovery
*/
class Dotenv extends AbstractDiscover {
diff --git a/src/Discovery/JsonValue.php b/src/Discovery/JsonValue.php
index 49d8dc09..76f450e0 100644
--- a/src/Discovery/JsonValue.php
+++ b/src/Discovery/JsonValue.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Discovery;
+namespace DrevOps\PhpTui\Discovery;
/**
* Discovers a scalar by reading a dot-path from a JSON file.
*
- * @package DrevOps\Tui\Discovery
+ * @package DrevOps\PhpTui\Discovery
*/
class JsonValue extends AbstractDiscover {
diff --git a/src/Discovery/PathExists.php b/src/Discovery/PathExists.php
index 23dcc13a..0f5bceb2 100644
--- a/src/Discovery/PathExists.php
+++ b/src/Discovery/PathExists.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Discovery;
+namespace DrevOps\PhpTui\Discovery;
/**
* Discovers whether a path exists within the project directory.
*
- * @package DrevOps\Tui\Discovery
+ * @package DrevOps\PhpTui\Discovery
*/
class PathExists extends AbstractDiscover {
diff --git a/src/Discovery/Scan.php b/src/Discovery/Scan.php
index 4497f0be..a754322c 100644
--- a/src/Discovery/Scan.php
+++ b/src/Discovery/Scan.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Discovery;
+namespace DrevOps\PhpTui\Discovery;
/**
* Discovers a list of directory entries, optionally filtered by type.
@@ -11,7 +11,7 @@
* its default - while an existing empty directory yields an empty list, a
* genuine discovery of "no entries".
*
- * @package DrevOps\Tui\Discovery
+ * @package DrevOps\PhpTui\Discovery
*/
class Scan extends AbstractDiscover {
@@ -20,7 +20,7 @@ class Scan extends AbstractDiscover {
*
* @param string $dir
* The directory to scan, relative to the project directory.
- * @param \DrevOps\Tui\Discovery\ScanType $type
+ * @param \DrevOps\PhpTui\Discovery\ScanType $type
* The entry type to keep.
*/
public function __construct(public readonly string $dir, public readonly ScanType $type = ScanType::Any) {
diff --git a/src/Discovery/ScanType.php b/src/Discovery/ScanType.php
index 62d745c6..5ec881ba 100644
--- a/src/Discovery/ScanType.php
+++ b/src/Discovery/ScanType.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Discovery;
+namespace DrevOps\PhpTui\Discovery;
/**
* Which directory entries a {@see Scan} rule keeps.
*
- * @package DrevOps\Tui\Discovery
+ * @package DrevOps\PhpTui\Discovery
*/
enum ScanType: string {
diff --git a/src/Field/AbstractField.php b/src/Field/AbstractField.php
index 5d39b93c..6ff680dd 100644
--- a/src/Field/AbstractField.php
+++ b/src/Field/AbstractField.php
@@ -2,22 +2,22 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
-
-use DrevOps\Tui\Block\Element\FieldElementsInterface;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyMapManager;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Input\ScopedKeyMap;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Utils\Strings;
+namespace DrevOps\PhpTui\Field;
+
+use DrevOps\PhpTui\Block\Element\FieldElementsInterface;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyMapManager;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Input\ScopedKeyMap;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Utils\Strings;
/**
* Shared field behaviour: accepting what was collected, and cancelling.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
abstract class AbstractField implements FieldInterface {
@@ -120,7 +120,7 @@ abstract protected function liveValue(): mixed;
*
* Fields whose bindings differ from the base defaults override this.
*
- * @return \DrevOps\Tui\Input\Scope
+ * @return \DrevOps\PhpTui\Input\Scope
* The field's binding scope.
*/
protected function keyScope(): Scope {
@@ -137,7 +137,7 @@ public function keys(): ScopedKeyMap {
/**
* Cancel the field when the key triggers the cancel action.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key to test.
*
* @return bool
@@ -156,7 +156,7 @@ protected function handleCancel(Key $key): bool {
/**
* Accept the live value when the key triggers the accept action.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key to test.
*
* @return bool
@@ -175,10 +175,10 @@ protected function handleAccept(Key $key): bool {
/**
* The theme, narrowed to the elements a field draws with.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
- * @return \DrevOps\Tui\Block\Element\FieldElementsInterface
+ * @return \DrevOps\PhpTui\Block\Element\FieldElementsInterface
* The theme, able to draw a field.
*
* @throws \InvalidArgumentException
@@ -195,7 +195,7 @@ protected function elements(ThemeInterface $theme): FieldElementsInterface {
/**
* Style one option's label.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
* @param string $label
* The option label.
@@ -214,7 +214,7 @@ protected function optionLabel(ThemeInterface $theme, string $label, bool $curre
/**
* Render an exclusive option row: the mark and the label beside it.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
* @param string $label
* The option label.
@@ -233,7 +233,7 @@ protected function renderExclusiveRow(ThemeInterface $theme, string $label, bool
/**
* The shared fuzzy matcher.
*
- * @return \DrevOps\Tui\Field\Matcher
+ * @return \DrevOps\PhpTui\Field\Matcher
* The matcher.
*/
protected function matcher(): Matcher {
@@ -247,7 +247,7 @@ protected function matcher(): Matcher {
* styled on its own, so no SGR code nests inside another. With no matched
* positions this is exactly {@see optionLabel()}.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
* @param string $label
* The option label.
@@ -289,7 +289,7 @@ protected function renderMatchedLabel(ThemeInterface $theme, string $label, arra
/**
* Style one run of matched or unmatched characters.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
* @param string $run
* The run of characters.
@@ -345,7 +345,7 @@ public function view(ThemeInterface $theme): string {
/**
* What the field expects of an answer.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
@@ -359,7 +359,7 @@ protected function renderConstraint(ThemeInterface $theme): string {
/**
* The field's own rendered body, before the shared description and error.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
@@ -391,7 +391,7 @@ protected function currentDescription(): string {
/**
* Render an option description, wrapped to the panel width and dimmed.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
* @param string $description
* The description text.
@@ -418,7 +418,7 @@ protected function renderOptionDescription(ThemeInterface $theme, string $descri
/**
* The column an option's own text starts at, within the field's view.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return int
diff --git a/src/Field/Calendar.php b/src/Field/Calendar.php
index 6e45a310..a3b50263 100644
--- a/src/Field/Calendar.php
+++ b/src/Field/Calendar.php
@@ -2,21 +2,21 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
-
-use DrevOps\Tui\Block\DateBounds;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\Weekday;
-use DrevOps\Tui\Field\Capability\StepCapableInterface;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Input\ScopedKeyMap;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
-use DrevOps\Tui\Utils\Strings;
+namespace DrevOps\PhpTui\Field;
+
+use DrevOps\PhpTui\Block\DateBounds;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\Weekday;
+use DrevOps\PhpTui\Field\Capability\StepCapableInterface;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Input\ScopedKeyMap;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
+use DrevOps\PhpTui\Utils\Strings;
/**
* A navigable month calendar returning a normalized ISO `Y-m-d` string.
@@ -30,7 +30,7 @@
* never on an out-of-range day; days outside the range stay visible but
* dimmed.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Calendar extends AbstractField implements StepCapableInterface {
@@ -59,7 +59,7 @@ class Calendar extends AbstractField implements StepCapableInterface {
*
* @param string $default
* The initial date as an ISO `Y-m-d` string; empty opens on today.
- * @param \DrevOps\Tui\Block\DateBounds|null $bounds
+ * @param \DrevOps\PhpTui\Block\DateBounds|null $bounds
* Optional min/max range and week-start day; NULL for an open range that
* starts the week on Monday.
*/
@@ -105,9 +105,9 @@ public function handle(Key $key): void {
* and month-edge jumps have no action of their own, so they match fixed
* keys.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key to interpret.
- * @param \DrevOps\Tui\Input\ScopedKeyMap $keys
+ * @param \DrevOps\PhpTui\Input\ScopedKeyMap $keys
* The resolved bindings for this field's scope.
*
* @return \DateTimeImmutable|null
@@ -190,7 +190,7 @@ public function hints(): array {
/**
* The centered "Month YYYY" heading over the calendar grid.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
@@ -206,7 +206,7 @@ protected function heading(ThemeInterface $theme): string {
/**
* The weekday heading row, ordered from the configured week-start day.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
@@ -221,7 +221,7 @@ protected function weekdayRow(ThemeInterface $theme): string {
/**
* The calendar grid rows for the visible month.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return list
@@ -251,7 +251,7 @@ protected function weekRows(ThemeInterface $theme): array {
* The cursor cell uses literal brackets so it stays distinguishable even
* with colour off.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
* @param \DateTimeImmutable $date
* The cell's date.
diff --git a/src/Field/Capability/CompletionCapableInterface.php b/src/Field/Capability/CompletionCapableInterface.php
index 3671c747..eb52571e 100644
--- a/src/Field/Capability/CompletionCapableInterface.php
+++ b/src/Field/Capability/CompletionCapableInterface.php
@@ -2,14 +2,14 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
/**
* A field offering inline ghost-text completion of its buffer.
*
* {@see CompletionCapableTrait} carries the default implementation.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
interface CompletionCapableInterface {
diff --git a/src/Field/Capability/CompletionCapableTrait.php b/src/Field/Capability/CompletionCapableTrait.php
index fcc006c0..353c175d 100644
--- a/src/Field/Capability/CompletionCapableTrait.php
+++ b/src/Field/Capability/CompletionCapableTrait.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
-use DrevOps\Tui\Utils\Strings;
+use DrevOps\PhpTui\Utils\Strings;
/**
* Inline ghost-text completion over a character buffer.
@@ -15,7 +15,7 @@
* whose buffer is not a plain caret line reuses the matching rule without
* inheriting the caret arithmetic.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
trait CompletionCapableTrait {
diff --git a/src/Field/Capability/ExternalEditCapableInterface.php b/src/Field/Capability/ExternalEditCapableInterface.php
index 2ae57d90..7d0fc493 100644
--- a/src/Field/Capability/ExternalEditCapableInterface.php
+++ b/src/Field/Capability/ExternalEditCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
/**
* A field that can hand its buffer to an external editor.
@@ -10,7 +10,7 @@
* The field only raises the request; the driver launches the editor and
* feeds the captured result back.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
interface ExternalEditCapableInterface {
diff --git a/src/Field/Capability/FilterCapableInterface.php b/src/Field/Capability/FilterCapableInterface.php
index c18b4277..d907d73e 100644
--- a/src/Field/Capability/FilterCapableInterface.php
+++ b/src/Field/Capability/FilterCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
/**
* A field whose visible rows narrow under a typed query.
@@ -11,7 +11,7 @@
* {@see FilterCapableTrait} carries the default implementation for the choice
* fields.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
interface FilterCapableInterface {
diff --git a/src/Field/Capability/FilterCapableTrait.php b/src/Field/Capability/FilterCapableTrait.php
index 4b144ba1..bd2f306c 100644
--- a/src/Field/Capability/FilterCapableTrait.php
+++ b/src/Field/Capability/FilterCapableTrait.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Utils\Strings;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Utils\Strings;
/**
* Type-to-filter behaviour over a choice field's option rows.
@@ -15,7 +15,7 @@
* Backspace widens them again; the match strategy itself (substring, fuzzy)
* is the field's own.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
trait FilterCapableTrait {
@@ -40,7 +40,7 @@ public function filter(): string {
* @param string $needle
* The query.
*
- * @return list<\DrevOps\Tui\Block\Option>
+ * @return list<\DrevOps\PhpTui\Block\Option>
* The matching option rows.
*/
abstract protected function filterOptions(string $needle): array;
@@ -48,7 +48,7 @@ abstract protected function filterOptions(string $needle): array;
/**
* Handle a filter edit: Backspace deletes a character, a printable appends.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key to handle.
*
* @return bool
@@ -89,7 +89,7 @@ public function resetFilterCursor(): void {
* against the query, so filtering them again locally would drop rows whose
* labels do not literally match it.
*
- * @return list<\DrevOps\Tui\Block\Option>
+ * @return list<\DrevOps\PhpTui\Block\Option>
* The visible rows.
*/
public function visible(): array {
diff --git a/src/Field/Capability/OptionsCapableInterface.php b/src/Field/Capability/OptionsCapableInterface.php
index b325e4c7..24e5a9b0 100644
--- a/src/Field/Capability/OptionsCapableInterface.php
+++ b/src/Field/Capability/OptionsCapableInterface.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
-use DrevOps\Tui\Block\Option;
-use DrevOps\Tui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Block\Option;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* A field that presents a list of option rows.
@@ -14,14 +14,14 @@
* options share the list with the selectable ones; {@see OptionsCapableTrait}
* carries the default implementation.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
interface OptionsCapableInterface {
/**
* The rows the field currently shows.
*
- * @return list<\DrevOps\Tui\Block\Option>
+ * @return list<\DrevOps\PhpTui\Block\Option>
* The visible rows.
*/
public function visible(): array;
@@ -29,9 +29,9 @@ public function visible(): array;
/**
* Render one option row.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Option $option
+ * @param \DrevOps\PhpTui\Block\Option $option
* The option row.
* @param bool $current
* Whether the row holds the cursor.
diff --git a/src/Field/Capability/OptionsCapableTrait.php b/src/Field/Capability/OptionsCapableTrait.php
index 596515b6..b9ff6262 100644
--- a/src/Field/Capability/OptionsCapableTrait.php
+++ b/src/Field/Capability/OptionsCapableTrait.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
-use DrevOps\Tui\Block\Option;
-use DrevOps\Tui\Block\OptionType;
-use DrevOps\Tui\Screen\Viewport;
-use DrevOps\Tui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Block\Option;
+use DrevOps\PhpTui\Block\OptionType;
+use DrevOps\PhpTui\Screen\Viewport;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* Shared option-list behaviour for the choice fields.
@@ -17,21 +17,21 @@
* separators, headings and disabled options; where none is selectable it
* falls back to index 0. Non-selectable rows render as visual-only structure.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
trait OptionsCapableTrait {
/**
* The option rows in display order.
*
- * @var list<\DrevOps\Tui\Block\Option>
+ * @var list<\DrevOps\PhpTui\Block\Option>
*/
protected array $options = [];
/**
* Normalize and store the option rows.
*
- * @param array $options
+ * @param array $options
* A list of options or the value => label shorthand map.
*/
protected function initOptions(array $options): void {
@@ -41,7 +41,7 @@ protected function initOptions(array $options): void {
/**
* The index of the first selectable row, or 0 when none is selectable.
*
- * @param list<\DrevOps\Tui\Block\Option> $rows
+ * @param list<\DrevOps\PhpTui\Block\Option> $rows
* The rows to scan.
*
* @return int
@@ -60,7 +60,7 @@ protected function firstSelectable(array $rows): int {
/**
* The cursor for a default value: its selectable row, else the first one.
*
- * @param list<\DrevOps\Tui\Block\Option> $rows
+ * @param list<\DrevOps\PhpTui\Block\Option> $rows
* The rows to scan.
* @param string $default
* The default value to land on.
@@ -81,7 +81,7 @@ protected function cursorForDefault(array $rows, string $default): int {
/**
* Step the cursor to the next selectable row, skipping non-selectable rows.
*
- * @param list<\DrevOps\Tui\Block\Option> $rows
+ * @param list<\DrevOps\PhpTui\Block\Option> $rows
* The rows to move over.
* @param int $from
* The current cursor index.
@@ -108,7 +108,7 @@ protected function stepCursor(array $rows, int $from, int $dir): int {
/**
* The rows the field currently shows.
*
- * @return list<\DrevOps\Tui\Block\Option>
+ * @return list<\DrevOps\PhpTui\Block\Option>
* The visible rows.
*/
abstract public function visible(): array;
@@ -116,9 +116,9 @@ abstract public function visible(): array;
/**
* Render one option row.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Option $option
+ * @param \DrevOps\PhpTui\Block\Option $option
* The option row.
* @param bool $current
* Whether the row holds the cursor.
@@ -131,7 +131,7 @@ abstract public function renderOptionRow(ThemeInterface $theme, Option $option,
/**
* Render the visible rows as the field's paged option-list body.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
@@ -163,11 +163,11 @@ protected function currentDescription(): string {
* closure renders an option row (including its disabled state), receiving
* the option and its absolute index within the rows.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param list<\DrevOps\Tui\Block\Option> $rows
+ * @param list<\DrevOps\PhpTui\Block\Option> $rows
* The rows the field currently shows.
- * @param \DrevOps\Tui\Screen\Viewport $viewport
+ * @param \DrevOps\PhpTui\Screen\Viewport $viewport
* The paging window over the rows.
* @param \Closure $render
* Renders one option row: `fn (Option $option, int $index): string`.
@@ -200,9 +200,9 @@ protected function renderListRows(ThemeInterface $theme, array $rows, Viewport $
/**
* Render a group heading row.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Option $option
+ * @param \DrevOps\PhpTui\Block\Option $option
* The heading row.
*
* @return string
@@ -215,7 +215,7 @@ protected function renderHeadingRow(ThemeInterface $theme, Option $option): stri
/**
* Render a separator row.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
@@ -228,9 +228,9 @@ protected function renderSeparatorRow(ThemeInterface $theme): string {
/**
* Render a disabled option's label, appending its reason when present.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Option $option
+ * @param \DrevOps\PhpTui\Block\Option $option
* The disabled option row.
*
* @return string
diff --git a/src/Field/Capability/PagingCapableInterface.php b/src/Field/Capability/PagingCapableInterface.php
index 9c2c4733..31222c2e 100644
--- a/src/Field/Capability/PagingCapableInterface.php
+++ b/src/Field/Capability/PagingCapableInterface.php
@@ -2,14 +2,14 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
/**
* A field that windows a long list to a page that follows the cursor.
*
* {@see PagingCapableTrait} carries the default implementation.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
interface PagingCapableInterface {
diff --git a/src/Field/Capability/PagingCapableTrait.php b/src/Field/Capability/PagingCapableTrait.php
index 3f9f66ab..496acd3b 100644
--- a/src/Field/Capability/PagingCapableTrait.php
+++ b/src/Field/Capability/PagingCapableTrait.php
@@ -2,19 +2,19 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
-use DrevOps\Tui\Block\Element\FieldElementsInterface;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Screen\Scroller;
-use DrevOps\Tui\Screen\Viewport;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Block\Element\FieldElementsInterface;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Screen\Scroller;
+use DrevOps\PhpTui\Screen\Viewport;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Paging behaviour: window a long list to a page that follows the cursor.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
trait PagingCapableTrait {
@@ -55,7 +55,7 @@ public function pageSize(): int {
* @return int
* The effective page size.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When a declared page size is not positive.
*/
protected function resolvePageSize(?int $page_size): int {
@@ -76,7 +76,7 @@ protected function resolvePageSize(?int $page_size): int {
* @param int $cursor
* The cursor row index (a negative cursor pins the window to the top).
*
- * @return \DrevOps\Tui\Screen\Viewport
+ * @return \DrevOps\PhpTui\Screen\Viewport
* The window: its offset and whether rows are scrolled off above or below.
*/
protected function pageViewport(int $total, int $cursor): Viewport {
@@ -89,11 +89,11 @@ protected function pageViewport(int $total, int $cursor): Viewport {
/**
* Wrap rendered rows with the scroll indicators for a paging window.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
* @param list $rows
* The rendered visible rows.
- * @param \DrevOps\Tui\Screen\Viewport $viewport
+ * @param \DrevOps\PhpTui\Screen\Viewport $viewport
* The paging window.
*
* @return list
@@ -122,10 +122,10 @@ protected function wrapScrolled(ThemeInterface $theme, array $rows, Viewport $vi
* draws only what it owns. A theme that styles the two marks alike declares
* the style in both elements.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
- * @return \DrevOps\Tui\Block\Element\FieldElementsInterface
+ * @return \DrevOps\PhpTui\Block\Element\FieldElementsInterface
* The theme, able to draw the mark.
*
* @throws \InvalidArgumentException
diff --git a/src/Field/Capability/PlaceholderCapableInterface.php b/src/Field/Capability/PlaceholderCapableInterface.php
index 85b47606..12c1678f 100644
--- a/src/Field/Capability/PlaceholderCapableInterface.php
+++ b/src/Field/Capability/PlaceholderCapableInterface.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
/**
* Ghost text shown inside an editor while its input is empty.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
interface PlaceholderCapableInterface {
diff --git a/src/Field/Capability/PlaceholderCapableTrait.php b/src/Field/Capability/PlaceholderCapableTrait.php
index 68ce9049..1bd804e2 100644
--- a/src/Field/Capability/PlaceholderCapableTrait.php
+++ b/src/Field/Capability/PlaceholderCapableTrait.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Ghost text over an empty input, in the theme's ghost style.
@@ -14,7 +14,7 @@
* and never apply at once: a completion requires typed input, a placeholder
* requires none.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
trait PlaceholderCapableTrait {
@@ -53,7 +53,7 @@ protected function placeholderText(string $current): string {
/**
* The placeholder text for the current input, in the theme's ghost style.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme supplying the ghost styling.
* @param string $current
* The input the placeholder stands in for.
diff --git a/src/Field/Capability/QueryOptionsCapableInterface.php b/src/Field/Capability/QueryOptionsCapableInterface.php
index 8f1f1cfa..0ceb43bc 100644
--- a/src/Field/Capability/QueryOptionsCapableInterface.php
+++ b/src/Field/Capability/QueryOptionsCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
/**
* A field whose candidate list is resolved from its live query.
@@ -12,7 +12,7 @@
* block and repaint. The loop reads {@see pendingQuery()} for the query still
* needing resolution, calls the field's source, and passes the result back.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
interface QueryOptionsCapableInterface {
@@ -64,7 +64,7 @@ public function beginQuery(): void;
*
* @param string $query
* The query that was resolved.
- * @param list<\DrevOps\Tui\Block\Option> $rows
+ * @param list<\DrevOps\PhpTui\Block\Option> $rows
* The rows the source returned for it.
*/
public function applyQuery(string $query, array $rows): void;
diff --git a/src/Field/Capability/QueryOptionsCapableTrait.php b/src/Field/Capability/QueryOptionsCapableTrait.php
index b1ca5272..6ef27054 100644
--- a/src/Field/Capability/QueryOptionsCapableTrait.php
+++ b/src/Field/Capability/QueryOptionsCapableTrait.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
-use DrevOps\Tui\Utils\Strings;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
+use DrevOps\PhpTui\Utils\Strings;
/**
* Candidate rows resolved from the live query rather than filtered locally.
@@ -19,7 +19,7 @@
* The resolution itself belongs to the panel loop, which is the only place that
* may block and repaint.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
trait QueryOptionsCapableTrait {
@@ -61,7 +61,7 @@ trait QueryOptionsCapableTrait {
/**
* The rows resolved for each query so far, oldest first.
*
- * @var array>
+ * @var array>
*/
protected array $queryCache = [];
@@ -145,7 +145,7 @@ public function failQuery(string $query, string $message): void {
*
* @param string $query
* The query the rows were resolved for.
- * @param list<\DrevOps\Tui\Block\Option> $rows
+ * @param list<\DrevOps\PhpTui\Block\Option> $rows
* The rows to show.
*/
protected function settle(string $query, array $rows): void {
@@ -158,7 +158,7 @@ protected function settle(string $query, array $rows): void {
/**
* Adopt a resolved query's rows as the field's candidates.
*
- * @param list<\DrevOps\Tui\Block\Option> $rows
+ * @param list<\DrevOps\PhpTui\Block\Option> $rows
* The rows.
*/
abstract protected function adoptQueryRows(array $rows): void;
@@ -166,7 +166,7 @@ abstract protected function adoptQueryRows(array $rows): void;
/**
* The line shown in place of the candidate list, when one applies.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string|null
diff --git a/src/Field/Capability/RevealCapableInterface.php b/src/Field/Capability/RevealCapableInterface.php
index 8a88ef54..a9b69d91 100644
--- a/src/Field/Capability/RevealCapableInterface.php
+++ b/src/Field/Capability/RevealCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
/**
* A field that can toggle the display of concealed content.
@@ -10,7 +10,7 @@
* Revealing only changes what is drawn - a masked value, hidden entries -
* never the collected value itself.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
interface RevealCapableInterface {
diff --git a/src/Field/Capability/SearchCapableInterface.php b/src/Field/Capability/SearchCapableInterface.php
index 5a40fb05..442f4366 100644
--- a/src/Field/Capability/SearchCapableInterface.php
+++ b/src/Field/Capability/SearchCapableInterface.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
-use DrevOps\Tui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* A field that presents its query as a search: ranked rows, highlighted hits.
@@ -12,7 +12,7 @@
* {@see SearchCapableTrait} carries the default implementation for the choice
* fields.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
interface SearchCapableInterface {
@@ -30,7 +30,7 @@ public function matchPositions(string $label): array;
/**
* The query line: the typed query followed by the caret.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
diff --git a/src/Field/Capability/SearchCapableTrait.php b/src/Field/Capability/SearchCapableTrait.php
index 31dc0e99..3d3c2f91 100644
--- a/src/Field/Capability/SearchCapableTrait.php
+++ b/src/Field/Capability/SearchCapableTrait.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
-use DrevOps\Tui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* Fuzzy-search presentation over a filtered choice field.
@@ -12,7 +12,7 @@
* Ranks the filtered rows by fuzzy relevance, highlights the matched
* characters, and draws the typed query as a search line.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
trait SearchCapableTrait {
@@ -22,7 +22,7 @@ trait SearchCapableTrait {
* @param string $needle
* The query.
*
- * @return list<\DrevOps\Tui\Block\Option>
+ * @return list<\DrevOps\PhpTui\Block\Option>
* The matching option rows, most relevant first.
*/
protected function filterOptions(string $needle): array {
@@ -45,7 +45,7 @@ public function matchPositions(string $label): array {
/**
* The query line: the typed filter followed by the caret.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
diff --git a/src/Field/Capability/SelectionBoundedTrait.php b/src/Field/Capability/SelectionBoundedTrait.php
index c5ed0df0..9b98955c 100644
--- a/src/Field/Capability/SelectionBoundedTrait.php
+++ b/src/Field/Capability/SelectionBoundedTrait.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
-use DrevOps\Tui\Block\SelectionBounds;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Block\SelectionBounds;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Presents a multi-value field's declared selection-count bounds.
@@ -15,7 +15,7 @@
* reached. Rejecting a count outside the bounds belongs to the block holding
* the answer, which measures every offered value once.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
trait SelectionBoundedTrait {
@@ -31,7 +31,7 @@ trait SelectionBoundedTrait {
* rejection message match. While an error shows, the hint is suppressed, so
* the two lines never stack.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
diff --git a/src/Field/Capability/SelectionCapableInterface.php b/src/Field/Capability/SelectionCapableInterface.php
index 277cdb97..93168e22 100644
--- a/src/Field/Capability/SelectionCapableInterface.php
+++ b/src/Field/Capability/SelectionCapableInterface.php
@@ -2,14 +2,14 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
/**
* A field whose cursor picks exactly one option as its value.
*
* {@see SelectionCapableTrait} carries the default implementation.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
interface SelectionCapableInterface {
diff --git a/src/Field/Capability/SelectionCapableTrait.php b/src/Field/Capability/SelectionCapableTrait.php
index d746132c..5d79387e 100644
--- a/src/Field/Capability/SelectionCapableTrait.php
+++ b/src/Field/Capability/SelectionCapableTrait.php
@@ -2,16 +2,16 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\Option;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\Option;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* Choice behaviour over the option rows, single-value or multiple-value.
@@ -22,7 +22,7 @@
* toggles the highlighted option, Left/Right deselect or select every visible
* option - and commits the selected values in display order.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
trait SelectionCapableTrait {
@@ -46,7 +46,7 @@ trait SelectionCapableTrait {
/**
* The field type this field binds its keys under.
*
- * @return \DrevOps\Tui\Block\FieldType
+ * @return \DrevOps\PhpTui\Block\FieldType
* The choice field type.
*/
abstract protected function choiceType(): FieldType;
@@ -65,7 +65,7 @@ abstract protected function matchPositions(string $label): array;
/**
* Seed the option rows and the cursor, and the selection set when multiple.
*
- * @param array $options
+ * @param array $options
* Option rows in display order - a list of options or the value => label
* shorthand map.
* @param string|list $default
@@ -124,7 +124,7 @@ public function handle(Key $key): void {
* single-choice field overrides this to route typed characters to the
* filter.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key to handle.
*/
protected function handleSingleMode(Key $key): void {
@@ -134,7 +134,7 @@ protected function handleSingleMode(Key $key): void {
/**
* Handle cancel, cursor movement and acceptance of the highlighted option.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key to handle.
*/
protected function handleSingleChoiceKey(Key $key): void {
@@ -164,7 +164,7 @@ protected function handleSingleChoiceKey(Key $key): void {
/**
* Handle cancel, acceptance, cursor movement and selection toggles.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key to handle.
*
* @return bool
@@ -304,9 +304,9 @@ protected function liveValue(): mixed {
/**
* Render one option row: a radio (single) or marker and checkbox (multiple).
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Option $option
+ * @param \DrevOps\PhpTui\Block\Option $option
* The option row.
* @param bool $current
* Whether the row holds the cursor.
diff --git a/src/Field/Capability/StepCapableInterface.php b/src/Field/Capability/StepCapableInterface.php
index 35bef76f..4917bc25 100644
--- a/src/Field/Capability/StepCapableInterface.php
+++ b/src/Field/Capability/StepCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
/**
* A field whose value advances through an ordered (or cyclic) domain.
@@ -10,7 +10,7 @@
* The domain is the field's own: bounded integers step by the declared step,
* a date cursor steps by days, a fixed value set cycles.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
interface StepCapableInterface {
diff --git a/src/Field/Capability/TextEditCapableInterface.php b/src/Field/Capability/TextEditCapableInterface.php
index f91dd309..61d19cfb 100644
--- a/src/Field/Capability/TextEditCapableInterface.php
+++ b/src/Field/Capability/TextEditCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
/**
* A field that edits a character buffer.
@@ -10,7 +10,7 @@
* {@see TextEditCapableTrait} carries the default cursor-based implementation;
* an append-only field may implement the methods directly.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
interface TextEditCapableInterface {
diff --git a/src/Field/Capability/TextEditCapableTrait.php b/src/Field/Capability/TextEditCapableTrait.php
index 3bb4d760..d7f0da57 100644
--- a/src/Field/Capability/TextEditCapableTrait.php
+++ b/src/Field/Capability/TextEditCapableTrait.php
@@ -2,13 +2,13 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field\Capability;
+namespace DrevOps\PhpTui\Field\Capability;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Utils\Strings;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Utils\Strings;
/**
* Character-buffer editing: a movable cursor, insertion and deletion.
@@ -16,7 +16,7 @@
* All arithmetic is by character, not byte, so multibyte input edits and
* renders correctly.
*
- * @package DrevOps\Tui\Field\Capability
+ * @package DrevOps\PhpTui\Field\Capability
*/
trait TextEditCapableTrait {
@@ -54,7 +54,7 @@ public function buffer(): string {
/**
* Handle a buffer edit: deletion, cursor movement, insertion.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key to handle.
*
* @return bool
@@ -144,7 +144,7 @@ protected function caretSegments(): array {
/**
* Render the buffer split by the caret at the cursor position.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme supplying the caret glyph.
*
* @return string
@@ -163,7 +163,7 @@ protected function renderCaretLine(ThemeInterface $theme): string {
* The flat style is the plain caret line; the boxed and underline styles fill
* or underline the field behind the value.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme composing the input.
* @param string $ghost
* The inline ghost-text completion suffix, or an empty string.
diff --git a/src/Field/Confirm.php b/src/Field/Confirm.php
index fa2a0ede..2fb7f7cf 100644
--- a/src/Field/Confirm.php
+++ b/src/Field/Confirm.php
@@ -2,21 +2,21 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
+namespace DrevOps\PhpTui\Field;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Field\Capability\StepCapableInterface;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Field\Capability\StepCapableInterface;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* A yes/no toggle.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Confirm extends AbstractField implements StepCapableInterface {
diff --git a/src/Field/FieldFactory.php b/src/Field/FieldFactory.php
index 544ad6a3..2fe6fc47 100644
--- a/src/Field/FieldFactory.php
+++ b/src/Field/FieldFactory.php
@@ -2,19 +2,19 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
-
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\NumberBounds;
-use DrevOps\Tui\Block\Option;
-use DrevOps\Tui\Block\Template as TemplateModel;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableInterface;
-use DrevOps\Tui\Field\Capability\QueryOptionsCapableInterface;
-use DrevOps\Tui\Input\KeyMap;
-use DrevOps\Tui\Input\KeyMapManager;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Translation\Translator;
+namespace DrevOps\PhpTui\Field;
+
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\NumberBounds;
+use DrevOps\PhpTui\Block\Option;
+use DrevOps\PhpTui\Block\Template as TemplateModel;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableInterface;
+use DrevOps\PhpTui\Field\Capability\QueryOptionsCapableInterface;
+use DrevOps\PhpTui\Input\KeyMap;
+use DrevOps\PhpTui\Input\KeyMapManager;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Builds the interactive field for a block, seeded with the value it holds.
@@ -22,7 +22,7 @@
* The block's field type selects the field class. A built field does not
* validate: an offered value is validated where the answer is held.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class FieldFactory {
@@ -34,7 +34,7 @@ class FieldFactory {
/**
* Construct a field factory.
*
- * @param \DrevOps\Tui\Input\KeyMap|null $key_map
+ * @param \DrevOps\PhpTui\Input\KeyMap|null $key_map
* The resolved key bindings; NULL uses the default preset.
* @param bool $externalEditorAvailable
* Whether an external editor is launchable here. A textarea field opts in
@@ -47,14 +47,14 @@ public function __construct(?KeyMap $key_map = NULL, protected bool $externalEdi
/**
* Build the interactive field for a block, seeded with the value it holds.
*
- * @param \DrevOps\Tui\Block\Field $block
+ * @param \DrevOps\PhpTui\Block\Field $block
* The block being opened.
* @param mixed $current
* The current value to seed the field with.
* @param array $answers
* The answers collected so far, passed to a text completion closure.
*
- * @return \DrevOps\Tui\Field\FieldInterface
+ * @return \DrevOps\PhpTui\Field\FieldInterface
* The field.
*
* @throws \LogicException
@@ -95,7 +95,7 @@ public function open(Field $block, mixed $current = NULL, array $answers = []):
/**
* The field seed value for a block: a scalar, or a list when multiple.
*
- * @param \DrevOps\Tui\Block\Field $block
+ * @param \DrevOps\PhpTui\Block\Field $block
* The block.
* @param mixed $current
* The current value to seed the field with.
@@ -111,12 +111,12 @@ protected function seed(Field $block, mixed $current): string|array {
/**
* Build a rating field over a block's scale, seeded with its value.
*
- * @param \DrevOps\Tui\Block\Field $block
+ * @param \DrevOps\PhpTui\Block\Field $block
* The block.
* @param mixed $current
* The current value to seed the field with.
*
- * @return \DrevOps\Tui\Field\Rating
+ * @return \DrevOps\PhpTui\Field\Rating
* The field.
*/
protected function rating(Field $block, mixed $current): Rating {
@@ -134,10 +134,10 @@ protected function rating(Field $block, mixed $current): Rating {
/**
* The template a block's template field fills in.
*
- * @param \DrevOps\Tui\Block\Field $block
+ * @param \DrevOps\PhpTui\Block\Field $block
* The block.
*
- * @return \DrevOps\Tui\Block\Template
+ * @return \DrevOps\PhpTui\Block\Template
* The template.
*/
protected function template(Field $block): TemplateModel {
@@ -153,7 +153,7 @@ protected function template(Field $block): TemplateModel {
/**
* Resolve a block's completion source to a concrete candidate list.
*
- * @param \DrevOps\Tui\Block\Field $block
+ * @param \DrevOps\PhpTui\Block\Field $block
* The block.
* @param array $answers
* The answers collected so far.
@@ -213,7 +213,7 @@ protected function localized(array $captions): array {
/**
* The selectable value => label map for a set of options.
*
- * @param list<\DrevOps\Tui\Block\Option> $options
+ * @param list<\DrevOps\PhpTui\Block\Option> $options
* The localized options.
*
* @return array
@@ -238,10 +238,10 @@ protected function optionLabels(array $options): array {
* field searches identical to the list it shows, so a match runs against the
* same text the user reads.
*
- * @param list<\DrevOps\Tui\Block\Option> $options
+ * @param list<\DrevOps\PhpTui\Block\Option> $options
* The options in display order.
*
- * @return list<\DrevOps\Tui\Block\Option>
+ * @return list<\DrevOps\PhpTui\Block\Option>
* The options in display order, localized to the active language.
*/
protected function translate(array $options): array {
@@ -261,7 +261,7 @@ protected function translate(array $options): array {
* For the value-based suggest field, which carries no option rows: the
* localized per-option description keyed by its value.
*
- * @param list<\DrevOps\Tui\Block\Option> $options
+ * @param list<\DrevOps\PhpTui\Block\Option> $options
* The localized options.
*
* @return array
diff --git a/src/Field/FieldInterface.php b/src/Field/FieldInterface.php
index 5f1bbc3e..28a785bc 100644
--- a/src/Field/FieldInterface.php
+++ b/src/Field/FieldInterface.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
+namespace DrevOps\PhpTui\Field;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\ScopedKeyMap;
-use DrevOps\Tui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\ScopedKeyMap;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* A single interactive field collector driven one key at a time.
@@ -15,14 +15,14 @@
* Measuring an offered value belongs to whatever holds the answer, so nothing
* here refuses one.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
interface FieldInterface {
/**
* Process one key press, mutating the field state.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key to process.
*/
public function handle(Key $key): void;
@@ -30,7 +30,7 @@ public function handle(Key $key): void;
/**
* Give the field the resolved bindings for its scope.
*
- * @param \DrevOps\Tui\Input\ScopedKeyMap $keys
+ * @param \DrevOps\PhpTui\Input\ScopedKeyMap $keys
* The scoped key bindings.
*
* @return static
@@ -82,7 +82,7 @@ public function refused(string $reason): static;
/**
* A rendering of the current state, using the theme's glyphs.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme supplying Unicode or ASCII glyphs.
*
* @return string
@@ -97,7 +97,7 @@ public function view(ThemeInterface $theme): string;
* the footer renders them against the field's bindings. This is the field's
* own contribution to the contextual help footer.
*
- * @return list<\DrevOps\Tui\Input\Hint>
+ * @return list<\DrevOps\PhpTui\Input\Hint>
* The ordered hint fragments.
*/
public function hints(): array;
@@ -109,7 +109,7 @@ public function hints(): array;
* that illustrates it, so the two can never disagree about which keys are
* live.
*
- * @return \DrevOps\Tui\Input\ScopedKeyMap
+ * @return \DrevOps\PhpTui\Input\ScopedKeyMap
* The scoped bindings.
*/
public function keys(): ScopedKeyMap;
diff --git a/src/Field/FilePicker.php b/src/Field/FilePicker.php
index f226ef98..74311a51 100644
--- a/src/Field/FilePicker.php
+++ b/src/Field/FilePicker.php
@@ -2,26 +2,26 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
-
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\FilePickerConstraints;
-use DrevOps\Tui\Block\FilePickerMode;
-use DrevOps\Tui\Block\SelectionBounds;
-use DrevOps\Tui\Field\Capability\FilterCapableInterface;
-use DrevOps\Tui\Field\Capability\PagingCapableInterface;
-use DrevOps\Tui\Field\Capability\PagingCapableTrait;
-use DrevOps\Tui\Field\Capability\RevealCapableInterface;
-use DrevOps\Tui\Field\Capability\SelectionBoundedTrait;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
-use DrevOps\Tui\Utils\Strings;
+namespace DrevOps\PhpTui\Field;
+
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\FilePickerConstraints;
+use DrevOps\PhpTui\Block\FilePickerMode;
+use DrevOps\PhpTui\Block\SelectionBounds;
+use DrevOps\PhpTui\Field\Capability\FilterCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PagingCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PagingCapableTrait;
+use DrevOps\PhpTui\Field\Capability\RevealCapableInterface;
+use DrevOps\PhpTui\Field\Capability\SelectionBoundedTrait;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
+use DrevOps\PhpTui\Utils\Strings;
/**
* A filesystem browser that selects a path, or several in multiple mode.
@@ -40,7 +40,7 @@
* against the final value by the block holding the answer, so an oversized
* file can still be picked here.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class FilePicker extends AbstractField implements FilterCapableInterface, RevealCapableInterface, PagingCapableInterface {
@@ -89,7 +89,7 @@ class FilePicker extends AbstractField implements FilterCapableInterface, Reveal
* The pre-selected path (single) or paths (multiple). A single path opens
* the browser at its directory with the entry highlighted; in multiple mode
* every path seeds the selection.
- * @param \DrevOps\Tui\Block\FilePickerConstraints|null $constraints
+ * @param \DrevOps\PhpTui\Block\FilePickerConstraints|null $constraints
* The type, extension and size limits on a valid pick; NULL leaves the
* picker unconstrained.
* @param bool $showHidden
@@ -99,7 +99,7 @@ class FilePicker extends AbstractField implements FilterCapableInterface, Reveal
* @param int|null $page_size
* The number of entry rows shown at once before the list pages; NULL uses
* the default.
- * @param \DrevOps\Tui\Block\SelectionBounds|null $selection_bounds
+ * @param \DrevOps\PhpTui\Block\SelectionBounds|null $selection_bounds
* The minimum/maximum selection counts enforced on accept, or NULL for no
* count limit.
*/
@@ -256,7 +256,7 @@ protected function renderBody(ThemeInterface $theme): string {
* so they are visible before a pick violates them. While an error is
* showing the line is suppressed, so the hint and the error never stack.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
@@ -588,7 +588,7 @@ protected function isDir(string $name): bool {
/**
* Render a single entry row.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
* @param string $name
* The entry name.
@@ -616,7 +616,7 @@ protected function renderRow(ThemeInterface $theme, string $name, bool $current)
/**
* A spacer the width of a checkbox, for options that cannot be selected.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
*
* @return string
diff --git a/src/Field/MatchResult.php b/src/Field/MatchResult.php
index ccb55fa8..43bba568 100644
--- a/src/Field/MatchResult.php
+++ b/src/Field/MatchResult.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
+namespace DrevOps\PhpTui\Field;
/**
* The outcome of matching a query against a candidate label.
@@ -10,7 +10,7 @@
* Carries the relevance score used to rank a candidate against its peers and
* the label character indices the query matched, used to highlight them.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
final readonly class MatchResult {
diff --git a/src/Field/MatchTier.php b/src/Field/MatchTier.php
index c1ca45b5..097b8bb3 100644
--- a/src/Field/MatchTier.php
+++ b/src/Field/MatchTier.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
+namespace DrevOps\PhpTui\Field;
/**
* How closely a candidate matches a query, coarsest band first.
@@ -10,7 +10,7 @@
* A tighter tier always outranks a looser one regardless of the finer
* within-tier refinement, so the tier's weight dominates the match score.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
enum MatchTier {
diff --git a/src/Field/Matcher.php b/src/Field/Matcher.php
index ec79baae..e50ef811 100644
--- a/src/Field/Matcher.php
+++ b/src/Field/Matcher.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
+namespace DrevOps\PhpTui\Field;
-use DrevOps\Tui\Block\Option;
-use DrevOps\Tui\Block\OptionType;
-use DrevOps\Tui\Utils\Strings;
+use DrevOps\PhpTui\Block\Option;
+use DrevOps\PhpTui\Block\OptionType;
+use DrevOps\PhpTui\Utils\Strings;
/**
* Ranks candidates against a query by fuzzy (subsequence) relevance.
@@ -21,7 +21,7 @@
*
* The matcher is stateless: one instance serves every candidate and query.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
final class Matcher {
@@ -38,7 +38,7 @@ final class Matcher {
* @param string $needle
* The query.
*
- * @return \DrevOps\Tui\Field\MatchResult|null
+ * @return \DrevOps\PhpTui\Field\MatchResult|null
* The result, or NULL when the query is not a subsequence of the candidate.
* An empty query matches everything with a zero score and no positions.
*/
@@ -130,12 +130,12 @@ public function rankValues(array $values, string $needle): array {
* carry no label and drop away, so the filtered result reads as a flat
* relevance list.
*
- * @param list<\DrevOps\Tui\Block\Option> $options
+ * @param list<\DrevOps\PhpTui\Block\Option> $options
* The option rows.
* @param string $needle
* The query.
*
- * @return list<\DrevOps\Tui\Block\Option>
+ * @return list<\DrevOps\PhpTui\Block\Option>
* The matching options, most relevant first; ties keep their input order.
*/
public function rankOptions(array $options, string $needle): array {
@@ -192,7 +192,7 @@ protected function rank(array $items, \Closure $text, string $needle): array {
* @param string $needle
* The case-folded query.
*
- * @return \DrevOps\Tui\Field\MatchTier
+ * @return \DrevOps\PhpTui\Field\MatchTier
* The tier.
*/
protected function tier(string $haystack, string $needle): MatchTier {
diff --git a/src/Field/Number.php b/src/Field/Number.php
index 7b60be87..c51f67a4 100644
--- a/src/Field/Number.php
+++ b/src/Field/Number.php
@@ -2,21 +2,21 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
-
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\NumberBounds;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableInterface;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableTrait;
-use DrevOps\Tui\Field\Capability\StepCapableInterface;
-use DrevOps\Tui\Field\Capability\TextEditCapableInterface;
-use DrevOps\Tui\Field\Capability\TextEditCapableTrait;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Utils\Strings;
+namespace DrevOps\PhpTui\Field;
+
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\NumberBounds;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableTrait;
+use DrevOps\PhpTui\Field\Capability\StepCapableInterface;
+use DrevOps\PhpTui\Field\Capability\TextEditCapableInterface;
+use DrevOps\PhpTui\Field\Capability\TextEditCapableTrait;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Utils\Strings;
/**
* Integer input: digits with an optional leading minus, accepted as an int.
@@ -26,7 +26,7 @@
* keys inert. The bounds move the value here and never refuse one: what the
* answer must be is measured where the answer is held.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Number extends AbstractField implements TextEditCapableInterface, StepCapableInterface, PlaceholderCapableInterface {
@@ -40,7 +40,7 @@ class Number extends AbstractField implements TextEditCapableInterface, StepCapa
*
* @param string $default
* The initial value (and live input buffer).
- * @param \DrevOps\Tui\Block\NumberBounds|null $bounds
+ * @param \DrevOps\PhpTui\Block\NumberBounds|null $bounds
* Optional bounds and step; NULL for a plain integer entry.
*/
public function __construct(string $default = '', protected ?NumberBounds $bounds = NULL) {
diff --git a/src/Field/Password.php b/src/Field/Password.php
index 5645e612..6bcd9201 100644
--- a/src/Field/Password.php
+++ b/src/Field/Password.php
@@ -2,21 +2,21 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
-
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableInterface;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableTrait;
-use DrevOps\Tui\Field\Capability\RevealCapableInterface;
-use DrevOps\Tui\Field\Capability\TextEditCapableInterface;
-use DrevOps\Tui\Field\Capability\TextEditCapableTrait;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
-use DrevOps\Tui\Utils\Strings;
+namespace DrevOps\PhpTui\Field;
+
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableTrait;
+use DrevOps\PhpTui\Field\Capability\RevealCapableInterface;
+use DrevOps\PhpTui\Field\Capability\TextEditCapableInterface;
+use DrevOps\PhpTui\Field\Capability\TextEditCapableTrait;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
+use DrevOps\PhpTui\Utils\Strings;
/**
* Single-line text input rendered masked; the accepted value stays plain.
@@ -26,7 +26,7 @@
* value; and a confirmation mode that prompts for the value a second time and
* rejects a mismatch before accepting.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Password extends AbstractField implements TextEditCapableInterface, RevealCapableInterface, PlaceholderCapableInterface {
@@ -171,7 +171,7 @@ public function hints(): array {
/**
* Render the input line for the current display mode.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme supplying the mask and caret glyphs.
*
* @return string
diff --git a/src/Field/PasswordDisplay.php b/src/Field/PasswordDisplay.php
index 775e4550..759b6c6e 100644
--- a/src/Field/PasswordDisplay.php
+++ b/src/Field/PasswordDisplay.php
@@ -2,14 +2,14 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
+namespace DrevOps\PhpTui\Field;
/**
* How a password field renders its buffer while editing.
*
* The stored value is never affected; this only controls the live view.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
enum PasswordDisplay {
diff --git a/src/Field/Pause.php b/src/Field/Pause.php
index befa70bd..eaf8f9b4 100644
--- a/src/Field/Pause.php
+++ b/src/Field/Pause.php
@@ -2,21 +2,21 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
+namespace DrevOps\PhpTui\Field;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* An acknowledgement gate: Enter (or Space) accepts TRUE.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Pause extends AbstractField {
diff --git a/src/Field/Rating.php b/src/Field/Rating.php
index dd5b67fa..96e2293b 100644
--- a/src/Field/Rating.php
+++ b/src/Field/Rating.php
@@ -2,15 +2,15 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
+namespace DrevOps\PhpTui\Field;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Field\Capability\StepCapableInterface;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Field\Capability\StepCapableInterface;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* A graded answer: a point chosen from a scale, accepted as an int.
@@ -18,7 +18,7 @@
* The arrows step one point at a time and stop at either end; the ends do
* not wrap. A typed digit selects its point when the scale includes it.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Rating extends AbstractField implements StepCapableInterface {
diff --git a/src/Field/Reorder.php b/src/Field/Reorder.php
index 2e47f9f9..e1e7c043 100644
--- a/src/Field/Reorder.php
+++ b/src/Field/Reorder.php
@@ -2,20 +2,20 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
-
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\Option;
-use DrevOps\Tui\Field\Capability\OptionsCapableInterface;
-use DrevOps\Tui\Field\Capability\PagingCapableInterface;
-use DrevOps\Tui\Field\Capability\PagingCapableTrait;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Theme\ThemeInterface;
+namespace DrevOps\PhpTui\Field;
+
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\Option;
+use DrevOps\PhpTui\Field\Capability\OptionsCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PagingCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PagingCapableTrait;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* A ranking list: pick up the highlighted item and move it to reorder.
@@ -25,7 +25,7 @@
* drops it. The field returns every item in its final order - a permutation
* of the options, never a subset.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Reorder extends AbstractField implements OptionsCapableInterface, PagingCapableInterface {
@@ -34,7 +34,7 @@ class Reorder extends AbstractField implements OptionsCapableInterface, PagingCa
/**
* The items in their current arrangement.
*
- * @var list<\DrevOps\Tui\Block\Option>
+ * @var list<\DrevOps\PhpTui\Block\Option>
*/
protected array $items;
@@ -51,7 +51,7 @@ class Reorder extends AbstractField implements OptionsCapableInterface, PagingCa
/**
* Construct a reorder field.
*
- * @param array $options
+ * @param array $options
* The items to rank, in display order - a list of options or the
* value => label shorthand map.
* @param list $default
@@ -153,7 +153,7 @@ protected function liveValue(): mixed {
/**
* The rows currently shown: the full arrangement, in its current order.
*
- * @return list<\DrevOps\Tui\Block\Option>
+ * @return list<\DrevOps\PhpTui\Block\Option>
* The visible rows.
*/
public function visible(): array {
@@ -196,9 +196,9 @@ protected function currentDescription(): string {
/**
* Render one row: the marker cell and the (possibly held) item's label.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
- * @param \DrevOps\Tui\Block\Option $option
+ * @param \DrevOps\PhpTui\Block\Option $option
* The item row.
* @param bool $current
* Whether the row holds the cursor.
@@ -216,7 +216,7 @@ public function renderOptionRow(ThemeInterface $theme, Option $option, bool $cur
* A held item shows the up-down glyphs, the plain cursor shows the marker,
* and every other row is blank - all two columns wide so the labels align.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme.
* @param bool $current
* Whether the row holds the cursor.
diff --git a/src/Field/Search.php b/src/Field/Search.php
index 589c8646..96c22370 100644
--- a/src/Field/Search.php
+++ b/src/Field/Search.php
@@ -2,28 +2,28 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
-
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\SelectionBounds;
-use DrevOps\Tui\Field\Capability\FilterCapableInterface;
-use DrevOps\Tui\Field\Capability\FilterCapableTrait;
-use DrevOps\Tui\Field\Capability\OptionsCapableInterface;
-use DrevOps\Tui\Field\Capability\OptionsCapableTrait;
-use DrevOps\Tui\Field\Capability\PagingCapableInterface;
-use DrevOps\Tui\Field\Capability\PagingCapableTrait;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableInterface;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableTrait;
-use DrevOps\Tui\Field\Capability\QueryOptionsCapableInterface;
-use DrevOps\Tui\Field\Capability\QueryOptionsCapableTrait;
-use DrevOps\Tui\Field\Capability\SearchCapableInterface;
-use DrevOps\Tui\Field\Capability\SearchCapableTrait;
-use DrevOps\Tui\Field\Capability\SelectionBoundedTrait;
-use DrevOps\Tui\Field\Capability\SelectionCapableInterface;
-use DrevOps\Tui\Field\Capability\SelectionCapableTrait;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Theme\ThemeInterface;
+namespace DrevOps\PhpTui\Field;
+
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\SelectionBounds;
+use DrevOps\PhpTui\Field\Capability\FilterCapableInterface;
+use DrevOps\PhpTui\Field\Capability\FilterCapableTrait;
+use DrevOps\PhpTui\Field\Capability\OptionsCapableInterface;
+use DrevOps\PhpTui\Field\Capability\OptionsCapableTrait;
+use DrevOps\PhpTui\Field\Capability\PagingCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PagingCapableTrait;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableTrait;
+use DrevOps\PhpTui\Field\Capability\QueryOptionsCapableInterface;
+use DrevOps\PhpTui\Field\Capability\QueryOptionsCapableTrait;
+use DrevOps\PhpTui\Field\Capability\SearchCapableInterface;
+use DrevOps\PhpTui\Field\Capability\SearchCapableTrait;
+use DrevOps\PhpTui\Field\Capability\SelectionBoundedTrait;
+use DrevOps\PhpTui\Field\Capability\SelectionCapableInterface;
+use DrevOps\PhpTui\Field\Capability\SelectionCapableTrait;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* A fuzzy type-to-filter choice list under a query line.
@@ -32,7 +32,7 @@
* characters narrow the list, ranked by fuzzy relevance, and the matched
* characters are highlighted.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Search extends AbstractField implements
OptionsCapableInterface,
@@ -57,7 +57,7 @@ class Search extends AbstractField implements
/**
* Construct a search field.
*
- * @param array $options
+ * @param array $options
* Option rows in display order - a list of options or the value => label
* shorthand map.
* @param string|list $default
@@ -67,7 +67,7 @@ class Search extends AbstractField implements
* @param int|null $page_size
* The number of option rows shown at once before the list pages; NULL uses
* the default.
- * @param \DrevOps\Tui\Block\SelectionBounds|null $selection_bounds
+ * @param \DrevOps\PhpTui\Block\SelectionBounds|null $selection_bounds
* The minimum/maximum selection counts enforced on accept, or NULL for no
* count limit.
*/
@@ -80,7 +80,7 @@ public function __construct(array $options, string|array $default = '', bool $mu
/**
* The field type this field binds its keys under.
*
- * @return \DrevOps\Tui\Block\FieldType
+ * @return \DrevOps\PhpTui\Block\FieldType
* The search field type.
*/
protected function choiceType(): FieldType {
diff --git a/src/Field/Select.php b/src/Field/Select.php
index 1ae67e88..e6f6f8ee 100644
--- a/src/Field/Select.php
+++ b/src/Field/Select.php
@@ -2,23 +2,23 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
+namespace DrevOps\PhpTui\Field;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\Option;
-use DrevOps\Tui\Block\OptionType;
-use DrevOps\Tui\Block\SelectionBounds;
-use DrevOps\Tui\Field\Capability\FilterCapableInterface;
-use DrevOps\Tui\Field\Capability\FilterCapableTrait;
-use DrevOps\Tui\Field\Capability\OptionsCapableInterface;
-use DrevOps\Tui\Field\Capability\OptionsCapableTrait;
-use DrevOps\Tui\Field\Capability\PagingCapableInterface;
-use DrevOps\Tui\Field\Capability\PagingCapableTrait;
-use DrevOps\Tui\Field\Capability\SelectionBoundedTrait;
-use DrevOps\Tui\Field\Capability\SelectionCapableInterface;
-use DrevOps\Tui\Field\Capability\SelectionCapableTrait;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Utils\Strings;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\Option;
+use DrevOps\PhpTui\Block\OptionType;
+use DrevOps\PhpTui\Block\SelectionBounds;
+use DrevOps\PhpTui\Field\Capability\FilterCapableInterface;
+use DrevOps\PhpTui\Field\Capability\FilterCapableTrait;
+use DrevOps\PhpTui\Field\Capability\OptionsCapableInterface;
+use DrevOps\PhpTui\Field\Capability\OptionsCapableTrait;
+use DrevOps\PhpTui\Field\Capability\PagingCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PagingCapableTrait;
+use DrevOps\PhpTui\Field\Capability\SelectionBoundedTrait;
+use DrevOps\PhpTui\Field\Capability\SelectionCapableInterface;
+use DrevOps\PhpTui\Field\Capability\SelectionCapableTrait;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Utils\Strings;
/**
* A single-choice or multiple-choice list of options.
@@ -26,7 +26,7 @@
* A single-choice radio list, or a multiple-choice checkbox list with
* type-to-filter and select-all/none.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Select extends AbstractField implements OptionsCapableInterface, SelectionCapableInterface, FilterCapableInterface, PagingCapableInterface {
@@ -39,7 +39,7 @@ class Select extends AbstractField implements OptionsCapableInterface, Selection
/**
* Construct a select field.
*
- * @param array $options
+ * @param array $options
* Option rows in display order - a list of options or the value => label
* shorthand map.
* @param string|list $default
@@ -49,7 +49,7 @@ class Select extends AbstractField implements OptionsCapableInterface, Selection
* @param int|null $page_size
* The number of option rows shown at once before the list pages; NULL uses
* the default.
- * @param \DrevOps\Tui\Block\SelectionBounds|null $selection_bounds
+ * @param \DrevOps\PhpTui\Block\SelectionBounds|null $selection_bounds
* The minimum/maximum selection counts enforced on accept, or NULL for no
* count limit.
*/
@@ -62,7 +62,7 @@ public function __construct(array $options, string|array $default = '', bool $mu
/**
* The field type this field binds its keys under.
*
- * @return \DrevOps\Tui\Block\FieldType
+ * @return \DrevOps\PhpTui\Block\FieldType
* The select field type.
*/
protected function choiceType(): FieldType {
@@ -75,7 +75,7 @@ protected function choiceType(): FieldType {
* @param string $needle
* The query.
*
- * @return list<\DrevOps\Tui\Block\Option>
+ * @return list<\DrevOps\PhpTui\Block\Option>
* The matching option rows.
*/
protected function filterOptions(string $needle): array {
diff --git a/src/Field/Suggest.php b/src/Field/Suggest.php
index 325aa796..0fd88c92 100644
--- a/src/Field/Suggest.php
+++ b/src/Field/Suggest.php
@@ -2,26 +2,26 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
-
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\Option;
-use DrevOps\Tui\Field\Capability\CompletionCapableInterface;
-use DrevOps\Tui\Field\Capability\CompletionCapableTrait;
-use DrevOps\Tui\Field\Capability\PagingCapableInterface;
-use DrevOps\Tui\Field\Capability\PagingCapableTrait;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableInterface;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableTrait;
-use DrevOps\Tui\Field\Capability\QueryOptionsCapableInterface;
-use DrevOps\Tui\Field\Capability\QueryOptionsCapableTrait;
-use DrevOps\Tui\Field\Capability\SearchCapableInterface;
-use DrevOps\Tui\Field\Capability\TextEditCapableInterface;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Utils\Strings;
+namespace DrevOps\PhpTui\Field;
+
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\Option;
+use DrevOps\PhpTui\Field\Capability\CompletionCapableInterface;
+use DrevOps\PhpTui\Field\Capability\CompletionCapableTrait;
+use DrevOps\PhpTui\Field\Capability\PagingCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PagingCapableTrait;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableTrait;
+use DrevOps\PhpTui\Field\Capability\QueryOptionsCapableInterface;
+use DrevOps\PhpTui\Field\Capability\QueryOptionsCapableTrait;
+use DrevOps\PhpTui\Field\Capability\SearchCapableInterface;
+use DrevOps\PhpTui\Field\Capability\TextEditCapableInterface;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Utils\Strings;
/**
* An autocomplete text input over a set of candidate values.
@@ -30,7 +30,7 @@
* the values as its queries settle, and those arrive already answering the
* buffer, so they are shown in the order given.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Suggest extends AbstractField implements
SearchCapableInterface,
diff --git a/src/Field/Template.php b/src/Field/Template.php
index 63520f55..41314e01 100644
--- a/src/Field/Template.php
+++ b/src/Field/Template.php
@@ -2,18 +2,18 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
-
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\Template as TemplateModel;
-use DrevOps\Tui\Field\Capability\TextEditCapableInterface;
-use DrevOps\Tui\Field\Capability\TextEditCapableTrait;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+namespace DrevOps\PhpTui\Field;
+
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\Template as TemplateModel;
+use DrevOps\PhpTui\Field\Capability\TextEditCapableInterface;
+use DrevOps\PhpTui\Field\Capability\TextEditCapableTrait;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Fills the named slots of a fixed shape, one slot at a time.
@@ -24,7 +24,7 @@
* left and again for every slot on accept, and the accepted value is the
* assembled string.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Template extends AbstractField implements TextEditCapableInterface {
@@ -52,7 +52,7 @@ class Template extends AbstractField implements TextEditCapableInterface {
/**
* Construct a template field.
*
- * @param \DrevOps\Tui\Block\Template $template
+ * @param \DrevOps\PhpTui\Block\Template $template
* The shape to fill in.
* @param string $default
* The initial assembled value; a value that does not match the shape
@@ -248,7 +248,7 @@ protected function renderBody(ThemeInterface $theme): string {
/**
* Render one chunk of the shape's fixed text, dimmed to read as context.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme supplying the dimmed styling.
* @param int $index
* The chunk position.
@@ -266,7 +266,7 @@ protected function renderLiteral(ThemeInterface $theme, int $index): string {
/**
* Render one slot: the live caret line, a filled value, or a dimmed hint.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme supplying the caret glyph and the dimmed styling.
* @param int $index
* The slot index.
diff --git a/src/Field/Text.php b/src/Field/Text.php
index b45337e1..31041c4a 100644
--- a/src/Field/Text.php
+++ b/src/Field/Text.php
@@ -2,24 +2,24 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
-
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Field\Capability\CompletionCapableInterface;
-use DrevOps\Tui\Field\Capability\CompletionCapableTrait;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableInterface;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableTrait;
-use DrevOps\Tui\Field\Capability\TextEditCapableInterface;
-use DrevOps\Tui\Field\Capability\TextEditCapableTrait;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Theme\ThemeInterface;
+namespace DrevOps\PhpTui\Field;
+
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Field\Capability\CompletionCapableInterface;
+use DrevOps\PhpTui\Field\Capability\CompletionCapableTrait;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableTrait;
+use DrevOps\PhpTui\Field\Capability\TextEditCapableInterface;
+use DrevOps\PhpTui\Field\Capability\TextEditCapableTrait;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* Single-line text input with a movable cursor and optional ghost-text.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Text extends AbstractField implements TextEditCapableInterface, CompletionCapableInterface, PlaceholderCapableInterface {
@@ -103,7 +103,7 @@ protected function renderBody(ThemeInterface $theme): string {
* former needs a typed prefix to complete, the latter an empty buffer, so at
* most one of them is ever set.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme supplying the caret glyph and the ghost styling.
*
* @return string
diff --git a/src/Field/Textarea.php b/src/Field/Textarea.php
index 9beeeccc..2b9fdaf9 100644
--- a/src/Field/Textarea.php
+++ b/src/Field/Textarea.php
@@ -2,25 +2,25 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
-
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Field\Capability\ExternalEditCapableInterface;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableInterface;
-use DrevOps\Tui\Field\Capability\PlaceholderCapableTrait;
-use DrevOps\Tui\Field\Capability\TextEditCapableInterface;
-use DrevOps\Tui\Field\Capability\TextEditCapableTrait;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Utils\Strings;
+namespace DrevOps\PhpTui\Field;
+
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Field\Capability\ExternalEditCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableInterface;
+use DrevOps\PhpTui\Field\Capability\PlaceholderCapableTrait;
+use DrevOps\PhpTui\Field\Capability\TextEditCapableInterface;
+use DrevOps\PhpTui\Field\Capability\TextEditCapableTrait;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Utils\Strings;
/**
* Multi-line text input: Enter inserts a newline, Tab accepts.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Textarea extends AbstractField implements TextEditCapableInterface, ExternalEditCapableInterface, PlaceholderCapableInterface {
diff --git a/src/Field/Toggle.php b/src/Field/Toggle.php
index 0d5e1f6f..2caacb1a 100644
--- a/src/Field/Toggle.php
+++ b/src/Field/Toggle.php
@@ -2,21 +2,21 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Field;
+namespace DrevOps\PhpTui\Field;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Field\Capability\StepCapableInterface;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\Scope;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Utils\Strings;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Field\Capability\StepCapableInterface;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\Scope;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Utils\Strings;
/**
* An inline switch between two labeled values.
*
- * @package DrevOps\Tui\Field
+ * @package DrevOps\PhpTui\Field
*/
class Toggle extends AbstractField implements StepCapableInterface {
diff --git a/src/FormException.php b/src/FormException.php
index c7017c2e..beafaf48 100644
--- a/src/FormException.php
+++ b/src/FormException.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui;
+namespace DrevOps\PhpTui;
/**
* Thrown when a form declaration is invalid.
@@ -11,7 +11,7 @@
* extends the exception family a caller already catches for one. Whichever
* surface throws it - a builder, a block or a limit - one catch covers all.
*
- * @package DrevOps\Tui
+ * @package DrevOps\PhpTui
*/
class FormException extends \InvalidArgumentException {
diff --git a/src/Handler/Context.php b/src/Handler/Context.php
index 760d5ea0..cf116b92 100644
--- a/src/Handler/Context.php
+++ b/src/Handler/Context.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Handler;
+namespace DrevOps\PhpTui\Handler;
/**
* The run context passed to the handler hooks.
*
- * @package DrevOps\Tui\Handler
+ * @package DrevOps\PhpTui\Handler
*/
final readonly class Context {
diff --git a/src/Handler/HandlerRegistry.php b/src/Handler/HandlerRegistry.php
index d2a4cb1f..fa21a02c 100644
--- a/src/Handler/HandlerRegistry.php
+++ b/src/Handler/HandlerRegistry.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Handler;
+namespace DrevOps\PhpTui\Handler;
/**
* Resolves a consumer's per-field class and its reusable static behaviour.
@@ -14,7 +14,7 @@
* transform(), a collection uses them as the field's reusable behaviour unless
* the form declares its own closure, which always wins.
*
- * @package DrevOps\Tui\Handler
+ * @package DrevOps\PhpTui\Handler
*/
class HandlerRegistry {
diff --git a/src/Input/Action.php b/src/Input/Action.php
index 53accd82..6f49a5d7 100644
--- a/src/Input/Action.php
+++ b/src/Input/Action.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Input;
+namespace DrevOps\PhpTui\Input;
/**
* A semantic input action, decoupled from the physical key that triggers it.
@@ -13,7 +13,7 @@
* remap can bind a different key to the same action. The set of actions is
* fixed; the bindings behind them are configurable.
*
- * @package DrevOps\Tui\Input
+ * @package DrevOps\PhpTui\Input
*/
enum Action {
diff --git a/src/Input/Binding.php b/src/Input/Binding.php
index 5f89b0a3..e2660d7c 100644
--- a/src/Input/Binding.php
+++ b/src/Input/Binding.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Input;
+namespace DrevOps\PhpTui\Input;
/**
* One authored binding: an action and the keys that trigger it in a scope.
@@ -14,25 +14,25 @@
* action do not merge: the later one wins, so a consumer replaces a preset's
* binding by re-declaring it.
*
- * @package DrevOps\Tui\Input
+ * @package DrevOps\PhpTui\Input
*/
final readonly class Binding {
/**
* The keys bound to the action, before normalisation.
*
- * @var list<\DrevOps\Tui\Input\Key|\DrevOps\Tui\Input\KeyName|string>
+ * @var list<\DrevOps\PhpTui\Input\Key|\DrevOps\PhpTui\Input\KeyName|string>
*/
public array $keys;
/**
* Construct a binding.
*
- * @param \DrevOps\Tui\Input\Scope $scope
+ * @param \DrevOps\PhpTui\Input\Scope $scope
* The scope the binding applies in.
- * @param \DrevOps\Tui\Input\Action $action
+ * @param \DrevOps\PhpTui\Input\Action $action
* The action the keys trigger.
- * @param \DrevOps\Tui\Input\Key|\DrevOps\Tui\Input\KeyName|string ...$keys
+ * @param \DrevOps\PhpTui\Input\Key|\DrevOps\PhpTui\Input\KeyName|string ...$keys
* The keys bound to the action.
*/
public function __construct(
diff --git a/src/Input/DefaultKeyMap.php b/src/Input/DefaultKeyMap.php
index a462ca8b..982d0351 100644
--- a/src/Input/DefaultKeyMap.php
+++ b/src/Input/DefaultKeyMap.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Input;
+namespace DrevOps\PhpTui\Input;
-use DrevOps\Tui\Block\FieldType;
+use DrevOps\PhpTui\Block\FieldType;
/**
* The built-in key bindings: the defaults every form uses unless it opts out.
@@ -17,14 +17,14 @@
* {@see bindings()} to ship an alternate preset - {@see VimKeyMap} does exactly
* that.
*
- * @package DrevOps\Tui\Input
+ * @package DrevOps\PhpTui\Input
*/
class DefaultKeyMap {
/**
* The bindings this preset declares.
*
- * @return list<\DrevOps\Tui\Input\Binding>
+ * @return list<\DrevOps\PhpTui\Input\Binding>
* The bindings, base first, then per-scope overrides.
*/
public function bindings(): array {
diff --git a/src/Input/Hint.php b/src/Input/Hint.php
index 4e1630cb..3a8d8b1e 100644
--- a/src/Input/Hint.php
+++ b/src/Input/Hint.php
@@ -2,21 +2,21 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Input;
+namespace DrevOps\PhpTui\Input;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Translation\Translator;
/**
* One labelled fragment of a context's key-hint footer.
*
* A hint pairs a human label ("move", "accept", "none/all") with the actions
* whose live keys illustrate it, so the glyphs are rendered from the active
- * bindings - {@see \DrevOps\Tui\Theme\DefaultTheme::renderHints()} - and never
- * drift from a remap. A context - a field or the panel hub - declares an
+ * bindings - {@see \DrevOps\PhpTui\Theme\DefaultTheme::renderHints()} - and
+ * never drift from a remap. A context - a field or the panel hub - declares an
* ordered list of these; the theme turns each into a fragment and joins them.
* Listing two actions under one label groups their keys ("←/→ none/all").
*
- * @package DrevOps\Tui\Input
+ * @package DrevOps\PhpTui\Input
*/
final readonly class Hint {
@@ -28,7 +28,7 @@
/**
* The actions whose primary keys lead the fragment.
*
- * @var list<\DrevOps\Tui\Input\Action>
+ * @var list<\DrevOps\PhpTui\Input\Action>
*/
public array $actions;
@@ -38,7 +38,7 @@
* @param string $label
* The English source label describing what the keys do (e.g. "move",
* "accept"); translated to the active language.
- * @param \DrevOps\Tui\Input\Action ...$actions
+ * @param \DrevOps\PhpTui\Input\Action ...$actions
* The actions whose primary keys illustrate the label.
*/
public function __construct(
diff --git a/src/Input/Key.php b/src/Input/Key.php
index bfd08131..241a7da3 100644
--- a/src/Input/Key.php
+++ b/src/Input/Key.php
@@ -2,19 +2,19 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Input;
+namespace DrevOps\PhpTui\Input;
/**
* A single key press: either a named special key or a printable character.
*
- * @package DrevOps\Tui\Input
+ * @package DrevOps\PhpTui\Input
*/
final readonly class Key {
/**
* Construct a key.
*
- * @param \DrevOps\Tui\Input\KeyName|null $name
+ * @param \DrevOps\PhpTui\Input\KeyName|null $name
* The named special key, or NULL for a printable character.
* @param string|null $char
* The printable character, or NULL for a named key.
@@ -28,7 +28,7 @@ protected function __construct(
/**
* Create a named special key.
*
- * @param \DrevOps\Tui\Input\KeyName $name
+ * @param \DrevOps\PhpTui\Input\KeyName $name
* The key name.
*/
public static function named(KeyName $name): self {
@@ -55,7 +55,7 @@ public function isChar(): bool {
/**
* Whether this key is the given named key.
*
- * @param \DrevOps\Tui\Input\KeyName $name
+ * @param \DrevOps\PhpTui\Input\KeyName $name
* The name to compare.
*/
public function is(KeyName $name): bool {
@@ -65,7 +65,7 @@ public function is(KeyName $name): bool {
/**
* Whether this key is the same key as another.
*
- * @param \DrevOps\Tui\Input\Key $other
+ * @param \DrevOps\PhpTui\Input\Key $other
* The key to compare.
*
* @return bool
diff --git a/src/Input/KeyMap.php b/src/Input/KeyMap.php
index ec7d6433..27ee97d8 100644
--- a/src/Input/KeyMap.php
+++ b/src/Input/KeyMap.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Input;
+namespace DrevOps\PhpTui\Input;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\FormException;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\FormException;
/**
* The resolved, validated key bindings for a whole form.
@@ -24,7 +24,7 @@
* consumes typed input, would be un-typeable and is rejected;
* - a character binding that is not exactly one character is rejected.
*
- * @package DrevOps\Tui\Input
+ * @package DrevOps\PhpTui\Input
*/
final class KeyMap {
@@ -41,14 +41,14 @@ final class KeyMap {
/**
* The scopes that override the base, keyed by their scope token.
*
- * @var array
+ * @var array
*/
protected array $fields = [];
/**
* Resolve and validate a list of bindings into scoped maps.
*
- * @param list<\DrevOps\Tui\Input\Binding> $bindings
+ * @param list<\DrevOps\PhpTui\Input\Binding> $bindings
* The bindings, a preset's defaults followed by any overrides.
*
* @throws \InvalidArgumentException
@@ -75,7 +75,7 @@ public function __construct(array $bindings) {
/**
* The panel-navigation scope.
*
- * @return \DrevOps\Tui\Input\ScopedKeyMap
+ * @return \DrevOps\PhpTui\Input\ScopedKeyMap
* The navigation bindings.
*/
public function navigation(): ScopedKeyMap {
@@ -85,12 +85,12 @@ public function navigation(): ScopedKeyMap {
/**
* The scope for a field type, or the base when the type has no overrides.
*
- * @param \DrevOps\Tui\Block\FieldType $type
+ * @param \DrevOps\PhpTui\Block\FieldType $type
* The field type.
* @param bool $multiple
* Whether the multiple-collecting variant of the type is targeted.
*
- * @return \DrevOps\Tui\Input\ScopedKeyMap
+ * @return \DrevOps\PhpTui\Input\ScopedKeyMap
* The bindings for that field type.
*/
public function forField(FieldType $type, bool $multiple = FALSE): ScopedKeyMap {
@@ -100,10 +100,10 @@ public function forField(FieldType $type, bool $multiple = FALSE): ScopedKeyMap
/**
* The bindings for a scope.
*
- * @param \DrevOps\Tui\Input\Scope $scope
+ * @param \DrevOps\PhpTui\Input\Scope $scope
* The scope.
*
- * @return \DrevOps\Tui\Input\ScopedKeyMap
+ * @return \DrevOps\PhpTui\Input\ScopedKeyMap
* The bindings for that scope.
*/
public function scope(Scope $scope): ScopedKeyMap {
@@ -117,10 +117,10 @@ public function scope(Scope $scope): ScopedKeyMap {
/**
* Group bindings into per-scope, per-action layers, later bindings winning.
*
- * @param list<\DrevOps\Tui\Input\Binding> $bindings
+ * @param list<\DrevOps\PhpTui\Input\Binding> $bindings
* The bindings.
*
- * @return array}>>
+ * @return array}>>
* The layers, keyed by scope token then action name.
*/
protected function layer(array $bindings): array {
@@ -139,14 +139,14 @@ protected function layer(array $bindings): array {
/**
* Build a scope by overlaying its own layer onto the base bindings.
*
- * @param array $base_inverted
+ * @param array $base_inverted
* The base bindings, inverted to key token => key/action.
- * @param array}>> $layers
+ * @param array}>> $layers
* All layers, keyed by scope token.
- * @param \DrevOps\Tui\Input\Scope $scope
+ * @param \DrevOps\PhpTui\Input\Scope $scope
* The scope to build.
*
- * @return \DrevOps\Tui\Input\ScopedKeyMap
+ * @return \DrevOps\PhpTui\Input\ScopedKeyMap
* The resolved scope.
*/
protected function buildScope(array $base_inverted, array $layers, Scope $scope): ScopedKeyMap {
@@ -168,15 +168,15 @@ protected function buildScope(array $base_inverted, array $layers, Scope $scope)
/**
* Invert an action => keys layer to a key token => key/action map.
*
- * @param array}> $layer
+ * @param array}> $layer
* The layer.
- * @param \DrevOps\Tui\Input\Scope $scope
+ * @param \DrevOps\PhpTui\Input\Scope $scope
* The scope, for the conflict message.
*
- * @return array
+ * @return array
* The inverted map.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When one key is bound to two different actions in the layer.
*/
protected function invert(array $layer, Scope $scope): array {
@@ -200,10 +200,10 @@ protected function invert(array $layer, Scope $scope): array {
/**
* Assemble the two lookup tables a scoped map needs from an inverted map.
*
- * @param array $inverted
+ * @param array $inverted
* The inverted map.
*
- * @return \DrevOps\Tui\Input\ScopedKeyMap
+ * @return \DrevOps\PhpTui\Input\ScopedKeyMap
* The scoped map.
*/
protected function toScoped(array $inverted): ScopedKeyMap {
@@ -221,12 +221,12 @@ protected function toScoped(array $inverted): ScopedKeyMap {
/**
* Reject printable-character bindings where they would be un-typeable.
*
- * @param array $inverted
+ * @param array $inverted
* The inverted bindings for the scope.
- * @param \DrevOps\Tui\Input\Scope $scope
+ * @param \DrevOps\PhpTui\Input\Scope $scope
* The scope being checked.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When a printable character is bound in the base or a text-entry scope.
*/
protected function assertTypeable(array $inverted, Scope $scope): void {
@@ -265,15 +265,15 @@ protected function isControl(string $char): bool {
/**
* Normalize authored keys to Key objects.
*
- * @param list<\DrevOps\Tui\Input\Key|\DrevOps\Tui\Input\KeyName|string> $keys
+ * @param list<\DrevOps\PhpTui\Input\Key|\DrevOps\PhpTui\Input\KeyName|string> $keys
* The authored keys.
- * @param \DrevOps\Tui\Input\Scope $scope
+ * @param \DrevOps\PhpTui\Input\Scope $scope
* The scope, for the error message.
*
- * @return list<\DrevOps\Tui\Input\Key>
+ * @return list<\DrevOps\PhpTui\Input\Key>
* The normalized keys.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When a character binding is not exactly one character.
*/
protected function normalize(array $keys, Scope $scope): array {
diff --git a/src/Input/KeyMapManager.php b/src/Input/KeyMapManager.php
index 933b0324..0d70897d 100644
--- a/src/Input/KeyMapManager.php
+++ b/src/Input/KeyMapManager.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Input;
+namespace DrevOps\PhpTui\Input;
/**
* The key-map preset registry and factory.
@@ -15,14 +15,14 @@
* passed to {@see create()} are appended after the preset's own bindings, so a
* consumer can retune individual bindings without replacing the whole preset.
*
- * @package DrevOps\Tui\Input
+ * @package DrevOps\PhpTui\Input
*/
final class KeyMapManager {
/**
* The name => preset-class registry.
*
- * @var array>
+ * @var array>
*/
protected static array $registry = [
'default' => DefaultKeyMap::class,
@@ -60,10 +60,10 @@ public static function register(string $name, string $class): void {
*
* @param string $name
* A registered name, a preset class name, or "" for the default preset.
- * @param list<\DrevOps\Tui\Input\Binding> $overrides
+ * @param list<\DrevOps\PhpTui\Input\Binding> $overrides
* Bindings appended after the preset's own, retuning individual bindings.
*
- * @return \DrevOps\Tui\Input\KeyMap
+ * @return \DrevOps\PhpTui\Input\KeyMap
* The resolved, validated key map.
*
* @throws \InvalidArgumentException
diff --git a/src/Input/KeyName.php b/src/Input/KeyName.php
index f74641c0..27a4c7b0 100644
--- a/src/Input/KeyName.php
+++ b/src/Input/KeyName.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Input;
+namespace DrevOps\PhpTui\Input;
/**
* Named special keys recognised by the fields and the panel loop.
*
- * @package DrevOps\Tui\Input
+ * @package DrevOps\PhpTui\Input
*/
enum KeyName {
diff --git a/src/Input/KeyParser.php b/src/Input/KeyParser.php
index 69196cfe..93dd7a05 100644
--- a/src/Input/KeyParser.php
+++ b/src/Input/KeyParser.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Input;
+namespace DrevOps\PhpTui\Input;
/**
* Parses a raw terminal byte buffer into a list of keys.
@@ -14,7 +14,7 @@
* escape sequences are consumed whole and degrade to Escape, and unknown mouse
* events are consumed without emitting a key.
*
- * @package DrevOps\Tui\Input
+ * @package DrevOps\PhpTui\Input
*/
class KeyParser {
@@ -24,7 +24,7 @@ class KeyParser {
* @param string $bytes
* The raw bytes.
*
- * @return \DrevOps\Tui\Input\Key[]
+ * @return \DrevOps\PhpTui\Input\Key[]
* The parsed keys.
*/
public function parse(string $bytes): array {
@@ -103,7 +103,7 @@ protected function utf8Span(string $bytes, int $start): int {
* @param string $char
* The byte.
*
- * @return \DrevOps\Tui\Input\Key
+ * @return \DrevOps\PhpTui\Input\Key
* The key.
*/
protected function parseSimple(string $char): Key {
@@ -125,7 +125,7 @@ protected function parseSimple(string $char): Key {
* @param int $start
* The offset of the ESC byte.
*
- * @return array{\DrevOps\Tui\Input\Key|null,int}
+ * @return array{\DrevOps\PhpTui\Input\Key|null,int}
* The key (or NULL) and the number of bytes consumed.
*/
protected function parseEscape(string $bytes, int $start): array {
@@ -185,7 +185,7 @@ protected function parseEscape(string $bytes, int $start): array {
* @param string $params
* The numeric parameters.
*
- * @return \DrevOps\Tui\Input\KeyName|null
+ * @return \DrevOps\PhpTui\Input\KeyName|null
* The key name, or NULL when unrecognized.
*/
protected function csiName(string $final, string $params): ?KeyName {
@@ -207,7 +207,7 @@ protected function csiName(string $final, string $params): ?KeyName {
* @param string $params
* The parameter bytes; a modifier after ";" does not change the key.
*
- * @return \DrevOps\Tui\Input\KeyName|null
+ * @return \DrevOps\PhpTui\Input\KeyName|null
* The key name, or NULL when unrecognized.
*/
protected function tildeName(string $params): ?KeyName {
@@ -229,7 +229,7 @@ protected function tildeName(string $params): ?KeyName {
* @param int $start
* The offset of the ESC byte.
*
- * @return array{\DrevOps\Tui\Input\Key|null,int}
+ * @return array{\DrevOps\PhpTui\Input\Key|null,int}
* The key (or NULL) and the number of bytes consumed.
*/
protected function parseMouse(string $bytes, int $start): array {
diff --git a/src/Input/Scope.php b/src/Input/Scope.php
index 6ed0fc90..78b2913b 100644
--- a/src/Input/Scope.php
+++ b/src/Input/Scope.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Input;
+namespace DrevOps\PhpTui\Input;
-use DrevOps\Tui\Block\FieldType;
+use DrevOps\PhpTui\Block\FieldType;
/**
* The binding context a key resolves in: base, navigation, or one field type.
@@ -19,7 +19,7 @@
* toggles, Left/Right select none/all), so the scope also carries a `multiple`
* flag to keep those two binding sets apart.
*
- * @package DrevOps\Tui\Input
+ * @package DrevOps\PhpTui\Input
*/
final readonly class Scope {
@@ -72,7 +72,7 @@
/**
* Construct a scope.
*
- * @param \DrevOps\Tui\Block\FieldType|null $fieldType
+ * @param \DrevOps\PhpTui\Block\FieldType|null $fieldType
* The field type this scope targets, or NULL for the base and navigation
* scopes.
* @param bool $navigation
@@ -110,7 +110,7 @@ public static function navigation(): self {
/**
* The scope for a single field type.
*
- * @param \DrevOps\Tui\Block\FieldType $type
+ * @param \DrevOps\PhpTui\Block\FieldType $type
* The field type.
* @param bool $multiple
* Whether the multiple-collecting variant of the type is targeted.
diff --git a/src/Input/ScopedKeyMap.php b/src/Input/ScopedKeyMap.php
index 2c4e8618..92a9a529 100644
--- a/src/Input/ScopedKeyMap.php
+++ b/src/Input/ScopedKeyMap.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Input;
+namespace DrevOps\PhpTui\Input;
/**
* The resolved bindings for one scope, narrowed for a single field.
@@ -15,16 +15,16 @@
* {@see KeyMap}; a scope resolves every key to at most one action, so matching
* is a direct lookup.
*
- * @package DrevOps\Tui\Input
+ * @package DrevOps\PhpTui\Input
*/
final readonly class ScopedKeyMap {
/**
* Construct a scoped map.
*
- * @param array $byKey
+ * @param array $byKey
* The action each key triggers, keyed by the key's token.
- * @param array> $byAction
+ * @param array> $byAction
* The keys bound to each action, keyed by the action's name.
*/
public function __construct(
@@ -36,9 +36,9 @@ public function __construct(
/**
* Whether a key press triggers an action in this scope.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key pressed.
- * @param \DrevOps\Tui\Input\Action $action
+ * @param \DrevOps\PhpTui\Input\Action $action
* The action to test for.
*
* @return bool
@@ -51,10 +51,10 @@ public function matches(Key $key, Action $action): bool {
/**
* The keys bound to an action in this scope, in declaration order.
*
- * @param \DrevOps\Tui\Input\Action $action
+ * @param \DrevOps\PhpTui\Input\Action $action
* The action.
*
- * @return list<\DrevOps\Tui\Input\Key>
+ * @return list<\DrevOps\PhpTui\Input\Key>
* The keys, empty when the action is unbound here.
*/
public function keysFor(Action $action): array {
@@ -64,10 +64,10 @@ public function keysFor(Action $action): array {
/**
* The primary (first-declared) key bound to an action, for hint display.
*
- * @param \DrevOps\Tui\Input\Action $action
+ * @param \DrevOps\PhpTui\Input\Action $action
* The action.
*
- * @return \DrevOps\Tui\Input\Key|null
+ * @return \DrevOps\PhpTui\Input\Key|null
* The primary key, or NULL when the action is unbound here.
*/
public function primary(Action $action): ?Key {
diff --git a/src/Input/VimKeyMap.php b/src/Input/VimKeyMap.php
index 77853ea9..d4f8be71 100644
--- a/src/Input/VimKeyMap.php
+++ b/src/Input/VimKeyMap.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Input;
+namespace DrevOps\PhpTui\Input;
-use DrevOps\Tui\Block\FieldType;
+use DrevOps\PhpTui\Block\FieldType;
/**
* A vim-style preset: h/j/k/l navigate alongside the arrow keys.
@@ -17,7 +17,7 @@
* un-typeable, which the key map rejects outright. Everything else is inherited
* from {@see DefaultKeyMap}.
*
- * @package DrevOps\Tui\Input
+ * @package DrevOps\PhpTui\Input
*/
class VimKeyMap extends DefaultKeyMap {
diff --git a/src/InterruptException.php b/src/InterruptException.php
index e1f3df29..97548f9f 100644
--- a/src/InterruptException.php
+++ b/src/InterruptException.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui;
+namespace DrevOps\PhpTui;
/**
* Thrown when the user aborts an interactive session with the interrupt key.
@@ -13,7 +13,7 @@
* exit code is 130). Catching it also covers the {@see CancelException}
* subclass, so one catch handles every user abort.
*
- * @package DrevOps\Tui
+ * @package DrevOps\PhpTui
*/
class InterruptException extends \RuntimeException {
diff --git a/src/Primitive/Element/PrimitiveElementsInterface.php b/src/Primitive/Element/PrimitiveElementsInterface.php
index 3730ce27..590a15f0 100644
--- a/src/Primitive/Element/PrimitiveElementsInterface.php
+++ b/src/Primitive/Element/PrimitiveElementsInterface.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Primitive\Element;
+namespace DrevOps\PhpTui\Primitive\Element;
-use DrevOps\Tui\Primitive\Status;
+use DrevOps\PhpTui\Primitive\Status;
/**
* The pieces a primitive draws through.
@@ -25,7 +25,7 @@
* for what it draws, so a theme implements this and every element interface on
* one class without collisions.
*
- * @package DrevOps\Tui\Primitive\Element
+ * @package DrevOps\PhpTui\Primitive\Element
*/
interface PrimitiveElementsInterface {
@@ -103,7 +103,7 @@ public function renderBanner(string $logo, string $version): array;
/**
* Draw a status line: the kind's glyph and the message, in its colour.
*
- * @param \DrevOps\Tui\Primitive\Status $status
+ * @param \DrevOps\PhpTui\Primitive\Status $status
* The kind of status.
* @param string $text
* The message; its line breaks fold to spaces so the status stays one line.
diff --git a/src/Primitive/Output.php b/src/Primitive/Output.php
index dd3757d4..2c5884d6 100644
--- a/src/Primitive/Output.php
+++ b/src/Primitive/Output.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Primitive;
+namespace DrevOps\PhpTui\Primitive;
-use DrevOps\Tui\Primitive\Element\PrimitiveElementsInterface;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Terminal\Terminal;
+use DrevOps\PhpTui\Primitive\Element\PrimitiveElementsInterface;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Terminal\Terminal;
/**
* Static output primitives: a box, a status line, a definition list.
@@ -28,16 +28,16 @@
* $out->definitions(['Jars' => '12', 'Fruit' => 'Apricot']);
* @endcode
*
- * @package DrevOps\Tui\Primitive
+ * @package DrevOps\PhpTui\Primitive
*/
final class Output {
/**
* Construct an output primitive.
*
- * @param \DrevOps\Tui\Terminal\Terminal $terminal
+ * @param \DrevOps\PhpTui\Terminal\Terminal $terminal
* The terminal the lines are written to.
- * @param \DrevOps\Tui\Primitive\Element\PrimitiveElementsInterface $theme
+ * @param \DrevOps\PhpTui\Primitive\Element\PrimitiveElementsInterface $theme
* The theme that draws the box, the status glyphs and the list.
*/
public function __construct(protected Terminal $terminal, protected PrimitiveElementsInterface $theme) {
@@ -137,7 +137,7 @@ public function banner(string $logo, string $version = ''): self {
/**
* Write a status line of the given kind.
*
- * @param \DrevOps\Tui\Primitive\Status $status
+ * @param \DrevOps\PhpTui\Primitive\Status $status
* The kind of status.
* @param string $text
* The message.
diff --git a/src/Primitive/Progress.php b/src/Primitive/Progress.php
index 4d3ada27..9bb29c19 100644
--- a/src/Primitive/Progress.php
+++ b/src/Primitive/Progress.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Primitive;
+namespace DrevOps\PhpTui\Primitive;
-use DrevOps\Tui\Primitive\Element\PrimitiveElementsInterface;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Terminal\Terminal;
-use DrevOps\Tui\Terminal\TerminalControl;
+use DrevOps\PhpTui\Primitive\Element\PrimitiveElementsInterface;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Terminal\Terminal;
+use DrevOps\PhpTui\Terminal\TerminalControl;
/**
* A progress primitive for slow work: a spinner, or a determinate bar.
@@ -25,7 +25,7 @@
* throws. Off a TTY it emits no control sequences: it prints the caption once
* as a plain line and every advance renders nothing.
*
- * @package DrevOps\Tui\Primitive
+ * @package DrevOps\PhpTui\Primitive
*/
final class Progress {
@@ -57,9 +57,9 @@ final class Progress {
/**
* Construct a progress primitive.
*
- * @param \DrevOps\Tui\Terminal\Terminal $terminal
+ * @param \DrevOps\PhpTui\Terminal\Terminal $terminal
* The terminal the line is drawn on.
- * @param \DrevOps\Tui\Primitive\Element\PrimitiveElementsInterface $theme
+ * @param \DrevOps\PhpTui\Primitive\Element\PrimitiveElementsInterface $theme
* The theme that draws the spinner glyphs and the bar.
* @param bool $active
* Whether to draw control sequences (TRUE) or stay plain (FALSE).
diff --git a/src/Primitive/ProgressReporter.php b/src/Primitive/ProgressReporter.php
index 856b6fe9..faaa744d 100644
--- a/src/Primitive/ProgressReporter.php
+++ b/src/Primitive/ProgressReporter.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Primitive;
+namespace DrevOps\PhpTui\Primitive;
/**
* The handle a progress row's work drives to advance its indicator.
@@ -12,7 +12,7 @@
* own - it forwards to the supplied callback, which owns the field's live count
* and the repaint.
*
- * @package DrevOps\Tui\Primitive
+ * @package DrevOps\PhpTui\Primitive
*/
final class ProgressReporter {
diff --git a/src/Primitive/Status.php b/src/Primitive/Status.php
index f72905a7..eac97d15 100644
--- a/src/Primitive/Status.php
+++ b/src/Primitive/Status.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Primitive;
+namespace DrevOps\PhpTui\Primitive;
/**
* The kind of a status line: what the message says about the run.
@@ -10,7 +10,7 @@
* The case picks both the glyph and the colour the theme draws the line in, so
* the five stay distinguishable with colour off and in ASCII alike.
*
- * @package DrevOps\Tui\Primitive
+ * @package DrevOps\PhpTui\Primitive
*/
enum Status: string {
diff --git a/src/Resolver/EnvNameResolver.php b/src/Resolver/EnvNameResolver.php
index 8e8e234e..73344147 100644
--- a/src/Resolver/EnvNameResolver.php
+++ b/src/Resolver/EnvNameResolver.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Resolver;
+namespace DrevOps\PhpTui\Resolver;
-use DrevOps\Tui\Block\Field;
+use DrevOps\PhpTui\Block\Field;
/**
* Names the environment variables that answer a field.
@@ -20,7 +20,7 @@
* read the environment and to advertise it in machine-readable output; a second
* copy would let the two drift, advertising a variable that is never read.
*
- * @package DrevOps\Tui\Resolver
+ * @package DrevOps\PhpTui\Resolver
*/
class EnvNameResolver {
@@ -36,7 +36,7 @@ public function __construct(protected string $envPrefix = '') {
/**
* The variable that answers the field when several are set.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
*
* @return string
@@ -51,7 +51,7 @@ public function canonical(Field $field): string {
/**
* The additional variables the field also answers to, in declaration order.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
*
* @return list
@@ -64,7 +64,7 @@ public function aliases(Field $field): array {
/**
* Every variable that answers the field, in precedence order.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
*
* @return list
@@ -82,7 +82,7 @@ public function all(Field $field): array {
* so it is not offered as an answer route. Declared aliases are absolute and
* carry no such risk, so they stand on their own.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
*
* @return bool
@@ -99,7 +99,7 @@ public function isAdvertisable(Field $field): bool {
/**
* The variable name a field declares for itself.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
*
* @return string
diff --git a/src/Resolver/InputResolver.php b/src/Resolver/InputResolver.php
index 6b98b90b..0912426d 100644
--- a/src/Resolver/InputResolver.php
+++ b/src/Resolver/InputResolver.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Resolver;
+namespace DrevOps\PhpTui\Resolver;
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Assembles the non-interactive input map from the external answer layers.
@@ -24,7 +24,7 @@
* may replace its mechanical name and declare aliases beside it, and the first
* of those names that is set answers it.
*
- * @package DrevOps\Tui\Resolver
+ * @package DrevOps\PhpTui\Resolver
*/
class InputResolver {
@@ -40,7 +40,7 @@ public function __construct(protected string $envPrefix = '') {
/**
* Build the input map for the given fields.
*
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields to resolve inputs for.
* @param string $prompts
* A `--prompts` JSON string, or a path to a JSON file, or empty.
@@ -76,7 +76,7 @@ public function resolve(array $fields, string $prompts, array $env): array {
*
* @param string $value
* The raw environment value.
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
*
* @return mixed
@@ -122,7 +122,7 @@ protected function splitList(string $value): array {
* @return array
* The decoded map keyed by field id.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the operand decodes to anything but a JSON object - failing loudly
* instead of silently discarding every supplied answer.
*/
diff --git a/src/Schema/AgentHelp.php b/src/Schema/AgentHelp.php
index b09a9790..da28db3b 100644
--- a/src/Schema/AgentHelp.php
+++ b/src/Schema/AgentHelp.php
@@ -2,19 +2,19 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Schema;
-
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Block\FieldType;
-use DrevOps\Tui\Block\NumberBounds;
-use DrevOps\Tui\Block\Panel;
-use DrevOps\Tui\Block\SelectionBounds;
-use DrevOps\Tui\Block\Template;
-use DrevOps\Tui\Block\Tree;
-use DrevOps\Tui\Condition\ConditionInterface;
-use DrevOps\Tui\Handler\Context;
-use DrevOps\Tui\Resolver\EnvNameResolver;
-use DrevOps\Tui\Translation\Translator;
+namespace DrevOps\PhpTui\Schema;
+
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Block\FieldType;
+use DrevOps\PhpTui\Block\NumberBounds;
+use DrevOps\PhpTui\Block\Panel;
+use DrevOps\PhpTui\Block\SelectionBounds;
+use DrevOps\PhpTui\Block\Template;
+use DrevOps\PhpTui\Block\Tree;
+use DrevOps\PhpTui\Condition\ConditionInterface;
+use DrevOps\PhpTui\Handler\Context;
+use DrevOps\PhpTui\Resolver\EnvNameResolver;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Describes how to answer the form unattended as a JSON Schema.
@@ -36,15 +36,16 @@
* the rule into `if`/`then` was the alternative and is not available honestly:
* a `contains` reads a list or a substring depending on the answer, and a bare
* reference tests for a truthy value, and neither has one JSON Schema form.
- * {@see \DrevOps\Tui\Schema\SchemaValidator} composes the same rules against a
- * real answer set and stays the authority on whether a payload is complete.
+ * {@see \DrevOps\PhpTui\Schema\SchemaValidator} composes the same rules
+ * against a real answer set and stays the authority on whether a payload is
+ * complete.
*
* Only what the library controls appears here - the CLI flags an agent
* ultimately calls are the consumer's to define, so they are absent. The
* resolution order is the root `x-precedence`. A closure default is resolved
* against the context (see {@see DefaultResolver}) rather than omitted.
*
- * @package DrevOps\Tui\Schema
+ * @package DrevOps\PhpTui\Schema
*/
class AgentHelp {
@@ -56,10 +57,10 @@ class AgentHelp {
/**
* Construct the schema generator.
*
- * @param \DrevOps\Tui\Block\Panel $root
+ * @param \DrevOps\PhpTui\Block\Panel $root
* The declared tree to describe, read from the panel every declared panel
* hangs from.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The context a closure default is evaluated against; defaults to an empty
* context carrying no prior answers.
* @param string $envPrefix
@@ -116,9 +117,9 @@ public function generate(): string {
/**
* Build the schema property for one field.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
- * @param \DrevOps\Tui\Condition\ConditionInterface|null $gate
+ * @param \DrevOps\PhpTui\Condition\ConditionInterface|null $gate
* The rule deciding whether the question is asked at all, or NULL when
* nothing decides it or the rule cannot be read.
* @param bool $gated
@@ -240,7 +241,7 @@ protected function property(Field $field, ?ConditionInterface $gate, bool $gated
/**
* The selectable option values of an option-constrained field.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
*
* @return list
diff --git a/src/Schema/DefaultResolver.php b/src/Schema/DefaultResolver.php
index 2b33e919..d12301af 100644
--- a/src/Schema/DefaultResolver.php
+++ b/src/Schema/DefaultResolver.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Schema;
+namespace DrevOps\PhpTui\Schema;
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Handler\Context;
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Handler\Context;
/**
* Resolves a field's default for machine-readable output.
@@ -16,16 +16,16 @@
* defaults are computed still advertises real values. A closure that cannot be
* resolved without answers - it throws when evaluated - resolves to null.
*
- * @package DrevOps\Tui\Schema
+ * @package DrevOps\PhpTui\Schema
*/
final class DefaultResolver {
/**
* Resolve the default advertised for a field.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The context a closure default is evaluated against; its answers are the
* ones known so far - none, for a plain schema.
*
diff --git a/src/Schema/OptionsResolver.php b/src/Schema/OptionsResolver.php
index aa29e1ec..46f4f710 100644
--- a/src/Schema/OptionsResolver.php
+++ b/src/Schema/OptionsResolver.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Schema;
+namespace DrevOps\PhpTui\Schema;
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Handler\Context;
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Handler\Context;
/**
* Resolves a field's answer-driven options for machine-readable output.
@@ -18,16 +18,16 @@
* context empties the list rather than failing the description, the way a
* closure default that cannot resolve stands down to NULL.
*
- * @package DrevOps\Tui\Schema
+ * @package DrevOps\PhpTui\Schema
*/
final class OptionsResolver {
/**
* Resolve a field's options in place, if they follow the answers.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The context the resolver is called with.
*/
public static function resolve(Field $field, Context $context): void {
diff --git a/src/Schema/SchemaGenerator.php b/src/Schema/SchemaGenerator.php
index 5277776d..fcfa07b9 100644
--- a/src/Schema/SchemaGenerator.php
+++ b/src/Schema/SchemaGenerator.php
@@ -2,14 +2,14 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Schema;
+namespace DrevOps\PhpTui\Schema;
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Block\Panel;
-use DrevOps\Tui\Block\Tree;
-use DrevOps\Tui\Discovery\DiscoverInterface;
-use DrevOps\Tui\Handler\Context;
-use DrevOps\Tui\Resolver\EnvNameResolver;
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Block\Panel;
+use DrevOps\PhpTui\Block\Tree;
+use DrevOps\PhpTui\Discovery\DiscoverInterface;
+use DrevOps\PhpTui\Handler\Context;
+use DrevOps\PhpTui\Resolver\EnvNameResolver;
/**
* Generates a machine-readable schema of every configured question.
@@ -30,17 +30,17 @@
* {@see OptionsResolver}) and are flagged as `options_dynamic`, so tooling can
* tell a field with no options from one whose options are not fixed.
*
- * @package DrevOps\Tui\Schema
+ * @package DrevOps\PhpTui\Schema
*/
class SchemaGenerator {
/**
* Construct a generator.
*
- * @param \DrevOps\Tui\Block\Panel $root
+ * @param \DrevOps\PhpTui\Block\Panel $root
* The declared tree to describe, read from the panel every declared panel
* hangs from.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The context a closure default is evaluated against; defaults to an empty
* context carrying no prior answers.
* @param string $envPrefix
@@ -105,7 +105,7 @@ public function generate(): array {
/**
* Describe a field's options.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
*
* @return array>
diff --git a/src/Schema/SchemaValidator.php b/src/Schema/SchemaValidator.php
index 29b7311b..0edb8056 100644
--- a/src/Schema/SchemaValidator.php
+++ b/src/Schema/SchemaValidator.php
@@ -2,13 +2,13 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Schema;
+namespace DrevOps\PhpTui\Schema;
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Block\Panel;
-use DrevOps\Tui\Block\Tree;
-use DrevOps\Tui\Handler\Context;
-use DrevOps\Tui\Translation\Translator;
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Block\Panel;
+use DrevOps\PhpTui\Block\Tree;
+use DrevOps\PhpTui\Handler\Context;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Validates an answer set against the configuration.
@@ -26,17 +26,17 @@
* The published schemas describe those rules but cannot resolve them, so what
* they say about requiredness is written to never refuse a set this accepts.
*
- * @package DrevOps\Tui\Schema
+ * @package DrevOps\PhpTui\Schema
*/
class SchemaValidator {
/**
* Construct a validator.
*
- * @param \DrevOps\Tui\Block\Panel $root
+ * @param \DrevOps\PhpTui\Block\Panel $root
* The declared tree to validate against, read from the panel every declared
* panel hangs from.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The run context an options resolver is evaluated against, its answers
* replaced by the set under validation; defaults to an empty context.
*/
@@ -110,7 +110,7 @@ public function validate(array $answers): array {
/**
* Validate a single value against its field.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
* @param mixed $value
* The value.
@@ -146,7 +146,7 @@ protected function validateValue(Field $field, mixed $value): ?string {
/**
* Check a value against the field's declared number or date bounds.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
* @param mixed $value
* The value.
@@ -163,7 +163,7 @@ protected function checkBounds(Field $field, mixed $value): ?string {
/**
* Check a value against the field's declared file picker constraints.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
* @param mixed $value
* The value.
@@ -181,7 +181,7 @@ protected function checkPicker(Field $field, mixed $value): ?string {
/**
* Frame a constraint fragment as a question-scoped error message.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
* @param string $constraint
* The constraint fragment (e.g. "a string", "between 1 and 10").
@@ -199,7 +199,7 @@ protected function constraintMessage(Field $field, string $constraint): string {
* Rejects any supplied value that is not a selectable option, telling a
* disabled option apart from an unknown one.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
* @param mixed $value
* The value.
diff --git a/src/Screen/Assembler.php b/src/Screen/Assembler.php
index d4a42b6c..bf370a6c 100644
--- a/src/Screen/Assembler.php
+++ b/src/Screen/Assembler.php
@@ -2,17 +2,17 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen;
-
-use DrevOps\Tui\Block\Actions;
-use DrevOps\Tui\Block\Breadcrumb;
-use DrevOps\Tui\Block\Buttons;
-use DrevOps\Tui\Block\Legend;
-use DrevOps\Tui\Block\Panel;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Screen\Layout\LayoutManager;
-use DrevOps\Tui\Theme\BorderSide;
-use DrevOps\Tui\Translation\Translator;
+namespace DrevOps\PhpTui\Screen;
+
+use DrevOps\PhpTui\Block\Actions;
+use DrevOps\PhpTui\Block\Breadcrumb;
+use DrevOps\PhpTui\Block\Buttons;
+use DrevOps\PhpTui\Block\Legend;
+use DrevOps\PhpTui\Block\Panel;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Screen\Layout\LayoutManager;
+use DrevOps\PhpTui\Theme\BorderSide;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Puts the standard furniture into a screen.
@@ -31,22 +31,22 @@
* outlives the session driving it, so a session that wrote its furniture into
* the panel tree would hand the next one a form nobody declared.
*
- * @package DrevOps\Tui\Screen
+ * @package DrevOps\PhpTui\Screen
*/
final class Assembler {
/**
* Build a screen around a panel.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel filling the body region.
* @param string $layout
* The layout the screen is arranged by.
*
- * @return \DrevOps\Tui\Screen\Screen
+ * @return \DrevOps\PhpTui\Screen\Screen
* The screen.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the layout keeps no place for the form itself.
*/
public function assemble(Panel $panel, string $layout = 'default'): Screen {
@@ -89,10 +89,10 @@ public function assemble(Panel $panel, string $layout = 'default'): Screen {
/**
* The buttons that end a form, or close a panel drawn over it.
*
- * @param \DrevOps\Tui\Block\Buttons $declared
+ * @param \DrevOps\PhpTui\Block\Buttons $declared
* The pair as the panel they close declares it.
*
- * @return \DrevOps\Tui\Block\Actions
+ * @return \DrevOps\PhpTui\Block\Actions
* The actions.
*/
public function actions(Buttons $declared = new Buttons()): Actions {
@@ -110,10 +110,10 @@ public function actions(Buttons $declared = new Buttons()): Actions {
* Read out of the panel's own bindings rather than written out beside them,
* so a retuned key changes the line that advertises it too.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel filling the body region.
*
- * @return \DrevOps\Tui\Block\Legend
+ * @return \DrevOps\PhpTui\Block\Legend
* The legend.
*/
protected function legend(Panel $panel): Legend {
diff --git a/src/Screen/Axis.php b/src/Screen/Axis.php
index a71f90f3..768ad8b7 100644
--- a/src/Screen/Axis.php
+++ b/src/Screen/Axis.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen;
+namespace DrevOps\PhpTui\Screen;
/**
* The direction things inside a layout or a region run.
@@ -11,7 +11,7 @@
* nesting rather than from a grid: a panel is a block that contains a layout,
* so any arrangement is rows of columns of rows.
*
- * @package DrevOps\Tui\Screen
+ * @package DrevOps\PhpTui\Screen
*/
enum Axis: string {
diff --git a/src/Screen/Capability/BorderCapableInterface.php b/src/Screen/Capability/BorderCapableInterface.php
index 5047576a..60a9600b 100644
--- a/src/Screen/Capability/BorderCapableInterface.php
+++ b/src/Screen/Capability/BorderCapableInterface.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen\Capability;
+namespace DrevOps\PhpTui\Screen\Capability;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Theme\BorderSide;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Theme\BorderSide;
/**
* Declares that something draws edges around the space it occupies.
@@ -18,7 +18,7 @@
* is drawn rather than where it is declared, so the renderer sizes the box and
* the theme draws it in the style named here, or in its own when none is.
*
- * @package DrevOps\Tui\Screen\Capability
+ * @package DrevOps\PhpTui\Screen\Capability
*/
interface BorderCapableInterface {
@@ -32,7 +32,7 @@ interface BorderCapableInterface {
*
* @param int $sides
* The edges to draw, combined from {@see BorderSide}.
- * @param \DrevOps\Tui\Theme\Border|null $style
+ * @param \DrevOps\PhpTui\Theme\Border|null $style
* The style to draw them in, or NULL for the theme's own.
* @param string $title
* The text written into the top edge; empty writes none, and so does a
@@ -55,7 +55,7 @@ public function isBordered(): bool;
/**
* The style the edges are drawn in.
*
- * @return \DrevOps\Tui\Theme\Border|null
+ * @return \DrevOps\PhpTui\Theme\Border|null
* The style, or NULL when the theme's own is used.
*/
public function borderStyle(): ?Border;
diff --git a/src/Screen/Capability/BorderCapableTrait.php b/src/Screen/Capability/BorderCapableTrait.php
index 90f0236e..dc650984 100644
--- a/src/Screen/Capability/BorderCapableTrait.php
+++ b/src/Screen/Capability/BorderCapableTrait.php
@@ -2,15 +2,15 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen\Capability;
+namespace DrevOps\PhpTui\Screen\Capability;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Theme\BorderSide;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Theme\BorderSide;
/**
* The declaration behind {@see BorderCapableInterface}.
*
- * @package DrevOps\Tui\Screen\Capability
+ * @package DrevOps\PhpTui\Screen\Capability
*/
trait BorderCapableTrait {
diff --git a/src/Screen/Capability/ScrollCapableInterface.php b/src/Screen/Capability/ScrollCapableInterface.php
index 4ab7b402..a1564346 100644
--- a/src/Screen/Capability/ScrollCapableInterface.php
+++ b/src/Screen/Capability/ScrollCapableInterface.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen\Capability;
+namespace DrevOps\PhpTui\Screen\Capability;
/**
* A surface whose contents may overflow it and be scrolled through.
@@ -16,7 +16,7 @@
* offset indexes into is measured where things are drawn, and the driver
* moves it, so one rule keeps the cursor in sight whatever is moved.
*
- * @package DrevOps\Tui\Screen\Capability
+ * @package DrevOps\PhpTui\Screen\Capability
*/
interface ScrollCapableInterface {
diff --git a/src/Screen/Capability/ScrollCapableTrait.php b/src/Screen/Capability/ScrollCapableTrait.php
index d38fd62b..2663a758 100644
--- a/src/Screen/Capability/ScrollCapableTrait.php
+++ b/src/Screen/Capability/ScrollCapableTrait.php
@@ -2,12 +2,12 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen\Capability;
+namespace DrevOps\PhpTui\Screen\Capability;
/**
* Holds a surface's offset; scrollTo() throws for one that does not scroll.
*
- * @package DrevOps\Tui\Screen\Capability
+ * @package DrevOps\PhpTui\Screen\Capability
*/
trait ScrollCapableTrait {
diff --git a/src/Screen/Collector.php b/src/Screen/Collector.php
index 3685886f..140951b2 100644
--- a/src/Screen/Collector.php
+++ b/src/Screen/Collector.php
@@ -2,23 +2,23 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen;
-
-use DrevOps\Tui\Answers\Answers;
-use DrevOps\Tui\Answers\Provenance;
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Block\Option;
-use DrevOps\Tui\Block\Panel;
-use DrevOps\Tui\Block\Tree;
-use DrevOps\Tui\CollectException;
-use DrevOps\Tui\Condition\ConditionInterface;
-use DrevOps\Tui\Derive\Derive;
-use DrevOps\Tui\Derive\Deriver;
-use DrevOps\Tui\Discovery\DiscoverInterface;
-use DrevOps\Tui\Handler\Context;
-use DrevOps\Tui\Handler\HandlerRegistry;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Translation\Translator;
+namespace DrevOps\PhpTui\Screen;
+
+use DrevOps\PhpTui\Answers\Answers;
+use DrevOps\PhpTui\Answers\Provenance;
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Block\Option;
+use DrevOps\PhpTui\Block\Panel;
+use DrevOps\PhpTui\Block\Tree;
+use DrevOps\PhpTui\CollectException;
+use DrevOps\PhpTui\Condition\ConditionInterface;
+use DrevOps\PhpTui\Derive\Derive;
+use DrevOps\PhpTui\Derive\Deriver;
+use DrevOps\PhpTui\Discovery\DiscoverInterface;
+use DrevOps\PhpTui\Handler\Context;
+use DrevOps\PhpTui\Handler\HandlerRegistry;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Collects a form's answers with no screen at all.
@@ -45,7 +45,7 @@
* are not collected, not refused and not in the result, and they re-enter the
* settling the moment the condition holds again.
*
- * @package DrevOps\Tui\Screen
+ * @package DrevOps\PhpTui\Screen
*/
final class Collector {
@@ -65,7 +65,7 @@ final class Collector {
* context of its own retires this memo rather than leaving the collection
* convinced they are still its own.
*
- * @var array,run:array{string,bool,string},rows:list<\DrevOps\Tui\Block\Option>}>
+ * @var array,run:array{string,bool,string},rows:list<\DrevOps\PhpTui\Block\Option>}>
*/
protected array $memo = [];
@@ -77,11 +77,11 @@ final class Collector {
/**
* Construct a collector.
*
- * @param \DrevOps\Tui\Handler\HandlerRegistry|null $handlers
+ * @param \DrevOps\PhpTui\Handler\HandlerRegistry|null $handlers
* The registry resolving a field id to the behaviour reusable across every
* form that asks for that kind of answer, or NULL when nothing is reused
* and each field speaks only for itself.
- * @param \DrevOps\Tui\Builder\Fixup[] $fixups
+ * @param \DrevOps\PhpTui\Builder\Fixup[] $fixups
* The rules applied once the answers have settled. They belong to the form
* rather than to any one block, so they arrive beside the tree.
*/
@@ -93,18 +93,18 @@ public function __construct(?HandlerRegistry $handlers = NULL, protected array $
/**
* Collect a panel's answers.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to collect, and any panels beneath it.
* @param array $supplied
* Values supplied for its fields, keyed by field id.
- * @param \DrevOps\Tui\Handler\Context|null $context
+ * @param \DrevOps\PhpTui\Handler\Context|null $context
* The run this collection belongs to, or NULL for one that targets no
* directory and detects nothing.
*
* @return array
* The answers, keyed by field id.
*
- * @throws \DrevOps\Tui\CollectException
+ * @throws \DrevOps\PhpTui\CollectException
* When a supplied value is refused. The answers were asked for as a whole,
* so one that cannot be taken fails the whole collection.
*/
@@ -123,18 +123,18 @@ public function collect(Panel $panel, array $supplied = [], ?Context $context =
* set: every answer carries its provenance and a snapshot of its question, so
* a summary needs no form configuration to print.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to collect, and any panels beneath it.
* @param array $supplied
* Values supplied for its fields, keyed by field id.
- * @param \DrevOps\Tui\Handler\Context|null $context
+ * @param \DrevOps\PhpTui\Handler\Context|null $context
* The run this collection belongs to, or NULL for one that targets no
* directory and detects nothing.
*
- * @return \DrevOps\Tui\Answers\Answers
+ * @return \DrevOps\PhpTui\Answers\Answers
* The answers.
*
- * @throws \DrevOps\Tui\CollectException
+ * @throws \DrevOps\PhpTui\CollectException
* When a supplied value is refused. The answers were asked for as a whole,
* so one that cannot be taken fails the whole collection.
*/
@@ -152,7 +152,7 @@ public function answers(Panel $panel, array $supplied = [], ?Context $context =
* @param array{string,string}|null $refusal
* The field's id and the reason, or NULL when nothing is refused.
*
- * @throws \DrevOps\Tui\CollectException
+ * @throws \DrevOps\PhpTui\CollectException
* When there is a refusal to report.
*/
protected function refuse(?array $refusal): void {
@@ -176,15 +176,15 @@ protected function refuse(?array $refusal): void {
* it settled on - so a condition satisfied later surfaces a row that already
* knows its answer.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to resolve, and any panels beneath it.
* @param array $supplied
* Values supplied for its fields, keyed by field id.
- * @param \DrevOps\Tui\Handler\Context|null $context
+ * @param \DrevOps\PhpTui\Handler\Context|null $context
* The run this resolution belongs to, or NULL for one that targets no
* directory and detects nothing.
*
- * @return array{array,array,array}
+ * @return array{array,array,array}
* The settled values, how each came to be, and which fields are there.
*/
public function seed(Panel $panel, array $supplied = [], ?Context $context = NULL): array {
@@ -208,14 +208,14 @@ public function seed(Panel $panel, array $supplied = [], ?Context $context = NUL
* narrowed row set restates it rather than reporting it the way a supplied
* value is reported.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to settle, and any panels beneath it.
* @param array $values
* The answers as they now stand, keyed by field id.
* @param array $pinned
* The fields whose computed value must not be recomputed, keyed by field
* id: the ones somebody answered over the rule that computes them.
- * @param \DrevOps\Tui\Handler\Context|null $context
+ * @param \DrevOps\PhpTui\Handler\Context|null $context
* The run this collection belongs to, or NULL for one that targets no
* directory and detects nothing.
*
@@ -238,7 +238,7 @@ public function resettle(Panel $panel, array $values, array $pinned = [], ?Conte
* opens the panel, so a form does not pay on start-up for a list nobody has
* walked into yet.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel being opened; its own rows only, because a panel further in
* has not been opened.
* @param \Closure|null $waiting
@@ -281,18 +281,18 @@ public function reusable(string $id): array {
/**
* Settle every value, having first fetched the rows anyone is owed.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to collect.
* @param array $supplied
* Values supplied for its fields, keyed by field id.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The run this collection belongs to.
*
- * @return array{list<\DrevOps\Tui\Block\Field>,array,array,array}
+ * @return array{list<\DrevOps\PhpTui\Block\Field>,array,array,array}
* The fields in declaration order, the settled values, where each value
* came from, and which fields are there.
*
- * @throws \DrevOps\Tui\CollectException
+ * @throws \DrevOps\PhpTui\CollectException
* When a resolver or a source cannot answer.
*/
protected function fetched(Panel $panel, array $supplied, Context $context): array {
@@ -310,14 +310,14 @@ protected function fetched(Panel $panel, array $supplied, Context $context): arr
/**
* Resolve and settle every value, and work out who is there at all.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to collect.
* @param array $supplied
* Values supplied for its fields, keyed by field id.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The run this collection belongs to.
*
- * @return array{list<\DrevOps\Tui\Block\Field>,array,array,array}
+ * @return array{list<\DrevOps\PhpTui\Block\Field>,array,array,array}
* The fields in declaration order, the settled values, where each value
* came from, and which fields are there.
*/
@@ -335,9 +335,9 @@ protected function settle(Panel $panel, array $supplied, Context $context): arra
/**
* Whether each row the tree holds only shows something, keyed by id.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel being collected.
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields, in declaration order.
*
* @return array
@@ -356,14 +356,14 @@ protected function shows(Panel $panel, array $fields): array {
/**
* Resolve each field's initial value and where it came from.
*
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields, in declaration order.
* @param array $supplied
* Values supplied for its fields, keyed by field id.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The run this collection belongs to.
*
- * @return array{array,array}
+ * @return array{array,array}
* The values and their sources, each keyed by field id.
*/
protected function resolveAll(array $fields, array $supplied, Context $context): array {
@@ -383,14 +383,14 @@ protected function resolveAll(array $fields, array $supplied, Context $context):
/**
* Resolve one field's initial value and where it came from.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
* @param array $supplied
* Values supplied for its fields, keyed by field id.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The run this collection belongs to.
*
- * @return array{mixed,\DrevOps\Tui\Screen\Source}
+ * @return array{mixed,\DrevOps\PhpTui\Screen\Source}
* The value and its source.
*/
protected function resolveInitial(Field $field, array $supplied, Context $context): array {
@@ -416,9 +416,9 @@ protected function resolveInitial(Field $field, array $supplied, Context $contex
/**
* Detect a value that already exists outside the form.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The run this collection belongs to.
*
* @return mixed
@@ -447,7 +447,7 @@ protected function discoverValue(Field $field, Context $context): mixed {
* so one the field would refuse falls back to the default instead of
* poisoning the answers.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
* @param mixed $value
* The detected value.
@@ -475,11 +475,11 @@ protected function acceptsDetected(Field $field, mixed $value): bool {
* computed value are the form's own, and a detected one was measured when it
* was detected.
*
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields, in declaration order.
* @param array $values
* The resolved values keyed by field id.
- * @param array $sources
+ * @param array $sources
* Where each value came from, keyed by field id.
*
* @return array
@@ -501,12 +501,12 @@ protected function transformSupplied(array $fields, array $values, array $source
/**
* The rules computing values, and the fields whose value is pinned.
*
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields, in declaration order.
- * @param array $sources
+ * @param array $sources
* Where each value came from, keyed by field id.
*
- * @return array{array,array}
+ * @return array{array,array}
* The rules and the pinned map, each keyed by field id.
*/
protected function deriveRules(array $fields, array $sources): array {
@@ -523,10 +523,10 @@ protected function deriveRules(array $fields, array $sources): array {
/**
* The rules computing a value, keyed by the field each computes.
*
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields, in declaration order.
*
- * @return array
+ * @return array
* The rules.
*/
protected function ruleMap(array $fields): array {
@@ -546,7 +546,7 @@ protected function ruleMap(array $fields): array {
/**
* The fields whose value was supplied, keyed by field id.
*
- * @param array $sources
+ * @param array $sources
* Where each value came from, keyed by field id.
*
* @return array
@@ -559,19 +559,19 @@ protected function suppliedFields(array $sources): array {
/**
* Settle computed values, who is there at all, and the fix-ups.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel being collected.
* @param array $shows
* Whether each row the tree holds only shows something, keyed by id.
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields, in declaration order.
* @param array $values
* The resolved values keyed by field id.
- * @param array $rules
+ * @param array $rules
* The rules computing a value, keyed by field id.
* @param array $pinned
* The fields whose value must not be recomputed, keyed by field id.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The run this collection belongs to.
* @param array $supplied
* The fields whose value was supplied, keyed by field id.
@@ -626,7 +626,7 @@ protected function stabilize(Panel $panel, array $shows, array $fields, array $v
/**
* Resolve each field's rows once, replacing the loader that owed them.
*
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields, in declaration order.
*/
protected function loadOptions(array $fields): void {
@@ -650,13 +650,13 @@ protected function loadOptions(array $fields): void {
* supplied is left alone for the refusal to report, rather than disappearing
* without a word.
*
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields, in declaration order.
* @param array $values
* The current values keyed by field id.
* @param array $active
* Which fields are there, keyed by field id.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The run this collection belongs to.
* @param array $supplied
* The fields whose value was supplied, keyed by field id.
@@ -664,7 +664,7 @@ protected function loadOptions(array $fields): void {
* @return array
* The values, restated against the resolved rows.
*
- * @throws \DrevOps\Tui\CollectException
+ * @throws \DrevOps\PhpTui\CollectException
* When a resolver cannot answer.
*/
protected function resolveOptions(array $fields, array $values, array $active, Context $context, array $supplied): array {
@@ -723,14 +723,14 @@ protected function resolveOptions(array $fields, array $values, array $active, C
* minimum query length does not apply, because it throttles typing rather
* than a single lookup.
*
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields, in declaration order.
* @param array $values
* The settled values keyed by field id.
* @param array $active
* Which fields are there, keyed by field id.
*
- * @throws \DrevOps\Tui\CollectException
+ * @throws \DrevOps\PhpTui\CollectException
* When a source cannot answer.
*/
protected function loadQueryOptions(array $fields, array $values, array $active): void {
@@ -774,7 +774,7 @@ protected function loadQueryOptions(array $fields, array $values, array $active)
/**
* The queries that look a field's supplied value up, one per item.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
* @param mixed $value
* The settled value.
@@ -798,12 +798,12 @@ protected function queriesFor(Field $field, mixed $value): array {
/**
* The error for consumer row code that could not answer.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field whose rows were being resolved.
* @param \Throwable $throwable
* What the consumer code threw.
*
- * @return \DrevOps\Tui\CollectException
+ * @return \DrevOps\PhpTui\CollectException
* The error naming the field.
*/
protected function optionsError(Field $field, \Throwable $throwable): CollectException {
@@ -858,11 +858,11 @@ protected function applyFixups(array $shows, array $values, array $answers): arr
* Only supplied values are measured: a default and a computed value are the
* form's own, and a detected one was measured when it was detected.
*
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields, in declaration order.
* @param array $values
* The settled values keyed by field id.
- * @param array $sources
+ * @param array $sources
* Where each value came from, keyed by field id.
* @param array $active
* Which fields are there, keyed by field id.
@@ -897,7 +897,7 @@ protected function refusal(array $fields, array $values, array $sources, array $
* letting NULL read as a wrong shape; the shape follows, so what is measured
* afterwards is a value of the kind the field collects.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
* @param mixed $value
* The value.
@@ -922,7 +922,7 @@ protected function rejects(Field $field, mixed $value): ?string {
/**
* The values of the fields that are there, in declaration order.
*
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields, in declaration order.
* @param array $values
* The current values keyed by field id.
@@ -947,14 +947,14 @@ protected function activeAnswers(array $fields, array $values, array $active): a
/**
* How each answer came to be, keyed by field id.
*
- * @param list<\DrevOps\Tui\Block\Field> $fields
+ * @param list<\DrevOps\PhpTui\Block\Field> $fields
* The fields, in declaration order.
- * @param array $sources
+ * @param array $sources
* Where each value came from, keyed by field id.
* @param array $active
* Which fields are there, keyed by field id.
*
- * @return array
+ * @return array
* The provenance of each answer.
*/
protected function provenance(array $fields, array $sources, array $active): array {
diff --git a/src/Screen/Ending.php b/src/Screen/Ending.php
index a5d12f48..a33a3f5b 100644
--- a/src/Screen/Ending.php
+++ b/src/Screen/Ending.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen;
+namespace DrevOps\PhpTui\Screen;
/**
* The two ways a form ends from the buttons that end it.
@@ -10,7 +10,7 @@
* Finishing it answers for the fields that are owed an answer; abandoning it
* never does, and that is the whole of the difference between them.
*
- * @package DrevOps\Tui\Screen
+ * @package DrevOps\PhpTui\Screen
*/
enum Ending: string {
diff --git a/src/Screen/ExternalEditor.php b/src/Screen/ExternalEditor.php
index dbfe69d3..b78ce54c 100644
--- a/src/Screen/ExternalEditor.php
+++ b/src/Screen/ExternalEditor.php
@@ -2,10 +2,10 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen;
+namespace DrevOps\PhpTui\Screen;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Terminal\Terminal;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Terminal\Terminal;
/**
* Hands a text buffer off to the user's $EDITOR and captures the result.
@@ -16,7 +16,7 @@
* process spawn is the one seam that touches the real TTY and is excluded from
* coverage; everything around it is testable.
*
- * @package DrevOps\Tui\Screen
+ * @package DrevOps\PhpTui\Screen
*/
class ExternalEditor {
@@ -57,7 +57,7 @@ public function isAvailable(): bool {
*
* @param string $initial
* The buffer the editor opens with.
- * @param \DrevOps\Tui\Terminal\Terminal|null $terminal
+ * @param \DrevOps\PhpTui\Terminal\Terminal|null $terminal
* The terminal to suspend around the editor, or NULL to leave terminal
* state untouched (the editor still runs).
*
diff --git a/src/Screen/Furniture.php b/src/Screen/Furniture.php
index 5c9f212b..114c6bae 100644
--- a/src/Screen/Furniture.php
+++ b/src/Screen/Furniture.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen;
+namespace DrevOps\PhpTui\Screen;
/**
* A piece of the standard furniture a session puts on a screen.
@@ -13,7 +13,7 @@
* meant for it. So the layout answers instead, one piece at a time, and a
* layout that keeps no place for a piece says so rather than being guessed at.
*
- * @package DrevOps\Tui\Screen
+ * @package DrevOps\PhpTui\Screen
*/
enum Furniture {
diff --git a/src/Screen/KeyRouter.php b/src/Screen/KeyRouter.php
index 5f5fef2e..7cbefe07 100644
--- a/src/Screen/KeyRouter.php
+++ b/src/Screen/KeyRouter.php
@@ -2,20 +2,20 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen;
-
-use DrevOps\Tui\Block\Capability\BindCapableInterface;
-use DrevOps\Tui\Block\Capability\DependCapableInterface;
-use DrevOps\Tui\Block\Capability\FocusCapableInterface;
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Block\Legend;
-use DrevOps\Tui\Block\Mode;
-use DrevOps\Tui\Block\Panel;
-use DrevOps\Tui\Block\Tree;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyMap;
-use DrevOps\Tui\Input\ScopedKeyMap;
+namespace DrevOps\PhpTui\Screen;
+
+use DrevOps\PhpTui\Block\Capability\BindCapableInterface;
+use DrevOps\PhpTui\Block\Capability\DependCapableInterface;
+use DrevOps\PhpTui\Block\Capability\FocusCapableInterface;
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Block\Legend;
+use DrevOps\PhpTui\Block\Mode;
+use DrevOps\PhpTui\Block\Panel;
+use DrevOps\PhpTui\Block\Tree;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyMap;
+use DrevOps\PhpTui\Input\ScopedKeyMap;
/**
* Sends a key to the innermost thing that binds it.
@@ -32,7 +32,7 @@
* past it: until you have gone into it, it is a row rather than somewhere you
* are.
*
- * @package DrevOps\Tui\Screen
+ * @package DrevOps\PhpTui\Screen
*/
final class KeyRouter {
@@ -54,21 +54,21 @@ final class KeyRouter {
/**
* The panels left behind on the way in, with the row each was left on.
*
- * @var list
+ * @var list
*/
protected array $trail = [];
/**
* The blocks a session draws beside a panel, keyed by the panel.
*
- * @var array>
+ * @var array>
*/
protected array $furniture = [];
/**
* Construct a key router.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel it moves around, which is the panel you are in.
*/
public function __construct(protected Panel $panel) {
@@ -87,7 +87,7 @@ public function __construct(protected Panel $panel) {
/**
* Make every block in the panel answer to one set of bindings.
*
- * @param \DrevOps\Tui\Input\KeyMap $keys
+ * @param \DrevOps\PhpTui\Input\KeyMap $keys
* The resolved bindings for the whole form.
*
* @return $this
@@ -107,9 +107,9 @@ public function bind(KeyMap $keys): self {
* panel alone. It reaches them last, after everything the panel holds,
* because that is where they are drawn.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel they stand beside.
- * @param \DrevOps\Tui\Block\Capability\FocusCapableInterface ...$blocks
+ * @param \DrevOps\PhpTui\Block\Capability\FocusCapableInterface ...$blocks
* The blocks.
*
* @return $this
@@ -125,7 +125,7 @@ public function furnish(Panel $panel, FocusCapableInterface ...$blocks): self {
/**
* The panel you are in.
*
- * @return \DrevOps\Tui\Block\Panel
+ * @return \DrevOps\PhpTui\Block\Panel
* The panel, which is whichever one was gone into last.
*/
public function current(): Panel {
@@ -148,7 +148,7 @@ public function trail(): array {
/**
* The block the cursor is on.
*
- * @return \DrevOps\Tui\Block\Capability\FocusCapableInterface|null
+ * @return \DrevOps\PhpTui\Block\Capability\FocusCapableInterface|null
* The block, or NULL when nothing in the panel takes focus.
*/
public function focused(): ?FocusCapableInterface {
@@ -158,7 +158,7 @@ public function focused(): ?FocusCapableInterface {
/**
* The innermost thing a key reaches right now.
*
- * @return \DrevOps\Tui\Block\Capability\BindCapableInterface
+ * @return \DrevOps\PhpTui\Block\Capability\BindCapableInterface
* The open block under the cursor, else the panel around it.
*/
public function binder(): BindCapableInterface {
@@ -170,7 +170,7 @@ public function binder(): BindCapableInterface {
/**
* The keys that apply right now.
*
- * @return \DrevOps\Tui\Input\ScopedKeyMap
+ * @return \DrevOps\PhpTui\Input\ScopedKeyMap
* The innermost binder's bindings.
*/
public function bindings(): ScopedKeyMap {
@@ -180,7 +180,7 @@ public function bindings(): ScopedKeyMap {
/**
* What those keys do, as labelled fragments.
*
- * @return list<\DrevOps\Tui\Input\Hint>
+ * @return list<\DrevOps\PhpTui\Input\Hint>
* The fragments.
*/
public function hints(): array {
@@ -190,10 +190,10 @@ public function hints(): array {
/**
* Rewrite a legend from the keys that apply right now.
*
- * @param \DrevOps\Tui\Block\Legend $legend
+ * @param \DrevOps\PhpTui\Block\Legend $legend
* The legend.
*
- * @return \DrevOps\Tui\Block\Legend
+ * @return \DrevOps\PhpTui\Block\Legend
* The same legend, now advertising the innermost binder's keys.
*/
public function refresh(Legend $legend): Legend {
@@ -213,7 +213,7 @@ public function isShowingHelp(): bool {
/**
* The field whose help is showing.
*
- * @return \DrevOps\Tui\Block\Field|null
+ * @return \DrevOps\PhpTui\Block\Field|null
* The field, or NULL when none is showing.
*/
public function helping(): ?Field {
@@ -260,7 +260,7 @@ public function resurface(): void {
/**
* Send a key where it belongs.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key.
*/
public function handle(Key $key): void {
@@ -290,9 +290,9 @@ public function handle(Key $key): void {
/**
* Handle a key that travelled outward to the panel.
*
- * @param \DrevOps\Tui\Block\Capability\FocusCapableInterface|null $focused
+ * @param \DrevOps\PhpTui\Block\Capability\FocusCapableInterface|null $focused
* The block with the cursor, if any has it.
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key.
*/
protected function inPanel(?FocusCapableInterface $focused, Key $key): void {
@@ -344,7 +344,7 @@ protected function inPanel(?FocusCapableInterface $focused, Key $key): void {
/**
* Do what selecting the block under the cursor does.
*
- * @param \DrevOps\Tui\Block\Capability\FocusCapableInterface|null $focused
+ * @param \DrevOps\PhpTui\Block\Capability\FocusCapableInterface|null $focused
* The block with the cursor, if any has it.
*/
protected function activate(?FocusCapableInterface $focused): void {
@@ -362,7 +362,7 @@ protected function activate(?FocusCapableInterface $focused): void {
/**
* Go into a nested panel, so the screen becomes its contents.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to go into.
*/
protected function descend(Panel $panel): void {
@@ -674,7 +674,7 @@ protected function settle(): void {
/**
* Every block on the form the cursor can be on, wherever that is.
*
- * @return list<\DrevOps\Tui\Block\Capability\FocusCapableInterface>
+ * @return list<\DrevOps\PhpTui\Block\Capability\FocusCapableInterface>
* The blocks: everything every panel of the form holds, and everything a
* session draws beside one of them.
*/
@@ -703,9 +703,9 @@ protected function everywhere(): array {
/**
* Make a panel and everything in it answer to one set of bindings.
*
- * @param \DrevOps\Tui\Input\KeyMap $keys
+ * @param \DrevOps\PhpTui\Input\KeyMap $keys
* The resolved bindings.
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel to spread them through.
*/
protected function rebind(KeyMap $keys, Panel $panel): void {
@@ -729,7 +729,7 @@ protected function rebind(KeyMap $keys, Panel $panel): void {
/**
* The blocks the cursor can land on, in the order they are drawn.
*
- * @return list<\DrevOps\Tui\Block\Capability\FocusCapableInterface>
+ * @return list<\DrevOps\PhpTui\Block\Capability\FocusCapableInterface>
* The blocks: everything the panel you are in holds, then whatever the
* session draws beside it.
*/
@@ -748,7 +748,7 @@ protected function focusable(): array {
/**
* The blocks the cursor can land on, region by region.
*
- * @return array>
+ * @return array>
* The blocks, keyed by the region they are drawn in, in declaration order.
*/
protected function held(): array {
diff --git a/src/Screen/Layout/AbstractLayout.php b/src/Screen/Layout/AbstractLayout.php
index d263141a..cedf27f0 100644
--- a/src/Screen/Layout/AbstractLayout.php
+++ b/src/Screen/Layout/AbstractLayout.php
@@ -2,15 +2,15 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen\Layout;
+namespace DrevOps\PhpTui\Screen\Layout;
-use DrevOps\Tui\Block\Element\ChromeElementsInterface;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Screen\Axis;
-use DrevOps\Tui\Screen\Capability\ScrollCapableTrait;
-use DrevOps\Tui\Screen\Furniture;
-use DrevOps\Tui\Screen\Region;
-use DrevOps\Tui\Screen\Sizing;
+use DrevOps\PhpTui\Block\Element\ChromeElementsInterface;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Capability\ScrollCapableTrait;
+use DrevOps\PhpTui\Screen\Furniture;
+use DrevOps\PhpTui\Screen\Region;
+use DrevOps\PhpTui\Screen\Sizing;
/**
* The sizing arithmetic every layout inherits, and the conventional names.
@@ -23,7 +23,7 @@
* how big it is - its siblings' fixed cells come off the top before the
* remainder is divided, and only the layout sees them all.
*
- * @package DrevOps\Tui\Screen\Layout
+ * @package DrevOps\PhpTui\Screen\Layout
*/
abstract class AbstractLayout implements LayoutInterface {
@@ -47,14 +47,14 @@ abstract class AbstractLayout implements LayoutInterface {
/**
* The regions, keyed by name, in declaration order.
*
- * @var array
+ * @var array
*/
protected array $regions = [];
/**
* Construct a layout.
*
- * @param \DrevOps\Tui\Screen\Axis $axis
+ * @param \DrevOps\PhpTui\Screen\Axis $axis
* The direction its regions run.
*/
public function __construct(protected Axis $axis) {
@@ -77,7 +77,7 @@ public function names(): array {
/**
* {@inheritdoc}
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the region name is unknown.
*/
public function in(string $name): Region {
@@ -215,10 +215,10 @@ public function share(int $available, int $count, ChromeElementsInterface $chrom
* @param string $name
* The name a block addresses it by.
*
- * @return \DrevOps\Tui\Screen\Region
+ * @return \DrevOps\PhpTui\Screen\Region
* The region, for declaring its size, flow and scrolling.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the region name is already declared.
*/
protected function region(string $name): Region {
diff --git a/src/Screen/Layout/DefaultLayout.php b/src/Screen/Layout/DefaultLayout.php
index 7bc87357..b5a77cd8 100644
--- a/src/Screen/Layout/DefaultLayout.php
+++ b/src/Screen/Layout/DefaultLayout.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen\Layout;
+namespace DrevOps\PhpTui\Screen\Layout;
-use DrevOps\Tui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Axis;
/**
* Three regions stacked, with the middle one scrolling.
@@ -12,7 +12,7 @@
* The header and the footer are one row each whatever the terminal height,
* which no share can say, and the content takes whatever is left.
*
- * @package DrevOps\Tui\Screen\Layout
+ * @package DrevOps\PhpTui\Screen\Layout
*/
final class DefaultLayout extends AbstractLayout {
diff --git a/src/Screen/Layout/GridLayout.php b/src/Screen/Layout/GridLayout.php
index 9cae824c..060c14f7 100644
--- a/src/Screen/Layout/GridLayout.php
+++ b/src/Screen/Layout/GridLayout.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen\Layout;
+namespace DrevOps\PhpTui\Screen\Layout;
-use DrevOps\Tui\Block\Element\ChromeElementsInterface;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Screen\Axis;
+use DrevOps\PhpTui\Block\Element\ChromeElementsInterface;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Screen\Axis;
/**
* Windows dealt into visual rows, each row sharing the width between them.
@@ -34,7 +34,7 @@
* by name: two grids of different shapes are different arrangements, and a name
* carries no shape. It is built where the shape is written.
*
- * @package DrevOps\Tui\Screen\Layout
+ * @package DrevOps\PhpTui\Screen\Layout
*/
final class GridLayout extends AbstractLayout {
@@ -74,7 +74,7 @@ final class GridLayout extends AbstractLayout {
* One entry per visual row, naming how many windows share it, top to
* bottom.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When no visual row is declared, or one of them holds fewer than one
* window - a row nothing could ever be dealt into.
*/
@@ -175,7 +175,7 @@ public function windows(): array {
* @param string $owner
* What declared the grid, as the name it goes by.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the windows do not cover the panels, which would leave one of them
* undrawn or a row of the grid empty.
*/
diff --git a/src/Screen/Layout/LayoutInterface.php b/src/Screen/Layout/LayoutInterface.php
index 90796efa..44fa93d3 100644
--- a/src/Screen/Layout/LayoutInterface.php
+++ b/src/Screen/Layout/LayoutInterface.php
@@ -2,13 +2,13 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen\Layout;
+namespace DrevOps\PhpTui\Screen\Layout;
-use DrevOps\Tui\Block\Element\ChromeElementsInterface;
-use DrevOps\Tui\Screen\Axis;
-use DrevOps\Tui\Screen\Capability\ScrollCapableInterface;
-use DrevOps\Tui\Screen\Furniture;
-use DrevOps\Tui\Screen\Region;
+use DrevOps\PhpTui\Block\Element\ChromeElementsInterface;
+use DrevOps\PhpTui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Capability\ScrollCapableInterface;
+use DrevOps\PhpTui\Screen\Furniture;
+use DrevOps\PhpTui\Screen\Region;
/**
* An arrangement of named regions along one axis.
@@ -30,14 +30,14 @@
*
* {@see AbstractLayout} carries the sizing arithmetic every layout inherits.
*
- * @package DrevOps\Tui\Screen\Layout
+ * @package DrevOps\PhpTui\Screen\Layout
*/
interface LayoutInterface extends ScrollCapableInterface {
/**
* The direction this layout's regions run.
*
- * @return \DrevOps\Tui\Screen\Axis
+ * @return \DrevOps\PhpTui\Screen\Axis
* The axis.
*/
public function axis(): Axis;
@@ -56,7 +56,7 @@ public function names(): array;
* @param string $name
* The region name.
*
- * @return \DrevOps\Tui\Screen\Region
+ * @return \DrevOps\PhpTui\Screen\Region
* The region.
*/
public function in(string $name): Region;
@@ -64,7 +64,7 @@ public function in(string $name): Region;
/**
* The region a piece of the standard furniture goes in.
*
- * @param \DrevOps\Tui\Screen\Furniture $piece
+ * @param \DrevOps\PhpTui\Screen\Furniture $piece
* The piece.
*
* @return string|null
@@ -118,7 +118,7 @@ public function lines(): array;
* The cells across the line.
* @param int $count
* How many regions share it.
- * @param \DrevOps\Tui\Block\Element\ChromeElementsInterface $chrome
+ * @param \DrevOps\PhpTui\Block\Element\ChromeElementsInterface $chrome
* The theme, for the gutter left between two things drawn side by side:
* an arrangement cannot divide a width without knowing what the air
* between the pieces costs, and how wide that air is is the theme's.
diff --git a/src/Screen/Layout/LayoutManager.php b/src/Screen/Layout/LayoutManager.php
index ccd75400..0ac9f024 100644
--- a/src/Screen/Layout/LayoutManager.php
+++ b/src/Screen/Layout/LayoutManager.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen\Layout;
+namespace DrevOps\PhpTui\Screen\Layout;
use AlexSkrypnyk\Str2Name\Str2Name;
@@ -20,7 +20,7 @@
* nothing else, so an arrangement built from anything a name cannot carry is
* reached none of these ways: it is built where that something is written.
*
- * @package DrevOps\Tui\Screen\Layout
+ * @package DrevOps\PhpTui\Screen\Layout
*/
final class LayoutManager {
@@ -32,14 +32,14 @@ final class LayoutManager {
/**
* The shipped layouts, keyed by name, once the directory has been read.
*
- * @var array>|null
+ * @var array>|null
*/
protected static ?array $shipped = NULL;
/**
* The layouts a consumer registered, keyed by name.
*
- * @var array>
+ * @var array>
*/
protected static array $registry = [];
@@ -61,7 +61,7 @@ public static function register(string $name, string $class): void {
* @param string $name
* A shipped name, a registered name, or a layout class name.
*
- * @return \DrevOps\Tui\Screen\Layout\LayoutInterface
+ * @return \DrevOps\PhpTui\Screen\Layout\LayoutInterface
* The layout.
*/
public static function create(string $name = 'default'): LayoutInterface {
@@ -100,7 +100,7 @@ public static function reset(): void {
/**
* The layouts that ship, keyed by the name a form picks them by.
*
- * @return array>
+ * @return array>
* The classes, keyed by name.
*/
protected static function shipped(): array {
@@ -156,7 +156,7 @@ protected static function name(string $short): string {
* @param string $class
* The class name.
*
- * @return class-string<\DrevOps\Tui\Screen\Layout\LayoutInterface>
+ * @return class-string<\DrevOps\PhpTui\Screen\Layout\LayoutInterface>
* The class.
*/
protected static function vouch(string $class): string {
diff --git a/src/Screen/Layout/PanelLayout.php b/src/Screen/Layout/PanelLayout.php
index 107fe418..0bc92643 100644
--- a/src/Screen/Layout/PanelLayout.php
+++ b/src/Screen/Layout/PanelLayout.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen\Layout;
+namespace DrevOps\PhpTui\Screen\Layout;
-use DrevOps\Tui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Axis;
/**
* One scrolling region, which is what a panel is most of the time.
@@ -13,7 +13,7 @@
* declare one - so it ships as a class a panel reaches for rather than as a
* name a form picks, which would suggest a choice where there is none.
*
- * @package DrevOps\Tui\Screen\Layout
+ * @package DrevOps\PhpTui\Screen\Layout
*/
final class PanelLayout extends AbstractLayout {
diff --git a/src/Screen/Layout/TwoColumnLayout.php b/src/Screen/Layout/TwoColumnLayout.php
index 6c2e0026..5c9fc024 100644
--- a/src/Screen/Layout/TwoColumnLayout.php
+++ b/src/Screen/Layout/TwoColumnLayout.php
@@ -2,14 +2,14 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen\Layout;
+namespace DrevOps\PhpTui\Screen\Layout;
-use DrevOps\Tui\Screen\Axis;
+use DrevOps\PhpTui\Screen\Axis;
/**
* Two regions side by side, sharing the width evenly.
*
- * @package DrevOps\Tui\Screen\Layout
+ * @package DrevOps\PhpTui\Screen\Layout
*/
final class TwoColumnLayout extends AbstractLayout {
diff --git a/src/Screen/Overlay.php b/src/Screen/Overlay.php
index b7f82a64..e22ccb70 100644
--- a/src/Screen/Overlay.php
+++ b/src/Screen/Overlay.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen;
+namespace DrevOps\PhpTui\Screen;
-use DrevOps\Tui\Theme\HAlign;
-use DrevOps\Tui\Theme\VAlign;
-use DrevOps\Tui\Utils\Strings;
+use DrevOps\PhpTui\Theme\HAlign;
+use DrevOps\PhpTui\Theme\VAlign;
+use DrevOps\PhpTui\Utils\Strings;
/**
* Pure line-compositor: splice a box of lines over a backdrop, centered.
@@ -19,7 +19,7 @@
* verbatim. A caller styles the exposed backdrop (typically dimming it) through
* the supplied callback.
*
- * @package DrevOps\Tui\Screen
+ * @package DrevOps\PhpTui\Screen
*/
final class Overlay {
@@ -53,9 +53,9 @@ public static function center(int $area_columns, int $area_rows, int $box_width,
* The box's width in columns.
* @param int $box_height
* The box's height in rows.
- * @param \DrevOps\Tui\Theme\HAlign $halign
+ * @param \DrevOps\PhpTui\Theme\HAlign $halign
* The horizontal alignment of the box within the area.
- * @param \DrevOps\Tui\Theme\VAlign $valign
+ * @param \DrevOps\PhpTui\Theme\VAlign $valign
* The vertical alignment of the box within the area.
*
* @return array{int,int}
diff --git a/src/Screen/Region.php b/src/Screen/Region.php
index 45c5697c..c4672d63 100644
--- a/src/Screen/Region.php
+++ b/src/Screen/Region.php
@@ -2,14 +2,14 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen;
+namespace DrevOps\PhpTui\Screen;
-use DrevOps\Tui\Block\BlockInterface;
-use DrevOps\Tui\FormException;
-use DrevOps\Tui\Screen\Capability\BorderCapableInterface;
-use DrevOps\Tui\Screen\Capability\BorderCapableTrait;
-use DrevOps\Tui\Screen\Capability\ScrollCapableInterface;
-use DrevOps\Tui\Screen\Capability\ScrollCapableTrait;
+use DrevOps\PhpTui\Block\BlockInterface;
+use DrevOps\PhpTui\FormException;
+use DrevOps\PhpTui\Screen\Capability\BorderCapableInterface;
+use DrevOps\PhpTui\Screen\Capability\BorderCapableTrait;
+use DrevOps\PhpTui\Screen\Capability\ScrollCapableInterface;
+use DrevOps\PhpTui\Screen\Capability\ScrollCapableTrait;
/**
* A named container inside a layout.
@@ -26,7 +26,7 @@
* content-sized region's extent is counted where blocks are drawn, and the
* layout is handed the number.
*
- * @package DrevOps\Tui\Screen
+ * @package DrevOps\PhpTui\Screen
*/
final class Region implements BorderCapableInterface, ScrollCapableInterface {
@@ -56,14 +56,14 @@ final class Region implements BorderCapableInterface, ScrollCapableInterface {
/**
* The blocks packed from the start of its flow, in the order they were added.
*
- * @var list<\DrevOps\Tui\Block\BlockInterface>
+ * @var list<\DrevOps\PhpTui\Block\BlockInterface>
*/
protected array $head = [];
/**
* The blocks packed from the end of its flow, in the order they were added.
*
- * @var list<\DrevOps\Tui\Block\BlockInterface>
+ * @var list<\DrevOps\PhpTui\Block\BlockInterface>
*/
protected array $tail = [];
@@ -97,7 +97,7 @@ public function name(): string {
* @return $this
* The region.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the cell count is 0 or negative.
*/
public function fixed(int $cells): self {
@@ -123,7 +123,7 @@ public function fixed(int $cells): self {
* @return $this
* The region.
*
- * @throws \DrevOps\Tui\FormException
+ * @throws \DrevOps\PhpTui\FormException
* When the share is 0 or negative.
*/
public function flex(int $share): self {
@@ -156,7 +156,7 @@ public function content(): self {
/**
* How this region's share of the axis is determined.
*
- * @return \DrevOps\Tui\Screen\Sizing
+ * @return \DrevOps\PhpTui\Screen\Sizing
* The kind.
*/
public function sizing(): Sizing {
@@ -176,7 +176,7 @@ public function size(): int {
/**
* Run the blocks inside this region along an axis.
*
- * @param \DrevOps\Tui\Screen\Axis $axis
+ * @param \DrevOps\PhpTui\Screen\Axis $axis
* The direction they run.
*
* @return $this
@@ -191,7 +191,7 @@ public function flow(Axis $axis): self {
/**
* The direction the blocks inside this region run.
*
- * @return \DrevOps\Tui\Screen\Axis
+ * @return \DrevOps\PhpTui\Screen\Axis
* The direction.
*/
public function flowAxis(): Axis {
@@ -228,7 +228,7 @@ public function isPreviewing(): bool {
/**
* Draw a block in this region.
*
- * @param \DrevOps\Tui\Block\BlockInterface $block
+ * @param \DrevOps\PhpTui\Block\BlockInterface $block
* The block.
*
* @return $this
@@ -243,7 +243,7 @@ public function add(BlockInterface $block): self {
/**
* Draw a block before everything already in this region.
*
- * @param \DrevOps\Tui\Block\BlockInterface $block
+ * @param \DrevOps\PhpTui\Block\BlockInterface $block
* The block.
*
* @return $this
@@ -261,7 +261,7 @@ public function prepend(BlockInterface $block): self {
* Where {@see self::add()} packs from the start of the axis the blocks run
* along, this packs from the end of it.
*
- * @param \DrevOps\Tui\Block\BlockInterface $block
+ * @param \DrevOps\PhpTui\Block\BlockInterface $block
* The block.
*
* @return $this
@@ -276,7 +276,7 @@ public function tail(BlockInterface $block): self {
/**
* The blocks drawn in this region, in the order they are drawn.
*
- * @return list<\DrevOps\Tui\Block\BlockInterface>
+ * @return list<\DrevOps\PhpTui\Block\BlockInterface>
* The blocks packed from the start, then the ones packed from the end.
*/
public function blocks(): array {
@@ -286,7 +286,7 @@ public function blocks(): array {
/**
* The blocks packed from the start of this region's flow.
*
- * @return list<\DrevOps\Tui\Block\BlockInterface>
+ * @return list<\DrevOps\PhpTui\Block\BlockInterface>
* The blocks.
*/
public function headBlocks(): array {
@@ -296,7 +296,7 @@ public function headBlocks(): array {
/**
* The blocks packed from the end of this region's flow.
*
- * @return list<\DrevOps\Tui\Block\BlockInterface>
+ * @return list<\DrevOps\PhpTui\Block\BlockInterface>
* The blocks; empty when none were packed from the end.
*/
public function tailBlocks(): array {
diff --git a/src/Screen/Screen.php b/src/Screen/Screen.php
index 0698d80b..d97fd8ea 100644
--- a/src/Screen/Screen.php
+++ b/src/Screen/Screen.php
@@ -2,11 +2,11 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen;
+namespace DrevOps\PhpTui\Screen;
-use DrevOps\Tui\Screen\Capability\BorderCapableInterface;
-use DrevOps\Tui\Screen\Capability\BorderCapableTrait;
-use DrevOps\Tui\Screen\Layout\LayoutInterface;
+use DrevOps\PhpTui\Screen\Capability\BorderCapableInterface;
+use DrevOps\PhpTui\Screen\Capability\BorderCapableTrait;
+use DrevOps\PhpTui\Screen\Layout\LayoutInterface;
/**
* The root: one layout, and whether the frame takes the whole terminal.
@@ -15,7 +15,7 @@
* about the terminal, not about any arrangement inside it - which is what makes
* a layout portable between a frame that stretches and one that shrinks.
*
- * @package DrevOps\Tui\Screen
+ * @package DrevOps\PhpTui\Screen
*/
final class Screen implements BorderCapableInterface {
@@ -34,7 +34,7 @@ final class Screen implements BorderCapableInterface {
/**
* Arrange this screen with a layout.
*
- * @param \DrevOps\Tui\Screen\Layout\LayoutInterface $layout
+ * @param \DrevOps\PhpTui\Screen\Layout\LayoutInterface $layout
* The layout.
*
* @return $this
@@ -49,7 +49,7 @@ public function layout(LayoutInterface $layout): self {
/**
* The layout arranging this screen.
*
- * @return \DrevOps\Tui\Screen\Layout\LayoutInterface
+ * @return \DrevOps\PhpTui\Screen\Layout\LayoutInterface
* The layout.
*/
public function currentLayout(): LayoutInterface {
@@ -88,7 +88,7 @@ public function isFullscreen(): bool {
* @param string $name
* The region name.
*
- * @return \DrevOps\Tui\Screen\Region
+ * @return \DrevOps\PhpTui\Screen\Region
* The region.
*/
public function in(string $name): Region {
diff --git a/src/Screen/ScreenController.php b/src/Screen/ScreenController.php
index 06ef365c..7e9772d4 100644
--- a/src/Screen/ScreenController.php
+++ b/src/Screen/ScreenController.php
@@ -2,49 +2,49 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen;
-
-use DrevOps\Tui\Answers\Answers;
-use DrevOps\Tui\Answers\Provenance;
-use DrevOps\Tui\Block\Actions;
-use DrevOps\Tui\Block\BlockInterface;
-use DrevOps\Tui\Block\Breadcrumb;
-use DrevOps\Tui\Block\Capability\DependCapableInterface;
-use DrevOps\Tui\Block\Field;
-use DrevOps\Tui\Block\Legend;
-use DrevOps\Tui\Block\Markup;
-use DrevOps\Tui\Block\Mode;
-use DrevOps\Tui\Block\Option;
-use DrevOps\Tui\Block\OptionType;
-use DrevOps\Tui\Block\Panel;
-use DrevOps\Tui\Block\Progress;
-use DrevOps\Tui\Block\RenderMode;
-use DrevOps\Tui\Block\Tree;
-use DrevOps\Tui\CancelException;
-use DrevOps\Tui\Derive\Derive;
-use DrevOps\Tui\Field\Capability\ExternalEditCapableInterface;
-use DrevOps\Tui\Field\Capability\QueryOptionsCapableInterface;
-use DrevOps\Tui\Handler\Context;
-use DrevOps\Tui\Input\Action;
-use DrevOps\Tui\Input\Hint;
-use DrevOps\Tui\Input\Key;
-use DrevOps\Tui\Input\KeyMap;
-use DrevOps\Tui\Input\KeyMapManager;
-use DrevOps\Tui\Input\KeyName;
-use DrevOps\Tui\Input\KeyParser;
-use DrevOps\Tui\InterruptException;
-use DrevOps\Tui\Primitive\Element\PrimitiveElementsInterface;
-use DrevOps\Tui\Primitive\ProgressReporter;
-use DrevOps\Tui\Primitive\Status;
-use DrevOps\Tui\Screen\Layout\DefaultLayout;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Terminal\Box;
-use DrevOps\Tui\Terminal\Terminal;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Theme\Capability\DimCapableInterface;
-use DrevOps\Tui\Theme\Capability\OccupyCapableInterface;
-use DrevOps\Tui\Theme\ThemeInterface;
-use DrevOps\Tui\Translation\Translator;
+namespace DrevOps\PhpTui\Screen;
+
+use DrevOps\PhpTui\Answers\Answers;
+use DrevOps\PhpTui\Answers\Provenance;
+use DrevOps\PhpTui\Block\Actions;
+use DrevOps\PhpTui\Block\BlockInterface;
+use DrevOps\PhpTui\Block\Breadcrumb;
+use DrevOps\PhpTui\Block\Capability\DependCapableInterface;
+use DrevOps\PhpTui\Block\Field;
+use DrevOps\PhpTui\Block\Legend;
+use DrevOps\PhpTui\Block\Markup;
+use DrevOps\PhpTui\Block\Mode;
+use DrevOps\PhpTui\Block\Option;
+use DrevOps\PhpTui\Block\OptionType;
+use DrevOps\PhpTui\Block\Panel;
+use DrevOps\PhpTui\Block\Progress;
+use DrevOps\PhpTui\Block\RenderMode;
+use DrevOps\PhpTui\Block\Tree;
+use DrevOps\PhpTui\CancelException;
+use DrevOps\PhpTui\Derive\Derive;
+use DrevOps\PhpTui\Field\Capability\ExternalEditCapableInterface;
+use DrevOps\PhpTui\Field\Capability\QueryOptionsCapableInterface;
+use DrevOps\PhpTui\Handler\Context;
+use DrevOps\PhpTui\Input\Action;
+use DrevOps\PhpTui\Input\Hint;
+use DrevOps\PhpTui\Input\Key;
+use DrevOps\PhpTui\Input\KeyMap;
+use DrevOps\PhpTui\Input\KeyMapManager;
+use DrevOps\PhpTui\Input\KeyName;
+use DrevOps\PhpTui\Input\KeyParser;
+use DrevOps\PhpTui\InterruptException;
+use DrevOps\PhpTui\Primitive\Element\PrimitiveElementsInterface;
+use DrevOps\PhpTui\Primitive\ProgressReporter;
+use DrevOps\PhpTui\Primitive\Status;
+use DrevOps\PhpTui\Screen\Layout\DefaultLayout;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Terminal\Box;
+use DrevOps\PhpTui\Terminal\Terminal;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Theme\Capability\DimCapableInterface;
+use DrevOps\PhpTui\Theme\Capability\OccupyCapableInterface;
+use DrevOps\PhpTui\Theme\ThemeInterface;
+use DrevOps\PhpTui\Translation\Translator;
/**
* Drives one screen through a terminal session.
@@ -75,11 +75,12 @@
* its condition holds, exactly as it does with no screen at all.
*
* How the session ends is the whole of what a caller sees: finishing it hands
- * back the answers, abandoning it raises {@see \DrevOps\Tui\CancelException},
- * and the interrupt key raises {@see \DrevOps\Tui\InterruptException} - so
- * partial answers are never mistaken for a completed form.
+ * back the answers, abandoning it raises
+ * {@see \DrevOps\PhpTui\CancelException}, and the interrupt key raises
+ * {@see \DrevOps\PhpTui\InterruptException} - so partial answers are never
+ * mistaken for a completed form.
*
- * @package DrevOps\Tui\Screen
+ * @package DrevOps\PhpTui\Screen
*/
class ScreenController {
@@ -181,7 +182,7 @@ class ScreenController {
/**
* How each answer came to be, keyed by field id.
*
- * @var array
+ * @var array
*/
protected array $provenance = [];
@@ -195,7 +196,7 @@ class ScreenController {
/**
* The dialogs standing open, with the answers each was opened over.
*
- * @var list,provenance:array}>
+ * @var list,provenance:array}>
*/
protected array $dialogs = [];
@@ -227,22 +228,22 @@ class ScreenController {
/**
* Construct a controller.
*
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel the screen starts in: the tree a form declares.
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme every block draws through.
* @param array $supplied
* Values supplied for its fields, keyed by field id.
- * @param \DrevOps\Tui\Input\KeyMap|null $keys
+ * @param \DrevOps\PhpTui\Input\KeyMap|null $keys
* The bindings the whole screen answers to, or NULL for the default preset.
- * @param \DrevOps\Tui\Screen\Collector|null $collector
+ * @param \DrevOps\PhpTui\Screen\Collector|null $collector
* What resolves the answers the form opens on, or NULL for one that reuses
* no behaviour and applies no rules once they have settled.
- * @param \DrevOps\Tui\Handler\Context $context
+ * @param \DrevOps\PhpTui\Handler\Context $context
* The run this session belongs to.
* @param string $layout
* The layout the screen is arranged by.
- * @param \DrevOps\Tui\Theme\Border $border
+ * @param \DrevOps\PhpTui\Theme\Border $border
* The frame drawn around every region at once.
* @param bool $clearOnExit
* Whether the screen is cleared as the session ends.
@@ -253,13 +254,13 @@ class ScreenController {
* onto the first frame.
* @param string $version
* The version shown under that banner.
- * @param \DrevOps\Tui\Screen\ExternalEditor|null $external_editor
+ * @param \DrevOps\PhpTui\Screen\ExternalEditor|null $external_editor
* What hands a passage of text to an editor of the reader's own, or NULL
* for one that launches whatever the environment names.
- * @param list $placements
+ * @param list $placements
* Blocks of the consumer's own, each named against the region it goes in
* and the end of that region's run it packs from.
- * @param array $flows
+ * @param array $flows
* The direction a region runs its blocks, keyed by region name, where the
* consumer states one other than the layout's.
*/
@@ -322,15 +323,15 @@ public function __construct(
/**
* Run the session against a terminal until the form ends.
*
- * @param \DrevOps\Tui\Terminal\Terminal $terminal
+ * @param \DrevOps\PhpTui\Terminal\Terminal $terminal
* The terminal.
*
- * @return \DrevOps\Tui\Answers\Answers
+ * @return \DrevOps\PhpTui\Answers\Answers
* The collected answers.
*
- * @throws \DrevOps\Tui\InterruptException
+ * @throws \DrevOps\PhpTui\InterruptException
* When the session was aborted with the interrupt key.
- * @throws \DrevOps\Tui\CancelException
+ * @throws \DrevOps\PhpTui\CancelException
* When the form was abandoned through its cancel button.
*/
public function run(Terminal $terminal): Answers {
@@ -406,7 +407,7 @@ public function run(Terminal $terminal): Answers {
/**
* Send one key where it belongs.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key.
*/
public function handle(Key $key): void {
@@ -465,7 +466,7 @@ public function handle(Key $key): void {
* intact if the condition is satisfied again - but contributes no answer,
* which is what a collection with no screen at all also hands back.
*
- * @return \DrevOps\Tui\Answers\Answers
+ * @return \DrevOps\PhpTui\Answers\Answers
* The answers, each describing the question it answers.
*/
public function answers(): Answers {
@@ -530,7 +531,7 @@ protected function opening(): string {
* because the anchor places content on a screen the frame fits, which this
* one is not.
*
- * @param \DrevOps\Tui\Terminal\Terminal $terminal
+ * @param \DrevOps\PhpTui\Terminal\Terminal $terminal
* The terminal.
*
* @return string
@@ -578,7 +579,7 @@ protected function guard(Terminal $terminal): string {
*
* @param string $frame
* The drawn frame.
- * @param \DrevOps\Tui\Terminal\Terminal $terminal
+ * @param \DrevOps\PhpTui\Terminal\Terminal $terminal
* The terminal.
*
* @return string
@@ -609,9 +610,9 @@ protected function chrome(string $frame, Terminal $terminal): string {
/**
* Show what precedes the form, and wait for the key that dismisses it.
*
- * @param \DrevOps\Tui\Terminal\Terminal $terminal
+ * @param \DrevOps\PhpTui\Terminal\Terminal $terminal
* The terminal.
- * @param \DrevOps\Tui\Input\KeyParser $parser
+ * @param \DrevOps\PhpTui\Input\KeyParser $parser
* What reads keys out of the bytes the terminal delivers.
*/
protected function welcome(Terminal $terminal, KeyParser $parser): void {
@@ -654,7 +655,7 @@ protected function paint(): void {
/**
* The frame as it stands: the furniture rewritten, then drawn outward.
*
- * @param \DrevOps\Tui\Terminal\Terminal $terminal
+ * @param \DrevOps\PhpTui\Terminal\Terminal $terminal
* The terminal the frame is sized against.
*
* @return string
@@ -715,7 +716,7 @@ protected function columns(): int {
/**
* The rows a frame is laid out to.
*
- * @param \DrevOps\Tui\Terminal\Terminal $terminal
+ * @param \DrevOps\PhpTui\Terminal\Terminal $terminal
* The terminal.
*
* @return int
@@ -750,7 +751,7 @@ protected function follow(int $rows): void {
/**
* Do what the wheel does, if that is what a key is.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key.
*
* @return bool
@@ -806,7 +807,7 @@ protected function scroll(int $delta): void {
* @param int $rows
* The terminal rows.
*
- * @return \Generator
+ * @return \Generator
* The surface, the rows its contents come to, the row the cursor is on,
* and the rows it was given.
*/
@@ -876,9 +877,9 @@ protected function content(int $rows): int {
/**
* Do what a key does on the buttons that end the form.
*
- * @param \DrevOps\Tui\Block\Actions $actions
+ * @param \DrevOps\PhpTui\Block\Actions $actions
* The buttons.
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key.
*
* @return bool
@@ -912,7 +913,7 @@ protected function pressed(Actions $actions, Key $key): bool {
/**
* Whether a key selects whatever the cursor is on.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key.
*
* @return bool
@@ -929,7 +930,7 @@ protected function activates(Key $key): bool {
* is what leaves the key typing itself into an open field: the letter that
* leaves a panel is a letter while something is collecting one.
*
- * @param \DrevOps\Tui\Input\Key $key
+ * @param \DrevOps\PhpTui\Input\Key $key
* The key.
*
* @return bool
@@ -959,7 +960,7 @@ protected function leave(): void {
/**
* Move the cursor along the buttons, stopping at the ends.
*
- * @param \DrevOps\Tui\Block\Actions $actions
+ * @param \DrevOps\PhpTui\Block\Actions $actions
* The buttons.
* @param int $delta
* The buttons to move by.
@@ -977,7 +978,7 @@ protected function step(Actions $actions, int $delta): void {
/**
* End the form, close the dialog, or say why neither can happen yet.
*
- * @param \DrevOps\Tui\Block\Actions $actions
+ * @param \DrevOps\PhpTui\Block\Actions $actions
* The buttons.
*/
protected function press(Actions $actions): void {
@@ -1033,7 +1034,7 @@ protected function owed(): ?string {
/**
* Run a progress block's work, drawing its indicator as it advances.
*
- * @param \DrevOps\Tui\Block\Progress $progress
+ * @param \DrevOps\PhpTui\Block\Progress $progress
* The block.
*/
protected function work(Progress $progress): void {
@@ -1112,9 +1113,9 @@ protected function query(): void {
* reader's when the next no longer offers it, and the row it stands for is
* still there to measure it against.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
- * @param list<\DrevOps\Tui\Block\Option> $rows
+ * @param list<\DrevOps\PhpTui\Block\Option> $rows
* What the latest query answered.
*
* @return array
@@ -1139,7 +1140,7 @@ protected function offered(Field $field, array $rows): array {
* the terminal to it and taking it back afterwards, which is the session's to
* do and nothing a block could reach.
*
- * @param \DrevOps\Tui\Block\Field|null $open
+ * @param \DrevOps\PhpTui\Block\Field|null $open
* The field the key reached, if it reached one that was open.
*/
protected function handoff(?Field $open): void {
@@ -1167,7 +1168,7 @@ protected function handoff(?Field $open): void {
* Taking an answer is what stamps it, whether or not the answer changed: a
* reader who opened a row and accepted what was there has answered it.
*
- * @param \DrevOps\Tui\Block\Field|null $open
+ * @param \DrevOps\PhpTui\Block\Field|null $open
* The field the key reached, if it reached one that was open.
*/
protected function stamp(?Field $open): void {
@@ -1262,7 +1263,7 @@ protected function discard(): void {
/**
* The dialog standing open, if one is.
*
- * @return \DrevOps\Tui\Block\Panel|null
+ * @return \DrevOps\PhpTui\Block\Panel|null
* The panel it was opened from, or NULL when no dialog is open.
*/
protected function standing(): ?Panel {
@@ -1272,7 +1273,7 @@ protected function standing(): ?Panel {
/**
* The screen the dialog standing open is drawn on, if one is.
*
- * @return \DrevOps\Tui\Screen\Screen|null
+ * @return \DrevOps\PhpTui\Screen\Screen|null
* The screen, or NULL when no dialog is open.
*/
protected function staging(): ?Screen {
@@ -1440,7 +1441,7 @@ protected function refresh(): void {
* are added here: leaving is about the session, and help is a fact about the
* question rather than about whatever is collecting the answer.
*
- * @return list<\DrevOps\Tui\Input\Hint>
+ * @return list<\DrevOps\PhpTui\Input\Hint>
* The fragments.
*/
protected function hints(): array {
@@ -1465,7 +1466,7 @@ protected function hints(): array {
/**
* The field that is open, if one is.
*
- * @return \DrevOps\Tui\Block\Field|null
+ * @return \DrevOps\PhpTui\Block\Field|null
* The field, or NULL when every row is settled.
*/
protected function editing(): ?Field {
@@ -1477,7 +1478,7 @@ protected function editing(): ?Field {
/**
* The field that has the whole frame to itself, if one has.
*
- * @return \DrevOps\Tui\Block\Field|null
+ * @return \DrevOps\PhpTui\Block\Field|null
* The field, or NULL when the panel is what is drawn.
*/
protected function alone(): ?Field {
@@ -1497,10 +1498,10 @@ protected function alone(): ?Field {
* draws, so a field with the frame to itself is the same session with one row
* in front of the reader instead of a list.
*
- * @param \DrevOps\Tui\Block\Field $field
+ * @param \DrevOps\PhpTui\Block\Field $field
* The field.
*
- * @return \DrevOps\Tui\Screen\Screen
+ * @return \DrevOps\PhpTui\Screen\Screen
* The screen.
*/
protected function stage(Field $field): Screen {
@@ -1518,7 +1519,7 @@ protected function stage(Field $field): Screen {
/**
* Draw the open dialog over the screen it was opened from.
*
- * @param \DrevOps\Tui\Screen\Screen $staging
+ * @param \DrevOps\PhpTui\Screen\Screen $staging
* The screen the dialog is drawn on.
* @param int $rows
* The terminal rows.
@@ -1553,7 +1554,7 @@ protected function overlaid(Screen $staging, int $rows, int $columns): string {
/**
* Draw the dialog itself: its title over what it holds, inside a border.
*
- * @param \DrevOps\Tui\Screen\Screen $staging
+ * @param \DrevOps\PhpTui\Screen\Screen $staging
* The screen the dialog is drawn on.
* @param int $rows
* The terminal rows.
@@ -1578,7 +1579,7 @@ protected function dialog(Screen $staging, int $rows, int $columns): string {
/**
* The rows what a dialog holds comes to, its way out included.
*
- * @param \DrevOps\Tui\Screen\Screen $staging
+ * @param \DrevOps\PhpTui\Screen\Screen $staging
* The screen the dialog is drawn on.
*
* @return int
@@ -1598,10 +1599,10 @@ protected function depth(Screen $staging): int {
* panel's, so the buttons stand beside the panel here instead of being
* written into what the form declared.
*
- * @param \DrevOps\Tui\Block\Panel $modal
+ * @param \DrevOps\PhpTui\Block\Panel $modal
* The panel the dialog is.
*
- * @return \DrevOps\Tui\Screen\Screen
+ * @return \DrevOps\PhpTui\Screen\Screen
* The screen.
*/
protected function dress(Panel $modal): Screen {
@@ -1651,7 +1652,7 @@ protected function wash(): ?string {
/**
* The theme, when it says how much of the terminal it takes.
*
- * @return \DrevOps\Tui\Theme\Capability\OccupyCapableInterface|null
+ * @return \DrevOps\PhpTui\Theme\Capability\OccupyCapableInterface|null
* The theme, or NULL when it says nothing about the terminal at all.
*/
protected function occupancy(): ?OccupyCapableInterface {
@@ -1661,7 +1662,7 @@ protected function occupancy(): ?OccupyCapableInterface {
/**
* The theme, narrowed to the finished pieces the session draws around a form.
*
- * @return \DrevOps\Tui\Primitive\Element\PrimitiveElementsInterface
+ * @return \DrevOps\PhpTui\Primitive\Element\PrimitiveElementsInterface
* The theme, able to draw them.
*
* @throws \InvalidArgumentException
@@ -1684,7 +1685,7 @@ protected function pieces(): PrimitiveElementsInterface {
* answers would trip and clear again as they grew, which is a screen nobody
* can work in rather than a guard.
*
- * @param \DrevOps\Tui\Theme\Capability\OccupyCapableInterface $occupancy
+ * @param \DrevOps\PhpTui\Theme\Capability\OccupyCapableInterface $occupancy
* What the theme says about the terminal it takes.
*
* @return int
@@ -1707,7 +1708,7 @@ protected function narrowest(OccupyCapableInterface $occupancy): int {
/**
* The shortest terminal the frame can be read in.
*
- * @param \DrevOps\Tui\Theme\Capability\OccupyCapableInterface $occupancy
+ * @param \DrevOps\PhpTui\Theme\Capability\OccupyCapableInterface $occupancy
* What the theme says about the terminal it takes.
*
* @return int
@@ -1763,7 +1764,7 @@ protected function equip(): void {
* The trail and the keys on offer are the same blocks the panel's own screen
* draws, so asking for help changes what is being read and nothing else.
*
- * @return \DrevOps\Tui\Screen\Screen
+ * @return \DrevOps\PhpTui\Screen\Screen
* The screen.
*/
protected function helpScreen(): Screen {
@@ -1785,9 +1786,9 @@ protected function helpScreen(): Screen {
* needs is placed first, so a block of the consumer's lands after the trail
* or the hints its region already holds rather than in front of them.
*
- * @param list $placements
+ * @param list $placements
* The blocks, each named against the region it goes in.
- * @param array $flows
+ * @param array $flows
* The direction a region runs its blocks, keyed by region name.
*/
protected function furnish(array $placements, array $flows): void {
@@ -1812,7 +1813,7 @@ protected function furnish(array $placements, array $flows): void {
* @return T|null
* The block, or NULL when the screen carries no such piece.
*
- * @template T of \DrevOps\Tui\Block\BlockInterface
+ * @template T of \DrevOps\PhpTui\Block\BlockInterface
*/
protected function furniture(?string $name, string $kind): ?object {
if ($name === NULL) {
diff --git a/src/Screen/ScreenRenderer.php b/src/Screen/ScreenRenderer.php
index 9de22762..94d32a46 100644
--- a/src/Screen/ScreenRenderer.php
+++ b/src/Screen/ScreenRenderer.php
@@ -2,23 +2,23 @@
declare(strict_types=1);
-namespace DrevOps\Tui\Screen;
-
-use DrevOps\Tui\Block\BlockInterface;
-use DrevOps\Tui\Block\Capability\DependCapableInterface;
-use DrevOps\Tui\Block\Element\BorderElementsInterface;
-use DrevOps\Tui\Block\Element\ChromeElementsInterface;
-use DrevOps\Tui\Block\Panel;
-use DrevOps\Tui\Screen\Layout\LayoutInterface;
-use DrevOps\Tui\Terminal\Ansi;
-use DrevOps\Tui\Terminal\Box;
-use DrevOps\Tui\Screen\Capability\BorderCapableInterface;
-use DrevOps\Tui\Theme\Border;
-use DrevOps\Tui\Theme\BorderSide;
-use DrevOps\Tui\Theme\Capability\OccupyCapableInterface;
-use DrevOps\Tui\Theme\Capability\UnicodeCapableInterface;
-use DrevOps\Tui\Theme\Spacing;
-use DrevOps\Tui\Theme\ThemeInterface;
+namespace DrevOps\PhpTui\Screen;
+
+use DrevOps\PhpTui\Block\BlockInterface;
+use DrevOps\PhpTui\Block\Capability\DependCapableInterface;
+use DrevOps\PhpTui\Block\Element\BorderElementsInterface;
+use DrevOps\PhpTui\Block\Element\ChromeElementsInterface;
+use DrevOps\PhpTui\Block\Panel;
+use DrevOps\PhpTui\Screen\Layout\LayoutInterface;
+use DrevOps\PhpTui\Terminal\Ansi;
+use DrevOps\PhpTui\Terminal\Box;
+use DrevOps\PhpTui\Screen\Capability\BorderCapableInterface;
+use DrevOps\PhpTui\Theme\Border;
+use DrevOps\PhpTui\Theme\BorderSide;
+use DrevOps\PhpTui\Theme\Capability\OccupyCapableInterface;
+use DrevOps\PhpTui\Theme\Capability\UnicodeCapableInterface;
+use DrevOps\PhpTui\Theme\Spacing;
+use DrevOps\PhpTui\Theme\ThemeInterface;
/**
* Draws a screen, outward from the root.
@@ -38,7 +38,7 @@
* for, because a block only ever fills the space it is given and never learns
* where that space ends or what is drawn beside it.
*
- * @package DrevOps\Tui\Screen
+ * @package DrevOps\PhpTui\Screen
*/
final class ScreenRenderer {
@@ -50,12 +50,12 @@ final class ScreenRenderer {
/**
* Construct a renderer.
*
- * @param \DrevOps\Tui\Theme\ThemeInterface $theme
+ * @param \DrevOps\PhpTui\Theme\ThemeInterface $theme
* The theme every block draws through.
- * @param \DrevOps\Tui\Theme\Border $border
+ * @param \DrevOps\PhpTui\Theme\Border $border
* The frame drawn around every region at once; none by default, which
* leaves the rows exactly as the layout arranged them.
- * @param \DrevOps\Tui\Screen\Scroller $scroller
+ * @param \DrevOps\PhpTui\Screen\Scroller $scroller
* Resolves the window over content that outran the space it was given.
*/
public function __construct(
@@ -68,7 +68,7 @@ public function __construct(
/**
* The cells of a region's grant that its contents can use.
*
- * @param \DrevOps\Tui\Screen\Region $region
+ * @param \DrevOps\PhpTui\Screen\Region $region
* The region.
* @param int $cells
* The cells the layout granted it.
@@ -83,7 +83,7 @@ public function inside(Region $region, int $cells): int {
/**
* The cells a border takes of the axis it is measured along.
*
- * @param \DrevOps\Tui\Screen\Capability\BorderCapableInterface $of
+ * @param \DrevOps\PhpTui\Screen\Capability\BorderCapableInterface $of
* What declared it.
* @param bool $down
* Whether the axis runs down rather than across.
@@ -106,7 +106,7 @@ protected function spent(BorderCapableInterface $of, bool $down): int {
/**
* Draw a screen.
*
- * @param \DrevOps\Tui\Screen\Screen $screen
+ * @param \DrevOps\PhpTui\Screen\Screen $screen
* The screen.
* @param int $rows
* The terminal rows.
@@ -131,10 +131,10 @@ public function render(Screen $screen, int $rows, int $columns): string {
/**
* The style a border is drawn in, or NULL when none is drawn at all.
*
- * @param \DrevOps\Tui\Screen\Capability\BorderCapableInterface $of
+ * @param \DrevOps\PhpTui\Screen\Capability\BorderCapableInterface $of
* What declared it.
*
- * @return \DrevOps\Tui\Theme\Border|null
+ * @return \DrevOps\PhpTui\Theme\Border|null
* The style: the one stated, else the theme's own; NULL when nothing
* declared edges, or when the style resolves to none.
*/
@@ -153,9 +153,9 @@ protected function styleOf(BorderCapableInterface $of): ?Border {
*
* @param list $lines
* The rows drawn inside the edges.
- * @param \DrevOps\Tui\Screen\Capability\BorderCapableInterface $of
+ * @param \DrevOps\PhpTui\Screen\Capability\BorderCapableInterface $of
* What declared them.
- * @param \DrevOps\Tui\Theme\Border $style
+ * @param \DrevOps\PhpTui\Theme\Border $style
* The style to draw them in.
* @param int $columns
* The columns the edges span, their own included.
@@ -189,9 +189,9 @@ protected function edged(array $lines, BorderCapableInterface $of, Border $style
/**
* One horizontal edge, with a title written into it when it carries one.
*
- * @param \DrevOps\Tui\Block\Element\BorderElementsInterface $pieces
+ * @param \DrevOps\PhpTui\Block\Element\BorderElementsInterface $pieces
* The theme, narrowed to the glyphs a border is drawn with.
- * @param \DrevOps\Tui\Theme\Border $style
+ * @param \DrevOps\PhpTui\Theme\Border $style
* The style.
* @param string $title
* The text written into it; empty writes none.
@@ -227,7 +227,7 @@ protected function edge(BorderElementsInterface $pieces, Border $style, string $
/**
* The theme, narrowed to the glyphs a border is drawn with.
*
- * @return \DrevOps\Tui\Block\Element\BorderElementsInterface
+ * @return \DrevOps\PhpTui\Block\Element\BorderElementsInterface
* The theme.
*
* @throws \InvalidArgumentException
@@ -251,9 +251,9 @@ protected function borders(): BorderElementsInterface {
* to, and never more than the blocks drawn beside it leave - which is the
* room it scrolls inside when it holds more than that.
*
- * @param \DrevOps\Tui\Screen\Region $region
+ * @param \DrevOps\PhpTui\Screen\Region $region
* The region the panel is drawn in.
- * @param \DrevOps\Tui\Block\Panel $panel
+ * @param \DrevOps\PhpTui\Block\Panel $panel
* The panel placed in it.
* @param int $rows
* The rows the region was given.
@@ -283,7 +283,7 @@ public function room(Region $region, Panel $panel, int $rows): int {
* are drawn, and the layout is handed the numbers and divides the axis by
* them. Neither has to learn the other's business.
*
- * @param \DrevOps\Tui\Screen\Layout\LayoutInterface $layout
+ * @param \DrevOps\PhpTui\Screen\Layout\LayoutInterface $layout
* The layout.
* @param int $available
* The cells to divide.
@@ -302,9 +302,9 @@ public function sizes(LayoutInterface $layout, int $available): array {
* line of an arrangement at once - which is what an arrangement that moves as
* one surface has to be measured against.
*
- * @param \DrevOps\Tui\Screen\Layout\LayoutInterface $layout
+ * @param \DrevOps\PhpTui\Screen\Layout\LayoutInterface $layout
* The layout.
- * @param \DrevOps\Tui\Block\BlockInterface|null $of
+ * @param \DrevOps\PhpTui\Block\BlockInterface|null $of
* The block to locate, if one is being looked for.
*
* @return array{int,int}
@@ -348,7 +348,7 @@ public function reach(LayoutInterface $layout, ?BlockInterface $of = NULL): arra
/**
* The cells a region asks the layout for, once its box is counted in.
*
- * @param \DrevOps\Tui\Screen\Region $region
+ * @param \DrevOps\PhpTui\Screen\Region $region
* The region.
* @param int $content
* The cells its contents come to.
@@ -370,11 +370,11 @@ protected function demand(Region $region, int $content): int {
* in holds - going into a panel is where a layout starts rather than where a
* row is counted.
*
- * @param \DrevOps\Tui\Screen\Layout\LayoutInterface $layout
+ * @param \DrevOps\PhpTui\Screen\Layout\LayoutInterface $layout
* The layout the region belongs to.
* @param string $name
* The region name.
- * @param \DrevOps\Tui\Block\BlockInterface|null $of
+ * @param \DrevOps\PhpTui\Block\BlockInterface|null $of
* The block to locate, if one is being looked for.
*
* @return array{int,int}
@@ -408,10 +408,10 @@ public function extent(LayoutInterface $layout, string $name, ?BlockInterface $o
/**
* What a region stacks, piece by piece.
*
- * @param \DrevOps\Tui\Screen\Region $region
+ * @param \DrevOps\PhpTui\Screen\Region $region
* The region.
*
- * @return list,offsets:list}>
+ * @return list,offsets:list}>
* Each piece: the rows it comes to, the blocks drawn in it, and the row
* each of those starts on within it.
*/
@@ -425,12 +425,12 @@ protected function pieces(Region $region): array {
/**
* One piece per block, in the order they are drawn.
*
- * @param list<\DrevOps\Tui\Block\BlockInterface> $blocks
+ * @param list<\DrevOps\PhpTui\Block\BlockInterface> $blocks
* The blocks.
* @param bool $previews
* Whether a panel among them shows what is behind it rather than a row.
*
- * @return list