clavarium 0.2.239-next.1 → 0.2.241-next.1

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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.239-next.1",
3
+ "version": "0.2.241-next.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.239-next.1",
9
+ "version": "0.2.241-next.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
@@ -15,13 +15,15 @@
15
15
  "clavarium-docket": "0.1.1",
16
16
  "clavarium-parley": "0.17.35-next.1",
17
17
  "clavarium-tether": "0.1.0-next.46",
18
+ "mammoth": "1.13.0",
18
19
  "mermaid": "11.17.2",
19
20
  "node-pty": "^1.1.0",
20
21
  "pdfjs-dist": "6.4.299",
21
22
  "prismjs": "1.30.0",
22
23
  "qrcode": "^1.5.4",
23
24
  "web-push": "^3.6.7",
24
- "ws": "^8.18.0"
25
+ "ws": "^8.18.0",
26
+ "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
25
27
  },
26
28
  "bin": {
27
29
  "clavarium": "deploy/clavarium.mjs"
@@ -610,6 +612,15 @@
610
612
  "d3-transition": "^3.0.1"
611
613
  }
612
614
  },
615
+ "node_modules/@xmldom/xmldom": {
616
+ "version": "0.8.15",
617
+ "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.15.tgz",
618
+ "integrity": "sha512-/5NV/vDALVFDXgLmfsy9TRCBlKwO2LNBFzpzvb9iIj+jR+eSc6DLYYvVOdivT/jm7MtU6TebYuRmzEOI7w40UA==",
619
+ "license": "MIT",
620
+ "engines": {
621
+ "node": ">=10.0.0"
622
+ }
623
+ },
613
624
  "node_modules/@xterm/addon-fit": {
614
625
  "version": "0.11.0",
615
626
  "resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.11.0.tgz",
@@ -658,6 +669,15 @@
658
669
  "url": "https://github.com/chalk/ansi-styles?sponsor=1"
659
670
  }
660
671
  },
672
+ "node_modules/argparse": {
673
+ "version": "1.0.10",
674
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
675
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
676
+ "license": "MIT",
677
+ "dependencies": {
678
+ "sprintf-js": "~1.0.2"
679
+ }
680
+ },
661
681
  "node_modules/asn1": {
662
682
  "version": "0.2.6",
663
683
  "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
@@ -680,6 +700,26 @@
680
700
  "safer-buffer": "^2.1.0"
681
701
  }
682
702
  },
703
+ "node_modules/base64-js": {
704
+ "version": "1.5.1",
705
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
706
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
707
+ "funding": [
708
+ {
709
+ "type": "github",
710
+ "url": "https://github.com/sponsors/feross"
711
+ },
712
+ {
713
+ "type": "patreon",
714
+ "url": "https://www.patreon.com/feross"
715
+ },
716
+ {
717
+ "type": "consulting",
718
+ "url": "https://feross.org/support"
719
+ }
720
+ ],
721
+ "license": "MIT"
722
+ },
683
723
  "node_modules/bcrypt-pbkdf": {
684
724
  "version": "1.0.2",
685
725
  "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
@@ -813,6 +853,12 @@
813
853
  "node": ">= 10"
814
854
  }
815
855
  },
856
+ "node_modules/core-util-is": {
857
+ "version": "1.0.3",
858
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
859
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
860
+ "license": "MIT"
861
+ },
816
862
  "node_modules/cose-base": {
817
863
  "version": "1.0.3",
818
864
  "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz",
@@ -1382,6 +1428,12 @@
1382
1428
  "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==",
1383
1429
  "license": "MIT"
1384
1430
  },
1431
+ "node_modules/dingbat-to-unicode": {
1432
+ "version": "1.0.2",
1433
+ "resolved": "https://registry.npmjs.org/dingbat-to-unicode/-/dingbat-to-unicode-1.0.2.tgz",
1434
+ "integrity": "sha512-R0bRerYzy/EZP6QzD3Hkl6JjUDA1Mnn+pd928w0nWjPzihnbAR6dcjGJGiRyznj5E4S1duEKzWrTqw02DPcdzg==",
1435
+ "license": "BSD-2-Clause"
1436
+ },
1385
1437
  "node_modules/dompurify": {
1386
1438
  "version": "3.4.17",
1387
1439
  "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.17.tgz",
@@ -1391,6 +1443,15 @@
1391
1443
  "@types/trusted-types": "^2.0.7"
1392
1444
  }
1393
1445
  },
