atollic 0.0.3 → 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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +18 -9
  3. package/package.json +11 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Arvin Wilderink
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,8 +1,17 @@
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>
6
+
7
+ [![npm version](https://img.shields.io/npm/v/atollic.svg)](https://www.npmjs.com/package/atollic)
8
+ [![CI](https://github.com/awilderink/atollic/actions/workflows/ci.yml/badge.svg)](https://github.com/awilderink/atollic/actions/workflows/ci.yml)
9
+ [![License: MIT](https://img.shields.io/npm/l/atollic.svg)](./LICENSE)
10
+ [![Bundle size](https://img.shields.io/bundlephobia/minzip/atollic)](https://bundlephobia.com/package/atollic)
2
11
 
3
12
  Island architecture for WinterCG-compatible runtimes. Bring your own server (Elysia, Hono, …) and your own UI framework, powered by Vite.
4
13
 
5
- > **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.
6
15
 
7
16
  - **Server-agnostic** — any WinterCG runtime that speaks `Request`/`Response` (Elysia, Hono, Bun, Node via adapter, Workers, …).
8
17
  - **UI-framework-agnostic** — ships with a Solid.js adapter; Preact / React / others pluggable via `FrameworkAdapter`.
@@ -19,7 +28,7 @@ Server (Elysia, Hono, ...) Client (Browser)
19
28
  3. Full page sent to browser 6. Hydrate with matching props
20
29
  ```
21
30
 
22
- - 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.
23
32
  - Components marked with `"use client"` become **islands** — they SSR on the server and hydrate on the client.
24
33
  - Everything else is zero-JS static HTML.
25
34
 
@@ -111,7 +120,7 @@ bun dist/server/app.js # Start production server
111
120
 
112
121
  ## Server adapters
113
122
 
114
- 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.
115
124
 
116
125
  ### Elysia
117
126
 
@@ -128,7 +137,7 @@ export default app.handle;
128
137
 
129
138
  The Elysia adapter intercepts responses via `mapResponse`, extracts HTML, ensures DOCTYPE, and injects production assets.
130
139
 
131
- 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.
132
141
 
133
142
  ### Hono
134
143
 
@@ -252,7 +261,7 @@ Atollic includes a server-side JSX runtime (`atollic/jsx-runtime`) that compiles
252
261
 
253
262
  ## `<Head />`
254
263
 
255
- 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:
256
265
 
257
266
  ```tsx
258
267
  import { Head } from "atollic/head";
@@ -263,13 +272,13 @@ import { Head } from "atollic/head";
263
272
  </head>
264
273
  ```
265
274
 
266
- 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.
267
276
 
268
277
  ## HMR
269
278
 
270
279
  Dual HMR strategy for instant feedback:
271
280
 
272
- - **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.
273
282
  - **Island file changes** — handled by the framework's own HMR (e.g., `solid-refresh`).
274
283
 
275
284
  ### Events
@@ -364,7 +373,7 @@ export function myFramework(): FrameworkAdapter {
364
373
  }
365
374
  ```
366
375
 
367
- 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.
368
377
 
369
378
  ## API reference
370
379
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atollic",
3
- "version": "0.0.3",
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",
@@ -23,15 +23,20 @@
23
23
  "homepage": "https://github.com/awilderink/atollic#readme",
24
24
  "type": "module",
25
25
  "scripts": {
26
- "dev:elysia": "bunx --bun vite --config examples/elysia/vite.config.ts",
27
- "dev:hono": "bunx --bun vite --config examples/hono/vite.config.ts",
26
+ "dev:elysia": "cd examples/elysia && bunx --bun vite",
27
+ "dev:hono": "cd examples/hono && bunx --bun vite",
28
28
  "build": "vite build && tsc",
29
+ "build:examples": "cd examples/elysia && bunx --bun vite build && cd ../hono && bunx --bun vite build",
29
30
  "prepare": "npm run build",
30
31
  "prepublishOnly": "npm run build",
31
32
  "typecheck": "tsc --noEmit && tsc --noEmit --project examples/elysia/tsconfig.json && tsc --noEmit --project examples/hono/tsconfig.json",
32
33
  "format": "biome format --write .",
33
34
  "lint": "biome lint .",
34
- "check": "biome check --write ."
35
+ "check": "biome check --write .",
36
+ "test": "bun test",
37
+ "changeset": "changeset",
38
+ "version": "changeset version",
39
+ "release": "changeset publish"
35
40
  },
36
41
  "exports": {
37
42
  ".": {
@@ -115,6 +120,8 @@
115
120
  },
116
121
  "devDependencies": {
117
122
  "@biomejs/biome": "^2.4.7",
123
+ "@changesets/changelog-github": "^0.5.0",
124
+ "@changesets/cli": "^2.27.10",
118
125
  "@types/node": "^25.5.0",
119
126
  "bun-types": "^1.3.11",
120
127
  "elysia": "^1.4.28",