@kairotic/app 0.0.0-stage → 0.2.2
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 +9 -2
- package/index.html +1101 -0
- package/kairotic/api.cljs +362 -0
- package/kairotic/assistant.cljs +505 -0
- package/kairotic/backends/gun-backend.js +371 -0
- package/kairotic/canvas.cljs +751 -0
- package/kairotic/code.cljs +108 -0
- package/kairotic/components.cljs +838 -0
- package/kairotic/core.cljs +96 -0
- package/kairotic/corefns.cljs +473 -0
- package/kairotic/docs.mjs +2 -0
- package/kairotic/engine.cljs +482 -0
- package/kairotic/examples.mjs +96 -0
- package/kairotic/faust.cljs +225 -0
- package/kairotic/help.cljs +1036 -0
- package/kairotic/hiccup.cljs +566 -0
- package/kairotic/input.cljs +271 -0
- package/kairotic/kfile.mjs +138 -0
- package/kairotic/library.cljs +214 -0
- package/kairotic/links.cljs +41 -0
- package/kairotic/mt.cljs +1604 -0
- package/kairotic/mtboxes.cljs +276 -0
- package/kairotic/packages/analysis.mjs +64 -0
- package/kairotic/packages/controls.mjs +28 -0
- package/kairotic/packages/data.mjs +22 -0
- package/kairotic/packages/faust-units/cmaes.mjs +82 -0
- package/kairotic/packages/faust-units/graph.mjs +212 -0
- package/kairotic/packages/faust-units/listen.mjs +125 -0
- package/kairotic/packages/faust-units/notation.mjs +139 -0
- package/kairotic/packages/faust-units/parse.mjs +439 -0
- package/kairotic/packages/faust-units/recipe.mjs +195 -0
- package/kairotic/packages/faust-units/render.mjs +69 -0
- package/kairotic/packages/faust-units/units.mjs +130 -0
- package/kairotic/packages/faust-units/view.mjs +353 -0
- package/kairotic/packages/faust-units.mjs +9 -0
- package/kairotic/packages/io.mjs +58 -0
- package/kairotic/packages/net.mjs +28 -0
- package/kairotic/packages/patterns.mjs +34 -0
- package/kairotic/packages/spatial.mjs +22 -0
- package/kairotic/packages/spectral/shift.mjs +169 -0
- package/kairotic/packages/spectral.mjs +16 -0
- package/kairotic/packages/synth.mjs +28 -0
- package/kairotic/packages/theory/counterpoint.mjs +798 -0
- package/kairotic/packages/theory/mirror.mjs +221 -0
- package/kairotic/packages/theory.mjs +46 -0
- package/kairotic/patterns.cljs +538 -0
- package/kairotic/presets.cljs +227 -0
- package/kairotic/quantize.cljs +782 -0
- package/kairotic/record.cljs +169 -0
- package/kairotic/release.cljs +90 -0
- package/kairotic/ring.cljs +129 -0
- package/kairotic/ringaudio.cljs +232 -0
- package/kairotic/ringcore.mjs +270 -0
- package/kairotic/score.cljs +176 -0
- package/kairotic/shapes.cljs +283 -0
- package/kairotic/signal.cljs +327 -0
- package/kairotic/sounds.cljs +565 -0
- package/kairotic/sounds.mjs +108 -0
- package/kairotic/span.cljs +129 -0
- package/kairotic/spell.cljs +281 -0
- package/kairotic/structure.cljs +145 -0
- package/kairotic/talk.cljs +115 -0
- package/kairotic/tempo.cljs +226 -0
- package/kairotic/treecanvas.cljs +299 -0
- package/kairotic/tutorials.mjs +1283 -0
- package/kairotic/vendor/codemirror.mjs +23 -0
- package/package.json +23 -4
- package/page/00-work.cljs +862 -0
- package/page/01-commands.cljs +1219 -0
- package/page/02-patch-view.cljs +1051 -0
- package/page/03-history-view.cljs +481 -0
- package/page/04-panels.cljs +448 -0
- package/page/05-gestures.cljs +1247 -0
- package/page/06-connection.cljs +219 -0
- package/page/07-claude.cljs +430 -0
- package/page/08-sessions.cljs +423 -0
- package/page/09-learn.cljs +602 -0
- package/page/10-embed.cljs +469 -0
- package/page/11-startup.cljs +61 -0
- package/page/12-feedback.cljs +172 -0
- package/page/13-perform.cljs +325 -0
- package/page/14-editor.cljs +656 -0
- package/page/15-presets.cljs +230 -0
- package/page/16-release.cljs +242 -0
- package/page/17-sounds.cljs +147 -0
- package/page/18-lines.cljs +594 -0
- package/page/19-files.cljs +247 -0
- package/page/19-html.cljs +152 -0
- package/page/20-talk.cljs +527 -0
- package/page/21-net.cljs +110 -0
- package/page/22-learn.cljs +303 -0
- package/page/23-ids.cljs +233 -0
- package/page/24-clipboard.cljs +136 -0
- package/page/25-tidy.cljs +74 -0
- package/page/26-probes.cljs +111 -0
- package/sources.mjs +2 -0
package/index.html
ADDED
|
@@ -0,0 +1,1101 @@
|
|
|
1
|
+
<title>Kairotic</title>
|
|
2
|
+
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' role='img' aria-label='Kairotic'%3E%3Ctitle%3EKairotic%3C/title%3E%3Cstyle%3Eg{fill:none;stroke:%231b2430;stroke-linecap:round}.f,.t{fill:%231b2430}.t{stroke:none}.d{fill:%23b4472e}@media (prefers-color-scheme:dark){g{stroke:%23e3e8ee}.f,.t{fill:%23e3e8ee}.d{fill:%23e58a6f}}%3C/style%3E%3Cg%3E%3Cpath d='M24 10 C6 30 6 70 24 90' stroke-width='12'/%3E
|
|
3
|
+
%3Cpath d='M76 10 C94 30 94 70 76 90' stroke-width='12'/%3E
|
|
4
|
+
%3Cpath d='M40 22 V78' stroke-width='12'/%3E
|
|
5
|
+
%3Cpath d='M40 56 C52 56 56 34 64 28 M40 56 C52 56 57 68 65 74' stroke-width='10'/%3E
|
|
6
|
+
%3Ccircle cx='40' cy='56' r='10' class='d' stroke='none'/%3E%3C/g%3E%3C/svg%3E">
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans+Condensed:wght@500;600&family=IBM+Plex+Sans:wght@400;500&display=swap">
|
|
10
|
+
<style>
|
|
11
|
+
/* hidden must hide, even on elements whose class sets a display (claude.ai adds this rule around the page; elsewhere it is ours) */
|
|
12
|
+
[hidden] { display: none !important; }
|
|
13
|
+
/* Layout: work table. Patch (score paper) and its code projection on top, the branching history as a full-width timeline band, REPL along the foot. */
|
|
14
|
+
:root {
|
|
15
|
+
--paper: #eef1f4;
|
|
16
|
+
--sheet: #f8f9fb;
|
|
17
|
+
--grid: #d9dfe6;
|
|
18
|
+
--ink: #1b2430;
|
|
19
|
+
--ink-soft: #5a6676;
|
|
20
|
+
--rule: #c3ccd6;
|
|
21
|
+
--box: #ffffff;
|
|
22
|
+
--accent: #2f55d4;
|
|
23
|
+
--accent-soft: rgba(47, 85, 212, 0.12);
|
|
24
|
+
--kairos: #b4472e;
|
|
25
|
+
--error: #b42318;
|
|
26
|
+
--ok: #2e7d4f;
|
|
27
|
+
--f-ui: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
|
|
28
|
+
--f-head: "IBM Plex Sans Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
|
|
29
|
+
--f-code: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
|
|
30
|
+
}
|
|
31
|
+
@media (prefers-color-scheme: dark) {
|
|
32
|
+
:root:not([data-theme="light"]) {
|
|
33
|
+
--paper: #12161c; --sheet: #171c23; --grid: #232a33; --ink: #e3e8ee; --ink-soft: #95a1b0;
|
|
34
|
+
--rule: #333c48; --box: #1e252e; --accent: #7d9bff; --accent-soft: rgba(125, 155, 255, 0.16);
|
|
35
|
+
--kairos: #e58a6f; --error: #ff8a80; --ok: #7fd1a0; color-scheme: dark;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
:root[data-theme="dark"] {
|
|
39
|
+
--paper: #12161c; --sheet: #171c23; --grid: #232a33; --ink: #e3e8ee; --ink-soft: #95a1b0;
|
|
40
|
+
--rule: #333c48; --box: #1e252e; --accent: #7d9bff; --accent-soft: rgba(125, 155, 255, 0.16);
|
|
41
|
+
--kairos: #e58a6f; --error: #ff8a80; --ok: #7fd1a0; color-scheme: dark;
|
|
42
|
+
}
|
|
43
|
+
html, body { height: 100%; }
|
|
44
|
+
body { background: var(--paper); color: var(--ink); font-family: var(--f-ui); font-size: 14px; }
|
|
45
|
+
.app { box-sizing: border-box; min-height: 100%; display: grid; grid-template-rows: auto auto auto auto; gap: 12px; padding-inline: 16px; padding-block: 14px 16px; }
|
|
46
|
+
header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
|
|
47
|
+
header h1 { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: 20px; letter-spacing: 0.01em; line-height: 1; }
|
|
48
|
+
/* the logotype (brand/kairotic-logo.svg, drawn in the theme's ink and kairos) */
|
|
49
|
+
header h1 .logo { display: inline-block; height: 26px; width: auto; vertical-align: -4px; }
|
|
50
|
+
.logo g { fill: none; stroke: var(--ink); stroke-linecap: round; }
|
|
51
|
+
.logo .t, .logo .f { fill: var(--ink); } .logo .t { stroke: none; } .logo .d { fill: var(--kairos); }
|
|
52
|
+
header .sub { color: var(--ink-soft); font-size: 13px; }
|
|
53
|
+
header .status { margin-left: auto; font-family: var(--f-code); font-size: 12px; color: var(--ink-soft); }
|
|
54
|
+
header .status b { font-weight: 500; }
|
|
55
|
+
header .status b.on { color: var(--ok); }
|
|
56
|
+
header .status b.off { color: var(--kairos); }
|
|
57
|
+
.work { display: grid; grid-template-columns: minmax(0, 1.55fr) 12px minmax(0, 1fr); gap: 0; min-height: 0; }
|
|
58
|
+
/* the patch and the panel on the right have a height of their own, from the window (issue #166): what grows in
|
|
59
|
+
one (a long step of a lesson, a long list in a tab) scrolls inside it, and does not make the other taller */
|
|
60
|
+
:root { --work-h: clamp(460px, calc(100vh - 120px), 660px); }
|
|
61
|
+
.work > .pane { height: var(--work-h); }
|
|
62
|
+
.side-pane > .panel { overflow: auto; }
|
|
63
|
+
/* the panel on the right (issue #40): dragged to a width of its own, or hidden; the splitter between them */
|
|
64
|
+
.work.sized { grid-template-columns: minmax(0, 1fr) 12px var(--side-w, 420px); }
|
|
65
|
+
.work.side-off { grid-template-columns: minmax(0, 1fr) 12px; }
|
|
66
|
+
.work.side-off > .side-pane { display: none; }
|
|
67
|
+
.splitter { position: relative; cursor: col-resize; touch-action: none; display: flex; justify-content: center; }
|
|
68
|
+
.splitter::before { content: ""; position: absolute; top: 0; bottom: 0; left: 5px; width: 2px; border-radius: 1px; background: transparent; transition: background 0.15s; }
|
|
69
|
+
.splitter:hover::before, .splitter.dragging::before { background: var(--accent); }
|
|
70
|
+
.side-off .splitter { cursor: default; }
|
|
71
|
+
.side-off .splitter:hover::before { background: transparent; }
|
|
72
|
+
.side-toggle { position: relative; z-index: 1; margin-top: 8px; width: 12px; height: 40px; padding: 0; border: 1px solid var(--rule); border-radius: 4px; background: var(--sheet); color: var(--ink-soft); font-size: 11px; line-height: 1; cursor: pointer; }
|
|
73
|
+
.side-toggle:hover { color: var(--ink); border-color: var(--accent); }
|
|
74
|
+
.side-hide { margin-left: auto; font: inherit; font-size: 13px; background: none; border: 0; color: var(--ink-soft); cursor: pointer; padding: 0 4px; }
|
|
75
|
+
.side-hide:hover { color: var(--ink); }
|
|
76
|
+
@media (max-width: 860px) {
|
|
77
|
+
.work, .work.sized, .work.side-off { grid-template-columns: minmax(0, 1fr); }
|
|
78
|
+
.splitter { cursor: default; height: 12px; align-items: center; }
|
|
79
|
+
.splitter::before { display: none; }
|
|
80
|
+
.side-toggle { margin-top: 0; width: 48px; height: 12px; }
|
|
81
|
+
}
|
|
82
|
+
.pane { background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
|
|
83
|
+
.pane-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--rule); font-size: 12px; color: var(--ink-soft); }
|
|
84
|
+
.pane-head .label { font-family: var(--f-head); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
|
|
85
|
+
.pane-head .hint { margin-left: auto; text-align: right; }
|
|
86
|
+
.canvas-wrap { position: relative; overflow: auto; flex: 1 1 0; min-height: 180px; }
|
|
87
|
+
#canvas { display: block; width: 900px; height: 680px; max-width: none; touch-action: none; user-select: none; -webkit-user-select: none; }
|
|
88
|
+
#canvas .bg { fill: url(#grid); }
|
|
89
|
+
#canvas .box rect.body { fill: var(--box); stroke: var(--ink); stroke-width: 1; }
|
|
90
|
+
#canvas .box.kairos rect.body { stroke: var(--kairos); stroke-width: 1.25; }
|
|
91
|
+
#canvas .box.sub rect.body { stroke: var(--accent); stroke-width: 2; }
|
|
92
|
+
/* patch @name: a line used as a sub-patch (#117) — following it, pinned, or with something wrong */
|
|
93
|
+
#canvas .box.ref rect.body { stroke-dasharray: 6 3; }
|
|
94
|
+
#canvas .box.ref.pinned rect.body { stroke: var(--kairos); }
|
|
95
|
+
#canvas .box.ref.warn rect.body { stroke: var(--error); }
|
|
96
|
+
#canvas .box .ref-badge { fill: var(--accent); font-family: var(--f-code); font-size: 11px; }
|
|
97
|
+
#canvas .box.ref.pinned .ref-badge { fill: var(--kairos); }
|
|
98
|
+
#canvas .box.ref.warn .ref-badge { fill: var(--error); }
|
|
99
|
+
#canvas .box.presented rect.body { stroke-dasharray: 5 3; }
|
|
100
|
+
#canvas .box.panel rect.head { fill: var(--accent-soft); stroke: none; }
|
|
101
|
+
#canvas .pres-area { fill: transparent; cursor: pointer; }
|
|
102
|
+
#canvas .resize-corner { fill: var(--rule); cursor: nwse-resize; opacity: 0.6; }
|
|
103
|
+
#canvas .box:hover .resize-corner { fill: var(--accent); opacity: 1; }
|
|
104
|
+
#canvas .chip { fill: var(--sheet); stroke: var(--rule); }
|
|
105
|
+
.pres .port, .pres .grip { display: none; }
|
|
106
|
+
.pres #canvas { background-image: none; }
|
|
107
|
+
#pres-toggle.on { background: var(--accent); color: var(--paper); }
|
|
108
|
+
/* Perform (issue #5): the take is outside the history; the patch says so */
|
|
109
|
+
#perform-toggle.on { background: var(--kairos); border-color: var(--kairos); color: var(--paper); }
|
|
110
|
+
#perform-toggle.on::before { content: "● "; }
|
|
111
|
+
.perform-info { font-family: var(--f-code); font-size: 12px; color: var(--kairos); }
|
|
112
|
+
body.performing .canvas-wrap { box-shadow: inset 0 0 0 2px var(--kairos); }
|
|
113
|
+
body.performing #canvas .bg { opacity: 0.6; }
|
|
114
|
+
.perform-pop, .jam-invite { position: fixed; z-index: 60; max-width: min(440px, calc(100vw - 32px)); box-sizing: border-box; padding: 12px 14px;
|
|
115
|
+
background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); border-left: 3px solid var(--kairos); border-radius: 6px;
|
|
116
|
+
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18); font-size: 13px; }
|
|
117
|
+
.perform-pop { top: 76px; left: 50%; transform: translateX(-50%); }
|
|
118
|
+
.jam-invite { right: 16px; bottom: 16px; }
|
|
119
|
+
.perform-pop p, .jam-invite p { margin: 0 0 10px; line-height: 1.45; }
|
|
120
|
+
.pp-actions { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
121
|
+
#tree .keyframe { fill: var(--sheet); stroke-width: 2.5; cursor: pointer; }
|
|
122
|
+
#tree .keyframe.take { fill: var(--kairos); fill-opacity: 0.25; }
|
|
123
|
+
#tree .perform-at { fill: none; stroke: var(--kairos); stroke-width: 2; stroke-dasharray: 3 3; pointer-events: none; }
|
|
124
|
+
/* embedding (Study 22) */
|
|
125
|
+
body:not(.embed) .embed-only { display: none; }
|
|
126
|
+
a.act { text-decoration: none; display: inline-block; }
|
|
127
|
+
.embed-pop { margin: 8px 10px 0; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); font-size: 12px; display: grid; gap: 6px; }
|
|
128
|
+
.embed-pop .ep-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
|
|
129
|
+
.embed-pop .ep-file { display: grid; gap: 6px; padding: 2px 0 10px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); }
|
|
130
|
+
.embed-pop .ep-file .ep-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
|
|
131
|
+
.embed-pop .ep-modes { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-soft); }
|
|
132
|
+
.embed-pop .spacer { flex: 1; }
|
|
133
|
+
.embed-pop .ep-l { color: var(--ink-soft); }
|
|
134
|
+
.embed-pop .ep-row { display: flex; gap: 6px; align-items: flex-start; }
|
|
135
|
+
.embed-pop input, .embed-pop textarea { flex: 1; min-width: 0; font-family: var(--f-code); font-size: 11px; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 4px 6px; resize: vertical; }
|
|
136
|
+
.embed-pop .ep-what, .embed-pop .ep-note { margin: 0; color: var(--ink-soft); }
|
|
137
|
+
body.embed .app { height: 100vh; height: 100dvh; min-height: 0; padding: 0; gap: 0; grid-template-rows: minmax(0, 1fr); }
|
|
138
|
+
body.embed header, body.embed .manager, body.embed .pane[aria-label="Projections"], body.embed .pane[aria-label="History"],
|
|
139
|
+
body.embed .pane.repl, body.embed #side-split, body.embed .pane-head .hint, body.embed #perform-toggle, body.embed #annot-toggle, body.embed #annot-bar, body.embed #perform-info, body.embed #snap-btn, body.embed #embed-btn, body.embed #embed-pop, body.embed #lesson-back { display: none !important; }
|
|
140
|
+
body.embed .work { display: flex; min-height: 0; height: 100%; }
|
|
141
|
+
body.embed .work > .pane { height: auto; }
|
|
142
|
+
body.embed .pane { flex: 1; border: 0; border-radius: 0; }
|
|
143
|
+
body.embed .pane-head { padding: 5px 8px; }
|
|
144
|
+
body.embed .embed-only { display: inline-block; }
|
|
145
|
+
body.embed .canvas-wrap { min-height: 0; max-height: none; overflow: hidden; }
|
|
146
|
+
body.embed #canvas .bg { display: none; }
|
|
147
|
+
body.embed .lesson-note { max-height: 30vh; overflow: auto; }
|
|
148
|
+
/* only the presentation: the controls float in a corner, over the patch */
|
|
149
|
+
body.present .pane-head { position: absolute; z-index: 5; top: 6px; right: 6px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); opacity: 0.55; transition: opacity 0.2s; }
|
|
150
|
+
body.present .pane-head:hover, body.present .pane-head:focus-within { opacity: 1; }
|
|
151
|
+
body.present .pane-head .label, body.present #crumbs, body.present #transport-info, body.present #pres-toggle { display: none; }
|
|
152
|
+
body.present .pane { position: relative; }
|
|
153
|
+
body.present .lesson { display: none; }
|
|
154
|
+
.trust-bar { margin: 6px 10px 0; padding: 6px 10px; border: 1px solid var(--kairos); border-radius: 6px; font-size: 12px; color: var(--ink); }
|
|
155
|
+
body.present .trust-bar { position: absolute; z-index: 5; left: 6px; top: 6px; margin: 0; background: var(--sheet); max-width: 60%; }
|
|
156
|
+
/* the lines of the work (#117): independent histories, a tab each, above the patch */
|
|
157
|
+
.line-tabs { display: flex; align-items: flex-end; gap: 2px; padding: 4px 10px 0; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: thin; font-size: 12px; }
|
|
158
|
+
.ltab { flex: none; display: inline-flex; align-items: baseline; gap: 5px; font: 500 12.5px var(--f-code); color: var(--ink-soft); background: none; border: 1px solid transparent; border-bottom: none; border-radius: 5px 5px 0 0; padding: 4px 10px 5px; margin-bottom: -1px; cursor: pointer; }
|
|
159
|
+
.ltab:hover { color: var(--ink); background: var(--sheet); }
|
|
160
|
+
.ltab[aria-selected="true"] { color: var(--ink); background: var(--box); border-color: var(--rule); border-bottom: 1px solid var(--box); }
|
|
161
|
+
.ltab .star { color: var(--kairos); font-size: 10.5px; }
|
|
162
|
+
.ltab .plays { color: var(--accent); font-size: 10px; }
|
|
163
|
+
.ltab .who { font: 11px var(--f-ui); color: var(--ink-soft); }
|
|
164
|
+
.ltab .x { font: 13px var(--f-ui); color: var(--ink-soft); padding: 0 0 0 2px; border-radius: 3px; }
|
|
165
|
+
.ltab .x:hover { color: var(--error); }
|
|
166
|
+
.line-tabs .ladd { flex: none; border: 0; background: none; color: var(--accent); font: 600 15px var(--f-ui); padding: 2px 9px 5px; cursor: pointer; }
|
|
167
|
+
.line-tabs input { flex: none; width: 10em; font: 12px var(--f-code); padding: 2px 6px; margin: 0 4px 4px; border: 1px solid var(--accent); border-radius: 4px; background: var(--box); color: var(--ink); }
|
|
168
|
+
.line-tabs select { flex: none; margin: 0 0 4px 8px; font: 12px var(--f-ui); padding: 2px 4px; color: var(--ink-soft); background: var(--box); border: 1px solid var(--rule); border-radius: 4px; }
|
|
169
|
+
body.embed .line-tabs, body.present .line-tabs { display: none !important; }
|
|
170
|
+
.crumbs { font-family: var(--f-code); font-size: 12px; color: var(--ink-soft); }
|
|
171
|
+
.crumbs button { font: inherit; color: var(--accent); background: none; border: 0; padding: 0 2px; cursor: pointer; }
|
|
172
|
+
.crumbs button:hover { text-decoration: underline; }
|
|
173
|
+
.crumbs .here { color: var(--ink); }
|
|
174
|
+
/* boxes are always opaque, so the wires never show through them (the tint mixed with the box colour) */
|
|
175
|
+
#canvas .box.sel rect.body { stroke: var(--accent); stroke-width: 2; fill: color-mix(in srgb, var(--accent) 12%, var(--box)); }
|
|
176
|
+
#canvas .box.hit rect.body { stroke: var(--accent); stroke-width: 1.5; }
|
|
177
|
+
#canvas .marquee { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; stroke-dasharray: 4 3; pointer-events: none; }
|
|
178
|
+
#canvas .box.drop rect.body { stroke: var(--accent); stroke-dasharray: 3 3; }
|
|
179
|
+
#canvas .box > text, #canvas .box text.lbl { font-family: var(--f-code); font-size: 12.5px; fill: var(--ink); pointer-events: none; }
|
|
180
|
+
#canvas .box text.lbl.info { font-size: 11px; fill: var(--ink-soft); }
|
|
181
|
+
#canvas .box .hchip { cursor: pointer; }
|
|
182
|
+
#canvas .box .hchip rect { fill: var(--box); stroke: var(--rule); stroke-width: 1; }
|
|
183
|
+
#canvas .box .hchip text { font-family: var(--f-code); font-size: 10.5px; fill: var(--accent); pointer-events: none; }
|
|
184
|
+
#canvas .box .hchip:hover rect { fill: var(--accent-soft); stroke: var(--accent); }
|
|
185
|
+
#canvas .mus rect.head { fill: var(--accent-soft); stroke: none; }
|
|
186
|
+
#canvas .mus-body { cursor: crosshair; }
|
|
187
|
+
#canvas .rbg { fill: var(--sheet); }
|
|
188
|
+
#canvas .rrow.blk { fill: var(--ink); fill-opacity: 0.06; }
|
|
189
|
+
#canvas .rbeat { stroke: var(--grid); stroke-width: 1; }
|
|
190
|
+
#canvas .rbar { stroke: var(--rule); stroke-width: 1.25; }
|
|
191
|
+
#canvas .box text.rlabel { font-family: var(--f-code); font-size: 9px; fill: var(--ink-soft); pointer-events: none; }
|
|
192
|
+
#canvas .rnota { fill: var(--accent); fill-opacity: 0.85; stroke: var(--accent); stroke-width: 1; cursor: grab; }
|
|
193
|
+
#canvas .rnota.sel { fill: var(--kairos); stroke: var(--ink); stroke-width: 1.25; }
|
|
194
|
+
#canvas .paper { fill: #fbfaf6; stroke: var(--rule); }
|
|
195
|
+
#canvas .score-slot { color: #1b2430; fill: #1b2430; }
|
|
196
|
+
#canvas .score-slot g.note, #canvas .score-slot g.rest { cursor: pointer; }
|
|
197
|
+
#canvas .score-slot g.note.sel, #canvas .score-slot g.note.sel * { fill: #c2410c; stroke: #c2410c; color: #c2410c; }
|
|
198
|
+
#canvas .box text.wait { font-family: var(--f-ui); font-size: 12px; fill: #5a6676; }
|
|
199
|
+
#canvas .cur { stroke: var(--kairos); stroke-width: 2; pointer-events: none; }
|
|
200
|
+
#canvas .cur2 { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 3; pointer-events: none; }
|
|
201
|
+
#canvas .sounding { fill: var(--kairos); stroke: var(--sheet); stroke-width: 1.5; pointer-events: none; }
|
|
202
|
+
#canvas .lbg { fill: var(--sheet); cursor: crosshair; }
|
|
203
|
+
#canvas .lgx0, #canvas .lgy0 { stroke: var(--grid); stroke-width: 1; }
|
|
204
|
+
#canvas .lgx1, #canvas .lgy1 { stroke: var(--rule); stroke-width: 1.25; }
|
|
205
|
+
#canvas .lgx2 { stroke: var(--ink-soft); stroke-width: 1.25; stroke-opacity: 0.7; }
|
|
206
|
+
#canvas .stroke { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
|
|
207
|
+
#canvas .stroke.sel { stroke: var(--kairos); stroke-width: 3.5; }
|
|
208
|
+
#canvas .stroke.new { stroke: var(--kairos); stroke-dasharray: 5 3; }
|
|
209
|
+
#canvas .stroke-hit { fill: none; stroke: transparent; stroke-width: 11; stroke-linecap: round; cursor: grab; }
|
|
210
|
+
#canvas .box.act .grip { fill: var(--ink); fill-opacity: 0.18; cursor: grab; }
|
|
211
|
+
#canvas .box.act { cursor: pointer; }
|
|
212
|
+
/* one pointer for everything that is played (no resize arrows on views made of parts) */
|
|
213
|
+
#canvas .box.act.number { cursor: pointer; }
|
|
214
|
+
#canvas .box.act.ctl, #canvas .ctl-area { cursor: pointer; }
|
|
215
|
+
/* the part of a component's view under (or near) the pointer */
|
|
216
|
+
#canvas .hit-hover .shape { stroke: var(--accent) !important; stroke-width: 2.5px; fill: var(--accent) !important; fill-opacity: 0.28; }
|
|
217
|
+
#canvas .hit-hover text.shape { fill-opacity: 1; stroke-width: 0.6px; }
|
|
218
|
+
#canvas .ctl-area { fill: transparent; }
|
|
219
|
+
#canvas .shapes, #canvas .shapes * { pointer-events: none; }
|
|
220
|
+
/* layers (Study 26): marks and projections, over or under the boxes; they do not take the pointer */
|
|
221
|
+
#layers-under, #layers-over, #layers-under *, #layers-over * { pointer-events: none; }
|
|
222
|
+
#canvas .amark { fill: none; stroke: var(--kairos); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
223
|
+
#canvas .amark.new { stroke: var(--accent); stroke-dasharray: 4 3; }
|
|
224
|
+
#canvas .ahead { fill: var(--kairos); stroke: none; }
|
|
225
|
+
#canvas .atext { fill: var(--kairos); font: italic 15px var(--f-ui); }
|
|
226
|
+
#canvas .proj { opacity: 0.9; }
|
|
227
|
+
.annot-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; border-bottom: 1px solid var(--rule); background: var(--box); font-size: 12px; }
|
|
228
|
+
.annot-bar .spacer { flex: 1; }
|
|
229
|
+
.annot-tools { display: inline-flex; gap: 4px; }
|
|
230
|
+
.annot-tools .act[aria-pressed="true"] { border-color: var(--kairos); color: var(--kairos); }
|
|
231
|
+
.annot-bar input:not([type]) { font: inherit; padding: 3px 6px; border: 1px solid var(--rule); border-radius: 4px; background: var(--sheet); color: var(--ink); min-width: 0; }
|
|
232
|
+
#annot-text { flex: 1 1 160px; } #annot-layer { width: 8em; }
|
|
233
|
+
.annot-l { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-soft); }
|
|
234
|
+
body.annotating #canvas { cursor: crosshair; }
|
|
235
|
+
body.annotating.annot-move #canvas { cursor: move; }
|
|
236
|
+
#annot-toggle.on, #learn-toggle.on { border-color: var(--kairos); color: var(--kairos); }
|
|
237
|
+
.learn-scope { display: grid; gap: 4px; margin: 0 0 10px; font-size: 13px; }
|
|
238
|
+
.learn-scope label { display: flex; gap: 6px; align-items: baseline; }
|
|
239
|
+
.learn-mine { font: 12px var(--f-code); color: var(--ink-soft); }
|
|
240
|
+
#canvas .shape { fill: none; stroke: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; font-family: var(--f-code); }
|
|
241
|
+
#canvas .shape.s-ink { stroke: var(--ink); } #canvas .shape.f-ink { fill: var(--ink); }
|
|
242
|
+
#canvas .shape.s-soft { stroke: var(--ink-soft); } #canvas .shape.f-soft { fill: var(--ink-soft); }
|
|
243
|
+
#canvas .shape.s-accent { stroke: var(--accent); } #canvas .shape.f-accent { fill: var(--accent); }
|
|
244
|
+
#canvas .shape.s-kairos { stroke: var(--kairos); } #canvas .shape.f-kairos { fill: var(--kairos); }
|
|
245
|
+
#canvas .shape.s-bg { stroke: var(--sheet); } #canvas .shape.f-bg { fill: var(--sheet); }
|
|
246
|
+
#canvas .shape.s-grid { stroke: var(--grid); } #canvas .shape.f-grid { fill: var(--grid); }
|
|
247
|
+
#canvas .box.act.msg rect.body { fill: color-mix(in srgb, var(--accent) 12%, var(--box)); }
|
|
248
|
+
#canvas .box .bangc { fill: none; stroke: var(--ink); stroke-width: 1.5; pointer-events: none; }
|
|
249
|
+
#canvas .flash { fill: var(--kairos); fill-opacity: 0.35; pointer-events: none; }
|
|
250
|
+
#canvas text.value { font-family: var(--f-code); font-size: 12.5px; fill: var(--ink); pointer-events: none; }
|
|
251
|
+
#canvas .wire.buffer { stroke-dasharray: 6 3; stroke: var(--kairos); }
|
|
252
|
+
#canvas .code-area { fill: var(--sheet); cursor: pointer; }
|
|
253
|
+
#canvas .box text.code { font-family: var(--f-code); font-size: 11px; fill: var(--ink); white-space: pre; pointer-events: none; }
|
|
254
|
+
#canvas .box text.lbl.st-ok { font-size: 11px; fill: var(--ok); }
|
|
255
|
+
#canvas .box text.lbl.st-err { font-size: 11px; fill: var(--error); pointer-events: auto; }
|
|
256
|
+
#canvas .box text.lbl.st-wait { font-size: 11px; fill: var(--ink-soft); }
|
|
257
|
+
#canvas .box text.lbl.pname { font-size: 11px; fill: var(--ink-soft); }
|
|
258
|
+
#canvas .param { fill: var(--grid); stroke: var(--rule); cursor: ew-resize; }
|
|
259
|
+
#canvas .param.button { cursor: pointer; }
|
|
260
|
+
#canvas .pfill { fill: var(--accent); fill-opacity: 0.55; pointer-events: none; }
|
|
261
|
+
#canvas text.pval { font-family: var(--f-code); font-size: 11px; fill: var(--ink); pointer-events: none; }
|
|
262
|
+
#canvas .pval-hit { fill: transparent; cursor: text; }
|
|
263
|
+
#canvas .box.code rect.head { fill: rgba(46, 125, 79, 0.14); }
|
|
264
|
+
.comp-list { padding: 4px 12px 14px; overflow: auto; max-height: 520px; font-size: 13px; }
|
|
265
|
+
.comp-list h4 { margin: 14px 0 6px; font-family: var(--f-head); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
|
|
266
|
+
.comp-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
|
|
267
|
+
.comp-list li { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 5px; background: var(--box); }
|
|
268
|
+
.comp-list li span { flex: 1; min-width: 0; color: var(--ink-soft); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
269
|
+
.comp-list code { font-family: var(--f-code); font-size: 12px; color: var(--ink); }
|
|
270
|
+
.comp-list .empty { color: var(--ink-soft); margin: 0; }
|
|
271
|
+
.comp-list .core-defs { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; }
|
|
272
|
+
.comp-list form { display: flex; gap: 6px; }
|
|
273
|
+
.comp-list .core-defs code.help-link { cursor: pointer; text-decoration: underline dotted; }
|
|
274
|
+
.comp-list li.def { cursor: pointer; }
|
|
275
|
+
.comp-list li.def small { color: var(--ink-soft); font-size: 11px; margin-left: 4px; }
|
|
276
|
+
.comp-list li.def.chosen { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
|
|
277
|
+
.comp-list li.def.err span { color: var(--error); }
|
|
278
|
+
.comp-list .comp-new { margin: 8px 0 0; display: flex; align-items: center; gap: 8px; }
|
|
279
|
+
.comp-list .comp-new small { color: var(--ink-soft); }
|
|
280
|
+
/* Help tab (Study 18) */
|
|
281
|
+
.help-view { padding: 6px 14px 16px; overflow: auto; max-height: 560px; font-size: 13px; line-height: 1.5; }
|
|
282
|
+
.help-view h3 { margin: 6px 0 2px; font-family: var(--f-code); font-size: 16px; }
|
|
283
|
+
.help-view h4 { margin: 14px 0 6px; font-family: var(--f-head); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
|
|
284
|
+
.help-view .usage { font-family: var(--f-code); font-size: 12px; color: var(--ink-soft); }
|
|
285
|
+
.help-view .pkg { font-size: 11px; color: var(--accent); margin-left: 6px; }
|
|
286
|
+
.help-view ol, .help-view ul.msgs { margin: 0; padding-left: 20px; }
|
|
287
|
+
.help-view ol li::marker { font-family: var(--f-code); color: var(--ink-soft); }
|
|
288
|
+
.help-view table { border-collapse: collapse; font-size: 12px; }
|
|
289
|
+
.help-view td { padding: 2px 10px 2px 0; vertical-align: top; }
|
|
290
|
+
.help-view td:first-child { font-family: var(--f-code); }
|
|
291
|
+
.help-view .doc { max-width: 760px; }
|
|
292
|
+
.help-view .about { max-width: 760px; }
|
|
293
|
+
.help-view .about p { margin: 0 0 8px; }
|
|
294
|
+
.help-view details.all-doc { max-width: 760px; margin: 4px 0 8px; color: var(--ink-soft); }
|
|
295
|
+
.help-view details.all-doc summary { cursor: pointer; font-size: 12px; }
|
|
296
|
+
.help-view td:nth-child(3) { color: var(--ink-soft); }
|
|
297
|
+
.help-view .doc .dh { font-family: var(--f-head); font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: 0; margin: 16px 0 6px; }
|
|
298
|
+
.help-view .doc h2.dh { font-size: 20px; } .help-view .doc h3.dh { font-size: 16px; } .help-view .doc h4.dh { font-size: 14px; } .help-view .doc h5.dh, .help-view .doc h6.dh { font-size: 13px; }
|
|
299
|
+
.help-view .doc pre { font: 12px/1.45 var(--f-code); background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 8px 10px; overflow: auto; white-space: pre; margin: 6px 0; }
|
|
300
|
+
.help-view .doc code { font-family: var(--f-code); font-size: 12px; }
|
|
301
|
+
.help-view .doc ul, .help-view .doc ol { padding-left: 20px; margin: 6px 0; }
|
|
302
|
+
.help-view .doc li { margin: 2px 0; }
|
|
303
|
+
.help-view .doc blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--rule); color: var(--ink-soft); }
|
|
304
|
+
.help-view .doc table.dt { margin: 8px 0; } .help-view .doc table.dt th, .help-view .doc table.dt td { border-bottom: 1px solid var(--rule); padding: 3px 10px 3px 0; text-align: left; font-family: inherit; }
|
|
305
|
+
.help-view .doc a { color: var(--accent); }
|
|
306
|
+
.help-view .doc .doc-try { margin: 0 0 10px; }
|
|
307
|
+
.help-view .chips { display: flex; flex-wrap: wrap; gap: 4px 8px; }
|
|
308
|
+
.help-view .chip { font-family: var(--f-code); font-size: 12px; padding: 1px 6px; border: 1px solid var(--rule); border-radius: 4px; background: var(--box); cursor: pointer; }
|
|
309
|
+
.help-view .chip:hover, .help-view .tut:hover { border-color: var(--accent); }
|
|
310
|
+
.help-view .try { margin-top: 10px; padding: 6px 10px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
|
|
311
|
+
.help-view .tuts { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
|
|
312
|
+
.help-view .tut { display: flex; gap: 8px; align-items: baseline; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 5px; background: var(--box); cursor: pointer; }
|
|
313
|
+
.help-view .tut small { color: var(--ink-soft); }
|
|
314
|
+
.help-view .back { font-size: 12px; }
|
|
315
|
+
.help-view input.help-find { width: 100%; box-sizing: border-box; font: 12px var(--f-code); padding: 4px 8px; border: 1px solid var(--rule); border-radius: 4px; background: var(--box); color: var(--ink); }
|
|
316
|
+
/* lesson bar (Study 18): the note of the step you are at */
|
|
317
|
+
#canvas .wire.edits { stroke-dasharray: 5 4; }
|
|
318
|
+
#canvas .score-slot .tsel, #canvas .score-slot .tsel * { fill: var(--accent) !important; stroke: var(--accent); }
|
|
319
|
+
.lesson { border-bottom: 1px solid var(--rule); background: var(--accent-soft); padding: 6px 12px 8px; font-size: 13px; line-height: 1.5;
|
|
320
|
+
display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; max-height: 45%; }
|
|
321
|
+
/* a long explanation scrolls inside the strip: the patch keeps the rest of the pane */
|
|
322
|
+
.lesson-note { overflow: auto; min-height: 0; }
|
|
323
|
+
.lesson-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
|
|
324
|
+
.lesson-head .t { font-weight: 600; }
|
|
325
|
+
.lesson-head .n { font-family: var(--f-code); font-size: 12px; color: var(--ink-soft); }
|
|
326
|
+
.lesson-head .spacer { flex: 1; }
|
|
327
|
+
.lesson-head .lang button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
|
|
328
|
+
.lesson-note p { margin: 6px 0 0; }
|
|
329
|
+
.lesson-note .step-t { font-weight: 600; }
|
|
330
|
+
.lesson-note .try { margin-top: 6px; color: var(--ink-soft); }
|
|
331
|
+
.lesson-note .away { margin-top: 6px; font-style: italic; }
|
|
332
|
+
.lesson-note code, .help-view code.run { font-family: var(--f-code); font-size: 12px; background: var(--box); border: 1px solid var(--rule); border-radius: 3px; padding: 0 4px; }
|
|
333
|
+
.lesson-note code.run, .help-view code.run { cursor: pointer; }
|
|
334
|
+
.comp-list input { flex: 1; min-width: 0; font: inherit; font-family: var(--f-code); font-size: 12px; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 4px; background: var(--box); color: var(--ink); }
|
|
335
|
+
/* the code editor (issue #8): a window over the page, moved by its bar, resized by its corner */
|
|
336
|
+
.code-win { position: fixed; z-index: 40; display: flex; flex-direction: column; box-sizing: border-box; min-width: 300px; min-height: 180px;
|
|
337
|
+
max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); resize: both; overflow: hidden;
|
|
338
|
+
background: var(--box); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px;
|
|
339
|
+
box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08); }
|
|
340
|
+
.code-win:focus-within { border-color: var(--accent); }
|
|
341
|
+
.cw-bar { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; background: var(--sheet); border-bottom: 1px solid var(--rule);
|
|
342
|
+
cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
|
|
343
|
+
.cw-bar:active { cursor: grabbing; }
|
|
344
|
+
.cw-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-code); font-size: 12.5px; }
|
|
345
|
+
.cw-title b { font-weight: 600; color: var(--accent); }
|
|
346
|
+
.cw-lang { font-family: var(--f-head); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft);
|
|
347
|
+
border: 1px solid var(--rule); border-radius: 3px; padding: 0 5px; }
|
|
348
|
+
.cw-bar .cw-x { padding: 2px 9px; font-size: 15px; line-height: 1; }
|
|
349
|
+
.cw-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 12px; font-size: 12.5px;
|
|
350
|
+
background: var(--accent-soft); border-bottom: 1px solid var(--rule); }
|
|
351
|
+
.cw-confirm[hidden] { display: none; }
|
|
352
|
+
.cw-body { flex: 1; min-height: 0; overflow: hidden; }
|
|
353
|
+
.cw-body .cm-editor { height: 100%; }
|
|
354
|
+
/* a faust~: its patch (@kairotic/faust-units) on the left, its code on the right; Patch in the bar hides it */
|
|
355
|
+
.cw-body.split { display: flex; }
|
|
356
|
+
.cw-body.split .cw-patch { flex: 1.15 1 0; min-width: 0; border-right: 1px solid var(--rule); }
|
|
357
|
+
.cw-body.split .cw-text { flex: 1 1 0; min-width: 0; height: 100%; }
|
|
358
|
+
.cw-body.split.nopatch .cw-patch { display: none; }
|
|
359
|
+
.cw-bar .cw-pv { padding: 2px 9px; font-size: 12px; }
|
|
360
|
+
.cw-bar .cw-pv[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
|
|
361
|
+
.cw-pv-err { margin: 12px; font-size: 12px; color: var(--error); }
|
|
362
|
+
/* a faust~'s recipe (discussion #114, Study 35): the settings of its sliders that sound like a sound */
|
|
363
|
+
.cw-rcp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12.5px;
|
|
364
|
+
background: var(--sheet); border-bottom: 1px solid var(--rule); }
|
|
365
|
+
.cw-rcp[hidden] { display: none; }
|
|
366
|
+
.cw-rcp select { font: inherit; font-size: 12px; padding: 2px 4px; border: 1px solid var(--rule); border-radius: 4px; background: var(--box); color: var(--ink); max-width: 14em; }
|
|
367
|
+
.cw-rcp .rcp-st { flex: 1 1 12em; min-width: 0; font-family: var(--f-code); font-size: 11.5px; color: var(--ink-soft); }
|
|
368
|
+
.cw-rcp .rcp-st.err { color: var(--error); }
|
|
369
|
+
.cw-rcp .rcp-play[hidden] { display: none; }
|
|
370
|
+
@media (max-width: 700px) { .cw-body.split { flex-direction: column; } .cw-body.split .cw-patch { border-right: 0; border-bottom: 1px solid var(--rule); } }
|
|
371
|
+
.cw-plain { box-sizing: border-box; width: 100%; height: 100%; border: 0; outline: none; resize: none; padding: 8px 10px;
|
|
372
|
+
font-family: var(--f-code); font-size: 12.5px; line-height: 1.5; background: var(--box); color: var(--ink); white-space: pre; tab-size: 2; }
|
|
373
|
+
.cw-foot { padding: 4px 12px; font-family: var(--f-code); font-size: 11.5px; color: var(--ink-soft); background: var(--sheet);
|
|
374
|
+
border-top: 1px solid var(--rule); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
375
|
+
.cw-foot.err { color: var(--error); }
|
|
376
|
+
#canvas .code-area.open { fill: var(--accent-soft); stroke: var(--accent); }
|
|
377
|
+
#canvas .box text.code.lines { fill: var(--ink-soft); font-size: 10.5px; }
|
|
378
|
+
.transport { display: inline-flex; align-items: center; gap: 4px; }
|
|
379
|
+
.transport button { font-family: var(--f-code); min-width: 34px; }
|
|
380
|
+
.transport button.on { background: var(--ok); border-color: var(--ok); color: #fff; }
|
|
381
|
+
#transport-info { font-family: var(--f-code); font-size: 12px; color: var(--ink-soft); }
|
|
382
|
+
#canvas .box { cursor: grab; }
|
|
383
|
+
/* in presentation a plain drag does not move a box (⌥+drag does) */
|
|
384
|
+
#canvas-wrap.pres .box { cursor: default; }
|
|
385
|
+
#canvas-wrap.pres .box.act, #canvas-wrap.pres .box .grip { cursor: pointer; }
|
|
386
|
+
#canvas-wrap.pres .mus-body { cursor: crosshair; }
|
|
387
|
+
/* patching, as in every patcher of Kairotic (the patch of a faust~ too: packages/faust-units/assets/view.mjs):
|
|
388
|
+
curved wires; an outlet within reach lights up and the pointer is a cross; the inlet a wire would land on too */
|
|
389
|
+
#canvas .port { fill: var(--ink); transform-box: fill-box; transform-origin: center; transition: transform 0.08s ease-out, fill 0.08s; }
|
|
390
|
+
#canvas .port.out { cursor: crosshair; }
|
|
391
|
+
#canvas .box.kairos .port { fill: var(--kairos); }
|
|
392
|
+
#canvas .port.out.hot, #canvas .port.in.target { fill: var(--accent); transform: scale(1.4, 2); }
|
|
393
|
+
#canvas.near-out, #canvas.near-out *, #canvas.wiring, #canvas.wiring * { cursor: crosshair !important; }
|
|
394
|
+
#canvas .wire { fill: none; stroke: var(--ink); stroke-width: 1.5; }
|
|
395
|
+
#canvas .wire.sel { stroke: var(--accent); stroke-width: 2.5; }
|
|
396
|
+
#canvas .wire.probed { stroke: var(--accent); stroke-dasharray: 2 3; stroke-width: 2; }
|
|
397
|
+
#canvas .probe rect { fill: var(--sheet); stroke: var(--accent); stroke-width: 1; }
|
|
398
|
+
#canvas .probe text { font: 11px var(--f-code); fill: var(--ink); }
|
|
399
|
+
#canvas .probe.hot rect { fill: var(--accent); }
|
|
400
|
+
#canvas .probe.hot text { fill: var(--paper); }
|
|
401
|
+
#canvas .probe { pointer-events: none; }
|
|
402
|
+
#canvas .wire-hit { fill: none; stroke: transparent; stroke-width: 12; cursor: pointer; }
|
|
403
|
+
#canvas .wire.temp { stroke: var(--accent); stroke-dasharray: 4 4; pointer-events: none; }
|
|
404
|
+
#inspector { position: absolute; z-index: 6; width: max-content; max-width: 340px; padding: 6px 8px; background: var(--box); color: var(--ink); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.14); font: 12px var(--f-ui); }
|
|
405
|
+
#inspector .insp-head span { color: var(--ink-soft); font-family: var(--f-code); font-size: 11px; }
|
|
406
|
+
#inspector .insp-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
|
|
407
|
+
#inspector .insp-acts .act { font-size: 11.5px; padding: 2px 8px; }
|
|
408
|
+
#inspector .insp-args { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0 4px; }
|
|
409
|
+
#inspector label { font-family: var(--f-code); font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }
|
|
410
|
+
#inspector input { font-family: var(--f-code); font-size: 12px; background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); border-radius: 3px; padding: 2px 4px; }
|
|
411
|
+
#inspector input:focus { outline: none; border-color: var(--accent); }
|
|
412
|
+
#inspector .insp-text { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; }
|
|
413
|
+
.ask { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; overflow: auto; flex: 1; }
|
|
414
|
+
.ask-note { margin: 0; font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
|
|
415
|
+
.ask-what { display: flex; gap: 14px; font-size: 12px; }
|
|
416
|
+
.askbar { margin: 6px 10px 0; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 6px; font-size: 12px; display: grid; gap: 6px; background: var(--sheet); }
|
|
417
|
+
.askbar .ab-q { color: var(--ink); line-height: 1.4; }
|
|
418
|
+
.askbar .ab-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
|
|
419
|
+
.askbar input { flex: 1; min-width: 160px; font-family: var(--f-code); font-size: 11px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 4px 6px; }
|
|
420
|
+
.askbar .ab-status { color: var(--ink-soft); font-family: var(--f-code); font-size: 11px; }
|
|
421
|
+
.askbar .ab-note { margin: 0; color: var(--ink-soft); }
|
|
422
|
+
body.present .askbar { position: absolute; z-index: 6; left: 6px; top: 6px; margin: 0; max-width: min(520px, 70%); }
|
|
423
|
+
#ask-text { min-height: 92px; resize: vertical; font: 13px/1.45 var(--f-ui); color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 8px; }
|
|
424
|
+
#ask-text:focus { outline: none; border-color: var(--accent); }
|
|
425
|
+
.ask-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
|
426
|
+
.fb { display: grid; gap: 8px; padding: 10px 14px 16px; overflow: auto; max-height: 560px; }
|
|
427
|
+
.fb .fb-kind, .fb .fb-opts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; }
|
|
428
|
+
.fb .fb-opts { color: var(--ink-soft); }
|
|
429
|
+
.fb input#fb-title, .fb textarea { font: 13px var(--f-ui); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 6px 8px; }
|
|
430
|
+
.fb textarea { min-height: 130px; resize: vertical; }
|
|
431
|
+
.fb h4 { margin: 10px 0 0; font-family: var(--f-head); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
|
|
432
|
+
.fb .fb-prev summary { cursor: pointer; font-size: 12px; color: var(--ink-soft); }
|
|
433
|
+
.fb .fb-prev pre { font: 11px/1.45 var(--f-code); white-space: pre-wrap; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 6px 8px; max-height: 220px; overflow: auto; }
|
|
434
|
+
.fb .fb-list { margin: 0; padding-left: 18px; font-size: 12px; display: grid; gap: 3px; }
|
|
435
|
+
.fb .fb-list a { color: var(--ink); } .fb .fb-list .lb { font: 10.5px var(--f-code); color: var(--ink-soft); margin-left: 6px; }
|
|
436
|
+
.fb .fb-list a.fb-claude { margin-left: 8px; font: 10.5px var(--f-code); color: var(--accent); text-decoration: none; border: 1px solid var(--rule);
|
|
437
|
+
border-radius: 3px; padding: 0 5px; white-space: nowrap; }
|
|
438
|
+
.fb .fb-list a.fb-claude:hover { border-color: var(--accent); background: var(--accent-soft); }
|
|
439
|
+
.fb .soft { color: var(--ink-soft); }
|
|
440
|
+
.ask-bar select { font: 12px var(--f-ui); background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); border-radius: 3px; padding: 3px 4px; }
|
|
441
|
+
.ask-hist summary { cursor: pointer; font-size: 12px; color: var(--ink); }
|
|
442
|
+
.ask-hist-list { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
|
|
443
|
+
.ask-hist-list li { border: 1px solid var(--rule); border-radius: 5px; padding: 6px 8px; font-size: 12px; display: grid; gap: 3px; }
|
|
444
|
+
.ask-hist-list .ah-top { color: var(--ink-soft); font: 11px var(--f-code); }
|
|
445
|
+
.ask-hist-list .ah-top .made { color: var(--ok); } .ask-hist-list .ah-top .failed { color: var(--error); }
|
|
446
|
+
.ask-hist-list .ah-q { color: var(--ink); }
|
|
447
|
+
.ask-hist-list .ah-acts { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
448
|
+
.ask-log { margin: 0; padding-left: 18px; font: 11.5px/1.5 var(--f-code); color: var(--ink-soft); }
|
|
449
|
+
.ask-log li.ok { color: var(--ok); } .ask-log li.err { color: var(--error); } .ask-log li.done { color: var(--ink); font-weight: 600; }
|
|
450
|
+
.ask-key { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
|
|
451
|
+
.ask-key input { flex: 1; min-width: 180px; font: 12px var(--f-code); background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); border-radius: 3px; padding: 4px 6px; }
|
|
452
|
+
.ask-key-state { font-size: 11.5px; color: var(--ink-soft); }
|
|
453
|
+
.ask-out { margin: 0; white-space: pre-wrap; font: 12px/1.5 var(--f-code); color: var(--ink); background: var(--sheet); border: 1px solid var(--grid); border-radius: 4px; padding: 8px; max-height: 360px; overflow: auto; }
|
|
454
|
+
.ask-out:empty { display: none; }
|
|
455
|
+
.edit { position: absolute; font-family: var(--f-code); font-size: 12.5px; padding: 4px 8px; border: 2px solid var(--accent); border-radius: 3px; background: var(--box); color: var(--ink); outline: none; min-width: 140px; }
|
|
456
|
+
.edit.num { min-width: 0; width: 96px; z-index: 5; } /* a number typed into a control (issue #32) */
|
|
457
|
+
/* the field of a new box as a line of the REPL, and what it gave (issue #163) */
|
|
458
|
+
.edit.as-repl { border-color: var(--kairos); min-width: 320px; z-index: 6; }
|
|
459
|
+
.edit-out { position: absolute; z-index: 6; max-width: 520px; font-family: var(--f-code); font-size: 12px; color: var(--ink-soft);
|
|
460
|
+
background: var(--box); border: 1px solid var(--rule); border-radius: 3px; padding: 2px 8px; white-space: pre-wrap; word-break: break-word; }
|
|
461
|
+
.edit-out:empty { display: none; }
|
|
462
|
+
/* the line of the REPL on the patch as a code editor: what it gave goes right below, inside it */
|
|
463
|
+
.edit.repl-line { padding: 0 6px; display: flex; flex-direction: column; max-width: 640px; }
|
|
464
|
+
.repl-line-host { min-width: 0; max-height: 40vh; overflow: auto; }
|
|
465
|
+
.repl-line-host .cm-editor { background: transparent !important; font-size: 12.5px; }
|
|
466
|
+
.repl-line-host .cm-content { padding: 4px 0 !important; }
|
|
467
|
+
.repl-line-host .cm-line { padding: 0; }
|
|
468
|
+
.repl-line-host .cm-placeholder { color: var(--ink-soft); }
|
|
469
|
+
.repl-line .edit-out { position: static; max-width: none; border: 0; border-top: 1px solid var(--rule); border-radius: 0; margin: 0 -6px; }
|
|
470
|
+
.edit-out.err { color: var(--error); }
|
|
471
|
+
/* box ids (issue #163): on a box hovered or selected, on all of them with I; a box under the pointer while a
|
|
472
|
+
line of code waits for one is marked, and a click writes its id there */
|
|
473
|
+
#canvas .idtag { display: none; font-family: var(--f-code); font-size: 10.5px; fill: var(--accent); pointer-events: none;
|
|
474
|
+
paint-order: stroke; stroke: var(--sheet); stroke-width: 3px; stroke-linejoin: round; }
|
|
475
|
+
#canvas .box:hover .idtag, #canvas .box.sel .idtag, #canvas.show-ids .idtag { display: inline; }
|
|
476
|
+
#canvas.picking .box, #canvas.picking .box * { cursor: copy !important; }
|
|
477
|
+
#canvas.picking .box:hover > rect.body { stroke: var(--kairos); stroke-width: 2; }
|
|
478
|
+
#canvas.picking .box:hover .idtag { fill: var(--kairos); font-weight: 600; }
|
|
479
|
+
#canvas .box.picked > rect.body { stroke: var(--kairos); stroke-width: 3; }
|
|
480
|
+
.edit.num.bad { border-color: var(--error); }
|
|
481
|
+
.tabs { display: flex; gap: 2px; }
|
|
482
|
+
.tab { font: inherit; font-family: var(--f-head); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--ink-soft); padding: 2px 8px 4px; cursor: pointer; }
|
|
483
|
+
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
|
|
484
|
+
.tab:focus-visible, button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
485
|
+
.panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
|
486
|
+
#code { flex: 1; min-height: 300px; resize: none; border: 0; background: transparent; color: var(--ink); font-family: var(--f-code); font-size: 12.5px; line-height: 1.6; padding: 10px 12px; white-space: pre; overflow: auto; tab-size: 2; }
|
|
487
|
+
#code:focus { outline: none; background: var(--accent-soft); }
|
|
488
|
+
.code-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-soft); }
|
|
489
|
+
.code-bar .state.dirty { color: var(--kairos); font-weight: 500; }
|
|
490
|
+
.code-bar .spacer { flex: 1; }
|
|
491
|
+
button.act { font: inherit; font-size: 12.5px; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--rule); background: var(--box); color: var(--ink); cursor: pointer; }
|
|
492
|
+
button.act.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
|
|
493
|
+
:root[data-theme="dark"] button.act.primary { color: #0e1420; }
|
|
494
|
+
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) button.act.primary { color: #0e1420; } }
|
|
495
|
+
button.act[disabled] { opacity: 0.45; cursor: default; }
|
|
496
|
+
pre.view { margin: 0; flex: 1; min-height: 300px; overflow: auto; padding: 10px 12px; font-family: var(--f-code); font-size: 12px; line-height: 1.55; color: var(--ink); }
|
|
497
|
+
/* Calls / Data: the two ways the Code tab shows the work */
|
|
498
|
+
.code-views { display: inline-flex; }
|
|
499
|
+
.code-views button.act { border-radius: 0; font-size: 12px; padding: 3px 9px; }
|
|
500
|
+
.code-views button.act:first-child { border-radius: 4px 0 0 4px; }
|
|
501
|
+
.code-views button.act:last-child { border-radius: 0 4px 4px 0; margin-left: -1px; }
|
|
502
|
+
.code-views button.act[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 600; position: relative; }
|
|
503
|
+
|
|
504
|
+
/* history band */
|
|
505
|
+
.hist-nav { display: flex; gap: 4px; }
|
|
506
|
+
.hist-nav button { font-family: var(--f-code); min-width: 34px; }
|
|
507
|
+
.peers { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
508
|
+
.chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; padding: 2px 9px 2px 6px; border-radius: 999px; border: 1px solid var(--rule); background: var(--box); color: var(--ink); cursor: pointer; }
|
|
509
|
+
.chip .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
|
|
510
|
+
.chip.me { cursor: default; }
|
|
511
|
+
.chip.following { border-color: var(--accent); background: var(--accent-soft); }
|
|
512
|
+
.hist-wrap { overflow: auto; max-height: 230px; min-height: 96px; }
|
|
513
|
+
#tree { display: block; }
|
|
514
|
+
#tree .lane { stroke-width: 2.5; stroke-linecap: round; fill: none; }
|
|
515
|
+
#tree .fork { stroke-width: 1.25; fill: none; stroke-dasharray: 2 3; }
|
|
516
|
+
#tree .ev { cursor: pointer; }
|
|
517
|
+
#tree .ev:hover { stroke: var(--ink); stroke-width: 2; }
|
|
518
|
+
#tree .picked { stroke: var(--error); stroke-width: 3; }
|
|
519
|
+
#tree .origin { fill: var(--sheet); stroke: var(--ink-soft); stroke-width: 1.5; cursor: pointer; }
|
|
520
|
+
#tree .here { fill: none; stroke: var(--accent); stroke-width: 2.5; pointer-events: none; }
|
|
521
|
+
#tree .peer { fill: none; stroke-width: 2; pointer-events: none; }
|
|
522
|
+
#tree .merge { fill: none; stroke-width: 1.5; stroke-dasharray: 5 3; }
|
|
523
|
+
#tree .mergemark { stroke: var(--sheet); stroke-width: 1.5; }
|
|
524
|
+
.opt { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink); white-space: nowrap; }
|
|
525
|
+
.opt input[type="number"] { width: 64px; font: inherit; font-family: var(--f-code); padding: 2px 4px; border: 1px solid var(--rule); border-radius: 4px; background: var(--box); color: var(--ink); }
|
|
526
|
+
.picking #tree .ev, .picking #tree .origin { cursor: copy; }
|
|
527
|
+
#tree .axis { fill: var(--ink-soft); font-family: var(--f-code); font-size: 10.5px; }
|
|
528
|
+
#tree .tick { stroke: var(--grid); }
|
|
529
|
+
.hist-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-soft); }
|
|
530
|
+
.hist-foot .ahead { color: var(--kairos); }
|
|
531
|
+
.empty-hist { padding: 14px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--ink-soft); }
|
|
532
|
+
|
|
533
|
+
.work-bar { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
|
|
534
|
+
.work-bar b { color: var(--ink); font-weight: 600; }
|
|
535
|
+
|
|
536
|
+
/* session manager */
|
|
537
|
+
.manager { position: fixed; inset: 0; z-index: 20; background: rgba(18, 22, 28, 0.42); display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: calc(24px + env(safe-area-inset-top, 0px)) 16px 24px; }
|
|
538
|
+
.mgr-panel { box-sizing: border-box; width: 100%; max-width: 920px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); }
|
|
539
|
+
.mgr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 16px 18px 12px; border-bottom: 1px solid var(--rule); }
|
|
540
|
+
.mgr-head h2 { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: 20px; }
|
|
541
|
+
.mgr-sub { color: var(--ink-soft); font-size: 13px; flex: 1; min-width: 220px; }
|
|
542
|
+
#mgr-body { padding: 14px 18px 18px; }
|
|
543
|
+
.mgr-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
|
|
544
|
+
@media (max-width: 720px) { .mgr-cols { grid-template-columns: minmax(0, 1fr); } }
|
|
545
|
+
.mgr-col h3 { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
|
|
546
|
+
.mgr-hint { margin: 4px 0 10px; color: var(--ink-soft); font-size: 12px; }
|
|
547
|
+
.mgr-note, .mgr-empty { color: var(--ink-soft); font-size: 13px; }
|
|
548
|
+
.mgr-busy { color: var(--accent); font-size: 13px; margin: 0 0 10px; }
|
|
549
|
+
.mgr-foot { margin: 16px 0 0; }
|
|
550
|
+
.mgr-welcome { border: 1px solid var(--rule); border-radius: 6px; padding: 10px 14px; margin: 0 0 14px; background: var(--sheet); font-size: 13px; line-height: 1.5; }
|
|
551
|
+
.mgr-welcome p { margin: 6px 0; } .mgr-welcome ul { margin: 6px 0; padding-left: 18px; } .mgr-welcome li { margin: 3px 0; }
|
|
552
|
+
.mgr-welcome .wt { font-family: var(--f-head); font-size: 17px; margin-top: 2px; }
|
|
553
|
+
.mgr-welcome .alpha { font: 11px var(--f-code); color: var(--kairos); border: 1px solid var(--kairos); border-radius: 10px; padding: 1px 7px; margin-left: 6px; vertical-align: 2px; }
|
|
554
|
+
.mgr-welcome .alpha-note { color: var(--ink-soft); }
|
|
555
|
+
.mgr-welcome code { font-family: var(--f-code); font-size: 12px; }
|
|
556
|
+
.items { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
|
|
557
|
+
.item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--box); }
|
|
558
|
+
.item.current { border-color: var(--accent); }
|
|
559
|
+
.item.invited { border-color: var(--kairos); }
|
|
560
|
+
.item-main { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
|
|
561
|
+
.item-name { font-weight: 500; overflow-wrap: anywhere; }
|
|
562
|
+
.item-meta { font-size: 12px; color: var(--ink-soft); }
|
|
563
|
+
.item-meta b { color: var(--ok); font-weight: 500; }
|
|
564
|
+
.item-acts { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
565
|
+
button.act.danger { color: var(--error); }
|
|
566
|
+
button.act.danger.armed { background: var(--error); border-color: var(--error); color: #fff; }
|
|
567
|
+
.invite { padding: 10px 12px; margin-bottom: 14px; border: 1px solid var(--kairos); border-radius: 6px; background: var(--box); }
|
|
568
|
+
form.new { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
569
|
+
form.new input:not([type]) { flex: 1; min-width: 140px; font: inherit; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 4px; background: var(--box); color: var(--ink); }
|
|
570
|
+
/* the relays of Pages, in the session manager */
|
|
571
|
+
.relays { border: 1px solid var(--rule); border-radius: 6px; padding: 8px 12px; margin: 0 0 14px; background: var(--box); font-size: 13px; }
|
|
572
|
+
.relays > summary { cursor: pointer; color: var(--ink); }
|
|
573
|
+
.relays .rlabel { font-family: var(--f-head); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin-right: 4px; }
|
|
574
|
+
.relays[open] > summary { margin-bottom: 4px; }
|
|
575
|
+
.rlist { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 4px; }
|
|
576
|
+
.rlist li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
|
|
577
|
+
.rlist code, .relays .rtest code { font-family: var(--f-code); font-size: 12px; overflow-wrap: anywhere; }
|
|
578
|
+
.rdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-soft); vertical-align: 1px; }
|
|
579
|
+
.rdot.ok { background: var(--ok); } .rdot.wait { background: var(--kairos); }
|
|
580
|
+
.rstate { color: var(--ink-soft); font-size: 12px; }
|
|
581
|
+
.rtest { margin: 6px 0 0; font-size: 12px; color: var(--ink-soft); } .rtest.ok { color: var(--ok); } .rtest.fail { color: var(--error); }
|
|
582
|
+
.rchoices { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; } .rchoices:empty { display: none; }
|
|
583
|
+
.rown { margin-top: 8px; } .rown > summary { cursor: pointer; color: var(--accent); font-size: 12px; }
|
|
584
|
+
.rown p { margin: 6px 0; line-height: 1.5; max-width: 72ch; }
|
|
585
|
+
.rown pre { margin: 6px 0; padding: 6px 10px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; font: 12px var(--f-code); overflow-x: auto; }
|
|
586
|
+
button.act.small { padding: 1px 8px; font-size: 12px; }
|
|
587
|
+
|
|
588
|
+
.repl { min-height: 0; }
|
|
589
|
+
#repl-out { max-height: 150px; min-height: 80px; overflow: auto; padding: 8px 12px; font-family: var(--f-code); font-size: 12.5px; line-height: 1.55; }
|
|
590
|
+
#repl-out .in { color: var(--ink); }
|
|
591
|
+
#repl-out .in .p { color: var(--accent); margin-right: 6px; }
|
|
592
|
+
#repl-out .in.from-patch { color: var(--ink-soft); }
|
|
593
|
+
#repl-out .in.from-patch .p { color: var(--kairos); }
|
|
594
|
+
#repl-out .out { color: var(--ink-soft); padding-left: 20px; white-space: pre-wrap; word-break: break-word; }
|
|
595
|
+
#repl-out .err { color: var(--error); padding-left: 20px; white-space: pre-wrap; }
|
|
596
|
+
.repl-line { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--rule); padding: 6px 12px; }
|
|
597
|
+
.repl-line label { font-family: var(--f-code); color: var(--accent); font-weight: 600; }
|
|
598
|
+
#repl-in { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font-family: var(--f-code); font-size: 13px; padding: 6px 0; }
|
|
599
|
+
#repl-in:focus { outline: none; }
|
|
600
|
+
/* the Code tab and the REPL line, with the code editor (14-editor.cljs) */
|
|
601
|
+
.code-host, .data-host { flex: 1; min-height: 300px; max-height: 560px; display: flex; min-width: 0; }
|
|
602
|
+
.code-host[hidden], .data-host[hidden] { display: none; }
|
|
603
|
+
.data-host .cm-editor { flex: 1; min-width: 0; background: transparent !important; }
|
|
604
|
+
.data-host .cm-gutters { background: transparent !important; }
|
|
605
|
+
.code-host .cm-editor { flex: 1; min-width: 0; background: transparent !important; }
|
|
606
|
+
.code-host .cm-gutters { background: transparent !important; }
|
|
607
|
+
.repl-host { flex: 1; min-width: 0; max-height: 30vh; overflow: auto; }
|
|
608
|
+
.repl-host .cm-editor { background: transparent !important; font-size: 13px; }
|
|
609
|
+
.repl-host .cm-content { padding: 5px 0 !important; }
|
|
610
|
+
.repl-host .cm-line { padding: 0; }
|
|
611
|
+
.repl-host .cm-placeholder { color: var(--ink-soft); }
|
|
612
|
+
.help { padding: 6px 12px 10px; font-size: 12px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 4px 14px; }
|
|
613
|
+
.help code { font-family: var(--f-code); color: var(--ink); }
|
|
614
|
+
/* the Room tab: talking with the people in a shared room (#135) */
|
|
615
|
+
.tab.attn::after { content: " •"; color: var(--kairos); }
|
|
616
|
+
.talk { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; min-height: 0; flex: 1; overflow: auto; }
|
|
617
|
+
.talk-on { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; }
|
|
618
|
+
.talk-on[hidden] { display: none; }
|
|
619
|
+
.talk-head { display: flex; gap: 8px; align-items: center; }
|
|
620
|
+
.talk-head input { font: 13px var(--f-ui); color: var(--ink); background: var(--box); border: 1px solid var(--rule); border-radius: 6px; padding: 4px 6px; width: 11em; }
|
|
621
|
+
.talk-state { font: 11.5px var(--f-code); color: var(--ink-soft); }
|
|
622
|
+
.talk-state.ok { color: var(--ok); } .talk-state.bad { color: var(--error); }
|
|
623
|
+
.talk-peers { display: flex; flex-wrap: wrap; gap: 5px; font: 11.5px var(--f-code); }
|
|
624
|
+
.tpeer { border: 1px solid var(--rule); background: var(--sheet); border-radius: 3px; padding: 1px 6px; }
|
|
625
|
+
.tpeer.p2p { border-color: var(--ok); } .tpeer.talk { border-color: var(--kairos); background: var(--accent-soft); }
|
|
626
|
+
.tpeer i { font-style: normal; color: var(--ink-soft); }
|
|
627
|
+
.talk-chat { flex: 1; min-height: 160px; overflow-y: auto; background: var(--sheet); border: 1px solid var(--grid); border-radius: 4px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
|
|
628
|
+
.titem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 8px; padding: 3px 5px; border-radius: 4px; }
|
|
629
|
+
.titem.mine { background: var(--accent-soft); }
|
|
630
|
+
.twho { font: 600 12px var(--f-ui); } .twho time { font: 400 10.5px var(--f-code); color: var(--ink-soft); margin-left: 6px; }
|
|
631
|
+
.twhat { grid-column: 1; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
|
|
632
|
+
.twhat audio { display: block; height: 28px; max-width: 100%; } .twhat img { display: block; max-width: 160px; border-radius: 3px; }
|
|
633
|
+
.tside { grid-row: 1 / span 2; grid-column: 2; display: flex; flex-direction: column; gap: 3px; align-items: end; }
|
|
634
|
+
.tst { font: 10.5px var(--f-code); color: var(--ink-soft); } .tst.ok { color: var(--ok); } .tst.bad { color: var(--error); }
|
|
635
|
+
.tchip { font: 11px var(--f-code); border: 1px solid var(--accent); color: var(--accent); border-radius: 3px; padding: 0 4px; margin-right: 3px; }
|
|
636
|
+
.talk-say { display: flex; gap: 6px; }
|
|
637
|
+
.talk-say input { flex: 1; font: 13px var(--f-ui); color: var(--ink); background: var(--box); border: 1px solid var(--rule); border-radius: 6px; padding: 5px 7px; }
|
|
638
|
+
.talk-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
|
|
639
|
+
.talk-hold { border: 2px solid var(--kairos); background: var(--box); color: var(--kairos); font: 600 12.5px var(--f-ui); padding: 5px 12px; border-radius: 999px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
|
|
640
|
+
.talk-hold[aria-pressed="true"] { background: var(--kairos); color: #fff; } .talk-hold:disabled { opacity: 0.4; cursor: default; }
|
|
641
|
+
#talk-cam[aria-pressed="true"] { border-color: var(--kairos); }
|
|
642
|
+
.talk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
|
|
643
|
+
.ttile { position: relative; aspect-ratio: 4 / 3; background: #000; border-radius: 4px; overflow: hidden; }
|
|
644
|
+
.ttile[hidden] { display: none; } .ttile.talk { outline: 2px solid var(--kairos); }
|
|
645
|
+
.ttile video { width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
646
|
+
.ttile .tlabel { position: absolute; left: 5px; bottom: 4px; font: 10.5px var(--f-code); color: #fff; background: rgba(0,0,0,.55); padding: 0 4px; border-radius: 3px; }
|
|
647
|
+
.ttile button { position: absolute; right: 4px; top: 4px; }
|
|
648
|
+
#net-bpm { width: 4.5em; font: 12.5px var(--f-code); color: var(--ink); background: var(--box); border: 1px solid var(--rule); border-radius: 6px; padding: 3px 5px; }
|
|
649
|
+
.net-metro { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; }
|
|
650
|
+
.net-beat { font: 600 15px var(--f-code); min-width: 2.6em; text-align: center; color: var(--ink-soft); border-radius: 4px; padding: 0 4px; }
|
|
651
|
+
.net-beat.on { background: var(--kairos); color: #fff; }
|
|
652
|
+
.talk-asks { display: grid; gap: 6px; } .talk-asks[hidden] { display: none; }
|
|
653
|
+
.task { border: 1px solid var(--kairos); border-left-width: 3px; border-radius: 6px; padding: 6px 8px; font-size: 12.5px; display: grid; gap: 4px; }
|
|
654
|
+
</style>
|
|
655
|
+
|
|
656
|
+
<div class="app">
|
|
657
|
+
<header>
|
|
658
|
+
<h1><svg class="logo" viewBox="15.2 -86.5 627.6 104.3" role="img" aria-label="Kairotic"><g><path class="t" d="M19.2 -31.1Q19.2 -38.4 20.85 -45.15Q22.5 -51.9 25.35 -57.7Q28.2 -63.5 32 -68.15Q35.8 -72.8 40 -76H50.9Q46.4 -72.8 42.4 -68.5Q38.4 -64.2 35.4 -59Q32.4 -53.8 30.6 -47.95Q28.8 -42.1 28.8 -35.7V-26.5Q28.8 -20.1 30.6 -14.25Q32.4 -8.4 35.4 -3.2Q38.4 2 42.4 6.3Q46.4 10.6 50.9 13.8H40Q35.8 10.7 32 6Q28.2 1.3 25.35 -4.5Q22.5 -10.3 20.85 -17.05Q19.2 -23.8 19.2 -31.1Z"/><svg x="60" y="-75" width="60" height="78" viewBox="20 6 68 88"><path d="M30 12 V88" stroke-width="11"/>
|
|
659
|
+
<path d="M30 56 C48 56 54 26 67 20.7" stroke-width="9"/>
|
|
660
|
+
<path d="M30 56 C48 56 56 76 75 82" stroke-width="9"/>
|
|
661
|
+
<circle cx="76" cy="17" r="7.5" stroke-width="4.5"/>
|
|
662
|
+
<circle cx="78" cy="83" r="7.5" class="f" stroke="none"/>
|
|
663
|
+
<circle cx="30" cy="56" r="11" class="d" stroke="none"/></svg><path class="t" d="M169.2 0Q164.5 0 162.15 -2.4Q159.8 -4.8 159.3 -8.7H158.8Q157.3 -4 153.35 -1.4Q149.4 1.2 143.3 1.2Q135.4 1.2 130.7 -2.95Q126 -7.1 126 -14.4Q126 -21.9 131.55 -25.85Q137.1 -29.8 148.6 -29.8H158.5V-33.8Q158.5 -44.3 147.4 -44.3Q142.4 -44.3 139.3 -42.35Q136.2 -40.4 134.1 -37.2L127.6 -42.5Q129.8 -46.7 135 -49.75Q140.2 -52.8 148.4 -52.8Q158.2 -52.8 163.8 -48.1Q169.4 -43.4 169.4 -34.5V-8.6H175.9V0ZM146.4 -6.8Q151.7 -6.8 155.1 -9.2Q158.5 -11.6 158.5 -15.4V-22.9H148.8Q137 -22.9 137 -15.8V-13.8Q137 -10.3 139.5 -8.55Q142 -6.8 146.4 -6.8Z"/><path class="t" d="M213.2 -61Q209 -61 207.35 -62.7Q205.7 -64.4 205.7 -66.9V-69Q205.7 -71.5 207.35 -73.2Q209 -74.9 213.1 -74.9Q217.3 -74.9 218.95 -73.2Q220.6 -71.5 220.6 -69V-66.9Q220.6 -64.4 218.95 -62.7Q217.3 -61 213.2 -61ZM190.1 -8.8H207.7V-42.8H190.1V-51.6H218.6V-8.8H235.1V0H190.1Z"/><path class="t" d="M247.6 -8.8H261.3V-42.8H247.6V-51.6H272.2V-37.9H272.8Q273.5 -40.6 274.8 -43.1Q276.1 -45.6 278.1 -47.45Q280.1 -49.3 283 -50.45Q285.9 -51.6 289.8 -51.6H296V-41.2H285.8Q279.8 -41.2 276 -37.65Q272.2 -34.1 272.2 -28.1V-8.8H286.9V0H247.6Z"/><path class="t" d="M330 1.2Q324.3 1.2 319.75 -0.7Q315.2 -2.6 312.05 -6.1Q308.9 -9.6 307.2 -14.6Q305.5 -19.6 305.5 -25.8Q305.5 -32 307.2 -37Q308.9 -42 312.05 -45.5Q315.2 -49 319.75 -50.9Q324.3 -52.8 330 -52.8Q335.7 -52.8 340.25 -50.9Q344.8 -49 347.95 -45.5Q351.1 -42 352.8 -37Q354.5 -32 354.5 -25.8Q354.5 -19.6 352.8 -14.6Q351.1 -9.6 347.95 -6.1Q344.8 -2.6 340.25 -0.7Q335.7 1.2 330 1.2ZM330 -7.4Q336 -7.4 339.55 -11.05Q343.1 -14.7 343.1 -21.9V-29.7Q343.1 -36.9 339.55 -40.55Q336 -44.2 330 -44.2Q324 -44.2 320.45 -40.55Q316.9 -36.9 316.9 -29.7V-21.9Q316.9 -14.7 320.45 -11.05Q324 -7.4 330 -7.4Z"/><path class="t" d="M393.1 0Q386.3 0 383.1 -3.65Q379.9 -7.3 379.9 -13.1V-42.8H364V-51.6H375.3Q378.2 -51.6 379.4 -52.75Q380.6 -53.9 380.6 -56.9V-69.8H390.8V-51.6H412.8V-42.8H390.8V-8.8H412.8V0Z"/><path class="t" d="M453.2 -61Q449 -61 447.35 -62.7Q445.7 -64.4 445.7 -66.9V-69Q445.7 -71.5 447.35 -73.2Q449 -74.9 453.1 -74.9Q457.3 -74.9 458.95 -73.2Q460.6 -71.5 460.6 -69V-66.9Q460.6 -64.4 458.95 -62.7Q457.3 -61 453.2 -61ZM430.1 -8.8H447.7V-42.8H430.1V-51.6H458.6V-8.8H475.1V0H430.1Z"/><path class="t" d="M511.9 1.2Q506.1 1.2 501.55 -0.7Q497 -2.6 493.85 -6.1Q490.7 -9.6 489.05 -14.6Q487.4 -19.6 487.4 -25.8Q487.4 -32 489.05 -37Q490.7 -42 493.85 -45.5Q497 -49 501.55 -50.9Q506.1 -52.8 511.8 -52.8Q519.8 -52.8 524.65 -49.4Q529.5 -46 531.9 -40.6L523.4 -36Q522 -39.6 519.15 -41.7Q516.3 -43.8 511.8 -43.8Q505.6 -43.8 502.2 -40.05Q498.8 -36.3 498.8 -30.1V-21.5Q498.8 -15.4 502.2 -11.6Q505.6 -7.8 512 -7.8Q516.8 -7.8 519.85 -10Q522.9 -12.2 524.7 -16L532.7 -11.1Q530.2 -5.7 525.1 -2.25Q520 1.2 511.9 1.2Z"/><svg x="544" y="-82.5" width="50" height="90" viewBox="30 14 40 72"><path d="M34 50 H44 M44 50 C52 50 54 33 62 32 M44 50 C52 50 54 67 62 68" stroke-width="7"/>
|
|
664
|
+
<circle cx="44" cy="50" r="7.5" class="d" stroke="none"/></svg><path class="t" d="M638.8 -31.1Q638.8 -23.8 637.15 -17.05Q635.5 -10.3 632.65 -4.5Q629.8 1.3 626 6Q622.2 10.7 618 13.8H607.1Q611.6 10.6 615.6 6.3Q619.6 2 622.6 -3.2Q625.6 -8.4 627.4 -14.25Q629.2 -20.1 629.2 -26.5V-35.7Q629.2 -42.1 627.4 -47.95Q625.6 -53.8 622.6 -59Q619.6 -64.2 615.6 -68.5Q611.6 -72.8 607.1 -76H618Q622.2 -72.8 626 -68.15Q629.8 -63.5 632.65 -57.7Q635.5 -51.9 637.15 -45.15Q638.8 -38.4 638.8 -31.1Z"/></g></svg></h1>
|
|
665
|
+
<span class="sub" id="edition">0.2.0-alpha · a collaborative patcher of music where the patch and its code are one work, with its whole history · <a href="https://github.com/bonuoq/kairotic/blob/main/docs/README.md" target="_blank" rel="noopener">docs</a></span>
|
|
666
|
+
<span class="status" id="status">loading ClojureScript…</span>
|
|
667
|
+
<span class="work-bar"><span id="work-name">No work open</span><button class="act" id="open-manager">Sessions</button></span>
|
|
668
|
+
</header>
|
|
669
|
+
|
|
670
|
+
<input type="file" id="kfile-in" accept=".kairotic,application/zip" hidden>
|
|
671
|
+
<div class="manager" id="manager" role="dialog" aria-modal="true" aria-labelledby="mgr-title">
|
|
672
|
+
<div class="mgr-panel">
|
|
673
|
+
<div class="mgr-head">
|
|
674
|
+
<h2 id="mgr-title">Sessions</h2>
|
|
675
|
+
<span class="mgr-sub">Work solo or share a room. You can move from one to the other by copying the work with its history.</span>
|
|
676
|
+
<button class="act" id="mgr-close" title="Back to the open work, or start locally (Esc)">Close</button>
|
|
677
|
+
</div>
|
|
678
|
+
<div id="mgr-body"><p class="mgr-note">Loading…</p></div>
|
|
679
|
+
</div>
|
|
680
|
+
</div>
|
|
681
|
+
|
|
682
|
+
<div class="work">
|
|
683
|
+
<section class="pane" aria-label="Patch">
|
|
684
|
+
<div class="pane-head">
|
|
685
|
+
<span class="label">Patch</span>
|
|
686
|
+
<span id="crumbs" class="crumbs"></span>
|
|
687
|
+
<span class="transport">
|
|
688
|
+
<button class="act" id="play" title="Start the engine and fire the loadbang boxes (space)">▶</button>
|
|
689
|
+
<button class="act" id="stop" title="Stop the engine: silence and initial state">■</button>
|
|
690
|
+
<span id="transport-info">engine stopped</span>
|
|
691
|
+
<button class="act" id="pres-toggle" title="Presentation: only the presented boxes, where the performer sees them (with boxes selected, it offers to present them where they are)">Present</button>
|
|
692
|
+
<button class="act" id="perform-toggle" title="Perform: rehearse, try and improvise outside the history">Perform</button>
|
|
693
|
+
<button class="act" id="learn-toggle" title="Learn: select a box, press Learn and move a controller (MIDI, a gamepad, the phone's tilt, OSC): it is wired to the box">Learn</button>
|
|
694
|
+
<button class="act" id="annot-toggle" title="Annotate: draw lines, arrows and texts on a layer of the patch, anchored to the boxes nearest them">Annotate</button>
|
|
695
|
+
<span id="perform-info" class="perform-info" hidden></span>
|
|
696
|
+
<button class="act" id="embed-btn" title="Share or export this patch (or this tutorial step): a link, or an iframe to put it in another page">Share/Export</button>
|
|
697
|
+
<button class="act embed-only" id="fs-btn" title="Fullscreen">⛶</button>
|
|
698
|
+
<a class="act embed-only" id="open-full" target="_blank" rel="noopener" title="Open it in Kairotic, with the whole editor">Kairotic ↗</a>
|
|
699
|
+
</span>
|
|
700
|
+
<span class="hint">Messages travel without ▶ (▶: sound and time) · ⌘/Ctrl+click a box to edit it below: its arguments and its text (Enter applies) · ⇧+click or a frame drawn on the paper selects several: drag them together, Delete removes them, ⌘/Ctrl+A selects all · playable boxes (bang, msg, number, knobs…) are selected by their left grip; their body only plays · Code boxes: double-click their code row to open the editor (a window you can move; Ctrl/⌘+Enter applies) · their sliders can be dragged · Canvas: drag = stroke, ⇧ straight, ⌥ freehand, click = position</span>
|
|
701
|
+
</div>
|
|
702
|
+
<div class="line-tabs" id="line-tabs" role="tablist" aria-label="The lines of this work" hidden></div>
|
|
703
|
+
<div class="embed-pop" id="embed-pop" hidden>
|
|
704
|
+
<div class="ep-head">
|
|
705
|
+
<b>Share/Export</b>
|
|
706
|
+
<span class="spacer"></span>
|
|
707
|
+
<button class="act" id="ep-close">Close</button>
|
|
708
|
+
</div>
|
|
709
|
+
<div class="ep-file" id="ep-file">
|
|
710
|
+
<span class="ep-l">The work as a file (<code>.kairotic</code>): every line, its whole history, the sounds recorded</span>
|
|
711
|
+
<span class="ep-row">
|
|
712
|
+
<button class="act primary" data-kfile="history" title="To keep it, or to open it in another Kairotic (Pages ⇄ claude.ai): Sessions → Open a file">Download the work</button>
|
|
713
|
+
<button class="act" data-kfile="release" title="One line, one point per keyframe: as a release is">Download a release</button>
|
|
714
|
+
<label class="ep-l"><input type="checkbox" id="ep-anon"> anonymous</label>
|
|
715
|
+
</span>
|
|
716
|
+
</div>
|
|
717
|
+
<div class="ep-head">
|
|
718
|
+
<b>A link</b>
|
|
719
|
+
<span class="ep-modes">
|
|
720
|
+
<label><input type="radio" name="ep-mode" value="embed" checked> Patch</label>
|
|
721
|
+
<label><input type="radio" name="ep-mode" value="present" title="A release of the patch (presets boxes keep their presets), opened in Perform: what is played there is a take, never the work"> Release/Perform</label>
|
|
722
|
+
</span>
|
|
723
|
+
</div>
|
|
724
|
+
<p class="ep-what" id="ep-what"></p>
|
|
725
|
+
<label class="ep-l"><input type="checkbox" id="ep-ask"> Carry a description instead: whoever opens it makes the patch with Claude (their own key or account)</label>
|
|
726
|
+
<div class="ep-row" id="ep-ask-row" hidden><input id="ep-ask-text" spellcheck="true" placeholder="a sine at 440 Hz with a volume knob, and a knob that does FM synthesis"></div>
|
|
727
|
+
<label class="ep-l">Link <small>(in Notion: type <code>/embed</code> and paste it)</small></label>
|
|
728
|
+
<div class="ep-row"><input id="ep-url" readonly spellcheck="false"><button class="act" data-copy="ep-url">Copy</button></div>
|
|
729
|
+
<label class="ep-l">iframe <small>(any page or blog)</small></label>
|
|
730
|
+
<div class="ep-row"><textarea id="ep-iframe" readonly spellcheck="false" rows="3"></textarea><button class="act" data-copy="ep-iframe">Copy</button></div>
|
|
731
|
+
<p class="ep-note">The link carries the patch itself (its code, compressed): it is a copy of this moment, not a live work. Whoever opens it plays it in their browser, without saving anything; “Kairotic ↗” opens it with the whole editor.</p>
|
|
732
|
+
</div>
|
|
733
|
+
<div class="askbar" id="askbar" hidden>
|
|
734
|
+
<div class="ab-q"><b>Claude</b> · <span id="ab-text"></span></div>
|
|
735
|
+
<div class="ab-row" id="ab-keyrow" hidden>
|
|
736
|
+
<input type="password" id="ab-key" autocomplete="off" spellcheck="false" placeholder="Your Anthropic API key (sk-ant-…)" aria-label="Anthropic API key">
|
|
737
|
+
<button class="act" id="ab-key-save">Save</button>
|
|
738
|
+
</div>
|
|
739
|
+
<div class="ab-row">
|
|
740
|
+
<button class="act primary" id="ab-go">Make it with Claude</button>
|
|
741
|
+
<button class="act" id="ab-fix" hidden title="A link with this result in it: everyone sees the same patch, and nobody spends anything">Copy the link of this result</button>
|
|
742
|
+
<button class="act" id="ab-hide" title="Hide this bar">✕</button>
|
|
743
|
+
<span class="ab-status" id="ab-status"></span>
|
|
744
|
+
</div>
|
|
745
|
+
<p class="ab-note" id="ab-note"></p>
|
|
746
|
+
</div>
|
|
747
|
+
<div class="trust-bar" id="trust-bar" hidden><span id="trust-text"></span> <button class="act" id="trust-run">Run them</button></div>
|
|
748
|
+
<div class="lesson" id="lesson" hidden>
|
|
749
|
+
<div class="lesson-head">
|
|
750
|
+
<span class="t" id="lesson-title"></span>
|
|
751
|
+
<span class="n" id="lesson-n"></span>
|
|
752
|
+
<button class="act" id="lesson-prev" title="Previous step">◀</button>
|
|
753
|
+
<button class="act" id="lesson-next" title="Next step">▶</button>
|
|
754
|
+
<span class="spacer"></span>
|
|
755
|
+
<span class="lang"><button class="act" data-lang="es">ES</button> <button class="act" data-lang="en">EN</button></span>
|
|
756
|
+
<button class="act" id="lesson-back" title="Close the lesson and go back to what you had open">Close</button>
|
|
757
|
+
</div>
|
|
758
|
+
<div class="lesson-note" id="lesson-note"></div>
|
|
759
|
+
</div>
|
|
760
|
+
<div class="annot-bar" id="annot-bar" hidden>
|
|
761
|
+
<span class="annot-tools" role="group" aria-label="Annotation tool">
|
|
762
|
+
<button class="act" data-atool="draw" title="Draw a line by hand">Draw</button>
|
|
763
|
+
<button class="act" data-atool="arrow" title="An arrow, from where you press to where you let go">Arrow</button>
|
|
764
|
+
<button class="act" data-atool="text" title="Click where the text goes">Text</button>
|
|
765
|
+
<button class="act" data-atool="move" title="Drag a mark to move it (its points keep their anchors); drag one end of a line or an arrow to move only that end">Move</button>
|
|
766
|
+
<button class="act" data-atool="erase" title="Click or drag over marks to erase them">Erase</button>
|
|
767
|
+
</span>
|
|
768
|
+
<input id="annot-text" placeholder="text for Text" spellcheck="true" aria-label="Text of the next text mark">
|
|
769
|
+
<label class="annot-l">layer <input id="annot-layer" list="annot-layers" spellcheck="false" aria-label="Layer"></label>
|
|
770
|
+
<datalist id="annot-layers"></datalist>
|
|
771
|
+
<button class="act" id="annot-z" title="Over or under the boxes">over</button>
|
|
772
|
+
<label class="annot-l"><input type="checkbox" id="annot-show-patch"> patch</label>
|
|
773
|
+
<label class="annot-l"><input type="checkbox" id="annot-show-present"> presentation</label>
|
|
774
|
+
<span class="spacer"></span>
|
|
775
|
+
<button class="act" id="annot-done">Done</button>
|
|
776
|
+
</div>
|
|
777
|
+
<div class="canvas-wrap" id="canvas-wrap">
|
|
778
|
+
<svg id="canvas" xmlns="http://www.w3.org/2000/svg">
|
|
779
|
+
<defs>
|
|
780
|
+
<pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse">
|
|
781
|
+
<circle cx="1" cy="1" r="1" fill="var(--grid)"></circle>
|
|
782
|
+
</pattern>
|
|
783
|
+
</defs>
|
|
784
|
+
<rect class="bg" x="0" y="0" width="100%" height="100%"></rect>
|
|
785
|
+
<g id="layers-under"></g>
|
|
786
|
+
<g id="scene"></g>
|
|
787
|
+
<g id="cursors"></g>
|
|
788
|
+
<g id="layers-over"></g>
|
|
789
|
+
</svg>
|
|
790
|
+
</div>
|
|
791
|
+
</section>
|
|
792
|
+
|
|
793
|
+
<div class="splitter" id="side-split" role="separator" aria-orientation="vertical" aria-controls="side-pane" title="Drag to resize the panel · double-click to hide or show it">
|
|
794
|
+
<button class="side-toggle" id="side-toggle" type="button" aria-expanded="true" title="Hide the panel">›</button>
|
|
795
|
+
</div>
|
|
796
|
+
|
|
797
|
+
<section class="pane side-pane" id="side-pane" aria-label="Projections">
|
|
798
|
+
<div class="pane-head">
|
|
799
|
+
<div class="tabs" role="tablist">
|
|
800
|
+
<button class="tab" role="tab" id="tab-code" data-tab="code" aria-selected="true">Code</button>
|
|
801
|
+
<button class="tab" role="tab" id="tab-comp" data-tab="comp" aria-selected="false">Components</button>
|
|
802
|
+
<button class="tab" role="tab" id="tab-claude" data-tab="claude" aria-selected="false" hidden>Claude</button>
|
|
803
|
+
<button class="tab" role="tab" id="tab-help" data-tab="help" aria-selected="false" title="How each component works, and tutorials (? on a selected box)">Help</button>
|
|
804
|
+
<button class="tab" role="tab" id="tab-talk" data-tab="talk" aria-selected="false" title="Talk with the people in this room: write, hold to talk, voice notes, camera">Room</button>
|
|
805
|
+
<button class="tab" role="tab" id="tab-feedback" data-tab="feedback" aria-selected="false" title="Report a bug, propose an idea or ask a question (on GitHub)">Feedback</button>
|
|
806
|
+
</div>
|
|
807
|
+
<button class="side-hide" id="side-hide" type="button" title="Hide the panel (it comes back with ‹, with help, or with (side-panel true))">»</button>
|
|
808
|
+
</div>
|
|
809
|
+
<div class="panel" id="panel-code">
|
|
810
|
+
<textarea id="code" spellcheck="false" aria-label="Patch code"></textarea>
|
|
811
|
+
<pre class="view" id="edn" aria-label="The work as data (EDN)" hidden></pre>
|
|
812
|
+
<div class="code-bar">
|
|
813
|
+
<span class="code-views" role="group" aria-label="Show the work as">
|
|
814
|
+
<button class="act" type="button" id="view-calls" aria-pressed="true" title="The work as calls (box, connect, …): edit it and run it">Calls</button><button class="act" type="button" id="view-data" aria-pressed="false" title="The work as data (EDN): the state the history produces, to read">Data</button>
|
|
815
|
+
</span>
|
|
816
|
+
<span class="state" id="code-state">in sync with the patch</span>
|
|
817
|
+
<span class="spacer"></span>
|
|
818
|
+
<button class="act" id="code-revert" disabled>Discard changes</button>
|
|
819
|
+
<button class="act primary" id="code-run" disabled>Run · Ctrl+Enter</button>
|
|
820
|
+
</div>
|
|
821
|
+
</div>
|
|
822
|
+
<div class="panel" id="panel-comp" hidden>
|
|
823
|
+
<div class="comp-list" id="comp-list"></div>
|
|
824
|
+
</div>
|
|
825
|
+
<div class="panel" id="panel-feedback" hidden>
|
|
826
|
+
<div class="fb">
|
|
827
|
+
<p class="ask-note">Kairotic is in <b>alpha</b>: tell us what fails and what you miss. This writes a GitHub issue for you (with what you choose to add below); it is published only when you press the button on GitHub, under your own account. Nothing is sent from here, and never your API key.</p>
|
|
828
|
+
<div class="fb-kind" role="radiogroup" aria-label="Kind">
|
|
829
|
+
<label><input type="radio" name="fb-kind" value="bug" checked> Something fails</label>
|
|
830
|
+
<label><input type="radio" name="fb-kind" value="idea"> An idea for the next version</label>
|
|
831
|
+
<label><input type="radio" name="fb-kind" value="question"> A question</label>
|
|
832
|
+
</div>
|
|
833
|
+
<input id="fb-title" spellcheck="true" placeholder="A short title">
|
|
834
|
+
<textarea id="fb-text" spellcheck="true"></textarea>
|
|
835
|
+
<div class="fb-opts">
|
|
836
|
+
<label><input type="checkbox" id="fb-patch" checked> the patch on screen (as a link)</label>
|
|
837
|
+
<label><input type="checkbox" id="fb-errors" checked> recent errors <span id="fb-errn"></span></label>
|
|
838
|
+
<label><input type="checkbox" id="fb-env" checked> version and browser</label>
|
|
839
|
+
</div>
|
|
840
|
+
<div class="ask-bar">
|
|
841
|
+
<span class="spacer"></span>
|
|
842
|
+
<button class="act" id="fb-copy" title="The text, to paste wherever you like">Copy</button>
|
|
843
|
+
<button class="act primary" id="fb-go">Write it on GitHub…</button>
|
|
844
|
+
</div>
|
|
845
|
+
<details class="fb-prev"><summary>What will be written</summary><pre id="fb-preview"></pre></details>
|
|
846
|
+
<h4>Open issues</h4>
|
|
847
|
+
<p class="ask-note">Before writing, see if it is already here: a 👍 or a comment there helps as much.</p>
|
|
848
|
+
<ol class="fb-list" id="fb-list"><li class="soft">…</li></ol>
|
|
849
|
+
</div>
|
|
850
|
+
</div>
|
|
851
|
+
<div class="panel" id="panel-talk" hidden>
|
|
852
|
+
<div class="talk">
|
|
853
|
+
<p class="ask-note" id="talk-off"></p>
|
|
854
|
+
<div class="talk-on" id="talk-on" hidden>
|
|
855
|
+
<div class="talk-head">
|
|
856
|
+
<input id="talk-name" spellcheck="false" aria-label="Your name in the room" maxlength="60">
|
|
857
|
+
<span class="talk-state" id="talk-state"></span>
|
|
858
|
+
</div>
|
|
859
|
+
<div class="talk-peers" id="talk-peers"></div>
|
|
860
|
+
<div class="talk-asks" id="talk-asks" hidden></div>
|
|
861
|
+
<div class="talk-chat" id="talk-chat" aria-live="polite"></div>
|
|
862
|
+
<div class="talk-say">
|
|
863
|
+
<input id="talk-say" spellcheck="true" maxlength="2000" aria-label="Message" placeholder="say something — @b3 #12 ^33 anchor it">
|
|
864
|
+
<button class="act" id="talk-send">Send</button>
|
|
865
|
+
</div>
|
|
866
|
+
<div class="talk-bar">
|
|
867
|
+
<button class="act" id="talk-mic" title="Ask for the microphone: then hold to talk, or to record a voice note">Microphone</button>
|
|
868
|
+
<button class="talk-hold" id="talk-ptt" disabled aria-pressed="false" title="Your voice goes to the room only while you hold">Hold to talk</button>
|
|
869
|
+
<button class="talk-hold" id="talk-note" disabled aria-pressed="false" title="Hold to record, let go to send">● Note</button>
|
|
870
|
+
<button class="act" id="talk-cam" aria-pressed="false" title="Your camera, small and silent, to the room">Camera</button>
|
|
871
|
+
</div>
|
|
872
|
+
<div class="talk-bar" title="One tempo for the whole room: the same beat on every page (pulse boxes follow it)">
|
|
873
|
+
<span class="label">Tempo</span>
|
|
874
|
+
<input id="net-bpm" type="number" min="20" max="400" value="96" aria-label="Beats per minute">
|
|
875
|
+
<button class="act small" id="net-start">Start for everyone</button>
|
|
876
|
+
<button class="act small" id="net-stop">Stop</button>
|
|
877
|
+
<label class="net-metro"><input type="checkbox" id="net-metro"> metronome</label>
|
|
878
|
+
<span class="net-beat" id="net-beat" aria-live="off">·</span>
|
|
879
|
+
<span class="talk-state" id="net-clock"></span>
|
|
880
|
+
</div>
|
|
881
|
+
<div class="talk-tiles" id="talk-tiles"></div>
|
|
882
|
+
</div>
|
|
883
|
+
</div>
|
|
884
|
+
</div>
|
|
885
|
+
<div class="panel" id="panel-help" hidden>
|
|
886
|
+
<div class="help-view" id="help-view"></div>
|
|
887
|
+
</div>
|
|
888
|
+
<div class="panel" id="panel-claude" hidden>
|
|
889
|
+
<div class="ask">
|
|
890
|
+
<div class="ask-what" role="radiogroup" aria-label="What Claude makes">
|
|
891
|
+
<label><input type="radio" name="ask-what" value="patch" checked> A patch</label>
|
|
892
|
+
<label><input type="radio" name="ask-what" value="component"> A component</label>
|
|
893
|
+
</div>
|
|
894
|
+
<p class="ask-note" id="ask-note">Describe a patch and Claude makes it — or changes the open one — checks it and loads it as one event of the history. It uses <b>your own</b> Claude account: the first time, Claude asks you to allow this page.</p>
|
|
895
|
+
<div class="ask-key" id="ask-key" hidden>
|
|
896
|
+
<input type="password" id="ask-key-in" autocomplete="off" spellcheck="false" placeholder="Your Anthropic API key (sk-ant-…)" aria-label="Anthropic API key">
|
|
897
|
+
<button class="act" id="ask-key-save">Save</button>
|
|
898
|
+
<button class="act" id="ask-key-forget">Forget</button>
|
|
899
|
+
<span class="ask-key-state" id="ask-key-state"></span>
|
|
900
|
+
</div>
|
|
901
|
+
<textarea id="ask-text" spellcheck="true" placeholder="A stereo chorus in Faust with rate and depth knobs on its panel… · a resonant filter whose cutoff follows an envelope… · a Markov chain of pitch classes…"></textarea>
|
|
902
|
+
<div class="ask-bar">
|
|
903
|
+
<select id="ask-tier" aria-label="Model"><option value="default">Balanced</option><option value="complex">Most capable</option><option value="quick">Quick</option></select>
|
|
904
|
+
<label class="opt" id="ask-change-l"><input type="checkbox" id="ask-change" checked> <span id="ask-change-t">change the open patch</span></label>
|
|
905
|
+
<span class="spacer"></span>
|
|
906
|
+
<button class="act" id="ask-stop" disabled>Stop</button>
|
|
907
|
+
<button class="act primary" id="ask-go">Make it</button>
|
|
908
|
+
</div>
|
|
909
|
+
<ol class="ask-log" id="ask-log"></ol>
|
|
910
|
+
<details class="ask-hist" id="ask-hist">
|
|
911
|
+
<summary>Your requests to Claude <span id="ask-hist-n"></span></summary>
|
|
912
|
+
<p class="ask-note">Kept only in this browser: what you asked, what Claude answered, and whether it worked. Nothing leaves it unless you share an entry (in the <a href="https://github.com/bonuoq/kairotic/discussions/categories/gallery" target="_blank" rel="noopener">Gallery</a> on GitHub, under your own account) or export them. <button class="act" id="ask-hist-export">Export (.jsonl)</button> <button class="act" id="ask-hist-clear">Clear</button></p>
|
|
913
|
+
<ol class="ask-hist-list" id="ask-hist-list"></ol>
|
|
914
|
+
</details>
|
|
915
|
+
<pre class="ask-out" id="ask-out"></pre>
|
|
916
|
+
</div>
|
|
917
|
+
</div>
|
|
918
|
+
</section>
|
|
919
|
+
</div>
|
|
920
|
+
|
|
921
|
+
<section class="pane" aria-label="History">
|
|
922
|
+
<div class="pane-head">
|
|
923
|
+
<span class="label">History</span>
|
|
924
|
+
<div class="hist-nav">
|
|
925
|
+
<button class="act" id="nav-back" title="Back one event (Ctrl+Z)">◀</button>
|
|
926
|
+
<button class="act" id="nav-fwd" title="Forward one event">▶</button>
|
|
927
|
+
<button class="act" id="nav-tip" title="Go to the tip of this branch">⇥</button>
|
|
928
|
+
</div>
|
|
929
|
+
<button class="act" id="snap-btn" title="Snapshot: a keyframe in the history with the work as it is now (also in Perform)">◆ Snapshot</button>
|
|
930
|
+
<label class="opt" title="Move forward automatically with anyone's gestures"><input type="checkbox" id="auto" checked> Follow the front</label>
|
|
931
|
+
<label class="opt" title="Two gestures closer than this interval are considered parallel and branch">Simultaneity <input type="number" id="simul" min="0" max="10000" step="100" value="1500"> ms</label>
|
|
932
|
+
<button class="act" id="merge-btn" title="Bring here the events of another compatible branch">Merge…</button>
|
|
933
|
+
<button class="act" id="release-btn" title="Release: a new work with a compact history (only the keyframes, and the work as it is), ready to share">Release…</button>
|
|
934
|
+
<button class="act" id="forget-btn" title="Forget the points chosen with ⇧+click (solo and local works)" hidden>Forget…</button>
|
|
935
|
+
<div class="peers" id="peers"></div>
|
|
936
|
+
<span class="hint" id="hist-hint">Click a point to travel to that moment · ⇧+click to choose it to forget</span>
|
|
937
|
+
</div>
|
|
938
|
+
<div class="hist-wrap" id="hist-wrap">
|
|
939
|
+
<svg id="tree" xmlns="http://www.w3.org/2000/svg" width="320" height="80"></svg>
|
|
940
|
+
<div class="empty-hist" id="hist-empty" hidden>
|
|
941
|
+
<span>The history is empty: the first gesture creates its root.</span>
|
|
942
|
+
<button class="act primary" id="start-example">Start with the example work</button>
|
|
943
|
+
</div>
|
|
944
|
+
</div>
|
|
945
|
+
<div class="hist-foot" id="hist-foot"></div>
|
|
946
|
+
</section>
|
|
947
|
+
|
|
948
|
+
<section class="pane repl" aria-label="REPL">
|
|
949
|
+
<div class="pane-head"><span class="label">REPL</span><span class="hint">ClojureScript (Scittle) · ↑ ↓ history</span></div>
|
|
950
|
+
<div id="repl-out" aria-live="polite"></div>
|
|
951
|
+
<div class="repl-line">
|
|
952
|
+
<label for="repl-in">λ</label>
|
|
953
|
+
<input id="repl-in" autocomplete="off" spellcheck="false" placeholder='(add-package! "@kairotic/controls") · (publish :b5) · (help "knob")'>
|
|
954
|
+
</div>
|
|
955
|
+
<div class="help">
|
|
956
|
+
<span><code>(stroke :b1 [[t hz] …])</code> · <code>(note :b1 t "c4" dur)</code> · <code>(degree :b1 t n dur)</code> · <code>(melody :b1 "c4/1 e4/.5")</code></span>
|
|
957
|
+
<span><code>(move-stroke :b1 :t1 dt cents)</code> · <code>(stretch :b1 :t1 2)</code> · <code>(erase-stroke :b1 :t1)</code> · <code>(clear :b1)</code></span>
|
|
958
|
+
<span><code>(grid-x :b1 0.25 "3+3+2")</code> · <code>(tuning :b1 "31-tet" 261.63)</code> · <code>(tunings)</code> · <code>(read-at :b1 2)</code></span>
|
|
959
|
+
<span><code>(play)</code> · <code>(stop)</code> · <code>(send! :b5 2.5)</code></span>
|
|
960
|
+
<span><code>(components)</code> · <code>(help "ramp")</code> · <code>(code :b6 "process = …;")</code> · <code>(source :b6)</code> · <code>(compilation :b6)</code> · <code>(trust-scripts true)</code></span>
|
|
961
|
+
<span>code boxes: <code>faust~</code> (Faust, AudioWorklet) · <code>script [inlets] [outlets]</code> (ClojureScript: <code>(fn [m] {:out [[0 …]]})</code>) · <code>component</code> (defines a class: <code>{:class "x" :io [1 1] :receive (fn [m] …)}</code>)</span>
|
|
962
|
+
<span><code>(import! "kairotic/packages/controls.mjs")</code> · <code>(import! "npm:package@1.0.0/comp.mjs")</code> · <code>(publish :b5)</code> · <code>(library)</code> · <code>(use! "my-class")</code></span>
|
|
963
|
+
<span>sub-patches: <code>patch [name]</code> (double-click to open, ⌥ double-click to rename) · inside: <code>inlet</code> <code>outlet</code> <code>inlet~</code> <code>outlet~</code> · <code>(enter :b5)</code> · <code>(up)</code> · <code>(top)</code> · <code>(inside :b5 (box …) (connect …))</code> · <code>(abstract :b5 "voice")</code> · abstractions take <code>$1 $2</code></span>
|
|
964
|
+
<span>canvas (any data): <code>(axis :b6 :y -1 1)</code> · <code>(axis :b6 :x 20 20000 :log)</code> · <code>(grid-y :b6 0.25)</code> · <code>reader y</code> reads along Y · <code>(read-at :b6 :y 0.5)</code> · freqt: frequency over time, with tunings · audio: <code>dac~ 1 2</code> (one inlet per channel) · <code>pan~ [pos]</code> · <code>space~ [x y]</code></span>
|
|
965
|
+
<span>signal: <code>phasor~ [hz]</code> · <code>reader~ [x|y|path] [voices] [gate]</code> (position signal 0…1 on the left, buffer on the right; a voice keeps its last value where nothing passes; <code>gate</code> adds one outlet per voice, 1 where it sounds, 0 where not) · <code>sig~ [value]</code> · <code>osc~</code> and <code>gain~</code> take a signal on their frequency / factor · trajectories: <code>reader path [stroke]</code> (0…1 along a stroke → [x y])</span>
|
|
966
|
+
<span>Claude: the <b>Claude</b> tab, or <code>(ask-component "a slow LFO with its waveform drawn")</code> · with a component chosen in the Components tab, “change the selected component” · it uses your own Claude account</span>
|
|
967
|
+
<span>packages: writing a class of an official package brings the package into the work, as one component box pinned to its version · <code>@kairotic/synth</code>: <code>adsr~ [a d s r]</code>, <code>synth~</code> · <code>@kairotic/spatial</code>: <code>pan~ [pos]</code>, <code>space~ [x y]</code> · <code>@kairotic/analysis</code>: <code>pitch~</code>, <code>onset~</code>, <code>chroma~</code>, <code>features~</code>, <code>spectrum~</code> · <code>(packages)</code> · <code>(add-package! "@kairotic/synth")</code> · a component uses the core through <code>api/…</code> (<code>api/clamp</code>, <code>api/worklet-node</code>…)</span>
|
|
968
|
+
<span>annotations (Annotate, above the patch): <code>(mark :notes {:kind :arrow :pts [[:b1 120 10] [:b4 -6 10]]})</code> · <code>(mark :notes {:kind :text :at [:patch 300 40] :txt "…"})</code> (points anchored to a box, <code>[:bN dx dy]</code>, or to the paper) · <code>(move-mark :a1 20 0)</code> · <code>(unmark :a1)</code> · <code>(layer :notes {:z :under :show #{:present}})</code> · <code>(project :b9 :viz [40 40 800 480])</code> · <code>(annotate :arrow)</code> · drawing: <code>draw [w h]</code> (shapes from messages: <code>msg circle 40 40 10 accent hit sun</code>) · theory: <code>pcclock</code> <code>fourier</code> <code>tonnetz</code> <code>euclid</code> (<code>@kairotic/theory</code>) · data: <code>fetch</code> (a URL, kept in the work) <code>edn</code> (any value as a tree) (<code>@kairotic/data</code>)</span>
|
|
969
|
+
<span>presentation: <code>(present :b4 x y)</code> · <code>(present :b4)</code> · <code>(present-in-place :b3 :b4)</code> · <code>(resize :b3 640 300)</code> · <code>(side-panel false)</code> · <code>(release)</code> · <code>(forget-points [["id" 3]])</code> · <code>(store-presets! :b18)</code> · <code>(unpresent :b4)</code> · <code>(presentation true)</code> · a sub-patch with presented boxes is a panel of them · <code>(send-to! :b7.b4 0.5)</code></span>
|
|
970
|
+
<span><code>(box "text" x y)</code></span>
|
|
971
|
+
<span><code>(connect :b1 0 :b2 0)</code></span>
|
|
972
|
+
<span><code>(disconnect :b1 0 :b2 0)</code></span>
|
|
973
|
+
<span><code>(move :b1 x y)</code></span>
|
|
974
|
+
<span><code>(text! :b1 "text")</code></span>
|
|
975
|
+
<span><code>(delete :b1)</code></span>
|
|
976
|
+
<span><code>(rewind)</code> · <code>(rewind n)</code></span>
|
|
977
|
+
<span><code>(forward)</code></span>
|
|
978
|
+
<span><code>(tip)</code></span>
|
|
979
|
+
<span><code>(goto "id" n)</code></span>
|
|
980
|
+
<span><code>(here)</code></span>
|
|
981
|
+
<span><code>(branches)</code></span>
|
|
982
|
+
<span><code>(front true)</code></span>
|
|
983
|
+
<span><code>(simultaneity 1500)</code></span>
|
|
984
|
+
<span><code>(merge-from "id" n)</code></span>
|
|
985
|
+
</div>
|
|
986
|
+
</section>
|
|
987
|
+
</div>
|
|
988
|
+
|
|
989
|
+
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.30/dist/scittle.js" type="application/javascript"></script>
|
|
990
|
+
<script>
|
|
991
|
+
// If the ClojureScript fails to load, the error is shown in the header instead of getting lost in the console.
|
|
992
|
+
window.addEventListener("error", function (e) {
|
|
993
|
+
var st = document.getElementById("status");
|
|
994
|
+
var msg = "Error: " + (e.message || e.error);
|
|
995
|
+
if (st) { st.textContent = msg; st.style.color = "var(--error)"; }
|
|
996
|
+
var mb = document.getElementById("mgr-body");
|
|
997
|
+
if (mb && /Loading/.test(mb.textContent)) { mb.textContent = msg; mb.style.color = "var(--error)"; }
|
|
998
|
+
});
|
|
999
|
+
</script>
|
|
1000
|
+
<script>
|
|
1001
|
+
// Links that carry a patch (Study 22): its code, deflated (when the browser can) and in base64url.
|
|
1002
|
+
// "z…" is deflate-raw, "t…" plain text.
|
|
1003
|
+
(function () {
|
|
1004
|
+
function toB64(bytes) {
|
|
1005
|
+
var bin = "";
|
|
1006
|
+
for (var i = 0; i < bytes.length; i++) bin += String.fromCharCode(bytes[i]);
|
|
1007
|
+
return btoa(bin).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1008
|
+
}
|
|
1009
|
+
function fromB64(s) {
|
|
1010
|
+
var b = s.replace(/-/g, "+").replace(/_/g, "/");
|
|
1011
|
+
while (b.length % 4) b += "=";
|
|
1012
|
+
var bin = atob(b), bytes = new Uint8Array(bin.length);
|
|
1013
|
+
for (var i = 0; i < bin.length; i++) bytes[i] = bin.charCodeAt(i);
|
|
1014
|
+
return bytes;
|
|
1015
|
+
}
|
|
1016
|
+
function through(bytes, stream) {
|
|
1017
|
+
return new Response(new Blob([bytes]).stream().pipeThrough(stream)).arrayBuffer().then(function (b) { return new Uint8Array(b); });
|
|
1018
|
+
}
|
|
1019
|
+
window.kairoticPack = function (text) {
|
|
1020
|
+
var bytes = new TextEncoder().encode(text);
|
|
1021
|
+
if (!window.CompressionStream) return Promise.resolve("t" + toB64(bytes));
|
|
1022
|
+
return through(bytes, new CompressionStream("deflate-raw")).then(function (z) { return "z" + toB64(z); });
|
|
1023
|
+
};
|
|
1024
|
+
window.kairoticUnpack = function (s) {
|
|
1025
|
+
return Promise.resolve().then(function () {
|
|
1026
|
+
var bytes = fromB64(String(s).slice(1));
|
|
1027
|
+
if (s[0] === "t") return bytes;
|
|
1028
|
+
if (s[0] !== "z") throw new Error("this link does not carry a patch");
|
|
1029
|
+
if (!window.DecompressionStream) throw new Error("this browser cannot open compressed links");
|
|
1030
|
+
return through(bytes, new DecompressionStream("deflate-raw"));
|
|
1031
|
+
}).then(function (bytes) { return new TextDecoder().decode(bytes); });
|
|
1032
|
+
};
|
|
1033
|
+
})();
|
|
1034
|
+
</script>
|
|
1035
|
+
<script>
|
|
1036
|
+
// Verovio (notation) is downloaded after the page is painted; the toolkit is kept in a promise.
|
|
1037
|
+
window.kairoticVerovio = new Promise(function (resolve, reject) {
|
|
1038
|
+
var s = document.createElement("script");
|
|
1039
|
+
s.src = "https://cdn.jsdelivr.net/npm/verovio@5.7.0/dist/verovio-toolkit-wasm.js";
|
|
1040
|
+
s.onload = function () {
|
|
1041
|
+
try {
|
|
1042
|
+
var m = verovio.module;
|
|
1043
|
+
if (m.calledRun) { resolve(new verovio.toolkit()); }
|
|
1044
|
+
else { m.onRuntimeInitialized = function () { resolve(new verovio.toolkit()); }; }
|
|
1045
|
+
} catch (e) { reject(e); }
|
|
1046
|
+
};
|
|
1047
|
+
s.onerror = function () { reject(new Error("Could not download Verovio")); };
|
|
1048
|
+
document.head.appendChild(s);
|
|
1049
|
+
});
|
|
1050
|
+
</script>
|
|
1051
|
+
<script>
|
|
1052
|
+
// The ClojureScript is evaluated here (and not with Scittle's automatic tags) so that an error
|
|
1053
|
+
// arrives with its message: first the modules, then the page's program.
|
|
1054
|
+
// Faust (a WebAssembly compiler, about 8 MB) is only downloaded when a faust~ box asks for it.
|
|
1055
|
+
// A published component is a JavaScript module that exports {class, version, author, license, doc, source}:
|
|
1056
|
+
// inside claude.ai only npm modules via jsDelivr (or files of this page) can be loaded.
|
|
1057
|
+
window.kairoticImport = function (url) {
|
|
1058
|
+
return import(new URL(url, document.baseURI).href).then(function (m) { return m.default; });
|
|
1059
|
+
};
|
|
1060
|
+
window.kairoticLoadFaust = function () {
|
|
1061
|
+
return import("https://cdn.jsdelivr.net/npm/@grame/faustwasm@0.18.5/dist/esm-bundle/index.js")
|
|
1062
|
+
.then(function (F) {
|
|
1063
|
+
return F.instantiateFaustModule().then(function (mod) {
|
|
1064
|
+
return { F: F, compiler: new F.FaustCompiler(new F.LibFaust(mod)) };
|
|
1065
|
+
});
|
|
1066
|
+
});
|
|
1067
|
+
};
|
|
1068
|
+
window.addEventListener("DOMContentLoaded", function () {
|
|
1069
|
+
function show(e) {
|
|
1070
|
+
var msg = "Error: " + ((e && e.message) || e);
|
|
1071
|
+
var st = document.getElementById("status");
|
|
1072
|
+
if (st) { st.textContent = msg; st.style.color = "var(--error)"; }
|
|
1073
|
+
var mb = document.getElementById("mgr-body");
|
|
1074
|
+
if (mb && /Loading/.test(mb.textContent)) { mb.textContent = msg; mb.style.color = "var(--error)"; }
|
|
1075
|
+
console.error(e);
|
|
1076
|
+
}
|
|
1077
|
+
// dependency order: shapes has no dependencies; components needs canvas; code, faust and library need components
|
|
1078
|
+
var mods = ["kairotic/score.cljs", "kairotic/canvas.cljs", "kairotic/spell.cljs", "kairotic/mt.cljs", "kairotic/tempo.cljs", "kairotic/structure.cljs", "kairotic/quantize.cljs", "kairotic/treecanvas.cljs", "kairotic/shapes.cljs", "kairotic/span.cljs", "kairotic/components.cljs",
|
|
1079
|
+
"kairotic/code.cljs", "kairotic/patterns.cljs", "kairotic/api.cljs", "kairotic/corefns.cljs", "kairotic/mtboxes.cljs", "kairotic/hiccup.cljs", "kairotic/faust.cljs", "kairotic/library.cljs", "kairotic/help.cljs", "kairotic/assistant.cljs", "kairotic/engine.cljs",
|
|
1080
|
+
"kairotic/sounds.cljs", "kairotic/talk.cljs", "kairotic/ringaudio.cljs", "kairotic/signal.cljs", "kairotic/input.cljs", "kairotic/record.cljs", "kairotic/ring.cljs", "kairotic/links.cljs", "kairotic/release.cljs", "kairotic/presets.cljs"];
|
|
1081
|
+
var page = ["page/00-work.cljs", "page/01-commands.cljs", "page/02-patch-view.cljs", "page/03-history-view.cljs", "page/04-panels.cljs", "page/05-gestures.cljs", "page/19-html.cljs", "page/06-connection.cljs", "page/07-claude.cljs", "page/08-sessions.cljs", "page/09-learn.cljs", "page/10-embed.cljs", "page/11-startup.cljs", "page/12-feedback.cljs", "page/13-perform.cljs", "page/14-editor.cljs", "page/15-presets.cljs", "page/16-release.cljs", "page/17-sounds.cljs", "page/18-lines.cljs", "page/19-files.cljs", "page/20-talk.cljs", "page/21-net.cljs", "page/22-learn.cljs", "page/23-ids.cljs", "page/24-clipboard.cljs", "page/25-tidy.cljs", "page/26-probes.cljs"];
|
|
1082
|
+
Promise.all(mods.map(function (m) {
|
|
1083
|
+
return fetch(m, { cache: "no-cache" }).then(function (r) { if (!r.ok) throw new Error("could not read " + m + " (" + r.status + ")"); return r.text(); });
|
|
1084
|
+
}))
|
|
1085
|
+
.then(function (srcs) {
|
|
1086
|
+
srcs.forEach(function (src, i) {
|
|
1087
|
+
try { scittle.core.eval_string(src); } catch (e) { throw new Error(mods[i] + ": " + (e.message || e)); }
|
|
1088
|
+
});
|
|
1089
|
+
// then the page itself, its parts in order (app/page)
|
|
1090
|
+
return Promise.all(page.map(function (m) {
|
|
1091
|
+
return fetch(m, { cache: "no-cache" }).then(function (r) { if (!r.ok) throw new Error("could not read " + m + " (" + r.status + ")"); return r.text(); });
|
|
1092
|
+
})).then(function (parts) {
|
|
1093
|
+
parts.forEach(function (src, i) {
|
|
1094
|
+
try { scittle.core.eval_string(src); } catch (e) { throw new Error(page[i] + ": " + (e.message || e)); }
|
|
1095
|
+
});
|
|
1096
|
+
});
|
|
1097
|
+
})
|
|
1098
|
+
.catch(show);
|
|
1099
|
+
});
|
|
1100
|
+
</script>
|
|
1101
|
+
|