@vuu-ui/vuu-codemirror 0.7.0-debug → 0.7.1-debug
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/cjs/index.js +29 -1
- package/cjs/index.js.map +4 -4
- package/esm/index.js +29 -1
- package/esm/index.js.map +4 -4
- package/package.json +1 -1
package/esm/index.js
CHANGED
|
@@ -14867,10 +14867,21 @@ var metadataKeys = {
|
|
|
14867
14867
|
// ../vuu-utils/src/DataWindow.ts
|
|
14868
14868
|
var { KEY } = metadataKeys;
|
|
14869
14869
|
|
|
14870
|
+
// ../vuu-utils/src/cookie-utils.ts
|
|
14871
|
+
var getCookieValue = (name) => {
|
|
14872
|
+
var _a2, _b;
|
|
14873
|
+
if (((_a2 = globalThis.document) == null ? void 0 : _a2.cookie) !== void 0) {
|
|
14874
|
+
return (_b = globalThis.document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _b.split("=")[1];
|
|
14875
|
+
}
|
|
14876
|
+
};
|
|
14877
|
+
|
|
14870
14878
|
// ../vuu-utils/src/logging-utils.ts
|
|
14879
|
+
var logLevels = ["error", "warn", "info", "debug"];
|
|
14880
|
+
var isValidLogLevel = (value) => typeof value === "string" && logLevels.includes(value);
|
|
14881
|
+
var DEFAULT_LOG_LEVEL = "error";
|
|
14871
14882
|
var NO_OP = () => void 0;
|
|
14872
14883
|
var DEFAULT_DEBUG_LEVEL = false ? "error" : "info";
|
|
14873
|
-
var { loggingLevel = DEFAULT_DEBUG_LEVEL } =
|
|
14884
|
+
var { loggingLevel = DEFAULT_DEBUG_LEVEL } = getLoggingSettings();
|
|
14874
14885
|
var logger = (category) => {
|
|
14875
14886
|
const debugEnabled2 = loggingLevel === "debug";
|
|
14876
14887
|
const infoEnabled = debugEnabled2 || loggingLevel === "info";
|
|
@@ -14898,6 +14909,23 @@ var logger = (category) => {
|
|
|
14898
14909
|
};
|
|
14899
14910
|
}
|
|
14900
14911
|
};
|
|
14912
|
+
function getLoggingSettings() {
|
|
14913
|
+
if (typeof loggingSettings !== "undefined") {
|
|
14914
|
+
return loggingSettings;
|
|
14915
|
+
} else {
|
|
14916
|
+
return {
|
|
14917
|
+
loggingLevel: getLoggingLevelFromCookie()
|
|
14918
|
+
};
|
|
14919
|
+
}
|
|
14920
|
+
}
|
|
14921
|
+
function getLoggingLevelFromCookie() {
|
|
14922
|
+
const value = getCookieValue("vuu-logging-level");
|
|
14923
|
+
if (isValidLogLevel(value)) {
|
|
14924
|
+
return value;
|
|
14925
|
+
} else {
|
|
14926
|
+
return DEFAULT_LOG_LEVEL;
|
|
14927
|
+
}
|
|
14928
|
+
}
|
|
14901
14929
|
|
|
14902
14930
|
// ../vuu-utils/src/debug-utils.ts
|
|
14903
14931
|
var { debug, debugEnabled } = logger("range-monitor");
|