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
90
vendor/ueberdosis/tiptap-php/src/Utils/HTML.php
vendored
Normal file
90
vendor/ueberdosis/tiptap-php/src/Utils/HTML.php
vendored
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Utils;
|
||||
|
||||
class HTML
|
||||
{
|
||||
/**
|
||||
* Merge an associative array of attributes,
|
||||
* and make sure to merge classes and inline styles.
|
||||
*/
|
||||
public static function mergeAttributes(...$args): array
|
||||
{
|
||||
$attributes = [];
|
||||
|
||||
foreach ($args as $moreAttributes) {
|
||||
if (! is_array($moreAttributes) && ! is_object($moreAttributes)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($moreAttributes as $key => $value) {
|
||||
// class="foo bar"
|
||||
if ($key === 'class') {
|
||||
if (! self::isStringable($value)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$attributes['class'] = trim(($attributes['class'] ?? '') . ' ' . $value);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// style="color: red;"
|
||||
if ($key === 'style') {
|
||||
if (! self::isStringable($value)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$style = rtrim($attributes['style'] ?? '', '; ') . '; ' . rtrim($value, ';') . '; ';
|
||||
$attributes['style'] = ltrim(trim($style), '; ');
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$attributes[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render an associative array of attributes
|
||||
* as a HTML string.
|
||||
*/
|
||||
public static function renderAttributes(array $attrs): string
|
||||
{
|
||||
$attributes = [];
|
||||
|
||||
// class="custom"
|
||||
foreach ($attrs as $name => $value) {
|
||||
if (! self::isStringable($value)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_bool($value)) {
|
||||
$value = $value ? 'true' : 'false';
|
||||
}
|
||||
|
||||
$value = (string) $value;
|
||||
|
||||
if ($value === '') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$escapedValue = htmlentities($value);
|
||||
|
||||
$attributes[] = " {$name}=\"{$escapedValue}\"";
|
||||
}
|
||||
|
||||
return join($attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a value can be rendered into an attribute. Excludes null.
|
||||
*/
|
||||
private static function isStringable($value): bool
|
||||
{
|
||||
return is_scalar($value) || $value instanceof \Stringable;
|
||||
}
|
||||
}
|
||||
57
vendor/ueberdosis/tiptap-php/src/Utils/InlineStyle.php
vendored
Normal file
57
vendor/ueberdosis/tiptap-php/src/Utils/InlineStyle.php
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Utils;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InlineStyle
|
||||
{
|
||||
/**
|
||||
* @return string[]
|
||||
*
|
||||
* @psalm-return array<string, string>
|
||||
*/
|
||||
public static function get($DOMNode): array
|
||||
{
|
||||
$results = [];
|
||||
|
||||
if (! method_exists($DOMNode, 'getAttribute')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$style = $DOMNode->getAttribute('style');
|
||||
|
||||
preg_match_all(
|
||||
"/([\w-]+)\s*:\s*([^;]+)\s*;?/",
|
||||
$style,
|
||||
$matches,
|
||||
PREG_SET_ORDER
|
||||
);
|
||||
|
||||
foreach ($matches as $match) {
|
||||
$results[$match[1]] = $match[2];
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
public static function hasAttribute($DOMNode, $value): bool
|
||||
{
|
||||
$styles = self::get($DOMNode);
|
||||
|
||||
if (is_string($value)) {
|
||||
return in_array($value, array_keys($styles));
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
return array_diff($value, $styles) == [];
|
||||
}
|
||||
|
||||
throw new Exception('Can’t compare inline styles to ' . json_encode($value));
|
||||
}
|
||||
|
||||
public static function getAttribute($DOMNode, $attribute): ?string
|
||||
{
|
||||
return self::get($DOMNode)[$attribute] ?? null;
|
||||
}
|
||||
}
|
||||
53
vendor/ueberdosis/tiptap-php/src/Utils/Minify.php
vendored
Normal file
53
vendor/ueberdosis/tiptap-php/src/Utils/Minify.php
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
namespace Tiptap\Utils;
|
||||
|
||||
class Minify
|
||||
{
|
||||
protected $_replacementHash;
|
||||
protected $_placeholders = [];
|
||||
protected $_html;
|
||||
|
||||
public function process($html): string
|
||||
{
|
||||
$this->_html = str_replace("\r\n", "\n", trim($html));
|
||||
|
||||
$hash = isset($_SERVER['REQUEST_TIME']) ? (string) $_SERVER['REQUEST_TIME'] : (string) time();
|
||||
$this->_replacementHash = 'MINIFYHTML' . md5($hash);
|
||||
|
||||
// replace PREs with placeholders
|
||||
$this->_html = preg_replace_callback('/\\s*<pre(\\b[^>]*?>[\\s\\S]*?<\\/pre>)\\s*/iu', [$this, '_removePreCB'], $this->_html);
|
||||
|
||||
// trim each line.
|
||||
$this->_html = preg_replace('/^\\s+|\\s+$/mu', '', $this->_html);
|
||||
|
||||
// remove ws around block/undisplayed elements
|
||||
$this->_html = preg_replace('/\\s+(<\\/?(?:area|article|aside|base(?:font)?|blockquote|body'
|
||||
. '|canvas|caption|center|col(?:group)?|dd|dir|div|dl|dt|fieldset|figcaption|figure|footer|form'
|
||||
. '|frame(?:set)?|h[1-6]|head|header|hgroup|hr|html|legend|li|link|main|map|menu|meta|nav'
|
||||
. '|ol|opt(?:group|ion)|output|p|param|section|t(?:able|body|head|d|h||r|foot|itle)'
|
||||
. '|ul|video)\\b[^>]*>)/iu', '$1', $this->_html);
|
||||
|
||||
// fill placeholders
|
||||
$this->_html = str_replace(
|
||||
array_keys($this->_placeholders),
|
||||
array_values($this->_placeholders),
|
||||
$this->_html
|
||||
);
|
||||
|
||||
return $this->_html;
|
||||
}
|
||||
|
||||
protected function _removePreCB($m): string
|
||||
{
|
||||
return $this->_reservePlace("<pre{$m[1]}");
|
||||
}
|
||||
|
||||
protected function _reservePlace($content): string
|
||||
{
|
||||
$placeholder = '%' . $this->_replacementHash . count($this->_placeholders) . '%';
|
||||
$this->_placeholders[$placeholder] = $content;
|
||||
|
||||
return $placeholder;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue