Initial RuneStone project

This commit is contained in:
Knotty Wyvern
2026-09-26 01:25:42 -07:00
commit bdc15e952d
190 changed files with 25986 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
// Stroke icons share the same 24px grid and weight as IconButton.
export const actionIcons = {
rename: '<path d="M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"/>',
'zoom-in': '<circle cx="10" cy="10" r="7"/><path d="m15 15 6 6M7 10h6M10 7v6"/>',
'zoom-out': '<circle cx="10" cy="10" r="7"/><path d="m15 15 6 6M7 10h6"/>',
close: '<path d="m6 6 12 12M6 18 18 6"/>',
swap: '<path d="M3 7h18m-4-4 4 4-4 4M21 17H3m4-4-4 4 4 4"/>',
bullet: '<path d="M9 5h12M9 12h12M9 19h12"/><circle cx="3" cy="5" r="1"/><circle cx="3" cy="12" r="1"/><circle cx="3" cy="19" r="1"/>',
number: '<path d="M10 5h11M10 12h11M10 19h11M3 3h2v6M3 9h4M3 14c4-3 5 1 2 3l-2 3h4"/>',
task: '<path d="M20 12v8H4V4h10M9 10l4 4 8-11"/>',
heading: '<path d="M5 4v16M19 4v16M5 12h14"/>',
quote: '<path d="M3 4h7v9c0 4-2 6-6 7v-3c2-1 3-2 3-4H3ZM14 4h7v9c0 4-2 6-6 7v-3c2-1 3-2 3-4h-4Z"/>',
table: '<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M3 15h18M9 3v18M15 3v18"/>',
rule: '<path d="M4 12h16"/>',
footnote: '<path d="M4 4h9v16H4ZM7 8h3M7 12h3M16 4l2-1v6M16 9h4"/>',
cut: '<circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="m8 8 12 12M8 16 20 4"/>',
copy: '<rect x="8" y="8" width="12" height="13" rx="2"/><path d="M16 8V3H3v13h5"/>',
paste: '<rect x="5" y="5" width="14" height="16" rx="2"/><rect x="9" y="2" width="6" height="5" rx="1"/><path d="m9 14 2 2 4-4"/>',
'paste-text': '<rect x="5" y="5" width="14" height="16" rx="2"/><path d="M9 5V2h6v3M8 11h8M12 11v7"/>',
format: '<path d="m14 3 7 7-10 10H4v-7ZM11 6l7 7M3 21h18"/>',
bold: '<path d="M6 4h7a4 4 0 0 1 0 8H6zm0 8h8a4 4 0 0 1 0 8H6z"/>',
italic: '<path d="M10 4h10M4 20h10M15 4 9 20"/>',
strike: '<path d="M17 5c-2-3-10-3-10 2 0 2 2 3 5 4M7 19c3 3 10 2 10-2 0-2-2-3-5-4M3 12h18"/>',
highlight: '<path d="m15 3 6 6-9 9-6-6ZM6 12l-3 6 3 3 6-3M3 21h12"/>',
code: '<path d="m7 6-5 6 5 6m10-12 5 6-5 6M14 3l-4 18"/>',
math: '<path d="M19 4H5l7 8-7 8h14"/>',
comment: '<circle cx="6" cy="6" r="3"/><circle cx="18" cy="18" r="3"/><path d="M4 20 20 4"/>',
clear: '<path d="m14 3 7 7-11 11H6l-5-5ZM7 10l7 7M13 21h9"/>',
left: '<path d="M3 5h18M3 10h12M3 15h18M3 20h12"/>',
center: '<path d="M3 5h18M6 10h12M3 15h18M6 20h12"/>',
right: '<path d="M3 5h18M9 10h12M3 15h18M9 20h12"/>',
row: '<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M3 15h18M9 3v18M15 3v18"/><path d="M4 10h16v4H4Z" fill="currentColor" opacity=".25"/>',
column: '<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M3 15h18M9 3v18M15 3v18"/><path d="M10 4h4v16h-4Z" fill="currentColor" opacity=".25"/>',
'row-before': '<rect x="3" y="10" width="18" height="11" rx="2"/><path d="M3 15h18M12 2v6M9 5h6"/>',
'row-after': '<rect x="3" y="3" width="18" height="11" rx="2"/><path d="M3 8h18M12 16v6M9 19h6"/>',
'column-before': '<rect x="10" y="3" width="11" height="18" rx="2"/><path d="M15 3v18M2 12h6M5 9v6"/>',
'column-after': '<rect x="3" y="3" width="11" height="18" rx="2"/><path d="M8 3v18M16 12h6M19 9v6"/>',
up: '<path d="M12 21V3m-7 7 7-7 7 7"/>',
down: '<path d="M12 3v18m-7-7 7 7 7-7"/>',
'move-left': '<path d="M21 12H3m7-7-7 7 7 7"/>',
'move-right': '<path d="M3 12h18m-7-7 7 7-7 7"/>',
trash: '<path d="M3 6h18M9 6V3h6v3M5 6l1 15h12l1-15M10 10v7M14 10v7"/>',
'sort-asc': '<path d="M5 3v18m-3-3 3 3 3-3M12 4h4M12 9h6M12 14h8M12 19h10"/>',
'sort-desc': '<path d="M5 3v18m-3-3 3 3 3-3M12 4h10M12 9h8M12 14h6M12 19h4"/>',
link: '<path d="m10 13 4-4M8 16l-2 2a4 4 0 0 1-6-6l5-5a4 4 0 0 1 6 0m2 1 2-2a4 4 0 0 1 6 6l-5 5a4 4 0 0 1-6 0" transform="translate(1 0)"/>',
external: '<path d="M14 3h7v7M10 14 21 3M10 5H4v16h16v-7"/>',
search: '<circle cx="10" cy="10" r="7"/><path d="m15 15 6 6"/>',
extract: '<path d="M11 4H4v16h16v-7M14 3h7v7M11 13 21 3"/><path d="M7 8h2M7 12h2M7 16h7"/>',
select: '<path d="M8 3H3v5M16 3h5v5M21 16v5h-5M8 21H3v-5M3 11v2M21 11v2M11 3h2M11 21h2"/>',
paragraph: '<path d="M13 21V3h-3a5 5 0 0 0 0 10h3M18 3v18M10 3h12"/>',
insert: '<path d="M3 5h18M3 11h8M3 17h8M17 11v10M12 16h10"/>',
chevron: '<path d="m9 5 7 7-7 7"/>',
plus: '<path d="M12 5v14M5 12h14"/>',
grip: '<circle cx="8" cy="5" r="1"/><circle cx="16" cy="5" r="1"/><circle cx="8" cy="12" r="1"/><circle cx="16" cy="12" r="1"/><circle cx="8" cy="19" r="1"/><circle cx="16" cy="19" r="1"/>',
} as const;
export type ActionIcon = keyof typeof actionIcons;
export function actionIcon(name: ActionIcon): SVGSVGElement {
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
svg.setAttribute("viewBox", "0 0 24 24"); svg.setAttribute("aria-hidden", "true");
svg.classList.add("action-icon"); svg.innerHTML = actionIcons[name];
return svg;
}