snapshot of https://github.com/tldraw/tldraw.git (main, 2026-09-23; blobs > 131072B omitted)
Some checks failed
Deploy analytics worker / Deploy analytics worker to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
i18n upload strings / Upload latest strings (push) Failing after 1s
Deploy bemo / Deploy bemo to ${{ (github.ref == 'refs/heads/bemo-production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
Deploy grafana resources / ${{ github.event_name == 'push' && 'Deploy grafana resources' || 'Validate grafana resources (dry run)' }} (push) Failing after 0s
End to end tests (dotcom) / Check for relevant changes (push) Failing after 0s
End to end tests (examples) / Check for relevant changes (push) Failing after 0s
End to end tests (mermaid readability) / Check for relevant changes (push) Failing after 1s
End to end tests (perf) / Check for relevant changes (push) Failing after 0s
Publish editor extensions / Publish editor extensions (push) Failing after 1s
Publish SDK packages / Remove the publish-packages label (push) Has been skipped
Checks / Tests & checks (push) Has been cancelled
Checks / Build all projects (push) Has been cancelled
Deploy templates / Deploy templates (push) Has been cancelled
End to end tests (dotcom) / End to end tests (dotcom) (push) Has been cancelled
End to end tests (mermaid readability) / End to end tests (mermaid readability) (push) Has been cancelled
End to end tests (perf) / End to end tests (perf) (push) Has been cancelled
Deploy .com / Deploy dotcom to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Has been cancelled
End to end tests (examples) / End to end tests (examples) (push) Has been cancelled
Publish SDK packages / Publish SDK packages (push) Has been cancelled
Publish SDK packages / Tell user released version (push) Has been cancelled
Publish SDK packages / Publishes code templates to separate repositories (push) Has been cancelled
Publish SDK packages / Deploys the template demos with the new SDK version (push) Has been cancelled
Some checks failed
Deploy analytics worker / Deploy analytics worker to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
i18n upload strings / Upload latest strings (push) Failing after 1s
Deploy bemo / Deploy bemo to ${{ (github.ref == 'refs/heads/bemo-production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
Deploy grafana resources / ${{ github.event_name == 'push' && 'Deploy grafana resources' || 'Validate grafana resources (dry run)' }} (push) Failing after 0s
End to end tests (dotcom) / Check for relevant changes (push) Failing after 0s
End to end tests (examples) / Check for relevant changes (push) Failing after 0s
End to end tests (mermaid readability) / Check for relevant changes (push) Failing after 1s
End to end tests (perf) / Check for relevant changes (push) Failing after 0s
Publish editor extensions / Publish editor extensions (push) Failing after 1s
Publish SDK packages / Remove the publish-packages label (push) Has been skipped
Checks / Tests & checks (push) Has been cancelled
Checks / Build all projects (push) Has been cancelled
Deploy templates / Deploy templates (push) Has been cancelled
End to end tests (dotcom) / End to end tests (dotcom) (push) Has been cancelled
End to end tests (mermaid readability) / End to end tests (mermaid readability) (push) Has been cancelled
End to end tests (perf) / End to end tests (perf) (push) Has been cancelled
Deploy .com / Deploy dotcom to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Has been cancelled
End to end tests (examples) / End to end tests (examples) (push) Has been cancelled
Publish SDK packages / Publish SDK packages (push) Has been cancelled
Publish SDK packages / Tell user released version (push) Has been cancelled
Publish SDK packages / Publishes code templates to separate repositories (push) Has been cancelled
Publish SDK packages / Deploys the template demos with the new SDK version (push) Has been cancelled
This commit is contained in:
1
packages/assets/LICENSE.md
Normal file
1
packages/assets/LICENSE.md
Normal file
@@ -0,0 +1 @@
|
||||
This code is licensed under the [tldraw license](https://github.com/tldraw/tldraw/blob/main/LICENSE.md)
|
||||
33
packages/assets/README.md
Normal file
33
packages/assets/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# @tldraw/assets
|
||||
|
||||
This package contains assets that are used by tldraw, including icons and fonts.
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation for the most recent release can be found on [tldraw.dev/docs](https://tldraw.dev/docs), including [reference docs](https://tldraw.dev/reference/editor/Editor). Our release notes can be found [here](https://tldraw.dev/releases).
|
||||
|
||||
For more agent-friendly docs, see our [LLMs.txt](https://tldraw.dev/llms.txt).
|
||||
|
||||
## Distributions
|
||||
|
||||
You can find tldraw on npm [here](https://www.npmjs.com/package/@tldraw/tldraw?activeTab=versions).
|
||||
|
||||
## Contribution
|
||||
|
||||
Found a bug? Please [submit an issue](https://github.com/tldraw/tldraw/issues/new).
|
||||
|
||||
## License
|
||||
|
||||
This project is provided under the [tldraw license](https://github.com/tldraw/tldraw/blob/main/LICENSE.md).
|
||||
|
||||
## Trademarks
|
||||
|
||||
Copyright (c) 2024-present tldraw Inc. The tldraw name and logo are trademarks of tldraw. Please see our [trademark guidelines](https://github.com/tldraw/tldraw/blob/main/TRADEMARKS.md) for info on acceptable usage.
|
||||
|
||||
## Contact
|
||||
|
||||
Find us on Twitter/X at [@tldraw](https://twitter.com/tldraw).
|
||||
|
||||
## Community
|
||||
|
||||
Have questions, comments or feedback? [Join our discord](https://discord.tldraw.com/?utm_source=github&utm_medium=readme&utm_campaign=sociallink). For the latest news and release notes, visit [tldraw.dev](https://tldraw.dev).
|
||||
4
packages/assets/api-extractor.json
Normal file
4
packages/assets/api-extractor.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"extends": "../../internal/config/api-extractor.json"
|
||||
}
|
||||
2
packages/assets/imports.d.ts
vendored
Normal file
2
packages/assets/imports.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { AssetUrlOptions, AssetUrls } from './types'
|
||||
export function getAssetUrlsByImport(opts?: AssetUrlOptions): AssetUrls
|
||||
364
packages/assets/imports.js
Normal file
364
packages/assets/imports.js
Normal file
@@ -0,0 +1,364 @@
|
||||
// This file is automatically generated by internal/scripts/refresh-assets.ts.
|
||||
// Do not edit manually. Or do, I'm a comment, not a cop.
|
||||
|
||||
import embedIconsCanvaPng from './embed-icons/canva.png'
|
||||
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 fontsIBMPlexMonoBoldWoff2 from './fonts/IBMPlexMono-Bold.woff2'
|
||||
import fontsIBMPlexMonoBoldItalicWoff2 from './fonts/IBMPlexMono-BoldItalic.woff2'
|
||||
import fontsIBMPlexMonoMediumWoff2 from './fonts/IBMPlexMono-Medium.woff2'
|
||||
import fontsIBMPlexMonoMediumItalicWoff2 from './fonts/IBMPlexMono-MediumItalic.woff2'
|
||||
import fontsIBMPlexSansBoldWoff2 from './fonts/IBMPlexSans-Bold.woff2'
|
||||
import fontsIBMPlexSansBoldItalicWoff2 from './fonts/IBMPlexSans-BoldItalic.woff2'
|
||||
import fontsIBMPlexSansMediumWoff2 from './fonts/IBMPlexSans-Medium.woff2'
|
||||
import fontsIBMPlexSansMediumItalicWoff2 from './fonts/IBMPlexSans-MediumItalic.woff2'
|
||||
import fontsIBMPlexSerifBoldWoff2 from './fonts/IBMPlexSerif-Bold.woff2'
|
||||
import fontsIBMPlexSerifBoldItalicWoff2 from './fonts/IBMPlexSerif-BoldItalic.woff2'
|
||||
import fontsIBMPlexSerifMediumWoff2 from './fonts/IBMPlexSerif-Medium.woff2'
|
||||
import fontsIBMPlexSerifMediumItalicWoff2 from './fonts/IBMPlexSerif-MediumItalic.woff2'
|
||||
import fontsShantellSansInformalBoldWoff2 from './fonts/Shantell_Sans-Informal_Bold.woff2'
|
||||
import fontsShantellSansInformalBoldItalicWoff2 from './fonts/Shantell_Sans-Informal_Bold_Italic.woff2'
|
||||
import fontsShantellSansInformalRegularWoff2 from './fonts/Shantell_Sans-Informal_Regular.woff2'
|
||||
import fontsShantellSansInformalRegularItalicWoff2 from './fonts/Shantell_Sans-Informal_Regular_Italic.woff2'
|
||||
import iconsIcon0MergedSvg from './icons/icon/0_merged.svg'
|
||||
import translationsArJson from './translations/ar.json'
|
||||
import translationsBnJson from './translations/bn.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 translationsElJson from './translations/el.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 translationsGuInJson from './translations/gu-in.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 translationsKmKhJson from './translations/km-kh.json'
|
||||
import translationsKnJson from './translations/kn.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 translationsMlJson from './translations/ml.json'
|
||||
import translationsMrJson from './translations/mr.json'
|
||||
import translationsMsJson from './translations/ms.json'
|
||||
import translationsMyJson from './translations/my.json'
|
||||
import translationsNeJson from './translations/ne.json'
|
||||
import translationsNlJson from './translations/nl.json'
|
||||
import translationsNoJson from './translations/no.json'
|
||||
import translationsPaJson from './translations/pa.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 translationsSoJson from './translations/so.json'
|
||||
import translationsSvJson from './translations/sv.json'
|
||||
import translationsTaJson from './translations/ta.json'
|
||||
import translationsTeJson from './translations/te.json'
|
||||
import translationsThJson from './translations/th.json'
|
||||
import translationsTlJson from './translations/tl.json'
|
||||
import translationsTrJson from './translations/tr.json'
|
||||
import translationsUkJson from './translations/uk.json'
|
||||
import translationsUrJson from './translations/ur.json'
|
||||
import translationsViJson from './translations/vi.json'
|
||||
import translationsZhCnJson from './translations/zh-cn.json'
|
||||
import translationsZhTwJson from './translations/zh-tw.json'
|
||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||
/// <reference path="./modules.d.ts" />
|
||||
import { formatAssetUrl } from './utils.js'
|
||||
|
||||
/**
|
||||
* @param {AssetUrlOptions} [opts]
|
||||
* @public
|
||||
*/
|
||||
export function getAssetUrlsByImport(opts) {
|
||||
const iconsIcon0MergedSvg2 = formatAssetUrl(iconsIcon0MergedSvg, opts)
|
||||
return {
|
||||
fonts: {
|
||||
tldraw_mono_bold: formatAssetUrl(fontsIBMPlexMonoBoldWoff2, opts),
|
||||
tldraw_mono_italic_bold: formatAssetUrl(fontsIBMPlexMonoBoldItalicWoff2, opts),
|
||||
tldraw_mono: formatAssetUrl(fontsIBMPlexMonoMediumWoff2, opts),
|
||||
tldraw_mono_italic: formatAssetUrl(fontsIBMPlexMonoMediumItalicWoff2, opts),
|
||||
tldraw_sans_bold: formatAssetUrl(fontsIBMPlexSansBoldWoff2, opts),
|
||||
tldraw_sans_italic_bold: formatAssetUrl(fontsIBMPlexSansBoldItalicWoff2, opts),
|
||||
tldraw_sans: formatAssetUrl(fontsIBMPlexSansMediumWoff2, opts),
|
||||
tldraw_sans_italic: formatAssetUrl(fontsIBMPlexSansMediumItalicWoff2, opts),
|
||||
tldraw_serif_bold: formatAssetUrl(fontsIBMPlexSerifBoldWoff2, opts),
|
||||
tldraw_serif_italic_bold: formatAssetUrl(fontsIBMPlexSerifBoldItalicWoff2, opts),
|
||||
tldraw_serif: formatAssetUrl(fontsIBMPlexSerifMediumWoff2, opts),
|
||||
tldraw_serif_italic: formatAssetUrl(fontsIBMPlexSerifMediumItalicWoff2, opts),
|
||||
tldraw_draw_bold: formatAssetUrl(fontsShantellSansInformalBoldWoff2, opts),
|
||||
tldraw_draw_italic_bold: formatAssetUrl(fontsShantellSansInformalBoldItalicWoff2, opts),
|
||||
tldraw_draw: formatAssetUrl(fontsShantellSansInformalRegularWoff2, opts),
|
||||
tldraw_draw_italic: formatAssetUrl(fontsShantellSansInformalRegularItalicWoff2, opts),
|
||||
},
|
||||
icons: {
|
||||
'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',
|
||||
alt: iconsIcon0MergedSvg2 + '#alt',
|
||||
'arrow-arc': iconsIcon0MergedSvg2 + '#arrow-arc',
|
||||
'arrow-cycle': iconsIcon0MergedSvg2 + '#arrow-cycle',
|
||||
'arrow-elbow': iconsIcon0MergedSvg2 + '#arrow-elbow',
|
||||
'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',
|
||||
bold: iconsIcon0MergedSvg2 + '#bold',
|
||||
bookmark: iconsIcon0MergedSvg2 + '#bookmark',
|
||||
'bring-forward': iconsIcon0MergedSvg2 + '#bring-forward',
|
||||
'bring-to-front': iconsIcon0MergedSvg2 + '#bring-to-front',
|
||||
broken: iconsIcon0MergedSvg2 + '#broken',
|
||||
bulletList: iconsIcon0MergedSvg2 + '#bulletList',
|
||||
'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',
|
||||
closed: iconsIcon0MergedSvg2 + '#closed',
|
||||
code: iconsIcon0MergedSvg2 + '#code',
|
||||
color: iconsIcon0MergedSvg2 + '#color',
|
||||
comment: iconsIcon0MergedSvg2 + '#comment',
|
||||
corners: iconsIcon0MergedSvg2 + '#corners',
|
||||
crop: iconsIcon0MergedSvg2 + '#crop',
|
||||
'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',
|
||||
download: iconsIcon0MergedSvg2 + '#download',
|
||||
'drag-handle-dots': iconsIcon0MergedSvg2 + '#drag-handle-dots',
|
||||
duplicate: iconsIcon0MergedSvg2 + '#duplicate',
|
||||
edit: iconsIcon0MergedSvg2 + '#edit',
|
||||
'external-link': iconsIcon0MergedSvg2 + '#external-link',
|
||||
'fill-fill': iconsIcon0MergedSvg2 + '#fill-fill',
|
||||
'fill-lined-fill': iconsIcon0MergedSvg2 + '#fill-lined-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',
|
||||
heading: iconsIcon0MergedSvg2 + '#heading',
|
||||
'help-circle': iconsIcon0MergedSvg2 + '#help-circle',
|
||||
highlight: iconsIcon0MergedSvg2 + '#highlight',
|
||||
'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',
|
||||
italic: iconsIcon0MergedSvg2 + '#italic',
|
||||
leading: iconsIcon0MergedSvg2 + '#leading',
|
||||
link: iconsIcon0MergedSvg2 + '#link',
|
||||
list: iconsIcon0MergedSvg2 + '#list',
|
||||
lock: iconsIcon0MergedSvg2 + '#lock',
|
||||
manual: iconsIcon0MergedSvg2 + '#manual',
|
||||
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',
|
||||
strike: iconsIcon0MergedSvg2 + '#strike',
|
||||
'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',
|
||||
underline: iconsIcon0MergedSvg2 + '#underline',
|
||||
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(translationsArJson, opts),
|
||||
bn: formatAssetUrl(translationsBnJson, opts),
|
||||
ca: formatAssetUrl(translationsCaJson, opts),
|
||||
cs: formatAssetUrl(translationsCsJson, opts),
|
||||
da: formatAssetUrl(translationsDaJson, opts),
|
||||
de: formatAssetUrl(translationsDeJson, opts),
|
||||
el: formatAssetUrl(translationsElJson, 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),
|
||||
'gu-in': formatAssetUrl(translationsGuInJson, 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),
|
||||
'km-kh': formatAssetUrl(translationsKmKhJson, opts),
|
||||
kn: formatAssetUrl(translationsKnJson, opts),
|
||||
'ko-kr': formatAssetUrl(translationsKoKrJson, opts),
|
||||
ku: formatAssetUrl(translationsKuJson, opts),
|
||||
languages: formatAssetUrl(translationsLanguagesJson, opts),
|
||||
main: formatAssetUrl(translationsMainJson, opts),
|
||||
ml: formatAssetUrl(translationsMlJson, opts),
|
||||
mr: formatAssetUrl(translationsMrJson, opts),
|
||||
ms: formatAssetUrl(translationsMsJson, opts),
|
||||
my: formatAssetUrl(translationsMyJson, opts),
|
||||
ne: formatAssetUrl(translationsNeJson, opts),
|
||||
nl: formatAssetUrl(translationsNlJson, opts),
|
||||
no: formatAssetUrl(translationsNoJson, opts),
|
||||
pa: formatAssetUrl(translationsPaJson, 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),
|
||||
so: formatAssetUrl(translationsSoJson, opts),
|
||||
sv: formatAssetUrl(translationsSvJson, opts),
|
||||
ta: formatAssetUrl(translationsTaJson, opts),
|
||||
te: formatAssetUrl(translationsTeJson, opts),
|
||||
th: formatAssetUrl(translationsThJson, opts),
|
||||
tl: formatAssetUrl(translationsTlJson, opts),
|
||||
tr: formatAssetUrl(translationsTrJson, opts),
|
||||
uk: formatAssetUrl(translationsUkJson, opts),
|
||||
ur: formatAssetUrl(translationsUrJson, opts),
|
||||
vi: formatAssetUrl(translationsViJson, opts),
|
||||
'zh-cn': formatAssetUrl(translationsZhCnJson, opts),
|
||||
'zh-tw': formatAssetUrl(translationsZhTwJson, opts),
|
||||
},
|
||||
embedIcons: {
|
||||
canva: formatAssetUrl(embedIconsCanvaPng, 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),
|
||||
},
|
||||
}
|
||||
}
|
||||
2
packages/assets/imports.vite.d.ts
vendored
Normal file
2
packages/assets/imports.vite.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { AssetUrlOptions, AssetUrls } from './types'
|
||||
export function getAssetUrlsByImport(opts?: AssetUrlOptions): AssetUrls
|
||||
364
packages/assets/imports.vite.js
Normal file
364
packages/assets/imports.vite.js
Normal file
@@ -0,0 +1,364 @@
|
||||
// This file is automatically generated by internal/scripts/refresh-assets.ts.
|
||||
// Do not edit manually. Or do, I'm a comment, not a cop.
|
||||
|
||||
import embedIconsCanvaPngUrl from './embed-icons/canva.png?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 fontsIBMPlexMonoBoldWoff2Url from './fonts/IBMPlexMono-Bold.woff2?url'
|
||||
import fontsIBMPlexMonoBoldItalicWoff2Url from './fonts/IBMPlexMono-BoldItalic.woff2?url'
|
||||
import fontsIBMPlexMonoMediumWoff2Url from './fonts/IBMPlexMono-Medium.woff2?url'
|
||||
import fontsIBMPlexMonoMediumItalicWoff2Url from './fonts/IBMPlexMono-MediumItalic.woff2?url'
|
||||
import fontsIBMPlexSansBoldWoff2Url from './fonts/IBMPlexSans-Bold.woff2?url'
|
||||
import fontsIBMPlexSansBoldItalicWoff2Url from './fonts/IBMPlexSans-BoldItalic.woff2?url'
|
||||
import fontsIBMPlexSansMediumWoff2Url from './fonts/IBMPlexSans-Medium.woff2?url'
|
||||
import fontsIBMPlexSansMediumItalicWoff2Url from './fonts/IBMPlexSans-MediumItalic.woff2?url'
|
||||
import fontsIBMPlexSerifBoldWoff2Url from './fonts/IBMPlexSerif-Bold.woff2?url'
|
||||
import fontsIBMPlexSerifBoldItalicWoff2Url from './fonts/IBMPlexSerif-BoldItalic.woff2?url'
|
||||
import fontsIBMPlexSerifMediumWoff2Url from './fonts/IBMPlexSerif-Medium.woff2?url'
|
||||
import fontsIBMPlexSerifMediumItalicWoff2Url from './fonts/IBMPlexSerif-MediumItalic.woff2?url'
|
||||
import fontsShantellSansInformalBoldWoff2Url from './fonts/Shantell_Sans-Informal_Bold.woff2?url'
|
||||
import fontsShantellSansInformalBoldItalicWoff2Url from './fonts/Shantell_Sans-Informal_Bold_Italic.woff2?url'
|
||||
import fontsShantellSansInformalRegularWoff2Url from './fonts/Shantell_Sans-Informal_Regular.woff2?url'
|
||||
import fontsShantellSansInformalRegularItalicWoff2Url from './fonts/Shantell_Sans-Informal_Regular_Italic.woff2?url'
|
||||
import iconsIcon0MergedSvgUrl from './icons/icon/0_merged.svg?url'
|
||||
import translationsArJsonUrl from './translations/ar.json?url'
|
||||
import translationsBnJsonUrl from './translations/bn.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 translationsElJsonUrl from './translations/el.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 translationsGuInJsonUrl from './translations/gu-in.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 translationsKmKhJsonUrl from './translations/km-kh.json?url'
|
||||
import translationsKnJsonUrl from './translations/kn.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 translationsMlJsonUrl from './translations/ml.json?url'
|
||||
import translationsMrJsonUrl from './translations/mr.json?url'
|
||||
import translationsMsJsonUrl from './translations/ms.json?url'
|
||||
import translationsMyJsonUrl from './translations/my.json?url'
|
||||
import translationsNeJsonUrl from './translations/ne.json?url'
|
||||
import translationsNlJsonUrl from './translations/nl.json?url'
|
||||
import translationsNoJsonUrl from './translations/no.json?url'
|
||||
import translationsPaJsonUrl from './translations/pa.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 translationsSoJsonUrl from './translations/so.json?url'
|
||||
import translationsSvJsonUrl from './translations/sv.json?url'
|
||||
import translationsTaJsonUrl from './translations/ta.json?url'
|
||||
import translationsTeJsonUrl from './translations/te.json?url'
|
||||
import translationsThJsonUrl from './translations/th.json?url'
|
||||
import translationsTlJsonUrl from './translations/tl.json?url'
|
||||
import translationsTrJsonUrl from './translations/tr.json?url'
|
||||
import translationsUkJsonUrl from './translations/uk.json?url'
|
||||
import translationsUrJsonUrl from './translations/ur.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'
|
||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||
/// <reference path="./modules.d.ts" />
|
||||
import { formatAssetUrl } from './utils.js'
|
||||
|
||||
/**
|
||||
* @param {AssetUrlOptions} [opts]
|
||||
* @public
|
||||
*/
|
||||
export function getAssetUrlsByImport(opts) {
|
||||
const iconsIcon0MergedSvg2 = formatAssetUrl(iconsIcon0MergedSvgUrl, opts)
|
||||
return {
|
||||
fonts: {
|
||||
tldraw_mono_bold: formatAssetUrl(fontsIBMPlexMonoBoldWoff2Url, opts),
|
||||
tldraw_mono_italic_bold: formatAssetUrl(fontsIBMPlexMonoBoldItalicWoff2Url, opts),
|
||||
tldraw_mono: formatAssetUrl(fontsIBMPlexMonoMediumWoff2Url, opts),
|
||||
tldraw_mono_italic: formatAssetUrl(fontsIBMPlexMonoMediumItalicWoff2Url, opts),
|
||||
tldraw_sans_bold: formatAssetUrl(fontsIBMPlexSansBoldWoff2Url, opts),
|
||||
tldraw_sans_italic_bold: formatAssetUrl(fontsIBMPlexSansBoldItalicWoff2Url, opts),
|
||||
tldraw_sans: formatAssetUrl(fontsIBMPlexSansMediumWoff2Url, opts),
|
||||
tldraw_sans_italic: formatAssetUrl(fontsIBMPlexSansMediumItalicWoff2Url, opts),
|
||||
tldraw_serif_bold: formatAssetUrl(fontsIBMPlexSerifBoldWoff2Url, opts),
|
||||
tldraw_serif_italic_bold: formatAssetUrl(fontsIBMPlexSerifBoldItalicWoff2Url, opts),
|
||||
tldraw_serif: formatAssetUrl(fontsIBMPlexSerifMediumWoff2Url, opts),
|
||||
tldraw_serif_italic: formatAssetUrl(fontsIBMPlexSerifMediumItalicWoff2Url, opts),
|
||||
tldraw_draw_bold: formatAssetUrl(fontsShantellSansInformalBoldWoff2Url, opts),
|
||||
tldraw_draw_italic_bold: formatAssetUrl(fontsShantellSansInformalBoldItalicWoff2Url, opts),
|
||||
tldraw_draw: formatAssetUrl(fontsShantellSansInformalRegularWoff2Url, opts),
|
||||
tldraw_draw_italic: formatAssetUrl(fontsShantellSansInformalRegularItalicWoff2Url, opts),
|
||||
},
|
||||
icons: {
|
||||
'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',
|
||||
alt: iconsIcon0MergedSvg2 + '#alt',
|
||||
'arrow-arc': iconsIcon0MergedSvg2 + '#arrow-arc',
|
||||
'arrow-cycle': iconsIcon0MergedSvg2 + '#arrow-cycle',
|
||||
'arrow-elbow': iconsIcon0MergedSvg2 + '#arrow-elbow',
|
||||
'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',
|
||||
bold: iconsIcon0MergedSvg2 + '#bold',
|
||||
bookmark: iconsIcon0MergedSvg2 + '#bookmark',
|
||||
'bring-forward': iconsIcon0MergedSvg2 + '#bring-forward',
|
||||
'bring-to-front': iconsIcon0MergedSvg2 + '#bring-to-front',
|
||||
broken: iconsIcon0MergedSvg2 + '#broken',
|
||||
bulletList: iconsIcon0MergedSvg2 + '#bulletList',
|
||||
'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',
|
||||
closed: iconsIcon0MergedSvg2 + '#closed',
|
||||
code: iconsIcon0MergedSvg2 + '#code',
|
||||
color: iconsIcon0MergedSvg2 + '#color',
|
||||
comment: iconsIcon0MergedSvg2 + '#comment',
|
||||
corners: iconsIcon0MergedSvg2 + '#corners',
|
||||
crop: iconsIcon0MergedSvg2 + '#crop',
|
||||
'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',
|
||||
download: iconsIcon0MergedSvg2 + '#download',
|
||||
'drag-handle-dots': iconsIcon0MergedSvg2 + '#drag-handle-dots',
|
||||
duplicate: iconsIcon0MergedSvg2 + '#duplicate',
|
||||
edit: iconsIcon0MergedSvg2 + '#edit',
|
||||
'external-link': iconsIcon0MergedSvg2 + '#external-link',
|
||||
'fill-fill': iconsIcon0MergedSvg2 + '#fill-fill',
|
||||
'fill-lined-fill': iconsIcon0MergedSvg2 + '#fill-lined-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',
|
||||
heading: iconsIcon0MergedSvg2 + '#heading',
|
||||
'help-circle': iconsIcon0MergedSvg2 + '#help-circle',
|
||||
highlight: iconsIcon0MergedSvg2 + '#highlight',
|
||||
'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',
|
||||
italic: iconsIcon0MergedSvg2 + '#italic',
|
||||
leading: iconsIcon0MergedSvg2 + '#leading',
|
||||
link: iconsIcon0MergedSvg2 + '#link',
|
||||
list: iconsIcon0MergedSvg2 + '#list',
|
||||
lock: iconsIcon0MergedSvg2 + '#lock',
|
||||
manual: iconsIcon0MergedSvg2 + '#manual',
|
||||
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',
|
||||
strike: iconsIcon0MergedSvg2 + '#strike',
|
||||
'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',
|
||||
underline: iconsIcon0MergedSvg2 + '#underline',
|
||||
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(translationsArJsonUrl, opts),
|
||||
bn: formatAssetUrl(translationsBnJsonUrl, opts),
|
||||
ca: formatAssetUrl(translationsCaJsonUrl, opts),
|
||||
cs: formatAssetUrl(translationsCsJsonUrl, opts),
|
||||
da: formatAssetUrl(translationsDaJsonUrl, opts),
|
||||
de: formatAssetUrl(translationsDeJsonUrl, opts),
|
||||
el: formatAssetUrl(translationsElJsonUrl, 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),
|
||||
'gu-in': formatAssetUrl(translationsGuInJsonUrl, 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),
|
||||
'km-kh': formatAssetUrl(translationsKmKhJsonUrl, opts),
|
||||
kn: formatAssetUrl(translationsKnJsonUrl, opts),
|
||||
'ko-kr': formatAssetUrl(translationsKoKrJsonUrl, opts),
|
||||
ku: formatAssetUrl(translationsKuJsonUrl, opts),
|
||||
languages: formatAssetUrl(translationsLanguagesJsonUrl, opts),
|
||||
main: formatAssetUrl(translationsMainJsonUrl, opts),
|
||||
ml: formatAssetUrl(translationsMlJsonUrl, opts),
|
||||
mr: formatAssetUrl(translationsMrJsonUrl, opts),
|
||||
ms: formatAssetUrl(translationsMsJsonUrl, opts),
|
||||
my: formatAssetUrl(translationsMyJsonUrl, opts),
|
||||
ne: formatAssetUrl(translationsNeJsonUrl, opts),
|
||||
nl: formatAssetUrl(translationsNlJsonUrl, opts),
|
||||
no: formatAssetUrl(translationsNoJsonUrl, opts),
|
||||
pa: formatAssetUrl(translationsPaJsonUrl, 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),
|
||||
so: formatAssetUrl(translationsSoJsonUrl, opts),
|
||||
sv: formatAssetUrl(translationsSvJsonUrl, opts),
|
||||
ta: formatAssetUrl(translationsTaJsonUrl, opts),
|
||||
te: formatAssetUrl(translationsTeJsonUrl, opts),
|
||||
th: formatAssetUrl(translationsThJsonUrl, opts),
|
||||
tl: formatAssetUrl(translationsTlJsonUrl, opts),
|
||||
tr: formatAssetUrl(translationsTrJsonUrl, opts),
|
||||
uk: formatAssetUrl(translationsUkJsonUrl, opts),
|
||||
ur: formatAssetUrl(translationsUrJsonUrl, opts),
|
||||
vi: formatAssetUrl(translationsViJsonUrl, opts),
|
||||
'zh-cn': formatAssetUrl(translationsZhCnJsonUrl, opts),
|
||||
'zh-tw': formatAssetUrl(translationsZhTwJsonUrl, opts),
|
||||
},
|
||||
embedIcons: {
|
||||
canva: formatAssetUrl(embedIconsCanvaPngUrl, 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),
|
||||
},
|
||||
}
|
||||
}
|
||||
16
packages/assets/modules.d.ts
vendored
Normal file
16
packages/assets/modules.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
declare module '*.svg' {
|
||||
const url: string
|
||||
export default url
|
||||
}
|
||||
declare module '*.png' {
|
||||
const url: string
|
||||
export default url
|
||||
}
|
||||
declare module '*.json' {
|
||||
const url: string
|
||||
export default url
|
||||
}
|
||||
declare module '*.woff2' {
|
||||
const url: string
|
||||
export default url
|
||||
}
|
||||
67
packages/assets/package.json
Normal file
67
packages/assets/package.json
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"name": "@tldraw/assets",
|
||||
"description": "tldraw infinite canvas SDK (assets).",
|
||||
"version": "5.4.2",
|
||||
"author": {
|
||||
"name": "tldraw Inc.",
|
||||
"email": "hello@tldraw.com"
|
||||
},
|
||||
"homepage": "https://tldraw.dev",
|
||||
"license": "SEE LICENSE IN LICENSE.md",
|
||||
"tldraw_product": {
|
||||
"stableId": "tldraw:sdk-core",
|
||||
"name": "SDK",
|
||||
"type": "product",
|
||||
"premium": false
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tldraw/tldraw"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/tldraw/tldraw/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"tldraw",
|
||||
"sdk",
|
||||
"drawing",
|
||||
"app",
|
||||
"development",
|
||||
"whiteboard",
|
||||
"canvas",
|
||||
"infinite"
|
||||
],
|
||||
"files": [
|
||||
"embed-icons",
|
||||
"icons",
|
||||
"fonts",
|
||||
"translations",
|
||||
"imports.js",
|
||||
"imports.d.ts",
|
||||
"imports.vite.js",
|
||||
"imports.vite.d.ts",
|
||||
"selfHosted.js",
|
||||
"selfHosted.d.ts",
|
||||
"types.d.ts",
|
||||
"urls.js",
|
||||
"urls.d.ts",
|
||||
"utils.js",
|
||||
"utils.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"pack-tarball": "yarn pack",
|
||||
"lint": "yarn run -T tsx ../../internal/scripts/lint.ts",
|
||||
"test-coverage": "yarn run -T vitest run --coverage --passWithNoTests"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tldraw/utils": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lazyrepo": "0.0.0-alpha.27",
|
||||
"ts-node-dev": "^1.1.8",
|
||||
"typescript": "^7.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
}
|
||||
}
|
||||
2
packages/assets/selfHosted.d.ts
vendored
Normal file
2
packages/assets/selfHosted.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { AssetUrlOptions, AssetUrls } from './types'
|
||||
export function getAssetUrls(opts?: AssetUrlOptions): AssetUrls
|
||||
281
packages/assets/selfHosted.js
Normal file
281
packages/assets/selfHosted.js
Normal file
@@ -0,0 +1,281 @@
|
||||
// This file is automatically generated by internal/scripts/refresh-assets.ts.
|
||||
// Do not edit manually. Or do, I'm a comment, not a cop.
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||
/// <reference path="./modules.d.ts" />
|
||||
import { formatAssetUrl } from './utils.js'
|
||||
|
||||
/**
|
||||
* @param {AssetUrlOptions} [opts]
|
||||
* @public
|
||||
*/
|
||||
export function getAssetUrls(opts) {
|
||||
const iconsIcon0MergedSvg = formatAssetUrl('./icons/icon/0_merged.svg', opts)
|
||||
return {
|
||||
fonts: {
|
||||
tldraw_mono_bold: formatAssetUrl('./fonts/IBMPlexMono-Bold.woff2', opts),
|
||||
tldraw_mono_italic_bold: formatAssetUrl('./fonts/IBMPlexMono-BoldItalic.woff2', opts),
|
||||
tldraw_mono: formatAssetUrl('./fonts/IBMPlexMono-Medium.woff2', opts),
|
||||
tldraw_mono_italic: formatAssetUrl('./fonts/IBMPlexMono-MediumItalic.woff2', opts),
|
||||
tldraw_sans_bold: formatAssetUrl('./fonts/IBMPlexSans-Bold.woff2', opts),
|
||||
tldraw_sans_italic_bold: formatAssetUrl('./fonts/IBMPlexSans-BoldItalic.woff2', opts),
|
||||
tldraw_sans: formatAssetUrl('./fonts/IBMPlexSans-Medium.woff2', opts),
|
||||
tldraw_sans_italic: formatAssetUrl('./fonts/IBMPlexSans-MediumItalic.woff2', opts),
|
||||
tldraw_serif_bold: formatAssetUrl('./fonts/IBMPlexSerif-Bold.woff2', opts),
|
||||
tldraw_serif_italic_bold: formatAssetUrl('./fonts/IBMPlexSerif-BoldItalic.woff2', opts),
|
||||
tldraw_serif: formatAssetUrl('./fonts/IBMPlexSerif-Medium.woff2', opts),
|
||||
tldraw_serif_italic: formatAssetUrl('./fonts/IBMPlexSerif-MediumItalic.woff2', opts),
|
||||
tldraw_draw_bold: formatAssetUrl('./fonts/Shantell_Sans-Informal_Bold.woff2', opts),
|
||||
tldraw_draw_italic_bold: formatAssetUrl(
|
||||
'./fonts/Shantell_Sans-Informal_Bold_Italic.woff2',
|
||||
opts
|
||||
),
|
||||
tldraw_draw: formatAssetUrl('./fonts/Shantell_Sans-Informal_Regular.woff2', opts),
|
||||
tldraw_draw_italic: formatAssetUrl(
|
||||
'./fonts/Shantell_Sans-Informal_Regular_Italic.woff2',
|
||||
opts
|
||||
),
|
||||
},
|
||||
icons: {
|
||||
'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',
|
||||
alt: iconsIcon0MergedSvg + '#alt',
|
||||
'arrow-arc': iconsIcon0MergedSvg + '#arrow-arc',
|
||||
'arrow-cycle': iconsIcon0MergedSvg + '#arrow-cycle',
|
||||
'arrow-elbow': iconsIcon0MergedSvg + '#arrow-elbow',
|
||||
'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',
|
||||
bold: iconsIcon0MergedSvg + '#bold',
|
||||
bookmark: iconsIcon0MergedSvg + '#bookmark',
|
||||
'bring-forward': iconsIcon0MergedSvg + '#bring-forward',
|
||||
'bring-to-front': iconsIcon0MergedSvg + '#bring-to-front',
|
||||
broken: iconsIcon0MergedSvg + '#broken',
|
||||
bulletList: iconsIcon0MergedSvg + '#bulletList',
|
||||
'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',
|
||||
closed: iconsIcon0MergedSvg + '#closed',
|
||||
code: iconsIcon0MergedSvg + '#code',
|
||||
color: iconsIcon0MergedSvg + '#color',
|
||||
comment: iconsIcon0MergedSvg + '#comment',
|
||||
corners: iconsIcon0MergedSvg + '#corners',
|
||||
crop: iconsIcon0MergedSvg + '#crop',
|
||||
'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',
|
||||
download: iconsIcon0MergedSvg + '#download',
|
||||
'drag-handle-dots': iconsIcon0MergedSvg + '#drag-handle-dots',
|
||||
duplicate: iconsIcon0MergedSvg + '#duplicate',
|
||||
edit: iconsIcon0MergedSvg + '#edit',
|
||||
'external-link': iconsIcon0MergedSvg + '#external-link',
|
||||
'fill-fill': iconsIcon0MergedSvg + '#fill-fill',
|
||||
'fill-lined-fill': iconsIcon0MergedSvg + '#fill-lined-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',
|
||||
heading: iconsIcon0MergedSvg + '#heading',
|
||||
'help-circle': iconsIcon0MergedSvg + '#help-circle',
|
||||
highlight: iconsIcon0MergedSvg + '#highlight',
|
||||
'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',
|
||||
italic: iconsIcon0MergedSvg + '#italic',
|
||||
leading: iconsIcon0MergedSvg + '#leading',
|
||||
link: iconsIcon0MergedSvg + '#link',
|
||||
list: iconsIcon0MergedSvg + '#list',
|
||||
lock: iconsIcon0MergedSvg + '#lock',
|
||||
manual: iconsIcon0MergedSvg + '#manual',
|
||||
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',
|
||||
strike: iconsIcon0MergedSvg + '#strike',
|
||||
'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',
|
||||
underline: iconsIcon0MergedSvg + '#underline',
|
||||
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),
|
||||
bn: formatAssetUrl('./translations/bn.json', opts),
|
||||
ca: formatAssetUrl('./translations/ca.json', opts),
|
||||
cs: formatAssetUrl('./translations/cs.json', opts),
|
||||
da: formatAssetUrl('./translations/da.json', opts),
|
||||
de: formatAssetUrl('./translations/de.json', opts),
|
||||
el: formatAssetUrl('./translations/el.json', opts),
|
||||
en: formatAssetUrl('./translations/en.json', opts),
|
||||
es: formatAssetUrl('./translations/es.json', opts),
|
||||
fa: formatAssetUrl('./translations/fa.json', opts),
|
||||
fi: formatAssetUrl('./translations/fi.json', opts),
|
||||
fr: formatAssetUrl('./translations/fr.json', opts),
|
||||
gl: formatAssetUrl('./translations/gl.json', opts),
|
||||
'gu-in': formatAssetUrl('./translations/gu-in.json', opts),
|
||||
he: formatAssetUrl('./translations/he.json', opts),
|
||||
'hi-in': formatAssetUrl('./translations/hi-in.json', opts),
|
||||
hr: formatAssetUrl('./translations/hr.json', opts),
|
||||
hu: formatAssetUrl('./translations/hu.json', opts),
|
||||
id: formatAssetUrl('./translations/id.json', opts),
|
||||
it: formatAssetUrl('./translations/it.json', opts),
|
||||
ja: formatAssetUrl('./translations/ja.json', opts),
|
||||
'km-kh': formatAssetUrl('./translations/km-kh.json', opts),
|
||||
kn: formatAssetUrl('./translations/kn.json', opts),
|
||||
'ko-kr': formatAssetUrl('./translations/ko-kr.json', opts),
|
||||
ku: formatAssetUrl('./translations/ku.json', opts),
|
||||
languages: formatAssetUrl('./translations/languages.json', opts),
|
||||
main: formatAssetUrl('./translations/main.json', opts),
|
||||
ml: formatAssetUrl('./translations/ml.json', opts),
|
||||
mr: formatAssetUrl('./translations/mr.json', opts),
|
||||
ms: formatAssetUrl('./translations/ms.json', opts),
|
||||
my: formatAssetUrl('./translations/my.json', opts),
|
||||
ne: formatAssetUrl('./translations/ne.json', opts),
|
||||
nl: formatAssetUrl('./translations/nl.json', opts),
|
||||
no: formatAssetUrl('./translations/no.json', opts),
|
||||
pa: formatAssetUrl('./translations/pa.json', opts),
|
||||
pl: formatAssetUrl('./translations/pl.json', opts),
|
||||
'pt-br': formatAssetUrl('./translations/pt-br.json', opts),
|
||||
'pt-pt': formatAssetUrl('./translations/pt-pt.json', opts),
|
||||
ro: formatAssetUrl('./translations/ro.json', opts),
|
||||
ru: formatAssetUrl('./translations/ru.json', opts),
|
||||
sl: formatAssetUrl('./translations/sl.json', opts),
|
||||
so: formatAssetUrl('./translations/so.json', opts),
|
||||
sv: formatAssetUrl('./translations/sv.json', opts),
|
||||
ta: formatAssetUrl('./translations/ta.json', opts),
|
||||
te: formatAssetUrl('./translations/te.json', opts),
|
||||
th: formatAssetUrl('./translations/th.json', opts),
|
||||
tl: formatAssetUrl('./translations/tl.json', opts),
|
||||
tr: formatAssetUrl('./translations/tr.json', opts),
|
||||
uk: formatAssetUrl('./translations/uk.json', opts),
|
||||
ur: formatAssetUrl('./translations/ur.json', opts),
|
||||
vi: formatAssetUrl('./translations/vi.json', opts),
|
||||
'zh-cn': formatAssetUrl('./translations/zh-cn.json', opts),
|
||||
'zh-tw': formatAssetUrl('./translations/zh-tw.json', opts),
|
||||
},
|
||||
embedIcons: {
|
||||
canva: formatAssetUrl('./embed-icons/canva.png', opts),
|
||||
codepen: formatAssetUrl('./embed-icons/codepen.png', opts),
|
||||
codesandbox: formatAssetUrl('./embed-icons/codesandbox.png', opts),
|
||||
desmos: formatAssetUrl('./embed-icons/desmos.png', opts),
|
||||
excalidraw: formatAssetUrl('./embed-icons/excalidraw.png', opts),
|
||||
felt: formatAssetUrl('./embed-icons/felt.png', opts),
|
||||
figma: formatAssetUrl('./embed-icons/figma.png', opts),
|
||||
github_gist: formatAssetUrl('./embed-icons/github_gist.png', opts),
|
||||
google_calendar: formatAssetUrl('./embed-icons/google_calendar.png', opts),
|
||||
google_maps: formatAssetUrl('./embed-icons/google_maps.png', opts),
|
||||
google_slides: formatAssetUrl('./embed-icons/google_slides.png', opts),
|
||||
observable: formatAssetUrl('./embed-icons/observable.png', opts),
|
||||
replit: formatAssetUrl('./embed-icons/replit.png', opts),
|
||||
scratch: formatAssetUrl('./embed-icons/scratch.png', opts),
|
||||
spotify: formatAssetUrl('./embed-icons/spotify.png', opts),
|
||||
tldraw: formatAssetUrl('./embed-icons/tldraw.png', opts),
|
||||
val_town: formatAssetUrl('./embed-icons/val_town.png', opts),
|
||||
vimeo: formatAssetUrl('./embed-icons/vimeo.png', opts),
|
||||
youtube: formatAssetUrl('./embed-icons/youtube.png', opts),
|
||||
},
|
||||
}
|
||||
}
|
||||
14
packages/assets/tsconfig.json
Normal file
14
packages/assets/tsconfig.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "../../internal/config/tsconfig.base.json",
|
||||
"include": [
|
||||
"urls.js",
|
||||
"imports.js",
|
||||
"imports.vite.js",
|
||||
"selfHosted.js",
|
||||
"utils.js",
|
||||
"modules.d.ts"
|
||||
],
|
||||
"exclude": ["node_modules", "dist", ".tsbuild*"],
|
||||
"compilerOptions": { "outDir": "./.tsbuild", "rootDir": "src", "resolveJsonModule": false },
|
||||
"references": [{ "path": "../utils" }]
|
||||
}
|
||||
266
packages/assets/types.d.ts
vendored
Normal file
266
packages/assets/types.d.ts
vendored
Normal file
@@ -0,0 +1,266 @@
|
||||
// This file is automatically generated by internal/scripts/refresh-assets.ts.
|
||||
// Do not edit manually. Or do, I'm a comment, not a cop.
|
||||
|
||||
export type AssetUrl = string | { src: string }
|
||||
export type AssetUrlOptions = { baseUrl?: string } | ((assetUrl: string) => string)
|
||||
export type AssetUrls = {
|
||||
fonts: {
|
||||
tldraw_mono_bold: string
|
||||
tldraw_mono_italic_bold: string
|
||||
tldraw_mono: string
|
||||
tldraw_mono_italic: string
|
||||
tldraw_sans_bold: string
|
||||
tldraw_sans_italic_bold: string
|
||||
tldraw_sans: string
|
||||
tldraw_sans_italic: string
|
||||
tldraw_serif_bold: string
|
||||
tldraw_serif_italic_bold: string
|
||||
tldraw_serif: string
|
||||
tldraw_serif_italic: string
|
||||
tldraw_draw_bold: string
|
||||
tldraw_draw_italic_bold: string
|
||||
tldraw_draw: string
|
||||
tldraw_draw_italic: string
|
||||
}
|
||||
icons: {
|
||||
'align-bottom': string
|
||||
'align-center-horizontal': string
|
||||
'align-center-vertical': string
|
||||
'align-left': string
|
||||
'align-right': string
|
||||
'align-top': string
|
||||
alt: string
|
||||
'arrow-arc': string
|
||||
'arrow-cycle': string
|
||||
'arrow-elbow': string
|
||||
'arrow-left': string
|
||||
'arrowhead-arrow': string
|
||||
'arrowhead-bar': string
|
||||
'arrowhead-diamond': string
|
||||
'arrowhead-dot': string
|
||||
'arrowhead-none': string
|
||||
'arrowhead-square': string
|
||||
'arrowhead-triangle-inverted': string
|
||||
'arrowhead-triangle': string
|
||||
blob: string
|
||||
bold: string
|
||||
bookmark: string
|
||||
'bring-forward': string
|
||||
'bring-to-front': string
|
||||
broken: string
|
||||
bulletList: string
|
||||
'check-circle': string
|
||||
check: string
|
||||
'chevron-down': string
|
||||
'chevron-left': string
|
||||
'chevron-right': string
|
||||
'chevron-up': string
|
||||
'chevrons-ne': string
|
||||
'chevrons-sw': string
|
||||
'clipboard-copied': string
|
||||
'clipboard-copy': string
|
||||
closed: string
|
||||
code: string
|
||||
color: string
|
||||
comment: string
|
||||
corners: string
|
||||
crop: string
|
||||
'cross-2': string
|
||||
'cross-circle': string
|
||||
'dash-dashed': string
|
||||
'dash-dotted': string
|
||||
'dash-draw': string
|
||||
'dash-solid': string
|
||||
disconnected: string
|
||||
discord: string
|
||||
'distribute-horizontal': string
|
||||
'distribute-vertical': string
|
||||
dot: string
|
||||
'dots-horizontal': string
|
||||
'dots-vertical': string
|
||||
download: string
|
||||
'drag-handle-dots': string
|
||||
duplicate: string
|
||||
edit: string
|
||||
'external-link': string
|
||||
'fill-fill': string
|
||||
'fill-lined-fill': string
|
||||
'fill-none': string
|
||||
'fill-pattern': string
|
||||
'fill-semi': string
|
||||
'fill-solid': string
|
||||
follow: string
|
||||
following: string
|
||||
'font-draw': string
|
||||
'font-mono': string
|
||||
'font-sans': string
|
||||
'font-serif': string
|
||||
'geo-arrow-down': string
|
||||
'geo-arrow-left': string
|
||||
'geo-arrow-right': string
|
||||
'geo-arrow-up': string
|
||||
'geo-check-box': string
|
||||
'geo-cloud': string
|
||||
'geo-diamond': string
|
||||
'geo-ellipse': string
|
||||
'geo-heart': string
|
||||
'geo-hexagon': string
|
||||
'geo-octagon': string
|
||||
'geo-oval': string
|
||||
'geo-pentagon': string
|
||||
'geo-rectangle': string
|
||||
'geo-rhombus-2': string
|
||||
'geo-rhombus': string
|
||||
'geo-star': string
|
||||
'geo-trapezoid': string
|
||||
'geo-triangle': string
|
||||
'geo-x-box': string
|
||||
github: string
|
||||
group: string
|
||||
heading: string
|
||||
'help-circle': string
|
||||
highlight: string
|
||||
'horizontal-align-end': string
|
||||
'horizontal-align-middle': string
|
||||
'horizontal-align-start': string
|
||||
'info-circle': string
|
||||
italic: string
|
||||
leading: string
|
||||
link: string
|
||||
list: string
|
||||
lock: string
|
||||
manual: string
|
||||
menu: string
|
||||
minus: string
|
||||
mixed: string
|
||||
pack: string
|
||||
plus: string
|
||||
'question-mark-circle': string
|
||||
'question-mark': string
|
||||
redo: string
|
||||
'reset-zoom': string
|
||||
'rotate-ccw': string
|
||||
'rotate-cw': string
|
||||
'send-backward': string
|
||||
'send-to-back': string
|
||||
'share-1': string
|
||||
'size-extra-large': string
|
||||
'size-large': string
|
||||
'size-medium': string
|
||||
'size-small': string
|
||||
'spline-cubic': string
|
||||
'spline-line': string
|
||||
'stack-horizontal': string
|
||||
'stack-vertical': string
|
||||
'status-offline': string
|
||||
'stretch-horizontal': string
|
||||
'stretch-vertical': string
|
||||
strike: string
|
||||
'text-align-center': string
|
||||
'text-align-left': string
|
||||
'text-align-right': string
|
||||
'toggle-off': string
|
||||
'toggle-on': string
|
||||
'tool-arrow': string
|
||||
'tool-eraser': string
|
||||
'tool-frame': string
|
||||
'tool-hand': string
|
||||
'tool-highlight': string
|
||||
'tool-laser': string
|
||||
'tool-line': string
|
||||
'tool-media': string
|
||||
'tool-note': string
|
||||
'tool-pencil': string
|
||||
'tool-pointer': string
|
||||
'tool-screenshot': string
|
||||
'tool-text': string
|
||||
trash: string
|
||||
twitter: string
|
||||
underline: string
|
||||
undo: string
|
||||
ungroup: string
|
||||
unlock: string
|
||||
'vertical-align-end': string
|
||||
'vertical-align-middle': string
|
||||
'vertical-align-start': string
|
||||
'warning-triangle': string
|
||||
'zoom-in': string
|
||||
'zoom-out': string
|
||||
}
|
||||
translations: {
|
||||
ar: string
|
||||
bn: string
|
||||
ca: string
|
||||
cs: string
|
||||
da: string
|
||||
de: string
|
||||
el: string
|
||||
en: string
|
||||
es: string
|
||||
fa: string
|
||||
fi: string
|
||||
fr: string
|
||||
gl: string
|
||||
'gu-in': string
|
||||
he: string
|
||||
'hi-in': string
|
||||
hr: string
|
||||
hu: string
|
||||
id: string
|
||||
it: string
|
||||
ja: string
|
||||
'km-kh': string
|
||||
kn: string
|
||||
'ko-kr': string
|
||||
ku: string
|
||||
languages: string
|
||||
main: string
|
||||
ml: string
|
||||
mr: string
|
||||
ms: string
|
||||
my: string
|
||||
ne: string
|
||||
nl: string
|
||||
no: string
|
||||
pa: string
|
||||
pl: string
|
||||
'pt-br': string
|
||||
'pt-pt': string
|
||||
ro: string
|
||||
ru: string
|
||||
sl: string
|
||||
so: string
|
||||
sv: string
|
||||
ta: string
|
||||
te: string
|
||||
th: string
|
||||
tl: string
|
||||
tr: string
|
||||
uk: string
|
||||
ur: string
|
||||
vi: string
|
||||
'zh-cn': string
|
||||
'zh-tw': string
|
||||
}
|
||||
embedIcons: {
|
||||
canva: string
|
||||
codepen: string
|
||||
codesandbox: string
|
||||
desmos: string
|
||||
excalidraw: string
|
||||
felt: string
|
||||
figma: string
|
||||
github_gist: string
|
||||
google_calendar: string
|
||||
google_maps: string
|
||||
google_slides: string
|
||||
observable: string
|
||||
replit: string
|
||||
scratch: string
|
||||
spotify: string
|
||||
tldraw: string
|
||||
val_town: string
|
||||
vimeo: string
|
||||
youtube: string
|
||||
}
|
||||
}
|
||||
2
packages/assets/urls.d.ts
vendored
Normal file
2
packages/assets/urls.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { AssetUrlOptions, AssetUrls } from './types'
|
||||
export function getAssetUrlsByMetaUrl(opts?: AssetUrlOptions): AssetUrls
|
||||
350
packages/assets/urls.js
Normal file
350
packages/assets/urls.js
Normal file
@@ -0,0 +1,350 @@
|
||||
// This file is automatically generated by internal/scripts/refresh-assets.ts.
|
||||
// Do not edit manually. Or do, I'm a comment, not a cop.
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||
/// <reference path="./modules.d.ts" />
|
||||
import { formatAssetUrl } from './utils.js'
|
||||
|
||||
/**
|
||||
* @param {AssetUrlOptions} [opts]
|
||||
* @public
|
||||
*/
|
||||
export function getAssetUrlsByMetaUrl(opts) {
|
||||
const iconsIcon0MergedSvg = formatAssetUrl(
|
||||
new URL('./icons/icon/0_merged.svg', import.meta.url).href,
|
||||
opts
|
||||
)
|
||||
return {
|
||||
fonts: {
|
||||
tldraw_mono_bold: formatAssetUrl(
|
||||
new URL('./fonts/IBMPlexMono-Bold.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_mono_italic_bold: formatAssetUrl(
|
||||
new URL('./fonts/IBMPlexMono-BoldItalic.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_mono: formatAssetUrl(
|
||||
new URL('./fonts/IBMPlexMono-Medium.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_mono_italic: formatAssetUrl(
|
||||
new URL('./fonts/IBMPlexMono-MediumItalic.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_sans_bold: formatAssetUrl(
|
||||
new URL('./fonts/IBMPlexSans-Bold.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_sans_italic_bold: formatAssetUrl(
|
||||
new URL('./fonts/IBMPlexSans-BoldItalic.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_sans: formatAssetUrl(
|
||||
new URL('./fonts/IBMPlexSans-Medium.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_sans_italic: formatAssetUrl(
|
||||
new URL('./fonts/IBMPlexSans-MediumItalic.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_serif_bold: formatAssetUrl(
|
||||
new URL('./fonts/IBMPlexSerif-Bold.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_serif_italic_bold: formatAssetUrl(
|
||||
new URL('./fonts/IBMPlexSerif-BoldItalic.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_serif: formatAssetUrl(
|
||||
new URL('./fonts/IBMPlexSerif-Medium.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_serif_italic: formatAssetUrl(
|
||||
new URL('./fonts/IBMPlexSerif-MediumItalic.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_draw_bold: formatAssetUrl(
|
||||
new URL('./fonts/Shantell_Sans-Informal_Bold.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_draw_italic_bold: formatAssetUrl(
|
||||
new URL('./fonts/Shantell_Sans-Informal_Bold_Italic.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_draw: formatAssetUrl(
|
||||
new URL('./fonts/Shantell_Sans-Informal_Regular.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
tldraw_draw_italic: formatAssetUrl(
|
||||
new URL('./fonts/Shantell_Sans-Informal_Regular_Italic.woff2', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
},
|
||||
icons: {
|
||||
'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',
|
||||
alt: iconsIcon0MergedSvg + '#alt',
|
||||
'arrow-arc': iconsIcon0MergedSvg + '#arrow-arc',
|
||||
'arrow-cycle': iconsIcon0MergedSvg + '#arrow-cycle',
|
||||
'arrow-elbow': iconsIcon0MergedSvg + '#arrow-elbow',
|
||||
'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',
|
||||
bold: iconsIcon0MergedSvg + '#bold',
|
||||
bookmark: iconsIcon0MergedSvg + '#bookmark',
|
||||
'bring-forward': iconsIcon0MergedSvg + '#bring-forward',
|
||||
'bring-to-front': iconsIcon0MergedSvg + '#bring-to-front',
|
||||
broken: iconsIcon0MergedSvg + '#broken',
|
||||
bulletList: iconsIcon0MergedSvg + '#bulletList',
|
||||
'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',
|
||||
closed: iconsIcon0MergedSvg + '#closed',
|
||||
code: iconsIcon0MergedSvg + '#code',
|
||||
color: iconsIcon0MergedSvg + '#color',
|
||||
comment: iconsIcon0MergedSvg + '#comment',
|
||||
corners: iconsIcon0MergedSvg + '#corners',
|
||||
crop: iconsIcon0MergedSvg + '#crop',
|
||||
'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',
|
||||
download: iconsIcon0MergedSvg + '#download',
|
||||
'drag-handle-dots': iconsIcon0MergedSvg + '#drag-handle-dots',
|
||||
duplicate: iconsIcon0MergedSvg + '#duplicate',
|
||||
edit: iconsIcon0MergedSvg + '#edit',
|
||||
'external-link': iconsIcon0MergedSvg + '#external-link',
|
||||
'fill-fill': iconsIcon0MergedSvg + '#fill-fill',
|
||||
'fill-lined-fill': iconsIcon0MergedSvg + '#fill-lined-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',
|
||||
heading: iconsIcon0MergedSvg + '#heading',
|
||||
'help-circle': iconsIcon0MergedSvg + '#help-circle',
|
||||
highlight: iconsIcon0MergedSvg + '#highlight',
|
||||
'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',
|
||||
italic: iconsIcon0MergedSvg + '#italic',
|
||||
leading: iconsIcon0MergedSvg + '#leading',
|
||||
link: iconsIcon0MergedSvg + '#link',
|
||||
list: iconsIcon0MergedSvg + '#list',
|
||||
lock: iconsIcon0MergedSvg + '#lock',
|
||||
manual: iconsIcon0MergedSvg + '#manual',
|
||||
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',
|
||||
strike: iconsIcon0MergedSvg + '#strike',
|
||||
'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',
|
||||
underline: iconsIcon0MergedSvg + '#underline',
|
||||
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),
|
||||
bn: formatAssetUrl(new URL('./translations/bn.json', import.meta.url).href, opts),
|
||||
ca: formatAssetUrl(new URL('./translations/ca.json', import.meta.url).href, opts),
|
||||
cs: formatAssetUrl(new URL('./translations/cs.json', import.meta.url).href, opts),
|
||||
da: formatAssetUrl(new URL('./translations/da.json', import.meta.url).href, opts),
|
||||
de: formatAssetUrl(new URL('./translations/de.json', import.meta.url).href, opts),
|
||||
el: formatAssetUrl(new URL('./translations/el.json', import.meta.url).href, opts),
|
||||
en: formatAssetUrl(new URL('./translations/en.json', import.meta.url).href, opts),
|
||||
es: formatAssetUrl(new URL('./translations/es.json', import.meta.url).href, opts),
|
||||
fa: formatAssetUrl(new URL('./translations/fa.json', import.meta.url).href, opts),
|
||||
fi: formatAssetUrl(new URL('./translations/fi.json', import.meta.url).href, opts),
|
||||
fr: formatAssetUrl(new URL('./translations/fr.json', import.meta.url).href, opts),
|
||||
gl: formatAssetUrl(new URL('./translations/gl.json', import.meta.url).href, opts),
|
||||
'gu-in': formatAssetUrl(new URL('./translations/gu-in.json', import.meta.url).href, opts),
|
||||
he: formatAssetUrl(new URL('./translations/he.json', import.meta.url).href, opts),
|
||||
'hi-in': formatAssetUrl(new URL('./translations/hi-in.json', import.meta.url).href, opts),
|
||||
hr: formatAssetUrl(new URL('./translations/hr.json', import.meta.url).href, opts),
|
||||
hu: formatAssetUrl(new URL('./translations/hu.json', import.meta.url).href, opts),
|
||||
id: formatAssetUrl(new URL('./translations/id.json', import.meta.url).href, opts),
|
||||
it: formatAssetUrl(new URL('./translations/it.json', import.meta.url).href, opts),
|
||||
ja: formatAssetUrl(new URL('./translations/ja.json', import.meta.url).href, opts),
|
||||
'km-kh': formatAssetUrl(new URL('./translations/km-kh.json', import.meta.url).href, opts),
|
||||
kn: formatAssetUrl(new URL('./translations/kn.json', import.meta.url).href, opts),
|
||||
'ko-kr': formatAssetUrl(new URL('./translations/ko-kr.json', import.meta.url).href, opts),
|
||||
ku: formatAssetUrl(new URL('./translations/ku.json', import.meta.url).href, opts),
|
||||
languages: formatAssetUrl(
|
||||
new URL('./translations/languages.json', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
main: formatAssetUrl(new URL('./translations/main.json', import.meta.url).href, opts),
|
||||
ml: formatAssetUrl(new URL('./translations/ml.json', import.meta.url).href, opts),
|
||||
mr: formatAssetUrl(new URL('./translations/mr.json', import.meta.url).href, opts),
|
||||
ms: formatAssetUrl(new URL('./translations/ms.json', import.meta.url).href, opts),
|
||||
my: formatAssetUrl(new URL('./translations/my.json', import.meta.url).href, opts),
|
||||
ne: formatAssetUrl(new URL('./translations/ne.json', import.meta.url).href, opts),
|
||||
nl: formatAssetUrl(new URL('./translations/nl.json', import.meta.url).href, opts),
|
||||
no: formatAssetUrl(new URL('./translations/no.json', import.meta.url).href, opts),
|
||||
pa: formatAssetUrl(new URL('./translations/pa.json', import.meta.url).href, opts),
|
||||
pl: formatAssetUrl(new URL('./translations/pl.json', import.meta.url).href, opts),
|
||||
'pt-br': formatAssetUrl(new URL('./translations/pt-br.json', import.meta.url).href, opts),
|
||||
'pt-pt': formatAssetUrl(new URL('./translations/pt-pt.json', import.meta.url).href, opts),
|
||||
ro: formatAssetUrl(new URL('./translations/ro.json', import.meta.url).href, opts),
|
||||
ru: formatAssetUrl(new URL('./translations/ru.json', import.meta.url).href, opts),
|
||||
sl: formatAssetUrl(new URL('./translations/sl.json', import.meta.url).href, opts),
|
||||
so: formatAssetUrl(new URL('./translations/so.json', import.meta.url).href, opts),
|
||||
sv: formatAssetUrl(new URL('./translations/sv.json', import.meta.url).href, opts),
|
||||
ta: formatAssetUrl(new URL('./translations/ta.json', import.meta.url).href, opts),
|
||||
te: formatAssetUrl(new URL('./translations/te.json', import.meta.url).href, opts),
|
||||
th: formatAssetUrl(new URL('./translations/th.json', import.meta.url).href, opts),
|
||||
tl: formatAssetUrl(new URL('./translations/tl.json', import.meta.url).href, opts),
|
||||
tr: formatAssetUrl(new URL('./translations/tr.json', import.meta.url).href, opts),
|
||||
uk: formatAssetUrl(new URL('./translations/uk.json', import.meta.url).href, opts),
|
||||
ur: formatAssetUrl(new URL('./translations/ur.json', import.meta.url).href, opts),
|
||||
vi: formatAssetUrl(new URL('./translations/vi.json', import.meta.url).href, opts),
|
||||
'zh-cn': formatAssetUrl(new URL('./translations/zh-cn.json', import.meta.url).href, opts),
|
||||
'zh-tw': formatAssetUrl(new URL('./translations/zh-tw.json', import.meta.url).href, opts),
|
||||
},
|
||||
embedIcons: {
|
||||
canva: formatAssetUrl(new URL('./embed-icons/canva.png', import.meta.url).href, opts),
|
||||
codepen: formatAssetUrl(new URL('./embed-icons/codepen.png', import.meta.url).href, opts),
|
||||
codesandbox: formatAssetUrl(
|
||||
new URL('./embed-icons/codesandbox.png', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
desmos: formatAssetUrl(new URL('./embed-icons/desmos.png', import.meta.url).href, opts),
|
||||
excalidraw: formatAssetUrl(
|
||||
new URL('./embed-icons/excalidraw.png', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
felt: formatAssetUrl(new URL('./embed-icons/felt.png', import.meta.url).href, opts),
|
||||
figma: formatAssetUrl(new URL('./embed-icons/figma.png', import.meta.url).href, opts),
|
||||
github_gist: formatAssetUrl(
|
||||
new URL('./embed-icons/github_gist.png', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
google_calendar: formatAssetUrl(
|
||||
new URL('./embed-icons/google_calendar.png', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
google_maps: formatAssetUrl(
|
||||
new URL('./embed-icons/google_maps.png', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
google_slides: formatAssetUrl(
|
||||
new URL('./embed-icons/google_slides.png', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
observable: formatAssetUrl(
|
||||
new URL('./embed-icons/observable.png', import.meta.url).href,
|
||||
opts
|
||||
),
|
||||
replit: formatAssetUrl(new URL('./embed-icons/replit.png', import.meta.url).href, opts),
|
||||
scratch: formatAssetUrl(new URL('./embed-icons/scratch.png', import.meta.url).href, opts),
|
||||
spotify: formatAssetUrl(new URL('./embed-icons/spotify.png', import.meta.url).href, opts),
|
||||
tldraw: formatAssetUrl(new URL('./embed-icons/tldraw.png', import.meta.url).href, opts),
|
||||
val_town: formatAssetUrl(new URL('./embed-icons/val_town.png', import.meta.url).href, opts),
|
||||
vimeo: formatAssetUrl(new URL('./embed-icons/vimeo.png', import.meta.url).href, opts),
|
||||
youtube: formatAssetUrl(new URL('./embed-icons/youtube.png', import.meta.url).href, opts),
|
||||
},
|
||||
}
|
||||
}
|
||||
2
packages/assets/utils.d.ts
vendored
Normal file
2
packages/assets/utils.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { AssetUrl, AssetUrlOptions } from './types'
|
||||
export function formatAssetUrl(assetUrl: AssetUrl, format: AssetUrlOptions): string
|
||||
20
packages/assets/utils.js
Normal file
20
packages/assets/utils.js
Normal file
@@ -0,0 +1,20 @@
|
||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||
/// <reference path="./modules.d.ts" />
|
||||
|
||||
/**
|
||||
* @param {AssetUrl} assetUrl
|
||||
* @param {AssetUrlOptions} [format]
|
||||
* @returns {string}
|
||||
*/
|
||||
export function formatAssetUrl(assetUrl, format = {}) {
|
||||
const assetUrlString = typeof assetUrl === 'string' ? assetUrl : assetUrl.src
|
||||
|
||||
if (typeof format === 'function') return format(assetUrlString)
|
||||
|
||||
const { baseUrl = '' } = format
|
||||
|
||||
if (assetUrlString.startsWith('data:')) return assetUrlString
|
||||
if (assetUrlString.match(/^https?:\/\//)) return assetUrlString
|
||||
|
||||
return `${baseUrl.replace(/\/$/, '')}/${assetUrlString.replace(/^\.?\//, '')}`
|
||||
}
|
||||
Reference in New Issue
Block a user