Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
sidebar: select several slides and move them as a block; a dragged slide keeps its states (#528)
nyblneta715e9852d16
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 0443dce9..344aca96 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -379,6 +379,11 @@ jobs:# file carrying a script tag.run: node scripts/test-preview.ts+ - name: sidebar multi-select — a block move keeps order and carries states+ # Discussion #514. The unit is a parent with its states; the old+ # single-index splice left states behind, which this rig shows.+ run: node scripts/test-slides-multiselect.ts+- name: presence toasts — said once per real arrival and departure# A hidden tab's heartbeat arrives once a minute, the room drops the# peer and the next beat brings them back: "left" / "joined" everydiff --git a/CHANGELOG.md b/CHANGELOG.mdindex 8ae709b8..bc304af4 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -11,6 +11,15 @@ pre-1.0.## [Unreleased]+- **Select several slides in the sidebar and move them together.** ⌘/Ctrl-click+ adds a slide to the selection, ⇧-click selects a range from the current one,+ and dragging any selected slide moves the whole selection as a block, in its+ order, as one undoable step; Delete removes the selection with the usual+ warning about states and links. A slide's interactive states now travel with+ it when it is dragged — before this a moved slide left its states behind,+ nested under whatever slide was now before them. Asked for in discussion+ #514.+## [1.2.2] — 2026-09-19- **A deck full of photos can be shared live again.** A deck whose picturesdiff --git a/scripts/test-slides-multiselect.ts b/scripts/test-slides-multiselect.tsnew file mode 100644index 00000000..79a0da6a--- /dev/null+++ b/scripts/test-slides-multiselect.ts@@ -0,0 +1,89 @@+#!/usr/bin/env node+// SPDX-License-Identifier: MIT+// Copyright (c) 2026 The Bento authors+// Several slides selected in the sidebar and moved as a block+// (slides/src/editor/slidesel.ts) — discussion #514:+//+// node scripts/test-slides-multiselect.ts+//+// WHAT THIS PROVES. The unit is a parent with its states. Select 1, 3 and 5+// (0-based; slide 3 has two states) and drop on 7: the block lands before+// the slide that was at 7, in its original relative order, states right+// behind their parent, one array out. A range and a toggle are parent-only.+// A drop onto the selection is a no-op. Deleting a selection plans the+// cascade the single delete does. And the old single-index splice is shown+// to have LEFT STATES BEHIND, which is requirement 3.++import { deletePlan, expand, moveBlock, parents, range, toggle, unitOf } from '../slides/src/editor/slidesel.ts'++let failures = 0, checks = 0+const ok = (cond: boolean, msg: string) => { checks++; if (!cond) { failures++; console.log(` FAIL ${msg}`) } else console.log(` ok ${msg}`) }++type S = { id: string; stateOf?: string; elements: Array<{ link?: string }> }+const mk = (): S[] => [+ { id: 'a', elements: [] }, // 0+ { id: 'b', elements: [{ link: 'd' }] }, // 1 ← selected+ { id: 'c', elements: [] }, // 2+ { id: 'd', elements: [] }, // 3 ← selected, a parent+ { id: 'd1', stateOf: 'd', elements: [] }, // 4 its state+ { id: 'd2', stateOf: 'd', elements: [] }, // 5 its state (index 5 is a STATE — selecting it means its parent)+ { id: 'e', elements: [] }, // 6+ { id: 'f', elements: [] }, // 7 ← drop target+ { id: 'g', elements: [] }, // 8+]+const ids = (s: S[]) => s.map((x) => x.id).join(' ')++console.log('\nunits')+{+ const s = mk()+ ok(unitOf(s, 3).join(',') === '3,4,5', 'a parent with its two states is one unit')+ ok(unitOf(s, 1).join(',') === '1', 'a plain slide is a unit of one')+ ok(parents(s, [5, 1, 3, 3]).join(',') === '1,3', 'a selection normalises to parents, unique, in order (a state selects its parent)')+ ok(expand(s, [1, 3]).join(',') === '1,3,4,5', 'expanding a selection lists the states too')+ ok(range(s, 1, 6).join(',') === '1,2,3,6', 'a Shift range covers the parents between, never a state')+ ok(range(s, 6, 1).join(',') === '1,2,3,6', 'in either direction')+ ok(toggle(s, [1], 3).join(',') === '1,3' && toggle(s, [1, 3], 3).join(',') === '1' && toggle(s, [1], 4).join(',') === '1,3', 'Cmd-click toggles a unit; on a state it toggles the parent')+}++console.log('\nthe move — select 1, 3, 5 and drop on 7')+{+ const s = mk()+ const out = moveBlock(s, [1, 3, 5], 7)+ ok(ids(out) === 'a c e b d d1 d2 f g', `the block lands before the slide that was at 7, relative order kept, states behind their parent → ${ids(out)}`)+ ok(out !== s && ids(s) === 'a b c d d1 d2 e f g', 'a new array; the input untouched')+ ok(out.length === s.length && new Set(out.map((x) => x.id)).size === 9, 'nothing lost, nothing doubled')+ const end = moveBlock(s, [1, 3], s.length)+ ok(ids(end) === 'a c e f g b d d1 d2', `drop past the end appends → ${ids(end)}`)+ const front = moveBlock(s, [3, 7], 0)+ ok(ids(front) === 'd d1 d2 f a b c e g', `drop on 0 leads → ${ids(front)}`)+ const up = moveBlock(s, [7], 1)+ ok(ids(up) === 'a f b c d d1 d2 e g', 'moving one slide up works as the old single drag did')+ ok(moveBlock(s, [1, 3], 4) === s && moveBlock(s, [1, 3], 3) === s, 'a drop onto the selection (a parent or its state) is a no-op — the same array back')+ ok(moveBlock(s, [], 2) === s && moveBlock(s, [99], 2) === s, 'nothing selected, or out of range: no-op')+ ok(moveBlock(s, [1], 2) === s, 'a drop just after itself changes nothing — the same array back')+}++console.log('\nrequirement 3 — what the single-index splice did')+{+ const s = mk()+ const old = [...s]; const [moved] = old.splice(3, 1); old.splice(7, 0, moved)+ ok(ids(old) === 'a b c d1 d2 e f d g', `the old drag moved the parent alone and LEFT ITS STATES BEHIND, nested under c → ${ids(old)}`)+ const now = moveBlock(s, [3], 7)+ ok(ids(now) === 'a b c e d d1 d2 f g', `the block move carries them → ${ids(now)}`)+ const back = moveBlock(now, [4], 1)+ ok(ids(back) === 'a d d1 d2 b c e f g', 'and back again, states still behind')+}++console.log('\ndeleting a selection')+{+ const s = mk()+ const p = deletePlan(s, [3, 1])+ ok([...p.doomed].join(',') === 'b,d,d1,d2' && p.states === 2 && p.links === 0 && p.survives, 'doomed: the parents and their states; links from doomed slides do not count')+ const q = deletePlan(s, [3])+ ok(q.links === 1 && q.states === 2, 'a link into the doomed from a survivor is counted')+ const all = deletePlan(s, [0, 1, 2, 3, 6, 7, 8])+ ok(!all.survives, 'deleting every linear slide is refused (a deck needs one)')+}++console.log(`\n${checks - failures}/${checks} checks passed`)+process.exit(failures ? 1 : 0)diff --git a/slides/src/editor/editor.ts b/slides/src/editor/editor.tsindex 96396c51..86c32856 100644--- a/slides/src/editor/editor.ts+++ b/slides/src/editor/editor.ts@@ -44,6 +44,7 @@ import { compactJson } from '../compact'import { parseDocInputReport } from '../compactload'import { lsGet, lsJson, lsSet } from '../../../kernel/src/storage.ts'import { shrinkImageFile, shrinkEnabled, setShrinkEnabled, shrinkNote, fmtBytes, type ShrinkResult } from './shrink'+import { deletePlan, expand, moveBlock, parents as selParents, range as selRange, toggle as selToggle } from './slidesel'import { dryRun, applyCompress, type DryRun } from './compressdeck'import { createDialog } from '../../../kernel/src/ui/dialog.ts'import '../../../kernel/src/ui/dialog.css'@@ -87,6 +88,10 @@ const SHAPE_MENU: Array<{ kind: ShapeKind; label: string; icon: string; heads?:export class Editor {private canvas!: SlideCanvasprivate panel!: PropsPanel+ /** Sidebar multi-selection: PARENT indices (slidesel.ts). The current slide+ * is the anchor and the canvas slide; this set is what a drag moves and+ * Delete removes. Empty = just the current slide, as before. */+ private thumbSel: number[] = []private sidebar!: HTMLElementprivate props!: HTMLElementprivate dirtyDot!: HTMLElement@@ -113,7 +118,9 @@ export class Editor {) {this.build()this.wireKeyboard()- store.on('slides', () => this.rebuildSidebar())+ // a slide-list change makes the sidebar selection's indices stale: drop it+ // (a drag re-selects the moved block by id right after its commit)+ store.on('slides', () => { this.thumbSel = []; this.rebuildSidebar() })store.on('current', () => this.highlightSidebar())store.on('doc', () => this.scheduleThumbs())store.on('dirty', () => {@@ -1789,10 +1796,17 @@ export class Editor {const tools = div('ed-thumb-tools')tools.append(btn(ICONS.copy, '', (ev) => { ev.stopPropagation(); this.duplicateSlide(i) }, t('Duplicate slide')),- btn(ICONS.trash, '', (ev) => { ev.stopPropagation(); this.deleteSlide(i) }, t('Delete slide')),+ btn(ICONS.trash, '', (ev) => { ev.stopPropagation(); this.deleteSlides(this.thumbTargets(i)) }, t('Delete slide')),)item.append(num, surface, tools)- item.addEventListener('click', () => {+ item.addEventListener('click', (ev) => {+ // Shift = a range from the current slide; Cmd/Ctrl = toggle this one;+ // plain = this one alone (as always). The canvas stays on the current+ // slide for the modified clicks — it is the anchor, not a target.+ const mod = ev.metaKey || ev.ctrlKey+ if (ev.shiftKey && !isState) { this.setThumbSel(selRange(this.store.doc.slides, this.store.currentIndex, i)); return }+ if (mod && !isState) { this.setThumbSel(selToggle(this.store.doc.slides, this.thumbSel.length ? this.thumbSel : [this.store.currentIndex], i)); return }+ this.setThumbSel([])this.store.goTo(i)// On a phone the slide list is a drawer laid OVER the canvas, so picking// a slide left the answer hidden behind the question — you had to find@@ -1936,19 +1950,39 @@ export class Editor {return gap}+ /** The multi-selection, normalised to parents; the sidebar repaints. */+ private setThumbSel(sel: number[]) {+ this.thumbSel = selParents(this.store.doc.slides, sel)+ this.highlightSidebar()+ }++ /** What a sidebar action acts on: the selection when the thumb is in it,+ * else that thumb alone. */+ private thumbTargets(index: number): number[] {+ const inSel = this.thumbSel.includes(index)+ return inSel ? this.thumbSel : [index]+ }+private wireThumbDrag(item: HTMLElement, index: number) {// Select on press, before the browser starts native dragging. Waiting for// click/dragstart leaves Moveable's previous canvas target live while the- // pointer crosses the workspace.+ // pointer crosses the workspace. A modified press (Shift/Cmd/Ctrl) is a+ // selection gesture handled on click; a press on a thumb that is already+ // in the selection keeps the selection (so it can be dragged as a block).item.addEventListener('mousedown', (ev) => {if (ev.button !== 0 || (ev.target instanceof Element && ev.target.closest('.ed-thumb-tools'))) returnev.stopPropagation() // keep the canvas Moveable gesture controller out- this.store.goTo(index)+ if (ev.shiftKey || ev.metaKey || ev.ctrlKey) return+ if (!this.thumbSel.includes(index)) { this.setThumbSel([]); this.store.goTo(index) }})item.addEventListener('dragstart', (ev) => {- ev.dataTransfer!.setData('text/bento-slide', String(index))+ // the payload is every parent index that moves — the selection when+ // this thumb is part of it, else this one; states follow their parent+ ev.dataTransfer!.setData('text/bento-slide', JSON.stringify(this.thumbTargets(index)))ev.dataTransfer!.effectAllowed = 'move'+ item.classList.add('dragging')})+ item.addEventListener('dragend', () => item.classList.remove('dragging'))item.addEventListener('dragover', (ev) => {ev.preventDefault()item.classList.add('drop')@@ -1957,20 +1991,38 @@ export class Editor {item.addEventListener('drop', (ev) => {ev.preventDefault()item.classList.remove('drop')- const from = parseInt(ev.dataTransfer!.getData('text/bento-slide'))- if (Number.isNaN(from) || from === index) return- this.store.commit(() => {- const [moved] = this.store.doc.slides.splice(from, 1)- this.store.doc.slides.splice(index, 0, moved)- }, 'slides')+ this.dropSlides(ev.dataTransfer!.getData('text/bento-slide'), index)})}+ /** Move the dragged units (a JSON list of parent indices, or one index+ * from an older payload) as a block to sit where `index` is; one commit. */+ private dropSlides(payload: string, index: number) {+ let from: number[]+ try { const v = JSON.parse(payload); from = Array.isArray(v) ? v.map(Number) : [Number(v)] } catch { from = [parseInt(payload)] }+ from = from.filter((n) => Number.isInteger(n) && n >= 0)+ if (!from.length) return+ const before = this.store.doc.slides+ const after = moveBlock(before, from, index)+ if (after === before) return+ const currentId = before[this.store.currentIndex]?.id+ const movedIds = expand(before, from).map((i) => before[i].id)+ this.store.commit(() => { this.store.doc.slides = after }, 'slides')+ // the selection follows the slides, by id; the canvas stays on its slide+ const at = after.findIndex((s) => s.id === currentId)+ if (at >= 0 && at !== this.store.currentIndex) this.store.goTo(at)+ this.setThumbSel(after.map((s, i) => (movedIds.includes(s.id) ? i : -1)).filter((i) => i >= 0))+ }+private highlightSidebar() {let active: HTMLElement | undefined+ // the selection paints parents AND their states (they move together)+ const selected = new Set(expand(this.store.doc.slides, this.thumbSel))this.sidebar.querySelectorAll<HTMLElement>('.ed-thumb').forEach((n) => {- const isActive = Number(n.dataset.index) === this.store.currentIndex+ const idx = Number(n.dataset.index)+ const isActive = idx === this.store.currentIndexn.classList.toggle('active', isActive)+ n.classList.toggle('selected', selected.has(idx))if (isActive) active = n})active?.scrollIntoView({ block: 'nearest', inline: 'nearest' })@@ -2014,6 +2066,27 @@ export class Editor {this.store.goTo(i + 1)}+ /** Delete several units at once — the sidebar's multi-selection — with+ * the same cascade and confirm as one slide (states go with parents,+ * links into the doomed are cleared, a linear slide must survive). */+ private deleteSlides(indices: number[]) {+ if (indices.length === 1) return this.deleteSlide(indices[0])+ const plan = deletePlan(this.store.doc.slides, indices)+ if (!plan.survives) return this.toast(t('A deck needs at least one slide'))+ const n = selParents(this.store.doc.slides, indices).length+ const parts = [+ plan.states ? `${plan.states} interactive state${plan.states > 1 ? 's' : ''} will be deleted with them` : '',+ plan.links ? `${plan.links} element link${plan.links > 1 ? 's' : ''} will be cleared` : '',+ ].filter(Boolean).join('; ')+ if (!window.confirm(parts ? t('Delete {n} slides? {parts}.', { n: String(n), parts }) : t('Delete {n} slides?', { n: String(n) }))) return+ const doomed = plan.doomed+ this.store.commit(() => {+ this.store.doc.slides = this.store.doc.slides.filter((s) => !doomed.has(s.id))+ for (const s of this.store.doc.slides) for (const el of s.elements) if (el.link && doomed.has(el.link)) delete el.link+ }, 'slides')+ this.setThumbSel([])+ }+private deleteSlide(i: number) {const target = this.store.doc.slides[i]if (!target) return@@ -2828,6 +2901,7 @@ export class Editor {[`${mod}-${t('scroll')}`, t('Zoom in and out')],[`${mod}+ · ${mod}− · ${mod}0`, t('Zoom in · out · fit the slide')],['← · →', t('Walk the slides when nothing is selected; nudge the selection otherwise')],+ [`${mod}-${t('click')} · ⇧-${t('click')}`, t('Select several slides in the sidebar; drag any of them to move them all, Delete removes them')],])section(colR, t('Lines & curves'), [[t('Shape ▾'), t('Draw a line, curved line or connector — then drag on the canvas')],@@ -3025,6 +3099,10 @@ export class Editor {if (this.store.selection.length) {ev.preventDefault()this.deleteSelection()+ } else if (this.thumbSel.length > 1 && !inField) {+ // a sidebar multi-selection and nothing on the canvas: Delete means the slides+ ev.preventDefault()+ this.deleteSlides(this.thumbSel)}return}@@ -3058,6 +3136,7 @@ export class Editor {return}if (ev.key === 'Escape') {+ if (this.thumbSel.length) this.setThumbSel([])if (this.canvas.isDrawing) this.canvas.cancelDraw()else if (this.canvas.isPathEditing) this.canvas.stopPathEdit(true)else this.store.select([])diff --git a/slides/src/editor/slidesel.ts b/slides/src/editor/slidesel.tsnew file mode 100644index 00000000..dcc314b0--- /dev/null+++ b/slides/src/editor/slidesel.ts@@ -0,0 +1,111 @@+// SPDX-License-Identifier: MIT+// Copyright (c) 2026 The Bento authors+//+// Selecting several slides in the sidebar, and moving them as a block.+// Pure — arrays and indices in, arrays out — so scripts/test-slides-+// multiselect.ts drives it in node; editor.ts does the clicks and the drag.+//+// THE UNIT IS A PARENT WITH ITS STATES. A slide's interactive states+// (`stateOf`) live right after it in the deck and render nested under it;+// they are reachable only through it. So every operation here is on UNITS:+// selecting a parent selects its states, and moving it carries them. The+// single-slide drag this replaces spliced ONE index, so dragging a parent+// left its states where they were — nested, in the sidebar, under whatever+// slide now sat before them (measured; requirement 3 of discussion #514).+//+// Indices are positions in `slides` as it is NOW; a move returns a new+// array and the caller commits it as one 'slides' change.++export interface SlideLike { id: string; stateOf?: string }++/** The parent index of a unit: the slide itself, or a state's parent. */+export function parentOf(slides: SlideLike[], i: number): number {+ const s = slides[i]+ if (!s) return -1+ if (!s.stateOf) return i+ const p = slides.findIndex((x) => x.id === s.stateOf)+ return p >= 0 ? p : i+}++/** The indices of a unit, parent first: the parent and the states that+ * follow it. States that drifted elsewhere still belong to it. */+export function unitOf(slides: SlideLike[], parent: number): number[] {+ const p = slides[parent]+ if (!p || p.stateOf) return parent >= 0 && parent < slides.length ? [parent] : []+ const out = [parent]+ slides.forEach((s, i) => { if (i !== parent && s.stateOf === p.id) out.push(i) })+ return out+}++/** Normalise a selection to parent indices, unique, in deck order. */+export function parents(slides: SlideLike[], selected: Iterable<number>): number[] {+ const set = new Set<number>()+ for (const i of selected) { const p = parentOf(slides, i); if (p >= 0) set.add(p) }+ return [...set].sort((a, b) => a - b)+}++/** Every index a selection covers (parents and their states), in deck order. */+export function expand(slides: SlideLike[], selected: Iterable<number>): number[] {+ const out = new Set<number>()+ for (const p of parents(slides, selected)) for (const i of unitOf(slides, p)) out.add(i)+ return [...out].sort((a, b) => a - b)+}++/** The parents between two indices inclusive (a Shift-click range). */+export function range(slides: SlideLike[], a: number, b: number): number[] {+ const lo = Math.min(a, b), hi = Math.max(a, b)+ const out: number[] = []+ slides.forEach((s, i) => { if (i >= lo && i <= hi && !s.stateOf) out.push(i) })+ if (!out.length) return parents(slides, [a])+ return out+}++/** Toggle one unit in a selection (a Cmd/Ctrl-click). */+export function toggle(slides: SlideLike[], selected: Iterable<number>, i: number): number[] {+ const p = parentOf(slides, i)+ const cur = new Set(parents(slides, selected))+ if (cur.has(p)) cur.delete(p); else cur.add(p)+ return [...cur].sort((a, b) => a - b)+}++/**+ * Move the selected units as one block so that the block starts where the+ * slide at `drop` is now (the sidebar's "insert before this thumb", as the+ * single-slide drag did). Relative order kept. `drop === slides.length`+ * appends. A drop onto the selection itself, or one that would change+ * nothing, returns the same array (the caller commits nothing).+ */+export function moveBlock<T extends SlideLike>(slides: T[], selected: Iterable<number>, drop: number): T[] {+ const moving = new Set(expand(slides, selected))+ if (!moving.size) return slides+ const dropParent = drop >= slides.length ? slides.length : parentOf(slides, drop)+ if (moving.has(dropParent)) return slides+ const block = slides.filter((_, i) => moving.has(i))+ const rest: T[] = []+ let at = -1+ slides.forEach((s, i) => {+ if (i === dropParent) at = rest.length+ if (!moving.has(i)) rest.push(s)+ })+ if (at < 0) at = rest.length+ const out = [...rest.slice(0, at), ...block, ...rest.slice(at)]+ return out.every((s, i) => s === slides[i]) ? slides : out+}++/**+ * What deleting a selection removes and what it breaks: the doomed ids+ * (units), the element links into them, and whether a linear slide+ * survives — the same three the single delete checks.+ */+export function deletePlan(slides: Array<SlideLike & { elements?: Array<{ link?: string }> }>, selected: Iterable<number>): { doomed: Set<string>; states: number; links: number; survives: boolean } {+ const idx = expand(slides, selected)+ const doomed = new Set(idx.map((i) => slides[i].id))+ const states = idx.filter((i) => !!slides[i].stateOf).length+ let links = 0+ for (const s of slides) {+ if (doomed.has(s.id)) continue+ for (const el of s.elements ?? []) if (el.link && doomed.has(el.link)) links+++ }+ const survives = slides.some((s) => !s.stateOf && !doomed.has(s.id))+ return { doomed, states, links, survives }+}diff --git a/slides/src/i18n/de.ts b/slides/src/i18n/de.tsindex 1a189ee6..fa7f487a 100644--- a/slides/src/i18n/de.ts+++ b/slides/src/i18n/de.ts@@ -119,6 +119,10 @@ export const de: Catalog = {"Delete slide": "Folie löschen","Delete this layout": "Dieses Layout löschen","Delete this slide? {parts}.": "Diese Folie löschen? {parts}.",+ "Select several slides in the sidebar; drag any of them to move them all, Delete removes them": "Mehrere Folien in der Seitenleiste auswählen; eine davon ziehen verschiebt alle, Entf löscht sie",+ "Delete {n} slides? {parts}.": "{n} Folien löschen? {parts}.",+ "Delete {n} slides?": "{n} Folien löschen?",+ "click": "Klick","Dissolve the group (⇧⌘G)": "Gruppe auflösen (⇧⌘G)","Document replaced — ⌘Z undoes": "Dokument ersetzt — ⌘Z macht rückgängig","Download updated copy": "Aktualisierte Kopie herunterladen",diff --git a/slides/src/i18n/es.ts b/slides/src/i18n/es.tsindex 44670283..5ba25198 100644--- a/slides/src/i18n/es.ts+++ b/slides/src/i18n/es.ts@@ -119,6 +119,10 @@ export const es: Catalog = {"Delete slide": "Eliminar diapositiva","Delete this layout": "Eliminar este diseño","Delete this slide? {parts}.": "¿Eliminar esta diapositiva? {parts}.",+ "Select several slides in the sidebar; drag any of them to move them all, Delete removes them": "Selecciona varias diapositivas en la barra lateral; arrastra cualquiera para moverlas todas, Suprimir las elimina",+ "Delete {n} slides? {parts}.": "¿Eliminar {n} diapositivas? {parts}.",+ "Delete {n} slides?": "¿Eliminar {n} diapositivas?",+ "click": "clic","Dissolve the group (⇧⌘G)": "Deshacer el grupo (⇧⌘G)","Document replaced — ⌘Z undoes": "Documento reemplazado — ⌘Z deshace","Download updated copy": "Descargar copia actualizada",diff --git a/slides/src/i18n/fr.ts b/slides/src/i18n/fr.tsindex 9f582423..35ea8df5 100644--- a/slides/src/i18n/fr.ts+++ b/slides/src/i18n/fr.ts@@ -119,6 +119,10 @@ export const fr: Catalog = {"Delete slide": "Supprimer la diapositive","Delete this layout": "Supprimer cette disposition","Delete this slide? {parts}.": "Supprimer cette diapositive ? {parts}.",+ "Select several slides in the sidebar; drag any of them to move them all, Delete removes them": "Sélectionner plusieurs diapositives dans la barre latérale ; en faire glisser une les déplace toutes, Suppr les supprime",+ "Delete {n} slides? {parts}.": "Supprimer {n} diapositives ? {parts}.",+ "Delete {n} slides?": "Supprimer {n} diapositives ?",+ "click": "clic","Dissolve the group (⇧⌘G)": "Dissoudre le groupe (⇧⌘G)","Document replaced — ⌘Z undoes": "Document remplacé — ⌘Z annule","Download updated copy": "Télécharger la copie à jour",diff --git a/slides/src/i18n/it.ts b/slides/src/i18n/it.tsindex 9584c01d..22149874 100644--- a/slides/src/i18n/it.ts+++ b/slides/src/i18n/it.ts@@ -119,6 +119,10 @@ export const it: Catalog = {"Delete slide": "Elimina diapositiva","Delete this layout": "Elimina questo layout","Delete this slide? {parts}.": "Eliminare questa diapositiva? {parts}.",+ "Select several slides in the sidebar; drag any of them to move them all, Delete removes them": "Seleziona più diapositive nella barra laterale; trascinane una per spostarle tutte, Canc le elimina",+ "Delete {n} slides? {parts}.": "Eliminare {n} diapositive? {parts}.",+ "Delete {n} slides?": "Eliminare {n} diapositive?",+ "click": "clic","Dissolve the group (⇧⌘G)": "Sciogli il gruppo (⇧⌘G)","Document replaced — ⌘Z undoes": "Documento sostituito — ⌘Z annulla","Download updated copy": "Scarica copia aggiornata",diff --git a/slides/src/i18n/ja.ts b/slides/src/i18n/ja.tsindex fde038bc..3980970f 100644--- a/slides/src/i18n/ja.ts+++ b/slides/src/i18n/ja.ts@@ -119,6 +119,10 @@ export const ja: Catalog = {"Delete slide": "スライドを削除","Delete this layout": "このレイアウトを削除","Delete this slide? {parts}.": "このスライドを削除しますか? {parts}。",+ "Select several slides in the sidebar; drag any of them to move them all, Delete removes them": "サイドバーで複数のスライドを選択。どれかをドラッグするとまとめて移動、Delete でまとめて削除",+ "Delete {n} slides? {parts}.": "{n} 枚のスライドを削除しますか?{parts}。",+ "Delete {n} slides?": "{n} 枚のスライドを削除しますか?",+ "click": "クリック","Dissolve the group (⇧⌘G)": "グループを解除 (⇧⌘G)","Document replaced — ⌘Z undoes": "ドキュメントを置き換えました — ⌘Z で元に戻せます","Download updated copy": "更新版をダウンロード",diff --git a/slides/src/i18n/packed.ts b/slides/src/i18n/packed.tsindex b1ed642a..8e6ea8a6 100644--- a/slides/src/i18n/packed.ts+++ b/slides/src/i18n/packed.ts@@ -130,6 +130,10 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {"Delete slide": ["スライドを削除","删除幻灯片","刪除投影片","Eliminar diapositiva","Supprimer la diapositive","Folie löschen","Elimina diapositiva","Excluir slide"],"Delete this layout": ["このレイアウトを削除","删除此版式","刪除此版面配置","Eliminar este diseño","Supprimer cette disposition","Dieses Layout löschen","Elimina questo layout","Excluir este layout"],"Delete this slide? {parts}.": ["このスライドを削除しますか? {parts}。","删除此幻灯片?{parts}。","刪除此投影片?{parts}。","¿Eliminar esta diapositiva? {parts}.","Supprimer cette diapositive ? {parts}.","Diese Folie löschen? {parts}.","Eliminare questa diapositiva? {parts}.","Excluir este slide? {parts}."],+ "Select several slides in the sidebar; drag any of them to move them all, Delete removes them": ["サイドバーで複数のスライドを選択。どれかをドラッグするとまとめて移動、Delete でまとめて削除","在侧边栏选择多张幻灯片;拖动其中任意一张即可一起移动,Delete 一起删除","在側邊欄選取多張投影片;拖曳其中任意一張即可一起移動,Delete 一起刪除","Selecciona varias diapositivas en la barra lateral; arrastra cualquiera para moverlas todas, Suprimir las elimina","Sélectionner plusieurs diapositives dans la barre latérale ; en faire glisser une les déplace toutes, Suppr les supprime","Mehrere Folien in der Seitenleiste auswählen; eine davon ziehen verschiebt alle, Entf löscht sie","Seleziona più diapositive nella barra laterale; trascinane una per spostarle tutte, Canc le elimina","Selecione vários slides na barra lateral; arraste qualquer um para mover todos, Delete os remove"],+ "Delete {n} slides? {parts}.": ["{n} 枚のスライドを削除しますか?{parts}。","删除 {n} 张幻灯片?{parts}。","刪除 {n} 張投影片?{parts}。","¿Eliminar {n} diapositivas? {parts}.","Supprimer {n} diapositives ? {parts}.","{n} Folien löschen? {parts}.","Eliminare {n} diapositive? {parts}.","Excluir {n} slides? {parts}."],+ "Delete {n} slides?": ["{n} 枚のスライドを削除しますか?","删除 {n} 张幻灯片?","刪除 {n} 張投影片?","¿Eliminar {n} diapositivas?","Supprimer {n} diapositives ?","{n} Folien löschen?","Eliminare {n} diapositive?","Excluir {n} slides?"],+ "click": ["クリック","点击","點按","clic","clic","Klick","clic","clique"],"Dissolve the group (⇧⌘G)": ["グループを解除 (⇧⌘G)","取消编组 (⇧⌘G)","解散群組 (⇧⌘G)","Deshacer el grupo (⇧⌘G)","Dissoudre le groupe (⇧⌘G)","Gruppe auflösen (⇧⌘G)","Sciogli il gruppo (⇧⌘G)","Desfazer o grupo (⇧⌘G)"],"Document replaced — ⌘Z undoes": ["ドキュメントを置き換えました — ⌘Z で元に戻せます","文档已替换 — ⌘Z 可撤销","文件已取代 — ⌘Z 可還原","Documento reemplazado — ⌘Z deshace","Document remplacé — ⌘Z annule","Dokument ersetzt — ⌘Z macht rückgängig","Documento sostituito — ⌘Z annulla","Documento substituído — ⌘Z desfaz"],"Download updated copy": ["更新版をダウンロード","下载更新副本","下載更新副本","Descargar copia actualizada","Télécharger la copie à jour","Aktualisierte Kopie herunterladen","Scarica copia aggiornata","Baixar cópia atualizada"],diff --git a/slides/src/i18n/pt.ts b/slides/src/i18n/pt.tsindex 12b17ac8..b5090736 100644--- a/slides/src/i18n/pt.ts+++ b/slides/src/i18n/pt.ts@@ -111,6 +111,10 @@ export const pt: Catalog = {"Delete slide": "Excluir slide","Delete this layout": "Excluir este layout","Delete this slide? {parts}.": "Excluir este slide? {parts}.",+ "Select several slides in the sidebar; drag any of them to move them all, Delete removes them": "Selecione vários slides na barra lateral; arraste qualquer um para mover todos, Delete os remove",+ "Delete {n} slides? {parts}.": "Excluir {n} slides? {parts}.",+ "Delete {n} slides?": "Excluir {n} slides?",+ "click": "clique","Dissolve the group (⇧⌘G)": "Desfazer o grupo (⇧⌘G)","Document replaced — ⌘Z undoes": "Documento substituído — ⌘Z desfaz","Download updated copy": "Baixar cópia atualizada",diff --git a/slides/src/i18n/zh-Hans.ts b/slides/src/i18n/zh-Hans.tsindex 096ba11f..5a33462c 100644--- a/slides/src/i18n/zh-Hans.ts+++ b/slides/src/i18n/zh-Hans.ts@@ -119,6 +119,10 @@ export const zhHans: Catalog = {"Delete slide": "删除幻灯片","Delete this layout": "删除此版式","Delete this slide? {parts}.": "删除此幻灯片?{parts}。",+ "Select several slides in the sidebar; drag any of them to move them all, Delete removes them": "在侧边栏选择多张幻灯片;拖动其中任意一张即可一起移动,Delete 一起删除",+ "Delete {n} slides? {parts}.": "删除 {n} 张幻灯片?{parts}。",+ "Delete {n} slides?": "删除 {n} 张幻灯片?",+ "click": "点击","Dissolve the group (⇧⌘G)": "取消编组 (⇧⌘G)","Document replaced — ⌘Z undoes": "文档已替换 — ⌘Z 可撤销","Download updated copy": "下载更新副本",diff --git a/slides/src/i18n/zh-Hant.ts b/slides/src/i18n/zh-Hant.tsindex 5694abff..914109d7 100644--- a/slides/src/i18n/zh-Hant.ts+++ b/slides/src/i18n/zh-Hant.ts@@ -119,6 +119,10 @@ export const zhHant: Catalog = {"Delete slide": "刪除投影片","Delete this layout": "刪除此版面配置","Delete this slide? {parts}.": "刪除此投影片?{parts}。",+ "Select several slides in the sidebar; drag any of them to move them all, Delete removes them": "在側邊欄選取多張投影片;拖曳其中任意一張即可一起移動,Delete 一起刪除",+ "Delete {n} slides? {parts}.": "刪除 {n} 張投影片?{parts}。",+ "Delete {n} slides?": "刪除 {n} 張投影片?",+ "click": "點按","Dissolve the group (⇧⌘G)": "解散群組 (⇧⌘G)","Document replaced — ⌘Z undoes": "文件已取代 — ⌘Z 可還原","Download updated copy": "下載更新副本",diff --git a/slides/src/styles.css b/slides/src/styles.cssindex a148cda2..2616a6b5 100644--- a/slides/src/styles.css+++ b/slides/src/styles.css@@ -308,6 +308,10 @@ a.ed-btn { text-decoration: none; } /* the update block's "What's new" link is}.ed-thumb:hover { border-color: #c9d2de; }.ed-thumb.active { border-color: var(--accent); }+/* in the multi-selection: a tint and the accent ring; the active one keeps its ring */+.ed-thumb.selected { border-color: var(--accent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }+.ed-thumb.selected::after { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--accent) 12%, transparent); pointer-events: none; }+.ed-thumb.dragging { opacity: .5; }.ed-thumb.drop { border-color: var(--blue); }.ed-thumb-num {position: absolute;