Some zones are mutually exclusive β keep or discard. Folders and tags are not: a link about Rust tooling belongs in
dev and in to read. Turn multi on and one card can be stacked into several zones
before it leaves.
Hold and press several zone letters; releasing files them all. Or tap on its own β the shortcut β to latch the mode, and tap again to leave or to file.
Hold the round pad, or rest a finger on the card. Then sweep the card across the zones β each region it reaches joins the stack β and let go. Between zones the card comes back to the centre.
The card gets a dashed amber outline with a breathing ring, and every stacked zone is numbered. Amber, not red: red means error or destruction, and this is neither.
Nothing stacked. Hold and press a s d β¦
waitingβ¦
Esc drops the stack without filing anything. Pressing the same zone twice removes it. The first zone stacked stays the primary one β badge 1 β which is what most hosts treat as the main folder.
One zone still goes through onSort(item, zone). Several go through
onSortMany(item, zones), in the order they were picked. Without onSortMany, the
library falls back to calling onSort once per zone β which is fine for a local update, and not fine
if the filing has to be atomic: if the third call fails, the first two already happened.
new Deck(el, {
items, zones,
multi: true,
onSort: (item, zone) => api.file(item.id, [zone.id]),
onSortMany: (item, zones) => api.file(item.id, zones.map((z) => z.id)),
onUndoMany: (item, zones) => api.unfile(item.id, zones.map((z) => z.id)),
});
el.addEventListener('trieur:pick', (e) => {
// the stack changed β e.detail.zones, e.detail.multi
}); The model learns one example per zone: a card filed in three places teaches three times, and undoing unlearns all three. That is the right behaviour for folders, and it is an approximation worth knowing about β a genuine multi-label model would learn the combination as such.