v0.1.4-rc.5
Pre-release
Pre-release
·
8 commits
to main
since this release
v0.1.4-rc.5
Ash Framework improved support - Changes in this release comes from the experience of adopting aurora_uix on real applications
Requires:
- Elixir
1.17+ - Phoenix
1.8+ - Phoenix LiveView
1.1+ - Ecto
3.13+
Added
-
File-upload support via
data.uploadfield config #251- A resource field can now carry a LiveView upload by setting
data: %{upload: %{allow: [...], consume: &fun/1}}. - The library registers uploads via
allow_upload/3, renderslive_file_inputwith entry progress and cancel buttons, and invokes the:consumecallback on save. - Purely additive — fields without
data.uploadare unaffected. - See
guides/core/resource_metadata.mdfor thedata.uploadconfiguration reference.
- A resource field can now carry a LiveView upload by setting
-
Actor threading for policy-protected Ash resources #253
auix_resource_metadataacceptsash_actor_assign: :current_user(or any other socket-assigns key). The named actor is forwarded asactor:to every generated Ash call:Ash.read/2,Ash.get/3,Ash.create/3,Ash.update/3,Ash.destroy/2,Ash.load/3, andAshPhoenix.Form.for_update/3.- Backward-compatible: omitting
ash_actor_assignkeeps the previous behaviour. Anilactor (assign missing or unset) is also a no-op — noactor:is added. authorize?:is never set explicitly; the host domain'sauthorizeconfig (:by_default/:when_requested/:always) continues to decide whether policies run.- Forbidden reads on policy-protected resources now render an empty index (instead of crashing) —
Ash.Error.Forbiddenis translated to an empty list forlist/2,list_function_paginated/2, andto_page/4. Writes still propagate the error so the form handler can flash it. - Adds a new
socket_opts/2callback to theAurora.Uix.Integration.Crudbehaviour; the Ash backend resolves the actor fromsocket.assigns, the Ctx backend ignores it.Connectorstays neutral — the newactor_assignfield lives on the AshCrudSpec. - See
guides/core/ash_integration.md#authorization--policies.
Changed
- Stylesheet split for host-theme inheritance #259
mix auix.gen.stylesheetnow writes three files instead of one:auix-variables.css— all:root/--auix-*custom-property declarations (sizes, colors, shadows, palette variants).auix-rules.css— all.auix-*component rules that consume those variables.auix-stylesheet.css— back-compat shim that re-imports the two files above. Existing hosts importing only this file continue to work unchanged.
- On first run the task also copies
assets/css/auix-bridge-daisyui.cssinto the host project — a small CSS file that maps daisyUI v5 tokens (--color-primary,--color-base-100,--radius-field, …) onto--auix-*variables so Aurora UIX components follow the host theme automatically. The file is treated as user-editable and is not overwritten on subsequent runs; pass--forceto refresh it from the library version. - Hosts using Tailwind v4 + daisyUI import the files in this order in
app.css:@import "auix-variables.css"; @import "auix-bridge-daisyui.css"; :root { /* optional per-host overrides */ } @import "auix-rules.css";
- Added
guides/advanced/writing_a_bridge.md— a guide for authoring a custom bridge for any design system other than daisyUI. ThemeHelpergained two new public functions:generate_variables_stylesheet/0andgenerate_rules_stylesheet/0.