@vituum/vite-plugin-latte 1.1.0 → 1.2.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.
- package/latte/PlaceholderFunction.php +2 -2
- package/package.json +1 -1
- package/vendor/autoload.php +1 -1
- package/vendor/composer/autoload_classmap.php +51 -0
- package/vendor/composer/autoload_real.php +4 -4
- package/vendor/composer/autoload_static.php +53 -2
- package/vendor/composer/installed.json +96 -7
- package/vendor/composer/installed.php +14 -5
- package/vendor/latte/latte/src/Latte/Compiler/Escaper.php +11 -2
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/FilterNode.php +1 -1
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ModifierNode.php +2 -2
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/NameNode.php +11 -21
- package/vendor/latte/latte/src/Latte/Compiler/PrintContext.php +1 -1
- package/vendor/latte/latte/src/Latte/Compiler/TagLexer.php +2 -2
- package/vendor/latte/latte/src/Latte/Compiler/TagParserData.php +275 -280
- package/vendor/latte/latte/src/Latte/Compiler/TemplateGenerator.php +4 -4
- package/vendor/latte/latte/src/Latte/Compiler/TemplateLexer.php +10 -2
- package/vendor/latte/latte/src/Latte/Compiler/TemplateParserHtml.php +6 -2
- package/vendor/latte/latte/src/Latte/Engine.php +109 -97
- package/vendor/latte/latte/src/Latte/Essential/AuxiliaryIterator.php +46 -0
- package/vendor/latte/latte/src/Latte/Essential/Blueprint.php +42 -25
- package/vendor/latte/latte/src/Latte/Essential/CoreExtension.php +76 -72
- package/vendor/latte/latte/src/Latte/Essential/Filters.php +95 -37
- package/vendor/latte/latte/src/Latte/Essential/Nodes/ContentTypeNode.php +7 -0
- package/vendor/latte/latte/src/Latte/Essential/Nodes/ForeachNode.php +36 -0
- package/vendor/latte/latte/src/Latte/Essential/Nodes/TemplatePrintNode.php +25 -3
- package/vendor/latte/latte/src/Latte/Essential/Nodes/VarPrintNode.php +9 -2
- package/vendor/latte/latte/src/Latte/Essential/Passes.php +10 -50
- package/vendor/latte/latte/src/Latte/Helpers.php +3 -1
- package/vendor/latte/latte/src/Latte/Loader.php +1 -0
- package/vendor/latte/latte/src/Latte/Loaders/FileLoader.php +1 -2
- package/vendor/latte/latte/src/Latte/Runtime/Filters.php +1 -4
- package/vendor/latte/latte/src/Latte/Runtime/FunctionExecutor.php +68 -0
- package/vendor/latte/latte/src/Latte/Runtime/Template.php +1 -3
- package/vendor/nette/utils/.phpstorm.meta.php +13 -0
- package/vendor/nette/utils/composer.json +51 -0
- package/vendor/nette/utils/license.md +60 -0
- package/vendor/nette/utils/readme.md +56 -0
- package/vendor/nette/utils/src/HtmlStringable.php +22 -0
- package/vendor/nette/utils/src/Iterators/CachingIterator.php +164 -0
- package/vendor/nette/utils/src/Iterators/Mapper.php +34 -0
- package/vendor/nette/utils/src/SmartObject.php +140 -0
- package/vendor/nette/utils/src/StaticClass.php +34 -0
- package/vendor/nette/utils/src/Translator.php +25 -0
- package/vendor/nette/utils/src/Utils/ArrayHash.php +106 -0
- package/vendor/nette/utils/src/Utils/ArrayList.php +136 -0
- package/vendor/nette/utils/src/Utils/Arrays.php +522 -0
- package/vendor/nette/utils/src/Utils/Callback.php +137 -0
- package/vendor/nette/utils/src/Utils/DateTime.php +140 -0
- package/vendor/nette/utils/src/Utils/FileInfo.php +69 -0
- package/vendor/nette/utils/src/Utils/FileSystem.php +326 -0
- package/vendor/nette/utils/src/Utils/Finder.php +510 -0
- package/vendor/nette/utils/src/Utils/Floats.php +107 -0
- package/vendor/nette/utils/src/Utils/Helpers.php +104 -0
- package/vendor/nette/utils/src/Utils/Html.php +839 -0
- package/vendor/nette/utils/src/Utils/Image.php +829 -0
- package/vendor/nette/utils/src/Utils/ImageColor.php +75 -0
- package/vendor/nette/utils/src/Utils/ImageType.php +25 -0
- package/vendor/nette/utils/src/Utils/Iterables.php +159 -0
- package/vendor/nette/utils/src/Utils/Json.php +84 -0
- package/vendor/nette/utils/src/Utils/ObjectHelpers.php +229 -0
- package/vendor/nette/utils/src/Utils/Paginator.php +245 -0
- package/vendor/nette/utils/src/Utils/Random.php +52 -0
- package/vendor/nette/utils/src/Utils/Reflection.php +320 -0
- package/vendor/nette/utils/src/Utils/ReflectionMethod.php +36 -0
- package/vendor/nette/utils/src/Utils/Strings.php +708 -0
- package/vendor/nette/utils/src/Utils/Type.php +267 -0
- package/vendor/nette/utils/src/Utils/Validators.php +416 -0
- package/vendor/nette/utils/src/Utils/exceptions.php +50 -0
- package/vendor/nette/utils/src/compatibility.php +32 -0
- package/vendor/nette/utils/src/exceptions.php +109 -0
|
@@ -5,7 +5,7 @@ namespace App\Latte;
|
|
|
5
5
|
class PlaceholderFunction {
|
|
6
6
|
|
|
7
7
|
public static function execute($width, $height): string {
|
|
8
|
-
$colors = ["
|
|
9
|
-
return 'https://
|
|
8
|
+
$colors = ["333333", "444444", "666666", "222222", "777777", "888888", "111111"];
|
|
9
|
+
return 'https://placehold.co/' . $width . 'x' . $height . '/' . $colors[array_rand($colors)] . '/' . 'webp';
|
|
10
10
|
}
|
|
11
11
|
}
|
package/package.json
CHANGED
package/vendor/autoload.php
CHANGED
|
@@ -108,6 +108,7 @@ return array(
|
|
|
108
108
|
'Latte\\Compiler\\TokenStream' => $vendorDir . '/latte/latte/src/Latte/Compiler/TokenStream.php',
|
|
109
109
|
'Latte\\ContentType' => $vendorDir . '/latte/latte/src/Latte/ContentType.php',
|
|
110
110
|
'Latte\\Engine' => $vendorDir . '/latte/latte/src/Latte/Engine.php',
|
|
111
|
+
'Latte\\Essential\\AuxiliaryIterator' => $vendorDir . '/latte/latte/src/Latte/Essential/AuxiliaryIterator.php',
|
|
111
112
|
'Latte\\Essential\\Blueprint' => $vendorDir . '/latte/latte/src/Latte/Essential/Blueprint.php',
|
|
112
113
|
'Latte\\Essential\\CachingIterator' => $vendorDir . '/latte/latte/src/Latte/Essential/CachingIterator.php',
|
|
113
114
|
'Latte\\Essential\\CoreExtension' => $vendorDir . '/latte/latte/src/Latte/Essential/CoreExtension.php',
|
|
@@ -169,6 +170,7 @@ return array(
|
|
|
169
170
|
'Latte\\Runtime\\FilterExecutor' => $vendorDir . '/latte/latte/src/Latte/Runtime/FilterExecutor.php',
|
|
170
171
|
'Latte\\Runtime\\FilterInfo' => $vendorDir . '/latte/latte/src/Latte/Runtime/FilterInfo.php',
|
|
171
172
|
'Latte\\Runtime\\Filters' => $vendorDir . '/latte/latte/src/Latte/Runtime/Filters.php',
|
|
173
|
+
'Latte\\Runtime\\FunctionExecutor' => $vendorDir . '/latte/latte/src/Latte/Runtime/FunctionExecutor.php',
|
|
172
174
|
'Latte\\Runtime\\Html' => $vendorDir . '/latte/latte/src/Latte/Runtime/Html.php',
|
|
173
175
|
'Latte\\Runtime\\HtmlStringable' => $vendorDir . '/latte/latte/src/Latte/Runtime/HtmlStringable.php',
|
|
174
176
|
'Latte\\Runtime\\Template' => $vendorDir . '/latte/latte/src/Latte/Runtime/Template.php',
|
|
@@ -186,4 +188,53 @@ return array(
|
|
|
186
188
|
'Latte\\Sandbox\\SecurityPolicy' => $vendorDir . '/latte/latte/src/Latte/Sandbox/SecurityPolicy.php',
|
|
187
189
|
'Latte\\SecurityViolationException' => $vendorDir . '/latte/latte/src/Latte/exceptions.php',
|
|
188
190
|
'Latte\\Tools\\Linter' => $vendorDir . '/latte/latte/src/Tools/Linter.php',
|
|
191
|
+
'Nette\\ArgumentOutOfRangeException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
192
|
+
'Nette\\DeprecatedException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
193
|
+
'Nette\\DirectoryNotFoundException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
194
|
+
'Nette\\FileNotFoundException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
195
|
+
'Nette\\HtmlStringable' => $vendorDir . '/nette/utils/src/HtmlStringable.php',
|
|
196
|
+
'Nette\\IOException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
197
|
+
'Nette\\InvalidArgumentException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
198
|
+
'Nette\\InvalidStateException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
199
|
+
'Nette\\Iterators\\CachingIterator' => $vendorDir . '/nette/utils/src/Iterators/CachingIterator.php',
|
|
200
|
+
'Nette\\Iterators\\Mapper' => $vendorDir . '/nette/utils/src/Iterators/Mapper.php',
|
|
201
|
+
'Nette\\Localization\\ITranslator' => $vendorDir . '/nette/utils/src/compatibility.php',
|
|
202
|
+
'Nette\\Localization\\Translator' => $vendorDir . '/nette/utils/src/Translator.php',
|
|
203
|
+
'Nette\\MemberAccessException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
204
|
+
'Nette\\NotImplementedException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
205
|
+
'Nette\\NotSupportedException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
206
|
+
'Nette\\OutOfRangeException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
207
|
+
'Nette\\SmartObject' => $vendorDir . '/nette/utils/src/SmartObject.php',
|
|
208
|
+
'Nette\\StaticClass' => $vendorDir . '/nette/utils/src/StaticClass.php',
|
|
209
|
+
'Nette\\UnexpectedValueException' => $vendorDir . '/nette/utils/src/exceptions.php',
|
|
210
|
+
'Nette\\Utils\\ArrayHash' => $vendorDir . '/nette/utils/src/Utils/ArrayHash.php',
|
|
211
|
+
'Nette\\Utils\\ArrayList' => $vendorDir . '/nette/utils/src/Utils/ArrayList.php',
|
|
212
|
+
'Nette\\Utils\\Arrays' => $vendorDir . '/nette/utils/src/Utils/Arrays.php',
|
|
213
|
+
'Nette\\Utils\\AssertionException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
|
|
214
|
+
'Nette\\Utils\\Callback' => $vendorDir . '/nette/utils/src/Utils/Callback.php',
|
|
215
|
+
'Nette\\Utils\\DateTime' => $vendorDir . '/nette/utils/src/Utils/DateTime.php',
|
|
216
|
+
'Nette\\Utils\\FileInfo' => $vendorDir . '/nette/utils/src/Utils/FileInfo.php',
|
|
217
|
+
'Nette\\Utils\\FileSystem' => $vendorDir . '/nette/utils/src/Utils/FileSystem.php',
|
|
218
|
+
'Nette\\Utils\\Finder' => $vendorDir . '/nette/utils/src/Utils/Finder.php',
|
|
219
|
+
'Nette\\Utils\\Floats' => $vendorDir . '/nette/utils/src/Utils/Floats.php',
|
|
220
|
+
'Nette\\Utils\\Helpers' => $vendorDir . '/nette/utils/src/Utils/Helpers.php',
|
|
221
|
+
'Nette\\Utils\\Html' => $vendorDir . '/nette/utils/src/Utils/Html.php',
|
|
222
|
+
'Nette\\Utils\\IHtmlString' => $vendorDir . '/nette/utils/src/compatibility.php',
|
|
223
|
+
'Nette\\Utils\\Image' => $vendorDir . '/nette/utils/src/Utils/Image.php',
|
|
224
|
+
'Nette\\Utils\\ImageColor' => $vendorDir . '/nette/utils/src/Utils/ImageColor.php',
|
|
225
|
+
'Nette\\Utils\\ImageException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
|
|
226
|
+
'Nette\\Utils\\ImageType' => $vendorDir . '/nette/utils/src/Utils/ImageType.php',
|
|
227
|
+
'Nette\\Utils\\Iterables' => $vendorDir . '/nette/utils/src/Utils/Iterables.php',
|
|
228
|
+
'Nette\\Utils\\Json' => $vendorDir . '/nette/utils/src/Utils/Json.php',
|
|
229
|
+
'Nette\\Utils\\JsonException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
|
|
230
|
+
'Nette\\Utils\\ObjectHelpers' => $vendorDir . '/nette/utils/src/Utils/ObjectHelpers.php',
|
|
231
|
+
'Nette\\Utils\\Paginator' => $vendorDir . '/nette/utils/src/Utils/Paginator.php',
|
|
232
|
+
'Nette\\Utils\\Random' => $vendorDir . '/nette/utils/src/Utils/Random.php',
|
|
233
|
+
'Nette\\Utils\\Reflection' => $vendorDir . '/nette/utils/src/Utils/Reflection.php',
|
|
234
|
+
'Nette\\Utils\\ReflectionMethod' => $vendorDir . '/nette/utils/src/Utils/ReflectionMethod.php',
|
|
235
|
+
'Nette\\Utils\\RegexpException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
|
|
236
|
+
'Nette\\Utils\\Strings' => $vendorDir . '/nette/utils/src/Utils/Strings.php',
|
|
237
|
+
'Nette\\Utils\\Type' => $vendorDir . '/nette/utils/src/Utils/Type.php',
|
|
238
|
+
'Nette\\Utils\\UnknownImageFileException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
|
|
239
|
+
'Nette\\Utils\\Validators' => $vendorDir . '/nette/utils/src/Utils/Validators.php',
|
|
189
240
|
);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// autoload_real.php @generated by Composer
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class ComposerAutoloaderInit19cfb30b66a778b432af39bbd1e78bca
|
|
6
6
|
{
|
|
7
7
|
private static $loader;
|
|
8
8
|
|
|
@@ -24,12 +24,12 @@ class ComposerAutoloaderInitda1ce49ef3085539a79eddbb995629f3
|
|
|
24
24
|
|
|
25
25
|
require __DIR__ . '/platform_check.php';
|
|
26
26
|
|
|
27
|
-
spl_autoload_register(array('
|
|
27
|
+
spl_autoload_register(array('ComposerAutoloaderInit19cfb30b66a778b432af39bbd1e78bca', 'loadClassLoader'), true, true);
|
|
28
28
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
|
29
|
-
spl_autoload_unregister(array('
|
|
29
|
+
spl_autoload_unregister(array('ComposerAutoloaderInit19cfb30b66a778b432af39bbd1e78bca', 'loadClassLoader'));
|
|
30
30
|
|
|
31
31
|
require __DIR__ . '/autoload_static.php';
|
|
32
|
-
call_user_func(\Composer\Autoload\
|
|
32
|
+
call_user_func(\Composer\Autoload\ComposerStaticInit19cfb30b66a778b432af39bbd1e78bca::getInitializer($loader));
|
|
33
33
|
|
|
34
34
|
$loader->register(true);
|
|
35
35
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
namespace Composer\Autoload;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
class ComposerStaticInit19cfb30b66a778b432af39bbd1e78bca
|
|
8
8
|
{
|
|
9
9
|
public static $classMap = array (
|
|
10
10
|
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
|
@@ -109,6 +109,7 @@ class ComposerStaticInitda1ce49ef3085539a79eddbb995629f3
|
|
|
109
109
|
'Latte\\Compiler\\TokenStream' => __DIR__ . '/..' . '/latte/latte/src/Latte/Compiler/TokenStream.php',
|
|
110
110
|
'Latte\\ContentType' => __DIR__ . '/..' . '/latte/latte/src/Latte/ContentType.php',
|
|
111
111
|
'Latte\\Engine' => __DIR__ . '/..' . '/latte/latte/src/Latte/Engine.php',
|
|
112
|
+
'Latte\\Essential\\AuxiliaryIterator' => __DIR__ . '/..' . '/latte/latte/src/Latte/Essential/AuxiliaryIterator.php',
|
|
112
113
|
'Latte\\Essential\\Blueprint' => __DIR__ . '/..' . '/latte/latte/src/Latte/Essential/Blueprint.php',
|
|
113
114
|
'Latte\\Essential\\CachingIterator' => __DIR__ . '/..' . '/latte/latte/src/Latte/Essential/CachingIterator.php',
|
|
114
115
|
'Latte\\Essential\\CoreExtension' => __DIR__ . '/..' . '/latte/latte/src/Latte/Essential/CoreExtension.php',
|
|
@@ -170,6 +171,7 @@ class ComposerStaticInitda1ce49ef3085539a79eddbb995629f3
|
|
|
170
171
|
'Latte\\Runtime\\FilterExecutor' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/FilterExecutor.php',
|
|
171
172
|
'Latte\\Runtime\\FilterInfo' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/FilterInfo.php',
|
|
172
173
|
'Latte\\Runtime\\Filters' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/Filters.php',
|
|
174
|
+
'Latte\\Runtime\\FunctionExecutor' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/FunctionExecutor.php',
|
|
173
175
|
'Latte\\Runtime\\Html' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/Html.php',
|
|
174
176
|
'Latte\\Runtime\\HtmlStringable' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/HtmlStringable.php',
|
|
175
177
|
'Latte\\Runtime\\Template' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/Template.php',
|
|
@@ -187,12 +189,61 @@ class ComposerStaticInitda1ce49ef3085539a79eddbb995629f3
|
|
|
187
189
|
'Latte\\Sandbox\\SecurityPolicy' => __DIR__ . '/..' . '/latte/latte/src/Latte/Sandbox/SecurityPolicy.php',
|
|
188
190
|
'Latte\\SecurityViolationException' => __DIR__ . '/..' . '/latte/latte/src/Latte/exceptions.php',
|
|
189
191
|
'Latte\\Tools\\Linter' => __DIR__ . '/..' . '/latte/latte/src/Tools/Linter.php',
|
|
192
|
+
'Nette\\ArgumentOutOfRangeException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
193
|
+
'Nette\\DeprecatedException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
194
|
+
'Nette\\DirectoryNotFoundException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
195
|
+
'Nette\\FileNotFoundException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
196
|
+
'Nette\\HtmlStringable' => __DIR__ . '/..' . '/nette/utils/src/HtmlStringable.php',
|
|
197
|
+
'Nette\\IOException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
198
|
+
'Nette\\InvalidArgumentException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
199
|
+
'Nette\\InvalidStateException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
200
|
+
'Nette\\Iterators\\CachingIterator' => __DIR__ . '/..' . '/nette/utils/src/Iterators/CachingIterator.php',
|
|
201
|
+
'Nette\\Iterators\\Mapper' => __DIR__ . '/..' . '/nette/utils/src/Iterators/Mapper.php',
|
|
202
|
+
'Nette\\Localization\\ITranslator' => __DIR__ . '/..' . '/nette/utils/src/compatibility.php',
|
|
203
|
+
'Nette\\Localization\\Translator' => __DIR__ . '/..' . '/nette/utils/src/Translator.php',
|
|
204
|
+
'Nette\\MemberAccessException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
205
|
+
'Nette\\NotImplementedException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
206
|
+
'Nette\\NotSupportedException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
207
|
+
'Nette\\OutOfRangeException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
208
|
+
'Nette\\SmartObject' => __DIR__ . '/..' . '/nette/utils/src/SmartObject.php',
|
|
209
|
+
'Nette\\StaticClass' => __DIR__ . '/..' . '/nette/utils/src/StaticClass.php',
|
|
210
|
+
'Nette\\UnexpectedValueException' => __DIR__ . '/..' . '/nette/utils/src/exceptions.php',
|
|
211
|
+
'Nette\\Utils\\ArrayHash' => __DIR__ . '/..' . '/nette/utils/src/Utils/ArrayHash.php',
|
|
212
|
+
'Nette\\Utils\\ArrayList' => __DIR__ . '/..' . '/nette/utils/src/Utils/ArrayList.php',
|
|
213
|
+
'Nette\\Utils\\Arrays' => __DIR__ . '/..' . '/nette/utils/src/Utils/Arrays.php',
|
|
214
|
+
'Nette\\Utils\\AssertionException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php',
|
|
215
|
+
'Nette\\Utils\\Callback' => __DIR__ . '/..' . '/nette/utils/src/Utils/Callback.php',
|
|
216
|
+
'Nette\\Utils\\DateTime' => __DIR__ . '/..' . '/nette/utils/src/Utils/DateTime.php',
|
|
217
|
+
'Nette\\Utils\\FileInfo' => __DIR__ . '/..' . '/nette/utils/src/Utils/FileInfo.php',
|
|
218
|
+
'Nette\\Utils\\FileSystem' => __DIR__ . '/..' . '/nette/utils/src/Utils/FileSystem.php',
|
|
219
|
+
'Nette\\Utils\\Finder' => __DIR__ . '/..' . '/nette/utils/src/Utils/Finder.php',
|
|
220
|
+
'Nette\\Utils\\Floats' => __DIR__ . '/..' . '/nette/utils/src/Utils/Floats.php',
|
|
221
|
+
'Nette\\Utils\\Helpers' => __DIR__ . '/..' . '/nette/utils/src/Utils/Helpers.php',
|
|
222
|
+
'Nette\\Utils\\Html' => __DIR__ . '/..' . '/nette/utils/src/Utils/Html.php',
|
|
223
|
+
'Nette\\Utils\\IHtmlString' => __DIR__ . '/..' . '/nette/utils/src/compatibility.php',
|
|
224
|
+
'Nette\\Utils\\Image' => __DIR__ . '/..' . '/nette/utils/src/Utils/Image.php',
|
|
225
|
+
'Nette\\Utils\\ImageColor' => __DIR__ . '/..' . '/nette/utils/src/Utils/ImageColor.php',
|
|
226
|
+
'Nette\\Utils\\ImageException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php',
|
|
227
|
+
'Nette\\Utils\\ImageType' => __DIR__ . '/..' . '/nette/utils/src/Utils/ImageType.php',
|
|
228
|
+
'Nette\\Utils\\Iterables' => __DIR__ . '/..' . '/nette/utils/src/Utils/Iterables.php',
|
|
229
|
+
'Nette\\Utils\\Json' => __DIR__ . '/..' . '/nette/utils/src/Utils/Json.php',
|
|
230
|
+
'Nette\\Utils\\JsonException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php',
|
|
231
|
+
'Nette\\Utils\\ObjectHelpers' => __DIR__ . '/..' . '/nette/utils/src/Utils/ObjectHelpers.php',
|
|
232
|
+
'Nette\\Utils\\Paginator' => __DIR__ . '/..' . '/nette/utils/src/Utils/Paginator.php',
|
|
233
|
+
'Nette\\Utils\\Random' => __DIR__ . '/..' . '/nette/utils/src/Utils/Random.php',
|
|
234
|
+
'Nette\\Utils\\Reflection' => __DIR__ . '/..' . '/nette/utils/src/Utils/Reflection.php',
|
|
235
|
+
'Nette\\Utils\\ReflectionMethod' => __DIR__ . '/..' . '/nette/utils/src/Utils/ReflectionMethod.php',
|
|
236
|
+
'Nette\\Utils\\RegexpException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php',
|
|
237
|
+
'Nette\\Utils\\Strings' => __DIR__ . '/..' . '/nette/utils/src/Utils/Strings.php',
|
|
238
|
+
'Nette\\Utils\\Type' => __DIR__ . '/..' . '/nette/utils/src/Utils/Type.php',
|
|
239
|
+
'Nette\\Utils\\UnknownImageFileException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php',
|
|
240
|
+
'Nette\\Utils\\Validators' => __DIR__ . '/..' . '/nette/utils/src/Utils/Validators.php',
|
|
190
241
|
);
|
|
191
242
|
|
|
192
243
|
public static function getInitializer(ClassLoader $loader)
|
|
193
244
|
{
|
|
194
245
|
return \Closure::bind(function () use ($loader) {
|
|
195
|
-
$loader->classMap =
|
|
246
|
+
$loader->classMap = ComposerStaticInit19cfb30b66a778b432af39bbd1e78bca::$classMap;
|
|
196
247
|
|
|
197
248
|
}, null, ClassLoader::class);
|
|
198
249
|
}
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
"packages": [
|
|
3
3
|
{
|
|
4
4
|
"name": "latte/latte",
|
|
5
|
-
"version": "v3.0.
|
|
6
|
-
"version_normalized": "3.0.
|
|
5
|
+
"version": "v3.0.16",
|
|
6
|
+
"version_normalized": "3.0.16.0",
|
|
7
7
|
"source": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/nette/latte.git",
|
|
10
|
-
"reference": "
|
|
10
|
+
"reference": "0984953d961123075e95a9fa33ec4c4f4de266d2"
|
|
11
11
|
},
|
|
12
12
|
"dist": {
|
|
13
13
|
"type": "zip",
|
|
14
|
-
"url": "https://api.github.com/repos/nette/latte/zipball/
|
|
15
|
-
"reference": "
|
|
14
|
+
"url": "https://api.github.com/repos/nette/latte/zipball/0984953d961123075e95a9fa33ec4c4f4de266d2",
|
|
15
|
+
"reference": "0984953d961123075e95a9fa33ec4c4f4de266d2",
|
|
16
16
|
"shasum": ""
|
|
17
17
|
},
|
|
18
18
|
"require": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"nette/php-generator": "to use tag {templatePrint}",
|
|
39
39
|
"nette/utils": "to use filter |webalize"
|
|
40
40
|
},
|
|
41
|
-
"time": "
|
|
41
|
+
"time": "2024-05-14T09:54:10+00:00",
|
|
42
42
|
"bin": [
|
|
43
43
|
"bin/latte-lint"
|
|
44
44
|
],
|
|
@@ -84,9 +84,98 @@
|
|
|
84
84
|
],
|
|
85
85
|
"support": {
|
|
86
86
|
"issues": "https://github.com/nette/latte/issues",
|
|
87
|
-
"source": "https://github.com/nette/latte/tree/v3.0.
|
|
87
|
+
"source": "https://github.com/nette/latte/tree/v3.0.16"
|
|
88
88
|
},
|
|
89
89
|
"install-path": "../latte/latte"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "nette/utils",
|
|
93
|
+
"version": "v4.0.4",
|
|
94
|
+
"version_normalized": "4.0.4.0",
|
|
95
|
+
"source": {
|
|
96
|
+
"type": "git",
|
|
97
|
+
"url": "https://github.com/nette/utils.git",
|
|
98
|
+
"reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218"
|
|
99
|
+
},
|
|
100
|
+
"dist": {
|
|
101
|
+
"type": "zip",
|
|
102
|
+
"url": "https://api.github.com/repos/nette/utils/zipball/d3ad0aa3b9f934602cb3e3902ebccf10be34d218",
|
|
103
|
+
"reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218",
|
|
104
|
+
"shasum": ""
|
|
105
|
+
},
|
|
106
|
+
"require": {
|
|
107
|
+
"php": ">=8.0 <8.4"
|
|
108
|
+
},
|
|
109
|
+
"conflict": {
|
|
110
|
+
"nette/finder": "<3",
|
|
111
|
+
"nette/schema": "<1.2.2"
|
|
112
|
+
},
|
|
113
|
+
"require-dev": {
|
|
114
|
+
"jetbrains/phpstorm-attributes": "dev-master",
|
|
115
|
+
"nette/tester": "^2.5",
|
|
116
|
+
"phpstan/phpstan": "^1.0",
|
|
117
|
+
"tracy/tracy": "^2.9"
|
|
118
|
+
},
|
|
119
|
+
"suggest": {
|
|
120
|
+
"ext-gd": "to use Image",
|
|
121
|
+
"ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()",
|
|
122
|
+
"ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
|
|
123
|
+
"ext-json": "to use Nette\\Utils\\Json",
|
|
124
|
+
"ext-mbstring": "to use Strings::lower() etc...",
|
|
125
|
+
"ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()"
|
|
126
|
+
},
|
|
127
|
+
"time": "2024-01-17T16:50:36+00:00",
|
|
128
|
+
"type": "library",
|
|
129
|
+
"extra": {
|
|
130
|
+
"branch-alias": {
|
|
131
|
+
"dev-master": "4.0-dev"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"installation-source": "dist",
|
|
135
|
+
"autoload": {
|
|
136
|
+
"classmap": [
|
|
137
|
+
"src/"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
"notification-url": "https://packagist.org/downloads/",
|
|
141
|
+
"license": [
|
|
142
|
+
"BSD-3-Clause",
|
|
143
|
+
"GPL-2.0-only",
|
|
144
|
+
"GPL-3.0-only"
|
|
145
|
+
],
|
|
146
|
+
"authors": [
|
|
147
|
+
{
|
|
148
|
+
"name": "David Grudl",
|
|
149
|
+
"homepage": "https://davidgrudl.com"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "Nette Community",
|
|
153
|
+
"homepage": "https://nette.org/contributors"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
|
|
157
|
+
"homepage": "https://nette.org",
|
|
158
|
+
"keywords": [
|
|
159
|
+
"array",
|
|
160
|
+
"core",
|
|
161
|
+
"datetime",
|
|
162
|
+
"images",
|
|
163
|
+
"json",
|
|
164
|
+
"nette",
|
|
165
|
+
"paginator",
|
|
166
|
+
"password",
|
|
167
|
+
"slugify",
|
|
168
|
+
"string",
|
|
169
|
+
"unicode",
|
|
170
|
+
"utf-8",
|
|
171
|
+
"utility",
|
|
172
|
+
"validation"
|
|
173
|
+
],
|
|
174
|
+
"support": {
|
|
175
|
+
"issues": "https://github.com/nette/utils/issues",
|
|
176
|
+
"source": "https://github.com/nette/utils/tree/v4.0.4"
|
|
177
|
+
},
|
|
178
|
+
"install-path": "../nette/utils"
|
|
90
179
|
}
|
|
91
180
|
],
|
|
92
181
|
"dev": true,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
'name' => '__root__',
|
|
4
4
|
'pretty_version' => 'dev-main',
|
|
5
5
|
'version' => 'dev-main',
|
|
6
|
-
'reference' => '
|
|
6
|
+
'reference' => 'd742b5ec390f5099eb53c9e1eea8c8263120b3b8',
|
|
7
7
|
'type' => 'library',
|
|
8
8
|
'install_path' => __DIR__ . '/../../',
|
|
9
9
|
'aliases' => array(),
|
|
@@ -13,20 +13,29 @@
|
|
|
13
13
|
'__root__' => array(
|
|
14
14
|
'pretty_version' => 'dev-main',
|
|
15
15
|
'version' => 'dev-main',
|
|
16
|
-
'reference' => '
|
|
16
|
+
'reference' => 'd742b5ec390f5099eb53c9e1eea8c8263120b3b8',
|
|
17
17
|
'type' => 'library',
|
|
18
18
|
'install_path' => __DIR__ . '/../../',
|
|
19
19
|
'aliases' => array(),
|
|
20
20
|
'dev_requirement' => false,
|
|
21
21
|
),
|
|
22
22
|
'latte/latte' => array(
|
|
23
|
-
'pretty_version' => 'v3.0.
|
|
24
|
-
'version' => '3.0.
|
|
25
|
-
'reference' => '
|
|
23
|
+
'pretty_version' => 'v3.0.16',
|
|
24
|
+
'version' => '3.0.16.0',
|
|
25
|
+
'reference' => '0984953d961123075e95a9fa33ec4c4f4de266d2',
|
|
26
26
|
'type' => 'library',
|
|
27
27
|
'install_path' => __DIR__ . '/../latte/latte',
|
|
28
28
|
'aliases' => array(),
|
|
29
29
|
'dev_requirement' => false,
|
|
30
30
|
),
|
|
31
|
+
'nette/utils' => array(
|
|
32
|
+
'pretty_version' => 'v4.0.4',
|
|
33
|
+
'version' => '4.0.4.0',
|
|
34
|
+
'reference' => 'd3ad0aa3b9f934602cb3e3902ebccf10be34d218',
|
|
35
|
+
'type' => 'library',
|
|
36
|
+
'install_path' => __DIR__ . '/../nette/utils',
|
|
37
|
+
'aliases' => array(),
|
|
38
|
+
'dev_requirement' => false,
|
|
39
|
+
),
|
|
31
40
|
),
|
|
32
41
|
);
|
|
@@ -84,7 +84,9 @@ final class Escaper
|
|
|
84
84
|
public function __construct(
|
|
85
85
|
private string $contentType,
|
|
86
86
|
) {
|
|
87
|
-
$this->state = $
|
|
87
|
+
$this->state = in_array($contentType, [ContentType::Html, ContentType::Xml], true)
|
|
88
|
+
? self::HtmlText
|
|
89
|
+
: $contentType;
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
|
|
@@ -120,7 +122,7 @@ final class Escaper
|
|
|
120
122
|
if ($el->is('script')) {
|
|
121
123
|
$type = $el->getAttribute('type');
|
|
122
124
|
if ($type === true || $type === null
|
|
123
|
-
|| is_string($type) && preg_match('#((application|text)/(((x-)?java|ecma|j|live)script|json)|text/plain|module|importmap|)$#Ai', $type)
|
|
125
|
+
|| is_string($type) && preg_match('#((application|text)/(((x-)?java|ecma|j|live)script|json)|application/.+\+json|text/plain|module|importmap|)$#Ai', $type)
|
|
124
126
|
) {
|
|
125
127
|
$this->subType = self::JavaScript;
|
|
126
128
|
|
|
@@ -146,6 +148,13 @@ final class Escaper
|
|
|
146
148
|
}
|
|
147
149
|
|
|
148
150
|
|
|
151
|
+
public function enterHtmlRaw(string $subType): void
|
|
152
|
+
{
|
|
153
|
+
$this->state = self::HtmlRawText;
|
|
154
|
+
$this->subType = $subType;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
|
|
149
158
|
public function enterHtmlAttribute(?string $name = null): void
|
|
150
159
|
{
|
|
151
160
|
$this->state = self::HtmlAttribute;
|
|
@@ -34,7 +34,7 @@ class FilterNode extends Node
|
|
|
34
34
|
|
|
35
35
|
public function printSimple(PrintContext $context, string $expr): string
|
|
36
36
|
{
|
|
37
|
-
return '($this->filters->' . $this->name . ')('
|
|
37
|
+
return '($this->filters->' . $context->objectProperty($this->name) . ')('
|
|
38
38
|
. $expr
|
|
39
39
|
. ($this->args ? ', ' . $context->implode($this->args) : '')
|
|
40
40
|
. ')';
|
|
@@ -51,12 +51,12 @@ class ModifierNode extends Node
|
|
|
51
51
|
$check = $this->check;
|
|
52
52
|
foreach ($this->filters as $filter) {
|
|
53
53
|
$name = $filter->name->name;
|
|
54
|
-
if (
|
|
54
|
+
if ($name === 'nocheck' || $name === 'noCheck') {
|
|
55
55
|
$check = false;
|
|
56
56
|
} elseif ($name === 'noescape') {
|
|
57
57
|
$escape = false;
|
|
58
58
|
} else {
|
|
59
|
-
if (
|
|
59
|
+
if ($name === 'datastream' || $name === 'dataStream') {
|
|
60
60
|
$check = false;
|
|
61
61
|
}
|
|
62
62
|
$expr = $filter->printSimple($context, $expr);
|
|
@@ -20,31 +20,21 @@ class NameNode extends Node
|
|
|
20
20
|
KindNormal = 1,
|
|
21
21
|
KindFullyQualified = 2;
|
|
22
22
|
|
|
23
|
-
/** @var string[] */
|
|
24
|
-
public array $parts;
|
|
25
|
-
|
|
26
23
|
|
|
27
24
|
public function __construct(
|
|
28
|
-
string
|
|
25
|
+
public string $name,
|
|
29
26
|
public int $kind = self::KindNormal,
|
|
30
27
|
public ?Position $position = null,
|
|
31
28
|
) {
|
|
32
|
-
if ($name === ''
|
|
29
|
+
if ($name === '') {
|
|
33
30
|
throw new \InvalidArgumentException('Name cannot be empty');
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
} elseif (str_starts_with($name, 'namespace\\')) {
|
|
40
|
-
throw new \InvalidArgumentException('Relative name is not supported');
|
|
41
|
-
} else {
|
|
42
|
-
$this->kind = self::KindNormal;
|
|
43
|
-
}
|
|
44
|
-
$this->parts = explode('\\', $name);
|
|
45
|
-
|
|
31
|
+
} elseif (str_starts_with($name, 'namespace\\')) {
|
|
32
|
+
throw new \InvalidArgumentException('Relative name is not supported');
|
|
33
|
+
} elseif (str_starts_with($name, '\\')) {
|
|
34
|
+
$this->kind = self::KindFullyQualified;
|
|
35
|
+
$this->name = substr($name, 1);
|
|
46
36
|
} else {
|
|
47
|
-
$this->
|
|
37
|
+
$this->kind = self::KindNormal;
|
|
48
38
|
}
|
|
49
39
|
}
|
|
50
40
|
|
|
@@ -62,7 +52,7 @@ class NameNode extends Node
|
|
|
62
52
|
'switch', 'throw', 'trait', 'try', 'unset', 'use', 'var', 'while', 'xor', 'yield',
|
|
63
53
|
'parent', 'self', 'mixed', 'void', 'enum', // extra
|
|
64
54
|
]);
|
|
65
|
-
return
|
|
55
|
+
return isset($keywords[strtolower($this->name)]);
|
|
66
56
|
}
|
|
67
57
|
|
|
68
58
|
|
|
@@ -74,7 +64,7 @@ class NameNode extends Node
|
|
|
74
64
|
|
|
75
65
|
public function __toString(): string
|
|
76
66
|
{
|
|
77
|
-
return
|
|
67
|
+
return $this->name;
|
|
78
68
|
}
|
|
79
69
|
|
|
80
70
|
|
|
@@ -84,7 +74,7 @@ class NameNode extends Node
|
|
|
84
74
|
self::KindNormal => $this->isKeyword() ? 'namespace\\' : '',
|
|
85
75
|
self::KindFullyQualified => '\\',
|
|
86
76
|
};
|
|
87
|
-
return $prefix .
|
|
77
|
+
return $prefix . $this->name;
|
|
88
78
|
}
|
|
89
79
|
|
|
90
80
|
|
|
@@ -102,7 +102,7 @@ final class PrintContext
|
|
|
102
102
|
function ($m) use ($args) {
|
|
103
103
|
[, $pos, $fn, $var] = $m;
|
|
104
104
|
$var = substr($var, 1, -1);
|
|
105
|
-
/** @var Nodes\
|
|
105
|
+
/** @var Nodes\ModifierNode[] $args */
|
|
106
106
|
return match ($fn) {
|
|
107
107
|
'modify' => $args[$pos]->printSimple($this, $var),
|
|
108
108
|
'modifyContent' => $args[$pos]->printContentAware($this, $var),
|
|
@@ -82,8 +82,8 @@ final class TagLexer
|
|
|
82
82
|
{
|
|
83
83
|
preg_match(
|
|
84
84
|
$colon
|
|
85
|
-
? '~ ( [./@_a-z0-9#!-] | :(?!:) | \{\$ [_a-z0-9\[\]()>-]+ })++ (?=\s+[!"\'$(\[{
|
|
86
|
-
: '~ ( [./@_a-z0-9#!-] | \{\$ [_a-z0-9\[\]()>-]+ })++ (?=\s+[!"\'$(\[{
|
|
85
|
+
? '~ ( [./@_a-z0-9#!-] | :(?!:) | \{\$ [_a-z0-9\[\]()>-]+ })++ (?=\s+[!"\'$(\[{,\\\\|\~\w-] | [,|] | \s*$) ~xAi'
|
|
86
|
+
: '~ ( [./@_a-z0-9#!-] | \{\$ [_a-z0-9\[\]()>-]+ })++ (?=\s+[!"\'$(\[{,\\\\|\~\w-] | [,:|] | \s*$) ~xAi',
|
|
87
87
|
$input,
|
|
88
88
|
$match,
|
|
89
89
|
offset: $position->offset - $offsetDelta,
|