Skip to content
This repository was archived by the owner on Jun 28, 2026. It is now read-only.

Latest commit

 

History

History
195 lines (135 loc) · 5.24 KB

File metadata and controls

195 lines (135 loc) · 5.24 KB

HtmlDom — Desktop HTML-like UI

HtmlDom

Desktop HTML-like UI library extracted into a standalone multi-module repository.

This is a desktop stack, not browser/WebView: retained DOM, HTML-like markup, CSS cascade/layout, Lua scripting as the JavaScript replacement, font registry, Font Awesome registry, and a Swing/JFrame renderer.

Release identity

  • Current version: 1.0.12
  • Release name: CSS Length Tolerance Hotfix
  • Authors: Take Some()
  • Primary package group: dev.takesome

Screenshots

HtmlDom desktop UI and DevTools runtime

Documentation

Modules

  • html-dom-core — DOM, HTML registry, markup parser, CSS parser/cascade/layout, user-agent styles.
  • html-dom-fonts — font registry and built-in classpath font registration.
  • html-dom-icons-fontawesome — Font Awesome icon registry, glyph descriptors, TTF resources and font registration hooks.
  • html-dom-scripting-lua — Lua runtime and DOM bindings; Lua is used instead of browser JavaScript.
  • html-dom-devtools — DOM/layout/line/inline/paint/scroll inspection snapshots.
  • html-dom-desktop — Swing/JFrame renderer and bundled showcase launcher.

Font resources

Built-in fonts are registered from:

modules/html-dom-fonts/src/main/resources/html-dom/fonts/built-in-fonts.json

The bundled registry loads the copied FS Elliot / Roboto Mono font files from Java2DGame.

Font Awesome

Font Awesome TTFs are copied into:

modules/html-dom-icons-fontawesome/src/main/resources/html-dom/icons/fontawesome/

The desktop renderer registers them through FontAwesomeFonts.register(HtmlDomFonts.registry()), then resolves icon classes such as:

<i class="fa-solid fa-code"></i>
<i class="fa-solid fa-bolt"></i>

Lua instead of JS

Bundled Lua lives at:

modules/html-dom-desktop/src/main/resources/html-dom/bundled/showcase.lua

The Swing panel loads it through HtmlDomLuaRuntime; scripts can mutate DOM via the exposed dom table.

Build

gradlew.bat clean compileJava --console=plain --no-daemon

Run desktop showcase

gradlew.bat :html-dom-desktop:run --console=plain --no-daemon

Build executable showcase jar

gradlew.bat bundledHtmlUiJar --console=plain --no-daemon

Run it:

java -jar modules\html-dom-desktop\build\libs\html-dom-ui-1.0.12-bundled.jar

Paint tree / scroll containers

The core layout result now carries block boxes, line boxes, inline boxes and scroll boxes. The paint layer is split into physical phases:

paintBackground
paintBorder
paintContent
paintOutline
paintPositionedDescendants
paintScrollbars

DevTools snapshots include layout nodes, paint nodes and scroll container nodes with content size, viewport size and scroll offsets.

Maven package

Artifacts are published as GitHub Packages when a release tag such as v1.0.12 is pushed.

Gradle repository setup:

repositories {
    maven {
        url = uri('https://maven.pkg.github.com/Take-Some/JavaDOM')
        credentials {
            username = findProperty('gpr.user') ?: System.getenv('GITHUB_ACTOR')
            password = findProperty('gpr.key') ?: System.getenv('GITHUB_TOKEN')
        }
    }
}

Primary dependency examples:

dependencies {
    // All-in-one executable desktop runtime package:
    implementation 'dev.takesome:html-dom-aio:1.0.12'

    // Split module packages:
    implementation 'dev.takesome:html-dom-core:1.0.12'
    implementation 'dev.takesome:html-dom-desktop:1.0.12'
    implementation 'dev.takesome:html-dom-fonts:1.0.12'
    implementation 'dev.takesome:html-dom-icons-fontawesome:1.0.12'
    implementation 'dev.takesome:html-dom-scripting-lua:1.0.12'
    implementation 'dev.takesome:html-dom-devtools:1.0.12'
}

Build the AIO jar locally:

gradlew.bat :html-dom-desktop:aioJar --console=plain --no-daemon
java -jar modules\html-dom-desktop\build\libs\html-dom-aio-1.0.12.jar

Local verification:

gradlew.bat publishToMavenLocal --console=plain --no-daemon

Authors

  • Take Some()

CI / release / packages

GitHub Actions are configured in:

.github/workflows/ci.yml
.github/workflows/release.yml
  • CI runs on main and pull requests.
  • Release runs on version tags such as v1.0.12.
  • Maven artifacts are published to GitHub Packages under dev.takesome:*:1.0.12, including dev.takesome:html-dom-aio:1.0.12.
  • The bundled desktop showcase jar is attached to the GitHub release.

Create a release locally:

git tag -a v1.0.12 -m "HtmlDom 1.0.12 — CSS Length Tolerance Hotfix"
git push origin main v1.0.12