@intechstudio/grid-protocol 1.20240729.924 → 1.20240729.1219

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.
@@ -9,12 +9,12 @@ export declare enum ModuleType {
9
9
  PB44 = "PB44"
10
10
  }
11
11
  export declare enum EventType {
12
- INIT = "init",
12
+ SETUP = "setup",
13
13
  POTMETER = "potmeter",
14
14
  ENCODER = "encoder",
15
15
  BUTTON = "button",
16
- MAPMODE = "mapmode",
17
- MIDIRX = "midirx",
16
+ UTILITY = "utility",
17
+ MIDIRX = "midi rx",
18
18
  TIMER = "timer",
19
19
  ENDLESS = "endless"
20
20
  }
package/dist/index.js CHANGED
@@ -262,6 +262,12 @@ var GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_fnptr = "l_grid_gui_draw_rectangle";
262
262
  var GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_short = "ggdrf";
263
263
  var GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_human = "gui_draw_rectangle_filled";
264
264
  var GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_fnptr = "l_grid_gui_draw_rectangle_filled";
265
+ var GRID_LUA_FNC_G_GUI_DRAW_POLYGON_short = "ggdp";
266
+ var GRID_LUA_FNC_G_GUI_DRAW_POLYGON_human = "gui_draw_polygon";
267
+ var GRID_LUA_FNC_G_GUI_DRAW_POLYGON_fnptr = "l_grid_gui_draw_polygon";
268
+ var GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_short = "ggdpf";
269
+ var GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_human = "gui_draw_polygon_filled";
270
+ var GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_fnptr = "l_grid_gui_draw_polygon_filled";
265
271
  var GRID_LUA_FNC_G_GUI_DRAW_TEXT_short = "ggdt";
266
272
  var GRID_LUA_FNC_G_GUI_DRAW_TEXT_human = "gui_draw_text";
267
273
  var GRID_LUA_FNC_G_GUI_DRAW_TEXT_fnptr = "l_grid_gui_draw_text";
