Release

Coralite v1.2.0 Released

Coralite v1.2.0 establishes compile-time boolean and ARIA attribute reflection for static HTML pages, ensuring pre-rendered templates omit falsy attributes and serialize valid ARIA states without runtime JavaScript overhead. This release also introduces semantic page composition and component reuse standards to agent scaffolding, while consolidating runtime globals under a unified namespace.

TD
Thomas David November 7, 2026

Coralite v1.2.0 shipped on November 7, 2026. This post highlights what changed. The complete list of commits and links is in the changelog entry for v1.2.0.

Unified Boolean and ARIA Attribute Reflection for Pages

Pages now share identical attribute reflection semantics with components during static HTML rendering and dynamic client-side hydration. Single-token bindings () evaluate against HTML boolean specifications, ARIA state definitions, and custom element schemas rather than performing raw string interpolation. Pre-rendered HTML omits falsy boolean attributes entirely, eliminating invalid DOM states such as disabled="false" that native browsers interpret as active.

  • Shared Reflection Engine: lib/shared/tags.js exports resolveBooleanOrAriaAttribute(), applyAstBoundAttribute() for build-time AST manipulation, and applyDomBoundAttribute() for client DOM updates.
  • Static SSR Resolution: lib/server/renderer.js evaluates single-token attribute bindings against custom element schemas and strips falsy boolean attributes (false, null, undefined, 0, '') directly from the static AST output.
  • ARIA Normalization: ARIA boolean states (aria-expanded, aria-hidden, aria-checked, aria-pressed) normalize truthy values to "true", falsy values to "false", and remove attributes when values resolve to null or undefined.
  • Direct Client Updates: lib/client/page-runtime.js replaces full-tree DOM crawling (updateLegacyPageTokens) with targeted DOM mutations, reducing hydration time and reactive flush overhead.

Page Definition (src/pages/dashboard.html)

html
Code copied!
<button
  disabled="{{ isDisabled }}"
  aria-expanded="{{ isExpanded }}"
  aria-label="{{ label }}">
  Toggle Panel
</button>
<ui-modal open="{{ isModalOpen }}"></ui-modal>

<script type="module">
  export const meta = {
    isDisabled: false,
    isExpanded: false,
    label: null,
    isModalOpen: false
  }

  export function client({ state }) {
    // Dynamic mutations reflect directly to DOM attributes:
    // state.isDisabled = true  -> renders disabled=""
    // state.isDisabled = false -> removes disabled attribute
  }
</script>

Rendered HTML & DOM Output

| Attribute Binding | State Value | Before (String Interpolation) | After (Unified Reflection) |

| :--- | :--- | :--- | :--- |

| disabled="" | false | <button disabled="false"> (element disabled) | <button> (attribute removed) |

| disabled="" | true | <button disabled="true"> | <button disabled> (boolean presence) |

| aria-expanded="" | false | <button aria-expanded="false"> | <button aria-expanded="false"> (normalized) |

| aria-label="" | null | <button aria-label=""> | <button> (attribute removed) |

| open="" (custom boolean) | false | <ui-modal open="false"> | <ui-modal> (attribute removed) |

Page Composition and Component Reuse Rules for Agent Scaffolding

Agent scaffolding generated by coralite init-agent now directs coding assistants to prioritize semantic HTML structures, deduplicate UI patterns, and adopt modern top-level named exports across AGENTS.md, .cursorrules, .cursor/rules/coralite.mdc, and CLAUDE.md.

  • Modern Named Exports: Page guidelines standardize on export function (paths, server, client, onError) and export const (meta, getters, style, provide), deprecating export default definePage({ ... }) to legacy compatibility mode.
  • Semantic HTML First: Scaffolding rules prioritize standard semantic elements (<header>, <main>, <article>, <section>, <nav>) over arbitrary container <div> tags or redundant custom element wrappers for static content.
  • Component Reuse & De-duplication: Guidelines instruct agents to inspect src/components/ before generating new markup, preventing duplicate UI patterns across static pages.
  • Slot Projection: Enforces explicit <slot> projection when nesting children inside reusable custom elements.
  • CLI Test Verification: packages/coralite/tests/unit/lib/cli.spec.js validates that agent configuration files output updated page export forms and composition guidelines.

Before: Legacy definePage and Duplicate Markup

html
Code copied!
<!-- src/pages/about.html -->
<!-- Duplicating navigation markup instead of reusing components -->
<div class="site-header">
  <div class="brand">My App</div>
  <ul class="nav-links">
    <li><a href="/">Home</a></li>
    <li><a href="/about">About</a></li>
  </ul>
</div>

<div class="page-content">
  <h1>About Us</h1>
  <p>Welcome to our application.</p>
</div>

<script type="module">
  import { definePage } from 'coralite'

  export default definePage({
    getters: {
      title: () => 'About Us'
    },
    async server ({ state }) {
      state.loadedAt = Date.now()
    }
  })
</script>

After: Modern Named Exports and Component Composition

html
Code copied!
<!-- src/pages/about.html -->
<header>
  <!-- Reusing existing project custom element from src/components/site-header.html -->
  <site-header></site-header>
</header>

<main>
  <!-- Standard semantic HTML for static structure and text -->
  <article>
    <h1>About Us</h1>
    <p>Welcome to our application.</p>
  </article>
</main>

<script type="module">
  export const meta = {
    title: 'About Us'
  }

  export async function server ({ state }) {
    state.loadedAt = Date.now()
  }
</script>

Internal Changes

Runtime and VM Global Namespace Consolidation

Browser runtime globals and Node VM execution environments now reside under the single, non-enumerable window.<strong>coralite</strong> and globalThis.<strong>coralite</strong> namespaces. Structured sub-domains organize internal APIs across config, state, dom, plugins (such as window.<strong>coralite</strong>.plugins.router), lifecycle (lifecycle.hydrated), devtools, and test. Centralized definitions in packages/coralite/types/globals.js and packages/coralite/lib/client/utils/runtime.js prevent global namespace pollution and ensure deterministic runtime sandboxing.

Documentation and Agent Invariant Alignment

Framework guides and AGENTS.md now codify the single global namespace rule as a strict invariant, prohibiting ad-hoc properties on window or globalThis. Documentation updates synchronize LLM full references and E2E testing guides with the consolidated testing (window.<strong>coralite</strong>.test) and lifecycle settlement APIs.

Get Started

Scaffold a new project with the create script, then start the development server:

bash
Code copied!
npm create coralite@latest my-app
cd my-app
npm run dev

The same command works with other package managers:

bash
Code copied!
pnpm create coralite my-app
yarn create coralite my-app
TD

Thomas David

Creator of Coralite. Writing about the intersection of native web APIs, compiler design, and AI-assisted development.