@bakapiano/ccsm 0.10.3 → 0.11.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.
Files changed (48) hide show
  1. package/CLAUDE.md +475 -475
  2. package/README.md +190 -190
  3. package/bin/ccsm.js +194 -194
  4. package/lib/cliSessionWatcher.js +249 -249
  5. package/lib/config.js +185 -185
  6. package/lib/folders.js +96 -96
  7. package/lib/localCliSessions.js +489 -177
  8. package/lib/persistedSessions.js +134 -134
  9. package/lib/webTerminal.js +208 -208
  10. package/lib/workspace.js +230 -255
  11. package/package.json +57 -57
  12. package/public/css/base.css +99 -99
  13. package/public/css/cards.css +183 -183
  14. package/public/css/feedback.css +303 -303
  15. package/public/css/forms.css +405 -405
  16. package/public/css/layout.css +160 -160
  17. package/public/css/modal.css +190 -183
  18. package/public/css/responsive.css +10 -10
  19. package/public/css/sidebar.css +616 -601
  20. package/public/css/terminals.css +294 -294
  21. package/public/css/tokens.css +81 -79
  22. package/public/css/wco.css +98 -98
  23. package/public/css/widgets.css +1596 -1375
  24. package/public/index.html +105 -103
  25. package/public/js/api.js +272 -260
  26. package/public/js/components/AdoptModal.js +343 -171
  27. package/public/js/components/App.js +35 -35
  28. package/public/js/components/DirectoryPicker.js +203 -203
  29. package/public/js/components/EntityFormModal.js +105 -105
  30. package/public/js/components/Modal.js +51 -51
  31. package/public/js/components/OfflineBanner.js +93 -93
  32. package/public/js/components/PageTitleBar.js +13 -13
  33. package/public/js/components/Picker.js +179 -179
  34. package/public/js/components/Popover.js +55 -55
  35. package/public/js/components/Sidebar.js +270 -270
  36. package/public/js/components/TerminalView.js +298 -298
  37. package/public/js/components/useDragSort.js +67 -67
  38. package/public/js/dialog.js +67 -67
  39. package/public/js/icons.js +177 -177
  40. package/public/js/main.js +140 -140
  41. package/public/js/pages/AboutPage.js +165 -165
  42. package/public/js/pages/ConfigurePage.js +475 -487
  43. package/public/js/pages/LaunchPage.js +369 -369
  44. package/public/js/pages/SessionsPage.js +97 -97
  45. package/public/js/state.js +231 -231
  46. package/public/manifest.webmanifest +15 -15
  47. package/scripts/install.js +137 -137
  48. package/server.js +1126 -1117
