create-prisma-php-app 2.4.4 → 2.4.5

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.
@@ -58,7 +58,23 @@ class PHPX implements IPHPX
58
58
  */
59
59
  protected function getMergeClasses(string|array ...$classes): string
60
60
  {
61
- return PrismaPHPSettings::$option->tailwindcss ? TwMerge::mergeClasses($classes, $this->class) : $this->mergeClasses($classes, $this->class);
61
+ $all = array_merge($classes, [$this->class]);
62
+
63
+ $expr = [];
64
+ foreach ($all as &$chunk) {
65
+ $chunk = preg_replace_callback('/\{\{[\s\S]*?\}\}/', function ($m) use (&$expr) {
66
+ $token = '__EXPR' . count($expr) . '__';
67
+ $expr[$token] = $m[0];
68
+ return $token;
69
+ }, $chunk);
70
+ }
71
+ unset($chunk);
72
+
73
+ $merged = PrismaPHPSettings::$option->tailwindcss
74
+ ? TwMerge::mergeClasses(...$all)
75
+ : $this->mergeClasses(...$all);
76
+
77
+ return str_replace(array_keys($expr), array_values($expr), $merged);
62
78
  }
63
79
 
64
80
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "2.4.4",
3
+ "version": "2.4.5",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",