first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
import { SEQUENCE_PREFIX, DEBUG_RESET_CLASSES } from '../constants.esm.js';
import { mergeDebugSequence } from './mergeDebugSequence.esm.js';
function injectDevTools(document) {
const window = document.defaultView;
if (!window || window.__GRIFFEL_DEVTOOLS__) {
return;
}
const devtools = {
getInfo: element => {
let rootDebugSequenceHash;
let rootResetDebugClassName;
for (const className of element.classList) {
if (className.startsWith(SEQUENCE_PREFIX)) {
rootDebugSequenceHash = className;
}
if (DEBUG_RESET_CLASSES[className]) {
rootResetDebugClassName = className;
}
}
return mergeDebugSequence(rootDebugSequenceHash, rootResetDebugClassName);
}
};
Object.defineProperty(window, '__GRIFFEL_DEVTOOLS__', {
configurable: false,
enumerable: false,
get() {
return devtools;
}
});
}
export { injectDevTools };
//# sourceMappingURL=injectDevTools.esm.js.map