@@ -993,6 +999,12 @@ var grid_protocol_bot = {
993
999
  GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_short: GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_short,
994
1000
  GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_human: GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_human,
995
1001
  GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_fnptr: GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_fnptr,
1002
+ GRID_LUA_FNC_G_GUI_DRAW_POLYGON_short: GRID_LUA_FNC_G_GUI_DRAW_POLYGON_short,
1003
+ GRID_LUA_FNC_G_GUI_DRAW_POLYGON_human: GRID_LUA_FNC_G_GUI_DRAW_POLYGON_human,
1004
+ GRID_LUA_FNC_G_GUI_DRAW_POLYGON_fnptr: GRID_LUA_FNC_G_GUI_DRAW_POLYGON_fnptr,
1005
+ GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_short: GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_short,
1006
+ GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_human: GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_human,
1007
+ GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_fnptr: GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_fnptr,
996
1008
  GRID_LUA_FNC_G_GUI_DRAW_TEXT_short: GRID_LUA_FNC_G_GUI_DRAW_TEXT_short,
997
1009
  GRID_LUA_FNC_G_GUI_DRAW_TEXT_human: GRID_LUA_FNC_G_GUI_DRAW_TEXT_human,
998
1010
  GRID_LUA_FNC_G_GUI_DRAW_TEXT_fnptr: GRID_LUA_FNC_G_GUI_DRAW_TEXT_fnptr,
@@ -1960,6 +1972,12 @@ var protocol_data = /*#__PURE__*/Object.freeze({
1960
1972
  GRID_LUA_FNC_G_GUI_DRAW_PIXEL_fnptr: GRID_LUA_FNC_G_GUI_DRAW_PIXEL_fnptr,
1961
1973
  GRID_LUA_FNC_G_GUI_DRAW_PIXEL_human: GRID_LUA_FNC_G_GUI_DRAW_PIXEL_human,
1962
1974
  GRID_LUA_FNC_G_GUI_DRAW_PIXEL_short: GRID_LUA_FNC_G_GUI_DRAW_PIXEL_short,
1975
+ GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_fnptr: GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_fnptr,
1976
+ GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_human: GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_human,
1977
+ GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_short: GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_short,
1978
+ GRID_LUA_FNC_G_GUI_DRAW_POLYGON_fnptr: GRID_LUA_FNC_G_GUI_DRAW_POLYGON_fnptr,
1979
+ GRID_LUA_FNC_G_GUI_DRAW_POLYGON_human: GRID_LUA_FNC_G_GUI_DRAW_POLYGON_human,
1980
+ GRID_LUA_FNC_G_GUI_DRAW_POLYGON_short: GRID_LUA_FNC_G_GUI_DRAW_POLYGON_short,
1963
1981
  GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_fnptr: GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_fnptr,
1964
1982
  GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_human: GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_human,
1965
1983
  GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_short: GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_short,
@@ -19424,19 +19442,19 @@ var ModuleType;
19424
19442
  })(ModuleType || (ModuleType = {}));
19425
19443
  var EventType;
19426
19444
  (function (EventType) {
19427
- EventType["INIT"] = "init";
19445
+ EventType["SETUP"] = "setup";
19428
19446
  EventType["POTMETER"] = "potmeter";
19429
19447
  EventType["ENCODER"] = "encoder";
19430
19448
  EventType["BUTTON"] = "button";
19431
- EventType["MAPMODE"] = "mapmode";
19432
- EventType["MIDIRX"] = "midirx";
19449
+ EventType["UTILITY"] = "utility";
19450
+ EventType["MIDIRX"] = "midi rx";
19433
19451
  EventType["TIMER"] = "timer";
19434
19452
  EventType["ENDLESS"] = "endless";
19435
19453
  })(EventType || (EventType = {}));
19436
19454
  function NumberToEventType(value) {
19437
19455
  switch (value) {
19438
19456
  case 0:
19439
- return EventType.INIT;
19457
+ return EventType.SETUP;
19440
19458
  case 1:
19441
19459
  return EventType.POTMETER;
19442
19460
  case 2:
@@ -19444,7 +19462,7 @@ function NumberToEventType(value) {
19444
19462
  case 3:
19445
19463
  return EventType.BUTTON;
19446
19464
  case 4:
19447
- return EventType.MAPMODE;
19465
+ return EventType.UTILITY;
19448
19466
  case 5:
19449
19467
  return EventType.MIDIRX;
19450
19468
  case 6:
@@ -19457,7 +19475,7 @@ function NumberToEventType(value) {
19457
19475
  }
19458
19476
  function EventTypeToNumber(value) {
19459
19477
  switch (value) {
19460
- case EventType.INIT:
19478
+ case EventType.SETUP:
19461
19479
  return 0;
19462
19480
  case EventType.POTMETER:
19463
19481
  return 1;
@@ -19465,7 +19483,7 @@ function EventTypeToNumber(value) {
19465
19483
  return 2;
19466
19484
  case EventType.BUTTON:
19467
19485
  return 3;
19468
- case EventType.MAPMODE:
19486
+ case EventType.UTILITY:
19469
19487
  return 4;
19470
19488
  case EventType.MIDIRX:
19471
19489
  return 5;
@@ -19829,43 +19847,43 @@ function utility_genId() {
19829
19847
  }
19830
19848
  // control element event assignment table.
19831
19849
  var CEEAT = (_a = {},
19832
- _a[EventType.INIT] = {
19833
- desc: "init",
19850
+ _a[EventType.SETUP] = {
19851
+ desc: EventType.SETUP,
19834
19852
  value: 0,
19835
19853
  key: "INIT",
19836
19854
  },
19837
19855
  _a[EventType.POTMETER] = {
19838
- desc: "potmeter",
19856
+ desc: EventType.POTMETER,
19839
19857
  value: 1,
19840
19858
  key: "AC",
19841
19859
  },
19842
19860
  _a[EventType.ENCODER] = {
19843
- desc: "encoder",
19861
+ desc: EventType.ENCODER,
19844
19862
  value: 2,
19845
19863
  key: "EC",
19846
19864
  },
19847
19865
  _a[EventType.BUTTON] = {
19848
- desc: "button",
19866
+ desc: EventType.BUTTON,
19849
19867
  value: 3,
19850
19868
  key: "BC",
19851
19869
  },
19852
- _a[EventType.MAPMODE] = {
19853
- desc: "utility",
19870
+ _a[EventType.UTILITY] = {
19871
+ desc: EventType.UTILITY,
19854
19872
  value: 4,
19855
19873
  key: "MAP",
19856
19874
  },
19857
19875
  _a[EventType.MIDIRX] = {
19858
- desc: "midi rx",
19876
+ desc: EventType.MIDIRX,
19859
19877
  value: 5,
19860
19878
  key: "MIDIRX",
19861
19879
  },
19862
19880
  _a[EventType.TIMER] = {
19863
- desc: "timer",
19881
+ desc: EventType.TIMER,
19864
19882
  value: 6,
19865
19883
  key: "TIMER",
19866
19884
  },
19867
19885
  _a[EventType.ENDLESS] = {
19868
- desc: "endless",
19886
+ desc: EventType.ENDLESS,
19869
19887
  value: 7,
19870
19888
  key: "ENDLESS",
19871
19889
  },
@@ -19900,37 +19918,37 @@ var moduleElements = (_b = {},
19900
19918
  // elementEvents based on control element type and the CEEA table
19901
19919
  var elementEvents = (_c = {},
19902
19920
  _c[ElementType.BUTTON] = [
19903
- __assign(__assign({}, CEEAT.init), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_BUTTON_INIT }),
19904
- __assign(__assign({}, CEEAT.button), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_BUTTON_BUTTON }),
19905
- __assign(__assign({}, CEEAT.timer), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_TIMER }),
19921
+ __assign(__assign({}, CEEAT[EventType.SETUP]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_BUTTON_INIT }),
19922
+ __assign(__assign({}, CEEAT[EventType.BUTTON]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_BUTTON_BUTTON }),
19923
+ __assign(__assign({}, CEEAT[EventType.TIMER]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_TIMER }),
19906
19924
  ],
19907
19925
  _c[ElementType.POTMETER] = [
19908
- __assign(__assign({}, CEEAT.init), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_POTMETER_INIT }),
19909
- __assign(__assign({}, CEEAT.potmeter), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_POTMETER_POTMETER }),
19910
- __assign(__assign({}, CEEAT.timer), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_TIMER }),
19926
+ __assign(__assign({}, CEEAT[EventType.SETUP]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_POTMETER_INIT }),
19927
+ __assign(__assign({}, CEEAT[EventType.POTMETER]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_POTMETER_POTMETER }),
19928
+ __assign(__assign({}, CEEAT[EventType.TIMER]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_TIMER }),
19911
19929
  ],
19912
19930
  _c[ElementType.FADER] = [
19913
- __assign(__assign({}, CEEAT.init), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_POTMETER_INIT }),
19914
- __assign(__assign({}, CEEAT.potmeter), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_POTMETER_POTMETER }),
19915
- __assign(__assign({}, CEEAT.timer), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_TIMER }),
19931
+ __assign(__assign({}, CEEAT[EventType.SETUP]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_POTMETER_INIT }),
19932
+ __assign(__assign({}, CEEAT[EventType.POTMETER]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_POTMETER_POTMETER }),
19933
+ __assign(__assign({}, CEEAT[EventType.TIMER]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_TIMER }),
19916
19934
  ],
19917
19935
  _c[ElementType.ENCODER] = [
19918
- __assign(__assign({}, CEEAT.init), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_ENCODER_INIT }),
19919
- __assign(__assign({}, CEEAT.button), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_BUTTON_BUTTON }),
19920
- __assign(__assign({}, CEEAT.encoder), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_ENCODER_ENCODER }),
19921
- __assign(__assign({}, CEEAT.timer), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_TIMER }),
19936
+ __assign(__assign({}, CEEAT[EventType.SETUP]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_ENCODER_INIT }),
19937
+ __assign(__assign({}, CEEAT[EventType.BUTTON]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_BUTTON_BUTTON }),
19938
+ __assign(__assign({}, CEEAT[EventType.ENCODER]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_ENCODER_ENCODER }),
19939
+ __assign(__assign({}, CEEAT[EventType.TIMER]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_TIMER }),
19922
19940
  ],
