diff --git a/src/App.svelte b/src/App.svelte index 8c37d48..f0e0d27 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -831,6 +831,9 @@ tick={activeTick} bind:chromeMode bind:documentName + bind:showFormattingMarks + onManageStyles={openStyleManager} + onFind={openFind} {namePlaceholder} {themeMode} onSelectTheme={selectTheme} diff --git a/src/lib/components/ribbon/Ribbon.svelte b/src/lib/components/ribbon/Ribbon.svelte index 3ba3cb0..883577d 100644 --- a/src/lib/components/ribbon/Ribbon.svelte +++ b/src/lib/components/ribbon/Ribbon.svelte @@ -3,18 +3,23 @@ import Icon from './Icon.svelte'; import RibbonMenu from './RibbonMenu.svelte'; import HistoryButton from '../HistoryButton.svelte'; + import HomeTab from './tabs/HomeTab.svelte'; import UiLanguagePicker from '../UiLanguagePicker.svelte'; import { clickOutside, isMenuOpen, toggleMenu, closeMenu } from './menu.svelte'; import { t } from '../../i18n/i18n.svelte'; import { withShortcut } from '../../i18n/shortcut'; import { shortcutHint } from '../../editor/shortcuts'; import type { ChromeMode, ThemeMode } from '../../storage/theme'; + import type { StyleFamily } from '../../styles/styleSheet'; let { editor, tick, chromeMode = $bindable('ribbon'), documentName = $bindable(''), + showFormattingMarks = $bindable(false), + onManageStyles, + onFind, namePlaceholder = '', themeMode = 'auto', onSelectTheme, @@ -26,6 +31,9 @@ tick: number; chromeMode?: ChromeMode; documentName?: string; + showFormattingMarks?: boolean; + onManageStyles?: (family: StyleFamily) => void; + onFind?: (mode: 'find' | 'replace') => void; namePlaceholder?: string; themeMode?: ThemeMode; onSelectTheme?: (mode: ThemeMode) => void; @@ -58,7 +66,7 @@
-
+
-
+

- +
{t().appearance.title}
{#each (['light', 'dark', 'allBlack', 'auto'] as const) as m}
@@ -289,17 +297,6 @@ .appearance-wrap { position: relative; } - /* The heading style RibbonMenu applies to its own `heading` prop, for the second - section of a menu that has two. */ - .menu-heading { - padding: 4px 12px 6px; - font-size: 11px; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.05em; - color: var(--w-text-tertiary); - } - /* The name field grows with its text: the sizer mirrors the value and lends the input its width. */ .doc-name { diff --git a/src/lib/components/ribbon/RibbonMenu.svelte b/src/lib/components/ribbon/RibbonMenu.svelte index 1d3d369..6d13542 100644 --- a/src/lib/components/ribbon/RibbonMenu.svelte +++ b/src/lib/components/ribbon/RibbonMenu.svelte @@ -1,8 +1,11 @@ -