easel-canvas 0.1.1 → 0.2.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.
Files changed (64) hide show
  1. package/README.md +103 -34
  2. package/bin/mcp.mjs +146 -40
  3. package/bin/server.mjs +67 -5
  4. package/dist/assets/index-BZFSkKqU.css +1 -0
  5. package/dist/assets/index-BwyrrnkP.js +65 -0
  6. package/dist/index.html +3 -3
  7. package/dist/viewer/viewer.css +1 -0
  8. package/dist/viewer/viewer.js +49 -0
  9. package/examples/demo/CLAUDE.md +8 -0
  10. package/examples/demo/assets/fonts/OFL-Anton.txt +93 -0
  11. package/examples/demo/assets/fonts/OFL-JetBrainsMono.txt +93 -0
  12. package/examples/demo/assets/fonts/anton-latin-400.woff2 +0 -0
  13. package/examples/demo/assets/fonts/jetbrains-mono-latin-400.woff2 +0 -0
  14. package/examples/demo/assets/ticket-qr.svg +5 -0
  15. package/examples/demo/board.json +47 -20
  16. package/examples/demo/comments.json +27 -7
  17. package/examples/demo/screens/brand.html +155 -0
  18. package/examples/demo/screens/clash.html +94 -0
  19. package/examples/demo/screens/empty-day.html +114 -0
  20. package/examples/demo/screens/film.html +98 -0
  21. package/examples/demo/screens/home-daylight.html +144 -0
  22. package/examples/demo/screens/home.html +132 -38
  23. package/examples/demo/screens/poster.html +77 -0
  24. package/examples/demo/screens/programme.html +125 -0
  25. package/examples/demo/screens/site.html +118 -0
  26. package/examples/demo/screens/square.html +71 -0
  27. package/examples/demo/screens/ticket.html +107 -0
  28. package/examples/demo/screens/timetable.html +192 -0
  29. package/examples/demo/tokens.json +54 -22
  30. package/package.json +4 -3
  31. package/server/activity.mjs +370 -0
  32. package/server/agents.mjs +20 -0
  33. package/server/args.mjs +23 -2
  34. package/server/board.mjs +4 -16
  35. package/server/boards.mjs +46 -21
  36. package/server/browser.mjs +68 -0
  37. package/server/chat.mjs +376 -56
  38. package/server/connect.mjs +94 -0
  39. package/server/copies.mjs +105 -0
  40. package/server/custom.mjs +101 -0
  41. package/server/export.mjs +627 -0
  42. package/server/forks.mjs +214 -0
  43. package/server/fsutil.mjs +8 -0
  44. package/server/history.mjs +152 -24
  45. package/server/html.mjs +11 -1
  46. package/server/index.mjs +153 -16
  47. package/server/occupancy.mjs +183 -0
  48. package/server/permissions.mjs +141 -0
  49. package/server/place.mjs +87 -0
  50. package/server/registry.mjs +110 -0
  51. package/server/routes.mjs +23 -54
  52. package/server/runs.mjs +167 -0
  53. package/server/snapshot.mjs +21 -9
  54. package/server/tokens.mjs +4 -1
  55. package/server/update.mjs +63 -0
  56. package/server/watch.mjs +12 -1
  57. package/dist/assets/index-DXUYTbPc.js +0 -55
  58. package/dist/assets/index-lfQlW-DC.css +0 -1
  59. package/examples/demo/screens/empty.html +0 -43
  60. package/examples/demo/screens/habit.html +0 -55
  61. package/examples/demo/screens/landing.html +0 -44
  62. package/examples/demo/screens/new-habit.html +0 -47
  63. package/examples/demo/screens/settings.html +0 -43
  64. package/examples/demo/screens/stats.html +0 -50
