Skip to content

Commit e000402

Browse files
committed
Docs: add YAML front-matter for Savane documentation system
- Add `docs/index.md` as documentation entry point - Add YAML front-matter (title, order) to all docs/*.md files - Create `UPGRADE.md` with migration guides for 1.1→1.2 and 1.0→1.1 - Remove emojis from README.md features list - Fix broken link in events.md (api-reference.md → advanced-usage.md)
1 parent fff94d6 commit e000402

File tree

11 files changed

+160
-10
lines changed

11 files changed

+160
-10
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ Modern file upload handler for Livewire 3 with chunked uploads, image previews v
44

55
## Features
66

7-
- 📦 Chunked uploads for large files
8-
- 🖼️ Image previews with Glide
9-
- 🎯 Drag & drop support
10-
- 🔄 Sortable files (with Sortable.js)
11-
- MIME type & file size validation
12-
- 🎨 Themeable (CSS classes + icons)
13-
- 📱 Spatie Media Library integration
14-
- 🌍 i18n (English + French)
15-
- Auto-save or manual mode
7+
- Chunked uploads for large files
8+
- Image previews with Glide
9+
- Drag & drop support
10+
- Sortable files (with Sortable.js)
11+
- MIME type & file size validation
12+
- Themeable (CSS classes + icons)
13+
- Spatie Media Library integration
14+
- i18n (English + French)
15+
- Auto-save or manual mode
1616

1717
## Requirements
1818

UPGRADE.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Upgrade Guide
2+
=============
3+
4+
## From 1.1.x to 1.2.x
5+
6+
### Breaking changes if you extend components
7+
8+
- **`Group`**: Method `itemComponentParams` has been removed
9+
- **`Group`**: New method `commonTraits` added
10+
- **`Group`**: New partial view `item-component` added
11+
- Property `savedFileDisk` can be `null` and is `null` by default
12+
13+
### New features
14+
15+
- Support for `wire:model` on Livewire Upload Handler components
16+
- New option `showTemporaryFileWarning` (temporary file warning is no longer shown by default)
17+
18+
### Exceptions
19+
20+
- New exception `MediaCollectionNotRegisteredException` when media collection is not registered
21+
22+
### Fixes
23+
24+
- `HandleMediaFromRequest`: single item must have "tmpName" or "id"
25+
26+
### If you published views
27+
28+
Republish the `group.blade.php` view:
29+
30+
```bash
31+
php artisan vendor:publish --tag=livewire-upload-handler:views --force
32+
```
33+
34+
35+
## From 1.0.x to 1.1.x
36+
37+
### Breaking changes if you extend components
38+
39+
- **`Group`**: Method `saveItemOrder` becomes `saveFileOrder` (file `id` is passed directly instead of `itemId`)
40+
41+
### If you published views
42+
43+
Republish the `group.blade.php` view:
44+
45+
```bash
46+
php artisan vendor:publish --tag=livewire-upload-handler:views --force
47+
```

docs/advanced-usage.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Advanced Usage
3+
order: 7
4+
---
5+
16
# Advanced Usage
27

38
If you need more control on upload handler component, you can create custom upload handlers by extending components.

docs/basic-usage.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Basic Usage
3+
order: 4
4+
---
5+
16
# Basic Usage
27

38
## Single File Upload (Item)

docs/configuration.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Configuration
3+
order: 3
4+
---
5+
16
# Configuration
27

38
File: `config/livewire-upload-handler.php`

docs/customization.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Customization
3+
order: 6
4+
---
5+
16
# Customization
27

38
## Themes

docs/events.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Events
3+
order: 8
4+
---
5+
16
# Events
27

38
All events are dispatched via Livewire's `dispatch()` method.
@@ -103,4 +108,5 @@ public function generateThumbnails(int $mediaId)
103108

104109
## Next Steps
105110

106-
- [API Reference](api-reference.md) - Complete reference
111+
- [Advanced Usage](./advanced-usage.md) - Extend components
112+
- [Troubleshooting](./troubleshooting.md) - Common issues

docs/index.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Livewire Upload Handler
3+
order: 1
4+
---
5+
6+
# Livewire Upload Handler
7+
8+
Modern file upload handler for Livewire 3 with chunked uploads, image previews via Glide, and Spatie Media Library integration.
9+
10+
## Features
11+
12+
- Chunked uploads for large files
13+
- Image previews with Glide
14+
- Drag & drop support
15+
- Sortable files (with Sortable.js)
16+
- MIME type & file size validation
17+
- Themeable (CSS classes + icons)
18+
- Spatie Media Library integration
19+
- i18n (English + French)
20+
- Auto-save or manual mode
21+
22+
## Requirements
23+
24+
- PHP 8.4+
25+
- Laravel 12+
26+
- Livewire 3.1+
27+
28+
## Quick Start
29+
30+
```bash
31+
composer require axn/livewire-upload-handler
32+
```
33+
34+
Add to your layout:
35+
36+
```blade
37+
<head>
38+
@livewireStyles
39+
@livewireUploadHandlerStyles
40+
</head>
41+
<body>
42+
@livewireScripts
43+
@livewireUploadHandlerScripts
44+
</body>
45+
```
46+
47+
Single file upload:
48+
49+
```blade
50+
<livewire:upload-handler.item />
51+
```
52+
53+
## Table of Contents
54+
55+
- [Installation](./installation.md)
56+
- [Configuration](./configuration.md)
57+
- [Basic Usage](./basic-usage.md)
58+
- [Media Library](./media-library.md)
59+
- [Customization](./customization.md)
60+
- [Advanced Usage](./advanced-usage.md)
61+
- [Events](./events.md)
62+
- [Troubleshooting](./troubleshooting.md)

docs/installation.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Installation
3+
order: 2
4+
---
5+
16
# Installation
27

38
## Install Package

docs/media-library.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Media Library
3+
order: 5
4+
---
5+
16
# Media Library Integration
27

38
Direct integration with [Spatie Laravel Media Library](https://spatie.be/docs/laravel-medialibrary/).

0 commit comments

Comments
 (0)