<?php declare(strict_types=1); namespace Termwind; use Closure; use Symfony\Component\Console\Output\OutputInterface; use Termwind\Repositories\Styles as StyleRepository; use Termwind\ValueObjects\Style; use Termwind\ValueObjects\Styles; if (! function_exists('Termwind\renderUsing')) { /** * Sets the renderer implementation. */ function renderUsing(OutputInterface|null $renderer): void { Termwind::renderUsing($renderer); } } if (! function_exists('Termwind\style')) { /** * Creates a new style. * * @param (Closure(Styles $renderable, string|int ...$arguments): Styles)|null $callback */ function style(string $name, Closure $callback = null): Style { return StyleRepository::create($name, $callback); } } if (! function_exists('Termwind\render')) { /** * Render HTML to a string. */ function render(string $html, int $options = OutputInterface::OUTPUT_NORMAL): void { (new HtmlRenderer)->render($html, $options); } } if (! function_exists('Termwind\terminal')) { /** * Returns a Terminal instance. */ function terminal(): Terminal { return new Terminal; } } if (! function_exists('Termwind\ask')) { /** * Renders a prompt to the user. * * @param iterable<array-key, string>|null $autocomplete */ function ask(string $question, iterable $autocomplete = null): mixed { return (new Question)->ask($question, $autocomplete); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Actions | Folder | 0755 |
|
|
Components | Folder | 0755 |
|
|
Enums | Folder | 0755 |
|
|
Exceptions | Folder | 0755 |
|
|
Helpers | Folder | 0755 |
|
|
Html | Folder | 0755 |
|
|
Laravel | Folder | 0755 |
|
|
Repositories | Folder | 0755 |
|
|
ValueObjects | Folder | 0755 |
|
|
Functions.php | File | 1.49 KB | 0644 |
|
HtmlRenderer.php | File | 3.8 KB | 0644 |
|
Question.php | File | 2.49 KB | 0644 |
|
Terminal.php | File | 886 B | 0644 |
|
Termwind.php | File | 9.04 KB | 0644 |
|