@@ -1,79 +1,81 @@
1
- /* ccsm · design tokens · v0.6 */
2
-
3
- :root {
4
- /* Surfaces — cream with neutral whites. Sidebar shares the page bg
5
- so they read as one continuous surface; separation is just the
6
- hairline border on .sidebar. */
7
- --bg: #faf9f5;
8
- --bg-elev: #ffffff;
9
- --sidebar-bg: #faf9f5;
10
- --sidebar-hover: #f0ece0;
11
- --sidebar-active: #e8e3d5;
12
-
13
- /* Neutral UI chrome — borders, footer strip, etc. These are NEVER
14
- re-derived from the accent so dividers stay calm regardless of
15
- theme choice. */
16
- --ui-border: #d8d4c6;
17
- --ui-border-soft: #e6e2d4;
18
- --ui-bg: #f0ece0;
19
-
20
- /* Borders & rules */
21
- --border: #e8e3d5;
22
- --border-soft: #ece8da;
23
- --border-strong: #d4cdb8;
24
-
25
- /* Ink */
26
- --ink: #1a1815;
27
- --ink-mid: #534e44;
28
- --ink-muted: #8a8475;
29
- --ink-faint: #b5af9d;
30
-
31
- /* Accent — Ocean blue. Calm and content-first. Users can override via
32
- the Theme accent picker in Settings; that flow rewrites these vars
33
- at runtime (state.js · applyAccentCssVars). */
34
- --accent: #2f6fa3;
35
- --accent-deep: #25577f;
36
- --accent-soft: rgba(47, 111, 163, 0.10);
37
- --accent-softer: rgba(47, 111, 163, 0.04);
38
-
39
- /* Status */
40
- --green: #4a8a4a;
41
- --yellow: #c4892b;
42
- --red: #b73f3f;
43
- --blue: #4a73a5;
44
-
45
- /* Type */
46
- --body: "Geist", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
47
- --display: "Geist", ui-sans-serif, system-ui, sans-serif;
48
- --mono: "JetBrains Mono", "Cascadia Mono", "Consolas", monospace;
49
-
50
- /* Scale */
51
- --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
52
- --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
53
- --s-12: 48px; --s-16: 64px;
54
-
55
- /* Radius — tightened in v1.0 for a more codex-like crisp feel.
56
- 999px stays in code where pills are intentional (status dots etc). */
57
- --r-sm: 3px;
58
- --r: 4px;
59
- --r-md: 5px;
60
- --r-lg: 6px;
61
-
62
- /* Shadow — soft, like print on cream */
63
- --shadow-sm: 0 1px 0 rgba(26, 24, 21, 0.04);
64
- --shadow: 0 1px 2px rgba(26, 24, 21, 0.04),
65
- 0 1px 0 rgba(26, 24, 21, 0.03);
66
- --shadow-md: 0 4px 12px -2px rgba(26, 24, 21, 0.08),
67
- 0 1px 0 rgba(26, 24, 21, 0.04);
68
- --shadow-lg: 0 18px 40px -16px rgba(26, 24, 21, 0.18),
69
- 0 4px 12px -4px rgba(26, 24, 21, 0.10);
70
-
71
- /* Subtle paper grain applied as a layered background on .app to give
72
- surfaces the texture of laid paper rather than flat color. SVG noise
73
- keeps it crisp at any zoom level. */
74
- --paper-noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10 0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
75
-
76
- /* Sidebar geometry */
77
- --sidebar-w: 232px;
78
- --sidebar-w-collapsed: 44px;
79
- }
1
+ /* ccsm · design tokens · v0.6 */
2
+
3
+ :root {
4
+ /* Surfaces — pale near-white tinted with the default Ocean accent.
5
+ These match what state.js · applyAccentCssVars computes for the
6
+ #2f6fa3 default, so the first paint (before the inline accent
7
+ script in index.html runs) never flashes the old warm-cream bg. */
8
+ --bg: #f6f8fa;
9
+ --bg-elev: #ffffff;
10
+ --sidebar-bg: #f6f8fa;
11
+ --sidebar-hover: #e2ebf3;
12
+ --sidebar-active: #d3e1ed;
13
+
14
+ /* Neutral UI chrome borders, footer strip, etc. These are NEVER
15
+ re-derived from the accent so dividers stay calm regardless of
16
+ theme choice. */
17
+ --ui-border: #d8d4c6;
18
+ --ui-border-soft: #e6e2d4;
19
+ --ui-bg: #e2ebf3;
20
+
21
+ /* Borders & rules — tinted with the default Ocean accent to match
22
+ what state.js writes at boot. */
23
+ --border: #d3e1ed;
24
+ --border-soft: #d8e4ee;
25
+ --border-strong: #c0d5e5;
26
+
27
+ /* Ink */
28
+ --ink: #1a1815;
29
+ --ink-mid: #534e44;
30
+ --ink-muted: #8a8475;
31
+ --ink-faint: #b5af9d;
32
+
33
+ /* Accent — Ocean blue. Calm and content-first. Users can override via
34
+ the Theme accent picker in Settings; that flow rewrites these vars
35
+ at runtime (state.js · applyAccentCssVars). */
36
+ --accent: #2f6fa3;
37
+ --accent-deep: #25577f;
38
+ --accent-soft: rgba(47, 111, 163, 0.10);
39
+ --accent-softer: rgba(47, 111, 163, 0.04);
40
+
41
+ /* Status */
42
+ --green: #4a8a4a;
43
+ --yellow: #c4892b;
44
+ --red: #b73f3f;
45
+ --blue: #4a73a5;
46
+
47
+ /* Type */
48
+ --body: "Geist", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
49
+ --display: "Geist", ui-sans-serif, system-ui, sans-serif;
50
+ --mono: "JetBrains Mono", "Cascadia Mono", "Consolas", monospace;
51
+
52
+ /* Scale */
53
+ --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
54
+ --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
55
+ --s-12: 48px; --s-16: 64px;
56
+
57
+ /* Radius — tightened in v1.0 for a more codex-like crisp feel.
58
+ 999px stays in code where pills are intentional (status dots etc). */
59
+ --r-sm: 3px;
60
+ --r: 4px;
61
+ --r-md: 5px;
62
+ --r-lg: 6px;
63
+
64
+ /* Shadow soft, like print on cream */
65
+ --shadow-sm: 0 1px 0 rgba(26, 24, 21, 0.04);
66
+ --shadow: 0 1px 2px rgba(26, 24, 21, 0.04),
67
+ 0 1px 0 rgba(26, 24, 21, 0.03);
68
+ --shadow-md: 0 4px 12px -2px rgba(26, 24, 21, 0.08),
69
+ 0 1px 0 rgba(26, 24, 21, 0.04);
70
+ --shadow-lg: 0 18px 40px -16px rgba(26, 24, 21, 0.18),
71
+ 0 4px 12px -4px rgba(26, 24, 21, 0.10);
72
+
73
+ /* Subtle paper grain applied as a layered background on .app to give
74
+ surfaces the texture of laid paper rather than flat color. SVG noise
75
+ keeps it crisp at any zoom level. */
76
+ --paper-noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10 0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
77
+
78
+ /* Sidebar geometry */
79
+ --sidebar-w: 232px;
80
+ --sidebar-w-collapsed: 44px;
81
+ }
@@ -1,98 +1,98 @@
1
- /* PWA / --app= window drag regions.
2
- *
3
- * `-webkit-app-region: drag` is a Chromium-only property; it has effect in
4
- * Electron, installed PWA windows, AND in `--app=` chromeless mode where
5
- * the manifest's display_override unlocks WCO-ish behaviour. In a plain
6
- * browser tab it's silently ignored. We therefore apply it *unconditionally*
7
- * (no `@media (display-mode: …)` gate) so any surface that does honour it
8
- * gets the drag handles — particularly the case where Edge `--app=` reads
9
- * our manifest, hides its own OS title bar, but still reports
10
- * display-mode: browser. Without unconditional rules, that window has
11
- * neither a native title bar to grab NOR app-region drag → undraggable.
12
- */
13
-
14
- .sidebar-brand,
15
- .sidebar-top,
16
- .page-title-bar,
17
- .page-head,
18
- .page-head-inner,
19
- .page-title,
20
- .page-subtitle {
21
- -webkit-app-region: drag;
22
- app-region: drag;
23
- }
24
-
25
- /* Any interactive element opts out of drag so click / focus / scroll
26
- still reach the page. */
27
- button, a, input, select, textarea, label,
28
- .nav-item, .util-item, .collapse-toggle,
29
- .action, .server-status,
30
- .star-btn, .rename-btn, .card-fold, .modal-close,
31
- .chip, .radio, .fab,
32
- .ph-stat, .ph-divider,
33
- .page-title-bar-actions,
34
- .session-title-action {
35
- -webkit-app-region: no-drag;
36
- app-region: no-drag;
37
- }
38
-
39
- body.is-app .sidebar-brand,
40
- body.is-app .sidebar-top,
41
- body.is-app .page-title-bar,
42
- body.is-app .page-head,
43
- body.is-app .page-head-inner,
44
- body.is-app .page-title,
45
- body.is-app .page-subtitle {
46
- user-select: none;
47
- -webkit-user-select: none;
48
- }
49
-
50
- /* In an app/PWA window, the OS title bar is hidden and only floating
51
- close/max/min controls remain in the top-right. The 40px top band of
52
- ccsm (sidebar-top + page-title-bar) IS that title bar — it's already
53
- tall enough, sits at y=0 with no extra padding, and gets a drag region
54
- so the user can grab anywhere along it to move the window. */
55
- body.is-app .sidebar { padding-top: 0; }
56
- body.is-app .main { padding-top: 0; }
57
-
58
- /* Reserve room on the right of page-title-bar so its action buttons don't
59
- slide under the floating OS controls. 150px covers Windows controls
60
- (~46px each × 3) with breathing room; macOS traffic lights are on the
61
- left so this padding is harmless there. WCO override below uses the
62
- precise env() value when available. */
63
- body.is-app .page-title-bar {
64
- padding-right: calc(var(--s-4) + 150px);
65
- }
66
-
67
- body.is-app .page-title,
68
- body.is-app .page-subtitle {
69
- display: none;
70
- }
71
- body.is-app .page-head {
72
- padding-bottom: 0;
73
- border-bottom: 0;
74
- align-items: center;
75
- min-height: 28px;
76
- }
77
-
78
- /* PWA / WCO / --app= mode: shrink the top band to 32px so its mid-line
79
- matches the OS-floated close/max/min icons (which sit in a fixed ~32px
80
- bar at y=0 and can't be moved). Outside app mode we keep the roomier
81
- 40px band — see sidebar.css / layout.css. */
82
- body.is-app .page-title-bar,
83
- body.is-app .sidebar-top {
84
- height: 32px;
85
- min-height: 32px;
86
- }
87
- body.is-app .sidebar-brand,
88
- body.is-app .sidebar-brand-button,
89
- body.is-app .collapse-toggle {
90
- height: 32px;
91
- min-height: 32px;
92
- }
93
-
94
- @media (display-mode: window-controls-overlay) {
95
- body.is-app .page-title-bar {
96
- padding-right: calc(var(--s-4) + 100vw - env(titlebar-area-width, 100vw));
97
- }
98
- }
1
+ /* PWA / --app= window drag regions.
2
+ *
3
+ * `-webkit-app-region: drag` is a Chromium-only property; it has effect in
4
+ * Electron, installed PWA windows, AND in `--app=` chromeless mode where
5
+ * the manifest's display_override unlocks WCO-ish behaviour. In a plain
6
+ * browser tab it's silently ignored. We therefore apply it *unconditionally*
7
+ * (no `@media (display-mode: …)` gate) so any surface that does honour it
8
+ * gets the drag handles — particularly the case where Edge `--app=` reads
9
+ * our manifest, hides its own OS title bar, but still reports
10
+ * display-mode: browser. Without unconditional rules, that window has
11
+ * neither a native title bar to grab NOR app-region drag → undraggable.
12
+ */
13
+
14
+ .sidebar-brand,
15
+ .sidebar-top,
16
+ .page-title-bar,
17
+ .page-head,
18
+ .page-head-inner,
19
+ .page-title,
20
+ .page-subtitle {
21
+ -webkit-app-region: drag;
22
+ app-region: drag;
23
+ }
24
+
25
+ /* Any interactive element opts out of drag so click / focus / scroll
26
+ still reach the page. */
27
+ button, a, input, select, textarea, label,
28
+ .nav-item, .util-item, .collapse-toggle,
29
+ .action, .server-status,
30
+ .star-btn, .rename-btn, .card-fold, .modal-close,
31
+ .chip, .radio, .fab,
32
+ .ph-stat, .ph-divider,
33
+ .page-title-bar-actions,
34
+ .session-title-action {
35
+ -webkit-app-region: no-drag;
36
+ app-region: no-drag;
37
+ }
38
+
39
+ body.is-app .sidebar-brand,
40
+ body.is-app .sidebar-top,
41
+ body.is-app .page-title-bar,
42
+ body.is-app .page-head,
43
+ body.is-app .page-head-inner,
44
+ body.is-app .page-title,
45
+ body.is-app .page-subtitle {
46
+ user-select: none;
47
+ -webkit-user-select: none;
48
+ }
49
+
50
+ /* In an app/PWA window, the OS title bar is hidden and only floating
51
+ close/max/min controls remain in the top-right. The 40px top band of
52
+ ccsm (sidebar-top + page-title-bar) IS that title bar — it's already
53
+ tall enough, sits at y=0 with no extra padding, and gets a drag region
54
+ so the user can grab anywhere along it to move the window. */
55
+ body.is-app .sidebar { padding-top: 0; }
56
+ body.is-app .main { padding-top: 0; }
57
+
58
+ /* Reserve room on the right of page-title-bar so its action buttons don't
59
+ slide under the floating OS controls. 150px covers Windows controls
60
+ (~46px each × 3) with breathing room; macOS traffic lights are on the
61
+ left so this padding is harmless there. WCO override below uses the
62
+ precise env() value when available. */
63
+ body.is-app .page-title-bar {
64
+ padding-right: calc(var(--s-4) + 150px);
65
+ }
66
+
67
+ body.is-app .page-title,
68
+ body.is-app .page-subtitle {
69
+ display: none;
70
+ }
71
+ body.is-app .page-head {
72
+ padding-bottom: 0;
73
+ border-bottom: 0;
74
+ align-items: center;
75
+ min-height: 28px;
76
+ }
77
+
78
+ /* PWA / WCO / --app= mode: shrink the top band to 32px so its mid-line
79
+ matches the OS-floated close/max/min icons (which sit in a fixed ~32px
80
+ bar at y=0 and can't be moved). Outside app mode we keep the roomier
81
+ 40px band — see sidebar.css / layout.css. */
82
+ body.is-app .page-title-bar,
83
+ body.is-app .sidebar-top {
84
+ height: 32px;
85
+ min-height: 32px;
86
+ }
87
+ body.is-app .sidebar-brand,
88
+ body.is-app .sidebar-brand-button,
89
+ body.is-app .collapse-toggle {
90
+ height: 32px;
91
+ min-height: 32px;
92
+ }
93
+
94
+ @media (display-mode: window-controls-overlay) {
95
+ body.is-app .page-title-bar {
96
+ padding-right: calc(var(--s-4) + 100vw - env(titlebar-area-width, 100vw));
97
+ }
98
+ }