cleanup unused files

This commit is contained in:
Loren Norman 2023-12-11 14:40:09 -05:00
parent 25d2c36237
commit dd87a76f7f
5 changed files with 1 additions and 145 deletions

View file

@ -1,51 +0,0 @@
// regex considerations:
// - timeout
// - case-sensitivity
// - single vs multi-line
// - regex-escaping strings
// - match? true/false
// - matches: 0 or more
// - numbered matches
// - named matches
export default {
toolbox: {
category: 'Transformers',
},
json: {
"type": "transform_regex",
"message0": "Input: %1 Regex: %2",
"args0": [
{
"type": "input_value",
"name": "MATCH_STRING",
"align": "RIGHT"
},
{
"type": "input_value",
"name": "REGEX_STRING",
"check": "String",
"align": "RIGHT"
}
],
"output": null,
"colour": 230,
"tooltip": "Returns the first match, or an empty string if there's no match.",
"helpUrl": ""
},
generators: {
json: (block, generator) => {
const
matchString = generator.valueToCode(block, 'MATCH_STRING', 0),
regexString = generator.valueToCode(block, 'REGEX_STRING', 0)
return [`{ "transformer": "regex", "regex": ${regexString}, "input_string": ${matchString} }`, 0]
},
markdown: (block, generator) => {
return '# transform_regex.js'
}
}
}

View file

@ -1,32 +0,0 @@
export default {
toolbox: {
category: 'Triggers',
},
json: {
"type": "trigger_all",
"message0": "All: %1",
"args0": [
{
"type": "input_statement",
"name": "TRIGGERS"
}
],
"previousStatement": null,
"nextStatement": null,
"colour": 90,
"tooltip": "",
"helpUrl": ""
},
generators: {
json: (block, generator) => {
const triggers = generator.statementToCode(block, 'TRIGGERS')
return `{ "all": [\n${triggers}\n]}`
},
markdown: (block, generator) => {
return '# trigger_all.js'
}
}
}

View file

@ -1,50 +0,0 @@
export default {
toolbox: {
category: 'Triggers'
},
json: {
type: "trigger_on_change",
message0: "Feed Check: %1 Reactive? %2",
args0: [
{
type: "input_value",
name: "FEED_CHECK"
},
{
type: "field_checkbox",
name: "REACTIVE",
checked: true
}
],
inputsInline: false,
previousStatement: null,
nextStatement: null,
colour: 60,
tooltip: "Plug in a Feed, or Logic that references a Feed.",
helpUrl: ""
},
generators: {
json: (block, generator) => {
const
feedToCheck = generator.valueToCode(block, 'FEED_CHECK', 0),
isReactive = block.getFieldValue('REACTIVE') === 'TRUE',
lines = [
`"trigger": "feed_check",`,
`"check": ${feedToCheck},`,
`"reactive": ${isReactive}`,
],
indentedLines = generator.prefixLines(lines.join('\n'), generator.INDENT)
return `{\n${ indentedLines }\n}`
},
markdown: (block, generator) => {
return 'markity'
}
}
}

View file

@ -2,27 +2,16 @@ import Blockly from 'blockly'
import action_root from './custom/action_root.js'
import feed_selector from './custom/feed_selector.js'
// import trigger_all from './custom/trigger_all.js'
import reactive_trigger from './custom/reactive_trigger.js'
import comparison_selector from './custom/comparison_selector.js'
// import trigger_on_change from './custom/trigger_on_change.js'
import action_publish_to_feed from './custom/action_publish_to_feed.js'
import action_send_email from './custom/action_send_email.js'
// import transform_regex from './custom/transform_regex.js'
import math_number from './common/math_number.js'
import text from './common/text.js'
import text_multiline from './common/text_multiline.js'
import logic_boolean from './common/logic_boolean.js'
import logic_null from './common/logic_null.js'
// import controls_if from './common/controls_if.js'
// import logic_compare from './common/logic_compare.js'
// import logic_negate from './common/logic_negate.js'
// import logic_operation from './common/logic_operation.js'
// import math_arithmetic from './common/math_arithmetic.js'
// import variables_set from './common/variables_set.js'
// import variables_get from './common/variables_get.js'
// import math_change from './common/math_change.js'
const

View file

@ -7,7 +7,7 @@ import workspaceBlocks from './workspace.xml?raw'
import './index.css'
// export block library json
// import block library json
Blockly.defineBlocksWithJsonArray(allBlocksJson)
// inject blockly with our toolbox