diff --git a/.ai/rules/config.md b/.ai/rules/config.md new file mode 100644 index 0000000..b9a2905 --- /dev/null +++ b/.ai/rules/config.md @@ -0,0 +1,9 @@ +--- +paths: + - config/livewire-material.php +--- + +# Config + +## Theme storage key is sealshare-theme +The theme is stored in localStorage under `sealshare-theme` (default `system`). `mary-theme` stays in `theme.legacy_keys` so visitors from 1.x keep their choice once; don't rename the key or drop the legacy entry, or every returning visitor's theme resets. diff --git a/.ai/rules/css.md b/.ai/rules/css.md new file mode 100644 index 0000000..476d917 --- /dev/null +++ b/.ai/rules/css.md @@ -0,0 +1,9 @@ +--- +paths: + - 'resources/css/material-scheme.*' +--- + +# Css + +## Regenerate the colour scheme, never hand-edit it +material-scheme.css and material-scheme.json are generated together by `php artisan material:scheme "#4f46e5" --variant=vibrant` (Vibrant was chosen over Tonal Spot, which read washed out on the indigo seed). The JSON colours the Markdown mail theme and the fallback error pages, so a hand edit to the CSS alone leaves them out of step. Change the seed or variant and rerun the command instead. diff --git a/.ai/rules/index.md b/.ai/rules/index.md new file mode 100644 index 0000000..999bf21 --- /dev/null +++ b/.ai/rules/index.md @@ -0,0 +1,9 @@ +# Project Rules Index + +Before planning or editing, find the row whose globs match the file's path and read that rule file. + +| Applies to | Rule file | +| --- | --- | +| config/livewire-material.php | .ai/rules/config.md | +| resources/css/material-scheme.* | .ai/rules/css.md | +| resources/views/livewire/share-download.blade.php | .ai/rules/livewire.md | diff --git a/.ai/rules/livewire.md b/.ai/rules/livewire.md new file mode 100644 index 0000000..4178cf4 --- /dev/null +++ b/.ai/rules/livewire.md @@ -0,0 +1,9 @@ +--- +paths: + - resources/views/livewire/share-download.blade.php +--- + +# Livewire + +## No anchored components on the download page +Recipients open share links on any phone, including iOS Safari below 18.4, where CSS anchor positioning is missing. Keep menus, tooltips, selects-as-menus, datepickers and other anchored/popover components off this page; use plain buttons with aria-label and native controls. tests/Browser/SealShareTest.php checks the page at 393px has no popovers. diff --git a/.claude/skills/livewire-material-development/SKILL.md b/.claude/skills/livewire-material-development/SKILL.md new file mode 100644 index 0000000..60f44f2 --- /dev/null +++ b/.claude/skills/livewire-material-development/SKILL.md @@ -0,0 +1,777 @@ +--- +name: livewire-material-development +description: Build Laravel and Livewire views with Livewire Material's Material 3 Expressive Blade components — props, slots, colour roles, type, shape, motion, theming, toasts, the design guard, and the Livewire traps each component handles. +--- + +# Livewire Material Development + +## When to use this skill + +Use this skill when writing or changing any Blade view, Livewire component view or layout in an application that requires `nonameweb/livewire-material`, and when styling, theming or testing such views. + +## Setup + +Composer packages must be installed before the Vite build (in Dockerfiles and CI alike), because the application's build imports from `vendor/`: + +```css +/* resources/css/app.css */ +@import 'tailwindcss'; +@import '../../vendor/nonameweb/livewire-material/resources/css/material.css'; +@import './material-scheme.css'; +@source '../../vendor/nonameweb/livewire-material/resources/views'; +@source '../../vendor/nonameweb/livewire-material/src'; +``` + +```js +// resources/js/app.js +import '../../vendor/nonameweb/livewire-material/resources/js/material.js' +``` + +Every layout puts the theme script in `
`, before `@vite`: + +```blade + +