Private
Public Access
1
0

feat: Fluent UI Outlook Lite + connections mockup

This commit is contained in:
2026-04-14 18:52:25 +00:00
parent 1199eff6c3
commit dfa4010406
34820 changed files with 1003813 additions and 205 deletions

View File

@@ -0,0 +1,49 @@
'use strict';
var constants = require('../constants.cjs.js');
var store = require('./store.cjs.js');
var utils = require('./utils.cjs.js');
function getAtomicDebugSequenceTree(debugSequenceHash, parentNode) {
const lookupItem = constants.DEFINITION_LOOKUP_TABLE[debugSequenceHash];
if (lookupItem === undefined) {
return undefined;
}
const parentLookupItem = parentNode ? constants.DEFINITION_LOOKUP_TABLE[parentNode.sequenceHash] : undefined;
const debugClassNames = utils.getDebugClassNames(lookupItem, parentLookupItem, parentNode === null || parentNode === void 0 ? void 0 : parentNode.debugClassNames, parentNode === null || parentNode === void 0 ? void 0 : parentNode.children);
const node = {
sequenceHash: debugSequenceHash,
direction: lookupItem[1],
children: [],
debugClassNames
};
const childrenSequences = store.debugData.getChildrenSequences(node.sequenceHash);
childrenSequences.reverse() // first process the overriding children that are merged last
.forEach(sequence => {
const child = getAtomicDebugSequenceTree(sequence, node);
if (child) {
node.children.push(child);
}
});
// if it's leaf (makeStyle node), get css rules
if (!node.children.length) {
node.rules = {};
node.debugClassNames.forEach(({
className
}) => {
const mapData = store.debugData.getSequenceDetails(debugSequenceHash);
if (mapData) {
node.slot = mapData.slotName;
node.sourceURL = mapData.sourceURL;
}
const cssRule = store.debugData.getCSSRules().find(cssRule => {
return cssRule.includes(className);
});
node.rules[className] = cssRule;
});
}
return node;
}
exports.getAtomicDebugSequenceTree = getAtomicDebugSequenceTree;
//# sourceMappingURL=getAtomicDebugSequenceTree.cjs.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getAtomicDebugSequenceTree.cjs.js","sources":["../../../../packages/core/src/devtools/getAtomicDebugSequenceTree.ts"],"sourcesContent":["import { DEFINITION_LOOKUP_TABLE } from '../constants';\nimport type { LookupItem, SequenceHash } from '../types';\nimport { debugData } from './store';\nimport type { DebugSequence } from './types';\nimport { getDebugClassNames } from './utils';\n\nexport function getAtomicDebugSequenceTree(debugSequenceHash: SequenceHash, parentNode?: DebugSequence) {\n const lookupItem: LookupItem | undefined = DEFINITION_LOOKUP_TABLE[debugSequenceHash];\n if (lookupItem === undefined) {\n return undefined;\n }\n\n const parentLookupItem = parentNode ? DEFINITION_LOOKUP_TABLE[parentNode.sequenceHash] : undefined;\n const debugClassNames = getDebugClassNames(\n lookupItem,\n parentLookupItem,\n parentNode?.debugClassNames,\n parentNode?.children,\n );\n\n const node: DebugSequence = {\n sequenceHash: debugSequenceHash,\n direction: lookupItem[1],\n children: [],\n debugClassNames,\n };\n\n const childrenSequences = debugData.getChildrenSequences(node.sequenceHash);\n childrenSequences\n .reverse() // first process the overriding children that are merged last\n .forEach((sequence: SequenceHash) => {\n const child = getAtomicDebugSequenceTree(sequence, node);\n if (child) {\n node.children.push(child);\n }\n });\n\n // if it's leaf (makeStyle node), get css rules\n if (!node.children.length) {\n node.rules = {};\n node.debugClassNames.forEach(({ className }) => {\n const mapData = debugData.getSequenceDetails(debugSequenceHash);\n if (mapData) {\n node.slot = mapData.slotName;\n node.sourceURL = mapData.sourceURL;\n }\n\n const cssRule = debugData.getCSSRules().find(cssRule => {\n return cssRule.includes(className);\n });\n\n node.rules![className] = cssRule!;\n });\n }\n\n return node;\n}\n"],"names":["getAtomicDebugSequenceTree","debugSequenceHash","parentNode","lookupItem","DEFINITION_LOOKUP_TABLE","undefined","parentLookupItem","sequenceHash","debugClassNames","getDebugClassNames","children","node","direction","childrenSequences","debugData","getChildrenSequences","reverse","forEach","sequence","child","push","length","rules","className","mapData","getSequenceDetails","slot","slotName","sourceURL","cssRule","getCSSRules","find","includes"],"mappings":";;;;;;AAMM,SAAUA,0BAA0BA,CAACC,iBAA+B,EAAEC,UAA0B,EAAA;AACpG,EAAA,MAAMC,UAAU,GAA2BC,iCAAuB,CAACH,iBAAiB,CAAC;EACrF,IAAIE,UAAU,KAAKE,SAAS,EAAE;AAC5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,IAAI,GAAGF,OAAO,CAACG,QAAQ;AAC5BhB,QAAAA,IAAI,CAACiB,SAAS,GAAGJ,OAAO,CAACI,SAAS;AACpC,MAAA;MAEA,MAAMC,OAAO,GAAGf,eAAS,CAACgB,WAAW,EAAE,CAACC,IAAI,CAACF,OAAO,IAAG;AACrD,QAAA,OAAOA,OAAO,CAACG,QAAQ,CAACT,SAAS,CAAC;AACpC,MAAA,CAAC,CAAC;AAEFZ,MAAAA,IAAI,CAACW,KAAM,CAACC,SAAS,CAAC,GAAGM,OAAQ;AACnC,IAAA,CAAC,CAAC;AACJ,EAAA;AAEA,EAAA,OAAOlB,IAAI;AACb;;;;"}

View File

@@ -0,0 +1,47 @@
import { DEFINITION_LOOKUP_TABLE } from '../constants.esm.js';
import { debugData } from './store.esm.js';
import { getDebugClassNames } from './utils.esm.js';
function getAtomicDebugSequenceTree(debugSequenceHash, parentNode) {
const lookupItem = DEFINITION_LOOKUP_TABLE[debugSequenceHash];
if (lookupItem === undefined) {
return undefined;
}
const parentLookupItem = parentNode ? DEFINITION_LOOKUP_TABLE[parentNode.sequenceHash] : undefined;
const debugClassNames = getDebugClassNames(lookupItem, parentLookupItem, parentNode === null || parentNode === void 0 ? void 0 : parentNode.debugClassNames, parentNode === null || parentNode === void 0 ? void 0 : parentNode.children);
const node = {
sequenceHash: debugSequenceHash,
direction: lookupItem[1],
children: [],
debugClassNames
};
const childrenSequences = debugData.getChildrenSequences(node.sequenceHash);
childrenSequences.reverse() // first process the overriding children that are merged last
.forEach(sequence => {
const child = getAtomicDebugSequenceTree(sequence, node);
if (child) {
node.children.push(child);
}
});
// if it's leaf (makeStyle node), get css rules
if (!node.children.length) {
node.rules = {};
node.debugClassNames.forEach(({
className
}) => {
const mapData = debugData.getSequenceDetails(debugSequenceHash);
if (mapData) {
node.slot = mapData.slotName;
node.sourceURL = mapData.sourceURL;
}
const cssRule = debugData.getCSSRules().find(cssRule => {
return cssRule.includes(className);
});
node.rules[className] = cssRule;
});
}
return node;
}
export { getAtomicDebugSequenceTree };
//# sourceMappingURL=getAtomicDebugSequenceTree.esm.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getAtomicDebugSequenceTree.esm.js","sources":["../../../../packages/core/src/devtools/getAtomicDebugSequenceTree.ts"],"sourcesContent":["import { DEFINITION_LOOKUP_TABLE } from '../constants';\nimport type { LookupItem, SequenceHash } from '../types';\nimport { debugData } from './store';\nimport type { DebugSequence } from './types';\nimport { getDebugClassNames } from './utils';\n\nexport function getAtomicDebugSequenceTree(debugSequenceHash: SequenceHash, parentNode?: DebugSequence) {\n const lookupItem: LookupItem | undefined = DEFINITION_LOOKUP_TABLE[debugSequenceHash];\n if (lookupItem === undefined) {\n return undefined;\n }\n\n const parentLookupItem = parentNode ? DEFINITION_LOOKUP_TABLE[parentNode.sequenceHash] : undefined;\n const debugClassNames = getDebugClassNames(\n lookupItem,\n parentLookupItem,\n parentNode?.debugClassNames,\n parentNode?.children,\n );\n\n const node: DebugSequence = {\n sequenceHash: debugSequenceHash,\n direction: lookupItem[1],\n children: [],\n debugClassNames,\n };\n\n const childrenSequences = debugData.getChildrenSequences(node.sequenceHash);\n childrenSequences\n .reverse() // first process the overriding children that are merged last\n .forEach((sequence: SequenceHash) => {\n const child = getAtomicDebugSequenceTree(sequence, node);\n if (child) {\n node.children.push(child);\n }\n });\n\n // if it's leaf (makeStyle node), get css rules\n if (!node.children.length) {\n node.rules = {};\n node.debugClassNames.forEach(({ className }) => {\n const mapData = debugData.getSequenceDetails(debugSequenceHash);\n if (mapData) {\n node.slot = mapData.slotName;\n node.sourceURL = mapData.sourceURL;\n }\n\n const cssRule = debugData.getCSSRules().find(cssRule => {\n return cssRule.includes(className);\n });\n\n node.rules![className] = cssRule!;\n });\n }\n\n return node;\n}\n"],"names":["getAtomicDebugSequenceTree","debugSequenceHash","parentNode","lookupItem","DEFINITION_LOOKUP_TABLE","undefined","parentLookupItem","sequenceHash","debugClassNames","getDebugClassNames","children","node","direction","childrenSequences","debugData","getChildrenSequences","reverse","forEach","sequence","child","push","length","rules","className","mapData","getSequenceDetails","slot","slotName","sourceURL","cssRule","getCSSRules","find","includes"],"mappings":";;;;AAMM,SAAUA,0BAA0BA,CAACC,iBAA+B,EAAEC,UAA0B,EAAA;AACpG,EAAA,MAAMC,UAAU,GAA2BC,uBAAuB,CAACH,iBAAiB,CAAC;EACrF,IAAIE,UAAU,KAAKE,SAAS,EAAE;AAC5B,IAAA,OAAOA,SAAS;AAClB,EAAA;EAEA,MAAMC,gBAAgB,GAAGJ,UAAU,GAAGE,uBAAuB,CAACF,UAAU,CAACK,YAAY,CAAC,GAAGF,SAAS;AAClG,EAAA,MAAMG,eAAe,GAAGC,kBAAkB,CACxCN,UAAU,EACVG,gBAAgB,EAChBJ,UAAU,KAAA,IAAA,IAAVA,UAAU,KAAA,MAAA,GAAA,MAAA,GAAVA,UAAU,CAAEM,eAAe,EAC3BN,UAAU,KAAA,IAAA,IAAVA,UAAU,uBAAVA,UAAU,CAAEQ,QAAQ,CACrB;AAED,EAAA,MAAMC,IAAI,GAAkB;AAC1BJ,IAAAA,YAAY,EAAEN,iBAAiB;AAC/BW,IAAAA,SAAS,EAAET,UAAU,CAAC,CAAC,CAAC;AACxBO,IAAAA,QAAQ,EAAE,EAAE;AACZF,IAAAA;GACD;EAED,MAAMK,iBAAiB,GAAGC,SAAS,CAACC,oBAAoB,CAACJ,IAAI,CAACJ,YAAY,CAAC;AAC3EM,EAAAA,iBAAiB,CACdG,OAAO,EAAE;GACTC,OAAO,CAAEC,QAAsB,IAAI;AAClC,IAAA,MAAMC,KAAK,GAAGnB,0BAA0B,CAACkB,QAAQ,EAAEP,IAAI,CAAC;AACxD,IAAA,IAAIQ,KAAK,EAAE;AACTR,MAAAA,IAAI,CAACD,QAAQ,CAACU,IAAI,CAACD,KAAK,CAAC;AAC3B,IAAA;AACF,EAAA,CAAC,CAAC;AAEJ;AACA,EAAA,IAAI,CAACR,IAAI,CAACD,QAAQ,CAACW,MAAM,EAAE;AACzBV,IAAAA,IAAI,CAACW,KAAK,GAAG,EAAE;AACfX,IAAAA,IAAI,CAACH,eAAe,CAACS,OAAO,CAAC,CAAC;AAAEM,MAAAA;AAAS,KAAE,KAAI;AAC7C,MAAA,MAAMC,OAAO,GAAGV,SAAS,CAACW,kBAAkB,CAACxB,iBAAiB,CAAC;AAC/D,MAAA,IAAIuB,OAAO,EAAE;AACXb,QAAAA,IAAI,CAACe,IAAI,GAAGF,OAAO,CAACG,QAAQ;AAC5BhB,QAAAA,IAAI,CAACiB,SAAS,GAAGJ,OAAO,CAACI,SAAS;AACpC,MAAA;MAEA,MAAMC,OAAO,GAAGf,SAAS,CAACgB,WAAW,EAAE,CAACC,IAAI,CAACF,OAAO,IAAG;AACrD,QAAA,OAAOA,OAAO,CAACG,QAAQ,CAACT,SAAS,CAAC;AACpC,MAAA,CAAC,CAAC;AAEFZ,MAAAA,IAAI,CAACW,KAAM,CAACC,SAAS,CAAC,GAAGM,OAAQ;AACnC,IAAA,CAAC,CAAC;AACJ,EAAA;AAEA,EAAA,OAAOlB,IAAI;AACb;;;;"}

