diff --git a/src/components/Icon.astro b/src/components/Icon.astro index 61563f4..5a9dd9b 100644 --- a/src/components/Icon.astro +++ b/src/components/Icon.astro @@ -76,6 +76,9 @@ const icons = { slideAdd: 'M3 5h14v10H3zM20 15v6M17 18h6', slideDelete: 'M3 5h18v12H3zM9 8l6 6M15 8l-6 6', textBox: 'M3 5h18v14H3zM8 9h8M12 9v7', + // A table, and a slide on its stand: the group buttons of a narrow strip. + table: 'M3 4h18v16H3zM3 10h18M3 15h18M9 4v16', + slide: 'M3 4h18v12H3zM12 16v4M8 20h8', // A sheet tab with a plus, a sheet tab crossed out. sheetAdd: 'M3 4h12v9H3zM3 8h12M9 4v9M18 14v7M14.5 17.5h7', sheetDelete: 'M3 4h18v12H3zM3 8h18M9 4v12M10 10.5l4 4M14 10.5l-4 4', diff --git a/src/components/viewer/Chrome.astro b/src/components/viewer/Chrome.astro index 91ffdac..dda1f23 100644 --- a/src/components/viewer/Chrome.astro +++ b/src/components/viewer/Chrome.astro @@ -7,6 +7,11 @@ marking tools for a pdf - which is hidden until the pen is pressed. Under that, the tabs of a workbook's sheets. + The strip is the apps' one: the two colours, bold, italic and underline, then + the groups - strikethrough, size and alignment; the table; the slide - with a + thin line before each. Where the row does not fit it never wraps: it closes + into the phone's strip, where a group button swaps the row for that group. + The demo puts all of it inside its own frame, which is hidden until something renders; `/tryit` uses the bar as the page's only bar, where the mark on the left has to stay put and everything about the document has to come and go. So @@ -22,23 +27,23 @@ const { class: className = 'border-b border-outline-variant bg-surface-container px-4 py-2.5', } = Astro.props; -const swatch = - 'relative flex h-7 w-7 shrink-0 items-center justify-center rounded-full transition-colors hover:bg-surface'; const chevron = 'relative -ml-0.5 flex h-7 w-4 shrink-0 items-center justify-center rounded-full text-on-surface-variant transition-colors hover:bg-surface'; +const divider = 'mx-1.5 h-5 w-px shrink-0 bg-outline-variant'; const round = 'flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-outline transition-colors hover:bg-surface disabled:opacity-40 disabled:hover:bg-transparent'; const tool = 'flex h-7 min-w-7 shrink-0 items-center justify-center rounded-full border border-transparent px-1.5 text-sm leading-none transition-colors hover:bg-surface aria-pressed:border-primary aria-pressed:bg-primary aria-pressed:text-on-primary disabled:opacity-40'; -/* Point sizes a document commonly uses; the select shows the selection's own - size where it is one of these and nothing where it is not. */ +/* Point sizes a document commonly uses, as plain numbers; the select shows the + selection's own size where it is one of these and a dash where it is not. + The stepper goes to the next of them. */ const sizes = [8, 9, 10, 11, 12, 14, 16, 18, 20, 24, 28, 32, 36, 48]; /* The alignments in the names `odr.editing.format({align})` takes. */ const aligns = [ { align: 'left', label: 'Align left', icon: 'alignLeft' }, - { align: 'center', label: 'Centre', icon: 'alignCenter' }, + { align: 'center', label: 'Center', icon: 'alignCenter' }, { align: 'right', label: 'Align right', icon: 'alignRight' }, { align: 'justify', label: 'Justify', icon: 'alignJustify' }, ] as const; @@ -49,8 +54,8 @@ const structure = [ { call: 'insertRows', where: 'above', label: 'Insert rows above', icon: 'rowAbove' }, { call: 'insertRows', where: 'below', label: 'Insert rows below', icon: 'rowBelow' }, { call: 'deleteRows', where: '', label: 'Delete rows', icon: 'rowDelete' }, - { call: 'insertColumns', where: 'left', label: 'Insert columns to the left', icon: 'columnLeft' }, - { call: 'insertColumns', where: 'right', label: 'Insert columns to the right', icon: 'columnRight' }, + { call: 'insertColumns', where: 'left', label: 'Insert columns left', icon: 'columnLeft' }, + { call: 'insertColumns', where: 'right', label: 'Insert columns right', icon: 'columnRight' }, { call: 'deleteColumns', where: '', label: 'Delete columns', icon: 'columnDelete' }, ] as const; @@ -127,6 +132,15 @@ const marks = [ + + + + + + + -