heyquilt 0.3.159 → 0.3.160
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/RELEASES.md +4 -0
- package/package.json +1 -1
- package/src/ui/app.css +13 -0
- package/src/ui/connections.js +92 -16
package/RELEASES.md
CHANGED
|
@@ -11,6 +11,10 @@ Format: `## <version> — <YYYY-MM-DD>`, an optional one-line summary, then bull
|
|
|
11
11
|
Lead each bullet with a short bold phrase. Inline `code` and **bold** are rendered;
|
|
12
12
|
nothing else is.
|
|
13
13
|
|
|
14
|
+
## 0.3.160 — 2026-11-12
|
|
15
|
+
|
|
16
|
+
- **An app's card pours open.** Click an app on the Connections page and its card flows down into one shape with the list of what it can do, spreading out to the full width as it grows. A second click or Escape draws it back in. The card keeps its name, logo and **Connect**, so the list below shows only the app's actions.
|
|
17
|
+
|
|
14
18
|
## 0.3.159 — 2026-11-12
|
|
15
19
|
|
|
16
20
|
- **See what an app can do before you connect it.** Click an app on the Connections page and a row opens under it: all it says about itself, how you sign in, and what agents can do with it. What they read on their own and what asks someone first (anything that sends, creates, changes or deletes) are listed apart.
|
package/package.json
CHANGED
package/src/ui/app.css
CHANGED
|
@@ -3675,3 +3675,16 @@ button.sh-repo:hover { color: var(--text); }
|
|
|
3675
3675
|
.kl-dcols ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
|
|
3676
3676
|
.kl-dcols li { display: flex; flex-direction: column; gap: 2px; } .kl-dcols li b { font-size: 13.5px; font-weight: 500; } .kl-dcols li small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
|
|
3677
3677
|
@media (max-width: 760px) { .kl-dcols { grid-template-columns: 1fr; } }
|
|
3678
|
+
|
|
3679
|
+
/* The open card and its row as one liquid shape (drawn by connections.js behind both): the card loses its own box,
|
|
3680
|
+
the row pours out of it */
|
|
3681
|
+
.kl-grid { position: relative; isolation: isolate; }
|
|
3682
|
+
.kl-grid > .kl-card, .kl-grid > .kl-detail { position: relative; z-index: 1; }
|
|
3683
|
+
.kl-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
|
|
3684
|
+
.kl-shape path { fill: var(--panel); stroke: var(--border-strong); stroke-width: 1; }
|
|
3685
|
+
.kl-card.open, .kl-card.open:hover { background: transparent; border-color: transparent; }
|
|
3686
|
+
.kl-card.open .kl-t small { -webkit-line-clamp: unset; display: block; }
|
|
3687
|
+
.kl-card.busy { cursor: progress; opacity: .7; }
|
|
3688
|
+
.kl-detail { padding: 0; border: 0; border-radius: 0; background: none; animation: none; overflow: hidden; gap: 0; }
|
|
3689
|
+
.kl-dinner { padding: 6px 24px 22px; display: flex; flex-direction: column; gap: 14px; }
|
|
3690
|
+
.kl-dcols { padding-top: 0; border-top: 0; }
|
package/src/ui/connections.js
CHANGED
|
@@ -21,7 +21,7 @@ const logoHtml = (a) => a.logo
|
|
|
21
21
|
*/
|
|
22
22
|
export function mountConnections (root, { type, id, page = false, sessions = [], callsRoom = null, me = '' }) {
|
|
23
23
|
// The catalog: `apps` the page shown so far, `total` how many match, `cat` the category picked ('' every app).
|
|
24
|
-
const ui = { search: '', apps: null, total: 0, all: 0, groups: [], group: '', open: null, loadingMore: false, busy: '', error: '', calls: null, confirm: null }
|
|
24
|
+
const ui = { search: '', apps: null, total: 0, all: 0, groups: [], group: '', open: null, pour: null, loadingMore: false, busy: '', error: '', calls: null, confirm: null }
|
|
25
25
|
const details = new Map() // app slug -> { actions, total } or { error }, for its opened card
|
|
26
26
|
let view = views.get(`${type}:${id}`) || null
|
|
27
27
|
let alive = true
|
|
@@ -57,14 +57,11 @@ export function mountConnections (root, { type, id, page = false, sessions = [],
|
|
|
57
57
|
|
|
58
58
|
// An opened card's row under it (Daniel, 2026-11-12): all it says about itself, how you sign in, and what agents
|
|
59
59
|
// can do with it, split the way Quilt runs it: reads at once, anything that changes something asks a person first.
|
|
60
|
-
const SIGN_IN = { oneclick: 'Sign in with one click: Composio asks the app for you, and Quilt never sees the login.', key: 'Uses your own API key: Composio asks for it once, and keeps it.', none: 'No sign-in: agents can use it as it is.' }
|
|
61
60
|
function openRowHtml (a, connected) {
|
|
62
61
|
const d = details.get(a.slug)
|
|
63
62
|
const list = (xs) => xs.slice(0, 6).map((t) => `<li><b>${esc(t.name)}</b><small>${esc(t.description)}</small></li>`).join('')
|
|
64
63
|
const reads = d && !d.error ? d.actions.filter((t) => t.readOnly) : []
|
|
65
64
|
const changes = d && !d.error ? d.actions.filter((t) => !t.readOnly) : []
|
|
66
|
-
const busy = ui.busy === a.slug
|
|
67
|
-
const act = a.how === 'none' ? '<span class="kl-ready">Ready to use</span>' : `<button type="button" class="btn primary" data-connect="${esc(a.slug)}"${busy ? ' disabled' : ''}>${busy ? 'Opening…' : connected ? `Add another ${esc(a.name)}` : `Connect ${esc(a.name)}`}</button>`
|
|
68
65
|
const what = !d ? `<p class="hint">${loadingNote()}</p>`
|
|
69
66
|
: d.error ? `<p class="hint">${esc(d.error)}</p>`
|
|
70
67
|
: `<div class="kl-dcols">
|
|
@@ -72,18 +69,95 @@ export function mountConnections (root, { type, id, page = false, sessions = [],
|
|
|
72
69
|
<div><h4>Asks someone first <i>${changes.length}</i></h4><p class="kl-dnote">Sends, creates, changes or deletes: a card in the session's chat asks a person to approve each one.</p>${changes.length ? `<ul>${list(changes)}</ul>` : '<p class="hint">None among its main actions.</p>'}${changes.length > 6 ? `<p class="kl-dnote">and ${changes.length - 6} more</p>` : ''}</div>
|
|
73
70
|
</div>
|
|
74
71
|
${d.total > d.actions.length ? `<p class="kl-dnote">From ${d.actions.length} of its ${d.total.toLocaleString()} actions; agents find the rest when they need them.</p>` : ''}`
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
${a.description ? `<p class="kl-ddesc">${esc(a.description)}</p>` : ''}
|
|
78
|
-
${what}
|
|
79
|
-
</div>`
|
|
72
|
+
// Only what it can do: its name, logo and Connect are on the card it flows out of.
|
|
73
|
+
return `<div class="kl-detail" data-detail="${esc(a.slug)}"><div class="kl-dinner">${what}</div></div>`
|
|
80
74
|
}
|
|
75
|
+
// Opening: its actions are fetched first, so the row pours out of the card at its full height; a second click (or
|
|
76
|
+
// Escape) draws it back in.
|
|
81
77
|
async function openApp (slug) {
|
|
82
|
-
|
|
78
|
+
if (ui.open === slug) return closeApp()
|
|
79
|
+
const card = root.querySelector(`.kl-card[data-open="${CSS.escape(slug)}"]`)
|
|
80
|
+
if (!details.has(slug)) {
|
|
81
|
+
card?.classList.add('busy')
|
|
82
|
+
try { const r = await api('GET', `/api/connections/apps/${encodeURIComponent(slug)}`); details.set(slug, { actions: r.actions || [], total: r.total || 0 }) } catch (err) { details.set(slug, { error: err.message, actions: [], total: 0 }) }
|
|
83
|
+
card?.classList.remove('busy')
|
|
84
|
+
}
|
|
85
|
+
ui.open = slug
|
|
86
|
+
ui.pour = 'in'
|
|
83
87
|
draw()
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (ui.open
|
|
88
|
+
}
|
|
89
|
+
function closeApp () {
|
|
90
|
+
if (!ui.open) return
|
|
91
|
+
const det = root.querySelector('.kl-detail')
|
|
92
|
+
if (!det || reduced()) { ui.open = null; draw(); return }
|
|
93
|
+
pour(det, 'out', () => { ui.open = null; draw() })
|
|
94
|
+
}
|
|
95
|
+
const reduced = () => window.matchMedia('(prefers-reduced-motion: reduce)').matches
|
|
96
|
+
|
|
97
|
+
// The open card and its row are one shape, drawn behind them: the card's sides curve out into the row, which pours
|
|
98
|
+
// down out of the card and spreads to the full width as it grows (liquid), or draws back in.
|
|
99
|
+
function shapePath (grid, card, det, t) {
|
|
100
|
+
const G = grid.getBoundingClientRect()
|
|
101
|
+
const C = card.getBoundingClientRect()
|
|
102
|
+
const D = det.getBoundingClientRect()
|
|
103
|
+
const r = 14
|
|
104
|
+
const x1 = C.left - G.left + 0.5
|
|
105
|
+
const x2 = C.right - G.left - 0.5
|
|
106
|
+
const y1 = C.top - G.top + 0.5
|
|
107
|
+
const cb = D.top - G.top
|
|
108
|
+
const B = D.bottom - G.top - 0.5
|
|
109
|
+
const L = D.left - G.left + 0.5
|
|
110
|
+
const W = D.right - G.left - 0.5
|
|
111
|
+
// It spreads as it falls: slowly at first (a stream out of the card), then out to both edges.
|
|
112
|
+
const tt = Math.min(1, Math.max(0, t))
|
|
113
|
+
const e = tt * tt * (3 - 2 * tt)
|
|
114
|
+
const PL = x1 + (L - x1) * e
|
|
115
|
+
const PR = x2 + (W - x2) * e
|
|
116
|
+
const h = Math.max(0, B - cb)
|
|
117
|
+
const rr = Math.min(r, h / 2)
|
|
118
|
+
const left = x1 - PL
|
|
119
|
+
const right = PR - x2
|
|
120
|
+
const fl = Math.min(22, left / 2, h)
|
|
121
|
+
const fr = Math.min(22, right / 2, h)
|
|
122
|
+
const tl = Math.min(rr, Math.max(0, left - fl))
|
|
123
|
+
const tr = Math.min(rr, Math.max(0, right - fr))
|
|
124
|
+
let d = `M ${x1 + r} ${y1} H ${x2 - r} A ${r} ${r} 0 0 1 ${x2} ${y1 + r}`
|
|
125
|
+
d += right < 1 ? ` V ${B - rr} A ${rr} ${rr} 0 0 1 ${x2 - rr} ${B}`
|
|
126
|
+
: ` V ${cb - fr} A ${fr} ${fr} 0 0 0 ${x2 + fr} ${cb} H ${PR - tr} A ${tr} ${tr} 0 0 1 ${PR} ${cb + tr} V ${B - rr} A ${rr} ${rr} 0 0 1 ${PR - rr} ${B}`
|
|
127
|
+
d += left < 1 ? ` H ${x1 + rr} A ${rr} ${rr} 0 0 1 ${x1} ${B - rr} V ${y1 + r}`
|
|
128
|
+
: ` H ${PL + rr} A ${rr} ${rr} 0 0 1 ${PL} ${B - rr} V ${cb + tl} A ${tl} ${tl} 0 0 1 ${PL + tl} ${cb} H ${x1 - fl} A ${fl} ${fl} 0 0 0 ${x1} ${cb - fl} V ${y1 + r}`
|
|
129
|
+
return `${d} A ${r} ${r} 0 0 1 ${x1 + r} ${y1} Z`
|
|
130
|
+
}
|
|
131
|
+
function drawShape (t = 1) {
|
|
132
|
+
const grid = root.querySelector('.kl-detail')?.parentElement
|
|
133
|
+
const det = grid && grid.querySelector('.kl-detail')
|
|
134
|
+
const card = grid && grid.querySelector('.kl-card.open')
|
|
135
|
+
if (!det || !card) return
|
|
136
|
+
let svg = grid.querySelector(':scope > .kl-shape')
|
|
137
|
+
if (!svg) { grid.insertAdjacentHTML('afterbegin', '<svg class="kl-shape" aria-hidden="true"><path/></svg>'); svg = grid.firstElementChild }
|
|
138
|
+
svg.firstElementChild.setAttribute('d', shapePath(grid, card, det, t))
|
|
139
|
+
}
|
|
140
|
+
// Pours the row in (its height from nothing to its own, spreading out of the card) or out, then calls `done`.
|
|
141
|
+
function pour (det, way, done = () => {}) {
|
|
142
|
+
const inner = det.firstElementChild
|
|
143
|
+
const full = inner.offsetHeight
|
|
144
|
+
const from = way === 'in' ? 0 : det.offsetHeight
|
|
145
|
+
const to = way === 'in' ? full : 0
|
|
146
|
+
const ms = way === 'in' ? 520 : 300
|
|
147
|
+
const start = performance.now()
|
|
148
|
+
let raf = 0
|
|
149
|
+
const ease = way === 'in' ? (x) => 1 - Math.pow(1 - x, 3) : (x) => x * x
|
|
150
|
+
const frame = (now) => {
|
|
151
|
+
const x = Math.min(1, (now - start) / ms)
|
|
152
|
+
const hgt = from + (to - from) * ease(x)
|
|
153
|
+
det.style.height = `${hgt}px`
|
|
154
|
+
inner.style.opacity = String(way === 'in' ? Math.max(0, (x - 0.35) / 0.65) : Math.max(0, 1 - x * 2))
|
|
155
|
+
drawShape(full ? hgt / full : 0)
|
|
156
|
+
if (x < 1) raf = requestAnimationFrame(frame)
|
|
157
|
+
else { det.style.height = ''; inner.style.opacity = ''; done() }
|
|
158
|
+
}
|
|
159
|
+
cancelAnimationFrame(raf)
|
|
160
|
+
raf = requestAnimationFrame(frame)
|
|
87
161
|
}
|
|
88
162
|
|
|
89
163
|
function callsHtml () {
|
|
@@ -129,6 +203,9 @@ export function mountConnections (root, { type, id, page = false, sessions = [],
|
|
|
129
203
|
let end = opened
|
|
130
204
|
while (end.nextElementSibling && end.nextElementSibling.offsetTop === opened.offsetTop) end = end.nextElementSibling
|
|
131
205
|
end.insertAdjacentHTML('afterend', openRowHtml(openApp_, ownApps.has(openApp_.slug)))
|
|
206
|
+
const det = end.nextElementSibling
|
|
207
|
+
if (ui.pour === 'in' && !reduced()) { det.style.height = '0px'; det.firstElementChild.style.opacity = '0'; pour(det, 'in') } else drawShape(1)
|
|
208
|
+
ui.pour = null
|
|
132
209
|
}
|
|
133
210
|
if (had) { const s = root.querySelector('[data-search]'); s.focus(); s.setSelectionRange(s.value.length, s.value.length) }
|
|
134
211
|
}
|
|
@@ -178,10 +255,10 @@ export function mountConnections (root, { type, id, page = false, sessions = [],
|
|
|
178
255
|
root.addEventListener('keydown', (e) => {
|
|
179
256
|
const card = e.target.matches && e.target.matches('[data-open]') ? e.target : null
|
|
180
257
|
if (card && (e.key === 'Enter' || e.key === ' ')) { e.preventDefault(); openApp(card.dataset.open) }
|
|
181
|
-
if (e.key === 'Escape' && ui.open)
|
|
258
|
+
if (e.key === 'Escape' && ui.open) closeApp()
|
|
182
259
|
})
|
|
183
260
|
// A resize moves cards between rows: the open one's row moves with it.
|
|
184
|
-
const onResize = () => { if (ui.open) draw() }
|
|
261
|
+
const onResize = () => { if (ui.open) draw() } // the row moves under its card's new row, and the shape is redrawn
|
|
185
262
|
window.addEventListener('resize', onResize)
|
|
186
263
|
|
|
187
264
|
root.addEventListener('change', async (e) => {
|
|
@@ -214,7 +291,6 @@ export function mountConnections (root, { type, id, page = false, sessions = [],
|
|
|
214
291
|
load()
|
|
215
292
|
return
|
|
216
293
|
}
|
|
217
|
-
if (e.target.closest('[data-close-open]')) { ui.open = null; draw(); return }
|
|
218
294
|
const card = e.target.closest('[data-open]')
|
|
219
295
|
if (card && !e.target.closest('button, a, input, label')) { openApp(card.dataset.open); return }
|
|
220
296
|
const tab = e.target.closest('[data-group]')
|