
DOM helper toolkit offering custom-element base class, attribute delegate keeping DOM as single source of truth, shadow-root style helpers, typed selector expressions, declarative element builders, and loadjs wrapper.
DOM helpers for Kotlin/JS: a custom-element base class, an attribute delegate that keeps the DOM as the
single source of truth, shadow-root style helpers, typed stylesheets with a selector expression engine
(className(ROW) child attributeSelector("aria-current"), compound(…)), element construction as
createElement { … } / HtmlTagName.div { … } / +tag { … }, and a wrapper for the loadjs
loader. No UI framework, no template language, no state-driven re-render.
The repository is also the home of the small libraries that do not need a repository of their own.
| Module | Coordinate | Version |
|---|---|---|
| ktjs-dom-kit | io.github.shijianjs:ktjs-dom-kit |
0.1.0 |
implementation("io.github.shijianjs:ktjs-dom-kit:0.1.0")A library that wraps no npm package carries a hand-written semantic version in its own build script
(ktjs-dom-kit is one). Everything else follows the wrapper rule, {upstream npm version}-kt.{revision}:
the upstream version is declared once in the root package.json and the revision is
read per module from wrapper-revisions.properties.
-kt.N wrapper versions are published; a version without the suffix never exists.-SNAPSHOT: the derived number is the next release, so development
builds never impersonate it. Publishing passes -Pktjs.release=true, which drops the suffix.Libraries added later are Gradle modules named after their Maven artifact; the root build collects
every ktjs- project for publishing, Dokka and the version report, so the only edits are the module
directory, one include in settings.gradle.kts and its documentation.
kotlin.js.yarn=false in
gradle.properties keeps npm as the package manager../gradlew build # compile, Detekt, browser tests
./gradlew :ktjs-dom-kit:jsBrowserTest
# Documentation site: Kotlin configuration, Markdown pages, built by ktjs-docusaurus
./gradlew :docs:docusaurusBuild
# GitHub Pages site (documentation at the root, Dokka output under /api/)
./gradlew pagesSiteAfter adding or upgrading an npm dependency, refresh the shared lock file:
./gradlew kotlinUpgradePackageLockThe docs module is a Kotlin/JS project too. All three ktjs-docusaurus versions live in
gradle.properties — the wrapper klib, the Gradle plugin and the kit whose home sections the landing
page uses — because each of those modules carries its own revision. A SNAPSHOT there is resolved from
mavenLocal, so building the site against an unreleased wrapper means publishing that wrapper locally
first. The kit's browser bundle is not a Maven artifact: it ships as a resource of the kit's klib, and
extractKitBundle copies it to the site's static/ktjs-client/.
Publishing is configured once in the root build.gradle.kts for all modules.
Releases run through .github/workflows/release.yml: it signs the artifacts, packages one archive per
Maven coordinate and registers them with the shared Maven Central hub, which merges the pending
registrations into a single deployment.
Released under the MIT License.
DOM helpers for Kotlin/JS: a custom-element base class, an attribute delegate that keeps the DOM as the
single source of truth, shadow-root style helpers, typed stylesheets with a selector expression engine
(className(ROW) child attributeSelector("aria-current"), compound(…)), element construction as
createElement { … } / HtmlTagName.div { … } / +tag { … }, and a wrapper for the loadjs
loader. No UI framework, no template language, no state-driven re-render.
The repository is also the home of the small libraries that do not need a repository of their own.
| Module | Coordinate | Version |
|---|---|---|
| ktjs-dom-kit | io.github.shijianjs:ktjs-dom-kit |
0.1.0 |
implementation("io.github.shijianjs:ktjs-dom-kit:0.1.0")A library that wraps no npm package carries a hand-written semantic version in its own build script
(ktjs-dom-kit is one). Everything else follows the wrapper rule, {upstream npm version}-kt.{revision}:
the upstream version is declared once in the root package.json and the revision is
read per module from wrapper-revisions.properties.
-kt.N wrapper versions are published; a version without the suffix never exists.-SNAPSHOT: the derived number is the next release, so development
builds never impersonate it. Publishing passes -Pktjs.release=true, which drops the suffix.Libraries added later are Gradle modules named after their Maven artifact; the root build collects
every ktjs- project for publishing, Dokka and the version report, so the only edits are the module
directory, one include in settings.gradle.kts and its documentation.
kotlin.js.yarn=false in
gradle.properties keeps npm as the package manager../gradlew build # compile, Detekt, browser tests
./gradlew :ktjs-dom-kit:jsBrowserTest
# Documentation site: Kotlin configuration, Markdown pages, built by ktjs-docusaurus
./gradlew :docs:docusaurusBuild
# GitHub Pages site (documentation at the root, Dokka output under /api/)
./gradlew pagesSiteAfter adding or upgrading an npm dependency, refresh the shared lock file:
./gradlew kotlinUpgradePackageLockThe docs module is a Kotlin/JS project too. All three ktjs-docusaurus versions live in
gradle.properties — the wrapper klib, the Gradle plugin and the kit whose home sections the landing
page uses — because each of those modules carries its own revision. A SNAPSHOT there is resolved from
mavenLocal, so building the site against an unreleased wrapper means publishing that wrapper locally
first. The kit's browser bundle is not a Maven artifact: it ships as a resource of the kit's klib, and
extractKitBundle copies it to the site's static/ktjs-client/.
Publishing is configured once in the root build.gradle.kts for all modules.
Releases run through .github/workflows/release.yml: it signs the artifacts, packages one archive per
Maven coordinate and registers them with the shared Maven Central hub, which merges the pending
registrations into a single deployment.
Released under the MIT License.