1446
+ "node_modules/duck": {
1447
+ "version": "0.1.12",
1448
+ "resolved": "https://registry.npmjs.org/duck/-/duck-0.1.12.tgz",
1449
+ "integrity": "sha512-wkctla1O6VfP89gQ+J/yDesM0S7B7XLXjKGzXxMDVFg7uEn706niAtyYovKbyq1oT9YwDcly721/iUWoc8MVRg==",
1450
+ "license": "BSD",
1451
+ "dependencies": {
1452
+ "underscore": "^1.13.1"
1453
+ }
1454
+ },
1394
1455
  "node_modules/ecdsa-sig-formatter": {
1395
1456
  "version": "1.0.11",
1396
1457
  "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
@@ -1489,6 +1550,12 @@
1489
1550
  "node": ">=0.10.0"
1490
1551
  }
1491
1552
  },
1553
+ "node_modules/immediate": {
1554
+ "version": "3.0.6",
1555
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
1556
+ "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
1557
+ "license": "MIT"
1558
+ },
1492
1559
  "node_modules/import-meta-resolve": {
1493
1560
  "version": "4.2.0",
1494
1561
  "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz",
@@ -1523,6 +1590,24 @@
1523
1590
  "node": ">=8"
1524
1591
  }
1525
1592
  },
1593
+ "node_modules/isarray": {
1594
+ "version": "1.0.0",
1595
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
1596
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
1597
+ "license": "MIT"
1598
+ },
1599
+ "node_modules/jszip": {
1600
+ "version": "3.10.2",
1601
+ "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.2.tgz",
1602
+ "integrity": "sha512-3l+rb15IOWtUhU0H5MFqES/T6Kh7abYwjosBey/vD6hDt8zoEffkSC5Ws5SGtgVw3gBx2NEbhTeSW1+kWkpyTQ==",
1603
+ "license": "(MIT OR GPL-3.0-or-later)",
1604
+ "dependencies": {
1605
+ "lie": "~3.3.0",
1606
+ "pako": "~1.0.2",
1607
+ "readable-stream": "~2.3.6",
1608
+ "setimmediate": "^1.0.5"
1609
+ }
1610
+ },
1526
1611
  "node_modules/jwa": {
1527
1612
  "version": "2.0.1",
1528
1613
  "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz",
@@ -1580,6 +1665,15 @@
1580
1665
  "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==",
1581
1666
  "license": "MIT"
1582
1667
  },
1668
+ "node_modules/lie": {
1669
+ "version": "3.3.0",
1670
+ "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
1671
+ "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
1672
+ "license": "MIT",
1673
+ "dependencies": {
1674
+ "immediate": "~3.0.5"
1675
+ }
1676
+ },
1583
1677
  "node_modules/locate-path": {
1584
1678
  "version": "5.0.0",
1585
1679
  "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
@@ -1598,6 +1692,39 @@
1598
1692
  "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",
1599
1693
  "license": "MIT"
1600
1694
  },
1695
+ "node_modules/lop": {
1696
+ "version": "0.4.2",
1697
+ "resolved": "https://registry.npmjs.org/lop/-/lop-0.4.2.tgz",
1698
+ "integrity": "sha512-RefILVDQ4DKoRZsJ4Pj22TxE3omDO47yFpkIBoDKzkqPRISs5U1cnAdg/5583YPkWPaLIYHOKRMQSvjFsO26cw==",
1699
+ "license": "BSD-2-Clause",
1700
+ "dependencies": {
1701
+ "duck": "^0.1.12",
1702
+ "option": "~0.2.1",
1703
+ "underscore": "^1.13.1"
1704
+ }
1705
+ },
1706
+ "node_modules/mammoth": {
1707
+ "version": "1.13.0",
1708
+ "resolved": "https://registry.npmjs.org/mammoth/-/mammoth-1.13.0.tgz",
1709
+ "integrity": "sha512-2cawcYFcP7ISfXbBcL9lmVgTNWo88v/52ND1gnywHtVT/pX0//puPnf0iMPV9ZgmuvNOE+zkIhDgZ9M2c2dDDg==",
1710
+ "license": "BSD-2-Clause",
1711
+ "dependencies": {
1712
+ "@xmldom/xmldom": "^0.8.6",
1713
+ "argparse": "~1.0.3",
1714
+ "base64-js": "^1.5.1",
1715
+ "dingbat-to-unicode": "^1.0.1",
1716
+ "jszip": "^3.7.1",
1717
+ "lop": "^0.4.2",
1718
+ "underscore": "^1.13.1",
1719
+ "xmlbuilder": "^10.0.0"
1720
+ },
1721
+ "bin": {
1722
+ "mammoth": "bin/mammoth"
1723
+ },
1724
+ "engines": {
1725
+ "node": ">=12.0.0"
1726
+ }
1727
+ },
1601
1728
  "node_modules/marked": {
1602
1729
  "version": "16.4.2",
1603
1730
  "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz",
@@ -1684,6 +1811,12 @@
1684
1811
  "node-addon-api": "^7.1.0"
1685
1812
  }
