mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 19:08:05 +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:
@@ -9,7 +9,7 @@
|
||||
import Welcome from "/src/components/panels/Welcome.svelte";
|
||||
import IconButton from "/src/components/widgets/buttons/IconButton.svelte";
|
||||
import TextLabel from "/src/components/widgets/labels/TextLabel.svelte";
|
||||
import type { EditorHandle } from "/wasm/pkg/graphite_wasm";
|
||||
import type { EditorWrapper } from "/wasm/pkg/graphite_wasm";
|
||||
|
||||
type PanelType = keyof typeof PANEL_COMPONENTS;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
const BUTTON_LEFT = 0;
|
||||
const BUTTON_MIDDLE = 1;
|
||||
|
||||
const editor = getContext<EditorHandle>("editor");
|
||||
const editor = getContext<EditorWrapper>("editor");
|
||||
|
||||
export let tabMinWidths = false;
|
||||
export let tabCloseButtons = false;
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
import type { TooltipStore } from "/src/stores/tooltip";
|
||||
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";
|
||||
import { isPlatformNative } from "/wasm/pkg/graphite_wasm";
|
||||
|
||||
const keyboardLockApiSupported = navigator.keyboard !== undefined && "lock" in navigator.keyboard;
|
||||
|
||||
const editor = getContext<EditorHandle>("editor");
|
||||
const editor = getContext<EditorWrapper>("editor");
|
||||
const subscriptions = getContext<SubscriptionsRouter>("subscriptions");
|
||||
const appWindow = getContext<AppWindowStore>("appWindow");
|
||||
const fullscreen = getContext<FullscreenStore>("fullscreen");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import LayoutRow from "/src/components/layout/LayoutRow.svelte";
|
||||
import Panel from "/src/components/window/Panel.svelte";
|
||||
import type { PortfolioStore } from "/src/stores/portfolio";
|
||||
import type { EditorHandle, OpenDocument } from "/wasm/pkg/graphite_wasm";
|
||||
import type { EditorWrapper, OpenDocument } from "/wasm/pkg/graphite_wasm";
|
||||
|
||||
const MIN_PANEL_SIZE = 100;
|
||||
const PANEL_SIZES = {
|
||||
@@ -38,7 +38,7 @@
|
||||
return { name, unsaved, tooltipLabel: name, tooltipDescription };
|
||||
});
|
||||
|
||||
const editor = getContext<EditorHandle>("editor");
|
||||
const editor = getContext<EditorWrapper>("editor");
|
||||
const portfolio = getContext<PortfolioStore>("portfolio");
|
||||
|
||||
function resizePanel(e: PointerEvent) {
|
||||
|
||||
Reference in New Issue
Block a user