mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 18:08:11 +08:00
Rename EditorHandle -> EditorWrapper and organize editor_api.rs (#3925)
* Rename EditorHandle -> EditorWrapper and organize editor_api.rs * pub -> pub(crate)
This commit is contained in:
@@ -4,7 +4,7 @@ import type { Writable } from "svelte/store";
|
||||
import type { IconName } from "/src/icons";
|
||||
import type { SubscriptionsRouter } from "/src/subscriptions-router";
|
||||
import { patchLayout } from "/src/utility-functions/widgets";
|
||||
import type { EditorHandle, Layout } from "/wasm/pkg/graphite_wasm";
|
||||
import type { EditorWrapper, Layout } from "/wasm/pkg/graphite_wasm";
|
||||
|
||||
export type DialogStore = ReturnType<typeof createDialogStore>;
|
||||
|
||||
@@ -35,7 +35,7 @@ const store: Writable<DialogStoreState> = import.meta.hot?.data?.store || writab
|
||||
if (import.meta.hot) import.meta.hot.data.store = store;
|
||||
const { subscribe, update } = store;
|
||||
|
||||
export function createDialogStore(subscriptions: SubscriptionsRouter, editor: EditorHandle) {
|
||||
export function createDialogStore(subscriptions: SubscriptionsRouter, editor: EditorWrapper) {
|
||||
destroyDialogStore();
|
||||
|
||||
subscriptionsRouter = subscriptions;
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Writable } from "svelte/store";
|
||||
import type { SubscriptionsRouter } from "/src/subscriptions-router";
|
||||
import { downloadFile, downloadFileBlob, upload } from "/src/utility-functions/files";
|
||||
import { rasterizeSVG } from "/src/utility-functions/rasterization";
|
||||
import type { EditorHandle, OpenDocument } from "/wasm/pkg/graphite_wasm";
|
||||
import type { EditorWrapper, OpenDocument } from "/wasm/pkg/graphite_wasm";
|
||||
|
||||
export type PortfolioStore = ReturnType<typeof createPortfolioStore>;
|
||||
|
||||
@@ -31,7 +31,7 @@ const store: Writable<PortfolioStoreState> = import.meta.hot?.data?.store || wri
|
||||
if (import.meta.hot) import.meta.hot.data.store = store;
|
||||
const { subscribe, update } = store;
|
||||
|
||||
export function createPortfolioStore(subscriptions: SubscriptionsRouter, editor: EditorHandle) {
|
||||
export function createPortfolioStore(subscriptions: SubscriptionsRouter, editor: EditorWrapper) {
|
||||
destroyPortfolioStore();
|
||||
|
||||
subscriptionsRouter = subscriptions;
|
||||
|
||||
Reference in New Issue
Block a user