diff --git a/.deployment/cd.sh b/.deployment/cd.sh index 1ee651102..f92724f11 100644 --- a/.deployment/cd.sh +++ b/.deployment/cd.sh @@ -5,7 +5,7 @@ curl https://sh.rustup.rs -sSf | sh -s -- -y export PATH=$PATH:/opt/buildhome/.cargo/bin echo 🚧 Install Node dependencies -cd client/web +cd frontend npm install echo 👷 Build Graphite web client diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07aa82603..35a707e1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,13 +23,13 @@ jobs: node-version: '14.x' - name: 🚧 Install Node dependencies - run: cd client/web && npm install + run: cd frontend && npm install - name: 🌐 Build Graphite web code - run: cd client/web && npm run build + run: cd frontend && npm run build - name: 👕 Lint Graphite web formatting - run: export NODE_ENV=production && cd client/web && npm run lint + run: export NODE_ENV=production && cd frontend && npm run lint - name: 🔬 Check Rust formatting run: cargo fmt --all -- --check diff --git a/.vscode/settings.json b/.vscode/settings.json index 0cc44ecab..e02491b17 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,11 +17,11 @@ "html.format.wrapLineLength": 200, "eslint.format.enable": true, "eslint.workingDirectories": [ - "./client/web" + "./frontend" ], "eslint.validate": [ "javascript", "typescript", ], "vetur.format.enable": false, -} +} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 30951f0b9..2459b309d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -85,7 +85,25 @@ dependencies = [ ] [[package]] -name = "graphite-document-core" +name = "graphite-charcoal" +version = "0.1.0" + +[[package]] +name = "graphite-editor" +version = "0.1.0" +dependencies = [ + "bitflags", + "env_logger", + "glam", + "graphite-graphene", + "graphite-proc-macros", + "log", + "serde", + "thiserror", +] + +[[package]] +name = "graphite-graphene" version = "0.1.0" dependencies = [ "glam", @@ -94,41 +112,23 @@ dependencies = [ "serde", ] -[[package]] -name = "graphite-editor-core" -version = "0.1.0" -dependencies = [ - "bitflags", - "env_logger", - "glam", - "graphite-document-core", - "graphite-proc-macros", - "log", - "serde", - "thiserror", -] - [[package]] name = "graphite-proc-macros" version = "0.1.0" dependencies = [ - "graphite-editor-core", + "graphite-editor", "proc-macro2", "quote", "syn", ] [[package]] -name = "graphite-renderer-core" -version = "0.1.0" - -[[package]] -name = "graphite-wasm-wrapper" +name = "graphite-wasm" version = "0.1.0" dependencies = [ "console_error_panic_hook", - "graphite-document-core", - "graphite-editor-core", + "graphite-editor", + "graphite-graphene", "log", "serde", "wasm-bindgen", diff --git a/Cargo.toml b/Cargo.toml index aeab9ee29..e3769abc6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,11 @@ [workspace] members = [ - "core/*", - "client/web/wasm", + "editor", + "graphene", + "charcoal", + "proc-macros", + "frontend/wasm", ] -[profile.release.package.graphite-wasm-wrapper] +[profile.release.package.graphite-wasm] opt-level = "s" diff --git a/README.md b/README.md index 83fdf9796..de0d9928f 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Development is broken into monthly sprints culminating in a presentation at the ## Running the code -The project is split between clients and core libraries (which are used by the clients). Currently the only client is the web frontend (`/client/web`). The web client's Vue code lives in `/client/web/src` and a Rust translation layer for the editor core library lives in `/client/web/wasm`. A good starting point for learning about the code structure and architecture is reading the [documentation](docs/index.md). +The project architecture is split between clients and core libraries (which are used by the clients). Currently the only client is the web frontend (`/frontend`). The web client's Vue code lives in `/frontend/src` and a Rust translation layer for the editor client backend lives in `/frontend/wasm`. A good starting point for learning about the code structure and architecture is reading the [documentation](docs/index.md). To run the project while developing: diff --git a/core/renderer/Cargo.toml b/charcoal/Cargo.toml similarity index 80% rename from core/renderer/Cargo.toml rename to charcoal/Cargo.toml index a740934b0..37b4eaabe 100644 --- a/core/renderer/Cargo.toml +++ b/charcoal/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "graphite-renderer-core" +name = "graphite-charcoal" version = "0.1.0" authors = ["Graphite Authors "] edition = "2018" -readme = "../../README.md" +readme = "../README.md" homepage = "https://www.graphite.design" repository = "https://github.com/GraphiteEditor/Graphite" license = "Apache-2.0" diff --git a/charcoal/src/lib.rs b/charcoal/src/lib.rs new file mode 100644 index 000000000..909562f6d --- /dev/null +++ b/charcoal/src/lib.rs @@ -0,0 +1,7 @@ +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } +} diff --git a/client/cli/README.md b/client/cli/README.md deleted file mode 100644 index 8dbc72f54..000000000 --- a/client/cli/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# CLI headless client - -This will be the official command line program for editing and rendering Graphite documents and assets. It acts as a stateless tool for calling the APIs of the document core library and the render engine core library. This is useful for automation through shell scripts, for example, rather than needing to write custom software to use the Graphite core libraries. Because the Graphite CLI tool does not rely on the editor core library, there is no concept of tools or state. diff --git a/client/native/README.md b/client/native/README.md deleted file mode 100644 index 401a00cd2..000000000 --- a/client/native/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Native editor client - -This will be the official desktop and web client. While the Rust GUI ecosystem is relatively immature and the Graphite project does not have the resources to make a custom GUI system that nicely supports extensions, the web frontend is the temporary official editor client. The HTML-based frontend client will be replaced by the native client compiled to WASM and running in an HTML Canvas with the WebGPU browser graphics API. diff --git a/core/document/src/lib.rs b/core/document/src/lib.rs deleted file mode 100644 index 94c8e3a4e..000000000 --- a/core/document/src/lib.rs +++ /dev/null @@ -1,29 +0,0 @@ -//! Graphite Document Core Library: `/core/document/` -//! -//! A stateless library for updating Graphite design document (GDD) files. -//! The official Graphite CLI and Editor Core Library are the primary users, but this library is intended to be useful -//! to any application that wants to link the library for the purpose of updating GDD files by sending edit operations. -//! Optionally depends on the Renderer Core Library if rendering is required. - -pub mod color; -pub mod document; -pub mod intersection; -pub mod layers; -pub mod operation; -pub mod response; - -pub use intersection::Quad; -pub use operation::Operation; -pub use response::DocumentResponse; - -pub type LayerId = u64; - -#[derive(Debug, Clone, Copy, PartialEq)] -pub enum DocumentError { - LayerNotFound, - InvalidPath, - IndexOutOfBounds, - NotAFolder, - NonReorderableSelection, - NotAShape, -} diff --git a/core/renderer/src/lib.rs b/core/renderer/src/lib.rs deleted file mode 100644 index 1b9d6213e..000000000 --- a/core/renderer/src/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -//! Graphite Renderer Core Library: `/core/renderer/` -//! -//! A stateless library (with the help of in-memory and/or on-disk caches for performance) for rendering Graphite's render graph (GRD) files. -//! The official Graphite CLI and Document Core Library are the primary users, -//! but this library is intended to be useful to any application that wants to link the library for the purpose of rendering Graphite's render graphs. -//! For example, games can link the library and render procedural textures with customizable parametric input values. - -#[cfg(test)] -mod tests { - #[test] - fn it_works() { - assert_eq!(2 + 2, 4); - } -} diff --git a/docs/index.md b/docs/README.md similarity index 100% rename from docs/index.md rename to docs/README.md diff --git a/docs/codebase/README.md b/docs/codebase/README.md new file mode 100644 index 000000000..03394d780 --- /dev/null +++ b/docs/codebase/README.md @@ -0,0 +1,34 @@ +# Graphite codebase docs + +This is a great place to start learning about the Graphite codebase and its architecture and code structure. + +## Core libraries + +Graphite's core rust codebase is split into three reusable libraries: + +- Editor +- Graphene +- Charcoal + +Each depends on its successor in the list. These are used internally but also intended for usage by third parties through Rust or linked by a project in C, C++, or another language. + +## Code structure + +The main modules of the project architecture are outlined below. Some parts describe future features and the directories don't exist yet. **Bold** modules are required for Graphite 0.1 which is purely an SVG editor. + +- **Web frontend**: `/frontend/` + Initial GUI for Graphite that will eventually be replaced by a native GUI implementation + - **Vue web app**: `src/` + Imports the WASM code and uses Vue props to customize and reuse most GUI components + - **Rust WebAssembly translation layer**: `wasm/` + Wraps the editor client backend and provides an API for the web app to use unburdened by Rust's complex data types that are not supported by JS +- **Editor Client Backend**: `/editor/` + Used by a frontend editor client to maintain GUI state and dispatch user events. The official Graphite editor is the primary user, but others software like game engines could embed their own customized editor implementations. Depends on Graphene. +- **Graphene Document Graph Engine**: `/graphene/` + A stateless library for updating Graphite design document (GDD) files. The official Graphite CLI and editor client backend are the primary users, but this library is intended to be useful to any application that wants to link the library for the purpose of updating GDD files by sending edit operations. Optionally depends on Charcoal if rendering is required. +- **Charcoal Asset Render Engine**: `/charcoal/` + A stateless library (with the help of in-memory and/or on-disk caches for performance) for rendering Graphite's render graph (GRD) files. The official Graphite CLI and Graphene are the primary users, but this library is intended to be useful to any application that wants to link the library for the purpose of rendering Graphite's render graphs. For example, games can link the library and render procedural textures with customizable parametric input values. + +## Architecture diagram + +Take this [Architecture Overview](architecture-overview.nomnoml) diagram and paste it into the [Nomnoml](https://nomnoml.com/) diagram editor. We'll set up a better way to render Nomnoml diagrams when we have a proper home for this documentation. \ No newline at end of file diff --git a/docs/codebase/index.md b/docs/codebase/index.md deleted file mode 100644 index 9453db268..000000000 --- a/docs/codebase/index.md +++ /dev/null @@ -1,38 +0,0 @@ -# Graphite codebase docs - -This is a great place to start learning about the Graphite codebase and its architecture and code structure. - -## Core libraries - -Graphite's core rust codebase is split into three reusable libraries: - -- Graphite Editor Core Library -- Graphite Document Core Library -- Graphite Renderer Core Library - -Each depends on its successor in the list. These are used internally but also intended for usage by third parties through Rust or linked by a project in C, C++, or another language. - -## Code structure - -The main modules of the project architecture are outlined below. Some parts describe future features and the directories don't exist yet. **Bold** modules are required for Graphite 0.1 which is purely an SVG editor. - -- **Web frontend**: `/client/web/` - Initial GUI for Graphite that will eventually be replaced by a native GUI implementation - - **Vue web app**: `src/` - Imports the WASM code and uses Vue props to customize and reuse most GUI components - - **Rust WebAssembly wrapper**: `wasm/` - Wraps the Editor Core Library and provides an API for the web app to use unburdened by Rust's complex data types that are not supported by WASM -- Native frontend: `/client/native/` - The future official desktop client. Blocked on Rust's GUI ecosystem improving or dedicating the time to build a custom system that can nicely support editor extensions. The whole GUI should use WGPU for rendering and compile to WASM to make those calls to the WebGPU API. -- CLI: `/client/cli/` - A future headless, stateless, command line GDD document editor (using the Document Core Library) and GRD render graph renderer (using the Renderer Core Library). -- **Graphite Editor Core Library**: `/core/editor/` - Used by a frontend editor client to maintain GUI state and dispatch user events. The official Graphite editor is the primary user, but others software like game engines could embed their own customized editor implementations. Depends on the Document Core Library. -- Graphite Document Core Library: `/core/document/` - A stateless library for updating Graphite design document (GDD) files. The official Graphite CLI and Editor Core Library are the primary users, but this library is intended to be useful to any application that wants to link the library for the purpose of updating GDD files by sending edit operations. Optionally depends on the Renderer Core Library if rendering is required. -- Graphite Renderer Core Library: `/core/renderer/` - A stateless library (with the help of in-memory and/or on-disk caches for performance) for rendering Graphite's render graph (GRD) files. The official Graphite CLI and Document Core Library are the primary users, but this library is intended to be useful to any application that wants to link the library for the purpose of rendering Graphite's render graphs. For example, games can link the library and render procedural textures with customizable parametric input values. - -## Architecture diagram - -Take this [Architecture Overview](architecture-overview.nomnoml) diagram and paste it into the [Nomnoml](https://nomnoml.com/) diagram editor. We'll set up a better way to render Nomnoml diagrams when we have a proper home for this documentation. \ No newline at end of file diff --git a/docs/design/index.md b/docs/design/README.md similarity index 100% rename from docs/design/index.md rename to docs/design/README.md diff --git a/docs/design/feature-goals.md b/docs/design/feature-goals.md index 94b9855b0..07822c8f2 100644 --- a/docs/design/feature-goals.md +++ b/docs/design/feature-goals.md @@ -57,7 +57,7 @@ Contributions welcome! If you think of something Graphite would be great for, su - Removing translucent watermarks that were applied in the same location to a batch of photos by finding their shared similarities and differences and using that as a subtraction diff ## Game development -- Design a GUI for the game and use the Graphite Renderer Core Library to render the in-game GUI textures at runtime at the desired resolution without scaling problems, or even render it live as data updates its state +- Design a GUI for the game and use Charcoal to render the in-game GUI textures at runtime at the desired resolution without scaling problems, or even render it live as data updates its state - Authoring procedural noise-based textures and PBR materials ## Data visualization diff --git a/docs/editor/1-overview.md b/docs/editor/1-overview.md index 4d5c6611c..70dd7e31d 100644 --- a/docs/editor/1-overview.md +++ b/docs/editor/1-overview.md @@ -17,7 +17,7 @@ TODO: Add more to make a comprehensive list, finish writing definitions, separat - GDD file Graphite Design Document. A binary serialization of a *document* source file. The format includes a chain of *operations* that describe changes to the *layer graph* and the *properties* of *layers* throughout the history of the document since its creation. It also stores certain metadata and *embedded* file data. GDD files, along with *GRD files*, represent *assets* when shared. Because GDD files are editable (unlike *GRD files*), the *layers* of GDD *assets* may be expanded in the layer graph to reveal and modify their contents using a copy-on-write scheme stored to the *asset's* *layer*. - GRD file - Graphite Render Data. A binary serialization of a *render graph* file. The format includes a single directed acyclic graph (DAG) compiled from the *layer graph* of a *document* as well as certain *properties* of set *data types* that are *imported* and *exported*. GRD files, along with *GDD files*, represent *assets* when shared. Because GRD files are read-only and can't be edited (unlike *GDD files*), the *layers* of GRD *assets* do not offer an ability to be expanded in the layer graph. GRD files are useful for sharing *assets* when their authors do not wish to provide the source *documents* used for their authoring. They are also the input format included in games that utilize the *Graphite Renderer Core Library* to render graphical content at runtime, as well as similar applications like headless renderers on web servers and image processing pipelines. + Graphite Render Data. A binary serialization of a *render graph* file. The format includes a single directed acyclic graph (DAG) compiled from the *layer graph* of a *document* as well as certain *properties* of set *data types* that are *imported* and *exported*. GRD files, along with *GDD files*, represent *assets* when shared. Because GRD files are read-only and can't be edited (unlike *GDD files*), the *layers* of GRD *assets* do not offer an ability to be expanded in the layer graph. GRD files are useful for sharing *assets* when their authors do not wish to provide the source *documents* used for their authoring. They are also the input format included in games that utilize *Charcoal* to render graphical content at runtime, as well as similar applications like headless renderers on web servers and image processing pipelines. - Window - Main window - Popout window @@ -63,9 +63,9 @@ TODO: Add more to make a comprehensive list, finish writing definitions, separat - Port - Connection - Core Libraries -- Editor Core Library -- Document Core Library -- Renderer Core Library +- Editor client backend +- Graphene +- Charcoal - Trace - Path - Shape diff --git a/docs/editor/index.md b/docs/editor/README.md similarity index 100% rename from docs/editor/index.md rename to docs/editor/README.md diff --git a/core/editor/Cargo.toml b/editor/Cargo.toml similarity index 69% rename from core/editor/Cargo.toml rename to editor/Cargo.toml index ecf360cb1..8079cfb9c 100644 --- a/core/editor/Cargo.toml +++ b/editor/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "graphite-editor-core" +name = "graphite-editor" version = "0.1.0" authors = ["Graphite Authors "] edition = "2018" -readme = "../../README.md" +readme = "../README.md" homepage = "https://www.graphite.design" repository = "https://github.com/GraphiteEditor/Graphite" license = "Apache-2.0" @@ -13,12 +13,12 @@ log = "0.4" bitflags = "1.2.1" thiserror = "1.0.24" serde = { version = "1.0", features = ["derive"] } -graphite-proc-macros = { path = "../proc-macro" } +graphite-proc-macros = { path = "../proc-macros" } glam = { version="0.17", features = ["serde"] } -[dependencies.document-core] -path = "../document" -package = "graphite-document-core" +[dependencies.graphene] +path = "../graphene" +package = "graphite-graphene" [dev-dependencies] env_logger = "0.8.4" diff --git a/core/editor/src/communication/dispatcher.rs b/editor/src/communication/dispatcher.rs similarity index 99% rename from core/editor/src/communication/dispatcher.rs rename to editor/src/communication/dispatcher.rs index 4302bcaff..d7974cf61 100644 --- a/core/editor/src/communication/dispatcher.rs +++ b/editor/src/communication/dispatcher.rs @@ -83,7 +83,7 @@ impl Dispatcher { #[cfg(test)] mod test { use crate::{document::DocumentMessageHandler, message_prelude::*, misc::test_utils::EditorTestUtils, Editor}; - use document_core::{color::Color, Operation}; + use graphene::{color::Color, Operation}; use log::info; fn init_logger() { diff --git a/core/editor/src/communication/message.rs b/editor/src/communication/message.rs similarity index 100% rename from core/editor/src/communication/message.rs rename to editor/src/communication/message.rs diff --git a/core/editor/src/communication/mod.rs b/editor/src/communication/mod.rs similarity index 100% rename from core/editor/src/communication/mod.rs rename to editor/src/communication/mod.rs diff --git a/core/editor/src/consts.rs b/editor/src/consts.rs similarity index 100% rename from core/editor/src/consts.rs rename to editor/src/consts.rs diff --git a/core/editor/src/document/document_file.rs b/editor/src/document/document_file.rs similarity index 98% rename from core/editor/src/document/document_file.rs rename to editor/src/document/document_file.rs index 061988215..8e613ca59 100644 --- a/core/editor/src/document/document_file.rs +++ b/editor/src/document/document_file.rs @@ -1,14 +1,14 @@ pub use super::layer_panel::*; use crate::{frontend::layer_panel::*, EditorError}; -use document_core::{document::Document as InternalDocument, LayerId}; use glam::{DAffine2, DVec2}; +use graphene::{document::Document as InternalDocument, LayerId}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use crate::input::InputPreprocessor; use crate::message_prelude::*; -use document_core::layers::BlendMode; -use document_core::{DocumentResponse, Operation as DocumentOperation}; +use graphene::layers::BlendMode; +use graphene::{DocumentResponse, Operation as DocumentOperation}; use log::warn; use std::collections::VecDeque; diff --git a/core/editor/src/document/document_message_handler.rs b/editor/src/document/document_message_handler.rs similarity index 98% rename from core/editor/src/document/document_message_handler.rs rename to editor/src/document/document_message_handler.rs index 3c638a4be..335a431e2 100644 --- a/core/editor/src/document/document_message_handler.rs +++ b/editor/src/document/document_message_handler.rs @@ -1,7 +1,7 @@ use crate::input::InputPreprocessor; use crate::message_prelude::*; -use document_core::layers::Layer; -use document_core::{LayerId, Operation as DocumentOperation}; +use graphene::layers::Layer; +use graphene::{LayerId, Operation as DocumentOperation}; use log::warn; use std::collections::VecDeque; diff --git a/core/editor/src/document/layer_panel.rs b/editor/src/document/layer_panel.rs similarity index 99% rename from core/editor/src/document/layer_panel.rs rename to editor/src/document/layer_panel.rs index 9066a39d3..fbef9be63 100644 --- a/core/editor/src/document/layer_panel.rs +++ b/editor/src/document/layer_panel.rs @@ -1,9 +1,9 @@ use crate::{consts::ROTATE_SNAP_INTERVAL, frontend::layer_panel::*}; -use document_core::{ +use glam::{DAffine2, DVec2}; +use graphene::{ layers::{Layer, LayerData as DocumentLayerData}, LayerId, }; -use glam::{DAffine2, DVec2}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; diff --git a/core/editor/src/document/mod.rs b/editor/src/document/mod.rs similarity index 100% rename from core/editor/src/document/mod.rs rename to editor/src/document/mod.rs diff --git a/core/editor/src/document/movement_handler.rs b/editor/src/document/movement_handler.rs similarity index 98% rename from core/editor/src/document/movement_handler.rs rename to editor/src/document/movement_handler.rs index a0525685d..1517b4327 100644 --- a/core/editor/src/document/movement_handler.rs +++ b/editor/src/document/movement_handler.rs @@ -7,9 +7,9 @@ use crate::{ consts::{MOUSE_ZOOM_RATE, VIEWPORT_SCROLL_RATE, VIEWPORT_ZOOM_SCALE_MAX, VIEWPORT_ZOOM_SCALE_MIN, WHEEL_ZOOM_RATE}, input::{mouse::ViewportPosition, InputPreprocessor}, }; -use document_core::document::Document; -use document_core::Operation as DocumentOperation; use glam::DVec2; +use graphene::document::Document; +use graphene::Operation as DocumentOperation; use std::collections::VecDeque; diff --git a/core/editor/src/frontend/frontend_message_handler.rs b/editor/src/frontend/frontend_message_handler.rs similarity index 100% rename from core/editor/src/frontend/frontend_message_handler.rs rename to editor/src/frontend/frontend_message_handler.rs diff --git a/core/editor/src/frontend/layer_panel.rs b/editor/src/frontend/layer_panel.rs similarity index 85% rename from core/editor/src/frontend/layer_panel.rs rename to editor/src/frontend/layer_panel.rs index 5103c6da3..0552f8a8c 100644 --- a/core/editor/src/frontend/layer_panel.rs +++ b/editor/src/frontend/layer_panel.rs @@ -1,5 +1,5 @@ use crate::document::LayerData; -use document_core::layers::{BlendMode, LayerDataType}; +use graphene::layers::{BlendMode, LayerDataType}; use serde::{Deserialize, Serialize}; use std::fmt; @@ -11,7 +11,7 @@ pub struct LayerPanelEntry { pub opacity: f64, pub layer_type: LayerType, pub layer_data: LayerData, - // TODO: instead of turning the u64 into (u32, u32)s here, do that in the wasm wrapper + // TODO: Instead of turning the u64 into (u32, u32)s here, do that in the WASM translation layer pub path: Vec<(u32, u32)>, pub thumbnail: String, } diff --git a/core/editor/src/frontend/mod.rs b/editor/src/frontend/mod.rs similarity index 100% rename from core/editor/src/frontend/mod.rs rename to editor/src/frontend/mod.rs diff --git a/core/editor/src/global/global_message_handler.rs b/editor/src/global/global_message_handler.rs similarity index 100% rename from core/editor/src/global/global_message_handler.rs rename to editor/src/global/global_message_handler.rs diff --git a/core/editor/src/global/mod.rs b/editor/src/global/mod.rs similarity index 100% rename from core/editor/src/global/mod.rs rename to editor/src/global/mod.rs diff --git a/core/editor/src/input/input_mapper.rs b/editor/src/input/input_mapper.rs similarity index 100% rename from core/editor/src/input/input_mapper.rs rename to editor/src/input/input_mapper.rs diff --git a/core/editor/src/input/input_preprocessor.rs b/editor/src/input/input_preprocessor.rs similarity index 98% rename from core/editor/src/input/input_preprocessor.rs rename to editor/src/input/input_preprocessor.rs index dd8ca40f1..155dcf865 100644 --- a/core/editor/src/input/input_preprocessor.rs +++ b/editor/src/input/input_preprocessor.rs @@ -6,7 +6,7 @@ use crate::message_prelude::*; use bitflags::bitflags; #[doc(inline)] -pub use document_core::DocumentResponse; +pub use graphene::DocumentResponse; #[impl_message(Message, InputPreprocessor)] #[derive(PartialEq, Clone, Debug)] @@ -75,7 +75,7 @@ impl MessageHandler for InputPreprocessor { } InputPreprocessorMessage::ViewportResize(size) => { responses.push_back( - document_core::Operation::TransformLayer { + graphene::Operation::TransformLayer { path: vec![], transform: glam::DAffine2::from_translation((size.as_f64() - self.viewport_size.as_f64()) / 2.).to_cols_array(), } diff --git a/core/editor/src/input/keyboard.rs b/editor/src/input/keyboard.rs similarity index 100% rename from core/editor/src/input/keyboard.rs rename to editor/src/input/keyboard.rs diff --git a/core/editor/src/input/mod.rs b/editor/src/input/mod.rs similarity index 100% rename from core/editor/src/input/mod.rs rename to editor/src/input/mod.rs diff --git a/core/editor/src/input/mouse.rs b/editor/src/input/mouse.rs similarity index 100% rename from core/editor/src/input/mouse.rs rename to editor/src/input/mouse.rs diff --git a/core/editor/src/lib.rs b/editor/src/lib.rs similarity index 84% rename from core/editor/src/lib.rs rename to editor/src/lib.rs index eb9a039f5..98cb4b4ab 100644 --- a/core/editor/src/lib.rs +++ b/editor/src/lib.rs @@ -1,10 +1,3 @@ -//! **Graphite Editor Core Library**: `/core/editor/` -//! -//! Used by a frontend editor client to maintain GUI state and dispatch user events. -//! The official Graphite editor is the primary user, -//! but others software like game engines could embed their own customized editor implementations. -//! Depends on the Document Core Library. - // since our policy is tabs, we want to stop clippy from warning about that #![allow(clippy::tabs_in_doc_comments)] @@ -25,13 +18,13 @@ pub mod consts; pub use misc::EditorError; #[doc(inline)] -pub use document_core::color::Color; +pub use graphene::color::Color; #[doc(inline)] -pub use document_core::LayerId; +pub use graphene::LayerId; #[doc(inline)] -pub use document_core::document::Document as SvgDocument; +pub use graphene::document::Document as SvgDocument; #[doc(inline)] pub use frontend::Callback; diff --git a/core/editor/src/misc/derivable_custom_traits.rs b/editor/src/misc/derivable_custom_traits.rs similarity index 100% rename from core/editor/src/misc/derivable_custom_traits.rs rename to editor/src/misc/derivable_custom_traits.rs diff --git a/core/editor/src/misc/error.rs b/editor/src/misc/error.rs similarity index 96% rename from core/editor/src/misc/error.rs rename to editor/src/misc/error.rs index a6e53bfff..ad1cf505a 100644 --- a/core/editor/src/misc/error.rs +++ b/editor/src/misc/error.rs @@ -1,5 +1,5 @@ use crate::Color; -use document_core::DocumentError; +use graphene::DocumentError; use thiserror::Error; /// The error type used by the Graphite editor. diff --git a/core/editor/src/misc/macros.rs b/editor/src/misc/macros.rs similarity index 100% rename from core/editor/src/misc/macros.rs rename to editor/src/misc/macros.rs diff --git a/core/editor/src/misc/mod.rs b/editor/src/misc/mod.rs similarity index 100% rename from core/editor/src/misc/mod.rs rename to editor/src/misc/mod.rs diff --git a/core/editor/src/misc/test_utils.rs b/editor/src/misc/test_utils.rs similarity index 98% rename from core/editor/src/misc/test_utils.rs rename to editor/src/misc/test_utils.rs index b23f6ca8e..fe91dbcc3 100644 --- a/core/editor/src/misc/test_utils.rs +++ b/editor/src/misc/test_utils.rs @@ -7,7 +7,7 @@ use crate::{ tool::ToolType, Editor, }; -use document_core::color::Color; +use graphene::color::Color; /// A set of utility functions to make the writing of editor test more declarative pub trait EditorTestUtils { diff --git a/core/editor/src/tool/mod.rs b/editor/src/tool/mod.rs similarity index 100% rename from core/editor/src/tool/mod.rs rename to editor/src/tool/mod.rs diff --git a/core/editor/src/tool/tool_message_handler.rs b/editor/src/tool/tool_message_handler.rs similarity index 99% rename from core/editor/src/tool/tool_message_handler.rs rename to editor/src/tool/tool_message_handler.rs index 0125273c8..ed90623c1 100644 --- a/core/editor/src/tool/tool_message_handler.rs +++ b/editor/src/tool/tool_message_handler.rs @@ -1,5 +1,5 @@ use crate::message_prelude::*; -use document_core::color::Color; +use graphene::color::Color; use crate::input::InputPreprocessor; use crate::{ diff --git a/core/editor/src/tool/tool_options.rs b/editor/src/tool/tool_options.rs similarity index 100% rename from core/editor/src/tool/tool_options.rs rename to editor/src/tool/tool_options.rs diff --git a/core/editor/src/tool/tools/crop.rs b/editor/src/tool/tools/crop.rs similarity index 100% rename from core/editor/src/tool/tools/crop.rs rename to editor/src/tool/tools/crop.rs diff --git a/core/editor/src/tool/tools/ellipse.rs b/editor/src/tool/tools/ellipse.rs similarity index 98% rename from core/editor/src/tool/tools/ellipse.rs rename to editor/src/tool/tools/ellipse.rs index 9faa592df..32aef2754 100644 --- a/core/editor/src/tool/tools/ellipse.rs +++ b/editor/src/tool/tools/ellipse.rs @@ -2,8 +2,8 @@ use crate::input::keyboard::Key; use crate::input::InputPreprocessor; use crate::tool::{DocumentToolData, Fsm, ToolActionHandlerData}; use crate::{document::DocumentMessageHandler, message_prelude::*}; -use document_core::{layers::style, Operation}; use glam::DAffine2; +use graphene::{layers::style, Operation}; use super::resize::*; diff --git a/core/editor/src/tool/tools/eyedropper.rs b/editor/src/tool/tools/eyedropper.rs similarity index 95% rename from core/editor/src/tool/tools/eyedropper.rs rename to editor/src/tool/tools/eyedropper.rs index aa1b952c9..615780b4f 100644 --- a/core/editor/src/tool/tools/eyedropper.rs +++ b/editor/src/tool/tools/eyedropper.rs @@ -1,9 +1,9 @@ use crate::consts::SELECTION_TOLERANCE; use crate::message_prelude::*; use crate::tool::{ToolActionHandlerData, ToolMessage}; -use document_core::layers::LayerDataType; -use document_core::Quad; use glam::DVec2; +use graphene::layers::LayerDataType; +use graphene::Quad; #[derive(Default)] pub struct Eyedropper; diff --git a/core/editor/src/tool/tools/fill.rs b/editor/src/tool/tools/fill.rs similarity index 96% rename from core/editor/src/tool/tools/fill.rs rename to editor/src/tool/tools/fill.rs index 76489b174..f37c5d729 100644 --- a/core/editor/src/tool/tools/fill.rs +++ b/editor/src/tool/tools/fill.rs @@ -1,8 +1,8 @@ use crate::consts::SELECTION_TOLERANCE; use crate::message_prelude::*; use crate::tool::ToolActionHandlerData; -use document_core::{Operation, Quad}; use glam::DVec2; +use graphene::{Operation, Quad}; #[derive(Default)] pub struct Fill; diff --git a/core/editor/src/tool/tools/line.rs b/editor/src/tool/tools/line.rs similarity index 98% rename from core/editor/src/tool/tools/line.rs rename to editor/src/tool/tools/line.rs index c6f026fcd..64949ad7a 100644 --- a/core/editor/src/tool/tools/line.rs +++ b/editor/src/tool/tools/line.rs @@ -5,8 +5,8 @@ use crate::input::keyboard::Key; use crate::input::{mouse::ViewportPosition, InputPreprocessor}; use crate::tool::{DocumentToolData, Fsm, ToolActionHandlerData}; use crate::{document::DocumentMessageHandler, message_prelude::*}; -use document_core::{layers::style, Operation}; use glam::{DAffine2, DVec2}; +use graphene::{layers::style, Operation}; #[derive(Default)] pub struct Line { diff --git a/core/editor/src/tool/tools/mod.rs b/editor/src/tool/tools/mod.rs similarity index 100% rename from core/editor/src/tool/tools/mod.rs rename to editor/src/tool/tools/mod.rs diff --git a/core/editor/src/tool/tools/navigate.rs b/editor/src/tool/tools/navigate.rs similarity index 100% rename from core/editor/src/tool/tools/navigate.rs rename to editor/src/tool/tools/navigate.rs diff --git a/core/editor/src/tool/tools/path.rs b/editor/src/tool/tools/path.rs similarity index 100% rename from core/editor/src/tool/tools/path.rs rename to editor/src/tool/tools/path.rs diff --git a/core/editor/src/tool/tools/pen.rs b/editor/src/tool/tools/pen.rs similarity index 98% rename from core/editor/src/tool/tools/pen.rs rename to editor/src/tool/tools/pen.rs index 3a63278ad..f2bff21c9 100644 --- a/core/editor/src/tool/tools/pen.rs +++ b/editor/src/tool/tools/pen.rs @@ -1,8 +1,8 @@ use crate::input::InputPreprocessor; use crate::tool::{DocumentToolData, Fsm, ToolActionHandlerData}; use crate::{document::DocumentMessageHandler, message_prelude::*}; -use document_core::{layers::style, Operation}; use glam::DAffine2; +use graphene::{layers::style, Operation}; #[derive(Default)] pub struct Pen { diff --git a/core/editor/src/tool/tools/rectangle.rs b/editor/src/tool/tools/rectangle.rs similarity index 98% rename from core/editor/src/tool/tools/rectangle.rs rename to editor/src/tool/tools/rectangle.rs index 64e7431ad..659577d9d 100644 --- a/core/editor/src/tool/tools/rectangle.rs +++ b/editor/src/tool/tools/rectangle.rs @@ -2,8 +2,8 @@ use crate::input::keyboard::Key; use crate::input::InputPreprocessor; use crate::tool::{DocumentToolData, Fsm, ToolActionHandlerData}; use crate::{document::DocumentMessageHandler, message_prelude::*}; -use document_core::{layers::style, Operation}; use glam::DAffine2; +use graphene::{layers::style, Operation}; use super::resize::*; diff --git a/core/editor/src/tool/tools/resize.rs b/editor/src/tool/tools/resize.rs similarity index 96% rename from core/editor/src/tool/tools/resize.rs rename to editor/src/tool/tools/resize.rs index 20e3aba10..a7a2fc564 100644 --- a/core/editor/src/tool/tools/resize.rs +++ b/editor/src/tool/tools/resize.rs @@ -1,8 +1,8 @@ use crate::input::keyboard::Key; use crate::input::{mouse::ViewportPosition, InputPreprocessor}; use crate::message_prelude::*; -use document_core::Operation; use glam::{DAffine2, Vec2Swizzles}; +use graphene::Operation; #[derive(Clone, Debug, Default)] pub struct Resize { diff --git a/core/editor/src/tool/tools/select.rs b/editor/src/tool/tools/select.rs similarity index 96% rename from core/editor/src/tool/tools/select.rs rename to editor/src/tool/tools/select.rs index 0a507e33f..4ad62dc54 100644 --- a/core/editor/src/tool/tools/select.rs +++ b/editor/src/tool/tools/select.rs @@ -1,9 +1,9 @@ -use document_core::color::Color; -use document_core::layers::style; -use document_core::layers::style::Fill; -use document_core::layers::style::Stroke; -use document_core::Operation; -use document_core::Quad; +use graphene::color::Color; +use graphene::layers::style; +use graphene::layers::style::Fill; +use graphene::layers::style::Stroke; +use graphene::Operation; +use graphene::Quad; use glam::{DAffine2, DVec2}; use serde::{Deserialize, Serialize}; diff --git a/core/editor/src/tool/tools/shape.rs b/editor/src/tool/tools/shape.rs similarity index 98% rename from core/editor/src/tool/tools/shape.rs rename to editor/src/tool/tools/shape.rs index 3df569c72..a2149eb82 100644 --- a/core/editor/src/tool/tools/shape.rs +++ b/editor/src/tool/tools/shape.rs @@ -2,8 +2,8 @@ use crate::input::keyboard::Key; use crate::input::InputPreprocessor; use crate::tool::{DocumentToolData, Fsm, ShapeType, ToolActionHandlerData, ToolOptions, ToolType}; use crate::{document::DocumentMessageHandler, message_prelude::*}; -use document_core::{layers::style, Operation}; use glam::DAffine2; +use graphene::{layers::style, Operation}; use super::resize::*; diff --git a/client/web/.eslintrc.js b/frontend/.eslintrc.js similarity index 100% rename from client/web/.eslintrc.js rename to frontend/.eslintrc.js diff --git a/client/web/.gitignore b/frontend/.gitignore similarity index 100% rename from client/web/.gitignore rename to frontend/.gitignore diff --git a/client/web/assets/12px-solid/checkmark.svg b/frontend/assets/12px-solid/checkmark.svg similarity index 100% rename from client/web/assets/12px-solid/checkmark.svg rename to frontend/assets/12px-solid/checkmark.svg diff --git a/client/web/assets/12px-solid/close-x.svg b/frontend/assets/12px-solid/close-x.svg similarity index 100% rename from client/web/assets/12px-solid/close-x.svg rename to frontend/assets/12px-solid/close-x.svg diff --git a/client/web/assets/12px-solid/dropdown-arrow.svg b/frontend/assets/12px-solid/dropdown-arrow.svg similarity index 100% rename from client/web/assets/12px-solid/dropdown-arrow.svg rename to frontend/assets/12px-solid/dropdown-arrow.svg diff --git a/client/web/assets/12px-solid/fullscreen-enter.svg b/frontend/assets/12px-solid/fullscreen-enter.svg similarity index 100% rename from client/web/assets/12px-solid/fullscreen-enter.svg rename to frontend/assets/12px-solid/fullscreen-enter.svg diff --git a/client/web/assets/12px-solid/fullscreen-exit.svg b/frontend/assets/12px-solid/fullscreen-exit.svg similarity index 100% rename from client/web/assets/12px-solid/fullscreen-exit.svg rename to frontend/assets/12px-solid/fullscreen-exit.svg diff --git a/client/web/assets/12px-solid/grid.svg b/frontend/assets/12px-solid/grid.svg similarity index 100% rename from client/web/assets/12px-solid/grid.svg rename to frontend/assets/12px-solid/grid.svg diff --git a/client/web/assets/12px-solid/info.svg b/frontend/assets/12px-solid/info.svg similarity index 100% rename from client/web/assets/12px-solid/info.svg rename to frontend/assets/12px-solid/info.svg diff --git a/client/web/assets/12px-solid/link.svg b/frontend/assets/12px-solid/link.svg similarity index 100% rename from client/web/assets/12px-solid/link.svg rename to frontend/assets/12px-solid/link.svg diff --git a/client/web/assets/12px-solid/overlays.svg b/frontend/assets/12px-solid/overlays.svg similarity index 100% rename from client/web/assets/12px-solid/overlays.svg rename to frontend/assets/12px-solid/overlays.svg diff --git a/client/web/assets/12px-solid/reset-colors.svg b/frontend/assets/12px-solid/reset-colors.svg similarity index 100% rename from client/web/assets/12px-solid/reset-colors.svg rename to frontend/assets/12px-solid/reset-colors.svg diff --git a/client/web/assets/12px-solid/snapping.svg b/frontend/assets/12px-solid/snapping.svg similarity index 100% rename from client/web/assets/12px-solid/snapping.svg rename to frontend/assets/12px-solid/snapping.svg diff --git a/client/web/assets/12px-solid/swap.svg b/frontend/assets/12px-solid/swap.svg similarity index 100% rename from client/web/assets/12px-solid/swap.svg rename to frontend/assets/12px-solid/swap.svg diff --git a/client/web/assets/12px-solid/vertical-ellipsis.svg b/frontend/assets/12px-solid/vertical-ellipsis.svg similarity index 100% rename from client/web/assets/12px-solid/vertical-ellipsis.svg rename to frontend/assets/12px-solid/vertical-ellipsis.svg diff --git a/client/web/assets/12px-solid/warning.svg b/frontend/assets/12px-solid/warning.svg similarity index 100% rename from client/web/assets/12px-solid/warning.svg rename to frontend/assets/12px-solid/warning.svg diff --git a/client/web/assets/12px-solid/window-button-win-close.svg b/frontend/assets/12px-solid/window-button-win-close.svg similarity index 100% rename from client/web/assets/12px-solid/window-button-win-close.svg rename to frontend/assets/12px-solid/window-button-win-close.svg diff --git a/client/web/assets/12px-solid/window-button-win-maximize.svg b/frontend/assets/12px-solid/window-button-win-maximize.svg similarity index 100% rename from client/web/assets/12px-solid/window-button-win-maximize.svg rename to frontend/assets/12px-solid/window-button-win-maximize.svg diff --git a/client/web/assets/12px-solid/window-button-win-minimize.svg b/frontend/assets/12px-solid/window-button-win-minimize.svg similarity index 100% rename from client/web/assets/12px-solid/window-button-win-minimize.svg rename to frontend/assets/12px-solid/window-button-win-minimize.svg diff --git a/client/web/assets/12px-solid/window-button-win-restore-down.svg b/frontend/assets/12px-solid/window-button-win-restore-down.svg similarity index 100% rename from client/web/assets/12px-solid/window-button-win-restore-down.svg rename to frontend/assets/12px-solid/window-button-win-restore-down.svg diff --git a/client/web/assets/16px-solid/align-bottom.svg b/frontend/assets/16px-solid/align-bottom.svg similarity index 100% rename from client/web/assets/16px-solid/align-bottom.svg rename to frontend/assets/16px-solid/align-bottom.svg diff --git a/client/web/assets/16px-solid/align-horizontal-center.svg b/frontend/assets/16px-solid/align-horizontal-center.svg similarity index 100% rename from client/web/assets/16px-solid/align-horizontal-center.svg rename to frontend/assets/16px-solid/align-horizontal-center.svg diff --git a/client/web/assets/16px-solid/align-left.svg b/frontend/assets/16px-solid/align-left.svg similarity index 100% rename from client/web/assets/16px-solid/align-left.svg rename to frontend/assets/16px-solid/align-left.svg diff --git a/client/web/assets/16px-solid/align-right.svg b/frontend/assets/16px-solid/align-right.svg similarity index 100% rename from client/web/assets/16px-solid/align-right.svg rename to frontend/assets/16px-solid/align-right.svg diff --git a/client/web/assets/16px-solid/align-top.svg b/frontend/assets/16px-solid/align-top.svg similarity index 100% rename from client/web/assets/16px-solid/align-top.svg rename to frontend/assets/16px-solid/align-top.svg diff --git a/client/web/assets/16px-solid/align-vertical-center.svg b/frontend/assets/16px-solid/align-vertical-center.svg similarity index 100% rename from client/web/assets/16px-solid/align-vertical-center.svg rename to frontend/assets/16px-solid/align-vertical-center.svg diff --git a/client/web/assets/16px-solid/boolean-difference.svg b/frontend/assets/16px-solid/boolean-difference.svg similarity index 100% rename from client/web/assets/16px-solid/boolean-difference.svg rename to frontend/assets/16px-solid/boolean-difference.svg diff --git a/client/web/assets/16px-solid/boolean-intersect.svg b/frontend/assets/16px-solid/boolean-intersect.svg similarity index 100% rename from client/web/assets/16px-solid/boolean-intersect.svg rename to frontend/assets/16px-solid/boolean-intersect.svg diff --git a/client/web/assets/16px-solid/boolean-subtract-back.svg b/frontend/assets/16px-solid/boolean-subtract-back.svg similarity index 100% rename from client/web/assets/16px-solid/boolean-subtract-back.svg rename to frontend/assets/16px-solid/boolean-subtract-back.svg diff --git a/client/web/assets/16px-solid/boolean-subtract-front.svg b/frontend/assets/16px-solid/boolean-subtract-front.svg similarity index 100% rename from client/web/assets/16px-solid/boolean-subtract-front.svg rename to frontend/assets/16px-solid/boolean-subtract-front.svg diff --git a/client/web/assets/16px-solid/boolean-union.svg b/frontend/assets/16px-solid/boolean-union.svg similarity index 100% rename from client/web/assets/16px-solid/boolean-union.svg rename to frontend/assets/16px-solid/boolean-union.svg diff --git a/client/web/assets/16px-solid/copy.svg b/frontend/assets/16px-solid/copy.svg similarity index 100% rename from client/web/assets/16px-solid/copy.svg rename to frontend/assets/16px-solid/copy.svg diff --git a/client/web/assets/16px-solid/eye-hidden.svg b/frontend/assets/16px-solid/eye-hidden.svg similarity index 100% rename from client/web/assets/16px-solid/eye-hidden.svg rename to frontend/assets/16px-solid/eye-hidden.svg diff --git a/client/web/assets/16px-solid/eye-visible.svg b/frontend/assets/16px-solid/eye-visible.svg similarity index 100% rename from client/web/assets/16px-solid/eye-visible.svg rename to frontend/assets/16px-solid/eye-visible.svg diff --git a/client/web/assets/16px-solid/file.svg b/frontend/assets/16px-solid/file.svg similarity index 100% rename from client/web/assets/16px-solid/file.svg rename to frontend/assets/16px-solid/file.svg diff --git a/client/web/assets/16px-solid/flip-horizontal.svg b/frontend/assets/16px-solid/flip-horizontal.svg similarity index 100% rename from client/web/assets/16px-solid/flip-horizontal.svg rename to frontend/assets/16px-solid/flip-horizontal.svg diff --git a/client/web/assets/16px-solid/flip-vertical.svg b/frontend/assets/16px-solid/flip-vertical.svg similarity index 100% rename from client/web/assets/16px-solid/flip-vertical.svg rename to frontend/assets/16px-solid/flip-vertical.svg diff --git a/client/web/assets/16px-solid/graphite-logo.svg b/frontend/assets/16px-solid/graphite-logo.svg similarity index 100% rename from client/web/assets/16px-solid/graphite-logo.svg rename to frontend/assets/16px-solid/graphite-logo.svg diff --git a/client/web/assets/16px-solid/paste.svg b/frontend/assets/16px-solid/paste.svg similarity index 100% rename from client/web/assets/16px-solid/paste.svg rename to frontend/assets/16px-solid/paste.svg diff --git a/client/web/assets/16px-solid/view-mode-normal.svg b/frontend/assets/16px-solid/view-mode-normal.svg similarity index 100% rename from client/web/assets/16px-solid/view-mode-normal.svg rename to frontend/assets/16px-solid/view-mode-normal.svg diff --git a/client/web/assets/16px-solid/view-mode-outline.svg b/frontend/assets/16px-solid/view-mode-outline.svg similarity index 100% rename from client/web/assets/16px-solid/view-mode-outline.svg rename to frontend/assets/16px-solid/view-mode-outline.svg diff --git a/client/web/assets/16px-solid/view-mode-pixels.svg b/frontend/assets/16px-solid/view-mode-pixels.svg similarity index 100% rename from client/web/assets/16px-solid/view-mode-pixels.svg rename to frontend/assets/16px-solid/view-mode-pixels.svg diff --git a/client/web/assets/16px-solid/viewport-design-mode.svg b/frontend/assets/16px-solid/viewport-design-mode.svg similarity index 100% rename from client/web/assets/16px-solid/viewport-design-mode.svg rename to frontend/assets/16px-solid/viewport-design-mode.svg diff --git a/client/web/assets/16px-solid/viewport-guide-mode.svg b/frontend/assets/16px-solid/viewport-guide-mode.svg similarity index 100% rename from client/web/assets/16px-solid/viewport-guide-mode.svg rename to frontend/assets/16px-solid/viewport-guide-mode.svg diff --git a/client/web/assets/16px-solid/viewport-select-mode.svg b/frontend/assets/16px-solid/viewport-select-mode.svg similarity index 100% rename from client/web/assets/16px-solid/viewport-select-mode.svg rename to frontend/assets/16px-solid/viewport-select-mode.svg diff --git a/client/web/assets/16px-solid/zoom-in.svg b/frontend/assets/16px-solid/zoom-in.svg similarity index 100% rename from client/web/assets/16px-solid/zoom-in.svg rename to frontend/assets/16px-solid/zoom-in.svg diff --git a/client/web/assets/16px-solid/zoom-out.svg b/frontend/assets/16px-solid/zoom-out.svg similarity index 100% rename from client/web/assets/16px-solid/zoom-out.svg rename to frontend/assets/16px-solid/zoom-out.svg diff --git a/client/web/assets/16px-solid/zoom-reset.svg b/frontend/assets/16px-solid/zoom-reset.svg similarity index 100% rename from client/web/assets/16px-solid/zoom-reset.svg rename to frontend/assets/16px-solid/zoom-reset.svg diff --git a/client/web/assets/16px-two-tone/mouse-hint-drag.svg b/frontend/assets/16px-two-tone/mouse-hint-drag.svg similarity index 100% rename from client/web/assets/16px-two-tone/mouse-hint-drag.svg rename to frontend/assets/16px-two-tone/mouse-hint-drag.svg diff --git a/client/web/assets/16px-two-tone/mouse-hint-lmb-drag.svg b/frontend/assets/16px-two-tone/mouse-hint-lmb-drag.svg similarity index 100% rename from client/web/assets/16px-two-tone/mouse-hint-lmb-drag.svg rename to frontend/assets/16px-two-tone/mouse-hint-lmb-drag.svg diff --git a/client/web/assets/16px-two-tone/mouse-hint-lmb.svg b/frontend/assets/16px-two-tone/mouse-hint-lmb.svg similarity index 100% rename from client/web/assets/16px-two-tone/mouse-hint-lmb.svg rename to frontend/assets/16px-two-tone/mouse-hint-lmb.svg diff --git a/client/web/assets/16px-two-tone/mouse-hint-mmb-drag.svg b/frontend/assets/16px-two-tone/mouse-hint-mmb-drag.svg similarity index 100% rename from client/web/assets/16px-two-tone/mouse-hint-mmb-drag.svg rename to frontend/assets/16px-two-tone/mouse-hint-mmb-drag.svg diff --git a/client/web/assets/16px-two-tone/mouse-hint-mmb.svg b/frontend/assets/16px-two-tone/mouse-hint-mmb.svg similarity index 100% rename from client/web/assets/16px-two-tone/mouse-hint-mmb.svg rename to frontend/assets/16px-two-tone/mouse-hint-mmb.svg diff --git a/client/web/assets/16px-two-tone/mouse-hint-none.svg b/frontend/assets/16px-two-tone/mouse-hint-none.svg similarity index 100% rename from client/web/assets/16px-two-tone/mouse-hint-none.svg rename to frontend/assets/16px-two-tone/mouse-hint-none.svg diff --git a/client/web/assets/16px-two-tone/mouse-hint-rmb-drag.svg b/frontend/assets/16px-two-tone/mouse-hint-rmb-drag.svg similarity index 100% rename from client/web/assets/16px-two-tone/mouse-hint-rmb-drag.svg rename to frontend/assets/16px-two-tone/mouse-hint-rmb-drag.svg diff --git a/client/web/assets/16px-two-tone/mouse-hint-rmb.svg b/frontend/assets/16px-two-tone/mouse-hint-rmb.svg similarity index 100% rename from client/web/assets/16px-two-tone/mouse-hint-rmb.svg rename to frontend/assets/16px-two-tone/mouse-hint-rmb.svg diff --git a/client/web/assets/16px-two-tone/mouse-hint-scroll-down.svg b/frontend/assets/16px-two-tone/mouse-hint-scroll-down.svg similarity index 100% rename from client/web/assets/16px-two-tone/mouse-hint-scroll-down.svg rename to frontend/assets/16px-two-tone/mouse-hint-scroll-down.svg diff --git a/client/web/assets/16px-two-tone/mouse-hint-scroll-up.svg b/frontend/assets/16px-two-tone/mouse-hint-scroll-up.svg similarity index 100% rename from client/web/assets/16px-two-tone/mouse-hint-scroll-up.svg rename to frontend/assets/16px-two-tone/mouse-hint-scroll-up.svg diff --git a/client/web/assets/24px-full-color/node-type-path.svg b/frontend/assets/24px-full-color/node-type-path.svg similarity index 100% rename from client/web/assets/24px-full-color/node-type-path.svg rename to frontend/assets/24px-full-color/node-type-path.svg diff --git a/client/web/assets/24px-two-tone/layout-crop-tool.svg b/frontend/assets/24px-two-tone/layout-crop-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/layout-crop-tool.svg rename to frontend/assets/24px-two-tone/layout-crop-tool.svg diff --git a/client/web/assets/24px-two-tone/layout-eyedropper-tool.svg b/frontend/assets/24px-two-tone/layout-eyedropper-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/layout-eyedropper-tool.svg rename to frontend/assets/24px-two-tone/layout-eyedropper-tool.svg diff --git a/client/web/assets/24px-two-tone/layout-navigate-tool.svg b/frontend/assets/24px-two-tone/layout-navigate-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/layout-navigate-tool.svg rename to frontend/assets/24px-two-tone/layout-navigate-tool.svg diff --git a/client/web/assets/24px-two-tone/layout-select-tool.svg b/frontend/assets/24px-two-tone/layout-select-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/layout-select-tool.svg rename to frontend/assets/24px-two-tone/layout-select-tool.svg diff --git a/client/web/assets/24px-two-tone/parametric-fill-tool.svg b/frontend/assets/24px-two-tone/parametric-fill-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/parametric-fill-tool.svg rename to frontend/assets/24px-two-tone/parametric-fill-tool.svg diff --git a/client/web/assets/24px-two-tone/parametric-gradient-tool.svg b/frontend/assets/24px-two-tone/parametric-gradient-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/parametric-gradient-tool.svg rename to frontend/assets/24px-two-tone/parametric-gradient-tool.svg diff --git a/client/web/assets/24px-two-tone/parametric-text-tool.svg b/frontend/assets/24px-two-tone/parametric-text-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/parametric-text-tool.svg rename to frontend/assets/24px-two-tone/parametric-text-tool.svg diff --git a/client/web/assets/24px-two-tone/raster-brush-tool.svg b/frontend/assets/24px-two-tone/raster-brush-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/raster-brush-tool.svg rename to frontend/assets/24px-two-tone/raster-brush-tool.svg diff --git a/client/web/assets/24px-two-tone/raster-clone-tool.svg b/frontend/assets/24px-two-tone/raster-clone-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/raster-clone-tool.svg rename to frontend/assets/24px-two-tone/raster-clone-tool.svg diff --git a/client/web/assets/24px-two-tone/raster-detail-tool.svg b/frontend/assets/24px-two-tone/raster-detail-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/raster-detail-tool.svg rename to frontend/assets/24px-two-tone/raster-detail-tool.svg diff --git a/client/web/assets/24px-two-tone/raster-heal-tool.svg b/frontend/assets/24px-two-tone/raster-heal-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/raster-heal-tool.svg rename to frontend/assets/24px-two-tone/raster-heal-tool.svg diff --git a/client/web/assets/24px-two-tone/raster-patch-tool.svg b/frontend/assets/24px-two-tone/raster-patch-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/raster-patch-tool.svg rename to frontend/assets/24px-two-tone/raster-patch-tool.svg diff --git a/client/web/assets/24px-two-tone/raster-relight-tool.svg b/frontend/assets/24px-two-tone/raster-relight-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/raster-relight-tool.svg rename to frontend/assets/24px-two-tone/raster-relight-tool.svg diff --git a/client/web/assets/24px-two-tone/vector-ellipse-tool.svg b/frontend/assets/24px-two-tone/vector-ellipse-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/vector-ellipse-tool.svg rename to frontend/assets/24px-two-tone/vector-ellipse-tool.svg diff --git a/client/web/assets/24px-two-tone/vector-freehand-tool.svg b/frontend/assets/24px-two-tone/vector-freehand-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/vector-freehand-tool.svg rename to frontend/assets/24px-two-tone/vector-freehand-tool.svg diff --git a/client/web/assets/24px-two-tone/vector-line-tool.svg b/frontend/assets/24px-two-tone/vector-line-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/vector-line-tool.svg rename to frontend/assets/24px-two-tone/vector-line-tool.svg diff --git a/client/web/assets/24px-two-tone/vector-path-tool.svg b/frontend/assets/24px-two-tone/vector-path-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/vector-path-tool.svg rename to frontend/assets/24px-two-tone/vector-path-tool.svg diff --git a/client/web/assets/24px-two-tone/vector-pen-tool.svg b/frontend/assets/24px-two-tone/vector-pen-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/vector-pen-tool.svg rename to frontend/assets/24px-two-tone/vector-pen-tool.svg diff --git a/client/web/assets/24px-two-tone/vector-rectangle-tool.svg b/frontend/assets/24px-two-tone/vector-rectangle-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/vector-rectangle-tool.svg rename to frontend/assets/24px-two-tone/vector-rectangle-tool.svg diff --git a/client/web/assets/24px-two-tone/vector-shape-tool.svg b/frontend/assets/24px-two-tone/vector-shape-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/vector-shape-tool.svg rename to frontend/assets/24px-two-tone/vector-shape-tool.svg diff --git a/client/web/assets/24px-two-tone/vector-spline-tool.svg b/frontend/assets/24px-two-tone/vector-spline-tool.svg similarity index 100% rename from client/web/assets/24px-two-tone/vector-spline-tool.svg rename to frontend/assets/24px-two-tone/vector-spline-tool.svg diff --git a/client/web/package-lock.json b/frontend/package-lock.json similarity index 100% rename from client/web/package-lock.json rename to frontend/package-lock.json diff --git a/client/web/package.json b/frontend/package.json similarity index 100% rename from client/web/package.json rename to frontend/package.json diff --git a/client/web/public/android-chrome-192x192.png b/frontend/public/android-chrome-192x192.png similarity index 100% rename from client/web/public/android-chrome-192x192.png rename to frontend/public/android-chrome-192x192.png diff --git a/client/web/public/android-chrome-384x384.png b/frontend/public/android-chrome-384x384.png similarity index 100% rename from client/web/public/android-chrome-384x384.png rename to frontend/public/android-chrome-384x384.png diff --git a/client/web/public/apple-touch-icon.png b/frontend/public/apple-touch-icon.png similarity index 100% rename from client/web/public/apple-touch-icon.png rename to frontend/public/apple-touch-icon.png diff --git a/client/web/public/browserconfig.xml b/frontend/public/browserconfig.xml similarity index 100% rename from client/web/public/browserconfig.xml rename to frontend/public/browserconfig.xml diff --git a/client/web/public/favicon-16x16.png b/frontend/public/favicon-16x16.png similarity index 100% rename from client/web/public/favicon-16x16.png rename to frontend/public/favicon-16x16.png diff --git a/client/web/public/favicon-32x32.png b/frontend/public/favicon-32x32.png similarity index 100% rename from client/web/public/favicon-32x32.png rename to frontend/public/favicon-32x32.png diff --git a/client/web/public/favicon.ico b/frontend/public/favicon.ico similarity index 100% rename from client/web/public/favicon.ico rename to frontend/public/favicon.ico diff --git a/client/web/public/index.html b/frontend/public/index.html similarity index 100% rename from client/web/public/index.html rename to frontend/public/index.html diff --git a/client/web/public/mstile-150x150.png b/frontend/public/mstile-150x150.png similarity index 100% rename from client/web/public/mstile-150x150.png rename to frontend/public/mstile-150x150.png diff --git a/client/web/public/safari-pinned-tab.svg b/frontend/public/safari-pinned-tab.svg similarity index 100% rename from client/web/public/safari-pinned-tab.svg rename to frontend/public/safari-pinned-tab.svg diff --git a/client/web/public/site.webmanifest b/frontend/public/site.webmanifest similarity index 100% rename from client/web/public/site.webmanifest rename to frontend/public/site.webmanifest diff --git a/client/web/src/App.vue b/frontend/src/App.vue similarity index 100% rename from client/web/src/App.vue rename to frontend/src/App.vue diff --git a/client/web/src/components/layout/LayoutCol.vue b/frontend/src/components/layout/LayoutCol.vue similarity index 100% rename from client/web/src/components/layout/LayoutCol.vue rename to frontend/src/components/layout/LayoutCol.vue diff --git a/client/web/src/components/layout/LayoutRow.vue b/frontend/src/components/layout/LayoutRow.vue similarity index 100% rename from client/web/src/components/layout/LayoutRow.vue rename to frontend/src/components/layout/LayoutRow.vue diff --git a/client/web/src/components/panels/Document.vue b/frontend/src/components/panels/Document.vue similarity index 100% rename from client/web/src/components/panels/Document.vue rename to frontend/src/components/panels/Document.vue diff --git a/client/web/src/components/panels/LayerTree.vue b/frontend/src/components/panels/LayerTree.vue similarity index 100% rename from client/web/src/components/panels/LayerTree.vue rename to frontend/src/components/panels/LayerTree.vue diff --git a/client/web/src/components/panels/Minimap.vue b/frontend/src/components/panels/Minimap.vue similarity index 100% rename from client/web/src/components/panels/Minimap.vue rename to frontend/src/components/panels/Minimap.vue diff --git a/client/web/src/components/panels/Properties.vue b/frontend/src/components/panels/Properties.vue similarity index 100% rename from client/web/src/components/panels/Properties.vue rename to frontend/src/components/panels/Properties.vue diff --git a/client/web/src/components/widgets/buttons/IconButton.vue b/frontend/src/components/widgets/buttons/IconButton.vue similarity index 100% rename from client/web/src/components/widgets/buttons/IconButton.vue rename to frontend/src/components/widgets/buttons/IconButton.vue diff --git a/client/web/src/components/widgets/buttons/PopoverButton.vue b/frontend/src/components/widgets/buttons/PopoverButton.vue similarity index 100% rename from client/web/src/components/widgets/buttons/PopoverButton.vue rename to frontend/src/components/widgets/buttons/PopoverButton.vue diff --git a/client/web/src/components/widgets/buttons/TextButton.vue b/frontend/src/components/widgets/buttons/TextButton.vue similarity index 100% rename from client/web/src/components/widgets/buttons/TextButton.vue rename to frontend/src/components/widgets/buttons/TextButton.vue diff --git a/client/web/src/components/widgets/floating-menus/ColorPicker.vue b/frontend/src/components/widgets/floating-menus/ColorPicker.vue similarity index 100% rename from client/web/src/components/widgets/floating-menus/ColorPicker.vue rename to frontend/src/components/widgets/floating-menus/ColorPicker.vue diff --git a/client/web/src/components/widgets/floating-menus/DialogModal.vue b/frontend/src/components/widgets/floating-menus/DialogModal.vue similarity index 100% rename from client/web/src/components/widgets/floating-menus/DialogModal.vue rename to frontend/src/components/widgets/floating-menus/DialogModal.vue diff --git a/client/web/src/components/widgets/floating-menus/FloatingMenu.vue b/frontend/src/components/widgets/floating-menus/FloatingMenu.vue similarity index 100% rename from client/web/src/components/widgets/floating-menus/FloatingMenu.vue rename to frontend/src/components/widgets/floating-menus/FloatingMenu.vue diff --git a/client/web/src/components/widgets/floating-menus/MenuList.vue b/frontend/src/components/widgets/floating-menus/MenuList.vue similarity index 100% rename from client/web/src/components/widgets/floating-menus/MenuList.vue rename to frontend/src/components/widgets/floating-menus/MenuList.vue diff --git a/client/web/src/components/widgets/inputs/CheckboxInput.vue b/frontend/src/components/widgets/inputs/CheckboxInput.vue similarity index 100% rename from client/web/src/components/widgets/inputs/CheckboxInput.vue rename to frontend/src/components/widgets/inputs/CheckboxInput.vue diff --git a/client/web/src/components/widgets/inputs/DropdownInput.vue b/frontend/src/components/widgets/inputs/DropdownInput.vue similarity index 100% rename from client/web/src/components/widgets/inputs/DropdownInput.vue rename to frontend/src/components/widgets/inputs/DropdownInput.vue diff --git a/client/web/src/components/widgets/inputs/MenuBarInput.vue b/frontend/src/components/widgets/inputs/MenuBarInput.vue similarity index 100% rename from client/web/src/components/widgets/inputs/MenuBarInput.vue rename to frontend/src/components/widgets/inputs/MenuBarInput.vue diff --git a/client/web/src/components/widgets/inputs/NumberInput.vue b/frontend/src/components/widgets/inputs/NumberInput.vue similarity index 100% rename from client/web/src/components/widgets/inputs/NumberInput.vue rename to frontend/src/components/widgets/inputs/NumberInput.vue diff --git a/client/web/src/components/widgets/inputs/OptionalInput.vue b/frontend/src/components/widgets/inputs/OptionalInput.vue similarity index 100% rename from client/web/src/components/widgets/inputs/OptionalInput.vue rename to frontend/src/components/widgets/inputs/OptionalInput.vue diff --git a/client/web/src/components/widgets/inputs/RadioInput.vue b/frontend/src/components/widgets/inputs/RadioInput.vue similarity index 100% rename from client/web/src/components/widgets/inputs/RadioInput.vue rename to frontend/src/components/widgets/inputs/RadioInput.vue diff --git a/client/web/src/components/widgets/inputs/ShelfItemInput.vue b/frontend/src/components/widgets/inputs/ShelfItemInput.vue similarity index 100% rename from client/web/src/components/widgets/inputs/ShelfItemInput.vue rename to frontend/src/components/widgets/inputs/ShelfItemInput.vue diff --git a/client/web/src/components/widgets/inputs/SwatchPairInput.vue b/frontend/src/components/widgets/inputs/SwatchPairInput.vue similarity index 100% rename from client/web/src/components/widgets/inputs/SwatchPairInput.vue rename to frontend/src/components/widgets/inputs/SwatchPairInput.vue diff --git a/client/web/src/components/widgets/labels/IconLabel.vue b/frontend/src/components/widgets/labels/IconLabel.vue similarity index 100% rename from client/web/src/components/widgets/labels/IconLabel.vue rename to frontend/src/components/widgets/labels/IconLabel.vue diff --git a/client/web/src/components/widgets/labels/TextLabel.vue b/frontend/src/components/widgets/labels/TextLabel.vue similarity index 100% rename from client/web/src/components/widgets/labels/TextLabel.vue rename to frontend/src/components/widgets/labels/TextLabel.vue diff --git a/client/web/src/components/widgets/labels/UserInputLabel.vue b/frontend/src/components/widgets/labels/UserInputLabel.vue similarity index 100% rename from client/web/src/components/widgets/labels/UserInputLabel.vue rename to frontend/src/components/widgets/labels/UserInputLabel.vue diff --git a/client/web/src/components/widgets/options/ToolOptions.vue b/frontend/src/components/widgets/options/ToolOptions.vue similarity index 100% rename from client/web/src/components/widgets/options/ToolOptions.vue rename to frontend/src/components/widgets/options/ToolOptions.vue diff --git a/client/web/src/components/widgets/rulers/CanvasRuler.vue b/frontend/src/components/widgets/rulers/CanvasRuler.vue similarity index 100% rename from client/web/src/components/widgets/rulers/CanvasRuler.vue rename to frontend/src/components/widgets/rulers/CanvasRuler.vue diff --git a/client/web/src/components/widgets/scrollbars/PersistentScrollbar.vue b/frontend/src/components/widgets/scrollbars/PersistentScrollbar.vue similarity index 100% rename from client/web/src/components/widgets/scrollbars/PersistentScrollbar.vue rename to frontend/src/components/widgets/scrollbars/PersistentScrollbar.vue diff --git a/client/web/src/components/widgets/separators/Separator.vue b/frontend/src/components/widgets/separators/Separator.vue similarity index 100% rename from client/web/src/components/widgets/separators/Separator.vue rename to frontend/src/components/widgets/separators/Separator.vue diff --git a/client/web/src/components/widgets/widgets.ts b/frontend/src/components/widgets/widgets.ts similarity index 100% rename from client/web/src/components/widgets/widgets.ts rename to frontend/src/components/widgets/widgets.ts diff --git a/client/web/src/components/window/MainWindow.vue b/frontend/src/components/window/MainWindow.vue similarity index 100% rename from client/web/src/components/window/MainWindow.vue rename to frontend/src/components/window/MainWindow.vue diff --git a/client/web/src/components/window/status-bar/StatusBar.vue b/frontend/src/components/window/status-bar/StatusBar.vue similarity index 100% rename from client/web/src/components/window/status-bar/StatusBar.vue rename to frontend/src/components/window/status-bar/StatusBar.vue diff --git a/client/web/src/components/window/title-bar/TitleBar.vue b/frontend/src/components/window/title-bar/TitleBar.vue similarity index 100% rename from client/web/src/components/window/title-bar/TitleBar.vue rename to frontend/src/components/window/title-bar/TitleBar.vue diff --git a/client/web/src/components/window/title-bar/WindowButtonsMac.vue b/frontend/src/components/window/title-bar/WindowButtonsMac.vue similarity index 100% rename from client/web/src/components/window/title-bar/WindowButtonsMac.vue rename to frontend/src/components/window/title-bar/WindowButtonsMac.vue diff --git a/client/web/src/components/window/title-bar/WindowButtonsWeb.vue b/frontend/src/components/window/title-bar/WindowButtonsWeb.vue similarity index 100% rename from client/web/src/components/window/title-bar/WindowButtonsWeb.vue rename to frontend/src/components/window/title-bar/WindowButtonsWeb.vue diff --git a/client/web/src/components/window/title-bar/WindowButtonsWindows.vue b/frontend/src/components/window/title-bar/WindowButtonsWindows.vue similarity index 100% rename from client/web/src/components/window/title-bar/WindowButtonsWindows.vue rename to frontend/src/components/window/title-bar/WindowButtonsWindows.vue diff --git a/client/web/src/components/window/title-bar/WindowTitle.vue b/frontend/src/components/window/title-bar/WindowTitle.vue similarity index 100% rename from client/web/src/components/window/title-bar/WindowTitle.vue rename to frontend/src/components/window/title-bar/WindowTitle.vue diff --git a/client/web/src/components/workspace/Panel.vue b/frontend/src/components/workspace/Panel.vue similarity index 100% rename from client/web/src/components/workspace/Panel.vue rename to frontend/src/components/workspace/Panel.vue diff --git a/client/web/src/components/workspace/Workspace.vue b/frontend/src/components/workspace/Workspace.vue similarity index 100% rename from client/web/src/components/workspace/Workspace.vue rename to frontend/src/components/workspace/Workspace.vue diff --git a/client/web/src/main.ts b/frontend/src/main.ts similarity index 100% rename from client/web/src/main.ts rename to frontend/src/main.ts diff --git a/client/web/src/types.d.ts b/frontend/src/types.d.ts similarity index 100% rename from client/web/src/types.d.ts rename to frontend/src/types.d.ts diff --git a/client/web/src/utilities/color.ts b/frontend/src/utilities/color.ts similarity index 100% rename from client/web/src/utilities/color.ts rename to frontend/src/utilities/color.ts diff --git a/client/web/src/utilities/coming-soon.ts b/frontend/src/utilities/coming-soon.ts similarity index 100% rename from client/web/src/utilities/coming-soon.ts rename to frontend/src/utilities/coming-soon.ts diff --git a/client/web/src/utilities/dialog.ts b/frontend/src/utilities/dialog.ts similarity index 100% rename from client/web/src/utilities/dialog.ts rename to frontend/src/utilities/dialog.ts diff --git a/client/web/src/utilities/documents.ts b/frontend/src/utilities/documents.ts similarity index 100% rename from client/web/src/utilities/documents.ts rename to frontend/src/utilities/documents.ts diff --git a/client/web/src/utilities/fullscreen.ts b/frontend/src/utilities/fullscreen.ts similarity index 100% rename from client/web/src/utilities/fullscreen.ts rename to frontend/src/utilities/fullscreen.ts diff --git a/client/web/src/utilities/input.ts b/frontend/src/utilities/input.ts similarity index 100% rename from client/web/src/utilities/input.ts rename to frontend/src/utilities/input.ts diff --git a/client/web/src/utilities/math.ts b/frontend/src/utilities/math.ts similarity index 100% rename from client/web/src/utilities/math.ts rename to frontend/src/utilities/math.ts diff --git a/client/web/src/utilities/response-handler-binding.ts b/frontend/src/utilities/response-handler-binding.ts similarity index 60% rename from client/web/src/utilities/response-handler-binding.ts rename to frontend/src/utilities/response-handler-binding.ts index 6851f8966..b9430c4c0 100644 --- a/client/web/src/utilities/response-handler-binding.ts +++ b/frontend/src/utilities/response-handler-binding.ts @@ -1,4 +1,4 @@ -// This file is instantiated by wasm-bindgen in `client\web\wasm\src\lib.rs` and re-exports the `handleResponse` function to +// This file is instantiated by wasm-bindgen in `/frontend/wasm/src/lib.rs` and re-exports the `handleResponse` function to // provide access to the global copy of `response-handler.ts` with its shared state, not an isolated duplicate with empty state export { handleResponse } from "@/utilities/response-handler"; diff --git a/client/web/src/utilities/response-handler.ts b/frontend/src/utilities/response-handler.ts similarity index 100% rename from client/web/src/utilities/response-handler.ts rename to frontend/src/utilities/response-handler.ts diff --git a/client/web/tsconfig.json b/frontend/tsconfig.json similarity index 100% rename from client/web/tsconfig.json rename to frontend/tsconfig.json diff --git a/client/web/vue.config.js b/frontend/vue.config.js similarity index 74% rename from client/web/vue.config.js rename to frontend/vue.config.js index d932c9ee3..3c828c3e5 100644 --- a/client/web/vue.config.js +++ b/frontend/vue.config.js @@ -13,7 +13,12 @@ module.exports = { (Plugin) => new Plugin({ crateDirectory: path.resolve(__dirname, "wasm"), - watchDirectories: [path.resolve(__dirname, "../../core")], + watchDirectories: [ + path.resolve(__dirname, "../editor"), + path.resolve(__dirname, "../graphene"), + path.resolve(__dirname, "../charcoal"), + path.resolve(__dirname, "../proc-macros"), + ], }) ) .end(); diff --git a/client/web/wasm/.gitignore b/frontend/wasm/.gitignore similarity index 100% rename from client/web/wasm/.gitignore rename to frontend/wasm/.gitignore diff --git a/client/web/wasm/Cargo.toml b/frontend/wasm/Cargo.toml similarity index 80% rename from client/web/wasm/Cargo.toml rename to frontend/wasm/Cargo.toml index d45b52d18..e6b509a74 100644 --- a/client/web/wasm/Cargo.toml +++ b/frontend/wasm/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "graphite-wasm-wrapper" +name = "graphite-wasm" version = "0.1.0" authors = ["Graphite Authors "] edition = "2018" -readme = "../../../README.md" +readme = "../../README.md" homepage = "https://www.graphite.design" repository = "https://github.com/GraphiteEditor/Graphite" license = "Apache-2.0" @@ -17,8 +17,8 @@ default = ["console_error_panic_hook"] [dependencies] console_error_panic_hook = { version = "0.1.6", optional = true } -editor-core = { path = "../../../core/editor", package = "graphite-editor-core" } -document-core = { path = "../../../core/document", package = "graphite-document-core" } +editor = { path = "../../editor", package = "graphite-editor" } +graphene = { path = "../../graphene", package = "graphite-graphene" } log = "0.4" serde = { version = "1.0", features = ["derive"] } wasm-bindgen = { version = "0.2.73", features = ["serde-serialize"] } diff --git a/client/web/wasm/src/document.rs b/frontend/wasm/src/document.rs similarity index 96% rename from client/web/wasm/src/document.rs rename to frontend/wasm/src/document.rs index 5d5f71da6..373f9c553 100644 --- a/client/web/wasm/src/document.rs +++ b/frontend/wasm/src/document.rs @@ -1,16 +1,16 @@ use crate::shims::Error; use crate::wrappers::{translate_key, translate_tool, Color}; use crate::EDITOR_STATE; -use document_core::layers::BlendMode; -use editor_core::input::input_preprocessor::ModifierKeys; -use editor_core::input::mouse::ScrollDelta; -use editor_core::message_prelude::*; -use editor_core::misc::EditorError; -use editor_core::tool::{tool_options::ToolOptions, tools, ToolType}; -use editor_core::{input::mouse::MouseState, LayerId}; +use editor::input::input_preprocessor::ModifierKeys; +use editor::input::mouse::ScrollDelta; +use editor::message_prelude::*; +use editor::misc::EditorError; +use editor::tool::{tool_options::ToolOptions, tools, ToolType}; +use editor::{input::mouse::MouseState, LayerId}; +use graphene::layers::BlendMode; use wasm_bindgen::prelude::*; -fn convert_error(err: editor_core::EditorError) -> JsValue { +fn convert_error(err: editor::EditorError) -> JsValue { Error::new(&err.to_string()).into() } diff --git a/client/web/wasm/src/lib.rs b/frontend/wasm/src/lib.rs similarity index 82% rename from client/web/wasm/src/lib.rs rename to frontend/wasm/src/lib.rs index 53e34e0bd..e1f00a95c 100644 --- a/client/web/wasm/src/lib.rs +++ b/frontend/wasm/src/lib.rs @@ -1,14 +1,10 @@ -//! **Rust WebAssembly wrapper**: `/client/web/wasm/` -//! -//! Wraps the Editor Core Library and provides an API for the web app to use unburdened by Rust's complex data types that are not supported by WASM - pub mod document; mod shims; pub mod utils; pub mod window; pub mod wrappers; -use editor_core::{message_prelude::*, Editor}; +use editor::{message_prelude::*, Editor}; use std::cell::RefCell; use utils::WasmLog; use wasm_bindgen::prelude::*; diff --git a/client/web/wasm/src/shims.rs b/frontend/wasm/src/shims.rs similarity index 100% rename from client/web/wasm/src/shims.rs rename to frontend/wasm/src/shims.rs diff --git a/client/web/wasm/src/utils.rs b/frontend/wasm/src/utils.rs similarity index 100% rename from client/web/wasm/src/utils.rs rename to frontend/wasm/src/utils.rs diff --git a/client/web/wasm/src/window.rs b/frontend/wasm/src/window.rs similarity index 100% rename from client/web/wasm/src/window.rs rename to frontend/wasm/src/window.rs diff --git a/client/web/wasm/src/wrappers.rs b/frontend/wasm/src/wrappers.rs similarity index 94% rename from client/web/wasm/src/wrappers.rs rename to frontend/wasm/src/wrappers.rs index 032a93a33..c0a6e3a1a 100644 --- a/client/web/wasm/src/wrappers.rs +++ b/frontend/wasm/src/wrappers.rs @@ -1,7 +1,7 @@ use crate::shims::Error; -use editor_core::input::keyboard::Key; -use editor_core::tool::{SelectAppendMode, ToolType}; -use editor_core::Color as InnerColor; +use editor::input::keyboard::Key; +use editor::tool::{SelectAppendMode, ToolType}; +use editor::Color as InnerColor; use wasm_bindgen::prelude::*; #[wasm_bindgen] diff --git a/client/web/wasm/tests/web.rs b/frontend/wasm/tests/web.rs similarity index 100% rename from client/web/wasm/tests/web.rs rename to frontend/wasm/tests/web.rs diff --git a/core/document/Cargo.toml b/graphene/Cargo.toml similarity index 87% rename from core/document/Cargo.toml rename to graphene/Cargo.toml index c5ad943b2..019f056ee 100644 --- a/core/document/Cargo.toml +++ b/graphene/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "graphite-document-core" +name = "graphite-graphene" version = "0.1.0" authors = ["Graphite Authors "] edition = "2018" -readme = "../../README.md" +readme = "../README.md" homepage = "https://www.graphite.design" repository = "https://github.com/GraphiteEditor/Graphite" license = "Apache-2.0" diff --git a/core/document/src/color.rs b/graphene/src/color.rs similarity index 90% rename from core/document/src/color.rs rename to graphene/src/color.rs index e8529956c..705a82a77 100644 --- a/core/document/src/color.rs +++ b/graphene/src/color.rs @@ -25,7 +25,7 @@ impl Color { /// /// # Examples /// ``` - /// use graphite_document_core::color::Color; + /// use graphite_graphene::color::Color; /// let color = Color::from_rgbaf32(0.3, 0.14, 0.15, 0.92).unwrap(); /// assert!(color.components() == (0.3, 0.14, 0.15, 0.92)); /// @@ -48,7 +48,7 @@ impl Color { /// /// # Examples /// ``` - /// use graphite_document_core::color::Color; + /// use graphite_graphene::color::Color; /// let color = Color::from_rgb8(0x72, 0x67, 0x62); /// let color2 = Color::from_rgba8(0x72, 0x67, 0x62, 0xFF); /// assert!(color == color2) @@ -61,7 +61,7 @@ impl Color { /// /// # Examples /// ``` - /// use graphite_document_core::color::Color; + /// use graphite_graphene::color::Color; /// let color = Color::from_rgba8(0x72, 0x67, 0x62, 0x61); /// assert!("72676261" == color.rgba_hex()) /// ``` @@ -79,7 +79,7 @@ impl Color { /// /// # Examples /// ``` - /// use graphite_document_core::color::Color; + /// use graphite_graphene::color::Color; /// let color = Color::from_rgbaf32(0.114, 0.103, 0.98, 0.97).unwrap(); /// assert!(color.r() == 0.114); /// ``` @@ -91,7 +91,7 @@ impl Color { /// /// # Examples /// ``` - /// use graphite_document_core::color::Color; + /// use graphite_graphene::color::Color; /// let color = Color::from_rgbaf32(0.114, 0.103, 0.98, 0.97).unwrap(); /// assert!(color.g() == 0.103); /// ``` @@ -103,7 +103,7 @@ impl Color { /// /// # Examples /// ``` - /// use graphite_document_core::color::Color; + /// use graphite_graphene::color::Color; /// let color = Color::from_rgbaf32(0.114, 0.103, 0.98, 0.97).unwrap(); /// assert!(color.b() == 0.98); /// ``` @@ -115,7 +115,7 @@ impl Color { /// /// # Examples /// ``` - /// use graphite_document_core::color::Color; + /// use graphite_graphene::color::Color; /// let color = Color::from_rgbaf32(0.114, 0.103, 0.98, 0.97).unwrap(); /// assert!(color.a() == 0.97); /// ``` @@ -127,7 +127,7 @@ impl Color { /// /// # Examples /// ``` - /// use graphite_document_core::color::Color; + /// use graphite_graphene::color::Color; /// let color = Color::from_rgbaf32(0.114, 0.103, 0.98, 0.97).unwrap(); /// assert!(color.components() == (0.114, 0.103, 0.98, 0.97)); /// ``` @@ -139,7 +139,7 @@ impl Color { /// /// # Examples /// ``` - /// use graphite_document_core::color::Color; + /// use graphite_graphene::color::Color; /// let color = Color::from_rgba8(0x7C, 0x67, 0xFA, 0x61); /// assert!("7C67FA61" == color.rgba_hex()) /// ``` @@ -155,7 +155,7 @@ impl Color { /// Return a 6-character RGB hex string (without a # prefix). /// ``` - /// use graphite_document_core::color::Color; + /// use graphite_graphene::color::Color; /// let color = Color::from_rgba8(0x7C, 0x67, 0xFA, 0x61); /// assert!("7C67FA" == color.rgb_hex()) /// ``` diff --git a/core/document/src/document.rs b/graphene/src/document.rs similarity index 100% rename from core/document/src/document.rs rename to graphene/src/document.rs diff --git a/core/document/src/intersection.rs b/graphene/src/intersection.rs similarity index 100% rename from core/document/src/intersection.rs rename to graphene/src/intersection.rs diff --git a/core/document/src/layers/blend_mode.rs b/graphene/src/layers/blend_mode.rs similarity index 100% rename from core/document/src/layers/blend_mode.rs rename to graphene/src/layers/blend_mode.rs diff --git a/core/document/src/layers/folder.rs b/graphene/src/layers/folder.rs similarity index 100% rename from core/document/src/layers/folder.rs rename to graphene/src/layers/folder.rs diff --git a/core/document/src/layers/mod.rs b/graphene/src/layers/mod.rs similarity index 100% rename from core/document/src/layers/mod.rs rename to graphene/src/layers/mod.rs diff --git a/core/document/src/layers/simple_shape.rs b/graphene/src/layers/simple_shape.rs similarity index 100% rename from core/document/src/layers/simple_shape.rs rename to graphene/src/layers/simple_shape.rs diff --git a/core/document/src/layers/style/mod.rs b/graphene/src/layers/style/mod.rs similarity index 100% rename from core/document/src/layers/style/mod.rs rename to graphene/src/layers/style/mod.rs diff --git a/graphene/src/lib.rs b/graphene/src/lib.rs new file mode 100644 index 000000000..cc9e3e4c4 --- /dev/null +++ b/graphene/src/lib.rs @@ -0,0 +1,22 @@ +pub mod color; +pub mod document; +pub mod intersection; +pub mod layers; +pub mod operation; +pub mod response; + +pub use intersection::Quad; +pub use operation::Operation; +pub use response::DocumentResponse; + +pub type LayerId = u64; + +#[derive(Debug, Clone, Copy, PartialEq)] +pub enum DocumentError { + LayerNotFound, + InvalidPath, + IndexOutOfBounds, + NotAFolder, + NonReorderableSelection, + NotAShape, +} diff --git a/core/document/src/operation.rs b/graphene/src/operation.rs similarity index 100% rename from core/document/src/operation.rs rename to graphene/src/operation.rs diff --git a/core/document/src/response.rs b/graphene/src/response.rs similarity index 100% rename from core/document/src/response.rs rename to graphene/src/response.rs diff --git a/graphite_logo.png b/graphite_logo.png deleted file mode 100644 index fe1266553..000000000 Binary files a/graphite_logo.png and /dev/null differ diff --git a/package.json b/package.json index a140b1a74..1e08a772a 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "graphite-web-client-root-shortcut", + "name": "graphite-frontend-root-shortcut", "version": "1.0.0", - "description": "A convenience package for calling the real package.json in /client/web.", + "description": "A convenience package for calling the real package.json in /frontend.", "private": true, "scripts": { - "serve": "cd client && cd web && npm run serve", - "build": "cd client && cd web && npm run build", - "lint": "cd client && cd web && npm run lint", - "lint-no-fix": "cd client && cd web && npm run lint-no-fix" + "serve": "cd frontend && npm run serve", + "build": "cd frontend && npm run build", + "lint": "cd frontend && npm run lint", + "lint-no-fix": "cd frontend && npm run lint-no-fix" } -} +} \ No newline at end of file diff --git a/core/proc-macro/Cargo.toml b/proc-macros/Cargo.toml similarity index 83% rename from core/proc-macro/Cargo.toml rename to proc-macros/Cargo.toml index 1de098f93..9f30fa8dc 100644 --- a/core/proc-macro/Cargo.toml +++ b/proc-macros/Cargo.toml @@ -14,6 +14,6 @@ proc-macro2 = "1.0.26" syn = { version = "1.0.68", features = ["full"] } quote = "1.0.9" -[dev-dependencies.editor-core] +[dev-dependencies.editor] path = "../editor" -package = "graphite-editor-core" +package = "graphite-editor" diff --git a/core/proc-macro/src/as_message.rs b/proc-macros/src/as_message.rs similarity index 100% rename from core/proc-macro/src/as_message.rs rename to proc-macros/src/as_message.rs diff --git a/core/proc-macro/src/combined_message_attrs.rs b/proc-macros/src/combined_message_attrs.rs similarity index 100% rename from core/proc-macro/src/combined_message_attrs.rs rename to proc-macros/src/combined_message_attrs.rs diff --git a/core/proc-macro/src/discriminant.rs b/proc-macros/src/discriminant.rs similarity index 100% rename from core/proc-macro/src/discriminant.rs rename to proc-macros/src/discriminant.rs diff --git a/core/proc-macro/src/helper_structs.rs b/proc-macros/src/helper_structs.rs similarity index 100% rename from core/proc-macro/src/helper_structs.rs rename to proc-macros/src/helper_structs.rs diff --git a/core/proc-macro/src/helpers.rs b/proc-macros/src/helpers.rs similarity index 100% rename from core/proc-macro/src/helpers.rs rename to proc-macros/src/helpers.rs diff --git a/core/proc-macro/src/hint.rs b/proc-macros/src/hint.rs similarity index 100% rename from core/proc-macro/src/hint.rs rename to proc-macros/src/hint.rs diff --git a/core/proc-macro/src/lib.rs b/proc-macros/src/lib.rs similarity index 97% rename from core/proc-macro/src/lib.rs rename to proc-macros/src/lib.rs index 12802615d..98bae543a 100644 --- a/core/proc-macro/src/lib.rs +++ b/proc-macros/src/lib.rs @@ -34,7 +34,7 @@ use syn::parse_macro_input; /// # Example /// ``` /// # use graphite_proc_macros::ToDiscriminant; -/// # use editor_core::misc::derivable_custom_traits::ToDiscriminant; +/// # use editor::misc::derivable_custom_traits::ToDiscriminant; /// # use std::ffi::OsString; /// /// #[derive(ToDiscriminant)] @@ -79,7 +79,7 @@ pub fn derive_discriminant(input_item: TokenStream) -> TokenStream { /// # Example /// ``` /// # use graphite_proc_macros::TransitiveChild; -/// # use editor_core::misc::derivable_custom_traits::TransitiveChild; +/// # use editor::misc::derivable_custom_traits::TransitiveChild; /// /// #[derive(Debug, Eq, PartialEq)] /// struct A { u: u8, b: B }; @@ -129,8 +129,8 @@ pub fn derive_transitive_child(input_item: TokenStream) -> TokenStream { /// See also [`TransitiveChild`] /// ``` /// # use graphite_proc_macros::{TransitiveChild, AsMessage}; -/// # use editor_core::misc::derivable_custom_traits::TransitiveChild; -/// # use editor_core::message_prelude::*; +/// # use editor::misc::derivable_custom_traits::TransitiveChild; +/// # use editor::message_prelude::*; /// /// #[derive(AsMessage)] /// pub enum TopMessage { @@ -217,7 +217,7 @@ pub fn impl_message(attr: TokenStream, input_item: TokenStream) -> TokenStream { /// # Example /// ``` /// # use graphite_proc_macros::Hint; -/// # use editor_core::misc::derivable_custom_traits::Hint; +/// # use editor::misc::derivable_custom_traits::Hint; /// /// #[derive(Hint)] /// pub enum StateMachine { diff --git a/core/proc-macro/src/transitive_child.rs b/proc-macros/src/transitive_child.rs similarity index 100% rename from core/proc-macro/src/transitive_child.rs rename to proc-macros/src/transitive_child.rs diff --git a/vetur.config.js b/vetur.config.js index ec0697170..23e1b6bee 100644 --- a/vetur.config.js +++ b/vetur.config.js @@ -9,5 +9,5 @@ module.exports = { }, // **optional** default: `[{ root: './' }]` // support monorepos - projects: ['./client/web'] + projects: ['./frontend'] }