diff --git a/core/renderers/geras/highlight_constants.js b/core/renderers/geras/highlight_constants.js index 8ed71679acc..23f26d80837 100644 --- a/core/renderers/geras/highlight_constants.js +++ b/core/renderers/geras/highlight_constants.js @@ -127,7 +127,8 @@ class HighlightConstantProvider { 'a', '0 0,0', radius + offset, svgPaths.point(radius + offset, radius + offset)); - const pathBottomLtr = svgPaths.moveBy(distance45outside, -distance45outside) + + const pathBottomLtr = + svgPaths.moveBy(distance45outside, -distance45outside) + svgPaths.arc( 'a', '0 0,0', radius + offset, svgPaths.point( @@ -205,11 +206,12 @@ class HighlightConstantProvider { const width = this.constantProvider.TAB_WIDTH; const height = this.constantProvider.TAB_HEIGHT; - // This is how much of the vertical block edge is actually drawn by the puzzle - // tab. + // This is how much of the vertical block edge is actually drawn by the + // puzzle tab. const verticalOverlap = 2.5; - const highlightRtlUp = svgPaths.moveBy(-2, -height + verticalOverlap + 0.9) + + const highlightRtlUp = + svgPaths.moveBy(-2, -height + verticalOverlap + 0.9) + svgPaths.lineTo(width * -0.45, -2.1); const highlightRtlDown = svgPaths.lineOnAxis('v', verticalOverlap) + @@ -226,7 +228,8 @@ class HighlightConstantProvider { const highlightLtrUp = svgPaths.lineOnAxis('v', -1.5) + svgPaths.moveBy(width * -0.92, -0.5) + svgPaths.curve( - 'q', [svgPaths.point(width * -0.19, -5.5), svgPaths.point(0, -11)]) + + 'q', + [svgPaths.point(width * -0.19, -5.5), svgPaths.point(0, -11)]) + svgPaths.moveBy(width * 0.92, 1); const highlightLtrDown = diff --git a/core/renderers/geras/highlighter.js b/core/renderers/geras/highlighter.js index c0fbf74b782..c81beb0779b 100644 --- a/core/renderers/geras/highlighter.js +++ b/core/renderers/geras/highlighter.js @@ -115,9 +115,10 @@ class Highlighter { } else if (Types.isHat(elem)) { this.steps_ += this.startPaths_.path(this.RTL_); } else if (Types.isSpacer(elem) && elem.width !== 0) { - // The end point of the spacer needs to be offset by the highlight amount. - // So instead of using the spacer's width for a relative horizontal, use - // its width and position for an absolute horizontal move. + // The end point of the spacer needs to be offset by the highlight + // amount. So instead of using the spacer's width for a relative + // horizontal, use its width and position for an absolute horizontal + // move. this.steps_ += svgPaths.lineOnAxis( 'H', elem.xPos + elem.width - this.highlightOffset_); } @@ -252,7 +253,8 @@ class Highlighter { if (!this.RTL_) { const topRow = this.info_.topRow; if (Types.isLeftRoundedCorner(topRow.elements[0])) { - this.steps_ += svgPaths.lineOnAxis('V', this.outsideCornerPaths_.height); + this.steps_ += + svgPaths.lineOnAxis('V', this.outsideCornerPaths_.height); } else { this.steps_ += svgPaths.lineOnAxis('V', topRow.capline + this.highlightOffset_); diff --git a/core/renderers/geras/info.js b/core/renderers/geras/info.js index d7a2b8f6d5f..d8e45c27194 100644 --- a/core/renderers/geras/info.js +++ b/core/renderers/geras/info.js @@ -74,8 +74,8 @@ class RenderInfo extends BaseRenderInfo { // The minimum height of the bottom row is smaller in Geras than in other // renderers, because the dark path adds a pixel. - // If one of the row's elements has a greater height this will be overwritten - // in the compute pass. + // If one of the row's elements has a greater height this will be + // overwritten in the compute pass. if (!followsStatement) { this.bottomRow.minHeight = this.constants_.MEDIUM_PADDING - this.constants_.DARK_PATH_OFFSET; @@ -97,8 +97,8 @@ class RenderInfo extends BaseRenderInfo { activeRow.elements.push(new ExternalValueInput(this.constants_, input)); activeRow.hasExternalInput = true; } else if (input.type === inputTypes.DUMMY) { - // Dummy inputs have no visual representation, but the information is still - // important. + // Dummy inputs have no visual representation, but the information is + // still important. activeRow.minHeight = Math.max(activeRow.minHeight, this.constants_.DUMMY_INPUT_MIN_HEIGHT); activeRow.hasDummyInput = true; @@ -138,7 +138,8 @@ class RenderInfo extends BaseRenderInfo { } row.elements.push(oldElems[oldElems.length - 1]); if (row.endsWithElemSpacer()) { - let spacing = this.getInRowSpacing_(oldElems[oldElems.length - 1], null); + let spacing = + this.getInRowSpacing_(oldElems[oldElems.length - 1], null); if (hasExternalInputs && row.hasDummyInput) { spacing += this.constants_.TAB_WIDTH; } @@ -182,7 +183,8 @@ class RenderInfo extends BaseRenderInfo { if (Types.isHat(prev)) { return this.constants_.NO_PADDING; } - // Establish a minimum width for a block with a previous or next connection. + // Establish a minimum width for a block with a previous or next + // connection. if (Types.isPreviousOrNextConnection(prev)) { return this.constants_.LARGE_PADDING; } @@ -255,9 +257,11 @@ class RenderInfo extends BaseRenderInfo { if (Types.isPreviousConnection(next)) { return next.notchOffset; } else if (Types.isNextConnection(next)) { - // Next connections are shifted slightly to the left (in both LTR and RTL) - // to make the dark path under the previous connection show through. - const offset = (this.RTL ? 1 : -1) * this.constants_.DARK_PATH_OFFSET / 2; + // Next connections are shifted slightly to the left (in both LTR and + // RTL) to make the dark path under the previous connection show + // through. + const offset = + (this.RTL ? 1 : -1) * this.constants_.DARK_PATH_OFFSET / 2; return next.notchOffset + offset; } } @@ -267,9 +271,11 @@ class RenderInfo extends BaseRenderInfo { if (Types.isPreviousConnection(next)) { return next.notchOffset - this.constants_.CORNER_RADIUS; } else if (Types.isNextConnection(next)) { - // Next connections are shifted slightly to the left (in both LTR and RTL) - // to make the dark path under the previous connection show through. - const offset = (this.RTL ? 1 : -1) * this.constants_.DARK_PATH_OFFSET / 2; + // Next connections are shifted slightly to the left (in both LTR and + // RTL) to make the dark path under the previous connection show + // through. + const offset = + (this.RTL ? 1 : -1) * this.constants_.DARK_PATH_OFFSET / 2; return next.notchOffset - this.constants_.CORNER_RADIUS + offset; } } @@ -344,7 +350,8 @@ class RenderInfo extends BaseRenderInfo { if (Types.isField(elem) || Types.isIcon(elem)) { result += (elem.height / 2); if ((row.hasInlineInput || row.hasStatement) && - elem.height + this.constants_.TALL_INPUT_FIELD_OFFSET_Y <= row.height) { + elem.height + this.constants_.TALL_INPUT_FIELD_OFFSET_Y <= + row.height) { result += this.constants_.TALL_INPUT_FIELD_OFFSET_Y; } } else if (Types.isInlineInput(elem)) { @@ -375,7 +382,8 @@ class RenderInfo extends BaseRenderInfo { this.alignStatementRow_( /** @type {!InputRow} */ (row)); } - if (prevInput && prevInput.hasStatement && row.width < prevInput.width) { + if (prevInput && prevInput.hasStatement && + row.width < prevInput.width) { row.nextRightEdge = prevInput.width; } else { nextRightEdge = row.width; @@ -410,7 +418,8 @@ class RenderInfo extends BaseRenderInfo { getDesiredRowWidth_(row) { // Limit the width of a statement row when a block is inline. if (this.isInline && row.hasStatement) { - return this.statementEdge + this.constants_.MAX_BOTTOM_WIDTH + this.startX; + return this.statementEdge + this.constants_.MAX_BOTTOM_WIDTH + + this.startX; } return super.getDesiredRowWidth_(row); } diff --git a/core/renderers/geras/renderer.js b/core/renderers/geras/renderer.js index fdd0a8ce4b2..a4b8ef0cb96 100644 --- a/core/renderers/geras/renderer.js +++ b/core/renderers/geras/renderer.js @@ -134,8 +134,8 @@ class Renderer extends BaseRenderer { } /** - * Get the renderer's highlight constant provider. We assume that when this is - * called, the renderer has already been initialized. + * Get the renderer's highlight constant provider. We assume that when this + * is called, the renderer has already been initialized. * @return {!HighlightConstantProvider} The highlight constant * provider. * @package diff --git a/core/renderers/thrasos/info.js b/core/renderers/thrasos/info.js index 584fecd9553..cf894842eea 100644 --- a/core/renderers/thrasos/info.js +++ b/core/renderers/thrasos/info.js @@ -85,7 +85,8 @@ class RenderInfo extends BaseRenderInfo { } row.elements.push(oldElems[oldElems.length - 1]); if (row.endsWithElemSpacer()) { - let spacing = this.getInRowSpacing_(oldElems[oldElems.length - 1], null); + let spacing = + this.getInRowSpacing_(oldElems[oldElems.length - 1], null); if (hasExternalInputs && row.hasDummyInput) { spacing += this.constants_.TAB_WIDTH; } @@ -129,7 +130,8 @@ class RenderInfo extends BaseRenderInfo { if (Types.isHat(prev)) { return this.constants_.NO_PADDING; } - // Establish a minimum width for a block with a previous or next connection. + // Establish a minimum width for a block with a previous or next + // connection. if (Types.isPreviousOrNextConnection(prev)) { return this.constants_.LARGE_PADDING; } @@ -274,7 +276,8 @@ class RenderInfo extends BaseRenderInfo { let result = row.yPos; if (Types.isField(elem) && row.hasStatement) { - const offset = this.constants_.TALL_INPUT_FIELD_OFFSET_Y + elem.height / 2; + const offset = + this.constants_.TALL_INPUT_FIELD_OFFSET_Y + elem.height / 2; result += offset; } else { result += (row.height / 2); diff --git a/core/renderers/zelos/constants.js b/core/renderers/zelos/constants.js index 8caec78d802..7eb47068db1 100644 --- a/core/renderers/zelos/constants.js +++ b/core/renderers/zelos/constants.js @@ -372,8 +372,8 @@ class ConstantProvider extends BaseConstantProvider { this.selectedGlowFilter_ = null; /** - * The ID of the replacement glow filter, or the empty string if no filter is - * set. + * The ID of the replacement glow filter, or the empty string if no filter + * is set. * @type {string} * @package */ @@ -440,7 +440,8 @@ class ConstantProvider extends BaseConstantProvider { this.SELECTED_GLOW_COLOUR = theme.getComponentStyle('selectedGlowColour') || this.SELECTED_GLOW_COLOUR; - const selectedGlowSize = Number(theme.getComponentStyle('selectedGlowSize')); + const selectedGlowSize = + Number(theme.getComponentStyle('selectedGlowSize')); this.SELECTED_GLOW_SIZE = selectedGlowSize && !isNaN(selectedGlowSize) ? selectedGlowSize : this.SELECTED_GLOW_SIZE; @@ -494,10 +495,10 @@ class ConstantProvider extends BaseConstantProvider { /** * Make the main path for the hexagonal connection shape out of two lines. - * The lines are defined with relative positions and require the block height. - * The 'up' and 'down' versions of the paths are the same, but the Y sign - * flips. The 'left' and 'right' versions of the path are also the same, but - * the X sign flips. + * The lines are defined with relative positions and require the block + * height. The 'up' and 'down' versions of the paths are the same, but the Y + * sign flips. The 'left' and 'right' versions of the path are also the + * same, but the X sign flips. * @param {number} height The height of the block the connection is on. * @param {boolean} up True if the path should be drawn from bottom to top, * false otherwise. @@ -559,12 +560,11 @@ class ConstantProvider extends BaseConstantProvider { /** * Make the main path for the rounded connection shape out of two arcs and * a line that joins them. The arcs are defined with relative positions. - * Usually, the height of the block is split between the two arcs. In the case - * where the height of the block exceeds the maximum height, a line is drawn - * in between the two arcs. - * The 'up' and 'down' versions of the paths are the same, but the Y sign - * flips. The 'up' and 'right' versions of the path flip the sweep-flag - * which moves the arc at negative angles. + * Usually, the height of the block is split between the two arcs. In the + * case where the height of the block exceeds the maximum height, a line is + * drawn in between the two arcs. The 'up' and 'down' versions of the paths + * are the same, but the Y sign flips. The 'up' and 'right' versions of the + * path flip the sweep-flag which moves the arc at negative angles. * @param {number} blockHeight The height of the block the connection is on. * @param {boolean} up True if the path should be drawn from bottom to top, * false otherwise. @@ -579,7 +579,8 @@ class ConstantProvider extends BaseConstantProvider { const radius = height / 2; return svgPaths.arc( 'a', '0 0,1', radius, - svgPaths.point((up ? -1 : 1) * radius, (up ? -1 : 1) * radius)) + + svgPaths.point( + (up ? -1 : 1) * radius, (up ? -1 : 1) * radius)) + svgPaths.lineOnAxis('v', (right ? 1 : -1) * remainingHeight) + svgPaths.arc( 'a', '0 0,1', radius, @@ -631,8 +632,8 @@ class ConstantProvider extends BaseConstantProvider { * and a single line in-between (a and v). These are defined in relative * positions and require the height of the block. * The 'left' and 'right' versions of the paths are the same, but the Y sign - * flips. The 'up' and 'down' versions of the path determine where the corner - * point is placed and in turn the direction of the corners. + * flips. The 'up' and 'down' versions of the path determine where the + * corner point is placed and in turn the direction of the corners. * @param {number} height The height of the block the connection is on. * @param {boolean} up True if the path should be drawn from bottom to top, * false otherwise. @@ -644,7 +645,8 @@ class ConstantProvider extends BaseConstantProvider { const innerHeight = height - radius * 2; return svgPaths.arc( 'a', '0 0,1', radius, - svgPaths.point((up ? -1 : 1) * radius, (up ? -1 : 1) * radius)) + + svgPaths.point( + (up ? -1 : 1) * radius, (up ? -1 : 1) * radius)) + svgPaths.lineOnAxis('v', (right ? 1 : -1) * innerHeight) + svgPaths.arc( 'a', '0 0,1', radius, @@ -965,13 +967,14 @@ class ConstantProvider extends BaseConstantProvider { selector + ' .blocklyDraggable:not(.blocklyDisabled)', ' .blocklyEditableText:not(.editing):hover>rect,', selector + ' .blocklyDraggable:not(.blocklyDisabled)', - ' .blocklyEditableText:not(.editing):hover>.blocklyPath {', 'stroke: #fff;', - 'stroke-width: 2;', '}', + ' .blocklyEditableText:not(.editing):hover>.blocklyPath {', + 'stroke: #fff;', 'stroke-width: 2;', '}', // Text field input. selector + ' .blocklyHtmlInput {', 'font-family: ' + this.FIELD_TEXT_FONTFAMILY + ';', - 'font-weight: ' + this.FIELD_TEXT_FONTWEIGHT + ';', 'color: #575E75;', '}', + 'font-weight: ' + this.FIELD_TEXT_FONTWEIGHT + ';', 'color: #575E75;', + '}', // Dropdown field. selector + ' .blocklyDropdownText {', 'fill: #fff !important;', '}', diff --git a/core/renderers/zelos/drawer.js b/core/renderers/zelos/drawer.js index 19301997ee9..9c9f7917eb8 100644 --- a/core/renderers/zelos/drawer.js +++ b/core/renderers/zelos/drawer.js @@ -115,9 +115,9 @@ class Drawer extends BaseDrawer { const cornerHeight = this.constants_.INSIDE_CORNERS.rightHeight; const remainingHeight = row.height - (row.precedesStatement ? cornerHeight : 0); - this.outlinePath_ += - (row.followsStatement ? this.constants_.INSIDE_CORNERS.pathBottomRight : - '') + + this.outlinePath_ += (row.followsStatement ? + this.constants_.INSIDE_CORNERS.pathBottomRight : + '') + (remainingHeight > 0 ? svgPaths.lineOnAxis('V', row.yPos + remainingHeight) : '') + @@ -198,7 +198,8 @@ class Drawer extends BaseDrawer { const outlinePath = svgPaths.moveTo(connectionRight, yPos) + svgPaths.lineOnAxis('h', width) + input.shape.pathRightDown(input.height) + - svgPaths.lineOnAxis('h', -width) + input.shape.pathUp(input.height) + 'z'; + svgPaths.lineOnAxis('h', -width) + input.shape.pathUp(input.height) + + 'z'; this.block_.pathObject.setOutlinePath(inputName, outlinePath); } @@ -215,7 +216,8 @@ class Drawer extends BaseDrawer { 'h', -(input.notchOffset - this.constants_.INSIDE_CORNERS.width)) + this.constants_.INSIDE_CORNERS.pathTop; - const innerHeight = row.height - (2 * this.constants_.INSIDE_CORNERS.height); + const innerHeight = + row.height - (2 * this.constants_.INSIDE_CORNERS.height); const innerBottomLeftCorner = this.constants_.INSIDE_CORNERS.pathBottom + svgPaths.lineOnAxis( diff --git a/core/renderers/zelos/info.js b/core/renderers/zelos/info.js index 4ca0666acfc..58802a9090e 100644 --- a/core/renderers/zelos/info.js +++ b/core/renderers/zelos/info.js @@ -76,8 +76,8 @@ class RenderInfo extends BaseRenderInfo { this.isInline = true; /** - * Whether the block should be rendered as a multi-line block, either because - * it's not inline or because it has been collapsed. + * Whether the block should be rendered as a multi-line block, either + * because it's not inline or because it has been collapsed. * @type {boolean} */ this.isMultiRow = !block.getInputsInline() || block.isCollapsed(); @@ -92,8 +92,9 @@ class RenderInfo extends BaseRenderInfo { * An object with rendering information about the right connection shape. * @type {RightConnectionShape} */ - this.rightSide = - this.outputConnection ? new RightConnectionShape(this.constants_) : null; + this.rightSide = this.outputConnection ? + new RightConnectionShape(this.constants_) : + null; } /** @@ -260,9 +261,9 @@ class RenderInfo extends BaseRenderInfo { * @override */ addInput_(input, activeRow) { - // If we have two dummy inputs on the same row, one aligned left and the other - // right, keep track of the right aligned dummy input so we can add padding - // later. + // If we have two dummy inputs on the same row, one aligned left and the + // other right, keep track of the right aligned dummy input so we can add + // padding later. if (input.type === inputTypes.DUMMY && activeRow.hasDummyInput && activeRow.align === Align.LEFT && input.align === Align.RIGHT) { activeRow.rightAlignedDummyInput = input; @@ -305,9 +306,9 @@ class RenderInfo extends BaseRenderInfo { } /** - * Adjust the x position of fields to bump all non-label fields in the first row - * past the notch position. This must be called before ``computeBounds`` is - * called. + * Adjust the x position of fields to bump all non-label fields in the first + * row past the notch position. This must be called before ``computeBounds`` + * is called. * @protected */ adjustXPosition_() { @@ -315,8 +316,8 @@ class RenderInfo extends BaseRenderInfo { this.constants_.NOTCH_OFFSET_LEFT + this.constants_.NOTCH_WIDTH; let minXPos = notchTotalWidth; // Run through every input row on the block and only apply bump logic to the - // first input row (if the block has prev connection) and every input row that - // has a prev and next notch. + // first input row (if the block has prev connection) and every input row + // that has a prev and next notch. for (let i = 2; i < this.rows.length - 1; i += 2) { const prevSpacer = this.rows[i - 1]; const row = this.rows[i]; @@ -497,7 +498,8 @@ class RenderInfo extends BaseRenderInfo { elem.shape.type; // Special case for value to stack / value to statement blocks. if (connectedBlock && connectedBlock.outputConnection && - (connectedBlock.statementInputCount || connectedBlock.nextConnection)) { + (connectedBlock.statementInputCount || + connectedBlock.nextConnection)) { return 0; } // Special case for hexagonal output. @@ -531,8 +533,8 @@ class RenderInfo extends BaseRenderInfo { if (this.outputConnection) { return; } - // Run through every input row on the block and only apply tight nesting logic - // to input rows that have a prev and next notch. + // Run through every input row on the block and only apply tight nesting + // logic to input rows that have a prev and next notch. for (let i = 2; i < this.rows.length - 1; i += 2) { const prevSpacer = this.rows[i - 1]; const row = this.rows[i]; diff --git a/core/renderers/zelos/marker_svg.js b/core/renderers/zelos/marker_svg.js index 6e84d6831d5..30019063ce2 100644 --- a/core/renderers/zelos/marker_svg.js +++ b/core/renderers/zelos/marker_svg.js @@ -93,7 +93,8 @@ class MarkerSvg extends BaseMarkerSvg { // Gets the height and width of entire stack. const heightWidth = block.getHeightWidth(); - // Add padding so that being on a stack looks different than being on a block. + // Add padding so that being on a stack looks different than being on a + // block. this.positionRect_(0, 0, heightWidth.width, heightWidth.height); this.setParent_(block); this.showCurrent_(); diff --git a/core/renderers/zelos/path_object.js b/core/renderers/zelos/path_object.js index f3c79ec9509..84131e166a1 100644 --- a/core/renderers/zelos/path_object.js +++ b/core/renderers/zelos/path_object.js @@ -73,8 +73,8 @@ class PathObject extends BasePathObject { this.remainingOutlines_ = null; /** - * The type of block's output connection shape. This is set when a block with - * an output connection is drawn. + * The type of block's output connection shape. This is set when a block + * with an output connection is drawn. * @package */ this.outputShapeType = null; @@ -97,7 +97,8 @@ class PathObject extends BasePathObject { super.applyColour(block); // Set shadow stroke colour. if (block.isShadow() && block.getParent()) { - this.svgPath.setAttribute('stroke', block.getParent().style.colourTertiary); + this.svgPath.setAttribute( + 'stroke', block.getParent().style.colourTertiary); } // Apply colour to outlines. @@ -198,8 +199,8 @@ class PathObject extends BasePathObject { } /** - * Set the path generated by the renderer for an outline path on the respective - * outline path SVG element. + * Set the path generated by the renderer for an outline path on the + * respective outline path SVG element. * @param {string} name The input name. * @param {string} pathString The path. * @package diff --git a/core/renderers/zelos/renderer.js b/core/renderers/zelos/renderer.js index 75ff4e24cf6..d18962bb83e 100644 --- a/core/renderers/zelos/renderer.js +++ b/core/renderers/zelos/renderer.js @@ -125,8 +125,7 @@ class Renderer extends BaseRenderer { /** * @override */ - getConnectionPreviewMethod( - closest, local, topBlock) { + getConnectionPreviewMethod(closest, local, topBlock) { if (local.type === ConnectionType.OUTPUT_VALUE) { if (!closest.isConnected()) { return InsertionMarkerManager.PREVIEW_TYPE.INPUT_OUTLINE; @@ -139,8 +138,7 @@ class Renderer extends BaseRenderer { return InsertionMarkerManager.PREVIEW_TYPE.REPLACEMENT_FADE; } - return super.getConnectionPreviewMethod( - closest, local, topBlock); + return super.getConnectionPreviewMethod(closest, local, topBlock); } } diff --git a/scripts/gulpfiles/chunks.json b/scripts/gulpfiles/chunks.json index a7fcc3cbfa8..c3df5c6120a 100644 --- a/scripts/gulpfiles/chunks.json +++ b/scripts/gulpfiles/chunks.json @@ -52,8 +52,8 @@ "./core/renderers/geras/measurables/statement_input.js", "./core/renderers/geras/path_object.js", "./core/renderers/geras/renderer.js", - "./core/renderers/geras/measurables/inline_input.js", "./core/renderers/geras/info.js", + "./core/renderers/geras/measurables/inline_input.js", "./core/renderers/geras/highlight_constants.js", "./core/renderers/geras/highlighter.js", "./core/renderers/geras/drawer.js", diff --git a/scripts/tsickle_runner.ts b/scripts/tsickle_runner.ts new file mode 100644 index 00000000000..6cbfa69e8b4 --- /dev/null +++ b/scripts/tsickle_runner.ts @@ -0,0 +1,243 @@ +#!/usr/bin/env node + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import * as fs from 'fs'; +import * as minimist from 'minimist'; +import * as path from 'path'; +import * as ts from 'typescript'; +import * as tsickle from 'tsickle'; + +/** Tsickle settings passed on the command line. */ +export interface Settings { + /** If provided, path to save externs to. */ + externsPath?: string; + + /** If provided, attempt to provide types rather than {?}. */ + isTyped?: boolean; + + /** If true, log internal debug warnings to the console. */ + verbose?: boolean; + + /** If true, warnings cause a non-zero exit code. */ + fatalWarnings?: boolean; +} + +function usage() { + console.error(`usage: tsickle [tsickle options] -- [tsc options] + +example: + tsickle --externs=foo/externs.js -- -p src --noImplicitAny + +tsickle flags are: + --externs=PATH save generated Closure externs.js to PATH + --typed [experimental] attempt to provide Closure types instead of {?} + --fatalWarnings whether warnings should be fatal, and cause tsickle to return a non-zero exit code +`); +} + +/** + * Parses the command-line arguments, extracting the tsickle settings and + * the arguments to pass on to tsc. + */ +function loadSettingsFromArgs(args: string[]): + {settings: Settings, tscArgs: string[]} { + const settings: Settings = {}; + const parsedArgs = minimist(args); + for (const flag of Object.keys(parsedArgs)) { + switch (flag) { + case 'h': + case 'help': + usage(); + process.exit(0); + break; + case 'externs': + settings.externsPath = parsedArgs[flag]; + break; + case 'typed': + settings.isTyped = true; + break; + case 'verbose': + settings.verbose = true; + break; + case 'fatalWarnings': + settings.fatalWarnings = true; + break; + case '_': + // This is part of the minimist API, and holds args after the '--'. + break; + default: + console.error(`unknown flag '--${flag}'`); + usage(); + process.exit(1); + } + } + // Arguments after the '--' arg are arguments to tsc. + const tscArgs = parsedArgs['_']; + return {settings, tscArgs}; +} + +/** + * Determine the lowest-level common parent directory of the given list of + * files. + */ +export function getCommonParentDirectory(fileNames: string[]): string { + const pathSplitter = /[\/\\]+/; + const commonParent = fileNames[0].split(pathSplitter); + for (let i = 1; i < fileNames.length; i++) { + const thisPath = fileNames[i].split(pathSplitter); + let j = 0; + while (thisPath[j] === commonParent[j]) { + j++; + } + commonParent.length = j; // Truncate without copying the array + } + if (commonParent.length === 0) { + return '/'; + } else { + return commonParent.join(path.sep); + } +} + +/** + * Loads the tsconfig.json from a directory. + * + * TODO(martinprobst): use ts.findConfigFile to match tsc behaviour. + * + * @param args tsc command-line arguments. + */ +function loadTscConfig(args: string[]): { + options: ts.CompilerOptions, + fileNames: string[], + errors: ts.Diagnostic[] +} { + // Gather tsc options/input files from command line. + let {options, fileNames, errors} = ts.parseCommandLine(args); + if (errors.length > 0) { + return {options: {}, fileNames: [], errors}; + } + + // Store file arguments + const tsFileArguments = fileNames; + + // Read further settings from tsconfig.json. + const projectDir = options.project || '.'; + const configFileName = path.join(projectDir, 'tsconfig.json'); + const {config: json, error} = + ts.readConfigFile(configFileName, path => fs.readFileSync(path, 'utf-8')); + if (error) { + return {options: {}, fileNames: [], errors: [error]}; + } + ({options, fileNames, errors} = ts.parseJsonConfigFileContent( + json, ts.sys, projectDir, options, configFileName)); + if (errors.length > 0) { + return {options: {}, fileNames: [], errors}; + } + + // if file arguments were given to the typescript transpiler then transpile + // only those files + fileNames = tsFileArguments.length > 0 ? tsFileArguments : fileNames; + + return {options, fileNames, errors: []}; +} + +/** + * Compiles TypeScript code into Closure-compiler-ready JS. + */ +export function toClosureJS( + options: ts.CompilerOptions, fileNames: string[], settings: Settings, + writeFile: ts.WriteFileCallback): tsickle.EmitResult { + // Use absolute paths to determine what files to process since files may be + // imported using relative or absolute paths + const absoluteFileNames = fileNames.map(i => path.resolve(i)); + + const compilerHost = ts.createCompilerHost(options); + const program = ts.createProgram(absoluteFileNames, options, compilerHost); + const filesToProcess = new Set(absoluteFileNames); + const rootModulePath = + options.rootDir || getCommonParentDirectory(absoluteFileNames); + const transformerHost: tsickle.TsickleHost = { + rootDirsRelative: (f: string) => f, + shouldSkipTsickleProcessing: (fileName: string) => { + return !filesToProcess.has(path.resolve(fileName)); + }, + shouldIgnoreWarningsForPath: (fileName: string) => !settings.fatalWarnings, + pathToModuleName: (context, fileName) => + tsickle.pathToModuleName(rootModulePath, context, fileName), + fileNameToModuleId: (fileName) => path.relative(rootModulePath, fileName), + es5Mode: true, + googmodule: true, + transformDecorators: true, + transformTypesToClosure: true, + typeBlackListPaths: new Set(), + untyped: false, + logWarning: (warning) => + console.error(ts.formatDiagnostics([warning], compilerHost)), + options, + moduleResolutionHost: compilerHost, + }; + const diagnostics = ts.getPreEmitDiagnostics(program); + if (diagnostics.length > 0) { + return { + tsMigrationExportsShimFiles: new Map(), + diagnostics, + modulesManifest: new tsickle.ModulesManifest(), + externs: {}, + emitSkipped: true, + emittedFiles: [], + }; + } + return tsickle.emit(program, transformerHost, writeFile); +} + +function main(args: string[]): number { + const {settings, tscArgs} = loadSettingsFromArgs(args); + const config = loadTscConfig(tscArgs); + if (config.errors.length) { + console.error(ts.formatDiagnostics( + config.errors, ts.createCompilerHost(config.options))); + return 1; + } + + if (config.options.module !== ts.ModuleKind.CommonJS) { + // This is not an upstream TypeScript diagnostic, therefore it does not go + // through the diagnostics array mechanism. + console.error( + 'tsickle converts TypeScript modules to Closure modules via CommonJS internally. ' + + 'Set tsconfig.js "module": "commonjs"'); + return 1; + } + + // Run tsickle+TSC to convert inputs to Closure JS files. + const result = toClosureJS( + config.options, config.fileNames, settings, + (filePath: string, contents: string) => { + fs.mkdirSync(path.dirname(filePath), {recursive: true}); + fs.writeFileSync(filePath, contents, {encoding: 'utf-8'}); + }); + if (result.diagnostics.length) { + console.error(ts.formatDiagnostics( + result.diagnostics, ts.createCompilerHost(config.options))); + return 1; + } + + if (settings.externsPath) { + fs.mkdirSync(path.dirname(settings.externsPath), {recursive: true}); + fs.writeFileSync( + settings.externsPath, + tsickle.getGeneratedExterns( + result.externs, config.options.rootDir || '')); + } + return 0; +} + +// CLI entry point +if (require.main === module) { + process.exit(main(process.argv.splice(2))); +} diff --git a/tests/deps.js b/tests/deps.js index ab5c3206453..d244eaf4737 100644 --- a/tests/deps.js +++ b/tests/deps.js @@ -150,16 +150,16 @@ goog.addDependency('../../core/renderers/common/info.js', ['Blockly.blockRenderi goog.addDependency('../../core/renderers/common/marker_svg.js', ['Blockly.blockRendering.MarkerSvg'], ['Blockly.ASTNode', 'Blockly.ConnectionType', 'Blockly.Events.MarkerMove', 'Blockly.Events.utils', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.svgPaths'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/common/path_object.js', ['Blockly.blockRendering.PathObject'], ['Blockly.blockRendering.IPathObject', 'Blockly.utils.Svg', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/common/renderer.js', ['Blockly.blockRendering.Renderer'], ['Blockly.Connection', 'Blockly.ConnectionType', 'Blockly.IRegistrable', 'Blockly.InsertionMarkerManager', 'Blockly.blockRendering.ConstantProvider', 'Blockly.blockRendering.Drawer', 'Blockly.blockRendering.MarkerSvg', 'Blockly.blockRendering.PathObject', 'Blockly.blockRendering.RenderInfo', 'Blockly.blockRendering.debug', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/geras/constants.js', ['Blockly.geras.ConstantProvider'], ['Blockly.blockRendering.ConstantProvider', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/geras/drawer.js', ['Blockly.geras.Drawer'], ['Blockly.blockRendering.Drawer', 'Blockly.blockRendering.debug', 'Blockly.geras.Highlighter', 'Blockly.utils.object', 'Blockly.utils.svgPaths'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/geras/constants.js', ['Blockly.geras.ConstantProvider'], ['Blockly.blockRendering.ConstantProvider'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/geras/drawer.js', ['Blockly.geras.Drawer'], ['Blockly.blockRendering.Drawer', 'Blockly.blockRendering.debug', 'Blockly.geras.Highlighter', 'Blockly.geras.InlineInput', 'Blockly.utils.svgPaths'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/geras/geras.js', ['Blockly.geras'], ['Blockly.geras.ConstantProvider', 'Blockly.geras.Drawer', 'Blockly.geras.HighlightConstantProvider', 'Blockly.geras.Highlighter', 'Blockly.geras.InlineInput', 'Blockly.geras.PathObject', 'Blockly.geras.RenderInfo', 'Blockly.geras.Renderer', 'Blockly.geras.StatementInput'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/geras/highlight_constants.js', ['Blockly.geras.HighlightConstantProvider'], ['Blockly.utils.svgPaths'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/geras/highlighter.js', ['Blockly.geras.Highlighter'], ['Blockly.blockRendering.Types', 'Blockly.utils.svgPaths'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/geras/info.js', ['Blockly.geras.RenderInfo'], ['Blockly.blockRendering.ExternalValueInput', 'Blockly.blockRendering.InRowSpacer', 'Blockly.blockRendering.RenderInfo', 'Blockly.blockRendering.Types', 'Blockly.geras.InlineInput', 'Blockly.geras.StatementInput', 'Blockly.inputTypes', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/geras/measurables/inline_input.js', ['Blockly.geras.InlineInput'], ['Blockly.blockRendering.InlineInput', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/geras/measurables/statement_input.js', ['Blockly.geras.StatementInput'], ['Blockly.blockRendering.StatementInput', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/geras/highlighter.js', ['Blockly.geras.Highlighter'], ['Blockly.blockRendering.BottomRow', 'Blockly.blockRendering.TopRow', 'Blockly.blockRendering.Types', 'Blockly.geras.InlineInput', 'Blockly.utils.svgPaths'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/geras/info.js', ['Blockly.geras.RenderInfo'], ['Blockly.blockRendering.ExternalValueInput', 'Blockly.blockRendering.InRowSpacer', 'Blockly.blockRendering.RenderInfo', 'Blockly.blockRendering.Types', 'Blockly.geras.InlineInput', 'Blockly.geras.StatementInput', 'Blockly.inputTypes'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/geras/measurables/inline_input.js', ['Blockly.geras.InlineInput'], ['Blockly.blockRendering.InlineInput'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/geras/measurables/statement_input.js', ['Blockly.geras.StatementInput'], ['Blockly.blockRendering.StatementInput'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/geras/path_object.js', ['Blockly.geras.PathObject'], ['Blockly.blockRendering.PathObject', 'Blockly.utils.Svg', 'Blockly.utils.colour', 'Blockly.utils.dom', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/geras/renderer.js', ['Blockly.geras.Renderer'], ['Blockly.blockRendering', 'Blockly.blockRendering.Renderer', 'Blockly.geras.ConstantProvider', 'Blockly.geras.Drawer', 'Blockly.geras.HighlightConstantProvider', 'Blockly.geras.PathObject', 'Blockly.geras.RenderInfo', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/geras/renderer.js', ['Blockly.geras.Renderer'], ['Blockly.blockRendering', 'Blockly.blockRendering.Renderer', 'Blockly.geras.ConstantProvider', 'Blockly.geras.Drawer', 'Blockly.geras.HighlightConstantProvider', 'Blockly.geras.PathObject', 'Blockly.geras.RenderInfo'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/measurables/base.js', ['Blockly.blockRendering.Measurable'], ['Blockly.blockRendering.Types'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/measurables/bottom_row.js', ['Blockly.blockRendering.BottomRow'], ['Blockly.blockRendering.Row', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/measurables/connection.js', ['Blockly.blockRendering.Connection'], ['Blockly.blockRendering.Measurable', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); @@ -182,24 +182,24 @@ goog.addDependency('../../core/renderers/measurables/square_corner.js', ['Blockl goog.addDependency('../../core/renderers/measurables/statement_input.js', ['Blockly.blockRendering.StatementInput'], ['Blockly.blockRendering.InputConnection', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/measurables/top_row.js', ['Blockly.blockRendering.TopRow'], ['Blockly.blockRendering.Row', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/measurables/types.js', ['Blockly.blockRendering.Types'], [], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/minimalist/constants.js', ['Blockly.minimalist.ConstantProvider'], ['Blockly.blockRendering.ConstantProvider', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/minimalist/drawer.js', ['Blockly.minimalist.Drawer'], ['Blockly.blockRendering.Drawer', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/minimalist/info.js', ['Blockly.minimalist.RenderInfo'], ['Blockly.blockRendering.RenderInfo', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/minimalist/constants.js', ['Blockly.minimalist.ConstantProvider'], ['Blockly.blockRendering.ConstantProvider'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/minimalist/drawer.js', ['Blockly.minimalist.Drawer'], ['Blockly.blockRendering.Drawer'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/minimalist/info.js', ['Blockly.minimalist.RenderInfo'], ['Blockly.blockRendering.RenderInfo'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/minimalist/minimalist.js', ['Blockly.minimalist'], ['Blockly.minimalist.ConstantProvider', 'Blockly.minimalist.Drawer', 'Blockly.minimalist.RenderInfo', 'Blockly.minimalist.Renderer'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/minimalist/renderer.js', ['Blockly.minimalist.Renderer'], ['Blockly.blockRendering', 'Blockly.blockRendering.Renderer', 'Blockly.minimalist.ConstantProvider', 'Blockly.minimalist.Drawer', 'Blockly.minimalist.RenderInfo', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/thrasos/info.js', ['Blockly.thrasos.RenderInfo'], ['Blockly.blockRendering.InRowSpacer', 'Blockly.blockRendering.RenderInfo', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/thrasos/renderer.js', ['Blockly.thrasos.Renderer'], ['Blockly.blockRendering', 'Blockly.blockRendering.Renderer', 'Blockly.thrasos.RenderInfo', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/minimalist/renderer.js', ['Blockly.minimalist.Renderer'], ['Blockly.blockRendering', 'Blockly.blockRendering.Renderer', 'Blockly.minimalist.ConstantProvider', 'Blockly.minimalist.Drawer', 'Blockly.minimalist.RenderInfo'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/thrasos/info.js', ['Blockly.thrasos.RenderInfo'], ['Blockly.blockRendering.InRowSpacer', 'Blockly.blockRendering.RenderInfo', 'Blockly.blockRendering.Types'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/thrasos/renderer.js', ['Blockly.thrasos.Renderer'], ['Blockly.blockRendering', 'Blockly.blockRendering.Renderer', 'Blockly.thrasos.RenderInfo'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/thrasos/thrasos.js', ['Blockly.thrasos'], ['Blockly.thrasos.RenderInfo', 'Blockly.thrasos.Renderer'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/zelos/constants.js', ['Blockly.zelos.ConstantProvider'], ['Blockly.ConnectionType', 'Blockly.blockRendering.ConstantProvider', 'Blockly.utils.Svg', 'Blockly.utils.colour', 'Blockly.utils.dom', 'Blockly.utils.object', 'Blockly.utils.svgPaths'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/zelos/drawer.js', ['Blockly.zelos.Drawer'], ['Blockly.blockRendering.Drawer', 'Blockly.blockRendering.debug', 'Blockly.utils.object', 'Blockly.utils.svgPaths'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/zelos/info.js', ['Blockly.zelos.RenderInfo'], ['Blockly.FieldImage', 'Blockly.FieldLabel', 'Blockly.FieldTextInput', 'Blockly.Input', 'Blockly.blockRendering.InRowSpacer', 'Blockly.blockRendering.RenderInfo', 'Blockly.blockRendering.Types', 'Blockly.inputTypes', 'Blockly.utils.object', 'Blockly.zelos.BottomRow', 'Blockly.zelos.RightConnectionShape', 'Blockly.zelos.StatementInput', 'Blockly.zelos.TopRow'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/zelos/marker_svg.js', ['Blockly.zelos.MarkerSvg'], ['Blockly.blockRendering.MarkerSvg', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/zelos/measurables/bottom_row.js', ['Blockly.zelos.BottomRow'], ['Blockly.blockRendering.BottomRow', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/zelos/measurables/inputs.js', ['Blockly.zelos.StatementInput'], ['Blockly.blockRendering.StatementInput', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/zelos/measurables/row_elements.js', ['Blockly.zelos.RightConnectionShape'], ['Blockly.blockRendering.Measurable', 'Blockly.blockRendering.Types', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/zelos/measurables/top_row.js', ['Blockly.zelos.TopRow'], ['Blockly.blockRendering.TopRow', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/zelos/path_object.js', ['Blockly.zelos.PathObject'], ['Blockly.blockRendering.PathObject', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'}); -goog.addDependency('../../core/renderers/zelos/renderer.js', ['Blockly.zelos.Renderer'], ['Blockly.ConnectionType', 'Blockly.InsertionMarkerManager', 'Blockly.blockRendering', 'Blockly.blockRendering.Renderer', 'Blockly.utils.object', 'Blockly.zelos.ConstantProvider', 'Blockly.zelos.Drawer', 'Blockly.zelos.MarkerSvg', 'Blockly.zelos.PathObject', 'Blockly.zelos.RenderInfo'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/zelos/constants.js', ['Blockly.zelos.ConstantProvider'], ['Blockly.ConnectionType', 'Blockly.blockRendering.ConstantProvider', 'Blockly.utils.Svg', 'Blockly.utils.colour', 'Blockly.utils.dom', 'Blockly.utils.svgPaths'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/zelos/drawer.js', ['Blockly.zelos.Drawer'], ['Blockly.blockRendering.Drawer', 'Blockly.blockRendering.debug', 'Blockly.utils.svgPaths'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/zelos/info.js', ['Blockly.zelos.RenderInfo'], ['Blockly.FieldImage', 'Blockly.FieldLabel', 'Blockly.FieldTextInput', 'Blockly.Input', 'Blockly.blockRendering.InRowSpacer', 'Blockly.blockRendering.RenderInfo', 'Blockly.blockRendering.Types', 'Blockly.inputTypes', 'Blockly.zelos.BottomRow', 'Blockly.zelos.RightConnectionShape', 'Blockly.zelos.StatementInput', 'Blockly.zelos.TopRow'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/zelos/marker_svg.js', ['Blockly.zelos.MarkerSvg'], ['Blockly.blockRendering.MarkerSvg', 'Blockly.utils.Svg', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/zelos/measurables/bottom_row.js', ['Blockly.zelos.BottomRow'], ['Blockly.blockRendering.BottomRow'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/zelos/measurables/inputs.js', ['Blockly.zelos.StatementInput'], ['Blockly.blockRendering.StatementInput'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/zelos/measurables/row_elements.js', ['Blockly.zelos.RightConnectionShape'], ['Blockly.blockRendering.Measurable', 'Blockly.blockRendering.Types'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/zelos/measurables/top_row.js', ['Blockly.zelos.TopRow'], ['Blockly.blockRendering.TopRow'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/zelos/path_object.js', ['Blockly.zelos.PathObject'], ['Blockly.blockRendering.PathObject', 'Blockly.utils.Svg', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'}); +goog.addDependency('../../core/renderers/zelos/renderer.js', ['Blockly.zelos.Renderer'], ['Blockly.ConnectionType', 'Blockly.InsertionMarkerManager', 'Blockly.blockRendering', 'Blockly.blockRendering.Renderer', 'Blockly.zelos.ConstantProvider', 'Blockly.zelos.Drawer', 'Blockly.zelos.MarkerSvg', 'Blockly.zelos.PathObject', 'Blockly.zelos.RenderInfo'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/renderers/zelos/zelos.js', ['Blockly.zelos'], ['Blockly.zelos.BottomRow', 'Blockly.zelos.ConstantProvider', 'Blockly.zelos.Drawer', 'Blockly.zelos.MarkerSvg', 'Blockly.zelos.PathObject', 'Blockly.zelos.RenderInfo', 'Blockly.zelos.Renderer', 'Blockly.zelos.RightConnectionShape', 'Blockly.zelos.StatementInput', 'Blockly.zelos.TopRow'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/scrollbar.js', ['Blockly.Scrollbar'], ['Blockly.Touch', 'Blockly.browserEvents', 'Blockly.utils.Coordinate', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.svgMath'], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/scrollbar_pair.js', ['Blockly.ScrollbarPair'], ['Blockly.Events.utils', 'Blockly.Scrollbar', 'Blockly.utils.Svg', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'});