From d3fe2d06e05f6420fcce7d02ca0df04e8630517e Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Tue, 30 Apr 2024 11:39:53 +0100 Subject: [PATCH] Fix missing icons (#3654) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix more missing icons. ### Change Type - [x] `sdk` — Changes the tldraw SDK - [x] `bugfix` — Bug fix --- assets/icons/icon/lock.svg | 4 ++++ assets/icons/icon/share-1.svg | 4 ++++ assets/icons/icon/unlock.svg | 4 ++++ packages/assets/imports.js | 6 ++++++ packages/assets/imports.vite.js | 6 ++++++ packages/assets/selfHosted.js | 3 +++ packages/assets/types.d.ts | 3 +++ packages/assets/urls.js | 3 +++ packages/tldraw/api-report.md | 2 +- packages/tldraw/src/lib/ui/icon-types.ts | 6 ++++++ 10 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 assets/icons/icon/lock.svg create mode 100644 assets/icons/icon/share-1.svg create mode 100644 assets/icons/icon/unlock.svg diff --git a/assets/icons/icon/lock.svg b/assets/icons/icon/lock.svg new file mode 100644 index 000000000..5693cc4c5 --- /dev/null +++ b/assets/icons/icon/lock.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/icon/share-1.svg b/assets/icons/icon/share-1.svg new file mode 100644 index 000000000..160f0418a --- /dev/null +++ b/assets/icons/icon/share-1.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/icon/unlock.svg b/assets/icons/icon/unlock.svg new file mode 100644 index 000000000..b81dc0b4e --- /dev/null +++ b/assets/icons/icon/unlock.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/assets/imports.js b/packages/assets/imports.js index 45ec35c17..4388310c0 100644 --- a/packages/assets/imports.js +++ b/packages/assets/imports.js @@ -111,6 +111,7 @@ import iconsHorizontalAlignStart from './icons/icon/horizontal-align-start.svg' import iconsInfoCircle from './icons/icon/info-circle.svg' import iconsLeading from './icons/icon/leading.svg' import iconsLink from './icons/icon/link.svg' +import iconsLock from './icons/icon/lock.svg' import iconsMenu from './icons/icon/menu.svg' import iconsMinus from './icons/icon/minus.svg' import iconsMixed from './icons/icon/mixed.svg' @@ -124,6 +125,7 @@ import iconsRotateCcw from './icons/icon/rotate-ccw.svg' import iconsRotateCw from './icons/icon/rotate-cw.svg' import iconsSendBackward from './icons/icon/send-backward.svg' import iconsSendToBack from './icons/icon/send-to-back.svg' +import iconsShare1 from './icons/icon/share-1.svg' import iconsSizeExtraLarge from './icons/icon/size-extra-large.svg' import iconsSizeLarge from './icons/icon/size-large.svg' import iconsSizeMedium from './icons/icon/size-medium.svg' @@ -154,6 +156,7 @@ import iconsTrash from './icons/icon/trash.svg' import iconsTwitter from './icons/icon/twitter.svg' import iconsUndo from './icons/icon/undo.svg' import iconsUngroup from './icons/icon/ungroup.svg' +import iconsUnlock from './icons/icon/unlock.svg' import iconsVerticalAlignEnd from './icons/icon/vertical-align-end.svg' import iconsVerticalAlignMiddle from './icons/icon/vertical-align-middle.svg' import iconsVerticalAlignStart from './icons/icon/vertical-align-start.svg' @@ -297,6 +300,7 @@ export function getAssetUrlsByImport(opts) { 'info-circle': formatAssetUrl(iconsInfoCircle, opts), leading: formatAssetUrl(iconsLeading, opts), link: formatAssetUrl(iconsLink, opts), + lock: formatAssetUrl(iconsLock, opts), menu: formatAssetUrl(iconsMenu, opts), minus: formatAssetUrl(iconsMinus, opts), mixed: formatAssetUrl(iconsMixed, opts), @@ -310,6 +314,7 @@ export function getAssetUrlsByImport(opts) { 'rotate-cw': formatAssetUrl(iconsRotateCw, opts), 'send-backward': formatAssetUrl(iconsSendBackward, opts), 'send-to-back': formatAssetUrl(iconsSendToBack, opts), + 'share-1': formatAssetUrl(iconsShare1, opts), 'size-extra-large': formatAssetUrl(iconsSizeExtraLarge, opts), 'size-large': formatAssetUrl(iconsSizeLarge, opts), 'size-medium': formatAssetUrl(iconsSizeMedium, opts), @@ -340,6 +345,7 @@ export function getAssetUrlsByImport(opts) { twitter: formatAssetUrl(iconsTwitter, opts), undo: formatAssetUrl(iconsUndo, opts), ungroup: formatAssetUrl(iconsUngroup, opts), + unlock: formatAssetUrl(iconsUnlock, opts), 'vertical-align-end': formatAssetUrl(iconsVerticalAlignEnd, opts), 'vertical-align-middle': formatAssetUrl(iconsVerticalAlignMiddle, opts), 'vertical-align-start': formatAssetUrl(iconsVerticalAlignStart, opts), diff --git a/packages/assets/imports.vite.js b/packages/assets/imports.vite.js index 268c05599..75728c309 100644 --- a/packages/assets/imports.vite.js +++ b/packages/assets/imports.vite.js @@ -111,6 +111,7 @@ import iconsHorizontalAlignStart from './icons/icon/horizontal-align-start.svg?u import iconsInfoCircle from './icons/icon/info-circle.svg?url' import iconsLeading from './icons/icon/leading.svg?url' import iconsLink from './icons/icon/link.svg?url' +import iconsLock from './icons/icon/lock.svg?url' import iconsMenu from './icons/icon/menu.svg?url' import iconsMinus from './icons/icon/minus.svg?url' import iconsMixed from './icons/icon/mixed.svg?url' @@ -124,6 +125,7 @@ import iconsRotateCcw from './icons/icon/rotate-ccw.svg?url' import iconsRotateCw from './icons/icon/rotate-cw.svg?url' import iconsSendBackward from './icons/icon/send-backward.svg?url' import iconsSendToBack from './icons/icon/send-to-back.svg?url' +import iconsShare1 from './icons/icon/share-1.svg?url' import iconsSizeExtraLarge from './icons/icon/size-extra-large.svg?url' import iconsSizeLarge from './icons/icon/size-large.svg?url' import iconsSizeMedium from './icons/icon/size-medium.svg?url' @@ -154,6 +156,7 @@ import iconsTrash from './icons/icon/trash.svg?url' import iconsTwitter from './icons/icon/twitter.svg?url' import iconsUndo from './icons/icon/undo.svg?url' import iconsUngroup from './icons/icon/ungroup.svg?url' +import iconsUnlock from './icons/icon/unlock.svg?url' import iconsVerticalAlignEnd from './icons/icon/vertical-align-end.svg?url' import iconsVerticalAlignMiddle from './icons/icon/vertical-align-middle.svg?url' import iconsVerticalAlignStart from './icons/icon/vertical-align-start.svg?url' @@ -297,6 +300,7 @@ export function getAssetUrlsByImport(opts) { 'info-circle': formatAssetUrl(iconsInfoCircle, opts), leading: formatAssetUrl(iconsLeading, opts), link: formatAssetUrl(iconsLink, opts), + lock: formatAssetUrl(iconsLock, opts), menu: formatAssetUrl(iconsMenu, opts), minus: formatAssetUrl(iconsMinus, opts), mixed: formatAssetUrl(iconsMixed, opts), @@ -310,6 +314,7 @@ export function getAssetUrlsByImport(opts) { 'rotate-cw': formatAssetUrl(iconsRotateCw, opts), 'send-backward': formatAssetUrl(iconsSendBackward, opts), 'send-to-back': formatAssetUrl(iconsSendToBack, opts), + 'share-1': formatAssetUrl(iconsShare1, opts), 'size-extra-large': formatAssetUrl(iconsSizeExtraLarge, opts), 'size-large': formatAssetUrl(iconsSizeLarge, opts), 'size-medium': formatAssetUrl(iconsSizeMedium, opts), @@ -340,6 +345,7 @@ export function getAssetUrlsByImport(opts) { twitter: formatAssetUrl(iconsTwitter, opts), undo: formatAssetUrl(iconsUndo, opts), ungroup: formatAssetUrl(iconsUngroup, opts), + unlock: formatAssetUrl(iconsUnlock, opts), 'vertical-align-end': formatAssetUrl(iconsVerticalAlignEnd, opts), 'vertical-align-middle': formatAssetUrl(iconsVerticalAlignMiddle, opts), 'vertical-align-start': formatAssetUrl(iconsVerticalAlignStart, opts), diff --git a/packages/assets/selfHosted.js b/packages/assets/selfHosted.js index 19206ed0e..bccd1e479 100644 --- a/packages/assets/selfHosted.js +++ b/packages/assets/selfHosted.js @@ -105,6 +105,7 @@ export function getAssetUrls(opts) { 'info-circle': formatAssetUrl('./icons/icon/info-circle.svg', opts), leading: formatAssetUrl('./icons/icon/leading.svg', opts), link: formatAssetUrl('./icons/icon/link.svg', opts), + lock: formatAssetUrl('./icons/icon/lock.svg', opts), menu: formatAssetUrl('./icons/icon/menu.svg', opts), minus: formatAssetUrl('./icons/icon/minus.svg', opts), mixed: formatAssetUrl('./icons/icon/mixed.svg', opts), @@ -118,6 +119,7 @@ export function getAssetUrls(opts) { 'rotate-cw': formatAssetUrl('./icons/icon/rotate-cw.svg', opts), 'send-backward': formatAssetUrl('./icons/icon/send-backward.svg', opts), 'send-to-back': formatAssetUrl('./icons/icon/send-to-back.svg', opts), + 'share-1': formatAssetUrl('./icons/icon/share-1.svg', opts), 'size-extra-large': formatAssetUrl('./icons/icon/size-extra-large.svg', opts), 'size-large': formatAssetUrl('./icons/icon/size-large.svg', opts), 'size-medium': formatAssetUrl('./icons/icon/size-medium.svg', opts), @@ -148,6 +150,7 @@ export function getAssetUrls(opts) { twitter: formatAssetUrl('./icons/icon/twitter.svg', opts), undo: formatAssetUrl('./icons/icon/undo.svg', opts), ungroup: formatAssetUrl('./icons/icon/ungroup.svg', opts), + unlock: formatAssetUrl('./icons/icon/unlock.svg', opts), 'vertical-align-end': formatAssetUrl('./icons/icon/vertical-align-end.svg', opts), 'vertical-align-middle': formatAssetUrl('./icons/icon/vertical-align-middle.svg', opts), 'vertical-align-start': formatAssetUrl('./icons/icon/vertical-align-start.svg', opts), diff --git a/packages/assets/types.d.ts b/packages/assets/types.d.ts index 1cc285091..50a2df8b1 100644 --- a/packages/assets/types.d.ts +++ b/packages/assets/types.d.ts @@ -95,6 +95,7 @@ export type AssetUrls = { 'info-circle': string leading: string link: string + lock: string menu: string minus: string mixed: string @@ -108,6 +109,7 @@ export type AssetUrls = { 'rotate-cw': string 'send-backward': string 'send-to-back': string + 'share-1': string 'size-extra-large': string 'size-large': string 'size-medium': string @@ -138,6 +140,7 @@ export type AssetUrls = { twitter: string undo: string ungroup: string + unlock: string 'vertical-align-end': string 'vertical-align-middle': string 'vertical-align-start': string diff --git a/packages/assets/urls.js b/packages/assets/urls.js index a87a3d92d..d9f8640a6 100644 --- a/packages/assets/urls.js +++ b/packages/assets/urls.js @@ -315,6 +315,7 @@ export function getAssetUrlsByMetaUrl(opts) { ), leading: formatAssetUrl(new URL('./icons/icon/leading.svg', import.meta.url).href, opts), link: formatAssetUrl(new URL('./icons/icon/link.svg', import.meta.url).href, opts), + lock: formatAssetUrl(new URL('./icons/icon/lock.svg', import.meta.url).href, opts), menu: formatAssetUrl(new URL('./icons/icon/menu.svg', import.meta.url).href, opts), minus: formatAssetUrl(new URL('./icons/icon/minus.svg', import.meta.url).href, opts), mixed: formatAssetUrl(new URL('./icons/icon/mixed.svg', import.meta.url).href, opts), @@ -349,6 +350,7 @@ export function getAssetUrlsByMetaUrl(opts) { new URL('./icons/icon/send-to-back.svg', import.meta.url).href, opts ), + 'share-1': formatAssetUrl(new URL('./icons/icon/share-1.svg', import.meta.url).href, opts), 'size-extra-large': formatAssetUrl( new URL('./icons/icon/size-extra-large.svg', import.meta.url).href, opts @@ -457,6 +459,7 @@ export function getAssetUrlsByMetaUrl(opts) { twitter: formatAssetUrl(new URL('./icons/icon/twitter.svg', import.meta.url).href, opts), undo: formatAssetUrl(new URL('./icons/icon/undo.svg', import.meta.url).href, opts), ungroup: formatAssetUrl(new URL('./icons/icon/ungroup.svg', import.meta.url).href, opts), + unlock: formatAssetUrl(new URL('./icons/icon/unlock.svg', import.meta.url).href, opts), 'vertical-align-end': formatAssetUrl( new URL('./icons/icon/vertical-align-end.svg', import.meta.url).href, opts diff --git a/packages/tldraw/api-report.md b/packages/tldraw/api-report.md index 67f552e34..53e3953a2 100644 --- a/packages/tldraw/api-report.md +++ b/packages/tldraw/api-report.md @@ -2177,7 +2177,7 @@ export interface TLUiIconProps extends React.HTMLProps { } // @public (undocumented) -export type TLUiIconType = 'align-bottom' | 'align-center-horizontal' | 'align-center-vertical' | 'align-left' | 'align-right' | 'align-top' | 'arrow-left' | 'arrowhead-arrow' | 'arrowhead-bar' | 'arrowhead-diamond' | 'arrowhead-dot' | 'arrowhead-none' | 'arrowhead-square' | 'arrowhead-triangle-inverted' | 'arrowhead-triangle' | 'blob' | 'bring-forward' | 'bring-to-front' | 'broken' | 'check-circle' | 'check' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chevrons-ne' | 'chevrons-sw' | 'clipboard-copied' | 'clipboard-copy' | 'color' | 'cross-2' | 'cross-circle' | 'dash-dashed' | 'dash-dotted' | 'dash-draw' | 'dash-solid' | 'disconnected' | 'discord' | 'distribute-horizontal' | 'distribute-vertical' | 'dot' | 'dots-horizontal' | 'dots-vertical' | 'drag-handle-dots' | 'duplicate' | 'edit' | 'external-link' | 'fill-none' | 'fill-pattern' | 'fill-semi' | 'fill-solid' | 'follow' | 'following' | 'font-draw' | 'font-mono' | 'font-sans' | 'font-serif' | 'geo-arrow-down' | 'geo-arrow-left' | 'geo-arrow-right' | 'geo-arrow-up' | 'geo-check-box' | 'geo-cloud' | 'geo-diamond' | 'geo-ellipse' | 'geo-hexagon' | 'geo-octagon' | 'geo-oval' | 'geo-pentagon' | 'geo-rectangle' | 'geo-rhombus-2' | 'geo-rhombus' | 'geo-star' | 'geo-trapezoid' | 'geo-triangle' | 'geo-x-box' | 'github' | 'group' | 'horizontal-align-end' | 'horizontal-align-middle' | 'horizontal-align-start' | 'info-circle' | 'leading' | 'link' | 'menu' | 'minus' | 'mixed' | 'pack' | 'plus' | 'question-mark-circle' | 'question-mark' | 'redo' | 'reset-zoom' | 'rotate-ccw' | 'rotate-cw' | 'send-backward' | 'send-to-back' | 'size-extra-large' | 'size-large' | 'size-medium' | 'size-small' | 'stack-horizontal' | 'stack-vertical' | 'stretch-horizontal' | 'stretch-vertical' | 'text-align-center' | 'text-align-left' | 'text-align-right' | 'toggle-off' | 'toggle-on' | 'tool-arrow' | 'tool-eraser' | 'tool-frame' | 'tool-hand' | 'tool-highlight' | 'tool-laser' | 'tool-line' | 'tool-media' | 'tool-note' | 'tool-pencil' | 'tool-pointer' | 'tool-screenshot' | 'tool-text' | 'trash' | 'twitter' | 'undo' | 'ungroup' | 'vertical-align-end' | 'vertical-align-middle' | 'vertical-align-start' | 'warning-triangle' | 'zoom-in' | 'zoom-out'; +export type TLUiIconType = 'align-bottom' | 'align-center-horizontal' | 'align-center-vertical' | 'align-left' | 'align-right' | 'align-top' | 'arrow-left' | 'arrowhead-arrow' | 'arrowhead-bar' | 'arrowhead-diamond' | 'arrowhead-dot' | 'arrowhead-none' | 'arrowhead-square' | 'arrowhead-triangle-inverted' | 'arrowhead-triangle' | 'blob' | 'bring-forward' | 'bring-to-front' | 'broken' | 'check-circle' | 'check' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chevrons-ne' | 'chevrons-sw' | 'clipboard-copied' | 'clipboard-copy' | 'color' | 'cross-2' | 'cross-circle' | 'dash-dashed' | 'dash-dotted' | 'dash-draw' | 'dash-solid' | 'disconnected' | 'discord' | 'distribute-horizontal' | 'distribute-vertical' | 'dot' | 'dots-horizontal' | 'dots-vertical' | 'drag-handle-dots' | 'duplicate' | 'edit' | 'external-link' | 'fill-none' | 'fill-pattern' | 'fill-semi' | 'fill-solid' | 'follow' | 'following' | 'font-draw' | 'font-mono' | 'font-sans' | 'font-serif' | 'geo-arrow-down' | 'geo-arrow-left' | 'geo-arrow-right' | 'geo-arrow-up' | 'geo-check-box' | 'geo-cloud' | 'geo-diamond' | 'geo-ellipse' | 'geo-hexagon' | 'geo-octagon' | 'geo-oval' | 'geo-pentagon' | 'geo-rectangle' | 'geo-rhombus-2' | 'geo-rhombus' | 'geo-star' | 'geo-trapezoid' | 'geo-triangle' | 'geo-x-box' | 'github' | 'group' | 'horizontal-align-end' | 'horizontal-align-middle' | 'horizontal-align-start' | 'info-circle' | 'leading' | 'link' | 'lock' | 'menu' | 'minus' | 'mixed' | 'pack' | 'plus' | 'question-mark-circle' | 'question-mark' | 'redo' | 'reset-zoom' | 'rotate-ccw' | 'rotate-cw' | 'send-backward' | 'send-to-back' | 'share-1' | 'size-extra-large' | 'size-large' | 'size-medium' | 'size-small' | 'stack-horizontal' | 'stack-vertical' | 'stretch-horizontal' | 'stretch-vertical' | 'text-align-center' | 'text-align-left' | 'text-align-right' | 'toggle-off' | 'toggle-on' | 'tool-arrow' | 'tool-eraser' | 'tool-frame' | 'tool-hand' | 'tool-highlight' | 'tool-laser' | 'tool-line' | 'tool-media' | 'tool-note' | 'tool-pencil' | 'tool-pointer' | 'tool-screenshot' | 'tool-text' | 'trash' | 'twitter' | 'undo' | 'ungroup' | 'unlock' | 'vertical-align-end' | 'vertical-align-middle' | 'vertical-align-start' | 'warning-triangle' | 'zoom-in' | 'zoom-out'; // @public (undocumented) export interface TLUiInputProps { diff --git a/packages/tldraw/src/lib/ui/icon-types.ts b/packages/tldraw/src/lib/ui/icon-types.ts index 55b70b103..62b3f9711 100644 --- a/packages/tldraw/src/lib/ui/icon-types.ts +++ b/packages/tldraw/src/lib/ui/icon-types.ts @@ -87,6 +87,7 @@ export type TLUiIconType = | 'info-circle' | 'leading' | 'link' + | 'lock' | 'menu' | 'minus' | 'mixed' @@ -100,6 +101,7 @@ export type TLUiIconType = | 'rotate-cw' | 'send-backward' | 'send-to-back' + | 'share-1' | 'size-extra-large' | 'size-large' | 'size-medium' @@ -130,6 +132,7 @@ export type TLUiIconType = | 'twitter' | 'undo' | 'ungroup' + | 'unlock' | 'vertical-align-end' | 'vertical-align-middle' | 'vertical-align-start' @@ -223,6 +226,7 @@ export const iconTypes = [ 'info-circle', 'leading', 'link', + 'lock', 'menu', 'minus', 'mixed', @@ -236,6 +240,7 @@ export const iconTypes = [ 'rotate-cw', 'send-backward', 'send-to-back', + 'share-1', 'size-extra-large', 'size-large', 'size-medium', @@ -266,6 +271,7 @@ export const iconTypes = [ 'twitter', 'undo', 'ungroup', + 'unlock', 'vertical-align-end', 'vertical-align-middle', 'vertical-align-start',