diff --git a/studio/package-lock.json b/studio/package-lock.json index 2ed25bf5e..fec043457 100644 --- a/studio/package-lock.json +++ b/studio/package-lock.json @@ -11,7 +11,6 @@ "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cn": "^0.5.2", - "lucide-react": "^1.69.0", "radix-ui": "^1.8.1", "react": "^19.3.1", "react-dom": "^19.3.1", @@ -3807,21 +3806,6 @@ "yallist": "^3.0.2" } }, - "node_modules/lucide-react": { - "version": "1.69.0", - "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.69.0.tgz", - "integrity": "sha512-UTFECm4yEgkgMN0kfLuxWcmlk+4u02Jrqehgk3ZXRx/Ud68OpP7hjkp67bvkBHmIpMaZCIveF1QDYeupO7XmYQ==", - "license": "ISC", - "peerDependencies": { - "@types/react": "*", - "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/magic-string": { "version": "1.4.5", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz", diff --git a/studio/package.json b/studio/package.json index 38e4424d5..4e8bae009 100644 --- a/studio/package.json +++ b/studio/package.json @@ -31,7 +31,6 @@ "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cn": "^0.5.2", - "lucide-react": "^1.69.0", "radix-ui": "^1.8.1", "react": "^19.3.1", "react-dom": "^19.3.1", diff --git a/studio/src/renderer/src/components/IdeIcon.tsx b/studio/src/renderer/src/components/IdeIcon.tsx new file mode 100644 index 000000000..58d09f34f --- /dev/null +++ b/studio/src/renderer/src/components/IdeIcon.tsx @@ -0,0 +1,63 @@ +import { cn } from '@/lib/utils' + +// IntelliJ's expui icons (see icons/NOTICE.txt): each has a light file and a "_dark" twin in its own colours. +const ICON_URLS = import.meta.glob('../icons/**/*.svg', { eager: true, query: '?url', import: 'default' }) +const DARK_SUFFIX = '_dark' + +export type IdeIconName = + | 'add' + | 'checked' + | 'closeSmall' + | 'chevronLeft' + | 'chevronRight' + | 'delete' + | 'exit' + | 'grid' + | 'groups' + | 'help' + | 'lightning' + | 'locate' + | 'locked' + | 'memory' + | 'redo' + | 'refresh' + | 'reset' + | 'search' + | 'settings' + | 'stopWatch' + | 'symlink' + | 'undo' + | 'user' + | 'web' + | 'zoomIn' + | 'views/biomes' + | 'views/cave-biomes' + | 'views/height' + | 'views/land-biomes' + | 'views/noise' + | 'views/objects' + | 'views/palettes' + | 'views/procedural' + | 'views/regions' + | 'views/saved-world' + | 'views/sea-biomes' + | 'views/world-3d' + +function iconUrl(name: string): string { + const url = ICON_URLS[`../icons/${name}.svg`] + if (url === undefined) { + throw new Error(`No icon named ${name}`) + } + return url +} + +/** An IntelliJ icon, 16 px unless sized, in the light or dark colours the window shows. */ +export function IdeIcon({ name, className }: { name: IdeIconName; className?: string }): React.JSX.Element { + const size = cn('size-4 shrink-0', className) + return ( + <> + + + + ) +} diff --git a/studio/src/renderer/src/components/ui/context-menu.tsx b/studio/src/renderer/src/components/ui/context-menu.tsx index d3d0f9c5b..2c427349a 100644 --- a/studio/src/renderer/src/components/ui/context-menu.tsx +++ b/studio/src/renderer/src/components/ui/context-menu.tsx @@ -1,6 +1,6 @@ import * as React from "react" import { cn } from "@/lib/utils" -import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react" +import { IdeIcon } from "@/components/IdeIcon" import { ContextMenu as ContextMenuPrimitive } from "radix-ui" function ContextMenu({ @@ -69,7 +69,9 @@ function ContextMenuSubTrigger({ {...props} > {children} - + + + ) } @@ -152,7 +154,7 @@ function ContextMenuCheckboxItem({ > - + {children} @@ -176,7 +178,7 @@ function ContextMenuRadioItem({ > - + {children} diff --git a/studio/src/renderer/src/components/ui/dialog.tsx b/studio/src/renderer/src/components/ui/dialog.tsx index 92a3c49bb..c711324fb 100644 --- a/studio/src/renderer/src/components/ui/dialog.tsx +++ b/studio/src/renderer/src/components/ui/dialog.tsx @@ -2,7 +2,7 @@ import * as React from "react" import { cn } from "@/lib/utils" -import { XIcon } from "lucide-react" +import { IdeIcon } from "@/components/IdeIcon" import { Dialog as DialogPrimitive } from "radix-ui" import { Button } from "@/components/ui/button" @@ -72,7 +72,7 @@ function DialogContent({ data-slot="dialog-close" className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4" > - + Close )} diff --git a/studio/src/renderer/src/env.d.ts b/studio/src/renderer/src/env.d.ts index dc2bc14e4..3ab813db9 100644 --- a/studio/src/renderer/src/env.d.ts +++ b/studio/src/renderer/src/env.d.ts @@ -1,3 +1,4 @@ +/// import type { StudioHost } from '../../shared/bridge' declare global { diff --git a/studio/src/renderer/src/icons/LICENSE-APACHE-2.0.txt b/studio/src/renderer/src/icons/LICENSE-APACHE-2.0.txt new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/studio/src/renderer/src/icons/LICENSE-APACHE-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/studio/src/renderer/src/icons/NOTICE.txt b/studio/src/renderer/src/icons/NOTICE.txt new file mode 100644 index 000000000..7d720e4a1 --- /dev/null +++ b/studio/src/renderer/src/icons/NOTICE.txt @@ -0,0 +1,4 @@ +The icons in this folder and its subfolders come from the IntelliJ Platform (https://github.com/JetBrains/intellij-community), +platform/icons/src/expui, Copyright 2000-2023 JetBrains s.r.o. and contributors, +used under the Apache License 2.0 (LICENSE-APACHE-2.0.txt). +memory.svg is profileMemory.svg with its profiling badge removed. diff --git a/studio/src/renderer/src/icons/add.svg b/studio/src/renderer/src/icons/add.svg new file mode 100644 index 000000000..57eaaf561 --- /dev/null +++ b/studio/src/renderer/src/icons/add.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/add_dark.svg b/studio/src/renderer/src/icons/add_dark.svg new file mode 100644 index 000000000..397e9321b --- /dev/null +++ b/studio/src/renderer/src/icons/add_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/checked.svg b/studio/src/renderer/src/icons/checked.svg new file mode 100644 index 000000000..863bbc418 --- /dev/null +++ b/studio/src/renderer/src/icons/checked.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/checked_dark.svg b/studio/src/renderer/src/icons/checked_dark.svg new file mode 100644 index 000000000..3e1d9ecc3 --- /dev/null +++ b/studio/src/renderer/src/icons/checked_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/chevronLeft.svg b/studio/src/renderer/src/icons/chevronLeft.svg new file mode 100644 index 000000000..c6c4fa041 --- /dev/null +++ b/studio/src/renderer/src/icons/chevronLeft.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/chevronLeft_dark.svg b/studio/src/renderer/src/icons/chevronLeft_dark.svg new file mode 100644 index 000000000..d4284d234 --- /dev/null +++ b/studio/src/renderer/src/icons/chevronLeft_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/chevronRight.svg b/studio/src/renderer/src/icons/chevronRight.svg new file mode 100644 index 000000000..5120ed891 --- /dev/null +++ b/studio/src/renderer/src/icons/chevronRight.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/chevronRight_dark.svg b/studio/src/renderer/src/icons/chevronRight_dark.svg new file mode 100644 index 000000000..838142106 --- /dev/null +++ b/studio/src/renderer/src/icons/chevronRight_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/closeSmall.svg b/studio/src/renderer/src/icons/closeSmall.svg new file mode 100644 index 000000000..c375b9331 --- /dev/null +++ b/studio/src/renderer/src/icons/closeSmall.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/closeSmall_dark.svg b/studio/src/renderer/src/icons/closeSmall_dark.svg new file mode 100644 index 000000000..237d6d45d --- /dev/null +++ b/studio/src/renderer/src/icons/closeSmall_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/delete.svg b/studio/src/renderer/src/icons/delete.svg new file mode 100644 index 000000000..a858096ac --- /dev/null +++ b/studio/src/renderer/src/icons/delete.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/delete_dark.svg b/studio/src/renderer/src/icons/delete_dark.svg new file mode 100644 index 000000000..03ff9f241 --- /dev/null +++ b/studio/src/renderer/src/icons/delete_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/exit.svg b/studio/src/renderer/src/icons/exit.svg new file mode 100644 index 000000000..8ff96d714 --- /dev/null +++ b/studio/src/renderer/src/icons/exit.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/studio/src/renderer/src/icons/exit_dark.svg b/studio/src/renderer/src/icons/exit_dark.svg new file mode 100644 index 000000000..e4cdd4abf --- /dev/null +++ b/studio/src/renderer/src/icons/exit_dark.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/studio/src/renderer/src/icons/grid.svg b/studio/src/renderer/src/icons/grid.svg new file mode 100644 index 000000000..8b28efaf4 --- /dev/null +++ b/studio/src/renderer/src/icons/grid.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/grid_dark.svg b/studio/src/renderer/src/icons/grid_dark.svg new file mode 100644 index 000000000..98f561847 --- /dev/null +++ b/studio/src/renderer/src/icons/grid_dark.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/groups.svg b/studio/src/renderer/src/icons/groups.svg new file mode 100644 index 000000000..d4ab80fbb --- /dev/null +++ b/studio/src/renderer/src/icons/groups.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/groups_dark.svg b/studio/src/renderer/src/icons/groups_dark.svg new file mode 100644 index 000000000..2769c3ce0 --- /dev/null +++ b/studio/src/renderer/src/icons/groups_dark.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/help.svg b/studio/src/renderer/src/icons/help.svg new file mode 100644 index 000000000..203346d24 --- /dev/null +++ b/studio/src/renderer/src/icons/help.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/studio/src/renderer/src/icons/help_dark.svg b/studio/src/renderer/src/icons/help_dark.svg new file mode 100644 index 000000000..d571baabe --- /dev/null +++ b/studio/src/renderer/src/icons/help_dark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/studio/src/renderer/src/icons/lightning.svg b/studio/src/renderer/src/icons/lightning.svg new file mode 100644 index 000000000..4ac384edd --- /dev/null +++ b/studio/src/renderer/src/icons/lightning.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/lightning_dark.svg b/studio/src/renderer/src/icons/lightning_dark.svg new file mode 100644 index 000000000..251f75413 --- /dev/null +++ b/studio/src/renderer/src/icons/lightning_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/locate.svg b/studio/src/renderer/src/icons/locate.svg new file mode 100644 index 000000000..2343fa2e3 --- /dev/null +++ b/studio/src/renderer/src/icons/locate.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/locate_dark.svg b/studio/src/renderer/src/icons/locate_dark.svg new file mode 100644 index 000000000..a2ba607aa --- /dev/null +++ b/studio/src/renderer/src/icons/locate_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/locked.svg b/studio/src/renderer/src/icons/locked.svg new file mode 100644 index 000000000..666daddf5 --- /dev/null +++ b/studio/src/renderer/src/icons/locked.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/locked_dark.svg b/studio/src/renderer/src/icons/locked_dark.svg new file mode 100644 index 000000000..9658ca553 --- /dev/null +++ b/studio/src/renderer/src/icons/locked_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/memory.svg b/studio/src/renderer/src/icons/memory.svg new file mode 100644 index 000000000..6af68790d --- /dev/null +++ b/studio/src/renderer/src/icons/memory.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/memory_dark.svg b/studio/src/renderer/src/icons/memory_dark.svg new file mode 100644 index 000000000..92038e383 --- /dev/null +++ b/studio/src/renderer/src/icons/memory_dark.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/redo.svg b/studio/src/renderer/src/icons/redo.svg new file mode 100644 index 000000000..862b8f574 --- /dev/null +++ b/studio/src/renderer/src/icons/redo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/redo_dark.svg b/studio/src/renderer/src/icons/redo_dark.svg new file mode 100644 index 000000000..a39093042 --- /dev/null +++ b/studio/src/renderer/src/icons/redo_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/refresh.svg b/studio/src/renderer/src/icons/refresh.svg new file mode 100644 index 000000000..7a4c73dfd --- /dev/null +++ b/studio/src/renderer/src/icons/refresh.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/refresh_dark.svg b/studio/src/renderer/src/icons/refresh_dark.svg new file mode 100644 index 000000000..3362992af --- /dev/null +++ b/studio/src/renderer/src/icons/refresh_dark.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/reset.svg b/studio/src/renderer/src/icons/reset.svg new file mode 100644 index 000000000..de5d2b170 --- /dev/null +++ b/studio/src/renderer/src/icons/reset.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/reset_dark.svg b/studio/src/renderer/src/icons/reset_dark.svg new file mode 100644 index 000000000..28d58e10e --- /dev/null +++ b/studio/src/renderer/src/icons/reset_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/search.svg b/studio/src/renderer/src/icons/search.svg new file mode 100644 index 000000000..021b0c394 --- /dev/null +++ b/studio/src/renderer/src/icons/search.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/studio/src/renderer/src/icons/search_dark.svg b/studio/src/renderer/src/icons/search_dark.svg new file mode 100644 index 000000000..d5a82d9c1 --- /dev/null +++ b/studio/src/renderer/src/icons/search_dark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/studio/src/renderer/src/icons/settings.svg b/studio/src/renderer/src/icons/settings.svg new file mode 100644 index 000000000..c30de8209 --- /dev/null +++ b/studio/src/renderer/src/icons/settings.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/settings_dark.svg b/studio/src/renderer/src/icons/settings_dark.svg new file mode 100644 index 000000000..62f328167 --- /dev/null +++ b/studio/src/renderer/src/icons/settings_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/stopWatch.svg b/studio/src/renderer/src/icons/stopWatch.svg new file mode 100644 index 000000000..33f0d5917 --- /dev/null +++ b/studio/src/renderer/src/icons/stopWatch.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/studio/src/renderer/src/icons/stopWatch_dark.svg b/studio/src/renderer/src/icons/stopWatch_dark.svg new file mode 100644 index 000000000..10bec586b --- /dev/null +++ b/studio/src/renderer/src/icons/stopWatch_dark.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/studio/src/renderer/src/icons/symlink.svg b/studio/src/renderer/src/icons/symlink.svg new file mode 100644 index 000000000..4c2ccbb21 --- /dev/null +++ b/studio/src/renderer/src/icons/symlink.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/symlink_dark.svg b/studio/src/renderer/src/icons/symlink_dark.svg new file mode 100644 index 000000000..fcc2390a9 --- /dev/null +++ b/studio/src/renderer/src/icons/symlink_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/undo.svg b/studio/src/renderer/src/icons/undo.svg new file mode 100644 index 000000000..7a98c7583 --- /dev/null +++ b/studio/src/renderer/src/icons/undo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/undo_dark.svg b/studio/src/renderer/src/icons/undo_dark.svg new file mode 100644 index 000000000..2fa3c0d42 --- /dev/null +++ b/studio/src/renderer/src/icons/undo_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/user.svg b/studio/src/renderer/src/icons/user.svg new file mode 100644 index 000000000..b0d3ad131 --- /dev/null +++ b/studio/src/renderer/src/icons/user.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/user_dark.svg b/studio/src/renderer/src/icons/user_dark.svg new file mode 100644 index 000000000..71816fd61 --- /dev/null +++ b/studio/src/renderer/src/icons/user_dark.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/biomes.svg b/studio/src/renderer/src/icons/views/biomes.svg new file mode 100644 index 000000000..8d0d7e5cd --- /dev/null +++ b/studio/src/renderer/src/icons/views/biomes.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/biomes_dark.svg b/studio/src/renderer/src/icons/views/biomes_dark.svg new file mode 100644 index 000000000..c8ab2b955 --- /dev/null +++ b/studio/src/renderer/src/icons/views/biomes_dark.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/cave-biomes.svg b/studio/src/renderer/src/icons/views/cave-biomes.svg new file mode 100644 index 000000000..9f48d8b1e --- /dev/null +++ b/studio/src/renderer/src/icons/views/cave-biomes.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/views/cave-biomes_dark.svg b/studio/src/renderer/src/icons/views/cave-biomes_dark.svg new file mode 100644 index 000000000..aecd83789 --- /dev/null +++ b/studio/src/renderer/src/icons/views/cave-biomes_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/views/height.svg b/studio/src/renderer/src/icons/views/height.svg new file mode 100644 index 000000000..59538313d --- /dev/null +++ b/studio/src/renderer/src/icons/views/height.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/height_dark.svg b/studio/src/renderer/src/icons/views/height_dark.svg new file mode 100644 index 000000000..9dc4f2498 --- /dev/null +++ b/studio/src/renderer/src/icons/views/height_dark.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/land-biomes.svg b/studio/src/renderer/src/icons/views/land-biomes.svg new file mode 100644 index 000000000..9a09720fa --- /dev/null +++ b/studio/src/renderer/src/icons/views/land-biomes.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/studio/src/renderer/src/icons/views/land-biomes_dark.svg b/studio/src/renderer/src/icons/views/land-biomes_dark.svg new file mode 100644 index 000000000..4f189a0e3 --- /dev/null +++ b/studio/src/renderer/src/icons/views/land-biomes_dark.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/studio/src/renderer/src/icons/views/noise.svg b/studio/src/renderer/src/icons/views/noise.svg new file mode 100644 index 000000000..622ee6927 --- /dev/null +++ b/studio/src/renderer/src/icons/views/noise.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/studio/src/renderer/src/icons/views/noise_dark.svg b/studio/src/renderer/src/icons/views/noise_dark.svg new file mode 100644 index 000000000..0f92bb482 --- /dev/null +++ b/studio/src/renderer/src/icons/views/noise_dark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/studio/src/renderer/src/icons/views/objects.svg b/studio/src/renderer/src/icons/views/objects.svg new file mode 100644 index 000000000..9c50b9557 --- /dev/null +++ b/studio/src/renderer/src/icons/views/objects.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/objects_dark.svg b/studio/src/renderer/src/icons/views/objects_dark.svg new file mode 100644 index 000000000..5429972cd --- /dev/null +++ b/studio/src/renderer/src/icons/views/objects_dark.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/palettes.svg b/studio/src/renderer/src/icons/views/palettes.svg new file mode 100644 index 000000000..67e265433 --- /dev/null +++ b/studio/src/renderer/src/icons/views/palettes.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/studio/src/renderer/src/icons/views/palettes_dark.svg b/studio/src/renderer/src/icons/views/palettes_dark.svg new file mode 100644 index 000000000..8d120c93e --- /dev/null +++ b/studio/src/renderer/src/icons/views/palettes_dark.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/studio/src/renderer/src/icons/views/procedural.svg b/studio/src/renderer/src/icons/views/procedural.svg new file mode 100644 index 000000000..5ad2cdb16 --- /dev/null +++ b/studio/src/renderer/src/icons/views/procedural.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/procedural_dark.svg b/studio/src/renderer/src/icons/views/procedural_dark.svg new file mode 100644 index 000000000..3c5f7ed0d --- /dev/null +++ b/studio/src/renderer/src/icons/views/procedural_dark.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/regions.svg b/studio/src/renderer/src/icons/views/regions.svg new file mode 100644 index 000000000..d4ab80fbb --- /dev/null +++ b/studio/src/renderer/src/icons/views/regions.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/regions_dark.svg b/studio/src/renderer/src/icons/views/regions_dark.svg new file mode 100644 index 000000000..2769c3ce0 --- /dev/null +++ b/studio/src/renderer/src/icons/views/regions_dark.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/saved-world.svg b/studio/src/renderer/src/icons/views/saved-world.svg new file mode 100644 index 000000000..ba35672af --- /dev/null +++ b/studio/src/renderer/src/icons/views/saved-world.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/views/saved-world_dark.svg b/studio/src/renderer/src/icons/views/saved-world_dark.svg new file mode 100644 index 000000000..f9880f87b --- /dev/null +++ b/studio/src/renderer/src/icons/views/saved-world_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/views/sea-biomes.svg b/studio/src/renderer/src/icons/views/sea-biomes.svg new file mode 100644 index 000000000..f24d3b7af --- /dev/null +++ b/studio/src/renderer/src/icons/views/sea-biomes.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/sea-biomes_dark.svg b/studio/src/renderer/src/icons/views/sea-biomes_dark.svg new file mode 100644 index 000000000..3fc7dc1b7 --- /dev/null +++ b/studio/src/renderer/src/icons/views/sea-biomes_dark.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/studio/src/renderer/src/icons/views/world-3d.svg b/studio/src/renderer/src/icons/views/world-3d.svg new file mode 100644 index 000000000..897fab392 --- /dev/null +++ b/studio/src/renderer/src/icons/views/world-3d.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/views/world-3d_dark.svg b/studio/src/renderer/src/icons/views/world-3d_dark.svg new file mode 100644 index 000000000..0ca6194ab --- /dev/null +++ b/studio/src/renderer/src/icons/views/world-3d_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/web.svg b/studio/src/renderer/src/icons/web.svg new file mode 100644 index 000000000..897fab392 --- /dev/null +++ b/studio/src/renderer/src/icons/web.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/web_dark.svg b/studio/src/renderer/src/icons/web_dark.svg new file mode 100644 index 000000000..0ca6194ab --- /dev/null +++ b/studio/src/renderer/src/icons/web_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/studio/src/renderer/src/icons/zoomIn.svg b/studio/src/renderer/src/icons/zoomIn.svg new file mode 100644 index 000000000..dc4380e34 --- /dev/null +++ b/studio/src/renderer/src/icons/zoomIn.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/studio/src/renderer/src/icons/zoomIn_dark.svg b/studio/src/renderer/src/icons/zoomIn_dark.svg new file mode 100644 index 000000000..39cb0f660 --- /dev/null +++ b/studio/src/renderer/src/icons/zoomIn_dark.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/studio/src/renderer/src/studio/BakeMeter.tsx b/studio/src/renderer/src/studio/BakeMeter.tsx index e6bbc6459..424837d12 100644 --- a/studio/src/renderer/src/studio/BakeMeter.tsx +++ b/studio/src/renderer/src/studio/BakeMeter.tsx @@ -1,4 +1,4 @@ -import { Gauge } from 'lucide-react' +import { IdeIcon } from '@/components/IdeIcon' import { useEffect, useState } from 'react' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { cn } from '@/lib/utils' @@ -49,7 +49,7 @@ export function BakeMeter({ timing }: BakeMeterProps): React.JSX.Element {
- + {timing === null ? MEASURING_LABEL : weight.label} diff --git a/studio/src/renderer/src/studio/ConnectScreen.tsx b/studio/src/renderer/src/studio/ConnectScreen.tsx index faf2d5036..bda947bda 100644 --- a/studio/src/renderer/src/studio/ConnectScreen.tsx +++ b/studio/src/renderer/src/studio/ConnectScreen.tsx @@ -1,5 +1,5 @@ import { useEffect, useRef, useState } from 'react' -import { Globe2, Loader2 } from 'lucide-react' +import { IdeIcon } from '@/components/IdeIcon' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' import type { BridgeConnection } from '../../../shared/bridge' @@ -56,7 +56,7 @@ export function ConnectScreen({ connecting, error, onConnect, onLink }: ConnectS
{bridges.length === 0 ? (
- Waiting for a server on this machine + Waiting for a server on this machine
) : ( bridges.map((bridge) => ( @@ -66,7 +66,7 @@ export function ConnectScreen({ connecting, error, onConnect, onLink }: ConnectS onClick={() => onConnect(bridge)} className="flex items-center gap-3 rounded-md px-3 py-2 text-left hover:bg-accent disabled:opacity-60" > - + {bridge.world} port {bridge.port} @@ -83,7 +83,7 @@ export function ConnectScreen({ connecting, error, onConnect, onLink }: ConnectS > setLink(event.target.value)} placeholder="iris-studio://…" className="h-8" /> {error !== null &&

{error}

} diff --git a/studio/src/renderer/src/studio/CurveField.tsx b/studio/src/renderer/src/studio/CurveField.tsx index c270d9bbe..a88f6d010 100644 --- a/studio/src/renderer/src/studio/CurveField.tsx +++ b/studio/src/renderer/src/studio/CurveField.tsx @@ -1,4 +1,4 @@ -import { ChevronRight, Plus, Trash2 } from 'lucide-react' +import { IdeIcon } from '@/components/IdeIcon' import { useState } from 'react' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' @@ -42,7 +42,7 @@ export function CurveField(props: CurveFieldProps): React.JSX.Element { onClick={onToggle} > - + {open && onSet(JSON.stringify(next))} />} @@ -92,12 +92,12 @@ function PointsEditor({ keys, locked, onWrite }: { keys: Keyframe[]; locked: boo next !== undefined && onWrite(withKeyframe(keys, index, [next, value]))} /> next !== undefined && onWrite(withKeyframe(keys, index, [t, next]))} />
))} ) diff --git a/studio/src/renderer/src/studio/EntryBrowser.tsx b/studio/src/renderer/src/studio/EntryBrowser.tsx index 835c74727..55fc8e793 100644 --- a/studio/src/renderer/src/studio/EntryBrowser.tsx +++ b/studio/src/renderer/src/studio/EntryBrowser.tsx @@ -1,4 +1,4 @@ -import { Plus } from 'lucide-react' +import { IdeIcon } from '@/components/IdeIcon' import { useMemo, useState } from 'react' import { Button } from '@/components/ui/button' import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuTrigger } from '@/components/ui/context-menu' @@ -84,7 +84,7 @@ export function EntryBrowser({ title, entries, current, onSelect, fileActions, c

{title}

{fileActions !== undefined && ( )}
diff --git a/studio/src/renderer/src/studio/FieldRow.tsx b/studio/src/renderer/src/studio/FieldRow.tsx index e0ff50dd0..08a16163a 100644 --- a/studio/src/renderer/src/studio/FieldRow.tsx +++ b/studio/src/renderer/src/studio/FieldRow.tsx @@ -1,4 +1,4 @@ -import { RotateCcw } from 'lucide-react' +import { IdeIcon } from '@/components/IdeIcon' import { Button } from '@/components/ui/button' import { cn } from '@/lib/utils' import type { SettingOption } from '../bridge/types' @@ -23,7 +23,7 @@ export function FieldRow({ option, value, locked, onUnset, problem, children }:
{children}
diff --git a/studio/src/renderer/src/studio/NodeCanvas.tsx b/studio/src/renderer/src/studio/NodeCanvas.tsx index 1aaebe048..5748ad388 100644 --- a/studio/src/renderer/src/studio/NodeCanvas.tsx +++ b/studio/src/renderer/src/studio/NodeCanvas.tsx @@ -1,21 +1,22 @@ -import { Box, Circle, Flower2, GitCommitVertical, GitFork, Group, Link2, Paintbrush, Sparkles, type LucideIcon } from 'lucide-react' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from '@/components/ui/context-menu' +import { IdeIcon, type IdeIconName } from '@/components/IdeIcon' import { cn } from '@/lib/utils' import type { GraphEdit, GraphNode, JsonPath } from '../bridge/types' import { idOf, isWithin, layoutNodes, NODE_HEIGHT, NODE_WIDTH, type NodeLayout, type PlacedNode } from '../editor/nodeLayout' import { useKeyText } from './useBindings' -const KIND_ICONS: Record = { - Object: Box, - Stem: GitCommitVertical, - Blob: Circle, - Branches: GitFork, - Cluster: Sparkles, - Group: Group, - 'Shared part': Link2, - Material: Paintbrush, - Decoration: Flower2 +const PART_ICON: IdeIconName = 'views/procedural' +const KIND_ICONS: Record = { + Object: 'views/objects', + Stem: PART_ICON, + Blob: PART_ICON, + Branches: PART_ICON, + Cluster: PART_ICON, + Group: 'groups', + 'Shared part': 'symlink', + Material: 'views/palettes', + Decoration: 'views/land-biomes' } const FIT_MARGIN = 24 const LARGEST_FIT_SCALE = 1 @@ -171,7 +172,7 @@ export function NodeCanvas({ roots, fileKey, selectedId, locked, showAllRef, onS function NodeBox({ placed, selected, target, offset }: { placed: PlacedNode; selected: boolean; target: boolean; offset: { x: number; y: number } | null }): React.JSX.Element { const { node } = placed - const Icon = KIND_ICONS[node.kind] ?? Box + const icon = KIND_ICONS[node.kind] ?? PART_ICON const detail = node.roles.length > 0 ? node.roles.join(', ') : node.title === node.kind ? null : node.kind return (
- +
{node.title}
{detail !== null &&
{detail}
} diff --git a/studio/src/renderer/src/studio/NodeInspector.tsx b/studio/src/renderer/src/studio/NodeInspector.tsx index ace636e1f..c3f60c7ae 100644 --- a/studio/src/renderer/src/studio/NodeInspector.tsx +++ b/studio/src/renderer/src/studio/NodeInspector.tsx @@ -1,4 +1,4 @@ -import { ChevronRight, Plus, RotateCcw, Spline, Trash2 } from 'lucide-react' +import { IdeIcon } from '@/components/IdeIcon' import { useMemo, useState } from 'react' import { Button } from '@/components/ui/button' import { ScrollArea } from '@/components/ui/scroll-area' @@ -107,23 +107,23 @@ function FoldHeader({ fold, context }: { fold: SettingsFold; context: SectionCon return (
{fold.kind === 'list' && ( )} {holder !== null && ( )} {fold.kind === 'item' && ( )}
@@ -251,7 +251,7 @@ function TypedField(props: FieldProps): React.JSX.Element { onToggleCurve() }} > - + )} diff --git a/studio/src/renderer/src/studio/NodePane.tsx b/studio/src/renderer/src/studio/NodePane.tsx index 87a6456fa..cec2168a0 100644 --- a/studio/src/renderer/src/studio/NodePane.tsx +++ b/studio/src/renderer/src/studio/NodePane.tsx @@ -1,4 +1,4 @@ -import { Lock, Redo2, Undo2 } from 'lucide-react' +import { IdeIcon } from '@/components/IdeIcon' import { useEffect, useRef } from 'react' import { Button } from '@/components/ui/button' import type { GraphNode } from '../bridge/types' @@ -30,16 +30,16 @@ export function NodePane({ editor, entryKey, selected, onSelect }: NodePaneProps {state?.locked != null && ( - + Read only )} {editor.saving && Saving…}
diff --git a/studio/src/renderer/src/studio/NoiseStudio.tsx b/studio/src/renderer/src/studio/NoiseStudio.tsx index a7b1abfc8..3da01b14b 100644 --- a/studio/src/renderer/src/studio/NoiseStudio.tsx +++ b/studio/src/renderer/src/studio/NoiseStudio.tsx @@ -1,4 +1,4 @@ -import { Dices, RotateCcw, Search } from 'lucide-react' +import { IdeIcon } from '@/components/IdeIcon' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' @@ -104,7 +104,7 @@ export function NoiseStudio({ client, packRevision, onSummary, tell }: NoiseStud {display === 'flat' && ( )} {display === 'terrain' && source?.blockRange === null && } @@ -160,7 +160,7 @@ function SeedField({ seed, usesSeed, onChange }: { seed: string; usesSeed: boole onKeyDown={(event) => event.key === 'Enter' && commit()} />
{!usesSeed &&

Keeps the world's seed

} @@ -225,7 +225,9 @@ function SourceList({ sources, current, onSelect }: { sources: NoiseSource[]; cu return (
- + + + setFilter(event.target.value)} />
diff --git a/studio/src/renderer/src/studio/PatternStudio.tsx b/studio/src/renderer/src/studio/PatternStudio.tsx index 3cfb221ea..fa7ccd2c7 100644 --- a/studio/src/renderer/src/studio/PatternStudio.tsx +++ b/studio/src/renderer/src/studio/PatternStudio.tsx @@ -1,4 +1,4 @@ -import { ChevronLeft, ChevronRight, RotateCcw } from 'lucide-react' +import { IdeIcon } from '@/components/IdeIcon' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { Button } from '@/components/ui/button' import { ScrollArea } from '@/components/ui/scroll-area' @@ -68,18 +68,18 @@ export function PatternStudio({ client, view, packRevision, onSummary, tell }: P {entry !== null && entry.depths > 1 && ( <> Depth {depth + 1} of {entry.depths} )}
{status !== null && entry !== null &&
{readout(status)}
} diff --git a/studio/src/renderer/src/studio/PickInspector.tsx b/studio/src/renderer/src/studio/PickInspector.tsx index b60c6d69c..7388255f6 100644 --- a/studio/src/renderer/src/studio/PickInspector.tsx +++ b/studio/src/renderer/src/studio/PickInspector.tsx @@ -1,4 +1,4 @@ -import { ChevronRight } from 'lucide-react' +import { IdeIcon } from '@/components/IdeIcon' import { useState } from 'react' import { ScrollArea } from '@/components/ui/scroll-area' import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group' @@ -92,7 +92,7 @@ function RegionSection({ section, open, onToggle }: { section: PickSection; open return (
{reading && chosen !== null &&
Reading {chosen.name}
} diff --git a/studio/src/renderer/src/studio/SceneStudio.tsx b/studio/src/renderer/src/studio/SceneStudio.tsx index 3d88cd3a1..1883d2d49 100644 --- a/studio/src/renderer/src/studio/SceneStudio.tsx +++ b/studio/src/renderer/src/studio/SceneStudio.tsx @@ -1,4 +1,4 @@ -import { ChevronLeft, ChevronRight } from 'lucide-react' +import { IdeIcon } from '@/components/IdeIcon' import { useEffect, useMemo, useRef, useState } from 'react' import { Button } from '@/components/ui/button' import { ScrollArea } from '@/components/ui/scroll-area' @@ -165,13 +165,13 @@ function SceneArea({ entry, variant, shown, status, onVariant, onPick }: SceneAr {entry !== null && entry.variants > 1 && (
Variant {variant + 1} of {entry.variants}
)} diff --git a/studio/src/renderer/src/studio/Sidebar.tsx b/studio/src/renderer/src/studio/Sidebar.tsx index 262c11d96..8c7da28a5 100644 --- a/studio/src/renderer/src/studio/Sidebar.tsx +++ b/studio/src/renderer/src/studio/Sidebar.tsx @@ -2,16 +2,16 @@ import { createContext, useContext } from 'react' import { createPortal } from 'react-dom' import { cn } from '@/lib/utils' -/** Where a view puts its own lists: under the views in the left column, as in v3e. */ +/** Where a view puts its own lists: under the views in the left island, as in v3e. */ export const SidebarSlot = createContext(null) -/** One card in the left column under the views, filled by the view that is shown. */ +/** A section of the left island under the views, filled by the view that is shown. */ export function SidebarPanel({ className, children }: { className?: string; children: React.ReactNode }): React.JSX.Element | null { const slot = useContext(SidebarSlot) if (slot === null) { return null } - return createPortal(
{children}
, slot) + return createPortal(
{children}
, slot) } /** A card in the shell: the panels sit apart on the window background instead of sharing borders. */ diff --git a/studio/src/renderer/src/studio/StatusBar.tsx b/studio/src/renderer/src/studio/StatusBar.tsx index 8c101e4ab..ba2c7f191 100644 --- a/studio/src/renderer/src/studio/StatusBar.tsx +++ b/studio/src/renderer/src/studio/StatusBar.tsx @@ -1,4 +1,4 @@ -import { MemoryStick, Zap } from 'lucide-react' +import { IdeIcon } from '@/components/IdeIcon' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { cn } from '@/lib/utils' import type { ServerUsage } from '../bridge/types' @@ -61,12 +61,12 @@ function UsageReadout({ usage }: { usage: ServerUsage }): React.JSX.Element { return ( } + icon={} value={formatCpu(usage)} high={cpuIsHigh(usage)} hint={`Server CPU, 100% per busy thread, ${usage.threads} threads in all`} /> - } value={formatHeap(usage)} high={heapIsHigh(usage)} hint="Java memory the server uses, of its maximum" /> + } value={formatHeap(usage)} high={heapIsHigh(usage)} hint="Java memory the server uses, of its maximum" /> ) } diff --git a/studio/src/renderer/src/studio/StudioToolbar.tsx b/studio/src/renderer/src/studio/StudioToolbar.tsx index 9d0aac085..0f5482262 100644 --- a/studio/src/renderer/src/studio/StudioToolbar.tsx +++ b/studio/src/renderer/src/studio/StudioToolbar.tsx @@ -1,5 +1,5 @@ -import { CircleHelp, Grid3x3, LocateFixed, LogOut, Monitor, Moon, Mountain, PawPrint, RefreshCw, Settings, Spline, Sun, ZoomIn } from 'lucide-react' import type { ReactNode } from 'react' +import { IdeIcon } from '@/components/IdeIcon' import { Button } from '@/components/ui/button' import { Kbd } from '@/components/ui/kbd' import { Separator } from '@/components/ui/separator' @@ -27,7 +27,6 @@ interface StudioToolbarProps { onDisconnect(): void } -const THEME_ICONS: Record = { system: , light: , dark: } const THEME_NAMES: Record = { system: 'Theme: system', light: 'Theme: light', dark: 'Theme: dark' } const TEXT_BUTTON = "h-7 gap-1.5 px-2 text-[12.5px] font-normal [&_svg:not([class*='size-'])]:size-3.5" @@ -43,20 +42,20 @@ export function StudioToolbar(props: StudioToolbarProps): React.JSX.Element { - + @@ -68,26 +67,26 @@ function MapTools(props: StudioToolbarProps): React.JSX.Element { return ( <> - + - + onToggle('grid')}> - Grid + Grid onToggle('entities')}> - Entities + Entities onToggle('follow')}> - Follow + Follow onToggle('shading')}> - Shading + Shading onToggle('regionBorders')}> - Borders + Borders ) diff --git a/studio/src/renderer/src/studio/ViewList.tsx b/studio/src/renderer/src/studio/ViewList.tsx index b2e61fdae..1d3249083 100644 --- a/studio/src/renderer/src/studio/ViewList.tsx +++ b/studio/src/renderer/src/studio/ViewList.tsx @@ -1,31 +1,25 @@ -import { AudioWaveform, Box, Gem, Globe, HardDrive, Layers, Map as MapIcon, Mountain, Shapes, Sprout, Trees, Waves, type LucideIcon } from 'lucide-react' +import { IdeIcon, type IdeIconName } from '@/components/IdeIcon' import { Kbd } from '@/components/ui/kbd' import { cn } from '@/lib/utils' import type { ViewInfo } from '../bridge/types' import { viewShortcutId } from './shortcuts' import { useKeyText } from './useBindings' -interface ViewLook { - icon: LucideIcon - /** The icon's colour, from v3e's view palette. */ - tint: string +const VIEW_ICONS: Record = { + biomes: 'views/biomes', + regions: 'views/regions', + height: 'views/height', + world3d: 'views/world-3d', + savedWorld: 'views/saved-world', + landBiomes: 'views/land-biomes', + seaBiomes: 'views/sea-biomes', + caveBiomes: 'views/cave-biomes', + 'iris:terrain/palettes': 'views/palettes', + 'iris:objects': 'views/objects', + 'iris:objects/procedural': 'views/procedural', + noise: 'views/noise' } - -const VIEW_LOOKS: Record = { - biomes: { icon: Trees, tint: 'text-[#5fb865]' }, - regions: { icon: MapIcon, tint: 'text-[#548af7]' }, - height: { icon: Mountain, tint: 'text-[#c08552]' }, - world3d: { icon: Globe, tint: 'text-[#4fb6c6]' }, - savedWorld: { icon: HardDrive, tint: 'text-[#8c9099]' }, - landBiomes: { icon: Sprout, tint: 'text-[#a3b84f]' }, - seaBiomes: { icon: Waves, tint: 'text-[#4fb6c6]' }, - caveBiomes: { icon: Gem, tint: 'text-[#9c7bd6]' }, - 'iris:terrain/palettes': { icon: Layers, tint: 'text-[#d9a23f]' }, - 'iris:objects': { icon: Box, tint: 'text-[#548af7]' }, - 'iris:objects/procedural': { icon: Shapes, tint: 'text-[#d8709a]' }, - noise: { icon: AudioWaveform, tint: 'text-[#f75464]' } -} -const FALLBACK_LOOK: ViewLook = { icon: MapIcon, tint: 'text-secondary-text' } +const FALLBACK_ICON: IdeIconName = 'views/regions' interface ViewListProps { views: ViewInfo[] @@ -35,12 +29,12 @@ interface ViewListProps { slotRef(element: HTMLElement | null): void } -/** The left column: the views the server offers in their groups, then the shown view's own lists. */ +/** The left island: the views the server offers in their groups, then the shown view's own lists. */ export function ViewList({ views, current, onSelect, slotRef }: ViewListProps): React.JSX.Element { const groups = [...new Set(views.map((view) => view.groupLabel))] return ( -
-