Skip to content

Commit f70e3cb

Browse files
committed
fix styling
1 parent dc06c2e commit f70e3cb

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"andreiio/blade-remix-icon": "^3.6",
2828
"blade-ui-kit/blade-heroicons": "^2.4",
2929
"blade-ui-kit/blade-icons": "^1.7",
30-
"craftile/laravel": "^0.4.0",
31-
"illuminate/contracts": "^10.0||^11.0",
30+
"craftile/laravel": "^0.4.1",
31+
"illuminate/contracts": "^11.0||^12.0",
3232
"mallardduck/blade-lucide-icons": "^1.23",
3333
"matthieumastadenis/couleur": "^0.1.2",
3434
"mews/purifier": "^3.4",
@@ -38,14 +38,14 @@
3838
},
3939
"require-dev": {
4040
"archielite/laravel-facade-docblock-generator": "^1.0",
41-
"bagisto/bagisto": "^2.2",
41+
"bagisto/bagisto": "^2.3",
4242
"calebdw/larastan-livewire": "^1.1",
4343
"larastan/larastan": "^2.9",
4444
"laravel/pint": "^1.14",
4545
"livewire/livewire": "^3.6",
4646
"mockery/mockery": "^1.6",
4747
"nunomaduro/collision": "^8.1.1||^7.10.0",
48-
"orchestra/testbench": "^9.0.0||^8.22.0",
48+
"orchestra/testbench": "^10.0.0||^9.0.0",
4949
"pestphp/pest": "^2.34",
5050
"pestphp/pest-plugin-arch": "^2.7",
5151
"pestphp/pest-plugin-laravel": "^2.3",

src/Http/Controllers/Admin/ThemeEditorController.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function index($themeCode)
4444
'config' => [
4545
'baseUrl' => parse_url(route('visual.admin.editor', ['theme' => $themeCode]), PHP_URL_PATH),
4646
'imagesBaseUrl' => Storage::disk(config('bagisto_visual.images_storage'))->url(''),
47-
'storefrontUrl' => url('/') . '?' . http_build_query(['_designMode' => $themeCode]),
47+
'storefrontUrl' => url('/').'?'.http_build_query(['_designMode' => $themeCode]),
4848
'channels' => $this->getChannels(),
4949
'defaultChannel' => core()->getDefaultChannelCode(),
5050
'blockSchemas' => $this->loadBlocks(),
@@ -140,7 +140,7 @@ public function uploadImages(Request $request)
140140
return $images->map(function ($image) {
141141
$originalName = pathinfo($image->getClientOriginalName(), PATHINFO_FILENAME);
142142
$extension = $image->guessExtension();
143-
$storedName = bin2hex($originalName) . '_' . uniqid() . '.' . $extension;
143+
$storedName = bin2hex($originalName).'_'.uniqid().'.'.$extension;
144144

145145
$path = $image->storeAs(
146146
config('bagisto_visual.images_directory'),
@@ -215,15 +215,15 @@ public function icons(Request $request, Factory $factory, IconsManifest $iconsMa
215215

216216
$icons->push([
217217
'name' => $name,
218-
'id' => $set['prefix'] . '-' . $name,
218+
'id' => $set['prefix'].'-'.$name,
219219
'svg' => File::get($file->getRealPath()),
220220
]);
221221
}
222222
}
223223

224224
return [
225225
'currentSet' => $selectedSet,
226-
'sets' => collect($sets)->map(fn($set, $key) => ['id' => $key, 'prefix' => $set['prefix'], 'name' => Str::headline($key)])->values(),
226+
'sets' => collect($sets)->map(fn ($set, $key) => ['id' => $key, 'prefix' => $set['prefix'], 'name' => Str::headline($key)])->values(),
227227
'icons' => $icons->values(),
228228
];
229229
}
@@ -266,7 +266,7 @@ protected function loadBlocks()
266266
'category' => $blockSchema->category,
267267
'description' => $blockSchema->description,
268268
'previewImageUrl' => asset($blockSchema->previewImageUrl),
269-
'isSection' => collect([SimpleSection::class, BladeSection::class, LivewireSection::class])->some(fn($class) => is_subclass_of($blockSchema->class, $class)),
269+
'isSection' => collect([SimpleSection::class, BladeSection::class, LivewireSection::class])->some(fn ($class) => is_subclass_of($blockSchema->class, $class)),
270270
'enabledOn' => $blockSchema->enabledOn ?? [],
271271
'disabledOn' => $blockSchema->disabledOn ?? [],
272272
],
@@ -298,7 +298,7 @@ protected function loadTheme($themeCode)
298298
protected function loadTemplates()
299299
{
300300
return collect(app(\BagistoPlus\Visual\ThemeEditor::class)->getTemplates())
301-
->map(fn($template) => [
301+
->map(fn ($template) => [
302302
'template' => $template->template,
303303
'label' => $template->label,
304304
'icon' => $template->icon,
@@ -335,7 +335,7 @@ protected function translateSettingsSchema(array $settingsSchema): array
335335

336336
protected function getChannels()
337337
{
338-
return core()->getAllChannels()->map(fn($channel) => [
338+
return core()->getAllChannels()->map(fn ($channel) => [
339339
'code' => $channel->code,
340340
'name' => $channel->name,
341341
'locales' => $channel->locales,
@@ -346,7 +346,7 @@ protected function getChannels()
346346
protected function getChannelCodes(): array
347347
{
348348
return $this->getChannels()
349-
->map(fn($channel) => $channel['code'])
349+
->map(fn ($channel) => $channel['code'])
350350
->toArray();
351351
}
352352

@@ -358,14 +358,14 @@ protected function getLocaleCodes(string $channel): array
358358
return [];
359359
}
360360

361-
return $channel['locales']->map(fn($locale) => $locale['code'])->toArray();
361+
return $channel['locales']->map(fn ($locale) => $locale['code'])->toArray();
362362
}
363363

364364
protected function getVisualThemes(): array
365365
{
366366
return collect(config('themes.shop', []))
367-
->filter(fn($config) => $config['visual_theme'] ?? false)
368-
->map(fn($config) => $config['code'])
367+
->filter(fn ($config) => $config['visual_theme'] ?? false)
368+
->map(fn ($config) => $config['code'])
369369
->toArray();
370370
}
371371

src/Persistence/PersistEditorUpdates.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public function handle(array $data): array
2222
$sources = decrypt($data['template']['sources']);
2323
$updateRequest = UpdateRequest::make($data['updates']);
2424

25-
$sharedRegions = collect($updateRequest->regions)->filter(fn($region) => isset($region['shared']) && $region['shared'] === true);
26-
$nonSharedRegions = collect($updateRequest->regions)->filter(fn($region) => ! isset($region['shared']) || $region['shared'] === false);
25+
$sharedRegions = collect($updateRequest->regions)->filter(fn ($region) => isset($region['shared']) && $region['shared'] === true);
26+
$nonSharedRegions = collect($updateRequest->regions)->filter(fn ($region) => ! isset($region['shared']) || $region['shared'] === false);
2727

2828
$allBlocks = [];
2929

@@ -132,12 +132,12 @@ protected function getRegionFilePath(string $theme, string $channel, string $loc
132132
protected function getRegionSourcePath(string $regionName, array $sources): ?string
133133
{
134134
return collect($sources)
135-
->first(fn($sourcePath) => str_contains($sourcePath, "/regions/{$regionName}."));
135+
->first(fn ($sourcePath) => str_contains($sourcePath, "/regions/{$regionName}."));
136136
}
137137

138138
protected function getTemplateSourcePath(string $template, array $sources): ?string
139139
{
140140
return collect($sources)
141-
->first(fn($sourcePath) => str_contains($sourcePath, "/templates/{$template}."));
141+
->first(fn ($sourcePath) => str_contains($sourcePath, "/templates/{$template}."));
142142
}
143143
}

src/Providers/CoreServiceProvider.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ protected function registerBlockCompilers(): void
149149
// Register Livewire blocks as Livewire components when they're discovered
150150
Event::listen(BlockSchemaRegistered::class, function (BlockSchemaRegistered $event) {
151151
if ($event->schema->class && is_subclass_of($event->schema->class, \Livewire\Component::class)) {
152-
$componentName = 'craftile-' . $event->schema->slug;
152+
$componentName = 'craftile-'.$event->schema->slug;
153153
\Livewire\Livewire::component($componentName, $event->schema->class);
154154
}
155155
});
@@ -160,13 +160,13 @@ protected function bootShopRoutes(): void
160160
{
161161
Route::prefix('/visual/template-preview')
162162
->middleware(['web', 'locale', 'theme', 'currency'])
163-
->group(__DIR__ . '/../../routes/shop.php');
163+
->group(__DIR__.'/../../routes/shop.php');
164164
}
165165

166166
protected function bootViewsAndTranslations(): void
167167
{
168-
$this->loadViewsFrom(__DIR__ . '/../../resources/views', 'visual');
169-
$this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'visual');
168+
$this->loadViewsFrom(__DIR__.'/../../resources/views', 'visual');
169+
$this->loadTranslationsFrom(__DIR__.'/../../resources/lang', 'visual');
170170
}
171171

172172
protected function bootMiddlewares(): void
@@ -212,11 +212,11 @@ protected function bootCommands(): void
212212
protected function bootPublishAssets(): void
213213
{
214214
$this->publishes([
215-
__DIR__ . '/../../public/vendor/bagistoplus' => public_path('vendor/bagistoplus'),
215+
__DIR__.'/../../public/vendor/bagistoplus' => public_path('vendor/bagistoplus'),
216216
], ['public', 'visual', 'visual-assets']);
217217

218218
$this->publishes([
219-
__DIR__ . '/../../config/bagisto-visual.php' => config_path('bagisto_visual.php'),
219+
__DIR__.'/../../config/bagisto-visual.php' => config_path('bagisto_visual.php'),
220220
], ['config', 'visual', 'visual-config']);
221221
}
222222

@@ -240,8 +240,8 @@ protected function bootTemplates(): void
240240

241241
protected function registerConfigs(): void
242242
{
243-
$this->mergeConfigFrom(__DIR__ . '/../../config/bagisto-visual.php', 'bagisto_visual');
244-
$this->mergeConfigFrom(__DIR__ . '/../../config/svg-iconmap.php', 'bagisto_visual_iconmap');
243+
$this->mergeConfigFrom(__DIR__.'/../../config/bagisto-visual.php', 'bagisto_visual');
244+
$this->mergeConfigFrom(__DIR__.'/../../config/svg-iconmap.php', 'bagisto_visual_iconmap');
245245
}
246246

247247
protected function registerSingletons(): void
@@ -261,7 +261,7 @@ protected function registerCustomUrlGenerator(): void
261261

262262
return new UrlGenerator(
263263
$routes,
264-
$app->rebinding('request', fn($app, $request) => $app['url']->setRequest($request)),
264+
$app->rebinding('request', fn ($app, $request) => $app['url']->setRequest($request)),
265265
$app['config']['app.asset_url']
266266
);
267267
});

0 commit comments

Comments
 (0)