View File

@@ -0,0 +1,33 @@
'use strict';
var constants = require('../constants.cjs.js');
var store = require('./store.cjs.js');
function getResetDebugSequence(debugSequenceHash) {
const resetClass = constants.DEBUG_RESET_CLASSES[debugSequenceHash];
if (resetClass === undefined) {
return undefined;
}
const debugClassNames = [{
className: debugSequenceHash
}];
const node = {
sequenceHash: debugSequenceHash,
direction: 'ltr',
children: [],
debugClassNames
};
node.rules = {};
node.slot = 'makeResetStyles()';
const [{
className
}] = node.debugClassNames;
const cssRules = store.debugData.getCSSRules().filter(cssRule => {
return cssRule.includes(`.${className}`);
});
node.rules[className] = cssRules.join('');
return node;
}
exports.getResetDebugSequence = getResetDebugSequence;
//# sourceMappingURL=getResetDebugSequence.cjs.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getResetDebugSequence.cjs.js","sources":["../../../../packages/core/src/devtools/getResetDebugSequence.ts"],"sourcesContent":["import { DEBUG_RESET_CLASSES } from '../constants';\nimport type { SequenceHash } from '../types';\nimport { debugData } from './store';\nimport type { DebugSequence } from './types';\n\nexport function getResetDebugSequence(debugSequenceHash: SequenceHash) {\n const resetClass = DEBUG_RESET_CLASSES[debugSequenceHash];\n if (resetClass === undefined) {\n return undefined;\n }\n\n const debugClassNames = [{ className: debugSequenceHash }];\n\n const node: DebugSequence = {\n sequenceHash: debugSequenceHash,\n direction: 'ltr',\n children: [],\n debugClassNames,\n };\n\n node.rules = {};\n node.slot = 'makeResetStyles()';\n\n const [{ className }] = node.debugClassNames;\n const cssRules = debugData.getCSSRules().filter(cssRule => {\n return cssRule.includes(`.${className}`);\n });\n\n node.rules![className] = cssRules.join('');\n\n return node;\n}\n"],"names":["getResetDebugSequence","debugSequenceHash","resetClass","DEBUG_RESET_CLASSES","undefined","debugClassNames","className","node","sequenceHash","direction","children","rules","slot","cssRules","debugData","getCSSRules","filter","cssRule","includes","join"],"mappings":";;;;;AAKM,SAAUA,qBAAqBA,CAACC,iBAA+B,EAAA;AACnE,EAAA,MAAMC,UAAU,GAAGC,6BAAmB,CAACF,iBAAiB,CAAC;EACzD,IAAIC,UAAU,KAAKE,SAAS,EAAE;AAC5B,IAAA,OAAOA,SAAS;AAClB,EAAA;EAEA,MAAMC,eAAe,GAAG,CAAC;AAAEC,IAAAA,SAAS,EAAEL;AAAiB,GAAE,CAAC;AAE1D,EAAA,MAAMM,IAAI,GAAkB;AAC1BC,IAAAA,YAAY,EAAEP,iBAAiB;AAC/BQ,IAAAA,SAAS,EAAE,KAAK;AAChBC,IAAAA,QAAQ,EAAE,EAAE;AACZL,IAAAA;GACD;AAEDE,EAAAA,IAAI,CAACI,KAAK,GAAG,EAAE;EACfJ,IAAI,CAACK,IAAI,GAAG,mBAAmB;AAE/B,EAAA,MAAM,CAAC;AAAEN,IAAAA;AAAS,GAAE,CAAC,GAAGC,IAAI,CAACF,eAAe;EAC5C,MAAMQ,QAAQ,GAAGC,eAAS,CAACC,WAAW,EAAE,CAACC,MAAM,CAACC,OAAO,IAAG;AACxD,IAAA,OAAOA,OAAO,CAACC,QAAQ,CAAC,CAAA,CAAA,EAAIZ,SAAS,EAAE,CAAC;AAC1C,EAAA,CAAC,CAAC;EAEFC,IAAI,CAACI,KAAM,CAACL,SAAS,CAAC,GAAGO,QAAQ,CAACM,IAAI,CAAC,EAAE,CAAC;AAE1C,EAAA,OAAOZ,IAAI;AACb;;;;"}

View File

@@ -0,0 +1,31 @@
import { DEBUG_RESET_CLASSES } from '../constants.esm.js';
import { debugData } from './store.esm.js';
function getResetDebugSequence(debugSequenceHash) {
const resetClass = DEBUG_RESET_CLASSES[debugSequenceHash];
if (resetClass === undefined) {
return undefined;
}
const debugClassNames = [{
className: debugSequenceHash
}];
const node = {
sequenceHash: debugSequenceHash,
direction: 'ltr',
children: [],
debugClassNames
};
node.rules = {};
node.slot = 'makeResetStyles()';
const [{
className
}] = node.debugClassNames;
const cssRules = debugData.getCSSRules().filter(cssRule => {
return cssRule.includes(`.${className}`);
});
node.rules[className] = cssRules.join('');
return node;
}
export { getResetDebugSequence };
//# sourceMappingURL=getResetDebugSequence.esm.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getResetDebugSequence.esm.js","sources":["../../../../packages/core/src/devtools/getResetDebugSequence.ts"],"sourcesContent":["import { DEBUG_RESET_CLASSES } from '../constants';\nimport type { SequenceHash } from '../types';\nimport { debugData } from './store';\nimport type { DebugSequence } from './types';\n\nexport function getResetDebugSequence(debugSequenceHash: SequenceHash) {\n const resetClass = DEBUG_RESET_CLASSES[debugSequenceHash];\n if (resetClass === undefined) {\n return undefined;\n }\n\n const debugClassNames = [{ className: debugSequenceHash }];\n\n const node: DebugSequence = {\n sequenceHash: debugSequenceHash,\n direction: 'ltr',\n children: [],\n debugClassNames,\n };\n\n node.rules = {};\n node.slot = 'makeResetStyles()';\n\n const [{ className }] = node.debugClassNames;\n const cssRules = debugData.getCSSRules().filter(cssRule => {\n return cssRule.includes(`.${className}`);\n });\n\n node.rules![className] = cssRules.join('');\n\n return node;\n}\n"],"names":["getResetDebugSequence","debugSequenceHash","resetClass","DEBUG_RESET_CLASSES","undefined","debugClassNames","className","node","sequenceHash","direction","children","rules","slot","cssRules","debugData","getCSSRules","filter","cssRule","includes","join"],"mappings":";;;AAKM,SAAUA,qBAAqBA,CAACC,iBAA+B,EAAA;AACnE,EAAA,MAAMC,UAAU,GAAGC,mBAAmB,CAACF,iBAAiB,CAAC;EACzD,IAAIC,UAAU,KAAKE,SAAS,EAAE;AAC5B,IAAA,OAAOA,SAAS;AAClB,EAAA;EAEA,MAAMC,eAAe,GAAG,CAAC;AAAEC,IAAAA,SAAS,EAAEL;AAAiB,GAAE,CAAC;AAE1D,EAAA,MAAMM,IAAI,GAAkB;AAC1BC,IAAAA,YAAY,EAAEP,iBAAiB;AAC/BQ,IAAAA,SAAS,EAAE,KAAK;AAChBC,IAAAA,QAAQ,EAAE,EAAE;AACZL,IAAAA;GACD;AAEDE,EAAAA,IAAI,CAACI,KAAK,GAAG,EAAE;EACfJ,IAAI,CAACK,IAAI,GAAG,mBAAmB;AAE/B,EAAA,MAAM,CAAC;AAAEN,IAAAA;AAAS,GAAE,CAAC,GAAGC,IAAI,CAACF,eAAe;EAC5C,MAAMQ,QAAQ,GAAGC,SAAS,CAACC,WAAW,EAAE,CAACC,MAAM,CAACC,OAAO,IAAG;AACxD,IAAA,OAAOA,OAAO,CAACC,QAAQ,CAAC,CAAA,CAAA,EAAIZ,SAAS,EAAE,CAAC;AAC1C,EAAA,CAAC,CAAC;EAEFC,IAAI,CAACI,KAAM,CAACL,SAAS,CAAC,GAAGO,QAAQ,CAACM,IAAI,CAAC,EAAE,CAAC;AAE1C,EAAA,OAAOZ,IAAI;AACb;;;;"}

View File

