refactor: заменить shiki на самописный highlighter и обновить архитектуру
- Удалён shiki (9.5→0 МБ), создан regex-токенизатор для html/css/xml - CLI переведён с аргументов на конфиг-файл svg-sprites.config.ts - Превью переработано: React-приложение вместо инлайн HTML - Добавлен футер с названием пакета и ссылкой на репозиторий - Исправлена загрузка dev-data.js для Vite 8 - Футер прижат к низу, содержимое центрировано
3
test/assets/icons/arrow-left.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M15 18l-6-6 6-6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 151 B |
1
test/assets/icons/arrow-right.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 18l6-6-6-6"/></svg>
|
||||
|
After Width: | Height: | Size: 143 B |
1
test/assets/icons/check.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 6L9 17l-5-5"/></svg>
|
||||
|
After Width: | Height: | Size: 145 B |
6
test/assets/icons/discount-shape.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.98334 21.9907L3.70336 19.7106C2.77336 18.7806 2.77336 17.2506 3.70336 16.3206L5.98334 14.0406C6.37334 13.6506 6.68834 12.8856 6.68834 12.3456V9.12053C6.68834 7.80053 7.76835 6.72057 9.08835 6.72057H12.3133C12.8533 6.72057 13.6184 6.40562 14.0084 6.01562L16.2883 3.73559C17.2183 2.80559 18.7484 2.80559 19.6784 3.73559L21.9584 6.01562C22.3484 6.40562 23.1133 6.72057 23.6533 6.72057H26.8784C28.1984 6.72057 29.2783 7.80053 29.2783 9.12053V12.3456C29.2783 12.8856 29.5933 13.6506 29.9833 14.0406L32.2634 16.3206C33.1934 17.2506 33.1934 18.7806 32.2634 19.7106L29.9833 21.9907C29.5933 22.3807 29.2783 23.1457 29.2783 23.6857V26.9105C29.2783 28.2305 28.1984 29.3107 26.8784 29.3107H23.6533C23.1133 29.3107 22.3484 29.6256 21.9584 30.0156L19.6784 32.2956C18.7484 33.2256 17.2183 33.2256 16.2883 32.2956L14.0084 30.0156C13.6184 29.6256 12.8533 29.3107 12.3133 29.3107H9.08835C7.76835 29.3107 6.68834 28.2305 6.68834 26.9105V23.6857C6.68834 23.1307 6.37334 22.3657 5.98334 21.9907Z" stroke="#A93133" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M13.5 22.5L22.5 13.5" stroke="#A93133" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M21.7418 21.75H21.7552" stroke="#A93133" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14.2418 14.25H14.2552" stroke="#A93133" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
3
test/assets/icons/flash.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.13515 19.9201H13.7702V30.7201C13.7702 33.2401 15.1352 33.7501 16.8002 31.8601L28.1552 18.9601C29.5502 17.3851 28.9652 16.0801 26.8502 16.0801H22.2152V5.28009C22.2152 2.76009 20.8502 2.25009 19.1852 4.14009L7.83015 17.0401C6.45015 18.6301 7.03515 19.9201 9.13515 19.9201Z" stroke="#A93133" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 495 B |
5
test/assets/icons/heart-tick (1-я копия).svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M33.0001 25.8001C33.0001 27.1501 32.6251 28.425 31.9501 29.505C30.7051 31.59 28.4251 33.0001 25.8001 33.0001C23.1751 33.0001 20.8801 31.59 19.6501 29.505C18.9901 28.425 18.6001 27.1501 18.6001 25.8001C18.6001 21.8251 21.8251 18.6001 25.8001 18.6001C29.7751 18.6001 33.0001 21.8251 33.0001 25.8001Z" stroke="#A93133" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M22.9951 25.8L24.7651 27.57L28.6051 24.03" stroke="#A93133" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M33 13.0349C33 15.9899 32.235 18.5999 31.035 20.8649C29.715 19.4699 27.855 18.6 25.8 18.6C21.825 18.6 18.6 21.825 18.6 25.8C18.6 27.645 19.305 29.325 20.445 30.6C19.89 30.855 19.38 31.0649 18.93 31.2149C18.42 31.3949 17.58 31.3949 17.07 31.2149C12.72 29.7299 3 23.5349 3 13.0349C3 8.39994 6.735 4.6499 11.34 4.6499C14.055 4.6499 16.485 5.96996 18 7.99496C19.515 5.96996 21.945 4.6499 24.66 4.6499C29.265 4.6499 33 8.39994 33 13.0349Z" stroke="#A93133" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
5
test/assets/icons/heart-tick.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M33.0001 25.8001C33.0001 27.1501 32.6251 28.425 31.9501 29.505C30.7051 31.59 28.4251 33.0001 25.8001 33.0001C23.1751 33.0001 20.8801 31.59 19.6501 29.505C18.9901 28.425 18.6001 27.1501 18.6001 25.8001C18.6001 21.8251 21.8251 18.6001 25.8001 18.6001C29.7751 18.6001 33.0001 21.8251 33.0001 25.8001Z" stroke="#A93133" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M22.9951 25.8L24.7651 27.57L28.6051 24.03" stroke="#A93133" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M33 13.0349C33 15.9899 32.235 18.5999 31.035 20.8649C29.715 19.4699 27.855 18.6 25.8 18.6C21.825 18.6 18.6 21.825 18.6 25.8C18.6 27.645 19.305 29.325 20.445 30.6C19.89 30.855 19.38 31.0649 18.93 31.2149C18.42 31.3949 17.58 31.3949 17.07 31.2149C12.72 29.7299 3 23.5349 3 13.0349C3 8.39994 6.735 4.6499 11.34 4.6499C14.055 4.6499 16.485 5.96996 18 7.99496C19.515 5.96996 21.945 4.6499 24.66 4.6499C29.265 4.6499 33 8.39994 33 13.0349Z" stroke="#A93133" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
3
test/assets/logos/github.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.17 6.839 9.49.5.092.682-.217.682-.482 0-.237-.009-.866-.013-1.7-2.782.604-3.369-1.34-3.369-1.34-.454-1.156-1.11-1.464-1.11-1.464-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.831.092-.646.35-1.086.636-1.337-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.578 9.578 0 0112 6.836c.85.004 1.705.115 2.504.337 1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.203 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.578.688.48C19.138 20.167 22 16.418 22 12c0-5.523-4.477-10-10-10z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 799 B |
3
test/assets/logos/twitter.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 576 B |
4
test/assets/logos/youtube.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<path d="M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.546 12 3.546 12 3.546s-7.505 0-9.377.504A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.504 9.376.504 9.376.504s7.505 0 9.377-.504a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814z" fill="#FF0000"/>
|
||||
<path d="M9.545 15.568V8.432L15.818 12l-6.273 3.568z" fill="#FFFFFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 492 B |