tldraw/packages/assets/types.d.ts
Steve Ruiz ac149c1014
Dynamic size mode + fill fill (#3835)
This PR adds a user preference for "dynamic size mode" where the scale
of shapes (text size, stroke width) is relative to the current zoom
level. This means that the stroke width in screen pixels (or text size
in screen pixels) is identical regardless of zoom level.

![Kapture 2024-05-27 at 05 23
21](https://github.com/tldraw/tldraw/assets/23072548/f247ecce-bfcd-4f85-b7a5-d7677b38e4d8)

- [x] Draw shape
- [x] Text shape
- [x] Highlighter shape
- [x] Geo shape
- [x] Arrow shape
- [x] Note shape
- [x] Line shape

Embed shape?

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `feature` — New feature

### Test Plan

1. Use the tools.
2. Change zoom

- [ ] Unit Tests

### Release Notes

- Adds a dynamic size user preferences.
- Removes double click to reset scale on text shapes.
- Removes double click to reset autosize on text shapes.

---------

Co-authored-by: Taha <98838967+Taha-Hassan-Git@users.noreply.github.com>
Co-authored-by: huppy-bot[bot] <128400622+huppy-bot[bot]@users.noreply.github.com>
2024-06-16 16:58:13 +00:00

216 lines
4.6 KiB
TypeScript

// This file is automatically generated by 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: {
monospace: string
sansSerif: string
serif: string
draw: string
}
icons: {
'align-bottom': string
'align-center-horizontal': string
'align-center-vertical': string
'align-left': string
'align-right': string
'align-top': 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
'bring-forward': string
'bring-to-front': string
broken: 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
color: 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
'drag-handle-dots': string
duplicate: string
edit: string
'external-link': string
'fill-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
'horizontal-align-end': string
'horizontal-align-middle': string
'horizontal-align-start': string
'info-circle': string
leading: string
link: string
lock: 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
'stretch-horizontal': string
'stretch-vertical': 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
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
ca: string
cs: string
da: string
de: string
en: string
es: string
fa: string
fi: string
fr: string
gl: string
he: string
'hi-in': string
hr: string
hu: string
id: string
it: string
ja: string
'ko-kr': string
ku: string
languages: string
main: string
my: string
ne: string
no: string
pl: string
'pt-br': string
'pt-pt': string
ro: string
ru: string
sl: string
sv: string
te: string
th: string
tr: string
uk: string
vi: string
'zh-cn': string
'zh-tw': string
}
embedIcons: {
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
}
}