@@ -0,0 +1,29 @@
'use strict';
var stackTrace = require('./react-render-tracker/stackTrace.cjs.js');
function getSourceURLfromError() {
const stacks = String(new Error().stack).split('\n');
const userMakeStyleCallLine = findUserMakeStyleCallInStacks(stacks);
if (userMakeStyleCallLine === undefined) {
return undefined;
}
const result = stackTrace.parseStackTraceLine(userMakeStyleCallLine);
return result === null || result === void 0 ? void 0 : result.loc;
}
function findUserMakeStyleCallInStacks(stacks) {
for (let i = stacks.length - 1; i >= 0; --i) {
if (stacks[i].includes('at getSourceURLfromError')) {
// The error stacks look like:
// getSourceURLfromError
// makeStyles/__styles in griffel core
// makeStyles/__styles in griffel react
// user makeStyles call
return stacks[i + 3];
}
}
return undefined;
}
exports.getSourceURLfromError = getSourceURLfromError;
//# sourceMappingURL=getSourceURLfromError.cjs.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getSourceURLfromError.cjs.js","sources":["../../../../packages/core/src/devtools/getSourceURLfromError.ts"],"sourcesContent":["import { parseStackTraceLine } from './react-render-tracker/stackTrace';\n\nexport function getSourceURLfromError() {\n const stacks = String(new Error().stack).split('\\n');\n const userMakeStyleCallLine = findUserMakeStyleCallInStacks(stacks);\n if (userMakeStyleCallLine === undefined) {\n return undefined;\n }\n\n const result = parseStackTraceLine(userMakeStyleCallLine);\n return result?.loc as string | undefined;\n}\n\nfunction findUserMakeStyleCallInStacks(stacks: string[]) {\n for (let i = stacks.length - 1; i >= 0; --i) {\n if (stacks[i].includes('at getSourceURLfromError')) {\n // The error stacks look like:\n // getSourceURLfromError\n // makeStyles/__styles in griffel core\n // makeStyles/__styles in griffel react\n // user makeStyles call\n return stacks[i + 3];\n }\n }\n return undefined;\n}\n"],"names":["getSourceURLfromError","stacks","String","Error","stack","split","userMakeStyleCallLine","findUserMakeStyleCallInStacks","undefined","result","parseStackTraceLine","loc","i","length","includes"],"mappings":";;;;SAEgBA,qBAAqBA,GAAA;AACnC,EAAA,MAAMC,MAAM,GAAGC,MAAM,CAAC,IAAIC,KAAK,EAAE,CAACC,KAAK,CAAC,CAACC,KAAK,CAAC,IAAI,CAAC;AACpD,EAAA,MAAMC,qBAAqB,GAAGC,6BAA6B,CAACN,MAAM,CAAC;EACnE,IAAIK,qBAAqB,KAAKE,SAAS,EAAE;AACvC,IAAA,OAAOA,SAAS;AAClB,EAAA;AAEA,EAAA,MAAMC,MAAM,GAAGC,8BAAmB,CAACJ,qBAAqB,CAAC;AACzD,EAAA,OAAOG,MAAM,KAAA,IAAA,IAANA,MAAM,uBAANA,MAAM,CAAEE,GAAyB;AAC1C;AAEA,SAASJ,6BAA6BA,CAACN,MAAgB,EAAA;AACrD,EAAA,KAAK,IAAIW,CAAC,GAAGX,MAAM,CAACY,MAAM,GAAG,CAAC,EAAED,CAAC,IAAI,CAAC,EAAE,EAAEA,CAAC,EAAE;IAC3C,IAAIX,MAAM,CAACW,CAAC,CAAC,CAACE,QAAQ,CAAC,0BAA0B,CAAC,EAAE;AAClD;AACA;AACA;AACA;AACA;AACA,MAAA,OAAOb,MAAM,CAACW,CAAC,GAAG,CAAC,CAAC;AACtB,IAAA;AACF,EAAA;AACA,EAAA,OAAOJ,SAAS;AAClB;;;;"}

View File

@@ -0,0 +1,27 @@
import { parseStackTraceLine } from './react-render-tracker/stackTrace.esm.js';
function getSourceURLfromError() {
const stacks = String(new Error().stack).split('\n');
const userMakeStyleCallLine = findUserMakeStyleCallInStacks(stacks);
if (userMakeStyleCallLine === undefined) {
return undefined;
}
const result = parseStackTraceLine(userMakeStyleCallLine);
return result === null || result === void 0 ? void 0 : result.loc;
}
function findUserMakeStyleCallInStacks(stacks) {
for (let i = stacks.length - 1; i >= 0; --i) {
if (stacks[i].includes('at getSourceURLfromError')) {
// The error stacks look like:
// getSourceURLfromError
// makeStyles/__styles in griffel core
// makeStyles/__styles in griffel react
// user makeStyles call
return stacks[i + 3];
}
}
return undefined;
}
export { getSourceURLfromError };
//# sourceMappingURL=getSourceURLfromError.esm.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getSourceURLfromError.esm.js","sources":["../../../../packages/core/src/devtools/getSourceURLfromError.ts"],"sourcesContent":["import { parseStackTraceLine } from './react-render-tracker/stackTrace';\n\nexport function getSourceURLfromError() {\n const stacks = String(new Error().stack).split('\\n');\n const userMakeStyleCallLine = findUserMakeStyleCallInStacks(stacks);\n if (userMakeStyleCallLine === undefined) {\n return undefined;\n }\n\n const result = parseStackTraceLine(userMakeStyleCallLine);\n return result?.loc as string | undefined;\n}\n\nfunction findUserMakeStyleCallInStacks(stacks: string[]) {\n for (let i = stacks.length - 1; i >= 0; --i) {\n if (stacks[i].includes('at getSourceURLfromError')) {\n // The error stacks look like:\n // getSourceURLfromError\n // makeStyles/__styles in griffel core\n // makeStyles/__styles in griffel react\n // user makeStyles call\n return stacks[i + 3];\n }\n }\n return undefined;\n}\n"],"names":["getSourceURLfromError","stacks","String","Error","stack","split","userMakeStyleCallLine","findUserMakeStyleCallInStacks","undefined","result","parseStackTraceLine","loc","i","length","includes"],"mappings":";;SAEgBA,qBAAqBA,GAAA;AACnC,EAAA,MAAMC,MAAM,GAAGC,MAAM,CAAC,IAAIC,KAAK,EAAE,CAACC,KAAK,CAAC,CAACC,KAAK,CAAC,IAAI,CAAC;AACpD,EAAA,MAAMC,qBAAqB,GAAGC,6BAA6B,CAACN,MAAM,CAAC;EACnE,IAAIK,qBAAqB,KAAKE,SAAS,EAAE;AACvC,IAAA,OAAOA,SAAS;AAClB,EAAA;AAEA,EAAA,MAAMC,MAAM,GAAGC,mBAAmB,CAACJ,qBAAqB,CAAC;AACzD,EAAA,OAAOG,MAAM,KAAA,IAAA,IAANA,MAAM,uBAANA,MAAM,CAAEE,GAAyB;AAC1C;AAEA,SAASJ,6BAA6BA,CAACN,MAAgB,EAAA;AACrD,EAAA,KAAK,IAAIW,CAAC,GAAGX,MAAM,CAACY,MAAM,GAAG,CAAC,EAAED,CAAC,IAAI,CAAC,EAAE,EAAEA,CAAC,EAAE;IAC3C,IAAIX,MAAM,CAACW,CAAC,CAAC,CAACE,QAAQ,CAAC,0BAA0B,CAAC,EAAE;AAClD;AACA;AACA;AACA;AACA;AACA,MAAA,OAAOb,MAAM,CAACW,CAAC,GAAG,CAAC,CAAC;AACtB,IAAA;AACF,EAAA;AACA,EAAA,OAAOJ,SAAS;AAClB;;;;"}

View File

@@ -0,0 +1,36 @@
'use strict';
var constants = require('../constants.cjs.js');
var mergeDebugSequence = require('./mergeDebugSequence.cjs.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(constants.SEQUENCE_PREFIX)) {
rootDebugSequenceHash = className;
}
if (constants.DEBUG_RESET_CLASSES[className]) {
rootResetDebugClassName = className;
}
}
return mergeDebugSequence.mergeDebugSequence(rootDebugSequenceHash, rootResetDebugClassName);
}
};
Object.defineProperty(window, '__GRIFFEL_DEVTOOLS__', {
configurable: false,
enumerable: false,
get() {
return devtools;
}
});
}
exports.injectDevTools = injectDevTools;
//# sourceMappingURL=injectDevTools.cjs.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"injectDevTools.cjs.js","sources":["../../../../packages/core/src/devtools/injectDevTools.ts"],"sourcesContent":["import { SEQUENCE_PREFIX, DEBUG_RESET_CLASSES } from '../constants';\nimport { mergeDebugSequence } from './mergeDebugSequence';\n\nexport function injectDevTools(document: Document) {\n const window = document.defaultView;\n if (!window || window.__GRIFFEL_DEVTOOLS__) {\n return;\n }\n\n const devtools: (typeof window)['__GRIFFEL_DEVTOOLS__'] = {\n getInfo: (element: HTMLElement) => {\n let rootDebugSequenceHash: string | undefined;\n let rootResetDebugClassName: string | undefined;\n\n for (const className of element.classList) {\n if (className.startsWith(SEQUENCE_PREFIX)) {\n rootDebugSequenceHash = className;\n }\n if (DEBUG_RESET_CLASSES[className]) {\n rootResetDebugClassName = className;\n }\n }\n\n return mergeDebugSequence(rootDebugSequenceHash, rootResetDebugClassName);\n },\n };\n\n Object.defineProperty(window, '__GRIFFEL_DEVTOOLS__', {\n configurable: false,\n enumerable: false,\n get() {\n return devtools;\n },\n });\n}\n"],"names":["injectDevTools","document","window","defaultView","__GRIFFEL_DEVTOOLS__","devtools","getInfo","element","rootDebugSequenceHash","rootResetDebugClassName","className","classList","startsWith","SEQUENCE_PREFIX","DEBUG_RESET_CLASSES","mergeDebugSequence","Object","defineProperty","configurable","enumerable","get"],"mappings":";;;;;AAGM,SAAUA,cAAcA,CAACC,QAAkB,EAAA;AAC/C,EAAA,MAAMC,MAAM,GAAGD,QAAQ,CAACE,WAAW;AACnC,EAAA,IAAI,CAACD,MAAM,IAAIA,MAAM,CAACE,oBAAoB,EAAE;AAC1C,IAAA;AACF,EAAA;AAEA,EAAA,MAAMC,QAAQ,GAA4C;IACxDC,OAAO,EAAGC,OAAoB,IAAI;AAChC,MAAA,IAAIC,qBAAyC;AAC7C,MAAA,IAAIC,uBAA2C;AAE/C,MAAA,KAAK,MAAMC,SAAS,IAAIH,OAAO,CAACI,SAAS,EAAE;AACzC,QAAA,IAAID,SAAS,CAACE,UAAU,CAACC,yBAAe,CAAC,EAAE;AACzCL,UAAAA,qBAAqB,GAAGE,SAAS;AACnC,QAAA;AACA,QAAA,IAAII,6BAAmB,CAACJ,SAAS,CAAC,EAAE;AAClCD,UAAAA,uBAAuB,GAAGC,SAAS;AACrC,QAAA;AACF,MAAA;AAEA,MAAA,OAAOK,qCAAkB,CAACP,qBAAqB,EAAEC,uBAAuB,CAAC;AAC3E,IAAA;GACD;AAEDO,EAAAA,MAAM,CAACC,cAAc,CAACf,MAAM,EAAE,sBAAsB,EAAE;AACpDgB,IAAAA,YAAY,EAAE,KAAK;AACnBC,IAAAA,UAAU,EAAE,KAAK;AACjBC,IAAAA,GAAGA,GAAA;AACD,MAAA,OAAOf,QAAQ;AACjB,IAAA;AACD,GAAA,CAAC;AACJ;;;;"}

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"injectDevTools.esm.js","sources":["../../../../packages/core/src/devtools/injectDevTools.ts"],"sourcesContent":["import { SEQUENCE_PREFIX, DEBUG_RESET_CLASSES } from '../constants';\nimport { mergeDebugSequence } from './mergeDebugSequence';\n\nexport function injectDevTools(document: Document) {\n const window = document.defaultView;\n if (!window || window.__GRIFFEL_DEVTOOLS__) {\n return;\n }\n\n const devtools: (typeof window)['__GRIFFEL_DEVTOOLS__'] = {\n getInfo: (element: HTMLElement) => {\n let rootDebugSequenceHash: string | undefined;\n let rootResetDebugClassName: string | undefined;\n\n for (const className of element.classList) {\n if (className.startsWith(SEQUENCE_PREFIX)) {\n rootDebugSequenceHash = className;\n }\n if (DEBUG_RESET_CLASSES[className]) {\n rootResetDebugClassName = className;\n }\n }\n\n return mergeDebugSequence(rootDebugSequenceHash, rootResetDebugClassName);\n },\n };\n\n Object.defineProperty(window, '__GRIFFEL_DEVTOOLS__', {\n configurable: false,\n enumerable: false,\n get() {\n return devtools;\n },\n });\n}\n"],"names":["injectDevTools","document","window","defaultView","__GRIFFEL_DEVTOOLS__","devtools","getInfo","element","rootDebugSequenceHash","rootResetDebugClassName","className","classList","startsWith","SEQUENCE_PREFIX","DEBUG_RESET_CLASSES","mergeDebugSequence","Object","defineProperty","configurable","enumerable","get"],"mappings":";;;AAGM,SAAUA,cAAcA,CAACC,QAAkB,EAAA;AAC/C,EAAA,MAAMC,MAAM,GAAGD,QAAQ,CAACE,WAAW;AACnC,EAAA,IAAI,CAACD,MAAM,IAAIA,MAAM,CAACE,oBAAoB,EAAE;AAC1C,IAAA;AACF,EAAA;AAEA,EAAA,MAAMC,QAAQ,GAA4C;IACxDC,OAAO,EAAGC,OAAoB,IAAI;AAChC,MAAA,IAAIC,qBAAyC;AAC7C,MAAA,IAAIC,uBAA2C;AAE/C,MAAA,KAAK,MAAMC,SAAS,IAAIH,OAAO,CAACI,SAAS,EAAE;AACzC,QAAA,IAAID,SAAS,CAACE,UAAU,CAACC,eAAe,CAAC,EAAE;AACzCL,UAAAA,qBAAqB,GAAGE,SAAS;AACnC,QAAA;AACA,QAAA,IAAII,mBAAmB,CAACJ,SAAS,CAAC,EAAE;AAClCD,UAAAA,uBAAuB,GAAGC,SAAS;AACrC,QAAA;AACF,MAAA;AAEA,MAAA,OAAOK,kBAAkB,CAACP,qBAAqB,EAAEC,uBAAuB,CAAC;AAC3E,IAAA;GACD;AAEDO,EAAAA,MAAM,CAACC,cAAc,CAACf,MAAM,EAAE,sBAAsB,EAAE;AACpDgB,IAAAA,YAAY,EAAE,KAAK;AACnBC,IAAAA,UAAU,EAAE,KAAK;AACjBC,IAAAA,GAAGA,GAAA;AACD,MAAA,OAAOf,QAAQ;AACjB,IAAA;AACD,GAAA,CAAC;AACJ;;;;"}

