refactor: Cleanup git state - commit all staged changes

Major refactoring cleanup:
- Add new controller architecture (class-controller-*.php)
- Add new settings-v2 UI (views/settings-v2/)
- Add new CSS architecture (agentic-sidebar.css, tokens)
- Add esbuild build pipeline (scripts/build.js, package.json)
- Add composer dependencies (vendor/)
- Add frontend src directory (assets/js/src/index.jsx)
- Add documentation files
- Remove old/obsolete files (class-settings.php, old CSS)

This commits all pending changes from previous refactoring efforts.
This commit is contained in:
Dwindi Ramadhana
2026-06-17 05:27:58 +07:00
parent d3f142222c
commit 690991c526
7963 changed files with 941566 additions and 67372 deletions

View File

@@ -0,0 +1,53 @@
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @link https://phpdoc.org
*/
namespace phpDocumentor\Guides\Event;
use phpDocumentor\Guides\Compiler\CompilerContextInterface;
use phpDocumentor\Guides\Nodes\DocumentNode;
use phpDocumentor\Guides\Nodes\Node;
final class ModifyDocumentEntryAdditionalData
{
/** @param array<string, Node> $additionalData */
public function __construct(
private array $additionalData,
private readonly DocumentNode $documentNode,
private readonly CompilerContextInterface $compilerContext,
) {
}
/** @return array<string, Node> */
public function getAdditionalData(): array
{
return $this->additionalData;
}
/** @param array<string, Node> $additionalData */
public function setAdditionalData(array $additionalData): ModifyDocumentEntryAdditionalData
{
$this->additionalData = $additionalData;
return $this;
}
public function getDocumentNode(): DocumentNode
{
return $this->documentNode;
}
public function getCompilerContext(): CompilerContextInterface
{
return $this->compilerContext;
}
}

View File

@@ -0,0 +1,47 @@
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @link https://phpdoc.org
*/
namespace phpDocumentor\Guides\Event;
use phpDocumentor\Guides\Files;
use phpDocumentor\Guides\Handlers\ParseDirectoryCommand;
/**
* This event is called after all files have been collected for parsing
* But before the actual parsing begins.
*
* It can be used to manipulate the files to be parsed.
*/
final class PostCollectFilesForParsingEvent
{
public function __construct(
private readonly ParseDirectoryCommand $command,
private Files $files,
) {
}
public function getCommand(): ParseDirectoryCommand
{
return $this->command;
}
public function getFiles(): Files
{
return $this->files;
}
public function setFiles(Files $files): void
{
$this->files = $files;
}
}

View File

@@ -0,0 +1,51 @@
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @link https://phpdoc.org
*/
namespace phpDocumentor\Guides\Event;
use phpDocumentor\Guides\Nodes\DocumentNode;
/**
* This event is called after the parsing of each document is completed by the responsible extension.
*
* It can for example be used to display a progress bar.
*/
final class PostParseDocument
{
public function __construct(
private readonly string $fileName,
private DocumentNode|null $documentNode,
private readonly string $originalFile,
) {
}
public function getDocumentNode(): DocumentNode|null
{
return $this->documentNode;
}
public function setDocumentNode(DocumentNode|null $documentNode): void
{
$this->documentNode = $documentNode;
}
public function getFileName(): string
{
return $this->fileName;
}
public function getOriginalFileName(): string
{
return $this->originalFile;
}
}

View File

@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @link https://phpdoc.org
*/
namespace phpDocumentor\Guides\Event;
use phpDocumentor\Guides\Handlers\ParseDirectoryCommand;
use phpDocumentor\Guides\Nodes\DocumentNode;
/**
* This event is dispatched right after the overall parsing process is
* finished, Before the compiler passes, including the node transformers
* are called.
*/
final class PostParseProcess
{
/** @param DocumentNode[] $documents */
public function __construct(
private readonly ParseDirectoryCommand $parseDirectoryCommand,
private readonly array $documents,
) {
}
public function getParseDirectoryCommand(): ParseDirectoryCommand
{
return $this->parseDirectoryCommand;
}
/** @return DocumentNode[] */
public function getDocuments(): array
{
return $this->documents;
}
}

View File

@@ -0,0 +1,46 @@
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @link https://phpdoc.org
*/
namespace phpDocumentor\Guides\Event;
use phpDocumentor\Guides\Nodes\ProjectNode;
use phpDocumentor\Guides\Settings\ProjectSettings;
final class PostProjectNodeCreated
{
public function __construct(
private ProjectNode $projectNode,
private ProjectSettings $settings,
) {
}
public function getProjectNode(): ProjectNode
{
return $this->projectNode;
}
public function setProjectNode(ProjectNode $projectNode): void
{
$this->projectNode = $projectNode;
}
public function getSettings(): ProjectSettings
{
return $this->settings;
}
public function setSettings(ProjectSettings $settings): void
{
$this->settings = $settings;
}
}

