@omerdlw/base-framework 1.0.6 → 2.0.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/atoms/index.js +1 -103
- package/dist/atoms/index.js.map +1 -1
- package/dist/chunk-3BUP64Q6.js +105 -0
- package/dist/chunk-3BUP64Q6.js.map +1 -0
- package/dist/chunk-3MSK4XGK.js +9888 -0
- package/dist/chunk-3MSK4XGK.js.map +1 -0
- package/dist/chunk-4GMQKD6F.js +353 -0
- package/dist/chunk-4GMQKD6F.js.map +1 -0
- package/dist/chunk-65ZB4QTQ.js +888 -0
- package/dist/chunk-65ZB4QTQ.js.map +1 -0
- package/dist/chunk-6SG7V77J.js +577 -0
- package/dist/chunk-6SG7V77J.js.map +1 -0
- package/dist/chunk-7HQMXTNP.js +419 -0
- package/dist/chunk-7HQMXTNP.js.map +1 -0
- package/dist/chunk-7TAVYJ3A.js +371 -0
- package/dist/chunk-7TAVYJ3A.js.map +1 -0
- package/dist/chunk-AQ4BNXA2.js +349 -0
- package/dist/chunk-AQ4BNXA2.js.map +1 -0
- package/dist/chunk-CGHZSSFR.js +2166 -0
- package/dist/chunk-CGHZSSFR.js.map +1 -0
- package/dist/chunk-DGCQWQLZ.js +61 -0
- package/dist/chunk-DGCQWQLZ.js.map +1 -0
- package/dist/chunk-FIMPHODX.js +67 -0
- package/dist/chunk-FIMPHODX.js.map +1 -0
- package/dist/chunk-GF7TUX5I.js +1889 -0
- package/dist/chunk-GF7TUX5I.js.map +1 -0
- package/dist/chunk-JELG4JLT.js +454 -0
- package/dist/chunk-JELG4JLT.js.map +1 -0
- package/dist/chunk-K676GL7Z.js +51 -0
- package/dist/chunk-K676GL7Z.js.map +1 -0
- package/dist/chunk-KKQT46TP.js +26 -0
- package/dist/chunk-KKQT46TP.js.map +1 -0
- package/dist/chunk-QI3ALLIB.js +38 -0
- package/dist/chunk-QI3ALLIB.js.map +1 -0
- package/dist/chunk-QXR55VVS.js +1139 -0
- package/dist/chunk-QXR55VVS.js.map +1 -0
- package/dist/chunk-R2YGFJDJ.js +408 -0
- package/dist/chunk-R2YGFJDJ.js.map +1 -0
- package/dist/chunk-RFZQWLC5.js +27 -0
- package/dist/chunk-RFZQWLC5.js.map +1 -0
- package/dist/chunk-SYAVGTOX.js +521 -0
- package/dist/chunk-SYAVGTOX.js.map +1 -0
- package/dist/chunk-TV3WEF5G.js +784 -0
- package/dist/chunk-TV3WEF5G.js.map +1 -0
- package/dist/chunk-XASQT4CQ.js +280 -0
- package/dist/chunk-XASQT4CQ.js.map +1 -0
- package/dist/error/index.js +5 -682
- package/dist/error/index.js.map +1 -1
- package/dist/error/reporter.d.ts.map +1 -1
- package/dist/error/theme.d.ts +1 -1
- package/dist/error/theme.d.ts.map +1 -1
- package/dist/events.js +1 -7
- package/dist/events.js.map +1 -1
- package/dist/hooks/index.js +1 -358
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-global-event.d.ts +1 -1
- package/dist/index.js +18 -20029
- package/dist/index.js.map +1 -1
- package/dist/kernel/index.js +2 -2035
- package/dist/kernel/index.js.map +1 -1
- package/dist/kernel/types.d.ts +1 -1
- package/dist/modules/ambient/analyze.d.ts +46 -0
- package/dist/modules/ambient/analyze.d.ts.map +1 -0
- package/dist/modules/ambient/constants.d.ts +1 -5
- package/dist/modules/ambient/constants.d.ts.map +1 -1
- package/dist/modules/ambient/context.d.ts.map +1 -1
- package/dist/modules/ambient/dom.d.ts +11 -12
- package/dist/modules/ambient/dom.d.ts.map +1 -1
- package/dist/modules/ambient/extractor.d.ts +10 -10
- package/dist/modules/ambient/extractor.d.ts.map +1 -1
- package/dist/modules/ambient/hooks.d.ts +1 -1
- package/dist/modules/ambient/hooks.d.ts.map +1 -1
- package/dist/modules/ambient/index.d.ts +6 -4
- package/dist/modules/ambient/index.d.ts.map +1 -1
- package/dist/modules/ambient/index.js +7 -762
- package/dist/modules/ambient/index.js.map +1 -1
- package/dist/modules/ambient/module.d.ts +1 -1
- package/dist/modules/ambient/module.d.ts.map +1 -1
- package/dist/modules/ambient/oklab.d.ts +36 -0
- package/dist/modules/ambient/oklab.d.ts.map +1 -0
- package/dist/modules/ambient/pipeline.d.ts +28 -0
- package/dist/modules/ambient/pipeline.d.ts.map +1 -0
- package/dist/modules/ambient/quantize.d.ts +22 -0
- package/dist/modules/ambient/quantize.d.ts.map +1 -0
- package/dist/modules/ambient/server/address.d.ts +8 -0
- package/dist/modules/ambient/server/address.d.ts.map +1 -0
- package/dist/modules/ambient/server/index.d.ts +53 -0
- package/dist/modules/ambient/server/index.d.ts.map +1 -0
- package/dist/modules/ambient/server/index.js +221 -0
- package/dist/modules/ambient/server/index.js.map +1 -0
- package/dist/modules/ambient/settings.d.ts +19 -0
- package/dist/modules/ambient/settings.d.ts.map +1 -0
- package/dist/modules/ambient/types.d.ts +105 -9
- package/dist/modules/ambient/types.d.ts.map +1 -1
- package/dist/modules/ambient/worker/index.d.ts +15 -0
- package/dist/modules/ambient/worker/index.d.ts.map +1 -0
- package/dist/modules/ambient/worker/index.js +114 -0
- package/dist/modules/ambient/worker/index.js.map +1 -0
- package/dist/modules/background/constants.d.ts +2 -2
- package/dist/modules/background/constants.d.ts.map +1 -1
- package/dist/modules/background/hooks.d.ts +1 -1
- package/dist/modules/background/index.js +6 -3078
- package/dist/modules/background/index.js.map +1 -1
- package/dist/modules/background/motion.d.ts +9 -7
- package/dist/modules/background/motion.d.ts.map +1 -1
- package/dist/modules/background/overlay.d.ts +3 -8
- package/dist/modules/background/overlay.d.ts.map +1 -1
- package/dist/modules/background/types.d.ts +16 -2
- package/dist/modules/background/types.d.ts.map +1 -1
- package/dist/modules/context-menu/constants.d.ts +2 -2
- package/dist/modules/context-menu/constants.d.ts.map +1 -1
- package/dist/modules/context-menu/hooks.d.ts +1 -1
- package/dist/modules/context-menu/index.js +10 -1896
- package/dist/modules/context-menu/index.js.map +1 -1
- package/dist/modules/context-menu/motion.d.ts +1 -8
- package/dist/modules/context-menu/motion.d.ts.map +1 -1
- package/dist/modules/context-menu/overlay.d.ts.map +1 -1
- package/dist/modules/context-menu/types.d.ts +16 -2
- package/dist/modules/context-menu/types.d.ts.map +1 -1
- package/dist/modules/controls/constants.d.ts +1 -1
- package/dist/modules/controls/constants.d.ts.map +1 -1
- package/dist/modules/controls/entries.d.ts +1 -1
- package/dist/modules/controls/hooks.d.ts +1 -1
- package/dist/modules/controls/index.js +4 -1110
- package/dist/modules/controls/index.js.map +1 -1
- package/dist/modules/controls/overlay.d.ts +1 -1
- package/dist/modules/controls/types.d.ts +2 -2
- package/dist/modules/dock/cards.d.ts +708 -24
- package/dist/modules/dock/cards.d.ts.map +1 -1
- package/dist/modules/dock/constants.d.ts +2 -2
- package/dist/modules/dock/constants.d.ts.map +1 -1
- package/dist/modules/dock/helpers.d.ts +2 -2
- package/dist/modules/dock/hooks.d.ts +2 -2
- package/dist/modules/dock/index.d.ts +1 -1
- package/dist/modules/dock/index.d.ts.map +1 -1
- package/dist/modules/dock/index.js +9 -12132
- package/dist/modules/dock/index.js.map +1 -1
- package/dist/modules/dock/module.d.ts +1 -1
- package/dist/modules/dock/motion.d.ts +41 -915
- package/dist/modules/dock/motion.d.ts.map +1 -1
- package/dist/modules/dock/overlay.d.ts.map +1 -1
- package/dist/modules/dock/runtime/dock.d.ts +1 -23
- package/dist/modules/dock/runtime/dock.d.ts.map +1 -1
- package/dist/modules/dock/styles.d.ts +4 -4
- package/dist/modules/dock/surface/hooks.d.ts +5 -20
- package/dist/modules/dock/surface/hooks.d.ts.map +1 -1
- package/dist/modules/dock/surface/machine.d.ts +4 -3
- package/dist/modules/dock/surface/machine.d.ts.map +1 -1
- package/dist/modules/dock/surface/stack.d.ts.map +1 -1
- package/dist/modules/dock/types.d.ts +158 -3
- package/dist/modules/dock/types.d.ts.map +1 -1
- package/dist/modules/index.js +16 -17883
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/loading/constants.d.ts +1 -1
- package/dist/modules/loading/constants.d.ts.map +1 -1
- package/dist/modules/loading/context.d.ts +1 -1
- package/dist/modules/loading/hooks.d.ts +1 -1
- package/dist/modules/loading/index.js +5 -1153
- package/dist/modules/loading/index.js.map +1 -1
- package/dist/modules/loading/types.d.ts +2 -2
- package/dist/modules/media/context.d.ts +1 -1
- package/dist/modules/media/index.js +3 -570
- package/dist/modules/media/index.js.map +1 -1
- package/dist/modules/media/types.d.ts +2 -2
- package/dist/modules/modal/constants.d.ts +2 -2
- package/dist/modules/modal/constants.d.ts.map +1 -1
- package/dist/modules/modal/context.d.ts +1 -1
- package/dist/modules/modal/hooks.d.ts +3 -3
- package/dist/modules/modal/index.js +8 -2355
- package/dist/modules/modal/index.js.map +1 -1
- package/dist/modules/modal/motion.d.ts +3 -8
- package/dist/modules/modal/motion.d.ts.map +1 -1
- package/dist/modules/modal/overlay.d.ts.map +1 -1
- package/dist/modules/modal/types.d.ts +21 -0
- package/dist/modules/modal/types.d.ts.map +1 -1
- package/dist/modules/notification/constants.d.ts +2 -2
- package/dist/modules/notification/constants.d.ts.map +1 -1
- package/dist/modules/notification/context.d.ts +1 -1
- package/dist/modules/notification/hooks.d.ts +1 -1
- package/dist/modules/notification/index.js +4 -828
- package/dist/modules/notification/index.js.map +1 -1
- package/dist/modules/notification/motion.d.ts +1 -7
- package/dist/modules/notification/motion.d.ts.map +1 -1
- package/dist/modules/notification/overlay.d.ts.map +1 -1
- package/dist/modules/notification/types.d.ts +9 -1
- package/dist/modules/notification/types.d.ts.map +1 -1
- package/dist/overlay-TZ6L52A5.js +9 -0
- package/dist/overlay-TZ6L52A5.js.map +1 -0
- package/dist/provider.d.ts +1 -1
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +6 -1968
- package/dist/provider.js.map +1 -1
- package/dist/result.js +2 -63
- package/dist/result.js.map +1 -1
- package/dist/theme.d.ts +45 -8
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +3 -41
- package/dist/theme.js.map +1 -1
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +126 -155
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/motion-config.d.ts +44 -0
- package/dist/tokens/motion-config.d.ts.map +1 -0
- package/dist/tokens/motion.d.ts +23 -174
- package/dist/tokens/motion.d.ts.map +1 -1
- package/dist/utils/index.js +4 -82
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/report.d.ts.map +1 -1
- package/docs/README.md +1 -0
- package/docs/architecture-and-rules.md +4 -3
- package/docs/core-engine.md +7 -10
- package/docs/getting-started.md +4 -2
- package/docs/modules/ambient.md +194 -80
- package/docs/modules/background.md +3 -3
- package/docs/modules/context-menu.md +2 -2
- package/docs/modules/dock.md +8 -5
- package/docs/modules/modal.md +2 -2
- package/docs/modules/notification.md +2 -2
- package/docs/theming.md +81 -9
- package/package.json +22 -5
- package/templates/AGENTS.md +1 -1
- package/templates/motion/background.ts +17 -0
- package/templates/motion/context-menu.ts +63 -0
- package/templates/motion/dock.ts +327 -0
- package/templates/motion/modal.ts +79 -0
- package/templates/motion/notification.ts +27 -0
- package/templates/motion/tokens.ts +47 -0
- package/templates/tsconfig.json +7 -0
- package/dist/modules/ambient/color.d.ts +0 -21
- package/dist/modules/ambient/color.d.ts.map +0 -1
package/dist/error/index.js
CHANGED
|
@@ -1,685 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
// src/error/constants.ts
|
|
8
|
-
var ERROR_MESSAGES = Object.freeze({
|
|
9
|
-
GLOBAL_TITLE: "Something went wrong",
|
|
10
|
-
GLOBAL_MSG: "We ran into an unexpected problem. Please try again",
|
|
11
|
-
MODULE_TITLE: "Something went wrong",
|
|
12
|
-
MODULE_MSG: "This part of the app isn't working right now. Please try again",
|
|
13
|
-
COMPONENT_MSG: "This section couldn't be loaded. Please try again",
|
|
14
|
-
FALLBACK_TITLE: "Something went wrong",
|
|
15
|
-
FALLBACK_MSG: "This section couldn't be loaded. Please try again"
|
|
16
|
-
});
|
|
17
|
-
var MAX_CONTEXT = 10;
|
|
18
|
-
var MAX_FINGERPRINTS = 100;
|
|
19
|
-
var DEFAULT_DEDUPE_WINDOW = 6e4;
|
|
20
|
-
var ERROR_LISTENER_CONFIG = Object.freeze({
|
|
21
|
-
maxErrors: 10,
|
|
22
|
-
throttle: 2e3,
|
|
23
|
-
ignored: Object.freeze([
|
|
24
|
-
/ResizeObserver loop/i,
|
|
25
|
-
/Network request failed/i,
|
|
26
|
-
/Loading chunk/i,
|
|
27
|
-
/Unexpected end of input/i,
|
|
28
|
-
/Failed to fetch/i,
|
|
29
|
-
/Script error/i,
|
|
30
|
-
/HTTP\s*404/i
|
|
31
|
-
])
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
// src/error/utils.ts
|
|
35
|
-
var IS_BROWSER = typeof window !== "undefined";
|
|
36
|
-
var HAS_NAVIGATOR = typeof navigator !== "undefined";
|
|
37
|
-
var getRuntimePath = () => typeof window !== "undefined" ? window.location.pathname : null;
|
|
38
|
-
var getUserAgent = () => typeof navigator !== "undefined" ? navigator.userAgent : null;
|
|
39
|
-
function createErrorContext({
|
|
40
|
-
errorInfo,
|
|
41
|
-
name,
|
|
42
|
-
title,
|
|
43
|
-
variant
|
|
44
|
-
}) {
|
|
45
|
-
return {
|
|
46
|
-
componentStack: errorInfo?.componentStack || null,
|
|
47
|
-
route: getRuntimePath(),
|
|
48
|
-
userAgent: getUserAgent(),
|
|
49
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
50
|
-
name: name || title || "ErrorBoundary",
|
|
51
|
-
variant: variant || "default",
|
|
52
|
-
source: "ErrorBoundary"
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function normalizeSampleRate(value) {
|
|
56
|
-
const sampleRate = Number(value);
|
|
57
|
-
return Number.isFinite(sampleRate) ? Math.min(1, Math.max(0, sampleRate)) : 1;
|
|
58
|
-
}
|
|
59
|
-
function normalizeDedupeWindow(value) {
|
|
60
|
-
const dedupeWindow = Number(value);
|
|
61
|
-
return Number.isFinite(dedupeWindow) ? Math.max(0, dedupeWindow) : DEFAULT_DEDUPE_WINDOW;
|
|
62
|
-
}
|
|
63
|
-
function getBrowserEnvironment(route) {
|
|
64
|
-
return {
|
|
65
|
-
route: route || (IS_BROWSER ? window.location.pathname : null),
|
|
66
|
-
userAgent: HAS_NAVIGATOR ? navigator.userAgent : null,
|
|
67
|
-
platform: HAS_NAVIGATOR ? navigator.platform : null,
|
|
68
|
-
language: HAS_NAVIGATOR ? navigator.language : null,
|
|
69
|
-
online: HAS_NAVIGATOR ? navigator.onLine : true,
|
|
70
|
-
url: IS_BROWSER ? window.location.href : null
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function fingerprint(error, context = {}) {
|
|
74
|
-
const stackTop = typeof context.componentStack === "string" ? context.componentStack.split("\n").find(Boolean) || "" : "";
|
|
75
|
-
const errObj = error;
|
|
76
|
-
const errorMessage = (errObj?.message || String(error || "")).slice(0, 100);
|
|
77
|
-
const errorName = errObj?.name || "UnknownError";
|
|
78
|
-
const route = context.route || "";
|
|
79
|
-
return [stackTop, errorMessage, errorName, route].filter(Boolean).join("::");
|
|
80
|
-
}
|
|
81
|
-
function createReport(error, {
|
|
82
|
-
context = {},
|
|
83
|
-
tags = {}
|
|
84
|
-
} = {}) {
|
|
85
|
-
const errObj = error;
|
|
86
|
-
return {
|
|
87
|
-
error: {
|
|
88
|
-
message: errObj?.message || String(error),
|
|
89
|
-
stack: errObj?.stack || null,
|
|
90
|
-
name: errObj?.name || "UnknownError"
|
|
91
|
-
},
|
|
92
|
-
fingerprint: fingerprint(error, context),
|
|
93
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
94
|
-
environment: getBrowserEnvironment(context.route),
|
|
95
|
-
componentStack: context.componentStack || null,
|
|
96
|
-
context,
|
|
97
|
-
tags
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function getErrorMessage(error) {
|
|
101
|
-
if (!error) return "";
|
|
102
|
-
if (typeof error === "string") return error.trim();
|
|
103
|
-
if (error instanceof Error) return error.message.trim();
|
|
104
|
-
const errObj = error;
|
|
105
|
-
return String(errObj?.message || errObj?.toString?.() || error).trim();
|
|
106
|
-
}
|
|
107
|
-
function shouldIgnoreError(error) {
|
|
108
|
-
if (!error) return true;
|
|
109
|
-
const errWithNotFound = error;
|
|
110
|
-
if (typeof errWithNotFound?.isNotFound === "function" && errWithNotFound.isNotFound()) {
|
|
111
|
-
return true;
|
|
112
|
-
}
|
|
113
|
-
const message = getErrorMessage(error);
|
|
114
|
-
return ERROR_LISTENER_CONFIG.ignored.some((pattern) => pattern.test(message));
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// src/error/reporter.ts
|
|
118
|
-
var IS_PRODUCTION = process.env.NODE_ENV === "production";
|
|
119
|
-
var IS_BROWSER2 = typeof window !== "undefined";
|
|
120
|
-
var ErrorReporter = class {
|
|
121
|
-
handlers = [];
|
|
122
|
-
context = {};
|
|
123
|
-
tags = {};
|
|
124
|
-
seen = /* @__PURE__ */ new Set();
|
|
125
|
-
enabled;
|
|
126
|
-
sampleRate;
|
|
127
|
-
beforeSend;
|
|
128
|
-
dedupeWindow;
|
|
129
|
-
constructor(options = {}) {
|
|
130
|
-
this.enabled = options.enabled ?? true;
|
|
131
|
-
this.sampleRate = normalizeSampleRate(options.sampleRate ?? 1);
|
|
132
|
-
this.beforeSend = options.beforeSend || null;
|
|
133
|
-
this.dedupeWindow = normalizeDedupeWindow(
|
|
134
|
-
options.deduplicateWindow ?? DEFAULT_DEDUPE_WINDOW
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
addHandler(handler) {
|
|
138
|
-
if (typeof handler?.handle === "function") {
|
|
139
|
-
this.handlers.push(handler);
|
|
140
|
-
}
|
|
141
|
-
return this;
|
|
142
|
-
}
|
|
143
|
-
removeHandler(name) {
|
|
144
|
-
this.handlers = this.handlers.filter((handler) => handler.name !== name);
|
|
145
|
-
return this;
|
|
146
|
-
}
|
|
147
|
-
setContext(key, value) {
|
|
148
|
-
if (Object.hasOwn(this.context, key) || Object.keys(this.context).length < MAX_CONTEXT) {
|
|
149
|
-
this.context[key] = value;
|
|
150
|
-
}
|
|
151
|
-
return this;
|
|
152
|
-
}
|
|
153
|
-
setTag(key, value) {
|
|
154
|
-
this.tags[key] = String(value);
|
|
155
|
-
return this;
|
|
156
|
-
}
|
|
157
|
-
captureError(error, extraContext = {}) {
|
|
158
|
-
if (!this.enabled || Math.random() > this.sampleRate) return;
|
|
159
|
-
this.ensureDefaultHandlers();
|
|
160
|
-
const context = { ...this.context, ...extraContext };
|
|
161
|
-
let report2 = createReport(error, { context, tags: { ...this.tags } });
|
|
162
|
-
const dedupeKey = report2.fingerprint;
|
|
163
|
-
if (this.seen.has(dedupeKey)) return;
|
|
164
|
-
if (this.seen.size >= MAX_FINGERPRINTS) {
|
|
165
|
-
const first = this.seen.keys().next().value;
|
|
166
|
-
if (first) this.seen.delete(first);
|
|
167
|
-
}
|
|
168
|
-
this.seen.add(dedupeKey);
|
|
169
|
-
setTimeout(() => this.seen.delete(dedupeKey), this.dedupeWindow);
|
|
170
|
-
if (typeof this.beforeSend === "function") {
|
|
171
|
-
try {
|
|
172
|
-
const transformed = this.beforeSend(report2);
|
|
173
|
-
if (!transformed) return;
|
|
174
|
-
report2 = transformed;
|
|
175
|
-
} catch {
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
this.handlers.forEach((handler) => {
|
|
179
|
-
try {
|
|
180
|
-
handler.handle(report2);
|
|
181
|
-
} catch {
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
return report2;
|
|
185
|
-
}
|
|
186
|
-
captureMessage(message, level = "info", context = {}) {
|
|
187
|
-
const error = new Error(message);
|
|
188
|
-
error.name = "Message";
|
|
189
|
-
return this.captureError(error, { ...context, level });
|
|
190
|
-
}
|
|
191
|
-
ensureDefaultHandlers() {
|
|
192
|
-
if (this.handlers.length || !IS_BROWSER2) return;
|
|
193
|
-
this.handlers.push(createConsoleHandler());
|
|
194
|
-
if (window.Sentry) {
|
|
195
|
-
const sentryHandler = createSentryHandler(window.Sentry);
|
|
196
|
-
if (sentryHandler.name === "sentry") {
|
|
197
|
-
this.handlers.push(sentryHandler);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
var instance = null;
|
|
203
|
-
function getErrorReporter(options = {}) {
|
|
204
|
-
if (!instance) {
|
|
205
|
-
instance = new ErrorReporter(options);
|
|
206
|
-
}
|
|
207
|
-
return instance;
|
|
208
|
-
}
|
|
209
|
-
function createConsoleHandler() {
|
|
210
|
-
return {
|
|
211
|
-
name: "console",
|
|
212
|
-
handle(report2) {
|
|
213
|
-
if (IS_PRODUCTION) return;
|
|
214
|
-
console.error("[ErrorReporter]", {
|
|
215
|
-
error: report2.error.message,
|
|
216
|
-
fingerprint: report2.fingerprint,
|
|
217
|
-
route: report2.environment.route
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
function createSentryHandler(Sentry) {
|
|
223
|
-
const sentryObj = Sentry;
|
|
224
|
-
if (!sentryObj || typeof sentryObj.captureException !== "function" || typeof sentryObj.withScope !== "function") {
|
|
225
|
-
return createConsoleHandler();
|
|
226
|
-
}
|
|
227
|
-
return {
|
|
228
|
-
name: "sentry",
|
|
229
|
-
handle(report2) {
|
|
230
|
-
sentryObj.withScope((scope) => {
|
|
231
|
-
if (report2.fingerprint) scope.setFingerprint([report2.fingerprint]);
|
|
232
|
-
if (report2.user) scope.setUser(report2.user);
|
|
233
|
-
if (report2.tags && typeof report2.tags === "object") {
|
|
234
|
-
Object.entries(report2.tags).forEach(
|
|
235
|
-
([key, value]) => scope.setTag(key, String(value))
|
|
236
|
-
);
|
|
237
|
-
}
|
|
238
|
-
if (report2.environment)
|
|
239
|
-
scope.setContext("environment", report2.environment);
|
|
240
|
-
if (report2.context) scope.setContext("custom", report2.context);
|
|
241
|
-
if (report2.componentStack)
|
|
242
|
-
scope.setExtra("componentStack", report2.componentStack);
|
|
243
|
-
const error = new Error(report2.error.message);
|
|
244
|
-
error.name = report2.error.name || "Error";
|
|
245
|
-
error.stack = report2.error.stack || void 0;
|
|
246
|
-
sentryObj.captureException(error);
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
// src/utils/report.ts
|
|
253
|
-
var sink = null;
|
|
254
|
-
function report(scope, error, level = "error") {
|
|
255
|
-
if (sink) {
|
|
256
|
-
try {
|
|
257
|
-
sink(scope, error, level);
|
|
258
|
-
return;
|
|
259
|
-
} catch {
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
if (process.env.NODE_ENV === "production" && typeof window !== "undefined") {
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
console[level](`[${scope}]`, error);
|
|
266
|
-
}
|
|
267
|
-
function setReportSink(next) {
|
|
268
|
-
sink = next;
|
|
269
|
-
return () => {
|
|
270
|
-
if (sink === next) sink = null;
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
// src/events.ts
|
|
275
|
-
var EVENT_TYPES = Object.freeze({
|
|
276
|
-
API_UNAUTHORIZED: "API_UNAUTHORIZED",
|
|
277
|
-
STATE_CHANGE: "STATE_CHANGE",
|
|
278
|
-
API_ERROR: "API_ERROR",
|
|
279
|
-
APP_ERROR: "APP_ERROR"
|
|
280
|
-
});
|
|
281
|
-
var EventEmitter = class {
|
|
282
|
-
events = /* @__PURE__ */ new Map();
|
|
283
|
-
debounceTimers = /* @__PURE__ */ new Map();
|
|
284
|
-
subscribe(event, callback) {
|
|
285
|
-
if (typeof event !== "string" || !event || typeof callback !== "function") {
|
|
286
|
-
return () => {
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
const listeners = this.events.get(event) || /* @__PURE__ */ new Set();
|
|
290
|
-
listeners.add(callback);
|
|
291
|
-
this.events.set(event, listeners);
|
|
292
|
-
return () => {
|
|
293
|
-
listeners.delete(callback);
|
|
294
|
-
if (listeners.size === 0) this.events.delete(event);
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
emit(event, payload) {
|
|
298
|
-
const listeners = this.events.get(event);
|
|
299
|
-
if (!listeners || listeners.size === 0) return;
|
|
300
|
-
const snapshot = Array.from(listeners);
|
|
301
|
-
for (const callback of snapshot) {
|
|
302
|
-
try {
|
|
303
|
-
callback(payload);
|
|
304
|
-
} catch (error) {
|
|
305
|
-
report(`Event listener (${String(event)})`, error);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
emitDebounced(event, payload, waitMs = 100) {
|
|
310
|
-
const existing = this.debounceTimers.get(event);
|
|
311
|
-
if (existing) clearTimeout(existing);
|
|
312
|
-
const timer = setTimeout(() => {
|
|
313
|
-
this.debounceTimers.delete(event);
|
|
314
|
-
this.emit(event, payload);
|
|
315
|
-
}, waitMs);
|
|
316
|
-
this.debounceTimers.set(event, timer);
|
|
317
|
-
}
|
|
318
|
-
cancelDebounced(event) {
|
|
319
|
-
if (event) {
|
|
320
|
-
const timer = this.debounceTimers.get(event);
|
|
321
|
-
if (timer) {
|
|
322
|
-
clearTimeout(timer);
|
|
323
|
-
this.debounceTimers.delete(event);
|
|
324
|
-
}
|
|
325
|
-
} else {
|
|
326
|
-
for (const timer of this.debounceTimers.values()) {
|
|
327
|
-
clearTimeout(timer);
|
|
328
|
-
}
|
|
329
|
-
this.debounceTimers.clear();
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
unsubscribeAll(event) {
|
|
333
|
-
this.cancelDebounced(event);
|
|
334
|
-
if (event) this.events.delete(event);
|
|
335
|
-
else this.events.clear();
|
|
336
|
-
}
|
|
337
|
-
hasListeners(event) {
|
|
338
|
-
return Boolean(this.events.get(event)?.size);
|
|
339
|
-
}
|
|
340
|
-
getListenerCount(event) {
|
|
341
|
-
return this.events.get(event)?.size || 0;
|
|
342
|
-
}
|
|
343
|
-
getAllEvents() {
|
|
344
|
-
return [...this.events.keys()];
|
|
345
|
-
}
|
|
346
|
-
};
|
|
347
|
-
var GLOBAL_EVENTS_KEY = /* @__PURE__ */ Symbol.for("__base_framework_global_events__");
|
|
348
|
-
var _global = globalThis;
|
|
349
|
-
var globalEvents = _global[GLOBAL_EVENTS_KEY] ?? (_global[GLOBAL_EVENTS_KEY] = new EventEmitter());
|
|
350
|
-
function Icon({
|
|
351
|
-
className = "center",
|
|
352
|
-
color,
|
|
353
|
-
icon,
|
|
354
|
-
onClick,
|
|
355
|
-
size = 20,
|
|
356
|
-
style,
|
|
357
|
-
...props
|
|
358
|
-
}) {
|
|
359
|
-
return /* @__PURE__ */ jsx(
|
|
360
|
-
Icon$1,
|
|
361
|
-
{
|
|
362
|
-
className,
|
|
363
|
-
height: size,
|
|
364
|
-
icon,
|
|
365
|
-
onClick,
|
|
366
|
-
style: { color, ...style },
|
|
367
|
-
width: size,
|
|
368
|
-
...props
|
|
369
|
-
}
|
|
370
|
-
);
|
|
371
|
-
}
|
|
372
|
-
Icon.displayName = "Icon";
|
|
373
|
-
function Button({
|
|
374
|
-
ref,
|
|
375
|
-
children,
|
|
376
|
-
className,
|
|
377
|
-
disabled = false,
|
|
378
|
-
loading = false,
|
|
379
|
-
type = "button",
|
|
380
|
-
...props
|
|
381
|
-
}) {
|
|
382
|
-
return /* @__PURE__ */ jsx(
|
|
383
|
-
"button",
|
|
384
|
-
{
|
|
385
|
-
ref,
|
|
386
|
-
type,
|
|
387
|
-
disabled: disabled || loading,
|
|
388
|
-
"aria-busy": loading ? true : void 0,
|
|
389
|
-
className,
|
|
390
|
-
...props,
|
|
391
|
-
children
|
|
392
|
-
}
|
|
393
|
-
);
|
|
394
|
-
}
|
|
395
|
-
Button.displayName = "Button";
|
|
396
|
-
function getOrCreateGlobalContext(name, defaultValue) {
|
|
397
|
-
const sym = /* @__PURE__ */ Symbol.for(`@omerdlw/base-framework/context/${name}`);
|
|
398
|
-
const store = globalThis;
|
|
399
|
-
if (!store[sym]) {
|
|
400
|
-
store[sym] = createContext(defaultValue);
|
|
401
|
-
}
|
|
402
|
-
return store[sym];
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
// src/utils/user-message.ts
|
|
406
|
-
var USER_MESSAGES = Object.freeze({
|
|
407
|
-
generic: "Something went wrong. Please try again",
|
|
408
|
-
network: "You appear to be offline. Check your connection and try again",
|
|
409
|
-
timeout: "That took too long. Please try again",
|
|
410
|
-
unauthorized: "Your session has expired. Please sign in again",
|
|
411
|
-
forbidden: "You don't have permission to do that",
|
|
412
|
-
notFound: "We couldn't find what you were looking for",
|
|
413
|
-
rateLimited: "Too many attempts. Please wait a moment and try again",
|
|
414
|
-
server: "We're having trouble on our end. Please try again in a moment"
|
|
415
|
-
});
|
|
416
|
-
var UserError = class extends Error {
|
|
417
|
-
status;
|
|
418
|
-
constructor(message, status) {
|
|
419
|
-
super(message);
|
|
420
|
-
this.name = "UserError";
|
|
421
|
-
this.status = status;
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
var NETWORK_FAILURE = /failed to fetch|network|load failed|fetch failed/i;
|
|
425
|
-
function readField(source, field, type) {
|
|
426
|
-
const value = source?.[field];
|
|
427
|
-
return typeof value === type ? value : void 0;
|
|
428
|
-
}
|
|
429
|
-
function readPayloadMessage(error) {
|
|
430
|
-
const payload = error?.payload;
|
|
431
|
-
const message = readField(payload, "error", "string")?.trim();
|
|
432
|
-
return message || void 0;
|
|
433
|
-
}
|
|
434
|
-
function toUserMessage(error, { codes, fallback = USER_MESSAGES.generic } = {}) {
|
|
435
|
-
if (typeof error === "string") return error.trim() || fallback;
|
|
436
|
-
if (!error || typeof error !== "object") return fallback;
|
|
437
|
-
if (error instanceof UserError) {
|
|
438
|
-
if (error.status === 401) return USER_MESSAGES.unauthorized;
|
|
439
|
-
return error.message || fallback;
|
|
440
|
-
}
|
|
441
|
-
if (error.name === "AbortError") return fallback;
|
|
442
|
-
const code = readField(error, "code", "string");
|
|
443
|
-
if (code && codes?.[code]) return codes[code];
|
|
444
|
-
const status = readField(error, "status", "number");
|
|
445
|
-
if (status === 401) return USER_MESSAGES.unauthorized;
|
|
446
|
-
if (status === 429) return USER_MESSAGES.rateLimited;
|
|
447
|
-
if (status === 408 || status === 504) return USER_MESSAGES.timeout;
|
|
448
|
-
if (status !== void 0 && status >= 500) return USER_MESSAGES.server;
|
|
449
|
-
if (status !== void 0 && status >= 400) {
|
|
450
|
-
const authored = readPayloadMessage(error);
|
|
451
|
-
if (authored) return authored;
|
|
452
|
-
if (status === 403) return USER_MESSAGES.forbidden;
|
|
453
|
-
if (status === 404) return USER_MESSAGES.notFound;
|
|
454
|
-
return fallback;
|
|
455
|
-
}
|
|
456
|
-
const isOffline = typeof navigator !== "undefined" && navigator.onLine === false;
|
|
457
|
-
if (isOffline || NETWORK_FAILURE.test(error.message ?? "") && (error instanceof TypeError || /fetch/i.test(error.name))) {
|
|
458
|
-
return USER_MESSAGES.network;
|
|
459
|
-
}
|
|
460
|
-
return fallback;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
// src/theme.tsx
|
|
464
|
-
function defineThemeSpec(id) {
|
|
465
|
-
return Object.freeze({ id });
|
|
466
|
-
}
|
|
467
|
-
var EMPTY = /* @__PURE__ */ new Map();
|
|
468
|
-
var ThemeContext = getOrCreateGlobalContext("ThemeContext", EMPTY);
|
|
469
|
-
function useTheme(spec) {
|
|
470
|
-
const config = useContext(ThemeContext).get(spec.id);
|
|
471
|
-
if (!config) {
|
|
472
|
-
throw new Error(
|
|
473
|
-
`Theme "${spec.id}" is missing. Ensure its theme configuration is provided to <ThemeProvider themes={[...]}> (e.g. in src/config/ or your theme setup).`
|
|
474
|
-
);
|
|
475
|
-
}
|
|
476
|
-
return {
|
|
477
|
-
slots: config.slots,
|
|
478
|
-
styles: config.styles ?? {}
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
// src/error/theme.ts
|
|
483
|
-
var errorTheme = defineThemeSpec("error");
|
|
484
|
-
var ActionButton = Button;
|
|
485
|
-
function DefaultErrorFallback({
|
|
486
|
-
error,
|
|
487
|
-
message,
|
|
488
|
-
resetError,
|
|
489
|
-
title
|
|
490
|
-
}) {
|
|
491
|
-
const theme = useTheme(errorTheme);
|
|
492
|
-
return /* @__PURE__ */ jsxs("div", { className: theme.slots.screen, children: [
|
|
493
|
-
/* @__PURE__ */ jsx("div", { className: theme.slots.icon, children: /* @__PURE__ */ jsx(Icon, { icon: "solar:danger-circle-bold", size: 30 }) }),
|
|
494
|
-
/* @__PURE__ */ jsx("h3", { className: theme.slots.title, children: message || toUserMessage(error, { fallback: ERROR_MESSAGES.FALLBACK_MSG }) }),
|
|
495
|
-
/* @__PURE__ */ jsx(
|
|
496
|
-
ActionButton,
|
|
497
|
-
{
|
|
498
|
-
className: theme.slots.retryButton,
|
|
499
|
-
onClick: resetError,
|
|
500
|
-
type: "button",
|
|
501
|
-
children: "Try again"
|
|
502
|
-
}
|
|
503
|
-
)
|
|
504
|
-
] });
|
|
505
|
-
}
|
|
506
|
-
var ErrorBoundaryCore = class extends React.Component {
|
|
507
|
-
constructor(props) {
|
|
508
|
-
super(props);
|
|
509
|
-
this.state = {
|
|
510
|
-
error: null,
|
|
511
|
-
errorInfo: null,
|
|
512
|
-
hasError: false,
|
|
513
|
-
lastResetKey: props.resetKey
|
|
514
|
-
};
|
|
515
|
-
}
|
|
516
|
-
static getDerivedStateFromError(error) {
|
|
517
|
-
return { error, hasError: true };
|
|
518
|
-
}
|
|
519
|
-
static getDerivedStateFromProps(props, state) {
|
|
520
|
-
if (props.resetKey !== state.lastResetKey) {
|
|
521
|
-
return {
|
|
522
|
-
error: null,
|
|
523
|
-
errorInfo: null,
|
|
524
|
-
hasError: false,
|
|
525
|
-
lastResetKey: props.resetKey
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
|
-
return null;
|
|
529
|
-
}
|
|
530
|
-
componentDidCatch(error, errorInfo) {
|
|
531
|
-
this.setState({ errorInfo });
|
|
532
|
-
const { message, name, onError, silent, title, variant } = this.props;
|
|
533
|
-
const context = createErrorContext({ errorInfo, name, title, variant });
|
|
534
|
-
try {
|
|
535
|
-
onError?.(error, errorInfo, context);
|
|
536
|
-
} catch (callbackError) {
|
|
537
|
-
report("ErrorBoundary onError callback", callbackError, "warn");
|
|
538
|
-
}
|
|
539
|
-
if (!silent) {
|
|
540
|
-
globalEvents.emit(EVENT_TYPES.APP_ERROR, {
|
|
541
|
-
error,
|
|
542
|
-
errorInfo,
|
|
543
|
-
message: message || toUserMessage(error),
|
|
544
|
-
resetError: this.resetError
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
try {
|
|
548
|
-
const reporter = getErrorReporter();
|
|
549
|
-
reporter?.captureError?.(error, context);
|
|
550
|
-
} catch (reportingError) {
|
|
551
|
-
report("ErrorBoundary reporting", reportingError, "warn");
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
resetError = () => {
|
|
555
|
-
this.setState({
|
|
556
|
-
error: null,
|
|
557
|
-
errorInfo: null,
|
|
558
|
-
hasError: false
|
|
559
|
-
});
|
|
560
|
-
this.props.onReset?.();
|
|
561
|
-
};
|
|
562
|
-
render() {
|
|
563
|
-
if (!this.state.hasError) return this.props.children;
|
|
564
|
-
const { fallback, message, title } = this.props;
|
|
565
|
-
const { error } = this.state;
|
|
566
|
-
if (typeof fallback === "function") {
|
|
567
|
-
return fallback({ error, resetError: this.resetError });
|
|
568
|
-
}
|
|
569
|
-
if (fallback) {
|
|
570
|
-
return fallback;
|
|
571
|
-
}
|
|
572
|
-
return /* @__PURE__ */ jsx(
|
|
573
|
-
DefaultErrorFallback,
|
|
574
|
-
{
|
|
575
|
-
error,
|
|
576
|
-
message,
|
|
577
|
-
resetError: this.resetError,
|
|
578
|
-
title
|
|
579
|
-
}
|
|
580
|
-
);
|
|
581
|
-
}
|
|
582
|
-
};
|
|
583
|
-
function GlobalError({ children, fallback, onReset }) {
|
|
584
|
-
const pathname = usePathname();
|
|
585
|
-
return /* @__PURE__ */ jsx(
|
|
586
|
-
ErrorBoundaryCore,
|
|
587
|
-
{
|
|
588
|
-
fallback,
|
|
589
|
-
message: ERROR_MESSAGES.GLOBAL_MSG,
|
|
590
|
-
onReset,
|
|
591
|
-
resetKey: pathname,
|
|
592
|
-
title: ERROR_MESSAGES.GLOBAL_TITLE,
|
|
593
|
-
variant: "full",
|
|
594
|
-
children
|
|
595
|
-
}
|
|
596
|
-
);
|
|
597
|
-
}
|
|
598
|
-
function ModuleError({
|
|
599
|
-
children,
|
|
600
|
-
fallback,
|
|
601
|
-
name,
|
|
602
|
-
onReset
|
|
603
|
-
}) {
|
|
604
|
-
return /* @__PURE__ */ jsx(
|
|
605
|
-
ErrorBoundaryCore,
|
|
606
|
-
{
|
|
607
|
-
fallback,
|
|
608
|
-
message: ERROR_MESSAGES.MODULE_MSG,
|
|
609
|
-
name,
|
|
610
|
-
onReset,
|
|
611
|
-
title: name ? `${name} Error` : ERROR_MESSAGES.MODULE_TITLE,
|
|
612
|
-
variant: "module",
|
|
613
|
-
children
|
|
614
|
-
}
|
|
615
|
-
);
|
|
616
|
-
}
|
|
617
|
-
function ComponentError({
|
|
618
|
-
children,
|
|
619
|
-
fallback,
|
|
620
|
-
message,
|
|
621
|
-
onReset
|
|
622
|
-
}) {
|
|
623
|
-
return /* @__PURE__ */ jsx(
|
|
624
|
-
ErrorBoundaryCore,
|
|
625
|
-
{
|
|
626
|
-
fallback,
|
|
627
|
-
message: message || ERROR_MESSAGES.COMPONENT_MSG,
|
|
628
|
-
onReset,
|
|
629
|
-
variant: "inline",
|
|
630
|
-
children
|
|
631
|
-
}
|
|
632
|
-
);
|
|
633
|
-
}
|
|
634
|
-
function GlobalErrorListener() {
|
|
635
|
-
const lastError = useRef(0);
|
|
636
|
-
const count = useRef(0);
|
|
637
|
-
const shown = useRef(/* @__PURE__ */ new Set());
|
|
638
|
-
const handleError = useCallback((error, source = "runtime") => {
|
|
639
|
-
if (shouldIgnoreError(error)) return;
|
|
640
|
-
const now = Date.now();
|
|
641
|
-
if (count.current >= ERROR_LISTENER_CONFIG.maxErrors) return;
|
|
642
|
-
if (now - lastError.current < ERROR_LISTENER_CONFIG.throttle) return;
|
|
643
|
-
const message = getErrorMessage(error);
|
|
644
|
-
const key = message || String(error);
|
|
645
|
-
if (shown.current.has(key)) return;
|
|
646
|
-
shown.current.add(key);
|
|
647
|
-
lastError.current = now;
|
|
648
|
-
count.current += 1;
|
|
649
|
-
try {
|
|
650
|
-
const reporter = getErrorReporter();
|
|
651
|
-
reporter?.captureError?.(error, {
|
|
652
|
-
globalListener: true,
|
|
653
|
-
source
|
|
654
|
-
});
|
|
655
|
-
} catch (reportingError) {
|
|
656
|
-
report("GlobalError reporting", reportingError, "warn");
|
|
657
|
-
}
|
|
658
|
-
globalEvents.emit(EVENT_TYPES.APP_ERROR, {
|
|
659
|
-
error,
|
|
660
|
-
message: toUserMessage(error)
|
|
661
|
-
});
|
|
662
|
-
}, []);
|
|
663
|
-
useEffect(() => {
|
|
664
|
-
const removeSink = setReportSink((scope, error, level) => {
|
|
665
|
-
try {
|
|
666
|
-
getErrorReporter().captureError(error, { level, scope });
|
|
667
|
-
} catch {
|
|
668
|
-
}
|
|
669
|
-
});
|
|
670
|
-
const onError = (event) => handleError(event.error || event.message, "window.onerror");
|
|
671
|
-
const onRejection = (event) => handleError(event.reason, "unhandledrejection");
|
|
672
|
-
window.addEventListener("error", onError);
|
|
673
|
-
window.addEventListener("unhandledrejection", onRejection);
|
|
674
|
-
return () => {
|
|
675
|
-
removeSink();
|
|
676
|
-
window.removeEventListener("error", onError);
|
|
677
|
-
window.removeEventListener("unhandledrejection", onRejection);
|
|
678
|
-
};
|
|
679
|
-
}, [handleError]);
|
|
680
|
-
return null;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
export { ComponentError, DEFAULT_DEDUPE_WINDOW, ERROR_LISTENER_CONFIG, ERROR_MESSAGES, ErrorBoundaryCore, GlobalError, GlobalErrorListener, MAX_CONTEXT, MAX_FINGERPRINTS, ModuleError, createConsoleHandler, createErrorContext, createReport, createSentryHandler, errorTheme, fingerprint, getBrowserEnvironment, getErrorMessage, getErrorReporter, getRuntimePath, getUserAgent, normalizeDedupeWindow, normalizeSampleRate, shouldIgnoreError };
|
|
2
|
+
export { ComponentError, DEFAULT_DEDUPE_WINDOW, ERROR_LISTENER_CONFIG, ERROR_MESSAGES, ErrorBoundaryCore, GlobalError, GlobalErrorListener, MAX_CONTEXT, MAX_FINGERPRINTS, ModuleError, createConsoleHandler, createErrorContext, createReport, createSentryHandler, errorTheme, fingerprint, getBrowserEnvironment, getErrorMessage, getErrorReporter, getRuntimePath, getUserAgent, normalizeDedupeWindow, normalizeSampleRate, shouldIgnoreError } from '../chunk-JELG4JLT.js';
|
|
3
|
+
import '../chunk-7TAVYJ3A.js';
|
|
4
|
+
import '../chunk-GF7TUX5I.js';
|
|
5
|
+
import '../chunk-TV3WEF5G.js';
|
|
6
|
+
import '../chunk-3BUP64Q6.js';
|
|
684
7
|
//# sourceMappingURL=index.js.map
|
|
685
8
|
//# sourceMappingURL=index.js.map
|