View File

@@ -0,0 +1,15 @@
'use strict';
const isDevToolsEnabled = /*#__PURE__*/(() => {
var _a;
// Accessing "window.sessionStorage" causes an exception when third party cookies are blocked
// https://stackoverflow.com/questions/30481516/iframe-in-chrome-error-failed-to-read-localstorage-from-window-access-deni
try {
return Boolean(typeof window !== 'undefined' && ((_a = window.sessionStorage) === null || _a === void 0 ? void 0 : _a.getItem('__GRIFFEL_DEVTOOLS__')));
} catch (e) {
return false;
}
})();
exports.isDevToolsEnabled = isDevToolsEnabled;
//# sourceMappingURL=isDevToolsEnabled.cjs.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"isDevToolsEnabled.cjs.js","sources":["../../../../packages/core/src/devtools/isDevToolsEnabled.ts"],"sourcesContent":["export const isDevToolsEnabled: boolean = (() => {\n // Accessing \"window.sessionStorage\" causes an exception when third party cookies are blocked\n // https://stackoverflow.com/questions/30481516/iframe-in-chrome-error-failed-to-read-localstorage-from-window-access-deni\n try {\n return Boolean(typeof window !== 'undefined' && window.sessionStorage?.getItem('__GRIFFEL_DEVTOOLS__'));\n } catch (e) {\n return false;\n }\n})();\n"],"names":["isDevToolsEnabled","Boolean","window","_a","sessionStorage","getItem","e"],"mappings":";;AAAO,MAAMA,iBAAiB,gBAAY,CAAC,MAAK;;AAC9C;AACA;EACA,IAAI;AACF,IAAA,OAAOC,OAAO,CAAC,OAAOC,MAAM,KAAK,WAAW,KAAI,CAAAC,EAAA,GAAAD,MAAM,CAACE,cAAc,0CAAEC,OAAO,CAAC,sBAAsB,CAAC,CAAA,CAAC;EACzG,CAAC,CAAC,OAAOC,CAAC,EAAE;AACV,IAAA,OAAO,KAAK;AACd,EAAA;AACF,CAAC;;;;"}

View File

@@ -0,0 +1,13 @@
const isDevToolsEnabled = /*#__PURE__*/(() => {
var _a;
// Accessing "window.sessionStorage" causes an exception when third party cookies are blocked
// https://stackoverflow.com/questions/30481516/iframe-in-chrome-error-failed-to-read-localstorage-from-window-access-deni
try {
return Boolean(typeof window !== 'undefined' && ((_a = window.sessionStorage) === null || _a === void 0 ? void 0 : _a.getItem('__GRIFFEL_DEVTOOLS__')));
} catch (e) {
return false;
}
})();
export { isDevToolsEnabled };
//# sourceMappingURL=isDevToolsEnabled.esm.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"isDevToolsEnabled.esm.js","sources":["../../../../packages/core/src/devtools/isDevToolsEnabled.ts"],"sourcesContent":["export const isDevToolsEnabled: boolean = (() => {\n // Accessing \"window.sessionStorage\" causes an exception when third party cookies are blocked\n // https://stackoverflow.com/questions/30481516/iframe-in-chrome-error-failed-to-read-localstorage-from-window-access-deni\n try {\n return Boolean(typeof window !== 'undefined' && window.sessionStorage?.getItem('__GRIFFEL_DEVTOOLS__'));\n } catch (e) {\n return false;\n }\n})();\n"],"names":["isDevToolsEnabled","Boolean","window","_a","sessionStorage","getItem","e"],"mappings":"AAAO,MAAMA,iBAAiB,gBAAY,CAAC,MAAK;;AAC9C;AACA;EACA,IAAI;AACF,IAAA,OAAOC,OAAO,CAAC,OAAOC,MAAM,KAAK,WAAW,KAAI,CAAAC,EAAA,GAAAD,MAAM,CAACE,cAAc,0CAAEC,OAAO,CAAC,sBAAsB,CAAC,CAAA,CAAC;EACzG,CAAC,CAAC,OAAOC,CAAC,EAAE;AACV,IAAA,OAAO,KAAK;AACd,EAAA;AACF,CAAC;;;;"}

View File

@@ -0,0 +1,28 @@
'use strict';
var getAtomicDebugSequenceTree = require('./getAtomicDebugSequenceTree.cjs.js');
var getResetDebugSequence = require('./getResetDebugSequence.cjs.js');
function mergeDebugSequence(atomicClases, resetClassName) {
const debugResultRootAtomic = atomicClases ? getAtomicDebugSequenceTree.getAtomicDebugSequenceTree(atomicClases) : undefined;
const debugResultRootReset = resetClassName ? getResetDebugSequence.getResetDebugSequence(resetClassName) : undefined;
if (!debugResultRootAtomic && !debugResultRootReset) {
return undefined;
}
if (!debugResultRootAtomic) {
return debugResultRootReset;
}
if (!debugResultRootReset) {
return debugResultRootAtomic;
}
const debugResultRoot = {
sequenceHash: debugResultRootAtomic.sequenceHash + debugResultRootReset.sequenceHash,
direction: debugResultRootAtomic.direction,
children: [debugResultRootAtomic, debugResultRootReset],
debugClassNames: [...debugResultRootAtomic.debugClassNames, ...debugResultRootReset.debugClassNames]
};
return debugResultRoot;
}
exports.mergeDebugSequence = mergeDebugSequence;
//# sourceMappingURL=mergeDebugSequence.cjs.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mergeDebugSequence.cjs.js","sources":["../../../../packages/core/src/devtools/mergeDebugSequence.ts"],"sourcesContent":["import { getAtomicDebugSequenceTree } from './getAtomicDebugSequenceTree';\nimport { getResetDebugSequence } from './getResetDebugSequence';\nimport type { DebugSequence } from './types';\n\nexport function mergeDebugSequence(\n atomicClases: string | undefined,\n resetClassName: string | undefined,\n): DebugSequence | undefined {\n const debugResultRootAtomic = atomicClases ? getAtomicDebugSequenceTree(atomicClases) : undefined;\n const debugResultRootReset = resetClassName ? getResetDebugSequence(resetClassName) : undefined;\n\n if (!debugResultRootAtomic && !debugResultRootReset) {\n return undefined;\n }\n\n if (!debugResultRootAtomic) {\n return debugResultRootReset;\n }\n\n if (!debugResultRootReset) {\n return debugResultRootAtomic;\n }\n\n const debugResultRoot: DebugSequence = {\n sequenceHash: debugResultRootAtomic.sequenceHash + debugResultRootReset.sequenceHash,\n direction: debugResultRootAtomic.direction,\n children: [debugResultRootAtomic, debugResultRootReset],\n debugClassNames: [...debugResultRootAtomic.debugClassNames, ...debugResultRootReset.debugClassNames],\n };\n\n return debugResultRoot;\n}\n"],"names":["mergeDebugSequence","atomicClases","resetClassName","debugResultRootAtomic","getAtomicDebugSequenceTree","undefined","debugResultRootReset","getResetDebugSequence","debugResultRoot","sequenceHash","direction","children","debugClassNames"],"mappings":";;;;;AAIM,SAAUA,kBAAkBA,CAChCC,YAAgC,EAChCC,cAAkC,EAAA;EAElC,MAAMC,qBAAqB,GAAGF,YAAY,GAAGG,qDAA0B,CAACH,YAAY,CAAC,GAAGI,SAAS;EACjG,MAAMC,oBAAoB,GAAGJ,cAAc,GAAGK,2CAAqB,CAACL,cAAc,CAAC,GAAGG,SAAS;AAE/F,EAAA,IAAI,CAACF,qBAAqB,IAAI,CAACG,oBAAoB,EAAE;AACnD,IAAA,OAAOD,SAAS;AAClB,EAAA;EAEA,IAAI,CAACF,qBAAqB,EAAE;AAC1B,IAAA,OAAOG,oBAAoB;AAC7B,EAAA;EAEA,IAAI,CAACA,oBAAoB,EAAE;AACzB,IAAA,OAAOH,qBAAqB;AAC9B,EAAA;AAEA,EAAA,MAAMK,eAAe,GAAkB;AACrCC,IAAAA,YAAY,EAAEN,qBAAqB,CAACM,YAAY,GAAGH,oBAAoB,CAACG,YAAY;IACpFC,SAAS,EAAEP,qBAAqB,CAACO,SAAS;AAC1CC,IAAAA,QAAQ,EAAE,CAACR,qBAAqB,EAAEG,oBAAoB,CAAC;IACvDM,eAAe,EAAE,CAAC,GAAGT,qBAAqB,CAACS,eAAe,EAAE,GAAGN,oBAAoB,CAACM,eAAe;GACpG;AAED,EAAA,OAAOJ,eAAe;AACxB;;;;"}

