@trap_stevo/filetide 0.0.89 → 0.0.90
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/cjs/FileTide.js +23 -2
- package/package.json +1 -1
package/dist/cjs/FileTide.js
CHANGED
|
@@ -436,7 +436,27 @@ class FileTide {
|
|
|
436
436
|
|
|
437
437
|
// --- FileTide Display Management ---
|
|
438
438
|
|
|
439
|
-
static
|
|
439
|
+
static setOutputHandler(handler = null) {
|
|
440
|
+
FileTide.outputHandler = typeof handler === "function" ? handler : null;
|
|
441
|
+
return FileTide.outputHandler;
|
|
442
|
+
}
|
|
443
|
+
static getOutputHandler() {
|
|
444
|
+
return FileTide.outputHandler;
|
|
445
|
+
}
|
|
446
|
+
static clearOutputHandler() {
|
|
447
|
+
FileTide.outputHandler = null;
|
|
448
|
+
return true;
|
|
449
|
+
}
|
|
450
|
+
static outputGradient(text, colors, metadata = {}) {
|
|
451
|
+
if (typeof FileTide.outputHandler === "function") {
|
|
452
|
+
FileTide.outputHandler({
|
|
453
|
+
text: String(text ?? ""),
|
|
454
|
+
colors,
|
|
455
|
+
type: "gradient",
|
|
456
|
+
metadata: metadata || {}
|
|
457
|
+
});
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
440
460
|
FileTideDebugUtilityManager.outputGradient(text, colors);
|
|
441
461
|
return;
|
|
442
462
|
}
|
|
@@ -584,7 +604,7 @@ function _setupFileEventListeners(userID, client, onTransferProgress, onIncoming
|
|
|
584
604
|
const {
|
|
585
605
|
currentSender
|
|
586
606
|
} = data;
|
|
587
|
-
if (currentSender && currentSender === userID) {
|
|
607
|
+
if (currentSender && currentSender === userID && displayTransferOutput) {
|
|
588
608
|
_FileTide.outputGradient(`[${userID}] Transfer successfully sent to ${data.recipientID}`, significantMessageColors);
|
|
589
609
|
return;
|
|
590
610
|
}
|
|
@@ -872,4 +892,5 @@ function _setupFileEventListeners(userID, client, onTransferProgress, onIncoming
|
|
|
872
892
|
return;
|
|
873
893
|
}
|
|
874
894
|
;
|
|
895
|
+
FileTide.outputHandler = null;
|
|
875
896
|
module.exports = FileTide;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trap_stevo/filetide",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.90",
|
|
4
4
|
"description": "Revolutionizing real-time file transfer with seamless, instant communication across any device. Deliver files instantly, regardless of platform, and experience unparalleled speed and control in managing transfers. Elevate your file-sharing capabilities with a tool designed for precision, efficiency, and effortless connectivity.",
|
|
5
5
|
"main": "dist/cjs/FileTide.js",
|
|
6
6
|
"scripts": {
|