Add native data/page composables, richer view transitions, a default component library, and Storybook-based component development#44
Conversation
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
|
@copilot prüfe, inwiefern du https://storybook.js.org/ als Entwicklungsdependency nutzen kannst, um Komponenten Development zu vereinfachen. |
Ich habe es geprüft: technisch passt Storybook hier als reine Dev-Dependency gut, am ehesten über |
|
Ich würde den „Playground“ gerne durch Storybook ersetzen. VitePress ist vollständig für die Dokumentation. Mit Storybooks haben wir einfach eine wesentlich solidere Basis! @copilot
|
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Umgesetzt in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Die Tests schlagen fehl und die Komponenten Vorschau sieht nicht so aus, als würden die Default-Komponenten funktionieren. |
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Behoben in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Umgesetzt in |
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Umgesetzt in |
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Umgesetzt in |
|
@copilot apply changes based on the comments in this thread |
…al types and linkedSignal value Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Umgesetzt in |
This PR introduces the requested native composables and page utilities (
createUseFetch,useFetch,useAsyncData,useCookie,definePageMeta,useAnnouncer,defineBqueryConfig), improves the view transition API, adds a default dependency-free component library for foundational UI primitives, and replaces the previous playground workflow with Storybook for component development. The changes stay within the project's existing modular architecture and browser-native design.Reactive data composables
useAsyncData()for signal-backed async state withdata,error,status,pending,execute,refresh,clear, anddispose.dispose()tears down reactive watch effects for short-lived consumers and makes laterexecute()/refresh()return the cached data value instead of re-running the handler.untrack()so only explicitwatchsources retrigger executions, avoiding accidental dependency capture from synchronous signal reads inside handlers.useFetch()as a native Fetch wrapper with:dispose()createUseFetch()for preconfigured fetch factories (e.g. base URL, headers).transform, derived helpers preserve that configured transformed data shape as their defaultAsyncDataStatetype while still allowing per-invocation response/data generics to be overridden.baseUrlvalues resolve against the runtime base URLRequestinputs preserve their original headers unless explicitly overriddenqueryparams are also applied consistently forRequestinputsPOSTwhen no method is specifiedGET/HEADrequests with a body produce a clear reactive error state instead of attempting an invalid fetchRequestinputs for query updates tolerates already-consumed bodies without throwingPlatform utilities
useCookie()as a reactive cookie signal with typed defaults, serialization/deserialization, and write-through behavior.null) are returned as raw strings unless a customdeserializeoption is provided.secure: truewhensameSiteis set to'None'to comply with modern browser requirements.;- and;-separated cookie strings and gracefully fall back to raw values when percent-decoding fails, so malformed cookie data cannot crash initialization.definePageMeta()for document title, meta tags, link tags, and html/body attribute management with cleanup support.useAnnouncer()for accessible ARIA live-region announcements with proper reactive effect disposal on destroy.defineBqueryConfig()/getBqueryConfig()for global runtime defaults across fetch, cookies, announcer, transitions, page meta, and component prefixing.Headersinstances to prevent accidental mutation of global state through returned values.Motion / view transitions
transition()to support:Promise<void>)typeswhere supportedonReady/onFinishhooksDOMTokenListerrors from misconfiguration.Default component library
registerDefaultComponents()to register a small native baseline component set:beforeUpdateto patch control values in-place, preserving focus and caret position during typing instead of triggering full shadow DOM re-renders.this-based handlers and arrow functions that do not usethis.Component development workflow
storybook+@storybook/web-components-vitewith docs support.Public API integration
reactive,platform,component, root, andfullentrypoints so they remain tree-shakeable and consistent with current module boundaries.Example usage:
Screenshot of the new Storybook-based component workflow:
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.