View File

@@ -0,0 +1,26 @@
import { getAtomicDebugSequenceTree } from './getAtomicDebugSequenceTree.esm.js';
import { getResetDebugSequence } from './getResetDebugSequence.esm.js';
function mergeDebugSequence(atomicClases, resetClassName) {
const debugResultRootAtomic = atomicClases ? getAtomicDebugSequenceTree(atomicClases) : undefined;
const debugResultRootReset = resetClassName ? getResetDebugSequence(resetClassName) : undefined;
if (!debugResultRootAtomic && !debugResultRootReset) {
return undefined;
}
if (!debugResultRootAtomic) {
return debugResultRootReset;
}
if (!debugResultRootReset) {
return debugResultRootAtomic;
}
const debugResultRoot = {
sequenceHash: debugResultRootAtomic.sequenceHash + debugResultRootReset.sequenceHash,
direction: debugResultRootAtomic.direction,
children: [debugResultRootAtomic, debugResultRootReset],
debugClassNames: [...debugResultRootAtomic.debugClassNames, ...debugResultRootReset.debugClassNames]
};
return debugResultRoot;
}
export { mergeDebugSequence };
//# sourceMappingURL=mergeDebugSequence.esm.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mergeDebugSequence.esm.js","sources":["../../../../packages/core/src/devtools/mergeDebugSequence.ts"],"sourcesContent":["import { getAtomicDebugSequenceTree } from './getAtomicDebugSequenceTree';\nimport { getResetDebugSequence } from './getResetDebugSequence';\nimport type { DebugSequence } from './types';\n\nexport function mergeDebugSequence(\n atomicClases: string | undefined,\n resetClassName: string | undefined,\n): DebugSequence | undefined {\n const debugResultRootAtomic = atomicClases ? getAtomicDebugSequenceTree(atomicClases) : undefined;\n const debugResultRootReset = resetClassName ? getResetDebugSequence(resetClassName) : undefined;\n\n if (!debugResultRootAtomic && !debugResultRootReset) {\n return undefined;\n }\n\n if (!debugResultRootAtomic) {\n return debugResultRootReset;\n }\n\n if (!debugResultRootReset) {\n return debugResultRootAtomic;\n }\n\n const debugResultRoot: DebugSequence = {\n sequenceHash: debugResultRootAtomic.sequenceHash + debugResultRootReset.sequenceHash,\n direction: debugResultRootAtomic.direction,\n children: [debugResultRootAtomic, debugResultRootReset],\n debugClassNames: [...debugResultRootAtomic.debugClassNames, ...debugResultRootReset.debugClassNames],\n };\n\n return debugResultRoot;\n}\n"],"names":["mergeDebugSequence","atomicClases","resetClassName","debugResultRootAtomic","getAtomicDebugSequenceTree","undefined","debugResultRootReset","getResetDebugSequence","debugResultRoot","sequenceHash","direction","children","debugClassNames"],"mappings":";;;AAIM,SAAUA,kBAAkBA,CAChCC,YAAgC,EAChCC,cAAkC,EAAA;EAElC,MAAMC,qBAAqB,GAAGF,YAAY,GAAGG,0BAA0B,CAACH,YAAY,CAAC,GAAGI,SAAS;EACjG,MAAMC,oBAAoB,GAAGJ,cAAc,GAAGK,qBAAqB,CAACL,cAAc,CAAC,GAAGG,SAAS;AAE/F,EAAA,IAAI,CAACF,qBAAqB,IAAI,CAACG,oBAAoB,EAAE;AACnD,IAAA,OAAOD,SAAS;AAClB,EAAA;EAEA,IAAI,CAACF,qBAAqB,EAAE;AAC1B,IAAA,OAAOG,oBAAoB;AAC7B,EAAA;EAEA,IAAI,CAACA,oBAAoB,EAAE;AACzB,IAAA,OAAOH,qBAAqB;AAC9B,EAAA;AAEA,EAAA,MAAMK,eAAe,GAAkB;AACrCC,IAAAA,YAAY,EAAEN,qBAAqB,CAACM,YAAY,GAAGH,oBAAoB,CAACG,YAAY;IACpFC,SAAS,EAAEP,qBAAqB,CAACO,SAAS;AAC1CC,IAAAA,QAAQ,EAAE,CAACR,qBAAqB,EAAEG,oBAAoB,CAAC;IACvDM,eAAe,EAAE,CAAC,GAAGT,qBAAqB,CAACS,eAAe,EAAE,GAAGN,oBAAoB,CAACM,eAAe;GACpG;AAED,EAAA,OAAOJ,eAAe;AACxB;;;;"}

View File

@@ -0,0 +1,64 @@
'use strict';
// TODO: duplicated from https://github.com/lahmatiy/react-render-tracker/blob/main/src/publisher/react-integration/utils/stackTrace.ts
// once it is published as a standalone npm package, remove this file
// Adopted version of StackTrace-Parser
// https://github.com/errwischt/stacktrace-parser/blob/master/src/stack-trace-parser.js
const UNKNOWN_FUNCTION = '<unknown>';
function parseStackTraceLine(line) {
return parseChrome(line) || parseGecko(line) || parseJSC(line);
}
const chromeRe = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)?\)?\s*$/i;
const chromeRe2 = /^\s*at ()((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)\s*$/i;
const chromeEvalRe = /\((\S*)\)/;
function parseChrome(line) {
const parts = chromeRe.exec(line) || chromeRe2.exec(line);
if (!parts) {
return null;
}
let loc = parts[2];
const isNative = loc && loc.indexOf('native') === 0; // start of line
const isEval = loc && loc.indexOf('eval') === 0; // start of line
const submatch = chromeEvalRe.exec(loc);
if (isEval && submatch != null) {
// throw out eval line/column and use top-most line/column number
loc = submatch[1]; // url
}
return {
loc: !isNative ? parts[2] : null,
name: parts[1] || UNKNOWN_FUNCTION
};
}
const geckoRe = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)\s*$/i;
const geckoEvalRe = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
function parseGecko(line) {
const parts = geckoRe.exec(line);
if (!parts) {
return null;
}
let loc = parts[3];
const isEval = loc && loc.indexOf(' > eval') > -1;
const submatch = geckoEvalRe.exec(loc);
if (isEval && submatch != null) {
// throw out eval line/column and use top-most line number
loc = submatch[1];
}
return {
loc: parts[3],
name: parts[1] || UNKNOWN_FUNCTION
};
}
const javaScriptCoreRe = /^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?)\s*$/i;
function parseJSC(line) {
const parts = javaScriptCoreRe.exec(line);
if (!parts) {
return null;
}
return {
loc: parts[3],
name: parts[1] || UNKNOWN_FUNCTION
};
}
exports.parseStackTraceLine = parseStackTraceLine;
//# sourceMappingURL=stackTrace.cjs.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"stackTrace.cjs.js","sources":["../../../../../packages/core/src/devtools/react-render-tracker/stackTrace.ts"],"sourcesContent":["// TODO: duplicated from https://github.com/lahmatiy/react-render-tracker/blob/main/src/publisher/react-integration/utils/stackTrace.ts\n// once it is published as a standalone npm package, remove this file\n\n// Adopted version of StackTrace-Parser\n// https://github.com/errwischt/stacktrace-parser/blob/master/src/stack-trace-parser.js\n\nconst UNKNOWN_FUNCTION = '<unknown>';\n\ntype LineParseResult = null | {\n name: string;\n loc: string | null;\n};\n\nexport function parseStackTraceLine(line: string): LineParseResult {\n return parseChrome(line) || parseGecko(line) || parseJSC(line);\n}\n\nconst chromeRe =\n /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\/|[a-z]:\\\\|\\\\\\\\).*?)?\\)?\\s*$/i;\nconst chromeRe2 =\n /^\\s*at ()((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\/|[a-z]:\\\\|\\\\\\\\).*?)\\s*$/i;\nconst chromeEvalRe = /\\((\\S*)\\)/;\n\nfunction parseChrome(line: string): LineParseResult {\n const parts = chromeRe.exec(line) || chromeRe2.exec(line);\n\n if (!parts) {\n return null;\n }\n\n let loc = parts[2];\n const isNative = loc && loc.indexOf('native') === 0; // start of line\n const isEval = loc && loc.indexOf('eval') === 0; // start of line\n\n const submatch = chromeEvalRe.exec(loc);\n if (isEval && submatch != null) {\n // throw out eval line/column and use top-most line/column number\n loc = submatch[1]; // url\n }\n\n return {\n loc: !isNative ? parts[2] : null,\n name: parts[1] || UNKNOWN_FUNCTION,\n };\n}\n\nconst geckoRe =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)\\s*$/i;\nconst geckoEvalRe = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nfunction parseGecko(line: string): LineParseResult {\n const parts = geckoRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n let loc = parts[3];\n const isEval = loc && loc.indexOf(' > eval') > -1;\n\n const submatch = geckoEvalRe.exec(loc);\n if (isEval && submatch != null) {\n // throw out eval line/column and use top-most line number\n loc = submatch[1];\n }\n\n return {\n loc: parts[3],\n name: parts[1] || UNKNOWN_FUNCTION,\n };\n}\n\nconst javaScriptCoreRe = /^\\s*(?:([^@]*)(?:\\((.*?)\\))?@)?(\\S.*?)\\s*$/i;\n\nfunction parseJSC(line: string): LineParseResult {\n const parts = javaScriptCoreRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n return {\n loc: parts[3],\n name: parts[1] || UNKNOWN_FUNCTION,\n };\n}\n"],"names":["UNKNOWN_FUNCTION","parseStackTraceLine","line","parseChrome","parseGecko","parseJSC","chromeRe","chromeRe2","chromeEvalRe","parts","exec","loc","isNative","indexOf","isEval","submatch","name","geckoRe","geckoEvalRe","javaScriptCoreRe"],"mappings":";;AAAA;AACA;AAEA;AACA;AAEA,MAAMA,gBAAgB,GAAG,WAAW;AAO9B,SAAUC,mBAAmBA,CAACC,IAAY,EAAA;AAC9C,EAAA,OAAOC,WAAW,CAACD,IAAI,CAAC,IAAIE,UAAU,CAACF,IAAI,CAAC,IAAIG,QAAQ,CAACH,IAAI,CAAC;AAChE;AAEA,MAAMI,QAAQ,GACZ,sHAAsH;AACxH,MAAMC,SAAS,GACb,2GAA2G;AAC7G,MAAMC,YAAY,GAAG,WAAW;AAEhC,SAASL,WAAWA,CAACD,IAAY,EAAA;AAC/B,EAAA,MAAMO,KAAK,GAAGH,QAAQ,CAACI,IAAI,CAACR,IAAI,CAAC,IAAIK,SAAS,CAACG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;AAC9B;AACAJ,IAAAA,GAAG,GAAGI,QAAQ,CAAC,CAAC,CAAC;AACnB,EAAA;EAEA,OAAO;AACLJ,IAAAA,GAAG,EAAEF,KAAK,CAAC,CAAC,CAAC;AACbO,IAAAA,IAAI,EAAEP,KAAK,CAAC,CAAC,CAAC,IAAIT;GACnB;AACH;AAEA,MAAMmB,gBAAgB,GAAG,6CAA6C;AAEtE,SAASd,QAAQA,CAACH,IAAY,EAAA;AAC5B,EAAA,MAAMO,KAAK,GAAGU,gBAAgB,CAACT,IAAI,CAACR,IAAI,CAAC;EAEzC,IAAI,CAACO,KAAK,EAAE;AACV,IAAA,OAAO,IAAI;AACb,EAAA;EAEA,OAAO;AACLE,IAAAA,GAAG,EAAEF,KAAK,CAAC,CAAC,CAAC;AACbO,IAAAA,IAAI,EAAEP,KAAK,CAAC,CAAC,CAAC,IAAIT;GACnB;AACH;;;;"}

