Phase 0: Fundament für Inhaus
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m12s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m19s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m35s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m7s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m12s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m19s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m35s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m7s
- Laravel 13 mit Filament 5 (Admin), Inertia 3 + Vue 3 + Vuetify 4 (Material 3) - Anmeldung über Fortify (Login, Passwort vergessen/ändern), keine Selbstregistrierung - Profil mit Profilbild (WebP in festen Größen), Personenseiten, Header mit Avatar-Menü - Material-3-Farbschema aus der Primärfarbe, hell/dunkel/System pro Person - Basis-Branding (Portalname, Logo, Primärfarbe) im Admin unter „Erscheinungsbild“ - Benutzerverwaltung im Admin, Zugang vorläufig über is_admin - vendor/ (ohne Dev-Pakete) und Frontend-Build mitversioniert, Dev-Pakete in vendor-dev/ - PHPUnit-Tests gegen MySQL/MariaDB, Forgejo-CI-Matrix, Docker-Entwicklungsumgebung - VERSION, CHANGELOG.md und CONTRIBUTING.md mit Release-Ablauf Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7197eaebf2
commit
9c0f8de791
15771 changed files with 1564103 additions and 5 deletions
32
vendor/ueberdosis/tiptap-php/src/Nodes/Blockquote.php
vendored
Normal file
32
vendor/ueberdosis/tiptap-php/src/Nodes/Blockquote.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class Blockquote extends Node
|
||||
{
|
||||
public static $name = 'blockquote';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'blockquote',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return ['blockquote', HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes), 0];
|
||||
}
|
||||
}
|
||||
32
vendor/ueberdosis/tiptap-php/src/Nodes/BulletList.php
vendored
Normal file
32
vendor/ueberdosis/tiptap-php/src/Nodes/BulletList.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class BulletList extends Node
|
||||
{
|
||||
public static $name = 'bulletList';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'ul',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return ['ul', HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes), 0];
|
||||
}
|
||||
}
|
||||
67
vendor/ueberdosis/tiptap-php/src/Nodes/CodeBlock.php
vendored
Normal file
67
vendor/ueberdosis/tiptap-php/src/Nodes/CodeBlock.php
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class CodeBlock extends Node
|
||||
{
|
||||
public static $name = 'codeBlock';
|
||||
|
||||
public static $marks = '';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'languageClassPrefix' => 'language-',
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'pre',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function addAttributes()
|
||||
{
|
||||
return [
|
||||
'language' => [
|
||||
'parseHTML' => function ($DOMNode) {
|
||||
if (! ($DOMNode->childNodes[0] instanceof \DOMElement)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return preg_replace(
|
||||
"/^" . $this->options['languageClassPrefix']. "/",
|
||||
"",
|
||||
$DOMNode->childNodes[0]->getAttribute('class')
|
||||
) ?: null;
|
||||
},
|
||||
'rendered' => false,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return [
|
||||
'pre',
|
||||
HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes),
|
||||
[
|
||||
'code',
|
||||
[
|
||||
'class' => $node->attrs->language ?? null
|
||||
? $this->options['languageClassPrefix'] . $node->attrs->language
|
||||
: null,
|
||||
],
|
||||
0,
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
62
vendor/ueberdosis/tiptap-php/src/Nodes/CodeBlockHighlight.php
vendored
Normal file
62
vendor/ueberdosis/tiptap-php/src/Nodes/CodeBlockHighlight.php
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use DomainException;
|
||||
use Highlight\Highlighter;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class CodeBlockHighlight extends CodeBlock
|
||||
{
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'languageClassPrefix' => 'hljs ',
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
$code = $node->content[0]->text ?? '';
|
||||
|
||||
try {
|
||||
$highlighter = new Highlighter();
|
||||
|
||||
if ($node->attrs->language ?? null) {
|
||||
$result = $highlighter->highlight($node->attrs->language, $code);
|
||||
} else {
|
||||
$result = $highlighter->highlightAuto($code);
|
||||
}
|
||||
|
||||
$mergedAttributes = HTML::mergeAttributes(
|
||||
[
|
||||
'class' => $this->options['languageClassPrefix'] . $result->language,
|
||||
],
|
||||
$this->options['HTMLAttributes'],
|
||||
$HTMLAttributes,
|
||||
);
|
||||
|
||||
$renderedAttributes = HTML::renderAttributes($mergedAttributes);
|
||||
|
||||
$content = "<pre><code" . $renderedAttributes . ">";
|
||||
$content .= $result->value;
|
||||
$content .= "</code></pre>";
|
||||
} catch (DomainException $exception) {
|
||||
$mergedAttributes = HTML::mergeAttributes(
|
||||
$this->options['HTMLAttributes'],
|
||||
$HTMLAttributes,
|
||||
);
|
||||
|
||||
$renderedAttributes = HTML::renderAttributes($mergedAttributes);
|
||||
|
||||
$content = "<pre><code" . $renderedAttributes . ">";
|
||||
$content .= htmlentities($code);
|
||||
$content .= "</code></pre>";
|
||||
}
|
||||
|
||||
return [
|
||||
'content' => $content,
|
||||
];
|
||||
}
|
||||
}
|
||||
67
vendor/ueberdosis/tiptap-php/src/Nodes/CodeBlockShiki.php
vendored
Normal file
67
vendor/ueberdosis/tiptap-php/src/Nodes/CodeBlockShiki.php
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use DomainException;
|
||||
use Exception;
|
||||
use Highlight\Highlighter;
|
||||
use Spatie\ShikiPhp\Shiki;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class CodeBlockShiki extends CodeBlock
|
||||
{
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'languageClassPrefix' => 'language-',
|
||||
'HTMLAttributes' => [],
|
||||
'defaultLanguage' => 'html',
|
||||
'theme' => 'nord',
|
||||
'guessLanguage' => true,
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
$code = $node->content[0]->text ?? '';
|
||||
|
||||
// Language is set
|
||||
if ($node->attrs->language === null) {
|
||||
$language = $node->attrs->language;
|
||||
}
|
||||
// Auto-detect the language
|
||||
elseif ($this->options['guessLanguage']) {
|
||||
try {
|
||||
$highlighter = new Highlighter();
|
||||
$result = $highlighter->highlightAuto($code);
|
||||
$language = $result->language;
|
||||
} catch (Exception $exception) {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
// Use the default language
|
||||
if (! isset($language)) {
|
||||
$language = $this->options['defaultLanguage'];
|
||||
}
|
||||
|
||||
try {
|
||||
$content = Shiki::highlight($code, $language, 'nord');
|
||||
} catch (DomainException $exception) {
|
||||
$mergedAttributes = HTML::mergeAttributes(
|
||||
$this->options['HTMLAttributes'],
|
||||
$HTMLAttributes,
|
||||
);
|
||||
|
||||
$renderedAttributes = HTML::renderAttributes($mergedAttributes);
|
||||
|
||||
$content = "<pre><code" . $renderedAttributes . ">";
|
||||
$content .= htmlentities($code);
|
||||
$content .= "</code></pre>";
|
||||
}
|
||||
|
||||
return [
|
||||
'content' => $content,
|
||||
];
|
||||
}
|
||||
}
|
||||
53
vendor/ueberdosis/tiptap-php/src/Nodes/Details.php
vendored
Normal file
53
vendor/ueberdosis/tiptap-php/src/Nodes/Details.php
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class Details extends Node
|
||||
{
|
||||
public static $name = 'details';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'persist' => false,
|
||||
'openClassName' => 'is-open',
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'details',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function addAttributes()
|
||||
{
|
||||
if (! $this->options['persist']) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [
|
||||
'open' => [
|
||||
'default' => false,
|
||||
'parseHTML' => fn ($DOMNode) => $DOMNode->hasAttribute('open'),
|
||||
'renderHTML' => fn ($attributes) => $attributes->open ? ['open' => 'open'] : [],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return [
|
||||
'details',
|
||||
HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes),
|
||||
0,
|
||||
];
|
||||
}
|
||||
}
|
||||
37
vendor/ueberdosis/tiptap-php/src/Nodes/DetailsContent.php
vendored
Normal file
37
vendor/ueberdosis/tiptap-php/src/Nodes/DetailsContent.php
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class DetailsContent extends Node
|
||||
{
|
||||
public static $name = 'detailsContent';
|
||||
|
||||
public function addOptions(): array
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'div[data-type]',
|
||||
'getAttrs' => fn ($value): bool => (bool) $value == 'detailsContent',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = []): array
|
||||
{
|
||||
return [
|
||||
'div',
|
||||
HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes, ['data-type' => 'detailsContent']),
|
||||
0,
|
||||
];
|
||||
}
|
||||
}
|
||||
36
vendor/ueberdosis/tiptap-php/src/Nodes/DetailsSummary.php
vendored
Normal file
36
vendor/ueberdosis/tiptap-php/src/Nodes/DetailsSummary.php
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class DetailsSummary extends Node
|
||||
{
|
||||
public static $name = 'detailsSummary';
|
||||
|
||||
public function addOptions(): array
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'summary',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = []): array
|
||||
{
|
||||
return [
|
||||
'summary',
|
||||
HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes),
|
||||
0,
|
||||
];
|
||||
}
|
||||
}
|
||||
12
vendor/ueberdosis/tiptap-php/src/Nodes/Document.php
vendored
Normal file
12
vendor/ueberdosis/tiptap-php/src/Nodes/Document.php
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
|
||||
class Document extends Node
|
||||
{
|
||||
public static $name = 'doc';
|
||||
|
||||
public static $topNode = true;
|
||||
}
|
||||
32
vendor/ueberdosis/tiptap-php/src/Nodes/HardBreak.php
vendored
Normal file
32
vendor/ueberdosis/tiptap-php/src/Nodes/HardBreak.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class HardBreak extends Node
|
||||
{
|
||||
public static $name = 'hardBreak';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'br',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return ['br', HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes)];
|
||||
}
|
||||
}
|
||||
46
vendor/ueberdosis/tiptap-php/src/Nodes/Heading.php
vendored
Normal file
46
vendor/ueberdosis/tiptap-php/src/Nodes/Heading.php
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class Heading extends Node
|
||||
{
|
||||
public static $name = 'heading';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'levels' => [1, 2, 3, 4, 5, 6],
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return array_map(function ($level) {
|
||||
return [
|
||||
'tag' => "h{$level}",
|
||||
'attrs' => [
|
||||
'level' => $level,
|
||||
],
|
||||
];
|
||||
}, $this->options['levels']);
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
$hasLevel = in_array($node->attrs->level, $this->options['levels']);
|
||||
|
||||
$level = $hasLevel ?
|
||||
$node->attrs->level :
|
||||
$this->options['levels'][0];
|
||||
|
||||
return [
|
||||
"h{$level}",
|
||||
HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes),
|
||||
0,
|
||||
];
|
||||
}
|
||||
}
|
||||
32
vendor/ueberdosis/tiptap-php/src/Nodes/HorizontalRule.php
vendored
Normal file
32
vendor/ueberdosis/tiptap-php/src/Nodes/HorizontalRule.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class HorizontalRule extends Node
|
||||
{
|
||||
public static $name = 'horizontalRule';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'hr',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return ['hr', HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes)];
|
||||
}
|
||||
}
|
||||
43
vendor/ueberdosis/tiptap-php/src/Nodes/Image.php
vendored
Normal file
43
vendor/ueberdosis/tiptap-php/src/Nodes/Image.php
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class Image extends Node
|
||||
{
|
||||
public static $name = 'image';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'img[src]',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function addAttributes()
|
||||
{
|
||||
return [
|
||||
'src' => [],
|
||||
'alt' => [],
|
||||
'title' => [],
|
||||
'width' => [],
|
||||
'height' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return ['img', HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes), 0];
|
||||
}
|
||||
}
|
||||
32
vendor/ueberdosis/tiptap-php/src/Nodes/ListItem.php
vendored
Normal file
32
vendor/ueberdosis/tiptap-php/src/Nodes/ListItem.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class ListItem extends Node
|
||||
{
|
||||
public static $name = 'listItem';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'li',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return ['li', HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes), 0];
|
||||
}
|
||||
}
|
||||
56
vendor/ueberdosis/tiptap-php/src/Nodes/Mention.php
vendored
Normal file
56
vendor/ueberdosis/tiptap-php/src/Nodes/Mention.php
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class Mention extends Node
|
||||
{
|
||||
public static $name = 'mention';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
'renderLabel' => fn () => null,
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'span[data-type="' . self::$name . '"]',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function addAttributes()
|
||||
{
|
||||
return [
|
||||
'id' => [
|
||||
'parseHTML' => fn ($DOMNode) => $DOMNode->getAttribute('data-id') ?: null,
|
||||
'renderHTML' => fn ($attributes) => ['data-id' => $attributes->id ?? null],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderText($node)
|
||||
{
|
||||
return $this->options['renderLabel']($node);
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return [
|
||||
'span',
|
||||
HTML::mergeAttributes(
|
||||
['data-type' => self::$name],
|
||||
$this->options['HTMLAttributes'],
|
||||
$HTMLAttributes,
|
||||
),
|
||||
0,
|
||||
];
|
||||
}
|
||||
}
|
||||
42
vendor/ueberdosis/tiptap-php/src/Nodes/OrderedList.php
vendored
Normal file
42
vendor/ueberdosis/tiptap-php/src/Nodes/OrderedList.php
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class OrderedList extends Node
|
||||
{
|
||||
public static $name = 'orderedList';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'ol',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function addAttributes()
|
||||
{
|
||||
return [
|
||||
'start' => [
|
||||
'parseHTML' => fn ($DOMNode) => (int) $DOMNode->getAttribute('start') ?: null,
|
||||
'renderHTML' => fn ($attributes) => ($attributes->start ?? null) ? ['start' => $attributes->start] : null,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return ['ol', HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes), 0];
|
||||
}
|
||||
}
|
||||
34
vendor/ueberdosis/tiptap-php/src/Nodes/Paragraph.php
vendored
Normal file
34
vendor/ueberdosis/tiptap-php/src/Nodes/Paragraph.php
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class Paragraph extends Node
|
||||
{
|
||||
public static $name = 'paragraph';
|
||||
|
||||
public static $priority = 1000;
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'p',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return ['p', HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes), 0];
|
||||
}
|
||||
}
|
||||
36
vendor/ueberdosis/tiptap-php/src/Nodes/Table.php
vendored
Normal file
36
vendor/ueberdosis/tiptap-php/src/Nodes/Table.php
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class Table extends Node
|
||||
{
|
||||
public static $name = 'table';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'table',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return [
|
||||
'table',
|
||||
HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes),
|
||||
['tbody', 0],
|
||||
];
|
||||
}
|
||||
}
|
||||
75
vendor/ueberdosis/tiptap-php/src/Nodes/TableCell.php
vendored
Normal file
75
vendor/ueberdosis/tiptap-php/src/Nodes/TableCell.php
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class TableCell extends Node
|
||||
{
|
||||
public static $name = 'tableCell';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'td',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function addAttributes()
|
||||
{
|
||||
return [
|
||||
'rowspan' => [
|
||||
'parseHTML' => fn ($DOMNode) => intval($DOMNode->getAttribute('rowspan')) ?: null,
|
||||
],
|
||||
'colspan' => [
|
||||
'parseHTML' => fn ($DOMNode) => intval($DOMNode->getAttribute('colspan')) ?: null,
|
||||
],
|
||||
'colwidth' => [
|
||||
'parseHTML' => function ($DOMNode) {
|
||||
$colwidth = $DOMNode->getAttribute('data-colwidth');
|
||||
|
||||
if (! $colwidth) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$widths = array_map(function ($w) {
|
||||
return intval($w);
|
||||
}, explode(',', $colwidth));
|
||||
|
||||
return $widths;
|
||||
},
|
||||
'renderHTML' => function ($attributes) {
|
||||
if (! isset($attributes->colwidth)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return [
|
||||
'data-colwidth' => join(',', $attributes->colwidth),
|
||||
];
|
||||
},
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return [
|
||||
'td',
|
||||
HTML::mergeAttributes(
|
||||
$this->options['HTMLAttributes'],
|
||||
$HTMLAttributes,
|
||||
),
|
||||
0,
|
||||
];
|
||||
}
|
||||
}
|
||||
38
vendor/ueberdosis/tiptap-php/src/Nodes/TableHeader.php
vendored
Normal file
38
vendor/ueberdosis/tiptap-php/src/Nodes/TableHeader.php
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class TableHeader extends TableCell
|
||||
{
|
||||
public static $name = 'tableHeader';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'th',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return [
|
||||
'th',
|
||||
HTML::mergeAttributes(
|
||||
$this->options['HTMLAttributes'],
|
||||
$HTMLAttributes,
|
||||
),
|
||||
0,
|
||||
];
|
||||
}
|
||||
}
|
||||
32
vendor/ueberdosis/tiptap-php/src/Nodes/TableRow.php
vendored
Normal file
32
vendor/ueberdosis/tiptap-php/src/Nodes/TableRow.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class TableRow extends Node
|
||||
{
|
||||
public static $name = 'tableRow';
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'tr',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return ['tr', HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes), 0];
|
||||
}
|
||||
}
|
||||
70
vendor/ueberdosis/tiptap-php/src/Nodes/TaskItem.php
vendored
Normal file
70
vendor/ueberdosis/tiptap-php/src/Nodes/TaskItem.php
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class TaskItem extends Node
|
||||
{
|
||||
public static $name = 'taskItem';
|
||||
|
||||
public static $priority = 1000;
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function addAttributes()
|
||||
{
|
||||
return [
|
||||
'checked' => [
|
||||
'default' => false,
|
||||
'renderHTML' => fn ($attributes) => [
|
||||
'data-checked' => $attributes->checked ?? null,
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'li[data-type="' . self::$name . '"]',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return [
|
||||
'li',
|
||||
HTML::mergeAttributes(
|
||||
$this->options['HTMLAttributes'],
|
||||
$HTMLAttributes,
|
||||
['data-type' => self::$name],
|
||||
),
|
||||
[
|
||||
'label',
|
||||
[
|
||||
'input',
|
||||
[
|
||||
'type' => 'checkbox',
|
||||
'checked' => $node->attrs->checked ?? null
|
||||
? 'checked'
|
||||
: null,
|
||||
],
|
||||
],
|
||||
['span'],
|
||||
],
|
||||
[
|
||||
'div',
|
||||
0,
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
38
vendor/ueberdosis/tiptap-php/src/Nodes/TaskList.php
vendored
Normal file
38
vendor/ueberdosis/tiptap-php/src/Nodes/TaskList.php
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
use Tiptap\Utils\HTML;
|
||||
|
||||
class TaskList extends Node
|
||||
{
|
||||
public static $name = 'taskList';
|
||||
|
||||
public static $priority = 1000;
|
||||
|
||||
public function addOptions()
|
||||
{
|
||||
return [
|
||||
'HTMLAttributes' => [],
|
||||
];
|
||||
}
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => 'ul[data-type="' . self::$name . '"]',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function renderHTML($node, $HTMLAttributes = [])
|
||||
{
|
||||
return ['ul', HTML::mergeAttributes(
|
||||
$this->options['HTMLAttributes'],
|
||||
$HTMLAttributes,
|
||||
['data-type' => self::$name],
|
||||
), 0];
|
||||
}
|
||||
}
|
||||
19
vendor/ueberdosis/tiptap-php/src/Nodes/Text.php
vendored
Normal file
19
vendor/ueberdosis/tiptap-php/src/Nodes/Text.php
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Nodes;
|
||||
|
||||
use Tiptap\Core\Node;
|
||||
|
||||
class Text extends Node
|
||||
{
|
||||
public static $name = 'text';
|
||||
|
||||
public function parseHTML()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'tag' => '#text',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue