Skip to content

Commit

Permalink
build: update icon script for better naming
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Oct 6, 2023
1 parent 84933a1 commit deed107
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 87 deletions.
22 changes: 11 additions & 11 deletions packages/core/src/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function getBuiltinActions(
const leftActions: HashmdAction[] = [
{
title: "Headings",
icon: icons.H,
icon: icons.heading,
handler: {
type: "dropdown",
actions: [1, 2, 3, 4, 5, 6].map((level) => ({
Expand All @@ -168,7 +168,7 @@ export function getBuiltinActions(
},
{
title: locale.bold,
icon: icons.TextBold,
icon: icons.bold,
cheatsheet: `**${locale.boldText}**`,
handler: {
type: "action",
Expand All @@ -180,7 +180,7 @@ export function getBuiltinActions(
},
{
title: locale.italic,
icon: icons.TextItalic,
icon: icons.italic,
cheatsheet: `*${locale.italicText}*`,
handler: {
type: "action",
Expand All @@ -192,7 +192,7 @@ export function getBuiltinActions(
},
{
title: locale.quote,
icon: icons.Quote,
icon: icons.quote,
cheatsheet: `> ${locale.quotedText}`,
handler: {
type: "action",
Expand All @@ -203,7 +203,7 @@ export function getBuiltinActions(
},
{
title: locale.link,
icon: icons.LinkOne,
icon: icons.link,
cheatsheet: `[${locale.linkText}](url)`,
handler: {
type: "action",
Expand All @@ -215,7 +215,7 @@ export function getBuiltinActions(
},
{
title: locale.image,
icon: icons.Pic,
icon: icons.image,
cheatsheet: `![${locale.imageAlt}](url "${locale.imageTitle}")`,
handler: uploadImages
? {
Expand All @@ -240,7 +240,7 @@ export function getBuiltinActions(
},
{
title: locale.code,
icon: icons.Code,
icon: icons.code,
cheatsheet: "`" + locale.codeText + "`",
handler: {
type: "action",
Expand All @@ -252,7 +252,7 @@ export function getBuiltinActions(
},
{
title: locale.codeBlock,
icon: icons.CodeBrackets,
icon: icons.codeBlock,
cheatsheet: "```" + locale.codeLang + "↵",
handler: {
type: "action",
Expand All @@ -264,7 +264,7 @@ export function getBuiltinActions(
},
{
title: locale.ul,
icon: icons.ListTwo,
icon: icons.ul,
cheatsheet: `- ${locale.ulItem}`,
handler: {
type: "action",
Expand All @@ -276,7 +276,7 @@ export function getBuiltinActions(
},
{
title: locale.ol,
icon: icons.OrderedList,
icon: icons.ol,
cheatsheet: `1. ${locale.olItem}`,
handler: {
type: "action",
Expand All @@ -288,7 +288,7 @@ export function getBuiltinActions(
},
{
title: locale.hr,
icon: icons.DividingLine,
icon: icons.hr,
cheatsheet: "---",
},
];
Expand Down
47 changes: 21 additions & 26 deletions packages/core/src/icons.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
// DO NOT EDIT, generated by scripts/icon.ts
export const icons = {
Close:
close:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="m8 8 32 32M8 40 40 8"/></svg>',
H: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M12 5v38M36 5v38M12 24h24"/></svg>',
TextBold:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M24 24c5.506 0 9.969-4.477 9.969-10S29.506 4 24 4H11v20h13ZM28.031 44C33.537 44 38 39.523 38 34s-4.463-10-9.969-10H11v20h17.031Z" clip-rule="evenodd"/></svg>',
TextItalic:
heading:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M12 5v38M36 5v38M12 24h24"/></svg>',
bold: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M24 24c5.506 0 9.969-4.477 9.969-10S29.506 4 24 4H11v20h13ZM28.031 44C33.537 44 38 39.523 38 34s-4.463-10-9.969-10H11v20h17.031Z" clip-rule="evenodd"/></svg>',
italic:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M20 6h16M12 42h16M29 5.952 19 42"/></svg>',
Quote:
quote:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path fill="currentColor" fill-rule="evenodd" d="M18.853 9.116C11.323 13.952 7.14 19.58 6.303 26.003 5 36 13.94 40.893 18.47 36.497 23 32.1 20.285 26.52 17.005 24.994c-3.28-1.525-5.286-.994-4.936-3.033.35-2.038 5.016-7.69 9.116-10.322a.749.749 0 0 0 .114-1.02L20.285 9.3c-.44-.572-.862-.55-1.432-.185ZM38.679 9.116c-7.53 4.836-11.714 10.465-12.55 16.887-1.303 9.997 7.637 14.89 12.167 10.494 4.53-4.397 1.815-9.977-1.466-11.503-3.28-1.525-5.286-.994-4.936-3.033.35-2.038 5.017-7.69 9.117-10.322a.749.749 0 0 0 .113-1.02L40.11 9.3c-.44-.572-.862-.55-1.431-.185Z" clip-rule="evenodd"/></svg>',
LinkOne:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="m26.24 16.373-9.14-9.14c-2.661-2.661-7.035-2.603-9.768.131-2.734 2.734-2.793 7.107-.131 9.768l7.935 7.936M32.903 23.003l7.935 7.935c2.661 2.662 2.603 7.035-.13 9.769-2.735 2.734-7.108 2.792-9.77.13l-9.14-9.14"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M26.11 26.142c2.733-2.734 2.792-7.108.13-9.769M21.799 21.798c-2.734 2.734-2.792 7.108-.131 9.769"/></svg>',
Pic: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M5 10a2 2 0 0 1 2-2h34a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V10Z" clip-rule="evenodd"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M14.5 18a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" clip-rule="evenodd"/><path stroke="currentColor" stroke-linejoin="round" stroke-width="4" d="m15 24 5 4 6-7 17 13v4a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-4l10-10Z"/></svg>',
Code: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M16 13 4 25.432 16 37M32 13l12 12.432L32 37"/><path stroke="currentColor" stroke-linecap="round" stroke-width="4" d="m28 4-7 40"/></svg>',
CodeBrackets:
link: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="m26.24 16.373-9.14-9.14c-2.661-2.661-7.035-2.603-9.768.131-2.734 2.734-2.793 7.107-.131 9.768l7.935 7.936M32.903 23.003l7.935 7.935c2.661 2.662 2.603 7.035-.13 9.769-2.735 2.734-7.108 2.792-9.77.13l-9.14-9.14"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M26.11 26.142c2.733-2.734 2.792-7.108.13-9.769M21.799 21.798c-2.734 2.734-2.792 7.108-.131 9.769"/></svg>',
image:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M5 10a2 2 0 0 1 2-2h34a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V10Z" clip-rule="evenodd"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M14.5 18a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" clip-rule="evenodd"/><path stroke="currentColor" stroke-linejoin="round" stroke-width="4" d="m15 24 5 4 6-7 17 13v4a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-4l10-10Z"/></svg>',
code: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M16 13 4 25.432 16 37M32 13l12 12.432L32 37"/><path stroke="currentColor" stroke-linecap="round" stroke-width="4" d="m28 4-7 40"/></svg>',
codeBlock:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M16 4c-2 0-5 1-5 5v9c0 3-5 5-5 5s5 2 5 5v11c0 4 3 5 5 5M32 4c2 0 5 1 5 5v9c0 3 5 5 5 5s-5 2-5 5v11c0 4-3 5-5 5"/></svg>',
ListTwo:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linejoin="round" stroke-width="4" d="M9 42a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM9 14a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM9 28a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M21 24h22M21 38h22M21 10h22"/></svg>',
OrderedList:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M9 4v9M12 13H6M12 27H6M6 20s3-3 5 0-5 7-5 7M6 34.5s2-3 5-1 0 4.5 0 4.5 3 2.5 0 4.5-5-1-5-1M11 38H9M9 4 6 6M21 24h22M21 38h22M21 10h22"/></svg>',
DividingLine:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M5 24h38M21 38h6M37 38h6M21 10h6M5 38h6M5 10h6M37 10h6"/></svg>',
AlignTextLeftOne:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linejoin="round" stroke-width="4" d="M39 6H9a3 3 0 0 0-3 3v30a3 3 0 0 0 3 3h30a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M26 24H14M34 15H14M32 33H14"/></svg>',
Helpcenter:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linejoin="round" stroke-width="4" d="M39 6H9a3 3 0 0 0-3 3v30a3 3 0 0 0 3 3h30a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M24 28.625v-4a6 6 0 1 0-6-6"/><path fill="currentColor" fill-rule="evenodd" d="M24 37.625a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" clip-rule="evenodd"/></svg>',
LeftExpand:
ul: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linejoin="round" stroke-width="4" d="M9 42a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM9 14a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM9 28a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M21 24h22M21 38h22M21 10h22"/></svg>',
ol: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M9 4v9M12 13H6M12 27H6M6 20s3-3 5 0-5 7-5 7M6 34.5s2-3 5-1 0 4.5 0 4.5 3 2.5 0 4.5-5-1-5-1M11 38H9M9 4 6 6M21 24h22M21 38h22M21 10h22"/></svg>',
hr: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M5 24h38M21 38h6M37 38h6M21 10h6M5 38h6M5 10h6M37 10h6"/></svg>',
toc: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linejoin="round" stroke-width="4" d="M39 6H9a3 3 0 0 0-3 3v30a3 3 0 0 0 3 3h30a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M26 24H14M34 15H14M32 33H14"/></svg>',
help: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linejoin="round" stroke-width="4" d="M39 6H9a3 3 0 0 0-3 3v30a3 3 0 0 0 3 3h30a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M24 28.625v-4a6 6 0 1 0-6-6"/><path fill="currentColor" fill-rule="evenodd" d="M24 37.625a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" clip-rule="evenodd"/></svg>',
write:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><rect width="28" height="36" x="6" y="6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" rx="2"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M42 6v36"/></svg>',
RightExpand:
preview:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><rect width="28" height="36" x="14" y="6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" rx="2"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M6 6v36"/></svg>',
OffScreen:
exitFullscreen:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M33 6v9h9M15 6v9H6M15 42v-9H6M33 42v-9h8.9"/></svg>',
FullScreen:
fullscreen:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M33 6h9v9M42 33v9h-9M15 42H6v-9M6 15V6h9"/></svg>',
GithubOne:
source:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-width="4" d="M29.344 30.477c2.404-.5 4.585-1.366 6.28-2.638C38.52 25.668 40 22.314 40 19c0-2.324-.881-4.494-2.407-6.332-.85-1.024 1.636-8.667-.573-7.638-2.21 1.03-5.45 3.308-7.147 2.805A20.712 20.712 0 0 0 24 7c-1.8 0-3.532.223-5.147.634C16.505 8.232 14.259 6 12 5.03c-2.26-.97-1.026 6.934-1.697 7.765C8.84 14.605 8 16.73 8 19c0 3.314 1.79 6.668 4.686 8.84 1.93 1.446 4.348 2.368 7.054 2.822M19.74 30.662c-1.159 1.275-1.738 2.486-1.738 3.632v8.717M29.345 30.477c1.097 1.44 1.646 2.734 1.646 3.88v8.654M6 31.215c.899.11 1.566.524 2 1.24.652 1.075 3.074 5.063 5.825 5.063h4.177"/></svg>',
};
2 changes: 1 addition & 1 deletion packages/core/src/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class Sidebar extends LitElement {
this.dispatchEvent(new CustomEvent("close"));
}}
>
${unsafeHTML(icons.Close)}
${unsafeHTML(icons.close)}
</div>
<slot></slot>`;
}
Expand Down
12 changes: 6 additions & 6 deletions packages/core/src/toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class Toolbar extends LitElement {
const rightActions: RightAction[] = [
{
title: tocActive ? locale.closeToc : locale.toc,
icon: icons.AlignTextLeftOne,
icon: icons.toc,
handler: {
type: "action",
click: () => {
Expand All @@ -59,7 +59,7 @@ export class Toolbar extends LitElement {
},
{
title: helpActive ? locale.closeHelp : locale.help,
icon: icons.Helpcenter,
icon: icons.help,
handler: {
type: "action",
click: () => {
Expand All @@ -72,7 +72,7 @@ export class Toolbar extends LitElement {
},
{
title: writeActive ? locale.exitWriteOnly : locale.writeOnly,
icon: icons.LeftExpand,
icon: icons.write,
handler: {
type: "action",
click: () => {
Expand All @@ -84,7 +84,7 @@ export class Toolbar extends LitElement {
},
{
title: previewActive ? locale.exitPreviewOnly : locale.previewOnly,
icon: icons.RightExpand,
icon: icons.preview,
handler: {
type: "action",
click: () => {
Expand All @@ -96,7 +96,7 @@ export class Toolbar extends LitElement {
},
{
title: fullscreen ? locale.exitFullscreen : locale.fullscreen,
icon: fullscreen ? icons.OffScreen : icons.FullScreen,
icon: fullscreen ? icons.exitFullscreen : icons.fullscreen,
handler: {
type: "action",
click: () => {
Expand All @@ -106,7 +106,7 @@ export class Toolbar extends LitElement {
},
{
title: locale.source,
icon: icons.GithubOne,
icon: icons.source,
handler: {
type: "action",
click: () => {
Expand Down
7 changes: 3 additions & 4 deletions packages/plugin-gfm/src/icons.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// DO NOT EDIT, generated by scripts/icon.ts
export const icons = {
Strikethrough:
strike:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M5 24h38M24 24c16 6 10 20 0 20s-12-8-12-8M36 12s-3-8-12-8-12.564 7.6-8.39 14"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M12 36s4 8 12 8 12.564-7.6 8.39-14"/></svg>',
CheckCorrect:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" clip-path="url(#a)"><path d="M42 20v19a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3h21"/><path d="m16 20 10 8L41 7"/></g><defs><clipPath id="a"><path fill="currentColor" d="M0 0h48v48H0z"/></clipPath></defs></svg>',
InsertTable:
task: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" clip-path="url(#a)"><path d="M42 20v19a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3h21"/><path d="m16 20 10 8L41 7"/></g><defs><clipPath id="a"><path fill="currentColor" d="M0 0h48v48H0z"/></clipPath></defs></svg>',
table:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="4" d="M39.3 6H8.7A2.7 2.7 0 0 0 6 8.7v30.6A2.7 2.7 0 0 0 8.7 42h30.6a2.7 2.7 0 0 0 2.7-2.7V8.7A2.7 2.7 0 0 0 39.3 6Z"/><path stroke="currentColor" stroke-linecap="round" stroke-width="4" d="M18 6v36M30 6v36M6 18h36M6 30h36"/></svg>',
};
6 changes: 3 additions & 3 deletions packages/plugin-gfm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function gfm({
actions: [
{
title: locale.strike,
icon: icons.Strikethrough,
icon: icons.strike,
cheatsheet: `~~${locale.strikeText}~~`,
handler: {
type: "action",
Expand All @@ -38,7 +38,7 @@ export default function gfm({
},
{
title: locale.task,
icon: icons.CheckCorrect,
icon: icons.task,
cheatsheet: `- [ ] ${locale.taskText}`,
handler: {
type: "action",
Expand All @@ -49,7 +49,7 @@ export default function gfm({
},
{
title: locale.table,
icon: icons.InsertTable,
icon: icons.table,
handler: {
type: "action",
click({ editor }) {
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-math/src/utils/icons.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// DO NOT EDIT, generated by scripts/icon.ts
export const icons = {
Formula:
formula:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="m40 9-3-3H8l18 18L8 42h29l3-3"/></svg>',
Inline:
block:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="m37 9-3-3H8l17 18L8 42h26l3-3M5 24h10M33 24h10"/></svg>',
Block:
inline:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="m36 11-3-3H12l16 16-16 16h21l3-3M6 5v38M42 5v38"/></svg>',
};
Loading

0 comments on commit deed107

Please sign in to comment.