View File

@@ -0,0 +1,62 @@
// TODO: duplicated from https://github.com/lahmatiy/react-render-tracker/blob/main/src/publisher/react-integration/utils/stackTrace.ts
// once it is published as a standalone npm package, remove this file
// Adopted version of StackTrace-Parser
// https://github.com/errwischt/stacktrace-parser/blob/master/src/stack-trace-parser.js
const UNKNOWN_FUNCTION = '<unknown>';
function parseStackTraceLine(line) {
return parseChrome(line) || parseGecko(line) || parseJSC(line);
}
const chromeRe = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)?\)?\s*$/i;
const chromeRe2 = /^\s*at ()((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)\s*$/i;
const chromeEvalRe = /\((\S*)\)/;
function parseChrome(line) {
const parts = chromeRe.exec(line) || chromeRe2.exec(line);
if (!parts) {
return null;
}
let loc = parts[2];
const isNative = loc && loc.indexOf('native') === 0; // start of line
const isEval = loc && loc.indexOf('eval') === 0; // start of line
const submatch = chromeEvalRe.exec(loc);
if (isEval && submatch != null) {
// throw out eval line/column and use top-most line/column number
loc = submatch[1]; // url
}
return {
loc: !isNative ? parts[2] : null,
name: parts[1] || UNKNOWN_FUNCTION
};
}
const geckoRe = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)\s*$/i;
const geckoEvalRe = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
function parseGecko(line) {
const parts = geckoRe.exec(line);
if (!parts) {
return null;
}
let loc = parts[3];
const isEval = loc && loc.indexOf(' > eval') > -1;
const submatch = geckoEvalRe.exec(loc);
if (isEval && submatch != null) {
// throw out eval line/column and use top-most line number
loc = submatch[1];
}
return {
loc: parts[3],
name: parts[1] || UNKNOWN_FUNCTION
};
}
const javaScriptCoreRe = /^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?)\s*$/i;
function parseJSC(line) {
const parts = javaScriptCoreRe.exec(line);
if (!parts) {
return null;
}
return {
loc: parts[3],
name: parts[1] || UNKNOWN_FUNCTION
};
}
export { parseStackTraceLine };
//# sourceMappingURL=stackTrace.esm.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"stackTrace.esm.js","sources":["../../../../../packages/core/src/devtools/react-render-tracker/stackTrace.ts"],"sourcesContent":["// TODO: duplicated from https://github.com/lahmatiy/react-render-tracker/blob/main/src/publisher/react-integration/utils/stackTrace.ts\n// once it is published as a standalone npm package, remove this file\n\n// Adopted version of StackTrace-Parser\n// https://github.com/errwischt/stacktrace-parser/blob/master/src/stack-trace-parser.js\n\nconst UNKNOWN_FUNCTION = '<unknown>';\n\ntype LineParseResult = null | {\n name: string;\n loc: string | null;\n};\n\nexport function parseStackTraceLine(line: string): LineParseResult {\n return parseChrome(line) || parseGecko(line) || parseJSC(line);\n}\n\nconst chromeRe =\n /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\/|[a-z]:\\\\|\\\\\\\\).*?)?\\)?\\s*$/i;\nconst chromeRe2 =\n /^\\s*at ()((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\/|[a-z]:\\\\|\\\\\\\\).*?)\\s*$/i;\nconst chromeEvalRe = /\\((\\S*)\\)/;\n\nfunction parseChrome(line: string): LineParseResult {\n const parts = chromeRe.exec(line) || chromeRe2.exec(line);\n\n if (!parts) {\n return null;\n }\n\n let loc = parts[2];\n const isNative = loc && loc.indexOf('native') === 0; // start of line\n const isEval = loc && loc.indexOf('eval') === 0; // start of line\n\n const submatch = chromeEvalRe.exec(loc);\n if (isEval && submatch != null) {\n // throw out eval line/column and use top-most line/column number\n loc = submatch[1]; // url\n }\n\n return {\n loc: !isNative ? parts[2] : null,\n name: parts[1] || UNKNOWN_FUNCTION,\n };\n}\n\nconst geckoRe =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)\\s*$/i;\nconst geckoEvalRe = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nfunction parseGecko(line: string): LineParseResult {\n const parts = geckoRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n let loc = parts[3];\n const isEval = loc && loc.indexOf(' > eval') > -1;\n\n const submatch = geckoEvalRe.exec(loc);\n if (isEval && submatch != null) {\n // throw out eval line/column and use top-most line number\n loc = submatch[1];\n }\n\n return {\n loc: parts[3],\n name: parts[1] || UNKNOWN_FUNCTION,\n };\n}\n\nconst javaScriptCoreRe = /^\\s*(?:([^@]*)(?:\\((.*?)\\))?@)?(\\S.*?)\\s*$/i;\n\nfunction parseJSC(line: string): LineParseResult {\n const parts = javaScriptCoreRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n return {\n loc: parts[3],\n name: parts[1] || UNKNOWN_FUNCTION,\n };\n}\n"],"names":["UNKNOWN_FUNCTION","parseStackTraceLine","line","parseChrome","parseGecko","parseJSC","chromeRe","chromeRe2","chromeEvalRe","parts","exec","loc","isNative","indexOf","isEval","submatch","name","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MAAMC,WAAW,GAAG,+CAA+C;AAEnE,SAASd,UAAUA,CAACF,IAAY,EAAA;AAC9B,EAAA,MAAMO,KAAK,GAAGQ,OAAO,CAACP,IAAI,CAACR,IAAI,CAAC;EAEhC,IAAI,CAACO,KAAK,EAAE;AACV,IAAA,OAAO,IAAI;AACb,EAAA;AAEA,EAAA,IAAIE,GAAG,GAAGF,KAAK,CAAC,CAAC,CAAC;AAClB,EAAA,MAAMK,MAAM,GAAGH,GAAG,IAAIA,GAAG,CAACE,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE;AAEjD,EAAA,MAAME,QAAQ,GAAGG,WAAW,CAACR,IAAI,CAACC,GAAG,CAAC;AACtC,EAAA,IAAIG,MAAM,IAAIC,QAAQ,IAAI,IAAI,EAAE;AAC9B;AACAJ,IAAAA,GAAG,GAAGI,QAAQ,CAAC,CAAC,CAAC;AACnB,EAAA;EAEA,OAAO;AACLJ,IAAAA,GAAG,EAAEF,KAAK,CAAC,CAAC,CAAC;AACbO,IAAAA,IAAI,EAAEP,KAAK,CAAC,CAAC,CAAC,IAAIT;GACnB;AACH;AAEA,MAAMmB,gBAAgB,GAAG,6CAA6C;AAEtE,SAASd,QAAQA,CAACH,IAAY,EAAA;AAC5B,EAAA,MAAMO,KAAK,GAAGU,gBAAgB,CAACT,IAAI,CAACR,IAAI,CAAC;EAEzC,IAAI,CAACO,KAAK,EAAE;AACV,IAAA,OAAO,IAAI;AACb,EAAA;EAEA,OAAO;AACLE,IAAAA,GAAG,EAAEF,KAAK,CAAC,CAAC,CAAC;AACbO,IAAAA,IAAI,EAAEP,KAAK,CAAC,CAAC,CAAC,IAAIT;GACnB;AACH;;;;"}

37
node_modules/@griffel/core/devtools/store.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
'use strict';
var constants = require('../constants.cjs.js');
var mergeClasses = require('../mergeClasses.cjs.js');
const sequenceDetails = {};
const cssRules = /*#__PURE__*/new Set();
const debugData = {
getChildrenSequences: debugSequenceHash => {
const key = Object.keys(mergeClasses.mergeClassesCachedResults).find(key => mergeClasses.mergeClassesCachedResults[key].startsWith(debugSequenceHash));
if (key) {
// key of the mergeClasses cache contains merge order
return key.split(constants.SEQUENCE_PREFIX).filter(sequence => sequence.length).map(sequence => constants.SEQUENCE_PREFIX + sequence);
}
return [];
},
addCSSRule: rule => {
cssRules.add(rule);
},
addSequenceDetails: (classNamesForSlots, sourceURL) => {
Object.entries(classNamesForSlots).forEach(([slotName, sequenceHash]) => {
sequenceDetails[sequenceHash.substring(0, constants.SEQUENCE_SIZE)] = {
slotName,
sourceURL
};
});
},
getCSSRules: () => {
return Array.from(cssRules);
},
getSequenceDetails: sequenceHash => {
return sequenceDetails[sequenceHash];
}
};
exports.debugData = debugData;
//# sourceMappingURL=store.cjs.js.map

