Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
slides: indent and outdent bullets — Tab / Shift+Tab while editing, Indent / Outdent in the panel (#695)
nyblnet3b20e33feeac
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex c8a37cda..760728ad 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -2394,6 +2394,12 @@ jobs:# restores; paste moves it to the pointer in one undo step, across# slides, without two elements sharing an id on one slide.run: node scripts/test-slides-ghost-cut-browser.mjs+ - name: Bullet indent in Chromium+ # Tab / Shift+Tab nest and un-nest list items (and typed bullets) while+ # editing, with the caret kept and ⌘Z right after; the panel's Indent /+ # Outdent do the same; committed, one undo step; Tab outside a list —+ # a plain box, a table cell — is unchanged.+ run: node scripts/test-slides-bullet-indent-browser.mjs- name: Leaving an inline code run in Chromium# A text box that already ends a line in `code` (reopened, pasted):# typing at the end of that line is plain text, at the box's end ordiff --git a/CHANGELOG.md b/CHANGELOG.mdindex 9d4d37bb..653c672b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -11,6 +11,13 @@ pre-1.0.## [Unreleased]+- **Indent and outdent bullets.** While editing text, Tab moves the bullet+ under the caret one level deeper, beneath the one above it, and Shift+Tab+ moves it back up; select several lines to move them together. This works on+ lists and on bullets you type with "- ". The Typography panel has matching+ Outdent and Indent buttons; with nothing open for editing they apply to the+ whole text box. Tab anywhere else does what it did before. Asked for in+ discussion #368.- **Typing after inline code at the end of a line is plain text again.** In atext box that already ended a line with `code` — one you saved and reopened,or pasted — the caret could only sit inside the code, so everything typed atdiff --git a/scripts/test-slides-bullet-indent-browser.mjs b/scripts/test-slides-bullet-indent-browser.mjsnew file mode 100644index 00000000..f9b093fe--- /dev/null+++ b/scripts/test-slides-bullet-indent-browser.mjs@@ -0,0 +1,155 @@+// SPDX-License-Identifier: MIT+// Copyright (c) 2026 The Bento authors+// Indent and outdent bullets (discussion #368) in the packaged editor.+//+// npm run build:single --prefix slides && node scripts/test-slides-bullet-indent-browser.mjs+//+// WHAT THIS PROVES, with real keys and clicks (slides/src/editor/listindent.ts):+// 1. editing a list, Tab on item 2 nests it under item 1 and Shift+Tab puts+// it back; the caret stays in the box; Tab on the first item or Shift+Tab+// at the top level changes nothing and does NOT throw focus out;+// 2. ⌘Z straight after a Tab restores the box;+// 3. committed, the nesting is the format's own (<li>…<ul><li>…) and it is+// ONE undo step;+// 4. typed bullets ("- a", "- b") indent too: the second becomes a sub-bullet+// of the first once committed;+// 5. the panel's Indent / Outdent do the same: under the caret while editing+// (the caret stays), the whole box as one undo step when not;+// 6. Tab outside a list is unchanged: a plain text box still lets focus go,+// and a table cell still moves to the next cell.+const { chromium } = await import(process.env.PLAYWRIGHT_MODULE || 'playwright')++let checks = 0+let failures = 0+function ok(cond, msg) {+ checks+++ if (!cond) { failures++; console.log(` FAIL ${msg}`) } else console.log(` ok ${msg}`)+}+const MOD = process.platform === 'darwin' ? 'Meta' : 'Control'+const LIST = '<ul><li>One</li><li>Two</li><li>Three</li></ul>'+const NESTED = '<ul><li>One<ul><li>Two</li></ul></li><li>Three</li></ul>'+const norm = (h) => h.replace(/\s+/g, ' ').replace(/<br>(?=<\/li>)/g, '')++const browser = await chromium.launch({ executablePath: process.env.CHROME_PATH, headless: true })+try {+ const p = await browser.newPage({ viewport: { width: 1440, height: 1000 } })+ await p.route(/^https?:/, (r) => r.abort())+ const errors = []+ p.on('pageerror', (e) => errors.push(e.message))+ await p.goto(new URL('../slides/dist-single/Bento_Slides.bento.html', import.meta.url).href)+ await p.waitForFunction(() => window.bento?.doc && document.querySelector('.ed-stage-scale'))++ await p.evaluate(([list]) => {+ const d = JSON.parse(JSON.stringify(window.bento.doc))+ const text = (id, y, html) => ({ id, type: 'text', x: 120, y, w: 520, h: 150, rotation: 0, opacity: 1, html, fontSize: 28, color: '#1E2A3A', align: 'left' })+ d.slides = [{ id: 's1', background: '#ffffff', elements: [+ text('list', 60, list),+ text('typed', 240, 'x'),+ text('plain', 420, 'Plain words'),+ { id: 'tbl', type: 'table', x: 700, y: 60, w: 420, h: 120, rotation: 0, opacity: 1, columns: [{ w: 1 }, { w: 1 }], header: false,+ rows: [{ cells: [{ html: 'A' }, { html: 'B' }] }, { cells: [{ html: 'C' }, { html: 'D' }] }], style: {} },+ ] }]+ window.bento.loadDoc(JSON.stringify(d))+ }, [LIST])+ await p.waitForTimeout(400)++ const inner = (id) => `.ed-stage-scale [data-el-id="${id}"] .bento-text-inner`+ const html = (id) => p.evaluate((i) => window.bento.doc.slides[0].elements.find((e) => e.id === i).html, id)+ const live = (id) => p.evaluate((s) => document.querySelector(s).innerHTML, inner(id))+ const focusedIn = (id) => p.evaluate((s) => document.querySelector(s)?.contains(document.activeElement), inner(id))+ const edit = async (id) => {+ const b = await p.locator(`.ed-stage-scale [data-el-id="${id}"]`).boundingBox()+ await p.mouse.dblclick(b.x + 30, b.y + 20)+ await p.waitForTimeout(200)+ }+ // put the caret at the end of the item whose own text is `word`+ const caretAfter = (id, word) => p.evaluate(([s, w]) => {+ const root = document.querySelector(s)+ const walk = document.createTreeWalker(root, NodeFilter.SHOW_TEXT)+ for (let n = walk.nextNode(); n; n = walk.nextNode()) if (n.data.trim() === w) {+ const r = document.createRange(); r.setStart(n, n.data.length); r.collapse(true)+ const sel = getSelection(); sel.removeAllRanges(); sel.addRange(r); return true+ }+ return false+ }, [inner(id), word])+ const commit = async () => { await p.keyboard.press('Escape'); await p.waitForTimeout(250) }++ console.log('\nTab / Shift+Tab on a list item\n')+ await edit('list')+ await caretAfter('list', 'Two')+ await p.keyboard.press('Tab')+ ok(norm(await live('list')) === NESTED, `Tab nests item 2 under item 1 (${norm(await live('list'))})`)+ ok(await focusedIn('list'), 'the caret stays in the box')+ await p.keyboard.press('Shift+Tab')+ ok(norm(await live('list')) === LIST, 'Shift+Tab puts it back')+ await caretAfter('list', 'One')+ await p.keyboard.press('Tab')+ ok(norm(await live('list')) === LIST && await focusedIn('list'), 'Tab on the first item changes nothing and keeps focus')+ await p.keyboard.press('Shift+Tab')+ ok(norm(await live('list')) === LIST && await focusedIn('list'), 'Shift+Tab at the top level changes nothing and keeps focus')++ console.log('\n⌘Z straight after\n')+ await caretAfter('list', 'Two')+ await p.keyboard.press('Tab')+ await p.keyboard.press(`${MOD}+z`)+ ok(norm(await live('list')) === LIST, '⌘Z after a Tab restores the box')++ console.log('\ncommitted: the format\'s own nesting, one undo step\n')+ await caretAfter('list', 'Two')+ await p.keyboard.press('Tab')+ await commit()+ ok(norm(await html('list')) === NESTED, `the stored html nests (${norm(await html('list'))})`)+ await p.evaluate(() => window.bento.undo())+ await p.waitForTimeout(150)+ ok(norm(await html('list')) === LIST, 'one undo takes the whole edit back')++ console.log('\ntyped bullets\n')+ await edit('typed')+ await p.keyboard.type('- a')+ await p.keyboard.press('Enter')+ await p.keyboard.type('- b')+ await p.keyboard.press('Tab')+ const typedLive = await live('typed')+ ok(/◦/.test(typedLive) && await focusedIn('typed'), 'Tab on a typed "- b" bullet makes it a sub-bullet, caret kept')+ await commit()+ ok(/<ul><li>a<ul><li>b<\/li><\/ul><\/li><\/ul>/.test(norm(await html('typed'))), `committed, b is nested under a (${norm(await html('typed'))})`)++ console.log('\nthe panel buttons\n')+ const panelBtn = (label) => p.locator('.ed-shift-row .ed-btn', { hasText: label })+ await edit('list')+ await caretAfter('list', 'Two')+ await panelBtn('Indent').click()+ ok(norm(await live('list')) === NESTED && await focusedIn('list'), 'editing: Indent nests the item under the caret, caret kept')+ await panelBtn('Outdent').click()+ ok(norm(await live('list')) === LIST, 'editing: Outdent puts it back')+ await commit()+ await p.keyboard.press('Escape')+ const b = await p.locator('.ed-stage-scale [data-el-id="list"]').boundingBox()+ await p.mouse.click(b.x + 30, b.y + 20)+ await p.waitForTimeout(200)+ await panelBtn('Indent').click()+ await p.waitForTimeout(150)+ ok(norm(await html('list')) === '<ul><li>One<ul><li>Two</li><li>Three</li></ul></li></ul>', `not editing: the whole box indents (${norm(await html('list'))})`)+ await p.evaluate(() => window.bento.undo())+ await p.waitForTimeout(150)+ ok(norm(await html('list')) === LIST, 'and one undo takes it back')++ console.log('\nTab outside a list is unchanged\n')+ await edit('plain')+ await p.keyboard.press('Tab')+ await p.waitForTimeout(150)+ ok(!(await focusedIn('plain')), 'in a plain text box, Tab still lets focus go')+ ok((await html('plain')) === 'Plain words', 'and the text is untouched')+ const cell = await p.locator('.ed-stage-scale [data-el-id="tbl"] td').first().boundingBox()+ await p.mouse.dblclick(cell.x + cell.width / 2, cell.y + cell.height / 2)+ await p.waitForTimeout(200)+ await p.keyboard.press('Tab')+ await p.waitForTimeout(150)+ const nowIn = await p.evaluate(() => (document.activeElement?.closest?.('td')?.textContent ?? document.activeElement?.textContent ?? '').trim())+ ok(nowIn === 'B', `in a table cell, Tab still moves to the next cell (now in "${nowIn}")`)++ ok(errors.length === 0, `no page errors${errors.length ? ': ' + errors.join('; ') : ''}`)+} finally { await browser.close() }++console.log(`\n${checks - failures}/${checks} checks passed`)+process.exit(failures ? 1 : 0)diff --git a/slides/src/editor/canvas.ts b/slides/src/editor/canvas.tsindex 8878684e..b2266cf1 100644--- a/slides/src/editor/canvas.ts+++ b/slides/src/editor/canvas.ts@@ -12,6 +12,7 @@ import { defaultShape, internAsset, readableInk, uid, type ShapeElement, type Slimport { estimatedFrames, fencedElements, splitFences, toggleCodeOnSelection, type FencePart, type PartFrame } from './codefence'import { renderSlide, sanitizeHtml } from '../render'import { autoformatAtCaret, clearAutoformat, markdownToHtml, stripMarkerEscapes, undoAutoformat } from './markdown'+import { inList, shiftList, shiftListHtml, undoIndent } from './listindent'import { bulletsToLists } from './bullets'import { clipboardToHtml } from './paste'import { execFormat, hideFormatBar, syncFormatBar } from './richtext'@@ -1488,6 +1489,17 @@ export class SlideCanvas {this.commitTextEdit()return}+ // Tab / Shift+Tab in a bullet indents / outdents it (listindent.ts);+ // anywhere else Tab does what it always did+ if (ev.key === 'Tab' && !ev.metaKey && !ev.ctrlKey && !ev.altKey) {+ const sel = document.getSelection()+ const range = sel?.rangeCount ? sel.getRangeAt(0) : null+ if (range && inList(inner, range)) {+ ev.preventDefault()+ shiftList(inner, range, ev.shiftKey ? -1 : 1, true)+ return+ }+ }// ` on a selection wraps each selected line as code (on code: unwraps);// with nothing selected it types a backtick as usual (codefence.ts).// Not on the select-all that entering the box makes: typing ``` there@@ -1505,7 +1517,7 @@ export class SlideCanvas {// ⌘Z right after a markdown conversion restores the literal markers;// otherwise the browser's native contentEditable undo runsif (ev.key.toLowerCase() === 'z' && !ev.shiftKey) {- if (undoAutoformat()) ev.preventDefault()+ if (undoAutoformat() || undoIndent(inner)) ev.preventDefault()return}const cmd = { b: 'bold', i: 'italic', u: 'underline' }[ev.key.toLowerCase()]@@ -1826,6 +1838,24 @@ export class SlideCanvas {return !!this.editing}+ /** The panel's Indent / Outdent: the bullets under the caret while a text+ * box is open, else the whole selected text box as one undo step. */+ indentList(dir: 1 | -1): boolean {+ if (this.editing && !this.editingCell) {+ const inner = this.editing.querySelector<HTMLElement>('.bento-text-inner')+ const sel = document.getSelection()+ if (!inner || !sel?.rangeCount) return false+ return shiftList(inner, sel.getRangeAt(0), dir, true)+ }+ const el = this.store.selectedElements+ if (el.length !== 1 || el[0].type !== 'text') return false+ const html = shiftListHtml(el[0].html, dir)+ if (html === null) return false+ const id = el[0].id+ this.store.commit(() => { const e = this.store.element(id); if (e?.type === 'text') e.html = html })+ return true+ }+/** The element node whose text is open for editing, if any. Callers that run* on a PRESS need this: the press itself blurs the caret and commits, so by* the event after it the answer has already changed. */diff --git a/slides/src/editor/editor.ts b/slides/src/editor/editor.tsindex 06d99fe6..60419c82 100644--- a/slides/src/editor/editor.ts+++ b/slides/src/editor/editor.ts@@ -596,6 +596,7 @@ export class Editor {this.canvas.onCommentModeChange = (on) => commentB.classList.toggle('ed-btn-armed', on)this.canvas.onSlideNav = (dir) => this.store.goToLinear(dir)this.panel = new PropsPanel(this.props, this.store)+ this.panel.onListIndent = (dir) => { this.canvas.indentList(dir) }if (!canWriteDeck(this.store.doc.collab)) this.enterReaderMode()}diff --git a/slides/src/editor/listindent.ts b/slides/src/editor/listindent.tsnew file mode 100644index 00000000..f89b3ec3--- /dev/null+++ b/slides/src/editor/listindent.ts@@ -0,0 +1,183 @@+// SPDX-License-Identifier: MIT+// Copyright (c) 2026 The Bento authors+/**+ * Indent and outdent bullets (discussion #368): Tab / Shift+Tab while editing+ * a text box, and the Indent / Outdent buttons in the Typography panel.+ *+ * No new format. A sub-bullet is already a list nested in the item before it+ * (`<li>…<ul><li>…</li></ul></li>`) — what bulletsToLists makes of a typed+ * "◦" line and what the formatting bar's lists hold — so this only moves items+ * between those levels, and a deck that never used it renders identically.+ *+ * - A real list item (`<li>`, any depth): indent moves it into a list nested+ * at the end of the item before it; outdent moves it back out, after the+ * item it was nested in, taking the items that followed it along as its+ * own children (the rule every word processor uses). The first item of a+ * list cannot indent and a top-level item cannot outdent: both are no-ops.+ * - A typed bullet glyph not yet committed ("• " / indented "◦ " — see+ * markdown.ts and bullets.ts): indent turns "•" into the indented "◦" form,+ * outdent turns it back. Glyphs have the two levels bulletsToLists knows.+ *+ * Every item the selection touches moves (several lines at once), and the+ * caret stays where it was. ⌘Z straight after restores the box (undoIndent),+ * the same one-shot as undoAutoformat, because a DOM move is not in the+ * browser's own undo stack; once the edit ends it is one undo step like any+ * other edit.+ */++const NBSP = ' '+const TOP_GLYPH = /^•[ ]/+const SUB_GLYPH = /^[ ]{2,}◦[ ]/++/** The `<li>`s the selection touches, innermost and in document order. */+function itemsIn(root: HTMLElement, range: Range): HTMLLIElement[] {+ const out = new Set<HTMLLIElement>()+ const own = (n: Node | null) => {+ const li = (n instanceof Element ? n : n?.parentElement)?.closest('li')+ if (li && root.contains(li)) out.add(li as HTMLLIElement)+ }+ if (range.collapsed) { own(range.startContainer); return [...out] }+ const walk = document.createTreeWalker(root, NodeFilter.SHOW_TEXT)+ for (let n = walk.nextNode(); n; n = walk.nextNode()) if (range.intersectsNode(n)) own(n)+ if (!out.size) own(range.startContainer)+ return [...root.querySelectorAll('li')].filter((li) => out.has(li as HTMLLIElement)) as HTMLLIElement[]+}++/** Typed glyph lines the selection touches: a text node that starts a line+ * (first in its block, or right after a <br>) with "• " or an indented "◦ ". */+function glyphsIn(root: HTMLElement, range: Range): Text[] {+ const lineStart = (t: Text) => !t.previousSibling || t.previousSibling.nodeName === 'BR'+ const isGlyph = (t: Text) => lineStart(t) && (TOP_GLYPH.test(t.data) || SUB_GLYPH.test(t.data)) && !t.parentElement?.closest('li')+ const out: Text[] = []+ const walk = document.createTreeWalker(root, NodeFilter.SHOW_TEXT)+ for (let n = walk.nextNode() as Text | null; n; n = walk.nextNode() as Text | null) {+ if (!isGlyph(n)) continue+ if (range.intersectsNode(n) || n === range.startContainer) out.push(n)+ }+ return out+}++function indentItem(li: HTMLLIElement): boolean {+ const prev = li.previousElementSibling+ if (!prev || prev.tagName !== 'LI') return false+ let sub = prev.lastElementChild+ if (!sub || (sub.tagName !== 'UL' && sub.tagName !== 'OL')) {+ sub = document.createElement(li.parentElement!.tagName.toLowerCase())+ prev.appendChild(sub)+ }+ sub.appendChild(li)+ return true+}++function outdentItem(li: HTMLLIElement): boolean {+ const list = li.parentElement!+ const parentItem = list.parentElement+ if (!parentItem || parentItem.tagName !== 'LI') return false+ // the items after it become its children, so the order on screen holds+ const after: Element[] = []+ for (let s = li.nextElementSibling; s; s = s.nextElementSibling) after.push(s)+ if (after.length) {+ let sub = li.lastElementChild+ if (!sub || (sub.tagName !== 'UL' && sub.tagName !== 'OL')) {+ sub = document.createElement(list.tagName.toLowerCase())+ li.appendChild(sub)+ }+ for (const s of after) sub.appendChild(s)+ }+ parentItem.after(li)+ if (!list.children.length) list.remove()+ return true+}++/** Text offset of a boundary point from the start of root (for restoring a caret). */+function offsetOf(root: HTMLElement, node: Node, off: number): number {+ const r = document.createRange()+ r.selectNodeContents(root)+ r.setEnd(node, off)+ return r.toString().length+}++function placeAt(root: HTMLElement, at: number) {+ const walk = document.createTreeWalker(root, NodeFilter.SHOW_TEXT)+ let left = at+ for (let n = walk.nextNode() as Text | null; n; n = walk.nextNode() as Text | null) {+ if (left <= n.data.length) {+ const sel = document.getSelection()+ const r = document.createRange()+ r.setStart(n, left); r.collapse(true)+ sel?.removeAllRanges(); sel?.addRange(r)+ return+ }+ left -= n.data.length+ }+}++/** Is the selection in a bullet at all? Tab there is ALWAYS the list's — even+ * when the step is impossible (first item, top level), it must not fall+ * through to the browser's Tab and throw focus out of the box mid-list. */+export function inList(root: HTMLElement, range: Range): boolean {+ return itemsIn(root, range).length > 0 || glyphsIn(root, range).length > 0+}++let last: { root: HTMLElement; before: string; after: string; caret: number } | null = null++/**+ * Indent (+1) or outdent (−1) what `range` touches inside `root`. Returns+ * whether anything moved. With `keepCaret` the live selection is restored+ * afterwards and ⌘Z can take the step back (undoIndent).+ */+export function shiftList(root: HTMLElement, range: Range, dir: 1 | -1, keepCaret = false): boolean {+ const items = itemsIn(root, range)+ const glyphs = items.length ? [] : glyphsIn(root, range)+ if (!items.length && !glyphs.length) return false+ const before = root.innerHTML+ const sel = document.getSelection()+ const a = sel && sel.rangeCount ? { node: sel.anchorNode!, off: sel.anchorOffset, focus: sel.focusNode!, foff: sel.focusOffset } : null+ const caret = a && root.contains(a.node) ? offsetOf(root, a.node, a.off) : 0+ let moved = false+ if (items.length) {+ // indent in document order (each joins the list its predecessor opened);+ // outdent in reverse (so a later item never becomes an earlier one's child)+ for (const li of dir > 0 ? items : [...items].reverse()) moved = (dir > 0 ? indentItem(li) : outdentItem(li)) || moved+ } else {+ for (const t of glyphs) {+ const shift = (from: RegExp, to: string, delta: number) => {+ if (!from.test(t.data)) return+ const m = t.data.match(from)![0]+ t.replaceData(0, m.length, to)+ moved = true+ if (a && a.node === t) a.off = Math.max(0, a.off + delta)+ if (a && a.focus === t) a.foff = Math.max(0, a.foff + delta)+ }+ if (dir > 0) shift(TOP_GLYPH, `${NBSP}${NBSP}◦${NBSP}`, 2)+ else shift(SUB_GLYPH, `•${NBSP}`, -(t.data.match(SUB_GLYPH)?.[0].length ?? 2) + 2)+ }+ }+ if (!moved) return false+ if (keepCaret && a && sel) {+ // the moved text nodes are the same nodes, only re-parented+ try { sel.setBaseAndExtent(a.node, a.off, a.focus, a.foff) } catch { placeAt(root, caret) }+ last = { root, before, after: root.innerHTML, caret }+ }+ return true+}++/** ⌘Z straight after an indent/outdent: put the box back. One-shot — it only+ * applies while the box is exactly as the step left it. */+export function undoIndent(root: HTMLElement): boolean {+ if (!last || last.root !== root || root.innerHTML !== last.after) return false+ root.innerHTML = last.before+ placeAt(root, last.caret)+ last = null+ return true+}++/** The whole box at once (the panel buttons with nothing open for editing —+ * the same as Tab after double-clicking in, which selects everything). */+export function shiftListHtml(html: string, dir: 1 | -1): string | null {+ const root = document.createElement('div')+ root.innerHTML = html+ const r = document.createRange()+ r.selectNodeContents(root)+ return shiftList(root, r, dir) ? root.innerHTML : null+}diff --git a/slides/src/editor/panels.ts b/slides/src/editor/panels.tsindex 58ddf460..0d6fca9b 100644--- a/slides/src/editor/panels.ts+++ b/slides/src/editor/panels.ts@@ -139,6 +139,9 @@ const fillStyles = (): Array<[string, string]> =>export class PropsPanel {private burst = false+ /** Indent (+1) / outdent (−1) bullets — set by the editor to the canvas,+ * which knows whether a text box is open and where its caret is. */+ onListIndent: ((dir: 1 | -1) => void) | null = nullconstructor(private host: HTMLElement,@@ -1108,6 +1111,25 @@ export class PropsPanel {(e as TextElement).fontSize = Math.round(Math.max(v, 3) * (4 / 3) * 100) / 100}, fin)))this.row('Weight', this.weightSelect(el))+ // Indent / Outdent bullets (#368): the item under the caret while the box+ // is open — a press here must not take the caret away, so mousedown is+ // held — else the whole box. Tab / ⇧Tab do the same while editing.+ const shift = document.createElement('div')+ shift.className = 'ed-shift-row'+ for (const [dir, label, tip] of [+ [-1, t('Outdent'), t('Move the bullet up a level (⇧Tab while editing)')],+ [1, t('Indent'), t('Move the bullet down a level, under the one above (Tab while editing)')],+ ] as const) {+ const b = document.createElement('button')+ b.type = 'button'+ b.className = 'ed-btn'+ b.textContent = label+ b.title = tip+ b.addEventListener('mousedown', (ev) => ev.preventDefault())+ b.addEventListener('click', (ev) => { ev.preventDefault(); this.onListIndent?.(dir) })+ shift.appendChild(b)+ }+ this.row('Bullets', shift)// Text fill: a solid colour, or a multi-stop gradient painted into the glyphs.const tgrad = el.colorGradientthis.row('Fill style', this.labeledSelect(fillStyles(), tgrad ? 'gradient' : 'solid', (v) =>diff --git a/slides/src/i18n/de.ts b/slides/src/i18n/de.tsindex 731ddb57..e5b53a56 100644--- a/slides/src/i18n/de.ts+++ b/slides/src/i18n/de.ts@@ -13,6 +13,11 @@ export const de: Catalog = {"Heading": "Überschrift","Body text": "Fließtext","Bulleted list": "Aufzählung",+ "Bullets": "Aufzählung",+ "Outdent": "Ausrücken",+ "Indent": "Einrücken",+ "Move the bullet up a level (⇧Tab while editing)": "Rückt den Aufzählungspunkt eine Ebene nach oben (⇧Tab beim Bearbeiten)",+ "Move the bullet down a level, under the one above (Tab while editing)": "Rückt den Aufzählungspunkt eine Ebene tiefer, unter den vorigen (Tab beim Bearbeiten)","Numbered list": "Nummerierte Liste","Clear formatting": "Formatierung entfernen","Cut": "Ausschneiden",diff --git a/slides/src/i18n/es.ts b/slides/src/i18n/es.tsindex 5ed4f67d..53b09206 100644--- a/slides/src/i18n/es.ts+++ b/slides/src/i18n/es.ts@@ -13,6 +13,11 @@ export const es: Catalog = {"Heading": "Encabezado","Body text": "Texto normal","Bulleted list": "Lista con viñetas",+ "Bullets": "Viñetas",+ "Outdent": "Reducir sangría",+ "Indent": "Aumentar sangría",+ "Move the bullet up a level (⇧Tab while editing)": "Sube la viñeta un nivel (⇧Tab al editar)",+ "Move the bullet down a level, under the one above (Tab while editing)": "Baja la viñeta un nivel, bajo la anterior (Tab al editar)","Numbered list": "Lista numerada","Clear formatting": "Borrar formato","Cut": "Cortar",diff --git a/slides/src/i18n/fr.ts b/slides/src/i18n/fr.tsindex 74ffc5b7..8eaf1134 100644--- a/slides/src/i18n/fr.ts+++ b/slides/src/i18n/fr.ts@@ -13,6 +13,11 @@ export const fr: Catalog = {"Heading": "Titre","Body text": "Corps de texte","Bulleted list": "Liste à puces",+ "Bullets": "Puces",+ "Outdent": "Désindenter",+ "Indent": "Indenter",+ "Move the bullet up a level (⇧Tab while editing)": "Remonte la puce d’un niveau (⇧Tab en cours d’édition)",+ "Move the bullet down a level, under the one above (Tab while editing)": "Descend la puce d’un niveau, sous la précédente (Tab en cours d’édition)","Numbered list": "Liste numérotée","Clear formatting": "Effacer la mise en forme","Cut": "Couper",diff --git a/slides/src/i18n/it.ts b/slides/src/i18n/it.tsindex d814751b..52c0d889 100644--- a/slides/src/i18n/it.ts+++ b/slides/src/i18n/it.ts@@ -13,6 +13,11 @@ export const it: Catalog = {"Heading": "Intestazione","Body text": "Testo normale","Bulleted list": "Elenco puntato",+ "Bullets": "Elenco puntato",+ "Outdent": "Riduci rientro",+ "Indent": "Aumenta rientro",+ "Move the bullet up a level (⇧Tab while editing)": "Porta il punto elenco su di un livello (⇧Tab durante la modifica)",+ "Move the bullet down a level, under the one above (Tab while editing)": "Porta il punto elenco giù di un livello, sotto il precedente (Tab durante la modifica)","Numbered list": "Elenco numerato","Clear formatting": "Cancella formattazione","Cut": "Taglia",diff --git a/slides/src/i18n/ja.ts b/slides/src/i18n/ja.tsindex fd7bd974..4a60dc7d 100644--- a/slides/src/i18n/ja.ts+++ b/slides/src/i18n/ja.ts@@ -13,6 +13,11 @@ export const ja: Catalog = {"Heading": "見出し","Body text": "本文","Bulleted list": "箇条書き",+ "Bullets": "箇条書き",+ "Outdent": "左へ",+ "Indent": "右へ",+ "Move the bullet up a level (⇧Tab while editing)": "箇条書きを 1 段上げる(編集中は ⇧Tab)",+ "Move the bullet down a level, under the one above (Tab while editing)": "箇条書きを 1 段下げ、上の項目の下に入れる(編集中は Tab)","Numbered list": "番号付きリスト","Clear formatting": "書式をクリア","Cut": "切り取り",diff --git a/slides/src/i18n/packed.ts b/slides/src/i18n/packed.tsindex 54947cc7..48d3d0f1 100644--- a/slides/src/i18n/packed.ts+++ b/slides/src/i18n/packed.ts@@ -24,6 +24,11 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {"Heading": ["見出し","小标题","小標題","Encabezado","Titre","Überschrift","Intestazione","Cabeçalho"],"Body text": ["本文","正文","內文","Texto normal","Corps de texte","Fließtext","Testo normale","Texto normal"],"Bulleted list": ["箇条書き","项目符号列表","項目符號清單","Lista con viñetas","Liste à puces","Aufzählung","Elenco puntato","Lista com marcadores"],+ "Bullets": ["箇条書き","项目符号","項目符號","Viñetas","Puces","Aufzählung","Elenco puntato","Marcadores"],+ "Outdent": ["左へ","减少缩进","減少縮排","Reducir sangría","Désindenter","Ausrücken","Riduci rientro","Diminuir recuo"],+ "Indent": ["右へ","增加缩进","增加縮排","Aumentar sangría","Indenter","Einrücken","Aumenta rientro","Aumentar recuo"],+ "Move the bullet up a level (⇧Tab while editing)": ["箇条書きを 1 段上げる(編集中は ⇧Tab)","将项目符号上移一级(编辑时按 ⇧Tab)","將項目符號上移一層(編輯時按 ⇧Tab)","Sube la viñeta un nivel (⇧Tab al editar)","Remonte la puce d’un niveau (⇧Tab en cours d’édition)","Rückt den Aufzählungspunkt eine Ebene nach oben (⇧Tab beim Bearbeiten)","Porta il punto elenco su di un livello (⇧Tab durante la modifica)","Sobe o marcador um nível (⇧Tab ao editar)"],+ "Move the bullet down a level, under the one above (Tab while editing)": ["箇条書きを 1 段下げ、上の項目の下に入れる(編集中は Tab)","将项目符号下移一级,放到上一项之下(编辑时按 Tab)","將項目符號下移一層,放到上一項之下(編輯時按 Tab)","Baja la viñeta un nivel, bajo la anterior (Tab al editar)","Descend la puce d’un niveau, sous la précédente (Tab en cours d’édition)","Rückt den Aufzählungspunkt eine Ebene tiefer, unter den vorigen (Tab beim Bearbeiten)","Porta il punto elenco giù di un livello, sotto il precedente (Tab durante la modifica)","Desce o marcador um nível, sob o anterior (Tab ao editar)"],"Numbered list": ["番号付きリスト","编号列表","編號清單","Lista numerada","Liste numérotée","Nummerierte Liste","Elenco numerato","Lista numerada"],"Clear formatting": ["書式をクリア","清除格式","清除格式","Borrar formato","Effacer la mise en forme","Formatierung entfernen","Cancella formattazione","Limpar formatação"],"Cut": ["切り取り","剪切","剪下","Cortar","Couper","Ausschneiden","Taglia","Recortar"],diff --git a/slides/src/i18n/pt.ts b/slides/src/i18n/pt.tsindex 4d54ee4b..a286e7a9 100644--- a/slides/src/i18n/pt.ts+++ b/slides/src/i18n/pt.ts@@ -16,6 +16,11 @@ export const pt: Catalog = {"Heading": "Cabeçalho","Body text": "Texto normal","Bulleted list": "Lista com marcadores",+ "Bullets": "Marcadores",+ "Outdent": "Diminuir recuo",+ "Indent": "Aumentar recuo",+ "Move the bullet up a level (⇧Tab while editing)": "Sobe o marcador um nível (⇧Tab ao editar)",+ "Move the bullet down a level, under the one above (Tab while editing)": "Desce o marcador um nível, sob o anterior (Tab ao editar)","Numbered list": "Lista numerada","Clear formatting": "Limpar formatação","Cut": "Recortar",diff --git a/slides/src/i18n/zh-Hans.ts b/slides/src/i18n/zh-Hans.tsindex 18e5b69f..c0ec78c2 100644--- a/slides/src/i18n/zh-Hans.ts+++ b/slides/src/i18n/zh-Hans.ts@@ -13,6 +13,11 @@ export const zhHans: Catalog = {"Heading": "小标题","Body text": "正文","Bulleted list": "项目符号列表",+ "Bullets": "项目符号",+ "Outdent": "减少缩进",+ "Indent": "增加缩进",+ "Move the bullet up a level (⇧Tab while editing)": "将项目符号上移一级(编辑时按 ⇧Tab)",+ "Move the bullet down a level, under the one above (Tab while editing)": "将项目符号下移一级,放到上一项之下(编辑时按 Tab)","Numbered list": "编号列表","Clear formatting": "清除格式","Cut": "剪切",diff --git a/slides/src/i18n/zh-Hant.ts b/slides/src/i18n/zh-Hant.tsindex efde9e99..18d24207 100644--- a/slides/src/i18n/zh-Hant.ts+++ b/slides/src/i18n/zh-Hant.ts@@ -13,6 +13,11 @@ export const zhHant: Catalog = {"Heading": "小標題","Body text": "內文","Bulleted list": "項目符號清單",+ "Bullets": "項目符號",+ "Outdent": "減少縮排",+ "Indent": "增加縮排",+ "Move the bullet up a level (⇧Tab while editing)": "將項目符號上移一層(編輯時按 ⇧Tab)",+ "Move the bullet down a level, under the one above (Tab while editing)": "將項目符號下移一層,放到上一項之下(編輯時按 Tab)","Numbered list": "編號清單","Clear formatting": "清除格式","Cut": "剪下",diff --git a/slides/src/styles.css b/slides/src/styles.cssindex 49423d60..108ac442 100644--- a/slides/src/styles.css+++ b/slides/src/styles.css@@ -1265,6 +1265,9 @@ a.ed-btn { text-decoration: none; } /* the update block's "What's new" link ismargin: 3px 0;}.ed-arrange-row .ed-arrange-cap { width: auto; }+/* Typography → Bullets: Outdent · Indent, two equal halves of the field */+.ed-shift-row { display: flex; gap: 4px; flex: 1; min-width: 0; }+.ed-shift-row .ed-btn { flex: 1; justify-content: center; padding: 4px 6px; font-size: 12px; border: 1px solid var(--line); }.ed-arrange-row .ed-btn {min-width: 0;padding: 5px 0;