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:
Keavon Chambers
2026-03-21 03:27:57 -07:00
committed by GitHub
parent 9bcac1af2d
commit 087b4cd71f
34 changed files with 352 additions and 358 deletions

View File

@@ -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;

View File

@@ -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");

View File

@@ -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) {