UNPKG

@kieler/klighd-core

Version:

Core KLighD diagram visualization with Sprotty

114 lines 5.26 kB
import { Action } from 'sprotty-protocol'; import { DisplayedActionData, LayoutOptionUIData, LayoutOptionValue, PreferenceValue, SynthesisOption, ValuedSynthesisOption } from './option-models'; /** Request message from the server to update the diagram options widget on the client. */ export interface UpdateOptionsAction extends Action { kind: typeof UpdateOptionsAction.KIND; valuedSynthesisOptions: ValuedSynthesisOption[]; layoutOptions: LayoutOptionUIData[]; actions: DisplayedActionData[]; modelUri: string; } export declare namespace UpdateOptionsAction { const KIND = "updateOptions"; function create(valuedSynthesisOptions: ValuedSynthesisOption[], layoutOptions: LayoutOptionUIData[], actions: DisplayedActionData[], modelUri: string): UpdateOptionsAction; function isThisAction(action: Action): action is UpdateOptionsAction; } /** * Triggers a action from the options that should be performed. * Do not confuse this with PerformActionAction! */ export interface PerformOptionsActionAction extends Action { kind: typeof PerformOptionsActionAction.KIND; actionId: string; } export declare namespace PerformOptionsActionAction { const KIND = "performOptionsAction"; function create(actionId: string): PerformOptionsActionAction; function isThisAction(action: Action): action is PerformOptionsActionAction; } /** Change the user preferences stored in the `klighd-core` container. */ export interface SetPreferencesAction extends Action { kind: typeof SetPreferencesAction.KIND; options: PreferenceValue[]; } export declare namespace SetPreferencesAction { const KIND = "setPreferences"; function create(options: PreferenceValue[]): SetPreferencesAction; function isThisAction(action: Action): action is SetPreferencesAction; } /** Resets all render options to default. */ export interface ResetPreferencesAction extends Action { kind: typeof ResetPreferencesAction.KIND; } export declare namespace ResetPreferencesAction { const KIND = "resetPreferences"; function create(): ResetPreferencesAction; function isThisAction(action: Action): action is ResetPreferencesAction; } /** Change the value of one or multiple synthesis options. */ export interface SetSynthesisOptionsAction extends Action { kind: typeof SetSynthesisOptionsAction.KIND; options: SynthesisOption[]; /** Boolean indicating whether the options should be sent to the server. */ sendToServer: boolean; } export declare namespace SetSynthesisOptionsAction { const KIND = "setSynthesisOptions"; function create(options: SynthesisOption[], sendToServer?: boolean): SetSynthesisOptionsAction; function isThisAction(action: Action): action is SetSynthesisOptionsAction; } /** Resets all synthesis options to default for both server and client. */ export interface ResetSynthesisOptionsAction extends Action { kind: typeof ResetSynthesisOptionsAction.KIND; /** Boolean indicating whether the options should be sent to the server. */ sendToServer: boolean; } export declare namespace ResetSynthesisOptionsAction { const KIND = "resetSynthesisOptions"; function create(sendToServer?: boolean): ResetSynthesisOptionsAction; function isThisAction(action: Action): action is ResetSynthesisOptionsAction; } /** Change the value of one or multiple layout options. */ export interface SetLayoutOptionsAction extends Action { kind: typeof SetLayoutOptionsAction.KIND; options: LayoutOptionValue[]; /** Boolean indicating whether the options should be sent to the server. */ sendToServer: boolean; } export declare namespace SetLayoutOptionsAction { const KIND = "setLayoutOptions"; function create(options: LayoutOptionValue[], sendToServer?: boolean): SetLayoutOptionsAction; function isThisAction(action: Action): action is SetLayoutOptionsAction; } /** Resets all layout options to default for both server and client. */ export interface ResetLayoutOptionsAction extends Action { kind: typeof ResetLayoutOptionsAction.KIND; /** Boolean indicating whether the options should be sent to the server. */ sendToServer: boolean; } export declare namespace ResetLayoutOptionsAction { const KIND = "resetLayoutOptions"; function create(sendToServer?: boolean): ResetLayoutOptionsAction; function isThisAction(action: Action): action is ResetLayoutOptionsAction; } /** Change the value of one or multiple render options. */ export interface SetRenderOptionAction extends Action { kind: typeof SetRenderOptionAction.KIND; id: string; value: unknown; } export declare namespace SetRenderOptionAction { const KIND = "setRenderOption"; function create(id: string, value: unknown): SetRenderOptionAction; function isThisAction(action: Action): action is SetRenderOptionAction; } /** Resets all render options to default. */ export interface ResetRenderOptionsAction extends Action { kind: typeof ResetRenderOptionsAction.KIND; } export declare namespace ResetRenderOptionsAction { const KIND = "resetRenderOptions"; function create(): ResetRenderOptionsAction; function isThisAction(action: Action): action is ResetRenderOptionsAction; } //# sourceMappingURL=actions.d.ts.map