From 60f43e947e9be01bf7c01c49132fce3d84f396b2 Mon Sep 17 00:00:00 2001 From: David Sheldrick Date: Wed, 10 Jul 2024 09:51:06 +0100 Subject: [PATCH] Add offline icon back (#4127) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This icon went missing. I had a larger diff here that made the icon types stricter to catch errors but I'll save it for another PR. ### Change type - [x] `bugfix` - [ ] `improvement` - [ ] `feature` - [ ] `api` - [ ] `other` ### Test plan 1. Create a shape... 2. - [ ] Unit tests - [ ] End to end tests ### Release notes - Fixed a bug with… --- assets/icons/icon/status-offline.svg | 7 +++++++ packages/assets/imports.js | 2 ++ packages/assets/imports.vite.js | 2 ++ packages/assets/selfHosted.js | 1 + packages/assets/types.d.ts | 1 + packages/assets/urls.js | 4 ++++ packages/tldraw/api-report.md | 2 +- packages/tldraw/src/lib/ui/icon-types.ts | 2 ++ 8 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 assets/icons/icon/status-offline.svg diff --git a/assets/icons/icon/status-offline.svg b/assets/icons/icon/status-offline.svg new file mode 100644 index 000000000..af180cbfc --- /dev/null +++ b/assets/icons/icon/status-offline.svg @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/packages/assets/imports.js b/packages/assets/imports.js index 28c211525..d4d872834 100644 --- a/packages/assets/imports.js +++ b/packages/assets/imports.js @@ -136,6 +136,7 @@ import iconsSplineCubic from './icons/icon/spline-cubic.svg' import iconsSplineLine from './icons/icon/spline-line.svg' import iconsStackHorizontal from './icons/icon/stack-horizontal.svg' import iconsStackVertical from './icons/icon/stack-vertical.svg' +import iconsStatusOffline from './icons/icon/status-offline.svg' import iconsStretchHorizontal from './icons/icon/stretch-horizontal.svg' import iconsStretchVertical from './icons/icon/stretch-vertical.svg' import iconsTextAlignCenter from './icons/icon/text-align-center.svg' @@ -329,6 +330,7 @@ export function getAssetUrlsByImport(opts) { 'spline-line': formatAssetUrl(iconsSplineLine, opts), 'stack-horizontal': formatAssetUrl(iconsStackHorizontal, opts), 'stack-vertical': formatAssetUrl(iconsStackVertical, opts), + 'status-offline': formatAssetUrl(iconsStatusOffline, opts), 'stretch-horizontal': formatAssetUrl(iconsStretchHorizontal, opts), 'stretch-vertical': formatAssetUrl(iconsStretchVertical, opts), 'text-align-center': formatAssetUrl(iconsTextAlignCenter, opts), diff --git a/packages/assets/imports.vite.js b/packages/assets/imports.vite.js index 88e9f3730..1b5641574 100644 --- a/packages/assets/imports.vite.js +++ b/packages/assets/imports.vite.js @@ -136,6 +136,7 @@ import iconsSplineCubic from './icons/icon/spline-cubic.svg?url' import iconsSplineLine from './icons/icon/spline-line.svg?url' import iconsStackHorizontal from './icons/icon/stack-horizontal.svg?url' import iconsStackVertical from './icons/icon/stack-vertical.svg?url' +import iconsStatusOffline from './icons/icon/status-offline.svg?url' import iconsStretchHorizontal from './icons/icon/stretch-horizontal.svg?url' import iconsStretchVertical from './icons/icon/stretch-vertical.svg?url' import iconsTextAlignCenter from './icons/icon/text-align-center.svg?url' @@ -329,6 +330,7 @@ export function getAssetUrlsByImport(opts) { 'spline-line': formatAssetUrl(iconsSplineLine, opts), 'stack-horizontal': formatAssetUrl(iconsStackHorizontal, opts), 'stack-vertical': formatAssetUrl(iconsStackVertical, opts), + 'status-offline': formatAssetUrl(iconsStatusOffline, opts), 'stretch-horizontal': formatAssetUrl(iconsStretchHorizontal, opts), 'stretch-vertical': formatAssetUrl(iconsStretchVertical, opts), 'text-align-center': formatAssetUrl(iconsTextAlignCenter, opts), diff --git a/packages/assets/selfHosted.js b/packages/assets/selfHosted.js index 9187c879a..6ddc44f31 100644 --- a/packages/assets/selfHosted.js +++ b/packages/assets/selfHosted.js @@ -130,6 +130,7 @@ export function getAssetUrls(opts) { 'spline-line': formatAssetUrl('./icons/icon/spline-line.svg', opts), 'stack-horizontal': formatAssetUrl('./icons/icon/stack-horizontal.svg', opts), 'stack-vertical': formatAssetUrl('./icons/icon/stack-vertical.svg', opts), + 'status-offline': formatAssetUrl('./icons/icon/status-offline.svg', opts), 'stretch-horizontal': formatAssetUrl('./icons/icon/stretch-horizontal.svg', opts), 'stretch-vertical': formatAssetUrl('./icons/icon/stretch-vertical.svg', opts), 'text-align-center': formatAssetUrl('./icons/icon/text-align-center.svg', opts), diff --git a/packages/assets/types.d.ts b/packages/assets/types.d.ts index 278e07284..6bcef7706 100644 --- a/packages/assets/types.d.ts +++ b/packages/assets/types.d.ts @@ -120,6 +120,7 @@ export type AssetUrls = { 'spline-line': string 'stack-horizontal': string 'stack-vertical': string + 'status-offline': string 'stretch-horizontal': string 'stretch-vertical': string 'text-align-center': string diff --git a/packages/assets/urls.js b/packages/assets/urls.js index 4ec667764..c6ba89433 100644 --- a/packages/assets/urls.js +++ b/packages/assets/urls.js @@ -391,6 +391,10 @@ export function getAssetUrlsByMetaUrl(opts) { new URL('./icons/icon/stack-vertical.svg', import.meta.url).href, opts ), + 'status-offline': formatAssetUrl( + new URL('./icons/icon/status-offline.svg', import.meta.url).href, + opts + ), 'stretch-horizontal': formatAssetUrl( new URL('./icons/icon/stretch-horizontal.svg', import.meta.url).href, opts diff --git a/packages/tldraw/api-report.md b/packages/tldraw/api-report.md index 55596de14..2d1831e19 100644 --- a/packages/tldraw/api-report.md +++ b/packages/tldraw/api-report.md @@ -2381,7 +2381,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-fill' | '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-heart' | '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' | 'spline-cubic' | 'spline-line' | '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'; +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-fill' | '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-heart' | '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' | 'spline-cubic' | 'spline-line' | 'stack-horizontal' | 'stack-vertical' | 'status-offline' | '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 d7f3e58bf..061567d29 100644 --- a/packages/tldraw/src/lib/ui/icon-types.ts +++ b/packages/tldraw/src/lib/ui/icon-types.ts @@ -112,6 +112,7 @@ export type TLUiIconType = | 'spline-line' | 'stack-horizontal' | 'stack-vertical' + | 'status-offline' | 'stretch-horizontal' | 'stretch-vertical' | 'text-align-center' @@ -255,6 +256,7 @@ export const iconTypes = [ 'spline-line', 'stack-horizontal', 'stack-vertical', + 'status-offline', 'stretch-horizontal', 'stretch-vertical', 'text-align-center',