From 0cd249a4da7f09f402cdec216881b2cb5267b316 Mon Sep 17 00:00:00 2001 From: Christian Peuschel Date: Thu, 24 Dec 2020 05:26:18 +0100 Subject: [PATCH] Initial commit --- README.md | 5 + com.cpeuschel.octodeck.sdPlugin/caret.svg | 3 + com.cpeuschel.octodeck.sdPlugin/common.js | 1193 +++++++++++++ com.cpeuschel.octodeck.sdPlugin/main.html | 62 + com.cpeuschel.octodeck.sdPlugin/manifest.json | 39 + .../propertyinspector.html | 45 + .../resources/actionDefaultImage.png | Bin 0 -> 148 bytes .../resources/actionDefaultImage@2x.png | Bin 0 -> 155 bytes .../resources/actionIcon.png | Bin 0 -> 2180 bytes .../resources/actionIcon@2x.png | Bin 0 -> 2489 bytes .../resources/pluginIcon.png | Bin 0 -> 148 bytes .../resources/pluginIcon@2x.png | Bin 0 -> 155 bytes com.cpeuschel.octodeck.sdPlugin/sdpi.css | 1483 +++++++++++++++++ .../stream-deck-icon.afdesign | Bin 0 -> 15619 bytes 14 files changed, 2830 insertions(+) create mode 100644 README.md create mode 100644 com.cpeuschel.octodeck.sdPlugin/caret.svg create mode 100644 com.cpeuschel.octodeck.sdPlugin/common.js create mode 100644 com.cpeuschel.octodeck.sdPlugin/main.html create mode 100644 com.cpeuschel.octodeck.sdPlugin/manifest.json create mode 100644 com.cpeuschel.octodeck.sdPlugin/propertyinspector.html create mode 100644 com.cpeuschel.octodeck.sdPlugin/resources/actionDefaultImage.png create mode 100644 com.cpeuschel.octodeck.sdPlugin/resources/actionDefaultImage@2x.png create mode 100644 com.cpeuschel.octodeck.sdPlugin/resources/actionIcon.png create mode 100644 com.cpeuschel.octodeck.sdPlugin/resources/actionIcon@2x.png create mode 100644 com.cpeuschel.octodeck.sdPlugin/resources/pluginIcon.png create mode 100644 com.cpeuschel.octodeck.sdPlugin/resources/pluginIcon@2x.png create mode 100644 com.cpeuschel.octodeck.sdPlugin/sdpi.css create mode 100644 com.cpeuschel.octodeck.sdPlugin/stream-deck-icon.afdesign diff --git a/README.md b/README.md new file mode 100644 index 0000000..fc3041b --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Stream Deck Plugin for OctoPrint + +## Installation + +## Configuration diff --git a/com.cpeuschel.octodeck.sdPlugin/caret.svg b/com.cpeuschel.octodeck.sdPlugin/caret.svg new file mode 100644 index 0000000..b69162a --- /dev/null +++ b/com.cpeuschel.octodeck.sdPlugin/caret.svg @@ -0,0 +1,3 @@ + + + diff --git a/com.cpeuschel.octodeck.sdPlugin/common.js b/com.cpeuschel.octodeck.sdPlugin/common.js new file mode 100644 index 0000000..80170ff --- /dev/null +++ b/com.cpeuschel.octodeck.sdPlugin/common.js @@ -0,0 +1,1193 @@ +/* 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, headers) { + // 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')); + }; + + Object.keys(headers).forEach(function(key) { + req.setRequestHeader('' + key + '', '' + headers[key] + ''); + }); + + // 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 (context, payload) { + SDApi.send(context, 'logMessage', { + payload: 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/com.cpeuschel.octodeck.sdPlugin/main.html b/com.cpeuschel.octodeck.sdPlugin/main.html new file mode 100644 index 0000000..de4909d --- /dev/null +++ b/com.cpeuschel.octodeck.sdPlugin/main.html @@ -0,0 +1,62 @@ + + + + com.cpeuschel.octodeck + + + + + + + diff --git a/com.cpeuschel.octodeck.sdPlugin/manifest.json b/com.cpeuschel.octodeck.sdPlugin/manifest.json new file mode 100644 index 0000000..1681605 --- /dev/null +++ b/com.cpeuschel.octodeck.sdPlugin/manifest.json @@ -0,0 +1,39 @@ +{ + "Actions": [ + { + "Icon": "resources/actionIcon", + "Name": "octodeck", + "States": [ + { + "Image": "resources/actionDefaultImage", + "TitleAlignment": "bottom", + "FontSize": "10" + } + ], + "SupportedInMultiActions": true, + "Tooltip": "Send an HTTP request to a remote webhook API.", + "UUID": "com.cpeuschel.octodeck.action" + } + ], + "SDKVersion": 2, + "Author": "Christian Peuschel", + "CodePath": "main.html", + "Description": "StreamDeck Plugin for OctoPrint - Show the percent of your print", + "Name": "octodeck", + "Icon": "resources/pluginIcon", + "PropertyInspectorPath": "propertyinspector.html", + "Version": "1.0", + "OS": [ + { + "Platform": "mac", + "MinimumVersion": "10.11" + }, + { + "Platform": "windows", + "MinimumVersion": "10" + } + ], + "Software": { + "MinimumVersion" : "4.1" + } +} \ No newline at end of file diff --git a/com.cpeuschel.octodeck.sdPlugin/propertyinspector.html b/com.cpeuschel.octodeck.sdPlugin/propertyinspector.html new file mode 100644 index 0000000..1503211 --- /dev/null +++ b/com.cpeuschel.octodeck.sdPlugin/propertyinspector.html @@ -0,0 +1,45 @@ + + + + + Stream Deck - Octoprint + + + + +
+
+
OctoPrint URL
+ +
+
+
OctoPrint API-Key
+ +
+
+
Are you done?
+ +
+
+ + + diff --git a/com.cpeuschel.octodeck.sdPlugin/resources/actionDefaultImage.png b/com.cpeuschel.octodeck.sdPlugin/resources/actionDefaultImage.png new file mode 100644 index 0000000000000000000000000000000000000000..604e49304dd19414fcd9307a4d051263cead77fa GIT binary patch literal 148 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xZ3?!EyURMI77>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O_~$2l#}zN*D$=7Myqo2xL>4nJ@ErzW#^d=bQh?DvG-L$w l4lVfVpUdg5z`(F$H6vFB1LOVpe=$ID22WQ%mvv4FO#lljCcFRu literal 0 HcmV?d00001 diff --git a/com.cpeuschel.octodeck.sdPlugin/resources/actionDefaultImage@2x.png b/com.cpeuschel.octodeck.sdPlugin/resources/actionDefaultImage@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..2e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_6)bF6;gB;od`4!pjl7XL;!@t+q5_V^YQ_-7wF5&h`w zC#_9Uk8NXleXrj=C0bsqFDkCrNGBCV1md?0uAFtYN0RL7v&zae*HuFl8sF&W3DvUs z7I}Ya$GIOP?oT|oclLvPV&kgt2-~T=If15>hjrfCpQBw5&G&!uE$4yP+B=T)dtj~v z+J^UaDf^CI%v)L|!}b25CkKT^7mCJ?uF?c1=eIP~-#k!rS2p1q+3by;cP0=BEZR|p znaX9W&;4ckwdG)?>`6b3WW|^YYQe&jQ*stwO!QyAcQZyeW1}PdR!g7g$~*OAujI(% z8aHi@uh?BlDYiC7u)~_0lNKj07|~N+e0TBG_=+20LaBbu&O2#2hmJj+vuTG5S~bDY zYs}aFxsI@hhVtcX+hhr^b%%5qx=B&PPPEuVdaXLSr##%!f5y(jwvUPDPFt@jljm#}jjXNV{yeDDGE}>#=!^da Dk6sA& literal 0 HcmV?d00001 diff --git a/com.cpeuschel.octodeck.sdPlugin/resources/actionIcon@2x.png b/com.cpeuschel.octodeck.sdPlugin/resources/actionIcon@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..826d8f198f9940bedd15e1c91d91701e215ab4f2 GIT binary patch literal 2489 zcmai0eOwdw89#&oC0G$KIGvgvFKuz;5|99Af+ArMC5Q=zpkNb{OLCCp!rcJ@#MU4d ztb7oxMHyC0omHq6m3@3+&QN>-rE0NM^s_lAZnKlr*;2QumHm<+NY(C-OY;1_&-48~ z@0aTIwB+eNb9^8Onl4TeNx}CUj>p>*d~SVm!U#bO1)iax6_Qj`O&B>U4Uvm+EJicH zAxN;qVpgg1F`Au=>2Q+}zSnUEX5$(moEa_QO3aCv9#1JHFkLgx!%g(RJwNRSviniI|8!tp+A0jbfVQqgb6 zje#VD^)zip5u~`dm{T0ZAxIsL?G#iyqiP#Gm=43T0KQAnz>q#}^LU}xeSc|p^03uaJ=aFA3AR6__a;{FWGdI^|F z7zk1Znh+DhJg1E#bEw#;(qWmnhSpDTO`fM>Cf&~ghi8UDM=Pv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com.cpeuschel.octodeck.sdPlugin/resources/pluginIcon@2x.png b/com.cpeuschel.octodeck.sdPlugin/resources/pluginIcon@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..2e87bd9b9925865c536c91ac8dc985c6bce2b56e GIT binary patch literal 155 zcmeAS@N?(olHy`uVBq!ia0vp^6F``S8Ays|{O<-*jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCik>1AIbUB@BZb3r@TPaybh;B8wRq_zr_G lhZcPI&*d{$05Tz *: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; +} + +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.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; +} + +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; +} + +.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="radio"] + label span { + background: url(buttons.png) -38px top no-repeat; +} + +input[type="radio"]:checked + label span { + background: url(buttons.png) -57px top no-repeat; +} +*/ + +input[type="range"] { + width: var(--sdpi-width); + height: 30px; + overflow: hidden; + cursor: pointer; + background: transparent !important; +} + +.sdpi-item > input[type="range"] { + margin-left: 8px; + max-width: var(--sdpi-width); + width: var(--sdpi-width); + padding: 0px; +} + +/* +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; + /* width: 50%; + left: 35%; */ + text-align: center; + bottom: 2px; + z-index: 100; + box-shadow: 0px 3px 6px rgba(0, 0, 0, .5); + /* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */ +} + +.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-brighter, +.icon-darker, +.icon-warmer, +.icon-cooler { + margin-top: 5px !important; + min-width: 20px; + width: 20px; + background-repeat: no-repeat; +} + +.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"); +} + +.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/com.cpeuschel.octodeck.sdPlugin/stream-deck-icon.afdesign b/com.cpeuschel.octodeck.sdPlugin/stream-deck-icon.afdesign new file mode 100644 index 0000000000000000000000000000000000000000..b5f0cf483cc024643c1ae452c09de00b5abb93c4 GIT binary patch literal 15619 zcmd_R^_m6UElLWC(u$N)t^6qJEV zi7-J4iG6Q;zTQ86|ANnXIPTroIp;c8opY|30MST;8lV7fg@>678r<^fz5x7dBJBS? z{r>m<-x~l}2JX6^e72=#J<=I#SMTPVH>!IEJPZX4Gy>+zJ zSN(0}Gmvu9pP_i|;4+Kw9sB9VEtP(f2PF4Nh}HJv(z(hKBY85mXwQ{z6`?AP7Bzc+ zj;t(O9Rj>xPH$;zst){o?IT}`&_xYzzS*aq>zgM+=8|SFbQy~MbyId~Kv*?&oLy_4 z{u_*R$=w+Jsifsl!M^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