@tarsis/toolkit 0.4.1 → 0.4.2-beta.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/index.cjs +49 -190
- package/dist/index.js +18 -158
- package/dist/server.cjs +170 -0
- package/dist/server.d.ts +72 -0
- package/dist/server.js +143 -0
- package/dist/{index.css → toolkit.css} +483 -483
- package/package.json +11 -1
package/dist/index.cjs
CHANGED
|
@@ -14,6 +14,7 @@ const react = require('@use-gesture/react');
|
|
|
14
14
|
const html2canvas = require('html2canvas');
|
|
15
15
|
const THREE = require('three');
|
|
16
16
|
const confetti = require('canvas-confetti');
|
|
17
|
+
const server = require('./server.cjs');
|
|
17
18
|
const reactFlipToolkit = require('react-flip-toolkit');
|
|
18
19
|
const tooltip = require('@reach/tooltip');
|
|
19
20
|
const Bowser = require('bowser');
|
|
@@ -669,11 +670,11 @@ const BubblyParticlesButton = () => {
|
|
|
669
670
|
);
|
|
670
671
|
};
|
|
671
672
|
|
|
672
|
-
const root$4k = "
|
|
673
|
-
const button$o = "
|
|
674
|
-
const p = "
|
|
675
|
-
const text$z = "
|
|
676
|
-
const effects = "
|
|
673
|
+
const root$4k = "_root_ayg4k_1";
|
|
674
|
+
const button$o = "_button_ayg4k_13";
|
|
675
|
+
const p = "_p_ayg4k_26";
|
|
676
|
+
const text$z = "_text_ayg4k_26";
|
|
677
|
+
const effects = "_effects_ayg4k_240";
|
|
677
678
|
const styles$4H = {
|
|
678
679
|
root: root$4k,
|
|
679
680
|
button: button$o,
|
|
@@ -1923,148 +1924,6 @@ const styles$4y = {
|
|
|
1923
1924
|
content: content$p
|
|
1924
1925
|
};
|
|
1925
1926
|
|
|
1926
|
-
const move = (source, start, end) => {
|
|
1927
|
-
const item = source[start];
|
|
1928
|
-
const result = source.slice(0);
|
|
1929
|
-
result.splice(start, 1);
|
|
1930
|
-
result.splice(end, 0, item);
|
|
1931
|
-
return result;
|
|
1932
|
-
};
|
|
1933
|
-
|
|
1934
|
-
const times = (fn, size) => Array.from({ length: size }, (_, index) => fn(index));
|
|
1935
|
-
|
|
1936
|
-
const logRank = {
|
|
1937
|
-
silent: 0,
|
|
1938
|
-
error: 1,
|
|
1939
|
-
warn: 2,
|
|
1940
|
-
info: 3,
|
|
1941
|
-
debug: 4
|
|
1942
|
-
};
|
|
1943
|
-
const getEnvLogLevel = () => {
|
|
1944
|
-
if (typeof process === "undefined") return "info";
|
|
1945
|
-
const envLevel = process.env.LOG_LEVEL?.toLowerCase();
|
|
1946
|
-
return envLevel && Object.prototype.hasOwnProperty.call(logRank, envLevel) ? envLevel : "info";
|
|
1947
|
-
};
|
|
1948
|
-
let currentLevel = getEnvLogLevel();
|
|
1949
|
-
const setLogLevel = (level) => {
|
|
1950
|
-
if (Object.prototype.hasOwnProperty.call(logRank, level)) {
|
|
1951
|
-
currentLevel = level;
|
|
1952
|
-
}
|
|
1953
|
-
};
|
|
1954
|
-
const getTimestamp = () => {
|
|
1955
|
-
const now = /* @__PURE__ */ new Date();
|
|
1956
|
-
return now.toTimeString().split(" ")[0] + "." + now.getMilliseconds().toString().padStart(3, "0");
|
|
1957
|
-
};
|
|
1958
|
-
const shouldLog = (level) => {
|
|
1959
|
-
return logRank[level] <= logRank[currentLevel];
|
|
1960
|
-
};
|
|
1961
|
-
let sessionId = null;
|
|
1962
|
-
let requestId = null;
|
|
1963
|
-
const setSessionId = (id) => {
|
|
1964
|
-
sessionId = id;
|
|
1965
|
-
};
|
|
1966
|
-
const setRequestId = (id) => {
|
|
1967
|
-
requestId = id;
|
|
1968
|
-
};
|
|
1969
|
-
const clearSession = () => {
|
|
1970
|
-
sessionId = null;
|
|
1971
|
-
requestId = null;
|
|
1972
|
-
};
|
|
1973
|
-
const getSessionInfo = () => {
|
|
1974
|
-
const parts = [];
|
|
1975
|
-
if (sessionId) parts.push(`session:${sessionId}`);
|
|
1976
|
-
if (requestId) parts.push(`req:${requestId}`);
|
|
1977
|
-
return parts.length > 0 ? `[${parts.join("|")}]` : "";
|
|
1978
|
-
};
|
|
1979
|
-
class BaseLogger {
|
|
1980
|
-
prefix;
|
|
1981
|
-
emoji;
|
|
1982
|
-
constructor(prefix, emoji) {
|
|
1983
|
-
this.prefix = prefix;
|
|
1984
|
-
this.emoji = emoji;
|
|
1985
|
-
}
|
|
1986
|
-
log(level, emoji, msg, fn = console.log, data) {
|
|
1987
|
-
if (shouldLog(level)) {
|
|
1988
|
-
const sessionInfo = getSessionInfo();
|
|
1989
|
-
const logMessage = `[${getTimestamp()}] ${emoji} ${this.prefix ? `[${this.prefix}] ` : ""}${msg}${sessionInfo}`;
|
|
1990
|
-
fn(logMessage);
|
|
1991
|
-
if (data && shouldLog(level)) {
|
|
1992
|
-
console.dir(data, { depth: null });
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
info(msg, data) {
|
|
1997
|
-
this.log("info", this.emoji, msg, console.log, data);
|
|
1998
|
-
}
|
|
1999
|
-
debug(msg, data) {
|
|
2000
|
-
this.log("debug", this.emoji, msg, console.debug, data);
|
|
2001
|
-
}
|
|
2002
|
-
success(msg, data) {
|
|
2003
|
-
this.log("info", "✅", msg, console.log, data);
|
|
2004
|
-
}
|
|
2005
|
-
warn(msg, data) {
|
|
2006
|
-
this.log("warn", "⚠️", msg, console.warn, data);
|
|
2007
|
-
}
|
|
2008
|
-
error(msg, detail) {
|
|
2009
|
-
this.log("error", "❌", msg, console.error, detail);
|
|
2010
|
-
}
|
|
2011
|
-
scope(msg, data) {
|
|
2012
|
-
this.log("debug", "🔹", msg, console.debug, data);
|
|
2013
|
-
}
|
|
2014
|
-
dir(data) {
|
|
2015
|
-
if (shouldLog("debug")) {
|
|
2016
|
-
this.log("debug", "📦", "Object:", console.debug);
|
|
2017
|
-
console.dir(data, { depth: null });
|
|
2018
|
-
}
|
|
2019
|
-
}
|
|
2020
|
-
time(label) {
|
|
2021
|
-
const start = performance.now();
|
|
2022
|
-
return {
|
|
2023
|
-
end: (data) => {
|
|
2024
|
-
const duration = performance.now() - start;
|
|
2025
|
-
this.info(`${label} completed in ${duration.toFixed(2)}ms`, data);
|
|
2026
|
-
}
|
|
2027
|
-
};
|
|
2028
|
-
}
|
|
2029
|
-
}
|
|
2030
|
-
const logger = new BaseLogger("", "ℹ️");
|
|
2031
|
-
const componentLogger = new BaseLogger("Component", "🧩");
|
|
2032
|
-
const hookLogger = new BaseLogger("Hook", "🪝");
|
|
2033
|
-
const animationLogger = new BaseLogger("Animation", "🎬");
|
|
2034
|
-
const eventLogger = new BaseLogger("Event", "⚡");
|
|
2035
|
-
const apiLogger = new BaseLogger("API", "🌐");
|
|
2036
|
-
const storageLogger = new BaseLogger("Storage", "💾");
|
|
2037
|
-
const utilsLogger = new BaseLogger("Utils", "🔧");
|
|
2038
|
-
const getCurrentLogLevel = () => currentLevel;
|
|
2039
|
-
const isDebugEnabled = () => shouldLog("debug");
|
|
2040
|
-
|
|
2041
|
-
const noop = (..._args) => {
|
|
2042
|
-
};
|
|
2043
|
-
|
|
2044
|
-
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
2045
|
-
|
|
2046
|
-
const is = (type) => (x) => Object(x) instanceof type;
|
|
2047
|
-
|
|
2048
|
-
const isNonNullable = (value) => value !== void 0 && value !== null;
|
|
2049
|
-
|
|
2050
|
-
const notReachable = (arg) => {
|
|
2051
|
-
throw new Error(`"${arg}" should never be reached`);
|
|
2052
|
-
};
|
|
2053
|
-
|
|
2054
|
-
const keys = (value) => {
|
|
2055
|
-
const primitiveKeys = Object.keys(
|
|
2056
|
-
value
|
|
2057
|
-
);
|
|
2058
|
-
const symbolKeys = Object.getOwnPropertySymbols(value).filter(
|
|
2059
|
-
(sym) => Object.getOwnPropertyDescriptor(value, sym)?.enumerable
|
|
2060
|
-
);
|
|
2061
|
-
return [...primitiveKeys, ...symbolKeys];
|
|
2062
|
-
};
|
|
2063
|
-
|
|
2064
|
-
const values = (input) => {
|
|
2065
|
-
return keys(input).map((key) => input[key]);
|
|
2066
|
-
};
|
|
2067
|
-
|
|
2068
1927
|
const chain = (...elements) => {
|
|
2069
1928
|
return elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
|
|
2070
1929
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: element }),
|
|
@@ -2074,7 +1933,7 @@ const chain = (...elements) => {
|
|
|
2074
1933
|
|
|
2075
1934
|
const DDDButton = ({
|
|
2076
1935
|
children,
|
|
2077
|
-
onClick = noop,
|
|
1936
|
+
onClick = server.noop,
|
|
2078
1937
|
className = ""
|
|
2079
1938
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2080
1939
|
"button",
|
|
@@ -3822,7 +3681,7 @@ const HeartFoldButton = () => {
|
|
|
3822
3681
|
};
|
|
3823
3682
|
|
|
3824
3683
|
const root$3Y = "_root_fusir_1";
|
|
3825
|
-
const process
|
|
3684
|
+
const process = "_process_fusir_29";
|
|
3826
3685
|
const success$3 = "_success_fusir_34";
|
|
3827
3686
|
const progress$1 = "_progress_fusir_63";
|
|
3828
3687
|
const tick$1 = "_tick_fusir_107";
|
|
@@ -3830,7 +3689,7 @@ const icons = "_icons_fusir_67";
|
|
|
3830
3689
|
const states = "_states_fusir_123";
|
|
3831
3690
|
const styles$4g = {
|
|
3832
3691
|
root: root$3Y,
|
|
3833
|
-
process: process
|
|
3692
|
+
process: process,
|
|
3834
3693
|
success: success$3,
|
|
3835
3694
|
progress: progress$1,
|
|
3836
3695
|
tick: tick$1,
|
|
@@ -4630,9 +4489,9 @@ const NeonButton = ({ className = "", ...rest }) => {
|
|
|
4630
4489
|
return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", ...rest, className: cn(styles$49.root, className), children: "Neon" });
|
|
4631
4490
|
};
|
|
4632
4491
|
|
|
4633
|
-
const root$3R = "
|
|
4634
|
-
const i$1 = "
|
|
4635
|
-
const text$s = "
|
|
4492
|
+
const root$3R = "_root_1w6mm_2";
|
|
4493
|
+
const i$1 = "_i_1w6mm_22";
|
|
4494
|
+
const text$s = "_text_1w6mm_482";
|
|
4636
4495
|
const styles$48 = {
|
|
4637
4496
|
root: root$3R,
|
|
4638
4497
|
i: i$1,
|
|
@@ -5131,7 +4990,7 @@ const styles$41 = {
|
|
|
5131
4990
|
const ProgressButton = ({
|
|
5132
4991
|
children,
|
|
5133
4992
|
className = "",
|
|
5134
|
-
onClick = noop,
|
|
4993
|
+
onClick = server.noop,
|
|
5135
4994
|
...props
|
|
5136
4995
|
}) => {
|
|
5137
4996
|
const [isLoading, setIsLoading] = React.useState(true);
|
|
@@ -6708,7 +6567,7 @@ const styles$3C = {
|
|
|
6708
6567
|
|
|
6709
6568
|
const CardTile = ({
|
|
6710
6569
|
children,
|
|
6711
|
-
onClick = noop,
|
|
6570
|
+
onClick = server.noop,
|
|
6712
6571
|
className = ""
|
|
6713
6572
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6714
6573
|
"button",
|
|
@@ -7145,7 +7004,7 @@ const styles$3s = {
|
|
|
7145
7004
|
|
|
7146
7005
|
const ProductTile = ({
|
|
7147
7006
|
children,
|
|
7148
|
-
onClick = noop,
|
|
7007
|
+
onClick = server.noop,
|
|
7149
7008
|
className = ""
|
|
7150
7009
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7151
7010
|
"button",
|
|
@@ -9638,7 +9497,7 @@ const styles$30 = {
|
|
|
9638
9497
|
root: root$2P
|
|
9639
9498
|
};
|
|
9640
9499
|
|
|
9641
|
-
const SplashCursor = ({ onClick = noop }) => {
|
|
9500
|
+
const SplashCursor = ({ onClick = server.noop }) => {
|
|
9642
9501
|
const ref = React.useRef(null);
|
|
9643
9502
|
const onClickRef = useLiveRef(onClick);
|
|
9644
9503
|
React.useEffect(() => {
|
|
@@ -10529,8 +10388,8 @@ const DockMotionItem = ({
|
|
|
10529
10388
|
const originX = { originX: "center" };
|
|
10530
10389
|
const DockMotion$1 = ({
|
|
10531
10390
|
children,
|
|
10532
|
-
onMouseEnter = noop,
|
|
10533
|
-
onMouseLeave = noop,
|
|
10391
|
+
onMouseEnter = server.noop,
|
|
10392
|
+
onMouseLeave = server.noop,
|
|
10534
10393
|
className = ""
|
|
10535
10394
|
}) => {
|
|
10536
10395
|
const mouseX = framerMotion.useMotionValue(null);
|
|
@@ -11086,7 +10945,7 @@ const styles$2J = {
|
|
|
11086
10945
|
isOpen: isOpen
|
|
11087
10946
|
};
|
|
11088
10947
|
|
|
11089
|
-
const HamburgerX = ({ isOpen, onClick = noop }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10948
|
+
const HamburgerX = ({ isOpen, onClick = server.noop }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11090
10949
|
"button",
|
|
11091
10950
|
{
|
|
11092
10951
|
type: "button",
|
|
@@ -13347,7 +13206,7 @@ const styles$1$ = {
|
|
|
13347
13206
|
|
|
13348
13207
|
const SpinningClickAnimation = ({
|
|
13349
13208
|
children = null,
|
|
13350
|
-
onClick = noop,
|
|
13209
|
+
onClick = server.noop,
|
|
13351
13210
|
className = ""
|
|
13352
13211
|
}) => {
|
|
13353
13212
|
const ref = React.useRef(null);
|
|
@@ -18584,11 +18443,11 @@ const ScrambledText = ({ children, reveal = false }) => {
|
|
|
18584
18443
|
);
|
|
18585
18444
|
};
|
|
18586
18445
|
|
|
18587
|
-
const root$_ = "
|
|
18588
|
-
const line = "
|
|
18589
|
-
const word$1 = "
|
|
18590
|
-
const link = "
|
|
18591
|
-
const letter = "
|
|
18446
|
+
const root$_ = "_root_1td1d_1";
|
|
18447
|
+
const line = "_line_1td1d_9";
|
|
18448
|
+
const word$1 = "_word_1td1d_14";
|
|
18449
|
+
const link = "_link_1td1d_18";
|
|
18450
|
+
const letter = "_letter_1td1d_22";
|
|
18592
18451
|
const styles$13 = {
|
|
18593
18452
|
root: root$_,
|
|
18594
18453
|
line: line,
|
|
@@ -30441,6 +30300,30 @@ const ViewTransitionImageGallery = () => {
|
|
|
30441
30300
|
] });
|
|
30442
30301
|
};
|
|
30443
30302
|
|
|
30303
|
+
exports.BaseLogger = server.BaseLogger;
|
|
30304
|
+
exports.animationLogger = server.animationLogger;
|
|
30305
|
+
exports.apiLogger = server.apiLogger;
|
|
30306
|
+
exports.clearSession = server.clearSession;
|
|
30307
|
+
exports.componentLogger = server.componentLogger;
|
|
30308
|
+
exports.eventLogger = server.eventLogger;
|
|
30309
|
+
exports.getCurrentLogLevel = server.getCurrentLogLevel;
|
|
30310
|
+
exports.hookLogger = server.hookLogger;
|
|
30311
|
+
exports.is = server.is;
|
|
30312
|
+
exports.isDebugEnabled = server.isDebugEnabled;
|
|
30313
|
+
exports.isNonNullable = server.isNonNullable;
|
|
30314
|
+
exports.keys = server.keys;
|
|
30315
|
+
exports.logger = server.logger;
|
|
30316
|
+
exports.move = server.move;
|
|
30317
|
+
exports.noop = server.noop;
|
|
30318
|
+
exports.notReachable = server.notReachable;
|
|
30319
|
+
exports.setLogLevel = server.setLogLevel;
|
|
30320
|
+
exports.setRequestId = server.setRequestId;
|
|
30321
|
+
exports.setSessionId = server.setSessionId;
|
|
30322
|
+
exports.storageLogger = server.storageLogger;
|
|
30323
|
+
exports.times = server.times;
|
|
30324
|
+
exports.utilsLogger = server.utilsLogger;
|
|
30325
|
+
exports.values = server.values;
|
|
30326
|
+
exports.wait = server.wait;
|
|
30444
30327
|
exports.AccentShardCard = AccentShardCard;
|
|
30445
30328
|
exports.AcrobaticPreloader = AcrobaticPreloader;
|
|
30446
30329
|
exports.ActivateButton = ActivateButton;
|
|
@@ -30461,7 +30344,6 @@ exports.AutoMasonryGrid = AutoMasonryGrid;
|
|
|
30461
30344
|
exports.AvatarHover = AvatarHover;
|
|
30462
30345
|
exports.BackgroundCircles = BackgroundCircles;
|
|
30463
30346
|
exports.BackgroundSlider = BackgroundSlider;
|
|
30464
|
-
exports.BaseLogger = BaseLogger;
|
|
30465
30347
|
exports.BlurVignette = BlurVignette;
|
|
30466
30348
|
exports.BlurredBackground = BlurredBackground;
|
|
30467
30349
|
exports.BoldHamburger = BoldHamburger;
|
|
@@ -30760,28 +30642,8 @@ exports.VoiceAnimation = VoiceAnimation;
|
|
|
30760
30642
|
exports.WavyMenu = WavyMenu;
|
|
30761
30643
|
exports.WebGLSmoke = WebGLSmoke;
|
|
30762
30644
|
exports.WeightText = WeightText;
|
|
30763
|
-
exports.animationLogger = animationLogger;
|
|
30764
|
-
exports.apiLogger = apiLogger;
|
|
30765
30645
|
exports.chain = chain;
|
|
30766
|
-
exports.clearSession = clearSession;
|
|
30767
|
-
exports.componentLogger = componentLogger;
|
|
30768
|
-
exports.eventLogger = eventLogger;
|
|
30769
|
-
exports.getCurrentLogLevel = getCurrentLogLevel;
|
|
30770
30646
|
exports.getDockTooltipPosition = getDockTooltipPosition;
|
|
30771
|
-
exports.hookLogger = hookLogger;
|
|
30772
|
-
exports.is = is;
|
|
30773
|
-
exports.isDebugEnabled = isDebugEnabled;
|
|
30774
|
-
exports.isNonNullable = isNonNullable;
|
|
30775
|
-
exports.keys = keys;
|
|
30776
|
-
exports.logger = logger;
|
|
30777
|
-
exports.move = move;
|
|
30778
|
-
exports.noop = noop;
|
|
30779
|
-
exports.notReachable = notReachable;
|
|
30780
|
-
exports.setLogLevel = setLogLevel;
|
|
30781
|
-
exports.setRequestId = setRequestId;
|
|
30782
|
-
exports.setSessionId = setSessionId;
|
|
30783
|
-
exports.storageLogger = storageLogger;
|
|
30784
|
-
exports.times = times;
|
|
30785
30647
|
exports.useAnimatedText = useAnimatedText;
|
|
30786
30648
|
exports.useBowser = useBowser;
|
|
30787
30649
|
exports.useDebounce = useDebounce;
|
|
@@ -30796,6 +30658,3 @@ exports.useRaf = useRaf;
|
|
|
30796
30658
|
exports.useThrottle = useThrottle;
|
|
30797
30659
|
exports.useUniversalLayoutEffect = useUniversalLayoutEffect;
|
|
30798
30660
|
exports.useWindowReady = useWindowReady;
|
|
30799
|
-
exports.utilsLogger = utilsLogger;
|
|
30800
|
-
exports.values = values;
|
|
30801
|
-
exports.wait = wait;
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,8 @@ import { useDrag } from '@use-gesture/react';
|
|
|
10
10
|
import html2canvas from 'html2canvas';
|
|
11
11
|
import * as THREE from 'three';
|
|
12
12
|
import confetti from 'canvas-confetti';
|
|
13
|
+
import { noop } from './server.js';
|
|
14
|
+
export { BaseLogger, animationLogger, apiLogger, clearSession, componentLogger, eventLogger, getCurrentLogLevel, hookLogger, is, isDebugEnabled, isNonNullable, keys, logger, move, notReachable, setLogLevel, setRequestId, setSessionId, storageLogger, times, utilsLogger, values, wait } from './server.js';
|
|
13
15
|
import { Flipper, Flipped } from 'react-flip-toolkit';
|
|
14
16
|
import { Tooltip } from '@reach/tooltip';
|
|
15
17
|
import Bowser from 'bowser';
|
|
@@ -646,11 +648,11 @@ const BubblyParticlesButton = () => {
|
|
|
646
648
|
);
|
|
647
649
|
};
|
|
648
650
|
|
|
649
|
-
const root$4k = "
|
|
650
|
-
const button$o = "
|
|
651
|
-
const p = "
|
|
652
|
-
const text$z = "
|
|
653
|
-
const effects = "
|
|
651
|
+
const root$4k = "_root_ayg4k_1";
|
|
652
|
+
const button$o = "_button_ayg4k_13";
|
|
653
|
+
const p = "_p_ayg4k_26";
|
|
654
|
+
const text$z = "_text_ayg4k_26";
|
|
655
|
+
const effects = "_effects_ayg4k_240";
|
|
654
656
|
const styles$4H = {
|
|
655
657
|
root: root$4k,
|
|
656
658
|
button: button$o,
|
|
@@ -1900,148 +1902,6 @@ const styles$4y = {
|
|
|
1900
1902
|
content: content$p
|
|
1901
1903
|
};
|
|
1902
1904
|
|
|
1903
|
-
const move = (source, start, end) => {
|
|
1904
|
-
const item = source[start];
|
|
1905
|
-
const result = source.slice(0);
|
|
1906
|
-
result.splice(start, 1);
|
|
1907
|
-
result.splice(end, 0, item);
|
|
1908
|
-
return result;
|
|
1909
|
-
};
|
|
1910
|
-
|
|
1911
|
-
const times = (fn, size) => Array.from({ length: size }, (_, index) => fn(index));
|
|
1912
|
-
|
|
1913
|
-
const logRank = {
|
|
1914
|
-
silent: 0,
|
|
1915
|
-
error: 1,
|
|
1916
|
-
warn: 2,
|
|
1917
|
-
info: 3,
|
|
1918
|
-
debug: 4
|
|
1919
|
-
};
|
|
1920
|
-
const getEnvLogLevel = () => {
|
|
1921
|
-
if (typeof process === "undefined") return "info";
|
|
1922
|
-
const envLevel = process.env.LOG_LEVEL?.toLowerCase();
|
|
1923
|
-
return envLevel && Object.prototype.hasOwnProperty.call(logRank, envLevel) ? envLevel : "info";
|
|
1924
|
-
};
|
|
1925
|
-
let currentLevel = getEnvLogLevel();
|
|
1926
|
-
const setLogLevel = (level) => {
|
|
1927
|
-
if (Object.prototype.hasOwnProperty.call(logRank, level)) {
|
|
1928
|
-
currentLevel = level;
|
|
1929
|
-
}
|
|
1930
|
-
};
|
|
1931
|
-
const getTimestamp = () => {
|
|
1932
|
-
const now = /* @__PURE__ */ new Date();
|
|
1933
|
-
return now.toTimeString().split(" ")[0] + "." + now.getMilliseconds().toString().padStart(3, "0");
|
|
1934
|
-
};
|
|
1935
|
-
const shouldLog = (level) => {
|
|
1936
|
-
return logRank[level] <= logRank[currentLevel];
|
|
1937
|
-
};
|
|
1938
|
-
let sessionId = null;
|
|
1939
|
-
let requestId = null;
|
|
1940
|
-
const setSessionId = (id) => {
|
|
1941
|
-
sessionId = id;
|
|
1942
|
-
};
|
|
1943
|
-
const setRequestId = (id) => {
|
|
1944
|
-
requestId = id;
|
|
1945
|
-
};
|
|
1946
|
-
const clearSession = () => {
|
|
1947
|
-
sessionId = null;
|
|
1948
|
-
requestId = null;
|
|
1949
|
-
};
|
|
1950
|
-
const getSessionInfo = () => {
|
|
1951
|
-
const parts = [];
|
|
1952
|
-
if (sessionId) parts.push(`session:${sessionId}`);
|
|
1953
|
-
if (requestId) parts.push(`req:${requestId}`);
|
|
1954
|
-
return parts.length > 0 ? `[${parts.join("|")}]` : "";
|
|
1955
|
-
};
|
|
1956
|
-
class BaseLogger {
|
|
1957
|
-
prefix;
|
|
1958
|
-
emoji;
|
|
1959
|
-
constructor(prefix, emoji) {
|
|
1960
|
-
this.prefix = prefix;
|
|
1961
|
-
this.emoji = emoji;
|
|
1962
|
-
}
|
|
1963
|
-
log(level, emoji, msg, fn = console.log, data) {
|
|
1964
|
-
if (shouldLog(level)) {
|
|
1965
|
-
const sessionInfo = getSessionInfo();
|
|
1966
|
-
const logMessage = `[${getTimestamp()}] ${emoji} ${this.prefix ? `[${this.prefix}] ` : ""}${msg}${sessionInfo}`;
|
|
1967
|
-
fn(logMessage);
|
|
1968
|
-
if (data && shouldLog(level)) {
|
|
1969
|
-
console.dir(data, { depth: null });
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
info(msg, data) {
|
|
1974
|
-
this.log("info", this.emoji, msg, console.log, data);
|
|
1975
|
-
}
|
|
1976
|
-
debug(msg, data) {
|
|
1977
|
-
this.log("debug", this.emoji, msg, console.debug, data);
|
|
1978
|
-
}
|
|
1979
|
-
success(msg, data) {
|
|
1980
|
-
this.log("info", "✅", msg, console.log, data);
|
|
1981
|
-
}
|
|
1982
|
-
warn(msg, data) {
|
|
1983
|
-
this.log("warn", "⚠️", msg, console.warn, data);
|
|
1984
|
-
}
|
|
1985
|
-
error(msg, detail) {
|
|
1986
|
-
this.log("error", "❌", msg, console.error, detail);
|
|
1987
|
-
}
|
|
1988
|
-
scope(msg, data) {
|
|
1989
|
-
this.log("debug", "🔹", msg, console.debug, data);
|
|
1990
|
-
}
|
|
1991
|
-
dir(data) {
|
|
1992
|
-
if (shouldLog("debug")) {
|
|
1993
|
-
this.log("debug", "📦", "Object:", console.debug);
|
|
1994
|
-
console.dir(data, { depth: null });
|
|
1995
|
-
}
|
|
1996
|
-
}
|
|
1997
|
-
time(label) {
|
|
1998
|
-
const start = performance.now();
|
|
1999
|
-
return {
|
|
2000
|
-
end: (data) => {
|
|
2001
|
-
const duration = performance.now() - start;
|
|
2002
|
-
this.info(`${label} completed in ${duration.toFixed(2)}ms`, data);
|
|
2003
|
-
}
|
|
2004
|
-
};
|
|
2005
|
-
}
|
|
2006
|
-
}
|
|
2007
|
-
const logger = new BaseLogger("", "ℹ️");
|
|
2008
|
-
const componentLogger = new BaseLogger("Component", "🧩");
|
|
2009
|
-
const hookLogger = new BaseLogger("Hook", "🪝");
|
|
2010
|
-
const animationLogger = new BaseLogger("Animation", "🎬");
|
|
2011
|
-
const eventLogger = new BaseLogger("Event", "⚡");
|
|
2012
|
-
const apiLogger = new BaseLogger("API", "🌐");
|
|
2013
|
-
const storageLogger = new BaseLogger("Storage", "💾");
|
|
2014
|
-
const utilsLogger = new BaseLogger("Utils", "🔧");
|
|
2015
|
-
const getCurrentLogLevel = () => currentLevel;
|
|
2016
|
-
const isDebugEnabled = () => shouldLog("debug");
|
|
2017
|
-
|
|
2018
|
-
const noop = (..._args) => {
|
|
2019
|
-
};
|
|
2020
|
-
|
|
2021
|
-
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
2022
|
-
|
|
2023
|
-
const is = (type) => (x) => Object(x) instanceof type;
|
|
2024
|
-
|
|
2025
|
-
const isNonNullable = (value) => value !== void 0 && value !== null;
|
|
2026
|
-
|
|
2027
|
-
const notReachable = (arg) => {
|
|
2028
|
-
throw new Error(`"${arg}" should never be reached`);
|
|
2029
|
-
};
|
|
2030
|
-
|
|
2031
|
-
const keys = (value) => {
|
|
2032
|
-
const primitiveKeys = Object.keys(
|
|
2033
|
-
value
|
|
2034
|
-
);
|
|
2035
|
-
const symbolKeys = Object.getOwnPropertySymbols(value).filter(
|
|
2036
|
-
(sym) => Object.getOwnPropertyDescriptor(value, sym)?.enumerable
|
|
2037
|
-
);
|
|
2038
|
-
return [...primitiveKeys, ...symbolKeys];
|
|
2039
|
-
};
|
|
2040
|
-
|
|
2041
|
-
const values = (input) => {
|
|
2042
|
-
return keys(input).map((key) => input[key]);
|
|
2043
|
-
};
|
|
2044
|
-
|
|
2045
1905
|
const chain = (...elements) => {
|
|
2046
1906
|
return elements.map((element, index) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2047
1907
|
/* @__PURE__ */ jsx("span", { children: element }),
|
|
@@ -3799,7 +3659,7 @@ const HeartFoldButton = () => {
|
|
|
3799
3659
|
};
|
|
3800
3660
|
|
|
3801
3661
|
const root$3Y = "_root_fusir_1";
|
|
3802
|
-
const process
|
|
3662
|
+
const process = "_process_fusir_29";
|
|
3803
3663
|
const success$3 = "_success_fusir_34";
|
|
3804
3664
|
const progress$1 = "_progress_fusir_63";
|
|
3805
3665
|
const tick$1 = "_tick_fusir_107";
|
|
@@ -3807,7 +3667,7 @@ const icons = "_icons_fusir_67";
|
|
|
3807
3667
|
const states = "_states_fusir_123";
|
|
3808
3668
|
const styles$4g = {
|
|
3809
3669
|
root: root$3Y,
|
|
3810
|
-
process: process
|
|
3670
|
+
process: process,
|
|
3811
3671
|
success: success$3,
|
|
3812
3672
|
progress: progress$1,
|
|
3813
3673
|
tick: tick$1,
|
|
@@ -4607,9 +4467,9 @@ const NeonButton = ({ className = "", ...rest }) => {
|
|
|
4607
4467
|
return /* @__PURE__ */ jsx("button", { type: "button", ...rest, className: cn(styles$49.root, className), children: "Neon" });
|
|
4608
4468
|
};
|
|
4609
4469
|
|
|
4610
|
-
const root$3R = "
|
|
4611
|
-
const i$1 = "
|
|
4612
|
-
const text$s = "
|
|
4470
|
+
const root$3R = "_root_1w6mm_2";
|
|
4471
|
+
const i$1 = "_i_1w6mm_22";
|
|
4472
|
+
const text$s = "_text_1w6mm_482";
|
|
4613
4473
|
const styles$48 = {
|
|
4614
4474
|
root: root$3R,
|
|
4615
4475
|
i: i$1,
|
|
@@ -18561,11 +18421,11 @@ const ScrambledText = ({ children, reveal = false }) => {
|
|
|
18561
18421
|
);
|
|
18562
18422
|
};
|
|
18563
18423
|
|
|
18564
|
-
const root$_ = "
|
|
18565
|
-
const line = "
|
|
18566
|
-
const word$1 = "
|
|
18567
|
-
const link = "
|
|
18568
|
-
const letter = "
|
|
18424
|
+
const root$_ = "_root_1td1d_1";
|
|
18425
|
+
const line = "_line_1td1d_9";
|
|
18426
|
+
const word$1 = "_word_1td1d_14";
|
|
18427
|
+
const link = "_link_1td1d_18";
|
|
18428
|
+
const letter = "_letter_1td1d_22";
|
|
18569
18429
|
const styles$13 = {
|
|
18570
18430
|
root: root$_,
|
|
18571
18431
|
line: line,
|
|
@@ -30418,4 +30278,4 @@ const ViewTransitionImageGallery = () => {
|
|
|
30418
30278
|
] });
|
|
30419
30279
|
};
|
|
30420
30280
|
|
|
30421
|
-
export { AccentShardCard, AcrobaticPreloader, ActivateButton, AdjoinedFilters, AirplaneAnimation, AlienSkeuomorphicLoaders, AnimatedBlendedCard, AnimatedHeroTitle, AnimatedHoverButton, AnimatedHoverGlowButton, AnimatedIconsNav, AnimatedShareMenu, ApertureVideo, Appearance, AreaLight, AuroraButton, AutoMasonryGrid, AvatarHover, BackgroundCircles, BackgroundSlider,
|
|
30281
|
+
export { AccentShardCard, AcrobaticPreloader, ActivateButton, AdjoinedFilters, AirplaneAnimation, AlienSkeuomorphicLoaders, AnimatedBlendedCard, AnimatedHeroTitle, AnimatedHoverButton, AnimatedHoverGlowButton, AnimatedIconsNav, AnimatedShareMenu, ApertureVideo, Appearance, AreaLight, AuroraButton, AutoMasonryGrid, AvatarHover, BackgroundCircles, BackgroundSlider, BlurVignette, BlurredBackground, BoldHamburger, BorderGradient, BorderLink, BouncyClock, BrandCard, BreakingProgress, BubblyParticlesButton, BulletsCarousel, BurningButton, ButtonHoverFill, ButtonShimmer, ButtonWithDot, CanOfDigits, CaptionCard, CardCarousel, CardDetails, CardGlow, CardMarquee, CardTile, ChaseLoader, Checkbox, ChequeredCard, Chips, ChromaticAberration, CircleDotsLoader, CircleLinesAnimation, CircleLink, CircleParticles, CircleTextHover, ClaymorphicHeart, ClearInput, ClickButtonParticles, ClickSpark, CollapseAnimation, ColorfulButtons, ComingSoonBadge, ComplexGradient, ConfettiButton, ContrastBackgroundText, Counter, CoverFlowGallery, CronRedirectPage, CubeLoader, CurtainRevealMenu, DDDButton, DDDHoverCard, DDDRangeSlider, DailClock, DarkMatterButton, DarkMatterMouseEffect, DaySwitch, DenseGrid, DetachedMenu, DialControl, DialFuturistic, Dock, DockButton, DockHas, DockMotion, DockY, DoubleArrowButton, DoubleArrowCollabButton, DoubleStateButton, DropdownMenu, Duck, DynamicIconButton, DynamicIsland, EchoClickButton, ElasticCards, ElasticCursor, ElectrifiedButton, ElectrifiedButtonGS, EmailInput, EmojiLayer, EndlessLoader, EnlightenedText, EnvelopeTile, Expand, FadeUp, FailedDownloadButton, FeedbackReactions, FigmaLogo, FileIcons, Fingerprint, FlipChips, FloatingLabelInput, FluidGooeyTextBackground, FootprintButton, ForwardArrowLink, FullScreenImageCarousel, Futuristic3DHoverMenu, GalaxyButton, GalleryReverseScroll, GlassIcon, GlassSwitch, GlideImageGallery, GlidingReveal, GlitterCard, GlowButton, GlowSlider, GlowingDropdown, GlowingInput, GlowingShadows, GlowingTabs, GlowingTabs2, GlowingText, GlowingTile, GoHoverButton, GodRaysButton, GooeyButton, GradientBorder, GradientGlowingTile, GrainyGradientText, GravityButton, Grid3DCards, GridAccordion, GridHover, GridViewTransition, HamburgerMusic, HamburgerX, Header, HeartFoldButton, HoldSubmitButton, HoverGlowButton, HoverTile, Hoverable3DCard, ITEMS$1 as ITEMS, Illumination, ImageCard, ImageClipping, IndeterminateCheckboxes, InfiniteLoader, InputFirework, Ios15Button, IosSwitch, JellyText, LandingXYScroll, LayeredComponents, LeaningCards, ListItemHover, LoaderGenerator, LoadingBook, LoadingWave, Lock, LoveGlow, MagicMouseEffect, MagicalText, MagneticButton, MagnifiedNavItems, MetalCircleController, MinimalisticGlassButton, MobileNavBar, MorphingSubmitButton, MotionClock, MotionDigits, MouseMoveGallery, MultiGradientBackground, MultiStageButton, MultipathSvgAnimation, NamedPointer, NavigationMenu, NeonButton, NeonToggleSwitch, NeumorphicAnalogClock, NeumorphicLogo, NeumorphicSlider, NeuromorphicToggle, NewsletterInput, NoisyButton, NotificationBell, OffTrackPreloader, OrbitalSubmitButton, PaintedLink, PaperPlanButton, ParallaxEmoji, ParallaxMenu, PasswordInput, PhotoCard$1 as PhotoCard, PhotoZoom, PianoNav, PieLoader, PinDropdown, PlayPauseButton, PlayPauseMusicButton, PolaroidStack, PositionHover, PredictionButton, ProductTile, ProfileCard, ProgressButton, PsychedelicButton, PulseInLoader, PulseOutLoader, QuickTimeClock, RadialMenu, RadialNavigation, RadioHopping, RadioParticles, RadioRolling, RaysBackground, RealisticSmoke, RegularLink, RepostButton, RevealImageAnimation, RhombusGallery, RingLoader, RotatedCardsCarousel, RoundScaleLoader, RubberButton, RunningButton, SchrodingerFormControls, ScrambledText, ScramblingLetters, ScrollCountdown, ScrollDrivenTextBlowOut, ScrollTextHighlight, ScrollTimeline, ScrollWithLight, Scroller, ScrollingTextReveal, SearchInput, SegmentedControls, SegmentedToggle, ShadowedCardsList, ShadowedClick, ShakingText, ShakyLine, ShapeSelection, ShimmerButton, ShimmeringBorderGradient, ShineAnimation, ShineCard, ShiningText, ShinyButton, SinglePopoverMenu, SkateboardPreloader, SkeuomorphicLikeButton, SlideIn, SlidingButton, SlidingIcon, SlidingImages, SlidingStepper, SmileyPreloader, SmokeTextDisappearance, SmoothScroll, SnowballPreloader, SolarEclipse, SparkleButton, SparklyButton, SpeechToText, SpinningClickAnimation, SplashCursor, SquircleAvatar, SquishButton, StackingCards, StaticSolarEclipse, StickyHeader, StickyList, StretchToggle, StretchyLoader, StrikethroughCheckbox, StrikethroughCheckboxes, StuntPreloader, SubtleBorderAnimation, SuccessLoader, SuccessLoadingButton, TabBarAnimation, TextImageHover, TextMorphing, TextOutline, TextShadow, Texture, ThanosDisappearEffect, ThanosDisappearEffectList, ThreadsLikeButton, ThreeDotsLoader, ThumbsUpButton, Ticker, TicklishButton, TimeCirclesLoader, TippingSwitch, Toasts, ToggleBubble, ToggleClipPath, TooltipRangeSlider, TranslucentBackdrop, TrickButton, TurbulenceFilter, UnderlinedLink, UnderlinedLink2, ViewTransitionAddToCard, ViewTransitionImageGallery, VoiceAnimation, WavyMenu, WebGLSmoke, WeightText, chain, getDockTooltipPosition, noop, useAnimatedText, useBowser, useDebounce, useEffectEvent, useLiveRef, useMatchMedia, useOklch, useOutsideClick, usePrevious, usePreviousRender, useRaf, useThrottle, useUniversalLayoutEffect, useWindowReady };
|