Frontend uudelleenrakennettu: Astro-komponentit, Wasm pääsäikeessä, ei Workeria

Vanha frontend siirretty temp/. Uusi rakenne:
- StatusBar.astro, Terminal.astro, Editor.astro, Guide.astro
- global.css erillinen
- Wasm pääsäikeessä (ei Worker — yksinkertainen, debugattava)
- Tab-completion, dropdown, projektikortti, Monaco, GUIDE.md
- Ei tokenisointia eikä koodilaboratoriota

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jaakko Vanhala
2026-04-09 20:17:39 +03:00
parent e3fdb91ac5
commit a8c4af0975
9617 changed files with 996171 additions and 5349 deletions

View File

@@ -0,0 +1,48 @@
/**
* @typedef {import('unist').Parent} Parent
*/
/**
* @template {Parent} Kind
* Node type.
* @callback Visitor
* Callback called for each `child` in `parent` later given to `visit`.
* @param {Kind['children'][number]} child
* Child of parent.
* @param {number} index
* Position of `child` in parent.
* @param {Kind} parent
* Parent node.
* @returns {undefined}
* Nothing.
*/
/**
* @template {Parent} Kind
* Node type.
* @callback Visit
* Function to call the bound `visitor` for each child in `parent`.
* @param {Kind} node
* Parent node.
* @returns {undefined}
* Nothing.
*/
/**
* Wrap `visitor` to be called for each child in the nodes later given to
* `visit`.
*
* @template {Parent} Kind
* Node type.
* @param {Visitor<Kind>} visitor
* Callback called for each `child` in `parent` later given to `visit`.
* @returns {Visit<Kind>}
* Function to call the bound `visitor` for each child in `parent`.
*/
export function visitChildren<Kind extends import("unist").Parent>(visitor: Visitor<Kind>): Visit<Kind>;
export type Parent = import('unist').Parent;
/**
* Callback called for each `child` in `parent` later given to `visit`.
*/
export type Visitor<Kind extends import("unist").Parent> = (child: Kind['children'][number], index: number, parent: Kind) => undefined;
/**
* Function to call the bound `visitor` for each child in `parent`.
*/
export type Visit<Kind extends import("unist").Parent> = (node: Kind) => undefined;

View File

@@ -0,0 +1,58 @@
/**
* @typedef {import('unist').Parent} Parent
*/
/**
* @template {Parent} Kind
* Node type.
* @callback Visitor
* Callback called for each `child` in `parent` later given to `visit`.
* @param {Kind['children'][number]} child
* Child of parent.
* @param {number} index
* Position of `child` in parent.
* @param {Kind} parent
* Parent node.
* @returns {undefined}
* Nothing.
*/
/**
* @template {Parent} Kind
* Node type.
* @callback Visit
* Function to call the bound `visitor` for each child in `parent`.
* @param {Kind} node
* Parent node.
* @returns {undefined}
* Nothing.
*/
/**
* Wrap `visitor` to be called for each child in the nodes later given to
* `visit`.
*
* @template {Parent} Kind
* Node type.
* @param {Visitor<Kind>} visitor
* Callback called for each `child` in `parent` later given to `visit`.
* @returns {Visit<Kind>}
* Function to call the bound `visitor` for each child in `parent`.
*/
export function visitChildren(visitor) {
return visit
/** @type {Visit<Kind>} */
function visit(parent) {
const children = parent && parent.children
let index = -1
if (!children) {
throw new Error('Missing children in `parent` for `visit`')
}
while (++index in children) {
visitor(children[index], index, parent)
}
}
}