1686
1813
  },
1814
+ "node_modules/option": {
1815
+ "version": "0.2.4",
1816
+ "resolved": "https://registry.npmjs.org/option/-/option-0.2.4.tgz",
1817
+ "integrity": "sha512-pkEqbDyl8ou5cpq+VsnQbe/WlEy5qS7xPzMS1U55OCG9KPvwFD46zDbxQIj3egJSFc3D+XhYOPUzz49zQAVy7A==",
1818
+ "license": "BSD-2-Clause"
1819
+ },
1687
1820
  "node_modules/p-limit": {
1688
1821
  "version": "2.3.0",
1689
1822
  "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
@@ -1726,6 +1859,12 @@
1726
1859
  "integrity": "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA==",
1727
1860
  "license": "MIT"
1728
1861
  },
1862
+ "node_modules/pako": {
1863
+ "version": "1.0.11",
1864
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
1865
+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
1866
+ "license": "(MIT AND Zlib)"
1867
+ },
1729
1868
  "node_modules/path-data-parser": {
1730
1869
  "version": "0.1.0",
1731
1870
  "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz",
@@ -1787,6 +1926,12 @@
1787
1926
  "node": ">=6"
1788
1927
  }
1789
1928
  },
1929
+ "node_modules/process-nextick-args": {
1930
+ "version": "2.0.1",
1931
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
1932
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
1933
+ "license": "MIT"
1934
+ },
1790
1935
  "node_modules/qrcode": {
1791
1936
  "version": "1.5.4",
1792
1937
  "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz",
@@ -1804,6 +1949,27 @@
1804
1949
  "node": ">=10.13.0"
1805
1950
  }
1806
1951
  },
1952
+ "node_modules/readable-stream": {
1953
+ "version": "2.3.8",
1954
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
1955
+ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
1956
+ "license": "MIT",
1957
+ "dependencies": {
1958
+ "core-util-is": "~1.0.0",
1959
+ "inherits": "~2.0.3",
1960
+ "isarray": "~1.0.0",
1961
+ "process-nextick-args": "~2.0.0",
1962
+ "safe-buffer": "~5.1.1",
1963
+ "string_decoder": "~1.1.1",
1964
+ "util-deprecate": "~1.0.1"
1965
+ }
1966
+ },
1967
+ "node_modules/readable-stream/node_modules/safe-buffer": {
1968
+ "version": "5.1.2",
1969
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
1970
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
1971
+ "license": "MIT"
1972
+ },
1807
1973
  "node_modules/require-directory": {
1808
1974
  "version": "2.1.1",
1809
1975
  "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -1875,6 +2041,12 @@
1875
2041
  "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
1876
2042
  "license": "ISC"
1877
2043
  },
2044
+ "node_modules/setimmediate": {
2045
+ "version": "1.0.5",
2046
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
2047
+ "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==",
2048
+ "license": "MIT"
2049
+ },
1878
2050
  "node_modules/sherpa-onnx-darwin-arm64": {
1879
2051
  "version": "1.13.8",
1880
2052
  "resolved": "https://registry.npmjs.org/sherpa-onnx-darwin-arm64/-/sherpa-onnx-darwin-arm64-1.13.8.tgz",
@@ -1968,6 +2140,12 @@
1968
2140
  "win32"
1969
2141
  ]
1970
2142
  },
2143
+ "node_modules/sprintf-js": {
2144
+ "version": "1.0.3",
2145
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
2146
+ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
2147
+ "license": "BSD-3-Clause"
2148
+ },
1971
2149
  "node_modules/ssh2": {
1972
2150
  "version": "1.17.0",
1973
2151
  "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.17.0.tgz",
@@ -1992,6 +2170,21 @@
1992
2170
  "integrity": "sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg==",
1993
2171
  "license": "MIT"
1994
2172
  },