1
node_modules/@griffel/core/devtools/store.cjs.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"store.cjs.js","sources":["../../../../packages/core/src/devtools/store.ts"],"sourcesContent":["import type { SequenceHash } from '../types';\nimport { SEQUENCE_PREFIX, SEQUENCE_SIZE } from '../constants';\nimport { mergeClassesCachedResults } from '../mergeClasses';\n\nconst sequenceDetails: Record<SequenceHash, { slotName: string; sourceURL?: string }> = {};\n\nconst cssRules = new Set<string>();\n\nexport const debugData = {\n getChildrenSequences: (debugSequenceHash: SequenceHash): SequenceHash[] => {\n const key = Object.keys(mergeClassesCachedResults).find(key =>\n mergeClassesCachedResults[key].startsWith(debugSequenceHash),\n );\n\n if (key) {\n // key of the mergeClasses cache contains merge order\n return key\n .split(SEQUENCE_PREFIX)\n .filter(sequence => sequence.length)\n .map(sequence => SEQUENCE_PREFIX + sequence);\n }\n\n return [];\n },\n\n addCSSRule: (rule: string) => {\n cssRules.add(rule);\n },\n addSequenceDetails: <Slots extends string | number>(\n classNamesForSlots: Record<Slots, string>,\n sourceURL?: string,\n ) => {\n Object.entries<string>(classNamesForSlots).forEach(([slotName, sequenceHash]) => {\n sequenceDetails[sequenceHash.substring(0, SEQUENCE_SIZE)] = { slotName, sourceURL };\n });\n },\n\n getCSSRules: (): string[] => {\n return Array.from(cssRules);\n },\n getSequenceDetails: (sequenceHash: SequenceHash): (typeof sequenceDetails)[string] | undefined => {\n return sequenceDetails[sequenceHash];\n },\n};\n"],"names":["sequenceDetails","cssRules","Set","debugData","getChildrenSequences","debugSequenceHash","key","Object","keys","mergeClassesCachedResults","find","startsWith","split","SEQUENCE_PREFIX","filter","sequence","length","map","addCSSRule","rule","add","addSequenceDetails","classNamesForSlots","sourceURL","entries","forEach","slotName","sequenceHash","substring","SEQUENCE_SIZE","getCSSRules","Array","from","getSequenceDetails"],"mappings":";;;;;AAIA,MAAMA,eAAe,GAAmE,EAAE;AAE1F,MAAMC,QAAQ,gBAAG,IAAIC,GAAG,EAAU;AAE3B,MAAMC,SAAS,GAAG;EACvBC,oBAAoB,EAAGC,iBAA+B,IAAoB;IACxE,MAAMC,GAAG,GAAGC,MAAM,CAACC,IAAI,CAACC,sCAAyB,CAAC,CAACC,IAAI,CAACJ,GAAG,IACzDG,sCAAyB,CAACH,GAAG,CAAC,CAACK,UAAU,CAACN,iBAAiB,CAAC,CAC7D;AAED,IAAA,IAAIC,GAAG,EAAE;AACP;MACA,OAAOA,GAAG,CACPM,KAAK,CAACC,yBAAe,CAAC,CACtBC,MAAM,CAACC,QAAQ,IAAIA,QAAQ,CAACC,MAAM,CAAC,CACnCC,GAAG,CAACF,QAAQ,IAAIF,yBAAe,GAAGE,QAAQ,CAAC;AAChD,IAAA;AAEA,IAAA,OAAO,EAAE;EACX,CAAC;EAEDG,UAAU,EAAGC,IAAY,IAAI;AAC3BlB,IAAAA,QAAQ,CAACmB,GAAG,CAACD,IAAI,CAAC;EACpB,CAAC;AACDE,EAAAA,kBAAkB,EAAEA,CAClBC,kBAAyC,EACzCC,SAAkB,KAChB;AACFhB,IAAAA,MAAM,CAACiB,OAAO,CAASF,kBAAkB,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,QAAQ,EAAEC,YAAY,CAAC,KAAI;MAC9E3B,eAAe,CAAC2B,YAAY,CAACC,SAAS,CAAC,CAAC,EAAEC,uBAAa,CAAC,CAAC,GAAG;QAAEH,QAAQ;AAAEH,QAAAA;OAAW;AACrF,IAAA,CAAC,CAAC;EACJ,CAAC;EAEDO,WAAW,EAAEA,MAAe;AAC1B,IAAA,OAAOC,KAAK,CAACC,IAAI,CAAC/B,QAAQ,CAAC;EAC7B,CAAC;EACDgC,kBAAkB,EAAGN,YAA0B,IAAkD;IAC/F,OAAO3B,eAAe,CAAC2B,YAAY,CAAC;AACtC,EAAA;;;;;"}

35
node_modules/@griffel/core/devtools/store.esm.js generated vendored Normal file
View File

@@ -0,0 +1,35 @@
import { SEQUENCE_SIZE, SEQUENCE_PREFIX } from '../constants.esm.js';
import { mergeClassesCachedResults } from '../mergeClasses.esm.js';
const sequenceDetails = {};
const cssRules = /*#__PURE__*/new Set();
const debugData = {
getChildrenSequences: debugSequenceHash => {
const key = Object.keys(mergeClassesCachedResults).find(key => mergeClassesCachedResults[key].startsWith(debugSequenceHash));
if (key) {
// key of the mergeClasses cache contains merge order
return key.split(SEQUENCE_PREFIX).filter(sequence => sequence.length).map(sequence => SEQUENCE_PREFIX + sequence);
}
return [];
},
addCSSRule: rule => {
cssRules.add(rule);
},
addSequenceDetails: (classNamesForSlots, sourceURL) => {
Object.entries(classNamesForSlots).forEach(([slotName, sequenceHash]) => {
sequenceDetails[sequenceHash.substring(0, SEQUENCE_SIZE)] = {
slotName,
sourceURL
};
});
},
getCSSRules: () => {
return Array.from(cssRules);
},
getSequenceDetails: sequenceHash => {
return sequenceDetails[sequenceHash];
}
};
export { debugData };
//# sourceMappingURL=store.esm.js.map

1
node_modules/@griffel/core/devtools/store.esm.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"store.esm.js","sources":["../../../../packages/core/src/devtools/store.ts"],"sourcesContent":["import type { SequenceHash } from '../types';\nimport { SEQUENCE_PREFIX, SEQUENCE_SIZE } from '../constants';\nimport { mergeClassesCachedResults } from '../mergeClasses';\n\nconst sequenceDetails: Record<SequenceHash, { slotName: string; sourceURL?: string }> = {};\n\nconst cssRules = new Set<string>();\n\nexport const debugData = {\n getChildrenSequences: (debugSequenceHash: SequenceHash): SequenceHash[] => {\n const key = Object.keys(mergeClassesCachedResults).find(key =>\n mergeClassesCachedResults[key].startsWith(debugSequenceHash),\n );\n\n if (key) {\n // key of the mergeClasses cache contains merge order\n return key\n .split(SEQUENCE_PREFIX)\n .filter(sequence => sequence.length)\n .map(sequence => SEQUENCE_PREFIX + sequence);\n }\n\n return [];\n },\n\n addCSSRule: (rule: string) => {\n cssRules.add(rule);\n },\n addSequenceDetails: <Slots extends string | number>(\n classNamesForSlots: Record<Slots, string>,\n sourceURL?: string,\n ) => {\n Object.entries<string>(classNamesForSlots).forEach(([slotName, sequenceHash]) => {\n sequenceDetails[sequenceHash.substring(0, SEQUENCE_SIZE)] = { slotName, sourceURL };\n });\n },\n\n getCSSRules: (): string[] => {\n return Array.from(cssRules);\n },\n getSequenceDetails: (sequenceHash: SequenceHash): (typeof sequenceDetails)[string] | undefined => {\n return sequenceDetails[sequenceHash];\n },\n};\n"],"names":["sequenceDetails","cssRules","Set","debugData","getChildrenSequences","debugSequenceHash","key","Object","keys","mergeClassesCachedResults","find","startsWith","split","SEQUENCE_PREFIX","filter","sequence","length","map","addCSSRule","rule","add","addSequenceDetails","classNamesForSlots","sourceURL","entries","forEach","slotName","sequenceHash","substring","SEQUENCE_SIZE","getCSSRules","Array","from","getSequenceDetails"],"mappings":";;;AAIA,MAAMA,eAAe,GAAmE,EAAE;AAE1F,MAAMC,QAAQ,gBAAG,IAAIC,GAAG,EAAU;AAE3B,MAAMC,SAAS,GAAG;EACvBC,oBAAoB,EAAGC,iBAA+B,IAAoB;IACxE,MAAMC,GAAG,GAAGC,MAAM,CAACC,IAAI,CAACC,yBAAyB,CAAC,CAACC,IAAI,CAACJ,GAAG,IACzDG,yBAAyB,CAACH,GAAG,CAAC,CAACK,UAAU,CAACN,iBAAiB,CAAC,CAC7D;AAED,IAAA,IAAIC,GAAG,EAAE;AACP;MACA,OAAOA,GAAG,CACPM,KAAK,CAACC,eAAe,CAAC,CACtBC,MAAM,CAACC,QAAQ,IAAIA,QAAQ,CAACC,MAAM,CAAC,CACnCC,GAAG,CAACF,QAAQ,IAAIF,eAAe,GAAGE,QAAQ,CAAC;AAChD,IAAA;AAEA,IAAA,OAAO,EAAE;EACX,CAAC;EAEDG,UAAU,EAAGC,IAAY,IAAI;AAC3BlB,IAAAA,QAAQ,CAACmB,GAAG,CAACD,IAAI,CAAC;EACpB,CAAC;AACDE,EAAAA,kBAAkB,EAAEA,CAClBC,kBAAyC,EACzCC,SAAkB,KAChB;AACFhB,IAAAA,MAAM,CAACiB,OAAO,CAASF,kBAAkB,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,QAAQ,EAAEC,YAAY,CAAC,KAAI;MAC9E3B,eAAe,CAAC2B,YAAY,CAACC,SAAS,CAAC,CAAC,EAAEC,aAAa,CAAC,CAAC,GAAG;QAAEH,QAAQ;AAAEH,QAAAA;OAAW;AACrF,IAAA,CAAC,CAAC;EACJ,CAAC;EAEDO,WAAW,EAAEA,MAAe;AAC1B,IAAA,OAAOC,KAAK,CAACC,IAAI,CAAC/B,QAAQ,CAAC;EAC7B,CAAC;EACDgC,kBAAkB,EAAGN,YAA0B,IAAkD;IAC/F,OAAO3B,eAAe,CAAC2B,YAAY,CAAC;AACtC,EAAA;;;;;"}

49
node_modules/@griffel/core/devtools/utils.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,49 @@
'use strict';
function getDirectionalClassName(classes, direction) {
return Array.isArray(classes) ? direction === 'rtl' ? classes[1] : classes[0] : classes || '';
}
function getDebugClassNames(lookupItem, parentLookupItem, parentDebugClassNames, overridingSiblings) {
const classesMapping = lookupItem[0];
const direction = lookupItem[1];
return Object.entries(classesMapping).map(([propertyHash, classes]) => {
const className = getDirectionalClassName(classes, direction);
let overriddenBy;
if (parentDebugClassNames && parentLookupItem) {
const matching = parentDebugClassNames.find(({
className: parentClassName
}) => parentClassName === className);
if (!matching && parentLookupItem[0][propertyHash]) {
// parent node does not have current className (style), but has current selector:
// style is overriden in current merging by another rule in sibling node
overriddenBy = getDirectionalClassName(parentLookupItem[0][propertyHash], parentLookupItem[1]);
} else if (matching && parentLookupItem[0][propertyHash]) {
// parent node has current className (style), and has current selector:
// case 1. style is not overriden during current merging; it may be overriden in higher level of merging
// case 2. style is overriden in current merging by exactly the same rule in sibling nodes
const siblingHasSameRule = overridingSiblings ? overridingSiblings.filter(({
debugClassNames
}) => debugClassNames.filter(({
className: siblingClassName
}) => siblingClassName === className).length > 0).length > 0 : false;
overriddenBy = siblingHasSameRule ? matching.className // case 2
: matching.overriddenBy; // case 1
} else if (!matching && !parentLookupItem[0][propertyHash]) {
// parent node does not have current className (style), and does not have current selector:
// this case is not possible
overriddenBy = undefined;
} else if (matching && !parentLookupItem[0][propertyHash]) {
// parent node has current className (style), but does not have current selector:
// this case is not possible
overriddenBy = undefined;
}
}
return {
className,
overriddenBy
};
});
}
exports.getDebugClassNames = getDebugClassNames;
//# sourceMappingURL=utils.cjs.js.map

