mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 07:18:04 +08:00
Rename /frontend/wasm -> /frontend/wrapper (#3927)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import WidgetSection from "/src/components/widgets/WidgetSection.svelte";
|
||||
import WidgetSpan from "/src/components/widgets/WidgetSpan.svelte";
|
||||
import WidgetTable from "/src/components/widgets/WidgetTable.svelte";
|
||||
import type { Layout, LayoutTarget } from "/wasm/pkg/graphite_wasm";
|
||||
import type { Layout, LayoutTarget } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
export let layout: Layout;
|
||||
export let layoutTarget: LayoutTarget;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import IconButton from "/src/components/widgets/buttons/IconButton.svelte";
|
||||
import TextLabel from "/src/components/widgets/labels/TextLabel.svelte";
|
||||
import WidgetSpan from "/src/components/widgets/WidgetSpan.svelte";
|
||||
import type { EditorWrapper, LayoutTarget, WidgetSection as WidgetSectionData } from "/wasm/pkg/graphite_wasm";
|
||||
import type { EditorWrapper, LayoutTarget, WidgetSection as WidgetSectionData } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
export let widgetData: WidgetSectionData;
|
||||
export let layoutTarget: LayoutTarget;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
import ShortcutLabel from "/src/components/widgets/labels/ShortcutLabel.svelte";
|
||||
import TextLabel from "/src/components/widgets/labels/TextLabel.svelte";
|
||||
import { parseFillChoice } from "/src/utility-functions/colors";
|
||||
import type { EditorWrapper, LayoutTarget, Widget, WidgetInstance } from "/wasm/pkg/graphite_wasm";
|
||||
import type { EditorWrapper, LayoutTarget, Widget, WidgetInstance } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
// Extract the discriminant key names from the Widget tagged enum union (e.g. "TextButton" | "CheckboxInput" | ...)
|
||||
type WidgetKind = Widget extends infer T ? (T extends Record<infer K, unknown> ? K & string : never) : never;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import WidgetSpan from "/src/components/widgets/WidgetSpan.svelte";
|
||||
import type { LayoutTarget, WidgetTable } from "/wasm/pkg/graphite_wasm";
|
||||
import type { LayoutTarget, WidgetTable } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
export let widgetData: WidgetTable;
|
||||
export let layoutTarget: LayoutTarget;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import LayoutRow from "/src/components/layout/LayoutRow.svelte";
|
||||
import TextButton from "/src/components/widgets/buttons/TextButton.svelte";
|
||||
import type { ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
// Content
|
||||
export let labels: string[];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import IconLabel from "/src/components/widgets/labels/IconLabel.svelte";
|
||||
import type { IconName, IconSize } from "/src/icons";
|
||||
import type { ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
// Content
|
||||
export let icon: IconName;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { IMAGE_BASE64_STRINGS } from "/src/utility-functions/images";
|
||||
import type { ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
let className = "";
|
||||
export { className as class };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import LayoutRow from "/src/components/layout/LayoutRow.svelte";
|
||||
import type { FrontendGraphDataType, ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { FrontendGraphDataType, ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
// Content
|
||||
export let exposed: boolean;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import IconLabel from "/src/components/widgets/labels/IconLabel.svelte";
|
||||
import WidgetLayout from "/src/components/widgets/WidgetLayout.svelte";
|
||||
import type { IconName, PopoverButtonStyle } from "/src/icons";
|
||||
import type { MenuDirection, ActionShortcut, Layout, LayoutTarget } from "/wasm/pkg/graphite_wasm";
|
||||
import type { MenuDirection, ActionShortcut, Layout, LayoutTarget } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
export let layoutTarget: LayoutTarget;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import IconLabel from "/src/components/widgets/labels/IconLabel.svelte";
|
||||
import TextLabel from "/src/components/widgets/labels/TextLabel.svelte";
|
||||
import type { IconName } from "/src/icons";
|
||||
import type { MenuListEntry, ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { MenuListEntry, ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const dispatch = createEventDispatcher<{ selectedEntryValuePath: string[] }>();
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import LayoutRow from "/src/components/layout/LayoutRow.svelte";
|
||||
import IconLabel from "/src/components/widgets/labels/IconLabel.svelte";
|
||||
import type { IconName } from "/src/icons";
|
||||
import type { ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const dispatch = createEventDispatcher<{ checked: boolean }>();
|
||||
const backupId = String(Math.random()).substring(2);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import ColorPicker from "/src/components/floating-menus/ColorPicker.svelte";
|
||||
import LayoutCol from "/src/components/layout/LayoutCol.svelte";
|
||||
import { contrastingOutlineFactor, fillChoiceColor, fillChoiceGradientStops, colorToHexOptionalAlpha, gradientToLinearGradientCSS } from "/src/utility-functions/colors";
|
||||
import type { FillChoice, MenuDirection, ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { FillChoice, MenuDirection, ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const dispatch = createEventDispatcher<{ value: FillChoice; startHistoryTransaction: undefined }>();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import LayoutRow from "/src/components/layout/LayoutRow.svelte";
|
||||
import type { Curve, CurveManipulatorGroup, ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { Curve, CurveManipulatorGroup, ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const dispatch = createEventDispatcher<{
|
||||
value: Curve;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import LayoutRow from "/src/components/layout/LayoutRow.svelte";
|
||||
import IconLabel from "/src/components/widgets/labels/IconLabel.svelte";
|
||||
import TextLabel from "/src/components/widgets/labels/TextLabel.svelte";
|
||||
import type { MenuListEntry, ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { MenuListEntry, ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const DASH_ENTRY: MenuListEntry = {
|
||||
value: "",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { preventEscapeClosingParentFloatingMenu } from "/src/components/layout/FloatingMenu.svelte";
|
||||
import LayoutRow from "/src/components/layout/LayoutRow.svelte";
|
||||
import { operatingSystem } from "/src/utility-functions/platform";
|
||||
import type { ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const dispatch = createEventDispatcher<{
|
||||
value: string;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
import FieldInput from "/src/components/widgets/inputs/FieldInput.svelte";
|
||||
import { PRESS_REPEAT_DELAY_MS, PRESS_REPEAT_INTERVAL_MS } from "/src/managers/input";
|
||||
import { browserVersion } from "/src/utility-functions/platform";
|
||||
import { evaluateMathExpression, isPlatformNative } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ActionShortcut, EditorWrapper, NumberInputIncrementBehavior, NumberInputMode } from "/wasm/pkg/graphite_wasm";
|
||||
import { evaluateMathExpression, isPlatformNative } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
import type { ActionShortcut, EditorWrapper, NumberInputIncrementBehavior, NumberInputMode } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const BUTTONS_LEFT = 0b0000_0001;
|
||||
const BUTTONS_RIGHT = 0b0000_0010;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import LayoutRow from "/src/components/layout/LayoutRow.svelte";
|
||||
import IconLabel from "/src/components/widgets/labels/IconLabel.svelte";
|
||||
import TextLabel from "/src/components/widgets/labels/TextLabel.svelte";
|
||||
import type { RadioEntryData } from "/wasm/pkg/graphite_wasm";
|
||||
import type { RadioEntryData } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const dispatch = createEventDispatcher<{ selectedIndex: number }>();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import type { ReferencePoint, ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ReferencePoint, ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const dispatch = createEventDispatcher<{ value: ReferencePoint }>();
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
import LayoutCol from "/src/components/layout/LayoutCol.svelte";
|
||||
import LayoutRow from "/src/components/layout/LayoutRow.svelte";
|
||||
import { colorToHexOptionalAlpha, colorToRgbCSS, gradientFirstColor, gradientLastColor, gradientToLinearGradientCSS } from "/src/utility-functions/colors";
|
||||
import { evaluateGradientAtPosition } from "/wasm/pkg/graphite_wasm";
|
||||
import type { Color, GradientStops } from "/wasm/pkg/graphite_wasm";
|
||||
import { evaluateGradientAtPosition } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
import type { Color, GradientStops } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const BUTTON_LEFT = 0;
|
||||
const BUTTON_RIGHT = 2;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import FieldInput from "/src/components/widgets/inputs/FieldInput.svelte";
|
||||
import type { ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const dispatch = createEventDispatcher<{ commitText: string }>();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import FieldInput from "/src/components/widgets/inputs/FieldInput.svelte";
|
||||
import type { ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const dispatch = createEventDispatcher<{ commitText: string }>();
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import LayoutCol from "/src/components/layout/LayoutCol.svelte";
|
||||
import LayoutRow from "/src/components/layout/LayoutRow.svelte";
|
||||
import { fillChoiceColor, colorToRgbaCSS } from "/src/utility-functions/colors";
|
||||
import type { Color, EditorWrapper } from "/wasm/pkg/graphite_wasm";
|
||||
import type { Color, EditorWrapper } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
const editor = getContext<EditorWrapper>("editor");
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import LayoutRow from "/src/components/layout/LayoutRow.svelte";
|
||||
import { ICONS, ICON_SVG_STRINGS } from "/src/icons";
|
||||
import type { IconName } from "/src/icons";
|
||||
import type { ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
let className = "";
|
||||
export { className as class };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import type { ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
let className = "";
|
||||
export { className as class };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import type { SeparatorDirection, SeparatorStyle } from "/wasm/pkg/graphite_wasm";
|
||||
import type { SeparatorDirection, SeparatorStyle } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
// Content
|
||||
export let direction: SeparatorDirection = "Horizontal";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import TextLabel from "/src/components/widgets/labels/TextLabel.svelte";
|
||||
import type { IconName } from "/src/icons";
|
||||
import { operatingSystem } from "/src/utility-functions/platform";
|
||||
import type { ActionShortcut, Key, LabeledShortcut, MouseMotion } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ActionShortcut, Key, LabeledShortcut, MouseMotion } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
// Content
|
||||
export let shortcut: ActionShortcut;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { onMount, onDestroy } from "svelte";
|
||||
import type { ActionShortcut } from "/wasm/pkg/graphite_wasm";
|
||||
import type { ActionShortcut } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
let className = "";
|
||||
export { className as class };
|
||||
|
||||
Reference in New Issue
Block a user