create-prisma-php-app 3.3.15 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -436,6 +436,14 @@ class TemplateCompiler
|
|
|
436
436
|
}
|
|
437
437
|
|
|
438
438
|
$htmlOut = self::innerXml($fragDom);
|
|
439
|
+
$htmlOut = preg_replace_callback(
|
|
440
|
+
'/<([a-z0-9-]+)([^>]*)\/>/i',
|
|
441
|
+
fn($m) => in_array(strtolower($m[1]), self::$selfClosingTags, true)
|
|
442
|
+
? $m[0]
|
|
443
|
+
: "<{$m[1]}{$m[2]}></{$m[1]}>",
|
|
444
|
+
$htmlOut
|
|
445
|
+
);
|
|
446
|
+
|
|
439
447
|
if (
|
|
440
448
|
str_contains($htmlOut, '{{') ||
|
|
441
449
|
self::hasComponentTag($htmlOut) ||
|
|
@@ -149,24 +149,24 @@ class TwMerge
|
|
|
149
149
|
'border-w-r' => ['/^border-r(-(\d+|px|\[.+\]))?$/'],
|
|
150
150
|
'border-w-b' => ['/^border-b(-(\d+|px|\[.+\]))?$/'],
|
|
151
151
|
'border-w-l' => ['/^border-l(-(\d+|px|\[.+\]))?$/'],
|
|
152
|
-
'border-color' => ['/^border(-[trbl])
|
|
152
|
+
'border-color' => ['/^border(-[trbl])?-.+$/'],
|
|
153
153
|
'border-style' => ['/^border-(solid|dashed|dotted|double|hidden|none)$/'],
|
|
154
154
|
'divide-x' => ['/^divide-x(-(\d+|px|reverse|\[.+\]))?$/'],
|
|
155
155
|
'divide-y' => ['/^divide-y(-(\d+|px|reverse|\[.+\]))?$/'],
|
|
156
|
-
'divide-color' => ['/^divide
|
|
156
|
+
'divide-color' => ['/^divide-.+$/'],
|
|
157
157
|
'divide-style' => ['/^divide-(solid|dashed|dotted|double|none)$/'],
|
|
158
158
|
'outline-w' => ['/^outline(-(\d+|px|\[.+\]))?$/'],
|
|
159
|
-
'outline-color' => ['/^outline
|
|
159
|
+
'outline-color' => ['/^outline-.+$/'],
|
|
160
160
|
'outline-style' => ['/^outline-(none|solid|dashed|dotted|double)$/'],
|
|
161
161
|
'outline-offset' => ['/^outline-offset-(\d+|px|\[.+\])$/'],
|
|
162
162
|
'ring-w' => ['/^ring(-(\d+|px|inset|\[.+\]))?$/'],
|
|
163
|
-
'ring-color' => ['/^ring
|
|
163
|
+
'ring-color' => ['/^ring-.+$/'],
|
|
164
164
|
'ring-offset-w' => ['/^ring-offset-(\d+|px|\[.+\])$/'],
|
|
165
|
-
'ring-offset-color' => ['/^ring-offset
|
|
165
|
+
'ring-offset-color' => ['/^ring-offset-.+$/'],
|
|
166
166
|
|
|
167
167
|
// Effects
|
|
168
168
|
'shadow' => ['/^shadow(-(\w+|\[.+\]))?$/'],
|
|
169
|
-
'shadow-color' => ['/^shadow
|
|
169
|
+
'shadow-color' => ['/^shadow-.+$/'],
|
|
170
170
|
'opacity' => ['/^opacity-(\d+|\[.+\])$/'],
|
|
171
171
|
'mix-blend' => ['/^mix-blend-(normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity|plus-lighter)$/'],
|
|
172
172
|
'bg-blend' => ['/^bg-blend-(normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity)$/'],
|
|
@@ -208,10 +208,10 @@ class TwMerge
|
|
|
208
208
|
'transform-origin' => ['/^origin-(center|top|top-right|right|bottom-right|bottom|bottom-left|left|top-left|\[.+\])$/'],
|
|
209
209
|
|
|
210
210
|
// Interactivity
|
|
211
|
-
'accent' => ['/^accent
|
|
211
|
+
'accent' => ['/^accent-.+$/'],
|
|
212
212
|
'appearance' => ['/^appearance-(none|auto)$/'],
|
|
213
213
|
'cursor' => ['/^cursor-(auto|default|pointer|wait|text|move|help|not-allowed|none|context-menu|progress|cell|crosshair|vertical-text|alias|copy|no-drop|grab|grabbing|all-scroll|col-resize|row-resize|n-resize|e-resize|s-resize|w-resize|ne-resize|nw-resize|se-resize|sw-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|zoom-in|zoom-out|\[.+\])$/'],
|
|
214
|
-
'caret-color' => ['/^caret
|
|
214
|
+
'caret-color' => ['/^caret-.+$/'],
|
|
215
215
|
'pointer-events' => ['/^pointer-events-(none|auto)$/'],
|
|
216
216
|
'resize' => ['/^resize(-none|-y|-x)?$/'],
|
|
217
217
|
'scroll-behavior' => ['/^scroll-(auto|smooth)$/'],
|
|
@@ -287,12 +287,22 @@ final class Validator
|
|
|
287
287
|
* Validate a JSON string.
|
|
288
288
|
*
|
|
289
289
|
* @param mixed $value The value to validate.
|
|
290
|
-
* @return
|
|
290
|
+
* @return string The JSON string if valid, or throws an exception if invalid.
|
|
291
291
|
*/
|
|
292
|
-
public static function json($value):
|
|
292
|
+
public static function json(mixed $value): string
|
|
293
293
|
{
|
|
294
|
-
|
|
295
|
-
|
|
294
|
+
if (is_string($value)) {
|
|
295
|
+
json_decode($value);
|
|
296
|
+
if (json_last_error() !== JSON_ERROR_NONE) {
|
|
297
|
+
throw new InvalidArgumentException('Invalid JSON string');
|
|
298
|
+
}
|
|
299
|
+
return $value;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
return json_encode(
|
|
303
|
+
$value,
|
|
304
|
+
JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES
|
|
305
|
+
);
|
|
296
306
|
}
|
|
297
307
|
|
|
298
308
|
/**
|