@intechstudio/grid-protocol 1.20240716.1603 → 1.20240719.951
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/dist/index.js +30 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -237,6 +237,8 @@ var GRID_LUA_FNC_G_LIMIT_short = "glim";
|
|
|
237
237
|
var GRID_LUA_FNC_G_LIMIT_human = "limit";
|
|
238
238
|
var GRID_LUA_FNC_G_MAPSAT_short = "gmaps";
|
|
239
239
|
var GRID_LUA_FNC_G_MAPSAT_human = "map_saturate";
|
|
240
|
+
var GRID_LUA_FNC_G_SIGN_short = "sign";
|
|
241
|
+
var GRID_LUA_FNC_G_SIGN_human = "sgn";
|
|
240
242
|
var GRID_LUA_FNC_G_SEGCALC_short = "gsc";
|
|
241
243
|
var GRID_LUA_FNC_G_SEGCALC_human = "segment_calculate";
|
|
242
244
|
var GRID_LUA_FNC_G_WEBSOCKET_SEND_short = "gwss";
|
|
@@ -963,6 +965,8 @@ var grid_protocol_bot = {
|
|
|
963
965
|
GRID_LUA_FNC_G_LIMIT_human: GRID_LUA_FNC_G_LIMIT_human,
|
|
964
966
|
GRID_LUA_FNC_G_MAPSAT_short: GRID_LUA_FNC_G_MAPSAT_short,
|
|
965
967
|
GRID_LUA_FNC_G_MAPSAT_human: GRID_LUA_FNC_G_MAPSAT_human,
|
|
968
|
+
GRID_LUA_FNC_G_SIGN_short: GRID_LUA_FNC_G_SIGN_short,
|
|
969
|
+
GRID_LUA_FNC_G_SIGN_human: GRID_LUA_FNC_G_SIGN_human,
|
|
966
970
|
GRID_LUA_FNC_G_SEGCALC_short: GRID_LUA_FNC_G_SEGCALC_short,
|
|
967
971
|
GRID_LUA_FNC_G_SEGCALC_human: GRID_LUA_FNC_G_SEGCALC_human,
|
|
968
972
|
GRID_LUA_FNC_G_WEBSOCKET_SEND_short: GRID_LUA_FNC_G_WEBSOCKET_SEND_short,
|
|
@@ -2055,6 +2059,8 @@ var protocol_data = /*#__PURE__*/Object.freeze({
|
|
|
2055
2059
|
GRID_LUA_FNC_G_RANDOM_short: GRID_LUA_FNC_G_RANDOM_short,
|
|
2056
2060
|
GRID_LUA_FNC_G_SEGCALC_human: GRID_LUA_FNC_G_SEGCALC_human,
|
|
2057
2061
|
GRID_LUA_FNC_G_SEGCALC_short: GRID_LUA_FNC_G_SEGCALC_short,
|
|
2062
|
+
GRID_LUA_FNC_G_SIGN_human: GRID_LUA_FNC_G_SIGN_human,
|
|
2063
|
+
GRID_LUA_FNC_G_SIGN_short: GRID_LUA_FNC_G_SIGN_short,
|
|
2058
2064
|
GRID_LUA_FNC_G_STRING_GET_fnptr: GRID_LUA_FNC_G_STRING_GET_fnptr,
|
|
2059
2065
|
GRID_LUA_FNC_G_STRING_GET_human: GRID_LUA_FNC_G_STRING_GET_human,
|
|
2060
2066
|
GRID_LUA_FNC_G_STRING_GET_short: GRID_LUA_FNC_G_STRING_GET_short,
|
|
@@ -28055,6 +28061,8 @@ var hasRequiredRange;
|
|
|
28055
28061
|
function requireRange () {
|
|
28056
28062
|
if (hasRequiredRange) return range;
|
|
28057
28063
|
hasRequiredRange = 1;
|
|
28064
|
+
const SPACE_CHARACTERS = /\s+/g;
|
|
28065
|
+
|
|
28058
28066
|
// hoisted class for cyclic dependency
|
|
28059
28067
|
class Range {
|
|
28060
28068
|
constructor (range, options) {
|
|
@@ -28075,7 +28083,7 @@ function requireRange () {
|
|
|
28075
28083
|
// just put it in the set and return
|
|
28076
28084
|
this.raw = range.value;
|
|
28077
28085
|
this.set = [[range]];
|
|
28078
|
-
this.
|
|
28086
|
+
this.formatted = undefined;
|
|
28079
28087
|
return this
|
|
28080
28088
|
}
|
|
28081
28089
|
|
|
@@ -28086,10 +28094,7 @@ function requireRange () {
|
|
|
28086
28094
|
// First reduce all whitespace as much as possible so we do not have to rely
|
|
28087
28095
|
// on potentially slow regexes like \s*. This is then stored and used for
|
|
28088
28096
|
// future error messages as well.
|
|
28089
|
-
this.raw = range
|
|
28090
|
-
.trim()
|
|
28091
|
-
.split(/\s+/)
|
|
28092
|
-
.join(' ');
|
|
28097
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, ' ');
|
|
28093
28098
|
|
|
28094
28099
|
// First, split on ||
|
|
28095
28100
|
this.set = this.raw
|
|
@@ -28123,14 +28128,29 @@ function requireRange () {
|
|
|
28123
28128
|
}
|
|
28124
28129
|
}
|
|
28125
28130
|
|
|
28126
|
-
this.
|
|
28131
|
+
this.formatted = undefined;
|
|
28132
|
+
}
|
|
28133
|
+
|
|
28134
|
+
get range () {
|
|
28135
|
+
if (this.formatted === undefined) {
|
|
28136
|
+
this.formatted = '';
|
|
28137
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
28138
|
+
if (i > 0) {
|
|
28139
|
+
this.formatted += '||';
|
|
28140
|
+
}
|
|
28141
|
+
const comps = this.set[i];
|
|
28142
|
+
for (let k = 0; k < comps.length; k++) {
|
|
28143
|
+
if (k > 0) {
|
|
28144
|
+
this.formatted += ' ';
|
|
28145
|
+
}
|
|
28146
|
+
this.formatted += comps[k].toString().trim();
|
|
28147
|
+
}
|
|
28148
|
+
}
|
|
28149
|
+
}
|
|
28150
|
+
return this.formatted
|
|
28127
28151
|
}
|
|
28128
28152
|
|
|
28129
28153
|
format () {
|
|
28130
|
-
this.range = this.set
|
|
28131
|
-
.map((comps) => comps.join(' ').trim())
|
|
28132
|
-
.join('||')
|
|
28133
|
-
.trim();
|
|
28134
28154
|
return this.range
|
|
28135
28155
|
}
|
|
28136
28156
|
|