mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
* chore: add and configure prettier * chore: remove clang-format * chore: remove clang-format config * chore: lint additional ts files * chore: fix lint errors in blocks * chore: add prettier-ignore where needed * chore: ignore js blocks when formatting * chore: fix playground html syntax * chore: fix yaml spacing from merge * chore: convert text blocks to use arrow functions * chore: format everything with prettier * chore: fix lint unused imports in blocks
73 lines
1.6 KiB
TypeScript
73 lines
1.6 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright 2016 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import * as goog from '../closure/goog/goog.js';
|
|
goog.declareModuleId('Blockly.BlocklyOptions');
|
|
|
|
import type {Theme, ITheme} from './theme.js';
|
|
import type {WorkspaceSvg} from './workspace_svg.js';
|
|
import type {ToolboxDefinition} from './utils/toolbox.js';
|
|
|
|
/**
|
|
* Blockly options.
|
|
*/
|
|
export interface BlocklyOptions {
|
|
collapse?: boolean;
|
|
comments?: boolean;
|
|
css?: boolean;
|
|
disable?: boolean;
|
|
grid?: GridOptions;
|
|
horizontalLayout?: boolean;
|
|
maxBlocks?: number;
|
|
maxInstances?: {[blockType: string]: number};
|
|
media?: string;
|
|
modalInputs?: boolean;
|
|
move?: MoveOptions;
|
|
oneBasedIndex?: boolean;
|
|
readOnly?: boolean;
|
|
renderer?: string;
|
|
rendererOverrides?: {[rendererConstant: string]: any};
|
|
rtl?: boolean;
|
|
scrollbars?: ScrollbarOptions | boolean;
|
|
sounds?: boolean;
|
|
theme?: Theme | string | ITheme;
|
|
toolbox?: string | ToolboxDefinition | Element;
|
|
toolboxPosition?: string;
|
|
trashcan?: boolean;
|
|
maxTrashcanContents?: number;
|
|
plugins?: {[key: string]: (new (...p1: any[]) => any) | string};
|
|
zoom?: ZoomOptions;
|
|
parentWorkspace?: WorkspaceSvg;
|
|
}
|
|
|
|
export interface GridOptions {
|
|
colour?: string;
|
|
length?: number;
|
|
snap?: boolean;
|
|
spacing?: number;
|
|
}
|
|
|
|
export interface MoveOptions {
|
|
drag?: boolean;
|
|
scrollbars?: boolean | ScrollbarOptions;
|
|
wheel?: boolean;
|
|
}
|
|
|
|
export interface ScrollbarOptions {
|
|
horizontal?: boolean;
|
|
vertical?: boolean;
|
|
}
|
|
|
|
export interface ZoomOptions {
|
|
controls?: boolean;
|
|
maxScale?: number;
|
|
minScale?: number;
|
|
pinch?: boolean;
|
|
scaleSpeed?: number;
|
|
startScale?: number;
|
|
wheel?: boolean;
|
|
}
|