19923
19941
  _c[ElementType.ENDLESS] = [
19924
- __assign(__assign({}, CEEAT.init), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_ENDLESS_INIT }),
19925
- __assign(__assign({}, CEEAT.button), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_ENDLESS_BUTTON }),
19926
- __assign(__assign({}, CEEAT.endless), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_ENDLESS_ENDLESS }),
19927
- __assign(__assign({}, CEEAT.timer), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_TIMER }),
19942
+ __assign(__assign({}, CEEAT[EventType.SETUP]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_ENDLESS_INIT }),
19943
+ __assign(__assign({}, CEEAT[EventType.BUTTON]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_ENDLESS_BUTTON }),
19944
+ __assign(__assign({}, CEEAT[EventType.ENDLESS]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_ENDLESS_ENDLESS }),
19945
+ __assign(__assign({}, CEEAT[EventType.TIMER]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_TIMER }),
19928
19946
  ],
19929
19947
  _c[ElementType.SYSTEM] = [
19930
- __assign(__assign({}, CEEAT.init), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_INIT }),
19931
- __assign(__assign({}, CEEAT.mapmode), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_MAPMODE }),
19932
- __assign(__assign({}, CEEAT.midirx), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_MIDIRX }),
19933
- __assign(__assign({}, CEEAT.timer), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_TIMER }),
19948
+ __assign(__assign({}, CEEAT[EventType.SETUP]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_INIT }),
19949
+ __assign(__assign({}, CEEAT[EventType.UTILITY]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_MAPMODE }),
19950
+ __assign(__assign({}, CEEAT[EventType.MIDIRX]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_MIDIRX }),
19951
+ __assign(__assign({}, CEEAT[EventType.TIMER]), { defaultConfig: grid_protocol.GRID_ACTIONSTRING_SYSTEM_TIMER }),
19934
19952
  ],
19935
19953
  _c);
19936
19954
  var GridProperty = /** @class */ (function () {
@@ -20421,7 +20439,10 @@ var GridProtocol = /** @class */ (function () {
20421
20439
  return res;
20422
20440
  };
20423
20441
  GridProtocol.prototype.is_element_compatible_with = function (element, target) {
20424
- var filtredEvents = [EventType.INIT, EventType.TIMER];
20442
+ var filtredEvents = [
20443
+ EventType.SETUP,
20444
+ EventType.TIMER,
20445
+ ];
20425
20446
  var elementEvents = grid
20426
20447
  .get_element_events(element)
20427
20448
  .map(function (e) { return e.desc; })