feat: add ability to convert selection in Super to bulleted or numbered list

This commit is contained in:
Mo
2022-12-07 11:14:03 -06:00
parent 2fa3fec9ab
commit be4cc4e605
6 changed files with 132 additions and 24 deletions

View File

@@ -1,3 +1,3 @@
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.83325 4.16667H17.4999V5.83333H5.83325V4.16667ZM5.83325 10.8333V9.16667H17.4999V10.8333H5.83325ZM3.33325 3.75C3.66477 3.75 3.98272 3.8817 4.21714 4.11612C4.45156 4.35054 4.58325 4.66848 4.58325 5C4.58325 5.33152 4.45156 5.64946 4.21714 5.88388C3.98272 6.1183 3.66477 6.25 3.33325 6.25C3.00173 6.25 2.68379 6.1183 2.44937 5.88388C2.21495 5.64946 2.08325 5.33152 2.08325 5C2.08325 4.66848 2.21495 4.35054 2.44937 4.11612C2.68379 3.8817 3.00173 3.75 3.33325 3.75ZM3.33325 8.75C3.66477 8.75 3.98272 8.8817 4.21714 9.11612C4.45156 9.35054 4.58325 9.66848 4.58325 10C4.58325 10.3315 4.45156 10.6495 4.21714 10.8839C3.98272 11.1183 3.66477 11.25 3.33325 11.25C3.00173 11.25 2.68379 11.1183 2.44937 10.8839C2.21495 10.6495 2.08325 10.3315 2.08325 10C2.08325 9.66848 2.21495 9.35054 2.44937 9.11612C2.68379 8.8817 3.00173 8.75 3.33325 8.75ZM5.83325 15.8333V14.1667H17.4999V15.8333H5.83325ZM3.33325 13.75C3.66477 13.75 3.98272 13.8817 4.21714 14.1161C4.45156 14.3505 4.58325 14.6685 4.58325 15C4.58325 15.3315 4.45156 15.6495 4.21714 15.8839C3.98272 16.1183 3.66477 16.25 3.33325 16.25C3.00173 16.25 2.68379 16.1183 2.44937 15.8839C2.21495 15.6495 2.08325 15.3315 2.08325 15C2.08325 14.6685 2.21495 14.3505 2.44937 14.1161C2.68379 13.8817 3.00173 13.75 3.33325 13.75Z"/>
<svg viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M5.83325 3.16667H17.4999V4.83333H5.83325V3.16667ZM5.83325 10.8333V9.16667H17.4999V10.8333H5.83325ZM3.33325 2.75C3.66477 2.75 3.98272 2.8817 4.21714 3.11612C4.45156 3.35054 4.58325 3.66848 4.58325 4C4.58325 4.33152 4.45156 4.64946 4.21714 4.88388C3.98272 5.1183 3.66477 5.25 3.33325 5.25C3.00173 5.25 2.68379 5.1183 2.44937 4.88388C2.21495 4.64946 2.08325 4.33152 2.08325 4C2.08325 3.66848 2.21495 3.35054 2.44937 3.11612C2.68379 2.8817 3.00173 2.75 3.33325 2.75ZM3.33325 8.75C3.66477 8.75 3.98272 8.8817 4.21714 9.11612C4.45156 9.35054 4.58325 9.66848 4.58325 10C4.58325 10.3315 4.45156 10.6495 4.21714 10.8839C3.98272 11.1183 3.66477 11.25 3.33325 11.25C3.00173 11.25 2.68379 11.1183 2.44937 10.8839C2.21495 10.6495 2.08325 10.3315 2.08325 10C2.08325 9.66848 2.21495 9.35054 2.44937 9.11612C2.68379 8.8817 3.00173 8.75 3.33325 8.75ZM5.83325 16.8333V15.1667H17.4999V16.8333H5.83325ZM3.33325 14.75C3.66477 14.75 3.98272 14.8817 4.21714 15.1161C4.45156 15.3505 4.58325 15.6685 4.58325 16C4.58325 16.3315 4.45156 16.6495 4.21714 16.8839C3.98272 17.1183 3.66477 17.25 3.33325 17.25C3.00173 17.25 2.68379 17.1183 2.44937 16.8839C2.21495 16.6495 2.08325 16.3315 2.08325 16C2.08325 15.6685 2.21495 15.3505 2.44937 15.1161C2.68379 14.8817 3.00173 14.75 3.33325 14.75Z" />
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,6 @@
<svg viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M5.83325 3.16675H17.4999V4.83341H5.83325V3.16675ZM5.83325 10.8334V9.16675H17.4999V10.8334H5.83325ZM5.83325 16.8334V15.1667H17.4999V16.8334H5.83325Z" />
<path d="M4.02415 2.36364V6H3.03693V3.27273H3.01562L2.22017 3.74858V2.91051L3.11506 2.36364H4.02415Z" />
<path d="M2.24148 12V11.2898L3.59801 10.1676C3.68797 10.093 3.76491 10.0232 3.82884 9.9581C3.89394 9.89181 3.94366 9.82375 3.97798 9.75391C4.01349 9.68407 4.03125 9.60653 4.03125 9.52131C4.03125 9.42779 4.01113 9.34789 3.97088 9.28161C3.93182 9.21532 3.87737 9.16442 3.80753 9.12891C3.73769 9.09221 3.6572 9.07386 3.56605 9.07386C3.47491 9.07386 3.39441 9.09221 3.32457 9.12891C3.25592 9.1656 3.20265 9.21946 3.16477 9.29048C3.12689 9.36151 3.10795 9.44792 3.10795 9.54972H2.17045C2.17045 9.29403 2.22786 9.07386 2.34268 8.8892C2.4575 8.70455 2.61967 8.5625 2.82919 8.46307C3.03871 8.36364 3.28433 8.31392 3.56605 8.31392C3.85724 8.31392 4.10938 8.36068 4.32244 8.45419C4.5367 8.54652 4.70182 8.67673 4.81783 8.84482C4.93501 9.0129 4.99361 9.20999 4.99361 9.43608C4.99361 9.57576 4.96461 9.71484 4.90661 9.85334C4.8486 9.99065 4.74444 10.1428 4.59411 10.3097C4.44377 10.4766 4.23011 10.6754 3.95312 10.9062L3.61222 11.1903V11.2116H5.03267V12H2.24148Z" />
<path d="M3.66193 18.0497C3.37547 18.0497 3.12098 18.0006 2.89844 17.9023C2.67708 17.8029 2.50308 17.6662 2.37642 17.4922C2.24976 17.3182 2.18584 17.1181 2.18466 16.892H3.17898C3.18016 16.9619 3.20147 17.0246 3.2429 17.0803C3.28551 17.1347 3.34351 17.1773 3.4169 17.2081C3.49029 17.2389 3.57434 17.2543 3.66903 17.2543C3.76018 17.2543 3.84067 17.2383 3.91051 17.2063C3.98035 17.1732 4.0348 17.1276 4.07386 17.0696C4.11293 17.0116 4.13187 16.9453 4.13068 16.8707C4.13187 16.7973 4.10938 16.7322 4.06321 16.6754C4.01823 16.6186 3.9549 16.5742 3.87322 16.5423C3.79155 16.5103 3.69744 16.4943 3.59091 16.4943H3.22159V15.8125H3.59091C3.68916 15.8125 3.77557 15.7965 3.85014 15.7646C3.9259 15.7326 3.98449 15.6882 4.02592 15.6314C4.06854 15.5746 4.08925 15.5095 4.08807 15.4361C4.08925 15.3651 4.07209 15.3023 4.03658 15.2479C4.00107 15.1934 3.95135 15.1508 3.88743 15.12C3.82469 15.0893 3.75189 15.0739 3.66903 15.0739C3.57907 15.0739 3.49858 15.0898 3.42756 15.1218C3.35772 15.1538 3.30268 15.1982 3.26243 15.255C3.22218 15.3118 3.20147 15.3769 3.20028 15.4503H2.25568C2.25687 15.2277 2.31783 15.0312 2.43857 14.8608C2.56049 14.6903 2.72739 14.5566 2.93928 14.4595C3.15116 14.3625 3.39441 14.3139 3.66903 14.3139C3.93774 14.3139 4.17507 14.3595 4.38104 14.4506C4.58819 14.5418 4.74976 14.6673 4.86577 14.8271C4.98295 14.9857 5.04096 15.1674 5.03977 15.3722C5.04214 15.5758 4.9723 15.7427 4.83026 15.8729C4.68939 16.0031 4.51065 16.08 4.29403 16.1037V16.1321C4.58759 16.1641 4.80836 16.254 4.95632 16.402C5.10429 16.5488 5.17708 16.7334 5.17472 16.956C5.1759 17.169 5.11198 17.3578 4.98295 17.5224C4.85511 17.6869 4.67696 17.8159 4.44851 17.9094C4.22124 18.003 3.95904 18.0497 3.66193 18.0497Z" />
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -1,3 +1,3 @@
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M11.9999 8.6665C11.5579 8.6665 11.134 8.49091 10.8214 8.17835C10.5088 7.86579 10.3333 7.44187 10.3333 6.99984C10.3333 6.55781 10.5088 6.13389 10.8214 5.82133C11.134 5.50877 11.5579 5.33317 11.9999 5.33317C12.4419 5.33317 12.8659 5.50877 13.1784 5.82133C13.491 6.13389 13.6666 6.55781 13.6666 6.99984C13.6666 7.44187 13.491 7.86579 13.1784 8.17835C12.8659 8.49091 12.4419 8.6665 11.9999 8.6665ZM11.9999 13.6665C11.5579 13.6665 11.134 13.4909 10.8214 13.1783C10.5088 12.8658 10.3333 12.4419 10.3333 11.9998C10.3333 11.5578 10.5088 11.1339 10.8214 10.8213C11.134 10.5088 11.5579 10.3332 11.9999 10.3332C12.4419 10.3332 12.8659 10.5088 13.1784 10.8213C13.491 11.1339 13.6666 11.5578 13.6666 11.9998C13.6666 12.4419 13.491 12.8658 13.1784 13.1783C12.8659 13.4909 12.4419 13.6665 11.9999 13.6665ZM11.9999 18.6665C11.5579 18.6665 11.134 18.4909 10.8214 18.1783C10.5088 17.8658 10.3333 17.4419 10.3333 16.9998C10.3333 16.5578 10.5088 16.1339 10.8214 15.8213C11.134 15.5088 11.5579 15.3332 11.9999 15.3332C12.4419 15.3332 12.8659 15.5088 13.1784 15.8213C13.491 16.1339 13.6666 16.5578 13.6666 16.9998C13.6666 17.4419 13.491 17.8658 13.1784 18.1783C12.8659 18.4909 12.4419 18.6665 11.9999 18.6665Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -112,6 +112,7 @@ import LineWidthIcon from './ic-line-width.svg'
import LinkIcon from './ic-link.svg'
import LinkOffIcon from './ic-link-off.svg'
import ListBulleted from './ic-list-bulleted.svg'
import ListNumbered from './ic-list-numbered.svg'
import ListedFilledIcon from './ic-listed-filled.svg'
import ListedIcon from './ic-listed.svg'
import LockFilledIcon from './ic-lock-filled.svg'
@@ -318,6 +319,7 @@ export {
ListBulleted,
ListedFilledIcon,
ListedIcon,
ListNumbered,
LockFilledIcon,
LockIcon,
MarkdownIcon,