@companion-module/base 1.99.0-nightly-feat-graphics-overhaul-20251222-140818-911eb31 → 2.0.0-0-nightly-feat-2-0-20260118-171756-ca8ab85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +12 -11
- package/assets/manifest.schema.json +1 -1
- package/dist/__mocks__/net.d.ts +31 -0
- package/dist/__mocks__/net.d.ts.map +1 -0
- package/dist/__mocks__/net.js +104 -0
- package/dist/__mocks__/net.js.map +1 -0
- package/dist/__mocks__/util.d.ts +9 -0
- package/dist/__mocks__/util.d.ts.map +1 -0
- package/dist/__mocks__/util.js +39 -0
- package/dist/__mocks__/util.js.map +1 -0
- package/dist/common/json-value.js +1 -2
- package/dist/common/json-value.js.map +1 -1
- package/dist/common/osc.js +1 -2
- package/dist/common/osc.js.map +1 -1
- package/dist/helpers/__tests__/tcp.spec.d.ts +2 -0
- package/dist/helpers/__tests__/tcp.spec.d.ts.map +1 -0
- package/dist/helpers/__tests__/tcp.spec.js +175 -0
- package/dist/helpers/__tests__/tcp.spec.js.map +1 -0
- package/dist/helpers/__tests__/udp.spec.d.ts +2 -0
- package/dist/helpers/__tests__/udp.spec.d.ts.map +1 -0
- package/dist/helpers/__tests__/udp.spec.js +197 -0
- package/dist/helpers/__tests__/udp.spec.js.map +1 -0
- package/dist/helpers/index.js +3 -6
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/tcp.d.ts +1 -1
- package/dist/helpers/tcp.d.ts.map +1 -1
- package/dist/helpers/tcp.js +10 -15
- package/dist/helpers/tcp.js.map +1 -1
- package/dist/helpers/telnet.d.ts +1 -1
- package/dist/helpers/telnet.d.ts.map +1 -1
- package/dist/helpers/telnet.js +6 -11
- package/dist/helpers/telnet.js.map +1 -1
- package/dist/helpers/udp.d.ts +1 -1
- package/dist/helpers/udp.d.ts.map +1 -1
- package/dist/helpers/udp.js +7 -12
- package/dist/helpers/udp.js.map +1 -1
- package/dist/host-api/context.d.ts +59 -0
- package/dist/host-api/context.d.ts.map +1 -0
- package/dist/host-api/{api.js → context.js} +5 -3
- package/dist/host-api/context.js.map +1 -0
- package/dist/host-api/main.d.ts +2 -0
- package/dist/host-api/main.d.ts.map +1 -0
- package/dist/host-api/main.js +2 -0
- package/dist/host-api/main.js.map +1 -0
- package/dist/instance-base.js +1 -2
- package/dist/logging.d.ts +21 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/logging.js +22 -0
- package/dist/logging.js.map +1 -0
- package/dist/main.d.ts +7 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +8 -0
- package/dist/main.js.map +1 -0
- package/dist/manifest.js +4 -8
- package/dist/manifest.js.map +1 -1
- package/dist/module-api/__tests__/shared-udp-socket.spec.d.ts +2 -0
- package/dist/module-api/__tests__/shared-udp-socket.spec.d.ts.map +1 -0
- package/dist/module-api/__tests__/shared-udp-socket.spec.js +270 -0
- package/dist/module-api/__tests__/shared-udp-socket.spec.js.map +1 -0
- package/dist/module-api/action.js +1 -2
- package/dist/module-api/base.d.ts +4 -33
- package/dist/module-api/base.d.ts.map +1 -1
- package/dist/module-api/base.js +49 -357
- package/dist/module-api/base.js.map +1 -1
- package/dist/module-api/common.d.ts +2 -8
- package/dist/module-api/common.d.ts.map +1 -1
- package/dist/module-api/common.js +1 -2
- package/dist/module-api/config.js +1 -2
- package/dist/module-api/enums.d.ts +0 -1
- package/dist/module-api/enums.d.ts.map +1 -1
- package/dist/module-api/enums.js +4 -7
- package/dist/module-api/enums.js.map +1 -1
- package/dist/module-api/feedback.d.ts +2 -1
- package/dist/module-api/feedback.d.ts.map +1 -1
- package/dist/module-api/feedback.js +1 -2
- package/dist/module-api/http.js +1 -2
- package/dist/module-api/index.d.ts +0 -2
- package/dist/module-api/index.d.ts.map +1 -1
- package/dist/module-api/index.js +12 -17
- package/dist/module-api/index.js.map +1 -1
- package/dist/module-api/input.d.ts +0 -20
- package/dist/module-api/input.d.ts.map +1 -1
- package/dist/module-api/input.js +1 -2
- package/dist/module-api/preset.d.ts +1 -48
- package/dist/module-api/preset.d.ts.map +1 -1
- package/dist/module-api/preset.js +1 -2
- package/dist/module-api/shared-udp-socket.d.ts +3 -4
- package/dist/module-api/shared-udp-socket.d.ts.map +1 -1
- package/dist/module-api/shared-udp-socket.js +18 -25
- package/dist/module-api/shared-udp-socket.js.map +1 -1
- package/dist/module-api/style.js +1 -2
- package/dist/module-api/upgrade.d.ts +7 -3
- package/dist/module-api/upgrade.d.ts.map +1 -1
- package/dist/module-api/upgrade.js +11 -16
- package/dist/module-api/upgrade.js.map +1 -1
- package/dist/module-api/variable.js +1 -2
- package/dist/util.d.ts +10 -0
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +15 -26
- package/dist/util.js.map +1 -1
- package/generated/validate_manifest.js +961 -1
- package/package.json +25 -36
- package/dist/entrypoint.d.ts +0 -11
- package/dist/entrypoint.d.ts.map +0 -1
- package/dist/entrypoint.js +0 -134
- package/dist/entrypoint.js.map +0 -1
- package/dist/host-api/api.d.ts +0 -402
- package/dist/host-api/api.d.ts.map +0 -1
- package/dist/host-api/api.js.map +0 -1
- package/dist/host-api/ipc-wrapper.d.ts +0 -37
- package/dist/host-api/ipc-wrapper.d.ts.map +0 -1
- package/dist/host-api/ipc-wrapper.js +0 -128
- package/dist/host-api/ipc-wrapper.js.map +0 -1
- package/dist/host-api/versions.d.ts +0 -12
- package/dist/host-api/versions.d.ts.map +0 -1
- package/dist/host-api/versions.js +0 -5
- package/dist/host-api/versions.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -22
- package/dist/index.js.map +0 -1
- package/dist/internal/actions.d.ts +0 -16
- package/dist/internal/actions.d.ts.map +0 -1
- package/dist/internal/actions.js +0 -223
- package/dist/internal/actions.js.map +0 -1
- package/dist/internal/base.d.ts +0 -11
- package/dist/internal/base.d.ts.map +0 -1
- package/dist/internal/base.js +0 -39
- package/dist/internal/base.js.map +0 -1
- package/dist/internal/feedback.d.ts +0 -20
- package/dist/internal/feedback.d.ts.map +0 -1
- package/dist/internal/feedback.js +0 -307
- package/dist/internal/feedback.js.map +0 -1
- package/dist/internal/upgrade.d.ts +0 -15
- package/dist/internal/upgrade.d.ts.map +0 -1
- package/dist/internal/upgrade.js +0 -174
- package/dist/internal/upgrade.js.map +0 -1
- package/dist/module-api/graphics-composite.d.ts +0 -11
- package/dist/module-api/graphics-composite.d.ts.map +0 -1
- package/dist/module-api/graphics-composite.js +0 -3
- package/dist/module-api/graphics-composite.js.map +0 -1
- package/dist/module-api/graphics.d.ts +0 -83
- package/dist/module-api/graphics.d.ts.map +0 -1
- package/dist/module-api/graphics.js +0 -12
- package/dist/module-api/graphics.js.map +0 -1
- package/lib/debounce-fn/index.d.ts +0 -83
- package/lib/debounce-fn/index.js +0 -78
- package/lib/debounce-fn/license +0 -9
- package/lib/debounce-fn/readme.md +0 -64
package/dist/util.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.literal = literal;
|
|
4
|
-
exports.assertNever = assertNever;
|
|
5
|
-
exports.combineRgb = combineRgb;
|
|
6
|
-
exports.splitRgb = splitRgb;
|
|
7
|
-
exports.splitHsl = splitHsl;
|
|
8
|
-
exports.splitHsv = splitHsv;
|
|
9
|
-
exports.splitHex = splitHex;
|
|
10
|
-
exports.parseEscapeCharacters = parseEscapeCharacters;
|
|
11
|
-
exports.substituteEscapeCharacters = substituteEscapeCharacters;
|
|
12
|
-
const colord_1 = require("colord");
|
|
1
|
+
import { colord } from 'colord';
|
|
13
2
|
/**
|
|
14
3
|
* Assert a certain type for a literal.
|
|
15
4
|
* This can be used to correctly type parts of an object in TypeScript.
|
|
@@ -34,11 +23,11 @@ const colord_1 = require("colord");
|
|
|
34
23
|
* }
|
|
35
24
|
* ```
|
|
36
25
|
*/
|
|
37
|
-
function literal(v) {
|
|
26
|
+
export function literal(v) {
|
|
38
27
|
return v;
|
|
39
28
|
}
|
|
40
29
|
/** Type assert that a value is never */
|
|
41
|
-
function assertNever(_val) {
|
|
30
|
+
export function assertNever(_val) {
|
|
42
31
|
// Nothing to do
|
|
43
32
|
}
|
|
44
33
|
/**
|
|
@@ -57,7 +46,7 @@ function assertNever(_val) {
|
|
|
57
46
|
* }
|
|
58
47
|
* ```
|
|
59
48
|
*/
|
|
60
|
-
function combineRgb(r, g, b, a) {
|
|
49
|
+
export function combineRgb(r, g, b, a) {
|
|
61
50
|
let colorNumber = ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff);
|
|
62
51
|
if (a && a >= 0 && a < 1) {
|
|
63
52
|
colorNumber += 0x1000000 * Math.round(255 * (1 - a)); // add possible transparency to number
|
|
@@ -69,7 +58,7 @@ function combineRgb(r, g, b, a) {
|
|
|
69
58
|
* the color can be either the Companion color number or a CSS compatible color string
|
|
70
59
|
* return object will always include an alpha value (0.0-1.0), defaulting to 1 if input has no alpha information
|
|
71
60
|
*/
|
|
72
|
-
function splitRgb(color) {
|
|
61
|
+
export function splitRgb(color) {
|
|
73
62
|
if (typeof color === 'number') {
|
|
74
63
|
if (color > 0xffffff) {
|
|
75
64
|
return {
|
|
@@ -88,8 +77,8 @@ function splitRgb(color) {
|
|
|
88
77
|
};
|
|
89
78
|
}
|
|
90
79
|
}
|
|
91
|
-
else if (typeof color === 'string' &&
|
|
92
|
-
const rgb =
|
|
80
|
+
else if (typeof color === 'string' && colord(color).isValid()) {
|
|
81
|
+
const rgb = colord(color).toRgb();
|
|
93
82
|
return {
|
|
94
83
|
r: rgb.r,
|
|
95
84
|
g: rgb.g,
|
|
@@ -111,9 +100,9 @@ function splitRgb(color) {
|
|
|
111
100
|
* the color can be either the Companion color number or a CSS compatible color string
|
|
112
101
|
* return object will always include an alpha value (0.0-1.0), defaulting to 1 if input has no alpha information
|
|
113
102
|
*/
|
|
114
|
-
function splitHsl(color) {
|
|
103
|
+
export function splitHsl(color) {
|
|
115
104
|
const rgb = splitRgb(color);
|
|
116
|
-
const hsl =
|
|
105
|
+
const hsl = colord(`rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${rgb.a})`).toHsl();
|
|
117
106
|
return hsl;
|
|
118
107
|
}
|
|
119
108
|
/**
|
|
@@ -121,9 +110,9 @@ function splitHsl(color) {
|
|
|
121
110
|
* the color can be either the Companion color number or a CSS compatible color string
|
|
122
111
|
* return object will always include an alpha value (0.0-1.0), defaulting to 1 if input has no alpha information
|
|
123
112
|
*/
|
|
124
|
-
function splitHsv(color) {
|
|
113
|
+
export function splitHsv(color) {
|
|
125
114
|
const rgb = splitRgb(color);
|
|
126
|
-
const hsv =
|
|
115
|
+
const hsv = colord(`rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${rgb.a})`).toHsv();
|
|
127
116
|
return hsv;
|
|
128
117
|
}
|
|
129
118
|
/**
|
|
@@ -131,16 +120,16 @@ function splitHsv(color) {
|
|
|
131
120
|
* the color can be either the Companion color number or a CSS compatible color string
|
|
132
121
|
* if input color has no alpha or alpha of 1, return will be in format '#rrggbb', else '#rrggbbaa'
|
|
133
122
|
*/
|
|
134
|
-
function splitHex(color) {
|
|
123
|
+
export function splitHex(color) {
|
|
135
124
|
const rgb = splitRgb(color);
|
|
136
|
-
const hex =
|
|
125
|
+
const hex = colord(`rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${rgb.a})`).toHex();
|
|
137
126
|
return hex;
|
|
138
127
|
}
|
|
139
128
|
/**
|
|
140
129
|
* Parse common escape characters in strings passed to callback from action or feedback options.
|
|
141
130
|
* This is useful to ensure \r, \n etc are represented as such rather than as \\r, \\n
|
|
142
131
|
*/
|
|
143
|
-
function parseEscapeCharacters(msg) {
|
|
132
|
+
export function parseEscapeCharacters(msg) {
|
|
144
133
|
const message = msg
|
|
145
134
|
.replaceAll('\\n', '\n')
|
|
146
135
|
.replaceAll('\\r', '\r')
|
|
@@ -159,7 +148,7 @@ function parseEscapeCharacters(msg) {
|
|
|
159
148
|
* The reverse of parseEscapeCharacters. This is useful to to ensure special charaters are displayed normally when returned to the UI.
|
|
160
149
|
* Ie during a learn callback, or as a variable
|
|
161
150
|
*/
|
|
162
|
-
function substituteEscapeCharacters(msg) {
|
|
151
|
+
export function substituteEscapeCharacters(msg) {
|
|
163
152
|
const message = msg
|
|
164
153
|
.replaceAll('\n', '\\n')
|
|
165
154
|
.replaceAll('\r', '\\r')
|
package/dist/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,MAAM,EAAE,MAAM,QAAQ,CAAA;AAGrD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,OAAO,CAAI,CAAI;IAC9B,OAAO,CAAC,CAAA;AACT,CAAC;AAED,wCAAwC;AACxC,MAAM,UAAU,WAAW,CAAC,IAAW;IACtC,gBAAgB;AACjB,CAAC;AASD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,UAAU,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAU;IACrE,IAAI,WAAW,GAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;IAC7E,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,WAAW,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA,CAAC,sCAAsC;IAC5F,CAAC;IACD,OAAO,WAAW,CAAA;AACnB,CAAC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