diff --git a/README.md b/README.md
index 2d77c46..8762d32 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,11 @@
-# A Filament field that allows users to click and point to mark references on an image.
+# A Filament 5 field that allows users to click and point to mark references on an image.
-[](https://packagist.org/packages/ruelluna/canvas-pointer)
-[](https://github.com/ruelluna/canvas-pointer/actions?query=workflow%3Arun-tests+branch%3Amain)
-[](https://github.com/ruelluna/canvas-pointer/actions?query=workflow%3A"Fix+PHP+code+styling"+branch%3Amain)
-[](https://packagist.org/packages/ruelluna/canvas-pointer)
+[](https://packagist.org/packages/wraps/canvas-pointer)
+[](https://github.com/wraps/canvas-pointer/actions?query=workflow%3Arun-tests+branch%3Amain)
+[](https://github.com/wraps/canvas-pointer/actions?query=workflow%3A"Fix+PHP+code+styling"+branch%3Amain)
+[](https://packagist.org/packages/wraps/canvas-pointer)
-
+
I have used it for a client that needs visual reprensentations to where the pains are located in the body. What is your use case? This field will produce a base-64 image and automatically convert it to a file stored in your configured storage disk, returning the URL to the image.
@@ -14,13 +14,32 @@ I have used it for a client that needs visual reprensentations to where the pain
You can install the package via composer:
```bash
-composer require ruelluna/canvas-pointer
+composer require wraps/canvas-pointer
+```
+
+This package targets Filament `^5.0`.
+
+If you want to register the plugin in your panel:
+
+```php
+use Filament\Panel;
+use Wraps\CanvasPointer\CanvasPointerPlugin;
+
+public function panel(Panel $panel): Panel
+{
+ return $panel
+ ->plugins([
+ CanvasPointerPlugin::make(),
+ ]);
+}
```
## Usage
```php
+use Wraps\CanvasPointer\Forms\Components\CanvasPointerField;
+
CanvasPointerField::make('body-points')
->pointRadius(15) // default is 5
->imageUrl('your image source')
diff --git a/composer.json b/composer.json
index 30354a4..cb1e028 100644
--- a/composer.json
+++ b/composer.json
@@ -1,15 +1,15 @@
{
- "name": "ruelluna/canvas-pointer",
+ "name": "wraps/canvas-pointer",
"description": "A Filament field that allows users to click and point markers on an image.",
"keywords": [
"RuelLuna",
"laravel",
"canvas-pointer"
],
- "homepage": "https://github.com/ruelluna/canvas-pointer",
+ "homepage": "https://github.com/wraps/canvas-pointer",
"support": {
- "issues": "https://github.com/ruelluna/canvas-pointer/issues",
- "source": "https://github.com/ruelluna/canvas-pointer"
+ "issues": "https://github.com/wraps/canvas-pointer/issues",
+ "source": "https://github.com/wraps/canvas-pointer"
},
"license": "MIT",
"authors": [
@@ -20,15 +20,15 @@
}
],
"require": {
- "php": "^8.1",
- "filament/filament": "^3.0|^4.0",
+ "php": "^8.2",
+ "filament/filament": "^5.0",
"spatie/laravel-package-tools": "^1.15.0"
},
"require-dev": {
"laravel/pint": "^1.0",
"nunomaduro/collision": "^8.0",
- "nunomaduro/larastan": "^3.0",
- "orchestra/testbench": "^9.0",
+ "larastan/larastan": "^3.0",
+ "orchestra/testbench": "^10.0",
"pestphp/pest": "^3.0",
"pestphp/pest-plugin-arch": "^3.0",
"pestphp/pest-plugin-laravel": "^3.0",
@@ -39,13 +39,13 @@
},
"autoload": {
"psr-4": {
- "RuelLuna\\CanvasPointer\\": "src/",
- "RuelLuna\\CanvasPointer\\Database\\Factories\\": "database/factories/"
+ "Wraps\\CanvasPointer\\": "src/",
+ "Wraps\\CanvasPointer\\Database\\Factories\\": "database/factories/"
}
},
"autoload-dev": {
"psr-4": {
- "RuelLuna\\CanvasPointer\\Tests\\": "tests/"
+ "Wraps\\CanvasPointer\\Tests\\": "tests/"
}
},
"scripts": {
@@ -65,10 +65,10 @@
"extra": {
"laravel": {
"providers": [
- "RuelLuna\\CanvasPointer\\CanvasPointerServiceProvider"
+ "Wraps\\CanvasPointer\\CanvasPointerServiceProvider"
],
"aliases": {
- "CanvasPointer": "RuelLuna\\CanvasPointer\\Facades\\CanvasPointer"
+ "CanvasPointer": "Wraps\\CanvasPointer\\Facades\\CanvasPointer"
}
}
},
diff --git a/src/CanvasPointerPlugin.php b/src/CanvasPointerPlugin.php
index 27638c6..f2128da 100644
--- a/src/CanvasPointerPlugin.php
+++ b/src/CanvasPointerPlugin.php
@@ -1,6 +1,6 @@
publishConfigFile()
->publishMigrations()
->askToRunMigrations()
- ->askToStarRepoOnGitHub('ruelluna/canvas-pointer');
+ ->askToStarRepoOnGitHub('wraps/canvas-pointer');
});
$configFileName = $package->shortName();
@@ -57,7 +54,10 @@ public function configurePackage(Package $package): void
}
}
- public function packageRegistered(): void {}
+ public function packageRegistered(): void
+ {
+ //
+ }
public function packageBooted(): void
{
@@ -72,9 +72,6 @@ public function packageBooted(): void
$this->getAssetPackageName()
);
- // Icon Registration
- FilamentIcon::register($this->getIcons());
-
// Handle Stubs
if (app()->runningInConsole()) {
foreach (app(Filesystem::class)->files(__DIR__ . '/../stubs/') as $file) {
@@ -85,12 +82,12 @@ public function packageBooted(): void
}
// Testing
- Testable::mixin(new TestsCanvasPointer);
+ Testable::mixin(new TestsCanvasPointer());
}
protected function getAssetPackageName(): ?string
{
- return 'ruelluna/canvas-pointer';
+ return 'wraps/canvas-pointer';
}
/**
@@ -116,14 +113,6 @@ protected function getCommands(): array
];
}
- /**
- * @return array
- */
- protected function getIcons(): array
- {
- return [];
- }
-
/**
* @return array
*/
diff --git a/src/Facades/CanvasPointer.php b/src/Facades/CanvasPointer.php
index 4481ff2..1e2eb5c 100644
--- a/src/Facades/CanvasPointer.php
+++ b/src/Facades/CanvasPointer.php
@@ -1,16 +1,16 @@
in(__DIR__);
diff --git a/tests/TestCase.php b/tests/TestCase.php
index 23074ef..83006c4 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -1,21 +1,14 @@
'RuelLuna\\CanvasPointer\\Database\\Factories\\' . class_basename($modelName) . 'Factory'
+ fn (string $modelName) => 'Wraps\\CanvasPointer\\Database\\Factories\\' . class_basename($modelName) . 'Factory'
);
}
protected function getPackageProviders($app)
{
return [
- ActionsServiceProvider::class,
BladeCaptureDirectiveServiceProvider::class,
BladeHeroiconsServiceProvider::class,
BladeIconsServiceProvider::class,
FilamentServiceProvider::class,
- FormsServiceProvider::class,
- InfolistsServiceProvider::class,
LivewireServiceProvider::class,
- NotificationsServiceProvider::class,
- SupportServiceProvider::class,
- TablesServiceProvider::class,
- WidgetsServiceProvider::class,
CanvasPointerServiceProvider::class,
];
}