claude-artifact-framework 0.19.0 → 0.19.1
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 +34 -0
- package/llms.txt +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -988,6 +988,40 @@ Conflict handling is last-write-wins: if two viewers change the same key
|
|
|
988
988
|
within one poll window, whichever write reaches storage last overwrites the
|
|
989
989
|
other. There is no merge/CRDT logic.
|
|
990
990
|
|
|
991
|
+
## Design principles — composing a screen that reads
|
|
992
|
+
|
|
993
|
+
The framework owns the CSS, but whether a screen has visual hierarchy is
|
|
994
|
+
decided by choices only the SPEC can make. Every beautiful app follows
|
|
995
|
+
these; every generic-looking one breaks at least two:
|
|
996
|
+
|
|
997
|
+
1. **One dominant element per screen.** Exactly one `big: true` stat — the
|
|
998
|
+
screen's answer (the total, the score, the net). It automatically
|
|
999
|
+
becomes the highlighted feature card. Zero heroes reads flat; two
|
|
1000
|
+
heroes read as none.
|
|
1001
|
+
2. **Order blocks by importance, not by data model.** First what the user
|
|
1002
|
+
DOES most (the quick-add, the main fields), then the hero result, then
|
|
1003
|
+
breakdowns and charts, then history. Configuration, branding text, and
|
|
1004
|
+
help go LAST — or inside `collapsible: "collapsed"` — never first.
|
|
1005
|
+
3. **Icons: all siblings or none.** If one tab/section gets an `icon`,
|
|
1006
|
+
every tab/section in that same set gets one, same style (all emoji). A
|
|
1007
|
+
half-iconed set reads as an accident. Don't use emoji as bullet points
|
|
1008
|
+
inside stat labels or titles that already live in an iconed set.
|
|
1009
|
+
4. **Pick a mid-tone, saturated seed that names the domain** — warm
|
|
1010
|
+
orange/red for food, teal/blue for finance, green for health. Grays and
|
|
1011
|
+
near-blacks kill the entire accent system; neons burn it.
|
|
1012
|
+
5. **Never duplicate what the framework already renders.** No text block
|
|
1013
|
+
repeating the app's own title (the header shows it), no hand-built
|
|
1014
|
+
totals when `summary`/`output` computes them, no "empty list" messages.
|
|
1015
|
+
6. **Group; don't multiply cards.** Related inputs belong in ONE `fields`
|
|
1016
|
+
block with one title. Secondary content goes into `tabs` or a
|
|
1017
|
+
collapsible. A first screen with more than ~5 cards has no hierarchy
|
|
1018
|
+
left — and a block whose only content is one lonely button probably
|
|
1019
|
+
belongs next to the fields it acts on.
|
|
1020
|
+
7. **Say state with `when`, not with more blocks.** Hide what doesn't
|
|
1021
|
+
apply right now instead of stacking every possibility on screen.
|
|
1022
|
+
8. **Charts are support, not wallpaper.** At most two per screen; `wide:
|
|
1023
|
+
true` for time series; donuts only up to ~5 slices.
|
|
1024
|
+
|
|
991
1025
|
## Hard rules — the short list
|
|
992
1026
|
|
|
993
1027
|
The rules that decide whether a generated app works, all in one place
|
package/llms.txt
CHANGED
|
@@ -74,6 +74,21 @@ https://cdn.jsdelivr.net/npm/claude-artifact-framework/dist/index.global.js
|
|
|
74
74
|
the viewers are on a phone. The framework never clips (wide custom
|
|
75
75
|
content scrolls), but scrolling is the fallback, not the design.
|
|
76
76
|
|
|
77
|
+
## Design principles (composition choices only the spec makes)
|
|
78
|
+
|
|
79
|
+
1. ONE dominant element per screen: exactly one big:true — zero reads
|
|
80
|
+
flat, two read as none.
|
|
81
|
+
2. Order blocks by importance, not data model: primary action first, hero
|
|
82
|
+
result next, breakdowns after; config/branding/help LAST or collapsed.
|
|
83
|
+
3. Icons: all siblings or none, one style (emoji), never half a set.
|
|
84
|
+
4. Mid-tone saturated seed that names the domain; no grays/near-blacks.
|
|
85
|
+
5. Never duplicate what the framework renders (title, totals, empties).
|
|
86
|
+
6. Group, don't multiply cards: related inputs in ONE fields block;
|
|
87
|
+
secondary content into tabs/collapsible; >5 cards on one screen = no
|
|
88
|
+
hierarchy.
|
|
89
|
+
7. State via when:, not more blocks.
|
|
90
|
+
8. Charts are support: ≤2 per screen, wide for time series, donut ≤5.
|
|
91
|
+
|
|
77
92
|
## Canonical example
|
|
78
93
|
|
|
79
94
|
ArtifactKit.createApp({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-artifact-framework",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "Utilities for building apps inside Claude Artifacts: platform storage, chat tool-calling loops, and other primitives verified against the real runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.esm.js",
|