Releases: awilderink/atollic
v0.1.0
Minor Changes
-
#13
a7e43feThanks @awilderink! - ## Universal componentsPlain
.tsxfiles without a"use client"directive or@jsxImportSourcepragma are now universal components. They automatically compile to the correct JSX runtime based on who imports them:- Imported from a server route: compiles with Atollic HTML JSX (string output)
- Imported from a React island: compiles with React JSX (
className, style objects) - Imported from a Solid island: compiles with Solid JSX (no transform needed)
Write
class,onClick, and stringstyleonce. It works everywhere.New exports
UniversalFC<P>- typed function component signature for universal componentsUniversalChildren- opaque children type alias
import type { UniversalFC } from "atollic"; const Button: UniversalFC<{ variant?: "primary" | "ghost" }> = (props) => ( <button class={props.variant}>{props.children}</button> ); export default Button;
How it works
The Vite plugin detects when a universal component is imported from a
"use client"island and resolves it with a?framework=Xquery. Theloadhook injects the correct@jsxImportSourcepragma and applies attribute mapping (e.g.classtoclassNamefor React,stylestrings to style objects). Function-valued props likeonClickare silently dropped when rendering as server HTML.Other changes
FrameworkAdapterinterface gains an optionaltransformUniversal(code)method for framework-specific attribute mapping- Server HTML JSX runtime now skips function-valued props instead of rendering them as strings
- Event handler types (
on*) in Atollic's JSX namespace accept functions alongside strings
v0.0.6
Patch Changes
-
#11
e49d311Thanks @awilderink! - Fix async children and React children hydration inside islands. Server-rendered children passed into an island now resolve correctly when they are async (promises/JSX returning a promise) and survive hydration on React islands without being reconciled away. -
#11
e49d311Thanks @awilderink! - Preserve hydrated island state across server HMR. Editing a server file no longer resets the state of mounted islands: the morph now skips island subtrees (viabeforeNodeMorphed) and island ids stay stable across the HMR refetch thanks to a per-request id counter backed byAsyncLocalStorage.
v0.0.5
Patch Changes
97cd69aThanks @awilderink! - Add Atollic logo and capitalize brand name in README. Logo is now displayed at the top of the README and on the npm package page via an absolute raw.githubusercontent URL.
v0.0.4
Patch Changes
- #4
784f12aThanks @awilderink! - Fixdev:elysiaanddev:honoscripts to run from inside the example
directory. Vite's--configflag defaultsrootto the current working
directory, which broke entry resolution when running from the repo root.