diff --git a/package-lock.json b/package-lock.json index 07351d91f..177c5223a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "dependencies": { "@intechstudio/grid-protocol": "1.20260302.1321", - "@intechstudio/grid-uikit": "1.20260303.1559", + "@intechstudio/grid-uikit": "^1.20260421.817", "@intechstudio/profile-cloud-webcomponent": "1.20251107.1414", "adm-zip": "^0.5.10", "axios": "^1.15.0", @@ -2110,9 +2110,9 @@ } }, "node_modules/@intechstudio/grid-uikit": { - "version": "1.20260303.1559", - "resolved": "https://registry.npmjs.org/@intechstudio/grid-uikit/-/grid-uikit-1.20260303.1559.tgz", - "integrity": "sha512-OE4gYErV6a5NCyjRpnX7Nn0tyTmwhui+NT/LzbofaVwmLrWP/VpqXMHWWmW+QSqOmIPIyFUD53ZpQLS7zm83fw==", + "version": "1.20260421.817", + "resolved": "https://registry.npmjs.org/@intechstudio/grid-uikit/-/grid-uikit-1.20260421.817.tgz", + "integrity": "sha512-qbg5S5Z+tSaYpWc6EIjkL3Lt3Kh26M0zs+b2v6uduzym/G38NNOwJXntOFA2+NIrSwDsUciEKExnfXONNEHogA==", "dependencies": { "@melt-ui/svelte": "^0.86.6", "color-convert": "^2.0.1", diff --git a/package.json b/package.json index ba7a9afac..873cb0401 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "@intechstudio/grid-protocol": "1.20260302.1321", - "@intechstudio/grid-uikit": "1.20260303.1559", + "@intechstudio/grid-uikit": "^1.20260421.817", "@intechstudio/profile-cloud-webcomponent": "1.20251107.1414", "adm-zip": "^0.5.10", "axios": "^1.15.0", diff --git a/src/renderer/config-blocks/ActionBlockInformation.ts b/src/renderer/config-blocks/ActionBlockInformation.ts index 536b9879c..6a820603c 100644 --- a/src/renderer/config-blocks/ActionBlockInformation.ts +++ b/src/renderer/config-blocks/ActionBlockInformation.ts @@ -33,6 +33,7 @@ interface Information { | "code" | "timer" | "function" + | "deprecated" | null; displayName: string; defaultLua: string; diff --git a/src/renderer/config-blocks/Midi.svelte b/src/renderer/config-blocks/Midi.svelte index 240187880..252785c6a 100644 --- a/src/renderer/config-blocks/Midi.svelte +++ b/src/renderer/config-blocks/Midi.svelte @@ -45,15 +45,21 @@ - - {#if tabs !== undefined} -
-
- {#each tabs as element} - handleTabButtonClicked(element)} + + + + + + Send MIDI + + { + const { value, validationError } = e.detail; + scriptSegments[0] = value; + validators[0].value = !validationError; + sendData(); + }} + on:change={() => dispatch("sync")} + postProcessor={GridScript.shortify} + preProcessor={GridScript.humanize} + /> + {#if mode === 0} + { + const { value, validationError } = e.detail; + scriptSegments[1] = value; + validators[1].value = !validationError; + sendData(); + }} + on:change={() => dispatch("sync")} + postProcessor={GridScript.shortify} + preProcessor={GridScript.humanize} /> - {/each} -
- {/if} - -
- {#each scriptSegments as script, i} + {/if} + {#if mode !== 2 && mode !== 3} + { + const { value, validationError } = e.detail; + scriptSegments[2] = value; + validators[2].value = !validationError; + sendData(); + }} + on:change={() => dispatch("sync")} + postProcessor={GridScript.shortify} + preProcessor={GridScript.humanize} + /> + {/if} { const { value, validationError } = e.detail; - script = value; - validators[i].value = !validationError; + scriptSegments[3] = value; + validators[3].value = !validationError; sendData(); }} on:change={() => dispatch("sync")} postProcessor={GridScript.shortify} preProcessor={GridScript.humanize} /> - {/each} -
+ + + {#if mode === 2 || mode === 3} + +
+
+ { + const { value, validationError } = e.detail; + nrpnMSB = value; + validators[4].value = !validationError; + scriptSegments[2] = calculateNRPNCC(nrpnMSB, nrpnLSB); + sendData(); + }} + on:change={() => dispatch("sync")} + postProcessor={GridScript.shortify} + preProcessor={GridScript.humanize} + /> + { + const { value, validationError } = e.detail; + nrpnLSB = value; + validators[5].value = !validationError; + scriptSegments[2] = calculateNRPNCC(nrpnMSB, nrpnLSB); + sendData(); + }} + on:change={() => dispatch("sync")} + postProcessor={GridScript.shortify} + preProcessor={GridScript.humanize} + /> +
+
+ + + +
+ { + const { value, validationError } = e.detail; + scriptSegments[2] = value; + validators[2].value = !validationError; + nrpnMSB = `(${value})//128`; + nrpnLSB = `(${value})%128`; + sendData(); + }} + on:change={() => dispatch("sync")} + postProcessor={GridScript.shortify} + preProcessor={GridScript.humanize} + /> +
+
+ {/if} + + + + Receive MIDI + + + + +
diff --git a/src/renderer/config-blocks/MidiFourteenBit.svelte b/src/renderer/config-blocks/MidiFourteenBit.svelte index a0395783c..161a3db3e 100644 --- a/src/renderer/config-blocks/MidiFourteenBit.svelte +++ b/src/renderer/config-blocks/MidiFourteenBit.svelte @@ -9,7 +9,7 @@ short: "gmsh", name: "MidiFourteenBit", rendering: "standard", - category: "midi", + category: "deprecated", displayName: "MIDI 14", color: "#DA4167", defaultLua: "gms(0,176,0,val//128) gms(0,176,32,val%128)", @@ -52,7 +52,7 @@ import { LocalDefinitions } from "../runtime/runtime.store"; import { ActionData, GridAction, GridEvent } from "./../runtime/runtime"; import SendFeedback from "../main/user-interface/SendFeedback.svelte"; - import TabButton from "../main/user-interface/TabButton.svelte"; + import { Script } from "./_script_parsers.js"; import { Validator } from "./validators"; import { Grid } from "../lib/_utils.js"; @@ -197,32 +197,12 @@ $: if ($event) { renderSuggestions(); } - const tabs = [ - { name: "MIDI", short: "gms" }, - { name: "14 bit MIDI", short: "gmsh" }, - { name: "SysEX", short: "gmss" }, - { name: "NRPN MIDI", short: "gmnp" }, - ]; - - function handleTabButtonClicked(element) { - dispatch("replace", { short: element.short }); - } - {#if tabs !== undefined} -
-
- {#each tabs as element} - handleTabButtonClicked(element)} - /> - {/each} -
- {/if} - +
+ This block is deprecated. Use the MIDI block with CC 14-bit mode instead. +
{#each scriptSegments as script, i} - {#if tabs !== undefined} -
-
- {#each tabs as element} - handleTabButtonClicked(element)} - /> - {/each} -
- {/if} - +
+ This block is deprecated. Use the MIDI block with NRPN mode instead. +
- {#if tabs !== undefined} -
-
- {#each tabs as element} - handleTabButtonClicked(element)} - /> - {/each} -
- {/if} -
Enter comma separated sysex bytes or variables. diff --git a/src/renderer/config-blocks/SimpleColor.svelte b/src/renderer/config-blocks/SimpleColor.svelte index dc3d81beb..a07a7c995 100644 --- a/src/renderer/config-blocks/SimpleColor.svelte +++ b/src/renderer/config-blocks/SimpleColor.svelte @@ -260,20 +260,22 @@ postProcessor={GridScript.shortify} preProcessor={GridScript.humanize} /> - { - const { value } = e.detail; - data.updateAlphaSliderValue(value); - sendData($data); - }} - on:commit={() => { - dispatch("sync"); - }} - /> + + { + const { value } = e.detail; + data.updateAlphaSliderValue(value); + sendData($data); + }} + on:commit={() => { + dispatch("sync"); + }} + /> diff --git a/src/renderer/main/RightPanelContainer.svelte b/src/renderer/main/RightPanelContainer.svelte index eabd06aa2..6538c3f90 100644 --- a/src/renderer/main/RightPanelContainer.svelte +++ b/src/renderer/main/RightPanelContainer.svelte @@ -19,7 +19,7 @@
diff --git a/src/renderer/main/_actions/move.action.ts b/src/renderer/main/_actions/move.action.ts index 4255b3122..1f1dfcdf8 100644 --- a/src/renderer/main/_actions/move.action.ts +++ b/src/renderer/main/_actions/move.action.ts @@ -118,6 +118,12 @@ export function draggable(node: HTMLElement, params: DragParameters) { return; } + // Scrollbars are not DOM elements; the node itself is the event target. + // Bail out if the click lands in the scrollbar region (beyond client area). + if (e.offsetX > node.clientWidth || e.offsetY > node.clientHeight) { + return; + } + if (!movable) { return; } diff --git a/src/renderer/main/panels/configuration/ActionList.svelte b/src/renderer/main/panels/configuration/ActionList.svelte index 044afb148..e30249633 100644 --- a/src/renderer/main/panels/configuration/ActionList.svelte +++ b/src/renderer/main/panels/configuration/ActionList.svelte @@ -145,7 +145,7 @@ return dragged && dragged.length > 0; }, }} - class="overflow-y-scroll justify-start w-full h-full pl-2 pr-3" + class="overflow-y-scroll overflow-x-hidden justify-start w-full h-full pl-2 pr-3" > {#if $event?.config.length === 0 && $draggedActions.length === 0 && $profileCloudConfigDrag?.configType !== "snippet"} diff --git a/src/renderer/main/panels/configuration/components/ActionPicker.svelte b/src/renderer/main/panels/configuration/components/ActionPicker.svelte index f2f1f36ab..ab62e4112 100644 --- a/src/renderer/main/panels/configuration/components/ActionPicker.svelte +++ b/src/renderer/main/panels/configuration/components/ActionPicker.svelte @@ -226,7 +226,11 @@ } if (get(appSettings).persistent.userLevelMinimalist === true) { - comp = comp.filter((e) => !e.information.hiddenInMinimalist); + comp = comp.filter( + (e) => + !e.information.hiddenInMinimalist && + e.information.category !== "deprecated", + ); } //Group components by category @@ -252,6 +256,7 @@ "special", "code", "timer", + "deprecated", ]; comp.sort(function (a, b) { return ( diff --git a/src/renderer/main/panels/configuration/components/DynamicWrapper.svelte b/src/renderer/main/panels/configuration/components/DynamicWrapper.svelte index 70ae1af3e..c9b7f6bef 100644 --- a/src/renderer/main/panels/configuration/components/DynamicWrapper.svelte +++ b/src/renderer/main/panels/configuration/components/DynamicWrapper.svelte @@ -230,7 +230,7 @@ } } }} - class="dynamicWrapper activator-button flex flex-grow outline-none" + class="dynamicWrapper activator-button flex flex-grow min-w-0 outline-none" class:cursor-pointer={ctrlIsDown} > @@ -238,7 +238,7 @@
{#if ($action.toggled && $action.information.toggleable) || typeof header === "undefined"} -
+
a.toLua()).join(""), + ); loadSnippet(snippet, event, target.index).catch(); break; diff --git a/src/renderer/runtime/runtime.ts b/src/renderer/runtime/runtime.ts index 03a3eae9a..6a046f6a5 100644 --- a/src/renderer/runtime/runtime.ts +++ b/src/renderer/runtime/runtime.ts @@ -386,6 +386,12 @@ export class GridAction extends RuntimeNode { let actionString = script.replace(/\s{2,10}/g, " "); + // Strip legacy framing from old cloud data + const framingMatch = actionString.match(/^<\?lua\s(.*)\s\?>$/s); + if (framingMatch) { + actionString = framingMatch[1]; + } + const matches = [ ...actionString.matchAll(/--\[\[@(.*?)\]\]\s*(.*?)(?=(--\[\[@|$))/gs), ];