mirror of
https://github.com/google/blockly.git
synced 2026-01-17 13:57:13 +01:00
* chore(deps): Add pretter-plugin-organize-imports * chore: Remove insignificant blank lines in import sections Since prettier-plugin-organize-imports sorts imports within sections separated by blank lines, but preserves the section divisions, remove any blank lines that are not dividing imports into meaningful sections. Do not remove blank lines separating side-effect-only imports from main imports. * chore: Remove unneded eslint-disable directives * chore: Organise imports
40 lines
972 B
TypeScript
40 lines
972 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
// Former goog.module ID: Blockly.thrasos.Renderer
|
|
|
|
import type {BlockSvg} from '../../block_svg.js';
|
|
import * as blockRendering from '../common/block_rendering.js';
|
|
import {Renderer as BaseRenderer} from '../common/renderer.js';
|
|
import {RenderInfo} from './info.js';
|
|
|
|
/**
|
|
* The thrasos renderer. This is a more modern take on the legacy geras
|
|
* renderer.
|
|
*
|
|
* Thrasos is the ancient Greek spirit of boldness.
|
|
*/
|
|
export class Renderer extends BaseRenderer {
|
|
/**
|
|
* @param name The renderer name.
|
|
*/
|
|
constructor(name: string) {
|
|
super(name);
|
|
}
|
|
|
|
/**
|
|
* Create a new instance of the renderer's render info object.
|
|
*
|
|
* @param block The block to measure.
|
|
* @returns The render info object.
|
|
*/
|
|
protected override makeRenderInfo_(block: BlockSvg): RenderInfo {
|
|
return new RenderInfo(this, block);
|
|
}
|
|
}
|
|
|
|
blockRendering.register('thrasos', Renderer);
|