Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .changeset/olive-donkeys-invent.md

This file was deleted.

28 changes: 0 additions & 28 deletions .changeset/plain-donkeys-build.md

This file was deleted.

4 changes: 0 additions & 4 deletions .changeset/spotty-berries-preview.md

This file was deleted.

21 changes: 0 additions & 21 deletions .changeset/wild-pandas-repeat.md

This file was deleted.

8 changes: 8 additions & 0 deletions apps/starter-mini-lynx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @amritk/starter-mini-lynx

## 0.0.1

### Patch Changes

- Updated dependencies [d572153]
- @amritk/mini-lynx-rsbuild-plugin@0.2.0
2 changes: 1 addition & 1 deletion apps/starter-mini-lynx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amritk/starter-mini-lynx",
"version": "0.0.0",
"version": "0.0.1",
"private": true,
"description": "The smallest real @amritk/mini-lynx app: rspeedy dev, a QR code, and Lynx Explorer.",
"type": "module",
Expand Down
8 changes: 4 additions & 4 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions packages/create-mini-lynx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# @amritk/create-mini-lynx

## 0.1.0

### Minor Changes

- 8e575fd: Add `create-mini-lynx`: one command to a running app, in a browser or on a phone.

`bun create @amritk/mini-lynx my-app` writes a complete `@amritk/mini-lynx`
project, installs it, and leaves you one command from either loop:

- `bun run dev` — the app in a device frame in a browser tab, on
`@amritk/mini-lynx-preview`, with a size picker and no phone involved.
- `bun run dev:device` — `rspeedy dev` through
`@amritk/mini-lynx-rsbuild-plugin`: a real `.lynx.bundle`, two QR codes, and
Lynx Explorer.

One `src/app.tsx` feeds both; what differs is the entry — `src/main-thread.ts`
for the device (plus `src/background.ts`, the chunk `NativeModules` lives in)
and `src/preview/main.ts` for the browser. The DOM libs are withheld from
everything outside `src/preview/`, in a second `tsconfig` pass rather than a
comment, so a `document` in app code fails the type check instead of failing on
the only target that ships.
2 changes: 1 addition & 1 deletion packages/create-mini-lynx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amritk/create-mini-lynx",
"version": "0.0.0",
"version": "0.1.0",
"description": "Scaffolds a @amritk/mini-lynx app that runs in a device-framed browser preview from the first command.",
"type": "module",
"license": "MIT",
Expand Down
23 changes: 23 additions & 0 deletions packages/mini-lynx-preview/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# @amritk/mini-lynx-preview

## 0.1.0

### Minor Changes

- 8e575fd: Publish the browser preview engine as a package.

Lynx's Element PAPI implemented over the DOM — `createDomPapi`,
`installLynxReset`/`LYNX_ROOT_ATTRIBUTE` and `createVisualViewportEmitter` — so a
`@amritk/mini-lynx` app runs in a browser tab with nothing about it changed. It
was `apps/playground-mini-lynx/src/lib/` until something outside this repo
needed the same engine; the playground now boots on the package, so there is one
implementation rather than two.

It is the loop with no phone in it — `@amritk/mini-lynx-rsbuild-plugin` is the
one with a phone, and a scaffolded app carries both.

Every import of the runtime here is `import type`. A preview that called
`setEngine` itself would call it on whichever copy of the runtime it resolved,
which in a consumer's app can be a different copy from the one the app imported
— and the symptom of that is a blank screen with no error in it. The four lines
of wiring stay in the app.
4 changes: 2 additions & 2 deletions packages/mini-lynx-preview/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@amritk/mini-lynx-preview",
"version": "0.0.0",
"description": "Lynx's Element PAPI implemented over the DOM, so a @amritk/mini-lynx app runs \u2014 unmodified \u2014 in a browser tab.",
"version": "0.1.0",
"description": "Lynx's Element PAPI implemented over the DOM, so a @amritk/mini-lynx app runs — unmodified — in a browser tab.",
"type": "module",
"license": "MIT",
"author": "amritk",
Expand Down
30 changes: 30 additions & 0 deletions packages/mini-lynx-rsbuild-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# @amritk/mini-lynx-rsbuild-plugin

## 0.2.0

### Minor Changes

- d572153: Add `@amritk/mini-lynx-rsbuild-plugin` — the rspeedy build for a
`@amritk/mini-lynx` app, so `rspeedy dev` → QR code → Lynx Explorer works on day
one.

A Lynx template is a container with two code slots — a main-thread chunk the
engine executes to build the first screen and a background chunk it loads as
`/app-service.js` — plus CSS the encoder compiles. rspeedy builds the container;
which code goes in which slot is the framework's to say, and every framework
says it in a plugin of its own. This is that plugin for a runtime that renders
on the main thread and drives the Element PAPI itself: `pluginMiniLynx()` splits
one entry into two chunks, adds the template plugin and encoder, sets the
`lynx:main-thread` asset flag the encoder splits on, wraps the background chunk
for the engine's module loader, and points the JSX transform at
`@amritk/mini-lynx`.

In `dev` it wires the dev-server client and a devtool reload. Nothing hot-updates
and nothing should — a component runs once here — so an update no module accepts
falls through to a page reload, which is safe because `renderPage` claims
`removeComponents`.

`apps/starter-mini-lynx` is a four-file app built through it, and
`docs/mini-lynx-explorer.md` records the loop along with what has been verified
(one real build per commit, whose main-thread chunk is executed against the fake
Element PAPI and asserted on) and what a device still has to answer.
2 changes: 1 addition & 1 deletion packages/mini-lynx-rsbuild-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amritk/mini-lynx-rsbuild-plugin",
"version": "0.1.0",
"version": "0.2.0",
"description": "The rspeedy build for a @amritk/mini-lynx app: two chunks, one .lynx.bundle template, and a QR code Lynx Explorer scans.",
"type": "module",
"license": "MIT",
Expand Down