View File

@@ -0,0 +1,44 @@
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @link https://phpdoc.org
*/
namespace phpDocumentor\Guides\Event;
use phpDocumentor\Guides\Handlers\RenderDocumentCommand;
use phpDocumentor\Guides\NodeRenderers\NodeRenderer;
use phpDocumentor\Guides\Nodes\DocumentNode;
/**
* This event is called after the rendering of each document.
*
* It can for example be used to display a progress bar or to post-process the rendered documents one by one.
*/
final class PostRenderDocument
{
/** @param NodeRenderer<DocumentNode> $renderer */
public function __construct(
private readonly NodeRenderer $renderer,
private readonly RenderDocumentCommand $command,
) {
}
/** @return NodeRenderer<DocumentNode> */
public function getRenderer(): NodeRenderer
{
return $this->renderer;
}
public function getCommand(): RenderDocumentCommand
{
return $this->command;
}
}

View File

@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @link https://phpdoc.org
*/
namespace phpDocumentor\Guides\Event;
use phpDocumentor\Guides\Handlers\RenderCommand;
/**
* This event is called once after each rendering method after all documents have been rendered.
*
* It can for example be used to copy assets into the target directory after rendering.
*/
final class PostRenderProcess
{
public function __construct(private readonly RenderCommand $command)
{
}
public function getCommand(): RenderCommand
{
return $this->command;
}
}

View File

@@ -0,0 +1,48 @@
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @link https://phpdoc.org
*/
namespace phpDocumentor\Guides\Event;
use phpDocumentor\Guides\Parser;
/**
* This event is called before the parsing of each document is passed to the responsible extension.
*
* It can be used to manipulate the content passed to the parser by calling PreParseDocument::setContents
*/
final class PreParseDocument
{
public function __construct(private readonly Parser $parser, private readonly string $fileName, private string $contents)
{
}
public function getParser(): Parser
{
return $this->parser;
}
public function setContents(string $contents): void
{
$this->contents = $contents;
}
public function getContents(): string
{
return $this->contents;
}
public function getFileName(): string
{
return $this->fileName;
}
}

View File

@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @link https://phpdoc.org
*/
namespace phpDocumentor\Guides\Event;
use phpDocumentor\Guides\Handlers\ParseDirectoryCommand;
/**
* This event is dispatched right before the overall parsing process is
* started.
*
* It can be used to modify the ParseDirectoryCommand, so it could be used to alter the
* directory to be parsed or the file system to be used.
*/
final class PreParseProcess
{
public function __construct(
private ParseDirectoryCommand $parseDirectoryCommand,
) {
}
public function getParseDirectoryCommand(): ParseDirectoryCommand
{
return $this->parseDirectoryCommand;
}
public function setParseDirectoryCommand(ParseDirectoryCommand $parseDirectoryCommand): PreParseProcess
{
$this->parseDirectoryCommand = $parseDirectoryCommand;
return $this;
}
}

View File

@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @link https://phpdoc.org
*/
namespace phpDocumentor\Guides\Event;
use phpDocumentor\Guides\Handlers\RenderDocumentCommand;
use phpDocumentor\Guides\NodeRenderers\NodeRenderer;
use phpDocumentor\Guides\Nodes\DocumentNode;
/**
* This event is called before the rendering of each document.
*/
final class PreRenderDocument
{
/** @param NodeRenderer<DocumentNode> $renderer */
public function __construct(private readonly NodeRenderer $renderer, private readonly RenderDocumentCommand $command)
{
}
/** @return NodeRenderer<DocumentNode> */
public function getRenderer(): NodeRenderer
{
return $this->renderer;
}
public function getCommand(): RenderDocumentCommand
{
return $this->command;
}
}

View File

@@ -0,0 +1,56 @@
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @link https://phpdoc.org
*/
namespace phpDocumentor\Guides\Event;
use phpDocumentor\Guides\Handlers\RenderCommand;
/**
* This event is called once before each rendering method after all documents have been parsed and
* all compiler passes (including node transformers have been called.)
*
* It can be used to exit the rendering process before anything was rendered. A third party extension could then
* take over the rendering with its own means.
*/
final class PreRenderProcess
{
private bool $exitRendering = false;
public function __construct(
private readonly RenderCommand $command,
private readonly int $steps = 1,
) {
}
public function getCommand(): RenderCommand
{
return $this->command;
}
public function isExitRendering(): bool
{
return $this->exitRendering;
}
public function setExitRendering(bool $exitRendering): PreRenderProcess
{
$this->exitRendering = $exitRendering;
return $this;
}
public function getSteps(): int
{
return $this->steps;
}
}