1
node_modules/@griffel/core/devtools/utils.cjs.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"utils.cjs.js","sources":["../../../../packages/core/src/devtools/utils.ts"],"sourcesContent":["import type { CSSClasses, LookupItem } from '../types';\nimport type { DebugAtomicClassName, DebugSequence } from './types';\n\nfunction getDirectionalClassName(classes: CSSClasses, direction: 'ltr' | 'rtl'): string {\n return Array.isArray(classes) ? (direction === 'rtl' ? classes[1] : classes[0]) : classes || '';\n}\n\nexport function getDebugClassNames(\n lookupItem: LookupItem,\n parentLookupItem?: LookupItem,\n parentDebugClassNames?: DebugAtomicClassName[],\n overridingSiblings?: DebugSequence[],\n): DebugAtomicClassName[] {\n const classesMapping = lookupItem[0];\n const direction = lookupItem[1];\n\n return Object.entries(classesMapping).map(([propertyHash, classes]) => {\n const className = getDirectionalClassName(classes, direction);\n\n let overriddenBy: string | undefined;\n if (parentDebugClassNames && parentLookupItem) {\n const matching = parentDebugClassNames.find(({ className: parentClassName }) => parentClassName === className);\n\n if (!matching && parentLookupItem[0][propertyHash]) {\n // parent node does not have current className (style), but has current selector:\n // style is overriden in current merging by another rule in sibling node\n overriddenBy = getDirectionalClassName(parentLookupItem[0][propertyHash], parentLookupItem[1]);\n } else if (matching && parentLookupItem[0][propertyHash]) {\n // parent node has current className (style), and has current selector:\n // case 1. style is not overriden during current merging; it may be overriden in higher level of merging\n // case 2. style is overriden in current merging by exactly the same rule in sibling nodes\n const siblingHasSameRule = overridingSiblings\n ? overridingSiblings.filter(\n ({ debugClassNames }) =>\n debugClassNames.filter(({ className: siblingClassName }) => siblingClassName === className).length > 0,\n ).length > 0\n : false;\n overriddenBy = siblingHasSameRule\n ? matching.className // case 2\n : matching.overriddenBy; // case 1\n } else if (!matching && !parentLookupItem[0][propertyHash]) {\n // parent node does not have current className (style), and does not have current selector:\n // this case is not possible\n overriddenBy = undefined;\n } else if (matching && !parentLookupItem[0][propertyHash]) {\n // parent node has current className (style), but does not have current selector:\n // this case is not possible\n overriddenBy = undefined;\n }\n }\n\n return {\n className,\n overriddenBy,\n };\n });\n}\n"],"names":["getDirectionalClassName","classes","direction","Array","isArray","getDebugClassNames","lookupItem","parentLookupItem","parentDebugClassNames","overridingSiblings","classesMapping","Object","entries","map","propertyHash","className","overriddenBy","matching","find","parentClassName","siblingHasSameRule","filter","debugClassNames","siblingClassName","length","undefined"],"mappings":";;AAGA,SAASA,uBAAuBA,CAACC,OAAmB,EAAEC,SAAwB,EAAA;EAC5E,OAAOC,KAAK,CAACC,OAAO,CAACH,OAAO,CAAC,GAAIC,SAAS,KAAK,KAAK,GAAGD,OAAO,CAAC,CAAC,CAAC,GAAGA,OAAO,CAAC,CAAC,CAAC,GAAIA,OAAO,IAAI,EAAE;AACjG;AAEM,SAAUI,kBAAkBA,CAChCC,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,QAAQ,CAACF,SAAS;AAAC,UACnBE,QAAQ,CAACD,YAAY,CAAC;AAC5B,MAAA,CAAC,MAAM,IAAI,CAACC,QAAQ,IAAI,CAACV,gBAAgB,CAAC,CAAC,CAAC,CAACO,YAAY,CAAC,EAAE;AAC1D;AACA;AACAE,QAAAA,YAAY,GAAGS,SAAS;AAC1B,MAAA,CAAC,MAAM,IAAIR,QAAQ,IAAI,CAACV,gBAAgB,CAAC,CAAC,CAAC,CAACO,YAAY,CAAC,EAAE;AACzD;AACA;AACAE,QAAAA,YAAY,GAAGS,SAAS;AAC1B,MAAA;AACF,IAAA;IAEA,OAAO;MACLV,SAAS;AACTC,MAAAA;KACD;AACH,EAAA,CAAC,CAAC;AACJ;;;;"}

47
node_modules/@griffel/core/devtools/utils.esm.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
function getDirectionalClassName(classes, direction) {
return Array.isArray(classes) ? direction === 'rtl' ? classes[1] : classes[0] : classes || '';
}
function getDebugClassNames(lookupItem, parentLookupItem, parentDebugClassNames, overridingSiblings) {
const classesMapping = lookupItem[0];
const direction = lookupItem[1];
return Object.entries(classesMapping).map(([propertyHash, classes]) => {
const className = getDirectionalClassName(classes, direction);
let overriddenBy;
if (parentDebugClassNames && parentLookupItem) {
const matching = parentDebugClassNames.find(({
className: parentClassName
}) => parentClassName === className);
if (!matching && parentLookupItem[0][propertyHash]) {
// parent node does not have current className (style), but has current selector:
// style is overriden in current merging by another rule in sibling node
overriddenBy = getDirectionalClassName(parentLookupItem[0][propertyHash], parentLookupItem[1]);
} else if (matching && parentLookupItem[0][propertyHash]) {
// parent node has current className (style), and has current selector:
// case 1. style is not overriden during current merging; it may be overriden in higher level of merging
// case 2. style is overriden in current merging by exactly the same rule in sibling nodes
const siblingHasSameRule = overridingSiblings ? overridingSiblings.filter(({
debugClassNames
}) => debugClassNames.filter(({
className: siblingClassName
}) => siblingClassName === className).length > 0).length > 0 : false;
overriddenBy = siblingHasSameRule ? matching.className // case 2
: matching.overriddenBy; // case 1
} else if (!matching && !parentLookupItem[0][propertyHash]) {
// parent node does not have current className (style), and does not have current selector:
// this case is not possible
overriddenBy = undefined;
} else if (matching && !parentLookupItem[0][propertyHash]) {
// parent node has current className (style), but does not have current selector:
// this case is not possible
overriddenBy = undefined;
}
}
return {
className,
overriddenBy
};
});
}
export { getDebugClassNames };
//# sourceMappingURL=utils.esm.js.map

1
node_modules/@griffel/core/devtools/utils.esm.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"utils.esm.js","sources":["../../../../packages/core/src/devtools/utils.ts"],"sourcesContent":["import type { CSSClasses, LookupItem } from '../types';\nimport type { DebugAtomicClassName, DebugSequence } from './types';\n\nfunction getDirectionalClassName(classes: CSSClasses, direction: 'ltr' | 'rtl'): string {\n return Array.isArray(classes) ? (direction === 'rtl' ? classes[1] : classes[0]) : classes || '';\n}\n\nexport function getDebugClassNames(\n lookupItem: LookupItem,\n parentLookupItem?: LookupItem,\n parentDebugClassNames?: DebugAtomicClassName[],\n overridingSiblings?: DebugSequence[],\n): DebugAtomicClassName[] {\n const classesMapping = lookupItem[0];\n const direction = lookupItem[1];\n\n return Object.entries(classesMapping).map(([propertyHash, classes]) => {\n const className = getDirectionalClassName(classes, direction);\n\n let overriddenBy: string | undefined;\n if (parentDebugClassNames && parentLookupItem) {\n const matching = parentDebugClassNames.find(({ className: parentClassName }) => parentClassName === className);\n\n if (!matching && parentLookupItem[0][propertyHash]) {\n // parent node does not have current className (style), but has current selector:\n // style is overriden in current merging by another rule in sibling node\n overriddenBy = getDirectionalClassName(parentLookupItem[0][propertyHash], parentLookupItem[1]);\n } else if (matching && parentLookupItem[0][propertyHash]) {\n // parent node has current className (style), and has current selector:\n // case 1. style is not overriden during current merging; it may be overriden in higher level of merging\n // case 2. style is overriden in current merging by exactly the same rule in sibling nodes\n const siblingHasSameRule = overridingSiblings\n ? overridingSiblings.filter(\n ({ debugClassNames }) =>\n debugClassNames.filter(({ className: siblingClassName }) => siblingClassName === className).length > 0,\n ).length > 0\n : false;\n overriddenBy = siblingHasSameRule\n ? matching.className // case 2\n : matching.overriddenBy; // case 1\n } else if (!matching && !parentLookupItem[0][propertyHash]) {\n // parent node does not have current className (style), and does not have current selector:\n // this case is not possible\n overriddenBy = undefined;\n } else if (matching && !parentLookupItem[0][propertyHash]) {\n // parent node has current className (style), but does not have current selector:\n // this case is not possible\n overriddenBy = undefined;\n }\n }\n\n return {\n className,\n overriddenBy,\n };\n });\n}\n"],"names":["getDirectionalClassName","classes","direction","Array","isArray","getDebugClassNames","lookupItem","parentLookupItem","parentDebugClassNames","overridingSiblings","classesMapping","Object","entries","map","propertyHash","className","overriddenBy","matching","find","parentClassName","siblingHasSameRule","filter","debugClassNames","siblingClassName","length","undefined"],"mappings":"AAGA,SAASA,uBAAuBA,CAACC,OAAmB,EAAEC,SAAwB,EAAA;EAC5E,OAAOC,KAAK,CAACC,OAAO,CAACH,OAAO,CAAC,GAAIC,SAAS,KAAK,KAAK,GAAGD,OAAO,CAAC,CAAC,CAAC,GAAGA,OAAO,CAAC,CAAC,CAAC,GAAIA,OAAO,IAAI,EAAE;AACjG;AAEM,SAAUI,kBAAkBA,CAChCC,UAAsB,EACtBC,gBAA6B,EAC7BC,qBAA8C,EAC9CC,kBAAoC,EAAA;AAEpC,EAAA,MAAMC,cAAc,GAAGJ,UAAU,CAAC,CAAC,CAAC;AACpC,EAAA,MAAMJ,SAAS,GAAGI,UAAU,CAAC,CAAC,CAAC;AAE/B,EAAA,OAAOK,MAAM,CAACC,OAAO,CAACF,cAAc,CAAC,CAACG,GAAG,CAAC,CAAC,CAACC,YAAY,EAAEb,OAAO,CAAC,KAAI;AACpE,IAAA,MAAMc,SAAS,GAAGf,uBAAuB,CAACC,OAAO,EAAEC,SAAS,CAAC;AAE7D,IAAA,IAAIc,YAAgC;IACpC,IAAIR,qBAAqB,IAAID,gBAAgB,EAAE;AAC7C,MAAA,MAAMU,QAAQ,GAAGT,qBAAqB,CAACU,IAAI,CAAC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