2173
+ "node_modules/string_decoder": {
2174
+ "version": "1.1.1",
2175
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
2176
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
2177
+ "license": "MIT",
2178
+ "dependencies": {
2179
+ "safe-buffer": "~5.1.0"
2180
+ }
2181
+ },
2182
+ "node_modules/string_decoder/node_modules/safe-buffer": {
2183
+ "version": "5.1.2",
2184
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
2185
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
2186
+ "license": "MIT"
2187
+ },
1995
2188
  "node_modules/string-width": {
1996
2189
  "version": "4.2.3",
1997
2190
  "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
@@ -2049,6 +2242,18 @@
2049
2242
  "license": "Unlicense",
2050
2243
  "optional": true
2051
2244
  },
2245
+ "node_modules/underscore": {
2246
+ "version": "1.13.8",
2247
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.8.tgz",
2248
+ "integrity": "sha512-DXtD3ZtEQzc7M8m4cXotyHR+FAS18C64asBYY5vqZexfYryNNnDc02W4hKg3rdQuqOYas1jkseX0+nZXjTXnvQ==",
2249
+ "license": "MIT"
2250
+ },
2251
+ "node_modules/util-deprecate": {
2252
+ "version": "1.0.2",
2253
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
2254
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
2255
+ "license": "MIT"
2256
+ },
2052
2257
  "node_modules/uuid": {
2053
2258
  "version": "14.0.3",
2054
2259
  "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.3.tgz",
@@ -2122,6 +2327,27 @@
2122
2327
  }
2123
2328
  }
2124
2329
  },
2330
+ "node_modules/xlsx": {
2331
+ "version": "0.20.3",
2332
+ "resolved": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
2333
+ "integrity": "sha512-oLDq3jw7AcLqKWH2AhCpVTZl8mf6X2YReP+Neh0SJUzV/BdZYjth94tG5toiMB1PPrYtxOCfaoUCkvtuH+3AJA==",
2334
+ "license": "Apache-2.0",
2335
+ "bin": {
2336
+ "xlsx": "bin/xlsx.njs"
2337
+ },
2338
+ "engines": {
2339
+ "node": ">=0.8"
2340
+ }
2341
+ },
2342
+ "node_modules/xmlbuilder": {
2343
+ "version": "10.1.1",
2344
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-10.1.1.tgz",
2345
+ "integrity": "sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg==",
2346
+ "license": "MIT",
2347
+ "engines": {
2348
+ "node": ">=4.0"
2349
+ }
2350
+ },
2125
2351
  "node_modules/y18n": {
2126
2352
  "version": "4.0.3",
2127
2353
  "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.239-next.1",
3
+ "version": "0.2.241-next.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A conversation is a VM with a terminal in it. Everything else is a folder.",
@@ -48,13 +48,15 @@
48
48
  "clavarium-docket": "0.1.1",
49
49
  "clavarium-parley": "0.17.35-next.1",
50
50
  "clavarium-tether": "0.1.0-next.46",
51
+ "mammoth": "1.13.0",
51
52
  "mermaid": "11.17.2",
52
53
  "node-pty": "^1.1.0",
53
54
  "pdfjs-dist": "6.4.299",
54
55
  "prismjs": "1.30.0",
55
56
  "qrcode": "^1.5.4",
56
57
  "web-push": "^3.6.7",
57
- "ws": "^8.18.0"
58
+ "ws": "^8.18.0",
59
+ "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
58
60
  },
