Files
starface-outlook-sync-addin/node_modules/@fluentui/merge-styles/lib-commonjs/shadowConfig.js
T
Stefan Hacker 37ad745546 first commit
2026-04-03 09:38:48 +02:00

31 lines
1.1 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isShadowConfig = exports.makeShadowConfig = exports.DEFAULT_SHADOW_CONFIG = exports.SHADOW_DOM_STYLESHEET_SETTING = exports.GLOBAL_STYLESHEET_KEY = void 0;
exports.GLOBAL_STYLESHEET_KEY = '__global__';
exports.SHADOW_DOM_STYLESHEET_SETTING = '__shadow_dom_stylesheet__';
exports.DEFAULT_SHADOW_CONFIG = {
stylesheetKey: exports.GLOBAL_STYLESHEET_KEY,
inShadow: false,
window: undefined,
__isShadowConfig__: true,
};
var makeShadowConfig = function (stylesheetKey, inShadow, window) {
return {
stylesheetKey: stylesheetKey,
inShadow: inShadow,
window: window,
__isShadowConfig__: true,
};
};
exports.makeShadowConfig = makeShadowConfig;
var isShadowConfig = function (value) {
if (!(value && isRecord(value))) {
return false;
}
return value.__isShadowConfig__ === true;
};
exports.isShadowConfig = isShadowConfig;
function isRecord(value) {
return value !== null && typeof value === 'object' && !Array.isArray(value);
}
//# sourceMappingURL=shadowConfig.js.map