@celljs/ta-share 4.21.0 → 4.23.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/host/index.mjs +5 -0
- package/package.json +4 -4
- package/web/index.js +5 -0
package/host/index.mjs
CHANGED
|
@@ -197,6 +197,11 @@ var TaImageNote;
|
|
|
197
197
|
var TaImageSize;
|
|
198
198
|
(function(TaImageSize2) {
|
|
199
199
|
const JPEG_BYTES = 256 * 1024;
|
|
200
|
+
function type(bytes) {
|
|
201
|
+
const at = (offset, ...values) => values.every((value, index) => bytes[offset + index] === value);
|
|
202
|
+
return at(0, 255, 216, 255) ? "image/jpeg" : at(0, 137, 80, 78, 71) ? "image/png" : at(0, 71, 73, 70, 56) ? "image/gif" : at(0, 82, 73, 70, 70) && at(8, 87, 69, 66, 80) ? "image/webp" : undefined;
|
|
203
|
+
}
|
|
204
|
+
TaImageSize2.type = type;
|
|
200
205
|
function of(base64) {
|
|
201
206
|
var _a, _b, _c;
|
|
202
207
|
let bytes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-share",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.0",
|
|
4
4
|
"description": "A pi package for Ta: share a conversation, a page or a file by a link, public, with a password or for yourself, end to end through the relay; open and import what others share",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@celljs/ta-protocol": "4.
|
|
31
|
-
"@celljs/ta-relay": "4.
|
|
32
|
-
"@celljs/ta-web": "4.
|
|
30
|
+
"@celljs/ta-protocol": "4.23.0",
|
|
31
|
+
"@celljs/ta-relay": "4.23.0",
|
|
32
|
+
"@celljs/ta-web": "4.23.0",
|
|
33
33
|
"@types/react": "^19.3.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
package/web/index.js
CHANGED
|
@@ -602,6 +602,11 @@ var TaImageNote;
|
|
|
602
602
|
var TaImageSize;
|
|
603
603
|
(function(TaImageSize2) {
|
|
604
604
|
const JPEG_BYTES = 256 * 1024;
|
|
605
|
+
function type(bytes) {
|
|
606
|
+
const at = (offset, ...values) => values.every((value, index) => bytes[offset + index] === value);
|
|
607
|
+
return at(0, 255, 216, 255) ? "image/jpeg" : at(0, 137, 80, 78, 71) ? "image/png" : at(0, 71, 73, 70, 56) ? "image/gif" : at(0, 82, 73, 70, 70) && at(8, 87, 69, 66, 80) ? "image/webp" : undefined;
|
|
608
|
+
}
|
|
609
|
+
TaImageSize2.type = type;
|
|
605
610
|
function of(base64) {
|
|
606
611
|
var _a, _b, _c;
|
|
607
612
|
let bytes;
|