59
61
  "publishConfig": {
60
62
  "access": "public"
package/server/main.mjs CHANGED
@@ -123,6 +123,10 @@ export const FILES = {
123
123
  '/vendor/binder-fr.json': [packageFile('clavarium-binder', 'ui/texts/fr.json'), 'application/json; charset=utf-8'],
124
124
  '/vendor/pdf.mjs': [packageFile('pdfjs-dist', 'build/pdf.min.mjs'), 'text/javascript; charset=utf-8'],
125
125
  '/vendor/pdf.worker.mjs': [packageFile('pdfjs-dist', 'build/pdf.worker.min.mjs'), 'text/javascript; charset=utf-8'],
126
+ /* Office files shown (02-11), read in the page alone -- the file goes nowhere: spreadsheets by SheetJS
127
+ (Apache-2.0, from its own site: its npm copy is old), Word by mammoth (BSD-2). Asked for only when one is opened. */
128
+ '/vendor/xlsx.js': [packageFile('xlsx', 'dist/xlsx.full.min.js'), 'text/javascript; charset=utf-8'],
129
+ '/vendor/mammoth.js': [packageFile('mammoth', 'mammoth.browser.min.js'), 'text/javascript; charset=utf-8'],
126
130
  /* Drawings in the chat (```mermaid), at the version package.json fixes: asked for only when one is shown. */
127
131
  '/vendor/mermaid.js': [packageFile('mermaid', 'dist/mermaid.min.js'), 'text/javascript; charset=utf-8'],
128
132
  /* Code coloured in the chat: Prism and the languages it is given, one file; asked for only when code is shown. */
package/web/app.js CHANGED
@@ -8036,6 +8036,14 @@
8036
8036
  const PREVIEW_MAX = 25 * 1024 * 1024;
8037
8037
  const TEXT_MAX = 1024 * 1024;
8038
8038
  const PICTURES = { png: 'image/png', jpg: 'image/jpeg', jpeg: 'image/jpeg', gif: 'image/gif', webp: 'image/webp' };
8039
+ /* Office files (02-11), read in the page: spreadsheets by SheetJS, Word by mammoth (loaded on first use). */
8040
+ const SHEETS = ['xlsx', 'xlsm', 'xls', 'ods'];
8041
+ const SHEET_ROWS = 2000; const SHEET_COLS = 100;
8042
+ const scriptsLoaded = new Map();
8043
+ const loadScript = (url) => {
8044
+ if (!scriptsLoaded.has(url)) scriptsLoaded.set(url, new Promise((ok, ko) => { const t = document.createElement('script'); t.src = url; t.onload = ok; t.onerror = () => { scriptsLoaded.delete(url); ko(new Error('The reader could not be loaded.')); }; document.head.append(t); }));
8045
+ return scriptsLoaded.get(url);
8046
+ };
8039
8047
  const TEXTS = ['txt', 'md', 'markdown', 'csv', 'tsv', 'json', 'log', 'yaml', 'yml', 'toml', 'ini', 'xml', 'html', 'css', 'js', 'mjs', 'ts', 'py', 'sh', 'sql', 'c', 'h', 'go', 'rs', 'java', 'rb', 'php', 'tex', 'eml'];
8040
8048
  const PDF_PAGES = 30;
8041
8049
  /* Beyond this, a Markdown file is shown as its text: formatting it would hold the page. */
@@ -8299,7 +8307,7 @@
8299
8307
  $('preview-body').replaceChildren(box); note('');
8300
8308
  };
8301
8309
  const kind = name.includes('.') ? name.split('.').pop().toLowerCase() : '';
8302
- const known = PICTURES[kind] || kind === 'pdf' || TEXTS.includes(kind);
8310
+ const known = PICTURES[kind] || kind === 'pdf' || TEXTS.includes(kind) || SHEETS.includes(kind) || kind === 'docx';
8303
8311
  if (!known) { cannot(`${size ? `${sizeOf(size)} · ` : ''}This kind of file cannot be shown here.`); return; }
8304
8312
  if (size > (TEXTS.includes(kind) ? TEXT_MAX : PREVIEW_MAX)) { cannot(`${sizeOf(size)} · Too large to be shown here.`); return; }
8305
8313
  note('Loading...');
@@ -8316,6 +8324,41 @@
8316
8324
  const img = document.createElement('img'); img.alt = name; img.src = shownUrl;
8317
8325
  body.append(img); note('');
8318
8326
  offerCopy({ picture: new Blob([bytes], { type: PICTURES[kind] }) });
8327
+ } else if (SHEETS.includes(kind)) {
8328
+ /* A WORKBOOK: each sheet a table, tabs between them; its cells as text, never as markup. */
8329
+ try {
8330
+ await loadScript(`${DEVICE ? '/c/vendor' : '/vendor'}/xlsx.js`);
8331
+ const book = window.XLSX.read(new Uint8Array(bytes), { type: 'array', cellDates: true, dense: true });
8332
+ const tabs = el('div', 'sheet-tabs'); tabs.setAttribute('role', 'tablist');
8333
+ const view = el('div', 'sheet-view');
8334
+ const showSheet = (sheetName) => {
8335
+ for (const b of tabs.children) b.setAttribute('aria-selected', String(b.dataset.sheet === sheetName));
8336
+ const rows = window.XLSX.utils.sheet_to_json(book.Sheets[sheetName], { header: 1, raw: false, defval: '', blankrows: false });
8337
+ const table = el('table', 'sheet-table');
8338
+ const width = Math.min(SHEET_COLS, Math.max(0, ...rows.map((r) => r.length)));
8339
+ const head = el('tr'); head.append(el('th', 'sheet-corner', ''));
8340
+ for (let c = 0; c < width; c++) head.append(el('th', '', window.XLSX.utils.encode_col(c)));
8341
+ const thead = el('thead'); thead.append(head); table.append(thead);
8342
+ const tbody = el('tbody');
8343
+ rows.slice(0, SHEET_ROWS).forEach((r, i) => { const tr = el('tr'); tr.append(el('th', '', String(i + 1))); for (let c = 0; c < width; c++) tr.append(el('td', '', String(r[c] ?? ''))); tbody.append(tr); });
8344
+ table.append(tbody);
8345
+ view.replaceChildren(table);
8346
+ note(rows.length > SHEET_ROWS ? `The first ${SHEET_ROWS} rows of ${rows.length}. Download the file for the rest.` : '');
8347
+ };
8348
+ for (const sheetName of book.SheetNames) { const b = el('button', 'sheet-tab', sheetName); b.type = 'button'; b.dataset.sheet = sheetName; b.setAttribute('role', 'tab'); b.addEventListener('click', () => showSheet(sheetName)); tabs.append(b); }
8349
+ body.append(...(book.SheetNames.length > 1 ? [tabs] : []), view);
8350
+ showSheet(book.SheetNames[0]);
8351
+ } catch { cannot('This spreadsheet could not be read here.'); }
8352
+ } else if (kind === 'docx') {
8353
+ /* A WORD DOCUMENT, as a readable page: in a frame where nothing runs, as a page written by the tool. */
8354
+ try {
8355
+ await loadScript(`${DEVICE ? '/c/vendor' : '/vendor'}/mammoth.js`);
8356
+ const made = await window.mammoth.convertToHtml({ arrayBuffer: bytes });
8357
+ const frame = document.createElement('iframe'); frame.className = 'doc-frame'; frame.setAttribute('sandbox', ''); frame.title = name;
8358
+ const dark = document.documentElement.dataset.theme === 'dark' || (!document.documentElement.dataset.theme && matchMedia('(prefers-color-scheme: dark)').matches);
8359
+ frame.srcdoc = `<!doctype html><meta charset="utf-8"><style>body{font:15px/1.55 system-ui,sans-serif;max-width:46rem;margin:24px auto;padding:0 16px;${dark ? 'background:#131a22;color:#e7edf4' : 'background:#fff;color:#17202b'}}img{max-width:100%}table{border-collapse:collapse}td,th{border:1px solid #8888;padding:4px 8px}a{color:inherit}</style>${made.value}`;
8360
+ body.append(frame); note('Shown as a page: its exact layout is not kept. Download it for the original.');
8361
+ } catch { cannot('This document could not be read here.'); }
8319
8362
  } else if (kind === 'pdf') {
8320
8363
  try {
8321
8364
  const base = DEVICE ? '/c/vendor' : '/vendor';
package/web/style.css CHANGED
@@ -2152,3 +2152,16 @@ body.as-dragging #assets-rows .as-row { touch-action: none; }
2152
2152
  .mascot.asleep .m-z:nth-of-type(3) { animation-delay: 1.9s; font-size: 10px; }
2153
2153
  @keyframes m-zz { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: .9; } 100% { opacity: 0; transform: translate(18px, -42px); } }
2154
2154
  @media (prefers-reduced-motion: reduce) { .mascot *, .mascot { animation: none !important; transition: none !important; } }
2155
+ .preview-cannot .ic { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
2156
+ .preview-cannot-get .ic { stroke-width: 2.2; }
2157
+
2158
+ /* A spreadsheet shown: tabs for its sheets, the grid with its column letters and row numbers. */
2159
+ .sheet-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
2160
+ .sheet-tab { padding: 6px 10px; border-radius: 8px; }
2161
+ .sheet-tab[aria-selected="true"] { border-color: var(--brass); color: var(--ink); font-weight: 600; }
2162
+ .sheet-view { overflow: auto; max-width: 100%; }
2163
+ .sheet-table { border-collapse: collapse; font-size: .85rem; }
2164
+ .sheet-table th, .sheet-table td { border: 1px solid var(--line); padding: 3px 8px; white-space: nowrap; max-width: 28rem; overflow: hidden; text-overflow: ellipsis; text-align: left; }
2165
+ .sheet-table th { position: sticky; background: var(--bar); color: var(--ink2); font-weight: 600; }
2166
+ .sheet-table thead th { top: 0; z-index: 1; } .sheet-table tbody th { left: 0; }
2167
+ .doc-frame { width: 100%; min-height: 70vh; border: 0; border-radius: 8px; background: transparent; }