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() {
|
||||
if (didPreloadIcons) return
|
||||
didPreloadIcons = true
|
||||
const urlsToPreload = [...Object.values(assetUrls.icons), ...Object.values(assetUrls.embedIcons)]
|
||||
await Promise.allSettled(urlsToPreload.map(preloadIcon))
|
||||
const urlsToPreload = new Set(
|
||||
[...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) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<svg width="30" height="31" viewBox="0 0 30 31" 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 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"/>
|
||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<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.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>
|
||||
|
|
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">
|
||||
<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="M18.5449 23.7915V5.7915H22.3506V20.6538H30.0674V23.7915H18.5449Z" fill="black"/>
|
||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<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.4469 23.7915V5.7915H22.2526V20.6538H29.9694V23.7915H18.4469Z" fill="black"/>
|
||||
</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">
|
||||
<rect x="26" y="19.7069" width="2" height="22" rx="1" transform="rotate(90 26 19.7069)" fill="black"/>
|
||||
<rect x="15" y="16.6169" width="2" height="8" rx="1" transform="rotate(-135 15 16.6169)" fill="black"/>
|
||||
<rect x="16.4142" y="15.2028" width="2" height="8" rx="1" transform="rotate(135 16.4142 15.2028)" fill="black"/>
|
||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<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.41" width="2" height="8" rx="1" transform="rotate(-135 15 16.41)" 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>
|
||||
|
|
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">
|
||||
<rect x="15" y="19.2969" width="2" height="8" rx="1" transform="rotate(45 15 19.2969)" 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="15" y="11.1179" width="2" height="8" rx="1" transform="rotate(-135 15 11.1179)" 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="4" y="16.2069" width="2" height="22" rx="1" transform="rotate(-90 4 16.2069)" fill="black"/>
|
||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<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.5042" width="2" height="8" rx="1" transform="rotate(-45 13.5858 20.5042)" 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.49683" width="2" height="8" rx="1" transform="rotate(135 16.4142 9.49683)" fill="black"/>
|
||||
<rect x="4" y="16" width="2" height="22" rx="1" transform="rotate(-90 4 16)" fill="black"/>
|
||||
</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">
|
||||
<rect x="4" y="10.7069" width="2" height="22" rx="1" transform="rotate(-90 4 10.7069)" fill="black"/>
|
||||
<rect x="15" y="13.7986" width="2" height="8" rx="1" transform="rotate(45 15 13.7986)" fill="black"/>
|
||||
<rect x="13.5858" y="15.2128" width="2" height="8" rx="1" transform="rotate(-45 13.5858 15.2128)" fill="black"/>
|
||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<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.5917" width="2" height="8" rx="1" transform="rotate(45 15 13.5917)" 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>
|
||||
|
|
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">
|
||||
<circle cx="16.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="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"/>
|
||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="15.3997" cy="19.4395" r="1.5" 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="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>
|
||||
|
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 669 B |
|
@ -5,424 +5,285 @@
|
|||
/// <reference path="./modules.d.ts" />
|
||||
import { formatAssetUrl } from './utils.js'
|
||||
|
||||
import embedIconsCodepen from './embed-icons/codepen.png'
|
||||
import embedIconsCodesandbox from './embed-icons/codesandbox.png'
|
||||
import embedIconsDesmos from './embed-icons/desmos.png'
|
||||
import embedIconsExcalidraw from './embed-icons/excalidraw.png'
|
||||
import embedIconsFelt from './embed-icons/felt.png'
|
||||
import embedIconsFigma from './embed-icons/figma.png'
|
||||
import embedIconsGithubGist from './embed-icons/github_gist.png'
|
||||
import embedIconsGoogleCalendar from './embed-icons/google_calendar.png'
|
||||
import embedIconsGoogleMaps from './embed-icons/google_maps.png'
|
||||
import embedIconsGoogleSlides from './embed-icons/google_slides.png'
|
||||
import embedIconsObservable from './embed-icons/observable.png'
|
||||
import embedIconsReplit from './embed-icons/replit.png'
|
||||
import embedIconsScratch from './embed-icons/scratch.png'
|
||||
import embedIconsSpotify from './embed-icons/spotify.png'
|
||||
import embedIconsTldraw from './embed-icons/tldraw.png'
|
||||
import embedIconsValTown from './embed-icons/val_town.png'
|
||||
import embedIconsVimeo from './embed-icons/vimeo.png'
|
||||
import embedIconsYoutube from './embed-icons/youtube.png'
|
||||
import fontsMonospace from './fonts/IBMPlexMono-Medium.woff2'
|
||||
import fontsSansSerif from './fonts/IBMPlexSans-Medium.woff2'
|
||||
import fontsSerif from './fonts/IBMPlexSerif-Medium.woff2'
|
||||
import fontsDraw from './fonts/Shantell_Sans-Tldrawish.woff2'
|
||||
import iconsAlignBottom from './icons/icon/align-bottom.svg'
|
||||
import iconsAlignCenterHorizontal from './icons/icon/align-center-horizontal.svg'
|
||||
import iconsAlignCenterVertical from './icons/icon/align-center-vertical.svg'
|
||||
import iconsAlignLeft from './icons/icon/align-left.svg'
|
||||
import iconsAlignRight from './icons/icon/align-right.svg'
|
||||
import iconsAlignTop from './icons/icon/align-top.svg'
|
||||
import iconsArrowLeft from './icons/icon/arrow-left.svg'
|
||||
import iconsArrowheadArrow from './icons/icon/arrowhead-arrow.svg'
|
||||
import iconsArrowheadBar from './icons/icon/arrowhead-bar.svg'
|
||||
import iconsArrowheadDiamond from './icons/icon/arrowhead-diamond.svg'
|
||||
import iconsArrowheadDot from './icons/icon/arrowhead-dot.svg'
|
||||
import iconsArrowheadNone from './icons/icon/arrowhead-none.svg'
|
||||
import iconsArrowheadSquare from './icons/icon/arrowhead-square.svg'
|
||||
import iconsArrowheadTriangleInverted from './icons/icon/arrowhead-triangle-inverted.svg'
|
||||
import iconsArrowheadTriangle from './icons/icon/arrowhead-triangle.svg'
|
||||
import iconsBlob from './icons/icon/blob.svg'
|
||||
import iconsBringForward from './icons/icon/bring-forward.svg'
|
||||
import iconsBringToFront from './icons/icon/bring-to-front.svg'
|
||||
import iconsBroken from './icons/icon/broken.svg'
|
||||
import iconsCheckCircle from './icons/icon/check-circle.svg'
|
||||
import iconsCheck from './icons/icon/check.svg'
|
||||
import iconsChevronDown from './icons/icon/chevron-down.svg'
|
||||
import iconsChevronLeft from './icons/icon/chevron-left.svg'
|
||||
import iconsChevronRight from './icons/icon/chevron-right.svg'
|
||||
import iconsChevronUp from './icons/icon/chevron-up.svg'
|
||||
import iconsChevronsNe from './icons/icon/chevrons-ne.svg'
|
||||
import iconsChevronsSw from './icons/icon/chevrons-sw.svg'
|
||||
import iconsClipboardCopied from './icons/icon/clipboard-copied.svg'
|
||||
import iconsClipboardCopy from './icons/icon/clipboard-copy.svg'
|
||||
import iconsColor from './icons/icon/color.svg'
|
||||
import iconsCross2 from './icons/icon/cross-2.svg'
|
||||
import iconsCrossCircle from './icons/icon/cross-circle.svg'
|
||||
import iconsDashDashed from './icons/icon/dash-dashed.svg'
|
||||
import iconsDashDotted from './icons/icon/dash-dotted.svg'
|
||||
import iconsDashDraw from './icons/icon/dash-draw.svg'
|
||||
import iconsDashSolid from './icons/icon/dash-solid.svg'
|
||||
import iconsDisconnected from './icons/icon/disconnected.svg'
|
||||
import iconsDiscord from './icons/icon/discord.svg'
|
||||
import iconsDistributeHorizontal from './icons/icon/distribute-horizontal.svg'
|
||||
import iconsDistributeVertical from './icons/icon/distribute-vertical.svg'
|
||||
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'
|
||||
import embedIconsCodepenPng from './embed-icons/codepen.png'
|
||||
import embedIconsCodesandboxPng from './embed-icons/codesandbox.png'
|
||||
import embedIconsDesmosPng from './embed-icons/desmos.png'
|
||||
import embedIconsExcalidrawPng from './embed-icons/excalidraw.png'
|
||||
import embedIconsFeltPng from './embed-icons/felt.png'
|
||||
import embedIconsFigmaPng from './embed-icons/figma.png'
|
||||
import embedIconsGithubGistPng from './embed-icons/github_gist.png'
|
||||
import embedIconsGoogleCalendarPng from './embed-icons/google_calendar.png'
|
||||
import embedIconsGoogleMapsPng from './embed-icons/google_maps.png'
|
||||
import embedIconsGoogleSlidesPng from './embed-icons/google_slides.png'
|
||||
import embedIconsObservablePng from './embed-icons/observable.png'
|
||||
import embedIconsReplitPng from './embed-icons/replit.png'
|
||||
import embedIconsScratchPng from './embed-icons/scratch.png'
|
||||
import embedIconsSpotifyPng from './embed-icons/spotify.png'
|
||||
import embedIconsTldrawPng from './embed-icons/tldraw.png'
|
||||
import embedIconsValTownPng from './embed-icons/val_town.png'
|
||||
import embedIconsVimeoPng from './embed-icons/vimeo.png'
|
||||
import embedIconsYoutubePng from './embed-icons/youtube.png'
|
||||
import fontsIBMPlexMonoMediumWoff2 from './fonts/IBMPlexMono-Medium.woff2'
|
||||
import fontsIBMPlexSansMediumWoff2 from './fonts/IBMPlexSans-Medium.woff2'
|
||||
import fontsIBMPlexSerifMediumWoff2 from './fonts/IBMPlexSerif-Medium.woff2'
|
||||
import fontsShantellSansTldrawishWoff2 from './fonts/Shantell_Sans-Tldrawish.woff2'
|
||||
import iconsIcon0MergedSvg from './icons/icon/0_merged.svg'
|
||||
import translationsArJson from './translations/ar.json'
|
||||
import translationsCaJson from './translations/ca.json'
|
||||
import translationsCsJson from './translations/cs.json'
|
||||
import translationsDaJson from './translations/da.json'
|
||||
import translationsDeJson from './translations/de.json'
|
||||
import translationsEnJson from './translations/en.json'
|
||||
import translationsEsJson from './translations/es.json'
|
||||
import translationsFaJson from './translations/fa.json'
|
||||
import translationsFiJson from './translations/fi.json'
|
||||
import translationsFrJson from './translations/fr.json'
|
||||
import translationsGlJson from './translations/gl.json'
|
||||
import translationsHeJson from './translations/he.json'
|
||||
import translationsHiInJson from './translations/hi-in.json'
|
||||
import translationsHrJson from './translations/hr.json'
|
||||
import translationsHuJson from './translations/hu.json'
|
||||
import translationsIdJson from './translations/id.json'
|
||||
import translationsItJson from './translations/it.json'
|
||||
import translationsJaJson from './translations/ja.json'
|
||||
import translationsKoKrJson from './translations/ko-kr.json'
|
||||
import translationsKuJson from './translations/ku.json'
|
||||
import translationsLanguagesJson from './translations/languages.json'
|
||||
import translationsMainJson from './translations/main.json'
|
||||
import translationsMyJson from './translations/my.json'
|
||||
import translationsNeJson from './translations/ne.json'
|
||||
import translationsNoJson from './translations/no.json'
|
||||
import translationsPlJson from './translations/pl.json'
|
||||
import translationsPtBrJson from './translations/pt-br.json'
|
||||
import translationsPtPtJson from './translations/pt-pt.json'
|
||||
import translationsRoJson from './translations/ro.json'
|
||||
import translationsRuJson from './translations/ru.json'
|
||||
import translationsSlJson from './translations/sl.json'
|
||||
import translationsSvJson from './translations/sv.json'
|
||||
import translationsTeJson from './translations/te.json'
|
||||
import translationsThJson from './translations/th.json'
|
||||
import translationsTrJson from './translations/tr.json'
|
||||
import translationsUkJson from './translations/uk.json'
|
||||
import translationsViJson from './translations/vi.json'
|
||||
import translationsZhCnJson from './translations/zh-cn.json'
|
||||
import translationsZhTwJson from './translations/zh-tw.json'
|
||||
|
||||
/**
|
||||
* @param {AssetUrlOptions} [opts]
|
||||
* @public
|
||||
*/
|
||||
export function getAssetUrlsByImport(opts) {
|
||||
const iconsIcon0MergedSvg2 = formatAssetUrl(iconsIcon0MergedSvg, opts)
|
||||
return {
|
||||
fonts: {
|
||||
monospace: formatAssetUrl(fontsMonospace, opts),
|
||||
sansSerif: formatAssetUrl(fontsSansSerif, opts),
|
||||
serif: formatAssetUrl(fontsSerif, opts),
|
||||
draw: formatAssetUrl(fontsDraw, opts),
|
||||
monospace: formatAssetUrl(fontsIBMPlexMonoMediumWoff2, opts),
|
||||
sansSerif: formatAssetUrl(fontsIBMPlexSansMediumWoff2, opts),
|
||||
serif: formatAssetUrl(fontsIBMPlexSerifMediumWoff2, opts),
|
||||
draw: formatAssetUrl(fontsShantellSansTldrawishWoff2, opts),
|
||||
},
|
||||
icons: {
|
||||
'align-bottom': formatAssetUrl(iconsAlignBottom, opts),
|
||||
'align-center-horizontal': formatAssetUrl(iconsAlignCenterHorizontal, opts),
|
||||
'align-center-vertical': formatAssetUrl(iconsAlignCenterVertical, opts),
|
||||
'align-left': formatAssetUrl(iconsAlignLeft, opts),
|
||||
'align-right': formatAssetUrl(iconsAlignRight, opts),
|
||||
'align-top': formatAssetUrl(iconsAlignTop, opts),
|
||||
'arrow-left': formatAssetUrl(iconsArrowLeft, opts),
|
||||
'arrowhead-arrow': formatAssetUrl(iconsArrowheadArrow, opts),
|
||||
'arrowhead-bar': formatAssetUrl(iconsArrowheadBar, opts),
|
||||
'arrowhead-diamond': formatAssetUrl(iconsArrowheadDiamond, opts),
|
||||
'arrowhead-dot': formatAssetUrl(iconsArrowheadDot, opts),
|
||||
'arrowhead-none': formatAssetUrl(iconsArrowheadNone, opts),
|
||||
'arrowhead-square': formatAssetUrl(iconsArrowheadSquare, opts),
|
||||
'arrowhead-triangle-inverted': formatAssetUrl(iconsArrowheadTriangleInverted, opts),
|
||||
'arrowhead-triangle': formatAssetUrl(iconsArrowheadTriangle, opts),
|
||||
blob: formatAssetUrl(iconsBlob, opts),
|
||||
'bring-forward': formatAssetUrl(iconsBringForward, opts),
|
||||
'bring-to-front': formatAssetUrl(iconsBringToFront, opts),
|
||||
broken: formatAssetUrl(iconsBroken, opts),
|
||||
'check-circle': formatAssetUrl(iconsCheckCircle, opts),
|
||||
check: formatAssetUrl(iconsCheck, opts),
|
||||
'chevron-down': formatAssetUrl(iconsChevronDown, opts),
|
||||
'chevron-left': formatAssetUrl(iconsChevronLeft, opts),
|
||||
'chevron-right': formatAssetUrl(iconsChevronRight, opts),
|
||||
'chevron-up': formatAssetUrl(iconsChevronUp, opts),
|
||||
'chevrons-ne': formatAssetUrl(iconsChevronsNe, opts),
|
||||
'chevrons-sw': formatAssetUrl(iconsChevronsSw, opts),
|
||||
'clipboard-copied': formatAssetUrl(iconsClipboardCopied, opts),
|
||||
'clipboard-copy': formatAssetUrl(iconsClipboardCopy, opts),
|
||||
color: formatAssetUrl(iconsColor, opts),
|
||||
'cross-2': formatAssetUrl(iconsCross2, opts),
|
||||
'cross-circle': formatAssetUrl(iconsCrossCircle, opts),
|
||||
'dash-dashed': formatAssetUrl(iconsDashDashed, opts),
|
||||
'dash-dotted': formatAssetUrl(iconsDashDotted, opts),
|
||||
'dash-draw': formatAssetUrl(iconsDashDraw, opts),
|
||||
'dash-solid': formatAssetUrl(iconsDashSolid, opts),
|
||||
disconnected: formatAssetUrl(iconsDisconnected, opts),
|
||||
discord: formatAssetUrl(iconsDiscord, opts),
|
||||
'distribute-horizontal': formatAssetUrl(iconsDistributeHorizontal, opts),
|
||||
'distribute-vertical': formatAssetUrl(iconsDistributeVertical, opts),
|
||||
dot: formatAssetUrl(iconsDot, opts),
|
||||
'dots-horizontal': formatAssetUrl(iconsDotsHorizontal, opts),
|
||||
'dots-vertical': formatAssetUrl(iconsDotsVertical, opts),
|
||||
'drag-handle-dots': formatAssetUrl(iconsDragHandleDots, opts),
|
||||
duplicate: formatAssetUrl(iconsDuplicate, opts),
|
||||
edit: formatAssetUrl(iconsEdit, opts),
|
||||
'external-link': formatAssetUrl(iconsExternalLink, opts),
|
||||
'fill-fill': formatAssetUrl(iconsFillFill, opts),
|
||||
'fill-none': formatAssetUrl(iconsFillNone, opts),
|
||||
'fill-pattern': formatAssetUrl(iconsFillPattern, opts),
|
||||
'fill-semi': formatAssetUrl(iconsFillSemi, opts),
|
||||
'fill-solid': formatAssetUrl(iconsFillSolid, opts),
|
||||
follow: formatAssetUrl(iconsFollow, opts),
|
||||
following: formatAssetUrl(iconsFollowing, opts),
|
||||
'font-draw': formatAssetUrl(iconsFontDraw, opts),
|
||||
'font-mono': formatAssetUrl(iconsFontMono, opts),
|
||||
'font-sans': formatAssetUrl(iconsFontSans, opts),
|
||||
'font-serif': formatAssetUrl(iconsFontSerif, opts),
|
||||
'geo-arrow-down': formatAssetUrl(iconsGeoArrowDown, opts),
|
||||
'geo-arrow-left': formatAssetUrl(iconsGeoArrowLeft, opts),
|
||||
'geo-arrow-right': formatAssetUrl(iconsGeoArrowRight, opts),
|
||||
'geo-arrow-up': formatAssetUrl(iconsGeoArrowUp, opts),
|
||||
'geo-check-box': formatAssetUrl(iconsGeoCheckBox, opts),
|
||||
'geo-cloud': formatAssetUrl(iconsGeoCloud, opts),
|
||||
'geo-diamond': formatAssetUrl(iconsGeoDiamond, opts),
|
||||
'geo-ellipse': formatAssetUrl(iconsGeoEllipse, opts),
|
||||
'geo-heart': formatAssetUrl(iconsGeoHeart, opts),
|
||||
'geo-hexagon': formatAssetUrl(iconsGeoHexagon, opts),
|
||||
'geo-octagon': formatAssetUrl(iconsGeoOctagon, opts),
|
||||
'geo-oval': formatAssetUrl(iconsGeoOval, opts),
|
||||
'geo-pentagon': formatAssetUrl(iconsGeoPentagon, opts),
|
||||
'geo-rectangle': formatAssetUrl(iconsGeoRectangle, opts),
|
||||
'geo-rhombus-2': formatAssetUrl(iconsGeoRhombus2, opts),
|
||||
'geo-rhombus': formatAssetUrl(iconsGeoRhombus, opts),
|
||||
'geo-star': formatAssetUrl(iconsGeoStar, opts),
|
||||
'geo-trapezoid': formatAssetUrl(iconsGeoTrapezoid, opts),
|
||||
'geo-triangle': formatAssetUrl(iconsGeoTriangle, opts),
|
||||
'geo-x-box': formatAssetUrl(iconsGeoXBox, opts),
|
||||
github: formatAssetUrl(iconsGithub, opts),
|
||||
group: formatAssetUrl(iconsGroup, opts),
|
||||
'horizontal-align-end': formatAssetUrl(iconsHorizontalAlignEnd, opts),
|
||||
'horizontal-align-middle': formatAssetUrl(iconsHorizontalAlignMiddle, opts),
|
||||
'horizontal-align-start': formatAssetUrl(iconsHorizontalAlignStart, opts),
|
||||
'info-circle': formatAssetUrl(iconsInfoCircle, opts),
|
||||
leading: formatAssetUrl(iconsLeading, opts),
|
||||
link: formatAssetUrl(iconsLink, opts),
|
||||
lock: formatAssetUrl(iconsLock, opts),
|
||||
menu: formatAssetUrl(iconsMenu, opts),
|
||||
minus: formatAssetUrl(iconsMinus, opts),
|
||||
mixed: formatAssetUrl(iconsMixed, opts),
|
||||
pack: formatAssetUrl(iconsPack, opts),
|
||||
plus: formatAssetUrl(iconsPlus, opts),
|
||||
'question-mark-circle': formatAssetUrl(iconsQuestionMarkCircle, opts),
|
||||
'question-mark': formatAssetUrl(iconsQuestionMark, opts),
|
||||
redo: formatAssetUrl(iconsRedo, opts),
|
||||
'reset-zoom': formatAssetUrl(iconsResetZoom, opts),
|
||||
'rotate-ccw': formatAssetUrl(iconsRotateCcw, opts),
|
||||
'rotate-cw': formatAssetUrl(iconsRotateCw, opts),
|
||||
'send-backward': formatAssetUrl(iconsSendBackward, opts),
|
||||
'send-to-back': formatAssetUrl(iconsSendToBack, opts),
|
||||
'share-1': formatAssetUrl(iconsShare1, opts),
|
||||
'size-extra-large': formatAssetUrl(iconsSizeExtraLarge, opts),
|
||||
'size-large': formatAssetUrl(iconsSizeLarge, opts),
|
||||
'size-medium': formatAssetUrl(iconsSizeMedium, opts),
|
||||
'size-small': formatAssetUrl(iconsSizeSmall, opts),
|
||||
'spline-cubic': formatAssetUrl(iconsSplineCubic, opts),
|
||||
'spline-line': formatAssetUrl(iconsSplineLine, opts),
|
||||
'stack-horizontal': formatAssetUrl(iconsStackHorizontal, opts),
|
||||
'stack-vertical': formatAssetUrl(iconsStackVertical, opts),
|
||||
'status-offline': formatAssetUrl(iconsStatusOffline, opts),
|
||||
'stretch-horizontal': formatAssetUrl(iconsStretchHorizontal, opts),
|
||||
'stretch-vertical': formatAssetUrl(iconsStretchVertical, opts),
|
||||
'text-align-center': formatAssetUrl(iconsTextAlignCenter, opts),
|
||||
'text-align-left': formatAssetUrl(iconsTextAlignLeft, opts),
|
||||
'text-align-right': formatAssetUrl(iconsTextAlignRight, opts),
|
||||
'toggle-off': formatAssetUrl(iconsToggleOff, opts),
|
||||
'toggle-on': formatAssetUrl(iconsToggleOn, opts),
|
||||
'tool-arrow': formatAssetUrl(iconsToolArrow, opts),
|
||||
'tool-eraser': formatAssetUrl(iconsToolEraser, opts),
|
||||
'tool-frame': formatAssetUrl(iconsToolFrame, opts),
|
||||
'tool-hand': formatAssetUrl(iconsToolHand, opts),
|
||||
'tool-highlight': formatAssetUrl(iconsToolHighlight, opts),
|
||||
'tool-laser': formatAssetUrl(iconsToolLaser, opts),
|
||||
'tool-line': formatAssetUrl(iconsToolLine, opts),
|
||||
'tool-media': formatAssetUrl(iconsToolMedia, opts),
|
||||
'tool-note': formatAssetUrl(iconsToolNote, opts),
|
||||
'tool-pencil': formatAssetUrl(iconsToolPencil, opts),
|
||||
'tool-pointer': formatAssetUrl(iconsToolPointer, opts),
|
||||
'tool-screenshot': formatAssetUrl(iconsToolScreenshot, opts),
|
||||
'tool-text': formatAssetUrl(iconsToolText, opts),
|
||||
trash: formatAssetUrl(iconsTrash, opts),
|
||||
twitter: formatAssetUrl(iconsTwitter, opts),
|
||||
undo: formatAssetUrl(iconsUndo, opts),
|
||||
ungroup: formatAssetUrl(iconsUngroup, opts),
|
||||
unlock: formatAssetUrl(iconsUnlock, opts),
|
||||
'vertical-align-end': formatAssetUrl(iconsVerticalAlignEnd, opts),
|
||||
'vertical-align-middle': formatAssetUrl(iconsVerticalAlignMiddle, opts),
|
||||
'vertical-align-start': formatAssetUrl(iconsVerticalAlignStart, opts),
|
||||
'warning-triangle': formatAssetUrl(iconsWarningTriangle, opts),
|
||||
'zoom-in': formatAssetUrl(iconsZoomIn, opts),
|
||||
'zoom-out': formatAssetUrl(iconsZoomOut, opts),
|
||||
'align-bottom': iconsIcon0MergedSvg2 + '#align-bottom',
|
||||
'align-center-horizontal': iconsIcon0MergedSvg2 + '#align-center-horizontal',
|
||||
'align-center-vertical': iconsIcon0MergedSvg2 + '#align-center-vertical',
|
||||
'align-left': iconsIcon0MergedSvg2 + '#align-left',
|
||||
'align-right': iconsIcon0MergedSvg2 + '#align-right',
|
||||
'align-top': iconsIcon0MergedSvg2 + '#align-top',
|
||||
'arrow-left': iconsIcon0MergedSvg2 + '#arrow-left',
|
||||
'arrowhead-arrow': iconsIcon0MergedSvg2 + '#arrowhead-arrow',
|
||||
'arrowhead-bar': iconsIcon0MergedSvg2 + '#arrowhead-bar',
|
||||
'arrowhead-diamond': iconsIcon0MergedSvg2 + '#arrowhead-diamond',
|
||||
'arrowhead-dot': iconsIcon0MergedSvg2 + '#arrowhead-dot',
|
||||
'arrowhead-none': iconsIcon0MergedSvg2 + '#arrowhead-none',
|
||||
'arrowhead-square': iconsIcon0MergedSvg2 + '#arrowhead-square',
|
||||
'arrowhead-triangle-inverted': iconsIcon0MergedSvg2 + '#arrowhead-triangle-inverted',
|
||||
'arrowhead-triangle': iconsIcon0MergedSvg2 + '#arrowhead-triangle',
|
||||
blob: iconsIcon0MergedSvg2 + '#blob',
|
||||
'bring-forward': iconsIcon0MergedSvg2 + '#bring-forward',
|
||||
'bring-to-front': iconsIcon0MergedSvg2 + '#bring-to-front',
|
||||
broken: iconsIcon0MergedSvg2 + '#broken',
|
||||
'check-circle': iconsIcon0MergedSvg2 + '#check-circle',
|
||||
check: iconsIcon0MergedSvg2 + '#check',
|
||||
'chevron-down': iconsIcon0MergedSvg2 + '#chevron-down',
|
||||
'chevron-left': iconsIcon0MergedSvg2 + '#chevron-left',
|
||||
'chevron-right': iconsIcon0MergedSvg2 + '#chevron-right',
|
||||
'chevron-up': iconsIcon0MergedSvg2 + '#chevron-up',
|
||||
'chevrons-ne': iconsIcon0MergedSvg2 + '#chevrons-ne',
|
||||
'chevrons-sw': iconsIcon0MergedSvg2 + '#chevrons-sw',
|
||||
'clipboard-copied': iconsIcon0MergedSvg2 + '#clipboard-copied',
|
||||
'clipboard-copy': iconsIcon0MergedSvg2 + '#clipboard-copy',
|
||||
color: iconsIcon0MergedSvg2 + '#color',
|
||||
'cross-2': iconsIcon0MergedSvg2 + '#cross-2',
|
||||
'cross-circle': iconsIcon0MergedSvg2 + '#cross-circle',
|
||||
'dash-dashed': iconsIcon0MergedSvg2 + '#dash-dashed',
|
||||
'dash-dotted': iconsIcon0MergedSvg2 + '#dash-dotted',
|
||||
'dash-draw': iconsIcon0MergedSvg2 + '#dash-draw',
|
||||
'dash-solid': iconsIcon0MergedSvg2 + '#dash-solid',
|
||||
disconnected: iconsIcon0MergedSvg2 + '#disconnected',
|
||||
discord: iconsIcon0MergedSvg2 + '#discord',
|
||||
'distribute-horizontal': iconsIcon0MergedSvg2 + '#distribute-horizontal',
|
||||
'distribute-vertical': iconsIcon0MergedSvg2 + '#distribute-vertical',
|
||||
dot: iconsIcon0MergedSvg2 + '#dot',
|
||||
'dots-horizontal': iconsIcon0MergedSvg2 + '#dots-horizontal',
|
||||
'dots-vertical': iconsIcon0MergedSvg2 + '#dots-vertical',
|
||||
'drag-handle-dots': iconsIcon0MergedSvg2 + '#drag-handle-dots',
|
||||
duplicate: iconsIcon0MergedSvg2 + '#duplicate',
|
||||
edit: iconsIcon0MergedSvg2 + '#edit',
|
||||
'external-link': iconsIcon0MergedSvg2 + '#external-link',
|
||||
'fill-fill': iconsIcon0MergedSvg2 + '#fill-fill',
|
||||
'fill-none': iconsIcon0MergedSvg2 + '#fill-none',
|
||||
'fill-pattern': iconsIcon0MergedSvg2 + '#fill-pattern',
|
||||
'fill-semi': iconsIcon0MergedSvg2 + '#fill-semi',
|
||||
'fill-solid': iconsIcon0MergedSvg2 + '#fill-solid',
|
||||
follow: iconsIcon0MergedSvg2 + '#follow',
|
||||
following: iconsIcon0MergedSvg2 + '#following',
|
||||
'font-draw': iconsIcon0MergedSvg2 + '#font-draw',
|
||||
'font-mono': iconsIcon0MergedSvg2 + '#font-mono',
|
||||
'font-sans': iconsIcon0MergedSvg2 + '#font-sans',
|
||||
'font-serif': iconsIcon0MergedSvg2 + '#font-serif',
|
||||
'geo-arrow-down': iconsIcon0MergedSvg2 + '#geo-arrow-down',
|
||||
'geo-arrow-left': iconsIcon0MergedSvg2 + '#geo-arrow-left',
|
||||
'geo-arrow-right': iconsIcon0MergedSvg2 + '#geo-arrow-right',
|
||||
'geo-arrow-up': iconsIcon0MergedSvg2 + '#geo-arrow-up',
|
||||
'geo-check-box': iconsIcon0MergedSvg2 + '#geo-check-box',
|
||||
'geo-cloud': iconsIcon0MergedSvg2 + '#geo-cloud',
|
||||
'geo-diamond': iconsIcon0MergedSvg2 + '#geo-diamond',
|
||||
'geo-ellipse': iconsIcon0MergedSvg2 + '#geo-ellipse',
|
||||
'geo-heart': iconsIcon0MergedSvg2 + '#geo-heart',
|
||||
'geo-hexagon': iconsIcon0MergedSvg2 + '#geo-hexagon',
|
||||
'geo-octagon': iconsIcon0MergedSvg2 + '#geo-octagon',
|
||||
'geo-oval': iconsIcon0MergedSvg2 + '#geo-oval',
|
||||
'geo-pentagon': iconsIcon0MergedSvg2 + '#geo-pentagon',
|
||||
'geo-rectangle': iconsIcon0MergedSvg2 + '#geo-rectangle',
|
||||
'geo-rhombus-2': iconsIcon0MergedSvg2 + '#geo-rhombus-2',
|
||||
'geo-rhombus': iconsIcon0MergedSvg2 + '#geo-rhombus',
|
||||
'geo-star': iconsIcon0MergedSvg2 + '#geo-star',
|
||||
'geo-trapezoid': iconsIcon0MergedSvg2 + '#geo-trapezoid',
|
||||
'geo-triangle': iconsIcon0MergedSvg2 + '#geo-triangle',
|
||||
'geo-x-box': iconsIcon0MergedSvg2 + '#geo-x-box',
|
||||
github: iconsIcon0MergedSvg2 + '#github',
|
||||
group: iconsIcon0MergedSvg2 + '#group',
|
||||
'horizontal-align-end': iconsIcon0MergedSvg2 + '#horizontal-align-end',
|
||||
'horizontal-align-middle': iconsIcon0MergedSvg2 + '#horizontal-align-middle',
|
||||
'horizontal-align-start': iconsIcon0MergedSvg2 + '#horizontal-align-start',
|
||||
'info-circle': iconsIcon0MergedSvg2 + '#info-circle',
|
||||
leading: iconsIcon0MergedSvg2 + '#leading',
|
||||
link: iconsIcon0MergedSvg2 + '#link',
|
||||
lock: iconsIcon0MergedSvg2 + '#lock',
|
||||
menu: iconsIcon0MergedSvg2 + '#menu',
|
||||
minus: iconsIcon0MergedSvg2 + '#minus',
|
||||
mixed: iconsIcon0MergedSvg2 + '#mixed',
|
||||
pack: iconsIcon0MergedSvg2 + '#pack',
|
||||
plus: iconsIcon0MergedSvg2 + '#plus',
|
||||
'question-mark-circle': iconsIcon0MergedSvg2 + '#question-mark-circle',
|
||||
'question-mark': iconsIcon0MergedSvg2 + '#question-mark',
|
||||
redo: iconsIcon0MergedSvg2 + '#redo',
|
||||
'reset-zoom': iconsIcon0MergedSvg2 + '#reset-zoom',
|
||||
'rotate-ccw': iconsIcon0MergedSvg2 + '#rotate-ccw',
|
||||
'rotate-cw': iconsIcon0MergedSvg2 + '#rotate-cw',
|
||||
'send-backward': iconsIcon0MergedSvg2 + '#send-backward',
|
||||
'send-to-back': iconsIcon0MergedSvg2 + '#send-to-back',
|
||||
'share-1': iconsIcon0MergedSvg2 + '#share-1',
|
||||
'size-extra-large': iconsIcon0MergedSvg2 + '#size-extra-large',
|
||||
'size-large': iconsIcon0MergedSvg2 + '#size-large',
|
||||
'size-medium': iconsIcon0MergedSvg2 + '#size-medium',
|
||||
'size-small': iconsIcon0MergedSvg2 + '#size-small',
|
||||
'spline-cubic': iconsIcon0MergedSvg2 + '#spline-cubic',
|
||||
'spline-line': iconsIcon0MergedSvg2 + '#spline-line',
|
||||
'stack-horizontal': iconsIcon0MergedSvg2 + '#stack-horizontal',
|
||||
'stack-vertical': iconsIcon0MergedSvg2 + '#stack-vertical',
|
||||
'status-offline': iconsIcon0MergedSvg2 + '#status-offline',
|
||||
'stretch-horizontal': iconsIcon0MergedSvg2 + '#stretch-horizontal',
|
||||
'stretch-vertical': iconsIcon0MergedSvg2 + '#stretch-vertical',
|
||||
'text-align-center': iconsIcon0MergedSvg2 + '#text-align-center',
|
||||
'text-align-left': iconsIcon0MergedSvg2 + '#text-align-left',
|
||||
'text-align-right': iconsIcon0MergedSvg2 + '#text-align-right',
|
||||
'toggle-off': iconsIcon0MergedSvg2 + '#toggle-off',
|
||||
'toggle-on': iconsIcon0MergedSvg2 + '#toggle-on',
|
||||
'tool-arrow': iconsIcon0MergedSvg2 + '#tool-arrow',
|
||||
'tool-eraser': iconsIcon0MergedSvg2 + '#tool-eraser',
|
||||
'tool-frame': iconsIcon0MergedSvg2 + '#tool-frame',
|
||||
'tool-hand': iconsIcon0MergedSvg2 + '#tool-hand',
|
||||
'tool-highlight': iconsIcon0MergedSvg2 + '#tool-highlight',
|
||||
'tool-laser': iconsIcon0MergedSvg2 + '#tool-laser',
|
||||
'tool-line': iconsIcon0MergedSvg2 + '#tool-line',
|
||||
'tool-media': iconsIcon0MergedSvg2 + '#tool-media',
|
||||
'tool-note': iconsIcon0MergedSvg2 + '#tool-note',
|
||||
'tool-pencil': iconsIcon0MergedSvg2 + '#tool-pencil',
|
||||
'tool-pointer': iconsIcon0MergedSvg2 + '#tool-pointer',
|
||||
'tool-screenshot': iconsIcon0MergedSvg2 + '#tool-screenshot',
|
||||
'tool-text': iconsIcon0MergedSvg2 + '#tool-text',
|
||||
trash: iconsIcon0MergedSvg2 + '#trash',
|
||||
twitter: iconsIcon0MergedSvg2 + '#twitter',
|
||||
undo: iconsIcon0MergedSvg2 + '#undo',
|
||||
ungroup: iconsIcon0MergedSvg2 + '#ungroup',
|
||||
unlock: iconsIcon0MergedSvg2 + '#unlock',
|
||||
'vertical-align-end': iconsIcon0MergedSvg2 + '#vertical-align-end',
|
||||
'vertical-align-middle': iconsIcon0MergedSvg2 + '#vertical-align-middle',
|
||||
'vertical-align-start': iconsIcon0MergedSvg2 + '#vertical-align-start',
|
||||
'warning-triangle': iconsIcon0MergedSvg2 + '#warning-triangle',
|
||||
'zoom-in': iconsIcon0MergedSvg2 + '#zoom-in',
|
||||
'zoom-out': iconsIcon0MergedSvg2 + '#zoom-out',
|
||||
},
|
||||
translations: {
|
||||
ar: formatAssetUrl(translationsAr, opts),
|
||||
ca: formatAssetUrl(translationsCa, opts),
|
||||
cs: formatAssetUrl(translationsCs, opts),
|
||||
da: formatAssetUrl(translationsDa, opts),
|
||||
de: formatAssetUrl(translationsDe, opts),
|
||||
en: formatAssetUrl(translationsEn, opts),
|
||||
es: formatAssetUrl(translationsEs, opts),
|
||||
fa: formatAssetUrl(translationsFa, opts),
|
||||
fi: formatAssetUrl(translationsFi, opts),
|
||||
fr: formatAssetUrl(translationsFr, opts),
|
||||
gl: formatAssetUrl(translationsGl, opts),
|
||||
he: formatAssetUrl(translationsHe, opts),
|
||||
'hi-in': formatAssetUrl(translationsHiIn, opts),
|
||||
hr: formatAssetUrl(translationsHr, opts),
|
||||
hu: formatAssetUrl(translationsHu, opts),
|
||||
id: formatAssetUrl(translationsId, opts),
|
||||
it: formatAssetUrl(translationsIt, opts),
|
||||
ja: formatAssetUrl(translationsJa, opts),
|
||||
'ko-kr': formatAssetUrl(translationsKoKr, opts),
|
||||
ku: formatAssetUrl(translationsKu, opts),
|
||||
languages: formatAssetUrl(translationsLanguages, opts),
|
||||
main: formatAssetUrl(translationsMain, opts),
|
||||
my: formatAssetUrl(translationsMy, opts),
|
||||
ne: formatAssetUrl(translationsNe, opts),
|
||||
no: formatAssetUrl(translationsNo, opts),
|
||||
pl: formatAssetUrl(translationsPl, opts),
|
||||
'pt-br': formatAssetUrl(translationsPtBr, opts),
|
||||
'pt-pt': formatAssetUrl(translationsPtPt, opts),
|
||||
ro: formatAssetUrl(translationsRo, opts),
|
||||
ru: formatAssetUrl(translationsRu, opts),
|
||||
sl: formatAssetUrl(translationsSl, opts),
|
||||
sv: formatAssetUrl(translationsSv, opts),
|
||||
te: formatAssetUrl(translationsTe, opts),
|
||||
th: formatAssetUrl(translationsTh, opts),
|
||||
tr: formatAssetUrl(translationsTr, opts),
|
||||
uk: formatAssetUrl(translationsUk, opts),
|
||||
vi: formatAssetUrl(translationsVi, opts),
|
||||
'zh-cn': formatAssetUrl(translationsZhCn, opts),
|
||||
'zh-tw': formatAssetUrl(translationsZhTw, opts),
|
||||
ar: formatAssetUrl(translationsArJson, opts),
|
||||
ca: formatAssetUrl(translationsCaJson, opts),
|
||||
cs: formatAssetUrl(translationsCsJson, opts),
|
||||
da: formatAssetUrl(translationsDaJson, opts),
|
||||
de: formatAssetUrl(translationsDeJson, opts),
|
||||
en: formatAssetUrl(translationsEnJson, opts),
|
||||
es: formatAssetUrl(translationsEsJson, opts),
|
||||
fa: formatAssetUrl(translationsFaJson, opts),
|
||||
fi: formatAssetUrl(translationsFiJson, opts),
|
||||
fr: formatAssetUrl(translationsFrJson, opts),
|
||||
gl: formatAssetUrl(translationsGlJson, opts),
|
||||
he: formatAssetUrl(translationsHeJson, opts),
|
||||
'hi-in': formatAssetUrl(translationsHiInJson, opts),
|
||||
hr: formatAssetUrl(translationsHrJson, opts),
|
||||
hu: formatAssetUrl(translationsHuJson, opts),
|
||||
id: formatAssetUrl(translationsIdJson, opts),
|
||||
it: formatAssetUrl(translationsItJson, opts),
|
||||
ja: formatAssetUrl(translationsJaJson, opts),
|
||||
'ko-kr': formatAssetUrl(translationsKoKrJson, opts),
|
||||
ku: formatAssetUrl(translationsKuJson, opts),
|
||||
languages: formatAssetUrl(translationsLanguagesJson, opts),
|
||||
main: formatAssetUrl(translationsMainJson, opts),
|
||||
my: formatAssetUrl(translationsMyJson, opts),
|
||||
ne: formatAssetUrl(translationsNeJson, opts),
|
||||
no: formatAssetUrl(translationsNoJson, opts),
|
||||
pl: formatAssetUrl(translationsPlJson, opts),
|
||||
'pt-br': formatAssetUrl(translationsPtBrJson, opts),
|
||||
'pt-pt': formatAssetUrl(translationsPtPtJson, opts),
|
||||
ro: formatAssetUrl(translationsRoJson, opts),
|
||||
ru: formatAssetUrl(translationsRuJson, opts),
|
||||
sl: formatAssetUrl(translationsSlJson, opts),
|
||||
sv: formatAssetUrl(translationsSvJson, opts),
|
||||
te: formatAssetUrl(translationsTeJson, opts),
|
||||
th: formatAssetUrl(translationsThJson, opts),
|
||||
tr: formatAssetUrl(translationsTrJson, opts),
|
||||
uk: formatAssetUrl(translationsUkJson, opts),
|
||||
vi: formatAssetUrl(translationsViJson, opts),
|
||||
'zh-cn': formatAssetUrl(translationsZhCnJson, opts),
|
||||
'zh-tw': formatAssetUrl(translationsZhTwJson, opts),
|
||||
},
|
||||
embedIcons: {
|
||||
codepen: formatAssetUrl(embedIconsCodepen, opts),
|
||||
codesandbox: formatAssetUrl(embedIconsCodesandbox, opts),
|
||||
desmos: formatAssetUrl(embedIconsDesmos, opts),
|
||||
excalidraw: formatAssetUrl(embedIconsExcalidraw, opts),
|
||||
felt: formatAssetUrl(embedIconsFelt, opts),
|
||||
figma: formatAssetUrl(embedIconsFigma, opts),
|
||||
github_gist: formatAssetUrl(embedIconsGithubGist, opts),
|
||||
google_calendar: formatAssetUrl(embedIconsGoogleCalendar, opts),
|
||||
google_maps: formatAssetUrl(embedIconsGoogleMaps, opts),
|
||||
google_slides: formatAssetUrl(embedIconsGoogleSlides, opts),
|
||||
observable: formatAssetUrl(embedIconsObservable, opts),
|
||||
replit: formatAssetUrl(embedIconsReplit, opts),
|
||||
scratch: formatAssetUrl(embedIconsScratch, opts),
|
||||
spotify: formatAssetUrl(embedIconsSpotify, opts),
|
||||
tldraw: formatAssetUrl(embedIconsTldraw, opts),
|
||||
val_town: formatAssetUrl(embedIconsValTown, opts),
|
||||
vimeo: formatAssetUrl(embedIconsVimeo, opts),
|
||||
youtube: formatAssetUrl(embedIconsYoutube, opts),
|
||||
codepen: formatAssetUrl(embedIconsCodepenPng, opts),
|
||||
codesandbox: formatAssetUrl(embedIconsCodesandboxPng, opts),
|
||||
desmos: formatAssetUrl(embedIconsDesmosPng, opts),
|
||||
excalidraw: formatAssetUrl(embedIconsExcalidrawPng, opts),
|
||||
felt: formatAssetUrl(embedIconsFeltPng, opts),
|
||||
figma: formatAssetUrl(embedIconsFigmaPng, opts),
|
||||
github_gist: formatAssetUrl(embedIconsGithubGistPng, opts),
|
||||
google_calendar: formatAssetUrl(embedIconsGoogleCalendarPng, opts),
|
||||
google_maps: formatAssetUrl(embedIconsGoogleMapsPng, opts),
|
||||
google_slides: formatAssetUrl(embedIconsGoogleSlidesPng, opts),
|
||||
observable: formatAssetUrl(embedIconsObservablePng, opts),
|
||||
replit: formatAssetUrl(embedIconsReplitPng, opts),
|
||||
scratch: formatAssetUrl(embedIconsScratchPng, opts),
|
||||
spotify: formatAssetUrl(embedIconsSpotifyPng, opts),
|
||||
tldraw: formatAssetUrl(embedIconsTldrawPng, opts),
|
||||
val_town: formatAssetUrl(embedIconsValTownPng, opts),
|
||||
vimeo: formatAssetUrl(embedIconsVimeoPng, opts),
|
||||
youtube: formatAssetUrl(embedIconsYoutubePng, opts),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,424 +5,285 @@
|
|||
/// <reference path="./modules.d.ts" />
|
||||
import { formatAssetUrl } from './utils.js'
|
||||
|
||||
import embedIconsCodepen from './embed-icons/codepen.png?url'
|
||||
import embedIconsCodesandbox from './embed-icons/codesandbox.png?url'
|
||||
import embedIconsDesmos from './embed-icons/desmos.png?url'
|
||||
import embedIconsExcalidraw from './embed-icons/excalidraw.png?url'
|
||||
import embedIconsFelt from './embed-icons/felt.png?url'
|
||||
import embedIconsFigma from './embed-icons/figma.png?url'
|
||||
import embedIconsGithubGist from './embed-icons/github_gist.png?url'
|
||||
import embedIconsGoogleCalendar from './embed-icons/google_calendar.png?url'
|
||||
import embedIconsGoogleMaps from './embed-icons/google_maps.png?url'
|
||||
import embedIconsGoogleSlides from './embed-icons/google_slides.png?url'
|
||||
import embedIconsObservable from './embed-icons/observable.png?url'
|
||||
import embedIconsReplit from './embed-icons/replit.png?url'
|
||||
import embedIconsScratch from './embed-icons/scratch.png?url'
|
||||
import embedIconsSpotify from './embed-icons/spotify.png?url'
|
||||
import embedIconsTldraw from './embed-icons/tldraw.png?url'
|
||||
import embedIconsValTown from './embed-icons/val_town.png?url'
|
||||
import embedIconsVimeo from './embed-icons/vimeo.png?url'
|
||||
import embedIconsYoutube from './embed-icons/youtube.png?url'
|
||||
import fontsMonospace from './fonts/IBMPlexMono-Medium.woff2?url'
|
||||
import fontsSansSerif from './fonts/IBMPlexSans-Medium.woff2?url'
|
||||
import fontsSerif from './fonts/IBMPlexSerif-Medium.woff2?url'
|
||||
import fontsDraw from './fonts/Shantell_Sans-Tldrawish.woff2?url'
|
||||
import iconsAlignBottom from './icons/icon/align-bottom.svg?url'
|
||||
import iconsAlignCenterHorizontal from './icons/icon/align-center-horizontal.svg?url'
|
||||
import iconsAlignCenterVertical from './icons/icon/align-center-vertical.svg?url'
|
||||
import iconsAlignLeft from './icons/icon/align-left.svg?url'
|
||||
import iconsAlignRight from './icons/icon/align-right.svg?url'
|
||||
import iconsAlignTop from './icons/icon/align-top.svg?url'
|
||||
import iconsArrowLeft from './icons/icon/arrow-left.svg?url'
|
||||
import iconsArrowheadArrow from './icons/icon/arrowhead-arrow.svg?url'
|
||||
import iconsArrowheadBar from './icons/icon/arrowhead-bar.svg?url'
|
||||
import iconsArrowheadDiamond from './icons/icon/arrowhead-diamond.svg?url'
|
||||
import iconsArrowheadDot from './icons/icon/arrowhead-dot.svg?url'
|
||||
import iconsArrowheadNone from './icons/icon/arrowhead-none.svg?url'
|
||||
import iconsArrowheadSquare from './icons/icon/arrowhead-square.svg?url'
|
||||
import iconsArrowheadTriangleInverted from './icons/icon/arrowhead-triangle-inverted.svg?url'
|
||||
import iconsArrowheadTriangle from './icons/icon/arrowhead-triangle.svg?url'
|
||||
import iconsBlob from './icons/icon/blob.svg?url'
|
||||
import iconsBringForward from './icons/icon/bring-forward.svg?url'
|
||||
import iconsBringToFront from './icons/icon/bring-to-front.svg?url'
|
||||
import iconsBroken from './icons/icon/broken.svg?url'
|
||||
import iconsCheckCircle from './icons/icon/check-circle.svg?url'
|
||||
import iconsCheck from './icons/icon/check.svg?url'
|
||||
import iconsChevronDown from './icons/icon/chevron-down.svg?url'
|
||||
import iconsChevronLeft from './icons/icon/chevron-left.svg?url'
|
||||
import iconsChevronRight from './icons/icon/chevron-right.svg?url'
|
||||
import iconsChevronUp from './icons/icon/chevron-up.svg?url'
|
||||
import iconsChevronsNe from './icons/icon/chevrons-ne.svg?url'
|
||||
import iconsChevronsSw from './icons/icon/chevrons-sw.svg?url'
|
||||
import iconsClipboardCopied from './icons/icon/clipboard-copied.svg?url'
|
||||
import iconsClipboardCopy from './icons/icon/clipboard-copy.svg?url'
|
||||
import iconsColor from './icons/icon/color.svg?url'
|
||||
import iconsCross2 from './icons/icon/cross-2.svg?url'
|
||||
import iconsCrossCircle from './icons/icon/cross-circle.svg?url'
|
||||
import iconsDashDashed from './icons/icon/dash-dashed.svg?url'
|
||||
import iconsDashDotted from './icons/icon/dash-dotted.svg?url'
|
||||
import iconsDashDraw from './icons/icon/dash-draw.svg?url'
|
||||
import iconsDashSolid from './icons/icon/dash-solid.svg?url'
|
||||
import iconsDisconnected from './icons/icon/disconnected.svg?url'
|
||||
import iconsDiscord from './icons/icon/discord.svg?url'
|
||||
import iconsDistributeHorizontal from './icons/icon/distribute-horizontal.svg?url'
|
||||
import iconsDistributeVertical from './icons/icon/distribute-vertical.svg?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'
|
||||
import embedIconsCodepenPngUrl from './embed-icons/codepen.png?url'
|
||||
import embedIconsCodesandboxPngUrl from './embed-icons/codesandbox.png?url'
|
||||
import embedIconsDesmosPngUrl from './embed-icons/desmos.png?url'
|
||||
import embedIconsExcalidrawPngUrl from './embed-icons/excalidraw.png?url'
|
||||
import embedIconsFeltPngUrl from './embed-icons/felt.png?url'
|
||||
import embedIconsFigmaPngUrl from './embed-icons/figma.png?url'
|
||||
import embedIconsGithubGistPngUrl from './embed-icons/github_gist.png?url'
|
||||
import embedIconsGoogleCalendarPngUrl from './embed-icons/google_calendar.png?url'
|
||||
import embedIconsGoogleMapsPngUrl from './embed-icons/google_maps.png?url'
|
||||
import embedIconsGoogleSlidesPngUrl from './embed-icons/google_slides.png?url'
|
||||
import embedIconsObservablePngUrl from './embed-icons/observable.png?url'
|
||||
import embedIconsReplitPngUrl from './embed-icons/replit.png?url'
|
||||
import embedIconsScratchPngUrl from './embed-icons/scratch.png?url'
|
||||
import embedIconsSpotifyPngUrl from './embed-icons/spotify.png?url'
|
||||
import embedIconsTldrawPngUrl from './embed-icons/tldraw.png?url'
|
||||
import embedIconsValTownPngUrl from './embed-icons/val_town.png?url'
|
||||
import embedIconsVimeoPngUrl from './embed-icons/vimeo.png?url'
|
||||
import embedIconsYoutubePngUrl from './embed-icons/youtube.png?url'
|
||||
import fontsIBMPlexMonoMediumWoff2Url from './fonts/IBMPlexMono-Medium.woff2?url'
|
||||
import fontsIBMPlexSansMediumWoff2Url from './fonts/IBMPlexSans-Medium.woff2?url'
|
||||
import fontsIBMPlexSerifMediumWoff2Url from './fonts/IBMPlexSerif-Medium.woff2?url'
|
||||
import fontsShantellSansTldrawishWoff2Url from './fonts/Shantell_Sans-Tldrawish.woff2?url'
|
||||
import iconsIcon0MergedSvgUrl from './icons/icon/0_merged.svg?url'
|
||||
import translationsArJsonUrl from './translations/ar.json?url'
|
||||
import translationsCaJsonUrl from './translations/ca.json?url'
|
||||
import translationsCsJsonUrl from './translations/cs.json?url'
|
||||
import translationsDaJsonUrl from './translations/da.json?url'
|
||||
import translationsDeJsonUrl from './translations/de.json?url'
|
||||
import translationsEnJsonUrl from './translations/en.json?url'
|
||||
import translationsEsJsonUrl from './translations/es.json?url'
|
||||
import translationsFaJsonUrl from './translations/fa.json?url'
|
||||
import translationsFiJsonUrl from './translations/fi.json?url'
|
||||
import translationsFrJsonUrl from './translations/fr.json?url'
|
||||
import translationsGlJsonUrl from './translations/gl.json?url'
|
||||
import translationsHeJsonUrl from './translations/he.json?url'
|
||||
import translationsHiInJsonUrl from './translations/hi-in.json?url'
|
||||
import translationsHrJsonUrl from './translations/hr.json?url'
|
||||
import translationsHuJsonUrl from './translations/hu.json?url'
|
||||
import translationsIdJsonUrl from './translations/id.json?url'
|
||||
import translationsItJsonUrl from './translations/it.json?url'
|
||||
import translationsJaJsonUrl from './translations/ja.json?url'
|
||||
import translationsKoKrJsonUrl from './translations/ko-kr.json?url'
|
||||
import translationsKuJsonUrl from './translations/ku.json?url'
|
||||
import translationsLanguagesJsonUrl from './translations/languages.json?url'
|
||||
import translationsMainJsonUrl from './translations/main.json?url'
|
||||
import translationsMyJsonUrl from './translations/my.json?url'
|
||||
import translationsNeJsonUrl from './translations/ne.json?url'
|
||||
import translationsNoJsonUrl from './translations/no.json?url'
|
||||
import translationsPlJsonUrl from './translations/pl.json?url'
|
||||
import translationsPtBrJsonUrl from './translations/pt-br.json?url'
|
||||
import translationsPtPtJsonUrl from './translations/pt-pt.json?url'
|
||||
import translationsRoJsonUrl from './translations/ro.json?url'
|
||||
import translationsRuJsonUrl from './translations/ru.json?url'
|
||||
import translationsSlJsonUrl from './translations/sl.json?url'
|
||||
import translationsSvJsonUrl from './translations/sv.json?url'
|
||||
import translationsTeJsonUrl from './translations/te.json?url'
|
||||
import translationsThJsonUrl from './translations/th.json?url'
|
||||
import translationsTrJsonUrl from './translations/tr.json?url'
|
||||
import translationsUkJsonUrl from './translations/uk.json?url'
|
||||
import translationsViJsonUrl from './translations/vi.json?url'
|
||||
import translationsZhCnJsonUrl from './translations/zh-cn.json?url'
|
||||
import translationsZhTwJsonUrl from './translations/zh-tw.json?url'
|
||||
|
||||
/**
|
||||
* @param {AssetUrlOptions} [opts]
|
||||
* @public
|
||||
*/
|
||||
export function getAssetUrlsByImport(opts) {
|
||||
const iconsIcon0MergedSvg2 = formatAssetUrl(iconsIcon0MergedSvgUrl, opts)
|
||||
return {
|
||||
fonts: {
|
||||
monospace: formatAssetUrl(fontsMonospace, opts),
|
||||
sansSerif: formatAssetUrl(fontsSansSerif, opts),
|
||||
serif: formatAssetUrl(fontsSerif, opts),
|
||||
draw: formatAssetUrl(fontsDraw, opts),
|
||||
monospace: formatAssetUrl(fontsIBMPlexMonoMediumWoff2Url, opts),
|
||||
sansSerif: formatAssetUrl(fontsIBMPlexSansMediumWoff2Url, opts),
|
||||
serif: formatAssetUrl(fontsIBMPlexSerifMediumWoff2Url, opts),
|
||||
draw: formatAssetUrl(fontsShantellSansTldrawishWoff2Url, opts),
|
||||
},
|
||||
icons: {
|
||||
'align-bottom': formatAssetUrl(iconsAlignBottom, opts),
|
||||
'align-center-horizontal': formatAssetUrl(iconsAlignCenterHorizontal, opts),
|
||||
'align-center-vertical': formatAssetUrl(iconsAlignCenterVertical, opts),
|
||||
'align-left': formatAssetUrl(iconsAlignLeft, opts),
|
||||
'align-right': formatAssetUrl(iconsAlignRight, opts),
|
||||
'align-top': formatAssetUrl(iconsAlignTop, opts),
|
||||
'arrow-left': formatAssetUrl(iconsArrowLeft, opts),
|
||||
'arrowhead-arrow': formatAssetUrl(iconsArrowheadArrow, opts),
|
||||
'arrowhead-bar': formatAssetUrl(iconsArrowheadBar, opts),
|
||||
'arrowhead-diamond': formatAssetUrl(iconsArrowheadDiamond, opts),
|
||||
'arrowhead-dot': formatAssetUrl(iconsArrowheadDot, opts),
|
||||
'arrowhead-none': formatAssetUrl(iconsArrowheadNone, opts),
|
||||
'arrowhead-square': formatAssetUrl(iconsArrowheadSquare, opts),
|
||||
'arrowhead-triangle-inverted': formatAssetUrl(iconsArrowheadTriangleInverted, opts),
|
||||
'arrowhead-triangle': formatAssetUrl(iconsArrowheadTriangle, opts),
|
||||
blob: formatAssetUrl(iconsBlob, opts),
|
||||
'bring-forward': formatAssetUrl(iconsBringForward, opts),
|
||||
'bring-to-front': formatAssetUrl(iconsBringToFront, opts),
|
||||
broken: formatAssetUrl(iconsBroken, opts),
|
||||
'check-circle': formatAssetUrl(iconsCheckCircle, opts),
|
||||
check: formatAssetUrl(iconsCheck, opts),
|
||||
'chevron-down': formatAssetUrl(iconsChevronDown, opts),
|
||||
'chevron-left': formatAssetUrl(iconsChevronLeft, opts),
|
||||
'chevron-right': formatAssetUrl(iconsChevronRight, opts),
|
||||
'chevron-up': formatAssetUrl(iconsChevronUp, opts),
|
||||
'chevrons-ne': formatAssetUrl(iconsChevronsNe, opts),
|
||||
'chevrons-sw': formatAssetUrl(iconsChevronsSw, opts),
|
||||
'clipboard-copied': formatAssetUrl(iconsClipboardCopied, opts),
|
||||
'clipboard-copy': formatAssetUrl(iconsClipboardCopy, opts),
|
||||
color: formatAssetUrl(iconsColor, opts),
|
||||
'cross-2': formatAssetUrl(iconsCross2, opts),
|
||||
'cross-circle': formatAssetUrl(iconsCrossCircle, opts),
|
||||
'dash-dashed': formatAssetUrl(iconsDashDashed, opts),
|
||||
'dash-dotted': formatAssetUrl(iconsDashDotted, opts),
|
||||
'dash-draw': formatAssetUrl(iconsDashDraw, opts),
|
||||
'dash-solid': formatAssetUrl(iconsDashSolid, opts),
|
||||
disconnected: formatAssetUrl(iconsDisconnected, opts),
|
||||
discord: formatAssetUrl(iconsDiscord, opts),
|
||||
'distribute-horizontal': formatAssetUrl(iconsDistributeHorizontal, opts),
|
||||
'distribute-vertical': formatAssetUrl(iconsDistributeVertical, opts),
|
||||
dot: formatAssetUrl(iconsDot, opts),
|
||||
'dots-horizontal': formatAssetUrl(iconsDotsHorizontal, opts),
|
||||
'dots-vertical': formatAssetUrl(iconsDotsVertical, opts),
|
||||
'drag-handle-dots': formatAssetUrl(iconsDragHandleDots, opts),
|
||||
duplicate: formatAssetUrl(iconsDuplicate, opts),
|
||||
edit: formatAssetUrl(iconsEdit, opts),
|
||||
'external-link': formatAssetUrl(iconsExternalLink, opts),
|
||||
'fill-fill': formatAssetUrl(iconsFillFill, opts),
|
||||
'fill-none': formatAssetUrl(iconsFillNone, opts),
|
||||
'fill-pattern': formatAssetUrl(iconsFillPattern, opts),
|
||||
'fill-semi': formatAssetUrl(iconsFillSemi, opts),
|
||||
'fill-solid': formatAssetUrl(iconsFillSolid, opts),
|
||||
follow: formatAssetUrl(iconsFollow, opts),
|
||||
following: formatAssetUrl(iconsFollowing, opts),
|
||||
'font-draw': formatAssetUrl(iconsFontDraw, opts),
|
||||
'font-mono': formatAssetUrl(iconsFontMono, opts),
|
||||
'font-sans': formatAssetUrl(iconsFontSans, opts),
|
||||
'font-serif': formatAssetUrl(iconsFontSerif, opts),
|
||||
'geo-arrow-down': formatAssetUrl(iconsGeoArrowDown, opts),
|
||||
'geo-arrow-left': formatAssetUrl(iconsGeoArrowLeft, opts),
|
||||
'geo-arrow-right': formatAssetUrl(iconsGeoArrowRight, opts),
|
||||
'geo-arrow-up': formatAssetUrl(iconsGeoArrowUp, opts),
|
||||
'geo-check-box': formatAssetUrl(iconsGeoCheckBox, opts),
|
||||
'geo-cloud': formatAssetUrl(iconsGeoCloud, opts),
|
||||
'geo-diamond': formatAssetUrl(iconsGeoDiamond, opts),
|
||||
'geo-ellipse': formatAssetUrl(iconsGeoEllipse, opts),
|
||||
'geo-heart': formatAssetUrl(iconsGeoHeart, opts),
|
||||
'geo-hexagon': formatAssetUrl(iconsGeoHexagon, opts),
|
||||
'geo-octagon': formatAssetUrl(iconsGeoOctagon, opts),
|
||||
'geo-oval': formatAssetUrl(iconsGeoOval, opts),
|
||||
'geo-pentagon': formatAssetUrl(iconsGeoPentagon, opts),
|
||||
'geo-rectangle': formatAssetUrl(iconsGeoRectangle, opts),
|
||||
'geo-rhombus-2': formatAssetUrl(iconsGeoRhombus2, opts),
|
||||
'geo-rhombus': formatAssetUrl(iconsGeoRhombus, opts),
|
||||
'geo-star': formatAssetUrl(iconsGeoStar, opts),
|
||||
'geo-trapezoid': formatAssetUrl(iconsGeoTrapezoid, opts),
|
||||
'geo-triangle': formatAssetUrl(iconsGeoTriangle, opts),
|
||||
'geo-x-box': formatAssetUrl(iconsGeoXBox, opts),
|
||||
github: formatAssetUrl(iconsGithub, opts),
|
||||
group: formatAssetUrl(iconsGroup, opts),
|
||||
'horizontal-align-end': formatAssetUrl(iconsHorizontalAlignEnd, opts),
|
||||
'horizontal-align-middle': formatAssetUrl(iconsHorizontalAlignMiddle, opts),
|
||||
'horizontal-align-start': formatAssetUrl(iconsHorizontalAlignStart, opts),
|
||||
'info-circle': formatAssetUrl(iconsInfoCircle, opts),
|
||||
leading: formatAssetUrl(iconsLeading, opts),
|
||||
link: formatAssetUrl(iconsLink, opts),
|
||||
lock: formatAssetUrl(iconsLock, opts),
|
||||
menu: formatAssetUrl(iconsMenu, opts),
|
||||
minus: formatAssetUrl(iconsMinus, opts),
|
||||
mixed: formatAssetUrl(iconsMixed, opts),
|
||||
pack: formatAssetUrl(iconsPack, opts),
|
||||
plus: formatAssetUrl(iconsPlus, opts),
|
||||
'question-mark-circle': formatAssetUrl(iconsQuestionMarkCircle, opts),
|
||||
'question-mark': formatAssetUrl(iconsQuestionMark, opts),
|
||||
redo: formatAssetUrl(iconsRedo, opts),
|
||||
'reset-zoom': formatAssetUrl(iconsResetZoom, opts),
|
||||
'rotate-ccw': formatAssetUrl(iconsRotateCcw, opts),
|
||||
'rotate-cw': formatAssetUrl(iconsRotateCw, opts),
|
||||
'send-backward': formatAssetUrl(iconsSendBackward, opts),
|
||||
'send-to-back': formatAssetUrl(iconsSendToBack, opts),
|
||||
'share-1': formatAssetUrl(iconsShare1, opts),
|
||||
'size-extra-large': formatAssetUrl(iconsSizeExtraLarge, opts),
|
||||
'size-large': formatAssetUrl(iconsSizeLarge, opts),
|
||||
'size-medium': formatAssetUrl(iconsSizeMedium, opts),
|
||||
'size-small': formatAssetUrl(iconsSizeSmall, opts),
|
||||
'spline-cubic': formatAssetUrl(iconsSplineCubic, opts),
|
||||
'spline-line': formatAssetUrl(iconsSplineLine, opts),
|
||||
'stack-horizontal': formatAssetUrl(iconsStackHorizontal, opts),
|
||||
'stack-vertical': formatAssetUrl(iconsStackVertical, opts),
|
||||
'status-offline': formatAssetUrl(iconsStatusOffline, opts),
|
||||
'stretch-horizontal': formatAssetUrl(iconsStretchHorizontal, opts),
|
||||
'stretch-vertical': formatAssetUrl(iconsStretchVertical, opts),
|
||||
'text-align-center': formatAssetUrl(iconsTextAlignCenter, opts),
|
||||
'text-align-left': formatAssetUrl(iconsTextAlignLeft, opts),
|
||||
'text-align-right': formatAssetUrl(iconsTextAlignRight, opts),
|
||||
'toggle-off': formatAssetUrl(iconsToggleOff, opts),
|
||||
'toggle-on': formatAssetUrl(iconsToggleOn, opts),
|
||||
'tool-arrow': formatAssetUrl(iconsToolArrow, opts),
|
||||
'tool-eraser': formatAssetUrl(iconsToolEraser, opts),
|
||||
'tool-frame': formatAssetUrl(iconsToolFrame, opts),
|
||||
'tool-hand': formatAssetUrl(iconsToolHand, opts),
|
||||
'tool-highlight': formatAssetUrl(iconsToolHighlight, opts),
|
||||
'tool-laser': formatAssetUrl(iconsToolLaser, opts),
|
||||
'tool-line': formatAssetUrl(iconsToolLine, opts),
|
||||
'tool-media': formatAssetUrl(iconsToolMedia, opts),
|
||||
'tool-note': formatAssetUrl(iconsToolNote, opts),
|
||||
'tool-pencil': formatAssetUrl(iconsToolPencil, opts),
|
||||
'tool-pointer': formatAssetUrl(iconsToolPointer, opts),
|
||||
'tool-screenshot': formatAssetUrl(iconsToolScreenshot, opts),
|
||||
'tool-text': formatAssetUrl(iconsToolText, opts),
|
||||
trash: formatAssetUrl(iconsTrash, opts),
|
||||
twitter: formatAssetUrl(iconsTwitter, opts),
|
||||
undo: formatAssetUrl(iconsUndo, opts),
|
||||
ungroup: formatAssetUrl(iconsUngroup, opts),
|
||||
unlock: formatAssetUrl(iconsUnlock, opts),
|
||||
'vertical-align-end': formatAssetUrl(iconsVerticalAlignEnd, opts),
|
||||
'vertical-align-middle': formatAssetUrl(iconsVerticalAlignMiddle, opts),
|
||||
'vertical-align-start': formatAssetUrl(iconsVerticalAlignStart, opts),
|
||||
'warning-triangle': formatAssetUrl(iconsWarningTriangle, opts),
|
||||
'zoom-in': formatAssetUrl(iconsZoomIn, opts),
|
||||
'zoom-out': formatAssetUrl(iconsZoomOut, opts),
|
||||
'align-bottom': iconsIcon0MergedSvg2 + '#align-bottom',
|
||||
'align-center-horizontal': iconsIcon0MergedSvg2 + '#align-center-horizontal',
|
||||
'align-center-vertical': iconsIcon0MergedSvg2 + '#align-center-vertical',
|
||||
'align-left': iconsIcon0MergedSvg2 + '#align-left',
|
||||
'align-right': iconsIcon0MergedSvg2 + '#align-right',
|
||||
'align-top': iconsIcon0MergedSvg2 + '#align-top',
|
||||
'arrow-left': iconsIcon0MergedSvg2 + '#arrow-left',
|
||||
'arrowhead-arrow': iconsIcon0MergedSvg2 + '#arrowhead-arrow',
|
||||
'arrowhead-bar': iconsIcon0MergedSvg2 + '#arrowhead-bar',
|
||||
'arrowhead-diamond': iconsIcon0MergedSvg2 + '#arrowhead-diamond',
|
||||
'arrowhead-dot': iconsIcon0MergedSvg2 + '#arrowhead-dot',
|
||||
'arrowhead-none': iconsIcon0MergedSvg2 + '#arrowhead-none',
|
||||
'arrowhead-square': iconsIcon0MergedSvg2 + '#arrowhead-square',
|
||||
'arrowhead-triangle-inverted': iconsIcon0MergedSvg2 + '#arrowhead-triangle-inverted',
|
||||
'arrowhead-triangle': iconsIcon0MergedSvg2 + '#arrowhead-triangle',
|
||||
blob: iconsIcon0MergedSvg2 + '#blob',
|
||||
'bring-forward': iconsIcon0MergedSvg2 + '#bring-forward',
|
||||
'bring-to-front': iconsIcon0MergedSvg2 + '#bring-to-front',
|
||||
broken: iconsIcon0MergedSvg2 + '#broken',
|
||||
'check-circle': iconsIcon0MergedSvg2 + '#check-circle',
|
||||
check: iconsIcon0MergedSvg2 + '#check',
|
||||
'chevron-down': iconsIcon0MergedSvg2 + '#chevron-down',
|
||||
'chevron-left': iconsIcon0MergedSvg2 + '#chevron-left',
|
||||
'chevron-right': iconsIcon0MergedSvg2 + '#chevron-right',
|
||||
'chevron-up': iconsIcon0MergedSvg2 + '#chevron-up',
|
||||
'chevrons-ne': iconsIcon0MergedSvg2 + '#chevrons-ne',
|
||||
'chevrons-sw': iconsIcon0MergedSvg2 + '#chevrons-sw',
|
||||
'clipboard-copied': iconsIcon0MergedSvg2 + '#clipboard-copied',
|
||||
'clipboard-copy': iconsIcon0MergedSvg2 + '#clipboard-copy',
|
||||
color: iconsIcon0MergedSvg2 + '#color',
|
||||
'cross-2': iconsIcon0MergedSvg2 + '#cross-2',
|
||||
'cross-circle': iconsIcon0MergedSvg2 + '#cross-circle',
|
||||
'dash-dashed': iconsIcon0MergedSvg2 + '#dash-dashed',
|
||||
'dash-dotted': iconsIcon0MergedSvg2 + '#dash-dotted',
|
||||
'dash-draw': iconsIcon0MergedSvg2 + '#dash-draw',
|
||||
'dash-solid': iconsIcon0MergedSvg2 + '#dash-solid',
|
||||
disconnected: iconsIcon0MergedSvg2 + '#disconnected',
|
||||
discord: iconsIcon0MergedSvg2 + '#discord',
|
||||
'distribute-horizontal': iconsIcon0MergedSvg2 + '#distribute-horizontal',
|
||||
'distribute-vertical': iconsIcon0MergedSvg2 + '#distribute-vertical',
|
||||
dot: iconsIcon0MergedSvg2 + '#dot',
|
||||
'dots-horizontal': iconsIcon0MergedSvg2 + '#dots-horizontal',
|
||||
'dots-vertical': iconsIcon0MergedSvg2 + '#dots-vertical',
|
||||
'drag-handle-dots': iconsIcon0MergedSvg2 + '#drag-handle-dots',
|
||||
duplicate: iconsIcon0MergedSvg2 + '#duplicate',
|
||||
edit: iconsIcon0MergedSvg2 + '#edit',
|
||||
'external-link': iconsIcon0MergedSvg2 + '#external-link',
|
||||
'fill-fill': iconsIcon0MergedSvg2 + '#fill-fill',
|
||||
'fill-none': iconsIcon0MergedSvg2 + '#fill-none',
|
||||
'fill-pattern': iconsIcon0MergedSvg2 + '#fill-pattern',
|
||||
'fill-semi': iconsIcon0MergedSvg2 + '#fill-semi',
|
||||
'fill-solid': iconsIcon0MergedSvg2 + '#fill-solid',
|
||||
follow: iconsIcon0MergedSvg2 + '#follow',
|
||||
following: iconsIcon0MergedSvg2 + '#following',
|
||||
'font-draw': iconsIcon0MergedSvg2 + '#font-draw',
|
||||
'font-mono': iconsIcon0MergedSvg2 + '#font-mono',
|
||||
'font-sans': iconsIcon0MergedSvg2 + '#font-sans',
|
||||
'font-serif': iconsIcon0MergedSvg2 + '#font-serif',
|
||||
'geo-arrow-down': iconsIcon0MergedSvg2 + '#geo-arrow-down',
|
||||
'geo-arrow-left': iconsIcon0MergedSvg2 + '#geo-arrow-left',
|
||||
'geo-arrow-right': iconsIcon0MergedSvg2 + '#geo-arrow-right',
|
||||
'geo-arrow-up': iconsIcon0MergedSvg2 + '#geo-arrow-up',
|
||||
'geo-check-box': iconsIcon0MergedSvg2 + '#geo-check-box',
|
||||
'geo-cloud': iconsIcon0MergedSvg2 + '#geo-cloud',
|
||||
'geo-diamond': iconsIcon0MergedSvg2 + '#geo-diamond',
|
||||
'geo-ellipse': iconsIcon0MergedSvg2 + '#geo-ellipse',
|
||||
'geo-heart': iconsIcon0MergedSvg2 + '#geo-heart',
|
||||
'geo-hexagon': iconsIcon0MergedSvg2 + '#geo-hexagon',
|
||||
'geo-octagon': iconsIcon0MergedSvg2 + '#geo-octagon',
|
||||
'geo-oval': iconsIcon0MergedSvg2 + '#geo-oval',
|
||||
'geo-pentagon': iconsIcon0MergedSvg2 + '#geo-pentagon',
|
||||
'geo-rectangle': iconsIcon0MergedSvg2 + '#geo-rectangle',
|
||||
'geo-rhombus-2': iconsIcon0MergedSvg2 + '#geo-rhombus-2',
|
||||
'geo-rhombus': iconsIcon0MergedSvg2 + '#geo-rhombus',
|
||||
'geo-star': iconsIcon0MergedSvg2 + '#geo-star',
|
||||
'geo-trapezoid': iconsIcon0MergedSvg2 + '#geo-trapezoid',
|
||||
'geo-triangle': iconsIcon0MergedSvg2 + '#geo-triangle',
|
||||
'geo-x-box': iconsIcon0MergedSvg2 + '#geo-x-box',
|
||||
github: iconsIcon0MergedSvg2 + '#github',
|
||||
group: iconsIcon0MergedSvg2 + '#group',
|
||||
'horizontal-align-end': iconsIcon0MergedSvg2 + '#horizontal-align-end',
|
||||
'horizontal-align-middle': iconsIcon0MergedSvg2 + '#horizontal-align-middle',
|
||||
'horizontal-align-start': iconsIcon0MergedSvg2 + '#horizontal-align-start',
|
||||
'info-circle': iconsIcon0MergedSvg2 + '#info-circle',
|
||||
leading: iconsIcon0MergedSvg2 + '#leading',
|
||||
link: iconsIcon0MergedSvg2 + '#link',
|
||||
lock: iconsIcon0MergedSvg2 + '#lock',
|
||||
menu: iconsIcon0MergedSvg2 + '#menu',
|
||||
minus: iconsIcon0MergedSvg2 + '#minus',
|
||||
mixed: iconsIcon0MergedSvg2 + '#mixed',
|
||||
pack: iconsIcon0MergedSvg2 + '#pack',
|
||||
plus: iconsIcon0MergedSvg2 + '#plus',
|
||||
'question-mark-circle': iconsIcon0MergedSvg2 + '#question-mark-circle',
|
||||
'question-mark': iconsIcon0MergedSvg2 + '#question-mark',
|
||||
redo: iconsIcon0MergedSvg2 + '#redo',
|
||||
'reset-zoom': iconsIcon0MergedSvg2 + '#reset-zoom',
|
||||
'rotate-ccw': iconsIcon0MergedSvg2 + '#rotate-ccw',
|
||||
'rotate-cw': iconsIcon0MergedSvg2 + '#rotate-cw',
|
||||
'send-backward': iconsIcon0MergedSvg2 + '#send-backward',
|
||||
'send-to-back': iconsIcon0MergedSvg2 + '#send-to-back',
|
||||
'share-1': iconsIcon0MergedSvg2 + '#share-1',
|
||||
'size-extra-large': iconsIcon0MergedSvg2 + '#size-extra-large',
|
||||
'size-large': iconsIcon0MergedSvg2 + '#size-large',
|
||||
'size-medium': iconsIcon0MergedSvg2 + '#size-medium',
|
||||
'size-small': iconsIcon0MergedSvg2 + '#size-small',
|
||||
'spline-cubic': iconsIcon0MergedSvg2 + '#spline-cubic',
|
||||
'spline-line': iconsIcon0MergedSvg2 + '#spline-line',
|
||||
'stack-horizontal': iconsIcon0MergedSvg2 + '#stack-horizontal',
|
||||
'stack-vertical': iconsIcon0MergedSvg2 + '#stack-vertical',
|
||||
'status-offline': iconsIcon0MergedSvg2 + '#status-offline',
|
||||
'stretch-horizontal': iconsIcon0MergedSvg2 + '#stretch-horizontal',
|
||||
'stretch-vertical': iconsIcon0MergedSvg2 + '#stretch-vertical',
|
||||
'text-align-center': iconsIcon0MergedSvg2 + '#text-align-center',
|
||||
'text-align-left': iconsIcon0MergedSvg2 + '#text-align-left',
|
||||
'text-align-right': iconsIcon0MergedSvg2 + '#text-align-right',
|
||||
'toggle-off': iconsIcon0MergedSvg2 + '#toggle-off',
|
||||
'toggle-on': iconsIcon0MergedSvg2 + '#toggle-on',
|
||||
'tool-arrow': iconsIcon0MergedSvg2 + '#tool-arrow',
|
||||
'tool-eraser': iconsIcon0MergedSvg2 + '#tool-eraser',
|
||||
'tool-frame': iconsIcon0MergedSvg2 + '#tool-frame',
|
||||
'tool-hand': iconsIcon0MergedSvg2 + '#tool-hand',
|
||||
'tool-highlight': iconsIcon0MergedSvg2 + '#tool-highlight',
|
||||
'tool-laser': iconsIcon0MergedSvg2 + '#tool-laser',
|
||||
'tool-line': iconsIcon0MergedSvg2 + '#tool-line',
|
||||
'tool-media': iconsIcon0MergedSvg2 + '#tool-media',
|
||||
'tool-note': iconsIcon0MergedSvg2 + '#tool-note',
|
||||
'tool-pencil': iconsIcon0MergedSvg2 + '#tool-pencil',
|
||||
'tool-pointer': iconsIcon0MergedSvg2 + '#tool-pointer',
|
||||
'tool-screenshot': iconsIcon0MergedSvg2 + '#tool-screenshot',
|
||||
'tool-text': iconsIcon0MergedSvg2 + '#tool-text',
|
||||
trash: iconsIcon0MergedSvg2 + '#trash',
|
||||
twitter: iconsIcon0MergedSvg2 + '#twitter',
|
||||
undo: iconsIcon0MergedSvg2 + '#undo',
|
||||
ungroup: iconsIcon0MergedSvg2 + '#ungroup',
|
||||
unlock: iconsIcon0MergedSvg2 + '#unlock',
|
||||
'vertical-align-end': iconsIcon0MergedSvg2 + '#vertical-align-end',
|
||||
'vertical-align-middle': iconsIcon0MergedSvg2 + '#vertical-align-middle',
|
||||
'vertical-align-start': iconsIcon0MergedSvg2 + '#vertical-align-start',
|
||||
'warning-triangle': iconsIcon0MergedSvg2 + '#warning-triangle',
|
||||
'zoom-in': iconsIcon0MergedSvg2 + '#zoom-in',
|
||||
'zoom-out': iconsIcon0MergedSvg2 + '#zoom-out',
|
||||
},
|
||||
translations: {
|
||||
ar: formatAssetUrl(translationsAr, opts),
|
||||
ca: formatAssetUrl(translationsCa, opts),
|
||||
cs: formatAssetUrl(translationsCs, opts),
|
||||
da: formatAssetUrl(translationsDa, opts),
|
||||
de: formatAssetUrl(translationsDe, opts),
|
||||
en: formatAssetUrl(translationsEn, opts),
|
||||
es: formatAssetUrl(translationsEs, opts),
|
||||
fa: formatAssetUrl(translationsFa, opts),
|
||||
fi: formatAssetUrl(translationsFi, opts),
|
||||
fr: formatAssetUrl(translationsFr, opts),
|
||||
gl: formatAssetUrl(translationsGl, opts),
|
||||
he: formatAssetUrl(translationsHe, opts),
|
||||
'hi-in': formatAssetUrl(translationsHiIn, opts),
|
||||
hr: formatAssetUrl(translationsHr, opts),
|
||||
hu: formatAssetUrl(translationsHu, opts),
|
||||
id: formatAssetUrl(translationsId, opts),
|
||||
it: formatAssetUrl(translationsIt, opts),
|
||||
ja: formatAssetUrl(translationsJa, opts),
|
||||
'ko-kr': formatAssetUrl(translationsKoKr, opts),
|
||||
ku: formatAssetUrl(translationsKu, opts),
|
||||
languages: formatAssetUrl(translationsLanguages, opts),
|
||||
main: formatAssetUrl(translationsMain, opts),
|
||||
my: formatAssetUrl(translationsMy, opts),
|
||||
ne: formatAssetUrl(translationsNe, opts),
|
||||
no: formatAssetUrl(translationsNo, opts),
|
||||
pl: formatAssetUrl(translationsPl, opts),
|
||||
'pt-br': formatAssetUrl(translationsPtBr, opts),
|
||||
'pt-pt': formatAssetUrl(translationsPtPt, opts),
|
||||
ro: formatAssetUrl(translationsRo, opts),
|
||||
ru: formatAssetUrl(translationsRu, opts),
|
||||
sl: formatAssetUrl(translationsSl, opts),
|
||||
sv: formatAssetUrl(translationsSv, opts),
|
||||
te: formatAssetUrl(translationsTe, opts),
|
||||
th: formatAssetUrl(translationsTh, opts),
|
||||
tr: formatAssetUrl(translationsTr, opts),
|
||||
uk: formatAssetUrl(translationsUk, opts),
|
||||
vi: formatAssetUrl(translationsVi, opts),
|
||||
'zh-cn': formatAssetUrl(translationsZhCn, opts),
|
||||
'zh-tw': formatAssetUrl(translationsZhTw, opts),
|
||||
ar: formatAssetUrl(translationsArJsonUrl, opts),
|
||||
ca: formatAssetUrl(translationsCaJsonUrl, opts),
|
||||
cs: formatAssetUrl(translationsCsJsonUrl, opts),
|
||||
da: formatAssetUrl(translationsDaJsonUrl, opts),
|
||||
de: formatAssetUrl(translationsDeJsonUrl, opts),
|
||||
en: formatAssetUrl(translationsEnJsonUrl, opts),
|
||||
es: formatAssetUrl(translationsEsJsonUrl, opts),
|
||||
fa: formatAssetUrl(translationsFaJsonUrl, opts),
|
||||
fi: formatAssetUrl(translationsFiJsonUrl, opts),
|
||||
fr: formatAssetUrl(translationsFrJsonUrl, opts),
|
||||
gl: formatAssetUrl(translationsGlJsonUrl, opts),
|
||||
he: formatAssetUrl(translationsHeJsonUrl, opts),
|
||||
'hi-in': formatAssetUrl(translationsHiInJsonUrl, opts),
|
||||
hr: formatAssetUrl(translationsHrJsonUrl, opts),
|
||||
hu: formatAssetUrl(translationsHuJsonUrl, opts),
|
||||
id: formatAssetUrl(translationsIdJsonUrl, opts),
|
||||
it: formatAssetUrl(translationsItJsonUrl, opts),
|
||||
ja: formatAssetUrl(translationsJaJsonUrl, opts),
|
||||
'ko-kr': formatAssetUrl(translationsKoKrJsonUrl, opts),
|
||||
ku: formatAssetUrl(translationsKuJsonUrl, opts),
|
||||
languages: formatAssetUrl(translationsLanguagesJsonUrl, opts),
|
||||
main: formatAssetUrl(translationsMainJsonUrl, opts),
|
||||
my: formatAssetUrl(translationsMyJsonUrl, opts),
|
||||
ne: formatAssetUrl(translationsNeJsonUrl, opts),
|
||||
no: formatAssetUrl(translationsNoJsonUrl, opts),
|
||||
pl: formatAssetUrl(translationsPlJsonUrl, opts),
|
||||
'pt-br': formatAssetUrl(translationsPtBrJsonUrl, opts),
|
||||
'pt-pt': formatAssetUrl(translationsPtPtJsonUrl, opts),
|
||||
ro: formatAssetUrl(translationsRoJsonUrl, opts),
|
||||
ru: formatAssetUrl(translationsRuJsonUrl, opts),
|
||||
sl: formatAssetUrl(translationsSlJsonUrl, opts),
|
||||
sv: formatAssetUrl(translationsSvJsonUrl, opts),
|
||||
te: formatAssetUrl(translationsTeJsonUrl, opts),
|
||||
th: formatAssetUrl(translationsThJsonUrl, opts),
|
||||
tr: formatAssetUrl(translationsTrJsonUrl, opts),
|
||||
uk: formatAssetUrl(translationsUkJsonUrl, opts),
|
||||
vi: formatAssetUrl(translationsViJsonUrl, opts),
|
||||
'zh-cn': formatAssetUrl(translationsZhCnJsonUrl, opts),
|
||||
'zh-tw': formatAssetUrl(translationsZhTwJsonUrl, opts),
|
||||
},
|
||||
embedIcons: {
|
||||
codepen: formatAssetUrl(embedIconsCodepen, opts),
|
||||
codesandbox: formatAssetUrl(embedIconsCodesandbox, opts),
|
||||
desmos: formatAssetUrl(embedIconsDesmos, opts),
|
||||
excalidraw: formatAssetUrl(embedIconsExcalidraw, opts),
|
||||
felt: formatAssetUrl(embedIconsFelt, opts),
|
||||
figma: formatAssetUrl(embedIconsFigma, opts),
|
||||
github_gist: formatAssetUrl(embedIconsGithubGist, opts),
|
||||
google_calendar: formatAssetUrl(embedIconsGoogleCalendar, opts),
|
||||
google_maps: formatAssetUrl(embedIconsGoogleMaps, opts),
|
||||
google_slides: formatAssetUrl(embedIconsGoogleSlides, opts),
|
||||
observable: formatAssetUrl(embedIconsObservable, opts),
|
||||
replit: formatAssetUrl(embedIconsReplit, opts),
|
||||
scratch: formatAssetUrl(embedIconsScratch, opts),
|
||||
spotify: formatAssetUrl(embedIconsSpotify, opts),
|
||||
tldraw: formatAssetUrl(embedIconsTldraw, opts),
|
||||
val_town: formatAssetUrl(embedIconsValTown, opts),
|
||||
vimeo: formatAssetUrl(embedIconsVimeo, opts),
|
||||
youtube: formatAssetUrl(embedIconsYoutube, opts),
|
||||
codepen: formatAssetUrl(embedIconsCodepenPngUrl, opts),
|
||||
codesandbox: formatAssetUrl(embedIconsCodesandboxPngUrl, opts),
|
||||
desmos: formatAssetUrl(embedIconsDesmosPngUrl, opts),
|
||||
excalidraw: formatAssetUrl(embedIconsExcalidrawPngUrl, opts),
|
||||
felt: formatAssetUrl(embedIconsFeltPngUrl, opts),
|
||||
figma: formatAssetUrl(embedIconsFigmaPngUrl, opts),
|
||||
github_gist: formatAssetUrl(embedIconsGithubGistPngUrl, opts),
|
||||
google_calendar: formatAssetUrl(embedIconsGoogleCalendarPngUrl, opts),
|
||||
google_maps: formatAssetUrl(embedIconsGoogleMapsPngUrl, opts),
|
||||
google_slides: formatAssetUrl(embedIconsGoogleSlidesPngUrl, opts),
|
||||
observable: formatAssetUrl(embedIconsObservablePngUrl, opts),
|
||||
replit: formatAssetUrl(embedIconsReplitPngUrl, opts),
|
||||
scratch: formatAssetUrl(embedIconsScratchPngUrl, opts),
|
||||
spotify: formatAssetUrl(embedIconsSpotifyPngUrl, opts),
|
||||
tldraw: formatAssetUrl(embedIconsTldrawPngUrl, opts),
|
||||
val_town: formatAssetUrl(embedIconsValTownPngUrl, opts),
|
||||
vimeo: formatAssetUrl(embedIconsVimeoPngUrl, opts),
|
||||
youtube: formatAssetUrl(embedIconsYoutubePngUrl, opts),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import { formatAssetUrl } from './utils.js'
|
|||
* @public
|
||||
*/
|
||||
export function getAssetUrls(opts) {
|
||||
const iconsIcon0MergedSvg = formatAssetUrl('./icons/icon/0_merged.svg', opts)
|
||||
return {
|
||||
fonts: {
|
||||
monospace: formatAssetUrl('./fonts/IBMPlexMono-Medium.woff2', opts),
|
||||
|
@ -18,150 +19,147 @@ export function getAssetUrls(opts) {
|
|||
draw: formatAssetUrl('./fonts/Shantell_Sans-Tldrawish.woff2', opts),
|
||||
},
|
||||
icons: {
|
||||
'align-bottom': formatAssetUrl('./icons/icon/align-bottom.svg', opts),
|
||||
'align-center-horizontal': formatAssetUrl('./icons/icon/align-center-horizontal.svg', opts),
|
||||
'align-center-vertical': formatAssetUrl('./icons/icon/align-center-vertical.svg', opts),
|
||||
'align-left': formatAssetUrl('./icons/icon/align-left.svg', opts),
|
||||
'align-right': formatAssetUrl('./icons/icon/align-right.svg', opts),
|
||||
'align-top': formatAssetUrl('./icons/icon/align-top.svg', opts),
|
||||
'arrow-left': formatAssetUrl('./icons/icon/arrow-left.svg', opts),
|
||||
'arrowhead-arrow': formatAssetUrl('./icons/icon/arrowhead-arrow.svg', opts),
|
||||
'arrowhead-bar': formatAssetUrl('./icons/icon/arrowhead-bar.svg', opts),
|
||||
'arrowhead-diamond': formatAssetUrl('./icons/icon/arrowhead-diamond.svg', opts),
|
||||
'arrowhead-dot': formatAssetUrl('./icons/icon/arrowhead-dot.svg', opts),
|
||||
'arrowhead-none': formatAssetUrl('./icons/icon/arrowhead-none.svg', opts),
|
||||
'arrowhead-square': formatAssetUrl('./icons/icon/arrowhead-square.svg', opts),
|
||||
'arrowhead-triangle-inverted': formatAssetUrl(
|
||||
'./icons/icon/arrowhead-triangle-inverted.svg',
|
||||
opts
|
||||
),
|
||||
'arrowhead-triangle': formatAssetUrl('./icons/icon/arrowhead-triangle.svg', opts),
|
||||
blob: formatAssetUrl('./icons/icon/blob.svg', opts),
|
||||
'bring-forward': formatAssetUrl('./icons/icon/bring-forward.svg', opts),
|
||||
'bring-to-front': formatAssetUrl('./icons/icon/bring-to-front.svg', opts),
|
||||
broken: formatAssetUrl('./icons/icon/broken.svg', opts),
|
||||
'check-circle': formatAssetUrl('./icons/icon/check-circle.svg', opts),
|
||||
check: formatAssetUrl('./icons/icon/check.svg', opts),
|
||||
'chevron-down': formatAssetUrl('./icons/icon/chevron-down.svg', opts),
|
||||
'chevron-left': formatAssetUrl('./icons/icon/chevron-left.svg', opts),
|
||||
'chevron-right': formatAssetUrl('./icons/icon/chevron-right.svg', opts),
|
||||
'chevron-up': formatAssetUrl('./icons/icon/chevron-up.svg', opts),
|
||||
'chevrons-ne': formatAssetUrl('./icons/icon/chevrons-ne.svg', opts),
|
||||
'chevrons-sw': formatAssetUrl('./icons/icon/chevrons-sw.svg', opts),
|
||||
'clipboard-copied': formatAssetUrl('./icons/icon/clipboard-copied.svg', opts),
|
||||
'clipboard-copy': formatAssetUrl('./icons/icon/clipboard-copy.svg', opts),
|
||||
color: formatAssetUrl('./icons/icon/color.svg', opts),
|
||||
'cross-2': formatAssetUrl('./icons/icon/cross-2.svg', opts),
|
||||
'cross-circle': formatAssetUrl('./icons/icon/cross-circle.svg', opts),
|
||||
'dash-dashed': formatAssetUrl('./icons/icon/dash-dashed.svg', opts),
|
||||
'dash-dotted': formatAssetUrl('./icons/icon/dash-dotted.svg', opts),
|
||||
'dash-draw': formatAssetUrl('./icons/icon/dash-draw.svg', opts),
|
||||
'dash-solid': formatAssetUrl('./icons/icon/dash-solid.svg', opts),
|
||||
disconnected: formatAssetUrl('./icons/icon/disconnected.svg', opts),
|
||||
discord: formatAssetUrl('./icons/icon/discord.svg', opts),
|
||||
'distribute-horizontal': formatAssetUrl('./icons/icon/distribute-horizontal.svg', opts),
|
||||
'distribute-vertical': formatAssetUrl('./icons/icon/distribute-vertical.svg', opts),
|
||||
dot: formatAssetUrl('./icons/icon/dot.svg', opts),
|
||||
'dots-horizontal': formatAssetUrl('./icons/icon/dots-horizontal.svg', opts),
|
||||
'dots-vertical': formatAssetUrl('./icons/icon/dots-vertical.svg', opts),
|
||||
'drag-handle-dots': formatAssetUrl('./icons/icon/drag-handle-dots.svg', opts),
|
||||
duplicate: formatAssetUrl('./icons/icon/duplicate.svg', opts),
|
||||
edit: formatAssetUrl('./icons/icon/edit.svg', opts),
|
||||
'external-link': formatAssetUrl('./icons/icon/external-link.svg', opts),
|
||||
'fill-fill': formatAssetUrl('./icons/icon/fill-fill.svg', opts),
|
||||
'fill-none': formatAssetUrl('./icons/icon/fill-none.svg', opts),
|
||||
'fill-pattern': formatAssetUrl('./icons/icon/fill-pattern.svg', opts),
|
||||
'fill-semi': formatAssetUrl('./icons/icon/fill-semi.svg', opts),
|
||||
'fill-solid': formatAssetUrl('./icons/icon/fill-solid.svg', opts),
|
||||
follow: formatAssetUrl('./icons/icon/follow.svg', opts),
|
||||
following: formatAssetUrl('./icons/icon/following.svg', opts),
|
||||
'font-draw': formatAssetUrl('./icons/icon/font-draw.svg', opts),
|
||||
'font-mono': formatAssetUrl('./icons/icon/font-mono.svg', opts),
|
||||
'font-sans': formatAssetUrl('./icons/icon/font-sans.svg', opts),
|
||||
'font-serif': formatAssetUrl('./icons/icon/font-serif.svg', opts),
|
||||
'geo-arrow-down': formatAssetUrl('./icons/icon/geo-arrow-down.svg', opts),
|
||||
'geo-arrow-left': formatAssetUrl('./icons/icon/geo-arrow-left.svg', opts),
|
||||
'geo-arrow-right': formatAssetUrl('./icons/icon/geo-arrow-right.svg', opts),
|
||||
'geo-arrow-up': formatAssetUrl('./icons/icon/geo-arrow-up.svg', opts),
|
||||
'geo-check-box': formatAssetUrl('./icons/icon/geo-check-box.svg', opts),
|
||||
'geo-cloud': formatAssetUrl('./icons/icon/geo-cloud.svg', opts),
|
||||
'geo-diamond': formatAssetUrl('./icons/icon/geo-diamond.svg', opts),
|
||||
'geo-ellipse': formatAssetUrl('./icons/icon/geo-ellipse.svg', opts),
|
||||
'geo-heart': formatAssetUrl('./icons/icon/geo-heart.svg', opts),
|
||||
'geo-hexagon': formatAssetUrl('./icons/icon/geo-hexagon.svg', opts),
|
||||
'geo-octagon': formatAssetUrl('./icons/icon/geo-octagon.svg', opts),
|
||||
'geo-oval': formatAssetUrl('./icons/icon/geo-oval.svg', opts),
|
||||
'geo-pentagon': formatAssetUrl('./icons/icon/geo-pentagon.svg', opts),
|
||||
'geo-rectangle': formatAssetUrl('./icons/icon/geo-rectangle.svg', opts),
|
||||
'geo-rhombus-2': formatAssetUrl('./icons/icon/geo-rhombus-2.svg', opts),
|
||||
'geo-rhombus': formatAssetUrl('./icons/icon/geo-rhombus.svg', opts),
|
||||
'geo-star': formatAssetUrl('./icons/icon/geo-star.svg', opts),
|
||||
'geo-trapezoid': formatAssetUrl('./icons/icon/geo-trapezoid.svg', opts),
|
||||
'geo-triangle': formatAssetUrl('./icons/icon/geo-triangle.svg', opts),
|
||||
'geo-x-box': formatAssetUrl('./icons/icon/geo-x-box.svg', opts),
|
||||
github: formatAssetUrl('./icons/icon/github.svg', opts),
|
||||
group: formatAssetUrl('./icons/icon/group.svg', opts),
|
||||
'horizontal-align-end': formatAssetUrl('./icons/icon/horizontal-align-end.svg', opts),
|
||||
'horizontal-align-middle': formatAssetUrl('./icons/icon/horizontal-align-middle.svg', opts),
|
||||
'horizontal-align-start': formatAssetUrl('./icons/icon/horizontal-align-start.svg', opts),
|
||||
'info-circle': formatAssetUrl('./icons/icon/info-circle.svg', opts),
|
||||
leading: formatAssetUrl('./icons/icon/leading.svg', opts),
|
||||
link: formatAssetUrl('./icons/icon/link.svg', opts),
|
||||
lock: formatAssetUrl('./icons/icon/lock.svg', opts),
|
||||
menu: formatAssetUrl('./icons/icon/menu.svg', opts),
|
||||
minus: formatAssetUrl('./icons/icon/minus.svg', opts),
|
||||
mixed: formatAssetUrl('./icons/icon/mixed.svg', opts),
|
||||
pack: formatAssetUrl('./icons/icon/pack.svg', opts),
|
||||
plus: formatAssetUrl('./icons/icon/plus.svg', opts),
|
||||
'question-mark-circle': formatAssetUrl('./icons/icon/question-mark-circle.svg', opts),
|
||||
'question-mark': formatAssetUrl('./icons/icon/question-mark.svg', opts),
|
||||
redo: formatAssetUrl('./icons/icon/redo.svg', opts),
|
||||
'reset-zoom': formatAssetUrl('./icons/icon/reset-zoom.svg', opts),
|
||||
'rotate-ccw': formatAssetUrl('./icons/icon/rotate-ccw.svg', opts),
|
||||
'rotate-cw': formatAssetUrl('./icons/icon/rotate-cw.svg', opts),
|
||||
'send-backward': formatAssetUrl('./icons/icon/send-backward.svg', opts),
|
||||
'send-to-back': formatAssetUrl('./icons/icon/send-to-back.svg', opts),
|
||||
'share-1': formatAssetUrl('./icons/icon/share-1.svg', opts),
|
||||
'size-extra-large': formatAssetUrl('./icons/icon/size-extra-large.svg', opts),
|
||||
'size-large': formatAssetUrl('./icons/icon/size-large.svg', opts),
|
||||
'size-medium': formatAssetUrl('./icons/icon/size-medium.svg', opts),
|
||||
'size-small': formatAssetUrl('./icons/icon/size-small.svg', opts),
|
||||
'spline-cubic': formatAssetUrl('./icons/icon/spline-cubic.svg', opts),
|
||||
'spline-line': formatAssetUrl('./icons/icon/spline-line.svg', opts),
|
||||
'stack-horizontal': formatAssetUrl('./icons/icon/stack-horizontal.svg', opts),
|
||||
'stack-vertical': formatAssetUrl('./icons/icon/stack-vertical.svg', opts),
|
||||
'status-offline': formatAssetUrl('./icons/icon/status-offline.svg', opts),
|
||||
'stretch-horizontal': formatAssetUrl('./icons/icon/stretch-horizontal.svg', opts),
|
||||
'stretch-vertical': formatAssetUrl('./icons/icon/stretch-vertical.svg', opts),
|
||||
'text-align-center': formatAssetUrl('./icons/icon/text-align-center.svg', opts),
|
||||
'text-align-left': formatAssetUrl('./icons/icon/text-align-left.svg', opts),
|
||||
'text-align-right': formatAssetUrl('./icons/icon/text-align-right.svg', opts),
|
||||
'toggle-off': formatAssetUrl('./icons/icon/toggle-off.svg', opts),
|
||||
'toggle-on': formatAssetUrl('./icons/icon/toggle-on.svg', opts),
|
||||
'tool-arrow': formatAssetUrl('./icons/icon/tool-arrow.svg', opts),
|
||||
'tool-eraser': formatAssetUrl('./icons/icon/tool-eraser.svg', opts),
|
||||
'tool-frame': formatAssetUrl('./icons/icon/tool-frame.svg', opts),
|
||||
'tool-hand': formatAssetUrl('./icons/icon/tool-hand.svg', opts),
|
||||
'tool-highlight': formatAssetUrl('./icons/icon/tool-highlight.svg', opts),
|
||||
'tool-laser': formatAssetUrl('./icons/icon/tool-laser.svg', opts),
|
||||
'tool-line': formatAssetUrl('./icons/icon/tool-line.svg', opts),
|
||||
'tool-media': formatAssetUrl('./icons/icon/tool-media.svg', opts),
|
||||
'tool-note': formatAssetUrl('./icons/icon/tool-note.svg', opts),
|
||||
'tool-pencil': formatAssetUrl('./icons/icon/tool-pencil.svg', opts),
|
||||
'tool-pointer': formatAssetUrl('./icons/icon/tool-pointer.svg', opts),
|
||||
'tool-screenshot': formatAssetUrl('./icons/icon/tool-screenshot.svg', opts),
|
||||
'tool-text': formatAssetUrl('./icons/icon/tool-text.svg', opts),
|
||||
trash: formatAssetUrl('./icons/icon/trash.svg', opts),
|
||||
twitter: formatAssetUrl('./icons/icon/twitter.svg', opts),
|
||||
undo: formatAssetUrl('./icons/icon/undo.svg', opts),
|
||||
ungroup: formatAssetUrl('./icons/icon/ungroup.svg', opts),
|
||||
unlock: formatAssetUrl('./icons/icon/unlock.svg', opts),
|
||||
'vertical-align-end': formatAssetUrl('./icons/icon/vertical-align-end.svg', opts),
|
||||
'vertical-align-middle': formatAssetUrl('./icons/icon/vertical-align-middle.svg', opts),
|
||||
'vertical-align-start': formatAssetUrl('./icons/icon/vertical-align-start.svg', opts),
|
||||
'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),
|
||||
'align-bottom': iconsIcon0MergedSvg + '#align-bottom',
|
||||
'align-center-horizontal': iconsIcon0MergedSvg + '#align-center-horizontal',
|
||||
'align-center-vertical': iconsIcon0MergedSvg + '#align-center-vertical',
|
||||
'align-left': iconsIcon0MergedSvg + '#align-left',
|
||||
'align-right': iconsIcon0MergedSvg + '#align-right',
|
||||
'align-top': iconsIcon0MergedSvg + '#align-top',
|
||||
'arrow-left': iconsIcon0MergedSvg + '#arrow-left',
|
||||
'arrowhead-arrow': iconsIcon0MergedSvg + '#arrowhead-arrow',
|
||||
'arrowhead-bar': iconsIcon0MergedSvg + '#arrowhead-bar',
|
||||
'arrowhead-diamond': iconsIcon0MergedSvg + '#arrowhead-diamond',
|
||||
'arrowhead-dot': iconsIcon0MergedSvg + '#arrowhead-dot',
|
||||
'arrowhead-none': iconsIcon0MergedSvg + '#arrowhead-none',
|
||||
'arrowhead-square': iconsIcon0MergedSvg + '#arrowhead-square',
|
||||
'arrowhead-triangle-inverted': iconsIcon0MergedSvg + '#arrowhead-triangle-inverted',
|
||||
'arrowhead-triangle': iconsIcon0MergedSvg + '#arrowhead-triangle',
|
||||
blob: iconsIcon0MergedSvg + '#blob',
|
||||
'bring-forward': iconsIcon0MergedSvg + '#bring-forward',
|
||||
'bring-to-front': iconsIcon0MergedSvg + '#bring-to-front',
|
||||
broken: iconsIcon0MergedSvg + '#broken',
|
||||
'check-circle': iconsIcon0MergedSvg + '#check-circle',
|
||||
check: iconsIcon0MergedSvg + '#check',
|
||||
'chevron-down': iconsIcon0MergedSvg + '#chevron-down',
|
||||
'chevron-left': iconsIcon0MergedSvg + '#chevron-left',
|
||||
'chevron-right': iconsIcon0MergedSvg + '#chevron-right',
|
||||
'chevron-up': iconsIcon0MergedSvg + '#chevron-up',
|
||||
'chevrons-ne': iconsIcon0MergedSvg + '#chevrons-ne',
|
||||
'chevrons-sw': iconsIcon0MergedSvg + '#chevrons-sw',
|
||||
'clipboard-copied': iconsIcon0MergedSvg + '#clipboard-copied',
|
||||
'clipboard-copy': iconsIcon0MergedSvg + '#clipboard-copy',
|
||||
color: iconsIcon0MergedSvg + '#color',
|
||||
'cross-2': iconsIcon0MergedSvg + '#cross-2',
|
||||
'cross-circle': iconsIcon0MergedSvg + '#cross-circle',
|
||||
'dash-dashed': iconsIcon0MergedSvg + '#dash-dashed',
|
||||
'dash-dotted': iconsIcon0MergedSvg + '#dash-dotted',
|
||||
'dash-draw': iconsIcon0MergedSvg + '#dash-draw',
|
||||
'dash-solid': iconsIcon0MergedSvg + '#dash-solid',
|
||||
disconnected: iconsIcon0MergedSvg + '#disconnected',
|
||||
discord: iconsIcon0MergedSvg + '#discord',
|
||||
'distribute-horizontal': iconsIcon0MergedSvg + '#distribute-horizontal',
|
||||
'distribute-vertical': iconsIcon0MergedSvg + '#distribute-vertical',
|
||||
dot: iconsIcon0MergedSvg + '#dot',
|
||||
'dots-horizontal': iconsIcon0MergedSvg + '#dots-horizontal',
|
||||
'dots-vertical': iconsIcon0MergedSvg + '#dots-vertical',
|
||||
'drag-handle-dots': iconsIcon0MergedSvg + '#drag-handle-dots',
|
||||
duplicate: iconsIcon0MergedSvg + '#duplicate',
|
||||
edit: iconsIcon0MergedSvg + '#edit',
|
||||
'external-link': iconsIcon0MergedSvg + '#external-link',
|
||||
'fill-fill': iconsIcon0MergedSvg + '#fill-fill',
|
||||
'fill-none': iconsIcon0MergedSvg + '#fill-none',
|
||||
'fill-pattern': iconsIcon0MergedSvg + '#fill-pattern',
|
||||
'fill-semi': iconsIcon0MergedSvg + '#fill-semi',
|
||||
'fill-solid': iconsIcon0MergedSvg + '#fill-solid',
|
||||
follow: iconsIcon0MergedSvg + '#follow',
|
||||
following: iconsIcon0MergedSvg + '#following',
|
||||
'font-draw': iconsIcon0MergedSvg + '#font-draw',
|
||||
'font-mono': iconsIcon0MergedSvg + '#font-mono',
|
||||
'font-sans': iconsIcon0MergedSvg + '#font-sans',
|
||||
'font-serif': iconsIcon0MergedSvg + '#font-serif',
|
||||
'geo-arrow-down': iconsIcon0MergedSvg + '#geo-arrow-down',
|
||||
'geo-arrow-left': iconsIcon0MergedSvg + '#geo-arrow-left',
|
||||
'geo-arrow-right': iconsIcon0MergedSvg + '#geo-arrow-right',
|
||||
'geo-arrow-up': iconsIcon0MergedSvg + '#geo-arrow-up',
|
||||
'geo-check-box': iconsIcon0MergedSvg + '#geo-check-box',
|
||||
'geo-cloud': iconsIcon0MergedSvg + '#geo-cloud',
|
||||
'geo-diamond': iconsIcon0MergedSvg + '#geo-diamond',
|
||||
'geo-ellipse': iconsIcon0MergedSvg + '#geo-ellipse',
|
||||
'geo-heart': iconsIcon0MergedSvg + '#geo-heart',
|
||||
'geo-hexagon': iconsIcon0MergedSvg + '#geo-hexagon',
|
||||
'geo-octagon': iconsIcon0MergedSvg + '#geo-octagon',
|
||||
'geo-oval': iconsIcon0MergedSvg + '#geo-oval',
|
||||
'geo-pentagon': iconsIcon0MergedSvg + '#geo-pentagon',
|
||||
'geo-rectangle': iconsIcon0MergedSvg + '#geo-rectangle',
|
||||
'geo-rhombus-2': iconsIcon0MergedSvg + '#geo-rhombus-2',
|
||||
'geo-rhombus': iconsIcon0MergedSvg + '#geo-rhombus',
|
||||
'geo-star': iconsIcon0MergedSvg + '#geo-star',
|
||||
'geo-trapezoid': iconsIcon0MergedSvg + '#geo-trapezoid',
|
||||
'geo-triangle': iconsIcon0MergedSvg + '#geo-triangle',
|
||||
'geo-x-box': iconsIcon0MergedSvg + '#geo-x-box',
|
||||
github: iconsIcon0MergedSvg + '#github',
|
||||
group: iconsIcon0MergedSvg + '#group',
|
||||
'horizontal-align-end': iconsIcon0MergedSvg + '#horizontal-align-end',
|
||||
'horizontal-align-middle': iconsIcon0MergedSvg + '#horizontal-align-middle',
|
||||
'horizontal-align-start': iconsIcon0MergedSvg + '#horizontal-align-start',
|
||||
'info-circle': iconsIcon0MergedSvg + '#info-circle',
|
||||
leading: iconsIcon0MergedSvg + '#leading',
|
||||
link: iconsIcon0MergedSvg + '#link',
|
||||
lock: iconsIcon0MergedSvg + '#lock',
|
||||
menu: iconsIcon0MergedSvg + '#menu',
|
||||
minus: iconsIcon0MergedSvg + '#minus',
|
||||
mixed: iconsIcon0MergedSvg + '#mixed',
|
||||
pack: iconsIcon0MergedSvg + '#pack',
|
||||
plus: iconsIcon0MergedSvg + '#plus',
|
||||
'question-mark-circle': iconsIcon0MergedSvg + '#question-mark-circle',
|
||||
'question-mark': iconsIcon0MergedSvg + '#question-mark',
|
||||
redo: iconsIcon0MergedSvg + '#redo',
|
||||
'reset-zoom': iconsIcon0MergedSvg + '#reset-zoom',
|
||||
'rotate-ccw': iconsIcon0MergedSvg + '#rotate-ccw',
|
||||
'rotate-cw': iconsIcon0MergedSvg + '#rotate-cw',
|
||||
'send-backward': iconsIcon0MergedSvg + '#send-backward',
|
||||
'send-to-back': iconsIcon0MergedSvg + '#send-to-back',
|
||||
'share-1': iconsIcon0MergedSvg + '#share-1',
|
||||
'size-extra-large': iconsIcon0MergedSvg + '#size-extra-large',
|
||||
'size-large': iconsIcon0MergedSvg + '#size-large',
|
||||
'size-medium': iconsIcon0MergedSvg + '#size-medium',
|
||||
'size-small': iconsIcon0MergedSvg + '#size-small',
|
||||
'spline-cubic': iconsIcon0MergedSvg + '#spline-cubic',
|
||||
'spline-line': iconsIcon0MergedSvg + '#spline-line',
|
||||
'stack-horizontal': iconsIcon0MergedSvg + '#stack-horizontal',
|
||||
'stack-vertical': iconsIcon0MergedSvg + '#stack-vertical',
|
||||
'status-offline': iconsIcon0MergedSvg + '#status-offline',
|
||||
'stretch-horizontal': iconsIcon0MergedSvg + '#stretch-horizontal',
|
||||
'stretch-vertical': iconsIcon0MergedSvg + '#stretch-vertical',
|
||||
'text-align-center': iconsIcon0MergedSvg + '#text-align-center',
|
||||
'text-align-left': iconsIcon0MergedSvg + '#text-align-left',
|
||||
'text-align-right': iconsIcon0MergedSvg + '#text-align-right',
|
||||
'toggle-off': iconsIcon0MergedSvg + '#toggle-off',
|
||||
'toggle-on': iconsIcon0MergedSvg + '#toggle-on',
|
||||
'tool-arrow': iconsIcon0MergedSvg + '#tool-arrow',
|
||||
'tool-eraser': iconsIcon0MergedSvg + '#tool-eraser',
|
||||
'tool-frame': iconsIcon0MergedSvg + '#tool-frame',
|
||||
'tool-hand': iconsIcon0MergedSvg + '#tool-hand',
|
||||
'tool-highlight': iconsIcon0MergedSvg + '#tool-highlight',
|
||||
'tool-laser': iconsIcon0MergedSvg + '#tool-laser',
|
||||
'tool-line': iconsIcon0MergedSvg + '#tool-line',
|
||||
'tool-media': iconsIcon0MergedSvg + '#tool-media',
|
||||
'tool-note': iconsIcon0MergedSvg + '#tool-note',
|
||||
'tool-pencil': iconsIcon0MergedSvg + '#tool-pencil',
|
||||
'tool-pointer': iconsIcon0MergedSvg + '#tool-pointer',
|
||||
'tool-screenshot': iconsIcon0MergedSvg + '#tool-screenshot',
|
||||
'tool-text': iconsIcon0MergedSvg + '#tool-text',
|
||||
trash: iconsIcon0MergedSvg + '#trash',
|
||||
twitter: iconsIcon0MergedSvg + '#twitter',
|
||||
undo: iconsIcon0MergedSvg + '#undo',
|
||||
ungroup: iconsIcon0MergedSvg + '#ungroup',
|
||||
unlock: iconsIcon0MergedSvg + '#unlock',
|
||||
'vertical-align-end': iconsIcon0MergedSvg + '#vertical-align-end',
|
||||
'vertical-align-middle': iconsIcon0MergedSvg + '#vertical-align-middle',
|
||||
'vertical-align-start': iconsIcon0MergedSvg + '#vertical-align-start',
|
||||
'warning-triangle': iconsIcon0MergedSvg + '#warning-triangle',
|
||||
'zoom-in': iconsIcon0MergedSvg + '#zoom-in',
|
||||
'zoom-out': iconsIcon0MergedSvg + '#zoom-out',
|
||||
},
|
||||
translations: {
|
||||
ar: formatAssetUrl('./translations/ar.json', opts),
|
||||
|
|
|
@ -10,6 +10,10 @@ import { formatAssetUrl } from './utils.js'
|
|||
* @public
|
||||
*/
|
||||
export function getAssetUrlsByMetaUrl(opts) {
|
||||
const iconsIcon0MergedSvg = formatAssetUrl(
|
||||
new URL('./icons/icon/0_merged.svg', import.meta.url).href,
|
||||
opts
|
||||
)
|
||||
return {
|
||||
fonts: {
|
||||
monospace: formatAssetUrl(
|
||||
|
@ -30,474 +34,147 @@ export function getAssetUrlsByMetaUrl(opts) {
|
|||
),
|
||||
},
|
||||
icons: {
|
||||
'align-bottom': formatAssetUrl(
|
||||
new URL('./icons/icon/align-bottom.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'align-center-horizontal': formatAssetUrl(
|
||||
new URL('./icons/icon/align-center-horizontal.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'align-center-vertical': formatAssetUrl(
|
||||
new URL('./icons/icon/align-center-vertical.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'align-left': formatAssetUrl(
|
||||
new URL('./icons/icon/align-left.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'align-right': formatAssetUrl(
|
||||
new URL('./icons/icon/align-right.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'align-top': formatAssetUrl(
|
||||
new URL('./icons/icon/align-top.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'arrow-left': formatAssetUrl(
|
||||
new URL('./icons/icon/arrow-left.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'arrowhead-arrow': formatAssetUrl(
|
||||
new URL('./icons/icon/arrowhead-arrow.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'arrowhead-bar': formatAssetUrl(
|
||||
new URL('./icons/icon/arrowhead-bar.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'arrowhead-diamond': formatAssetUrl(
|
||||
new URL('./icons/icon/arrowhead-diamond.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'arrowhead-dot': formatAssetUrl(
|
||||
new URL('./icons/icon/arrowhead-dot.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'arrowhead-none': formatAssetUrl(
|
||||
new URL('./icons/icon/arrowhead-none.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'arrowhead-square': formatAssetUrl(
|
||||
new URL('./icons/icon/arrowhead-square.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'arrowhead-triangle-inverted': formatAssetUrl(
|
||||
new URL('./icons/icon/arrowhead-triangle-inverted.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'arrowhead-triangle': formatAssetUrl(
|
||||
new URL('./icons/icon/arrowhead-triangle.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
blob: formatAssetUrl(new URL('./icons/icon/blob.svg', import.meta.url).href, opts),
|
||||
'bring-forward': formatAssetUrl(
|
||||
new URL('./icons/icon/bring-forward.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'bring-to-front': formatAssetUrl(
|
||||
new URL('./icons/icon/bring-to-front.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
broken: formatAssetUrl(new URL('./icons/icon/broken.svg', import.meta.url).href, opts),
|
||||
'check-circle': formatAssetUrl(
|
||||
new URL('./icons/icon/check-circle.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
check: formatAssetUrl(new URL('./icons/icon/check.svg', import.meta.url).href, opts),
|
||||
'chevron-down': formatAssetUrl(
|
||||
new URL('./icons/icon/chevron-down.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'chevron-left': formatAssetUrl(
|
||||
new URL('./icons/icon/chevron-left.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'chevron-right': formatAssetUrl(
|
||||
new URL('./icons/icon/chevron-right.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'chevron-up': formatAssetUrl(
|
||||
new URL('./icons/icon/chevron-up.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'chevrons-ne': formatAssetUrl(
|
||||
new URL('./icons/icon/chevrons-ne.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'chevrons-sw': formatAssetUrl(
|
||||
new URL('./icons/icon/chevrons-sw.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'clipboard-copied': formatAssetUrl(
|
||||
new URL('./icons/icon/clipboard-copied.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'clipboard-copy': formatAssetUrl(
|
||||
new URL('./icons/icon/clipboard-copy.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
color: formatAssetUrl(new URL('./icons/icon/color.svg', import.meta.url).href, opts),
|
||||
'cross-2': formatAssetUrl(new URL('./icons/icon/cross-2.svg', import.meta.url).href, opts),
|
||||
'cross-circle': formatAssetUrl(
|
||||
new URL('./icons/icon/cross-circle.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'dash-dashed': formatAssetUrl(
|
||||
new URL('./icons/icon/dash-dashed.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'dash-dotted': formatAssetUrl(
|
||||
new URL('./icons/icon/dash-dotted.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'dash-draw': formatAssetUrl(
|
||||
new URL('./icons/icon/dash-draw.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'dash-solid': formatAssetUrl(
|
||||
new URL('./icons/icon/dash-solid.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
disconnected: formatAssetUrl(
|
||||
new URL('./icons/icon/disconnected.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
discord: formatAssetUrl(new URL('./icons/icon/discord.svg', import.meta.url).href, opts),
|
||||
'distribute-horizontal': formatAssetUrl(
|
||||
new URL('./icons/icon/distribute-horizontal.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
'distribute-vertical': formatAssetUrl(
|
||||
new URL('./icons/icon/distribute-vertical.svg', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
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),
|
||||
'align-bottom': iconsIcon0MergedSvg + '#align-bottom',
|
||||
'align-center-horizontal': iconsIcon0MergedSvg + '#align-center-horizontal',
|
||||
'align-center-vertical': iconsIcon0MergedSvg + '#align-center-vertical',
|
||||
'align-left': iconsIcon0MergedSvg + '#align-left',
|
||||
'align-right': iconsIcon0MergedSvg + '#align-right',
|
||||
'align-top': iconsIcon0MergedSvg + '#align-top',
|
||||
'arrow-left': iconsIcon0MergedSvg + '#arrow-left',
|
||||
'arrowhead-arrow': iconsIcon0MergedSvg + '#arrowhead-arrow',
|
||||
'arrowhead-bar': iconsIcon0MergedSvg + '#arrowhead-bar',
|
||||
'arrowhead-diamond': iconsIcon0MergedSvg + '#arrowhead-diamond',
|
||||
'arrowhead-dot': iconsIcon0MergedSvg + '#arrowhead-dot',
|
||||
'arrowhead-none': iconsIcon0MergedSvg + '#arrowhead-none',
|
||||
'arrowhead-square': iconsIcon0MergedSvg + '#arrowhead-square',
|
||||
'arrowhead-triangle-inverted': iconsIcon0MergedSvg + '#arrowhead-triangle-inverted',
|
||||
'arrowhead-triangle': iconsIcon0MergedSvg + '#arrowhead-triangle',
|
||||
blob: iconsIcon0MergedSvg + '#blob',
|
||||
'bring-forward': iconsIcon0MergedSvg + '#bring-forward',
|
||||
'bring-to-front': iconsIcon0MergedSvg + '#bring-to-front',
|
||||
broken: iconsIcon0MergedSvg + '#broken',
|
||||
'check-circle': iconsIcon0MergedSvg + '#check-circle',
|
||||
check: iconsIcon0MergedSvg + '#check',
|
||||
'chevron-down': iconsIcon0MergedSvg + '#chevron-down',
|
||||
'chevron-left': iconsIcon0MergedSvg + '#chevron-left',
|
||||
'chevron-right': iconsIcon0MergedSvg + '#chevron-right',
|
||||
'chevron-up': iconsIcon0MergedSvg + '#chevron-up',
|
||||
'chevrons-ne': iconsIcon0MergedSvg + '#chevrons-ne',
|
||||
'chevrons-sw': iconsIcon0MergedSvg + '#chevrons-sw',
|
||||
'clipboard-copied': iconsIcon0MergedSvg + '#clipboard-copied',
|
||||
'clipboard-copy': iconsIcon0MergedSvg + '#clipboard-copy',
|
||||
color: iconsIcon0MergedSvg + '#color',
|
||||
'cross-2': iconsIcon0MergedSvg + '#cross-2',
|
||||
'cross-circle': iconsIcon0MergedSvg + '#cross-circle',
|
||||
'dash-dashed': iconsIcon0MergedSvg + '#dash-dashed',
|
||||
'dash-dotted': iconsIcon0MergedSvg + '#dash-dotted',
|
||||
'dash-draw': iconsIcon0MergedSvg + '#dash-draw',
|
||||
'dash-solid': iconsIcon0MergedSvg + '#dash-solid',
|
||||
disconnected: iconsIcon0MergedSvg + '#disconnected',
|
||||
discord: iconsIcon0MergedSvg + '#discord',
|
||||
'distribute-horizontal': iconsIcon0MergedSvg + '#distribute-horizontal',
|
||||
'distribute-vertical': iconsIcon0MergedSvg + '#distribute-vertical',
|
||||
dot: iconsIcon0MergedSvg + '#dot',
|
||||
'dots-horizontal': iconsIcon0MergedSvg + '#dots-horizontal',
|
||||
'dots-vertical': iconsIcon0MergedSvg + '#dots-vertical',
|
||||
'drag-handle-dots': iconsIcon0MergedSvg + '#drag-handle-dots',
|
||||
duplicate: iconsIcon0MergedSvg + '#duplicate',
|
||||
edit: iconsIcon0MergedSvg + '#edit',
|
||||
'external-link': iconsIcon0MergedSvg + '#external-link',
|
||||
'fill-fill': iconsIcon0MergedSvg + '#fill-fill',
|
||||
'fill-none': iconsIcon0MergedSvg + '#fill-none',
|
||||
'fill-pattern': iconsIcon0MergedSvg + '#fill-pattern',
|
||||
'fill-semi': iconsIcon0MergedSvg + '#fill-semi',
|
||||
'fill-solid': iconsIcon0MergedSvg + '#fill-solid',
|
||||
follow: iconsIcon0MergedSvg + '#follow',
|
||||
following: iconsIcon0MergedSvg + '#following',
|
||||
'font-draw': iconsIcon0MergedSvg + '#font-draw',
|
||||
'font-mono': iconsIcon0MergedSvg + '#font-mono',
|
||||
'font-sans': iconsIcon0MergedSvg + '#font-sans',
|
||||
'font-serif': iconsIcon0MergedSvg + '#font-serif',
|
||||
'geo-arrow-down': iconsIcon0MergedSvg + '#geo-arrow-down',
|
||||
'geo-arrow-left': iconsIcon0MergedSvg + '#geo-arrow-left',
|
||||
'geo-arrow-right': iconsIcon0MergedSvg + '#geo-arrow-right',
|
||||
'geo-arrow-up': iconsIcon0MergedSvg + '#geo-arrow-up',
|
||||
'geo-check-box': iconsIcon0MergedSvg + '#geo-check-box',
|
||||
'geo-cloud': iconsIcon0MergedSvg + '#geo-cloud',
|
||||
'geo-diamond': iconsIcon0MergedSvg + '#geo-diamond',
|
||||
'geo-ellipse': iconsIcon0MergedSvg + '#geo-ellipse',
|
||||
'geo-heart': iconsIcon0MergedSvg + '#geo-heart',
|
||||
'geo-hexagon': iconsIcon0MergedSvg + '#geo-hexagon',
|
||||
'geo-octagon': iconsIcon0MergedSvg + '#geo-octagon',
|
||||
'geo-oval': iconsIcon0MergedSvg + '#geo-oval',
|
||||
'geo-pentagon': iconsIcon0MergedSvg + '#geo-pentagon',
|
||||
'geo-rectangle': iconsIcon0MergedSvg + '#geo-rectangle',
|
||||
'geo-rhombus-2': iconsIcon0MergedSvg + '#geo-rhombus-2',
|
||||
'geo-rhombus': iconsIcon0MergedSvg + '#geo-rhombus',
|
||||
'geo-star': iconsIcon0MergedSvg + '#geo-star',
|
||||
'geo-trapezoid': iconsIcon0MergedSvg + '#geo-trapezoid',
|
||||
'geo-triangle': iconsIcon0MergedSvg + '#geo-triangle',
|
||||
'geo-x-box': iconsIcon0MergedSvg + '#geo-x-box',
|
||||
github: iconsIcon0MergedSvg + '#github',
|
||||
group: iconsIcon0MergedSvg + '#group',
|
||||
'horizontal-align-end': iconsIcon0MergedSvg + '#horizontal-align-end',
|
||||
'horizontal-align-middle': iconsIcon0MergedSvg + '#horizontal-align-middle',
|
||||
'horizontal-align-start': iconsIcon0MergedSvg + '#horizontal-align-start',
|
||||
'info-circle': iconsIcon0MergedSvg + '#info-circle',
|
||||
leading: iconsIcon0MergedSvg + '#leading',
|
||||
link: iconsIcon0MergedSvg + '#link',
|
||||
lock: iconsIcon0MergedSvg + '#lock',
|
||||
menu: iconsIcon0MergedSvg + '#menu',
|
||||
minus: iconsIcon0MergedSvg + '#minus',
|
||||
mixed: iconsIcon0MergedSvg + '#mixed',
|
||||
pack: iconsIcon0MergedSvg + '#pack',
|
||||
plus: iconsIcon0MergedSvg + '#plus',
|
||||
'question-mark-circle': iconsIcon0MergedSvg + '#question-mark-circle',
|
||||
'question-mark': iconsIcon0MergedSvg + '#question-mark',
|
||||
redo: iconsIcon0MergedSvg + '#redo',
|
||||
'reset-zoom': iconsIcon0MergedSvg + '#reset-zoom',
|
||||
'rotate-ccw': iconsIcon0MergedSvg + '#rotate-ccw',
|
||||
'rotate-cw': iconsIcon0MergedSvg + '#rotate-cw',
|
||||
'send-backward': iconsIcon0MergedSvg + '#send-backward',
|
||||
'send-to-back': iconsIcon0MergedSvg + '#send-to-back',
|
||||
'share-1': iconsIcon0MergedSvg + '#share-1',
|
||||
'size-extra-large': iconsIcon0MergedSvg + '#size-extra-large',
|
||||
'size-large': iconsIcon0MergedSvg + '#size-large',
|
||||
'size-medium': iconsIcon0MergedSvg + '#size-medium',
|
||||
'size-small': iconsIcon0MergedSvg + '#size-small',
|
||||
'spline-cubic': iconsIcon0MergedSvg + '#spline-cubic',
|
||||
'spline-line': iconsIcon0MergedSvg + '#spline-line',
|
||||
'stack-horizontal': iconsIcon0MergedSvg + '#stack-horizontal',
|
||||
'stack-vertical': iconsIcon0MergedSvg + '#stack-vertical',
|
||||
'status-offline': iconsIcon0MergedSvg + '#status-offline',
|
||||
'stretch-horizontal': iconsIcon0MergedSvg + '#stretch-horizontal',
|
||||
'stretch-vertical': iconsIcon0MergedSvg + '#stretch-vertical',
|
||||
'text-align-center': iconsIcon0MergedSvg + '#text-align-center',
|
||||
'text-align-left': iconsIcon0MergedSvg + '#text-align-left',
|
||||
'text-align-right': iconsIcon0MergedSvg + '#text-align-right',
|
||||
'toggle-off': iconsIcon0MergedSvg + '#toggle-off',
|
||||
'toggle-on': iconsIcon0MergedSvg + '#toggle-on',
|
||||
'tool-arrow': iconsIcon0MergedSvg + '#tool-arrow',
|
||||
'tool-eraser': iconsIcon0MergedSvg + '#tool-eraser',
|
||||
'tool-frame': iconsIcon0MergedSvg + '#tool-frame',
|
||||
'tool-hand': iconsIcon0MergedSvg + '#tool-hand',
|
||||
'tool-highlight': iconsIcon0MergedSvg + '#tool-highlight',
|
||||
'tool-laser': iconsIcon0MergedSvg + '#tool-laser',
|
||||
'tool-line': iconsIcon0MergedSvg + '#tool-line',
|
||||
'tool-media': iconsIcon0MergedSvg + '#tool-media',
|
||||
'tool-note': iconsIcon0MergedSvg + '#tool-note',
|
||||
'tool-pencil': iconsIcon0MergedSvg + '#tool-pencil',
|
||||
'tool-pointer': iconsIcon0MergedSvg + '#tool-pointer',
|
||||
'tool-screenshot': iconsIcon0MergedSvg + '#tool-screenshot',
|
||||
'tool-text': iconsIcon0MergedSvg + '#tool-text',
|
||||
trash: iconsIcon0MergedSvg + '#trash',
|
||||
twitter: iconsIcon0MergedSvg + '#twitter',
|
||||
undo: iconsIcon0MergedSvg + '#undo',
|
||||
ungroup: iconsIcon0MergedSvg + '#ungroup',
|
||||
unlock: iconsIcon0MergedSvg + '#unlock',
|
||||
'vertical-align-end': iconsIcon0MergedSvg + '#vertical-align-end',
|
||||
'vertical-align-middle': iconsIcon0MergedSvg + '#vertical-align-middle',
|
||||
'vertical-align-start': iconsIcon0MergedSvg + '#vertical-align-start',
|
||||
'warning-triangle': iconsIcon0MergedSvg + '#warning-triangle',
|
||||
'zoom-in': iconsIcon0MergedSvg + '#zoom-in',
|
||||
'zoom-out': iconsIcon0MergedSvg + '#zoom-out',
|
||||
},
|
||||
translations: {
|
||||
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 collectedAssetUrls: {
|
||||
fonts: Record<string, string>
|
||||
icons: Record<string, string>
|
||||
translations: Record<string, string>
|
||||
embedIcons: Record<string, string>
|
||||
} = {
|
||||
const collectedAssetUrls: Record<
|
||||
'fonts' | 'icons' | 'translations' | 'embedIcons',
|
||||
Record<string, { file: string; hash?: string }>
|
||||
> = {
|
||||
fonts: {},
|
||||
icons: {},
|
||||
translations: {},
|
||||
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
|
||||
|
||||
async function copyIcons() {
|
||||
|
@ -58,6 +63,31 @@ async function copyIcons() {
|
|||
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
|
||||
for (const folderPath of PUBLIC_FOLDER_PATHS) {
|
||||
const publicIconsRootFolderPath = join(folderPath, 'icons')
|
||||
|
@ -101,7 +131,10 @@ async function copyIcons() {
|
|||
// add to the asset declaration file
|
||||
for (const icon of icons) {
|
||||
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
|
||||
for (const item of itemsToCopy) {
|
||||
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)
|
||||
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
|
||||
for (const item of itemsToCopy) {
|
||||
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
|
||||
async function writeUrlBasedAssetDeclarationFile() {
|
||||
const codeFilePath = join(REPO_ROOT, 'packages', 'assets', 'urls.js')
|
||||
const codeFile = `
|
||||
const codeFile = new CodeFile(`
|
||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||
/// <reference path="./modules.d.ts" />
|
||||
import { formatAssetUrl } from './utils.js'
|
||||
`)
|
||||
|
||||
const fn = codeFile.appendFn(`
|
||||
/**
|
||||
* @param {AssetUrlOptions} [opts]
|
||||
* @public
|
||||
*/
|
||||
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(
|
||||
importSuffix: string,
|
||||
fileName: string
|
||||
): Promise<void> {
|
||||
let imports = `
|
||||
const codeFile = new CodeFile(`
|
||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||
/// <reference path="./modules.d.ts" />
|
||||
import { formatAssetUrl } from './utils.js'
|
||||
`)
|
||||
|
||||
`
|
||||
|
||||
let declarations = `
|
||||
const fn = codeFile.appendFn(`
|
||||
/**
|
||||
* @param {AssetUrlOptions} [opts]
|
||||
* @public
|
||||
*/
|
||||
export function getAssetUrlsByImport(opts) {
|
||||
return {
|
||||
`
|
||||
`)
|
||||
|
||||
fn.append('return {')
|
||||
for (const [type, assets] of Object.entries(collectedAssetUrls)) {
|
||||
declarations += `${type}: {\n`
|
||||
for (const [name, href] of Object.entries(assets)) {
|
||||
const variableName = `${type}_${name}`
|
||||
.replace(/[^a-zA-Z0-9_]/g, '_')
|
||||
.replace(/_+/g, '_')
|
||||
.replace(/_(.)/g, (_, letter) => letter.toUpperCase())
|
||||
imports += `import ${variableName} from ${JSON.stringify('./' + href + importSuffix)};\n`
|
||||
declarations += `${JSON.stringify(name)}: formatAssetUrl(${variableName}, opts),\n`
|
||||
fn.append(`${type}: {`)
|
||||
for (const [name, { file, hash }] of Object.entries(assets)) {
|
||||
const variableName = codeFile.import(`./${file}${importSuffix}`)
|
||||
const formattedUrl = fn.memo(file, `formatAssetUrl(${variableName}, opts)`)
|
||||
const value = hash ? `${formattedUrl} + ${JSON.stringify('#' + hash)}` : formattedUrl
|
||||
fn.append(`${JSON.stringify(name)}: ${value},`)
|
||||
}
|
||||
declarations += '},\n'
|
||||
fn.append('},')
|
||||
}
|
||||
|
||||
declarations += `
|
||||
}
|
||||
}
|
||||
`
|
||||
fn.append('}')
|
||||
|
||||
const codeFilePath = join(REPO_ROOT, 'packages', 'assets', fileName)
|
||||
await writeCodeFile(
|
||||
'scripts/refresh-assets.ts',
|
||||
'javascript',
|
||||
codeFilePath,
|
||||
imports + declarations
|
||||
)
|
||||
await writeCodeFile('scripts/refresh-assets.ts', 'javascript', codeFilePath, codeFile.toString())
|
||||
}
|
||||
|
||||
async function writeSelfHostedAssetDeclarationFile(): Promise<void> {
|
||||
const codeFilePath = join(REPO_ROOT, 'packages', 'assets', 'selfHosted.js')
|
||||
const codeFile = `
|
||||
const codeFile = new CodeFile(`
|
||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||
/// <reference path="./modules.d.ts" />
|
||||
import { formatAssetUrl } from './utils.js'
|
||||
`)
|
||||
|
||||
const fn = codeFile.appendFn(`
|
||||
/**
|
||||
* @param {AssetUrlOptions} [opts]
|
||||
* @public
|
||||
*/
|
||||
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() {
|
||||
|
@ -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
|
||||
async function main() {
|
||||
nicelog('Copying icons...')
|
||||
|
|