@gui-chat-plugin/spreadsheet 0.2.2 → 0.4.0
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/style.css +1 -1
- package/dist/vue.cjs +7 -7
- package/dist/vue.js +22 -24
- package/package.json +14 -14
package/dist/vue.js
CHANGED
|
@@ -610,7 +610,7 @@ function dec(e, t) {
|
|
|
610
610
|
return t < ("" + Math.round(n * r)).length ? 0 : Math.round(n * r);
|
|
611
611
|
}
|
|
612
612
|
function carry(e, t) {
|
|
613
|
-
return t < ("" + Math.round((e - Math.floor(e)) * 10 ** t)).length
|
|
613
|
+
return +(t < ("" + Math.round((e - Math.floor(e)) * 10 ** t)).length);
|
|
614
614
|
}
|
|
615
615
|
function flr(e) {
|
|
616
616
|
return e < 2147483647 && e > -2147483648 ? "" + (e >= 0 ? e | 0 : e - 1 | 0) : "" + Math.floor(e);
|
|
@@ -2679,7 +2679,7 @@ function read_double_le(e, t) {
|
|
|
2679
2679
|
return r == 2047 ? a == 0 ? n * Infinity : NaN : (r == 0 ? r = -1022 : (r -= 1023, a += 2 ** 52), n * 2 ** (r - 52) * a);
|
|
2680
2680
|
}
|
|
2681
2681
|
function write_double_le(e, t, n) {
|
|
2682
|
-
var r = (t < 0 || 1 / t == -Infinity
|
|
2682
|
+
var r = (t < 0 || 1 / t == -Infinity) << 7, a = 0, o = 0, s = r ? -t : t;
|
|
2683
2683
|
isFinite(s) ? s == 0 ? a = o = 0 : (a = Math.floor(Math.log(s) / Math.LN2), o = s * 2 ** (52 - a), a <= -1023 && (!isFinite(o) || o < 2 ** 52) ? a = -1022 : (o -= 2 ** 52, a += 1023)) : (a = 2047, o = isNaN(t) ? 26985 : 0);
|
|
2684
2684
|
for (var c = 0; c <= 5; ++c, o /= 256) e[n + c] = o & 255;
|
|
2685
2685
|
e[n + 6] = (a & 15) << 4 | o & 15, e[n + 7] = a >> 4 | r;
|
|
@@ -2978,7 +2978,7 @@ function buf_array() {
|
|
|
2978
2978
|
function write_record(e, t, n, r) {
|
|
2979
2979
|
var a = +t, o;
|
|
2980
2980
|
if (!isNaN(a)) {
|
|
2981
|
-
r ||= XLSBRecordEnum[a].p || (n || []).length || 0, o = 1 + (a >= 128
|
|
2981
|
+
r ||= XLSBRecordEnum[a].p || (n || []).length || 0, o = 1 + +(a >= 128) + 1, r >= 128 && ++o, r >= 16384 && ++o, r >= 2097152 && ++o;
|
|
2982
2982
|
var s = e.next(o);
|
|
2983
2983
|
a <= 127 ? s.write_shift(1, a) : (s.write_shift(1, (a & 127) + 128), s.write_shift(1, a >> 7));
|
|
2984
2984
|
for (var c = 0; c != 4; ++c) if (r >= 128) s.write_shift(1, (r & 127) + 128), r >>= 7;
|
|
@@ -4184,7 +4184,7 @@ function write_TypedPropertyValue(e, t) {
|
|
|
4184
4184
|
r = new_buf(8), r.write_shift(8, t, "f");
|
|
4185
4185
|
break;
|
|
4186
4186
|
case 11:
|
|
4187
|
-
r.write_shift(4, t
|
|
4187
|
+
r.write_shift(4, +!!t);
|
|
4188
4188
|
break;
|
|
4189
4189
|
case 64:
|
|
4190
4190
|
r = write_FILETIME(t);
|
|
@@ -4276,7 +4276,7 @@ function writeuint16(e, t) {
|
|
|
4276
4276
|
return t ||= new_buf(2), t.write_shift(2, e), t;
|
|
4277
4277
|
}
|
|
4278
4278
|
function write_Bes(e, t, n) {
|
|
4279
|
-
return n ||= new_buf(2), n.write_shift(1, t == "e" ? +e : +!!e), n.write_shift(1, t == "e"
|
|
4279
|
+
return n ||= new_buf(2), n.write_shift(1, t == "e" ? +e : +!!e), n.write_shift(1, +(t == "e")), n;
|
|
4280
4280
|
}
|
|
4281
4281
|
function parse_ShortXLUnicodeString(e, t, n) {
|
|
4282
4282
|
var r = e.read_shift(n && n.biff >= 12 ? 2 : 1), a = "sbcs-cont", o = current_codepage;
|
|
@@ -4485,7 +4485,7 @@ function write_Number(e, t, n, r) {
|
|
|
4485
4485
|
return write_XLSCell(e, t, r, a), write_Xnum(n, a), a;
|
|
4486
4486
|
}
|
|
4487
4487
|
function parse_ExternSheet(e, t, n) {
|
|
4488
|
-
if (n.biff < 8 || !(n.biff > 8) && t == e[e.l] + (e[e.l + 1] == 3
|
|
4488
|
+
if (n.biff < 8 || !(n.biff > 8) && t == e[e.l] + +(e[e.l + 1] == 3) + 1) return parse_BIFF5ExternSheet(e, t, n);
|
|
4489
4489
|
for (var r = [], a = e.l + t, o = e.read_shift(n.biff > 8 ? 4 : 2); o-- !== 0;) r.push(parse_XTI(e, n.biff > 8 ? 12 : 6, n));
|
|
4490
4490
|
if (e.l != a) throw Error("Bad ExternSheet: " + e.l + " != " + a);
|
|
4491
4491
|
return r;
|
|
@@ -6858,7 +6858,6 @@ function write_DXFS_bin(e) {
|
|
|
6858
6858
|
function write_TABLESTYLES_bin(e) {
|
|
6859
6859
|
write_record(e, 508, write_BrtBeginTableStyles(0, "TableStyleMedium9", "PivotStyleMedium4")), write_record(e, 509);
|
|
6860
6860
|
}
|
|
6861
|
-
function write_COLORPALETTE_bin() {}
|
|
6862
6861
|
function write_sty_bin(e, t) {
|
|
6863
6862
|
var n = buf_array();
|
|
6864
6863
|
return write_record(n, 278), write_FMTS_bin(n, e.SSF), write_FONTS_bin(n, e), write_FILLS_bin(n, e), write_BORDERS_bin(n, e), write_CELLSTYLEXFS_bin(n, e), write_CELLXFS_bin(n, t.cellXfs), write_STYLES_bin(n, e), write_DXFS_bin(n, e), write_TABLESTYLES_bin(n, e), write_record(n, 279), n.end();
|
|
@@ -6899,7 +6898,7 @@ function parse_BrtBeginEsmdb(e) {
|
|
|
6899
6898
|
}
|
|
6900
6899
|
function write_BrtBeginEsmdb(e, t) {
|
|
6901
6900
|
var n = new_buf(8);
|
|
6902
|
-
return n.write_shift(4, e), n.write_shift(4, t
|
|
6901
|
+
return n.write_shift(4, e), n.write_shift(4, +!!t), n;
|
|
6903
6902
|
}
|
|
6904
6903
|
function write_xlmeta_bin() {
|
|
6905
6904
|
var e = buf_array();
|
|
@@ -8255,7 +8254,7 @@ function write_XLSBFormulaErr(e) {
|
|
|
8255
8254
|
}
|
|
8256
8255
|
function write_XLSBFormulaBool(e) {
|
|
8257
8256
|
var t = new_buf(10);
|
|
8258
|
-
return t.write_shift(4, 2), t.write_shift(1, 29), t.write_shift(1, e
|
|
8257
|
+
return t.write_shift(4, 2), t.write_shift(1, 29), t.write_shift(1, +!!e), t.write_shift(4, 0), t;
|
|
8259
8258
|
}
|
|
8260
8259
|
function write_XLSBFormulaStr(e) {
|
|
8261
8260
|
var t = new_buf(7);
|
|
@@ -8271,7 +8270,7 @@ function write_XLSBFormulaStr(e) {
|
|
|
8271
8270
|
}
|
|
8272
8271
|
function write_XLSBFormulaRef(e) {
|
|
8273
8272
|
var t = decode_cell(e), n = new_buf(15);
|
|
8274
|
-
return n.write_shift(4, 7), n.write_shift(1, 36), n.write_shift(4, t.r), n.write_shift(2, t.c | (e.charAt(0) == "$" ? 0 : 1) << 14 |
|
|
8273
|
+
return n.write_shift(4, 7), n.write_shift(1, 36), n.write_shift(4, t.r), n.write_shift(2, t.c | (e.charAt(0) == "$" ? 0 : 1) << 14 | !e.match(/\$\d/) << 15), n.write_shift(4, 0), n;
|
|
8275
8274
|
}
|
|
8276
8275
|
function write_XLSBFormulaRef3D(e, t) {
|
|
8277
8276
|
var n = e.lastIndexOf("!"), r = e.slice(0, n);
|
|
@@ -8281,7 +8280,7 @@ function write_XLSBFormulaRef3D(e, t) {
|
|
|
8281
8280
|
var o = new_buf(17);
|
|
8282
8281
|
return o.write_shift(4, 9), o.write_shift(1, 58), o.write_shift(2, 2 + t.SheetNames.map(function(e) {
|
|
8283
8282
|
return e.toLowerCase();
|
|
8284
|
-
}).indexOf(r.toLowerCase())), o.write_shift(4, a.r), o.write_shift(2, a.c | (e.charAt(0) == "$" ? 0 : 1) << 14 |
|
|
8283
|
+
}).indexOf(r.toLowerCase())), o.write_shift(4, a.r), o.write_shift(2, a.c | (e.charAt(0) == "$" ? 0 : 1) << 14 | !e.match(/\$\d/) << 15), o.write_shift(4, 0), o;
|
|
8285
8284
|
}
|
|
8286
8285
|
function write_XLSBFormulaRefErr3D(e, t) {
|
|
8287
8286
|
var n = e.lastIndexOf("!"), r = e.slice(0, n);
|
|
@@ -8295,7 +8294,7 @@ function write_XLSBFormulaRange(e) {
|
|
|
8295
8294
|
var t = e.split(":"), n = t[0], r = new_buf(23);
|
|
8296
8295
|
r.write_shift(4, 15), n = t[0];
|
|
8297
8296
|
var a = decode_cell(n);
|
|
8298
|
-
return r.write_shift(1, 36), r.write_shift(4, a.r), r.write_shift(2, a.c | (n.charAt(0) == "$" ? 0 : 1) << 14 |
|
|
8297
|
+
return r.write_shift(1, 36), r.write_shift(4, a.r), r.write_shift(2, a.c | (n.charAt(0) == "$" ? 0 : 1) << 14 | !n.match(/\$\d/) << 15), r.write_shift(4, 0), n = t[1], a = decode_cell(n), r.write_shift(1, 36), r.write_shift(4, a.r), r.write_shift(2, a.c | (n.charAt(0) == "$" ? 0 : 1) << 14 | !n.match(/\$\d/) << 15), r.write_shift(4, 0), r.write_shift(1, 17), r.write_shift(4, 0), r;
|
|
8299
8298
|
}
|
|
8300
8299
|
function write_XLSBFormulaRangeWS(e, t) {
|
|
8301
8300
|
var n = e.lastIndexOf("!"), r = e.slice(0, n);
|
|
@@ -8305,9 +8304,9 @@ function write_XLSBFormulaRangeWS(e, t) {
|
|
|
8305
8304
|
var s = a[0], c = decode_cell(s);
|
|
8306
8305
|
return o.write_shift(1, 58), o.write_shift(2, 2 + t.SheetNames.map(function(e) {
|
|
8307
8306
|
return e.toLowerCase();
|
|
8308
|
-
}).indexOf(r.toLowerCase())), o.write_shift(4, c.r), o.write_shift(2, c.c | (s.charAt(0) == "$" ? 0 : 1) << 14 |
|
|
8307
|
+
}).indexOf(r.toLowerCase())), o.write_shift(4, c.r), o.write_shift(2, c.c | (s.charAt(0) == "$" ? 0 : 1) << 14 | !s.match(/\$\d/) << 15), s = a[1], c = decode_cell(s), o.write_shift(1, 58), o.write_shift(2, 2 + t.SheetNames.map(function(e) {
|
|
8309
8308
|
return e.toLowerCase();
|
|
8310
|
-
}).indexOf(r.toLowerCase())), o.write_shift(4, c.r), o.write_shift(2, c.c | (s.charAt(0) == "$" ? 0 : 1) << 14 |
|
|
8309
|
+
}).indexOf(r.toLowerCase())), o.write_shift(4, c.r), o.write_shift(2, c.c | (s.charAt(0) == "$" ? 0 : 1) << 14 | !s.match(/\$\d/) << 15), o.write_shift(1, 17), o.write_shift(4, 0), o;
|
|
8311
8310
|
}
|
|
8312
8311
|
function write_XLSBFormulaArea3D(e, t) {
|
|
8313
8312
|
var n = e.lastIndexOf("!"), r = e.slice(0, n);
|
|
@@ -9771,7 +9770,7 @@ function parse_BrtCellBool(e) {
|
|
|
9771
9770
|
];
|
|
9772
9771
|
}
|
|
9773
9772
|
function write_BrtCellBool(e, t, n) {
|
|
9774
|
-
return n ??= new_buf(9), write_XLSBCell(t, n), n.write_shift(1, e.v
|
|
9773
|
+
return n ??= new_buf(9), write_XLSBCell(t, n), n.write_shift(1, +!!e.v), n;
|
|
9775
9774
|
}
|
|
9776
9775
|
function parse_BrtShortBool(e) {
|
|
9777
9776
|
return [
|
|
@@ -9781,7 +9780,7 @@ function parse_BrtShortBool(e) {
|
|
|
9781
9780
|
];
|
|
9782
9781
|
}
|
|
9783
9782
|
function write_BrtShortBool(e, t, n) {
|
|
9784
|
-
return n ??= new_buf(5), write_XLSBShortCell(t, n), n.write_shift(1, e.v
|
|
9783
|
+
return n ??= new_buf(5), write_XLSBShortCell(t, n), n.write_shift(1, +!!e.v), n;
|
|
9785
9784
|
}
|
|
9786
9785
|
function parse_BrtCellError(e) {
|
|
9787
9786
|
return [
|
|
@@ -10022,7 +10021,7 @@ function write_BrtSheetProtection(e, t) {
|
|
|
10022
10021
|
["pivotTables", !0],
|
|
10023
10022
|
["selectUnlockedCells", !1]
|
|
10024
10023
|
].forEach(function(n) {
|
|
10025
|
-
n[1] ? t.write_shift(4, e[n[0]] != null && !e[n[0]]
|
|
10024
|
+
n[1] ? t.write_shift(4, +(e[n[0]] != null && !e[n[0]])) : t.write_shift(4, e[n[0]] != null && e[n[0]] ? 0 : 1);
|
|
10026
10025
|
}), t;
|
|
10027
10026
|
}
|
|
10028
10027
|
function parse_BrtDVal() {}
|
|
@@ -10136,7 +10135,6 @@ function write_AUTOFILTER(e, t, n, r) {
|
|
|
10136
10135
|
function write_WSVIEWS2(e, t, n) {
|
|
10137
10136
|
write_record(e, 133), write_record(e, 137, write_BrtBeginWsView(t, n)), write_record(e, 138), write_record(e, 134);
|
|
10138
10137
|
}
|
|
10139
|
-
function write_WSFMTINFO() {}
|
|
10140
10138
|
function write_SHEETPROTECT(e, t) {
|
|
10141
10139
|
t["!protect"] && write_record(e, 535, write_BrtSheetProtection(t["!protect"]));
|
|
10142
10140
|
}
|
|
@@ -12523,7 +12521,7 @@ function write_new_storage(e, t) {
|
|
|
12523
12521
|
} else n[1] = 2, writeDecimal128LE(n, a, e.v), o |= 1, a += 16;
|
|
12524
12522
|
break;
|
|
12525
12523
|
case "b":
|
|
12526
|
-
n[1] = 6, r.setFloat64(a, e.v
|
|
12524
|
+
n[1] = 6, r.setFloat64(a, +!!e.v, !0), o |= 2, a += 8;
|
|
12527
12525
|
break;
|
|
12528
12526
|
case "s":
|
|
12529
12527
|
var s = e.v == null ? "" : String(e.v);
|
|
@@ -12578,7 +12576,7 @@ function write_old_storage(e, t) {
|
|
|
12578
12576
|
n[1] = 2, r.setFloat64(a, e.v, !0), o |= 32, a += 8;
|
|
12579
12577
|
break;
|
|
12580
12578
|
case "b":
|
|
12581
|
-
n[1] = 6, r.setFloat64(a, e.v
|
|
12579
|
+
n[1] = 6, r.setFloat64(a, +!!e.v, !0), o |= 32, a += 8;
|
|
12582
12580
|
break;
|
|
12583
12581
|
case "s":
|
|
12584
12582
|
if (s = e.v == null ? "" : String(e.v), !e.l) {
|
|
@@ -12710,7 +12708,7 @@ function write_TST_TileRowInfo(e, t, n) {
|
|
|
12710
12708
|
for (s[2][0].data = write_varint49(c), s[5][0].data = write_varint49(5); v < s[7][0].data.length / 2; ++v) d.setUint16(v * 2, 65535, !0), m.setUint16(v * 2, 65535, !0);
|
|
12711
12709
|
return s[6][0].data = u8concat(p), s[3][0].data = u8concat(g), s[8] = [{
|
|
12712
12710
|
type: 0,
|
|
12713
|
-
data: write_varint49(n
|
|
12711
|
+
data: write_varint49(+!!n)
|
|
12714
12712
|
}], s;
|
|
12715
12713
|
}
|
|
12716
12714
|
function write_iwam(e, t) {
|
|
@@ -13275,7 +13273,7 @@ function write_numbers_tma(e, t, n, r, a, o) {
|
|
|
13275
13273
|
}],
|
|
13276
13274
|
[{
|
|
13277
13275
|
type: 0,
|
|
13278
|
-
data: write_varint49(USE_WIDE_ROWS
|
|
13276
|
+
data: write_varint49(+!!USE_WIDE_ROWS)
|
|
13279
13277
|
}]
|
|
13280
13278
|
], D = w * b; D <= Math.min(s.e.r, (w + 1) * b - 1); ++D) {
|
|
13281
13279
|
var O = write_TST_TileRowInfo(l[D], h, USE_WIDE_ROWS);
|
|
@@ -15948,7 +15946,7 @@ var colToIndex = (e) => {
|
|
|
15948
15946
|
return -1;
|
|
15949
15947
|
}, vlookupHandler = (e, t) => {
|
|
15950
15948
|
if (e.length < 3 || e.length > 4) throw Error("VLOOKUP requires 3 or 4 arguments");
|
|
15951
|
-
let n = t.evaluateFormula(e[0]), r = e[1], a = toNumber(t.evaluateFormula(e[2])), o = e.length === 4 ? t.evaluateFormula(e[3]) : !0, s = o === !0 || o === 1 || o === "1"
|
|
15949
|
+
let n = t.evaluateFormula(e[0]), r = e[1], a = toNumber(t.evaluateFormula(e[2])), o = e.length === 4 ? t.evaluateFormula(e[3]) : !0, s = +(o === !0 || o === 1 || o === "1");
|
|
15952
15950
|
if (!r.match(/^([A-Z]+)(\d+):([A-Z]+)(\d+)$/)) throw Error("Invalid table array range");
|
|
15953
15951
|
let c = "", l = r;
|
|
15954
15952
|
if (r.includes("!")) {
|
|
@@ -15968,7 +15966,7 @@ var colToIndex = (e) => {
|
|
|
15968
15966
|
return t.getCellValue(v);
|
|
15969
15967
|
}, hlookupHandler = (e, t) => {
|
|
15970
15968
|
if (e.length < 3 || e.length > 4) throw Error("HLOOKUP requires 3 or 4 arguments");
|
|
15971
|
-
let n = t.evaluateFormula(e[0]), r = e[1], a = toNumber(t.evaluateFormula(e[2])), o = e.length === 4 ? t.evaluateFormula(e[3]) : !0, s = o === !0 || o === 1 || o === "1"
|
|
15969
|
+
let n = t.evaluateFormula(e[0]), r = e[1], a = toNumber(t.evaluateFormula(e[2])), o = e.length === 4 ? t.evaluateFormula(e[3]) : !0, s = +(o === !0 || o === 1 || o === "1"), c = "", l = r;
|
|
15972
15970
|
if (r.includes("!")) {
|
|
15973
15971
|
let e = r.split("!");
|
|
15974
15972
|
c = e[0] + "!", l = e[1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gui-chat-plugin/spreadsheet",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Spreadsheet plugin for GUIChat",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"test:all": "vitest run && tsx tests/engine/run-all-fixtures.ts"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"gui-chat-protocol": "^0.
|
|
44
|
+
"gui-chat-protocol": "^0.3.3",
|
|
45
45
|
"vue": "^3.5.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
@@ -49,22 +49,22 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@eslint/js": "^10.0.1",
|
|
52
|
-
"@tailwindcss/vite": "^4.2.
|
|
53
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
54
|
-
"@typescript-eslint/parser": "^8.
|
|
52
|
+
"@tailwindcss/vite": "^4.2.4",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^8.59.2",
|
|
54
|
+
"@typescript-eslint/parser": "^8.59.2",
|
|
55
55
|
"@vitejs/plugin-vue": "^6.0.5",
|
|
56
|
-
"eslint": "^10.
|
|
57
|
-
"eslint-plugin-vue": "^10.
|
|
58
|
-
"globals": "^17.
|
|
59
|
-
"gui-chat-protocol": "^0.
|
|
60
|
-
"tailwindcss": "^4.2.
|
|
56
|
+
"eslint": "^10.3.0",
|
|
57
|
+
"eslint-plugin-vue": "^10.9.1",
|
|
58
|
+
"globals": "^17.6.0",
|
|
59
|
+
"gui-chat-protocol": "^0.3.3",
|
|
60
|
+
"tailwindcss": "^4.2.4",
|
|
61
61
|
"tsx": "^4.21.0",
|
|
62
|
-
"typescript": "~
|
|
63
|
-
"vite": "^8.0.
|
|
62
|
+
"typescript": "~6.0.3",
|
|
63
|
+
"vite": "^8.0.11",
|
|
64
64
|
"vitest": "^4.0.17",
|
|
65
|
-
"vue": "^3.5.
|
|
65
|
+
"vue": "^3.5.34",
|
|
66
66
|
"vue-eslint-parser": "^10.4.0",
|
|
67
|
-
"vue-tsc": "^3.2.
|
|
67
|
+
"vue-tsc": "^3.2.8"
|
|
68
68
|
},
|
|
69
69
|
"keywords": [
|
|
70
70
|
"guichat",
|