dimui
dimui is the shared UI library for Dim apps: Material-inspired atoms and molecules, a notes kit, a messaging kit, and a custom Storybook-like explorer. No bundler, no TypeScript, no Dim npm install — classic scripts + BP.module, with Dim from the CDN.
Live explorer: positive-intentions.github.io/dimui.
What it includes
- Design system — atoms (
dimui-button,dimui-text-field, …) and generic molecules (dimui-drawer,dimui-tabs, …) undersrc/components/ - Notes kit —
src/components/notes/+src/lib/notes/(canonical UI for dim-boilerplate) - Messaging kit —
src/components/messaging/+src/lib/messaging/(presentational chat UI) - Explorer —
src/explorer/(sidebar, canvas iframe, addons) — not for app shells
Full module inventory: dimui README.
How apps consume it
Apps load remote classic scripts, e.g.:
https://positive-intentions.github.io/dimui/src/components/atoms/button.js
Each file registers with BP.module("dimui/…", deps, factory) and uses window.Dim. Override the source root while developing:
?dimuiSrc=http://127.0.0.1:5173/src/
?dimurlSrc=http://127.0.0.1:5180/src/
The notes shell syncs folder/note selection to the hash via dimurl (#/note/:id, #/folder/:id). dim-boilerplate keeps thin local proxies under notes/components/atoms/ so PWA precache lists and tests stay predictable.
Runtime
| URL | Loads |
|---|---|
?impl=js (default) | dim/lib/dim.global.js |
?impl=wasm | dim/lib/dim.wasm.global.js |
Serve over HTTP (python3 -m http.server 5173). Open index.html for the explorer, runTests.html for DimTest.