// Inline SVG icons for the in-page editor chrome (toolbar, menus, table widget).
//
// Same contract as lib/nav-icons.mjs: tiny hand-inlined SVGs, `currentColor`, no icon
// font, no runtime dependency. Outlines are drawn in the Lucide style (24×24 grid,
// 2px round strokes — Lucide is ISC, same family the nav icons already borrow from)
// so the editor chrome reads as one set. Text glyphs were tried first and failed
// twice: combining characters ("S̶") render as their base letter on most platforms,
// and a glyph carries no weight/optical correction at 16px.
//
// Client-only module, imported by the editor chrome — never part of any build.
const svg = (body: string): string =>
``;
export const ICONS: Record = {
// ── inline formatting ──────────────────────────────────────────────────────
bold: svg(''),
italic: svg(
'',
),
strike: svg(
'',
),
code: svg(''),
link: svg(
'',
),
clear: svg(
'',
),
// ── block types (turn-into + slash palette) ────────────────────────────────
text: svg(
'',
),
heading1: svg(''),
heading2: svg(
'',
),
heading3: svg(
'',
),
heading4: svg(
'',
),
bulletList: svg(
'',
),
orderedList: svg(
'',
),
todoList: svg(''),
quote: svg(''),
codeBlock: svg(
'',
),
table: svg(
'',
),
divider: svg(''),
image: svg(
'',
),
// ── lists / structure ──────────────────────────────────────────────────────
indent: svg(
'',
),
outdent: svg(
'',
),
headerRow: svg(
'',
),
headerCol: svg(
'',
),
alignLeft: svg(
'',
),
alignCenter: svg(
'',
),
alignRight: svg(
'',
),
// ── chrome ─────────────────────────────────────────────────────────────────
pencil: svg(''),
plus: svg(''),
menu: svg(
'',
),
check: svg(''),
close: svg(''),
undo: svg(''),
duplicate: svg(
'',
),
trash: svg(
'',
),
comment: svg(''),
chevronDown: svg(''),
gripRow: svg(
'',
),
};
/** Icon markup for a slash/turn-into command id, so menus can look themselves up. */
export function iconFor(name: string): string {
return ICONS[name] ?? "";
}