From ed63bcead5930793215b2187849ed151b5554f81 Mon Sep 17 00:00:00 2001 From: David Sheldrick Date: Mon, 20 May 2024 10:28:14 +0100 Subject: [PATCH] add missing spline icons (#3778) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We had somehow removed these ### Change Type - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. --- assets/icons/icon/spline-cubic.svg | 3 +++ assets/icons/icon/spline-line.svg | 3 +++ packages/assets/imports.js | 4 ++++ packages/assets/imports.vite.js | 4 ++++ packages/assets/selfHosted.js | 2 ++ packages/assets/types.d.ts | 2 ++ packages/assets/urls.js | 8 ++++++++ packages/tldraw/api-report.md | 2 +- packages/tldraw/src/lib/ui/icon-types.ts | 4 ++++ 9 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 assets/icons/icon/spline-cubic.svg create mode 100644 assets/icons/icon/spline-line.svg diff --git a/assets/icons/icon/spline-cubic.svg b/assets/icons/icon/spline-cubic.svg new file mode 100644 index 000000000..480fe6e14 --- /dev/null +++ b/assets/icons/icon/spline-cubic.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/icon/spline-line.svg b/assets/icons/icon/spline-line.svg new file mode 100644 index 000000000..bdbdf3028 --- /dev/null +++ b/assets/icons/icon/spline-line.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/assets/imports.js b/packages/assets/imports.js index 4388310c0..2f12c6252 100644 --- a/packages/assets/imports.js +++ b/packages/assets/imports.js @@ -130,6 +130,8 @@ import iconsSizeExtraLarge from './icons/icon/size-extra-large.svg' import iconsSizeLarge from './icons/icon/size-large.svg' import iconsSizeMedium from './icons/icon/size-medium.svg' import iconsSizeSmall from './icons/icon/size-small.svg' +import iconsSplineCubic from './icons/icon/spline-cubic.svg' +import iconsSplineLine from './icons/icon/spline-line.svg' import iconsStackHorizontal from './icons/icon/stack-horizontal.svg' import iconsStackVertical from './icons/icon/stack-vertical.svg' import iconsStretchHorizontal from './icons/icon/stretch-horizontal.svg' @@ -319,6 +321,8 @@ export function getAssetUrlsByImport(opts) { 'size-large': formatAssetUrl(iconsSizeLarge, opts), 'size-medium': formatAssetUrl(iconsSizeMedium, opts), 'size-small': formatAssetUrl(iconsSizeSmall, opts), + 'spline-cubic': formatAssetUrl(iconsSplineCubic, opts), + 'spline-line': formatAssetUrl(iconsSplineLine, opts), 'stack-horizontal': formatAssetUrl(iconsStackHorizontal, opts), 'stack-vertical': formatAssetUrl(iconsStackVertical, opts), 'stretch-horizontal': formatAssetUrl(iconsStretchHorizontal, opts), diff --git a/packages/assets/imports.vite.js b/packages/assets/imports.vite.js index 75728c309..ed5481cf1 100644 --- a/packages/assets/imports.vite.js +++ b/packages/assets/imports.vite.js @@ -130,6 +130,8 @@ import iconsSizeExtraLarge from './icons/icon/size-extra-large.svg?url' import iconsSizeLarge from './icons/icon/size-large.svg?url' import iconsSizeMedium from './icons/icon/size-medium.svg?url' import iconsSizeSmall from './icons/icon/size-small.svg?url' +import iconsSplineCubic from './icons/icon/spline-cubic.svg?url' +import iconsSplineLine from './icons/icon/spline-line.svg?url' import iconsStackHorizontal from './icons/icon/stack-horizontal.svg?url' import iconsStackVertical from './icons/icon/stack-vertical.svg?url' import iconsStretchHorizontal from './icons/icon/stretch-horizontal.svg?url' @@ -319,6 +321,8 @@ export function getAssetUrlsByImport(opts) { 'size-large': formatAssetUrl(iconsSizeLarge, opts), 'size-medium': formatAssetUrl(iconsSizeMedium, opts), 'size-small': formatAssetUrl(iconsSizeSmall, opts), + 'spline-cubic': formatAssetUrl(iconsSplineCubic, opts), + 'spline-line': formatAssetUrl(iconsSplineLine, opts), 'stack-horizontal': formatAssetUrl(iconsStackHorizontal, opts), 'stack-vertical': formatAssetUrl(iconsStackVertical, opts), 'stretch-horizontal': formatAssetUrl(iconsStretchHorizontal, opts), diff --git a/packages/assets/selfHosted.js b/packages/assets/selfHosted.js index bccd1e479..33e0eed3c 100644 --- a/packages/assets/selfHosted.js +++ b/packages/assets/selfHosted.js @@ -124,6 +124,8 @@ export function getAssetUrls(opts) { 'size-large': formatAssetUrl('./icons/icon/size-large.svg', opts), 'size-medium': formatAssetUrl('./icons/icon/size-medium.svg', opts), 'size-small': formatAssetUrl('./icons/icon/size-small.svg', opts), + 'spline-cubic': formatAssetUrl('./icons/icon/spline-cubic.svg', opts), + 'spline-line': formatAssetUrl('./icons/icon/spline-line.svg', opts), 'stack-horizontal': formatAssetUrl('./icons/icon/stack-horizontal.svg', opts), 'stack-vertical': formatAssetUrl('./icons/icon/stack-vertical.svg', opts), 'stretch-horizontal': formatAssetUrl('./icons/icon/stretch-horizontal.svg', opts), diff --git a/packages/assets/types.d.ts b/packages/assets/types.d.ts index 50a2df8b1..8639d0856 100644 --- a/packages/assets/types.d.ts +++ b/packages/assets/types.d.ts @@ -114,6 +114,8 @@ export type AssetUrls = { 'size-large': string 'size-medium': string 'size-small': string + 'spline-cubic': string + 'spline-line': string 'stack-horizontal': string 'stack-vertical': string 'stretch-horizontal': string diff --git a/packages/assets/urls.js b/packages/assets/urls.js index d9f8640a6..241c1b17d 100644 --- a/packages/assets/urls.js +++ b/packages/assets/urls.js @@ -367,6 +367,14 @@ export function getAssetUrlsByMetaUrl(opts) { new URL('./icons/icon/size-small.svg', import.meta.url).href, opts ), + 'spline-cubic': formatAssetUrl( + new URL('./icons/icon/spline-cubic.svg', import.meta.url).href, + opts + ), + 'spline-line': formatAssetUrl( + new URL('./icons/icon/spline-line.svg', import.meta.url).href, + opts + ), 'stack-horizontal': formatAssetUrl( new URL('./icons/icon/stack-horizontal.svg', import.meta.url).href, opts diff --git a/packages/tldraw/api-report.md b/packages/tldraw/api-report.md index a6d2cc155..26da2b853 100644 --- a/packages/tldraw/api-report.md +++ b/packages/tldraw/api-report.md @@ -2218,7 +2218,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' | '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'; +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' | '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'; // @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 62b3f9711..4a2902624 100644 --- a/packages/tldraw/src/lib/ui/icon-types.ts +++ b/packages/tldraw/src/lib/ui/icon-types.ts @@ -106,6 +106,8 @@ export type TLUiIconType = | 'size-large' | 'size-medium' | 'size-small' + | 'spline-cubic' + | 'spline-line' | 'stack-horizontal' | 'stack-vertical' | 'stretch-horizontal' @@ -245,6 +247,8 @@ export const iconTypes = [ 'size-large', 'size-medium', 'size-small', + 'spline-cubic', + 'spline-line', 'stack-horizontal', 'stack-vertical', 'stretch-horizontal',