@@ -0,0 +1,192 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <meta name="board-size" content="1440x900">
7
+ <title>Desktop: timetable</title>
8
+ <style>
9
+ /* ===== Intercut base: the same block opens every board ===== */
10
+ @font-face{font-family:"Anton";src:url("../assets/fonts/anton-latin-400.woff2") format("woff2");font-display:block}
11
+ @font-face{font-family:"JetBrains Mono";src:url("../assets/fonts/jetbrains-mono-latin-400.woff2") format("woff2");font-display:block}
12
+ :root{
13
+ /* colour tokens: tokens.json, theme Night */
14
+ --field:#0A0A0A; --ink:#FFFFFF; --muted:#9C9C9C; --rule:#333333; --safelight:#FF3D14; --on-safelight:#0A0A0A; --signal:#FF3D14;
15
+ /* faces: swap them here, then retune the two numbers below */
16
+ --display:"Anton","HelveticaNeue-CondensedBlack",Impact,sans-serif;
17
+ --mono:"JetBrains Mono",Menlo,monospace;
18
+ --cap:.86; /* cap height ÷ font size: a display line box is exactly its caps */
19
+ --cap-nudge:.0065em; /* moves the caps down onto the box, so cap top = box top */
20
+ }
21
+ *{box-sizing:border-box;margin:0;padding:0}
22
+ html,body{background:var(--field);color:var(--ink)}
23
+ body{font-family:var(--mono);font-size:16px;line-height:24px;-webkit-font-smoothing:antialiased}
24
+ a{color:inherit;text-decoration:none}
25
+ /* display: Anton caps in a box exactly cap-high, so stacked lines butt and the waist sits at 50% */
26
+ .display{display:block;font-family:var(--display);font-weight:400;text-transform:uppercase;line-height:var(--cap);translate:0 var(--cap-nudge);white-space:nowrap}
27
+ /* small print: JetBrains Mono caps */
28
+ .mono{font-family:var(--mono);font-size:12px;line-height:16px;letter-spacing:.04em;text-transform:uppercase}
29
+ /* the splice: one live text node cut at the cap waist by an SVG filter (the filters sit in .defs at the end of body) */
30
+ .splice{filter:url(#splice)}
31
+ .cut-red{color:var(--safelight)} /* the wordmark under 56px: the cut becomes colour */
32
+ .slit{flood-color:var(--safelight)}
33
+ .defs{position:absolute;width:0;height:0;overflow:hidden}
34
+ /* ===== end of base ===== */
35
+ /* ===== Desktop: the day as a timetable. 240px for the cinemas, then 80px an hour from 10:00 to 01:00 ===== */
36
+ .page{width:1440px;height:900px;position:relative;overflow:clip}
37
+ .site-nav{height:72px;display:flex;align-items:center;border-bottom:1px solid var(--rule)}
38
+ .wordmark{display:flex;width:240px;padding-left:24px}
39
+ .wordmark .display{font-size:40px}
40
+ .site-nav .links{display:flex;height:72px}
41
+ .site-nav .links a{display:flex;align-items:center;padding:0 24px;color:var(--muted)}
42
+ .site-nav .links a.on{color:var(--ink);box-shadow:inset 0 -4px 0 var(--safelight)}
43
+ .site-nav .app{margin-left:auto;height:72px;display:flex;align-items:center;padding:0 24px;border-left:1px solid var(--rule)}
44
+ .day-head{height:184px;display:grid;grid-template-columns:240px 1fr;border-bottom:1px solid var(--rule)}
45
+ .day-head .summary{padding:24px 0 0 24px;color:var(--muted);display:flex;flex-direction:column;gap:8px}
46
+ .day-head .summary b{font-weight:400;color:var(--ink)}
47
+ .day-title{display:flex;align-items:flex-end;justify-content:space-between;padding:0 24px 24px 0}
48
+ .day-title .display{font-size:160px}
49
+ .days{display:grid;grid-template-columns:repeat(11,48px);height:64px;align-self:flex-end;border-left:1px solid var(--rule)}
50
+ .day-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;border-right:1px solid var(--rule);border-top:1px solid var(--rule)}
51
+ .day-cell .display{font-size:28px}
52
+ .day-cell .mono{color:var(--muted)}
53
+ .day-cell.past{color:var(--muted)}
54
+ .day-cell.today{background:var(--safelight);color:var(--on-safelight);border-color:var(--safelight)}
55
+ .day-cell.today .mono{color:var(--on-safelight)}
56
+ /* the grid: hour rules every 80px drawn behind the rows */
57
+ .grid{position:relative;height:612px}
58
+ .grid::before{content:"";position:absolute;left:240px;top:0;right:0;bottom:0;background:repeating-linear-gradient(90deg,var(--rule) 0 1px,transparent 1px 80px)}
59
+ .ruler{position:relative;height:36px;border-bottom:1px solid var(--rule)}
60
+ .ruler .mono{position:absolute;top:12px;left:calc(240px + var(--h) * 80px);padding-left:8px;color:var(--muted)}
61
+ .cinema-row{position:relative;height:96px;border-bottom:1px solid var(--rule)}
62
+ .cinema-label{position:absolute;left:0;top:0;width:240px;height:95px;display:flex;align-items:center;gap:16px;padding-left:24px;border-right:1px solid var(--rule);background:var(--field)}
63
+ .cinema-label .display{font-size:56px}
64
+ .cinema-label .mono{color:var(--muted)}
65
+ .screening{position:absolute;top:12px;height:72px;left:calc(240px + var(--at) * 80px / 60);width:calc(var(--run) * 80px / 60);display:flex;flex-direction:column;justify-content:space-between;padding:8px;border:1px solid var(--ink);background:var(--field);overflow:hidden;z-index:2}
66
+ .screening .display{font-size:20px;white-space:normal;line-height:1}
67
+ .screening .mono{color:var(--muted);white-space:nowrap}
68
+ .screening.cut{background:var(--safelight);color:var(--on-safelight);border-color:var(--safelight)}
69
+ .screening.cut .mono{color:var(--on-safelight)}
70
+ .screening.seen{background:var(--field);color:var(--muted);border-color:var(--rule)}
71
+ .screening.seen .display{text-decoration:line-through;text-decoration-thickness:2px}
72
+ .screening.seen .mono{color:var(--muted)}
73
+ .now{position:absolute;z-index:1;top:0;bottom:-32px;left:calc(240px + var(--at) * 80px / 60);width:2px}
74
+ .now::before{content:"";position:absolute;inset:0;background:var(--safelight)}
75
+ .now .mono{position:absolute;bottom:8px;left:8px;color:var(--signal);white-space:nowrap}
76
+ .legend{position:absolute;left:0;right:0;bottom:0;height:32px;display:flex;align-items:center;gap:32px;padding-left:24px;color:var(--muted);border-top:1px solid var(--rule);background:var(--field)}
77
+ .legend .key{display:inline-block;width:12px;height:12px;margin-right:8px;translate:0 1px;border:1px solid var(--ink)}
78
+ .legend .key.cut{background:var(--safelight);border-color:var(--safelight)}
79
+ </style>
80
+ </head>
81
+ <body>
82
+ <main class="page">
83
+ <nav class="site-nav mono" aria-label="Site">
84
+ <a class="wordmark" href="site.html" aria-label="Intercut"><span class="display">Inter</span><span class="display cut-red">Cut</span></a>
85
+ <span class="links">
86
+ <a class="on" href="timetable.html">Programme</a>
87
+ <a href="timetable.html">Cinemas</a>
88
+ <a href="site.html">Passes</a>
89
+ <a href="home.html">My cut</a>
90
+ </span>
91
+ <a class="app" href="home.html">Get the app</a>
92
+ </nav>
93
+
94
+ <header class="day-head">
95
+ <p class="summary mono"><span>Programme</span><span><b>30</b> screenings</span><span><b>6</b> cinemas</span><span>Your cut <b>4</b> · 6 h 35</span></p>
96
+ <div class="day-title">
97
+ <h1 class="display">Sat 06.03</h1>
98
+ <nav class="days" aria-label="Festival days">
99
+ <a class="day-cell past" href="timetable.html"><span class="display">04</span><span class="mono">Th</span></a>
100
+ <a class="day-cell past" href="timetable.html"><span class="display">05</span><span class="mono">Fr</span></a>
101
+ <a class="day-cell today" href="timetable.html"><span class="display">06</span><span class="mono">Sa</span></a>
102
+ <a class="day-cell" href="timetable.html"><span class="display">07</span><span class="mono">Su</span></a>
103
+ <a class="day-cell" href="timetable.html"><span class="display">08</span><span class="mono">Mo</span></a>
104
+ <a class="day-cell" href="timetable.html"><span class="display">09</span><span class="mono">Tu</span></a>
105
+ <a class="day-cell" href="timetable.html"><span class="display">10</span><span class="mono">We</span></a>
106
+ <a class="day-cell" href="timetable.html"><span class="display">11</span><span class="mono">Th</span></a>
107
+ <a class="day-cell" href="timetable.html"><span class="display">12</span><span class="mono">Fr</span></a>
108
+ <a class="day-cell" href="timetable.html"><span class="display">13</span><span class="mono">Sa</span></a>
109
+ <a class="day-cell" href="timetable.html"><span class="display">14</span><span class="mono">Su</span></a>
110
+ </nav>
111
+ </div>
112
+ </header>
113
+
114
+ <section class="grid" aria-label="Timetable, Saturday 6 March">
115
+ <div class="ruler">
116
+ <span class="mono" style="--h:0">10</span>
117
+ <span class="mono" style="--h:1">11</span>
118
+ <span class="mono" style="--h:2">12</span>
119
+ <span class="mono" style="--h:3">13</span>
120
+ <span class="mono" style="--h:4">14</span>
121
+ <span class="mono" style="--h:5">15</span>
122
+ <span class="mono" style="--h:6">16</span>
123
+ <span class="mono" style="--h:7">17</span>
124
+ <span class="mono" style="--h:8">18</span>
125
+ <span class="mono" style="--h:9">19</span>
126
+ <span class="mono" style="--h:10">20</span>
127
+ <span class="mono" style="--h:11">21</span>
128
+ <span class="mono" style="--h:12">22</span>
129
+ <span class="mono" style="--h:13">23</span>
130
+ <span class="mono" style="--h:14">00</span>
131
+ </div>
132
+ <div class="cinema-row">
133
+ <div class="cinema-label"><span class="display">C1</span><span class="mono">Meridian<br>412 seats</span></div>
134
+ <a class="screening" href="film.html" style="--at:90;--run:98"><span class="display">Hollow Bay</span><span class="mono">11:30 98′</span></a>
135
+ <a class="screening" href="film.html" style="--at:240;--run:121"><span class="display">Copper Hours</span><span class="mono">14:00 121′</span></a>
136
+ <a class="screening" href="film.html" style="--at:405;--run:117"><span class="display">The Long Green</span><span class="mono">16:45 117′</span></a>
137
+ <a class="screening cut" href="film.html" style="--at:570;--run:112"><span class="display">Salt Winter</span><span class="mono">19:30 112′</span></a>
138
+ <a class="screening" href="film.html" style="--at:750;--run:90"><span class="display">Second Sun</span><span class="mono">22:30 90′</span></a>
139
+ </div>
140
+ <div class="cinema-row">
141
+ <div class="cinema-label"><span class="display">C2</span><span class="mono">Arcade<br>260 seats</span></div>
142
+ <a class="screening" href="film.html" style="--at:30;--run:88"><span class="display">Kites over Brine</span><span class="mono">10:30 88′</span></a>
143
+ <a class="screening" href="film.html" style="--at:195;--run:95"><span class="display">A Room for Swans</span><span class="mono">13:15 95′</span></a>
144
+ <a class="screening" href="film.html" style="--at:360;--run:102"><span class="display">Static Summer</span><span class="mono">16:00 102′</span></a>
145
+ <a class="screening" href="film.html" style="--at:510;--run:126"><span class="display">Eleven Ferries</span><span class="mono">18:30 126′</span></a>
146
+ <a class="screening" href="film.html" style="--at:675;--run:94"><span class="display">Blue Hour Union</span><span class="mono">21:15 94′</span></a>
147
+ </div>
148
+ <div class="cinema-row">
149
+ <div class="cinema-label"><span class="display">C3</span><span class="mono">Lantern<br>180 seats</span></div>
150
+ <a class="screening" href="film.html" style="--at:105;--run:85"><span class="display">Dog Days in Velle</span><span class="mono">11:45 85′</span></a>
151
+ <a class="screening cut seen" href="film.html" style="--at:255;--run:104"><span class="display">Nobody Swims</span><span class="mono">14:15 104′</span></a>
152
+ <a class="screening" href="film.html" style="--at:420;--run:110"><span class="display">Northern Interval</span><span class="mono">17:00 110′</span></a>
153
+ <a class="screening" href="film.html" style="--at:600;--run:99"><span class="display">Lanterns Out</span><span class="mono">20:00 99′</span></a>
154
+ <a class="screening" href="film.html" style="--at:750;--run:92"><span class="display">Undertow Hotel</span><span class="mono">22:30 92′</span></a>
155
+ </div>
156
+ <div class="cinema-row">
157
+ <div class="cinema-label"><span class="display">C4</span><span class="mono">Northlight<br>220 seats</span></div>
158
+ <a class="screening" href="film.html" style="--at:0;--run:75"><span class="display">Small Hours</span><span class="mono">10:00 75′</span></a>
159
+ <a class="screening" href="film.html" style="--at:150;--run:108"><span class="display">Red Cartographer</span><span class="mono">12:30 108′</span></a>
160
+ <a class="screening" href="film.html" style="--at:330;--run:97"><span class="display">Night Bus to Ostra</span><span class="mono">15:30 97′</span></a>
161
+ <a class="screening" href="film.html" style="--at:480;--run:89"><span class="display">Low Tide Choir</span><span class="mono">18:00 89′</span></a>
162
+ <a class="screening" href="film.html" style="--at:660;--run:101"><span class="display">Mirror Weather</span><span class="mono">21:00 101′</span></a>
163
+ </div>
164
+ <div class="cinema-row">
165
+ <div class="cinema-label"><span class="display">C5</span><span class="mono">Pavilion<br>340 seats</span></div>
166
+ <a class="screening cut seen" href="film.html" style="--at:60;--run:96"><span class="display">Glass Orchard</span><span class="mono">11:00 96′</span></a>
167
+ <a class="screening" href="film.html" style="--at:225;--run:100"><span class="display">Velvet Ration</span><span class="mono">13:45 100′</span></a>
168
+ <a class="screening" href="film.html" style="--at:390;--run:113"><span class="display">Lamplighters</span><span class="mono">16:30 113′</span></a>
169
+ <a class="screening" href="film.html" style="--at:540;--run:104"><span class="display">Pale Season</span><span class="mono">19:00 104′</span></a>
170
+ <a class="screening" href="film.html" style="--at:705;--run:88"><span class="display">Wide Awake Tuesday</span><span class="mono">21:45 88′</span></a>
171
+ </div>
172
+ <div class="cinema-row">
173
+ <div class="cinema-label"><span class="display">C6</span><span class="mono">Harbour<br>150 seats</span></div>
174
+ <a class="screening" href="film.html" style="--at:120;--run:70"><span class="display">Gull Island</span><span class="mono">12:00 70′</span></a>
175
+ <a class="screening" href="film.html" style="--at:300;--run:115"><span class="display">Mother of Rivers</span><span class="mono">15:00 115′</span></a>
176
+ <a class="screening" href="film.html" style="--at:465;--run:93"><span class="display">Kiln</span><span class="mono">17:45 93′</span></a>
177
+ <a class="screening" href="film.html" style="--at:615;--run:105"><span class="display">Last Orders</span><span class="mono">20:15 105′</span></a>
178
+ <a class="screening cut" href="film.html" style="--at:765;--run:83"><span class="display">Feral Monday</span><span class="mono">22:45 83′</span></a>
179
+ </div>
180
+ <span class="now" style="--at:532"><span class="mono">Now 18:52</span></span>
181
+ </section>
182
+
183
+ <footer class="legend mono">
184
+ <span><span class="key cut"></span>Your cut</span>
185
+ <span><span class="key"></span>On the programme</span>
186
+ <span>Struck out: seen</span>
187
+ <span>Start, run in minutes</span>
188
+ </footer>
189
+ </main>
190
+
191
+ </body>
192
+ </html>
@@ -1,29 +1,61 @@
1
1
  {
2
2
  "version": 1,
3
- "active": "Light",
3
+ "active": "Night",
4
4
  "themes": {
5
- "Light": {
6
- "Ink": "#14161A",
7
- "Muted": "#6B6F76",
8
- "Subtle": "#9AA0A8",
9
- "Canvas": "#F7F6F2",
10
- "Card": "#FFFFFF",
11
- "Line": "#E6E7EB",
12
- "Border": "#D9DBE0",
13
- "Track": "#E8EAF0",
14
- "Blue": "#3E7BFA",
15
- "Blue soft": "#E3EAFE",
16
- "Blue tint": "#EEF3FF",
17
- "Mint": "#E8F7F1",
18
- "Amber": "#FFF4E5",
19
- "Rose": "#FDECEC",
20
- "Lilac": "#F3EEFF"
5
+ "Night": {
6
+ "Field": "#0A0A0A",
7
+ "Ink": "#FFFFFF",
8
+ "Muted": "#9C9C9C",
9
+ "Rule": "#333333",
10
+ "Safelight": "#FF3D14",
11
+ "On safelight": "#0A0A0A",
12
+ "Signal": "#FF3D14"
13
+ },
14
+ "Daylight": {
15
+ "Field": "#FFFFFF",
16
+ "Ink": "#0A0A0A",
17
+ "Muted": "#333333",
18
+ "Rule": "#9C9C9C",
19
+ "Safelight": "#FF3D14",
20
+ "On safelight": "#0A0A0A",
21
+ "Signal": "#0A0A0A"
21
22
  }
22
23
  },
23
- "fontSizes": [12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 30, 36, 64],
24
- "fontWeights": [400, 500, 600, 700],
25
- "radii": [8, 12, 14, 16, 20, 24, 36, 44, 999],
26
- "spacing": [0, 2, 4, 8, 12, 16, 20, 24, 28, 32, 40, 64],
27
- "fontFamily": "Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif",
24
+ "fontSizes": [
25
+ 12,
26
+ 16,
27
+ 20,
28
+ 28,
29
+ 40,
30
+ 56,
31
+ 80,
32
+ 120,
33
+ 160,
34
+ 320,
35
+ 480
36
+ ],
37
+ "fontWeights": [
38
+ 400
39
+ ],
40
+ "radii": [
41
+ 0
42
+ ],
43
+ "spacing": [
44
+ 0,
45
+ 4,
46
+ 8,
47
+ 12,
48
+ 16,
49
+ 20,
50
+ 24,
51
+ 32,
52
+ 40,
53
+ 48,
54
+ 64,
55
+ 80,
56
+ 96,
57
+ 120
58
+ ],
59
+ "fontFamily": "\"Anton\", \"HelveticaNeue-CondensedBlack\", Impact, sans-serif",
28
60
  "minTarget": 44
29
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easel-canvas",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Easel: an HTML design canvas for AI agents. Shows screens/*.html as boards and edits the source directly, with Claude Code / Codex via MCP",
5
5
  "license": "MIT",
6
6
  "author": "Hyun Park",
@@ -20,12 +20,13 @@
20
20
  "scripts": {
21
21
  "start": "node bin/server.mjs",
22
22
  "demo": "node bin/server.mjs --dir examples/demo --open",
23
- "build": "vite build app --config vite.config.mjs",
23
+ "build": "vite build app --config vite.config.mjs && vite build app --config vite.config.mjs --mode viewer",
24
24
  "prepack": "npm run build",
25
25
  "mcp": "node bin/mcp.mjs",
26
26
  "typecheck": "tsc --noEmit",
27
27
  "test": "node --test test/*.test.mjs",
28
- "test:e2e": "node --test --test-concurrency=1 test/e2e/*.e2e.mjs"
28
+ "test:e2e": "node --test --test-concurrency=1 test/e2e/*.e2e.mjs",
29
+ "design:css": "node tools/mkcss.mjs"
29
30
  },
30
31
  "engines": {
31
32
  "node": ">=20"