diff --git a/crates/voelin-ui/assets/README.md b/crates/voelin-ui/assets/README.md new file mode 100644 index 0000000..0819924 --- /dev/null +++ b/crates/voelin-ui/assets/README.md @@ -0,0 +1,12 @@ +# Bundled assets + +- `twemoji.bin`: the Twemoji 15.0 SVGs (3720 emoji, from the `@twemoji/svg` + 15.0.0 package) packed by `scripts/pack-twemoji.py` into blocks of raw + deflate with an index; `src/emoji.rs` reads it. Twemoji graphics by Twitter, + Inc and other contributors, licensed under CC-BY 4.0 + (https://creativecommons.org/licenses/by/4.0/). The files are unchanged + apart from surrounding whitespace. + +The fonts (Inter, SIL OFL 1.1) and icons (Lucide, ISC) that the Slint files +import are under `ui/assets/`, each with its license. All three are credited +in `THIRD_PARTY_NOTICES.md` and the About page. diff --git a/crates/voelin-ui/assets/twemoji.bin b/crates/voelin-ui/assets/twemoji.bin new file mode 100644 index 0000000..c9e4865 Binary files /dev/null and b/crates/voelin-ui/assets/twemoji.bin differ diff --git a/crates/voelin-ui/ui/assets/fonts/Inter-Bold.ttf b/crates/voelin-ui/ui/assets/fonts/Inter-Bold.ttf new file mode 100644 index 0000000..9fb9b75 Binary files /dev/null and b/crates/voelin-ui/ui/assets/fonts/Inter-Bold.ttf differ diff --git a/crates/voelin-ui/ui/assets/fonts/Inter-Italic.ttf b/crates/voelin-ui/ui/assets/fonts/Inter-Italic.ttf new file mode 100644 index 0000000..e7ed211 Binary files /dev/null and b/crates/voelin-ui/ui/assets/fonts/Inter-Italic.ttf differ diff --git a/crates/voelin-ui/ui/assets/fonts/Inter-Medium.ttf b/crates/voelin-ui/ui/assets/fonts/Inter-Medium.ttf new file mode 100644 index 0000000..458cd06 Binary files /dev/null and b/crates/voelin-ui/ui/assets/fonts/Inter-Medium.ttf differ diff --git a/crates/voelin-ui/ui/assets/fonts/Inter-Regular.ttf b/crates/voelin-ui/ui/assets/fonts/Inter-Regular.ttf new file mode 100644 index 0000000..b7aaca8 Binary files /dev/null and b/crates/voelin-ui/ui/assets/fonts/Inter-Regular.ttf differ diff --git a/crates/voelin-ui/ui/assets/fonts/Inter-SemiBold.ttf b/crates/voelin-ui/ui/assets/fonts/Inter-SemiBold.ttf new file mode 100644 index 0000000..47f8ab1 Binary files /dev/null and b/crates/voelin-ui/ui/assets/fonts/Inter-SemiBold.ttf differ diff --git a/crates/voelin-ui/ui/assets/fonts/LICENSE.txt b/crates/voelin-ui/ui/assets/fonts/LICENSE.txt new file mode 100644 index 0000000..9b2ca37 --- /dev/null +++ b/crates/voelin-ui/ui/assets/fonts/LICENSE.txt @@ -0,0 +1,92 @@ +Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION AND CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/crates/voelin-ui/ui/assets/icons/LICENSE b/crates/voelin-ui/ui/assets/icons/LICENSE new file mode 100644 index 0000000..718bb3f --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/LICENSE @@ -0,0 +1,43 @@ +ISC License + +Copyright (c) 2026 Lucide Icons and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--- + +The following Lucide icons are derived from the Feather project: + +airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out + +The MIT License (MIT) (for the icons listed above) + +Copyright (c) 2013-present Cole Bemis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/crates/voelin-ui/ui/assets/icons/activity.svg b/crates/voelin-ui/ui/assets/icons/activity.svg new file mode 100644 index 0000000..40c92a8 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/activity.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/arrow-left.svg b/crates/voelin-ui/ui/assets/icons/arrow-left.svg new file mode 100644 index 0000000..6e2984d --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/arrow-left.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/arrow-right.svg b/crates/voelin-ui/ui/assets/icons/arrow-right.svg new file mode 100644 index 0000000..55e5564 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/arrow-right.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/at-sign.svg b/crates/voelin-ui/ui/assets/icons/at-sign.svg new file mode 100644 index 0000000..76bda43 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/at-sign.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/audio-lines.svg b/crates/voelin-ui/ui/assets/icons/audio-lines.svg new file mode 100644 index 0000000..4188d22 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/audio-lines.svg @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/bell.svg b/crates/voelin-ui/ui/assets/icons/bell.svg new file mode 100644 index 0000000..a58ca12 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/bell.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/bookmark.svg b/crates/voelin-ui/ui/assets/icons/bookmark.svg new file mode 100644 index 0000000..3ecf52e --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/bookmark.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/calendar.svg b/crates/voelin-ui/ui/assets/icons/calendar.svg new file mode 100644 index 0000000..11d94b9 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/calendar.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/camera.svg b/crates/voelin-ui/ui/assets/icons/camera.svg new file mode 100644 index 0000000..1f6df0d --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/camera.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/cast.svg b/crates/voelin-ui/ui/assets/icons/cast.svg new file mode 100644 index 0000000..11afa5b --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/cast.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/check.svg b/crates/voelin-ui/ui/assets/icons/check.svg new file mode 100644 index 0000000..9c50c69 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/check.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/chevron-down.svg b/crates/voelin-ui/ui/assets/icons/chevron-down.svg new file mode 100644 index 0000000..a5f3545 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/chevron-down.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/chevron-left.svg b/crates/voelin-ui/ui/assets/icons/chevron-left.svg new file mode 100644 index 0000000..f7d5355 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/chevron-left.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/chevron-right.svg b/crates/voelin-ui/ui/assets/icons/chevron-right.svg new file mode 100644 index 0000000..fcc78d5 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/chevron-right.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/chevron-up.svg b/crates/voelin-ui/ui/assets/icons/chevron-up.svg new file mode 100644 index 0000000..3f66b33 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/chevron-up.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/circle-alert.svg b/crates/voelin-ui/ui/assets/icons/circle-alert.svg new file mode 100644 index 0000000..3f59b64 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/circle-alert.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/circle-dot.svg b/crates/voelin-ui/ui/assets/icons/circle-dot.svg new file mode 100644 index 0000000..574a826 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/circle-dot.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/circle-help.svg b/crates/voelin-ui/ui/assets/icons/circle-help.svg new file mode 100644 index 0000000..23e854a --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/circle-help.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/circle.svg b/crates/voelin-ui/ui/assets/icons/circle.svg new file mode 100644 index 0000000..c2ac889 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/circle.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/clock.svg b/crates/voelin-ui/ui/assets/icons/clock.svg new file mode 100644 index 0000000..8d583d9 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/clock.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/coffee.svg b/crates/voelin-ui/ui/assets/icons/coffee.svg new file mode 100644 index 0000000..b8d2577 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/coffee.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/compass.svg b/crates/voelin-ui/ui/assets/icons/compass.svg new file mode 100644 index 0000000..7b4a86a --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/compass.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/copy.svg b/crates/voelin-ui/ui/assets/icons/copy.svg new file mode 100644 index 0000000..4aa1bd2 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/copy.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/crown.svg b/crates/voelin-ui/ui/assets/icons/crown.svg new file mode 100644 index 0000000..4b10c34 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/crown.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/download.svg b/crates/voelin-ui/ui/assets/icons/download.svg new file mode 100644 index 0000000..0db2389 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/download.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/ellipsis-vertical.svg b/crates/voelin-ui/ui/assets/icons/ellipsis-vertical.svg new file mode 100644 index 0000000..2a7bafe --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/ellipsis-vertical.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/ellipsis.svg b/crates/voelin-ui/ui/assets/icons/ellipsis.svg new file mode 100644 index 0000000..6b61d7f --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/ellipsis.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/external-link.svg b/crates/voelin-ui/ui/assets/icons/external-link.svg new file mode 100644 index 0000000..78af062 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/external-link.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/eye-off.svg b/crates/voelin-ui/ui/assets/icons/eye-off.svg new file mode 100644 index 0000000..faa83a8 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/eye-off.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/eye.svg b/crates/voelin-ui/ui/assets/icons/eye.svg new file mode 100644 index 0000000..4d16d9d --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/eye.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/file-text.svg b/crates/voelin-ui/ui/assets/icons/file-text.svg new file mode 100644 index 0000000..e3efa62 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/file-text.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/file.svg b/crates/voelin-ui/ui/assets/icons/file.svg new file mode 100644 index 0000000..5d91e41 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/file.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/flag.svg b/crates/voelin-ui/ui/assets/icons/flag.svg new file mode 100644 index 0000000..09b415c --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/flag.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/flame.svg b/crates/voelin-ui/ui/assets/icons/flame.svg new file mode 100644 index 0000000..48ab151 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/flame.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/folder-open.svg b/crates/voelin-ui/ui/assets/icons/folder-open.svg new file mode 100644 index 0000000..b454302 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/folder-open.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/gamepad-2.svg b/crates/voelin-ui/ui/assets/icons/gamepad-2.svg new file mode 100644 index 0000000..c526f3c --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/gamepad-2.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/gift.svg b/crates/voelin-ui/ui/assets/icons/gift.svg new file mode 100644 index 0000000..1b685ec --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/gift.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/globe.svg b/crates/voelin-ui/ui/assets/icons/globe.svg new file mode 100644 index 0000000..88e764f --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/globe.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/grip-vertical.svg b/crates/voelin-ui/ui/assets/icons/grip-vertical.svg new file mode 100644 index 0000000..5fcf574 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/grip-vertical.svg @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/hand.svg b/crates/voelin-ui/ui/assets/icons/hand.svg new file mode 100644 index 0000000..46212f9 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/hand.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/hard-drive.svg b/crates/voelin-ui/ui/assets/icons/hard-drive.svg new file mode 100644 index 0000000..99c24bf --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/hard-drive.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/hash.svg b/crates/voelin-ui/ui/assets/icons/hash.svg new file mode 100644 index 0000000..8587430 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/hash.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/headphone-off.svg b/crates/voelin-ui/ui/assets/icons/headphone-off.svg new file mode 100644 index 0000000..694e58e --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/headphone-off.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/headphones.svg b/crates/voelin-ui/ui/assets/icons/headphones.svg new file mode 100644 index 0000000..6414f47 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/headphones.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/heart.svg b/crates/voelin-ui/ui/assets/icons/heart.svg new file mode 100644 index 0000000..60534cb --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/heart.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/house.svg b/crates/voelin-ui/ui/assets/icons/house.svg new file mode 100644 index 0000000..4ec24cb --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/house.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/image.svg b/crates/voelin-ui/ui/assets/icons/image.svg new file mode 100644 index 0000000..8b73389 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/image.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/info.svg b/crates/voelin-ui/ui/assets/icons/info.svg new file mode 100644 index 0000000..c158e13 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/info.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/keyboard.svg b/crates/voelin-ui/ui/assets/icons/keyboard.svg new file mode 100644 index 0000000..c38c84e --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/keyboard.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/layout-grid.svg b/crates/voelin-ui/ui/assets/icons/layout-grid.svg new file mode 100644 index 0000000..5ce0c7c --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/layout-grid.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/leaf.svg b/crates/voelin-ui/ui/assets/icons/leaf.svg new file mode 100644 index 0000000..1112461 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/leaf.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/library.svg b/crates/voelin-ui/ui/assets/icons/library.svg new file mode 100644 index 0000000..4799566 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/library.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/lightbulb.svg b/crates/voelin-ui/ui/assets/icons/lightbulb.svg new file mode 100644 index 0000000..ffe63b4 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/lightbulb.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/link.svg b/crates/voelin-ui/ui/assets/icons/link.svg new file mode 100644 index 0000000..91b3573 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/link.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/loader-circle.svg b/crates/voelin-ui/ui/assets/icons/loader-circle.svg new file mode 100644 index 0000000..e957323 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/loader-circle.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/lock.svg b/crates/voelin-ui/ui/assets/icons/lock.svg new file mode 100644 index 0000000..e3303b9 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/lock.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/log-in.svg b/crates/voelin-ui/ui/assets/icons/log-in.svg new file mode 100644 index 0000000..eb003f3 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/log-in.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/log-out.svg b/crates/voelin-ui/ui/assets/icons/log-out.svg new file mode 100644 index 0000000..7796c51 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/log-out.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/maximize.svg b/crates/voelin-ui/ui/assets/icons/maximize.svg new file mode 100644 index 0000000..d4bcb30 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/maximize.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/message-circle.svg b/crates/voelin-ui/ui/assets/icons/message-circle.svg new file mode 100644 index 0000000..58da866 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/message-circle.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/message-square.svg b/crates/voelin-ui/ui/assets/icons/message-square.svg new file mode 100644 index 0000000..b477873 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/message-square.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/messages-square.svg b/crates/voelin-ui/ui/assets/icons/messages-square.svg new file mode 100644 index 0000000..693df53 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/messages-square.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/mic-off.svg b/crates/voelin-ui/ui/assets/icons/mic-off.svg new file mode 100644 index 0000000..02fd7d3 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/mic-off.svg @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/mic.svg b/crates/voelin-ui/ui/assets/icons/mic.svg new file mode 100644 index 0000000..472ca06 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/mic.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/minimize-2.svg b/crates/voelin-ui/ui/assets/icons/minimize-2.svg new file mode 100644 index 0000000..81140c9 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/minimize-2.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/minus.svg b/crates/voelin-ui/ui/assets/icons/minus.svg new file mode 100644 index 0000000..c59db61 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/minus.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/monitor-off.svg b/crates/voelin-ui/ui/assets/icons/monitor-off.svg new file mode 100644 index 0000000..895b7c4 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/monitor-off.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/monitor-up.svg b/crates/voelin-ui/ui/assets/icons/monitor-up.svg new file mode 100644 index 0000000..c067ac3 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/monitor-up.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/monitor.svg b/crates/voelin-ui/ui/assets/icons/monitor.svg new file mode 100644 index 0000000..da4c924 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/monitor.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/moon.svg b/crates/voelin-ui/ui/assets/icons/moon.svg new file mode 100644 index 0000000..c0f8e8c --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/moon.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/music.svg b/crates/voelin-ui/ui/assets/icons/music.svg new file mode 100644 index 0000000..95d1b5d --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/music.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/palette.svg b/crates/voelin-ui/ui/assets/icons/palette.svg new file mode 100644 index 0000000..4044dcb --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/palette.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/panel-right.svg b/crates/voelin-ui/ui/assets/icons/panel-right.svg new file mode 100644 index 0000000..41cb2d6 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/panel-right.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/paperclip.svg b/crates/voelin-ui/ui/assets/icons/paperclip.svg new file mode 100644 index 0000000..e867ae8 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/paperclip.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/pause.svg b/crates/voelin-ui/ui/assets/icons/pause.svg new file mode 100644 index 0000000..2ad3d95 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/pause.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/pencil.svg b/crates/voelin-ui/ui/assets/icons/pencil.svg new file mode 100644 index 0000000..ccfea63 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/pencil.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/phone-off.svg b/crates/voelin-ui/ui/assets/icons/phone-off.svg new file mode 100644 index 0000000..0a94ac2 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/phone-off.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/pin.svg b/crates/voelin-ui/ui/assets/icons/pin.svg new file mode 100644 index 0000000..97b7130 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/pin.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/plane.svg b/crates/voelin-ui/ui/assets/icons/plane.svg new file mode 100644 index 0000000..1ea3503 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/plane.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/play.svg b/crates/voelin-ui/ui/assets/icons/play.svg new file mode 100644 index 0000000..c2ef3e2 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/play.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/plus.svg b/crates/voelin-ui/ui/assets/icons/plus.svg new file mode 100644 index 0000000..d3cd0a3 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/plus.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/puzzle.svg b/crates/voelin-ui/ui/assets/icons/puzzle.svg new file mode 100644 index 0000000..51a2b28 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/puzzle.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/radio.svg b/crates/voelin-ui/ui/assets/icons/radio.svg new file mode 100644 index 0000000..3179788 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/radio.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/refresh-cw.svg b/crates/voelin-ui/ui/assets/icons/refresh-cw.svg new file mode 100644 index 0000000..c083047 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/refresh-cw.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/screen-share.svg b/crates/voelin-ui/ui/assets/icons/screen-share.svg new file mode 100644 index 0000000..45529e6 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/screen-share.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/search.svg b/crates/voelin-ui/ui/assets/icons/search.svg new file mode 100644 index 0000000..ba16b99 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/search.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/send-horizontal.svg b/crates/voelin-ui/ui/assets/icons/send-horizontal.svg new file mode 100644 index 0000000..3875400 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/send-horizontal.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/server.svg b/crates/voelin-ui/ui/assets/icons/server.svg new file mode 100644 index 0000000..db7f2cc --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/server.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/settings.svg b/crates/voelin-ui/ui/assets/icons/settings.svg new file mode 100644 index 0000000..e23730e --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/settings.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/shield-check.svg b/crates/voelin-ui/ui/assets/icons/shield-check.svg new file mode 100644 index 0000000..96c303d --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/shield-check.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/shield.svg b/crates/voelin-ui/ui/assets/icons/shield.svg new file mode 100644 index 0000000..4d256a3 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/shield.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/sliders-horizontal.svg b/crates/voelin-ui/ui/assets/icons/sliders-horizontal.svg new file mode 100644 index 0000000..8241295 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/sliders-horizontal.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/smartphone.svg b/crates/voelin-ui/ui/assets/icons/smartphone.svg new file mode 100644 index 0000000..3aa9411 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/smartphone.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/smile-plus.svg b/crates/voelin-ui/ui/assets/icons/smile-plus.svg new file mode 100644 index 0000000..2bf9238 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/smile-plus.svg @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/smile.svg b/crates/voelin-ui/ui/assets/icons/smile.svg new file mode 100644 index 0000000..f61140d --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/smile.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/sparkles.svg b/crates/voelin-ui/ui/assets/icons/sparkles.svg new file mode 100644 index 0000000..e13154b --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/sparkles.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/square.svg b/crates/voelin-ui/ui/assets/icons/square.svg new file mode 100644 index 0000000..8df41cd --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/square.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/star.svg b/crates/voelin-ui/ui/assets/icons/star.svg new file mode 100644 index 0000000..3f05f7b --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/star.svg @@ -0,0 +1,15 @@ + + + + diff --git a/crates/voelin-ui/ui/assets/icons/sun.svg b/crates/voelin-ui/ui/assets/icons/sun.svg new file mode 100644 index 0000000..5644b61 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/sun.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/trash-2.svg b/crates/voelin-ui/ui/assets/icons/trash-2.svg new file mode 100644 index 0000000..a276e0b --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/trash-2.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/triangle-alert.svg b/crates/voelin-ui/ui/assets/icons/triangle-alert.svg new file mode 100644 index 0000000..18af8cd --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/triangle-alert.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/type.svg b/crates/voelin-ui/ui/assets/icons/type.svg new file mode 100644 index 0000000..eaf86aa --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/type.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/user-plus.svg b/crates/voelin-ui/ui/assets/icons/user-plus.svg new file mode 100644 index 0000000..f2007a2 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/user-plus.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/user.svg b/crates/voelin-ui/ui/assets/icons/user.svg new file mode 100644 index 0000000..b020953 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/user.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/users.svg b/crates/voelin-ui/ui/assets/icons/users.svg new file mode 100644 index 0000000..9d8738d --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/users.svg @@ -0,0 +1,18 @@ + + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/video-off.svg b/crates/voelin-ui/ui/assets/icons/video-off.svg new file mode 100644 index 0000000..9ef415e --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/video-off.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/video.svg b/crates/voelin-ui/ui/assets/icons/video.svg new file mode 100644 index 0000000..2b21175 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/video.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/volume-2.svg b/crates/voelin-ui/ui/assets/icons/volume-2.svg new file mode 100644 index 0000000..d5299e4 --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/volume-2.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/volume-x.svg b/crates/voelin-ui/ui/assets/icons/volume-x.svg new file mode 100644 index 0000000..3fe57ce --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/volume-x.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/crates/voelin-ui/ui/assets/icons/x.svg b/crates/voelin-ui/ui/assets/icons/x.svg new file mode 100644 index 0000000..7b9f74b --- /dev/null +++ b/crates/voelin-ui/ui/assets/icons/x.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/crates/voelin-ui/ui/assets/logo.svg b/crates/voelin-ui/ui/assets/logo.svg new file mode 100644 index 0000000..4b4c2c5 --- /dev/null +++ b/crates/voelin-ui/ui/assets/logo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/scripts/pack-twemoji.py b/scripts/pack-twemoji.py new file mode 100755 index 0000000..7e4889e --- /dev/null +++ b/scripts/pack-twemoji.py @@ -0,0 +1,316 @@ +#!/usr/bin/env python3 +"""Pack the Twemoji SVGs into one compressed archive for the UI. + +Colour emoji cannot go through the software renderer's text path, so the UI +shows them as images: `crates/voelin-ui/src/emoji.rs` reads this archive +(embedded in the binary) and decodes single emoji on demand. + +Usage: + scripts/pack-twemoji.py [out] + +The package is @twemoji/svg (15.0.0: `npm pack @twemoji/svg`, unpacked); the +directory holds the SVGs named by code points (`1f600.svg`, +`1f468-200d-1f4bb.svg`). `out` defaults to +crates/voelin-ui/assets/twemoji.bin. Only the Python standard library is +needed; names come from its `unicodedata` plus a table for the emoji newer +than it (Unicode 15), so any Python 3.11+ gives the same file. + +Format (little-endian): + magic b"VTWEMOJ1" + u32 entries, u32 blocks, u32 strings_len + blocks [u32 offset, u32 compressed_len, u32 raw_len]; offset + from the start of the data section + entries sorted by key: [u32 key_off, u16 key_len, u16 category, + u32 block, u32 offset, u32 len, u32 name_off, u16 name_len, + u16 flags]; flags bit 0: shown in the picker + strings keys and names (UTF-8, lower case) + data raw deflate blocks of about BLOCK bytes of SVG each, in + picker order, so a category decodes few blocks +""" + +import os +import struct +import sys +import unicodedata +import zlib + +BLOCK = 64 * 1024 + +# Picker categories, in order; the index is stored per entry. +CATEGORIES = [ + "smileys", + "people", + "nature", + "food", + "activities", + "travel", + "objects", + "symbols", + "flags", +] + +# First code point → category, first match wins (a coarse grouping; the +# picker also searches by name). +RANGES = [ + ((0x1F1E6, 0x1F1FF), "flags"), + ((0x1F3F3, 0x1F3F4), "flags"), + ((0x1F6A9, 0x1F6A9), "flags"), + ((0x1F38C, 0x1F38C), "flags"), + ((0x1F600, 0x1F644), "smileys"), + ((0x1F645, 0x1F64F), "people"), + ((0x1F910, 0x1F917), "smileys"), + ((0x1F920, 0x1F925), "smileys"), + ((0x1F927, 0x1F92F), "smileys"), + ((0x1F970, 0x1F97A), "smileys"), + ((0x1F9D0, 0x1F9D0), "smileys"), + ((0x1FAE0, 0x1FAE8), "smileys"), + ((0x1F479, 0x1F480), "smileys"), + ((0x1F4A9, 0x1F4A9), "smileys"), + ((0x1F48B, 0x1F48B), "smileys"), + ((0x1F493, 0x1F49F), "symbols"), + ((0x2764, 0x2764), "symbols"), + ((0x1F90D, 0x1F90E), "symbols"), + ((0x1F9E1, 0x1F9E1), "symbols"), + ((0x1FA75, 0x1FA77), "symbols"), + ((0x263A, 0x263A), "smileys"), + ((0x2639, 0x2639), "smileys"), + ((0x1F440, 0x1F450), "people"), + ((0x1F466, 0x1F487), "people"), + ((0x1F48F, 0x1F491), "people"), + ((0x1F574, 0x1F57A), "people"), + ((0x1F590, 0x1F596), "people"), + ((0x1F6B4, 0x1F6B6), "people"), + ((0x1F6C0, 0x1F6C0), "people"), + ((0x1F6CC, 0x1F6CC), "people"), + ((0x1F90C, 0x1F90F), "people"), + ((0x1F918, 0x1F91F), "people"), + ((0x1F926, 0x1F926), "people"), + ((0x1F930, 0x1F93E), "people"), + ((0x1F9B0, 0x1F9B9), "people"), + ((0x1F9BB, 0x1F9BB), "people"), + ((0x1F9CD, 0x1F9CF), "people"), + ((0x1F9D1, 0x1F9DF), "people"), + ((0x1FAC3, 0x1FAC5), "people"), + ((0x1FAF0, 0x1FAF8), "people"), + ((0x261D, 0x261D), "people"), + ((0x26F9, 0x26F9), "people"), + ((0x270A, 0x270D), "people"), + ((0x1F3C2, 0x1F3C4), "people"), + ((0x1F3C7, 0x1F3C7), "people"), + ((0x1F3CA, 0x1F3CC), "people"), + ((0x1F463, 0x1F463), "people"), + ((0x1F5E3, 0x1F5E3), "people"), + ((0x1F464, 0x1F465), "people"), + ((0x1FAC2, 0x1FAC2), "people"), + ((0x1F9E0, 0x1F9E0), "people"), + ((0x1FAC0, 0x1FAC1), "people"), + ((0x1F400, 0x1F43F), "nature"), + ((0x1F330, 0x1F344), "nature"), + ((0x1F490, 0x1F490), "nature"), + ((0x1F4AE, 0x1F4AE), "nature"), + ((0x1F940, 0x1F940), "nature"), + ((0x1F980, 0x1F9AE), "nature"), + ((0x1FAB0, 0x1FABF), "nature"), + ((0x1FACE, 0x1FACF), "nature"), + ((0x1F54A, 0x1F54A), "nature"), + ((0x1F577, 0x1F578), "nature"), + ((0x1F308, 0x1F308), "travel"), + ((0x2618, 0x2618), "nature"), + ((0x1F345, 0x1F37F), "food"), + ((0x1F942, 0x1F96F), "food"), + ((0x1F9C0, 0x1F9CB), "food"), + ((0x1FAD0, 0x1FADB), "food"), + ((0x2615, 0x2615), "food"), + ((0x1F380, 0x1F393), "activities"), + ((0x1F396, 0x1F3C1), "activities"), + ((0x1F3C5, 0x1F3C6), "activities"), + ((0x1F3C8, 0x1F3C9), "activities"), + ((0x1F3CD, 0x1F3F0), "activities"), + ((0x1F3F5, 0x1F3FA), "activities"), + ((0x1F93F, 0x1F93F), "activities"), + ((0x1F945, 0x1F94F), "activities"), + ((0x1F941, 0x1F941), "activities"), + ((0x1F9E9, 0x1F9E9), "activities"), + ((0x1FA80, 0x1FA88), "activities"), + ((0x26BD, 0x26BE), "activities"), + ((0x26F3, 0x26F3), "activities"), + ((0x26F8, 0x26F8), "activities"), + ((0x265F, 0x265F), "activities"), + ((0x1F0CF, 0x1F0CF), "activities"), + ((0x1F004, 0x1F004), "activities"), + ((0x1F680, 0x1F6FF), "travel"), + ((0x1F300, 0x1F32F), "travel"), + ((0x1F5FA, 0x1F5FF), "travel"), + ((0x2600, 0x2604), "travel"), + ((0x26C4, 0x26C8), "travel"), + ((0x26E9, 0x26FA), "travel"), + ((0x26FD, 0x26FD), "travel"), + ((0x2708, 0x2708), "travel"), + ((0x2744, 0x2744), "travel"), + ((0x1F3D4, 0x1F3DF), "travel"), + ((0x2693, 0x2693), "travel"), + ((0x231A, 0x231B), "objects"), + ((0x23F0, 0x23F3), "objects"), + ((0x1F4A0, 0x1F4FF), "objects"), + ((0x1F500, 0x1F53D), "symbols"), + ((0x1F549, 0x1F573), "objects"), + ((0x1F57B, 0x1F5F9), "objects"), + ((0x1F9E2, 0x1F9FF), "objects"), + ((0x1FA70, 0x1FA7F), "objects"), + ((0x1FA90, 0x1FAAF), "objects"), + ((0x260E, 0x260E), "objects"), + ((0x2692, 0x2699), "objects"), + ((0x26CF, 0x26D4), "objects"), + ((0x2702, 0x2712), "objects"), + ((0x1F3FB, 0x1F3FF), "people"), +] + +# Emoji newer than Python 3.11's Unicode database (14.0). +EXTRA_NAMES = { + 0x1F6DC: "wireless", + 0x1FA75: "light blue heart", + 0x1FA76: "grey heart", + 0x1FA77: "pink heart", + 0x1FA87: "maracas", + 0x1FA88: "flute", + 0x1FAAD: "folding hand fan", + 0x1FAAE: "hair pick", + 0x1FAAF: "khanda", + 0x1FABB: "hyacinth", + 0x1FABC: "jellyfish", + 0x1FABD: "wing", + 0x1FABF: "goose", + 0x1FACE: "moose", + 0x1FACF: "donkey", + 0x1FADA: "ginger root", + 0x1FADB: "pea pod", + 0x1FAE8: "shaking face", + 0x1FAF7: "leftwards pushing hand", + 0x1FAF8: "rightwards pushing hand", +} + +# Code points that are not part of a name. +SILENT = {0x200D, 0xFE0F, 0x20E3} +SKIN_TONES = range(0x1F3FB, 0x1F400) + + +def cp_name(cp): + if cp in EXTRA_NAMES: + return EXTRA_NAMES[cp] + if 0x1F1E6 <= cp <= 0x1F1FF: + return chr(cp - 0x1F1E6 + ord("a")) + if 0xE0020 <= cp <= 0xE007F: + return "" + return unicodedata.name(chr(cp), "").lower() + + +def entry_name(cps): + if all(0x1F1E6 <= cp <= 0x1F1FF for cp in cps): + return "flag " + "".join(cp_name(cp) for cp in cps) + parts = [cp_name(cp) for cp in cps if cp not in SILENT] + return " ".join(p for p in parts if p).replace("emoji modifier fitzpatrick type-", "skin tone ") + + +def category(cps): + if all(0x1F1E6 <= cp <= 0x1F1FF for cp in cps) and len(cps) == 2: + return "flags" + first = cps[0] + # Keycaps and other text symbols. + if first < 0x2000 or (0x20E3 in cps): + return "symbols" + for (lo, hi), cat in RANGES: + if lo <= first <= hi: + return cat + return "symbols" + + +def in_picker(cps): + if any(cp in SKIN_TONES for cp in cps): + return False + # Single regional indicators and tags are building blocks. + if len(cps) == 1 and 0x1F1E6 <= cps[0] <= 0x1F1FF: + return False + return True + + +def main(): + if len(sys.argv) < 2: + print(__doc__, file=sys.stderr) + sys.exit(2) + src = sys.argv[1] + root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + out = sys.argv[2] if len(sys.argv) > 2 else os.path.join(root, "crates/voelin-ui/assets/twemoji.bin") + items = [] + for file in os.listdir(src): + if not file.endswith(".svg"): + continue + key = file[:-4] + cps = [int(p, 16) for p in key.split("-")] + with open(os.path.join(src, file), "rb") as f: + svg = f.read().strip() + cat = category(cps) + items.append({ + "key": key, + "cps": cps, + "svg": svg, + "cat": CATEGORIES.index(cat), + "name": entry_name(cps), + "picker": in_picker(cps) and entry_name(cps) != "", + }) + # Data in picker order: category, then code points. + items.sort(key=lambda it: (it["cat"], it["cps"])) + blocks = [] + raw = bytearray() + for it in items: + if len(raw) >= BLOCK: + blocks.append(bytes(raw)) + raw = bytearray() + it["block"] = len(blocks) + it["offset"] = len(raw) + raw += it["svg"] + if raw: + blocks.append(bytes(raw)) + + strings = bytearray() + for it in items: + it["key_off"] = len(strings) + strings += it["key"].encode() + it["name_off"] = len(strings) + strings += it["name"].encode() + + data = bytearray() + block_table = bytearray() + for b in blocks: + c = zlib.compressobj(9, zlib.DEFLATED, -15) + comp = c.compress(b) + c.flush() + block_table += struct.pack("