diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b18fc3..8ae843c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -200,53 +200,51 @@ jobs: needs: buildCore steps: - # Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it - uses: actions/checkout@v4 - # # Setup JDK - # - name: Set up JDK 1.8 - # uses: actions/setup-java@v2 - # with: - # distribution: 'adopt' - # java-version: 8 - - # # Build Core - # - name: Build/Install Core - # working-directory: ./MinecraftMod/core - # run: './gradlew.bat publishToMavenLocal' - # Setup JDK - - name: Set up JDK 16 + - name: Set up JDK 8 uses: actions/setup-java@v4 with: - distribution: microsoft - java-version: 16 + distribution: adopt + java-version: 8 - name: Set up Gradle uses: gradle/actions/setup-gradle@v3 - # Download Core - - name: Download Core Artifact - uses: actions/download-artifact@v4 + - name: Set up Node.js + uses: actions/setup-node@v2 with: - name: maven - path: ~/.m2/repository + node-version: '20' + + - name: Install Stream Deck CLI + run: 'npm install -g @elgato/cli' + + # Build Core + - name: Build/Install Core + working-directory: ./MinecraftMod/core + run: './gradlew run' + + # Copy effects.json + - name: Copy effects.json + run: 'cp ./MinecraftMod/core/effects.json ./effectmc/effects.json' # Generate Stream Deck Plugin - name: Generate Stream Deck Plugin - working-directory: ./StreamDeckPlugin - run: './gradlew.bat run --no-daemon' - - # Run DistributionTool - - name: Run DistributionTool - uses: MoSadie/streamdeck-distribution-tool@22472fe2a1ae677822b11328d0df0f98dc7febab - with: - input: 'com.mosadie.effectmc.sdPlugin' - working-directory: 'StreamDeckPlugin' + working-directory: ./effectmc + run: 'npm run generate' + + - name: Build Stream Deck Plugin + working-directory: ./effectmc + run: 'npm run build' + + - name: Package Stream Deck Plugin + working-directory: ./effectmc + run: 'streamdeck pack .\com.mosadie.effectmc.sdPlugin' # Upload Artifact - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: Stream Deck Plugin - path: ./StreamDeckPlugin/*.streamDeckPlugin + path: ./effectmc/*.streamDeckPlugin diff --git a/MinecraftMod/core/.gitignore b/MinecraftMod/core/.gitignore new file mode 100644 index 0000000..d5dbf66 --- /dev/null +++ b/MinecraftMod/core/.gitignore @@ -0,0 +1 @@ +effects.json \ No newline at end of file diff --git a/MinecraftMod/core/build.gradle b/MinecraftMod/core/build.gradle index 631702a..83f556e 100644 --- a/MinecraftMod/core/build.gradle +++ b/MinecraftMod/core/build.gradle @@ -1,6 +1,7 @@ plugins { id 'java-library' id 'maven-publish' + id 'application' } version = 3.0 @@ -46,4 +47,8 @@ publishing { from components.java } } +} + +application { + mainClassName = 'com.mosadie.effectmc.core.export.EffectExporter' } \ No newline at end of file diff --git a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/effect/PlaySoundEffect.java b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/effect/PlaySoundEffect.java index a66d1f3..dc5991f 100644 --- a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/effect/PlaySoundEffect.java +++ b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/effect/PlaySoundEffect.java @@ -14,7 +14,7 @@ public PlaySoundEffect() { getPropertyManager().addFloatProperty("volume", 1.0f, true, "Volume", 0.0f, 1.0f); getPropertyManager().addFloatProperty("pitch", 1.0f, true, "Pitch", 0.0f, 2.0f); getPropertyManager().addBooleanProperty("repeat", false, true, "Repeat", "Enabled", "Disabled"); - getPropertyManager().addIntegerProperty("repeatDelay", 0, false, "Repeat Delay", "0"); + getPropertyManager().addIntegerProperty("repeatDelay", 5, false, "Repeat Delay", "0"); getPropertyManager().addSelectionProperty("attenuationType", ATTENUATION_TYPE.NONE.toString(), true, "Attenuation Type", ATTENUATION_TYPE.toStringArray()); getPropertyManager().addIntegerProperty("x", 0, true, "X", "0"); getPropertyManager().addIntegerProperty("y", 0, true, "Y", "0"); diff --git a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/effect/ShowTitleEffect.java b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/effect/ShowTitleEffect.java index 84186dc..c93f4d0 100644 --- a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/effect/ShowTitleEffect.java +++ b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/effect/ShowTitleEffect.java @@ -12,7 +12,6 @@ public ShowTitleEffect() { getPropertyManager().addCommentProperty("Set color using § color codes."); getPropertyManager().addStringProperty("title", "", true, "Title", "Hello"); getPropertyManager().addStringProperty("subtitle", "", true, "Subtitle", "World!"); - getPropertyManager().addCommentProperty("For a blank title/subtitle, use a single space."); getPropertyManager().lock(); } diff --git a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/effect/ShowToastEffect.java b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/effect/ShowToastEffect.java index af3c746..4ba1d2d 100644 --- a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/effect/ShowToastEffect.java +++ b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/effect/ShowToastEffect.java @@ -12,7 +12,6 @@ public ShowToastEffect() { getPropertyManager().addCommentProperty("Set color using § color codes."); getPropertyManager().addStringProperty("title", "", true, "Title", "Hello"); getPropertyManager().addStringProperty("subtitle", "", true, "Subtitle", "World!"); - getPropertyManager().addCommentProperty("For a blank subtitle, use a single space."); getPropertyManager().lock(); } diff --git a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/export/EffectExporter.java b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/export/EffectExporter.java new file mode 100644 index 0000000..73ba3c9 --- /dev/null +++ b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/export/EffectExporter.java @@ -0,0 +1,46 @@ +package com.mosadie.effectmc.core.export; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.mosadie.effectmc.core.EffectMCCore; +import com.mosadie.effectmc.core.effect.internal.Effect; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.util.List; + +public class EffectExporter { + public static void main(String[] args) { + System.out.println("Exporting effects..."); + EffectMCCore core = new EffectMCCore(null, null, null); + + GsonBuilder builder = new GsonBuilder(); + builder.setPrettyPrinting(); + builder.registerTypeAdapter(Effect.class, new EffectSerializer()); + Gson gson = builder.create(); + + String file = "effects.json"; + + if (args.length > 0) { + file = args[0]; + } + + File outputFile = new File(file); + + if (outputFile.exists()) { + System.out.println("Output file already exists, overwriting..."); + } + + + try { + FileWriter writer = new FileWriter(outputFile); + writer.write(gson.toJson(core.getEffects().toArray(new Effect[0]))); + writer.close(); + System.out.println("Effects exported to " + outputFile.getAbsolutePath()); + } catch (IOException e) { + e.printStackTrace(); + System.out.println("Failed to export effects: " + e.getMessage()); + } + } +} diff --git a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/export/EffectListSerializer.java b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/export/EffectListSerializer.java new file mode 100644 index 0000000..8dff30a --- /dev/null +++ b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/export/EffectListSerializer.java @@ -0,0 +1,18 @@ +package com.mosadie.effectmc.core.export; + +import com.google.gson.*; +import com.mosadie.effectmc.core.effect.internal.Effect; + +import java.lang.reflect.Type; +import java.util.List; + +public class EffectListSerializer implements JsonSerializer> { + @Override + public JsonElement serialize(List src, Type typeOfSrc, JsonSerializationContext context) { + JsonArray array = new JsonArray(); + for (Effect effect : src) { + array.add(context.serialize(effect)); + } + return array; + } +} diff --git a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/export/EffectSerializer.java b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/export/EffectSerializer.java new file mode 100644 index 0000000..850a9b3 --- /dev/null +++ b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/export/EffectSerializer.java @@ -0,0 +1,24 @@ +package com.mosadie.effectmc.core.export; + +import com.google.gson.*; +import com.mosadie.effectmc.core.effect.internal.Effect; + +import java.lang.reflect.Type; + +public class EffectSerializer implements JsonSerializer { + + @Override + public JsonElement serialize(Effect src, Type typeOfSrc, JsonSerializationContext context) { + JsonObject object = new JsonObject(); + object.addProperty("id", src.getEffectId()); + object.addProperty("name", src.getEffectName()); + object.addProperty("tooltip", src.getEffectTooltip()); + + // Serialize the property manager as normal + object.add("properties", context.serialize(src.getPropertyManager().getPropertiesList())); + + System.out.println("Effect serialized: " + src.getEffectName()); + + return object; + } +} diff --git a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/handler/http/EffectRawRequestHandler.java b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/handler/http/EffectRawRequestHandler.java index 897bf6f..36eda0f 100644 --- a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/handler/http/EffectRawRequestHandler.java +++ b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/handler/http/EffectRawRequestHandler.java @@ -64,21 +64,8 @@ public void handle(HttpExchange exchange) throws IOException { return; } - Map bodyParameters = new HashMap<>(); - - try { - Util.parseQuery(body, bodyParameters); - } catch (UnsupportedEncodingException e) { - core.getExecutor().log("Exception occurred parsing body query!"); - String response = "Something went wrong parsing the body query."; - exchange.sendResponseHeaders(400, response.getBytes().length); - exchange.getResponseBody().write(response.getBytes()); - exchange.getResponseBody().close(); - return; - } - // Handle no device (send unauthorized) - if (!parameters.containsKey("device") && !bodyParameters.containsKey("device")) { + if (!parameters.containsKey("device")) { String message = "Missing device property"; exchange.sendResponseHeaders(401, message.getBytes().length); exchange.getResponseBody().write(message.getBytes()); @@ -86,22 +73,8 @@ public void handle(HttpExchange exchange) throws IOException { return; } - // Combine the parameters, where any specified in the body overwrite the query parameters - for (String key : bodyParameters.keySet()) { - parameters.put(key, bodyParameters.get(key)); - } - - // Check for request parameter, if not present, send 400 - if (!parameters.containsKey("request")) { - String message = "Missing request property"; - exchange.sendResponseHeaders(400, message.getBytes().length); - exchange.getResponseBody().write(message.getBytes()); - exchange.getResponseBody().close(); - return; - } - // Create EffectRequest - EffectRequest request = core.requestFromJson(parameters.get("request").toString()); + EffectRequest request = core.requestFromJson(body); if (request == null) { String message = "Invalid request JSON, check game logs for more information"; diff --git a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/property/EffectProperty.java b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/property/EffectProperty.java index eabb82c..e3ade60 100644 --- a/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/property/EffectProperty.java +++ b/MinecraftMod/core/src/main/java/com/mosadie/effectmc/core/property/EffectProperty.java @@ -6,11 +6,33 @@ public abstract class EffectProperty { final boolean required; final String label; + final String sdPropType; + EffectProperty(PropertyType type, String id, boolean required, String label) { this.TYPE = type; this.id = id; this.required = required; this.label = label; + + switch (type) { + case FLOAT: + case DOUBLE: + case INTEGER: + this.sdPropType = "number"; + break; + + case BOOLEAN: + this.sdPropType = "boolean"; + break; + + case BODY: + case STRING: + case SELECTION: + case COMMENT: + default: + this.sdPropType = "string"; + break; + } } public String getId() { @@ -35,6 +57,7 @@ public String getLabel() { public abstract String getAsString(Object input); public abstract String getHTMLInput(); + public abstract String getSDHTMLInput(); public abstract boolean getAsBoolean(Object input); diff --git a/StreamDeckPlugin/.gitignore b/StreamDeckPlugin/.gitignore deleted file mode 100644 index b4a46ce..0000000 --- a/StreamDeckPlugin/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/com.mosadie.effectmc.sdPlugin -/.gradle -/build \ No newline at end of file diff --git a/StreamDeckPlugin/.idea/.gitignore b/StreamDeckPlugin/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/StreamDeckPlugin/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/StreamDeckPlugin/.idea/compiler.xml b/StreamDeckPlugin/.idea/compiler.xml deleted file mode 100644 index 61a9130..0000000 --- a/StreamDeckPlugin/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/StreamDeckPlugin/.idea/gradle.xml b/StreamDeckPlugin/.idea/gradle.xml deleted file mode 100644 index dd09283..0000000 --- a/StreamDeckPlugin/.idea/gradle.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/StreamDeckPlugin/.idea/jarRepositories.xml b/StreamDeckPlugin/.idea/jarRepositories.xml deleted file mode 100644 index 55f1d4b..0000000 --- a/StreamDeckPlugin/.idea/jarRepositories.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/StreamDeckPlugin/.idea/libraries-with-intellij-classes.xml b/StreamDeckPlugin/.idea/libraries-with-intellij-classes.xml deleted file mode 100644 index 9fa3156..0000000 --- a/StreamDeckPlugin/.idea/libraries-with-intellij-classes.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/StreamDeckPlugin/.idea/misc.xml b/StreamDeckPlugin/.idea/misc.xml deleted file mode 100644 index 03fcd2a..0000000 --- a/StreamDeckPlugin/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/StreamDeckPlugin/.idea/uiDesigner.xml b/StreamDeckPlugin/.idea/uiDesigner.xml deleted file mode 100644 index e96534f..0000000 --- a/StreamDeckPlugin/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/StreamDeckPlugin/.idea/vcs.xml b/StreamDeckPlugin/.idea/vcs.xml deleted file mode 100644 index 6c0b863..0000000 --- a/StreamDeckPlugin/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/StreamDeckPlugin/Release/io.github.mosadie.effectmc.streamDeckPlugin b/StreamDeckPlugin/Release/io.github.mosadie.effectmc.streamDeckPlugin deleted file mode 100644 index 5e0d5e0..0000000 Binary files a/StreamDeckPlugin/Release/io.github.mosadie.effectmc.streamDeckPlugin and /dev/null differ diff --git a/StreamDeckPlugin/TEMPLATE_LICENSE b/StreamDeckPlugin/TEMPLATE_LICENSE deleted file mode 100644 index 7735a62..0000000 --- a/StreamDeckPlugin/TEMPLATE_LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -The following is the liscense for the Stream Deck Plugin Template created by @elgatosf on GitHub. - -The MIT License - -Copyright 2018 Corsair Memory, Inc - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/StreamDeckPlugin/build.gradle b/StreamDeckPlugin/build.gradle deleted file mode 100644 index 3b8dd0b..0000000 --- a/StreamDeckPlugin/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -plugins { - id 'application' -} - -version = '2.3.0.0' - -application { - mainClass = "com.mosadie.effectmc.plugingen.StreamDeckPluginGen" -} - -repositories { - mavenLocal() - mavenCentral() -} - -dependencies { - implementation 'com.mosadie.effectmc:core:3.0' - implementation 'commons-io:commons-io:2.11.0' - implementation group: 'org.apache.commons', name: 'commons-text', version: '1.9' -} \ No newline at end of file diff --git a/StreamDeckPlugin/gradle/wrapper/gradle-wrapper.jar b/StreamDeckPlugin/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7454180..0000000 Binary files a/StreamDeckPlugin/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/StreamDeckPlugin/gradle/wrapper/gradle-wrapper.properties b/StreamDeckPlugin/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index e750102..0000000 --- a/StreamDeckPlugin/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/StreamDeckPlugin/gradlew b/StreamDeckPlugin/gradlew deleted file mode 100644 index c53aefa..0000000 --- a/StreamDeckPlugin/gradlew +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" -APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/StreamDeckPlugin/gradlew.bat b/StreamDeckPlugin/gradlew.bat deleted file mode 100644 index 107acd3..0000000 --- a/StreamDeckPlugin/gradlew.bat +++ /dev/null @@ -1,89 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/StreamDeckPlugin/src/main/java/com/mosadie/effectmc/plugingen/StreamDeckPluginGen.java b/StreamDeckPlugin/src/main/java/com/mosadie/effectmc/plugingen/StreamDeckPluginGen.java deleted file mode 100644 index 2d7c6f3..0000000 --- a/StreamDeckPlugin/src/main/java/com/mosadie/effectmc/plugingen/StreamDeckPluginGen.java +++ /dev/null @@ -1,282 +0,0 @@ -package com.mosadie.effectmc.plugingen; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.mosadie.effectmc.core.EffectMCCore; -import com.mosadie.effectmc.core.handler.EffectRequestHandler; -import com.mosadie.effectmc.core.handler.RootHandler; -import com.mosadie.effectmc.core.property.EffectProperty; -import org.apache.commons.io.FileUtils; -import org.apache.commons.text.StringSubstitutor; - -import java.io.File; -import java.io.FileFilter; -import java.io.IOException; -import java.net.URISyntaxException; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class StreamDeckPluginGen { - - public static void main(String[] args) throws IOException, URISyntaxException { - EffectMCCore core = new EffectMCCore(null, null, null); - System.out.println("EffectMC Core Effect Count: " + core.getEffects().size()); - File currDir = new File("."); - System.out.println("CWD: " + currDir.getAbsolutePath()); - - // Create Plugin Folder - System.out.println("Creating plugin dir"); - File pluginDir = new File(currDir, "com.mosadie.effectmc.sdPlugin"); - - if (pluginDir.exists()) { - System.out.println("Deleting existing plugin dir"); - FileUtils.deleteDirectory(pluginDir); - } - - if (!pluginDir.mkdir()) { - throw new IOException("Failed to create plugin folder!"); - } - - // Write Static Resources - writeStaticResources(pluginDir); - - // Write manifest - writeManifest(pluginDir, core.getEffects()); - - // Write app.js - writeAppJS(pluginDir, core.getEffects()); - - // Write Property Inspectors - writePI(pluginDir, core.getEffects()); - } - - private static void writePI(File pluginDir, List effects) throws URISyntaxException, IOException { - System.out.println("Generating and Writing Property Inspectors"); - File templateDir = new File(StreamDeckPluginGen.class.getClassLoader().getResource("template").toURI()); - - String piTemplate = FileUtils.readFileToString(new File(templateDir, "pi.html.template"), StandardCharsets.UTF_8); - - for(EffectRequestHandler effect : effects) { - System.out.println("Generating Property Inspector for " + effect.getEffectName()); - Map replaceMap = new HashMap<>(); - StringBuilder propertiesBuilder = new StringBuilder(); - - for (EffectProperty prop : effect.getPropertiesList()) { - propertiesBuilder.append(prop.getSDHTMLInput()).append("\n"); - } - - replaceMap.put("properties", propertiesBuilder.toString()); - StringSubstitutor piStringSub = new StringSubstitutor(replaceMap); - - System.out.println("Writing Property Inspector for " + effect.getEffectName()); - FileUtils.write(new File(pluginDir, "propertyinspector/" + effect.getEffectSlug() + "_pi.html"), piStringSub.replace(piTemplate), Charset.defaultCharset()); - } - } - - private static void writeAppJS(File pluginDir, List effects) throws URISyntaxException, IOException { - System.out.println("Generating app.js"); - File templateDir = new File(StreamDeckPluginGen.class.getClassLoader().getResource("template").toURI()); - Map replaceMap = new HashMap<>(); - - // Create "actions" and "onConnect" replace string - StringBuilder actionsStringBuilder = new StringBuilder(); - StringBuilder onConnectBuilder = new StringBuilder(); - - // Load the strings to replace - String appJsTemplate = FileUtils.readFileToString(new File(templateDir, "app.js.main.template"), StandardCharsets.UTF_8); - String actionStringTemplate = FileUtils.readFileToString(new File(templateDir, "app.js.action.template"), StandardCharsets.UTF_8); - - for (EffectRequestHandler effect : effects) { - System.out.println("Generating app.js section for " + effect.getEffectName()); - Map props = effect.getProperties(); - Map actionReplaceMap = new HashMap<>(); - actionReplaceMap.put("constName", effect.getEffectSlug()); - actionReplaceMap.put("lowercase", effect.getEffectSlug().toLowerCase()); - actionReplaceMap.put("slug", effect.getEffectSlug()); - - onConnectBuilder.append(actionReplaceMap.get("constName")).append(".onConnect(jsn);\n"); - - // Create "settingsDefault", "settingsIfCheck", and "setParams" replacement. - StringBuilder settingsDefaultsBuilder = new StringBuilder(); - StringBuilder settingsIfCheckBuilder = new StringBuilder(); - StringBuilder setParamsBuilder = new StringBuilder(); - String bodyProp = null; - for (String key : props.keySet()) { - EffectProperty prop = effect.getProperty(key); - if (prop.getPropType().equals(EffectProperty.PropertyType.BODY)) { - bodyProp = key; - } - if (prop.getPropType() != EffectProperty.PropertyType.COMMENT) { - settingsDefaultsBuilder.append("this.settings.").append(key).append("= '").append(prop.getAsString()).append("';\n"); - - // If required and not set, use a default value. - if (prop.isRequired()) - settingsIfCheckBuilder.append("if (!jsn.payload.settings.").append(key).append(") { jsn.payload.settings.").append(key).append(" = '").append(props.get(key).getAsString()).append("'; }"); - - if (prop.getPropType() != EffectProperty.PropertyType.BODY) - setParamsBuilder.append("url.searchParams.set('").append(key).append("', (jsn.payload.settings.").append(key).append(" ? jsn.payload.settings.").append(key).append(" : ''));\n"); - } - } - actionReplaceMap.put("settingsDefaults", settingsDefaultsBuilder.toString()); - actionReplaceMap.put("setParams", setParamsBuilder.toString()); - actionReplaceMap.put("settingsIfCheck", settingsIfCheckBuilder.toString()); - - // Create "sendRequest" replacement. - if (bodyProp == null) { - actionReplaceMap.put("sendRequest", "fetch(url).then(response => {\n" + - " console.log(\"DEBUG yay\", response);\n" + - " if (response.status == 200) $SD.api.showOk(jsn.context);\n" + - " else {\n" + - " console.log(\"Request Failed\", response);\n" + - " $SD.api.showAlert(jsn.context);\n" + - " }\n" + - " }, reason => {\n" + - " console.log(\"DEBUG fail\", reason);\n" + - " $SD.api.showAlert(jsn.context);\n" + - " });"); - } else { - StringBuilder sendRequestBuilder = new StringBuilder(); - sendRequestBuilder.append("fetch(url, {method: 'POST', body: jsn.payload.settings." + bodyProp + " ? '" + bodyProp + "=' + jsn.payload.settings." + bodyProp + " : ''}).then(response => {\n" + - " console.log(\"DEBUG yay\", response);\n" + - " if (response.status == 200) $SD.api.showOk(jsn.context);\n" + - " else {\n" + - " console.log(\"Request Failed\", response);\n" + - " $SD.api.showAlert(jsn.context);\n" + - " }\n" + - " }, reason => {\n" + - " console.log(\"DEBUG fail\", reason);\n" + - " $SD.api.showAlert(jsn.context);\n" + - " });"); - actionReplaceMap.put("sendRequest", sendRequestBuilder.toString()); - } - - StringSubstitutor stringSub = new StringSubstitutor(actionReplaceMap); - actionsStringBuilder.append(stringSub.replace(actionStringTemplate)); - - } - - replaceMap.put("onConnect", onConnectBuilder.toString()); - replaceMap.put("actions", actionsStringBuilder.toString()); - - StringSubstitutor appJsStringSub = new StringSubstitutor(replaceMap); - String appJs = appJsStringSub.replace(appJsTemplate); - - System.out.println("Writing app.js"); - FileUtils.write(new File(pluginDir, "app.js"), appJs, Charset.defaultCharset()); - } - - private static void writeManifest(File pluginDir, List effects) throws IOException { - System.out.println("Generating Manifest"); - Manifest manifest = new Manifest(); - manifest.SDKVersion = 2; - manifest.Author = "MoSadie"; - manifest.CodePath = "index.html"; - manifest.PropertyInspectorPath = "propertyinspector/index.html"; - manifest.Description = "Trigger effects in Minecraft. Minecraft mod required."; - manifest.Name = "EffectMC"; - manifest.Category = "EffectMC"; - manifest.CategoryIcon = "images/joinserver/actionImage"; - manifest.Icon = "images/joinserver/keyIcon"; - manifest.URL = "https://github.com/MoSadie/EffectMC"; - manifest.Version = RootHandler.class.getPackage().getImplementationVersion(); - - Manifest.OS windows = new Manifest.OS(); - windows.Platform = "windows"; - windows.MinimumVersion = "10"; - - Manifest.OS mac = new Manifest.OS(); - mac.Platform = "mac"; - mac.MinimumVersion = "10.11"; - - manifest.OS = new Manifest.OS[] {mac, windows}; - - Manifest.Software software = new Manifest.Software(); - software.MinimumVersion = "4.1"; - manifest.Software = software; - - List actionList = new ArrayList<>(); - - for (EffectRequestHandler effect : effects) { - Manifest.Action action = new Manifest.Action(); - - action.Icon = "images/" + effect.getEffectSlug() + "/actionImage"; - action.Name = effect.getEffectName(); - action.States = new Manifest.Action.State[] { new Manifest.Action.State("images/" + effect.getEffectSlug() + "/keyIcon")}; - action.Tooltip = effect.getEffectTooltip(); - action.UUID = "com.mosadie.effectmc." + effect.getEffectSlug(); - action.PropertyInspectorPath = "propertyinspector/" + effect.getEffectSlug() + "_pi.html"; - - actionList.add(action); - } - - manifest.Actions = actionList.toArray(new Manifest.Action[0]); - - Gson gson = new GsonBuilder().setPrettyPrinting().create(); - String json = gson.toJson(manifest); - - System.out.println("Writing manifest"); - FileUtils.write(new File(pluginDir, "manifest.json"), json, Charset.defaultCharset()); - } - - private static void writeStaticResources(File pluginDir) throws URISyntaxException, IOException { - System.out.println("Copying static resources"); - File staticDir = new File(StreamDeckPluginGen.class.getClassLoader().getResource("static").toURI()); - - FileUtils.copyDirectory(staticDir, pluginDir, new ExcludePDNFiles()); - } - - private static class ExcludePDNFiles implements FileFilter { - - @Override - public boolean accept(File pathname) { - return !pathname.getAbsolutePath().endsWith(".pdn"); - } - } - - static class Manifest { - Action[] Actions; - int SDKVersion; - String Author; - String CodePath; - String PropertyInspectorPath; - String Description; - String Name; - String Category; - String CategoryIcon; - String Icon; - String URL; - String Version; - OS[] OS; - Software Software; - - static class Action { - String Icon; - String Name; - State[] States; - String Tooltip; - String UUID; - String PropertyInspectorPath; - - static class State { - String Image; - - public State(String image) { - this.Image = image; - } - } - } - - static class OS { - String Platform; - String MinimumVersion; - } - - static class Software { - String MinimumVersion; - } - } -} diff --git a/StreamDeckPlugin/src/main/resources/static/index.html b/StreamDeckPlugin/src/main/resources/static/index.html deleted file mode 100644 index 4d3f530..0000000 --- a/StreamDeckPlugin/src/main/resources/static/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - com.mosadie.effectmc - - - - - - - - - - \ No newline at end of file diff --git a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/caret.svg b/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/caret.svg deleted file mode 100644 index b69162a..0000000 --- a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/caret.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/check.png b/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/check.png deleted file mode 100644 index b5e9e62..0000000 Binary files a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/check.png and /dev/null differ diff --git a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/check.svg b/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/check.svg deleted file mode 100644 index 5b96af0..0000000 --- a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/check.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/elg_calendar.svg b/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/elg_calendar.svg deleted file mode 100644 index 157e01b..0000000 --- a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/elg_calendar.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/elg_calendar_inv.svg b/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/elg_calendar_inv.svg deleted file mode 100644 index 4f8af68..0000000 --- a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/elg_calendar_inv.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/g_d8d8d8.svg b/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/g_d8d8d8.svg deleted file mode 100644 index d990314..0000000 --- a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/g_d8d8d8.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/rcheck.svg b/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/rcheck.svg deleted file mode 100644 index af478ee..0000000 --- a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/rcheck.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/sdpi.css b/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/sdpi.css deleted file mode 100644 index 4d79203..0000000 --- a/StreamDeckPlugin/src/main/resources/static/propertyinspector/css/sdpi.css +++ /dev/null @@ -1,1572 +0,0 @@ -:root { - --sdpi-bgcolor: #2D2D2D; - --sdpi-background: #3D3D3D; - --sdpi-color: #d8d8d8; - --sdpi-bordercolor: #3a3a3a; - --sdpi-buttonbordercolor: #969696; - --sdpi-borderradius: 0px; - --sdpi-width: 224px; - --sdpi-fontweight: 600; - --sdpi-letterspacing: -0.25pt; -} - -html { - --sdpi-bgcolor: #2D2D2D; - --sdpi-background: #3D3D3D; - --sdpi-color: #d8d8d8; - --sdpi-bordercolor: #3a3a3a; - --sdpi-buttonbordercolor: #969696; - --sdpi-borderradius: 0px; - --sdpi-width: 224px; - --sdpi-fontweight: 600; - --sdpi-letterspacing: -0.25pt; - height: 100%; - width: 100%; - overflow: hidden; - touch-action:none; -} - -html, body { - font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-size: 9pt; - background-color: var(--sdpi-bgcolor); - color: #9a9a9a; -} - -body { - height: 100%; - padding: 0; - overflow-x: hidden; - overflow-y: auto; - margin: 0; - -webkit-overflow-scrolling: touch; - -webkit-text-size-adjust: 100%; - -webkit-font-smoothing: antialiased; -} - -mark { - background-color: var(--sdpi-bgcolor); - color: var(--sdpi-color); -} - -hr, hr2 { - -webkit-margin-before: 1em; - -webkit-margin-after: 1em; - border-style: none; - background: var(--sdpi-background); - height: 1px; -} - -hr2, -.sdpi-heading { - display: flex; - flex-basis: 100%; - align-items: center; - color: inherit; - font-size: 9pt; - margin: 8px 0px; -} - -.sdpi-heading::before, -.sdpi-heading::after { - content: ""; - flex-grow: 1; - background: var(--sdpi-background); - height: 1px; - font-size: 0px; - line-height: 0px; - margin: 0px 16px; -} - -hr2 { - height: 2px; -} - -hr, hr2 { - margin-left:16px; - margin-right:16px; -} - -.sdpi-item-value, -option, -input, -select, -button { - font-size: 10pt; - font-weight: var(--sdpi-fontweight); - letter-spacing: var(--sdpi-letterspacing); -} - - - -.win .sdpi-item-value, -.win option, -.win input, -.win select, -.win button { - font-size: 11px; - font-style: normal; - letter-spacing: inherit; - font-weight: 100; -} - -.win button { - font-size: 12px; -} - -::-webkit-progress-value, -meter::-webkit-meter-optimum-value { - border-radius: 2px; - /* background: linear-gradient(#ccf, #99f 20%, #77f 45%, #77f 55%, #cdf); */ -} - -::-webkit-progress-bar, -meter::-webkit-meter-bar { - border-radius: 3px; - background: var(--sdpi-background); -} - -::-webkit-progress-bar:active, -meter::-webkit-meter-bar:active { - border-radius: 3px; - background: #222222; -} -::-webkit-progress-value:active, -meter::-webkit-meter-optimum-value:active { - background: #99f; -} - -progress, -progress.sdpi-item-value { - min-height: 5px !important; - height: 5px; - background-color: #303030; -} - -progress { - margin-top: 8px !important; - margin-bottom: 8px !important; -} - -.full progress, -progress.full { - margin-top: 3px !important; -} - -::-webkit-progress-inner-element { - background-color: transparent; -} - - -.sdpi-item[type="progress"] { - margin-top: 4px !important; - margin-bottom: 12px; - min-height: 15px; -} - -.sdpi-item-child.full:last-child { - margin-bottom: 4px; -} - -.tabs { - /** - * Setting display to flex makes this container lay - * out its children using flexbox, the exact same - * as in the above "Stepper input" example. - */ - display: flex; - - border-bottom: 1px solid #D7DBDD; -} - -.tab { - cursor: pointer; - padding: 5px 30px; - color: #16a2d7; - font-size: 9pt; - border-bottom: 2px solid transparent; -} - -.tab.is-tab-selected { - border-bottom-color: #4ebbe4; -} - -select { - -webkit-appearance: none; - -moz-appearance: none; - -o-appearance: none; - appearance: none; - background: url(caret.svg) no-repeat 97% center; -} - -label.sdpi-file-label, -input[type="button"], -input[type="submit"], -input[type="reset"], -input[type="file"], -input[type=file]::-webkit-file-upload-button, -button, -select { - color: var(--sdpi-color); - border: 1pt solid #303030; - font-size: 8pt; - background-color: var(--sdpi-background); - border-radius: var(--sdpi-borderradius); -} - -label.sdpi-file-label, -input[type="button"], -input[type="submit"], -input[type="reset"], -input[type="file"], -input[type=file]::-webkit-file-upload-button, -button { - border: 1pt solid var(--sdpi-buttonbordercolor); - border-radius: var(--sdpi-borderradius); - border-color: var(--sdpi-buttonbordercolor); - min-height: 23px !important; - height: 23px !important; - margin-right: 8px; -} - -input[type=number]::-webkit-inner-spin-button, -input[type=number]::-webkit-outer-spin-button { - -webkit-appearance: none; - margin: 0; -} - -input[type="file"] { - border-radius: var(--sdpi-borderradius); - max-width: 220px; -} - -option { - height: 1.5em; - padding: 4px; -} - -/* SDPI */ - -.sdpi-wrapper { - overflow-x: hidden; - height: 100%; -} - -.sdpi-item { - display: flex; - flex-direction: row; - min-height: 32px; - align-items: center; - margin-top: 2px; - max-width: 344px; - -webkit-user-drag: none; -} - -.sdpi-item:first-child { - margin-top:-1px; -} - -.sdpi-item:last-child { - margin-bottom: 0px; -} - -.sdpi-item > *:not(.sdpi-item-label):not(meter):not(details):not(canvas) { - min-height: 26px; - padding: 0px 4px 0px 4px; -} - -.sdpi-item > *:not(.sdpi-item-label.empty):not(meter) { - min-height: 26px; - padding: 0px 4px 0px 4px; -} - - -.sdpi-item-group { - padding: 0 !important; -} - -meter.sdpi-item-value { - margin-left: 6px; -} - -.sdpi-item[type="group"] { - display: block; - margin-top: 12px; - margin-bottom: 12px; - /* border: 1px solid white; */ - flex-direction: unset; - text-align: left; -} - -.sdpi-item[type="group"] > .sdpi-item-label, -.sdpi-item[type="group"].sdpi-item-label { - width: 96%; - text-align: left; - font-weight: 700; - margin-bottom: 4px; - padding-left: 4px; -} - -dl, -ul, -ol { - -webkit-margin-before: 0px; - -webkit-margin-after: 4px; - -webkit-padding-start: 1em; - max-height: 90px; - overflow-y: scroll; - cursor: pointer; - user-select: none; -} - -table.sdpi-item-value, -dl.sdpi-item-value, -ul.sdpi-item-value, -ol.sdpi-item-value { - -webkit-margin-before: 4px; - -webkit-margin-after: 8px; - -webkit-padding-start: 1em; - width: var(--sdpi-width); - text-align: center; -} - -table > caption { - margin: 2px; -} - -.list, -.sdpi-item[type="list"] { - align-items: baseline; -} - -.sdpi-item-label { - text-align: right; - flex: none; - width: 94px; - padding-right: 4px; - font-weight: 600; - -webkit-user-select: none; -} - -.win .sdpi-item-label, -.sdpi-item-label > small{ - font-weight: normal; -} - -.sdpi-item-label:after { - content: ": "; -} - -.sdpi-item-label.empty:after { - content: ""; -} - -.sdpi-test, -.sdpi-item-value { - flex: 1 0 0; - /* flex-grow: 1; - flex-shrink: 0; */ - margin-right: 14px; - margin-left: 4px; - justify-content: space-evenly; -} - -canvas.sdpi-item-value { - max-width: 144px; - max-height: 144px; - width: 144px; - height: 144px; - margin: 0 auto; - cursor: pointer; -} - -input.sdpi-item-value { - margin-left: 5px; -} - -.sdpi-item-value button, -button.sdpi-item-value { - margin-left: 6px; - margin-right: 14px; -} - -.sdpi-item-value.range { - margin-left: 0px; -} - -table, -dl.sdpi-item-value, -ul.sdpi-item-value, -ol.sdpi-item-value, -.sdpi-item-value > dl, -.sdpi-item-value > ul, -.sdpi-item-value > ol -{ - list-style-type: none; - list-style-position: outside; - margin-left: -4px; - margin-right: -4px; - padding: 4px; - border: 1px solid var(--sdpi-bordercolor); -} - -dl.sdpi-item-value, -ul.sdpi-item-value, -ol.sdpi-item-value, -.sdpi-item-value > ol { - list-style-type: none; - list-style-position: inside; - margin-left: 5px; - margin-right: 12px; - padding: 4px !important; - display: flex; - flex-direction: column; -} - -.two-items li { - display: flex; -} -.two-items li > *:first-child { - flex: 0 0 50%; - text-align: left; -} -.two-items.thirtyseventy li > *:first-child { - flex: 0 0 30%; -} - -ol.sdpi-item-value, -.sdpi-item-value > ol[listtype="none"] { - list-style-type: none; -} -ol.sdpi-item-value[type="decimal"], -.sdpi-item-value > ol[type="decimal"] { - list-style-type: decimal; -} - -ol.sdpi-item-value[type="decimal-leading-zero"], -.sdpi-item-value > ol[type="decimal-leading-zero"] { - list-style-type: decimal-leading-zero; -} - -ol.sdpi-item-value[type="lower-alpha"], -.sdpi-item-value > ol[type="lower-alpha"] { - list-style-type: lower-alpha; -} - -ol.sdpi-item-value[type="upper-alpha"], -.sdpi-item-value > ol[type="upper-alpha"] { - list-style-type: upper-alpha; -} - -ol.sdpi-item-value[type="upper-roman"], -.sdpi-item-value > ol[type="upper-roman"] { - list-style-type: upper-roman; -} - -ol.sdpi-item-value[type="lower-roman"], -.sdpi-item-value > ol[type="lower-roman"] { - list-style-type: upper-roman; -} - -tr:nth-child(even), -.sdpi-item-value > ul > li:nth-child(even), -.sdpi-item-value > ol > li:nth-child(even), -li:nth-child(even) { - background-color: rgba(0,0,0,.2) -} - -td:hover, -.sdpi-item-value > ul > li:hover:nth-child(even), -.sdpi-item-value > ol > li:hover:nth-child(even), -li:hover:nth-child(even), -li:hover { - background-color: rgba(255,255,255,.1); -} - -td.selected, -td.selected:hover, -li.selected:hover, -li.selected { - color: white; - background-color: #77f; -} - -tr { - border: 1px solid var(--sdpi-bordercolor); -} - -td { - border-right: 1px solid var(--sdpi-bordercolor); - -webkit-user-select: none; -} - -tr:last-child, -td:last-child { - border: none; -} - -.sdpi-item-value.select, -.sdpi-item-value > select { - margin-right: 13px; - margin-left: 4px; -} - -.sdpi-item-child, -.sdpi-item-group > .sdpi-item > input[type="color"] { - margin-top: 0.4em; - margin-right: 4px; -} - -.full, -.full *, -.sdpi-item-value.full, -.sdpi-item-child > full > *, -.sdpi-item-child.full, -.sdpi-item-child.full > *, -.full > .sdpi-item-child, -.full > .sdpi-item-child > *{ - display: flex; - flex: 1 1 0; - margin-bottom: 4px; - margin-left: 0px; - width: 100%; - - justify-content: space-evenly; -} - -.sdpi-item-group > .sdpi-item > input[type="color"] { - margin-top: 0px; -} - -::-webkit-calendar-picker-indicator:focus, -input[type=file]::-webkit-file-upload-button:focus, -button:focus, -textarea:focus, -input:focus, -select:focus, -option:focus, -details:focus, -summary:focus, -.custom-select select { - outline: none; -} - -summary { - cursor: default; - -webkit-user-select: none; -} - -.pointer, -summary .pointer { - cursor: pointer; -} - -details * { - font-size: 12px; - font-weight: normal; -} - -details.message { - padding: 4px 18px 4px 12px; -} - -details.message summary { - font-size: 10pt; - font-weight: 600; - min-height: 18px; -} - -details.message:first-child { - margin-top: 4px; - margin-left: 0; - padding-left: 102px; -} - -details.message h1 { - text-align: left; -} - -.message > summary::-webkit-details-marker { - display: none; -} - -.info20, -.question, -.caution, -.info { - background-repeat: no-repeat; - background-position: 72px center; -} - -.info20 { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23999' d='M10,20 C4.4771525,20 0,15.5228475 0,10 C0,4.4771525 4.4771525,0 10,0 C15.5228475,0 20,4.4771525 20,10 C20,15.5228475 15.5228475,20 10,20 Z M10,8 C8.8954305,8 8,8.84275812 8,9.88235294 L8,16.1176471 C8,17.1572419 8.8954305,18 10,18 C11.1045695,18 12,17.1572419 12,16.1176471 L12,9.88235294 C12,8.84275812 11.1045695,8 10,8 Z M10,3 C8.8954305,3 8,3.88165465 8,4.96923077 L8,5.03076923 C8,6.11834535 8.8954305,7 10,7 C11.1045695,7 12,6.11834535 12,5.03076923 L12,4.96923077 C12,3.88165465 11.1045695,3 10,3 Z'/%3E%3C/svg%3E%0A"); -} - -.info { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23999' d='M10,18 C5.581722,18 2,14.418278 2,10 C2,5.581722 5.581722,2 10,2 C14.418278,2 18,5.581722 18,10 C18,14.418278 14.418278,18 10,18 Z M10,8 C9.44771525,8 9,8.42137906 9,8.94117647 L9,14.0588235 C9,14.5786209 9.44771525,15 10,15 C10.5522847,15 11,14.5786209 11,14.0588235 L11,8.94117647 C11,8.42137906 10.5522847,8 10,8 Z M10,5 C9.44771525,5 9,5.44082732 9,5.98461538 L9,6.01538462 C9,6.55917268 9.44771525,7 10,7 C10.5522847,7 11,6.55917268 11,6.01538462 L11,5.98461538 C11,5.44082732 10.5522847,5 10,5 Z'/%3E%3C/svg%3E%0A"); -} - -.info2 { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 15 15'%3E%3Cpath fill='%23999' d='M7.5,15 C3.35786438,15 0,11.6421356 0,7.5 C0,3.35786438 3.35786438,0 7.5,0 C11.6421356,0 15,3.35786438 15,7.5 C15,11.6421356 11.6421356,15 7.5,15 Z M7.5,2 C6.67157287,2 6,2.66124098 6,3.47692307 L6,3.52307693 C6,4.33875902 6.67157287,5 7.5,5 C8.32842705,5 9,4.33875902 9,3.52307693 L9,3.47692307 C9,2.66124098 8.32842705,2 7.5,2 Z M5,6 L5,7.02155172 L6,7 L6,12 L5,12.0076778 L5,13 L10,13 L10,12 L9,12.0076778 L9,6 L5,6 Z'/%3E%3C/svg%3E%0A"); -} - -.sdpi-more-info { - background-image: linear-gradient(to right, #00000000 0%,#00000040 80%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpolygon fill='%23999' points='4 7 8 7 8 5 12 8 8 11 8 9 4 9'/%3E%3C/svg%3E%0A"); -} -.caution { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23999' fill-rule='evenodd' d='M9.03952676,0.746646542 C9.57068894,-0.245797319 10.4285735,-0.25196227 10.9630352,0.746646542 L19.7705903,17.2030214 C20.3017525,18.1954653 19.8777595,19 18.8371387,19 L1.16542323,19 C0.118729947,19 -0.302490098,18.2016302 0.231971607,17.2030214 L9.03952676,0.746646542 Z M10,2.25584053 L1.9601405,17.3478261 L18.04099,17.3478261 L10,2.25584053 Z M10,5.9375 C10.531043,5.9375 10.9615385,6.37373537 10.9615385,6.91185897 L10.9615385,11.6923077 C10.9615385,12.2304313 10.531043,12.6666667 10,12.6666667 C9.46895697,12.6666667 9.03846154,12.2304313 9.03846154,11.6923077 L9.03846154,6.91185897 C9.03846154,6.37373537 9.46895697,5.9375 10,5.9375 Z M10,13.4583333 C10.6372516,13.4583333 11.1538462,13.9818158 11.1538462,14.6275641 L11.1538462,14.6641026 C11.1538462,15.3098509 10.6372516,15.8333333 10,15.8333333 C9.36274837,15.8333333 8.84615385,15.3098509 8.84615385,14.6641026 L8.84615385,14.6275641 C8.84615385,13.9818158 9.36274837,13.4583333 10,13.4583333 Z'/%3E%3C/svg%3E%0A"); -} - -.question { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23999' d='M10,18 C5.581722,18 2,14.418278 2,10 C2,5.581722 5.581722,2 10,2 C14.418278,2 18,5.581722 18,10 C18,14.418278 14.418278,18 10,18 Z M6.77783203,7.65332031 C6.77783203,7.84798274 6.85929281,8.02888914 7.0222168,8.19604492 C7.18514079,8.36320071 7.38508996,8.44677734 7.62207031,8.44677734 C8.02409055,8.44677734 8.29703704,8.20768468 8.44091797,7.72949219 C8.59326248,7.27245865 8.77945854,6.92651485 8.99951172,6.69165039 C9.2195649,6.45678594 9.56233491,6.33935547 10.027832,6.33935547 C10.4256205,6.33935547 10.7006836,6.37695313 11.0021973,6.68847656 C11.652832,7.53271484 10.942627,8.472229 10.3750916,9.1321106 C9.80755615,9.79199219 8.29492188,11.9897461 10.027832,12.1347656 C10.4498423,12.1700818 10.7027991,11.9147157 10.7832031,11.4746094 C11.0021973,9.59857178 13.1254883,8.82415771 13.1254883,7.53271484 C13.1254883,7.07568131 12.9974785,6.65250846 12.7414551,6.26318359 C12.4854317,5.87385873 12.1225609,5.56600048 11.652832,5.33959961 C11.1831031,5.11319874 10.6414419,5 10.027832,5 C9.36767248,5 8.79004154,5.13541531 8.29492187,5.40625 C7.79980221,5.67708469 7.42317837,6.01879677 7.16503906,6.43139648 C6.90689975,6.8439962 6.77783203,7.25130007 6.77783203,7.65332031 Z M10.0099668,15 C10.2713191,15 10.5016601,14.9108147 10.7009967,14.7324415 C10.9003332,14.5540682 11,14.3088087 11,13.9966555 C11,13.7157177 10.9047629,13.4793767 10.7142857,13.2876254 C10.5238086,13.0958742 10.2890379,13 10.0099668,13 C9.72646591,13 9.48726565,13.0958742 9.2923588,13.2876254 C9.09745196,13.4793767 9,13.7157177 9,13.9966555 C9,14.313268 9.10077419,14.5596424 9.30232558,14.735786 C9.50387698,14.9119295 9.73975502,15 10.0099668,15 Z'/%3E%3C/svg%3E%0A"); -} - - -.sdpi-more-info { - position: fixed; - left: 0px; - right: 0px; - bottom: 0px; - min-height:16px; - padding-right: 16px; - text-align: right; - -webkit-touch-callout: none; - cursor: pointer; - user-select: none; - background-position: right center; - background-repeat: no-repeat; - border-radius: var(--sdpi-borderradius); - text-decoration: none; - color: var(--sdpi-color); -} - -.sdpi-more-info-button { - display: flex; - align-self: right; - margin-left: auto; - position: fixed; - right: 17px; - bottom: 0px; - user-select: none; -} - - -.sdpi-bottom-bar { - display: flex; - align-self: right; - margin-left: auto; - position: fixed; - right: 17px; - bottom: 0px; - user-select: none; -} - -.sdpi-bottom-bar.right { - right: 0px; -} - -.sdpi-bottom-bar button { - min-height: 20px !important; - height: 20px !important; -} - -details a { - background-position: right !important; - min-height: 24px; - display: inline-block; - line-height: 24px; - padding-right: 28px; -} - - -input:not([type="range"]), -textarea { - -webkit-appearance: none; - background: var(--sdpi-background); - color: var(--sdpi-color); - font-weight: normal; - font-size: 9pt; - border: none; - margin-top: 2px; - margin-bottom: 2px; - min-width: 219px; -} - -textarea + label { - display: flex; - justify-content: flex-end -} -input[type="radio"], -input[type="checkbox"] { - display: none; -} -input[type="radio"] + label, -input[type="checkbox"] + label { - font-size: 9pt; - color: var(--sdpi-color); - font-weight: normal; - margin-right: 8px; - -webkit-user-select: none; -} - -input[type="radio"] + label:after, -input[type="checkbox"] + label:after { - content: " " !important; -} - -.sdpi-item[type="radio"] > .sdpi-item-value, -.sdpi-item[type="checkbox"] > .sdpi-item-value { - padding-top: 2px; -} - -.sdpi-item[type="checkbox"] > .sdpi-item-value > * { - margin-top: 4px; -} - -.sdpi-item[type="checkbox"] .sdpi-item-child, -.sdpi-item[type="radio"] .sdpi-item-child { - display: inline-block; -} - -.sdpi-item[type="range"] .sdpi-item-value, -.sdpi-item[type="meter"] .sdpi-item-child, -.sdpi-item[type="progress"] .sdpi-item-child { - display: flex; -} - -.sdpi-item[type="range"] .sdpi-item-value { - min-height: 26px; -} - -.sdpi-item[type="range"] .sdpi-item-value span, -.sdpi-item[type="meter"] .sdpi-item-child span, -.sdpi-item[type="progress"] .sdpi-item-child span { - margin-top: -2px; - min-width: 8px; - text-align: right; - user-select: none; - cursor: pointer; - -webkit-user-select: none; - user-select: none; -} - -.sdpi-item[type="range"] .sdpi-item-value span { - margin-top: 7px; - text-align: right; -} - -span + input[type="range"] { - display: flex; - max-width: 168px; - -} - -.sdpi-item[type="range"] .sdpi-item-value span:first-child, -.sdpi-item[type="meter"] .sdpi-item-child span:first-child, -.sdpi-item[type="progress"] .sdpi-item-child span:first-child { - margin-right: 4px; -} - -.sdpi-item[type="range"] .sdpi-item-value span:last-child, -.sdpi-item[type="meter"] .sdpi-item-child span:last-child, -.sdpi-item[type="progress"] .sdpi-item-child span:last-child { - margin-left: 4px; -} - -.reverse { - transform: rotate(180deg); -} - -.sdpi-item[type="meter"] .sdpi-item-child meter + span:last-child { - margin-left: -10px; -} - -.sdpi-item[type="progress"] .sdpi-item-child meter + span:last-child { - margin-left: -14px; -} - -.sdpi-item[type="radio"] > .sdpi-item-value > * { - margin-top: 2px; -} - -details { - padding: 8px 18px 8px 12px; - min-width: 86px; -} - -details > h4 { - border-bottom: 1px solid var(--sdpi-bordercolor); -} - -legend { - display: none; -} -.sdpi-item-value > textarea { - padding: 0px; - width: 219px; - margin-left: 1px; - margin-top: 3px; - padding: 4px; -} - -input[type="radio"] + label span, -input[type="checkbox"] + label span { - display: inline-block; - width: 16px; - height: 16px; - margin: 2px 4px 2px 0; - border-radius: 3px; - vertical-align: middle; - background: var(--sdpi-background); - cursor: pointer; - border: 1px solid rgb(0,0,0,.2); -} - -input[type="radio"] + label span { - border-radius: 100%; -} - -input[type="radio"]:checked + label span, -input[type="checkbox"]:checked + label span { - background-color: #77f; - background-image: url(check.svg); - background-repeat: no-repeat; - background-position: center center; - border: 1px solid rgb(0,0,0,.4); -} - -input[type="radio"]:active:checked + label span, -input[type="radio"]:active + label span, -input[type="checkbox"]:active:checked + label span, -input[type="checkbox"]:active + label span { - background-color: #303030; -} - -input[type="radio"]:checked + label span { - background-image: url(rcheck.svg); -} - -input[type="range"] { - width: var(--sdpi-width); - height: 30px; - overflow: hidden; - cursor: pointer; - background: transparent !important; -} - -.sdpi-item > input[type="range"] { - margin-left: 2px; - max-width: var(--sdpi-width); - width: var(--sdpi-width); - padding: 0px; - margin-top: 2px; -} - -/* -input[type="range"], -input[type="range"]::-webkit-slider-runnable-track, -input[type="range"]::-webkit-slider-thumb { - -webkit-appearance: none; -} -*/ - -input[type="range"]::-webkit-slider-runnable-track { - height: 5px; - background: #979797; - border-radius: 3px; - padding:0px !important; - border: 1px solid var(--sdpi-background); -} - -input[type="range"]::-webkit-slider-thumb { - position: relative; - -webkit-appearance: none; - background-color: var(--sdpi-color); - width: 12px; - height: 12px; - border-radius: 20px; - margin-top: -5px; - border: none; -} -input[type="range" i]{ - margin: 0; -} - -input[type="range"]::-webkit-slider-thumb::before { - position: absolute; - content: ""; - height: 5px; /* equal to height of runnable track or 1 less */ - width: 500px; /* make this bigger than the widest range input element */ - left: -502px; /* this should be -2px - width */ - top: 8px; /* don't change this */ - background: #77f; -} - -input[type="color"] { - min-width: 32px; - min-height: 32px; - width: 32px; - height: 32px; - padding: 0; - background-color: var(--sdpi-bgcolor); - flex: none; -} - -::-webkit-color-swatch { - min-width: 24px; -} - -textarea { - height: 3em; - word-break: break-word; - line-height: 1.5em; -} - -.textarea { - padding: 0px !important; -} - -textarea { - width: 219px; /*98%;*/ - height: 96%; - min-height: 6em; - resize: none; - border-radius: var(--sdpi-borderradius); -} - -/* CAROUSEL */ - -.sdpi-item[type="carousel"]{ - -} - -.sdpi-item.card-carousel-wrapper, -.sdpi-item > .card-carousel-wrapper { - padding: 0; -} - - -.card-carousel-wrapper { - display: flex; - align-items: center; - justify-content: center; - margin: 12px auto; - color: #666a73; -} - -.card-carousel { - display: flex; - justify-content: center; - width: 278px; -} -.card-carousel--overflow-container { - overflow: hidden; -} -.card-carousel--nav__left, -.card-carousel--nav__right { - /* display: inline-block; */ - width: 12px; - height: 12px; - border-top: 2px solid #42b883; - border-right: 2px solid #42b883; - cursor: pointer; - margin: 0 4px; - transition: transform 150ms linear; -} -.card-carousel--nav__left[disabled], -.card-carousel--nav__right[disabled] { - opacity: 0.2; - border-color: black; -} -.card-carousel--nav__left { - transform: rotate(-135deg); -} -.card-carousel--nav__left:active { - transform: rotate(-135deg) scale(0.85); -} -.card-carousel--nav__right { - transform: rotate(45deg); -} -.card-carousel--nav__right:active { - transform: rotate(45deg) scale(0.85); -} -.card-carousel-cards { - display: flex; - transition: transform 150ms ease-out; - transform: translatex(0px); -} -.card-carousel-cards .card-carousel--card { - margin: 0 5px; - cursor: pointer; - /* box-shadow: 0 4px 15px 0 rgba(40, 44, 53, 0.06), 0 2px 2px 0 rgba(40, 44, 53, 0.08); */ - background-color: #fff; - border-radius: 4px; - z-index: 3; -} -.xxcard-carousel-cards .card-carousel--card:first-child { - margin-left: 0; -} -.xxcard-carousel-cards .card-carousel--card:last-child { - margin-right: 0; -} -.card-carousel-cards .card-carousel--card img { - vertical-align: bottom; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - transition: opacity 150ms linear; - width: 60px; -} -.card-carousel-cards .card-carousel--card img:hover { - opacity: 0.5; -} -.card-carousel-cards .card-carousel--card--footer { - border-top: 0; - max-width: 80px; - overflow: hidden; - display: flex; - height: 100%; - flex-direction: column; -} -.card-carousel-cards .card-carousel--card--footer p { - padding: 3px 0; - margin: 0; - margin-bottom: 2px; - font-size: 15px; - font-weight: 500; - color: #2c3e50; -} -.card-carousel-cards .card-carousel--card--footer p:nth-of-type(2) { - font-size: 12px; - font-weight: 300; - padding: 6px; - color: #666a73; -} - - -h1 { - font-size: 1.3em; - font-weight: 500; - text-align: center; - margin-bottom: 12px; -} - -::-webkit-datetime-edit { - font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - background: url(elg_calendar_inv.svg) no-repeat left center; - padding-right: 1em; - padding-left: 25px; - background-position: 4px 0px; - } -::-webkit-datetime-edit-fields-wrapper { - - } -::-webkit-datetime-edit-text { padding: 0 0.3em; } -::-webkit-datetime-edit-month-field { } -::-webkit-datetime-edit-day-field {} -::-webkit-datetime-edit-year-field {} -::-webkit-inner-spin-button { - - /* display: none; */ - } -::-webkit-calendar-picker-indicator { - background: transparent; - font-size: 17px; -} - -::-webkit-calendar-picker-indicator:focus { - background-color: rgba(0,0,0,0.2); -} - -input[type="date"] { - -webkit-align-items: center; - display: -webkit-inline-flex; - font-family: monospace; - overflow: hidden; - padding: 0; - -webkit-padding-start: 1px; -} - -input::-webkit-datetime-edit { - -webkit-flex: 1; - -webkit-user-modify: read-only !important; - display: inline-block; - min-width: 0; - overflow: hidden; -} - -/* -input::-webkit-datetime-edit-fields-wrapper { - -webkit-user-modify: read-only !important; - display: inline-block; - padding: 1px 0; - white-space: pre; - -} -*/ - -/* -input[type="date"] { - background-color: red; - outline: none; -} - -input[type="date"]::-webkit-clear-button { - font-size: 18px; - height: 30px; - position: relative; -} - -input[type="date"]::-webkit-inner-spin-button { - height: 28px; -} - -input[type="date"]::-webkit-calendar-picker-indicator { - font-size: 15px; -} */ - -input[type="file"] { - opacity: 0; - display: none; -} - -.sdpi-item > input[type="file"] { - opacity: 1; - display: flex; -} - -input[type="file"] + span { - display: flex; - flex: 0 1 auto; - background-color: #0000ff50; -} - -label.sdpi-file-label { - cursor: pointer; - user-select: none; - display: inline-block; - min-height: 21px !important; - height: 21px !important; - line-height: 20px; - padding: 0px 4px; - margin: auto; - margin-right: 0px; - float:right; -} - -.sdpi-file-label > label:active, -.sdpi-file-label.file:active, -label.sdpi-file-label:active, -label.sdpi-file-info:active, -input[type="file"]::-webkit-file-upload-button:active, -button:active { - background-color: var(--sdpi-color); - color:#303030; -} - -input:required:invalid, input:focus:invalid { - background: var(--sdpi-background) url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5IiBoZWlnaHQ9IjkiIHZpZXdCb3g9IjAgMCA5IDkiPgogICAgPHBhdGggZmlsbD0iI0Q4RDhEOCIgZD0iTTQuNSwwIEM2Ljk4NTI4MTM3LC00LjU2NTM4NzgyZS0xNiA5LDIuMDE0NzE4NjMgOSw0LjUgQzksNi45ODUyODEzNyA2Ljk4NTI4MTM3LDkgNC41LDkgQzIuMDE0NzE4NjMsOSAzLjA0MzU5MTg4ZS0xNiw2Ljk4NTI4MTM3IDAsNC41IEMtMy4wNDM1OTE4OGUtMTYsMi4wMTQ3MTg2MyAyLjAxNDcxODYzLDQuNTY1Mzg3ODJlLTE2IDQuNSwwIFogTTQsMSBMNCw2IEw1LDYgTDUsMSBMNCwxIFogTTQuNSw4IEM0Ljc3NjE0MjM3LDggNSw3Ljc3NjE0MjM3IDUsNy41IEM1LDcuMjIzODU3NjMgNC43NzYxNDIzNyw3IDQuNSw3IEM0LjIyMzg1NzYzLDcgNCw3LjIyMzg1NzYzIDQsNy41IEM0LDcuNzc2MTQyMzcgNC4yMjM4NTc2Myw4IDQuNSw4IFoiLz4KICA8L3N2Zz4) no-repeat 98% center; -} - -input:required:valid { - background: var(--sdpi-background) url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5IiBoZWlnaHQ9IjkiIHZpZXdCb3g9IjAgMCA5IDkiPjxwb2x5Z29uIGZpbGw9IiNEOEQ4RDgiIHBvaW50cz0iNS4yIDEgNi4yIDEgNi4yIDcgMy4yIDcgMy4yIDYgNS4yIDYiIHRyYW5zZm9ybT0icm90YXRlKDQwIDQuNjc3IDQpIi8+PC9zdmc+) no-repeat 98% center; -} - -.tooltip, -:tooltip, -:title { - color: yellow; -} -/* -[title]:hover { - display: flex; - align-items: center; - justify-content: center; -} - -[title]:hover::after { - content: ''; - position: absolute; - bottom: -1000px; - left: 8px; - display: none; - color: #fff; - border: 8px solid transparent; - border-bottom: 8px solid #000; -} - -[title]:hover::before { - content: attr(title); - display: flex; - justify-content: center; - align-self: center; - padding: 6px 12px; - border-radius: 5px; - background: rgba(0,0,0,0.8); - color: var(--sdpi-color); - font-size: 9pt; - font-family: sans-serif; - opacity: 1; - position: absolute; - height: auto; - - text-align: center; - bottom: 2px; - z-index: 100; - box-shadow: 0px 3px 6px rgba(0, 0, 0, .5); -} -*/ - -.sdpi-item-group.file { - width: 232px; - display: flex; - align-items: center; -} - -.sdpi-file-info { - overflow-wrap: break-word; - word-wrap: break-word; - hyphens: auto; - - min-width: 132px; - max-width: 144px; - max-height: 32px; - margin-top: 0px; - margin-left: 5px; - display: inline-block; - overflow: hidden; - padding: 6px 4px; - background-color: var(--sdpi-background); -} - - -::-webkit-scrollbar { - width: 8px; -} - -::-webkit-scrollbar-track { - -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); -} - -::-webkit-scrollbar-thumb { - background-color: #999999; - outline: 1px solid slategrey; - border-radius: 8px; -} - -a { - color: #7397d2; -} - -.testcontainer { - display: flex; - background-color: #0000ff20; - max-width: 400px; - height: 200px; - align-content: space-evenly; -} - -input[type=range] { - -webkit-appearance: none; - /* background-color: green; */ - height:6px; - margin-top: 12px; - z-index: 0; - overflow: visible; -} - -/* -input[type="range"]::-webkit-slider-thumb { - -webkit-appearance: none; - background-color: var(--sdpi-color); - width: 12px; - height: 12px; - border-radius: 20px; - margin-top: -6px; - border: none; -} */ - -:-webkit-slider-thumb { - -webkit-appearance: none; - background-color: var(--sdpi-color); - width: 16px; - height: 16px; - border-radius: 20px; - margin-top: -6px; - border: 1px solid #999999; -} - -.sdpi-item[type="range"] .sdpi-item-group { - display: flex; - flex-direction: column; -} - -.xxsdpi-item[type="range"] .sdpi-item-group input { - max-width: 204px; -} - -.sdpi-item[type="range"] .sdpi-item-group span { - margin-left: 0px !important; -} - -.sdpi-item[type="range"] .sdpi-item-group > .sdpi-item-child { - display: flex; - flex-direction: row; -} - -.rangeLabel { - position:absolute; - font-weight:normal; - margin-top:22px; -} - -:disabled { - color: #993333; -} - -select, -select option { - color: var(--sdpi-color); -} - -select.disabled, -select option:disabled { - color: #fd9494; - font-style: italic; -} - -.runningAppsContainer { - display: none; -} - -/* debug -div { - background-color: rgba(64,128,255,0.2); -} -*/ - -.one-line { - min-height: 1.5em; -} - -.two-lines { - min-height: 3em; -} - -.three-lines { - min-height: 4.5em; -} - -.four-lines { - min-height: 6em; -} - -.min80 > .sdpi-item-child { - min-width: 80px; -} - -.min100 > .sdpi-item-child { - min-width: 100px; -} - -.min120 > .sdpi-item-child { - min-width: 120px; -} - -.min140 > .sdpi-item-child { - min-width: 140px; -} - -.min160 > .sdpi-item-child { - min-width: 160px; -} - -.min200 > .sdpi-item-child { - min-width: 200px; -} - -.max40 { - flex-basis: 40%; - flex-grow: 0; -} - -.max30 { - flex-basis: 30%; - flex-grow: 0; -} - -.max20 { - flex-basis: 20%; - flex-grow: 0; -} - -.up20 { - margin-top: -20px; -} - -.alignCenter { - align-items: center; -} - -.alignTop { - align-items: flex-start; -} - -.alignBaseline { - align-items: baseline; -} - -.noMargins, -.noMargins *, -.noInnerMargins * { - margin: 0; - padding: 0; -} - -.hidden { - display: none; -} - -.icon-help, -.icon-help-line, -.icon-help-fill, -.icon-help-inv, -.icon-brighter, -.icon-darker, -.icon-warmer, -.icon-cooler { - min-width: 20px; - width: 20px; - background-repeat: no-repeat; - opacity: 1; -} - -.icon-help:active, -.icon-help-line:active, -.icon-help-fill:active, -.icon-help-inv:active, -.icon-brighter:active, -.icon-darker:active, -.icon-warmer:active, -.icon-cooler:active { - opacity: 0.5; -} - -.icon-brighter, -.icon-darker, -.icon-warmer, -.icon-cooler { - margin-top: 5px !important; -} - -.icon-help, -.icon-help-line, -.icon-help-fill, -.icon-help-inv { - cursor: pointer; - margin: 0px; - margin-left: 4px; -} - -.icon-brighter { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cg fill='%23999' fill-rule='evenodd'%3E%3Ccircle cx='10' cy='10' r='4'/%3E%3Cpath d='M14.8532861,7.77530426 C14.7173255,7.4682615 14.5540843,7.17599221 14.3666368,6.90157083 L16.6782032,5.5669873 L17.1782032,6.4330127 L14.8532861,7.77530426 Z M10.5,4.5414007 C10.2777625,4.51407201 10.051423,4.5 9.82179677,4.5 C9.71377555,4.5 9.60648167,4.50311409 9.5,4.50925739 L9.5,2 L10.5,2 L10.5,4.5414007 Z M5.38028092,6.75545367 C5.18389364,7.02383457 5.01124349,7.31068015 4.86542112,7.61289977 L2.82179677,6.4330127 L3.32179677,5.5669873 L5.38028092,6.75545367 Z M4.86542112,12.3871002 C5.01124349,12.6893198 5.18389364,12.9761654 5.38028092,13.2445463 L3.32179677,14.4330127 L2.82179677,13.5669873 L4.86542112,12.3871002 Z M9.5,15.4907426 C9.60648167,15.4968859 9.71377555,15.5 9.82179677,15.5 C10.051423,15.5 10.2777625,15.485928 10.5,15.4585993 L10.5,18 L9.5,18 L9.5,15.4907426 Z M14.3666368,13.0984292 C14.5540843,12.8240078 14.7173255,12.5317385 14.8532861,12.2246957 L17.1782032,13.5669873 L16.6782032,14.4330127 L14.3666368,13.0984292 Z'/%3E%3C/g%3E%3C/svg%3E"); -} -.icon-darker { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cg fill='%23999' fill-rule='evenodd'%3E%3Cpath d='M10 14C7.790861 14 6 12.209139 6 10 6 7.790861 7.790861 6 10 6 12.209139 6 14 7.790861 14 10 14 12.209139 12.209139 14 10 14zM10 13C11.6568542 13 13 11.6568542 13 10 13 8.34314575 11.6568542 7 10 7 8.34314575 7 7 8.34314575 7 10 7 11.6568542 8.34314575 13 10 13zM14.8532861 7.77530426C14.7173255 7.4682615 14.5540843 7.17599221 14.3666368 6.90157083L16.6782032 5.5669873 17.1782032 6.4330127 14.8532861 7.77530426zM10.5 4.5414007C10.2777625 4.51407201 10.051423 4.5 9.82179677 4.5 9.71377555 4.5 9.60648167 4.50311409 9.5 4.50925739L9.5 2 10.5 2 10.5 4.5414007zM5.38028092 6.75545367C5.18389364 7.02383457 5.01124349 7.31068015 4.86542112 7.61289977L2.82179677 6.4330127 3.32179677 5.5669873 5.38028092 6.75545367zM4.86542112 12.3871002C5.01124349 12.6893198 5.18389364 12.9761654 5.38028092 13.2445463L3.32179677 14.4330127 2.82179677 13.5669873 4.86542112 12.3871002zM9.5 15.4907426C9.60648167 15.4968859 9.71377555 15.5 9.82179677 15.5 10.051423 15.5 10.2777625 15.485928 10.5 15.4585993L10.5 18 9.5 18 9.5 15.4907426zM14.3666368 13.0984292C14.5540843 12.8240078 14.7173255 12.5317385 14.8532861 12.2246957L17.1782032 13.5669873 16.6782032 14.4330127 14.3666368 13.0984292z'/%3E%3C/g%3E%3C/svg%3E"); -} -.icon-warmer { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cg fill='%23999' fill-rule='evenodd'%3E%3Cpath d='M12.3247275 11.4890349C12.0406216 11.0007637 11.6761954 10.5649925 11.2495475 10.1998198 11.0890394 9.83238991 11 9.42659309 11 9 11 7.34314575 12.3431458 6 14 6 15.6568542 6 17 7.34314575 17 9 17 10.6568542 15.6568542 12 14 12 13.3795687 12 12.8031265 11.8116603 12.3247275 11.4890349zM17.6232392 11.6692284C17.8205899 11.4017892 17.9890383 11.1117186 18.123974 10.8036272L20.3121778 12.0669873 19.8121778 12.9330127 17.6232392 11.6692284zM18.123974 7.19637279C17.9890383 6.88828142 17.8205899 6.5982108 17.6232392 6.33077158L19.8121778 5.0669873 20.3121778 5.9330127 18.123974 7.19637279zM14.5 4.52746439C14.3358331 4.50931666 14.1690045 4.5 14 4.5 13.8309955 4.5 13.6641669 4.50931666 13.5 4.52746439L13.5 2 14.5 2 14.5 4.52746439zM13.5 13.4725356C13.6641669 13.4906833 13.8309955 13.5 14 13.5 14.1690045 13.5 14.3358331 13.4906833 14.5 13.4725356L14.5 16 13.5 16 13.5 13.4725356zM14 11C15.1045695 11 16 10.1045695 16 9 16 7.8954305 15.1045695 7 14 7 12.8954305 7 12 7.8954305 12 9 12 10.1045695 12.8954305 11 14 11zM9.5 11C10.6651924 11.4118364 11.5 12.5 11.5 14 11.5 16 10 17.5 8 17.5 6 17.5 4.5 16 4.5 14 4.5 12.6937812 5 11.5 6.5 11L6.5 7 9.5 7 9.5 11z'/%3E%3Cpath d='M12,14 C12,16.209139 10.209139,18 8,18 C5.790861,18 4,16.209139 4,14 C4,12.5194353 4.80439726,11.2267476 6,10.5351288 L6,4 C6,2.8954305 6.8954305,2 8,2 C9.1045695,2 10,2.8954305 10,4 L10,10.5351288 C11.1956027,11.2267476 12,12.5194353 12,14 Z M11,14 C11,12.6937812 10.1651924,11.5825421 9,11.1707057 L9,4 C9,3.44771525 8.55228475,3 8,3 C7.44771525,3 7,3.44771525 7,4 L7,11.1707057 C5.83480763,11.5825421 5,12.6937812 5,14 C5,15.6568542 6.34314575,17 8,17 C9.65685425,17 11,15.6568542 11,14 Z'/%3E%3C/g%3E%3C/svg%3E"); -} - -.icon-cooler { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cg fill='%23999' fill-rule='evenodd'%3E%3Cpath d='M10.4004569 11.6239517C10.0554735 10.9863849 9.57597206 10.4322632 9 9.99963381L9 9.7450467 9.53471338 9.7450467 10.8155381 8.46422201C10.7766941 8.39376637 10.7419749 8.32071759 10.7117062 8.2454012L9 8.2454012 9 6.96057868 10.6417702 6.96057868C10.6677696 6.86753378 10.7003289 6.77722682 10.7389179 6.69018783L9.44918707 5.40045694 9 5.40045694 9 4.34532219 9.32816127 4.34532219 9.34532219 2.91912025 10.4004569 2.91912025 10.4004569 4.53471338 11.6098599 5.74411634C11.7208059 5.68343597 11.8381332 5.63296451 11.9605787 5.59396526L11.9605787 3.8884898 10.8181818 2.74609294 11.5642748 2 12.5727518 3.00847706 13.5812289 2 14.3273218 2.74609294 13.2454012 3.82801356 13.2454012 5.61756719C13.3449693 5.65339299 13.4408747 5.69689391 13.5324038 5.74735625L14.7450467 4.53471338 14.7450467 2.91912025 15.8001815 2.91912025 15.8001815 4.34532219 17.2263834 4.34532219 17.2263834 5.40045694 15.6963166 5.40045694 14.4002441 6.69652946C14.437611 6.78161093 14.4692249 6.86979146 14.4945934 6.96057868L16.2570138 6.96057868 17.3994107 5.81818182 18.1455036 6.56427476 17.1370266 7.57275182 18.1455036 8.58122888 17.3994107 9.32732182 16.3174901 8.2454012 14.4246574 8.2454012C14.3952328 8.31861737 14.3616024 8.38969062 14.3240655 8.45832192L15.6107903 9.7450467 17.2263834 9.7450467 17.2263834 10.8001815 15.8001815 10.8001815 15.8001815 12.2263834 14.7450467 12.2263834 14.7450467 10.6963166 13.377994 9.32926387C13.3345872 9.34850842 13.2903677 9.36625331 13.2454012 9.38243281L13.2454012 11.3174901 14.3273218 12.3994107 13.5812289 13.1455036 12.5848864 12.1491612 11.5642748 13.1455036 10.8181818 12.3994107 11.9605787 11.2570138 11.9605787 9.40603474C11.8936938 9.38473169 11.828336 9.36000556 11.7647113 9.33206224L10.4004569 10.6963166 10.4004569 11.6239517zM12.75 8.5C13.3022847 8.5 13.75 8.05228475 13.75 7.5 13.75 6.94771525 13.3022847 6.5 12.75 6.5 12.1977153 6.5 11.75 6.94771525 11.75 7.5 11.75 8.05228475 12.1977153 8.5 12.75 8.5zM9.5 14C8.5 16.3333333 7.33333333 17.5 6 17.5 4.66666667 17.5 3.5 16.3333333 2.5 14L9.5 14z'/%3E%3Cpath d='M10,14 C10,16.209139 8.209139,18 6,18 C3.790861,18 2,16.209139 2,14 C2,12.5194353 2.80439726,11.2267476 4,10.5351288 L4,4 C4,2.8954305 4.8954305,2 6,2 C7.1045695,2 8,2.8954305 8,4 L8,10.5351288 C9.19560274,11.2267476 10,12.5194353 10,14 Z M9,14 C9,12.6937812 8.16519237,11.5825421 7,11.1707057 L7,4 C7,3.44771525 6.55228475,3 6,3 C5.44771525,3 5,3.44771525 5,4 L5,11.1707057 C3.83480763,11.5825421 3,12.6937812 3,14 C3,15.6568542 4.34314575,17 6,17 C7.65685425,17 9,15.6568542 9,14 Z'/%3E%3C/g%3E%3C/svg%3E"); -} - -.icon-help { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath fill='%23999' d='M11.292 12.516l.022 1.782H9.07v-1.804c0-1.98 1.276-2.574 2.662-3.278h-.022c.814-.44 1.65-.88 1.694-2.2.044-1.386-1.122-2.728-3.234-2.728-1.518 0-2.662.902-3.366 2.354L5 5.608C5.946 3.584 7.662 2 10.17 2c3.564 0 5.632 2.442 5.588 5.06-.066 2.618-1.716 3.41-3.102 4.158-.704.374-1.364.682-1.364 1.298zm-1.122 2.442c.858 0 1.452.594 1.452 1.452 0 .682-.594 1.408-1.452 1.408-.77 0-1.386-.726-1.386-1.408 0-.858.616-1.452 1.386-1.452z'/%3E%3C/svg%3E"); -} - -.icon-help-line { - background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23999' fill-rule='evenodd'%3E%3Cpath d='M10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10zm0-1a9 9 0 1 0 0-18 9 9 0 0 0 0 18z'/%3E%3Cpath d='M10.848 12.307l.02 1.578H8.784v-1.597c0-1.753 1.186-2.278 2.474-2.901h-.02c.756-.39 1.533-.78 1.574-1.948.041-1.226-1.043-2.414-3.006-2.414-1.41 0-2.474.798-3.128 2.083L5 6.193C5.88 4.402 7.474 3 9.805 3 13.118 3 15.04 5.161 15 7.478c-.061 2.318-1.595 3.019-2.883 3.68-.654.332-1.268.604-1.268 1.15zM9.805 14.47c.798 0 1.35.525 1.35 1.285 0 .603-.552 1.246-1.35 1.246-.715 0-1.288-.643-1.288-1.246 0-.76.573-1.285 1.288-1.285z' fill-rule='nonzero'/%3E%3C/g%3E%3C/svg%3E");} - -.icon-help-fill { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23999'/%3E%3Cpath fill='%23FFF' fill-rule='nonzero' d='M8.368 7.189H5C5 3.5 7.668 2 10.292 2 13.966 2 16 4.076 16 7.012c0 3.754-3.849 3.136-3.849 5.211v1.656H8.455v-1.832c0-2.164 1.4-2.893 2.778-3.6.437-.242 1.006-.574 1.006-1.236 0-2.208-3.871-2.142-3.871-.022zM10.25 18a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5z'/%3E%3C/g%3E%3C/svg%3E"); -} - -.icon-help-inv { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath fill='%23999' fill-rule='evenodd' d='M10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10zM8.368 7.189c0-2.12 3.87-2.186 3.87.022 0 .662-.568.994-1.005 1.236-1.378.707-2.778 1.436-2.778 3.6v1.832h3.696v-1.656c0-2.075 3.849-1.457 3.849-5.21C16 4.075 13.966 2 10.292 2 7.668 2 5 3.501 5 7.189h3.368zM10.25 18a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5z'/%3E%3C/svg%3E"); -} - -.kelvin::after { - content: "K"; -} - -.mired::after { - content: " Mired"; -} - -.percent::after { - content: "%"; -} - -.sdpi-item-value + .icon-cooler, -.sdpi-item-value + .icon-warmer { - margin-left: 0px !important; - margin-top: 15px !important; -} - -/** - CONTROL-CENTER STYLES -*/ -input[type="range"].colorbrightness::-webkit-slider-runnable-track, -input[type="range"].colortemperature::-webkit-slider-runnable-track { - height: 8px; - background: #979797; - border-radius: 4px; - background-image: linear-gradient(to right,#94d0ec, #ffb165); -} - -input[type="range"].colorbrightness::-webkit-slider-runnable-track { - background-color: #efefef; - background-image: linear-gradient(to right, black , rgba(0,0,0,0)); -} - - -input[type="range"].colorbrightness::-webkit-slider-thumb, -input[type="range"].colortemperature::-webkit-slider-thumb { - width: 16px; - height: 16px; - border-radius: 20px; - margin-top: -5px; - background-color: #86c6e8; - box-shadow: 0px 0px 1px #000000; - border: 1px solid #d8d8d8; -} -.sdpi-info-label { - display: inline-block; - user-select: none; - position: absolute; - height: 15px; - width: auto; - text-align: center; - border-radius: 4px; - min-width: 44px; - max-width: 80px; - background: white; - font-size: 11px; - color: black; - z-index: 1000; - box-shadow: 0px 0px 12px rgba(0,0,0,.8); - padding: 2px; - -} - -.sdpi-info-label.hidden { - opacity: 0; - transition: opacity 0.25s linear; -} - -.sdpi-info-label.shown { - position: absolute; - opacity: 1; - transition: opacity 0.25s ease-out; -} diff --git a/StreamDeckPlugin/src/main/resources/static/propertyinspector/index.html b/StreamDeckPlugin/src/main/resources/static/propertyinspector/index.html deleted file mode 100644 index 47eff1f..0000000 --- a/StreamDeckPlugin/src/main/resources/static/propertyinspector/index.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - com.mosadie.effectmc Property Inspector - - - -
- - - - - -
-
Name
- -
- -
-
Message
-
- - -
-
- -
-
Button
- -
- - - - -
- - - - - - - diff --git a/StreamDeckPlugin/src/main/resources/static/propertyinspector/js/common.js b/StreamDeckPlugin/src/main/resources/static/propertyinspector/js/common.js deleted file mode 100644 index dccc702..0000000 --- a/StreamDeckPlugin/src/main/resources/static/propertyinspector/js/common.js +++ /dev/null @@ -1,1200 +0,0 @@ -/* global $SD, $localizedStrings */ -/* exported, $localizedStrings */ -/* eslint no-undef: "error", - curly: 0, - no-caller: 0, - wrap-iife: 0, - one-var: 0, - no-var: 0, - vars-on-top: 0 -*/ - -// don't change this to let or const, because we rely on var's hoisting -// eslint-disable-next-line no-use-before-define, no-var -var $localizedStrings = $localizedStrings || {}, - REMOTESETTINGS = REMOTESETTINGS || {}, - DestinationEnum = Object.freeze({ - HARDWARE_AND_SOFTWARE: 0, - HARDWARE_ONLY: 1, - SOFTWARE_ONLY: 2 - }), - // eslint-disable-next-line no-unused-vars - isQT = navigator.appVersion.includes('QtWebEngine'), - debug = debug || false, - debugLog = function () {}, - MIMAGECACHE = MIMAGECACHE || {}; - -const setDebugOutput = (debug) => (debug === true) ? console.log.bind(window.console) : function () {}; -debugLog = setDebugOutput(debug); - -// Create a wrapper to allow passing JSON to the socket -WebSocket.prototype.sendJSON = function (jsn, log) { - if (log) { - console.log('SendJSON', this, jsn); - } - // if (this.readyState) { - this.send(JSON.stringify(jsn)); - // } -}; - -/* eslint no-extend-native: ["error", { "exceptions": ["String"] }] */ -String.prototype.lox = function () { - var a = String(this); - try { - a = $localizedStrings[a] || a; - } catch (b) {} - return a; -}; - -String.prototype.sprintf = function (inArr) { - let i = 0; - const args = (inArr && Array.isArray(inArr)) ? inArr : arguments; - return this.replace(/%s/g, function () { - return args[i++]; - }); -}; - -// eslint-disable-next-line no-unused-vars -const sprintf = (s, ...args) => { - let i = 0; - return s.replace(/%s/g, function () { - return args[i++]; - }); -}; - -const loadLocalization = (lang, pathPrefix, cb) => { - Utils.readJson(`${pathPrefix}${lang}.json`, function (jsn) { - const manifest = Utils.parseJson(jsn); - $localizedStrings = manifest && manifest.hasOwnProperty('Localization') ? manifest['Localization'] : {}; - debugLog($localizedStrings); - if (cb && typeof cb === 'function') cb(); - }); -} - -var Utils = { - sleep: function (milliseconds) { - return new Promise(resolve => setTimeout(resolve, milliseconds)); - }, - isUndefined: function (value) { - return typeof value === 'undefined'; - }, - isObject: function (o) { - return ( - typeof o === 'object' && - o !== null && - o.constructor && - o.constructor === Object - ); - }, - isPlainObject: function (o) { - return ( - typeof o === 'object' && - o !== null && - o.constructor && - o.constructor === Object - ); - }, - isArray: function (value) { - return Array.isArray(value); - }, - isNumber: function (value) { - return typeof value === 'number' && value !== null; - }, - isInteger (value) { - return typeof value === 'number' && value === Number(value); - }, - isString (value) { - return typeof value === 'string'; - }, - isImage (value) { - return value instanceof HTMLImageElement; - }, - isCanvas (value) { - return value instanceof HTMLCanvasElement; - }, - isValue: function (value) { - return !this.isObject(value) && !this.isArray(value); - }, - isNull: function (value) { - return value === null; - }, - toInteger: function (value) { - const INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e308; - if (!value) { - return value === 0 ? value : 0; - } - value = Number(value); - if (value === INFINITY || value === -INFINITY) { - const sign = value < 0 ? -1 : 1; - return sign * MAX_INTEGER; - } - return value === value ? value : 0; - } -}; -Utils.minmax = function (v, min = 0, max = 100) { - return Math.min(max, Math.max(min, v)); -}; - -Utils.rangeToPercent = function (value, min, max) { - return ((value - min) / (max - min)); -}; - -Utils.percentToRange = function (percent, min, max) { - return ((max - min) * percent + min); -}; - -Utils.setDebugOutput = (debug) => { - return (debug === true) ? console.log.bind(window.console) : function () {}; -}; - -Utils.randomComponentName = function (len = 6) { - return `${Utils.randomLowerString(len)}-${Utils.randomLowerString(len)}`; -}; - -Utils.randomString = function (len = 8) { - return Array.apply(0, Array(len)) - .map(function () { - return (function (charset) { - return charset.charAt( - Math.floor(Math.random() * charset.length) - ); - })( - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' - ); - }) - .join(''); -}; - -Utils.rs = function (len = 8) { - return [...Array(len)].map(i => (~~(Math.random() * 36)).toString(36)).join(''); -}; - -Utils.randomLowerString = function (len = 8) { - return Array.apply(0, Array(len)) - .map(function () { - return (function (charset) { - return charset.charAt( - Math.floor(Math.random() * charset.length) - ); - })('abcdefghijklmnopqrstuvwxyz'); - }) - .join(''); -}; - -Utils.capitalize = function (str) { - return str.charAt(0).toUpperCase() + str.slice(1); -}; - -Utils.measureText = (text, font) => { - const canvas = Utils.measureText.canvas || (Utils.measureText.canvas = document.createElement("canvas")); - const ctx = canvas.getContext("2d"); - ctx.font = font || 'bold 10pt system-ui'; - return ctx.measureText(text).width; -}; - -Utils.fixName = (d, dName) => { - let i = 1; - const base = dName; - while (d[dName]) { - dName = `${base} (${i})` - i++; - } - return dName; -}; - -Utils.isEmptyString = (str) => { - return (!str || str.length === 0); -}; - -Utils.isBlankString = (str) => { - return (!str || /^\s*$/.test(str)); -}; - -Utils.log = function () {}; -Utils.count = 0; -Utils.counter = function () { - return (this.count += 1); -}; -Utils.getPrefix = function () { - return this.prefix + this.counter(); -}; - -Utils.prefix = Utils.randomString() + '_'; - -Utils.getUrlParameter = function (name) { - const nameA = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); - const regex = new RegExp('[\\?&]' + nameA + '=([^&#]*)'); - const results = regex.exec(location.search.replace(/\/$/, '')); - return results === null - ? null - : decodeURIComponent(results[1].replace(/\+/g, ' ')); -}; - -Utils.debounce = function (func, wait = 100) { - let timeout; - return function (...args) { - clearTimeout(timeout); - timeout = setTimeout(() => { - func.apply(this, args); - }, wait); - }; -}; - -Utils.getRandomColor = function () { - return '#' + (((1 << 24) * Math.random()) | 0).toString(16).padStart(6, 0); // just a random color padded to 6 characters -}; - -/* - Quick utility to lighten or darken a color (doesn't take color-drifting, etc. into account) - Usage: - fadeColor('#061261', 100); // will lighten the color - fadeColor('#200867'), -100); // will darken the color -*/ - -Utils.fadeColor = function (col, amt) { - const min = Math.min, max = Math.max; - const num = parseInt(col.replace(/#/g, ''), 16); - const r = min(255, max((num >> 16) + amt, 0)); - const g = min(255, max((num & 0x0000FF) + amt, 0)); - const b = min(255, max(((num >> 8) & 0x00FF) + amt, 0)); - return '#' + (g | (b << 8) | (r << 16)).toString(16).padStart(6, 0); -} - -Utils.lerpColor = function (startColor, targetColor, amount) { - const ah = parseInt(startColor.replace(/#/g, ''), 16); - const ar = ah >> 16; - const ag = (ah >> 8) & 0xff; - const ab = ah & 0xff; - const bh = parseInt(targetColor.replace(/#/g, ''), 16); - const br = bh >> 16; - var bg = (bh >> 8) & 0xff; - var bb = bh & 0xff; - const rr = ar + amount * (br - ar); - const rg = ag + amount * (bg - ag); - const rb = ab + amount * (bb - ab); - - return ( - '#' + - (((1 << 24) + (rr << 16) + (rg << 8) + rb) | 0) - .toString(16) - .slice(1) - .toUpperCase() - ); -}; - -Utils.hexToRgb = function (hex) { - const match = hex.replace(/#/, '').match(/.{1,2}/g); - return { - r: parseInt(match[0], 16), - g: parseInt(match[1], 16), - b: parseInt(match[2], 16) - }; -}; - -Utils.rgbToHex = (r, g, b) => '#' + [r, g, b].map(x => { - return x.toString(16).padStart(2,0) -}).join('') - - -Utils.nscolorToRgb = function (rP, gP, bP) { - return { - r : Math.round(rP * 255), - g : Math.round(gP * 255), - b : Math.round(bP * 255) - } -}; - -Utils.nsColorToHex = function (rP, gP, bP) { - const c = Utils.nscolorToRgb(rP, gP, bP); - return Utils.rgbToHex(c.r, c.g, c.b); -}; - -Utils.miredToKelvin = function (mired) { - return Math.round(1e6 / mired); -}; - -Utils.kelvinToMired = function (kelvin, roundTo) { - return roundTo ? Utils.roundBy(Math.round(1e6 / kelvin), roundTo) : Math.round(1e6 / kelvin); -}; - -Utils.roundBy = function(num, x) { - return Math.round((num - 10) / x) * x; -} - -Utils.getBrightness = function (hexColor) { - // http://www.w3.org/TR/AERT#color-contrast - if (typeof hexColor === 'string' && hexColor.charAt(0) === '#') { - var rgb = Utils.hexToRgb(hexColor); - return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; - } - return 0; -}; - -Utils.readJson = function (file, callback) { - var req = new XMLHttpRequest(); - req.onerror = function (e) { - // Utils.log(`[Utils][readJson] Error while trying to read ${file}`, e); - }; - req.overrideMimeType('application/json'); - req.open('GET', file, true); - req.onreadystatechange = function () { - if (req.readyState === 4) { - // && req.status == "200") { - if (callback) callback(req.responseText); - } - }; - req.send(null); -}; - -Utils.loadScript = function (url, callback) { - const el = document.createElement('script'); - el.src = url; - el.onload = function () { - callback(url, true); - }; - el.onerror = function () { - console.error('Failed to load file: ' + url); - callback(url, false); - }; - document.body.appendChild(el); -}; - -Utils.parseJson = function (jsonString) { - if (typeof jsonString === 'object') return jsonString; - try { - const o = JSON.parse(jsonString); - - // Handle non-exception-throwing cases: - // Neither JSON.parse(false) or JSON.parse(1234) throw errors, hence the type-checking, - // but... JSON.parse(null) returns null, and typeof null === "object", - // so we must check for that, too. Thankfully, null is falsey, so this suffices: - if (o && typeof o === 'object') { - return o; - } - } catch (e) {} - - return false; -}; - -Utils.parseJSONPromise = function (jsonString) { - // fetch('/my-json-doc-as-string') - // .then(Utils.parseJSONPromise) - // .then(heresYourValidJSON) - // .catch(error - or return default JSON) - - return new Promise((resolve, reject) => { - try { - resolve(JSON.parse(jsonString)); - } catch (e) { - reject(e); - } - }); -}; - -/* eslint-disable import/prefer-default-export */ -Utils.getProperty = function (obj, dotSeparatedKeys, defaultValue) { - if (arguments.length > 1 && typeof dotSeparatedKeys !== 'string') - return undefined; - if (typeof obj !== 'undefined' && typeof dotSeparatedKeys === 'string') { - const pathArr = dotSeparatedKeys.split('.'); - pathArr.forEach((key, idx, arr) => { - if (typeof key === 'string' && key.includes('[')) { - try { - // extract the array index as string - const pos = /\[([^)]+)\]/.exec(key)[1]; - // get the index string length (i.e. '21'.length === 2) - const posLen = pos.length; - arr.splice(idx + 1, 0, Number(pos)); - - // keep the key (array name) without the index comprehension: - // (i.e. key without [] (string of length 2) - // and the length of the index (posLen)) - arr[idx] = key.slice(0, -2 - posLen); // eslint-disable-line no-param-reassign - } catch (e) { - // do nothing - } - } - }); - // eslint-disable-next-line no-param-reassign, no-confusing-arrow - obj = pathArr.reduce( - (o, key) => (o && o[key] !== 'undefined' ? o[key] : undefined), - obj - ); - } - return obj === undefined ? defaultValue : obj; -}; - -Utils.getProp = (jsn, str, defaultValue = {}, sep = '.') => { - const arr = str.split(sep); - return arr.reduce((obj, key) => - (obj && obj.hasOwnProperty(key)) ? obj[key] : defaultValue, jsn); -}; - -Utils.setProp = function (jsonObj, path, value) { - const names = path.split('.'); - let jsn = jsonObj; - - // createNestedObject(jsn, names, values); - // If a value is given, remove the last name and keep it for later: - var targetProperty = arguments.length === 3 ? names.pop() : false; - - // Walk the hierarchy, creating new objects where needed. - // If the lastName was removed, then the last object is not set yet: - for (var i = 0; i < names.length; i++) { - jsn = jsn[names[i]] = jsn[names[i]] || {}; - } - - // If a value was given, set it to the target property (the last one): - if (targetProperty) jsn = jsn[targetProperty] = value; - - // Return the last object in the hierarchy: - return jsn; -}; - -Utils.getDataUri = function (url, callback, inCanvas, inFillcolor) { - var image = new Image(); - - image.onload = function () { - const canvas = - inCanvas && Utils.isCanvas(inCanvas) - ? inCanvas - : document.createElement('canvas'); - - canvas.width = this.naturalWidth; // or 'width' if you want a special/scaled size - canvas.height = this.naturalHeight; // or 'height' if you want a special/scaled size - - const ctx = canvas.getContext('2d'); - if (inFillcolor) { - ctx.fillStyle = inFillcolor; - ctx.fillRect(0, 0, canvas.width, canvas.height); - } - ctx.drawImage(this, 0, 0); - // Get raw image data - // callback && callback(canvas.toDataURL('image/png').replace(/^data:image\/(png|jpg);base64,/, '')); - - // ... or get as Data URI - callback(canvas.toDataURL('image/png')); - }; - - image.src = url; -}; - -/** Quick utility to inject a style to the DOM -* e.g. injectStyle('.localbody { background-color: green;}') -*/ -Utils.injectStyle = function (styles, styleId) { - const node = document.createElement('style'); - const tempID = styleId || Utils.randomString(8); - node.setAttribute('id', tempID); - node.innerHTML = styles; - document.body.appendChild(node); - return node; -}; - - -Utils.loadImage = function (inUrl, callback, inCanvas, inFillcolor) { - /** Convert to array, so we may load multiple images at once */ - const aUrl = !Array.isArray(inUrl) ? [inUrl] : inUrl; - const canvas = inCanvas && inCanvas instanceof HTMLCanvasElement - ? inCanvas - : document.createElement('canvas'); - var imgCount = aUrl.length - 1; - const imgCache = {}; - - var ctx = canvas.getContext('2d'); - ctx.globalCompositeOperation = 'source-over'; - - for (let url of aUrl) { - let image = new Image(); - let cnt = imgCount; - let w = 144, h = 144; - - image.onload = function () { - imgCache[url] = this; - // look at the size of the first image - if (url === aUrl[0]) { - canvas.width = this.naturalWidth; // or 'width' if you want a special/scaled size - canvas.height = this.naturalHeight; // or 'height' if you want a special/scaled size - } - // if (Object.keys(imgCache).length == aUrl.length) { - if (cnt < 1) { - if (inFillcolor) { - ctx.fillStyle = inFillcolor; - ctx.fillRect(0, 0, canvas.width, canvas.height); - } - // draw in the proper sequence FIFO - aUrl.forEach(e => { - if (!imgCache[e]) { - console.warn(imgCache[e], imgCache); - } - - if (imgCache[e]) { - ctx.drawImage(imgCache[e], 0, 0); - ctx.save(); - } - }); - - callback(canvas.toDataURL('image/png')); - // or to get raw image data - // callback && callback(canvas.toDataURL('image/png').replace(/^data:image\/(png|jpg);base64,/, '')); - } - }; - - imgCount--; - image.src = url; - } -}; - -Utils.getData = function (url) { - // Return a new promise. - return new Promise(function (resolve, reject) { - // Do the usual XHR stuff - var req = new XMLHttpRequest(); - // Make sure to call .open asynchronously - req.open('GET', url, true); - - req.onload = function () { - // This is called even on 404 etc - // so check the status - if (req.status === 200) { - // Resolve the promise with the response text - resolve(req.response); - } else { - // Otherwise reject with the status text - // which will hopefully be a meaningful error - reject(Error(req.statusText)); - } - }; - - // Handle network errors - req.onerror = function () { - reject(Error('Network Error')); - }; - - // Make the request - req.send(); - }); -}; - -Utils.negArray = function (arr) { - /** http://h3manth.com/new/blog/2013/negative-array-index-in-javascript/ */ - return Proxy.create({ - set: function (proxy, index, value) { - index = parseInt(index); - return index < 0 ? (arr[arr.length + index] = value) : (arr[index] = value); - }, - get: function (proxy, index) { - index = parseInt(index); - return index < 0 ? arr[arr.length + index] : arr[index]; - } - }); -}; - -Utils.onChange = function (object, callback) { - /** https://github.com/sindresorhus/on-change */ - 'use strict'; - const handler = { - get (target, property, receiver) { - try { - console.log('get via Proxy: ', property, target, receiver); - return new Proxy(target[property], handler); - } catch (err) { - console.log('get via Reflect: ', err, property, target, receiver); - return Reflect.get(target, property, receiver); - } - }, - set (target, property, value, receiver) { - console.log('Utils.onChange:set1:', target, property, value, receiver); - // target[property] = value; - const b = Reflect.set(target, property, value); - console.log('Utils.onChange:set2:', target, property, value, receiver); - return b; - }, - defineProperty (target, property, descriptor) { - console.log('Utils.onChange:defineProperty:', target, property, descriptor); - callback(target, property, descriptor); - return Reflect.defineProperty(target, property, descriptor); - }, - deleteProperty (target, property) { - console.log('Utils.onChange:deleteProperty:', target, property); - callback(target, property); - return Reflect.deleteProperty(target, property); - } - }; - - return new Proxy(object, handler); -}; - -Utils.observeArray = function (object, callback) { - 'use strict'; - const array = []; - const handler = { - get (target, property, receiver) { - try { - return new Proxy(target[property], handler); - } catch (err) { - return Reflect.get(target, property, receiver); - } - }, - set (target, property, value, receiver) { - console.log('XXXUtils.observeArray:set1:', target, property, value, array); - target[property] = value; - console.log('XXXUtils.observeArray:set2:', target, property, value, array); - }, - defineProperty (target, property, descriptor) { - callback(target, property, descriptor); - return Reflect.defineProperty(target, property, descriptor); - }, - deleteProperty (target, property) { - callback(target, property, descriptor); - return Reflect.deleteProperty(target, property); - } - }; - - return new Proxy(object, handler); -}; - -window['_'] = Utils; - -/* - * connectElgatoStreamDeckSocket - * This is the first function StreamDeck Software calls, when - * establishing the connection to the plugin or the Property Inspector - * @param {string} inPort - The socket's port to communicate with StreamDeck software. - * @param {string} inUUID - A unique identifier, which StreamDeck uses to communicate with the plugin - * @param {string} inMessageType - Identifies, if the event is meant for the property inspector or the plugin. - * @param {string} inApplicationInfo - Information about the host (StreamDeck) application - * @param {string} inActionInfo - Context is an internal identifier used to communicate to the host application. - */ - - -// eslint-disable-next-line no-unused-vars -function connectElgatoStreamDeckSocket ( - inPort, - inUUID, - inMessageType, - inApplicationInfo, - inActionInfo -) { - StreamDeck.getInstance().connect(arguments); - window.$SD.api = Object.assign({ send: SDApi.send }, SDApi.common, SDApi[inMessageType]); -} - -/* legacy support */ - -function connectSocket ( - inPort, - inUUID, - inMessageType, - inApplicationInfo, - inActionInfo -) { - connectElgatoStreamDeckSocket( - inPort, - inUUID, - inMessageType, - inApplicationInfo, - inActionInfo - ); -} - -/** - * StreamDeck object containing all required code to establish - * communication with SD-Software and the Property Inspector - */ - -const StreamDeck = (function () { - // Hello it's me - var instance; - /* - Populate and initialize internally used properties - */ - - function init () { - // *** PRIVATE *** - - var inPort, - inUUID, - inMessageType, - inApplicationInfo, - inActionInfo, - websocket = null; - - var events = ELGEvents.eventEmitter(); - var logger = SDDebug.logger(); - - function showVars () { - debugLog('---- showVars'); - debugLog('- port', inPort); - debugLog('- uuid', inUUID); - debugLog('- messagetype', inMessageType); - debugLog('- info', inApplicationInfo); - debugLog('- inActionInfo', inActionInfo); - debugLog('----< showVars'); - } - - function connect (args) { - inPort = args[0]; - inUUID = args[1]; - inMessageType = args[2]; - inApplicationInfo = Utils.parseJson(args[3]); - inActionInfo = args[4] !== 'undefined' ? Utils.parseJson(args[4]) : args[4]; - - /** Debug variables */ - if (debug) { - showVars(); - } - - const lang = Utils.getProp(inApplicationInfo,'application.language', false); - if (lang) { - loadLocalization(lang, inMessageType === 'registerPropertyInspector' ? '../' : './', function() { - events.emit('localizationLoaded', {language:lang}); - }); - }; - - /** restrict the API to what's possible - * within Plugin or Property Inspector - * - */ - // $SD.api = SDApi[inMessageType]; - - if (websocket) { - websocket.close(); - websocket = null; - }; - - websocket = new WebSocket('ws://127.0.0.1:' + inPort); - - websocket.onopen = function () { - var json = { - event: inMessageType, - uuid: inUUID - }; - - // console.log('***************', inMessageType + " websocket:onopen", inUUID, json); - - websocket.sendJSON(json); - $SD.uuid = inUUID; - $SD.actionInfo = inActionInfo; - $SD.applicationInfo = inApplicationInfo; - $SD.messageType = inMessageType; - $SD.connection = websocket; - - instance.emit('connected', { - connection: websocket, - port: inPort, - uuid: inUUID, - actionInfo: inActionInfo, - applicationInfo: inApplicationInfo, - messageType: inMessageType - }); - }; - - websocket.onerror = function (evt) { - console.warn('WEBOCKET ERROR', evt, evt.data); - }; - - websocket.onclose = function (evt) { - // Websocket is closed - var reason = WEBSOCKETERROR(evt); - console.warn( - '[STREAMDECK]***** WEBOCKET CLOSED **** reason:', - reason - ); - }; - - websocket.onmessage = function (evt) { - var jsonObj = Utils.parseJson(evt.data), - m; - - // console.log('[STREAMDECK] websocket.onmessage ... ', jsonObj.event, jsonObj); - - if (!jsonObj.hasOwnProperty('action')) { - m = jsonObj.event; - // console.log('%c%s', 'color: white; background: red; font-size: 12px;', '[common.js]onmessage:', m); - } else { - switch (inMessageType) { - case 'registerPlugin': - m = jsonObj['action'] + '.' + jsonObj['event']; - break; - case 'registerPropertyInspector': - m = 'sendToPropertyInspector'; - break; - default: - console.log('%c%s', 'color: white; background: red; font-size: 12px;', '[STREAMDECK] websocket.onmessage +++++++++ PROBLEM ++++++++'); - console.warn('UNREGISTERED MESSAGETYPE:', inMessageType); - } - } - - if (m && m !== '') - events.emit(m, jsonObj); - }; - - instance.connection = websocket; - } - - return { - // *** PUBLIC *** - - uuid: inUUID, - on: events.on, - emit: events.emit, - connection: websocket, - connect: connect, - api: null, - logger: logger - }; - } - - return { - getInstance: function () { - if (!instance) { - instance = init(); - } - return instance; - } - }; -})(); - -// eslint-disable-next-line no-unused-vars -function initializeControlCenterClient () { - const settings = Object.assign(REMOTESETTINGS || {}, { debug: false }); - var $CC = new ControlCenterClient(settings); - window['$CC'] = $CC; - return $CC; -} - -/** ELGEvents - * Publish/Subscribe pattern to quickly signal events to - * the plugin, property inspector and data. - */ - -const ELGEvents = { - eventEmitter: function (name, fn) { - const eventList = new Map(); - - const on = (name, fn) => { - if (!eventList.has(name)) eventList.set(name, ELGEvents.pubSub()); - - return eventList.get(name).sub(fn); - }; - - const has = (name) => - eventList.has(name); - - const emit = (name, data) => - eventList.has(name) && eventList.get(name).pub(data); - - return Object.freeze({ on, has, emit, eventList }); - }, - - pubSub: function pubSub () { - const subscribers = new Set(); - - const sub = fn => { - subscribers.add(fn); - return () => { - subscribers.delete(fn); - }; - }; - - const pub = data => subscribers.forEach(fn => fn(data)); - return Object.freeze({ pub, sub }); - } -}; - -/** SDApi - * This ist the main API to communicate between plugin, property inspector and - * application host. - * Internal functions: - * - setContext: sets the context of the current plugin - * - exec: prepare the correct JSON structure and send - * - * Methods exposed in the $SD.api alias - * Messages send from the plugin - * ----------------------------- - * - showAlert - * - showOK - * - setSettings - * - setTitle - * - setImage - * - sendToPropertyInspector - * - * Messages send from Property Inspector - * ------------------------------------- - * - sendToPlugin - * - * Messages received in the plugin - * ------------------------------- - * willAppear - * willDisappear - * keyDown - * keyUp - */ - -const SDApi = { - send: function (context, fn, payload, debug) { - /** Combine the passed JSON with the name of the event and it's context - * If the payload contains 'event' or 'context' keys, it will overwrite existing 'event' or 'context'. - * This function is non-mutating and thereby creates a new object containing - * all keys of the original JSON objects. - */ - const pl = Object.assign({}, { event: fn, context: context }, payload); - - /** Check, if we have a connection, and if, send the JSON payload */ - if (debug) { - console.log('-----SDApi.send-----'); - console.log('context', context); - console.log(pl); - console.log(payload.payload); - console.log(JSON.stringify(payload.payload)); - console.log('-------'); - } - $SD.connection && $SD.connection.sendJSON(pl); - - /** - * DEBUG-Utility to quickly show the current payload in the Property Inspector. - */ - - if ( - $SD.connection && - [ - 'sendToPropertyInspector', - 'showOK', - 'showAlert', - 'setSettings' - ].indexOf(fn) === -1 - ) { - // console.log("send.sendToPropertyInspector", payload); - // this.sendToPropertyInspector(context, typeof payload.payload==='object' ? JSON.stringify(payload.payload) : JSON.stringify({'payload':payload.payload}), pl['action']); - } - }, - - registerPlugin: { - - /** Messages send from the plugin */ - showAlert: function (context) { - SDApi.send(context, 'showAlert', {}); - }, - - showOk: function (context) { - SDApi.send(context, 'showOk', {}); - }, - - - setState: function (context, payload) { - SDApi.send(context, 'setState', { - payload: { - 'state': 1 - Number(payload === 0) - } - }); - }, - - setTitle: function (context, title, target) { - SDApi.send(context, 'setTitle', { - payload: { - title: '' + title || '', - target: target || DestinationEnum.HARDWARE_AND_SOFTWARE - } - }); - }, - - setImage: function (context, img, target) { - SDApi.send(context, 'setImage', { - payload: { - image: img || '', - target: target || DestinationEnum.HARDWARE_AND_SOFTWARE - } - }); - }, - - sendToPropertyInspector: function (context, payload, action) { - SDApi.send(context, 'sendToPropertyInspector', { - action: action, - payload: payload - }); - }, - - showUrl2: function (context, urlToOpen) { - SDApi.send(context, 'openUrl', { - payload: { - url: urlToOpen - } - }); - } - }, - - /** Messages send from Property Inspector */ - - registerPropertyInspector: { - - sendToPlugin: function (piUUID, action, payload) { - SDApi.send( - piUUID, - 'sendToPlugin', - { - action: action, - payload: payload || {} - }, - false - ); - } - }, - - /** COMMON */ - - common: { - - getSettings: function (context, payload) { - SDApi.send(context, 'getSettings', {}); - }, - - setSettings: function (context, payload) { - SDApi.send(context, 'setSettings', { - payload: payload - }); - }, - - getGlobalSettings: function (context, payload) { - SDApi.send(context, 'getGlobalSettings', {}); - }, - - setGlobalSettings: function (context, payload) { - SDApi.send(context, 'setGlobalSettings', { - payload: payload - }); - }, - - logMessage: function () { - /** - * for logMessage we don't need a context, so we allow both - * logMessage(unneededContext, 'message') - * and - * logMessage('message') - */ - - let payload = (arguments.length > 1) ? arguments[1] : arguments[0]; - - SDApi.send(null, 'logMessage', { - payload: { - message: payload - } - }); - }, - - openUrl: function (context, urlToOpen) { - SDApi.send(context, 'openUrl', { - payload: { - url: urlToOpen - } - }); - }, - - test: function () { - console.log(this); - console.log(SDApi); - }, - - debugPrint: function (context, inString) { - // console.log("------------ DEBUGPRINT"); - // console.log([].slice.apply(arguments).join()); - // console.log("------------ DEBUGPRINT"); - SDApi.send(context, 'debugPrint', { - payload: [].slice.apply(arguments).join('.') || '' - }); - }, - - dbgSend: function (fn, context) { - /** lookup if an appropriate function exists */ - if ($SD.connection && this[fn] && typeof this[fn] === 'function') { - /** verify if type of payload is an object/json */ - const payload = this[fn](); - if (typeof payload === 'object') { - Object.assign({ event: fn, context: context }, payload); - $SD.connection && $SD.connection.sendJSON(payload); - } - } - console.log(this, fn, typeof this[fn], this[fn]()); - } - - } -}; - -/** SDDebug - * Utility to log the JSON structure of an incoming object - */ - -const SDDebug = { - logger: function (name, fn) { - const logEvent = jsn => { - console.log('____SDDebug.logger.logEvent'); - console.log(jsn); - debugLog('-->> Received Obj:', jsn); - debugLog('jsonObj', jsn); - debugLog('event', jsn['event']); - debugLog('actionType', jsn['actionType']); - debugLog('settings', jsn['settings']); - debugLog('coordinates', jsn['coordinates']); - debugLog('---'); - }; - - const logSomething = jsn => - console.log('____SDDebug.logger.logSomething'); - - return { logEvent, logSomething }; - } -}; - -/** - * This is the instance of the StreamDeck object. - * There's only one StreamDeck object, which carries - * connection parameters and handles communication - * to/from the software's PluginManager. - */ - -window.$SD = StreamDeck.getInstance(); -window.$SD.api = SDApi; - -function WEBSOCKETERROR (evt) { - // Websocket is closed - var reason = ''; - if (evt.code === 1000) { - reason = 'Normal Closure. The purpose for which the connection was established has been fulfilled.'; - } else if (evt.code === 1001) { - reason = 'Going Away. An endpoint is "going away", such as a server going down or a browser having navigated away from a page.'; - } else if (evt.code === 1002) { - reason = 'Protocol error. An endpoint is terminating the connection due to a protocol error'; - } else if (evt.code === 1003) { - reason = "Unsupported Data. An endpoint received a type of data it doesn't support."; - } else if (evt.code === 1004) { - reason = '--Reserved--. The specific meaning might be defined in the future.'; - } else if (evt.code === 1005) { - reason = 'No Status. No status code was actually present.'; - } else if (evt.code === 1006) { - reason = 'Abnormal Closure. The connection was closed abnormally, e.g., without sending or receiving a Close control frame'; - } else if (evt.code === 1007) { - reason = 'Invalid frame payload data. The connection was closed, because the received data was not consistent with the type of the message (e.g., non-UTF-8 [http://tools.ietf.org/html/rfc3629]).'; - } else if (evt.code === 1008) { - reason = 'Policy Violation. The connection was closed, because current message data "violates its policy". This reason is given either if there is no other suitable reason, or if there is a need to hide specific details about the policy.'; - } else if (evt.code === 1009) { - reason = 'Message Too Big. Connection closed because the message is too big for it to process.'; - } else if (evt.code === 1010) { // Note that this status code is not used by the server, because it can fail the WebSocket handshake instead. - reason = "Mandatory Ext. Connection is terminated the connection because the server didn't negotiate one or more extensions in the WebSocket handshake.
Mandatory extensions were: " + evt.reason; - } else if (evt.code === 1011) { - reason = 'Internl Server Error. Connection closed because it encountered an unexpected condition that prevented it from fulfilling the request.'; - } else if (evt.code === 1015) { - reason = "TLS Handshake. The connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."; - } else { - reason = 'Unknown reason'; - } - - return reason; -} - -const SOCKETERRORS = { - '0': 'The connection has not yet been established', - '1': 'The connection is established and communication is possible', - '2': 'The connection is going through the closing handshake', - '3': 'The connection has been closed or could not be opened' -}; diff --git a/StreamDeckPlugin/src/main/resources/static/propertyinspector/js/common_pi.js b/StreamDeckPlugin/src/main/resources/static/propertyinspector/js/common_pi.js deleted file mode 100644 index ef67a75..0000000 --- a/StreamDeckPlugin/src/main/resources/static/propertyinspector/js/common_pi.js +++ /dev/null @@ -1,68 +0,0 @@ -/** Stream Deck software passes system-highlight color information - * to Property Inspector. Here we 'inject' the CSS styles into the DOM - * when we receive this information. */ - -function addDynamicStyles (clrs, fromWhere) { - // console.log("addDynamicStyles", clrs.highlightColor, clrs.highlightColor.slice(0, 7)); - const node = document.getElementById('#sdpi-dynamic-styles') || document.createElement('style'); - if (!clrs.mouseDownColor) clrs.mouseDownColor = Utils.fadeColor(clrs.highlightColor, -100); - const clr = clrs.highlightColor.slice(0, 7); - const clr1 = Utils.fadeColor(clr, 100); - const clr2 = Utils.fadeColor(clr, 60); - const metersActiveColor = Utils.fadeColor(clr, -60); - - // console.log("%c ", `background-color: #${clr}`, 'addDS', clr); - // console.log("%c ", `background-color: #${clr1}`, 'addDS1', clr1); - // console.log("%c ", `background-color: #${clr2}`, 'addDS2', clr2); - // console.log("%c ", `background-color: #${metersActiveColor}`, 'metersActiveColor', metersActiveColor); - - node.setAttribute('id', 'sdpi-dynamic-styles'); - node.innerHTML = ` - - input[type="radio"]:checked + label span, - input[type="checkbox"]:checked + label span { - background-color: ${clrs.highlightColor}; - } - - input[type="radio"]:active:checked + label span, - input[type="checkbox"]:active:checked + label span { - background-color: ${clrs.mouseDownColor}; - } - - input[type="radio"]:active + label span, - input[type="checkbox"]:active + label span { - background-color: ${clrs.buttonPressedBorderColor}; - } - - td.selected, - td.selected:hover, - li.selected:hover, - li.selected { - color: white; - background-color: ${clrs.highlightColor}; - } - - .sdpi-file-label > label:active, - .sdpi-file-label.file:active, - label.sdpi-file-label:active, - label.sdpi-file-info:active, - input[type="file"]::-webkit-file-upload-button:active, - button:active { - border: 1pt solid ${clrs.buttonPressedBorderColor}; - background-color: ${clrs.buttonPressedBackgroundColor}; - color: ${clrs.buttonPressedTextColor}; - border-color: ${clrs.buttonPressedBorderColor}; - } - - ::-webkit-progress-value, - meter::-webkit-meter-optimum-value { - background: linear-gradient(${clr2}, ${clr1} 20%, ${clr} 45%, ${clr} 55%, ${clr2}) - } - - ::-webkit-progress-value:active, - meter::-webkit-meter-optimum-value:active { - background: linear-gradient(${clr}, ${clr2} 20%, ${metersActiveColor} 45%, ${metersActiveColor} 55%, ${clr}) - } - `; - document.body.appendChild(node); -}; diff --git a/StreamDeckPlugin/src/main/resources/static/propertyinspector/js/index_pi.js b/StreamDeckPlugin/src/main/resources/static/propertyinspector/js/index_pi.js deleted file mode 100644 index bc022dc..0000000 --- a/StreamDeckPlugin/src/main/resources/static/propertyinspector/js/index_pi.js +++ /dev/null @@ -1,500 +0,0 @@ -/* global addDynamicStyles, $SD, Utils */ -/* eslint-disable no-extra-boolean-cast */ -/* eslint-disable no-else-return */ - -/** - * This example contains a working Property Inspector, which already communicates - * with the corresponding plugin throug settings and/or direct messages. - * If you want to use other control-types, we recommend copy/paste these from the - * PISamples demo-library, which already contains quite some example DOM elements - */ - - -/** - * First we declare a global variable, which change all elements behaviour - * globally. It installs the 'onchange' or 'oninput' event on the HTML controls and fiels. - * - * Change this, if you want interactive elements act on any modification (oninput), - * or while their value changes 'onchange'. - */ - -var onchangeevt = 'oninput'; // 'onchange'; - -/** - * cache the static SDPI-WRAPPER, which contains all your HTML elements. - * Please make sure, you put all HTML-elemenets into this wrapper, so they - * are drawn properly using the integrated CSS. - */ - -let sdpiWrapper = document.querySelector('.sdpi-wrapper'); - -/** - * Since the Property Inspector is instantiated every time you select a key - * in Stream Deck software, we can savely cache our settings in a global variable. - */ - -let settings; - - /** - * The 'connected' event is the first event sent to Property Inspector, after it's instance - * is registered with Stream Deck software. It carries the current websocket, settings, - * and other information about the current environmet in a JSON object. - * You can use it to subscribe to events you want to use in your plugin. - */ - -$SD.on('connected', (jsn) => { - /** - * The passed 'applicationInfo' object contains various information about your - * computer, Stream Deck version and OS-settings (e.g. colors as set in your - * OSes display preferences.) - * We use this to inject some dynamic CSS values (saved in 'common_pi.js'), to allow - * drawing proper highlight-colors or progressbars. - */ - - console.log("connected"); - addDynamicStyles($SD.applicationInfo.colors, 'connectSocket'); - - /** - * Current settings are passed in the JSON node - * {actionInfo: { - * payload: { - * settings: { - * yoursetting: yourvalue, - * otherthings: othervalues - * ... - * To conveniently read those settings, we have a little utility to read - * arbitrary values from a JSON object, eg: - * - * const foundObject = Utils.getProp(JSON-OBJECT, 'path.to.target', defaultValueIfNotFound) - */ - - settings = Utils.getProp(jsn, 'actionInfo.payload.settings', false); - console.log(settings); - if (settings) { - if (!settings.minecraftip) { - settings.minecraftip = 'http://localhost:3000'; - console.log('set default minecraftip', settings.minecraftip); - saveSettings({key: 'minecraftip', value: settings.minecraftip}); - } - updateUI(settings); - } -}); - -/** - * The 'sendToPropertyInspector' event can be used to send messages directly from your plugin - * to the Property Inspector without saving these messages to the settings. - */ - -$SD.on('sendToPropertyInspector', jsn => { - const pl = jsn.payload; - /** - * This is an example, how you could show an error to the user - */ - if (pl.hasOwnProperty('error')) { - sdpiWrapper.innerHTML = `
-
- ${pl.error} - ${pl.hasOwnProperty('info') ? pl.info : ''} -
-
`; - } else { - - /** - * - * Do something with the data sent from the plugin - * e.g. update some elements in the Property Inspector's UI. - * - */ - } -}); - -const updateUI = (pl) => { - Object.keys(pl).map(e => { - if (e && e != '') { - const foundElement = document.querySelector(`#${e}`); - console.log(`searching for: #${e}`, 'found:', foundElement); - if (foundElement && foundElement.type !== 'file') { - foundElement.value = pl[e]; - const maxl = foundElement.getAttribute('maxlength') || 50; - const labels = document.querySelectorAll(`[for='${foundElement.id}']`); - if (labels.length) { - for (let x of labels) { - x.textContent = maxl ? `${foundElement.value.length}/${maxl}` : `${foundElement.value.length}`; - } - } - } - } - }) -} - -/** - * Something in the PI changed: - * either you clicked a button, dragged a slider or entered some text - * - * The 'piDataChanged' event is sent, if data-changes are detected. - * The changed data are collected in a JSON structure - * - * It looks like this: - * - * { - * checked: false - * group: false - * index: 0 - * key: "mynameinput" - * selection: [] - * value: "Elgato" - * } - * - * If you set an 'id' to an input-element, this will get the 'key' of this object. - * The input's value will get the value. - * There are other fields (e.g. - * - 'checked' if you clicked a checkbox - * - 'index', if you clicked an element within a group of other elements - * - 'selection', if the element allows multiple-selections - * ) - * - * Please note: - * the template creates this object for the most common HTML input-controls. - * This is a convenient way to start interacting with your plugin quickly. - * - */ - -$SD.on('piDataChanged', (returnValue) => { - - console.log('%c%s', 'color: white; background: blue}; font-size: 15px;', 'piDataChanged'); - console.log(returnValue); - - /* SAVE THE VALUE TO SETTINGS */ - saveSettings(returnValue); - - /* SEND THE VALUES TO PLUGIN */ - sendValueToPlugin(returnValue, 'sdpi_collection'); -}); - -/** - * Below are a bunch of helpers to make your DOM interactive - * The will cover changes of the most common elements in your DOM - * and send their value to the plugin on a change. - * To accomplish this, the 'handleSdpiItemChange' method tries to find the - * nearest element 'id' and the corresponding value of the element(along with - * some other information you might need) . It then puts everything in a - * 'sdpi_collection', where the 'id' will get the 'key' and the 'value' will get the 'value'. - * - * In the plugin you just need to listen for 'sdpi_collection' in the sent JSON.payload - * and save the values you need in your settings (or StreamDeck-settings for persistence). - * - * In this template those key/value pairs are saved automatically persistently to StreamDeck. - * Open the console in the remote debugger to inspect what's getting saved. - * - */ - - function saveSettings(sdpi_collection) { - - if (typeof sdpi_collection !== 'object') return; - - if (sdpi_collection.hasOwnProperty('key') && sdpi_collection.key != '') { - if (sdpi_collection.value && sdpi_collection.value !== undefined) { - console.log(sdpi_collection.key, " => ", sdpi_collection.value); - settings[sdpi_collection.key] = sdpi_collection.value; - console.log('setSettings....', settings); - $SD.api.setSettings($SD.uuid, settings); - } - } - } - - /** - * 'sendValueToPlugin' is a wrapper to send some values to the plugin - * - * It is called with a value and the name of a property: - * - * sendValueToPlugin(), 'key-property') - * - * where 'key-property' is the property you listen for in your plugin's - * 'sendToPlugin' events payload. - * - */ - - function sendValueToPlugin(value, prop) { - console.log("sendValueToPlugin", value, prop); - if ($SD.connection && $SD.connection.readyState === 1) { - const json = { - action: $SD.actionInfo['action'], - event: 'sendToPlugin', - context: $SD.uuid, - payload: { - [prop]: value, - targetContext: $SD.actionInfo['context'] - } - }; - - $SD.connection.send(JSON.stringify(json)); - } -} - -/** CREATE INTERACTIVE HTML-DOM - * The 'prepareDOMElements' helper is called, to install events on all kinds of - * elements (as seen e.g. in PISamples) - * Elements can get clicked or act on their 'change' or 'input' event. (see at the top - * of this file) - * Messages are then processed using the 'handleSdpiItemChange' method below. - * If you use common elements, you don't need to touch these helpers. Just take care - * setting an 'id' on the element's input-control from which you want to get value(s). - * These helpers allow you to quickly start experimenting and exchanging values with - * your plugin. - */ - -function prepareDOMElements(baseElement) { - baseElement = baseElement || document; - Array.from(baseElement.querySelectorAll('.sdpi-item-value')).forEach( - (el, i) => { - const elementsToClick = [ - 'BUTTON', - 'OL', - 'UL', - 'TABLE', - 'METER', - 'PROGRESS', - 'CANVAS' - ].includes(el.tagName); - const evt = elementsToClick ? 'onclick' : onchangeevt || 'onchange'; - - /** Look for combinations, where we consider the span as label for the input - * we don't use `labels` for that, because a range could have 2 labels. - */ - const inputGroup = el.querySelectorAll('input + span'); - if (inputGroup.length === 2) { - const offs = inputGroup[0].tagName === 'INPUT' ? 1 : 0; - inputGroup[offs].textContent = inputGroup[1 - offs].value; - inputGroup[1 - offs]['oninput'] = function() { - inputGroup[offs].textContent = inputGroup[1 - offs].value; - }; - } - /** We look for elements which have an 'clickable' attribute - * we use these e.g. on an 'inputGroup' () to adjust the value of - * the corresponding range-control - */ - Array.from(el.querySelectorAll('.clickable')).forEach( - (subel, subi) => { - subel['onclick'] = function(e) { - handleSdpiItemChange(e.target, subi); - }; - } - ); - /** Just in case the found HTML element already has an input or change - event attached, - * we clone it, and call it in the callback, right before the freshly attached event - */ - const cloneEvt = el[evt]; - el[evt] = function(e) { - if (cloneEvt) cloneEvt(); - handleSdpiItemChange(e.target, i); - }; - } - ); - - /** - * You could add a 'label' to a textares, e.g. to show the number of charactes already typed - * or contained in the textarea. This helper updates this label for you. - */ - baseElement.querySelectorAll('textarea').forEach((e) => { - const maxl = e.getAttribute('maxlength'); - e.targets = baseElement.querySelectorAll(`[for='${e.id}']`); - if (e.targets.length) { - let fn = () => { - for (let x of e.targets) { - x.textContent = maxl ? `${e.value.length}/${maxl}` : `${e.value.length}`; - } - }; - fn(); - e.onkeyup = fn; - } - }); - - baseElement.querySelectorAll('[data-open-url').forEach(e => { - const value = e.getAttribute('data-open-url'); - if (value) { - e.onclick = () => { - let path; - if (value.indexOf('http') !== 0) { - path = document.location.href.split('/'); - path.pop(); - path.push(value.split('/').pop()); - path = path.join('/'); - } else { - path = value; - } - $SD.api.openUrl($SD.uuid, path); - }; - } else { - console.log(`${value} is not a supported url`); - } - }); -} - -function handleSdpiItemChange(e, idx) { - - /** Following items are containers, so we won't handle clicks on them */ - - if (['OL', 'UL', 'TABLE'].includes(e.tagName)) { - return; - } - - /** SPANS are used inside a control as 'labels' - * If a SPAN element calls this function, it has a class of 'clickable' set and is thereby handled as - * clickable label. - */ - - if (e.tagName === 'SPAN') { - const inp = e.parentNode.querySelector('input'); - var tmpValue; - - // if there's no attribute set for the span, try to see, if there's a value in the textContent - // and use it as value - if (!e.hasAttribute('value')) { - tmpValue = Number(e.textContent); - if (typeof tmpValue === 'number' && tmpValue !== null) { - e.setAttribute('value', 0+tmpValue); // this is ugly, but setting a value of 0 on a span doesn't do anything - e.value = tmpValue; - } - } else { - tmpValue = Number(e.getAttribute('value')); - } - - if (inp && tmpValue !== undefined) { - inp.value = tmpValue; - } else return; - } - - const selectedElements = []; - const isList = ['LI', 'OL', 'UL', 'DL', 'TD'].includes(e.tagName); - const sdpiItem = e.closest('.sdpi-item'); - const sdpiItemGroup = e.closest('.sdpi-item-group'); - let sdpiItemChildren = isList - ? sdpiItem.querySelectorAll(e.tagName === 'LI' ? 'li' : 'td') - : sdpiItem.querySelectorAll('.sdpi-item-child > input'); - - if (isList) { - const siv = e.closest('.sdpi-item-value'); - if (!siv.classList.contains('multi-select')) { - for (let x of sdpiItemChildren) x.classList.remove('selected'); - } - if (!siv.classList.contains('no-select')) { - e.classList.toggle('selected'); - } - } - - if (sdpiItemChildren.length && ['radio','checkbox'].includes(sdpiItemChildren[0].type)) { - e.setAttribute('_value', e.checked); //'_value' has priority over .value - } - if (sdpiItemGroup && !sdpiItemChildren.length) { - for (let x of ['input', 'meter', 'progress']) { - sdpiItemChildren = sdpiItemGroup.querySelectorAll(x); - if (sdpiItemChildren.length) break; - } - } - - if (e.selectedIndex) { - idx = e.selectedIndex; - } else { - sdpiItemChildren.forEach((ec, i) => { - if (ec.classList.contains('selected')) { - selectedElements.push(ec.textContent); - } - if (ec === e) { - idx = i; - selectedElements.push(ec.value); - } - }); - } - - const returnValue = { - key: e.id && e.id.charAt(0) !== '_' ? e.id : sdpiItem.id, - value: isList - ? e.textContent - : e.hasAttribute('_value') - ? e.getAttribute('_value') - : e.value - ? e.type === 'file' - ? decodeURIComponent(e.value.replace(/^C:\\fakepath\\/, '')) - : e.value - : e.getAttribute('value'), - group: sdpiItemGroup ? sdpiItemGroup.id : false, - index: idx, - selection: selectedElements, - checked: e.checked - }; - - /** Just simulate the original file-selector: - * If there's an element of class '.sdpi-file-info' - * show the filename there - */ - if (e.type === 'file') { - const info = sdpiItem.querySelector('.sdpi-file-info'); - if (info) { - const s = returnValue.value.split('/').pop(); - info.textContent = s.length > 28 - ? s.substr(0, 10) - + '...' - + s.substr(s.length - 10, s.length) - : s; - } - } - - $SD.emit('piDataChanged', returnValue); -} - -/** - * This is a quick and simple way to localize elements and labels in the Property - * Inspector's UI without touching their values. - * It uses a quick 'lox()' function, which reads the strings from a global - * variable 'localizedStrings' (in 'common.js') - */ - -// eslint-disable-next-line no-unused-vars -function localizeUI() { - const el = document.querySelector('.sdpi-wrapper') || document; - let t; - Array.from(el.querySelectorAll('sdpi-item-label')).forEach(e => { - t = e.textContent.lox(); - if (e !== t) { - e.innerHTML = e.innerHTML.replace(e.textContent, t); - } - }); - Array.from(el.querySelectorAll('*:not(script)')).forEach(e => { - if ( - e.childNodes - && e.childNodes.length > 0 - && e.childNodes[0].nodeValue - && typeof e.childNodes[0].nodeValue === 'string' - ) { - t = e.childNodes[0].nodeValue.lox(); - if (e.childNodes[0].nodeValue !== t) { - e.childNodes[0].nodeValue = t; - } - } - }); -} - -/** - * - * Some more (de-) initialization helpers - * - */ - -document.addEventListener('DOMContentLoaded', function() { - document.body.classList.add(navigator.userAgent.includes("Mac") ? 'mac' : 'win'); - prepareDOMElements(); - $SD.on('localizationLoaded', (language) => { - localizeUI(); - }); -}); - -/** the beforeunload event is fired, right before the PI will remove all nodes */ -window.addEventListener('beforeunload', function(e) { - e.preventDefault(); - sendValueToPlugin('propertyInspectorWillDisappear', 'property_inspector'); - // Don't set a returnValue to the event, otherwise Chromium with throw an error. // e.returnValue = ''; -}); - -function gotCallbackFromWindow(parameter) { - console.log(parameter); -} diff --git a/StreamDeckPlugin/src/main/resources/template/app.js.action.template b/StreamDeckPlugin/src/main/resources/template/app.js.action.template deleted file mode 100644 index d03ded1..0000000 --- a/StreamDeckPlugin/src/main/resources/template/app.js.action.template +++ /dev/null @@ -1,69 +0,0 @@ -const ${constName} = { - onConnect: function(jsn) { - $SD.on('com.mosadie.effectmc.${lowercase}.willAppear', (jsonObj) => ${constName}.onWillAppear(jsonObj)); - $SD.on('com.mosadie.effectmc.${lowercase}.keyUp', (jsonObj) => ${constName}.onKeyUp(jsonObj)); - $SD.on('com.mosadie.effectmc.${lowercase}.didReceiveSettings', (jsonObj) => ${constName}.onDidReceiveSettings(jsonObj)); - $SD.on('com.mosadie.effectmc.${lowercase}.propertyInspectorDidAppear', (jsonObj) => { - console.log('%c%s', 'color: white; background: black; font-size: 13px;', '[app.js]propertyInspectorDidAppear:'); - }); - $SD.on('com.mosadie.effectmc.${lowercase}.propertyInspectorDidDisappear', (jsonObj) => { - console.log('%c%s', 'color: white; background: red; font-size: 13px;', '[app.js]propertyInspectorDidDisappear:'); - }); - }, - - settings:{}, - onDidReceiveSettings: function(jsn) { - this.settings = Utils.getProp(jsn, 'payload.settings', {}); - - // If no settings, fill in some default settings. - if (!this.settings || Object.keys(this.settings).length === 0 || !this.settings.minecraftip) { - this.settings.minecraftip = 'http://localhost:3000'; - ${settingsDefaults} - } - }, - - onWillAppear: function (jsn) { - this.settings = jsn.payload.settings; - - // If no settings, fill in some default settings. - if (!this.settings || Object.keys(this.settings).length === 0 || !this.settings.minecraftip) { - this.settings.minecraftip = 'http://localhost:3000'; - ${settingsDefaults} - } - }, - - onKeyUp: function (jsn) { - if (!jsn.payload.settings) { - $SD.api.showAlert(jsn.context); - console.log("No settings!"); - return; - } - - if (!jsn.payload.settings || !jsn.payload.settings.minecraftip || jsn.payload.settings.minecraftip == '' || jsn.payload.settings.minecraftip == ' ') { - $SD.api.showAlert(jsn.context); - console.log('No Minecraft IP!'); - return; - } - - ${settingsIfCheck} - - var url = new URL('/${slug}', jsn.payload.settings.minecraftip); - - url.searchParams.set('device', jsn.device); - - ${setParams} - - ${sendRequest} - }, - - saveSettings: function (jsn, sdpi_collection) { - console.log('saveSettings:', jsn); - if (sdpi_collection.hasOwnProperty('key') && sdpi_collection.key != '') { - if (sdpi_collection.value && sdpi_collection.value !== undefined) { - this.settings[sdpi_collection.key] = sdpi_collection.value; - console.log('setSettings....', this.settings); - $SD.api.setSettings(jsn.context, this.settings); - } - } - }, -} diff --git a/StreamDeckPlugin/src/main/resources/template/app.js.main.template b/StreamDeckPlugin/src/main/resources/template/app.js.main.template deleted file mode 100644 index a8280dc..0000000 --- a/StreamDeckPlugin/src/main/resources/template/app.js.main.template +++ /dev/null @@ -1,10 +0,0 @@ -$SD.on('connected', (jsonObj) => connected(jsonObj)); - -/* Subscribe to onConnect for each Action */ -function connected(jsn) { - ${onConnect} -}; - -/* Actions */ - -${actions} \ No newline at end of file diff --git a/StreamDeckPlugin/src/main/resources/template/pi.html.template b/StreamDeckPlugin/src/main/resources/template/pi.html.template deleted file mode 100644 index 9bdd685..0000000 --- a/StreamDeckPlugin/src/main/resources/template/pi.html.template +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - com.mosadie.effectmc Property Inspector - - - -
- -
-
Minecraft IP
- -
- - ${properties} - -
- - - - - - - \ No newline at end of file diff --git a/effectmc/.gitignore b/effectmc/.gitignore new file mode 100644 index 0000000..c7969df --- /dev/null +++ b/effectmc/.gitignore @@ -0,0 +1,13 @@ +# Node.js +node_modules/ + +# Stream Deck files +*.sdPlugin/bin +*.sdPlugin/logs + +# Generated files +src +com.mosadie.effectmc.sdPlugin/ui +com.mosadie.effectmc.sdPlugin/manifest.json +effects.json +*.streamDeckPlugin \ No newline at end of file diff --git a/effectmc/.vscode/launch.json b/effectmc/.vscode/launch.json new file mode 100644 index 0000000..e34b2cf --- /dev/null +++ b/effectmc/.vscode/launch.json @@ -0,0 +1,20 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Plugin", + "type": "node", + "request": "attach", + "processId": "${command:PickProcess}", + "outFiles": [ + "${workspaceFolder}/bin/**/*.js" + ], + "resolveSourceMapLocations": [ + "${workspaceFolder}/**" + ] + } + ] +} \ No newline at end of file diff --git a/effectmc/.vscode/settings.json b/effectmc/.vscode/settings.json new file mode 100644 index 0000000..ef8832f --- /dev/null +++ b/effectmc/.vscode/settings.json @@ -0,0 +1,17 @@ +{ + /* JSON schemas */ + "json.schemas": [ + { + "fileMatch": [ + "**/manifest.json" + ], + "url": "https://schemas.elgato.com/streamdeck/plugins/manifest.json" + }, + { + "fileMatch": [ + "**/layouts/*.json" + ], + "url": "https://schemas.elgato.com/streamdeck/plugins/layout.json" + } + ] +} \ No newline at end of file diff --git a/effectmc/README.md b/effectmc/README.md new file mode 100644 index 0000000..2636e64 --- /dev/null +++ b/effectmc/README.md @@ -0,0 +1,7 @@ +This is the Stream Seck plugin for EffectMC. + +Making some quick notes on how this works: + +- The plugin is looking for an effects.json file in this directory to use to generate the rest of the stream deck plugin. +- Run the generate task to generate the plugin. +- Use the streamdeck CLI to build and pack the plugin. \ No newline at end of file diff --git a/StreamDeckPlugin/src/main/resources/static/images/Template.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/Template.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/Template.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/Template.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/fov/SetFov.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/fov/SetFov.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/fov/SetFov.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/fov/SetFov.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/fov/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/fov/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/fov/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/fov/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/fov/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/fov/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/fov/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/fov/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/fov/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/fov/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/fov/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/fov/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/fov/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/fov/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/fov/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/fov/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/gamemode/SetGamemode.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamemode/SetGamemode.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/gamemode/SetGamemode.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamemode/SetGamemode.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/gamemode/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamemode/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/gamemode/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamemode/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/gamemode/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamemode/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/gamemode/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamemode/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/gamemode/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamemode/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/gamemode/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamemode/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/gamemode/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamemode/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/gamemode/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamemode/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/gamma/SetGamma.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamma/SetGamma.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/gamma/SetGamma.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamma/SetGamma.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/gamma/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamma/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/gamma/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamma/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/gamma/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamma/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/gamma/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamma/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/gamma/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamma/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/gamma/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamma/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/gamma/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamma/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/gamma/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/gamma/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/guiscale/SetGuiScale.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/guiscale/SetGuiScale.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/guiscale/SetGuiScale.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/guiscale/SetGuiScale.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/guiscale/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/guiscale/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/guiscale/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/guiscale/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/guiscale/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/guiscale/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/guiscale/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/guiscale/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/guiscale/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/guiscale/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/guiscale/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/guiscale/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/guiscale/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/guiscale/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/guiscale/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/guiscale/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/joinserver/JoinServer.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/joinserver/JoinServer.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/joinserver/JoinServer.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/joinserver/JoinServer.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/joinserver/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/joinserver/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/joinserver/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/joinserver/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/joinserver/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/joinserver/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/joinserver/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/joinserver/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/joinserver/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/joinserver/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/joinserver/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/joinserver/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/joinserver/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/joinserver/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/joinserver/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/joinserver/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/loadworld/Template.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/loadworld/Template.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/loadworld/Template.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/loadworld/Template.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/loadworld/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/loadworld/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/loadworld/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/loadworld/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/loadworld/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/loadworld/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/loadworld/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/loadworld/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/loadworld/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/loadworld/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/loadworld/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/loadworld/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/loadworld/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/loadworld/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/loadworld/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/loadworld/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/narrate/Narrate.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/narrate/Narrate.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/narrate/Narrate.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/narrate/Narrate.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/narrate/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/narrate/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/narrate/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/narrate/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/narrate/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/narrate/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/narrate/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/narrate/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/narrate/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/narrate/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/narrate/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/narrate/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/narrate/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/narrate/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/narrate/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/narrate/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/openbook/OpenBook.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openbook/OpenBook.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/openbook/OpenBook.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openbook/OpenBook.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/openbook/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openbook/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/openbook/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openbook/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/openbook/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openbook/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/openbook/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openbook/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/openbook/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openbook/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/openbook/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openbook/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/openbook/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openbook/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/openbook/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openbook/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/openscreen/OpenScreen.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openscreen/OpenScreen.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/openscreen/OpenScreen.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openscreen/OpenScreen.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/openscreen/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openscreen/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/openscreen/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openscreen/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/openscreen/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openscreen/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/openscreen/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openscreen/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/openscreen/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openscreen/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/openscreen/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openscreen/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/openscreen/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openscreen/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/openscreen/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/openscreen/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/playsound/PlaySound.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/playsound/PlaySound.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/playsound/PlaySound.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/playsound/PlaySound.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/playsound/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/playsound/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/playsound/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/playsound/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/playsound/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/playsound/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/playsound/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/playsound/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/playsound/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/playsound/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/playsound/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/playsound/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/playsound/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/playsound/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/playsound/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/playsound/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/pov/SetPov.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/pov/SetPov.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/pov/SetPov.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/pov/SetPov.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/pov/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/pov/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/pov/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/pov/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/pov/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/pov/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/pov/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/pov/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/pov/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/pov/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/pov/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/pov/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/pov/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/pov/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/pov/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/pov/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/receivechat/ReceiveChatMessage.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/receivechat/ReceiveChatMessage.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/receivechat/ReceiveChatMessage.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/receivechat/ReceiveChatMessage.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/receivechat/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/receivechat/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/receivechat/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/receivechat/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/receivechat/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/receivechat/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/receivechat/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/receivechat/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/receivechat/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/receivechat/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/receivechat/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/receivechat/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/receivechat/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/receivechat/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/receivechat/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/receivechat/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/rejoin/Rejoin.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/rejoin/Rejoin.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/rejoin/Rejoin.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/rejoin/Rejoin.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/rejoin/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/rejoin/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/rejoin/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/rejoin/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/rejoin/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/rejoin/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/rejoin/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/rejoin/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/rejoin/keyicon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/rejoin/keyicon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/rejoin/keyicon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/rejoin/keyicon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/rejoin/keyicon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/rejoin/keyicon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/rejoin/keyicon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/rejoin/keyicon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/renderdistance/SetRenderDistance.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/renderdistance/SetRenderDistance.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/renderdistance/SetRenderDistance.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/renderdistance/SetRenderDistance.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/renderdistance/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/renderdistance/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/renderdistance/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/renderdistance/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/renderdistance/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/renderdistance/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/renderdistance/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/renderdistance/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/renderdistance/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/renderdistance/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/renderdistance/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/renderdistance/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/renderdistance/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/renderdistance/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/renderdistance/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/renderdistance/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/sendchat/SendChatMessage.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/sendchat/SendChatMessage.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/sendchat/SendChatMessage.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/sendchat/SendChatMessage.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/sendchat/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/sendchat/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/sendchat/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/sendchat/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/sendchat/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/sendchat/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/sendchat/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/sendchat/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/sendchat/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/sendchat/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/sendchat/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/sendchat/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/sendchat/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/sendchat/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/sendchat/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/sendchat/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/setskin/SetSkin.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskin/SetSkin.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/setskin/SetSkin.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskin/SetSkin.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/setskin/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskin/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/setskin/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskin/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/setskin/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskin/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/setskin/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskin/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/setskin/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskin/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/setskin/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskin/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/setskin/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskin/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/setskin/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskin/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/setskinlayer/SetSkinLayerVisibility.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskinlayer/SetSkinLayerVisibility.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/setskinlayer/SetSkinLayerVisibility.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskinlayer/SetSkinLayerVisibility.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/setskinlayer/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskinlayer/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/setskinlayer/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskinlayer/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/setskinlayer/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskinlayer/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/setskinlayer/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskinlayer/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/setskinlayer/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskinlayer/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/setskinlayer/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskinlayer/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/setskinlayer/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskinlayer/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/setskinlayer/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/setskinlayer/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showactionmessage/ShowActionMessage.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showactionmessage/ShowActionMessage.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showactionmessage/ShowActionMessage.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showactionmessage/ShowActionMessage.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/showactionmessage/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showactionmessage/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showactionmessage/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showactionmessage/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showactionmessage/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showactionmessage/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showactionmessage/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showactionmessage/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showactionmessage/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showactionmessage/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showactionmessage/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showactionmessage/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showactionmessage/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showactionmessage/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showactionmessage/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showactionmessage/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showchat/ShowChat.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showchat/ShowChat.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showchat/ShowChat.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showchat/ShowChat.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/showchat/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showchat/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showchat/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showchat/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showchat/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showchat/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showchat/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showchat/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showchat/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showchat/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showchat/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showchat/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showchat/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showchat/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showchat/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showchat/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showitemtoast/ShowItemToast.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showitemtoast/ShowItemToast.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showitemtoast/ShowItemToast.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showitemtoast/ShowItemToast.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/showitemtoast/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showitemtoast/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showitemtoast/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showitemtoast/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showitemtoast/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showitemtoast/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showitemtoast/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showitemtoast/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showitemtoast/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showitemtoast/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showitemtoast/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showitemtoast/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showitemtoast/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showitemtoast/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showitemtoast/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showitemtoast/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showtitle/ShowTitle.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtitle/ShowTitle.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showtitle/ShowTitle.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtitle/ShowTitle.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/showtitle/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtitle/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showtitle/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtitle/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showtitle/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtitle/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showtitle/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtitle/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showtitle/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtitle/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showtitle/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtitle/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showtitle/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtitle/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showtitle/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtitle/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showtoast/ShowToast.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtoast/ShowToast.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showtoast/ShowToast.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtoast/ShowToast.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/showtoast/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtoast/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showtoast/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtoast/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showtoast/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtoast/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showtoast/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtoast/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showtoast/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtoast/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showtoast/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtoast/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/showtoast/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtoast/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/showtoast/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/showtoast/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/stopsound/StopSound.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/stopsound/StopSound.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/stopsound/StopSound.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/stopsound/StopSound.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/stopsound/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/stopsound/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/stopsound/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/stopsound/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/stopsound/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/stopsound/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/stopsound/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/stopsound/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/stopsound/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/stopsound/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/stopsound/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/stopsound/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/stopsound/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/stopsound/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/stopsound/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/stopsound/keyIcon@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/triggerdisconnect/TriggerDisconnect.pdn b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/triggerdisconnect/TriggerDisconnect.pdn similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/triggerdisconnect/TriggerDisconnect.pdn rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/triggerdisconnect/TriggerDisconnect.pdn diff --git a/StreamDeckPlugin/src/main/resources/static/images/triggerdisconnect/actionImage.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/triggerdisconnect/actionImage.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/triggerdisconnect/actionImage.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/triggerdisconnect/actionImage.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/triggerdisconnect/actionImage@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/triggerdisconnect/actionImage@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/triggerdisconnect/actionImage@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/triggerdisconnect/actionImage@2x.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/triggerdisconnect/keyIcon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/triggerdisconnect/keyIcon.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/triggerdisconnect/keyIcon.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/triggerdisconnect/keyIcon.png diff --git a/StreamDeckPlugin/src/main/resources/static/images/triggerdisconnect/keyIcon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/triggerdisconnect/keyIcon@2x.png similarity index 100% rename from StreamDeckPlugin/src/main/resources/static/images/triggerdisconnect/keyIcon@2x.png rename to effectmc/com.mosadie.effectmc.sdPlugin/imgs/actions/triggerdisconnect/keyIcon@2x.png diff --git a/effectmc/com.mosadie.effectmc.sdPlugin/imgs/plugin/category-icon.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/plugin/category-icon.png new file mode 100644 index 0000000..c9faaa2 Binary files /dev/null and b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/plugin/category-icon.png differ diff --git a/effectmc/com.mosadie.effectmc.sdPlugin/imgs/plugin/category-icon@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/plugin/category-icon@2x.png new file mode 100644 index 0000000..cae11dc Binary files /dev/null and b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/plugin/category-icon@2x.png differ diff --git a/effectmc/com.mosadie.effectmc.sdPlugin/imgs/plugin/marketplace.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/plugin/marketplace.png new file mode 100644 index 0000000..f74d841 Binary files /dev/null and b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/plugin/marketplace.png differ diff --git a/effectmc/com.mosadie.effectmc.sdPlugin/imgs/plugin/marketplace@2x.png b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/plugin/marketplace@2x.png new file mode 100644 index 0000000..435157a Binary files /dev/null and b/effectmc/com.mosadie.effectmc.sdPlugin/imgs/plugin/marketplace@2x.png differ diff --git a/effectmc/generator/generateplugin.js b/effectmc/generator/generateplugin.js new file mode 100644 index 0000000..0179e61 --- /dev/null +++ b/effectmc/generator/generateplugin.js @@ -0,0 +1,174 @@ +// Steps to generating the plugin +// 1 - Generate the manifest +// 2 - Generate the action ts file for each effect +// 3 - Generate the plugin ts file +// 4 - Generate the pi for each effect + +import { readFileSync, existsSync, mkdirSync, writeFileSync, rmSync } from 'fs'; + +// Read the list of Effects from the effects.json file + +const effects = JSON.parse(readFileSync('effects.json', 'utf8')); + +const pluginFolder = 'com.mosadie.effectmc.sdPlugin'; +const srcFolder = 'src'; + +// Create/empty the src folder +if (!existsSync(srcFolder)) { + mkdirSync(srcFolder); +} else { + rmSync(srcFolder, { recursive: true }); + mkdirSync(srcFolder); +} + +// Generate the manifest +const manifest = { + Name: 'EffectMC', + Version: '3.0.0.0', + Author: 'MoSadie', + Actions: effects.map((effect) => ({ + Name: effect.name, + UUID: `com.mosadie.effectmc.${effect.id}`, + Icon: `imgs/actions/${effect.id}/actionImage`, + Tooltip: effect.tooltip, + PropertyInspectorPath: `ui/${effect.id}.html`, + Controllers: ['Keypad'], + States: [ + { + Image: `imgs/actions/${effect.id}/keyIcon`, + TitleAlignment: 'middle', + }, + ], + })), + Category: 'EffectMC', + CategoryIcon: 'imgs/plugin/category-icon', + CodePath: 'bin/plugin.js', + Description: 'Trigger effects in Minecraft. Minecraft mod required.', + Icon: 'imgs/plugin/marketplace', + SDKVersion: 2, + Software: { + MinimumVersion: '6.5', + }, + OS: [ + { + Platform: 'mac', + MinimumVersion: '10.15', + }, + { + Platform: 'windows', + MinimumVersion: '10', + }, + ], + Nodejs: { + Version: '20', + Debug: 'enabled', + }, + UUID: 'com.mosadie.effectmc', +}; + +// Write manifest to the plugin folder (this folder contains contents already, so no need to empty it) +if (!existsSync(`${pluginFolder}`)) { + mkdirSync(`${pluginFolder}`); +} + +writeFileSync(`${pluginFolder}/manifest.json`, JSON.stringify(manifest, null, 4)); + +// Generate the action ts files using the template +const actionTemplate = readFileSync('generator/templates/effect-action.ts.template', 'utf8'); + +// Create the actions folder +if (!existsSync(`${srcFolder}/actions`)) { + mkdirSync(`${srcFolder}/actions`); +} + +effects.forEach((effect) => { + let action = actionTemplate + .replace(/{{effectId}}/g, effect.id) + .replace(/{{effectName}}/g, effect.name) + + const properties = effect.properties.map((property) => { + if (property.TYPE !== "COMMENT") { + return ` ${property.id}?: ${property.sdPropType === 'string' || property.sdPropType === 'number' ? 'string' : property.sdPropType};`; + } else { + return ` // ${property.comment}`; + } + }); + + action = action.replace('{{properties}}', properties.join('\n')); + + const defaultProperties = effect.properties.map((property) => { + if (property.TYPE !== "COMMENT") { + //return ` if(ev.payload.settings.${property.id} == undefined) { ev.payload.settings.${property.id} = ${typeof property.defaultValue === 'string' ? `"${property.defaultValue}"` : property.defaultValue}; }`; + return ` ev.payload.settings.${property.id} = ${typeof property.defaultValue === 'string' || typeof property.defaultValue === 'number' ? `"${property.defaultValue}"` : property.defaultValue};`; + } else { + return ` // ${property.comment}`; + } + }); + + action = action.replace('{{defaults}}', defaultProperties.join('\n')); + + + writeFileSync(`${srcFolder}/actions/${effect.id}.ts`, action); +}); + +// Generate the plugin ts file using the template + +const pluginTemplate = readFileSync('generator/templates/plugin.ts.template', 'utf8'); + +const imports = effects.map((effect) => { + return `import { Effect${effect.id} } from "./actions/${effect.id}";`; +}); + +const registerActions = effects.map((effect) => { + return `streamDeck.actions.registerAction(new Effect${effect.id}());`; +}); + +const plugin = pluginTemplate + .replace('{{import}}', imports.join('\n')) + .replace('{{register}}', registerActions.join('\n')); + +writeFileSync(`${srcFolder}/plugin.ts`, plugin); + +// Generate the pi for each effect using the template + +const piTemplate = readFileSync('generator/templates/effect-pi.html.template', 'utf8'); + +// Create the ui folder +if (!existsSync(`${pluginFolder}/ui`)) { + mkdirSync(`${pluginFolder}/ui`); +} + +effects.forEach((effect) => { + let pi = piTemplate + .replace(/{{effectId}}/g, effect.id) + .replace(/{{effectName}}/g, effect.name); + + const properties = effect.properties.map((property) => { + switch (property.TYPE) { + case 'STRING': + case 'INTEGER': + case 'DOUBLE': + return ``; + + case 'FLOAT': + return ``; + + case 'BODY': + return ``; + + case 'BOOLEAN': + return ``; + + case 'SELECTION': + return `${property.options.map((option) => ``).join('\n')}`; + + case 'COMMENT': + return `${property.comment}`; + } + + }); + + pi = pi.replace('{{properties}}', properties.join('\n')); + + writeFileSync(`${pluginFolder}/ui/${effect.id}.html`, pi); +}); \ No newline at end of file diff --git a/effectmc/generator/templates/effect-action.ts.template b/effectmc/generator/templates/effect-action.ts.template new file mode 100644 index 0000000..0645f19 --- /dev/null +++ b/effectmc/generator/templates/effect-action.ts.template @@ -0,0 +1,64 @@ +import streamDeck, { action, KeyDownEvent, SingletonAction, WillAppearEvent } from "@elgato/streamdeck"; + +/** + * Triggers the {{effectName}} effect in Minecraft. Sends an HTTP request to Minecraft IP to trigger the effect. + */ +@action({ UUID: "com.mosadie.effectmc.{{effectId}}" }) +export class Effect{{effectId}} extends SingletonAction { + + async onWillAppear(ev: WillAppearEvent): Promise { + // Set default settings if they are not provided. + if (!ev.payload.settings.minecraftIp) { + streamDeck.logger.info("No settings, setting defaults."); + ev.payload.settings.minecraftIp = "localhost:3000"; +{{defaults}} + streamDeck.logger.info("Settings set to defaults."); + } + + // Save the settings. + ev.action.setSettings(ev.payload.settings); + } + + /** + * Listens for the {@link SingletonAction.onKeyDown} event which is emitted by Stream Deck when an action is pressed. Stream Deck provides various events for tracking interaction + * with devices including key down/up, dial rotations, and device connectivity, etc. When triggered, {@link ev} object contains information about the event including any payloads + * and action information where applicable. In this example, our action will display a counter that increments by one each press. We track the current count on the action's persisted + * settings using `setSettings` and `getSettings`. + */ + async onKeyDown(ev: KeyDownEvent): Promise { + // Update the count from the settings. + const { settings } = ev.payload; + + // Create a EffectRequest object to send to the Minecraft server. + + const effectRequest = { + effectId: "{{effectId}}", + args: settings + }; + + // Send the HTTP request to the Minecraft client. Two form pararmeters are included, the deviceId and the request itself. + var url = new URL(`http://${settings.minecraftIp}/raw`); + + url.searchParams.append("device", ev.deviceId); + + const response = await fetch(url.toString(), { + method: "POST", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(effectRequest) + }); + + if (!response.ok) { + await ev.action.showAlert(); + } + } +} + +/** + * Settings for {@link Effect{{effectId}}}. + */ +type EffectSettings = { + minecraftIp?: string; +{{properties}} +}; diff --git a/effectmc/generator/templates/effect-pi.html.template b/effectmc/generator/templates/effect-pi.html.template new file mode 100644 index 0000000..27e7fd8 --- /dev/null +++ b/effectmc/generator/templates/effect-pi.html.template @@ -0,0 +1,22 @@ + + + + + {{effectName}} Settings + + + + + + + + + +{{properties}} + + + \ No newline at end of file diff --git a/effectmc/generator/templates/plugin.ts.template b/effectmc/generator/templates/plugin.ts.template new file mode 100644 index 0000000..f19ce7c --- /dev/null +++ b/effectmc/generator/templates/plugin.ts.template @@ -0,0 +1,12 @@ +import streamDeck, { LogLevel } from "@elgato/streamdeck"; + +{{import}} + +// We can enable "trace" logging so that all messages between the Stream Deck, and the plugin are recorded. When storing sensitive information +streamDeck.logger.setLevel(LogLevel.TRACE); + +// Register the effect actions. +{{register}} + +// Finally, connect to the Stream Deck. +streamDeck.connect(); \ No newline at end of file diff --git a/effectmc/package-lock.json b/effectmc/package-lock.json new file mode 100644 index 0000000..1b45888 --- /dev/null +++ b/effectmc/package-lock.json @@ -0,0 +1,2408 @@ +{ + "name": "effectmc", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@elgato/streamdeck": "^0.3.0" + }, + "devDependencies": { + "@elgato/cli": "^0.3.2", + "@rollup/plugin-commonjs": "^25.0.5", + "@rollup/plugin-node-resolve": "^15.2.2", + "@rollup/plugin-terser": "^0.4.4", + "@rollup/plugin-typescript": "^11.1.5", + "@tsconfig/node20": "^20.1.2", + "@types/node": "20.8.10", + "rollup": "^4.0.2", + "tslib": "^2.6.2", + "typescript": "^5.2.2" + } + }, + "node_modules/@elgato/cli": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@elgato/cli/-/cli-0.3.2.tgz", + "integrity": "sha512-kU3aV8cQcVG2GAPqvalGmd9saFunJdzxI9iD/AQ2M6G+RF5TzUWugbd9j1DBYQUKDhASdm0jaeck6y4+b9/HwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@elgato/schemas": "^0.3.5", + "@humanwhocodes/momoa": "^3.0.0", + "@zip.js/zip.js": "^2.7.34", + "ajv": "^8.12.0", + "chalk": "^5.3.0", + "commander": "^11.0.0", + "ejs": "^3.1.10", + "find-process": "^1.4.7", + "ignore": "^5.3.1", + "inquirer": "^9.2.11", + "is-interactive": "^2.0.0", + "lodash": "^4.17.21", + "log-symbols": "^5.1.0", + "rage-edit": "^1.2.0", + "semver": "^7.6.0", + "tar": "^7.0.1" + }, + "bin": { + "sd": "bin/streamdeck.mjs", + "streamdeck": "bin/streamdeck.mjs" + }, + "engines": { + "node": "^20.1.0" + } + }, + "node_modules/@elgato/schemas": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@elgato/schemas/-/schemas-0.3.6.tgz", + "integrity": "sha512-ILISwBYtrkj4rDYaIHb5dzMcokg1TUeXfM9lDZeF+C2NEyZ9GeCHDXo51ViZm+3mDnWjWcvjPpznpYFkNBmkwA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@elgato/streamdeck": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@elgato/streamdeck/-/streamdeck-0.3.0.tgz", + "integrity": "sha512-vdcFahvcpsffIu3b+vKtJshnWTUVXzURujmb/A5b00PKuXzgeuoinO7wcGgjsi2DBq9ciqV/0mKFU/FHiWXKtQ==", + "license": "MIT", + "dependencies": { + "ws": "^8.14.2" + }, + "engines": { + "node": "^20.5.1" + } + }, + "node_modules/@humanwhocodes/momoa": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/momoa/-/momoa-3.2.0.tgz", + "integrity": "sha512-xvLEGSmd8qxcqlKFnTxdnmqQFsYGC4GhpuhHgdFoZBV9zxvmSlTuasj2D3vei3IsBGmjP/ITwPFejNAG/w+jsw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/figures": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.5.tgz", + "integrity": "sha512-79hP/VWdZ2UVc9bFGJnoQ/lQMpL74mGgzSYX1xUqCVk7/v73vJCMw1VuyWN1jGkZ9B3z7THAbySqGbCNefcjfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/plugin-commonjs": { + "version": "25.0.8", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.8.tgz", + "integrity": "sha512-ZEZWTK5n6Qde0to4vS9Mr5x/0UZoqCxPVR9KRUjU4kA2sO7GEUn1fop0DAwpO6z0Nw/kJON9bDmSxdWxO/TT1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "commondir": "^1.0.1", + "estree-walker": "^2.0.2", + "glob": "^8.0.3", + "is-reference": "1.2.1", + "magic-string": "^0.30.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.68.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", + "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-builtin-module": "^3.2.1", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-terser": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", + "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "serialize-javascript": "^6.0.1", + "smob": "^1.0.0", + "terser": "^5.17.4" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-typescript": { + "version": "11.1.6", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.6.tgz", + "integrity": "sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0||^3.0.0||^4.0.0", + "tslib": "*", + "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "tslib": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.2.tgz", + "integrity": "sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.2.tgz", + "integrity": "sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.2.tgz", + "integrity": "sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.2.tgz", + "integrity": "sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.2.tgz", + "integrity": "sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.2.tgz", + "integrity": "sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.2.tgz", + "integrity": "sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.2.tgz", + "integrity": "sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.2.tgz", + "integrity": "sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.2.tgz", + "integrity": "sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.2.tgz", + "integrity": "sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.2.tgz", + "integrity": "sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.2.tgz", + "integrity": "sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.2.tgz", + "integrity": "sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.2.tgz", + "integrity": "sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.2.tgz", + "integrity": "sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@tsconfig/node20": { + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.4.tgz", + "integrity": "sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "20.8.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", + "integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@zip.js/zip.js": { + "version": "2.7.52", + "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.52.tgz", + "integrity": "sha512-+5g7FQswvrCHwYKNMd/KFxZSObctLSsQOgqBSi0LzwHo3li9Eh1w5cF5ndjQw9Zbr3ajVnd2+XyiX85gAetx1Q==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "bun": ">=0.7.0", + "deno": ">=1.0.0", + "node": ">=16.5.0" + } + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", + "dev": true, + "license": "MIT" + }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/find-process": { + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/find-process/-/find-process-1.4.7.tgz", + "integrity": "sha512-/U4CYp1214Xrp3u3Fqr9yNynUrr5Le4y0SsJh2lMDDSbpwYSz3M2SMWQC+wqcx79cN8PQtHQIL8KnuY9M66fdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "commander": "^5.1.0", + "debug": "^4.1.1" + }, + "bin": { + "find-process": "bin/find-process.js" + } + }, + "node_modules/find-process/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/find-process/node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/inquirer": { + "version": "9.3.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.3.6.tgz", + "integrity": "sha512-riK/iQB2ctwkpWYgjjWIRv3MBLt2gzb2Sj0JNQNbyTXgyXsLWcDPJ5WS5ZDTCx7BRFnJsARtYh+58fjP5M2Y0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/figures": "^1.0.3", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "license": "MIT", + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jake/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jake/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz", + "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.0.0", + "is-unicode-supported": "^1.1.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/magic-string": { + "version": "0.30.11", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", + "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.1.tgz", + "integrity": "sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.4", + "rimraf": "^5.0.5" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/rage-edit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/rage-edit/-/rage-edit-1.2.0.tgz", + "integrity": "sha512-0RspBRc2s6We4g7hRCvT5mu7YPEnfjvQK8Tt354a2uUNJCMC7MKLvo/1mLvHUCQ/zbP6siQyp5VRZN7UCpMFZg==", + "dev": true, + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/rimraf": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.2.tgz", + "integrity": "sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.21.2", + "@rollup/rollup-android-arm64": "4.21.2", + "@rollup/rollup-darwin-arm64": "4.21.2", + "@rollup/rollup-darwin-x64": "4.21.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.21.2", + "@rollup/rollup-linux-arm-musleabihf": "4.21.2", + "@rollup/rollup-linux-arm64-gnu": "4.21.2", + "@rollup/rollup-linux-arm64-musl": "4.21.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.21.2", + "@rollup/rollup-linux-riscv64-gnu": "4.21.2", + "@rollup/rollup-linux-s390x-gnu": "4.21.2", + "@rollup/rollup-linux-x64-gnu": "4.21.2", + "@rollup/rollup-linux-x64-musl": "4.21.2", + "@rollup/rollup-win32-arm64-msvc": "4.21.2", + "@rollup/rollup-win32-ia32-msvc": "4.21.2", + "@rollup/rollup-win32-x64-msvc": "4.21.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/smob": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", + "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==", + "dev": true, + "license": "MIT" + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tar": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", + "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", + "dev": true, + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/terser": { + "version": "5.31.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz", + "integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/yoctocolors-cjs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", + "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/effectmc/package.json b/effectmc/package.json new file mode 100644 index 0000000..e2e680a --- /dev/null +++ b/effectmc/package.json @@ -0,0 +1,23 @@ +{ + "scripts": { + "generate": "node generator/generateplugin.js", + "build": "rollup -c", + "watch": "rollup -c -w --watch.onEnd=\"streamdeck restart com.mosadie.effectmc\"" + }, + "type": "module", + "devDependencies": { + "@elgato/cli": "^0.3.2", + "@rollup/plugin-commonjs": "^25.0.5", + "@rollup/plugin-node-resolve": "^15.2.2", + "@rollup/plugin-terser": "^0.4.4", + "@rollup/plugin-typescript": "^11.1.5", + "@tsconfig/node20": "^20.1.2", + "@types/node": "20.8.10", + "rollup": "^4.0.2", + "tslib": "^2.6.2", + "typescript": "^5.2.2" + }, + "dependencies": { + "@elgato/streamdeck": "^0.3.0" + } +} diff --git a/effectmc/rollup.config.mjs b/effectmc/rollup.config.mjs new file mode 100644 index 0000000..1e884c3 --- /dev/null +++ b/effectmc/rollup.config.mjs @@ -0,0 +1,49 @@ +import commonjs from "@rollup/plugin-commonjs"; +import nodeResolve from "@rollup/plugin-node-resolve"; +import terser from "@rollup/plugin-terser"; +import typescript from "@rollup/plugin-typescript"; +import path from "node:path"; +import url from "node:url"; + +const isWatching = !!process.env.ROLLUP_WATCH; +const sdPlugin = "com.mosadie.effectmc.sdPlugin"; + +/** + * @type {import('rollup').RollupOptions} + */ +const config = { + input: "src/plugin.ts", + output: { + file: `${sdPlugin}/bin/plugin.js`, + sourcemap: isWatching, + sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => { + return url.pathToFileURL(path.resolve(path.dirname(sourcemapPath), relativeSourcePath)).href; + } + }, + plugins: [ + { + name: "watch-externals", + buildStart: function () { + this.addWatchFile(`${sdPlugin}/manifest.json`); + }, + }, + typescript({ + mapRoot: isWatching ? "./" : undefined + }), + nodeResolve({ + browser: false, + exportConditions: ["node"], + preferBuiltins: true + }), + commonjs(), + !isWatching && terser(), + { + name: "emit-module-package-file", + generateBundle() { + this.emitFile({ fileName: "package.json", source: `{ "type": "module" }`, type: "asset" }); + } + } + ] +}; + +export default config; diff --git a/effectmc/tsconfig.json b/effectmc/tsconfig.json new file mode 100644 index 0000000..3d4c726 --- /dev/null +++ b/effectmc/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "@tsconfig/node20/tsconfig.json", + "compilerOptions": { + "customConditions": [ + "node" + ], + "module": "ES2022", + "moduleResolution": "Bundler" + }, + "include": [ + "src/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file