atollic 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,8 @@
1
- # atollic
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/awilderink/atollic/main/assets/logo.png" alt="Atollic" width="180" />
3
+ </p>
4
+
5
+ <h1 align="center">Atollic</h1>
2
6
 
3
7
  [![npm version](https://img.shields.io/npm/v/atollic.svg)](https://www.npmjs.com/package/atollic)
4
8
  [![CI](https://github.com/awilderink/atollic/actions/workflows/ci.yml/badge.svg)](https://github.com/awilderink/atollic/actions/workflows/ci.yml)
@@ -7,7 +11,7 @@
7
11
 
8
12
  Island architecture for WinterCG-compatible runtimes. Bring your own server (Elysia, Hono, …) and your own UI framework, powered by Vite.
9
13
 
10
- > **Status: experimental.** atollic is pre-1.0 (`v0.0.x`). The API may change between minor versions until 1.0.
14
+ > **Status: experimental.** Atollic is pre-1.0 (`v0.0.x`). The API may change between minor versions until 1.0.
11
15
 
12
16
  - **Server-agnostic** — any WinterCG runtime that speaks `Request`/`Response` (Elysia, Hono, Bun, Node via adapter, Workers, …).
13
17
  - **UI-framework-agnostic** — ships with a Solid.js adapter; Preact / React / others pluggable via `FrameworkAdapter`.
@@ -24,7 +28,7 @@ Server (Elysia, Hono, ...) Client (Browser)
24
28
  3. Full page sent to browser 6. Hydrate with matching props
25
29
  ```
26
30
 
27
- - Pages are **server-rendered JSX** using atollic's built-in HTML runtime — no virtual DOM, just strings.
31
+ - Pages are **server-rendered JSX** using Atollic's built-in HTML runtime — no virtual DOM, just strings.
28
32
  - Components marked with `"use client"` become **islands** — they SSR on the server and hydrate on the client.
29
33
  - Everything else is zero-JS static HTML.
30
34
 
@@ -116,7 +120,7 @@ bun dist/server/app.js # Start production server
116
120
 
117
121
  ## Server adapters
118
122
 
119
- Atollic is decoupled from any specific server. Your entry file exports a fetch function — atollic handles the rest.
123
+ Atollic is decoupled from any specific server. Your entry file exports a fetch function — Atollic handles the rest.
120
124
 
121
125
  ### Elysia
122
126
 
@@ -133,7 +137,7 @@ export default app.handle;
133
137
 
134
138
  The Elysia adapter intercepts responses via `mapResponse`, extracts HTML, ensures DOCTYPE, and injects production assets.
135
139
 
136
- The HTML-extraction step is **registry-based** — each `FrameworkAdapter` contributes an extractor function (via the `extractHtml` field) that knows how to convert its framework's SSR output (e.g. Solid's `{ t: "..." }` shape) into a plain HTML string. The atollic Vite plugin wires these registrations up automatically before the first request, so the core stays framework-agnostic. Plain strings are always recognized as a fallback. See [Writing a framework adapter](#writing-a-framework-adapter) and the [`registerHtmlExtractor`](#atollic) API.
140
+ The HTML-extraction step is **registry-based** — each `FrameworkAdapter` contributes an extractor function (via the `extractHtml` field) that knows how to convert its framework's SSR output (e.g. Solid's `{ t: "..." }` shape) into a plain HTML string. The Atollic Vite plugin wires these registrations up automatically before the first request, so the core stays framework-agnostic. Plain strings are always recognized as a fallback. See [Writing a framework adapter](#writing-a-framework-adapter) and the [`registerHtmlExtractor`](#atollic) API.
137
141
 
138
142
  ### Hono
139
143
 
@@ -257,7 +261,7 @@ Atollic includes a server-side JSX runtime (`atollic/jsx-runtime`) that compiles
257
261
 
258
262
  ## `<Head />`
259
263
 
260
- Place `<Head />` in your document `<head>` to mark where atollic injects CSS and script tags:
264
+ Place `<Head />` in your document `<head>` to mark where Atollic injects CSS and script tags:
261
265
 
262
266
  ```tsx
263
267
  import { Head } from "atollic/head";
@@ -268,13 +272,13 @@ import { Head } from "atollic/head";
268
272
  </head>
269
273
  ```
270
274
 
271
- In dev, atollic injects the hydration bootstrap, collected CSS, and the client entry. In production, it injects the built asset tags. If `<Head />` is omitted, assets are injected before `</head>` as a fallback.
275
+ In dev, Atollic injects the hydration bootstrap, collected CSS, and the client entry. In production, it injects the built asset tags. If `<Head />` is omitted, assets are injected before `</head>` as a fallback.
272
276
 
273
277
  ## HMR
274
278
 
275
279
  Dual HMR strategy for instant feedback:
276
280
 
277
- - **Server file changes** — atollic sends a custom `atollic:reload` event. The client refetches the page and uses [idiomorph](https://github.com/bigskysoftware/idiomorph) to morph the DOM, preserving mounted island state.
281
+ - **Server file changes** — Atollic sends a custom `atollic:reload` event. The client refetches the page and uses [idiomorph](https://github.com/bigskysoftware/idiomorph) to morph the DOM, preserving mounted island state.
278
282
  - **Island file changes** — handled by the framework's own HMR (e.g., `solid-refresh`).
279
283
 
280
284
  ### Events
@@ -369,7 +373,7 @@ export function myFramework(): FrameworkAdapter {
369
373
  }
370
374
  ```
371
375
 
372
- The `extractHtml` strings from every registered adapter are emitted into a generated server-boot module that runs once before the first request. Each one calls `registerHtmlExtractor()` on the atollic core, which `extractHtml` (used internally by the Elysia and Hono adapters) iterates in order. This is how the core stays decoupled from any specific UI framework's SSR output shape.
376
+ The `extractHtml` strings from every registered adapter are emitted into a generated server-boot module that runs once before the first request. Each one calls `registerHtmlExtractor()` on the Atollic core, which `extractHtml` (used internally by the Elysia and Hono adapters) iterates in order. This is how the core stays decoupled from any specific UI framework's SSR output shape.
373
377
 
374
378
  ## API reference
375
379
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atollic",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Island architecture for WinterCG-compatible runtimes. Bring-your-own server (Elysia, Hono, …) and UI framework, powered by Vite.",
5
5
  "keywords": [
6
6
  "wintercg",