serve icons via a single merged .svg file (#4150)
We currently serve icons in the form of 141 separate svg files. This is pretty inefficient: it results in 141 http requests each with its own overheads and costs. Each one is generally less than 1kb of data. This PR merges all of our icons into a single 44kb icon file. Each item in the svg has an ID, and we use the ID in the asset url to target the specific icon. This also fixes a lot of the icon preloading issues: because the icon file is already loaded, there's no extra request needed when panels open etc. I was messing with this whilst killing time before a late meeting so made a shitty overengineered code generator, dont at me ### Change type - [x] `improvement` ### Release notes - Serve icons more efficiently, and make sure they're still available if tldraw goes offline.
|
@ -7,8 +7,16 @@ let didPreloadIcons = false
|
||||||
async function preloadIcons() {
|
async function preloadIcons() {
|
||||||
if (didPreloadIcons) return
|
if (didPreloadIcons) return
|
||||||
didPreloadIcons = true
|
didPreloadIcons = true
|
||||||
const urlsToPreload = [...Object.values(assetUrls.icons), ...Object.values(assetUrls.embedIcons)]
|
const urlsToPreload = new Set(
|
||||||
await Promise.allSettled(urlsToPreload.map(preloadIcon))
|
[...Object.values(assetUrls.icons), ...Object.values(assetUrls.embedIcons)].map((url) => {
|
||||||
|
// some of our urls include # fragments. we don't need to preload them all individually:
|
||||||
|
// only the ones with something unique before the hash. this regex strips the hash and
|
||||||
|
// everything after it.
|
||||||
|
return url.replace(/#.*$/, '')
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
await Promise.allSettled(Array.from(urlsToPreload, preloadIcon))
|
||||||
}
|
}
|
||||||
|
|
||||||
function preloadIcon(url: string) {
|
function preloadIcon(url: string) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<svg width="30" height="31" viewBox="0 0 30 31" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M15.5968 7.18641C15.761 7.31413 16.0002 7.19711 16.0002 6.98907V4.99998C19.9629 5.00001 22.3696 5.72742 23.8211 7.17892C25.2726 8.63045 26 11.0372 26 15C26 15.5523 26.4477 16 27 16C27.5523 16 28 15.5523 28 15C28 10.8876 27.265 7.79439 25.2353 5.7647C23.2056 3.73506 20.1125 3.00001 16.0002 2.99998V1.01139C16.0002 0.803351 15.761 0.686328 15.5968 0.81405L11.754 3.80289C11.6253 3.90298 11.6253 4.09748 11.754 4.19757L15.5968 7.18641Z" fill="black"/>
|
<path d="M15.5968 7.18642C15.761 7.31414 16.0002 7.19712 16.0002 6.98908V5C19.9629 5.00003 22.3696 5.72743 23.8211 7.17893C25.2726 8.63046 26 11.0372 26 15C26 15.5523 26.4477 16 27 16C27.5523 16 28 15.5523 28 15C28 10.8876 27.265 7.7944 25.2353 5.76472C23.2056 3.73507 20.1125 3.00003 16.0002 3V1.0114C16.0002 0.803367 15.761 0.686343 15.5968 0.814065L11.754 3.80291C11.6253 3.903 11.6253 4.09749 11.754 4.19758L15.5968 7.18642Z" fill="black"/>
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 9.00002C2.67157 9.00002 2 9.67159 2 10.5V27.5C2 28.3284 2.67157 29 3.5 29H20.5C21.3284 29 22 28.3284 22 27.5V10.5C22 9.67159 21.3284 9.00002 20.5 9.00002H3.5ZM4 11V27H20V11H4Z" fill="black"/>
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 9.00003C2.67157 9.00003 2 9.6716 2 10.5V27.5C2 28.3285 2.67157 29 3.5 29H20.5C21.3284 29 22 28.3285 22 27.5V10.5C22 9.6716 21.3284 9.00003 20.5 9.00003H3.5ZM4 11V27H20V11H4Z" fill="black"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 808 B After Width: | Height: | Size: 792 B |
|
@ -1,4 +1,4 @@
|
||||||
<svg width="31" height="30" viewBox="0 0 31 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M4.4209 5.7915L8.05078 11.9263H8.19141L11.8389 5.7915H16.1367L10.6436 14.7915L16.2598 23.7915H11.8828L8.19141 17.6479H8.05078L4.35938 23.7915H0L5.63379 14.7915L0.105469 5.7915H4.4209Z" fill="black"/>
|
<path d="M4.44434 5.7915L8.07422 11.9263H8.21484L11.8623 5.7915H16.1602L10.667 14.7915L16.2832 23.7915H11.9063L8.21484 17.6479H8.07422L4.38281 23.7915H0.0234375L5.65723 14.7915L0.128906 5.7915H4.44434Z" fill="black"/>
|
||||||
<path d="M18.5449 23.7915V5.7915H22.3506V20.6538H30.0674V23.7915H18.5449Z" fill="black"/>
|
<path d="M18.4469 23.7915V5.7915H22.2526V20.6538H29.9694V23.7915H18.4469Z" fill="black"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 411 B |
|
@ -1,5 +1,5 @@
|
||||||
<svg width="30" height="31" viewBox="0 0 30 31" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<rect x="26" y="19.7069" width="2" height="22" rx="1" transform="rotate(90 26 19.7069)" fill="black"/>
|
<rect x="26" y="19.5" width="2" height="22" rx="1" transform="rotate(90 26 19.5)" fill="black"/>
|
||||||
<rect x="15" y="16.6169" width="2" height="8" rx="1" transform="rotate(-135 15 16.6169)" fill="black"/>
|
<rect x="15" y="16.41" width="2" height="8" rx="1" transform="rotate(-135 15 16.41)" fill="black"/>
|
||||||
<rect x="16.4142" y="15.2028" width="2" height="8" rx="1" transform="rotate(135 16.4142 15.2028)" fill="black"/>
|
<rect x="16.4142" y="14.9958" width="2" height="8" rx="1" transform="rotate(135 16.4142 14.9958)" fill="black"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 423 B After Width: | Height: | Size: 413 B |
|
@ -1,7 +1,7 @@
|
||||||
<svg width="30" height="31" viewBox="0 0 30 31" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<rect x="15" y="19.2969" width="2" height="8" rx="1" transform="rotate(45 15 19.2969)" fill="black"/>
|
<rect x="15" y="19.09" width="2" height="8" rx="1" transform="rotate(45 15 19.09)" fill="black"/>
|
||||||
<rect x="13.5858" y="20.7111" width="2" height="8" rx="1" transform="rotate(-45 13.5858 20.7111)" fill="black"/>
|
<rect x="13.5858" y="20.5042" width="2" height="8" rx="1" transform="rotate(-45 13.5858 20.5042)" fill="black"/>
|
||||||
<rect x="15" y="11.1179" width="2" height="8" rx="1" transform="rotate(-135 15 11.1179)" fill="black"/>
|
<rect x="15" y="10.911" width="2" height="8" rx="1" transform="rotate(-135 15 10.911)" fill="black"/>
|
||||||
<rect x="16.4142" y="9.70374" width="2" height="8" rx="1" transform="rotate(135 16.4142 9.70374)" fill="black"/>
|
<rect x="16.4142" y="9.49683" width="2" height="8" rx="1" transform="rotate(135 16.4142 9.49683)" fill="black"/>
|
||||||
<rect x="4" y="16.2069" width="2" height="22" rx="1" transform="rotate(-90 4 16.2069)" fill="black"/>
|
<rect x="4" y="16" width="2" height="22" rx="1" transform="rotate(-90 4 16)" fill="black"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 621 B |
|
@ -1,5 +1,5 @@
|
||||||
<svg width="30" height="31" viewBox="0 0 30 31" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<rect x="4" y="10.7069" width="2" height="22" rx="1" transform="rotate(-90 4 10.7069)" fill="black"/>
|
<rect x="4" y="10.5" width="2" height="22" rx="1" transform="rotate(-90 4 10.5)" fill="black"/>
|
||||||
<rect x="15" y="13.7986" width="2" height="8" rx="1" transform="rotate(45 15 13.7986)" fill="black"/>
|
<rect x="15" y="13.5917" width="2" height="8" rx="1" transform="rotate(45 15 13.5917)" fill="black"/>
|
||||||
<rect x="13.5858" y="15.2128" width="2" height="8" rx="1" transform="rotate(-45 13.5858 15.2128)" fill="black"/>
|
<rect x="13.5858" y="15.0059" width="2" height="8" rx="1" transform="rotate(-45 13.5858 15.0059)" fill="black"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 414 B |
|
@ -1,5 +1,5 @@
|
||||||
<svg width="32" height="30" viewBox="0 0 32 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<circle cx="16.3997" cy="19.4395" r="1.5" fill="black"/>
|
<circle cx="15.3997" cy="19.4395" r="1.5" fill="black"/>
|
||||||
<path d="M15.0538 10.4595C15.0244 9.69574 15.6356 9.06055 16.3999 9.06055C17.1643 9.06055 17.7755 9.69574 17.7461 10.4595L17.4384 15.4613C17.4169 16.0193 16.9583 16.4606 16.3999 16.4606C15.8415 16.4606 15.383 16.0193 15.3615 15.4613L15.0538 10.4595Z" fill="black"/>
|
<path d="M14.0538 10.4595C14.0244 9.69574 14.6356 9.06055 15.3999 9.06055C16.1643 9.06055 16.7755 9.69574 16.7461 10.4595L16.4384 15.4613C16.4169 16.0193 15.9583 16.4606 15.3999 16.4606C14.8415 16.4606 14.383 16.0193 14.3615 15.4613L14.0538 10.4595Z" fill="black"/>
|
||||||
<path d="M29.9592 23.8499L16.5153 1.29299C16.2826 0.902566 15.7171 0.902566 15.4845 1.29299L2.04056 23.8499C1.80219 24.2498 2.09037 24.7571 2.55596 24.7571H29.4438C29.9094 24.7571 30.1976 24.2498 29.9592 23.8499Z" stroke="black" stroke-width="2"/>
|
<path d="M28.4825 23.8578L15.52 1.33194C15.2892 0.93095 14.7106 0.930951 14.4799 1.33194L1.51747 23.8578C1.2873 24.2578 1.57602 24.7571 2.03752 24.7571H27.9625C28.424 24.7571 28.7127 24.2578 28.4825 23.8578Z" stroke="black" stroke-width="2"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 669 B |
|
@ -5,424 +5,285 @@
|
||||||
/// <reference path="./modules.d.ts" />
|
/// <reference path="./modules.d.ts" />
|
||||||
import { formatAssetUrl } from './utils.js'
|
import { formatAssetUrl } from './utils.js'
|
||||||
|
|
||||||
import embedIconsCodepen from './embed-icons/codepen.png'
|
import embedIconsCodepenPng from './embed-icons/codepen.png'
|
||||||
import embedIconsCodesandbox from './embed-icons/codesandbox.png'
|
import embedIconsCodesandboxPng from './embed-icons/codesandbox.png'
|
||||||
import embedIconsDesmos from './embed-icons/desmos.png'
|
import embedIconsDesmosPng from './embed-icons/desmos.png'
|
||||||
import embedIconsExcalidraw from './embed-icons/excalidraw.png'
|
import embedIconsExcalidrawPng from './embed-icons/excalidraw.png'
|
||||||
import embedIconsFelt from './embed-icons/felt.png'
|
import embedIconsFeltPng from './embed-icons/felt.png'
|
||||||
import embedIconsFigma from './embed-icons/figma.png'
|
import embedIconsFigmaPng from './embed-icons/figma.png'
|
||||||
import embedIconsGithubGist from './embed-icons/github_gist.png'
|
import embedIconsGithubGistPng from './embed-icons/github_gist.png'
|
||||||
import embedIconsGoogleCalendar from './embed-icons/google_calendar.png'
|
import embedIconsGoogleCalendarPng from './embed-icons/google_calendar.png'
|
||||||
import embedIconsGoogleMaps from './embed-icons/google_maps.png'
|
import embedIconsGoogleMapsPng from './embed-icons/google_maps.png'
|
||||||
import embedIconsGoogleSlides from './embed-icons/google_slides.png'
|
import embedIconsGoogleSlidesPng from './embed-icons/google_slides.png'
|
||||||
import embedIconsObservable from './embed-icons/observable.png'
|
import embedIconsObservablePng from './embed-icons/observable.png'
|
||||||
import embedIconsReplit from './embed-icons/replit.png'
|
import embedIconsReplitPng from './embed-icons/replit.png'
|
||||||
import embedIconsScratch from './embed-icons/scratch.png'
|
import embedIconsScratchPng from './embed-icons/scratch.png'
|
||||||
import embedIconsSpotify from './embed-icons/spotify.png'
|
import embedIconsSpotifyPng from './embed-icons/spotify.png'
|
||||||
import embedIconsTldraw from './embed-icons/tldraw.png'
|
import embedIconsTldrawPng from './embed-icons/tldraw.png'
|
||||||
import embedIconsValTown from './embed-icons/val_town.png'
|
import embedIconsValTownPng from './embed-icons/val_town.png'
|
||||||
import embedIconsVimeo from './embed-icons/vimeo.png'
|
import embedIconsVimeoPng from './embed-icons/vimeo.png'
|
||||||
import embedIconsYoutube from './embed-icons/youtube.png'
|
import embedIconsYoutubePng from './embed-icons/youtube.png'
|
||||||
import fontsMonospace from './fonts/IBMPlexMono-Medium.woff2'
|
import fontsIBMPlexMonoMediumWoff2 from './fonts/IBMPlexMono-Medium.woff2'
|
||||||
import fontsSansSerif from './fonts/IBMPlexSans-Medium.woff2'
|
import fontsIBMPlexSansMediumWoff2 from './fonts/IBMPlexSans-Medium.woff2'
|
||||||
import fontsSerif from './fonts/IBMPlexSerif-Medium.woff2'
|
import fontsIBMPlexSerifMediumWoff2 from './fonts/IBMPlexSerif-Medium.woff2'
|
||||||
import fontsDraw from './fonts/Shantell_Sans-Tldrawish.woff2'
|
import fontsShantellSansTldrawishWoff2 from './fonts/Shantell_Sans-Tldrawish.woff2'
|
||||||
import iconsAlignBottom from './icons/icon/align-bottom.svg'
|
import iconsIcon0MergedSvg from './icons/icon/0_merged.svg'
|
||||||
import iconsAlignCenterHorizontal from './icons/icon/align-center-horizontal.svg'
|
import translationsArJson from './translations/ar.json'
|
||||||
import iconsAlignCenterVertical from './icons/icon/align-center-vertical.svg'
|
import translationsCaJson from './translations/ca.json'
|
||||||
import iconsAlignLeft from './icons/icon/align-left.svg'
|
import translationsCsJson from './translations/cs.json'
|
||||||
import iconsAlignRight from './icons/icon/align-right.svg'
|
import translationsDaJson from './translations/da.json'
|
||||||
import iconsAlignTop from './icons/icon/align-top.svg'
|
import translationsDeJson from './translations/de.json'
|
||||||
import iconsArrowLeft from './icons/icon/arrow-left.svg'
|
import translationsEnJson from './translations/en.json'
|
||||||
import iconsArrowheadArrow from './icons/icon/arrowhead-arrow.svg'
|
import translationsEsJson from './translations/es.json'
|
||||||
import iconsArrowheadBar from './icons/icon/arrowhead-bar.svg'
|
import translationsFaJson from './translations/fa.json'
|
||||||
import iconsArrowheadDiamond from './icons/icon/arrowhead-diamond.svg'
|
import translationsFiJson from './translations/fi.json'
|
||||||
import iconsArrowheadDot from './icons/icon/arrowhead-dot.svg'
|
import translationsFrJson from './translations/fr.json'
|
||||||
import iconsArrowheadNone from './icons/icon/arrowhead-none.svg'
|
import translationsGlJson from './translations/gl.json'
|
||||||
import iconsArrowheadSquare from './icons/icon/arrowhead-square.svg'
|
import translationsHeJson from './translations/he.json'
|
||||||
import iconsArrowheadTriangleInverted from './icons/icon/arrowhead-triangle-inverted.svg'
|
import translationsHiInJson from './translations/hi-in.json'
|
||||||
import iconsArrowheadTriangle from './icons/icon/arrowhead-triangle.svg'
|
import translationsHrJson from './translations/hr.json'
|
||||||
import iconsBlob from './icons/icon/blob.svg'
|
import translationsHuJson from './translations/hu.json'
|
||||||
import iconsBringForward from './icons/icon/bring-forward.svg'
|
import translationsIdJson from './translations/id.json'
|
||||||
import iconsBringToFront from './icons/icon/bring-to-front.svg'
|
import translationsItJson from './translations/it.json'
|
||||||
import iconsBroken from './icons/icon/broken.svg'
|
import translationsJaJson from './translations/ja.json'
|
||||||
import iconsCheckCircle from './icons/icon/check-circle.svg'
|
import translationsKoKrJson from './translations/ko-kr.json'
|
||||||
import iconsCheck from './icons/icon/check.svg'
|
import translationsKuJson from './translations/ku.json'
|
||||||
import iconsChevronDown from './icons/icon/chevron-down.svg'
|
import translationsLanguagesJson from './translations/languages.json'
|
||||||
import iconsChevronLeft from './icons/icon/chevron-left.svg'
|
import translationsMainJson from './translations/main.json'
|
||||||
import iconsChevronRight from './icons/icon/chevron-right.svg'
|
import translationsMyJson from './translations/my.json'
|
||||||
import iconsChevronUp from './icons/icon/chevron-up.svg'
|
import translationsNeJson from './translations/ne.json'
|
||||||
import iconsChevronsNe from './icons/icon/chevrons-ne.svg'
|
import translationsNoJson from './translations/no.json'
|
||||||
import iconsChevronsSw from './icons/icon/chevrons-sw.svg'
|
import translationsPlJson from './translations/pl.json'
|
||||||
import iconsClipboardCopied from './icons/icon/clipboard-copied.svg'
|
import translationsPtBrJson from './translations/pt-br.json'
|
||||||
import iconsClipboardCopy from './icons/icon/clipboard-copy.svg'
|
import translationsPtPtJson from './translations/pt-pt.json'
|
||||||
import iconsColor from './icons/icon/color.svg'
|
import translationsRoJson from './translations/ro.json'
|
||||||
import iconsCross2 from './icons/icon/cross-2.svg'
|
import translationsRuJson from './translations/ru.json'
|
||||||
import iconsCrossCircle from './icons/icon/cross-circle.svg'
|
import translationsSlJson from './translations/sl.json'
|
||||||
import iconsDashDashed from './icons/icon/dash-dashed.svg'
|
import translationsSvJson from './translations/sv.json'
|
||||||
import iconsDashDotted from './icons/icon/dash-dotted.svg'
|
import translationsTeJson from './translations/te.json'
|
||||||
import iconsDashDraw from './icons/icon/dash-draw.svg'
|
import translationsThJson from './translations/th.json'
|
||||||
import iconsDashSolid from './icons/icon/dash-solid.svg'
|
import translationsTrJson from './translations/tr.json'
|
||||||
import iconsDisconnected from './icons/icon/disconnected.svg'
|
import translationsUkJson from './translations/uk.json'
|
||||||
import iconsDiscord from './icons/icon/discord.svg'
|
import translationsViJson from './translations/vi.json'
|
||||||
import iconsDistributeHorizontal from './icons/icon/distribute-horizontal.svg'
|
import translationsZhCnJson from './translations/zh-cn.json'
|
||||||
import iconsDistributeVertical from './icons/icon/distribute-vertical.svg'
|
import translationsZhTwJson from './translations/zh-tw.json'
|
||||||
import iconsDot from './icons/icon/dot.svg'
|
|
||||||
import iconsDotsHorizontal from './icons/icon/dots-horizontal.svg'
|
|
||||||
import iconsDotsVertical from './icons/icon/dots-vertical.svg'
|
|
||||||
import iconsDragHandleDots from './icons/icon/drag-handle-dots.svg'
|
|
||||||
import iconsDuplicate from './icons/icon/duplicate.svg'
|
|
||||||
import iconsEdit from './icons/icon/edit.svg'
|
|
||||||
import iconsExternalLink from './icons/icon/external-link.svg'
|
|
||||||
import iconsFillFill from './icons/icon/fill-fill.svg'
|
|
||||||
import iconsFillNone from './icons/icon/fill-none.svg'
|
|
||||||
import iconsFillPattern from './icons/icon/fill-pattern.svg'
|
|
||||||
import iconsFillSemi from './icons/icon/fill-semi.svg'
|
|
||||||
import iconsFillSolid from './icons/icon/fill-solid.svg'
|
|
||||||
import iconsFollow from './icons/icon/follow.svg'
|
|
||||||
import iconsFollowing from './icons/icon/following.svg'
|
|
||||||
import iconsFontDraw from './icons/icon/font-draw.svg'
|
|
||||||
import iconsFontMono from './icons/icon/font-mono.svg'
|
|
||||||
import iconsFontSans from './icons/icon/font-sans.svg'
|
|
||||||
import iconsFontSerif from './icons/icon/font-serif.svg'
|
|
||||||
import iconsGeoArrowDown from './icons/icon/geo-arrow-down.svg'
|
|
||||||
import iconsGeoArrowLeft from './icons/icon/geo-arrow-left.svg'
|
|
||||||
import iconsGeoArrowRight from './icons/icon/geo-arrow-right.svg'
|
|
||||||
import iconsGeoArrowUp from './icons/icon/geo-arrow-up.svg'
|
|
||||||
import iconsGeoCheckBox from './icons/icon/geo-check-box.svg'
|
|
||||||
import iconsGeoCloud from './icons/icon/geo-cloud.svg'
|
|
||||||
import iconsGeoDiamond from './icons/icon/geo-diamond.svg'
|
|
||||||
import iconsGeoEllipse from './icons/icon/geo-ellipse.svg'
|
|
||||||
import iconsGeoHeart from './icons/icon/geo-heart.svg'
|
|
||||||
import iconsGeoHexagon from './icons/icon/geo-hexagon.svg'
|
|
||||||
import iconsGeoOctagon from './icons/icon/geo-octagon.svg'
|
|
||||||
import iconsGeoOval from './icons/icon/geo-oval.svg'
|
|
||||||
import iconsGeoPentagon from './icons/icon/geo-pentagon.svg'
|
|
||||||
import iconsGeoRectangle from './icons/icon/geo-rectangle.svg'
|
|
||||||
import iconsGeoRhombus2 from './icons/icon/geo-rhombus-2.svg'
|
|
||||||
import iconsGeoRhombus from './icons/icon/geo-rhombus.svg'
|
|
||||||
import iconsGeoStar from './icons/icon/geo-star.svg'
|
|
||||||
import iconsGeoTrapezoid from './icons/icon/geo-trapezoid.svg'
|
|
||||||
import iconsGeoTriangle from './icons/icon/geo-triangle.svg'
|
|
||||||
import iconsGeoXBox from './icons/icon/geo-x-box.svg'
|
|
||||||
import iconsGithub from './icons/icon/github.svg'
|
|
||||||
import iconsGroup from './icons/icon/group.svg'
|
|
||||||
import iconsHorizontalAlignEnd from './icons/icon/horizontal-align-end.svg'
|
|
||||||
import iconsHorizontalAlignMiddle from './icons/icon/horizontal-align-middle.svg'
|
|
||||||
import iconsHorizontalAlignStart from './icons/icon/horizontal-align-start.svg'
|
|
||||||
import iconsInfoCircle from './icons/icon/info-circle.svg'
|
|
||||||
import iconsLeading from './icons/icon/leading.svg'
|
|
||||||
import iconsLink from './icons/icon/link.svg'
|
|
||||||
import iconsLock from './icons/icon/lock.svg'
|
|
||||||
import iconsMenu from './icons/icon/menu.svg'
|
|
||||||
import iconsMinus from './icons/icon/minus.svg'
|
|
||||||
import iconsMixed from './icons/icon/mixed.svg'
|
|
||||||
import iconsPack from './icons/icon/pack.svg'
|
|
||||||
import iconsPlus from './icons/icon/plus.svg'
|
|
||||||
import iconsQuestionMarkCircle from './icons/icon/question-mark-circle.svg'
|
|
||||||
import iconsQuestionMark from './icons/icon/question-mark.svg'
|
|
||||||
import iconsRedo from './icons/icon/redo.svg'
|
|
||||||
import iconsResetZoom from './icons/icon/reset-zoom.svg'
|
|
||||||
import iconsRotateCcw from './icons/icon/rotate-ccw.svg'
|
|
||||||
import iconsRotateCw from './icons/icon/rotate-cw.svg'
|
|
||||||
import iconsSendBackward from './icons/icon/send-backward.svg'
|
|
||||||
import iconsSendToBack from './icons/icon/send-to-back.svg'
|
|
||||||
import iconsShare1 from './icons/icon/share-1.svg'
|
|
||||||
import iconsSizeExtraLarge from './icons/icon/size-extra-large.svg'
|
|
||||||
import iconsSizeLarge from './icons/icon/size-large.svg'
|
|
||||||
import iconsSizeMedium from './icons/icon/size-medium.svg'
|
|
||||||
import iconsSizeSmall from './icons/icon/size-small.svg'
|
|
||||||
import iconsSplineCubic from './icons/icon/spline-cubic.svg'
|
|
||||||
import iconsSplineLine from './icons/icon/spline-line.svg'
|
|
||||||
import iconsStackHorizontal from './icons/icon/stack-horizontal.svg'
|
|
||||||
import iconsStackVertical from './icons/icon/stack-vertical.svg'
|
|
||||||
import iconsStatusOffline from './icons/icon/status-offline.svg'
|
|
||||||
import iconsStretchHorizontal from './icons/icon/stretch-horizontal.svg'
|
|
||||||
import iconsStretchVertical from './icons/icon/stretch-vertical.svg'
|
|
||||||
import iconsTextAlignCenter from './icons/icon/text-align-center.svg'
|
|
||||||
import iconsTextAlignLeft from './icons/icon/text-align-left.svg'
|
|
||||||
import iconsTextAlignRight from './icons/icon/text-align-right.svg'
|
|
||||||
import iconsToggleOff from './icons/icon/toggle-off.svg'
|
|
||||||
import iconsToggleOn from './icons/icon/toggle-on.svg'
|
|
||||||
import iconsToolArrow from './icons/icon/tool-arrow.svg'
|
|
||||||
import iconsToolEraser from './icons/icon/tool-eraser.svg'
|
|
||||||
import iconsToolFrame from './icons/icon/tool-frame.svg'
|
|
||||||
import iconsToolHand from './icons/icon/tool-hand.svg'
|
|
||||||
import iconsToolHighlight from './icons/icon/tool-highlight.svg'
|
|
||||||
import iconsToolLaser from './icons/icon/tool-laser.svg'
|
|
||||||
import iconsToolLine from './icons/icon/tool-line.svg'
|
|
||||||
import iconsToolMedia from './icons/icon/tool-media.svg'
|
|
||||||
import iconsToolNote from './icons/icon/tool-note.svg'
|
|
||||||
import iconsToolPencil from './icons/icon/tool-pencil.svg'
|
|
||||||
import iconsToolPointer from './icons/icon/tool-pointer.svg'
|
|
||||||
import iconsToolScreenshot from './icons/icon/tool-screenshot.svg'
|
|
||||||
import iconsToolText from './icons/icon/tool-text.svg'
|
|
||||||
import iconsTrash from './icons/icon/trash.svg'
|
|
||||||
import iconsTwitter from './icons/icon/twitter.svg'
|
|
||||||
import iconsUndo from './icons/icon/undo.svg'
|
|
||||||
import iconsUngroup from './icons/icon/ungroup.svg'
|
|
||||||
import iconsUnlock from './icons/icon/unlock.svg'
|
|
||||||
import iconsVerticalAlignEnd from './icons/icon/vertical-align-end.svg'
|
|
||||||
import iconsVerticalAlignMiddle from './icons/icon/vertical-align-middle.svg'
|
|
||||||
import iconsVerticalAlignStart from './icons/icon/vertical-align-start.svg'
|
|
||||||
import iconsWarningTriangle from './icons/icon/warning-triangle.svg'
|
|
||||||
import iconsZoomIn from './icons/icon/zoom-in.svg'
|
|
||||||
import iconsZoomOut from './icons/icon/zoom-out.svg'
|
|
||||||
import translationsAr from './translations/ar.json'
|
|
||||||
import translationsCa from './translations/ca.json'
|
|
||||||
import translationsCs from './translations/cs.json'
|
|
||||||
import translationsDa from './translations/da.json'
|
|
||||||
import translationsDe from './translations/de.json'
|
|
||||||
import translationsEn from './translations/en.json'
|
|
||||||
import translationsEs from './translations/es.json'
|
|
||||||
import translationsFa from './translations/fa.json'
|
|
||||||
import translationsFi from './translations/fi.json'
|
|
||||||
import translationsFr from './translations/fr.json'
|
|
||||||
import translationsGl from './translations/gl.json'
|
|
||||||
import translationsHe from './translations/he.json'
|
|
||||||
import translationsHiIn from './translations/hi-in.json'
|
|
||||||
import translationsHr from './translations/hr.json'
|
|
||||||
import translationsHu from './translations/hu.json'
|
|
||||||
import translationsId from './translations/id.json'
|
|
||||||
import translationsIt from './translations/it.json'
|
|
||||||
import translationsJa from './translations/ja.json'
|
|
||||||
import translationsKoKr from './translations/ko-kr.json'
|
|
||||||
import translationsKu from './translations/ku.json'
|
|
||||||
import translationsLanguages from './translations/languages.json'
|
|
||||||
import translationsMain from './translations/main.json'
|
|
||||||
import translationsMy from './translations/my.json'
|
|
||||||
import translationsNe from './translations/ne.json'
|
|
||||||
import translationsNo from './translations/no.json'
|
|
||||||
import translationsPl from './translations/pl.json'
|
|
||||||
import translationsPtBr from './translations/pt-br.json'
|
|
||||||
import translationsPtPt from './translations/pt-pt.json'
|
|
||||||
import translationsRo from './translations/ro.json'
|
|
||||||
import translationsRu from './translations/ru.json'
|
|
||||||
import translationsSl from './translations/sl.json'
|
|
||||||
import translationsSv from './translations/sv.json'
|
|
||||||
import translationsTe from './translations/te.json'
|
|
||||||
import translationsTh from './translations/th.json'
|
|
||||||
import translationsTr from './translations/tr.json'
|
|
||||||
import translationsUk from './translations/uk.json'
|
|
||||||
import translationsVi from './translations/vi.json'
|
|
||||||
import translationsZhCn from './translations/zh-cn.json'
|
|
||||||
import translationsZhTw from './translations/zh-tw.json'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {AssetUrlOptions} [opts]
|
* @param {AssetUrlOptions} [opts]
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export function getAssetUrlsByImport(opts) {
|
export function getAssetUrlsByImport(opts) {
|
||||||
|
const iconsIcon0MergedSvg2 = formatAssetUrl(iconsIcon0MergedSvg, opts)
|
||||||
return {
|
return {
|
||||||
fonts: {
|
fonts: {
|
||||||
monospace: formatAssetUrl(fontsMonospace, opts),
|
monospace: formatAssetUrl(fontsIBMPlexMonoMediumWoff2, opts),
|
||||||
sansSerif: formatAssetUrl(fontsSansSerif, opts),
|
sansSerif: formatAssetUrl(fontsIBMPlexSansMediumWoff2, opts),
|
||||||
serif: formatAssetUrl(fontsSerif, opts),
|
serif: formatAssetUrl(fontsIBMPlexSerifMediumWoff2, opts),
|
||||||
draw: formatAssetUrl(fontsDraw, opts),
|
draw: formatAssetUrl(fontsShantellSansTldrawishWoff2, opts),
|
||||||
},
|
},
|
||||||
icons: {
|
icons: {
|
||||||
'align-bottom': formatAssetUrl(iconsAlignBottom, opts),
|
'align-bottom': iconsIcon0MergedSvg2 + '#align-bottom',
|
||||||
'align-center-horizontal': formatAssetUrl(iconsAlignCenterHorizontal, opts),
|
'align-center-horizontal': iconsIcon0MergedSvg2 + '#align-center-horizontal',
|
||||||
'align-center-vertical': formatAssetUrl(iconsAlignCenterVertical, opts),
|
'align-center-vertical': iconsIcon0MergedSvg2 + '#align-center-vertical',
|
||||||
'align-left': formatAssetUrl(iconsAlignLeft, opts),
|
'align-left': iconsIcon0MergedSvg2 + '#align-left',
|
||||||
'align-right': formatAssetUrl(iconsAlignRight, opts),
|
'align-right': iconsIcon0MergedSvg2 + '#align-right',
|
||||||
'align-top': formatAssetUrl(iconsAlignTop, opts),
|
'align-top': iconsIcon0MergedSvg2 + '#align-top',
|
||||||
'arrow-left': formatAssetUrl(iconsArrowLeft, opts),
|
'arrow-left': iconsIcon0MergedSvg2 + '#arrow-left',
|
||||||
'arrowhead-arrow': formatAssetUrl(iconsArrowheadArrow, opts),
|
'arrowhead-arrow': iconsIcon0MergedSvg2 + '#arrowhead-arrow',
|
||||||
'arrowhead-bar': formatAssetUrl(iconsArrowheadBar, opts),
|
'arrowhead-bar': iconsIcon0MergedSvg2 + '#arrowhead-bar',
|
||||||
'arrowhead-diamond': formatAssetUrl(iconsArrowheadDiamond, opts),
|
'arrowhead-diamond': iconsIcon0MergedSvg2 + '#arrowhead-diamond',
|
||||||
'arrowhead-dot': formatAssetUrl(iconsArrowheadDot, opts),
|
'arrowhead-dot': iconsIcon0MergedSvg2 + '#arrowhead-dot',
|
||||||
'arrowhead-none': formatAssetUrl(iconsArrowheadNone, opts),
|
'arrowhead-none': iconsIcon0MergedSvg2 + '#arrowhead-none',
|
||||||
'arrowhead-square': formatAssetUrl(iconsArrowheadSquare, opts),
|
'arrowhead-square': iconsIcon0MergedSvg2 + '#arrowhead-square',
|
||||||
'arrowhead-triangle-inverted': formatAssetUrl(iconsArrowheadTriangleInverted, opts),
|
'arrowhead-triangle-inverted': iconsIcon0MergedSvg2 + '#arrowhead-triangle-inverted',
|
||||||
'arrowhead-triangle': formatAssetUrl(iconsArrowheadTriangle, opts),
|
'arrowhead-triangle': iconsIcon0MergedSvg2 + '#arrowhead-triangle',
|
||||||
blob: formatAssetUrl(iconsBlob, opts),
|
blob: iconsIcon0MergedSvg2 + '#blob',
|
||||||
'bring-forward': formatAssetUrl(iconsBringForward, opts),
|
'bring-forward': iconsIcon0MergedSvg2 + '#bring-forward',
|
||||||
'bring-to-front': formatAssetUrl(iconsBringToFront, opts),
|
'bring-to-front': iconsIcon0MergedSvg2 + '#bring-to-front',
|
||||||
broken: formatAssetUrl(iconsBroken, opts),
|
broken: iconsIcon0MergedSvg2 + '#broken',
|
||||||
'check-circle': formatAssetUrl(iconsCheckCircle, opts),
|
'check-circle': iconsIcon0MergedSvg2 + '#check-circle',
|
||||||
check: formatAssetUrl(iconsCheck, opts),
|
check: iconsIcon0MergedSvg2 + '#check',
|
||||||
'chevron-down': formatAssetUrl(iconsChevronDown, opts),
|
'chevron-down': iconsIcon0MergedSvg2 + '#chevron-down',
|
||||||
'chevron-left': formatAssetUrl(iconsChevronLeft, opts),
|
'chevron-left': iconsIcon0MergedSvg2 + '#chevron-left',
|
||||||
'chevron-right': formatAssetUrl(iconsChevronRight, opts),
|
'chevron-right': iconsIcon0MergedSvg2 + '#chevron-right',
|
||||||
'chevron-up': formatAssetUrl(iconsChevronUp, opts),
|
'chevron-up': iconsIcon0MergedSvg2 + '#chevron-up',
|
||||||
'chevrons-ne': formatAssetUrl(iconsChevronsNe, opts),
|
'chevrons-ne': iconsIcon0MergedSvg2 + '#chevrons-ne',
|
||||||
'chevrons-sw': formatAssetUrl(iconsChevronsSw, opts),
|
'chevrons-sw': iconsIcon0MergedSvg2 + '#chevrons-sw',
|
||||||
'clipboard-copied': formatAssetUrl(iconsClipboardCopied, opts),
|
'clipboard-copied': iconsIcon0MergedSvg2 + '#clipboard-copied',
|
||||||
'clipboard-copy': formatAssetUrl(iconsClipboardCopy, opts),
|
'clipboard-copy': iconsIcon0MergedSvg2 + '#clipboard-copy',
|
||||||
color: formatAssetUrl(iconsColor, opts),
|
color: iconsIcon0MergedSvg2 + '#color',
|
||||||
'cross-2': formatAssetUrl(iconsCross2, opts),
|
'cross-2': iconsIcon0MergedSvg2 + '#cross-2',
|
||||||
'cross-circle': formatAssetUrl(iconsCrossCircle, opts),
|
'cross-circle': iconsIcon0MergedSvg2 + '#cross-circle',
|
||||||
'dash-dashed': formatAssetUrl(iconsDashDashed, opts),
|
'dash-dashed': iconsIcon0MergedSvg2 + '#dash-dashed',
|
||||||
'dash-dotted': formatAssetUrl(iconsDashDotted, opts),
|
'dash-dotted': iconsIcon0MergedSvg2 + '#dash-dotted',
|
||||||
'dash-draw': formatAssetUrl(iconsDashDraw, opts),
|
'dash-draw': iconsIcon0MergedSvg2 + '#dash-draw',
|
||||||
'dash-solid': formatAssetUrl(iconsDashSolid, opts),
|
'dash-solid': iconsIcon0MergedSvg2 + '#dash-solid',
|
||||||
disconnected: formatAssetUrl(iconsDisconnected, opts),
|
disconnected: iconsIcon0MergedSvg2 + '#disconnected',
|
||||||
discord: formatAssetUrl(iconsDiscord, opts),
|
discord: iconsIcon0MergedSvg2 + '#discord',
|
||||||
'distribute-horizontal': formatAssetUrl(iconsDistributeHorizontal, opts),
|
'distribute-horizontal': iconsIcon0MergedSvg2 + '#distribute-horizontal',
|
||||||
'distribute-vertical': formatAssetUrl(iconsDistributeVertical, opts),
|
'distribute-vertical': iconsIcon0MergedSvg2 + '#distribute-vertical',
|
||||||
dot: formatAssetUrl(iconsDot, opts),
|
dot: iconsIcon0MergedSvg2 + '#dot',
|
||||||
'dots-horizontal': formatAssetUrl(iconsDotsHorizontal, opts),
|
'dots-horizontal': iconsIcon0MergedSvg2 + '#dots-horizontal',
|
||||||
'dots-vertical': formatAssetUrl(iconsDotsVertical, opts),
|
'dots-vertical': iconsIcon0MergedSvg2 + '#dots-vertical',
|
||||||
'drag-handle-dots': formatAssetUrl(iconsDragHandleDots, opts),
|
'drag-handle-dots': iconsIcon0MergedSvg2 + '#drag-handle-dots',
|
||||||
duplicate: formatAssetUrl(iconsDuplicate, opts),
|
duplicate: iconsIcon0MergedSvg2 + '#duplicate',
|
||||||
edit: formatAssetUrl(iconsEdit, opts),
|
edit: iconsIcon0MergedSvg2 + '#edit',
|
||||||
'external-link': formatAssetUrl(iconsExternalLink, opts),
|
'external-link': iconsIcon0MergedSvg2 + '#external-link',
|
||||||
'fill-fill': formatAssetUrl(iconsFillFill, opts),
|
'fill-fill': iconsIcon0MergedSvg2 + '#fill-fill',
|
||||||
'fill-none': formatAssetUrl(iconsFillNone, opts),
|
'fill-none': iconsIcon0MergedSvg2 + '#fill-none',
|
||||||
'fill-pattern': formatAssetUrl(iconsFillPattern, opts),
|
'fill-pattern': iconsIcon0MergedSvg2 + '#fill-pattern',
|
||||||
'fill-semi': formatAssetUrl(iconsFillSemi, opts),
|
'fill-semi': iconsIcon0MergedSvg2 + '#fill-semi',
|
||||||
'fill-solid': formatAssetUrl(iconsFillSolid, opts),
|
'fill-solid': iconsIcon0MergedSvg2 + '#fill-solid',
|
||||||
follow: formatAssetUrl(iconsFollow, opts),
|
follow: iconsIcon0MergedSvg2 + '#follow',
|
||||||
following: formatAssetUrl(iconsFollowing, opts),
|
following: iconsIcon0MergedSvg2 + '#following',
|
||||||
'font-draw': formatAssetUrl(iconsFontDraw, opts),
|
'font-draw': iconsIcon0MergedSvg2 + '#font-draw',
|
||||||
'font-mono': formatAssetUrl(iconsFontMono, opts),
|
'font-mono': iconsIcon0MergedSvg2 + '#font-mono',
|
||||||
'font-sans': formatAssetUrl(iconsFontSans, opts),
|
'font-sans': iconsIcon0MergedSvg2 + '#font-sans',
|
||||||
'font-serif': formatAssetUrl(iconsFontSerif, opts),
|
'font-serif': iconsIcon0MergedSvg2 + '#font-serif',
|
||||||
'geo-arrow-down': formatAssetUrl(iconsGeoArrowDown, opts),
|
'geo-arrow-down': iconsIcon0MergedSvg2 + '#geo-arrow-down',
|
||||||
'geo-arrow-left': formatAssetUrl(iconsGeoArrowLeft, opts),
|
'geo-arrow-left': iconsIcon0MergedSvg2 + '#geo-arrow-left',
|
||||||
'geo-arrow-right': formatAssetUrl(iconsGeoArrowRight, opts),
|
'geo-arrow-right': iconsIcon0MergedSvg2 + '#geo-arrow-right',
|
||||||
'geo-arrow-up': formatAssetUrl(iconsGeoArrowUp, opts),
|
'geo-arrow-up': iconsIcon0MergedSvg2 + '#geo-arrow-up',
|
||||||
'geo-check-box': formatAssetUrl(iconsGeoCheckBox, opts),
|
'geo-check-box': iconsIcon0MergedSvg2 + '#geo-check-box',
|
||||||
'geo-cloud': formatAssetUrl(iconsGeoCloud, opts),
|
'geo-cloud': iconsIcon0MergedSvg2 + '#geo-cloud',
|
||||||
'geo-diamond': formatAssetUrl(iconsGeoDiamond, opts),
|
'geo-diamond': iconsIcon0MergedSvg2 + '#geo-diamond',
|
||||||
'geo-ellipse': formatAssetUrl(iconsGeoEllipse, opts),
|
'geo-ellipse': iconsIcon0MergedSvg2 + '#geo-ellipse',
|
||||||
'geo-heart': formatAssetUrl(iconsGeoHeart, opts),
|
'geo-heart': iconsIcon0MergedSvg2 + '#geo-heart',
|
||||||
'geo-hexagon': formatAssetUrl(iconsGeoHexagon, opts),
|
'geo-hexagon': iconsIcon0MergedSvg2 + '#geo-hexagon',
|
||||||
'geo-octagon': formatAssetUrl(iconsGeoOctagon, opts),
|
'geo-octagon': iconsIcon0MergedSvg2 + '#geo-octagon',
|
||||||
'geo-oval': formatAssetUrl(iconsGeoOval, opts),
|
'geo-oval': iconsIcon0MergedSvg2 + '#geo-oval',
|
||||||
'geo-pentagon': formatAssetUrl(iconsGeoPentagon, opts),
|
'geo-pentagon': iconsIcon0MergedSvg2 + '#geo-pentagon',
|
||||||
'geo-rectangle': formatAssetUrl(iconsGeoRectangle, opts),
|
'geo-rectangle': iconsIcon0MergedSvg2 + '#geo-rectangle',
|
||||||
'geo-rhombus-2': formatAssetUrl(iconsGeoRhombus2, opts),
|
'geo-rhombus-2': iconsIcon0MergedSvg2 + '#geo-rhombus-2',
|
||||||
'geo-rhombus': formatAssetUrl(iconsGeoRhombus, opts),
|
'geo-rhombus': iconsIcon0MergedSvg2 + '#geo-rhombus',
|
||||||
'geo-star': formatAssetUrl(iconsGeoStar, opts),
|
'geo-star': iconsIcon0MergedSvg2 + '#geo-star',
|
||||||
'geo-trapezoid': formatAssetUrl(iconsGeoTrapezoid, opts),
|
'geo-trapezoid': iconsIcon0MergedSvg2 + '#geo-trapezoid',
|
||||||
'geo-triangle': formatAssetUrl(iconsGeoTriangle, opts),
|
'geo-triangle': iconsIcon0MergedSvg2 + '#geo-triangle',
|
||||||
'geo-x-box': formatAssetUrl(iconsGeoXBox, opts),
|
'geo-x-box': iconsIcon0MergedSvg2 + '#geo-x-box',
|
||||||
github: formatAssetUrl(iconsGithub, opts),
|
github: iconsIcon0MergedSvg2 + '#github',
|
||||||
group: formatAssetUrl(iconsGroup, opts),
|
group: iconsIcon0MergedSvg2 + '#group',
|
||||||
'horizontal-align-end': formatAssetUrl(iconsHorizontalAlignEnd, opts),
|
'horizontal-align-end': iconsIcon0MergedSvg2 + '#horizontal-align-end',
|
||||||
'horizontal-align-middle': formatAssetUrl(iconsHorizontalAlignMiddle, opts),
|
'horizontal-align-middle': iconsIcon0MergedSvg2 + '#horizontal-align-middle',
|
||||||
'horizontal-align-start': formatAssetUrl(iconsHorizontalAlignStart, opts),
|
'horizontal-align-start': iconsIcon0MergedSvg2 + '#horizontal-align-start',
|
||||||
'info-circle': formatAssetUrl(iconsInfoCircle, opts),
|
'info-circle': iconsIcon0MergedSvg2 + '#info-circle',
|
||||||
leading: formatAssetUrl(iconsLeading, opts),
|
leading: iconsIcon0MergedSvg2 + '#leading',
|
||||||
link: formatAssetUrl(iconsLink, opts),
|
link: iconsIcon0MergedSvg2 + '#link',
|
||||||
lock: formatAssetUrl(iconsLock, opts),
|
lock: iconsIcon0MergedSvg2 + '#lock',
|
||||||
menu: formatAssetUrl(iconsMenu, opts),
|
menu: iconsIcon0MergedSvg2 + '#menu',
|
||||||
minus: formatAssetUrl(iconsMinus, opts),
|
minus: iconsIcon0MergedSvg2 + '#minus',
|
||||||
mixed: formatAssetUrl(iconsMixed, opts),
|
mixed: iconsIcon0MergedSvg2 + '#mixed',
|
||||||
pack: formatAssetUrl(iconsPack, opts),
|
pack: iconsIcon0MergedSvg2 + '#pack',
|
||||||
plus: formatAssetUrl(iconsPlus, opts),
|
plus: iconsIcon0MergedSvg2 + '#plus',
|
||||||
'question-mark-circle': formatAssetUrl(iconsQuestionMarkCircle, opts),
|
'question-mark-circle': iconsIcon0MergedSvg2 + '#question-mark-circle',
|
||||||
'question-mark': formatAssetUrl(iconsQuestionMark, opts),
|
'question-mark': iconsIcon0MergedSvg2 + '#question-mark',
|
||||||
redo: formatAssetUrl(iconsRedo, opts),
|
redo: iconsIcon0MergedSvg2 + '#redo',
|
||||||
'reset-zoom': formatAssetUrl(iconsResetZoom, opts),
|
'reset-zoom': iconsIcon0MergedSvg2 + '#reset-zoom',
|
||||||
'rotate-ccw': formatAssetUrl(iconsRotateCcw, opts),
|
'rotate-ccw': iconsIcon0MergedSvg2 + '#rotate-ccw',
|
||||||
'rotate-cw': formatAssetUrl(iconsRotateCw, opts),
|
'rotate-cw': iconsIcon0MergedSvg2 + '#rotate-cw',
|
||||||
'send-backward': formatAssetUrl(iconsSendBackward, opts),
|
'send-backward': iconsIcon0MergedSvg2 + '#send-backward',
|
||||||
'send-to-back': formatAssetUrl(iconsSendToBack, opts),
|
'send-to-back': iconsIcon0MergedSvg2 + '#send-to-back',
|
||||||
'share-1': formatAssetUrl(iconsShare1, opts),
|
'share-1': iconsIcon0MergedSvg2 + '#share-1',
|
||||||
'size-extra-large': formatAssetUrl(iconsSizeExtraLarge, opts),
|
'size-extra-large': iconsIcon0MergedSvg2 + '#size-extra-large',
|
||||||
'size-large': formatAssetUrl(iconsSizeLarge, opts),
|
'size-large': iconsIcon0MergedSvg2 + '#size-large',
|
||||||
'size-medium': formatAssetUrl(iconsSizeMedium, opts),
|
'size-medium': iconsIcon0MergedSvg2 + '#size-medium',
|
||||||
'size-small': formatAssetUrl(iconsSizeSmall, opts),
|
'size-small': iconsIcon0MergedSvg2 + '#size-small',
|
||||||
'spline-cubic': formatAssetUrl(iconsSplineCubic, opts),
|
'spline-cubic': iconsIcon0MergedSvg2 + '#spline-cubic',
|
||||||
'spline-line': formatAssetUrl(iconsSplineLine, opts),
|
'spline-line': iconsIcon0MergedSvg2 + '#spline-line',
|
||||||
'stack-horizontal': formatAssetUrl(iconsStackHorizontal, opts),
|
'stack-horizontal': iconsIcon0MergedSvg2 + '#stack-horizontal',
|
||||||
'stack-vertical': formatAssetUrl(iconsStackVertical, opts),
|
'stack-vertical': iconsIcon0MergedSvg2 + '#stack-vertical',
|
||||||
'status-offline': formatAssetUrl(iconsStatusOffline, opts),
|
'status-offline': iconsIcon0MergedSvg2 + '#status-offline',
|
||||||
'stretch-horizontal': formatAssetUrl(iconsStretchHorizontal, opts),
|
'stretch-horizontal': iconsIcon0MergedSvg2 + '#stretch-horizontal',
|
||||||
'stretch-vertical': formatAssetUrl(iconsStretchVertical, opts),
|
'stretch-vertical': iconsIcon0MergedSvg2 + '#stretch-vertical',
|
||||||
'text-align-center': formatAssetUrl(iconsTextAlignCenter, opts),
|
'text-align-center': iconsIcon0MergedSvg2 + '#text-align-center',
|
||||||
'text-align-left': formatAssetUrl(iconsTextAlignLeft, opts),
|
'text-align-left': iconsIcon0MergedSvg2 + '#text-align-left',
|
||||||
'text-align-right': formatAssetUrl(iconsTextAlignRight, opts),
|
'text-align-right': iconsIcon0MergedSvg2 + '#text-align-right',
|
||||||
'toggle-off': formatAssetUrl(iconsToggleOff, opts),
|
'toggle-off': iconsIcon0MergedSvg2 + '#toggle-off',
|
||||||
'toggle-on': formatAssetUrl(iconsToggleOn, opts),
|
'toggle-on': iconsIcon0MergedSvg2 + '#toggle-on',
|
||||||
'tool-arrow': formatAssetUrl(iconsToolArrow, opts),
|
'tool-arrow': iconsIcon0MergedSvg2 + '#tool-arrow',
|
||||||
'tool-eraser': formatAssetUrl(iconsToolEraser, opts),
|
'tool-eraser': iconsIcon0MergedSvg2 + '#tool-eraser',
|
||||||
'tool-frame': formatAssetUrl(iconsToolFrame, opts),
|
'tool-frame': iconsIcon0MergedSvg2 + '#tool-frame',
|
||||||
'tool-hand': formatAssetUrl(iconsToolHand, opts),
|
'tool-hand': iconsIcon0MergedSvg2 + '#tool-hand',
|
||||||
'tool-highlight': formatAssetUrl(iconsToolHighlight, opts),
|
'tool-highlight': iconsIcon0MergedSvg2 + '#tool-highlight',
|
||||||
'tool-laser': formatAssetUrl(iconsToolLaser, opts),
|
'tool-laser': iconsIcon0MergedSvg2 + '#tool-laser',
|
||||||
'tool-line': formatAssetUrl(iconsToolLine, opts),
|
'tool-line': iconsIcon0MergedSvg2 + '#tool-line',
|
||||||
'tool-media': formatAssetUrl(iconsToolMedia, opts),
|
'tool-media': iconsIcon0MergedSvg2 + '#tool-media',
|
||||||
'tool-note': formatAssetUrl(iconsToolNote, opts),
|
'tool-note': iconsIcon0MergedSvg2 + '#tool-note',
|
||||||
'tool-pencil': formatAssetUrl(iconsToolPencil, opts),
|
'tool-pencil': iconsIcon0MergedSvg2 + '#tool-pencil',
|
||||||
'tool-pointer': formatAssetUrl(iconsToolPointer, opts),
|
'tool-pointer': iconsIcon0MergedSvg2 + '#tool-pointer',
|
||||||
'tool-screenshot': formatAssetUrl(iconsToolScreenshot, opts),
|
'tool-screenshot': iconsIcon0MergedSvg2 + '#tool-screenshot',
|
||||||
'tool-text': formatAssetUrl(iconsToolText, opts),
|
'tool-text': iconsIcon0MergedSvg2 + '#tool-text',
|
||||||
trash: formatAssetUrl(iconsTrash, opts),
|
trash: iconsIcon0MergedSvg2 + '#trash',
|
||||||
twitter: formatAssetUrl(iconsTwitter, opts),
|
twitter: iconsIcon0MergedSvg2 + '#twitter',
|
||||||
undo: formatAssetUrl(iconsUndo, opts),
|
undo: iconsIcon0MergedSvg2 + '#undo',
|
||||||
ungroup: formatAssetUrl(iconsUngroup, opts),
|
ungroup: iconsIcon0MergedSvg2 + '#ungroup',
|
||||||
unlock: formatAssetUrl(iconsUnlock, opts),
|
unlock: iconsIcon0MergedSvg2 + '#unlock',
|
||||||
'vertical-align-end': formatAssetUrl(iconsVerticalAlignEnd, opts),
|
'vertical-align-end': iconsIcon0MergedSvg2 + '#vertical-align-end',
|
||||||
'vertical-align-middle': formatAssetUrl(iconsVerticalAlignMiddle, opts),
|
'vertical-align-middle': iconsIcon0MergedSvg2 + '#vertical-align-middle',
|
||||||
'vertical-align-start': formatAssetUrl(iconsVerticalAlignStart, opts),
|
'vertical-align-start': iconsIcon0MergedSvg2 + '#vertical-align-start',
|
||||||
'warning-triangle': formatAssetUrl(iconsWarningTriangle, opts),
|
'warning-triangle': iconsIcon0MergedSvg2 + '#warning-triangle',
|
||||||
'zoom-in': formatAssetUrl(iconsZoomIn, opts),
|
'zoom-in': iconsIcon0MergedSvg2 + '#zoom-in',
|
||||||
'zoom-out': formatAssetUrl(iconsZoomOut, opts),
|
'zoom-out': iconsIcon0MergedSvg2 + '#zoom-out',
|
||||||
},
|
},
|
||||||
translations: {
|
translations: {
|
||||||
ar: formatAssetUrl(translationsAr, opts),
|
ar: formatAssetUrl(translationsArJson, opts),
|
||||||
ca: formatAssetUrl(translationsCa, opts),
|
ca: formatAssetUrl(translationsCaJson, opts),
|
||||||
cs: formatAssetUrl(translationsCs, opts),
|
cs: formatAssetUrl(translationsCsJson, opts),
|
||||||
da: formatAssetUrl(translationsDa, opts),
|
da: formatAssetUrl(translationsDaJson, opts),
|
||||||
de: formatAssetUrl(translationsDe, opts),
|
de: formatAssetUrl(translationsDeJson, opts),
|
||||||
en: formatAssetUrl(translationsEn, opts),
|
en: formatAssetUrl(translationsEnJson, opts),
|
||||||
es: formatAssetUrl(translationsEs, opts),
|
es: formatAssetUrl(translationsEsJson, opts),
|
||||||
fa: formatAssetUrl(translationsFa, opts),
|
fa: formatAssetUrl(translationsFaJson, opts),
|
||||||
fi: formatAssetUrl(translationsFi, opts),
|
fi: formatAssetUrl(translationsFiJson, opts),
|
||||||
fr: formatAssetUrl(translationsFr, opts),
|
fr: formatAssetUrl(translationsFrJson, opts),
|
||||||
gl: formatAssetUrl(translationsGl, opts),
|
gl: formatAssetUrl(translationsGlJson, opts),
|
||||||
he: formatAssetUrl(translationsHe, opts),
|
he: formatAssetUrl(translationsHeJson, opts),
|
||||||
'hi-in': formatAssetUrl(translationsHiIn, opts),
|
'hi-in': formatAssetUrl(translationsHiInJson, opts),
|
||||||
hr: formatAssetUrl(translationsHr, opts),
|
hr: formatAssetUrl(translationsHrJson, opts),
|
||||||
hu: formatAssetUrl(translationsHu, opts),
|
hu: formatAssetUrl(translationsHuJson, opts),
|
||||||
id: formatAssetUrl(translationsId, opts),
|
id: formatAssetUrl(translationsIdJson, opts),
|
||||||
it: formatAssetUrl(translationsIt, opts),
|
it: formatAssetUrl(translationsItJson, opts),
|
||||||
ja: formatAssetUrl(translationsJa, opts),
|
ja: formatAssetUrl(translationsJaJson, opts),
|
||||||
'ko-kr': formatAssetUrl(translationsKoKr, opts),
|
'ko-kr': formatAssetUrl(translationsKoKrJson, opts),
|
||||||
ku: formatAssetUrl(translationsKu, opts),
|
ku: formatAssetUrl(translationsKuJson, opts),
|
||||||
languages: formatAssetUrl(translationsLanguages, opts),
|
languages: formatAssetUrl(translationsLanguagesJson, opts),
|
||||||
main: formatAssetUrl(translationsMain, opts),
|
main: formatAssetUrl(translationsMainJson, opts),
|
||||||
my: formatAssetUrl(translationsMy, opts),
|
my: formatAssetUrl(translationsMyJson, opts),
|
||||||
ne: formatAssetUrl(translationsNe, opts),
|
ne: formatAssetUrl(translationsNeJson, opts),
|
||||||
no: formatAssetUrl(translationsNo, opts),
|
no: formatAssetUrl(translationsNoJson, opts),
|
||||||
pl: formatAssetUrl(translationsPl, opts),
|
pl: formatAssetUrl(translationsPlJson, opts),
|
||||||
'pt-br': formatAssetUrl(translationsPtBr, opts),
|
'pt-br': formatAssetUrl(translationsPtBrJson, opts),
|
||||||
'pt-pt': formatAssetUrl(translationsPtPt, opts),
|
'pt-pt': formatAssetUrl(translationsPtPtJson, opts),
|
||||||
ro: formatAssetUrl(translationsRo, opts),
|
ro: formatAssetUrl(translationsRoJson, opts),
|
||||||
ru: formatAssetUrl(translationsRu, opts),
|
ru: formatAssetUrl(translationsRuJson, opts),
|
||||||
sl: formatAssetUrl(translationsSl, opts),
|
sl: formatAssetUrl(translationsSlJson, opts),
|
||||||
sv: formatAssetUrl(translationsSv, opts),
|
sv: formatAssetUrl(translationsSvJson, opts),
|
||||||
te: formatAssetUrl(translationsTe, opts),
|
te: formatAssetUrl(translationsTeJson, opts),
|
||||||
th: formatAssetUrl(translationsTh, opts),
|
th: formatAssetUrl(translationsThJson, opts),
|
||||||
tr: formatAssetUrl(translationsTr, opts),
|
tr: formatAssetUrl(translationsTrJson, opts),
|
||||||
uk: formatAssetUrl(translationsUk, opts),
|
uk: formatAssetUrl(translationsUkJson, opts),
|
||||||
vi: formatAssetUrl(translationsVi, opts),
|
vi: formatAssetUrl(translationsViJson, opts),
|
||||||
'zh-cn': formatAssetUrl(translationsZhCn, opts),
|
'zh-cn': formatAssetUrl(translationsZhCnJson, opts),
|
||||||
'zh-tw': formatAssetUrl(translationsZhTw, opts),
|
'zh-tw': formatAssetUrl(translationsZhTwJson, opts),
|
||||||
},
|
},
|
||||||
embedIcons: {
|
embedIcons: {
|
||||||
codepen: formatAssetUrl(embedIconsCodepen, opts),
|
codepen: formatAssetUrl(embedIconsCodepenPng, opts),
|
||||||
codesandbox: formatAssetUrl(embedIconsCodesandbox, opts),
|
codesandbox: formatAssetUrl(embedIconsCodesandboxPng, opts),
|
||||||
desmos: formatAssetUrl(embedIconsDesmos, opts),
|
desmos: formatAssetUrl(embedIconsDesmosPng, opts),
|
||||||
excalidraw: formatAssetUrl(embedIconsExcalidraw, opts),
|
excalidraw: formatAssetUrl(embedIconsExcalidrawPng, opts),
|
||||||
felt: formatAssetUrl(embedIconsFelt, opts),
|
felt: formatAssetUrl(embedIconsFeltPng, opts),
|
||||||
figma: formatAssetUrl(embedIconsFigma, opts),
|
figma: formatAssetUrl(embedIconsFigmaPng, opts),
|
||||||
github_gist: formatAssetUrl(embedIconsGithubGist, opts),
|
github_gist: formatAssetUrl(embedIconsGithubGistPng, opts),
|
||||||
google_calendar: formatAssetUrl(embedIconsGoogleCalendar, opts),
|
google_calendar: formatAssetUrl(embedIconsGoogleCalendarPng, opts),
|
||||||
google_maps: formatAssetUrl(embedIconsGoogleMaps, opts),
|
google_maps: formatAssetUrl(embedIconsGoogleMapsPng, opts),
|
||||||
google_slides: formatAssetUrl(embedIconsGoogleSlides, opts),
|
google_slides: formatAssetUrl(embedIconsGoogleSlidesPng, opts),
|
||||||
observable: formatAssetUrl(embedIconsObservable, opts),
|
observable: formatAssetUrl(embedIconsObservablePng, opts),
|
||||||
replit: formatAssetUrl(embedIconsReplit, opts),
|
replit: formatAssetUrl(embedIconsReplitPng, opts),
|
||||||
scratch: formatAssetUrl(embedIconsScratch, opts),
|
scratch: formatAssetUrl(embedIconsScratchPng, opts),
|
||||||
spotify: formatAssetUrl(embedIconsSpotify, opts),
|
spotify: formatAssetUrl(embedIconsSpotifyPng, opts),
|
||||||
tldraw: formatAssetUrl(embedIconsTldraw, opts),
|
tldraw: formatAssetUrl(embedIconsTldrawPng, opts),
|
||||||
val_town: formatAssetUrl(embedIconsValTown, opts),
|
val_town: formatAssetUrl(embedIconsValTownPng, opts),
|
||||||
vimeo: formatAssetUrl(embedIconsVimeo, opts),
|
vimeo: formatAssetUrl(embedIconsVimeoPng, opts),
|
||||||
youtube: formatAssetUrl(embedIconsYoutube, opts),
|
youtube: formatAssetUrl(embedIconsYoutubePng, opts),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,424 +5,285 @@
|
||||||
/// <reference path="./modules.d.ts" />
|
/// <reference path="./modules.d.ts" />
|
||||||
import { formatAssetUrl } from './utils.js'
|
import { formatAssetUrl } from './utils.js'
|
||||||
|
|
||||||
import embedIconsCodepen from './embed-icons/codepen.png?url'
|
import embedIconsCodepenPngUrl from './embed-icons/codepen.png?url'
|
||||||
import embedIconsCodesandbox from './embed-icons/codesandbox.png?url'
|
import embedIconsCodesandboxPngUrl from './embed-icons/codesandbox.png?url'
|
||||||
import embedIconsDesmos from './embed-icons/desmos.png?url'
|
import embedIconsDesmosPngUrl from './embed-icons/desmos.png?url'
|
||||||
import embedIconsExcalidraw from './embed-icons/excalidraw.png?url'
|
import embedIconsExcalidrawPngUrl from './embed-icons/excalidraw.png?url'
|
||||||
import embedIconsFelt from './embed-icons/felt.png?url'
|
import embedIconsFeltPngUrl from './embed-icons/felt.png?url'
|
||||||
import embedIconsFigma from './embed-icons/figma.png?url'
|
import embedIconsFigmaPngUrl from './embed-icons/figma.png?url'
|
||||||
import embedIconsGithubGist from './embed-icons/github_gist.png?url'
|
import embedIconsGithubGistPngUrl from './embed-icons/github_gist.png?url'
|
||||||
import embedIconsGoogleCalendar from './embed-icons/google_calendar.png?url'
|
import embedIconsGoogleCalendarPngUrl from './embed-icons/google_calendar.png?url'
|
||||||
import embedIconsGoogleMaps from './embed-icons/google_maps.png?url'
|
import embedIconsGoogleMapsPngUrl from './embed-icons/google_maps.png?url'
|
||||||
import embedIconsGoogleSlides from './embed-icons/google_slides.png?url'
|
import embedIconsGoogleSlidesPngUrl from './embed-icons/google_slides.png?url'
|
||||||
import embedIconsObservable from './embed-icons/observable.png?url'
|
import embedIconsObservablePngUrl from './embed-icons/observable.png?url'
|
||||||
import embedIconsReplit from './embed-icons/replit.png?url'
|
import embedIconsReplitPngUrl from './embed-icons/replit.png?url'
|
||||||
import embedIconsScratch from './embed-icons/scratch.png?url'
|
import embedIconsScratchPngUrl from './embed-icons/scratch.png?url'
|
||||||
import embedIconsSpotify from './embed-icons/spotify.png?url'
|
import embedIconsSpotifyPngUrl from './embed-icons/spotify.png?url'
|
||||||
import embedIconsTldraw from './embed-icons/tldraw.png?url'
|
import embedIconsTldrawPngUrl from './embed-icons/tldraw.png?url'
|
||||||
import embedIconsValTown from './embed-icons/val_town.png?url'
|
import embedIconsValTownPngUrl from './embed-icons/val_town.png?url'
|
||||||
import embedIconsVimeo from './embed-icons/vimeo.png?url'
|
import embedIconsVimeoPngUrl from './embed-icons/vimeo.png?url'
|
||||||
import embedIconsYoutube from './embed-icons/youtube.png?url'
|
import embedIconsYoutubePngUrl from './embed-icons/youtube.png?url'
|
||||||
import fontsMonospace from './fonts/IBMPlexMono-Medium.woff2?url'
|
import fontsIBMPlexMonoMediumWoff2Url from './fonts/IBMPlexMono-Medium.woff2?url'
|
||||||
import fontsSansSerif from './fonts/IBMPlexSans-Medium.woff2?url'
|
import fontsIBMPlexSansMediumWoff2Url from './fonts/IBMPlexSans-Medium.woff2?url'
|
||||||
import fontsSerif from './fonts/IBMPlexSerif-Medium.woff2?url'
|
import fontsIBMPlexSerifMediumWoff2Url from './fonts/IBMPlexSerif-Medium.woff2?url'
|
||||||
import fontsDraw from './fonts/Shantell_Sans-Tldrawish.woff2?url'
|
import fontsShantellSansTldrawishWoff2Url from './fonts/Shantell_Sans-Tldrawish.woff2?url'
|
||||||
import iconsAlignBottom from './icons/icon/align-bottom.svg?url'
|
import iconsIcon0MergedSvgUrl from './icons/icon/0_merged.svg?url'
|
||||||
import iconsAlignCenterHorizontal from './icons/icon/align-center-horizontal.svg?url'
|
import translationsArJsonUrl from './translations/ar.json?url'
|
||||||
import iconsAlignCenterVertical from './icons/icon/align-center-vertical.svg?url'
|
import translationsCaJsonUrl from './translations/ca.json?url'
|
||||||
import iconsAlignLeft from './icons/icon/align-left.svg?url'
|
import translationsCsJsonUrl from './translations/cs.json?url'
|
||||||
import iconsAlignRight from './icons/icon/align-right.svg?url'
|
import translationsDaJsonUrl from './translations/da.json?url'
|
||||||
import iconsAlignTop from './icons/icon/align-top.svg?url'
|
import translationsDeJsonUrl from './translations/de.json?url'
|
||||||
import iconsArrowLeft from './icons/icon/arrow-left.svg?url'
|
import translationsEnJsonUrl from './translations/en.json?url'
|
||||||
import iconsArrowheadArrow from './icons/icon/arrowhead-arrow.svg?url'
|
import translationsEsJsonUrl from './translations/es.json?url'
|
||||||
import iconsArrowheadBar from './icons/icon/arrowhead-bar.svg?url'
|
import translationsFaJsonUrl from './translations/fa.json?url'
|
||||||
import iconsArrowheadDiamond from './icons/icon/arrowhead-diamond.svg?url'
|
import translationsFiJsonUrl from './translations/fi.json?url'
|
||||||
import iconsArrowheadDot from './icons/icon/arrowhead-dot.svg?url'
|
import translationsFrJsonUrl from './translations/fr.json?url'
|
||||||
import iconsArrowheadNone from './icons/icon/arrowhead-none.svg?url'
|
import translationsGlJsonUrl from './translations/gl.json?url'
|
||||||
import iconsArrowheadSquare from './icons/icon/arrowhead-square.svg?url'
|
import translationsHeJsonUrl from './translations/he.json?url'
|
||||||
import iconsArrowheadTriangleInverted from './icons/icon/arrowhead-triangle-inverted.svg?url'
|
import translationsHiInJsonUrl from './translations/hi-in.json?url'
|
||||||
import iconsArrowheadTriangle from './icons/icon/arrowhead-triangle.svg?url'
|
import translationsHrJsonUrl from './translations/hr.json?url'
|
||||||
import iconsBlob from './icons/icon/blob.svg?url'
|
import translationsHuJsonUrl from './translations/hu.json?url'
|
||||||
import iconsBringForward from './icons/icon/bring-forward.svg?url'
|
import translationsIdJsonUrl from './translations/id.json?url'
|
||||||
import iconsBringToFront from './icons/icon/bring-to-front.svg?url'
|
import translationsItJsonUrl from './translations/it.json?url'
|
||||||
import iconsBroken from './icons/icon/broken.svg?url'
|
import translationsJaJsonUrl from './translations/ja.json?url'
|
||||||
import iconsCheckCircle from './icons/icon/check-circle.svg?url'
|
import translationsKoKrJsonUrl from './translations/ko-kr.json?url'
|
||||||
import iconsCheck from './icons/icon/check.svg?url'
|
import translationsKuJsonUrl from './translations/ku.json?url'
|
||||||
import iconsChevronDown from './icons/icon/chevron-down.svg?url'
|
import translationsLanguagesJsonUrl from './translations/languages.json?url'
|
||||||
import iconsChevronLeft from './icons/icon/chevron-left.svg?url'
|
import translationsMainJsonUrl from './translations/main.json?url'
|
||||||
import iconsChevronRight from './icons/icon/chevron-right.svg?url'
|
import translationsMyJsonUrl from './translations/my.json?url'
|
||||||
import iconsChevronUp from './icons/icon/chevron-up.svg?url'
|
import translationsNeJsonUrl from './translations/ne.json?url'
|
||||||
import iconsChevronsNe from './icons/icon/chevrons-ne.svg?url'
|
import translationsNoJsonUrl from './translations/no.json?url'
|
||||||
import iconsChevronsSw from './icons/icon/chevrons-sw.svg?url'
|
import translationsPlJsonUrl from './translations/pl.json?url'
|
||||||
import iconsClipboardCopied from './icons/icon/clipboard-copied.svg?url'
|
import translationsPtBrJsonUrl from './translations/pt-br.json?url'
|
||||||
import iconsClipboardCopy from './icons/icon/clipboard-copy.svg?url'
|
import translationsPtPtJsonUrl from './translations/pt-pt.json?url'
|
||||||
import iconsColor from './icons/icon/color.svg?url'
|
import translationsRoJsonUrl from './translations/ro.json?url'
|
||||||
import iconsCross2 from './icons/icon/cross-2.svg?url'
|
import translationsRuJsonUrl from './translations/ru.json?url'
|
||||||
import iconsCrossCircle from './icons/icon/cross-circle.svg?url'
|
import translationsSlJsonUrl from './translations/sl.json?url'
|
||||||
import iconsDashDashed from './icons/icon/dash-dashed.svg?url'
|
import translationsSvJsonUrl from './translations/sv.json?url'
|
||||||
import iconsDashDotted from './icons/icon/dash-dotted.svg?url'
|
import translationsTeJsonUrl from './translations/te.json?url'
|
||||||
import iconsDashDraw from './icons/icon/dash-draw.svg?url'
|
import translationsThJsonUrl from './translations/th.json?url'
|
||||||
import iconsDashSolid from './icons/icon/dash-solid.svg?url'
|
import translationsTrJsonUrl from './translations/tr.json?url'
|
||||||
import iconsDisconnected from './icons/icon/disconnected.svg?url'
|
import translationsUkJsonUrl from './translations/uk.json?url'
|
||||||
import iconsDiscord from './icons/icon/discord.svg?url'
|
import translationsViJsonUrl from './translations/vi.json?url'
|
||||||
import iconsDistributeHorizontal from './icons/icon/distribute-horizontal.svg?url'
|
import translationsZhCnJsonUrl from './translations/zh-cn.json?url'
|
||||||
import iconsDistributeVertical from './icons/icon/distribute-vertical.svg?url'
|
import translationsZhTwJsonUrl from './translations/zh-tw.json?url'
|
||||||
import iconsDot from './icons/icon/dot.svg?url'
|
|
||||||
import iconsDotsHorizontal from './icons/icon/dots-horizontal.svg?url'
|
|
||||||
import iconsDotsVertical from './icons/icon/dots-vertical.svg?url'
|
|
||||||
import iconsDragHandleDots from './icons/icon/drag-handle-dots.svg?url'
|
|
||||||
import iconsDuplicate from './icons/icon/duplicate.svg?url'
|
|
||||||
import iconsEdit from './icons/icon/edit.svg?url'
|
|
||||||
import iconsExternalLink from './icons/icon/external-link.svg?url'
|
|
||||||
import iconsFillFill from './icons/icon/fill-fill.svg?url'
|
|
||||||
import iconsFillNone from './icons/icon/fill-none.svg?url'
|
|
||||||
import iconsFillPattern from './icons/icon/fill-pattern.svg?url'
|
|
||||||
import iconsFillSemi from './icons/icon/fill-semi.svg?url'
|
|
||||||
import iconsFillSolid from './icons/icon/fill-solid.svg?url'
|
|
||||||
import iconsFollow from './icons/icon/follow.svg?url'
|
|
||||||
import iconsFollowing from './icons/icon/following.svg?url'
|
|
||||||
import iconsFontDraw from './icons/icon/font-draw.svg?url'
|
|
||||||
import iconsFontMono from './icons/icon/font-mono.svg?url'
|
|
||||||
import iconsFontSans from './icons/icon/font-sans.svg?url'
|
|
||||||
import iconsFontSerif from './icons/icon/font-serif.svg?url'
|
|
||||||
import iconsGeoArrowDown from './icons/icon/geo-arrow-down.svg?url'
|
|
||||||
import iconsGeoArrowLeft from './icons/icon/geo-arrow-left.svg?url'
|
|
||||||
import iconsGeoArrowRight from './icons/icon/geo-arrow-right.svg?url'
|
|
||||||
import iconsGeoArrowUp from './icons/icon/geo-arrow-up.svg?url'
|
|
||||||
import iconsGeoCheckBox from './icons/icon/geo-check-box.svg?url'
|
|
||||||
import iconsGeoCloud from './icons/icon/geo-cloud.svg?url'
|
|
||||||
import iconsGeoDiamond from './icons/icon/geo-diamond.svg?url'
|
|
||||||
import iconsGeoEllipse from './icons/icon/geo-ellipse.svg?url'
|
|
||||||
import iconsGeoHeart from './icons/icon/geo-heart.svg?url'
|
|
||||||
import iconsGeoHexagon from './icons/icon/geo-hexagon.svg?url'
|
|
||||||
import iconsGeoOctagon from './icons/icon/geo-octagon.svg?url'
|
|
||||||
import iconsGeoOval from './icons/icon/geo-oval.svg?url'
|
|
||||||
import iconsGeoPentagon from './icons/icon/geo-pentagon.svg?url'
|
|
||||||
import iconsGeoRectangle from './icons/icon/geo-rectangle.svg?url'
|
|
||||||
import iconsGeoRhombus2 from './icons/icon/geo-rhombus-2.svg?url'
|
|
||||||
import iconsGeoRhombus from './icons/icon/geo-rhombus.svg?url'
|
|
||||||
import iconsGeoStar from './icons/icon/geo-star.svg?url'
|
|
||||||
import iconsGeoTrapezoid from './icons/icon/geo-trapezoid.svg?url'
|
|
||||||
import iconsGeoTriangle from './icons/icon/geo-triangle.svg?url'
|
|
||||||
import iconsGeoXBox from './icons/icon/geo-x-box.svg?url'
|
|
||||||
import iconsGithub from './icons/icon/github.svg?url'
|
|
||||||
import iconsGroup from './icons/icon/group.svg?url'
|
|
||||||
import iconsHorizontalAlignEnd from './icons/icon/horizontal-align-end.svg?url'
|
|
||||||
import iconsHorizontalAlignMiddle from './icons/icon/horizontal-align-middle.svg?url'
|
|
||||||
import iconsHorizontalAlignStart from './icons/icon/horizontal-align-start.svg?url'
|
|
||||||
import iconsInfoCircle from './icons/icon/info-circle.svg?url'
|
|
||||||
import iconsLeading from './icons/icon/leading.svg?url'
|
|
||||||
import iconsLink from './icons/icon/link.svg?url'
|
|
||||||
import iconsLock from './icons/icon/lock.svg?url'
|
|
||||||
import iconsMenu from './icons/icon/menu.svg?url'
|
|
||||||
import iconsMinus from './icons/icon/minus.svg?url'
|
|
||||||
import iconsMixed from './icons/icon/mixed.svg?url'
|
|
||||||
import iconsPack from './icons/icon/pack.svg?url'
|
|
||||||
import iconsPlus from './icons/icon/plus.svg?url'
|
|
||||||
import iconsQuestionMarkCircle from './icons/icon/question-mark-circle.svg?url'
|
|
||||||
import iconsQuestionMark from './icons/icon/question-mark.svg?url'
|
|
||||||
import iconsRedo from './icons/icon/redo.svg?url'
|
|
||||||
import iconsResetZoom from './icons/icon/reset-zoom.svg?url'
|
|
||||||
import iconsRotateCcw from './icons/icon/rotate-ccw.svg?url'
|
|
||||||
import iconsRotateCw from './icons/icon/rotate-cw.svg?url'
|
|
||||||
import iconsSendBackward from './icons/icon/send-backward.svg?url'
|
|
||||||
import iconsSendToBack from './icons/icon/send-to-back.svg?url'
|
|
||||||
import iconsShare1 from './icons/icon/share-1.svg?url'
|
|
||||||
import iconsSizeExtraLarge from './icons/icon/size-extra-large.svg?url'
|
|
||||||
import iconsSizeLarge from './icons/icon/size-large.svg?url'
|
|
||||||
import iconsSizeMedium from './icons/icon/size-medium.svg?url'
|
|
||||||
import iconsSizeSmall from './icons/icon/size-small.svg?url'
|
|
||||||
import iconsSplineCubic from './icons/icon/spline-cubic.svg?url'
|
|
||||||
import iconsSplineLine from './icons/icon/spline-line.svg?url'
|
|
||||||
import iconsStackHorizontal from './icons/icon/stack-horizontal.svg?url'
|
|
||||||
import iconsStackVertical from './icons/icon/stack-vertical.svg?url'
|
|
||||||
import iconsStatusOffline from './icons/icon/status-offline.svg?url'
|
|
||||||
import iconsStretchHorizontal from './icons/icon/stretch-horizontal.svg?url'
|
|
||||||
import iconsStretchVertical from './icons/icon/stretch-vertical.svg?url'
|
|
||||||
import iconsTextAlignCenter from './icons/icon/text-align-center.svg?url'
|
|
||||||
import iconsTextAlignLeft from './icons/icon/text-align-left.svg?url'
|
|
||||||
import iconsTextAlignRight from './icons/icon/text-align-right.svg?url'
|
|
||||||
import iconsToggleOff from './icons/icon/toggle-off.svg?url'
|
|
||||||
import iconsToggleOn from './icons/icon/toggle-on.svg?url'
|
|
||||||
import iconsToolArrow from './icons/icon/tool-arrow.svg?url'
|
|
||||||
import iconsToolEraser from './icons/icon/tool-eraser.svg?url'
|
|
||||||
import iconsToolFrame from './icons/icon/tool-frame.svg?url'
|
|
||||||
import iconsToolHand from './icons/icon/tool-hand.svg?url'
|
|
||||||
import iconsToolHighlight from './icons/icon/tool-highlight.svg?url'
|
|
||||||
import iconsToolLaser from './icons/icon/tool-laser.svg?url'
|
|
||||||
import iconsToolLine from './icons/icon/tool-line.svg?url'
|
|
||||||
import iconsToolMedia from './icons/icon/tool-media.svg?url'
|
|
||||||
import iconsToolNote from './icons/icon/tool-note.svg?url'
|
|
||||||
import iconsToolPencil from './icons/icon/tool-pencil.svg?url'
|
|
||||||
import iconsToolPointer from './icons/icon/tool-pointer.svg?url'
|
|
||||||
import iconsToolScreenshot from './icons/icon/tool-screenshot.svg?url'
|
|
||||||
import iconsToolText from './icons/icon/tool-text.svg?url'
|
|
||||||
import iconsTrash from './icons/icon/trash.svg?url'
|
|
||||||
import iconsTwitter from './icons/icon/twitter.svg?url'
|
|
||||||
import iconsUndo from './icons/icon/undo.svg?url'
|
|
||||||
import iconsUngroup from './icons/icon/ungroup.svg?url'
|
|
||||||
import iconsUnlock from './icons/icon/unlock.svg?url'
|
|
||||||
import iconsVerticalAlignEnd from './icons/icon/vertical-align-end.svg?url'
|
|
||||||
import iconsVerticalAlignMiddle from './icons/icon/vertical-align-middle.svg?url'
|
|
||||||
import iconsVerticalAlignStart from './icons/icon/vertical-align-start.svg?url'
|
|
||||||
import iconsWarningTriangle from './icons/icon/warning-triangle.svg?url'
|
|
||||||
import iconsZoomIn from './icons/icon/zoom-in.svg?url'
|
|
||||||
import iconsZoomOut from './icons/icon/zoom-out.svg?url'
|
|
||||||
import translationsAr from './translations/ar.json?url'
|
|
||||||
import translationsCa from './translations/ca.json?url'
|
|
||||||
import translationsCs from './translations/cs.json?url'
|
|
||||||
import translationsDa from './translations/da.json?url'
|
|
||||||
import translationsDe from './translations/de.json?url'
|
|
||||||
import translationsEn from './translations/en.json?url'
|
|
||||||
import translationsEs from './translations/es.json?url'
|
|
||||||
import translationsFa from './translations/fa.json?url'
|
|
||||||
import translationsFi from './translations/fi.json?url'
|
|
||||||
import translationsFr from './translations/fr.json?url'
|
|
||||||
import translationsGl from './translations/gl.json?url'
|
|
||||||
import translationsHe from './translations/he.json?url'
|
|
||||||
import translationsHiIn from './translations/hi-in.json?url'
|
|
||||||
import translationsHr from './translations/hr.json?url'
|
|
||||||
import translationsHu from './translations/hu.json?url'
|
|
||||||
import translationsId from './translations/id.json?url'
|
|
||||||
import translationsIt from './translations/it.json?url'
|
|
||||||
import translationsJa from './translations/ja.json?url'
|
|
||||||
import translationsKoKr from './translations/ko-kr.json?url'
|
|
||||||
import translationsKu from './translations/ku.json?url'
|
|
||||||
import translationsLanguages from './translations/languages.json?url'
|
|
||||||
import translationsMain from './translations/main.json?url'
|
|
||||||
import translationsMy from './translations/my.json?url'
|
|
||||||
import translationsNe from './translations/ne.json?url'
|
|
||||||
import translationsNo from './translations/no.json?url'
|
|
||||||
import translationsPl from './translations/pl.json?url'
|
|
||||||
import translationsPtBr from './translations/pt-br.json?url'
|
|
||||||
import translationsPtPt from './translations/pt-pt.json?url'
|
|
||||||
import translationsRo from './translations/ro.json?url'
|
|
||||||
import translationsRu from './translations/ru.json?url'
|
|
||||||
import translationsSl from './translations/sl.json?url'
|
|
||||||
import translationsSv from './translations/sv.json?url'
|
|
||||||
import translationsTe from './translations/te.json?url'
|
|
||||||
import translationsTh from './translations/th.json?url'
|
|
||||||
import translationsTr from './translations/tr.json?url'
|
|
||||||
import translationsUk from './translations/uk.json?url'
|
|
||||||
import translationsVi from './translations/vi.json?url'
|
|
||||||
import translationsZhCn from './translations/zh-cn.json?url'
|
|
||||||
import translationsZhTw from './translations/zh-tw.json?url'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {AssetUrlOptions} [opts]
|
* @param {AssetUrlOptions} [opts]
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export function getAssetUrlsByImport(opts) {
|
export function getAssetUrlsByImport(opts) {
|
||||||
|
const iconsIcon0MergedSvg2 = formatAssetUrl(iconsIcon0MergedSvgUrl, opts)
|
||||||
return {
|
return {
|
||||||
fonts: {
|
fonts: {
|
||||||
monospace: formatAssetUrl(fontsMonospace, opts),
|
monospace: formatAssetUrl(fontsIBMPlexMonoMediumWoff2Url, opts),
|
||||||
sansSerif: formatAssetUrl(fontsSansSerif, opts),
|
sansSerif: formatAssetUrl(fontsIBMPlexSansMediumWoff2Url, opts),
|
||||||
serif: formatAssetUrl(fontsSerif, opts),
|
serif: formatAssetUrl(fontsIBMPlexSerifMediumWoff2Url, opts),
|
||||||
draw: formatAssetUrl(fontsDraw, opts),
|
draw: formatAssetUrl(fontsShantellSansTldrawishWoff2Url, opts),
|
||||||
},
|
},
|
||||||
icons: {
|
icons: {
|
||||||
'align-bottom': formatAssetUrl(iconsAlignBottom, opts),
|
'align-bottom': iconsIcon0MergedSvg2 + '#align-bottom',
|
||||||
'align-center-horizontal': formatAssetUrl(iconsAlignCenterHorizontal, opts),
|
'align-center-horizontal': iconsIcon0MergedSvg2 + '#align-center-horizontal',
|
||||||
'align-center-vertical': formatAssetUrl(iconsAlignCenterVertical, opts),
|
'align-center-vertical': iconsIcon0MergedSvg2 + '#align-center-vertical',
|
||||||
'align-left': formatAssetUrl(iconsAlignLeft, opts),
|
'align-left': iconsIcon0MergedSvg2 + '#align-left',
|
||||||
'align-right': formatAssetUrl(iconsAlignRight, opts),
|
'align-right': iconsIcon0MergedSvg2 + '#align-right',
|
||||||
'align-top': formatAssetUrl(iconsAlignTop, opts),
|
'align-top': iconsIcon0MergedSvg2 + '#align-top',
|
||||||
'arrow-left': formatAssetUrl(iconsArrowLeft, opts),
|
'arrow-left': iconsIcon0MergedSvg2 + '#arrow-left',
|
||||||
'arrowhead-arrow': formatAssetUrl(iconsArrowheadArrow, opts),
|
'arrowhead-arrow': iconsIcon0MergedSvg2 + '#arrowhead-arrow',
|
||||||
'arrowhead-bar': formatAssetUrl(iconsArrowheadBar, opts),
|
'arrowhead-bar': iconsIcon0MergedSvg2 + '#arrowhead-bar',
|
||||||
'arrowhead-diamond': formatAssetUrl(iconsArrowheadDiamond, opts),
|
'arrowhead-diamond': iconsIcon0MergedSvg2 + '#arrowhead-diamond',
|
||||||
'arrowhead-dot': formatAssetUrl(iconsArrowheadDot, opts),
|
'arrowhead-dot': iconsIcon0MergedSvg2 + '#arrowhead-dot',
|
||||||
'arrowhead-none': formatAssetUrl(iconsArrowheadNone, opts),
|
'arrowhead-none': iconsIcon0MergedSvg2 + '#arrowhead-none',
|
||||||
'arrowhead-square': formatAssetUrl(iconsArrowheadSquare, opts),
|
'arrowhead-square': iconsIcon0MergedSvg2 + '#arrowhead-square',
|
||||||
'arrowhead-triangle-inverted': formatAssetUrl(iconsArrowheadTriangleInverted, opts),
|
'arrowhead-triangle-inverted': iconsIcon0MergedSvg2 + '#arrowhead-triangle-inverted',
|
||||||
'arrowhead-triangle': formatAssetUrl(iconsArrowheadTriangle, opts),
|
'arrowhead-triangle': iconsIcon0MergedSvg2 + '#arrowhead-triangle',
|
||||||
blob: formatAssetUrl(iconsBlob, opts),
|
blob: iconsIcon0MergedSvg2 + '#blob',
|
||||||
'bring-forward': formatAssetUrl(iconsBringForward, opts),
|
'bring-forward': iconsIcon0MergedSvg2 + '#bring-forward',
|
||||||
'bring-to-front': formatAssetUrl(iconsBringToFront, opts),
|
'bring-to-front': iconsIcon0MergedSvg2 + '#bring-to-front',
|
||||||
broken: formatAssetUrl(iconsBroken, opts),
|
broken: iconsIcon0MergedSvg2 + '#broken',
|
||||||
'check-circle': formatAssetUrl(iconsCheckCircle, opts),
|
'check-circle': iconsIcon0MergedSvg2 + '#check-circle',
|
||||||
check: formatAssetUrl(iconsCheck, opts),
|
check: iconsIcon0MergedSvg2 + '#check',
|
||||||
'chevron-down': formatAssetUrl(iconsChevronDown, opts),
|
'chevron-down': iconsIcon0MergedSvg2 + '#chevron-down',
|
||||||
'chevron-left': formatAssetUrl(iconsChevronLeft, opts),
|
'chevron-left': iconsIcon0MergedSvg2 + '#chevron-left',
|
||||||
'chevron-right': formatAssetUrl(iconsChevronRight, opts),
|
'chevron-right': iconsIcon0MergedSvg2 + '#chevron-right',
|
||||||
'chevron-up': formatAssetUrl(iconsChevronUp, opts),
|
'chevron-up': iconsIcon0MergedSvg2 + '#chevron-up',
|
||||||
'chevrons-ne': formatAssetUrl(iconsChevronsNe, opts),
|
'chevrons-ne': iconsIcon0MergedSvg2 + '#chevrons-ne',
|
||||||
'chevrons-sw': formatAssetUrl(iconsChevronsSw, opts),
|
'chevrons-sw': iconsIcon0MergedSvg2 + '#chevrons-sw',
|
||||||
'clipboard-copied': formatAssetUrl(iconsClipboardCopied, opts),
|
'clipboard-copied': iconsIcon0MergedSvg2 + '#clipboard-copied',
|
||||||
'clipboard-copy': formatAssetUrl(iconsClipboardCopy, opts),
|
'clipboard-copy': iconsIcon0MergedSvg2 + '#clipboard-copy',
|
||||||
color: formatAssetUrl(iconsColor, opts),
|
color: iconsIcon0MergedSvg2 + '#color',
|
||||||
'cross-2': formatAssetUrl(iconsCross2, opts),
|
'cross-2': iconsIcon0MergedSvg2 + '#cross-2',
|
||||||
'cross-circle': formatAssetUrl(iconsCrossCircle, opts),
|
'cross-circle': iconsIcon0MergedSvg2 + '#cross-circle',
|
||||||
'dash-dashed': formatAssetUrl(iconsDashDashed, opts),
|
'dash-dashed': iconsIcon0MergedSvg2 + '#dash-dashed',
|
||||||
'dash-dotted': formatAssetUrl(iconsDashDotted, opts),
|
'dash-dotted': iconsIcon0MergedSvg2 + '#dash-dotted',
|
||||||
'dash-draw': formatAssetUrl(iconsDashDraw, opts),
|
'dash-draw': iconsIcon0MergedSvg2 + '#dash-draw',
|
||||||
'dash-solid': formatAssetUrl(iconsDashSolid, opts),
|
'dash-solid': iconsIcon0MergedSvg2 + '#dash-solid',
|
||||||
disconnected: formatAssetUrl(iconsDisconnected, opts),
|
disconnected: iconsIcon0MergedSvg2 + '#disconnected',
|
||||||
discord: formatAssetUrl(iconsDiscord, opts),
|
discord: iconsIcon0MergedSvg2 + '#discord',
|
||||||
'distribute-horizontal': formatAssetUrl(iconsDistributeHorizontal, opts),
|
'distribute-horizontal': iconsIcon0MergedSvg2 + '#distribute-horizontal',
|
||||||
'distribute-vertical': formatAssetUrl(iconsDistributeVertical, opts),
|
'distribute-vertical': iconsIcon0MergedSvg2 + '#distribute-vertical',
|
||||||
dot: formatAssetUrl(iconsDot, opts),
|
dot: iconsIcon0MergedSvg2 + '#dot',
|
||||||
'dots-horizontal': formatAssetUrl(iconsDotsHorizontal, opts),
|
'dots-horizontal': iconsIcon0MergedSvg2 + '#dots-horizontal',
|
||||||
'dots-vertical': formatAssetUrl(iconsDotsVertical, opts),
|
'dots-vertical': iconsIcon0MergedSvg2 + '#dots-vertical',
|
||||||
'drag-handle-dots': formatAssetUrl(iconsDragHandleDots, opts),
|
'drag-handle-dots': iconsIcon0MergedSvg2 + '#drag-handle-dots',
|
||||||
duplicate: formatAssetUrl(iconsDuplicate, opts),
|
duplicate: iconsIcon0MergedSvg2 + '#duplicate',
|
||||||
edit: formatAssetUrl(iconsEdit, opts),
|
edit: iconsIcon0MergedSvg2 + '#edit',
|
||||||
'external-link': formatAssetUrl(iconsExternalLink, opts),
|
'external-link': iconsIcon0MergedSvg2 + '#external-link',
|
||||||
'fill-fill': formatAssetUrl(iconsFillFill, opts),
|
'fill-fill': iconsIcon0MergedSvg2 + '#fill-fill',
|
||||||
'fill-none': formatAssetUrl(iconsFillNone, opts),
|
'fill-none': iconsIcon0MergedSvg2 + '#fill-none',
|
||||||
'fill-pattern': formatAssetUrl(iconsFillPattern, opts),
|
'fill-pattern': iconsIcon0MergedSvg2 + '#fill-pattern',
|
||||||
'fill-semi': formatAssetUrl(iconsFillSemi, opts),
|
'fill-semi': iconsIcon0MergedSvg2 + '#fill-semi',
|
||||||
'fill-solid': formatAssetUrl(iconsFillSolid, opts),
|
'fill-solid': iconsIcon0MergedSvg2 + '#fill-solid',
|
||||||
follow: formatAssetUrl(iconsFollow, opts),
|
follow: iconsIcon0MergedSvg2 + '#follow',
|
||||||
following: formatAssetUrl(iconsFollowing, opts),
|
following: iconsIcon0MergedSvg2 + '#following',
|
||||||
'font-draw': formatAssetUrl(iconsFontDraw, opts),
|
'font-draw': iconsIcon0MergedSvg2 + '#font-draw',
|
||||||
'font-mono': formatAssetUrl(iconsFontMono, opts),
|
'font-mono': iconsIcon0MergedSvg2 + '#font-mono',
|
||||||
'font-sans': formatAssetUrl(iconsFontSans, opts),
|
'font-sans': iconsIcon0MergedSvg2 + '#font-sans',
|
||||||
'font-serif': formatAssetUrl(iconsFontSerif, opts),
|
'font-serif': iconsIcon0MergedSvg2 + '#font-serif',
|
||||||
'geo-arrow-down': formatAssetUrl(iconsGeoArrowDown, opts),
|
'geo-arrow-down': iconsIcon0MergedSvg2 + '#geo-arrow-down',
|
||||||
'geo-arrow-left': formatAssetUrl(iconsGeoArrowLeft, opts),
|
'geo-arrow-left': iconsIcon0MergedSvg2 + '#geo-arrow-left',
|
||||||
'geo-arrow-right': formatAssetUrl(iconsGeoArrowRight, opts),
|
'geo-arrow-right': iconsIcon0MergedSvg2 + '#geo-arrow-right',
|
||||||
'geo-arrow-up': formatAssetUrl(iconsGeoArrowUp, opts),
|
'geo-arrow-up': iconsIcon0MergedSvg2 + '#geo-arrow-up',
|
||||||
'geo-check-box': formatAssetUrl(iconsGeoCheckBox, opts),
|
'geo-check-box': iconsIcon0MergedSvg2 + '#geo-check-box',
|
||||||
'geo-cloud': formatAssetUrl(iconsGeoCloud, opts),
|
'geo-cloud': iconsIcon0MergedSvg2 + '#geo-cloud',
|
||||||
'geo-diamond': formatAssetUrl(iconsGeoDiamond, opts),
|
'geo-diamond': iconsIcon0MergedSvg2 + '#geo-diamond',
|
||||||
'geo-ellipse': formatAssetUrl(iconsGeoEllipse, opts),
|
'geo-ellipse': iconsIcon0MergedSvg2 + '#geo-ellipse',
|
||||||
'geo-heart': formatAssetUrl(iconsGeoHeart, opts),
|
'geo-heart': iconsIcon0MergedSvg2 + '#geo-heart',
|
||||||
'geo-hexagon': formatAssetUrl(iconsGeoHexagon, opts),
|
'geo-hexagon': iconsIcon0MergedSvg2 + '#geo-hexagon',
|
||||||
'geo-octagon': formatAssetUrl(iconsGeoOctagon, opts),
|
'geo-octagon': iconsIcon0MergedSvg2 + '#geo-octagon',
|
||||||
'geo-oval': formatAssetUrl(iconsGeoOval, opts),
|
'geo-oval': iconsIcon0MergedSvg2 + '#geo-oval',
|
||||||
'geo-pentagon': formatAssetUrl(iconsGeoPentagon, opts),
|
'geo-pentagon': iconsIcon0MergedSvg2 + '#geo-pentagon',
|
||||||
'geo-rectangle': formatAssetUrl(iconsGeoRectangle, opts),
|
'geo-rectangle': iconsIcon0MergedSvg2 + '#geo-rectangle',
|
||||||
'geo-rhombus-2': formatAssetUrl(iconsGeoRhombus2, opts),
|
'geo-rhombus-2': iconsIcon0MergedSvg2 + '#geo-rhombus-2',
|
||||||
'geo-rhombus': formatAssetUrl(iconsGeoRhombus, opts),
|
'geo-rhombus': iconsIcon0MergedSvg2 + '#geo-rhombus',
|
||||||
'geo-star': formatAssetUrl(iconsGeoStar, opts),
|
'geo-star': iconsIcon0MergedSvg2 + '#geo-star',
|
||||||
'geo-trapezoid': formatAssetUrl(iconsGeoTrapezoid, opts),
|
'geo-trapezoid': iconsIcon0MergedSvg2 + '#geo-trapezoid',
|
||||||
'geo-triangle': formatAssetUrl(iconsGeoTriangle, opts),
|
'geo-triangle': iconsIcon0MergedSvg2 + '#geo-triangle',
|
||||||
'geo-x-box': formatAssetUrl(iconsGeoXBox, opts),
|
'geo-x-box': iconsIcon0MergedSvg2 + '#geo-x-box',
|
||||||
github: formatAssetUrl(iconsGithub, opts),
|
github: iconsIcon0MergedSvg2 + '#github',
|
||||||
group: formatAssetUrl(iconsGroup, opts),
|
group: iconsIcon0MergedSvg2 + '#group',
|
||||||
'horizontal-align-end': formatAssetUrl(iconsHorizontalAlignEnd, opts),
|
'horizontal-align-end': iconsIcon0MergedSvg2 + '#horizontal-align-end',
|
||||||
'horizontal-align-middle': formatAssetUrl(iconsHorizontalAlignMiddle, opts),
|
'horizontal-align-middle': iconsIcon0MergedSvg2 + '#horizontal-align-middle',
|
||||||
'horizontal-align-start': formatAssetUrl(iconsHorizontalAlignStart, opts),
|
'horizontal-align-start': iconsIcon0MergedSvg2 + '#horizontal-align-start',
|
||||||
'info-circle': formatAssetUrl(iconsInfoCircle, opts),
|
'info-circle': iconsIcon0MergedSvg2 + '#info-circle',
|
||||||
leading: formatAssetUrl(iconsLeading, opts),
|
leading: iconsIcon0MergedSvg2 + '#leading',
|
||||||
link: formatAssetUrl(iconsLink, opts),
|
link: iconsIcon0MergedSvg2 + '#link',
|
||||||
lock: formatAssetUrl(iconsLock, opts),
|
lock: iconsIcon0MergedSvg2 + '#lock',
|
||||||
menu: formatAssetUrl(iconsMenu, opts),
|
menu: iconsIcon0MergedSvg2 + '#menu',
|
||||||
minus: formatAssetUrl(iconsMinus, opts),
|
minus: iconsIcon0MergedSvg2 + '#minus',
|
||||||
mixed: formatAssetUrl(iconsMixed, opts),
|
mixed: iconsIcon0MergedSvg2 + '#mixed',
|
||||||
pack: formatAssetUrl(iconsPack, opts),
|
pack: iconsIcon0MergedSvg2 + '#pack',
|
||||||
plus: formatAssetUrl(iconsPlus, opts),
|
plus: iconsIcon0MergedSvg2 + '#plus',
|
||||||
'question-mark-circle': formatAssetUrl(iconsQuestionMarkCircle, opts),
|
'question-mark-circle': iconsIcon0MergedSvg2 + '#question-mark-circle',
|
||||||
'question-mark': formatAssetUrl(iconsQuestionMark, opts),
|
'question-mark': iconsIcon0MergedSvg2 + '#question-mark',
|
||||||
redo: formatAssetUrl(iconsRedo, opts),
|
redo: iconsIcon0MergedSvg2 + '#redo',
|
||||||
'reset-zoom': formatAssetUrl(iconsResetZoom, opts),
|
'reset-zoom': iconsIcon0MergedSvg2 + '#reset-zoom',
|
||||||
'rotate-ccw': formatAssetUrl(iconsRotateCcw, opts),
|
'rotate-ccw': iconsIcon0MergedSvg2 + '#rotate-ccw',
|
||||||
'rotate-cw': formatAssetUrl(iconsRotateCw, opts),
|
'rotate-cw': iconsIcon0MergedSvg2 + '#rotate-cw',
|
||||||
'send-backward': formatAssetUrl(iconsSendBackward, opts),
|
'send-backward': iconsIcon0MergedSvg2 + '#send-backward',
|
||||||
'send-to-back': formatAssetUrl(iconsSendToBack, opts),
|
'send-to-back': iconsIcon0MergedSvg2 + '#send-to-back',
|
||||||
'share-1': formatAssetUrl(iconsShare1, opts),
|
'share-1': iconsIcon0MergedSvg2 + '#share-1',
|
||||||
'size-extra-large': formatAssetUrl(iconsSizeExtraLarge, opts),
|
'size-extra-large': iconsIcon0MergedSvg2 + '#size-extra-large',
|
||||||
'size-large': formatAssetUrl(iconsSizeLarge, opts),
|
'size-large': iconsIcon0MergedSvg2 + '#size-large',
|
||||||
'size-medium': formatAssetUrl(iconsSizeMedium, opts),
|
'size-medium': iconsIcon0MergedSvg2 + '#size-medium',
|
||||||
'size-small': formatAssetUrl(iconsSizeSmall, opts),
|
'size-small': iconsIcon0MergedSvg2 + '#size-small',
|
||||||
'spline-cubic': formatAssetUrl(iconsSplineCubic, opts),
|
'spline-cubic': iconsIcon0MergedSvg2 + '#spline-cubic',
|
||||||
'spline-line': formatAssetUrl(iconsSplineLine, opts),
|
'spline-line': iconsIcon0MergedSvg2 + '#spline-line',
|
||||||
'stack-horizontal': formatAssetUrl(iconsStackHorizontal, opts),
|
'stack-horizontal': iconsIcon0MergedSvg2 + '#stack-horizontal',
|
||||||
'stack-vertical': formatAssetUrl(iconsStackVertical, opts),
|
'stack-vertical': iconsIcon0MergedSvg2 + '#stack-vertical',
|
||||||
'status-offline': formatAssetUrl(iconsStatusOffline, opts),
|
'status-offline': iconsIcon0MergedSvg2 + '#status-offline',
|
||||||
'stretch-horizontal': formatAssetUrl(iconsStretchHorizontal, opts),
|
'stretch-horizontal': iconsIcon0MergedSvg2 + '#stretch-horizontal',
|
||||||
'stretch-vertical': formatAssetUrl(iconsStretchVertical, opts),
|
'stretch-vertical': iconsIcon0MergedSvg2 + '#stretch-vertical',
|
||||||
'text-align-center': formatAssetUrl(iconsTextAlignCenter, opts),
|
'text-align-center': iconsIcon0MergedSvg2 + '#text-align-center',
|
||||||
'text-align-left': formatAssetUrl(iconsTextAlignLeft, opts),
|
'text-align-left': iconsIcon0MergedSvg2 + '#text-align-left',
|
||||||
'text-align-right': formatAssetUrl(iconsTextAlignRight, opts),
|
'text-align-right': iconsIcon0MergedSvg2 + '#text-align-right',
|
||||||
'toggle-off': formatAssetUrl(iconsToggleOff, opts),
|
'toggle-off': iconsIcon0MergedSvg2 + '#toggle-off',
|
||||||
'toggle-on': formatAssetUrl(iconsToggleOn, opts),
|
'toggle-on': iconsIcon0MergedSvg2 + '#toggle-on',
|
||||||
'tool-arrow': formatAssetUrl(iconsToolArrow, opts),
|
'tool-arrow': iconsIcon0MergedSvg2 + '#tool-arrow',
|
||||||
'tool-eraser': formatAssetUrl(iconsToolEraser, opts),
|
'tool-eraser': iconsIcon0MergedSvg2 + '#tool-eraser',
|
||||||
'tool-frame': formatAssetUrl(iconsToolFrame, opts),
|
'tool-frame': iconsIcon0MergedSvg2 + '#tool-frame',
|
||||||
'tool-hand': formatAssetUrl(iconsToolHand, opts),
|
'tool-hand': iconsIcon0MergedSvg2 + '#tool-hand',
|
||||||
'tool-highlight': formatAssetUrl(iconsToolHighlight, opts),
|
'tool-highlight': iconsIcon0MergedSvg2 + '#tool-highlight',
|
||||||
'tool-laser': formatAssetUrl(iconsToolLaser, opts),
|
'tool-laser': iconsIcon0MergedSvg2 + '#tool-laser',
|
||||||
'tool-line': formatAssetUrl(iconsToolLine, opts),
|
'tool-line': iconsIcon0MergedSvg2 + '#tool-line',
|
||||||
'tool-media': formatAssetUrl(iconsToolMedia, opts),
|
'tool-media': iconsIcon0MergedSvg2 + '#tool-media',
|
||||||
'tool-note': formatAssetUrl(iconsToolNote, opts),
|
'tool-note': iconsIcon0MergedSvg2 + '#tool-note',
|
||||||
'tool-pencil': formatAssetUrl(iconsToolPencil, opts),
|
'tool-pencil': iconsIcon0MergedSvg2 + '#tool-pencil',
|
||||||
'tool-pointer': formatAssetUrl(iconsToolPointer, opts),
|
'tool-pointer': iconsIcon0MergedSvg2 + '#tool-pointer',
|
||||||
'tool-screenshot': formatAssetUrl(iconsToolScreenshot, opts),
|
'tool-screenshot': iconsIcon0MergedSvg2 + '#tool-screenshot',
|
||||||
'tool-text': formatAssetUrl(iconsToolText, opts),
|
'tool-text': iconsIcon0MergedSvg2 + '#tool-text',
|
||||||
trash: formatAssetUrl(iconsTrash, opts),
|
trash: iconsIcon0MergedSvg2 + '#trash',
|
||||||
twitter: formatAssetUrl(iconsTwitter, opts),
|
twitter: iconsIcon0MergedSvg2 + '#twitter',
|
||||||
undo: formatAssetUrl(iconsUndo, opts),
|
undo: iconsIcon0MergedSvg2 + '#undo',
|
||||||
ungroup: formatAssetUrl(iconsUngroup, opts),
|
ungroup: iconsIcon0MergedSvg2 + '#ungroup',
|
||||||
unlock: formatAssetUrl(iconsUnlock, opts),
|
unlock: iconsIcon0MergedSvg2 + '#unlock',
|
||||||
'vertical-align-end': formatAssetUrl(iconsVerticalAlignEnd, opts),
|
'vertical-align-end': iconsIcon0MergedSvg2 + '#vertical-align-end',
|
||||||
'vertical-align-middle': formatAssetUrl(iconsVerticalAlignMiddle, opts),
|
'vertical-align-middle': iconsIcon0MergedSvg2 + '#vertical-align-middle',
|
||||||
'vertical-align-start': formatAssetUrl(iconsVerticalAlignStart, opts),
|
'vertical-align-start': iconsIcon0MergedSvg2 + '#vertical-align-start',
|
||||||
'warning-triangle': formatAssetUrl(iconsWarningTriangle, opts),
|
'warning-triangle': iconsIcon0MergedSvg2 + '#warning-triangle',
|
||||||
'zoom-in': formatAssetUrl(iconsZoomIn, opts),
|
'zoom-in': iconsIcon0MergedSvg2 + '#zoom-in',
|
||||||
'zoom-out': formatAssetUrl(iconsZoomOut, opts),
|
'zoom-out': iconsIcon0MergedSvg2 + '#zoom-out',
|
||||||
},
|
},
|
||||||
translations: {
|
translations: {
|
||||||
ar: formatAssetUrl(translationsAr, opts),
|
ar: formatAssetUrl(translationsArJsonUrl, opts),
|
||||||
ca: formatAssetUrl(translationsCa, opts),
|
ca: formatAssetUrl(translationsCaJsonUrl, opts),
|
||||||
cs: formatAssetUrl(translationsCs, opts),
|
cs: formatAssetUrl(translationsCsJsonUrl, opts),
|
||||||
da: formatAssetUrl(translationsDa, opts),
|
da: formatAssetUrl(translationsDaJsonUrl, opts),
|
||||||
de: formatAssetUrl(translationsDe, opts),
|
de: formatAssetUrl(translationsDeJsonUrl, opts),
|
||||||
en: formatAssetUrl(translationsEn, opts),
|
en: formatAssetUrl(translationsEnJsonUrl, opts),
|
||||||
es: formatAssetUrl(translationsEs, opts),
|
es: formatAssetUrl(translationsEsJsonUrl, opts),
|
||||||
fa: formatAssetUrl(translationsFa, opts),
|
fa: formatAssetUrl(translationsFaJsonUrl, opts),
|
||||||
fi: formatAssetUrl(translationsFi, opts),
|
fi: formatAssetUrl(translationsFiJsonUrl, opts),
|
||||||
fr: formatAssetUrl(translationsFr, opts),
|
fr: formatAssetUrl(translationsFrJsonUrl, opts),
|
||||||
gl: formatAssetUrl(translationsGl, opts),
|
gl: formatAssetUrl(translationsGlJsonUrl, opts),
|
||||||
he: formatAssetUrl(translationsHe, opts),
|
he: formatAssetUrl(translationsHeJsonUrl, opts),
|
||||||
'hi-in': formatAssetUrl(translationsHiIn, opts),
|
'hi-in': formatAssetUrl(translationsHiInJsonUrl, opts),
|
||||||
hr: formatAssetUrl(translationsHr, opts),
|
hr: formatAssetUrl(translationsHrJsonUrl, opts),
|
||||||
hu: formatAssetUrl(translationsHu, opts),
|
hu: formatAssetUrl(translationsHuJsonUrl, opts),
|
||||||
id: formatAssetUrl(translationsId, opts),
|
id: formatAssetUrl(translationsIdJsonUrl, opts),
|
||||||
it: formatAssetUrl(translationsIt, opts),
|
it: formatAssetUrl(translationsItJsonUrl, opts),
|
||||||
ja: formatAssetUrl(translationsJa, opts),
|
ja: formatAssetUrl(translationsJaJsonUrl, opts),
|
||||||
'ko-kr': formatAssetUrl(translationsKoKr, opts),
|
'ko-kr': formatAssetUrl(translationsKoKrJsonUrl, opts),
|
||||||
ku: formatAssetUrl(translationsKu, opts),
|
ku: formatAssetUrl(translationsKuJsonUrl, opts),
|
||||||
languages: formatAssetUrl(translationsLanguages, opts),
|
languages: formatAssetUrl(translationsLanguagesJsonUrl, opts),
|
||||||
main: formatAssetUrl(translationsMain, opts),
|
main: formatAssetUrl(translationsMainJsonUrl, opts),
|
||||||
my: formatAssetUrl(translationsMy, opts),
|
my: formatAssetUrl(translationsMyJsonUrl, opts),
|
||||||
ne: formatAssetUrl(translationsNe, opts),
|
ne: formatAssetUrl(translationsNeJsonUrl, opts),
|
||||||
no: formatAssetUrl(translationsNo, opts),
|
no: formatAssetUrl(translationsNoJsonUrl, opts),
|
||||||
pl: formatAssetUrl(translationsPl, opts),
|
pl: formatAssetUrl(translationsPlJsonUrl, opts),
|
||||||
'pt-br': formatAssetUrl(translationsPtBr, opts),
|
'pt-br': formatAssetUrl(translationsPtBrJsonUrl, opts),
|
||||||
'pt-pt': formatAssetUrl(translationsPtPt, opts),
|
'pt-pt': formatAssetUrl(translationsPtPtJsonUrl, opts),
|
||||||
ro: formatAssetUrl(translationsRo, opts),
|
ro: formatAssetUrl(translationsRoJsonUrl, opts),
|
||||||
ru: formatAssetUrl(translationsRu, opts),
|
ru: formatAssetUrl(translationsRuJsonUrl, opts),
|
||||||
sl: formatAssetUrl(translationsSl, opts),
|
sl: formatAssetUrl(translationsSlJsonUrl, opts),
|
||||||
sv: formatAssetUrl(translationsSv, opts),
|
sv: formatAssetUrl(translationsSvJsonUrl, opts),
|
||||||
te: formatAssetUrl(translationsTe, opts),
|
te: formatAssetUrl(translationsTeJsonUrl, opts),
|
||||||
th: formatAssetUrl(translationsTh, opts),
|
th: formatAssetUrl(translationsThJsonUrl, opts),
|
||||||
tr: formatAssetUrl(translationsTr, opts),
|
tr: formatAssetUrl(translationsTrJsonUrl, opts),
|
||||||
uk: formatAssetUrl(translationsUk, opts),
|
uk: formatAssetUrl(translationsUkJsonUrl, opts),
|
||||||
vi: formatAssetUrl(translationsVi, opts),
|
vi: formatAssetUrl(translationsViJsonUrl, opts),
|
||||||
'zh-cn': formatAssetUrl(translationsZhCn, opts),
|
'zh-cn': formatAssetUrl(translationsZhCnJsonUrl, opts),
|
||||||
'zh-tw': formatAssetUrl(translationsZhTw, opts),
|
'zh-tw': formatAssetUrl(translationsZhTwJsonUrl, opts),
|
||||||
},
|
},
|
||||||
embedIcons: {
|
embedIcons: {
|
||||||
codepen: formatAssetUrl(embedIconsCodepen, opts),
|
codepen: formatAssetUrl(embedIconsCodepenPngUrl, opts),
|
||||||
codesandbox: formatAssetUrl(embedIconsCodesandbox, opts),
|
codesandbox: formatAssetUrl(embedIconsCodesandboxPngUrl, opts),
|
||||||
desmos: formatAssetUrl(embedIconsDesmos, opts),
|
desmos: formatAssetUrl(embedIconsDesmosPngUrl, opts),
|
||||||
excalidraw: formatAssetUrl(embedIconsExcalidraw, opts),
|
excalidraw: formatAssetUrl(embedIconsExcalidrawPngUrl, opts),
|
||||||
felt: formatAssetUrl(embedIconsFelt, opts),
|
felt: formatAssetUrl(embedIconsFeltPngUrl, opts),
|
||||||
figma: formatAssetUrl(embedIconsFigma, opts),
|
figma: formatAssetUrl(embedIconsFigmaPngUrl, opts),
|
||||||
github_gist: formatAssetUrl(embedIconsGithubGist, opts),
|
github_gist: formatAssetUrl(embedIconsGithubGistPngUrl, opts),
|
||||||
google_calendar: formatAssetUrl(embedIconsGoogleCalendar, opts),
|
google_calendar: formatAssetUrl(embedIconsGoogleCalendarPngUrl, opts),
|
||||||
google_maps: formatAssetUrl(embedIconsGoogleMaps, opts),
|
google_maps: formatAssetUrl(embedIconsGoogleMapsPngUrl, opts),
|
||||||
google_slides: formatAssetUrl(embedIconsGoogleSlides, opts),
|
google_slides: formatAssetUrl(embedIconsGoogleSlidesPngUrl, opts),
|
||||||
observable: formatAssetUrl(embedIconsObservable, opts),
|
observable: formatAssetUrl(embedIconsObservablePngUrl, opts),
|
||||||
replit: formatAssetUrl(embedIconsReplit, opts),
|
replit: formatAssetUrl(embedIconsReplitPngUrl, opts),
|
||||||
scratch: formatAssetUrl(embedIconsScratch, opts),
|
scratch: formatAssetUrl(embedIconsScratchPngUrl, opts),
|
||||||
spotify: formatAssetUrl(embedIconsSpotify, opts),
|
spotify: formatAssetUrl(embedIconsSpotifyPngUrl, opts),
|
||||||
tldraw: formatAssetUrl(embedIconsTldraw, opts),
|
tldraw: formatAssetUrl(embedIconsTldrawPngUrl, opts),
|
||||||
val_town: formatAssetUrl(embedIconsValTown, opts),
|
val_town: formatAssetUrl(embedIconsValTownPngUrl, opts),
|
||||||
vimeo: formatAssetUrl(embedIconsVimeo, opts),
|
vimeo: formatAssetUrl(embedIconsVimeoPngUrl, opts),
|
||||||
youtube: formatAssetUrl(embedIconsYoutube, opts),
|
youtube: formatAssetUrl(embedIconsYoutubePngUrl, opts),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { formatAssetUrl } from './utils.js'
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export function getAssetUrls(opts) {
|
export function getAssetUrls(opts) {
|
||||||
|
const iconsIcon0MergedSvg = formatAssetUrl('./icons/icon/0_merged.svg', opts)
|
||||||
return {
|
return {
|
||||||
fonts: {
|
fonts: {
|
||||||
monospace: formatAssetUrl('./fonts/IBMPlexMono-Medium.woff2', opts),
|
monospace: formatAssetUrl('./fonts/IBMPlexMono-Medium.woff2', opts),
|
||||||
|
@ -18,150 +19,147 @@ export function getAssetUrls(opts) {
|
||||||
draw: formatAssetUrl('./fonts/Shantell_Sans-Tldrawish.woff2', opts),
|
draw: formatAssetUrl('./fonts/Shantell_Sans-Tldrawish.woff2', opts),
|
||||||
},
|
},
|
||||||
icons: {
|
icons: {
|
||||||
'align-bottom': formatAssetUrl('./icons/icon/align-bottom.svg', opts),
|
'align-bottom': iconsIcon0MergedSvg + '#align-bottom',
|
||||||
'align-center-horizontal': formatAssetUrl('./icons/icon/align-center-horizontal.svg', opts),
|
'align-center-horizontal': iconsIcon0MergedSvg + '#align-center-horizontal',
|
||||||
'align-center-vertical': formatAssetUrl('./icons/icon/align-center-vertical.svg', opts),
|
'align-center-vertical': iconsIcon0MergedSvg + '#align-center-vertical',
|
||||||
'align-left': formatAssetUrl('./icons/icon/align-left.svg', opts),
|
'align-left': iconsIcon0MergedSvg + '#align-left',
|
||||||
'align-right': formatAssetUrl('./icons/icon/align-right.svg', opts),
|
'align-right': iconsIcon0MergedSvg + '#align-right',
|
||||||
'align-top': formatAssetUrl('./icons/icon/align-top.svg', opts),
|
'align-top': iconsIcon0MergedSvg + '#align-top',
|
||||||
'arrow-left': formatAssetUrl('./icons/icon/arrow-left.svg', opts),
|
'arrow-left': iconsIcon0MergedSvg + '#arrow-left',
|
||||||
'arrowhead-arrow': formatAssetUrl('./icons/icon/arrowhead-arrow.svg', opts),
|
'arrowhead-arrow': iconsIcon0MergedSvg + '#arrowhead-arrow',
|
||||||
'arrowhead-bar': formatAssetUrl('./icons/icon/arrowhead-bar.svg', opts),
|
'arrowhead-bar': iconsIcon0MergedSvg + '#arrowhead-bar',
|
||||||
'arrowhead-diamond': formatAssetUrl('./icons/icon/arrowhead-diamond.svg', opts),
|
'arrowhead-diamond': iconsIcon0MergedSvg + '#arrowhead-diamond',
|
||||||
'arrowhead-dot': formatAssetUrl('./icons/icon/arrowhead-dot.svg', opts),
|
'arrowhead-dot': iconsIcon0MergedSvg + '#arrowhead-dot',
|
||||||
'arrowhead-none': formatAssetUrl('./icons/icon/arrowhead-none.svg', opts),
|
'arrowhead-none': iconsIcon0MergedSvg + '#arrowhead-none',
|
||||||
'arrowhead-square': formatAssetUrl('./icons/icon/arrowhead-square.svg', opts),
|
'arrowhead-square': iconsIcon0MergedSvg + '#arrowhead-square',
|
||||||
'arrowhead-triangle-inverted': formatAssetUrl(
|
'arrowhead-triangle-inverted': iconsIcon0MergedSvg + '#arrowhead-triangle-inverted',
|
||||||
'./icons/icon/arrowhead-triangle-inverted.svg',
|
'arrowhead-triangle': iconsIcon0MergedSvg + '#arrowhead-triangle',
|
||||||
opts
|
blob: iconsIcon0MergedSvg + '#blob',
|
||||||
),
|
'bring-forward': iconsIcon0MergedSvg + '#bring-forward',
|
||||||
'arrowhead-triangle': formatAssetUrl('./icons/icon/arrowhead-triangle.svg', opts),
|
'bring-to-front': iconsIcon0MergedSvg + '#bring-to-front',
|
||||||
blob: formatAssetUrl('./icons/icon/blob.svg', opts),
|
broken: iconsIcon0MergedSvg + '#broken',
|
||||||
'bring-forward': formatAssetUrl('./icons/icon/bring-forward.svg', opts),
|
'check-circle': iconsIcon0MergedSvg + '#check-circle',
|
||||||
'bring-to-front': formatAssetUrl('./icons/icon/bring-to-front.svg', opts),
|
check: iconsIcon0MergedSvg + '#check',
|
||||||
broken: formatAssetUrl('./icons/icon/broken.svg', opts),
|
'chevron-down': iconsIcon0MergedSvg + '#chevron-down',
|
||||||
'check-circle': formatAssetUrl('./icons/icon/check-circle.svg', opts),
|
'chevron-left': iconsIcon0MergedSvg + '#chevron-left',
|
||||||
check: formatAssetUrl('./icons/icon/check.svg', opts),
|
'chevron-right': iconsIcon0MergedSvg + '#chevron-right',
|
||||||
'chevron-down': formatAssetUrl('./icons/icon/chevron-down.svg', opts),
|
'chevron-up': iconsIcon0MergedSvg + '#chevron-up',
|
||||||
'chevron-left': formatAssetUrl('./icons/icon/chevron-left.svg', opts),
|
'chevrons-ne': iconsIcon0MergedSvg + '#chevrons-ne',
|
||||||
'chevron-right': formatAssetUrl('./icons/icon/chevron-right.svg', opts),
|
'chevrons-sw': iconsIcon0MergedSvg + '#chevrons-sw',
|
||||||
'chevron-up': formatAssetUrl('./icons/icon/chevron-up.svg', opts),
|
'clipboard-copied': iconsIcon0MergedSvg + '#clipboard-copied',
|
||||||
'chevrons-ne': formatAssetUrl('./icons/icon/chevrons-ne.svg', opts),
|
'clipboard-copy': iconsIcon0MergedSvg + '#clipboard-copy',
|
||||||
'chevrons-sw': formatAssetUrl('./icons/icon/chevrons-sw.svg', opts),
|
color: iconsIcon0MergedSvg + '#color',
|
||||||
'clipboard-copied': formatAssetUrl('./icons/icon/clipboard-copied.svg', opts),
|
'cross-2': iconsIcon0MergedSvg + '#cross-2',
|
||||||
'clipboard-copy': formatAssetUrl('./icons/icon/clipboard-copy.svg', opts),
|
'cross-circle': iconsIcon0MergedSvg + '#cross-circle',
|
||||||
color: formatAssetUrl('./icons/icon/color.svg', opts),
|
'dash-dashed': iconsIcon0MergedSvg + '#dash-dashed',
|
||||||
'cross-2': formatAssetUrl('./icons/icon/cross-2.svg', opts),
|
'dash-dotted': iconsIcon0MergedSvg + '#dash-dotted',
|
||||||
'cross-circle': formatAssetUrl('./icons/icon/cross-circle.svg', opts),
|
'dash-draw': iconsIcon0MergedSvg + '#dash-draw',
|
||||||
'dash-dashed': formatAssetUrl('./icons/icon/dash-dashed.svg', opts),
|
'dash-solid': iconsIcon0MergedSvg + '#dash-solid',
|
||||||
'dash-dotted': formatAssetUrl('./icons/icon/dash-dotted.svg', opts),
|
disconnected: iconsIcon0MergedSvg + '#disconnected',
|
||||||
'dash-draw': formatAssetUrl('./icons/icon/dash-draw.svg', opts),
|
discord: iconsIcon0MergedSvg + '#discord',
|
||||||
'dash-solid': formatAssetUrl('./icons/icon/dash-solid.svg', opts),
|
'distribute-horizontal': iconsIcon0MergedSvg + '#distribute-horizontal',
|
||||||
disconnected: formatAssetUrl('./icons/icon/disconnected.svg', opts),
|
'distribute-vertical': iconsIcon0MergedSvg + '#distribute-vertical',
|
||||||
discord: formatAssetUrl('./icons/icon/discord.svg', opts),
|
dot: iconsIcon0MergedSvg + '#dot',
|
||||||
'distribute-horizontal': formatAssetUrl('./icons/icon/distribute-horizontal.svg', opts),
|
'dots-horizontal': iconsIcon0MergedSvg + '#dots-horizontal',
|
||||||
'distribute-vertical': formatAssetUrl('./icons/icon/distribute-vertical.svg', opts),
|
'dots-vertical': iconsIcon0MergedSvg + '#dots-vertical',
|
||||||
dot: formatAssetUrl('./icons/icon/dot.svg', opts),
|
'drag-handle-dots': iconsIcon0MergedSvg + '#drag-handle-dots',
|
||||||
'dots-horizontal': formatAssetUrl('./icons/icon/dots-horizontal.svg', opts),
|
duplicate: iconsIcon0MergedSvg + '#duplicate',
|
||||||
'dots-vertical': formatAssetUrl('./icons/icon/dots-vertical.svg', opts),
|
edit: iconsIcon0MergedSvg + '#edit',
|
||||||
'drag-handle-dots': formatAssetUrl('./icons/icon/drag-handle-dots.svg', opts),
|
'external-link': iconsIcon0MergedSvg + '#external-link',
|
||||||
duplicate: formatAssetUrl('./icons/icon/duplicate.svg', opts),
|
'fill-fill': iconsIcon0MergedSvg + '#fill-fill',
|
||||||
edit: formatAssetUrl('./icons/icon/edit.svg', opts),
|
'fill-none': iconsIcon0MergedSvg + '#fill-none',
|
||||||
'external-link': formatAssetUrl('./icons/icon/external-link.svg', opts),
|
'fill-pattern': iconsIcon0MergedSvg + '#fill-pattern',
|
||||||
'fill-fill': formatAssetUrl('./icons/icon/fill-fill.svg', opts),
|
'fill-semi': iconsIcon0MergedSvg + '#fill-semi',
|
||||||
'fill-none': formatAssetUrl('./icons/icon/fill-none.svg', opts),
|
'fill-solid': iconsIcon0MergedSvg + '#fill-solid',
|
||||||
'fill-pattern': formatAssetUrl('./icons/icon/fill-pattern.svg', opts),
|
follow: iconsIcon0MergedSvg + '#follow',
|
||||||
'fill-semi': formatAssetUrl('./icons/icon/fill-semi.svg', opts),
|
following: iconsIcon0MergedSvg + '#following',
|
||||||
'fill-solid': formatAssetUrl('./icons/icon/fill-solid.svg', opts),
|
'font-draw': iconsIcon0MergedSvg + '#font-draw',
|
||||||
follow: formatAssetUrl('./icons/icon/follow.svg', opts),
|
'font-mono': iconsIcon0MergedSvg + '#font-mono',
|
||||||
following: formatAssetUrl('./icons/icon/following.svg', opts),
|
'font-sans': iconsIcon0MergedSvg + '#font-sans',
|
||||||
'font-draw': formatAssetUrl('./icons/icon/font-draw.svg', opts),
|
'font-serif': iconsIcon0MergedSvg + '#font-serif',
|
||||||
'font-mono': formatAssetUrl('./icons/icon/font-mono.svg', opts),
|
'geo-arrow-down': iconsIcon0MergedSvg + '#geo-arrow-down',
|
||||||
'font-sans': formatAssetUrl('./icons/icon/font-sans.svg', opts),
|
'geo-arrow-left': iconsIcon0MergedSvg + '#geo-arrow-left',
|
||||||
'font-serif': formatAssetUrl('./icons/icon/font-serif.svg', opts),
|
'geo-arrow-right': iconsIcon0MergedSvg + '#geo-arrow-right',
|
||||||
'geo-arrow-down': formatAssetUrl('./icons/icon/geo-arrow-down.svg', opts),
|
'geo-arrow-up': iconsIcon0MergedSvg + '#geo-arrow-up',
|
||||||
'geo-arrow-left': formatAssetUrl('./icons/icon/geo-arrow-left.svg', opts),
|
'geo-check-box': iconsIcon0MergedSvg + '#geo-check-box',
|
||||||
'geo-arrow-right': formatAssetUrl('./icons/icon/geo-arrow-right.svg', opts),
|
'geo-cloud': iconsIcon0MergedSvg + '#geo-cloud',
|
||||||
'geo-arrow-up': formatAssetUrl('./icons/icon/geo-arrow-up.svg', opts),
|
'geo-diamond': iconsIcon0MergedSvg + '#geo-diamond',
|
||||||
'geo-check-box': formatAssetUrl('./icons/icon/geo-check-box.svg', opts),
|
'geo-ellipse': iconsIcon0MergedSvg + '#geo-ellipse',
|
||||||
'geo-cloud': formatAssetUrl('./icons/icon/geo-cloud.svg', opts),
|
'geo-heart': iconsIcon0MergedSvg + '#geo-heart',
|
||||||
'geo-diamond': formatAssetUrl('./icons/icon/geo-diamond.svg', opts),
|
'geo-hexagon': iconsIcon0MergedSvg + '#geo-hexagon',
|
||||||
'geo-ellipse': formatAssetUrl('./icons/icon/geo-ellipse.svg', opts),
|
'geo-octagon': iconsIcon0MergedSvg + '#geo-octagon',
|
||||||
'geo-heart': formatAssetUrl('./icons/icon/geo-heart.svg', opts),
|
'geo-oval': iconsIcon0MergedSvg + '#geo-oval',
|
||||||
'geo-hexagon': formatAssetUrl('./icons/icon/geo-hexagon.svg', opts),
|
'geo-pentagon': iconsIcon0MergedSvg + '#geo-pentagon',
|
||||||
'geo-octagon': formatAssetUrl('./icons/icon/geo-octagon.svg', opts),
|
'geo-rectangle': iconsIcon0MergedSvg + '#geo-rectangle',
|
||||||
'geo-oval': formatAssetUrl('./icons/icon/geo-oval.svg', opts),
|
'geo-rhombus-2': iconsIcon0MergedSvg + '#geo-rhombus-2',
|
||||||
'geo-pentagon': formatAssetUrl('./icons/icon/geo-pentagon.svg', opts),
|
'geo-rhombus': iconsIcon0MergedSvg + '#geo-rhombus',
|
||||||
'geo-rectangle': formatAssetUrl('./icons/icon/geo-rectangle.svg', opts),
|
'geo-star': iconsIcon0MergedSvg + '#geo-star',
|
||||||
'geo-rhombus-2': formatAssetUrl('./icons/icon/geo-rhombus-2.svg', opts),
|
'geo-trapezoid': iconsIcon0MergedSvg + '#geo-trapezoid',
|
||||||
'geo-rhombus': formatAssetUrl('./icons/icon/geo-rhombus.svg', opts),
|
'geo-triangle': iconsIcon0MergedSvg + '#geo-triangle',
|
||||||
'geo-star': formatAssetUrl('./icons/icon/geo-star.svg', opts),
|
'geo-x-box': iconsIcon0MergedSvg + '#geo-x-box',
|
||||||
'geo-trapezoid': formatAssetUrl('./icons/icon/geo-trapezoid.svg', opts),
|
github: iconsIcon0MergedSvg + '#github',
|
||||||
'geo-triangle': formatAssetUrl('./icons/icon/geo-triangle.svg', opts),
|
group: iconsIcon0MergedSvg + '#group',
|
||||||
'geo-x-box': formatAssetUrl('./icons/icon/geo-x-box.svg', opts),
|
'horizontal-align-end': iconsIcon0MergedSvg + '#horizontal-align-end',
|
||||||
github: formatAssetUrl('./icons/icon/github.svg', opts),
|
'horizontal-align-middle': iconsIcon0MergedSvg + '#horizontal-align-middle',
|
||||||
group: formatAssetUrl('./icons/icon/group.svg', opts),
|
'horizontal-align-start': iconsIcon0MergedSvg + '#horizontal-align-start',
|
||||||
'horizontal-align-end': formatAssetUrl('./icons/icon/horizontal-align-end.svg', opts),
|
'info-circle': iconsIcon0MergedSvg + '#info-circle',
|
||||||
'horizontal-align-middle': formatAssetUrl('./icons/icon/horizontal-align-middle.svg', opts),
|
leading: iconsIcon0MergedSvg + '#leading',
|
||||||
'horizontal-align-start': formatAssetUrl('./icons/icon/horizontal-align-start.svg', opts),
|
link: iconsIcon0MergedSvg + '#link',
|
||||||
'info-circle': formatAssetUrl('./icons/icon/info-circle.svg', opts),
|
lock: iconsIcon0MergedSvg + '#lock',
|
||||||
leading: formatAssetUrl('./icons/icon/leading.svg', opts),
|
menu: iconsIcon0MergedSvg + '#menu',
|
||||||
link: formatAssetUrl('./icons/icon/link.svg', opts),
|
minus: iconsIcon0MergedSvg + '#minus',
|
||||||
lock: formatAssetUrl('./icons/icon/lock.svg', opts),
|
mixed: iconsIcon0MergedSvg + '#mixed',
|
||||||
menu: formatAssetUrl('./icons/icon/menu.svg', opts),
|
pack: iconsIcon0MergedSvg + '#pack',
|
||||||
minus: formatAssetUrl('./icons/icon/minus.svg', opts),
|
plus: iconsIcon0MergedSvg + '#plus',
|
||||||
mixed: formatAssetUrl('./icons/icon/mixed.svg', opts),
|
'question-mark-circle': iconsIcon0MergedSvg + '#question-mark-circle',
|
||||||
pack: formatAssetUrl('./icons/icon/pack.svg', opts),
|
'question-mark': iconsIcon0MergedSvg + '#question-mark',
|
||||||
plus: formatAssetUrl('./icons/icon/plus.svg', opts),
|
redo: iconsIcon0MergedSvg + '#redo',
|
||||||
'question-mark-circle': formatAssetUrl('./icons/icon/question-mark-circle.svg', opts),
|
'reset-zoom': iconsIcon0MergedSvg + '#reset-zoom',
|
||||||
'question-mark': formatAssetUrl('./icons/icon/question-mark.svg', opts),
|
'rotate-ccw': iconsIcon0MergedSvg + '#rotate-ccw',
|
||||||
redo: formatAssetUrl('./icons/icon/redo.svg', opts),
|
'rotate-cw': iconsIcon0MergedSvg + '#rotate-cw',
|
||||||
'reset-zoom': formatAssetUrl('./icons/icon/reset-zoom.svg', opts),
|
'send-backward': iconsIcon0MergedSvg + '#send-backward',
|
||||||
'rotate-ccw': formatAssetUrl('./icons/icon/rotate-ccw.svg', opts),
|
'send-to-back': iconsIcon0MergedSvg + '#send-to-back',
|
||||||
'rotate-cw': formatAssetUrl('./icons/icon/rotate-cw.svg', opts),
|
'share-1': iconsIcon0MergedSvg + '#share-1',
|
||||||
'send-backward': formatAssetUrl('./icons/icon/send-backward.svg', opts),
|
'size-extra-large': iconsIcon0MergedSvg + '#size-extra-large',
|
||||||
'send-to-back': formatAssetUrl('./icons/icon/send-to-back.svg', opts),
|
'size-large': iconsIcon0MergedSvg + '#size-large',
|
||||||
'share-1': formatAssetUrl('./icons/icon/share-1.svg', opts),
|
'size-medium': iconsIcon0MergedSvg + '#size-medium',
|
||||||
'size-extra-large': formatAssetUrl('./icons/icon/size-extra-large.svg', opts),
|
'size-small': iconsIcon0MergedSvg + '#size-small',
|
||||||
'size-large': formatAssetUrl('./icons/icon/size-large.svg', opts),
|
'spline-cubic': iconsIcon0MergedSvg + '#spline-cubic',
|
||||||
'size-medium': formatAssetUrl('./icons/icon/size-medium.svg', opts),
|
'spline-line': iconsIcon0MergedSvg + '#spline-line',
|
||||||
'size-small': formatAssetUrl('./icons/icon/size-small.svg', opts),
|
'stack-horizontal': iconsIcon0MergedSvg + '#stack-horizontal',
|
||||||
'spline-cubic': formatAssetUrl('./icons/icon/spline-cubic.svg', opts),
|
'stack-vertical': iconsIcon0MergedSvg + '#stack-vertical',
|
||||||
'spline-line': formatAssetUrl('./icons/icon/spline-line.svg', opts),
|
'status-offline': iconsIcon0MergedSvg + '#status-offline',
|
||||||
'stack-horizontal': formatAssetUrl('./icons/icon/stack-horizontal.svg', opts),
|
'stretch-horizontal': iconsIcon0MergedSvg + '#stretch-horizontal',
|
||||||
'stack-vertical': formatAssetUrl('./icons/icon/stack-vertical.svg', opts),
|
'stretch-vertical': iconsIcon0MergedSvg + '#stretch-vertical',
|
||||||
'status-offline': formatAssetUrl('./icons/icon/status-offline.svg', opts),
|
'text-align-center': iconsIcon0MergedSvg + '#text-align-center',
|
||||||
'stretch-horizontal': formatAssetUrl('./icons/icon/stretch-horizontal.svg', opts),
|
'text-align-left': iconsIcon0MergedSvg + '#text-align-left',
|
||||||
'stretch-vertical': formatAssetUrl('./icons/icon/stretch-vertical.svg', opts),
|
'text-align-right': iconsIcon0MergedSvg + '#text-align-right',
|
||||||
'text-align-center': formatAssetUrl('./icons/icon/text-align-center.svg', opts),
|
'toggle-off': iconsIcon0MergedSvg + '#toggle-off',
|
||||||
'text-align-left': formatAssetUrl('./icons/icon/text-align-left.svg', opts),
|
'toggle-on': iconsIcon0MergedSvg + '#toggle-on',
|
||||||
'text-align-right': formatAssetUrl('./icons/icon/text-align-right.svg', opts),
|
'tool-arrow': iconsIcon0MergedSvg + '#tool-arrow',
|
||||||
'toggle-off': formatAssetUrl('./icons/icon/toggle-off.svg', opts),
|
'tool-eraser': iconsIcon0MergedSvg + '#tool-eraser',
|
||||||
'toggle-on': formatAssetUrl('./icons/icon/toggle-on.svg', opts),
|
'tool-frame': iconsIcon0MergedSvg + '#tool-frame',
|
||||||
'tool-arrow': formatAssetUrl('./icons/icon/tool-arrow.svg', opts),
|
'tool-hand': iconsIcon0MergedSvg + '#tool-hand',
|
||||||
'tool-eraser': formatAssetUrl('./icons/icon/tool-eraser.svg', opts),
|
'tool-highlight': iconsIcon0MergedSvg + '#tool-highlight',
|
||||||
'tool-frame': formatAssetUrl('./icons/icon/tool-frame.svg', opts),
|
'tool-laser': iconsIcon0MergedSvg + '#tool-laser',
|
||||||
'tool-hand': formatAssetUrl('./icons/icon/tool-hand.svg', opts),
|
'tool-line': iconsIcon0MergedSvg + '#tool-line',
|
||||||
'tool-highlight': formatAssetUrl('./icons/icon/tool-highlight.svg', opts),
|
'tool-media': iconsIcon0MergedSvg + '#tool-media',
|
||||||
'tool-laser': formatAssetUrl('./icons/icon/tool-laser.svg', opts),
|
'tool-note': iconsIcon0MergedSvg + '#tool-note',
|
||||||
'tool-line': formatAssetUrl('./icons/icon/tool-line.svg', opts),
|
'tool-pencil': iconsIcon0MergedSvg + '#tool-pencil',
|
||||||
'tool-media': formatAssetUrl('./icons/icon/tool-media.svg', opts),
|
'tool-pointer': iconsIcon0MergedSvg + '#tool-pointer',
|
||||||
'tool-note': formatAssetUrl('./icons/icon/tool-note.svg', opts),
|
'tool-screenshot': iconsIcon0MergedSvg + '#tool-screenshot',
|
||||||
'tool-pencil': formatAssetUrl('./icons/icon/tool-pencil.svg', opts),
|
'tool-text': iconsIcon0MergedSvg + '#tool-text',
|
||||||
'tool-pointer': formatAssetUrl('./icons/icon/tool-pointer.svg', opts),
|
trash: iconsIcon0MergedSvg + '#trash',
|
||||||
'tool-screenshot': formatAssetUrl('./icons/icon/tool-screenshot.svg', opts),
|
twitter: iconsIcon0MergedSvg + '#twitter',
|
||||||
'tool-text': formatAssetUrl('./icons/icon/tool-text.svg', opts),
|
undo: iconsIcon0MergedSvg + '#undo',
|
||||||
trash: formatAssetUrl('./icons/icon/trash.svg', opts),
|
ungroup: iconsIcon0MergedSvg + '#ungroup',
|
||||||
twitter: formatAssetUrl('./icons/icon/twitter.svg', opts),
|
unlock: iconsIcon0MergedSvg + '#unlock',
|
||||||
undo: formatAssetUrl('./icons/icon/undo.svg', opts),
|
'vertical-align-end': iconsIcon0MergedSvg + '#vertical-align-end',
|
||||||
ungroup: formatAssetUrl('./icons/icon/ungroup.svg', opts),
|
'vertical-align-middle': iconsIcon0MergedSvg + '#vertical-align-middle',
|
||||||
unlock: formatAssetUrl('./icons/icon/unlock.svg', opts),
|
'vertical-align-start': iconsIcon0MergedSvg + '#vertical-align-start',
|
||||||
'vertical-align-end': formatAssetUrl('./icons/icon/vertical-align-end.svg', opts),
|
'warning-triangle': iconsIcon0MergedSvg + '#warning-triangle',
|
||||||
'vertical-align-middle': formatAssetUrl('./icons/icon/vertical-align-middle.svg', opts),
|
'zoom-in': iconsIcon0MergedSvg + '#zoom-in',
|
||||||
'vertical-align-start': formatAssetUrl('./icons/icon/vertical-align-start.svg', opts),
|
'zoom-out': iconsIcon0MergedSvg + '#zoom-out',
|
||||||
'warning-triangle': formatAssetUrl('./icons/icon/warning-triangle.svg', opts),
|
|
||||||
'zoom-in': formatAssetUrl('./icons/icon/zoom-in.svg', opts),
|
|
||||||
'zoom-out': formatAssetUrl('./icons/icon/zoom-out.svg', opts),
|
|
||||||
},
|
},
|
||||||
translations: {
|
translations: {
|
||||||
ar: formatAssetUrl('./translations/ar.json', opts),
|
ar: formatAssetUrl('./translations/ar.json', opts),
|
||||||
|
|
|
@ -10,6 +10,10 @@ import { formatAssetUrl } from './utils.js'
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export function getAssetUrlsByMetaUrl(opts) {
|
export function getAssetUrlsByMetaUrl(opts) {
|
||||||
|
const iconsIcon0MergedSvg = formatAssetUrl(
|
||||||
|
new URL('./icons/icon/0_merged.svg', import.meta.url).href,
|
||||||
|
opts
|
||||||
|
)
|
||||||
return {
|
return {
|
||||||
fonts: {
|
fonts: {
|
||||||
monospace: formatAssetUrl(
|
monospace: formatAssetUrl(
|
||||||
|
@ -30,474 +34,147 @@ export function getAssetUrlsByMetaUrl(opts) {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
icons: {
|
icons: {
|
||||||
'align-bottom': formatAssetUrl(
|
'align-bottom': iconsIcon0MergedSvg + '#align-bottom',
|
||||||
new URL('./icons/icon/align-bottom.svg', import.meta.url).href,
|
'align-center-horizontal': iconsIcon0MergedSvg + '#align-center-horizontal',
|
||||||
opts
|
'align-center-vertical': iconsIcon0MergedSvg + '#align-center-vertical',
|
||||||
),
|
'align-left': iconsIcon0MergedSvg + '#align-left',
|
||||||
'align-center-horizontal': formatAssetUrl(
|
'align-right': iconsIcon0MergedSvg + '#align-right',
|
||||||
new URL('./icons/icon/align-center-horizontal.svg', import.meta.url).href,
|
'align-top': iconsIcon0MergedSvg + '#align-top',
|
||||||
opts
|
'arrow-left': iconsIcon0MergedSvg + '#arrow-left',
|
||||||
),
|
'arrowhead-arrow': iconsIcon0MergedSvg + '#arrowhead-arrow',
|
||||||
'align-center-vertical': formatAssetUrl(
|
'arrowhead-bar': iconsIcon0MergedSvg + '#arrowhead-bar',
|
||||||
new URL('./icons/icon/align-center-vertical.svg', import.meta.url).href,
|
'arrowhead-diamond': iconsIcon0MergedSvg + '#arrowhead-diamond',
|
||||||
opts
|
'arrowhead-dot': iconsIcon0MergedSvg + '#arrowhead-dot',
|
||||||
),
|
'arrowhead-none': iconsIcon0MergedSvg + '#arrowhead-none',
|
||||||
'align-left': formatAssetUrl(
|
'arrowhead-square': iconsIcon0MergedSvg + '#arrowhead-square',
|
||||||
new URL('./icons/icon/align-left.svg', import.meta.url).href,
|
'arrowhead-triangle-inverted': iconsIcon0MergedSvg + '#arrowhead-triangle-inverted',
|
||||||
opts
|
'arrowhead-triangle': iconsIcon0MergedSvg + '#arrowhead-triangle',
|
||||||
),
|
blob: iconsIcon0MergedSvg + '#blob',
|
||||||
'align-right': formatAssetUrl(
|
'bring-forward': iconsIcon0MergedSvg + '#bring-forward',
|
||||||
new URL('./icons/icon/align-right.svg', import.meta.url).href,
|
'bring-to-front': iconsIcon0MergedSvg + '#bring-to-front',
|
||||||
opts
|
broken: iconsIcon0MergedSvg + '#broken',
|
||||||
),
|
'check-circle': iconsIcon0MergedSvg + '#check-circle',
|
||||||
'align-top': formatAssetUrl(
|
check: iconsIcon0MergedSvg + '#check',
|
||||||
new URL('./icons/icon/align-top.svg', import.meta.url).href,
|
'chevron-down': iconsIcon0MergedSvg + '#chevron-down',
|
||||||
opts
|
'chevron-left': iconsIcon0MergedSvg + '#chevron-left',
|
||||||
),
|
'chevron-right': iconsIcon0MergedSvg + '#chevron-right',
|
||||||
'arrow-left': formatAssetUrl(
|
'chevron-up': iconsIcon0MergedSvg + '#chevron-up',
|
||||||
new URL('./icons/icon/arrow-left.svg', import.meta.url).href,
|
'chevrons-ne': iconsIcon0MergedSvg + '#chevrons-ne',
|
||||||
opts
|
'chevrons-sw': iconsIcon0MergedSvg + '#chevrons-sw',
|
||||||
),
|
'clipboard-copied': iconsIcon0MergedSvg + '#clipboard-copied',
|
||||||
'arrowhead-arrow': formatAssetUrl(
|
'clipboard-copy': iconsIcon0MergedSvg + '#clipboard-copy',
|
||||||
new URL('./icons/icon/arrowhead-arrow.svg', import.meta.url).href,
|
color: iconsIcon0MergedSvg + '#color',
|
||||||
opts
|
'cross-2': iconsIcon0MergedSvg + '#cross-2',
|
||||||
),
|
'cross-circle': iconsIcon0MergedSvg + '#cross-circle',
|
||||||
'arrowhead-bar': formatAssetUrl(
|
'dash-dashed': iconsIcon0MergedSvg + '#dash-dashed',
|
||||||
new URL('./icons/icon/arrowhead-bar.svg', import.meta.url).href,
|
'dash-dotted': iconsIcon0MergedSvg + '#dash-dotted',
|
||||||
opts
|
'dash-draw': iconsIcon0MergedSvg + '#dash-draw',
|
||||||
),
|
'dash-solid': iconsIcon0MergedSvg + '#dash-solid',
|
||||||
'arrowhead-diamond': formatAssetUrl(
|
disconnected: iconsIcon0MergedSvg + '#disconnected',
|
||||||
new URL('./icons/icon/arrowhead-diamond.svg', import.meta.url).href,
|
discord: iconsIcon0MergedSvg + '#discord',
|
||||||
opts
|
'distribute-horizontal': iconsIcon0MergedSvg + '#distribute-horizontal',
|
||||||
),
|
'distribute-vertical': iconsIcon0MergedSvg + '#distribute-vertical',
|
||||||
'arrowhead-dot': formatAssetUrl(
|
dot: iconsIcon0MergedSvg + '#dot',
|
||||||
new URL('./icons/icon/arrowhead-dot.svg', import.meta.url).href,
|
'dots-horizontal': iconsIcon0MergedSvg + '#dots-horizontal',
|
||||||
opts
|
'dots-vertical': iconsIcon0MergedSvg + '#dots-vertical',
|
||||||
),
|
'drag-handle-dots': iconsIcon0MergedSvg + '#drag-handle-dots',
|
||||||
'arrowhead-none': formatAssetUrl(
|
duplicate: iconsIcon0MergedSvg + '#duplicate',
|
||||||
new URL('./icons/icon/arrowhead-none.svg', import.meta.url).href,
|
edit: iconsIcon0MergedSvg + '#edit',
|
||||||
opts
|
'external-link': iconsIcon0MergedSvg + '#external-link',
|
||||||
),
|
'fill-fill': iconsIcon0MergedSvg + '#fill-fill',
|
||||||
'arrowhead-square': formatAssetUrl(
|
'fill-none': iconsIcon0MergedSvg + '#fill-none',
|
||||||
new URL('./icons/icon/arrowhead-square.svg', import.meta.url).href,
|
'fill-pattern': iconsIcon0MergedSvg + '#fill-pattern',
|
||||||
opts
|
'fill-semi': iconsIcon0MergedSvg + '#fill-semi',
|
||||||
),
|
'fill-solid': iconsIcon0MergedSvg + '#fill-solid',
|
||||||
'arrowhead-triangle-inverted': formatAssetUrl(
|
follow: iconsIcon0MergedSvg + '#follow',
|
||||||
new URL('./icons/icon/arrowhead-triangle-inverted.svg', import.meta.url).href,
|
following: iconsIcon0MergedSvg + '#following',
|
||||||
opts
|
'font-draw': iconsIcon0MergedSvg + '#font-draw',
|
||||||
),
|
'font-mono': iconsIcon0MergedSvg + '#font-mono',
|
||||||
'arrowhead-triangle': formatAssetUrl(
|
'font-sans': iconsIcon0MergedSvg + '#font-sans',
|
||||||
new URL('./icons/icon/arrowhead-triangle.svg', import.meta.url).href,
|
'font-serif': iconsIcon0MergedSvg + '#font-serif',
|
||||||
opts
|
'geo-arrow-down': iconsIcon0MergedSvg + '#geo-arrow-down',
|
||||||
),
|
'geo-arrow-left': iconsIcon0MergedSvg + '#geo-arrow-left',
|
||||||
blob: formatAssetUrl(new URL('./icons/icon/blob.svg', import.meta.url).href, opts),
|
'geo-arrow-right': iconsIcon0MergedSvg + '#geo-arrow-right',
|
||||||
'bring-forward': formatAssetUrl(
|
'geo-arrow-up': iconsIcon0MergedSvg + '#geo-arrow-up',
|
||||||
new URL('./icons/icon/bring-forward.svg', import.meta.url).href,
|
'geo-check-box': iconsIcon0MergedSvg + '#geo-check-box',
|
||||||
opts
|
'geo-cloud': iconsIcon0MergedSvg + '#geo-cloud',
|
||||||
),
|
'geo-diamond': iconsIcon0MergedSvg + '#geo-diamond',
|
||||||
'bring-to-front': formatAssetUrl(
|
'geo-ellipse': iconsIcon0MergedSvg + '#geo-ellipse',
|
||||||
new URL('./icons/icon/bring-to-front.svg', import.meta.url).href,
|
'geo-heart': iconsIcon0MergedSvg + '#geo-heart',
|
||||||
opts
|
'geo-hexagon': iconsIcon0MergedSvg + '#geo-hexagon',
|
||||||
),
|
'geo-octagon': iconsIcon0MergedSvg + '#geo-octagon',
|
||||||
broken: formatAssetUrl(new URL('./icons/icon/broken.svg', import.meta.url).href, opts),
|
'geo-oval': iconsIcon0MergedSvg + '#geo-oval',
|
||||||
'check-circle': formatAssetUrl(
|
'geo-pentagon': iconsIcon0MergedSvg + '#geo-pentagon',
|
||||||
new URL('./icons/icon/check-circle.svg', import.meta.url).href,
|
'geo-rectangle': iconsIcon0MergedSvg + '#geo-rectangle',
|
||||||
opts
|
'geo-rhombus-2': iconsIcon0MergedSvg + '#geo-rhombus-2',
|
||||||
),
|
'geo-rhombus': iconsIcon0MergedSvg + '#geo-rhombus',
|
||||||
check: formatAssetUrl(new URL('./icons/icon/check.svg', import.meta.url).href, opts),
|
'geo-star': iconsIcon0MergedSvg + '#geo-star',
|
||||||
'chevron-down': formatAssetUrl(
|
'geo-trapezoid': iconsIcon0MergedSvg + '#geo-trapezoid',
|
||||||
new URL('./icons/icon/chevron-down.svg', import.meta.url).href,
|
'geo-triangle': iconsIcon0MergedSvg + '#geo-triangle',
|
||||||
opts
|
'geo-x-box': iconsIcon0MergedSvg + '#geo-x-box',
|
||||||
),
|
github: iconsIcon0MergedSvg + '#github',
|
||||||
'chevron-left': formatAssetUrl(
|
group: iconsIcon0MergedSvg + '#group',
|
||||||
new URL('./icons/icon/chevron-left.svg', import.meta.url).href,
|
'horizontal-align-end': iconsIcon0MergedSvg + '#horizontal-align-end',
|
||||||
opts
|
'horizontal-align-middle': iconsIcon0MergedSvg + '#horizontal-align-middle',
|
||||||
),
|
'horizontal-align-start': iconsIcon0MergedSvg + '#horizontal-align-start',
|
||||||
'chevron-right': formatAssetUrl(
|
'info-circle': iconsIcon0MergedSvg + '#info-circle',
|
||||||
new URL('./icons/icon/chevron-right.svg', import.meta.url).href,
|
leading: iconsIcon0MergedSvg + '#leading',
|
||||||
opts
|
link: iconsIcon0MergedSvg + '#link',
|
||||||
),
|
lock: iconsIcon0MergedSvg + '#lock',
|
||||||
'chevron-up': formatAssetUrl(
|
menu: iconsIcon0MergedSvg + '#menu',
|
||||||
new URL('./icons/icon/chevron-up.svg', import.meta.url).href,
|
minus: iconsIcon0MergedSvg + '#minus',
|
||||||
opts
|
mixed: iconsIcon0MergedSvg + '#mixed',
|
||||||
),
|
pack: iconsIcon0MergedSvg + '#pack',
|
||||||
'chevrons-ne': formatAssetUrl(
|
plus: iconsIcon0MergedSvg + '#plus',
|
||||||
new URL('./icons/icon/chevrons-ne.svg', import.meta.url).href,
|
'question-mark-circle': iconsIcon0MergedSvg + '#question-mark-circle',
|
||||||
opts
|
'question-mark': iconsIcon0MergedSvg + '#question-mark',
|
||||||
),
|
redo: iconsIcon0MergedSvg + '#redo',
|
||||||
'chevrons-sw': formatAssetUrl(
|
'reset-zoom': iconsIcon0MergedSvg + '#reset-zoom',
|
||||||
new URL('./icons/icon/chevrons-sw.svg', import.meta.url).href,
|
'rotate-ccw': iconsIcon0MergedSvg + '#rotate-ccw',
|
||||||
opts
|
'rotate-cw': iconsIcon0MergedSvg + '#rotate-cw',
|
||||||
),
|
'send-backward': iconsIcon0MergedSvg + '#send-backward',
|
||||||
'clipboard-copied': formatAssetUrl(
|
'send-to-back': iconsIcon0MergedSvg + '#send-to-back',
|
||||||
new URL('./icons/icon/clipboard-copied.svg', import.meta.url).href,
|
'share-1': iconsIcon0MergedSvg + '#share-1',
|
||||||
opts
|
'size-extra-large': iconsIcon0MergedSvg + '#size-extra-large',
|
||||||
),
|
'size-large': iconsIcon0MergedSvg + '#size-large',
|
||||||
'clipboard-copy': formatAssetUrl(
|
'size-medium': iconsIcon0MergedSvg + '#size-medium',
|
||||||
new URL('./icons/icon/clipboard-copy.svg', import.meta.url).href,
|
'size-small': iconsIcon0MergedSvg + '#size-small',
|
||||||
opts
|
'spline-cubic': iconsIcon0MergedSvg + '#spline-cubic',
|
||||||
),
|
'spline-line': iconsIcon0MergedSvg + '#spline-line',
|
||||||
color: formatAssetUrl(new URL('./icons/icon/color.svg', import.meta.url).href, opts),
|
'stack-horizontal': iconsIcon0MergedSvg + '#stack-horizontal',
|
||||||
'cross-2': formatAssetUrl(new URL('./icons/icon/cross-2.svg', import.meta.url).href, opts),
|
'stack-vertical': iconsIcon0MergedSvg + '#stack-vertical',
|
||||||
'cross-circle': formatAssetUrl(
|
'status-offline': iconsIcon0MergedSvg + '#status-offline',
|
||||||
new URL('./icons/icon/cross-circle.svg', import.meta.url).href,
|
'stretch-horizontal': iconsIcon0MergedSvg + '#stretch-horizontal',
|
||||||
opts
|
'stretch-vertical': iconsIcon0MergedSvg + '#stretch-vertical',
|
||||||
),
|
'text-align-center': iconsIcon0MergedSvg + '#text-align-center',
|
||||||
'dash-dashed': formatAssetUrl(
|
'text-align-left': iconsIcon0MergedSvg + '#text-align-left',
|
||||||
new URL('./icons/icon/dash-dashed.svg', import.meta.url).href,
|
'text-align-right': iconsIcon0MergedSvg + '#text-align-right',
|
||||||
opts
|
'toggle-off': iconsIcon0MergedSvg + '#toggle-off',
|
||||||
),
|
'toggle-on': iconsIcon0MergedSvg + '#toggle-on',
|
||||||
'dash-dotted': formatAssetUrl(
|
'tool-arrow': iconsIcon0MergedSvg + '#tool-arrow',
|
||||||
new URL('./icons/icon/dash-dotted.svg', import.meta.url).href,
|
'tool-eraser': iconsIcon0MergedSvg + '#tool-eraser',
|
||||||
opts
|
'tool-frame': iconsIcon0MergedSvg + '#tool-frame',
|
||||||
),
|
'tool-hand': iconsIcon0MergedSvg + '#tool-hand',
|
||||||
'dash-draw': formatAssetUrl(
|
'tool-highlight': iconsIcon0MergedSvg + '#tool-highlight',
|
||||||
new URL('./icons/icon/dash-draw.svg', import.meta.url).href,
|
'tool-laser': iconsIcon0MergedSvg + '#tool-laser',
|
||||||
opts
|
'tool-line': iconsIcon0MergedSvg + '#tool-line',
|
||||||
),
|
'tool-media': iconsIcon0MergedSvg + '#tool-media',
|
||||||
'dash-solid': formatAssetUrl(
|
'tool-note': iconsIcon0MergedSvg + '#tool-note',
|
||||||
new URL('./icons/icon/dash-solid.svg', import.meta.url).href,
|
'tool-pencil': iconsIcon0MergedSvg + '#tool-pencil',
|
||||||
opts
|
'tool-pointer': iconsIcon0MergedSvg + '#tool-pointer',
|
||||||
),
|
'tool-screenshot': iconsIcon0MergedSvg + '#tool-screenshot',
|
||||||
disconnected: formatAssetUrl(
|
'tool-text': iconsIcon0MergedSvg + '#tool-text',
|
||||||
new URL('./icons/icon/disconnected.svg', import.meta.url).href,
|
trash: iconsIcon0MergedSvg + '#trash',
|
||||||
opts
|
twitter: iconsIcon0MergedSvg + '#twitter',
|
||||||
),
|
undo: iconsIcon0MergedSvg + '#undo',
|
||||||
discord: formatAssetUrl(new URL('./icons/icon/discord.svg', import.meta.url).href, opts),
|
ungroup: iconsIcon0MergedSvg + '#ungroup',
|
||||||
'distribute-horizontal': formatAssetUrl(
|
unlock: iconsIcon0MergedSvg + '#unlock',
|
||||||
new URL('./icons/icon/distribute-horizontal.svg', import.meta.url).href,
|
'vertical-align-end': iconsIcon0MergedSvg + '#vertical-align-end',
|
||||||
opts
|
'vertical-align-middle': iconsIcon0MergedSvg + '#vertical-align-middle',
|
||||||
),
|
'vertical-align-start': iconsIcon0MergedSvg + '#vertical-align-start',
|
||||||
'distribute-vertical': formatAssetUrl(
|
'warning-triangle': iconsIcon0MergedSvg + '#warning-triangle',
|
||||||
new URL('./icons/icon/distribute-vertical.svg', import.meta.url).href,
|
'zoom-in': iconsIcon0MergedSvg + '#zoom-in',
|
||||||
opts
|
'zoom-out': iconsIcon0MergedSvg + '#zoom-out',
|
||||||
),
|
|
||||||
dot: formatAssetUrl(new URL('./icons/icon/dot.svg', import.meta.url).href, opts),
|
|
||||||
'dots-horizontal': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/dots-horizontal.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'dots-vertical': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/dots-vertical.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'drag-handle-dots': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/drag-handle-dots.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
duplicate: formatAssetUrl(new URL('./icons/icon/duplicate.svg', import.meta.url).href, opts),
|
|
||||||
edit: formatAssetUrl(new URL('./icons/icon/edit.svg', import.meta.url).href, opts),
|
|
||||||
'external-link': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/external-link.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'fill-fill': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/fill-fill.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'fill-none': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/fill-none.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'fill-pattern': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/fill-pattern.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'fill-semi': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/fill-semi.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'fill-solid': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/fill-solid.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
follow: formatAssetUrl(new URL('./icons/icon/follow.svg', import.meta.url).href, opts),
|
|
||||||
following: formatAssetUrl(new URL('./icons/icon/following.svg', import.meta.url).href, opts),
|
|
||||||
'font-draw': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/font-draw.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'font-mono': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/font-mono.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'font-sans': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/font-sans.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'font-serif': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/font-serif.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-arrow-down': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-arrow-down.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-arrow-left': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-arrow-left.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-arrow-right': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-arrow-right.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-arrow-up': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-arrow-up.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-check-box': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-check-box.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-cloud': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-cloud.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-diamond': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-diamond.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-ellipse': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-ellipse.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-heart': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-heart.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-hexagon': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-hexagon.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-octagon': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-octagon.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-oval': formatAssetUrl(new URL('./icons/icon/geo-oval.svg', import.meta.url).href, opts),
|
|
||||||
'geo-pentagon': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-pentagon.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-rectangle': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-rectangle.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-rhombus-2': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-rhombus-2.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-rhombus': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-rhombus.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-star': formatAssetUrl(new URL('./icons/icon/geo-star.svg', import.meta.url).href, opts),
|
|
||||||
'geo-trapezoid': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-trapezoid.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-triangle': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-triangle.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'geo-x-box': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/geo-x-box.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
github: formatAssetUrl(new URL('./icons/icon/github.svg', import.meta.url).href, opts),
|
|
||||||
group: formatAssetUrl(new URL('./icons/icon/group.svg', import.meta.url).href, opts),
|
|
||||||
'horizontal-align-end': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/horizontal-align-end.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'horizontal-align-middle': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/horizontal-align-middle.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'horizontal-align-start': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/horizontal-align-start.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'info-circle': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/info-circle.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
leading: formatAssetUrl(new URL('./icons/icon/leading.svg', import.meta.url).href, opts),
|
|
||||||
link: formatAssetUrl(new URL('./icons/icon/link.svg', import.meta.url).href, opts),
|
|
||||||
lock: formatAssetUrl(new URL('./icons/icon/lock.svg', import.meta.url).href, opts),
|
|
||||||
menu: formatAssetUrl(new URL('./icons/icon/menu.svg', import.meta.url).href, opts),
|
|
||||||
minus: formatAssetUrl(new URL('./icons/icon/minus.svg', import.meta.url).href, opts),
|
|
||||||
mixed: formatAssetUrl(new URL('./icons/icon/mixed.svg', import.meta.url).href, opts),
|
|
||||||
pack: formatAssetUrl(new URL('./icons/icon/pack.svg', import.meta.url).href, opts),
|
|
||||||
plus: formatAssetUrl(new URL('./icons/icon/plus.svg', import.meta.url).href, opts),
|
|
||||||
'question-mark-circle': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/question-mark-circle.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'question-mark': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/question-mark.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
redo: formatAssetUrl(new URL('./icons/icon/redo.svg', import.meta.url).href, opts),
|
|
||||||
'reset-zoom': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/reset-zoom.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'rotate-ccw': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/rotate-ccw.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'rotate-cw': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/rotate-cw.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'send-backward': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/send-backward.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'send-to-back': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/send-to-back.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'share-1': formatAssetUrl(new URL('./icons/icon/share-1.svg', import.meta.url).href, opts),
|
|
||||||
'size-extra-large': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/size-extra-large.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'size-large': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/size-large.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'size-medium': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/size-medium.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'size-small': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/size-small.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'spline-cubic': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/spline-cubic.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'spline-line': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/spline-line.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'stack-horizontal': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/stack-horizontal.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'stack-vertical': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/stack-vertical.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'status-offline': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/status-offline.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'stretch-horizontal': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/stretch-horizontal.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'stretch-vertical': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/stretch-vertical.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'text-align-center': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/text-align-center.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'text-align-left': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/text-align-left.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'text-align-right': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/text-align-right.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'toggle-off': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/toggle-off.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'toggle-on': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/toggle-on.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-arrow': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-arrow.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-eraser': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-eraser.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-frame': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-frame.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-hand': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-hand.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-highlight': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-highlight.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-laser': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-laser.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-line': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-line.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-media': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-media.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-note': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-note.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-pencil': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-pencil.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-pointer': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-pointer.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-screenshot': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-screenshot.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'tool-text': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/tool-text.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
trash: formatAssetUrl(new URL('./icons/icon/trash.svg', import.meta.url).href, opts),
|
|
||||||
twitter: formatAssetUrl(new URL('./icons/icon/twitter.svg', import.meta.url).href, opts),
|
|
||||||
undo: formatAssetUrl(new URL('./icons/icon/undo.svg', import.meta.url).href, opts),
|
|
||||||
ungroup: formatAssetUrl(new URL('./icons/icon/ungroup.svg', import.meta.url).href, opts),
|
|
||||||
unlock: formatAssetUrl(new URL('./icons/icon/unlock.svg', import.meta.url).href, opts),
|
|
||||||
'vertical-align-end': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/vertical-align-end.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'vertical-align-middle': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/vertical-align-middle.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'vertical-align-start': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/vertical-align-start.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'warning-triangle': formatAssetUrl(
|
|
||||||
new URL('./icons/icon/warning-triangle.svg', import.meta.url).href,
|
|
||||||
opts
|
|
||||||
),
|
|
||||||
'zoom-in': formatAssetUrl(new URL('./icons/icon/zoom-in.svg', import.meta.url).href, opts),
|
|
||||||
'zoom-out': formatAssetUrl(new URL('./icons/icon/zoom-out.svg', import.meta.url).href, opts),
|
|
||||||
},
|
},
|
||||||
translations: {
|
translations: {
|
||||||
ar: formatAssetUrl(new URL('./translations/ar.json', import.meta.url).href, opts),
|
ar: formatAssetUrl(new URL('./translations/ar.json', import.meta.url).href, opts),
|
||||||
|
|
|
@ -25,18 +25,23 @@ const FONT_MAPPING: Record<string, string> = {
|
||||||
|
|
||||||
const ASSETS_FOLDER_PATH = join(REPO_ROOT, 'assets')
|
const ASSETS_FOLDER_PATH = join(REPO_ROOT, 'assets')
|
||||||
|
|
||||||
const collectedAssetUrls: {
|
const collectedAssetUrls: Record<
|
||||||
fonts: Record<string, string>
|
'fonts' | 'icons' | 'translations' | 'embedIcons',
|
||||||
icons: Record<string, string>
|
Record<string, { file: string; hash?: string }>
|
||||||
translations: Record<string, string>
|
> = {
|
||||||
embedIcons: Record<string, string>
|
|
||||||
} = {
|
|
||||||
fonts: {},
|
fonts: {},
|
||||||
icons: {},
|
icons: {},
|
||||||
translations: {},
|
translations: {},
|
||||||
embedIcons: {},
|
embedIcons: {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mergedIconName = '0_merged.svg'
|
||||||
|
// this is how `svgo` starts each one of our optimized icon SVGs. if they don't all start with this,
|
||||||
|
// we can't merge them as it means they're of different size and are using different fill rules.
|
||||||
|
const mergedIconHeader =
|
||||||
|
'<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="none">'
|
||||||
|
const mergedIconFooter = '</svg>'
|
||||||
|
|
||||||
// 1. ICONS
|
// 1. ICONS
|
||||||
|
|
||||||
async function copyIcons() {
|
async function copyIcons() {
|
||||||
|
@ -58,6 +63,31 @@ async function copyIcons() {
|
||||||
return { fileName: icon, data: svg.data }
|
return { fileName: icon, data: svg.data }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Merge svgs into a single file
|
||||||
|
const mergedSvgParts = [
|
||||||
|
mergedIconHeader,
|
||||||
|
'<style>',
|
||||||
|
// in order to target individual icons with the URL hash, we need to hide all of them by
|
||||||
|
// default...
|
||||||
|
'svg > [id] { display: none; }',
|
||||||
|
// ...then show the one that's targeted
|
||||||
|
'svg > [id]:target { display: inline; }',
|
||||||
|
'</style>',
|
||||||
|
]
|
||||||
|
for (const { fileName, data } of optimizedSvgs) {
|
||||||
|
if (!data.startsWith(mergedIconHeader) || !data.endsWith(mergedIconFooter)) {
|
||||||
|
nicelog('SVG does not match expected format for merging:', fileName)
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
const id = fileName.replace('.svg', '')
|
||||||
|
const svgContent = data.slice(mergedIconHeader.length, -mergedIconFooter.length)
|
||||||
|
mergedSvgParts.push(`<g id="${id}">${svgContent}</g>`)
|
||||||
|
}
|
||||||
|
mergedSvgParts.push(mergedIconFooter)
|
||||||
|
const mergedSvg = optimize(mergedSvgParts.join('\n')).data
|
||||||
|
optimizedSvgs.push({ fileName: mergedIconName, data: mergedSvg })
|
||||||
|
|
||||||
// Optimize all of the svg icons and write them into the new folders
|
// Optimize all of the svg icons and write them into the new folders
|
||||||
for (const folderPath of PUBLIC_FOLDER_PATHS) {
|
for (const folderPath of PUBLIC_FOLDER_PATHS) {
|
||||||
const publicIconsRootFolderPath = join(folderPath, 'icons')
|
const publicIconsRootFolderPath = join(folderPath, 'icons')
|
||||||
|
@ -101,7 +131,10 @@ async function copyIcons() {
|
||||||
// add to the asset declaration file
|
// add to the asset declaration file
|
||||||
for (const icon of icons) {
|
for (const icon of icons) {
|
||||||
const name = icon.replace('.svg', '')
|
const name = icon.replace('.svg', '')
|
||||||
collectedAssetUrls.icons[name] = `icons/icon/${icon}`
|
collectedAssetUrls.icons[name] = {
|
||||||
|
file: `icons/icon/${mergedIconName}`,
|
||||||
|
hash: name,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +167,7 @@ async function copyEmbedIcons() {
|
||||||
// add to the asset declaration file
|
// add to the asset declaration file
|
||||||
for (const item of itemsToCopy) {
|
for (const item of itemsToCopy) {
|
||||||
const name = item.replace(extension, '')
|
const name = item.replace(extension, '')
|
||||||
collectedAssetUrls.embedIcons[name] = `${folderName}/${item}`
|
collectedAssetUrls.embedIcons[name] = { file: `${folderName}/${item}` }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +205,7 @@ async function copyFonts() {
|
||||||
nicelog('Font mapping not found for', itemWithoutExtension)
|
nicelog('Font mapping not found for', itemWithoutExtension)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
collectedAssetUrls.fonts[name] = `${folderName}/${item}`
|
collectedAssetUrls.fonts[name] = { file: `${folderName}/${item}` }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +302,7 @@ async function copyTranslations() {
|
||||||
// add to the asset declaration file
|
// add to the asset declaration file
|
||||||
for (const item of itemsToCopy) {
|
for (const item of itemsToCopy) {
|
||||||
const name = item.replace(extension, '')
|
const name = item.replace(extension, '')
|
||||||
collectedAssetUrls.translations[name] = `${folderName}/${item}`
|
collectedAssetUrls.translations[name] = { file: `${folderName}/${item}` }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,111 +326,101 @@ async function copyWatermarks() {
|
||||||
// 5. ASSET DECLARATION FILES
|
// 5. ASSET DECLARATION FILES
|
||||||
async function writeUrlBasedAssetDeclarationFile() {
|
async function writeUrlBasedAssetDeclarationFile() {
|
||||||
const codeFilePath = join(REPO_ROOT, 'packages', 'assets', 'urls.js')
|
const codeFilePath = join(REPO_ROOT, 'packages', 'assets', 'urls.js')
|
||||||
const codeFile = `
|
const codeFile = new CodeFile(`
|
||||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||||
/// <reference path="./modules.d.ts" />
|
/// <reference path="./modules.d.ts" />
|
||||||
import { formatAssetUrl } from './utils.js'
|
import { formatAssetUrl } from './utils.js'
|
||||||
|
`)
|
||||||
|
|
||||||
|
const fn = codeFile.appendFn(`
|
||||||
/**
|
/**
|
||||||
* @param {AssetUrlOptions} [opts]
|
* @param {AssetUrlOptions} [opts]
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export function getAssetUrlsByMetaUrl(opts) {
|
export function getAssetUrlsByMetaUrl(opts) {
|
||||||
return {
|
`)
|
||||||
${Object.entries(collectedAssetUrls)
|
|
||||||
.flatMap(([type, assets]) => [
|
|
||||||
`${type}: {`,
|
|
||||||
...Object.entries(assets).map(
|
|
||||||
([name, href]) =>
|
|
||||||
`${JSON.stringify(name)}: formatAssetUrl(new URL(${JSON.stringify(
|
|
||||||
'./' + href
|
|
||||||
)}, import.meta.url).href, opts),`
|
|
||||||
),
|
|
||||||
'},',
|
|
||||||
])
|
|
||||||
.join('\n')}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|
||||||
await writeCodeFile('scripts/refresh-assets.ts', 'javascript', codeFilePath, codeFile)
|
fn.append('return {')
|
||||||
|
for (const [type, assets] of Object.entries(collectedAssetUrls)) {
|
||||||
|
fn.append(`${type}: {`)
|
||||||
|
for (const [name, { file, hash }] of Object.entries(assets)) {
|
||||||
|
const href = JSON.stringify(`./${file}`)
|
||||||
|
const fileUrl = fn.memo(file, `formatAssetUrl(new URL(${href}, import.meta.url).href, opts)`)
|
||||||
|
const value = hash ? `${fileUrl} + ${JSON.stringify('#' + hash)}` : fileUrl
|
||||||
|
fn.append(`${JSON.stringify(name)}: ${value},`)
|
||||||
|
}
|
||||||
|
fn.append('},')
|
||||||
|
}
|
||||||
|
fn.append('}')
|
||||||
|
|
||||||
|
await writeCodeFile('scripts/refresh-assets.ts', 'javascript', codeFilePath, codeFile.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
async function writeImportBasedAssetDeclarationFile(
|
async function writeImportBasedAssetDeclarationFile(
|
||||||
importSuffix: string,
|
importSuffix: string,
|
||||||
fileName: string
|
fileName: string
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
let imports = `
|
const codeFile = new CodeFile(`
|
||||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||||
/// <reference path="./modules.d.ts" />
|
/// <reference path="./modules.d.ts" />
|
||||||
import { formatAssetUrl } from './utils.js'
|
import { formatAssetUrl } from './utils.js'
|
||||||
|
`)
|
||||||
|
|
||||||
`
|
const fn = codeFile.appendFn(`
|
||||||
|
|
||||||
let declarations = `
|
|
||||||
/**
|
/**
|
||||||
* @param {AssetUrlOptions} [opts]
|
* @param {AssetUrlOptions} [opts]
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export function getAssetUrlsByImport(opts) {
|
export function getAssetUrlsByImport(opts) {
|
||||||
return {
|
`)
|
||||||
`
|
|
||||||
|
|
||||||
|
fn.append('return {')
|
||||||
for (const [type, assets] of Object.entries(collectedAssetUrls)) {
|
for (const [type, assets] of Object.entries(collectedAssetUrls)) {
|
||||||
declarations += `${type}: {\n`
|
fn.append(`${type}: {`)
|
||||||
for (const [name, href] of Object.entries(assets)) {
|
for (const [name, { file, hash }] of Object.entries(assets)) {
|
||||||
const variableName = `${type}_${name}`
|
const variableName = codeFile.import(`./${file}${importSuffix}`)
|
||||||
.replace(/[^a-zA-Z0-9_]/g, '_')
|
const formattedUrl = fn.memo(file, `formatAssetUrl(${variableName}, opts)`)
|
||||||
.replace(/_+/g, '_')
|
const value = hash ? `${formattedUrl} + ${JSON.stringify('#' + hash)}` : formattedUrl
|
||||||
.replace(/_(.)/g, (_, letter) => letter.toUpperCase())
|
fn.append(`${JSON.stringify(name)}: ${value},`)
|
||||||
imports += `import ${variableName} from ${JSON.stringify('./' + href + importSuffix)};\n`
|
|
||||||
declarations += `${JSON.stringify(name)}: formatAssetUrl(${variableName}, opts),\n`
|
|
||||||
}
|
}
|
||||||
declarations += '},\n'
|
fn.append('},')
|
||||||
}
|
}
|
||||||
|
fn.append('}')
|
||||||
declarations += `
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|
||||||
const codeFilePath = join(REPO_ROOT, 'packages', 'assets', fileName)
|
const codeFilePath = join(REPO_ROOT, 'packages', 'assets', fileName)
|
||||||
await writeCodeFile(
|
await writeCodeFile('scripts/refresh-assets.ts', 'javascript', codeFilePath, codeFile.toString())
|
||||||
'scripts/refresh-assets.ts',
|
|
||||||
'javascript',
|
|
||||||
codeFilePath,
|
|
||||||
imports + declarations
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function writeSelfHostedAssetDeclarationFile(): Promise<void> {
|
async function writeSelfHostedAssetDeclarationFile(): Promise<void> {
|
||||||
const codeFilePath = join(REPO_ROOT, 'packages', 'assets', 'selfHosted.js')
|
const codeFilePath = join(REPO_ROOT, 'packages', 'assets', 'selfHosted.js')
|
||||||
const codeFile = `
|
const codeFile = new CodeFile(`
|
||||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||||
/// <reference path="./modules.d.ts" />
|
/// <reference path="./modules.d.ts" />
|
||||||
import { formatAssetUrl } from './utils.js'
|
import { formatAssetUrl } from './utils.js'
|
||||||
|
`)
|
||||||
|
|
||||||
|
const fn = codeFile.appendFn(`
|
||||||
/**
|
/**
|
||||||
* @param {AssetUrlOptions} [opts]
|
* @param {AssetUrlOptions} [opts]
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export function getAssetUrls(opts) {
|
export function getAssetUrls(opts) {
|
||||||
return {
|
`)
|
||||||
${Object.entries(collectedAssetUrls)
|
|
||||||
.flatMap(([type, assets]) => [
|
|
||||||
`${type}: {`,
|
|
||||||
...Object.entries(assets).map(
|
|
||||||
([name, href]) =>
|
|
||||||
`${JSON.stringify(name)}: formatAssetUrl(${JSON.stringify('./' + href)}, opts),`
|
|
||||||
),
|
|
||||||
'},',
|
|
||||||
])
|
|
||||||
.join('\n')}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|
||||||
await writeCodeFile('scripts/refresh-assets.ts', 'javascript', codeFilePath, codeFile)
|
fn.append('return {')
|
||||||
|
for (const [type, assets] of Object.entries(collectedAssetUrls)) {
|
||||||
|
fn.append(`${type}: {`)
|
||||||
|
for (const [name, { file, hash }] of Object.entries(assets)) {
|
||||||
|
const href = JSON.stringify(`./${file}`)
|
||||||
|
const formattedUrl = fn.memo(file, `formatAssetUrl(${href}, opts)`)
|
||||||
|
const value = hash ? `${formattedUrl} + ${JSON.stringify('#' + hash)}` : formattedUrl
|
||||||
|
fn.append(`${JSON.stringify(name)}: ${value},`)
|
||||||
|
}
|
||||||
|
fn.append('},')
|
||||||
|
}
|
||||||
|
fn.append('}')
|
||||||
|
|
||||||
|
await writeCodeFile('scripts/refresh-assets.ts', 'javascript', codeFilePath, codeFile.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
async function writeAssetDeclarationDTSFile() {
|
async function writeAssetDeclarationDTSFile() {
|
||||||
|
@ -480,6 +503,107 @@ async function copyVersionToDotCom() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Code {
|
||||||
|
protected parts: (string | { toString(): string })[] = []
|
||||||
|
|
||||||
|
toString() {
|
||||||
|
return this.parts.map((part) => (typeof part === 'string' ? part : part.toString())).join('')
|
||||||
|
}
|
||||||
|
|
||||||
|
append(...parts: string[]): this {
|
||||||
|
for (const part of parts) {
|
||||||
|
this.parts.push(part + '\n')
|
||||||
|
}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class CodeFile extends Code {
|
||||||
|
private imports = new Map<string, string>()
|
||||||
|
|
||||||
|
constructor(private header: string) {
|
||||||
|
super()
|
||||||
|
}
|
||||||
|
|
||||||
|
override toString(): string {
|
||||||
|
return [
|
||||||
|
this.header,
|
||||||
|
Array.from(this.imports, ([file, name]) => {
|
||||||
|
return `import ${name} from ${JSON.stringify(file)};`
|
||||||
|
}).join('\n'),
|
||||||
|
super.toString(),
|
||||||
|
].join('\n')
|
||||||
|
}
|
||||||
|
|
||||||
|
import(file: string) {
|
||||||
|
let name = this.imports.get(file)
|
||||||
|
if (!name) {
|
||||||
|
name = this.getName(file)
|
||||||
|
this.imports.set(file, name)
|
||||||
|
}
|
||||||
|
return name
|
||||||
|
}
|
||||||
|
|
||||||
|
getName(name: string, suffix?: number): string {
|
||||||
|
const formatted = `$_${name.replace(/\W+/g, '_')}${suffix || ''}`
|
||||||
|
.replace(/^\$_+(\D)/, (_, s) => s.toLowerCase())
|
||||||
|
.replace(/_+(.)/g, (_, s) => s.toUpperCase())
|
||||||
|
|
||||||
|
if (this.toString().includes(formatted)) {
|
||||||
|
return this.getName(name, (suffix ?? 1) + 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
return formatted
|
||||||
|
}
|
||||||
|
|
||||||
|
appendFn(header: string): CodeFunction {
|
||||||
|
const fn = new CodeFunction(this, header)
|
||||||
|
this.parts.push(fn)
|
||||||
|
return fn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CodeFunction extends Code {
|
||||||
|
constructor(
|
||||||
|
private file: CodeFile,
|
||||||
|
private header: string
|
||||||
|
) {
|
||||||
|
super()
|
||||||
|
}
|
||||||
|
|
||||||
|
private consts = new Map<string, string>()
|
||||||
|
|
||||||
|
override toString(): string {
|
||||||
|
let body = super.toString()
|
||||||
|
|
||||||
|
const lines = [this.header]
|
||||||
|
for (const [name, expr] of this.consts) {
|
||||||
|
const firstFoundIndex = body.indexOf(name)
|
||||||
|
const secondFoundIndex = body.indexOf(name, firstFoundIndex + 1)
|
||||||
|
if (secondFoundIndex === -1) {
|
||||||
|
// only exists once, we don't need to declare it:
|
||||||
|
body = body.replace(name, expr)
|
||||||
|
} else {
|
||||||
|
lines.push(`const ${name} = ${expr};`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lines.push(body)
|
||||||
|
lines.push('}')
|
||||||
|
return lines.join('\n')
|
||||||
|
}
|
||||||
|
|
||||||
|
private memos = new Map<unknown, string>()
|
||||||
|
memo(key: string, expr: string) {
|
||||||
|
const existing = this.memos.get(key)
|
||||||
|
if (existing) return existing
|
||||||
|
|
||||||
|
const varName = this.file.getName(key)
|
||||||
|
this.consts.set(varName, expr)
|
||||||
|
this.memos.set(key, varName)
|
||||||
|
return varName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// --- RUN
|
// --- RUN
|
||||||
async function main() {
|
async function main() {
|
||||||
nicelog('Copying icons...')
|
nicelog('Copying icons...')
|
||||||
|
|