Documentation ¶
Overview ¶
common configuration and constants for tapestry's use of blockly
Index ¶
Constants ¶
const ( FieldCheckbox = "field_checkbox" FieldDropdown = "field_dropdown" FieldText = "field_input" FieldLabel = "field_label" FieldNumber = "field_number" // blocks can stack vertically ( or link horizontally ) InputStatement = "input_statement" // blocks can link horizontally ( or stack vertically ) InputValue = "input_value" // fields are partitioned into rows of inputs; // if a row doesnt need connect with other blocks, it can use a dummy input. InputDummy = "input_dummy" )
const ( // alternative class for str fields so that open strs with choices can use dropdowns. MosaicStrField = "mosaic_str_field" // alternative class for text fields so all text can have placeholder text. MosaicTextField = "mosaic_text_field" // multiline variant of the text field MosaicMultilineField = "mosaic_multiline_field" )
const ColorMarkup = "blockly-color"
tapestry typespec markup
const DefaultColor = "TAP_HUE"
yup.
const InlineBlockMarkup = "mosaic-inline" // a block with no labels
const RootBlockMarkup = "mosaic-root" // special shapes that have no output.
const StackMarkup = "blockly-stack"
Variables ¶
This section is empty.
Functions ¶
func BlockColor ¶
func InlineBlock ¶
func MutatorName ¶
transform the passed block name into the name of its corresponding mutator block. ex. _name_mutator
func StackedName ¶
transform the passed block name into the name of its corresponding stacked block. ex. _name_stack
Types ¶
type SlotRule ¶
type SlotRule struct { Name string Stack bool // if false, then: input_value, if true: input_statement Colour string Type *typeinfo.Slot }
func MakeSlotRule ¶
func (*SlotRule) InputType ¶
slots are referenced by terms of a flow blockly needs to know whether they stacked or produce a single value note: in blockly, a *block* can only be one or the other while tapestry allows you to produce and discard a value. so, there are some *flows* which can be stackable *or* produce a value. ( fwiw: most languages allow this, including go. ) what we care about here though, is just the slot.