htmlboard 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -27
- package/bin/htmlboard.js +10 -13
- package/package.json +2 -2
- package/skills/htmlboard/SKILL.md +4 -4
- package/src/client/explorer.css +268 -599
- package/src/client/explorer.js +863 -604
- package/src/client/favicon.svg +1 -0
- package/src/client/fonts/OFL-bricolage-grotesque.txt +93 -0
- package/src/client/fonts/OFL-inter.txt +93 -0
- package/src/client/fonts/bricolage-grotesque.woff2 +0 -0
- package/src/client/fonts/inter.woff2 +0 -0
- package/src/client/index.html +85 -175
- package/src/client/logo.svg +1 -0
- package/src/client/mark.svg +1 -0
- package/src/index.js +2 -1
- package/src/server.js +106 -28
package/README.md
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
<h1>
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/luizcarlos1405/htmlboard/main/brand/logo-dark.svg">
|
|
4
|
+
<img alt="htmlboard" src="https://raw.githubusercontent.com/luizcarlos1405/htmlboard/main/brand/logo-light.svg" height="56">
|
|
5
|
+
</picture>
|
|
6
|
+
</h1>
|
|
2
7
|
|
|
3
8
|
> **Infinite canvas and design explorer for HTML artboards — designed for humans and LLMs.**
|
|
4
9
|
|
|
5
|
-
[](https://www.npmjs.com/package/htmlboard)
|
|
11
|
+
[](LICENSE)
|
|
7
12
|
[](https://nodejs.org)
|
|
8
13
|
[](package.json)
|
|
9
14
|
|
|
@@ -24,15 +29,15 @@ Modern AI agents and developers generate dozens of HTML mockups, layout variatio
|
|
|
24
29
|
|
|
25
30
|
## ✨ Features
|
|
26
31
|
|
|
27
|
-
- 🛸 **Infinite Canvas**:
|
|
28
|
-
- ⚡ **Zero Dependencies**: Pure native Node.js ES modules. Runs instantly with `npx htmlboard
|
|
29
|
-
- 🔄 **State-Preserving Live Reload**:
|
|
30
|
-
- 🔍 **Auto-Discovery**: Point HtmlBoard at any folder. It
|
|
31
|
-
- 📐 **Declarative Manifest (`designs.json`)**: Optional
|
|
32
|
-
-
|
|
33
|
-
- 🎯 **Focus & Zoom-to-Fit**:
|
|
34
|
-
- 🔗 **Deep Links**: The URL follows the
|
|
35
|
-
- ⌨️ **Keyboard-First Workflow**:
|
|
32
|
+
- 🛸 **Infinite Canvas**: Drag or scroll to move, <kbd>Ctrl</kbd>/<kbd>⌘</kbd> + scroll or pinch to zoom (2% to 800%), with a mouse, a trackpad or a touch screen. Names and section titles stay sharp at any zoom, and the dot grid keeps its spacing.
|
|
33
|
+
- ⚡ **Zero Dependencies**: Pure native Node.js ES modules, fonts included. Runs instantly with `npx htmlboard`, offline too.
|
|
34
|
+
- 🔄 **State-Preserving Live Reload**: The server watches the project and pushes every save (Server-Sent Events). Saving a design reloads its frame; saving a file designs use (a stylesheet, a script, an image, data) reloads just the designs that loaded it; new, removed and renamed designs show up by themselves. Your view never moves.
|
|
35
|
+
- 🔍 **Auto-Discovery**: Point HtmlBoard at any folder. It finds every HTML file, names it after its `<title>`, sizes it from words in its path (mobile, tablet, desktop…) and lays the folders out as rows.
|
|
36
|
+
- 📐 **Declarative Manifest (`designs.json`)**: Optional file to choose the sections, the order, the sizes and the names.
|
|
37
|
+
- 🔎 **Search**: Find designs by name, file, tags or section (case and accents don't matter); the others fade out in place.
|
|
38
|
+
- 🎯 **Focus & Zoom-to-Fit**: Click a design in the list or double-click it on the canvas to fit it, <kbd>Shift</kbd> + <kbd>1</kbd> fits everything, <kbd>←</kbd> <kbd>→</kbd> step through the designs.
|
|
39
|
+
- 🔗 **Deep Links**: The URL follows the selected design (`http://localhost:3000/#checkout-b`), so you can share or reload a view of one design.
|
|
40
|
+
- ⌨️ **Keyboard-First Workflow**: Figma-like shortcuts; <kbd>?</kbd> lists them.
|
|
36
41
|
|
|
37
42
|
---
|
|
38
43
|
|
|
@@ -160,7 +165,7 @@ While HtmlBoard automatically discovers HTML files, you can add a `designs.json`
|
|
|
160
165
|
|
|
161
166
|
Sections are rows (top to bottom) and designs run left to right. A `file` may carry a query string, so one HTML file can show several states. Leave `height` out to let the frame grow with its page. `id` and `category` are derived from the file when left out.
|
|
162
167
|
|
|
163
|
-
The full form adds ids, descriptions
|
|
168
|
+
The full form adds ids, descriptions (shown in the list), categories and tags (searchable); `name`/`artboards` are synonyms of `title`/`designs`:
|
|
164
169
|
|
|
165
170
|
```json
|
|
166
171
|
{
|
|
@@ -217,16 +222,22 @@ The full form adds ids, descriptions, categories (for the toolbar filters) and s
|
|
|
217
222
|
|
|
218
223
|
| Shortcut | Action |
|
|
219
224
|
| :--- | :--- |
|
|
220
|
-
| <kbd>Space</kbd> +
|
|
221
|
-
| <kbd>
|
|
222
|
-
| <kbd
|
|
223
|
-
| <kbd>
|
|
224
|
-
| <kbd>
|
|
225
|
-
| <kbd
|
|
226
|
-
| <kbd>
|
|
227
|
-
| <kbd
|
|
228
|
-
| <kbd
|
|
229
|
-
| <kbd>
|
|
225
|
+
| Drag, <kbd>Space</kbd> + drag | Move around |
|
|
226
|
+
| Scroll (<kbd>Shift</kbd>: sideways) | Move around |
|
|
227
|
+
| <kbd>Ctrl</kbd>/<kbd>⌘</kbd> + scroll, pinch | Zoom, anchored to the pointer |
|
|
228
|
+
| <kbd>+</kbd> / <kbd>−</kbd> | Zoom in / out |
|
|
229
|
+
| <kbd>Shift</kbd> + <kbd>0</kbd> | Zoom to 100% |
|
|
230
|
+
| <kbd>Shift</kbd> + <kbd>1</kbd> | Fit everything (what the search keeps) |
|
|
231
|
+
| <kbd>Shift</kbd> + <kbd>2</kbd>, double-click | Fit the design |
|
|
232
|
+
| <kbd>←</kbd> / <kbd>→</kbd> | Previous / next design |
|
|
233
|
+
| <kbd>Enter</kbd> | Open the selected design on its own |
|
|
234
|
+
| <kbd>/</kbd> | Search (<kbd>Enter</kbd> fits the first match, <kbd>Esc</kbd> clears) |
|
|
235
|
+
| <kbd>R</kbd> | Reload the designs |
|
|
236
|
+
| <kbd>\</kbd> | Show or hide the list |
|
|
237
|
+
| <kbd>?</kbd> | Show the shortcuts |
|
|
238
|
+
| <kbd>Esc</kbd> | Deselect |
|
|
239
|
+
|
|
240
|
+
On the canvas the designs are pictures: the canvas takes every click and scroll, so <kbd>Ctrl</kbd> + scroll never zooms the page itself. Use **Open** (or <kbd>Enter</kbd>) to try a design's links and hover states on its own.
|
|
230
241
|
|
|
231
242
|
---
|
|
232
243
|
|
|
@@ -269,15 +280,19 @@ htmlboard/
|
|
|
269
280
|
│ ├── index.js # Library entry point & API exports
|
|
270
281
|
│ ├── server.js # HTTP server, SSE live reload, auto-discovery
|
|
271
282
|
│ ├── skills.js # `htmlboard skills` installer
|
|
272
|
-
│ ├── client/ # The
|
|
273
|
-
│ │ ├── index.html # Explorer shell
|
|
274
|
-
│ │ ├── explorer.css # Dark
|
|
275
|
-
│ │
|
|
283
|
+
│ ├── client/ # The canvas
|
|
284
|
+
│ │ ├── index.html # Explorer shell: list, canvas, toolbar, shortcuts
|
|
285
|
+
│ │ ├── explorer.css # Dark chrome, dot grid
|
|
286
|
+
│ │ ├── explorer.js # Layout, pan/zoom, search, live reload
|
|
287
|
+
│ │ ├── favicon.svg, logo.svg, mark.svg
|
|
288
|
+
│ │ └── fonts/ # Inter and Bricolage Grotesque (OFL)
|
|
276
289
|
│ └── templates/ # Starter scaffold templates
|
|
277
290
|
│ ├── designs.json # Starter manifest
|
|
278
291
|
│ └── artboards/ # Sample mobile, desktop, & component screens
|
|
279
292
|
├── skills/
|
|
280
293
|
│ └── htmlboard/ # Agent skill (SKILL.md) copied by `htmlboard skills install`
|
|
294
|
+
├── brand/ # The logo's files (from design/tools/logo.py)
|
|
295
|
+
├── design/ # htmlboard's own designs, on its own canvas: `npx htmlboard design --root .`
|
|
281
296
|
├── package.json
|
|
282
297
|
├── README.md
|
|
283
298
|
└── LICENSE
|
|
@@ -288,3 +303,5 @@ htmlboard/
|
|
|
288
303
|
## 📄 License
|
|
289
304
|
|
|
290
305
|
MIT © Luiz Carlos & Contributors
|
|
306
|
+
|
|
307
|
+
The explorer ships the Inter and Bricolage Grotesque fonts under the SIL Open Font License 1.1 (see `src/client/fonts/`).
|
package/bin/htmlboard.js
CHANGED
|
@@ -67,7 +67,7 @@ function parseArgs(args) {
|
|
|
67
67
|
|
|
68
68
|
function showHelp() {
|
|
69
69
|
console.log(`
|
|
70
|
-
|
|
70
|
+
htmlboard v${pkg.version}
|
|
71
71
|
Infinite canvas and design explorer for HTML artboards — designed for humans and LLMs
|
|
72
72
|
|
|
73
73
|
Usage:
|
|
@@ -82,7 +82,7 @@ Options:
|
|
|
82
82
|
shared files outside the designs folder (default: the designs folder)
|
|
83
83
|
-o, --open Open the explorer automatically in your default browser
|
|
84
84
|
--init Scaffold starter designs.json and sample artboards in target directory
|
|
85
|
-
-v, --version Display
|
|
85
|
+
-v, --version Display the version
|
|
86
86
|
-h, --help Display this help message
|
|
87
87
|
|
|
88
88
|
Examples:
|
|
@@ -93,15 +93,12 @@ Examples:
|
|
|
93
93
|
htmlboard --init # Initialize starter templates in current folder
|
|
94
94
|
htmlboard skills install # Add the HtmlBoard skill to this project's agents
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Ctrl/Cmd +
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
/ or Cmd+K Search artboards
|
|
103
|
-
[ or ] Toggle navigation sidebar
|
|
104
|
-
? Show shortcuts help dialog
|
|
96
|
+
On the canvas:
|
|
97
|
+
Drag, scroll Move around
|
|
98
|
+
Ctrl/Cmd + scroll Zoom (or pinch)
|
|
99
|
+
Double-click Fit a design (Shift + 1 fits everything)
|
|
100
|
+
/ Search
|
|
101
|
+
? All the shortcuts
|
|
105
102
|
`);
|
|
106
103
|
}
|
|
107
104
|
|
|
@@ -275,8 +272,8 @@ async function main() {
|
|
|
275
272
|
});
|
|
276
273
|
|
|
277
274
|
console.log(`
|
|
278
|
-
|
|
279
|
-
\x1b[90mInfinite
|
|
275
|
+
\x1b[90mhtml\x1b[0m\x1b[1mboard\x1b[0m \x1b[90mv${pkg.version}\x1b[0m
|
|
276
|
+
\x1b[90mInfinite canvas for HTML designs\x1b[0m
|
|
280
277
|
|
|
281
278
|
\x1b[32m➜\x1b[0m \x1b[1mLocal:\x1b[0m \x1b[36m${url}\x1b[0m
|
|
282
279
|
\x1b[32m➜\x1b[0m \x1b[1mTarget:\x1b[0m \x1b[90m${targetDir}\x1b[0m${rootDir !== targetDir ? `\n \x1b[32m➜\x1b[0m \x1b[1mRoot:\x1b[0m \x1b[90m${rootDir}\x1b[0m` : ''}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "htmlboard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Infinite canvas and design explorer for HTML artboards — designed for humans and LLMs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
"url": "https://github.com/luizcarlos1405/htmlboard/issues"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
|
-
"node": ">=18
|
|
48
|
+
"node": ">=18"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -77,16 +77,16 @@ One design per file. Keep each file self-contained so it renders on its own:
|
|
|
77
77
|
- Sections are rows, top to bottom; designs run left to right.
|
|
78
78
|
- `file` is relative to the designs folder and may carry a query string, so one file can show several states.
|
|
79
79
|
- Omit `height` to let the frame grow to the page's full height (long pages, boards, docs).
|
|
80
|
-
- Optional: `description`
|
|
80
|
+
- Optional: `description` (shown in the list), `tags` and `category` (searchable), `id` (derived from `file`).
|
|
81
81
|
- `name` and `artboards` are accepted as synonyms of a section's `title` and `designs`.
|
|
82
82
|
|
|
83
83
|
When the project already has a `designs.json`, add every new file to it.
|
|
84
84
|
|
|
85
85
|
## Live reload
|
|
86
86
|
|
|
87
|
-
- Saving an artboard's HTML reloads just that frame; the user's
|
|
88
|
-
- Saving
|
|
89
|
-
- Saving
|
|
87
|
+
- Saving an artboard's HTML reloads just that frame; the user's view stays put.
|
|
88
|
+
- Saving a file artboards use (a stylesheet, a script, an image, data) reloads the artboards that loaded it.
|
|
89
|
+
- Saving `designs.json`, or adding or removing artboards, rebuilds the canvas.
|
|
90
90
|
|
|
91
91
|
## Working with the user
|
|
92
92
|
|