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

21
node_modules/@griffel/core/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

3
node_modules/@griffel/core/README.md generated vendored Normal file
View File

@@ -0,0 +1,3 @@
# `@griffel/core`
DOM implementation of Griffel. Do not use this package directly, please use [`@griffel/react`](../react) instead.

40
node_modules/@griffel/core/__css.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,40 @@
'use strict';
require('./constants.cjs.js');
var store = require('./devtools/store.cjs.js');
var isDevToolsEnabled = require('./devtools/isDevToolsEnabled.cjs.js');
var reduceToClassNameForSlots = require('./runtime/reduceToClassNameForSlots.cjs.js');
/**
* A version of makeStyles() that accepts build output as an input and skips all runtime transforms & DOM insertion.
*
* @internal
*/
function __css(classesMapBySlot) {
let ltrClassNamesForSlots = null;
let rtlClassNamesForSlots = null;
function computeClasses(options) {
const {
dir
} = options;
const isLTR = dir === 'ltr';
if (isLTR) {
if (ltrClassNamesForSlots === null) {
ltrClassNamesForSlots = reduceToClassNameForSlots.reduceToClassNameForSlots(classesMapBySlot, dir);
}
} else {
if (rtlClassNamesForSlots === null) {
rtlClassNamesForSlots = reduceToClassNameForSlots.reduceToClassNameForSlots(classesMapBySlot, dir);
}
}
const classNamesForSlots = isLTR ? ltrClassNamesForSlots : rtlClassNamesForSlots;
if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled.isDevToolsEnabled) {
store.debugData.addSequenceDetails(classNamesForSlots);
}
return classNamesForSlots;
}
return computeClasses;
}
exports.__css = __css;
//# sourceMappingURL=__css.cjs.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"__css.cjs.js","sources":["../../../packages/core/src/__css.ts"],"sourcesContent":["import { debugData, isDevToolsEnabled } from './devtools';\nimport { reduceToClassNameForSlots } from './runtime/reduceToClassNameForSlots';\nimport type { MakeStylesOptions } from './makeStyles';\nimport type { CSSClassesMapBySlot } from './types';\n\n/**\n * A version of makeStyles() that accepts build output as an input and skips all runtime transforms & DOM insertion.\n *\n * @internal\n */\nexport function __css<Slots extends string>(classesMapBySlot: CSSClassesMapBySlot<Slots>) {\n let ltrClassNamesForSlots: Record<Slots, string> | null = null;\n let rtlClassNamesForSlots: Record<Slots, string> | null = null;\n\n function computeClasses(options: Pick<MakeStylesOptions, 'dir'>): Record<Slots, string> {\n const { dir } = options;\n const isLTR = dir === 'ltr';\n\n if (isLTR) {\n if (ltrClassNamesForSlots === null) {\n ltrClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);\n }\n } else {\n if (rtlClassNamesForSlots === null) {\n rtlClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);\n }\n }\n\n const classNamesForSlots = isLTR\n ? (ltrClassNamesForSlots as Record<Slots, string>)\n : (rtlClassNamesForSlots as Record<Slots, string>);\n\n if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {\n debugData.addSequenceDetails(classNamesForSlots!);\n }\n\n return classNamesForSlots;\n }\n\n return computeClasses;\n}\n"],"names":["__css","classesMapBySlot","ltrClassNamesForSlots","rtlClassNamesForSlots","computeClasses","options","dir","isLTR","reduceToClassNameForSlots","classNamesForSlots","process","env","NODE_ENV","isDevToolsEnabled","debugData","addSequenceDetails"],"mappings":";;;;;;;AAKA;;;;AAIG;AACG,SAAUA,KAAKA,CAAuBC,gBAA4C,EAAA;EACtF,IAAIC,qBAAqB,GAAiC,IAAI;EAC9D,IAAIC,qBAAqB,GAAiC,IAAI;EAE9D,SAASC,cAAcA,CAACC,OAAuC,EAAA;IAC7D,MAAM;AAAEC,MAAAA;AAAG,KAAE,GAAGD,OAAO;AACvB,IAAA,MAAME,KAAK,GAAGD,GAAG,KAAK,KAAK;AAE3B,IAAA,IAAIC,KAAK,EAAE;MACT,IAAIL,qBAAqB,KAAK,IAAI,EAAE;AAClCA,QAAAA,qBAAqB,GAAGM,mDAAyB,CAACP,gBAAgB,EAAEK,GAAG,CAAC;AAC1E,MAAA;AACF,IAAA,CAAC,MAAM;MACL,IAAIH,qBAAqB,KAAK,IAAI,EAAE;AAClCA,QAAAA,qBAAqB,GAAGK,mDAAyB,CAACP,gBAAgB,EAAEK,GAAG,CAAC;AAC1E,MAAA;AACF,IAAA;AAEA,IAAA,MAAMG,kBAAkB,GAAGF,KAAK,GAC3BL,qBAA+C,GAC/CC,qBAA+C;IAEpD,IAAIO,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAIC,mCAAiB,EAAE;AAC9DC,MAAAA,eAAS,CAACC,kBAAkB,CAACN,kBAAmB,CAAC;AACnD,IAAA;AAEA,IAAA,OAAOA,kBAAkB;AAC3B,EAAA;AAEA,EAAA,OAAOL,cAAc;AACvB;;;;"}

38
node_modules/@griffel/core/__css.esm.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
import './constants.esm.js';
import { debugData } from './devtools/store.esm.js';
import { isDevToolsEnabled } from './devtools/isDevToolsEnabled.esm.js';
import { reduceToClassNameForSlots } from './runtime/reduceToClassNameForSlots.esm.js';
/**
* A version of makeStyles() that accepts build output as an input and skips all runtime transforms & DOM insertion.
*
* @internal
*/
function __css(classesMapBySlot) {
let ltrClassNamesForSlots = null;
let rtlClassNamesForSlots = null;
function computeClasses(options) {
const {
dir
} = options;
const isLTR = dir === 'ltr';
if (isLTR) {
if (ltrClassNamesForSlots === null) {
ltrClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);
}
} else {
if (rtlClassNamesForSlots === null) {
rtlClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);
}
}
const classNamesForSlots = isLTR ? ltrClassNamesForSlots : rtlClassNamesForSlots;
if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {
debugData.addSequenceDetails(classNamesForSlots);
}
return classNamesForSlots;
}
return computeClasses;
}
export { __css };
//# sourceMappingURL=__css.esm.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"__css.esm.js","sources":["../../../packages/core/src/__css.ts"],"sourcesContent":["import { debugData, isDevToolsEnabled } from './devtools';\nimport { reduceToClassNameForSlots } from './runtime/reduceToClassNameForSlots';\nimport type { MakeStylesOptions } from './makeStyles';\nimport type { CSSClassesMapBySlot } from './types';\n\n/**\n * A version of makeStyles() that accepts build output as an input and skips all runtime transforms & DOM insertion.\n *\n * @internal\n */\nexport function __css<Slots extends string>(classesMapBySlot: CSSClassesMapBySlot<Slots>) {\n let ltrClassNamesForSlots: Record<Slots, string> | null = null;\n let rtlClassNamesForSlots: Record<Slots, string> | null = null;\n\n function computeClasses(options: Pick<MakeStylesOptions, 'dir'>): Record<Slots, string> {\n const { dir } = options;\n const isLTR = dir === 'ltr';\n\n if (isLTR) {\n if (ltrClassNamesForSlots === null) {\n ltrClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);\n }\n } else {\n if (rtlClassNamesForSlots === null) {\n rtlClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);\n }\n }\n\n const classNamesForSlots = isLTR\n ? (ltrClassNamesForSlots as Record<Slots, string>)\n : (rtlClassNamesForSlots as Record<Slots, string>);\n\n if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {\n debugData.addSequenceDetails(classNamesForSlots!);\n }\n\n return classNamesForSlots;\n }\n\n return computeClasses;\n}\n"],"names":["__css","classesMapBySlot","ltrClassNamesForSlots","rtlClassNamesForSlots","computeClasses","options","dir","isLTR","reduceToClassNameForSlots","classNamesForSlots","process","env","NODE_ENV","isDevToolsEnabled","debugData","addSequenceDetails"],"mappings":";;;;;AAKA;;;;AAIG;AACG,SAAUA,KAAKA,CAAuBC,gBAA4C,EAAA;EACtF,IAAIC,qBAAqB,GAAiC,IAAI;EAC9D,IAAIC,qBAAqB,GAAiC,IAAI;EAE9D,SAASC,cAAcA,CAACC,OAAuC,EAAA;IAC7D,MAAM;AAAEC,MAAAA;AAAG,KAAE,GAAGD,OAAO;AACvB,IAAA,MAAME,KAAK,GAAGD,GAAG,KAAK,KAAK;AAE3B,IAAA,IAAIC,KAAK,EAAE;MACT,IAAIL,qBAAqB,KAAK,IAAI,EAAE;AAClCA,QAAAA,qBAAqB,GAAGM,yBAAyB,CAACP,gBAAgB,EAAEK,GAAG,CAAC;AAC1E,MAAA;AACF,IAAA,CAAC,MAAM;MACL,IAAIH,qBAAqB,KAAK,IAAI,EAAE;AAClCA,QAAAA,qBAAqB,GAAGK,yBAAyB,CAACP,gBAAgB,EAAEK,GAAG,CAAC;AAC1E,MAAA;AACF,IAAA;AAEA,IAAA,MAAMG,kBAAkB,GAAGF,KAAK,GAC3BL,qBAA+C,GAC/CC,qBAA+C;IAEpD,IAAIO,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAIC,iBAAiB,EAAE;AAC9DC,MAAAA,SAAS,CAACC,kBAAkB,CAACN,kBAAmB,CAAC;AACnD,IAAA;AAEA,IAAA,OAAOA,kBAAkB;AAC3B,EAAA;AAEA,EAAA,OAAOL,cAAc;AACvB;;;;"}

23
node_modules/@griffel/core/__resetCSS.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
'use strict';
var constants = require('./constants.cjs.js');
/**
* @internal
*/
function __resetCSS(ltrClassName, rtlClassName) {
function computeClassName(options) {
const {
dir
} = options;
const className = dir === 'ltr' ? ltrClassName : rtlClassName || ltrClassName;
if (process.env.NODE_ENV !== 'production') {
constants.DEBUG_RESET_CLASSES[className] = 1;
}
return className;
}
return computeClassName;
}
exports.__resetCSS = __resetCSS;
//# sourceMappingURL=__resetCSS.cjs.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"__resetCSS.cjs.js","sources":["../../../packages/core/src/__resetCSS.ts"],"sourcesContent":["import { DEBUG_RESET_CLASSES } from './constants';\nimport type { MakeResetStylesOptions } from './makeResetStyles';\n\n/**\n * @internal\n */\nexport function __resetCSS(ltrClassName: string, rtlClassName: string | null) {\n function computeClassName(options: Pick<MakeResetStylesOptions, 'dir'>): string {\n const { dir } = options;\n const className = dir === 'ltr' ? ltrClassName : rtlClassName || ltrClassName;\n\n if (process.env.NODE_ENV !== 'production') {\n DEBUG_RESET_CLASSES[className] = 1;\n }\n\n return className;\n }\n\n return computeClassName;\n}\n"],"names":["__resetCSS","ltrClassName","rtlClassName","computeClassName","options","dir","className","process","env","NODE_ENV","DEBUG_RESET_CLASSES"],"mappings":";;;;AAGA;;AAEG;AACG,SAAUA,UAAUA,CAACC,YAAoB,EAAEC,YAA2B,EAAA;EAC1E,SAASC,gBAAgBA,CAACC,OAA4C,EAAA;IACpE,MAAM;AAAEC,MAAAA;AAAG,KAAE,GAAGD,OAAO;IACvB,MAAME,SAAS,GAAGD,GAAG,KAAK,KAAK,GAAGJ,YAAY,GAAGC,YAAY,IAAID,YAAY;AAE7E,IAAA,IAAIM,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;AACzCC,MAAAA,6BAAmB,CAACJ,SAAS,CAAC,GAAG,CAAC;AACpC,IAAA;AAEA,IAAA,OAAOA,SAAS;AAClB,EAAA;AAEA,EAAA,OAAOH,gBAAgB;AACzB;;;;"}

21
node_modules/@griffel/core/__resetCSS.esm.js generated vendored Normal file
View File

@@ -0,0 +1,21 @@
import { DEBUG_RESET_CLASSES } from './constants.esm.js';
/**
* @internal
*/
function __resetCSS(ltrClassName, rtlClassName) {
function computeClassName(options) {
const {
dir
} = options;
const className = dir === 'ltr' ? ltrClassName : rtlClassName || ltrClassName;
if (process.env.NODE_ENV !== 'production') {
DEBUG_RESET_CLASSES[className] = 1;
}
return className;
}
return computeClassName;
}
export { __resetCSS };
//# sourceMappingURL=__resetCSS.esm.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"__resetCSS.esm.js","sources":["../../../packages/core/src/__resetCSS.ts"],"sourcesContent":["import { DEBUG_RESET_CLASSES } from './constants';\nimport type { MakeResetStylesOptions } from './makeResetStyles';\n\n/**\n * @internal\n */\nexport function __resetCSS(ltrClassName: string, rtlClassName: string | null) {\n function computeClassName(options: Pick<MakeResetStylesOptions, 'dir'>): string {\n const { dir } = options;\n const className = dir === 'ltr' ? ltrClassName : rtlClassName || ltrClassName;\n\n if (process.env.NODE_ENV !== 'production') {\n DEBUG_RESET_CLASSES[className] = 1;\n }\n\n return className;\n }\n\n return computeClassName;\n}\n"],"names":["__resetCSS","ltrClassName","rtlClassName","computeClassName","options","dir","className","process","env","NODE_ENV","DEBUG_RESET_CLASSES"],"mappings":";;AAGA;;AAEG;AACG,SAAUA,UAAUA,CAACC,YAAoB,EAAEC,YAA2B,EAAA;EAC1E,SAASC,gBAAgBA,CAACC,OAA4C,EAAA;IACpE,MAAM;AAAEC,MAAAA;AAAG,KAAE,GAAGD,OAAO;IACvB,MAAME,SAAS,GAAGD,GAAG,KAAK,KAAK,GAAGJ,YAAY,GAAGC,YAAY,IAAID,YAAY;AAE7E,IAAA,IAAIM,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;AACzCC,MAAAA,mBAAmB,CAACJ,SAAS,CAAC,GAAG,CAAC;AACpC,IAAA;AAEA,IAAA,OAAOA,SAAS;AAClB,EAAA;AAEA,EAAA,OAAOH,gBAAgB;AACzB;;;;"}

29
node_modules/@griffel/core/__resetStyles.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
'use strict';
var constants = require('./constants.cjs.js');
var insertionFactory = require('./insertionFactory.cjs.js');
/**
* @internal
*/
function __resetStyles(ltrClassName, rtlClassName, cssRules, factory = insertionFactory.insertionFactory) {
const insertStyles = factory();
function computeClassName(options) {
const {
dir,
renderer
} = options;
const className = dir === 'ltr' ? ltrClassName : rtlClassName || ltrClassName;
insertStyles(renderer, Array.isArray(cssRules) ? {
r: cssRules
} : cssRules);
if (process.env.NODE_ENV !== 'production') {
constants.DEBUG_RESET_CLASSES[className] = 1;
}
return className;
}
return computeClassName;
}
exports.__resetStyles = __resetStyles;
//# sourceMappingURL=__resetStyles.cjs.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"__resetStyles.cjs.js","sources":["../../../packages/core/src/__resetStyles.ts"],"sourcesContent":["import { DEBUG_RESET_CLASSES } from './constants';\nimport { insertionFactory } from './insertionFactory';\nimport type { MakeResetStylesOptions } from './makeResetStyles';\nimport type { CSSRulesByBucket, GriffelInsertionFactory } from './types';\n\n/**\n * @internal\n */\nexport function __resetStyles(\n ltrClassName: string,\n rtlClassName: string | null,\n cssRules: CSSRulesByBucket | string[],\n factory: GriffelInsertionFactory = insertionFactory,\n) {\n const insertStyles = factory();\n\n function computeClassName(options: MakeResetStylesOptions): string {\n const { dir, renderer } = options;\n const className = dir === 'ltr' ? ltrClassName : rtlClassName || ltrClassName;\n\n insertStyles(renderer, Array.isArray(cssRules) ? { r: cssRules! } : cssRules!);\n\n if (process.env.NODE_ENV !== 'production') {\n DEBUG_RESET_CLASSES[className] = 1;\n }\n\n return className;\n }\n\n return computeClassName;\n}\n"],"names":["__resetStyles","ltrClassName","rtlClassName","cssRules","factory","insertionFactory","insertStyles","computeClassName","options","dir","renderer","className","Array","isArray","r","process","env","NODE_ENV","DEBUG_RESET_CLASSES"],"mappings":";;;;;AAKA;;AAEG;AACG,SAAUA,aAAaA,CAC3BC,YAAoB,EACpBC,YAA2B,EAC3BC,QAAqC,EACrCC,OAAA,GAAmCC,iCAAgB,EAAA;AAEnD,EAAA,MAAMC,YAAY,GAAGF,OAAO,EAAE;EAE9B,SAASG,gBAAgBA,CAACC,OAA+B,EAAA;IACvD,MAAM;MAAEC,GAAG;AAAEC,MAAAA;AAAQ,KAAE,GAAGF,OAAO;IACjC,MAAMG,SAAS,GAAGF,GAAG,KAAK,KAAK,GAAGR,YAAY,GAAGC,YAAY,IAAID,YAAY;IAE7EK,YAAY,CAACI,QAAQ,EAAEE,KAAK,CAACC,OAAO,CAACV,QAAQ,CAAC,GAAG;AAAEW,MAAAA,CAAC,EAAEX;KAAW,GAAGA,QAAS,CAAC;AAE9E,IAAA,IAAIY,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;AACzCC,MAAAA,6BAAmB,CAACP,SAAS,CAAC,GAAG,CAAC;AACpC,IAAA;AAEA,IAAA,OAAOA,SAAS;AAClB,EAAA;AAEA,EAAA,OAAOJ,gBAAgB;AACzB;;;;"}

27
node_modules/@griffel/core/__resetStyles.esm.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
import { DEBUG_RESET_CLASSES } from './constants.esm.js';
import { insertionFactory } from './insertionFactory.esm.js';
/**
* @internal
*/
function __resetStyles(ltrClassName, rtlClassName, cssRules, factory = insertionFactory) {
const insertStyles = factory();
function computeClassName(options) {
const {
dir,
renderer
} = options;
const className = dir === 'ltr' ? ltrClassName : rtlClassName || ltrClassName;
insertStyles(renderer, Array.isArray(cssRules) ? {
r: cssRules
} : cssRules);
if (process.env.NODE_ENV !== 'production') {
DEBUG_RESET_CLASSES[className] = 1;
}
return className;
}
return computeClassName;
}
export { __resetStyles };
//# sourceMappingURL=__resetStyles.esm.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"__resetStyles.esm.js","sources":["../../../packages/core/src/__resetStyles.ts"],"sourcesContent":["import { DEBUG_RESET_CLASSES } from './constants';\nimport { insertionFactory } from './insertionFactory';\nimport type { MakeResetStylesOptions } from './makeResetStyles';\nimport type { CSSRulesByBucket, GriffelInsertionFactory } from './types';\n\n/**\n * @internal\n */\nexport function __resetStyles(\n ltrClassName: string,\n rtlClassName: string | null,\n cssRules: CSSRulesByBucket | string[],\n factory: GriffelInsertionFactory = insertionFactory,\n) {\n const insertStyles = factory();\n\n function computeClassName(options: MakeResetStylesOptions): string {\n const { dir, renderer } = options;\n const className = dir === 'ltr' ? ltrClassName : rtlClassName || ltrClassName;\n\n insertStyles(renderer, Array.isArray(cssRules) ? { r: cssRules! } : cssRules!);\n\n if (process.env.NODE_ENV !== 'production') {\n DEBUG_RESET_CLASSES[className] = 1;\n }\n\n return className;\n }\n\n return computeClassName;\n}\n"],"names":["__resetStyles","ltrClassName","rtlClassName","cssRules","factory","insertionFactory","insertStyles","computeClassName","options","dir","renderer","className","Array","isArray","r","process","env","NODE_ENV","DEBUG_RESET_CLASSES"],"mappings":";;;AAKA;;AAEG;AACG,SAAUA,aAAaA,CAC3BC,YAAoB,EACpBC,YAA2B,EAC3BC,QAAqC,EACrCC,OAAA,GAAmCC,gBAAgB,EAAA;AAEnD,EAAA,MAAMC,YAAY,GAAGF,OAAO,EAAE;EAE9B,SAASG,gBAAgBA,CAACC,OAA+B,EAAA;IACvD,MAAM;MAAEC,GAAG;AAAEC,MAAAA;AAAQ,KAAE,GAAGF,OAAO;IACjC,MAAMG,SAAS,GAAGF,GAAG,KAAK,KAAK,GAAGR,YAAY,GAAGC,YAAY,IAAID,YAAY;IAE7EK,YAAY,CAACI,QAAQ,EAAEE,KAAK,CAACC,OAAO,CAACV,QAAQ,CAAC,GAAG;AAAEW,MAAAA,CAAC,EAAEX;KAAW,GAAGA,QAAS,CAAC;AAE9E,IAAA,IAAIY,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;AACzCC,MAAAA,mBAAmB,CAACP,SAAS,CAAC,GAAG,CAAC;AACpC,IAAA;AAEA,IAAA,OAAOA,SAAS;AAClB,EAAA;AAEA,EAAA,OAAOJ,gBAAgB;AACzB;;;;"}

15
node_modules/@griffel/core/__staticCSS.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
'use strict';
/**
* A version of makeStaticStyles() that accepts build output as an input and skips all runtime transforms & DOM insertion.
*
* @internal
*/
function __staticCSS() {
// eslint-disable-next-line @typescript-eslint/no-empty-function
function useStaticStyles() {}
return useStaticStyles;
}
exports.__staticCSS = __staticCSS;
//# sourceMappingURL=__staticCSS.cjs.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"__staticCSS.cjs.js","sources":["../../../packages/core/src/__staticCSS.ts"],"sourcesContent":["/**\n * A version of makeStaticStyles() that accepts build output as an input and skips all runtime transforms & DOM insertion.\n *\n * @internal\n */\nexport function __staticCSS() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n function useStaticStyles(): void {}\n\n return useStaticStyles;\n}\n"],"names":["__staticCSS","useStaticStyles"],"mappings":";;AAAA;;;;AAIG;SACaA,WAAWA,GAAA;AACzB;EACA,SAASC,eAAeA,IAAU;AAElC,EAAA,OAAOA,eAAe;AACxB;;;;"}

13
node_modules/@griffel/core/__staticCSS.esm.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
/**
* A version of makeStaticStyles() that accepts build output as an input and skips all runtime transforms & DOM insertion.
*
* @internal
*/
function __staticCSS() {
// eslint-disable-next-line @typescript-eslint/no-empty-function
function useStaticStyles() {}
return useStaticStyles;
}
export { __staticCSS };
//# sourceMappingURL=__staticCSS.esm.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"__staticCSS.esm.js","sources":["../../../packages/core/src/__staticCSS.ts"],"sourcesContent":["/**\n * A version of makeStaticStyles() that accepts build output as an input and skips all runtime transforms & DOM insertion.\n *\n * @internal\n */\nexport function __staticCSS() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n function useStaticStyles(): void {}\n\n return useStaticStyles;\n}\n"],"names":["__staticCSS","useStaticStyles"],"mappings":"AAAA;;;;AAIG;SACaA,WAAWA,GAAA;AACzB;EACA,SAASC,eAAeA,IAAU;AAElC,EAAA,OAAOA,eAAe;AACxB;;;;"}

19
node_modules/@griffel/core/__staticStyles.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
'use strict';
var insertionFactory = require('./insertionFactory.cjs.js');
/**
* A version of makeStaticStyles() that accepts build output as an input and skips all runtime transforms.
*
* @internal
*/
function __staticStyles(cssRules, factory = insertionFactory.insertionFactory) {
const insertStyles = factory();
function useStaticStyles(options) {
insertStyles(options.renderer, cssRules);
}
return useStaticStyles;
}
exports.__staticStyles = __staticStyles;
//# sourceMappingURL=__staticStyles.cjs.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"__staticStyles.cjs.js","sources":["../../../packages/core/src/__staticStyles.ts"],"sourcesContent":["import { insertionFactory } from './insertionFactory';\nimport type { CSSRulesByBucket, GriffelInsertionFactory } from './types';\nimport type { MakeStaticStylesOptions } from './makeStaticStyles';\n\n/**\n * A version of makeStaticStyles() that accepts build output as an input and skips all runtime transforms.\n *\n * @internal\n */\nexport function __staticStyles(cssRules: CSSRulesByBucket, factory: GriffelInsertionFactory = insertionFactory) {\n const insertStyles = factory();\n\n function useStaticStyles(options: MakeStaticStylesOptions): void {\n insertStyles(options.renderer, cssRules);\n }\n\n return useStaticStyles;\n}\n"],"names":["__staticStyles","cssRules","factory","insertionFactory","insertStyles","useStaticStyles","options","renderer"],"mappings":";;;;AAIA;;;;AAIG;SACaA,cAAcA,CAACC,QAA0B,EAAEC,UAAmCC,iCAAgB,EAAA;AAC5G,EAAA,MAAMC,YAAY,GAAGF,OAAO,EAAE;EAE9B,SAASG,eAAeA,CAACC,OAAgC,EAAA;AACvDF,IAAAA,YAAY,CAACE,OAAO,CAACC,QAAQ,EAAEN,QAAQ,CAAC;AAC1C,EAAA;AAEA,EAAA,OAAOI,eAAe;AACxB;;;;"}

17
node_modules/@griffel/core/__staticStyles.esm.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
import { insertionFactory } from './insertionFactory.esm.js';
/**
* A version of makeStaticStyles() that accepts build output as an input and skips all runtime transforms.
*
* @internal
*/
function __staticStyles(cssRules, factory = insertionFactory) {
const insertStyles = factory();
function useStaticStyles(options) {
insertStyles(options.renderer, cssRules);
}
return useStaticStyles;
}
export { __staticStyles };
//# sourceMappingURL=__staticStyles.esm.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"__staticStyles.esm.js","sources":["../../../packages/core/src/__staticStyles.ts"],"sourcesContent":["import { insertionFactory } from './insertionFactory';\nimport type { CSSRulesByBucket, GriffelInsertionFactory } from './types';\nimport type { MakeStaticStylesOptions } from './makeStaticStyles';\n\n/**\n * A version of makeStaticStyles() that accepts build output as an input and skips all runtime transforms.\n *\n * @internal\n */\nexport function __staticStyles(cssRules: CSSRulesByBucket, factory: GriffelInsertionFactory = insertionFactory) {\n const insertStyles = factory();\n\n function useStaticStyles(options: MakeStaticStylesOptions): void {\n insertStyles(options.renderer, cssRules);\n }\n\n return useStaticStyles;\n}\n"],"names":["__staticStyles","cssRules","factory","insertionFactory","insertStyles","useStaticStyles","options","renderer"],"mappings":";;AAIA;;;;AAIG;SACaA,cAAcA,CAACC,QAA0B,EAAEC,UAAmCC,gBAAgB,EAAA;AAC5G,EAAA,MAAMC,YAAY,GAAGF,OAAO,EAAE;EAE9B,SAASG,eAAeA,CAACC,OAAgC,EAAA;AACvDF,IAAAA,YAAY,CAACE,OAAO,CAACC,QAAQ,EAAEN,QAAQ,CAAC;AAC1C,EAAA;AAEA,EAAA,OAAOI,eAAe;AACxB;;;;"}

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

@@ -0,0 +1,49 @@
'use strict';
require('./constants.cjs.js');
var store = require('./devtools/store.cjs.js');
var isDevToolsEnabled = require('./devtools/isDevToolsEnabled.cjs.js');
var getSourceURLfromError = require('./devtools/getSourceURLfromError.cjs.js');
var insertionFactory = require('./insertionFactory.cjs.js');
var reduceToClassNameForSlots = require('./runtime/reduceToClassNameForSlots.cjs.js');
/**
* A version of makeStyles() that accepts build output as an input and skips all runtime transforms.
*
* @internal
*/
function __styles(classesMapBySlot, cssRules, factory = insertionFactory.insertionFactory) {
const insertStyles = factory();
let ltrClassNamesForSlots = null;
let rtlClassNamesForSlots = null;
let sourceURL;
if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled.isDevToolsEnabled) {
sourceURL = getSourceURLfromError.getSourceURLfromError();
}
function computeClasses(options) {
const {
dir,
renderer
} = options;
const isLTR = dir === 'ltr';
if (isLTR) {
if (ltrClassNamesForSlots === null) {
ltrClassNamesForSlots = reduceToClassNameForSlots.reduceToClassNameForSlots(classesMapBySlot, dir);
}
} else {
if (rtlClassNamesForSlots === null) {
rtlClassNamesForSlots = reduceToClassNameForSlots.reduceToClassNameForSlots(classesMapBySlot, dir);
}
}
insertStyles(renderer, cssRules);
const classNamesForSlots = isLTR ? ltrClassNamesForSlots : rtlClassNamesForSlots;
if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled.isDevToolsEnabled) {
store.debugData.addSequenceDetails(classNamesForSlots, sourceURL);
}
return classNamesForSlots;
}
return computeClasses;
}
exports.__styles = __styles;
//# sourceMappingURL=__styles.cjs.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"__styles.cjs.js","sources":["../../../packages/core/src/__styles.ts"],"sourcesContent":["import { debugData, isDevToolsEnabled, getSourceURLfromError } from './devtools';\nimport { insertionFactory } from './insertionFactory';\nimport { reduceToClassNameForSlots } from './runtime/reduceToClassNameForSlots';\nimport type { CSSClassesMapBySlot, CSSRulesByBucket, GriffelInsertionFactory } from './types';\nimport type { MakeStylesOptions } from './makeStyles';\n\n/**\n * A version of makeStyles() that accepts build output as an input and skips all runtime transforms.\n *\n * @internal\n */\nexport function __styles<Slots extends string>(\n classesMapBySlot: CSSClassesMapBySlot<Slots>,\n cssRules: CSSRulesByBucket,\n factory: GriffelInsertionFactory = insertionFactory,\n) {\n const insertStyles = factory();\n\n let ltrClassNamesForSlots: Record<Slots, string> | null = null;\n let rtlClassNamesForSlots: Record<Slots, string> | null = null;\n\n let sourceURL: string | undefined;\n if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {\n sourceURL = getSourceURLfromError();\n }\n\n function computeClasses(options: Pick<MakeStylesOptions, 'dir' | 'renderer'>): Record<Slots, string> {\n const { dir, renderer } = options;\n const isLTR = dir === 'ltr';\n\n if (isLTR) {\n if (ltrClassNamesForSlots === null) {\n ltrClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);\n }\n } else {\n if (rtlClassNamesForSlots === null) {\n rtlClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);\n }\n }\n\n insertStyles(renderer, cssRules);\n\n const classNamesForSlots = isLTR\n ? (ltrClassNamesForSlots as Record<Slots, string>)\n : (rtlClassNamesForSlots as Record<Slots, string>);\n\n if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {\n debugData.addSequenceDetails(classNamesForSlots!, sourceURL);\n }\n\n return classNamesForSlots;\n }\n\n return computeClasses;\n}\n"],"names":["__styles","classesMapBySlot","cssRules","factory","insertionFactory","insertStyles","ltrClassNamesForSlots","rtlClassNamesForSlots","sourceURL","process","env","NODE_ENV","isDevToolsEnabled","getSourceURLfromError","computeClasses","options","dir","renderer","isLTR","reduceToClassNameForSlots","classNamesForSlots","debugData","addSequenceDetails"],"mappings":";;;;;;;;;AAMA;;;;AAIG;AACG,SAAUA,QAAQA,CACtBC,gBAA4C,EAC5CC,QAA0B,EAC1BC,UAAmCC,iCAAgB,EAAA;AAEnD,EAAA,MAAMC,YAAY,GAAGF,OAAO,EAAE;EAE9B,IAAIG,qBAAqB,GAAiC,IAAI;EAC9D,IAAIC,qBAAqB,GAAiC,IAAI;AAE9D,EAAA,IAAIC,SAA6B;EACjC,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAIC,mCAAiB,EAAE;IAC9DJ,SAAS,GAAGK,2CAAqB,EAAE;AACrC,EAAA;EAEA,SAASC,cAAcA,CAACC,OAAoD,EAAA;IAC1E,MAAM;MAAEC,GAAG;AAAEC,MAAAA;AAAQ,KAAE,GAAGF,OAAO;AACjC,IAAA,MAAMG,KAAK,GAAGF,GAAG,KAAK,KAAK;AAE3B,IAAA,IAAIE,KAAK,EAAE;MACT,IAAIZ,qBAAqB,KAAK,IAAI,EAAE;AAClCA,QAAAA,qBAAqB,GAAGa,mDAAyB,CAAClB,gBAAgB,EAAEe,GAAG,CAAC;AAC1E,MAAA;AACF,IAAA,CAAC,MAAM;MACL,IAAIT,qBAAqB,KAAK,IAAI,EAAE;AAClCA,QAAAA,qBAAqB,GAAGY,mDAAyB,CAAClB,gBAAgB,EAAEe,GAAG,CAAC;AAC1E,MAAA;AACF,IAAA;AAEAX,IAAAA,YAAY,CAACY,QAAQ,EAAEf,QAAQ,CAAC;AAEhC,IAAA,MAAMkB,kBAAkB,GAAGF,KAAK,GAC3BZ,qBAA+C,GAC/CC,qBAA+C;IAEpD,IAAIE,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAIC,mCAAiB,EAAE;AAC9DS,MAAAA,eAAS,CAACC,kBAAkB,CAACF,kBAAmB,EAAEZ,SAAS,CAAC;AAC9D,IAAA;AAEA,IAAA,OAAOY,kBAAkB;AAC3B,EAAA;AAEA,EAAA,OAAON,cAAc;AACvB;;;;"}

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

@@ -0,0 +1,47 @@
import './constants.esm.js';
import { debugData } from './devtools/store.esm.js';
import { isDevToolsEnabled } from './devtools/isDevToolsEnabled.esm.js';
import { getSourceURLfromError } from './devtools/getSourceURLfromError.esm.js';
import { insertionFactory } from './insertionFactory.esm.js';
import { reduceToClassNameForSlots } from './runtime/reduceToClassNameForSlots.esm.js';
/**
* A version of makeStyles() that accepts build output as an input and skips all runtime transforms.
*
* @internal
*/
function __styles(classesMapBySlot, cssRules, factory = insertionFactory) {
const insertStyles = factory();
let ltrClassNamesForSlots = null;
let rtlClassNamesForSlots = null;
let sourceURL;
if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {
sourceURL = getSourceURLfromError();
}
function computeClasses(options) {
const {
dir,
renderer
} = options;
const isLTR = dir === 'ltr';
if (isLTR) {
if (ltrClassNamesForSlots === null) {
ltrClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);
}
} else {
if (rtlClassNamesForSlots === null) {
rtlClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);
}
}
insertStyles(renderer, cssRules);
const classNamesForSlots = isLTR ? ltrClassNamesForSlots : rtlClassNamesForSlots;
if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {
debugData.addSequenceDetails(classNamesForSlots, sourceURL);
}
return classNamesForSlots;
}
return computeClasses;
}
export { __styles };
//# sourceMappingURL=__styles.esm.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"__styles.esm.js","sources":["../../../packages/core/src/__styles.ts"],"sourcesContent":["import { debugData, isDevToolsEnabled, getSourceURLfromError } from './devtools';\nimport { insertionFactory } from './insertionFactory';\nimport { reduceToClassNameForSlots } from './runtime/reduceToClassNameForSlots';\nimport type { CSSClassesMapBySlot, CSSRulesByBucket, GriffelInsertionFactory } from './types';\nimport type { MakeStylesOptions } from './makeStyles';\n\n/**\n * A version of makeStyles() that accepts build output as an input and skips all runtime transforms.\n *\n * @internal\n */\nexport function __styles<Slots extends string>(\n classesMapBySlot: CSSClassesMapBySlot<Slots>,\n cssRules: CSSRulesByBucket,\n factory: GriffelInsertionFactory = insertionFactory,\n) {\n const insertStyles = factory();\n\n let ltrClassNamesForSlots: Record<Slots, string> | null = null;\n let rtlClassNamesForSlots: Record<Slots, string> | null = null;\n\n let sourceURL: string | undefined;\n if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {\n sourceURL = getSourceURLfromError();\n }\n\n function computeClasses(options: Pick<MakeStylesOptions, 'dir' | 'renderer'>): Record<Slots, string> {\n const { dir, renderer } = options;\n const isLTR = dir === 'ltr';\n\n if (isLTR) {\n if (ltrClassNamesForSlots === null) {\n ltrClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);\n }\n } else {\n if (rtlClassNamesForSlots === null) {\n rtlClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);\n }\n }\n\n insertStyles(renderer, cssRules);\n\n const classNamesForSlots = isLTR\n ? (ltrClassNamesForSlots as Record<Slots, string>)\n : (rtlClassNamesForSlots as Record<Slots, string>);\n\n if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {\n debugData.addSequenceDetails(classNamesForSlots!, sourceURL);\n }\n\n return classNamesForSlots;\n }\n\n return computeClasses;\n}\n"],"names":["__styles","classesMapBySlot","cssRules","factory","insertionFactory","insertStyles","ltrClassNamesForSlots","rtlClassNamesForSlots","sourceURL","process","env","NODE_ENV","isDevToolsEnabled","getSourceURLfromError","computeClasses","options","dir","renderer","isLTR","reduceToClassNameForSlots","classNamesForSlots","debugData","addSequenceDetails"],"mappings":";;;;;;;AAMA;;;;AAIG;AACG,SAAUA,QAAQA,CACtBC,gBAA4C,EAC5CC,QAA0B,EAC1BC,UAAmCC,gBAAgB,EAAA;AAEnD,EAAA,MAAMC,YAAY,GAAGF,OAAO,EAAE;EAE9B,IAAIG,qBAAqB,GAAiC,IAAI;EAC9D,IAAIC,qBAAqB,GAAiC,IAAI;AAE9D,EAAA,IAAIC,SAA6B;EACjC,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAIC,iBAAiB,EAAE;IAC9DJ,SAAS,GAAGK,qBAAqB,EAAE;AACrC,EAAA;EAEA,SAASC,cAAcA,CAACC,OAAoD,EAAA;IAC1E,MAAM;MAAEC,GAAG;AAAEC,MAAAA;AAAQ,KAAE,GAAGF,OAAO;AACjC,IAAA,MAAMG,KAAK,GAAGF,GAAG,KAAK,KAAK;AAE3B,IAAA,IAAIE,KAAK,EAAE;MACT,IAAIZ,qBAAqB,KAAK,IAAI,EAAE;AAClCA,QAAAA,qBAAqB,GAAGa,yBAAyB,CAAClB,gBAAgB,EAAEe,GAAG,CAAC;AAC1E,MAAA;AACF,IAAA,CAAC,MAAM;MACL,IAAIT,qBAAqB,KAAK,IAAI,EAAE;AAClCA,QAAAA,qBAAqB,GAAGY,yBAAyB,CAAClB,gBAAgB,EAAEe,GAAG,CAAC;AAC1E,MAAA;AACF,IAAA;AAEAX,IAAAA,YAAY,CAACY,QAAQ,EAAEf,QAAQ,CAAC;AAEhC,IAAA,MAAMkB,kBAAkB,GAAGF,KAAK,GAC3BZ,qBAA+C,GAC/CC,qBAA+C;IAEpD,IAAIE,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAIC,iBAAiB,EAAE;AAC9DS,MAAAA,SAAS,CAACC,kBAAkB,CAACF,kBAAmB,EAAEZ,SAAS,CAAC;AAC9D,IAAA;AAEA,IAAA,OAAOY,kBAAkB;AAC3B,EAAA;AAEA,EAAA,OAAON,cAAc;AACvB;;;;"}

80
node_modules/@griffel/core/constants.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,80 @@
'use strict';
// ----
// Heads up!
// These constants are global and will be shared between Griffel instances.
// Any change in them should happen only in a MAJOR version. If it happens,
// please change "__NAMESPACE_PREFIX__" to include a version.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const __GLOBAL__ = typeof window === 'undefined' ? global : window;
const __NAMESPACE_PREFIX__ = '@griffel/';
function getGlobalVar(name, defaultValue) {
if (!__GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)]) {
__GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)] = defaultValue;
}
return __GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)];
}
/** @internal */
const DEBUG_RESET_CLASSES = /*#__PURE__*/getGlobalVar('DEBUG_RESET_CLASSES', {});
/** @internal */
const DEFINITION_LOOKUP_TABLE = /*#__PURE__*/getGlobalVar('DEFINITION_LOOKUP_TABLE', {});
// ----
/** @internal */
const DATA_BUCKET_ATTR = 'data-make-styles-bucket';
/** @internal */
const DATA_PRIORITY_ATTR = 'data-priority';
/** @internal */
const HASH_PREFIX = 'f';
/** @internal */
const RESET_HASH_PREFIX = 'r';
/** @internal */
const SEQUENCE_HASH_LENGTH = 7;
/** @internal */
const SEQUENCE_PREFIX = '___';
/** @internal */
const DEBUG_SEQUENCE_SEPARATOR = '_';
/** @internal */
const SEQUENCE_SIZE = process.env.NODE_ENV === 'production' ? SEQUENCE_PREFIX.length + SEQUENCE_HASH_LENGTH : SEQUENCE_PREFIX.length + SEQUENCE_HASH_LENGTH + DEBUG_SEQUENCE_SEPARATOR.length + SEQUENCE_HASH_LENGTH;
// indexes for values in LookupItem tuple
/** @internal */
const LOOKUP_DEFINITIONS_INDEX = 0;
/** @internal */
const LOOKUP_DIR_INDEX = 1;
// This collection is a map simply for faster access when checking if a CSS property is unsupported
/** @internal */
const UNSUPPORTED_CSS_PROPERTIES = {
all: 1,
borderColor: 1,
borderStyle: 1,
borderWidth: 1,
borderBlock: 1,
borderBlockEnd: 1,
borderBlockStart: 1,
borderInline: 1,
borderInlineEnd: 1,
borderInlineStart: 1
};
/**
* Removes a CSS property from the style object.
*
* @link https://griffel.js.org/react/api/make-styles
*
* Do not use the value directly, use `RESET` constant instead.
*/
const RESET = 'DO_NOT_USE_DIRECTLY: @griffel/reset-value';
exports.DATA_BUCKET_ATTR = DATA_BUCKET_ATTR;
exports.DATA_PRIORITY_ATTR = DATA_PRIORITY_ATTR;
exports.DEBUG_RESET_CLASSES = DEBUG_RESET_CLASSES;
exports.DEBUG_SEQUENCE_SEPARATOR = DEBUG_SEQUENCE_SEPARATOR;
exports.DEFINITION_LOOKUP_TABLE = DEFINITION_LOOKUP_TABLE;
exports.HASH_PREFIX = HASH_PREFIX;
exports.LOOKUP_DEFINITIONS_INDEX = LOOKUP_DEFINITIONS_INDEX;
exports.LOOKUP_DIR_INDEX = LOOKUP_DIR_INDEX;
exports.RESET = RESET;
exports.RESET_HASH_PREFIX = RESET_HASH_PREFIX;
exports.SEQUENCE_HASH_LENGTH = SEQUENCE_HASH_LENGTH;
exports.SEQUENCE_PREFIX = SEQUENCE_PREFIX;
exports.SEQUENCE_SIZE = SEQUENCE_SIZE;
exports.UNSUPPORTED_CSS_PROPERTIES = UNSUPPORTED_CSS_PROPERTIES;
//# sourceMappingURL=constants.cjs.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"constants.cjs.js","sources":["../../../packages/core/src/constants.ts"],"sourcesContent":["import type { GriffelStylesUnsupportedCSSProperties } from '@griffel/style-types';\nimport type { LookupItem, SequenceHash } from './types';\n\n// ----\n\n// Heads up!\n// These constants are global and will be shared between Griffel instances.\n// Any change in them should happen only in a MAJOR version. If it happens,\n// please change \"__NAMESPACE_PREFIX__\" to include a version.\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst __GLOBAL__: any = typeof window === 'undefined' ? global : window;\nconst __NAMESPACE_PREFIX__ = '@griffel/';\n\nfunction getGlobalVar<T>(name: string, defaultValue: T): T {\n if (!__GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)]) {\n __GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)] = defaultValue;\n }\n\n return __GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)];\n}\n\n/** @internal */\nexport const DEBUG_RESET_CLASSES = getGlobalVar<Record<string, 1>>('DEBUG_RESET_CLASSES', {});\n\n/** @internal */\nexport const DEFINITION_LOOKUP_TABLE = getGlobalVar<Record<SequenceHash, LookupItem>>('DEFINITION_LOOKUP_TABLE', {});\n\n// ----\n\n/** @internal */\nexport const DATA_BUCKET_ATTR = 'data-make-styles-bucket';\n\n/** @internal */\nexport const DATA_PRIORITY_ATTR = 'data-priority';\n\n/** @internal */\nexport const HASH_PREFIX = 'f';\n\n/** @internal */\nexport const RESET_HASH_PREFIX = 'r';\n\n/** @internal */\nexport const SEQUENCE_HASH_LENGTH = 7;\n\n/** @internal */\nexport const SEQUENCE_PREFIX = '___';\n\n/** @internal */\nexport const DEBUG_SEQUENCE_SEPARATOR = '_';\n\n/** @internal */\nexport const SEQUENCE_SIZE =\n process.env.NODE_ENV === 'production'\n ? SEQUENCE_PREFIX.length + SEQUENCE_HASH_LENGTH\n : SEQUENCE_PREFIX.length + SEQUENCE_HASH_LENGTH + DEBUG_SEQUENCE_SEPARATOR.length + SEQUENCE_HASH_LENGTH;\n\n// indexes for values in LookupItem tuple\n\n/** @internal */\nexport const LOOKUP_DEFINITIONS_INDEX = 0;\n\n/** @internal */\nexport const LOOKUP_DIR_INDEX = 1;\n\n// This collection is a map simply for faster access when checking if a CSS property is unsupported\n/** @internal */\nexport const UNSUPPORTED_CSS_PROPERTIES: Record<keyof GriffelStylesUnsupportedCSSProperties, 1> = {\n all: 1,\n borderColor: 1,\n borderStyle: 1,\n borderWidth: 1,\n\n borderBlock: 1,\n borderBlockEnd: 1,\n borderBlockStart: 1,\n borderInline: 1,\n borderInlineEnd: 1,\n borderInlineStart: 1,\n} as const;\n\n/**\n * Removes a CSS property from the style object.\n *\n * @link https://griffel.js.org/react/api/make-styles\n *\n * Do not use the value directly, use `RESET` constant instead.\n */\nexport const RESET = 'DO_NOT_USE_DIRECTLY: @griffel/reset-value' as unknown as 'unset';\n"],"names":["__GLOBAL__","window","global","__NAMESPACE_PREFIX__","getGlobalVar","name","defaultValue","Symbol","for","DEBUG_RESET_CLASSES","DEFINITION_LOOKUP_TABLE","DATA_BUCKET_ATTR","DATA_PRIORITY_ATTR","HASH_PREFIX","RESET_HASH_PREFIX","SEQUENCE_HASH_LENGTH","SEQUENCE_PREFIX","DEBUG_SEQUENCE_SEPARATOR","SEQUENCE_SIZE","process","env","NODE_ENV","length","LOOKUP_DEFINITIONS_INDEX","LOOKUP_DIR_INDEX","UNSUPPORTED_CSS_PROPERTIES","all","borderColor","borderStyle","borderWidth","borderBlock","borderBlockEnd","borderBlockStart","borderInline","borderInlineEnd","borderInlineStart","RESET"],"mappings":";;AAGA;AAEA;AACA;AACA;AACA;AAEA;AACA,MAAMA,UAAU,GAAQ,OAAOC,MAAM,KAAK,WAAW,GAAGC,MAAM,GAAGD,MAAM;AACvE,MAAME,oBAAoB,GAAG,WAAW;AAExC,SAASC,YAAYA,CAAIC,IAAY,EAAEC,YAAe,EAAA;AACpD,EAAA,IAAI,CAACN,UAAU,CAACO,MAAM,CAACC,GAAG,CAACL,oBAAoB,GAAGE,IAAI,CAAC,CAAC,EAAE;IACxDL,UAAU,CAACO,MAAM,CAACC,GAAG,CAACL,oBAAoB,GAAGE,IAAI,CAAC,CAAC,GAAGC,YAAY;AACpE,EAAA;EAEA,OAAON,UAAU,CAACO,MAAM,CAACC,GAAG,CAACL,oBAAoB,GAAGE,IAAI,CAAC,CAAC;AAC5D;AAEA;AACO,MAAMI,mBAAmB,gBAAGL,YAAY,CAAoB,qBAAqB,EAAE,EAAE;AAE5F;AACO,MAAMM,uBAAuB,gBAAGN,YAAY,CAAmC,yBAAyB,EAAE,EAAE;AAEnH;AAEA;AACO,MAAMO,gBAAgB,GAAG;AAEhC;AACO,MAAMC,kBAAkB,GAAG;AAElC;AACO,MAAMC,WAAW,GAAG;AAE3B;AACO,MAAMC,iBAAiB,GAAG;AAEjC;AACO,MAAMC,oBAAoB,GAAG;AAEpC;AACO,MAAMC,eAAe,GAAG;AAE/B;AACO,MAAMC,wBAAwB,GAAG;AAExC;AACO,MAAMC,aAAa,GACxBC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GACjCL,eAAe,CAACM,MAAM,GAAGP,oBAAoB,GAC7CC,eAAe,CAACM,MAAM,GAAGP,oBAAoB,GAAGE,wBAAwB,CAACK,MAAM,GAAGP;AAExF;AAEA;AACO,MAAMQ,wBAAwB,GAAG;AAExC;AACO,MAAMC,gBAAgB,GAAG;AAEhC;AACA;AACO,MAAMC,0BAA0B,GAA2D;AAChGC,EAAAA,GAAG,EAAE,CAAC;AACNC,EAAAA,WAAW,EAAE,CAAC;AACdC,EAAAA,WAAW,EAAE,CAAC;AACdC,EAAAA,WAAW,EAAE,CAAC;AAEdC,EAAAA,WAAW,EAAE,CAAC;AACdC,EAAAA,cAAc,EAAE,CAAC;AACjBC,EAAAA,gBAAgB,EAAE,CAAC;AACnBC,EAAAA,YAAY,EAAE,CAAC;AACfC,EAAAA,eAAe,EAAE,CAAC;AAClBC,EAAAA,iBAAiB,EAAE;;AAGrB;;;;;;AAMG;AACI,MAAMC,KAAK,GAAG;;;;;;;;;;;;;;;;;"}

65
node_modules/@griffel/core/constants.esm.js generated vendored Normal file
View File

@@ -0,0 +1,65 @@
// ----
// Heads up!
// These constants are global and will be shared between Griffel instances.
// Any change in them should happen only in a MAJOR version. If it happens,
// please change "__NAMESPACE_PREFIX__" to include a version.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const __GLOBAL__ = typeof window === 'undefined' ? global : window;
const __NAMESPACE_PREFIX__ = '@griffel/';
function getGlobalVar(name, defaultValue) {
if (!__GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)]) {
__GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)] = defaultValue;
}
return __GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)];
}
/** @internal */
const DEBUG_RESET_CLASSES = /*#__PURE__*/getGlobalVar('DEBUG_RESET_CLASSES', {});
/** @internal */
const DEFINITION_LOOKUP_TABLE = /*#__PURE__*/getGlobalVar('DEFINITION_LOOKUP_TABLE', {});
// ----
/** @internal */
const DATA_BUCKET_ATTR = 'data-make-styles-bucket';
/** @internal */
const DATA_PRIORITY_ATTR = 'data-priority';
/** @internal */
const HASH_PREFIX = 'f';
/** @internal */
const RESET_HASH_PREFIX = 'r';
/** @internal */
const SEQUENCE_HASH_LENGTH = 7;
/** @internal */
const SEQUENCE_PREFIX = '___';
/** @internal */
const DEBUG_SEQUENCE_SEPARATOR = '_';
/** @internal */
const SEQUENCE_SIZE = process.env.NODE_ENV === 'production' ? SEQUENCE_PREFIX.length + SEQUENCE_HASH_LENGTH : SEQUENCE_PREFIX.length + SEQUENCE_HASH_LENGTH + DEBUG_SEQUENCE_SEPARATOR.length + SEQUENCE_HASH_LENGTH;
// indexes for values in LookupItem tuple
/** @internal */
const LOOKUP_DEFINITIONS_INDEX = 0;
/** @internal */
const LOOKUP_DIR_INDEX = 1;
// This collection is a map simply for faster access when checking if a CSS property is unsupported
/** @internal */
const UNSUPPORTED_CSS_PROPERTIES = {
all: 1,
borderColor: 1,
borderStyle: 1,
borderWidth: 1,
borderBlock: 1,
borderBlockEnd: 1,
borderBlockStart: 1,
borderInline: 1,
borderInlineEnd: 1,
borderInlineStart: 1
};
/**
* Removes a CSS property from the style object.
*
* @link https://griffel.js.org/react/api/make-styles
*
* Do not use the value directly, use `RESET` constant instead.
*/
const RESET = 'DO_NOT_USE_DIRECTLY: @griffel/reset-value';
export { DATA_BUCKET_ATTR, DATA_PRIORITY_ATTR, DEBUG_RESET_CLASSES, DEBUG_SEQUENCE_SEPARATOR, DEFINITION_LOOKUP_TABLE, HASH_PREFIX, LOOKUP_DEFINITIONS_INDEX, LOOKUP_DIR_INDEX, RESET, RESET_HASH_PREFIX, SEQUENCE_HASH_LENGTH, SEQUENCE_PREFIX, SEQUENCE_SIZE, UNSUPPORTED_CSS_PROPERTIES };
//# sourceMappingURL=constants.esm.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"constants.esm.js","sources":["../../../packages/core/src/constants.ts"],"sourcesContent":["import type { GriffelStylesUnsupportedCSSProperties } from '@griffel/style-types';\nimport type { LookupItem, SequenceHash } from './types';\n\n// ----\n\n// Heads up!\n// These constants are global and will be shared between Griffel instances.\n// Any change in them should happen only in a MAJOR version. If it happens,\n// please change \"__NAMESPACE_PREFIX__\" to include a version.\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst __GLOBAL__: any = typeof window === 'undefined' ? global : window;\nconst __NAMESPACE_PREFIX__ = '@griffel/';\n\nfunction getGlobalVar<T>(name: string, defaultValue: T): T {\n if (!__GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)]) {\n __GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)] = defaultValue;\n }\n\n return __GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)];\n}\n\n/** @internal */\nexport const DEBUG_RESET_CLASSES = getGlobalVar<Record<string, 1>>('DEBUG_RESET_CLASSES', {});\n\n/** @internal */\nexport const DEFINITION_LOOKUP_TABLE = getGlobalVar<Record<SequenceHash, LookupItem>>('DEFINITION_LOOKUP_TABLE', {});\n\n// ----\n\n/** @internal */\nexport const DATA_BUCKET_ATTR = 'data-make-styles-bucket';\n\n/** @internal */\nexport const DATA_PRIORITY_ATTR = 'data-priority';\n\n/** @internal */\nexport const HASH_PREFIX = 'f';\n\n/** @internal */\nexport const RESET_HASH_PREFIX = 'r';\n\n/** @internal */\nexport const SEQUENCE_HASH_LENGTH = 7;\n\n/** @internal */\nexport const SEQUENCE_PREFIX = '___';\n\n/** @internal */\nexport const DEBUG_SEQUENCE_SEPARATOR = '_';\n\n/** @internal */\nexport const SEQUENCE_SIZE =\n process.env.NODE_ENV === 'production'\n ? SEQUENCE_PREFIX.length + SEQUENCE_HASH_LENGTH\n : SEQUENCE_PREFIX.length + SEQUENCE_HASH_LENGTH + DEBUG_SEQUENCE_SEPARATOR.length + SEQUENCE_HASH_LENGTH;\n\n// indexes for values in LookupItem tuple\n\n/** @internal */\nexport const LOOKUP_DEFINITIONS_INDEX = 0;\n\n/** @internal */\nexport const LOOKUP_DIR_INDEX = 1;\n\n// This collection is a map simply for faster access when checking if a CSS property is unsupported\n/** @internal */\nexport const UNSUPPORTED_CSS_PROPERTIES: Record<keyof GriffelStylesUnsupportedCSSProperties, 1> = {\n all: 1,\n borderColor: 1,\n borderStyle: 1,\n borderWidth: 1,\n\n borderBlock: 1,\n borderBlockEnd: 1,\n borderBlockStart: 1,\n borderInline: 1,\n borderInlineEnd: 1,\n borderInlineStart: 1,\n} as const;\n\n/**\n * Removes a CSS property from the style object.\n *\n * @link https://griffel.js.org/react/api/make-styles\n *\n * Do not use the value directly, use `RESET` constant instead.\n */\nexport const RESET = 'DO_NOT_USE_DIRECTLY: @griffel/reset-value' as unknown as 'unset';\n"],"names":["__GLOBAL__","window","global","__NAMESPACE_PREFIX__","getGlobalVar","name","defaultValue","Symbol","for","DEBUG_RESET_CLASSES","DEFINITION_LOOKUP_TABLE","DATA_BUCKET_ATTR","DATA_PRIORITY_ATTR","HASH_PREFIX","RESET_HASH_PREFIX","SEQUENCE_HASH_LENGTH","SEQUENCE_PREFIX","DEBUG_SEQUENCE_SEPARATOR","SEQUENCE_SIZE","process","env","NODE_ENV","length","LOOKUP_DEFINITIONS_INDEX","LOOKUP_DIR_INDEX","UNSUPPORTED_CSS_PROPERTIES","all","borderColor","borderStyle","borderWidth","borderBlock","borderBlockEnd","borderBlockStart","borderInline","borderInlineEnd","borderInlineStart","RESET"],"mappings":"AAGA;AAEA;AACA;AACA;AACA;AAEA;AACA,MAAMA,UAAU,GAAQ,OAAOC,MAAM,KAAK,WAAW,GAAGC,MAAM,GAAGD,MAAM;AACvE,MAAME,oBAAoB,GAAG,WAAW;AAExC,SAASC,YAAYA,CAAIC,IAAY,EAAEC,YAAe,EAAA;AACpD,EAAA,IAAI,CAACN,UAAU,CAACO,MAAM,CAACC,GAAG,CAACL,oBAAoB,GAAGE,IAAI,CAAC,CAAC,EAAE;IACxDL,UAAU,CAACO,MAAM,CAACC,GAAG,CAACL,oBAAoB,GAAGE,IAAI,CAAC,CAAC,GAAGC,YAAY;AACpE,EAAA;EAEA,OAAON,UAAU,CAACO,MAAM,CAACC,GAAG,CAACL,oBAAoB,GAAGE,IAAI,CAAC,CAAC;AAC5D;AAEA;AACO,MAAMI,mBAAmB,gBAAGL,YAAY,CAAoB,qBAAqB,EAAE,EAAE;AAE5F;AACO,MAAMM,uBAAuB,gBAAGN,YAAY,CAAmC,yBAAyB,EAAE,EAAE;AAEnH;AAEA;AACO,MAAMO,gBAAgB,GAAG;AAEhC;AACO,MAAMC,kBAAkB,GAAG;AAElC;AACO,MAAMC,WAAW,GAAG;AAE3B;AACO,MAAMC,iBAAiB,GAAG;AAEjC;AACO,MAAMC,oBAAoB,GAAG;AAEpC;AACO,MAAMC,eAAe,GAAG;AAE/B;AACO,MAAMC,wBAAwB,GAAG;AAExC;AACO,MAAMC,aAAa,GACxBC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GACjCL,eAAe,CAACM,MAAM,GAAGP,oBAAoB,GAC7CC,eAAe,CAACM,MAAM,GAAGP,oBAAoB,GAAGE,wBAAwB,CAACK,MAAM,GAAGP;AAExF;AAEA;AACO,MAAMQ,wBAAwB,GAAG;AAExC;AACO,MAAMC,gBAAgB,GAAG;AAEhC;AACA;AACO,MAAMC,0BAA0B,GAA2D;AAChGC,EAAAA,GAAG,EAAE,CAAC;AACNC,EAAAA,WAAW,EAAE,CAAC;AACdC,EAAAA,WAAW,EAAE,CAAC;AACdC,EAAAA,WAAW,EAAE,CAAC;AAEdC,EAAAA,WAAW,EAAE,CAAC;AACdC,EAAAA,cAAc,EAAE,CAAC;AACjBC,EAAAA,gBAAgB,EAAE,CAAC;AACnBC,EAAAA,YAAY,EAAE,CAAC;AACfC,EAAAA,eAAe,EAAE,CAAC;AAClBC,EAAAA,iBAAiB,EAAE;;AAGrB;;;;;;AAMG;AACI,MAAMC,KAAK,GAAG;;;;"}

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;AAC5B,IAAA,OAAOA,SAAS;AAClB,EAAA;EAEA,MAAMC,gBAAgB,GAAGJ,UAAU,GAAGE,iCAAuB,CAACF,UAAU,CAACK,YAAY,CAAC,GAAGF,SAAS;AAClG,EAAA,MAAMG,eAAe,GAAGC,wBAAkB,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,eAAS,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,eAAS,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,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,IAAI,CAACR,IAAI,CAAC;EAEzD,IAAI,CAACO,KAAK,EAAE;AACV,IAAA,OAAO,IAAI;AACb,EAAA;AAEA,EAAA,IAAIE,GAAG,GAAGF,KAAK,CAAC,CAAC,CAAC;AAClB,EAAA,MAAMG,QAAQ,GAAGD,GAAG,IAAIA,GAAG,CAACE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpD,EAAA,MAAMC,MAAM,GAAGH,GAAG,IAAIA,GAAG,CAACE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAEhD,EAAA,MAAME,QAAQ,GAAGP,YAAY,CAACE,IAAI,CAACC,GAAG,CAAC;AACvC,EAAA,IAAIG,MAAM,IAAIC,QAAQ,IAAI,IAAI,EAAE;AAC9B;AACAJ,IAAAA,GAAG,GAAGI,QAAQ,CAAC,CAAC,CAAC,CAAC;AACpB,EAAA;EAEA,OAAO;IACLJ,GAAG,EAAE,CAACC,QAAQ,GAAGH,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI;AAChCO,IAAAA,IAAI,EAAEP,KAAK,CAAC,CAAC,CAAC,IAAIT;GACnB;AACH;AAEA,MAAMiB,OAAO,GACX,2GAA2G;AAC7G,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;;;;"}

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","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,IAAI,CAACR,IAAI,CAAC;EAEzD,IAAI,CAACO,KAAK,EAAE;AACV,IAAA,OAAO,IAAI;AACb,EAAA;AAEA,EAAA,IAAIE,GAAG,GAAGF,KAAK,CAAC,CAAC,CAAC;AAClB,EAAA,MAAMG,QAAQ,GAAGD,GAAG,IAAIA,GAAG,CAACE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpD,EAAA,MAAMC,MAAM,GAAGH,GAAG,IAAIA,GAAG,CAACE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAEhD,EAAA,MAAME,QAAQ,GAAGP,YAAY,CAACE,IAAI,CAACC,GAAG,CAAC;AACvC,EAAA,IAAIG,MAAM,IAAIC,QAAQ,IAAI,IAAI,EAAE;AAC9B;AACAJ,IAAAA,GAAG,GAAGI,QAAQ,CAAC,CAAC,CAAC,CAAC;AACpB,EAAA;EAEA,OAAO;IACLJ,GAAG,EAAE,CAACC,QAAQ,GAAGH,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI;AAChCO,IAAAA,IAAI,EAAEP,KAAK,CAAC,CAAC,CAAC,IAAIT;GACnB;AACH;AAEA,MAAMiB,OAAO,GACX,2GAA2G;AAC7G,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,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,CAAC;AAAEH,QAAAA,SAAS,EAAEI;AAAe,OAAE,KAAKA,eAAe,KAAKJ,SAAS,CAAC;MAE9G,IAAI,CAACE,QAAQ,IAAIV,gBAAgB,CAAC,CAAC,CAAC,CAACO,YAAY,CAAC,EAAE;AAClD;AACA;AACAE,QAAAA,YAAY,GAAGhB,uBAAuB,CAACO,gBAAgB,CAAC,CAAC,CAAC,CAACO,YAAY,CAAC,EAAEP,gBAAgB,CAAC,CAAC,CAAC,CAAC;MAChG,CAAC,MAAM,IAAIU,QAAQ,IAAIV,gBAAgB,CAAC,CAAC,CAAC,CAACO,YAAY,CAAC,EAAE;AACxD;AACA;AACA;QACA,MAAMM,kBAAkB,GAAGX,kBAAkB,GACzCA,kBAAkB,CAACY,MAAM,CACvB,CAAC;AAAEC,UAAAA;AAAe,SAAE,KAClBA,eAAe,CAACD,MAAM,CAAC,CAAC;AAAEN,UAAAA,SAAS,EAAEQ;AAAgB,SAAE,KAAKA,gBAAgB,KAAKR,SAAS,CAAC,CAACS,MAAM,GAAG,CAAC,CACzG,CAACA,MAAM,GAAG,CAAC,GACZ,KAAK;AACTR,QAAAA,YAAY,GAAGI,kBAAkB,GAC7BH,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,CAAC;AAAEH,QAAAA,SAAS,EAAEI;AAAe,OAAE,KAAKA,eAAe,KAAKJ,SAAS,CAAC;MAE9G,IAAI,CAACE,QAAQ,IAAIV,gBAAgB,CAAC,CAAC,CAAC,CAACO,YAAY,CAAC,EAAE;AAClD;AACA;AACAE,QAAAA,YAAY,GAAGhB,uBAAuB,CAACO,gBAAgB,CAAC,CAAC,CAAC,CAACO,YAAY,CAAC,EAAEP,gBAAgB,CAAC,CAAC,CAAC,CAAC;MAChG,CAAC,MAAM,IAAIU,QAAQ,IAAIV,gBAAgB,CAAC,CAAC,CAAC,CAACO,YAAY,CAAC,EAAE;AACxD;AACA;AACA;QACA,MAAMM,kBAAkB,GAAGX,kBAAkB,GACzCA,kBAAkB,CAACY,MAAM,CACvB,CAAC;AAAEC,UAAAA;AAAe,SAAE,KAClBA,eAAe,CAACD,MAAM,CAAC,CAAC;AAAEN,UAAAA,SAAS,EAAEQ;AAAgB,SAAE,KAAKA,gBAAgB,KAAKR,SAAS,CAAC,CAACS,MAAM,GAAG,CAAC,CACzG,CAACA,MAAM,GAAG,CAAC,GACZ,KAAK;AACTR,QAAAA,YAAY,GAAGI,kBAAkB,GAC7BH,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;;;;"}

115
node_modules/@griffel/core/index.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,115 @@
'use strict';
var border = require('./shorthands/border.cjs.js');
var borderLeft = require('./shorthands/borderLeft.cjs.js');
var borderBottom = require('./shorthands/borderBottom.cjs.js');
var borderRight = require('./shorthands/borderRight.cjs.js');
var borderTop = require('./shorthands/borderTop.cjs.js');
var borderColor = require('./shorthands/borderColor.cjs.js');
var borderStyle = require('./shorthands/borderStyle.cjs.js');
var borderRadius = require('./shorthands/borderRadius.cjs.js');
var borderWidth = require('./shorthands/borderWidth.cjs.js');
var flex = require('./shorthands/flex.cjs.js');
var gap = require('./shorthands/gap.cjs.js');
var gridArea = require('./shorthands/gridArea.cjs.js');
var margin = require('./shorthands/margin.cjs.js');
var marginBlock = require('./shorthands/marginBlock.cjs.js');
var marginInline = require('./shorthands/marginInline.cjs.js');
var padding = require('./shorthands/padding.cjs.js');
var paddingBlock = require('./shorthands/paddingBlock.cjs.js');
var paddingInline = require('./shorthands/paddingInline.cjs.js');
var overflow = require('./shorthands/overflow.cjs.js');
var inset = require('./shorthands/inset.cjs.js');
var outline = require('./shorthands/outline.cjs.js');
var transition = require('./shorthands/transition.cjs.js');
var textDecoration = require('./shorthands/textDecoration.cjs.js');
var createDOMRenderer = require('./renderer/createDOMRenderer.cjs.js');
var rehydrateRendererCache = require('./renderer/rehydrateRendererCache.cjs.js');
var safeInsertRule = require('./renderer/safeInsertRule.cjs.js');
var mergeClasses = require('./mergeClasses.cjs.js');
var makeStyles = require('./makeStyles.cjs.js');
var makeStaticStyles = require('./makeStaticStyles.cjs.js');
var makeResetStyles = require('./makeResetStyles.cjs.js');
var resolveStyleRulesForSlots = require('./resolveStyleRulesForSlots.cjs.js');
var __css = require('./__css.cjs.js');
var __styles = require('./__styles.cjs.js');
var __resetCSS = require('./__resetCSS.cjs.js');
var __resetStyles = require('./__resetStyles.cjs.js');
var __staticCSS = require('./__staticCSS.cjs.js');
var __staticStyles = require('./__staticStyles.cjs.js');
var normalizeCSSBucketEntry = require('./runtime/utils/normalizeCSSBucketEntry.cjs.js');
var getStyleSheetForBucket = require('./renderer/getStyleSheetForBucket.cjs.js');
var getStyleBucketName = require('./runtime/getStyleBucketName.cjs.js');
var reduceToClassNameForSlots = require('./runtime/reduceToClassNameForSlots.cjs.js');
var resolveStyleRules = require('./runtime/resolveStyleRules.cjs.js');
var resolveResetStyleRules = require('./runtime/resolveResetStyleRules.cjs.js');
var resolveStaticStyleRules = require('./runtime/resolveStaticStyleRules.cjs.js');
var constants = require('./constants.cjs.js');
// This should be just "export * as shorthands from "
// https://github.com/microsoft/fluentui/issues/20694
const shorthands = {
border: border.border,
borderLeft: borderLeft.borderLeft,
borderBottom: borderBottom.borderBottom,
borderRight: borderRight.borderRight,
borderTop: borderTop.borderTop,
borderColor: borderColor.borderColor,
borderStyle: borderStyle.borderStyle,
borderRadius: borderRadius.borderRadius,
borderWidth: borderWidth.borderWidth,
flex: flex.flex,
gap: gap.gap,
gridArea: gridArea.gridArea,
margin: margin.margin,
marginBlock: marginBlock.marginBlock,
marginInline: marginInline.marginInline,
padding: padding.padding,
paddingBlock: paddingBlock.paddingBlock,
paddingInline: paddingInline.paddingInline,
overflow: overflow.overflow,
inset: inset.inset,
outline: outline.outline,
transition: transition.transition,
textDecoration: textDecoration.textDecoration
};
exports.createDOMRenderer = createDOMRenderer.createDOMRenderer;
exports.defaultCompareMediaQueries = createDOMRenderer.defaultCompareMediaQueries;
exports.rehydrateRendererCache = rehydrateRendererCache.rehydrateRendererCache;
exports.safeInsertRule = safeInsertRule.safeInsertRule;
exports.mergeClasses = mergeClasses.mergeClasses;
exports.makeStyles = makeStyles.makeStyles;
exports.makeStaticStyles = makeStaticStyles.makeStaticStyles;
exports.makeResetStyles = makeResetStyles.makeResetStyles;
exports.resolveStyleRulesForSlots = resolveStyleRulesForSlots.resolveStyleRulesForSlots;
exports.__css = __css.__css;
exports.__styles = __styles.__styles;
exports.__resetCSS = __resetCSS.__resetCSS;
exports.__resetStyles = __resetStyles.__resetStyles;
exports.__staticCSS = __staticCSS.__staticCSS;
exports.__staticStyles = __staticStyles.__staticStyles;
exports.normalizeCSSBucketEntry = normalizeCSSBucketEntry.normalizeCSSBucketEntry;
exports.getStyleSheetKey = getStyleSheetForBucket.getStyleSheetKey;
exports.styleBucketOrdering = getStyleSheetForBucket.styleBucketOrdering;
exports.getStyleBucketName = getStyleBucketName.getStyleBucketName;
exports.reduceToClassNameForSlots = reduceToClassNameForSlots.reduceToClassNameForSlots;
exports.resolveStyleRules = resolveStyleRules.resolveStyleRules;
exports.resolveResetStyleRules = resolveResetStyleRules.resolveResetStyleRules;
exports.resolveStaticStyleRules = resolveStaticStyleRules.resolveStaticStyleRules;
exports.DATA_BUCKET_ATTR = constants.DATA_BUCKET_ATTR;
exports.DATA_PRIORITY_ATTR = constants.DATA_PRIORITY_ATTR;
exports.DEBUG_RESET_CLASSES = constants.DEBUG_RESET_CLASSES;
exports.DEBUG_SEQUENCE_SEPARATOR = constants.DEBUG_SEQUENCE_SEPARATOR;
exports.DEFINITION_LOOKUP_TABLE = constants.DEFINITION_LOOKUP_TABLE;
exports.HASH_PREFIX = constants.HASH_PREFIX;
exports.LOOKUP_DEFINITIONS_INDEX = constants.LOOKUP_DEFINITIONS_INDEX;
exports.LOOKUP_DIR_INDEX = constants.LOOKUP_DIR_INDEX;
exports.RESET = constants.RESET;
exports.RESET_HASH_PREFIX = constants.RESET_HASH_PREFIX;
exports.SEQUENCE_HASH_LENGTH = constants.SEQUENCE_HASH_LENGTH;
exports.SEQUENCE_PREFIX = constants.SEQUENCE_PREFIX;
exports.SEQUENCE_SIZE = constants.SEQUENCE_SIZE;
exports.UNSUPPORTED_CSS_PROPERTIES = constants.UNSUPPORTED_CSS_PROPERTIES;
exports.shorthands = shorthands;
//# sourceMappingURL=index.cjs.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"index.cjs.js","sources":["../../../packages/core/src/index.ts"],"sourcesContent":["// This should be just \"export * as shorthands from \"\n// https://github.com/microsoft/fluentui/issues/20694\nimport {\n border,\n borderLeft,\n borderBottom,\n borderRight,\n borderTop,\n borderColor,\n borderStyle,\n borderRadius,\n borderWidth,\n flex,\n gap,\n gridArea,\n margin,\n marginBlock,\n marginInline,\n padding,\n paddingBlock,\n paddingInline,\n overflow,\n inset,\n outline,\n transition,\n textDecoration,\n} from './shorthands';\n\nexport const shorthands = {\n border,\n borderLeft,\n borderBottom,\n borderRight,\n borderTop,\n borderColor,\n borderStyle,\n borderRadius,\n borderWidth,\n flex,\n gap,\n gridArea,\n margin,\n marginBlock,\n marginInline,\n padding,\n paddingBlock,\n paddingInline,\n overflow,\n inset,\n outline,\n transition,\n textDecoration,\n};\n\nexport { createDOMRenderer } from './renderer/createDOMRenderer';\nexport type { CreateDOMRendererOptions } from './renderer/createDOMRenderer';\nexport { rehydrateRendererCache } from './renderer/rehydrateRendererCache';\nexport { safeInsertRule } from './renderer/safeInsertRule';\n\nexport { mergeClasses } from './mergeClasses';\nexport { makeStyles } from './makeStyles';\nexport type { MakeStylesOptions } from './makeStyles';\nexport { makeStaticStyles } from './makeStaticStyles';\nexport type { MakeStaticStylesOptions } from './makeStaticStyles';\nexport { makeResetStyles } from './makeResetStyles';\n\nexport { resolveStyleRulesForSlots } from './resolveStyleRulesForSlots';\n\n// Private exports, are used by build time transforms or other tools\nexport { __css } from './__css';\nexport { __styles } from './__styles';\nexport { __resetCSS } from './__resetCSS';\nexport { __resetStyles } from './__resetStyles';\nexport { __staticCSS } from './__staticCSS';\nexport { __staticStyles } from './__staticStyles';\n\nexport { normalizeCSSBucketEntry } from './runtime/utils/normalizeCSSBucketEntry';\nexport { styleBucketOrdering, getStyleSheetKey } from './renderer/getStyleSheetForBucket';\nexport { defaultCompareMediaQueries } from './renderer/createDOMRenderer';\nexport { getStyleBucketName } from './runtime/getStyleBucketName';\nexport { reduceToClassNameForSlots } from './runtime/reduceToClassNameForSlots';\nexport { resolveStyleRules } from './runtime/resolveStyleRules';\nexport { resolveResetStyleRules } from './runtime/resolveResetStyleRules';\nexport { resolveStaticStyleRules } from './runtime/resolveStaticStyleRules';\n\nexport * from './constants';\n\nexport type {\n // Static styles\n GriffelStaticStyle,\n GriffelStaticStyles,\n // Styles\n GriffelAnimation,\n GriffelStyle,\n // Reset styles\n GriffelResetStyle,\n // Internal types\n} from '@griffel/style-types';\n\nexport type {\n CSSClasses,\n CSSClassesMapBySlot,\n CSSBucketEntry,\n CSSRulesByBucket,\n StyleBucketName,\n // Util\n GriffelRenderer,\n GriffelInsertionFactory,\n} from './types';\n\n// Private exports, are used by devtools\nexport type { DebugCSSRules, DebugSequence, DebugResult } from './devtools';\n"],"names":["shorthands","border","borderLeft","borderBottom","borderRight","borderTop","borderColor","borderStyle","borderRadius","borderWidth","flex","gap","gridArea","margin","marginBlock","marginInline","padding","paddingBlock","paddingInline","overflow","inset","outline","transition","textDecoration"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA2BO,MAAMA,UAAU,GAAG;UACxBC,aAAM;cACNC,qBAAU;gBACVC,yBAAY;eACZC,uBAAW;aACXC,mBAAS;eACTC,uBAAW;eACXC,uBAAW;gBACXC,yBAAY;eACZC,uBAAW;QACXC,SAAI;OACJC,OAAG;YACHC,iBAAQ;UACRC,aAAM;eACNC,uBAAW;gBACXC,yBAAY;WACZC,eAAO;gBACPC,yBAAY;iBACZC,2BAAa;YACbC,iBAAQ;SACRC,WAAK;WACLC,eAAO;cACPC,qBAAU;AACVC,kBAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

1
node_modules/@griffel/core/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export * from "./src/index";

76
node_modules/@griffel/core/index.esm.js generated vendored Normal file
View File

@@ -0,0 +1,76 @@
import { border } from './shorthands/border.esm.js';
import { borderLeft } from './shorthands/borderLeft.esm.js';
import { borderBottom } from './shorthands/borderBottom.esm.js';
import { borderRight } from './shorthands/borderRight.esm.js';
import { borderTop } from './shorthands/borderTop.esm.js';
import { borderColor } from './shorthands/borderColor.esm.js';
import { borderStyle } from './shorthands/borderStyle.esm.js';
import { borderRadius } from './shorthands/borderRadius.esm.js';
import { borderWidth } from './shorthands/borderWidth.esm.js';
import { flex } from './shorthands/flex.esm.js';
import { gap } from './shorthands/gap.esm.js';
import { gridArea } from './shorthands/gridArea.esm.js';
import { margin } from './shorthands/margin.esm.js';
import { marginBlock } from './shorthands/marginBlock.esm.js';
import { marginInline } from './shorthands/marginInline.esm.js';
import { padding } from './shorthands/padding.esm.js';
import { paddingBlock } from './shorthands/paddingBlock.esm.js';
import { paddingInline } from './shorthands/paddingInline.esm.js';
import { overflow } from './shorthands/overflow.esm.js';
import { inset } from './shorthands/inset.esm.js';
import { outline } from './shorthands/outline.esm.js';
import { transition } from './shorthands/transition.esm.js';
import { textDecoration } from './shorthands/textDecoration.esm.js';
export { createDOMRenderer, defaultCompareMediaQueries } from './renderer/createDOMRenderer.esm.js';
export { rehydrateRendererCache } from './renderer/rehydrateRendererCache.esm.js';
export { safeInsertRule } from './renderer/safeInsertRule.esm.js';
export { mergeClasses } from './mergeClasses.esm.js';
export { makeStyles } from './makeStyles.esm.js';
export { makeStaticStyles } from './makeStaticStyles.esm.js';
export { makeResetStyles } from './makeResetStyles.esm.js';
export { resolveStyleRulesForSlots } from './resolveStyleRulesForSlots.esm.js';
export { __css } from './__css.esm.js';
export { __styles } from './__styles.esm.js';
export { __resetCSS } from './__resetCSS.esm.js';
export { __resetStyles } from './__resetStyles.esm.js';
export { __staticCSS } from './__staticCSS.esm.js';
export { __staticStyles } from './__staticStyles.esm.js';
export { normalizeCSSBucketEntry } from './runtime/utils/normalizeCSSBucketEntry.esm.js';
export { getStyleSheetKey, styleBucketOrdering } from './renderer/getStyleSheetForBucket.esm.js';
export { getStyleBucketName } from './runtime/getStyleBucketName.esm.js';
export { reduceToClassNameForSlots } from './runtime/reduceToClassNameForSlots.esm.js';
export { resolveStyleRules } from './runtime/resolveStyleRules.esm.js';
export { resolveResetStyleRules } from './runtime/resolveResetStyleRules.esm.js';
export { resolveStaticStyleRules } from './runtime/resolveStaticStyleRules.esm.js';
export { DATA_BUCKET_ATTR, DATA_PRIORITY_ATTR, DEBUG_RESET_CLASSES, DEBUG_SEQUENCE_SEPARATOR, DEFINITION_LOOKUP_TABLE, HASH_PREFIX, LOOKUP_DEFINITIONS_INDEX, LOOKUP_DIR_INDEX, RESET, RESET_HASH_PREFIX, SEQUENCE_HASH_LENGTH, SEQUENCE_PREFIX, SEQUENCE_SIZE, UNSUPPORTED_CSS_PROPERTIES } from './constants.esm.js';
// This should be just "export * as shorthands from "
// https://github.com/microsoft/fluentui/issues/20694
const shorthands = {
border,
borderLeft,
borderBottom,
borderRight,
borderTop,
borderColor,
borderStyle,
borderRadius,
borderWidth,
flex,
gap,
gridArea,
margin,
marginBlock,
marginInline,
padding,
paddingBlock,
paddingInline,
overflow,
inset,
outline,
transition,
textDecoration
};
export { shorthands };
//# sourceMappingURL=index.esm.js.map

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

@@ -0,0 +1 @@
{"version":3,"file":"index.esm.js","sources":["../../../packages/core/src/index.ts"],"sourcesContent":["// This should be just \"export * as shorthands from \"\n// https://github.com/microsoft/fluentui/issues/20694\nimport {\n border,\n borderLeft,\n borderBottom,\n borderRight,\n borderTop,\n borderColor,\n borderStyle,\n borderRadius,\n borderWidth,\n flex,\n gap,\n gridArea,\n margin,\n marginBlock,\n marginInline,\n padding,\n paddingBlock,\n paddingInline,\n overflow,\n inset,\n outline,\n transition,\n textDecoration,\n} from './shorthands';\n\nexport const shorthands = {\n border,\n borderLeft,\n borderBottom,\n borderRight,\n borderTop,\n borderColor,\n borderStyle,\n borderRadius,\n borderWidth,\n flex,\n gap,\n gridArea,\n margin,\n marginBlock,\n marginInline,\n padding,\n paddingBlock,\n paddingInline,\n overflow,\n inset,\n outline,\n transition,\n textDecoration,\n};\n\nexport { createDOMRenderer } from './renderer/createDOMRenderer';\nexport type { CreateDOMRendererOptions } from './renderer/createDOMRenderer';\nexport { rehydrateRendererCache } from './renderer/rehydrateRendererCache';\nexport { safeInsertRule } from './renderer/safeInsertRule';\n\nexport { mergeClasses } from './mergeClasses';\nexport { makeStyles } from './makeStyles';\nexport type { MakeStylesOptions } from './makeStyles';\nexport { makeStaticStyles } from './makeStaticStyles';\nexport type { MakeStaticStylesOptions } from './makeStaticStyles';\nexport { makeResetStyles } from './makeResetStyles';\n\nexport { resolveStyleRulesForSlots } from './resolveStyleRulesForSlots';\n\n// Private exports, are used by build time transforms or other tools\nexport { __css } from './__css';\nexport { __styles } from './__styles';\nexport { __resetCSS } from './__resetCSS';\nexport { __resetStyles } from './__resetStyles';\nexport { __staticCSS } from './__staticCSS';\nexport { __staticStyles } from './__staticStyles';\n\nexport { normalizeCSSBucketEntry } from './runtime/utils/normalizeCSSBucketEntry';\nexport { styleBucketOrdering, getStyleSheetKey } from './renderer/getStyleSheetForBucket';\nexport { defaultCompareMediaQueries } from './renderer/createDOMRenderer';\nexport { getStyleBucketName } from './runtime/getStyleBucketName';\nexport { reduceToClassNameForSlots } from './runtime/reduceToClassNameForSlots';\nexport { resolveStyleRules } from './runtime/resolveStyleRules';\nexport { resolveResetStyleRules } from './runtime/resolveResetStyleRules';\nexport { resolveStaticStyleRules } from './runtime/resolveStaticStyleRules';\n\nexport * from './constants';\n\nexport type {\n // Static styles\n GriffelStaticStyle,\n GriffelStaticStyles,\n // Styles\n GriffelAnimation,\n GriffelStyle,\n // Reset styles\n GriffelResetStyle,\n // Internal types\n} from '@griffel/style-types';\n\nexport type {\n CSSClasses,\n CSSClassesMapBySlot,\n CSSBucketEntry,\n CSSRulesByBucket,\n StyleBucketName,\n // Util\n GriffelRenderer,\n GriffelInsertionFactory,\n} from './types';\n\n// Private exports, are used by devtools\nexport type { DebugCSSRules, DebugSequence, DebugResult } from './devtools';\n"],"names":["shorthands","border","borderLeft","borderBottom","borderRight","borderTop","borderColor","borderStyle","borderRadius","borderWidth","flex","gap","gridArea","margin","marginBlock","marginInline","padding","paddingBlock","paddingInline","overflow","inset","outline","transition","textDecoration"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA2BO,MAAMA,UAAU,GAAG;EACxBC,MAAM;EACNC,UAAU;EACVC,YAAY;EACZC,WAAW;EACXC,SAAS;EACTC,WAAW;EACXC,WAAW;EACXC,YAAY;EACZC,WAAW;EACXC,IAAI;EACJC,GAAG;EACHC,QAAQ;EACRC,MAAM;EACNC,WAAW;EACXC,YAAY;EACZC,OAAO;EACPC,YAAY;EACZC,aAAa;EACbC,QAAQ;EACRC,KAAK;EACLC,OAAO;EACPC,UAAU;AACVC,EAAAA;;;;;"}

20
node_modules/@griffel/core/insertionFactory.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
'use strict';
/**
* Default implementation of insertion factory. Inserts styles only once per renderer and performs
* insertion immediately after styles computation.
*
* @internal
*/
const insertionFactory = () => {
const insertionCache = {};
return function insertStyles(renderer, cssRules) {
if (insertionCache[renderer.id] === undefined) {
renderer.insertCSSRules(cssRules);
insertionCache[renderer.id] = true;
}
};
};
exports.insertionFactory = insertionFactory;
//# sourceMappingURL=insertionFactory.cjs.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"insertionFactory.cjs.js","sources":["../../../packages/core/src/insertionFactory.ts"],"sourcesContent":["import type { CSSRulesByBucket, GriffelInsertionFactory, GriffelRenderer } from './types';\n\n/**\n * Default implementation of insertion factory. Inserts styles only once per renderer and performs\n * insertion immediately after styles computation.\n *\n * @internal\n */\nexport const insertionFactory: GriffelInsertionFactory = () => {\n const insertionCache: Record<string, boolean> = {};\n\n return function insertStyles(renderer: GriffelRenderer, cssRules: CSSRulesByBucket) {\n if (insertionCache[renderer.id] === undefined) {\n renderer.insertCSSRules(cssRules!);\n insertionCache[renderer.id] = true;\n }\n };\n};\n"],"names":["insertionFactory","insertionCache","insertStyles","renderer","cssRules","id","undefined","insertCSSRules"],"mappings":";;AAEA;;;;;AAKG;AACI,MAAMA,gBAAgB,GAA4BA,MAAK;EAC5D,MAAMC,cAAc,GAA4B,EAAE;AAElD,EAAA,OAAO,SAASC,YAAYA,CAACC,QAAyB,EAAEC,QAA0B,EAAA;IAChF,IAAIH,cAAc,CAACE,QAAQ,CAACE,EAAE,CAAC,KAAKC,SAAS,EAAE;AAC7CH,MAAAA,QAAQ,CAACI,cAAc,CAACH,QAAS,CAAC;AAClCH,MAAAA,cAAc,CAACE,QAAQ,CAACE,EAAE,CAAC,GAAG,IAAI;AACpC,IAAA;EACF,CAAC;AACH;;;;"}

18
node_modules/@griffel/core/insertionFactory.esm.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
/**
* Default implementation of insertion factory. Inserts styles only once per renderer and performs
* insertion immediately after styles computation.
*
* @internal
*/
const insertionFactory = () => {
const insertionCache = {};
return function insertStyles(renderer, cssRules) {
if (insertionCache[renderer.id] === undefined) {
renderer.insertCSSRules(cssRules);
insertionCache[renderer.id] = true;
}
};
};
export { insertionFactory };
//# sourceMappingURL=insertionFactory.esm.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"insertionFactory.esm.js","sources":["../../../packages/core/src/insertionFactory.ts"],"sourcesContent":["import type { CSSRulesByBucket, GriffelInsertionFactory, GriffelRenderer } from './types';\n\n/**\n * Default implementation of insertion factory. Inserts styles only once per renderer and performs\n * insertion immediately after styles computation.\n *\n * @internal\n */\nexport const insertionFactory: GriffelInsertionFactory = () => {\n const insertionCache: Record<string, boolean> = {};\n\n return function insertStyles(renderer: GriffelRenderer, cssRules: CSSRulesByBucket) {\n if (insertionCache[renderer.id] === undefined) {\n renderer.insertCSSRules(cssRules!);\n insertionCache[renderer.id] = true;\n }\n };\n};\n"],"names":["insertionFactory","insertionCache","insertStyles","renderer","cssRules","id","undefined","insertCSSRules"],"mappings":"AAEA;;;;;AAKG;AACI,MAAMA,gBAAgB,GAA4BA,MAAK;EAC5D,MAAMC,cAAc,GAA4B,EAAE;AAElD,EAAA,OAAO,SAASC,YAAYA,CAACC,QAAyB,EAAEC,QAA0B,EAAA;IAChF,IAAIH,cAAc,CAACE,QAAQ,CAACE,EAAE,CAAC,KAAKC,SAAS,EAAE;AAC7CH,MAAAA,QAAQ,CAACI,cAAc,CAACH,QAAS,CAAC;AAClCH,MAAAA,cAAc,CAACE,QAAQ,CAACE,EAAE,CAAC,GAAG,IAAI;AACpC,IAAA;EACF,CAAC;AACH;;;;"}

42
node_modules/@griffel/core/makeResetStyles.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,42 @@
'use strict';
var constants = require('./constants.cjs.js');
var insertionFactory = require('./insertionFactory.cjs.js');
var resolveResetStyleRules = require('./runtime/resolveResetStyleRules.cjs.js');
function makeResetStyles(styles, factory = insertionFactory.insertionFactory) {
const insertStyles = factory();
let ltrClassName = null;
let rtlClassName = null;
let cssRules = null;
let classNameHashSalt;
function computeClassName(options) {
const {
dir,
renderer
} = options;
if (ltrClassName === null) {
[ltrClassName, rtlClassName, cssRules] = resolveResetStyleRules.resolveResetStyleRules(styles, renderer.classNameHashSalt);
if (process.env.NODE_ENV !== 'production') {
if (renderer.classNameHashSalt) {
if (classNameHashSalt !== renderer.classNameHashSalt) {
console.error(['@griffel/core:', '\n\n', 'A provided renderer has different "classNameHashSalt".', 'This is not supported and WILL cause issues with classnames generation.', 'Ensure that all renderers created with "createDOMRenderer()" have the same "classNameHashSalt".'].join(' '));
}
classNameHashSalt = renderer.classNameHashSalt;
}
}
}
insertStyles(renderer, Array.isArray(cssRules) ? {
r: cssRules
} : cssRules);
const className = dir === 'ltr' ? ltrClassName : rtlClassName || ltrClassName;
if (process.env.NODE_ENV !== 'production') {
constants.DEBUG_RESET_CLASSES[className] = 1;
}
return className;
}
return computeClassName;
}
exports.makeResetStyles = makeResetStyles;
//# sourceMappingURL=makeResetStyles.cjs.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"makeResetStyles.cjs.js","sources":["../../../packages/core/src/makeResetStyles.ts"],"sourcesContent":["import type { GriffelResetStyle } from '@griffel/style-types';\n\nimport { DEBUG_RESET_CLASSES } from './constants';\nimport { insertionFactory } from './insertionFactory';\nimport { resolveResetStyleRules } from './runtime/resolveResetStyleRules';\nimport type { CSSRulesByBucket, GriffelRenderer, GriffelInsertionFactory } from './types';\n\nexport interface MakeResetStylesOptions {\n dir: 'ltr' | 'rtl';\n renderer: GriffelRenderer;\n}\n\nexport function makeResetStyles(styles: GriffelResetStyle, factory: GriffelInsertionFactory = insertionFactory) {\n const insertStyles = factory();\n\n let ltrClassName: string | null = null;\n let rtlClassName: string | null = null;\n\n let cssRules: CSSRulesByBucket | string[] | null = null;\n let classNameHashSalt: string;\n\n function computeClassName(options: MakeResetStylesOptions): string {\n const { dir, renderer } = options;\n\n if (ltrClassName === null) {\n [ltrClassName, rtlClassName, cssRules] = resolveResetStyleRules(styles, renderer.classNameHashSalt);\n\n if (process.env.NODE_ENV !== 'production') {\n if (renderer.classNameHashSalt) {\n if (classNameHashSalt !== renderer.classNameHashSalt) {\n console.error(\n [\n '@griffel/core:',\n '\\n\\n',\n 'A provided renderer has different \"classNameHashSalt\".',\n 'This is not supported and WILL cause issues with classnames generation.',\n 'Ensure that all renderers created with \"createDOMRenderer()\" have the same \"classNameHashSalt\".',\n ].join(' '),\n );\n }\n\n classNameHashSalt = renderer.classNameHashSalt;\n }\n }\n }\n\n insertStyles(renderer, Array.isArray(cssRules) ? { r: cssRules! } : cssRules!);\n\n const className = dir === 'ltr' ? ltrClassName : rtlClassName || ltrClassName;\n\n if (process.env.NODE_ENV !== 'production') {\n DEBUG_RESET_CLASSES[className] = 1;\n }\n\n return className;\n }\n\n return computeClassName;\n}\n"],"names":["makeResetStyles","styles","factory","insertionFactory","insertStyles","ltrClassName","rtlClassName","cssRules","classNameHashSalt","computeClassName","options","dir","renderer","resolveResetStyleRules","process","env","NODE_ENV","console","error","join","Array","isArray","r","className","DEBUG_RESET_CLASSES"],"mappings":";;;;;;SAYgBA,eAAeA,CAACC,MAAyB,EAAEC,UAAmCC,iCAAgB,EAAA;AAC5G,EAAA,MAAMC,YAAY,GAAGF,OAAO,EAAE;EAE9B,IAAIG,YAAY,GAAkB,IAAI;EACtC,IAAIC,YAAY,GAAkB,IAAI;EAEtC,IAAIC,QAAQ,GAAuC,IAAI;AACvD,EAAA,IAAIC,iBAAyB;EAE7B,SAASC,gBAAgBA,CAACC,OAA+B,EAAA;IACvD,MAAM;MAAEC,GAAG;AAAEC,MAAAA;AAAQ,KAAE,GAAGF,OAAO;IAEjC,IAAIL,YAAY,KAAK,IAAI,EAAE;AACzB,MAAA,CAACA,YAAY,EAAEC,YAAY,EAAEC,QAAQ,CAAC,GAAGM,6CAAsB,CAACZ,MAAM,EAAEW,QAAQ,CAACJ,iBAAiB,CAAC;AAEnG,MAAA,IAAIM,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;QACzC,IAAIJ,QAAQ,CAACJ,iBAAiB,EAAE;AAC9B,UAAA,IAAIA,iBAAiB,KAAKI,QAAQ,CAACJ,iBAAiB,EAAE;AACpDS,YAAAA,OAAO,CAACC,KAAK,CACX,CACE,gBAAgB,EAChB,MAAM,EACN,wDAAwD,EACxD,yEAAyE,EACzE,iGAAiG,CAClG,CAACC,IAAI,CAAC,GAAG,CAAC,CACZ;AACH,UAAA;UAEAX,iBAAiB,GAAGI,QAAQ,CAACJ,iBAAiB;AAChD,QAAA;AACF,MAAA;AACF,IAAA;IAEAJ,YAAY,CAACQ,QAAQ,EAAEQ,KAAK,CAACC,OAAO,CAACd,QAAQ,CAAC,GAAG;AAAEe,MAAAA,CAAC,EAAEf;KAAW,GAAGA,QAAS,CAAC;IAE9E,MAAMgB,SAAS,GAAGZ,GAAG,KAAK,KAAK,GAAGN,YAAY,GAAGC,YAAY,IAAID,YAAY;AAE7E,IAAA,IAAIS,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;AACzCQ,MAAAA,6BAAmB,CAACD,SAAS,CAAC,GAAG,CAAC;AACpC,IAAA;AAEA,IAAA,OAAOA,SAAS;AAClB,EAAA;AAEA,EAAA,OAAOd,gBAAgB;AACzB;;;;"}

40
node_modules/@griffel/core/makeResetStyles.esm.js generated vendored Normal file
View File

@@ -0,0 +1,40 @@
import { DEBUG_RESET_CLASSES } from './constants.esm.js';
import { insertionFactory } from './insertionFactory.esm.js';
import { resolveResetStyleRules } from './runtime/resolveResetStyleRules.esm.js';
function makeResetStyles(styles, factory = insertionFactory) {
const insertStyles = factory();
let ltrClassName = null;
let rtlClassName = null;
let cssRules = null;
let classNameHashSalt;
function computeClassName(options) {
const {
dir,
renderer
} = options;
if (ltrClassName === null) {
[ltrClassName, rtlClassName, cssRules] = resolveResetStyleRules(styles, renderer.classNameHashSalt);
if (process.env.NODE_ENV !== 'production') {
if (renderer.classNameHashSalt) {
if (classNameHashSalt !== renderer.classNameHashSalt) {
console.error(['@griffel/core:', '\n\n', 'A provided renderer has different "classNameHashSalt".', 'This is not supported and WILL cause issues with classnames generation.', 'Ensure that all renderers created with "createDOMRenderer()" have the same "classNameHashSalt".'].join(' '));
}
classNameHashSalt = renderer.classNameHashSalt;
}
}
}
insertStyles(renderer, Array.isArray(cssRules) ? {
r: cssRules
} : cssRules);
const className = dir === 'ltr' ? ltrClassName : rtlClassName || ltrClassName;
if (process.env.NODE_ENV !== 'production') {
DEBUG_RESET_CLASSES[className] = 1;
}
return className;
}
return computeClassName;
}
export { makeResetStyles };
//# sourceMappingURL=makeResetStyles.esm.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"makeResetStyles.esm.js","sources":["../../../packages/core/src/makeResetStyles.ts"],"sourcesContent":["import type { GriffelResetStyle } from '@griffel/style-types';\n\nimport { DEBUG_RESET_CLASSES } from './constants';\nimport { insertionFactory } from './insertionFactory';\nimport { resolveResetStyleRules } from './runtime/resolveResetStyleRules';\nimport type { CSSRulesByBucket, GriffelRenderer, GriffelInsertionFactory } from './types';\n\nexport interface MakeResetStylesOptions {\n dir: 'ltr' | 'rtl';\n renderer: GriffelRenderer;\n}\n\nexport function makeResetStyles(styles: GriffelResetStyle, factory: GriffelInsertionFactory = insertionFactory) {\n const insertStyles = factory();\n\n let ltrClassName: string | null = null;\n let rtlClassName: string | null = null;\n\n let cssRules: CSSRulesByBucket | string[] | null = null;\n let classNameHashSalt: string;\n\n function computeClassName(options: MakeResetStylesOptions): string {\n const { dir, renderer } = options;\n\n if (ltrClassName === null) {\n [ltrClassName, rtlClassName, cssRules] = resolveResetStyleRules(styles, renderer.classNameHashSalt);\n\n if (process.env.NODE_ENV !== 'production') {\n if (renderer.classNameHashSalt) {\n if (classNameHashSalt !== renderer.classNameHashSalt) {\n console.error(\n [\n '@griffel/core:',\n '\\n\\n',\n 'A provided renderer has different \"classNameHashSalt\".',\n 'This is not supported and WILL cause issues with classnames generation.',\n 'Ensure that all renderers created with \"createDOMRenderer()\" have the same \"classNameHashSalt\".',\n ].join(' '),\n );\n }\n\n classNameHashSalt = renderer.classNameHashSalt;\n }\n }\n }\n\n insertStyles(renderer, Array.isArray(cssRules) ? { r: cssRules! } : cssRules!);\n\n const className = dir === 'ltr' ? ltrClassName : rtlClassName || ltrClassName;\n\n if (process.env.NODE_ENV !== 'production') {\n DEBUG_RESET_CLASSES[className] = 1;\n }\n\n return className;\n }\n\n return computeClassName;\n}\n"],"names":["makeResetStyles","styles","factory","insertionFactory","insertStyles","ltrClassName","rtlClassName","cssRules","classNameHashSalt","computeClassName","options","dir","renderer","resolveResetStyleRules","process","env","NODE_ENV","console","error","join","Array","isArray","r","className","DEBUG_RESET_CLASSES"],"mappings":";;;;SAYgBA,eAAeA,CAACC,MAAyB,EAAEC,UAAmCC,gBAAgB,EAAA;AAC5G,EAAA,MAAMC,YAAY,GAAGF,OAAO,EAAE;EAE9B,IAAIG,YAAY,GAAkB,IAAI;EACtC,IAAIC,YAAY,GAAkB,IAAI;EAEtC,IAAIC,QAAQ,GAAuC,IAAI;AACvD,EAAA,IAAIC,iBAAyB;EAE7B,SAASC,gBAAgBA,CAACC,OAA+B,EAAA;IACvD,MAAM;MAAEC,GAAG;AAAEC,MAAAA;AAAQ,KAAE,GAAGF,OAAO;IAEjC,IAAIL,YAAY,KAAK,IAAI,EAAE;AACzB,MAAA,CAACA,YAAY,EAAEC,YAAY,EAAEC,QAAQ,CAAC,GAAGM,sBAAsB,CAACZ,MAAM,EAAEW,QAAQ,CAACJ,iBAAiB,CAAC;AAEnG,MAAA,IAAIM,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;QACzC,IAAIJ,QAAQ,CAACJ,iBAAiB,EAAE;AAC9B,UAAA,IAAIA,iBAAiB,KAAKI,QAAQ,CAACJ,iBAAiB,EAAE;AACpDS,YAAAA,OAAO,CAACC,KAAK,CACX,CACE,gBAAgB,EAChB,MAAM,EACN,wDAAwD,EACxD,yEAAyE,EACzE,iGAAiG,CAClG,CAACC,IAAI,CAAC,GAAG,CAAC,CACZ;AACH,UAAA;UAEAX,iBAAiB,GAAGI,QAAQ,CAACJ,iBAAiB;AAChD,QAAA;AACF,MAAA;AACF,IAAA;IAEAJ,YAAY,CAACQ,QAAQ,EAAEQ,KAAK,CAACC,OAAO,CAACd,QAAQ,CAAC,GAAG;AAAEe,MAAAA,CAAC,EAAEf;KAAW,GAAGA,QAAS,CAAC;IAE9E,MAAMgB,SAAS,GAAGZ,GAAG,KAAK,KAAK,GAAGN,YAAY,GAAGC,YAAY,IAAID,YAAY;AAE7E,IAAA,IAAIS,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;AACzCQ,MAAAA,mBAAmB,CAACD,SAAS,CAAC,GAAG,CAAC;AACpC,IAAA;AAEA,IAAA,OAAOA,SAAS;AAClB,EAAA;AAEA,EAAA,OAAOd,gBAAgB;AACzB;;;;"}

20
node_modules/@griffel/core/makeStaticStyles.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
'use strict';
var insertionFactory = require('./insertionFactory.cjs.js');
var resolveStaticStyleRules = require('./runtime/resolveStaticStyleRules.cjs.js');
function makeStaticStyles(styles, factory = insertionFactory.insertionFactory) {
const insertStyles = factory();
const stylesSet = Array.isArray(styles) ? styles : [styles];
function useStaticStyles(options) {
insertStyles(options.renderer,
// 👇 static rules should be inserted into default bucket
{
d: resolveStaticStyleRules.resolveStaticStyleRules(stylesSet)
});
}
return useStaticStyles;
}
exports.makeStaticStyles = makeStaticStyles;
//# sourceMappingURL=makeStaticStyles.cjs.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"makeStaticStyles.cjs.js","sources":["../../../packages/core/src/makeStaticStyles.ts"],"sourcesContent":["import type { GriffelStaticStyles } from '@griffel/style-types';\n\nimport { insertionFactory } from './insertionFactory';\nimport { resolveStaticStyleRules } from './runtime/resolveStaticStyleRules';\nimport type { GriffelRenderer } from './types';\nimport type { GriffelInsertionFactory } from './types';\n\nexport interface MakeStaticStylesOptions {\n renderer: GriffelRenderer;\n}\n\nexport function makeStaticStyles(\n styles: GriffelStaticStyles | GriffelStaticStyles[],\n factory: GriffelInsertionFactory = insertionFactory,\n) {\n const insertStyles = factory();\n const stylesSet: GriffelStaticStyles[] = Array.isArray(styles) ? styles : [styles];\n\n function useStaticStyles(options: MakeStaticStylesOptions): void {\n insertStyles(\n options.renderer,\n // 👇 static rules should be inserted into default bucket\n { d: resolveStaticStyleRules(stylesSet) },\n );\n }\n\n return useStaticStyles;\n}\n"],"names":["makeStaticStyles","styles","factory","insertionFactory","insertStyles","stylesSet","Array","isArray","useStaticStyles","options","renderer","d","resolveStaticStyleRules"],"mappings":";;;;;SAWgBA,gBAAgBA,CAC9BC,MAAmD,EACnDC,UAAmCC,iCAAgB,EAAA;AAEnD,EAAA,MAAMC,YAAY,GAAGF,OAAO,EAAE;AAC9B,EAAA,MAAMG,SAAS,GAA0BC,KAAK,CAACC,OAAO,CAACN,MAAM,CAAC,GAAGA,MAAM,GAAG,CAACA,MAAM,CAAC;EAElF,SAASO,eAAeA,CAACC,OAAgC,EAAA;IACvDL,YAAY,CACVK,OAAO,CAACC,QAAQ;AAChB;AACA,IAAA;MAAEC,CAAC,EAAEC,+CAAuB,CAACP,SAAS;AAAC,KAAE,CAC1C;AACH,EAAA;AAEA,EAAA,OAAOG,eAAe;AACxB;;;;"}

18
node_modules/@griffel/core/makeStaticStyles.esm.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
import { insertionFactory } from './insertionFactory.esm.js';
import { resolveStaticStyleRules } from './runtime/resolveStaticStyleRules.esm.js';
function makeStaticStyles(styles, factory = insertionFactory) {
const insertStyles = factory();
const stylesSet = Array.isArray(styles) ? styles : [styles];
function useStaticStyles(options) {
insertStyles(options.renderer,
// 👇 static rules should be inserted into default bucket
{
d: resolveStaticStyleRules(stylesSet)
});
}
return useStaticStyles;
}
export { makeStaticStyles };
//# sourceMappingURL=makeStaticStyles.esm.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"makeStaticStyles.esm.js","sources":["../../../packages/core/src/makeStaticStyles.ts"],"sourcesContent":["import type { GriffelStaticStyles } from '@griffel/style-types';\n\nimport { insertionFactory } from './insertionFactory';\nimport { resolveStaticStyleRules } from './runtime/resolveStaticStyleRules';\nimport type { GriffelRenderer } from './types';\nimport type { GriffelInsertionFactory } from './types';\n\nexport interface MakeStaticStylesOptions {\n renderer: GriffelRenderer;\n}\n\nexport function makeStaticStyles(\n styles: GriffelStaticStyles | GriffelStaticStyles[],\n factory: GriffelInsertionFactory = insertionFactory,\n) {\n const insertStyles = factory();\n const stylesSet: GriffelStaticStyles[] = Array.isArray(styles) ? styles : [styles];\n\n function useStaticStyles(options: MakeStaticStylesOptions): void {\n insertStyles(\n options.renderer,\n // 👇 static rules should be inserted into default bucket\n { d: resolveStaticStyleRules(stylesSet) },\n );\n }\n\n return useStaticStyles;\n}\n"],"names":["makeStaticStyles","styles","factory","insertionFactory","insertStyles","stylesSet","Array","isArray","useStaticStyles","options","renderer","d","resolveStaticStyleRules"],"mappings":";;;SAWgBA,gBAAgBA,CAC9BC,MAAmD,EACnDC,UAAmCC,gBAAgB,EAAA;AAEnD,EAAA,MAAMC,YAAY,GAAGF,OAAO,EAAE;AAC9B,EAAA,MAAMG,SAAS,GAA0BC,KAAK,CAACC,OAAO,CAACN,MAAM,CAAC,GAAGA,MAAM,GAAG,CAACA,MAAM,CAAC;EAElF,SAASO,eAAeA,CAACC,OAAgC,EAAA;IACvDL,YAAY,CACVK,OAAO,CAACC,QAAQ;AAChB;AACA,IAAA;MAAEC,CAAC,EAAEC,uBAAuB,CAACP,SAAS;AAAC,KAAE,CAC1C;AACH,EAAA;AAEA,EAAA,OAAOG,eAAe;AACxB;;;;"}

59
node_modules/@griffel/core/makeStyles.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,59 @@
'use strict';
require('./constants.cjs.js');
var store = require('./devtools/store.cjs.js');
var isDevToolsEnabled = require('./devtools/isDevToolsEnabled.cjs.js');
var getSourceURLfromError = require('./devtools/getSourceURLfromError.cjs.js');
var insertionFactory = require('./insertionFactory.cjs.js');
var resolveStyleRulesForSlots = require('./resolveStyleRulesForSlots.cjs.js');
var reduceToClassNameForSlots = require('./runtime/reduceToClassNameForSlots.cjs.js');
function makeStyles(stylesBySlots, factory = insertionFactory.insertionFactory) {
const insertStyles = factory();
let classesMapBySlot = null;
let cssRules = null;
let ltrClassNamesForSlots = null;
let rtlClassNamesForSlots = null;
let sourceURL;
if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled.isDevToolsEnabled) {
sourceURL = getSourceURLfromError.getSourceURLfromError();
}
let classNameHashSalt;
function computeClasses(options) {
const {
dir,
renderer
} = options;
if (classesMapBySlot === null) {
[classesMapBySlot, cssRules] = resolveStyleRulesForSlots.resolveStyleRulesForSlots(stylesBySlots, renderer.classNameHashSalt);
if (process.env.NODE_ENV !== 'production') {
if (renderer.classNameHashSalt) {
if (classNameHashSalt !== renderer.classNameHashSalt) {
console.error(['@griffel/core:', '\n\n', 'A provided renderer has different "classNameHashSalt".', 'This is not supported and WILL cause issues with classnames generation.', 'Ensure that all renderers created with "createDOMRenderer()" have the same "classNameHashSalt".'].join(' '));
}
classNameHashSalt = renderer.classNameHashSalt;
}
}
}
const isLTR = dir === 'ltr';
if (isLTR) {
if (ltrClassNamesForSlots === null) {
ltrClassNamesForSlots = reduceToClassNameForSlots.reduceToClassNameForSlots(classesMapBySlot, dir);
}
} else {
if (rtlClassNamesForSlots === null) {
rtlClassNamesForSlots = reduceToClassNameForSlots.reduceToClassNameForSlots(classesMapBySlot, dir);
}
}
insertStyles(renderer, cssRules);
const classNamesForSlots = isLTR ? ltrClassNamesForSlots : rtlClassNamesForSlots;
if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled.isDevToolsEnabled) {
store.debugData.addSequenceDetails(classNamesForSlots, sourceURL);
}
return classNamesForSlots;
}
return computeClasses;
}
exports.makeStyles = makeStyles;
//# sourceMappingURL=makeStyles.cjs.js.map

1
node_modules/@griffel/core/makeStyles.cjs.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

57
node_modules/@griffel/core/makeStyles.esm.js generated vendored Normal file
View File

@@ -0,0 +1,57 @@
import './constants.esm.js';
import { debugData } from './devtools/store.esm.js';
import { isDevToolsEnabled } from './devtools/isDevToolsEnabled.esm.js';
import { getSourceURLfromError } from './devtools/getSourceURLfromError.esm.js';
import { insertionFactory } from './insertionFactory.esm.js';
import { resolveStyleRulesForSlots } from './resolveStyleRulesForSlots.esm.js';
import { reduceToClassNameForSlots } from './runtime/reduceToClassNameForSlots.esm.js';
function makeStyles(stylesBySlots, factory = insertionFactory) {
const insertStyles = factory();
let classesMapBySlot = null;
let cssRules = null;
let ltrClassNamesForSlots = null;
let rtlClassNamesForSlots = null;
let sourceURL;
if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {
sourceURL = getSourceURLfromError();
}
let classNameHashSalt;
function computeClasses(options) {
const {
dir,
renderer
} = options;
if (classesMapBySlot === null) {
[classesMapBySlot, cssRules] = resolveStyleRulesForSlots(stylesBySlots, renderer.classNameHashSalt);
if (process.env.NODE_ENV !== 'production') {
if (renderer.classNameHashSalt) {
if (classNameHashSalt !== renderer.classNameHashSalt) {
console.error(['@griffel/core:', '\n\n', 'A provided renderer has different "classNameHashSalt".', 'This is not supported and WILL cause issues with classnames generation.', 'Ensure that all renderers created with "createDOMRenderer()" have the same "classNameHashSalt".'].join(' '));
}
classNameHashSalt = renderer.classNameHashSalt;
}
}
}
const isLTR = dir === 'ltr';
if (isLTR) {
if (ltrClassNamesForSlots === null) {
ltrClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);
}
} else {
if (rtlClassNamesForSlots === null) {
rtlClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);
}
}
insertStyles(renderer, cssRules);
const classNamesForSlots = isLTR ? ltrClassNamesForSlots : rtlClassNamesForSlots;
if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {
debugData.addSequenceDetails(classNamesForSlots, sourceURL);
}
return classNamesForSlots;
}
return computeClasses;
}
export { makeStyles };
//# sourceMappingURL=makeStyles.esm.js.map

1
node_modules/@griffel/core/makeStyles.esm.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

104
node_modules/@griffel/core/mergeClasses.cjs.js generated vendored Normal file
View File

@@ -0,0 +1,104 @@
'use strict';
var constants = require('./constants.cjs.js');
var hashSequence = require('./runtime/utils/hashSequence.cjs.js');
var reduceToClassNameForSlots = require('./runtime/reduceToClassNameForSlots.cjs.js');
// Contains a mapping of previously resolved sequences of atomic classnames
const mergeClassesCachedResults = {};
function mergeClasses() {
// arguments are parsed manually to avoid double loops as TS & Babel transforms rest via an additional loop
// @see https://babeljs.io/docs/en/babel-plugin-transform-parameters
/* eslint-disable prefer-rest-params */
let dir = null;
let resultClassName = '';
// Is used as a cache key to avoid object merging
let sequenceMatch = '';
const sequencesIds = new Array(arguments.length);
let containsResetClassName = '';
for (let i = 0; i < arguments.length; i++) {
const className = arguments[i];
if (typeof className === 'string' && className !== '') {
// All classes generated by `makeStyles()` are prefixed by a sequence hash, this allows to identify class sets
// without parsing each className in a string
const sequenceIndex = className.indexOf(constants.SEQUENCE_PREFIX);
if (sequenceIndex === -1) {
if (process.env.NODE_ENV !== 'production') {
className.split(' ').forEach(entry => {
if (entry.startsWith(constants.RESET_HASH_PREFIX) && constants.DEBUG_RESET_CLASSES[entry]) {
if (containsResetClassName) {
// eslint-disable-next-line no-console
console.error('mergeClasses(): a passed string contains multiple classes produced by makeResetStyles (' + `${className} & ${resultClassName}, this will lead to non-deterministic behavior. Learn more:` + 'https://griffel.js.org/react/api/make-reset-styles#limitations' + '\n' + `Source string: ${className}`);
} else {
containsResetClassName = entry;
}
}
});
}
resultClassName += className + ' ';
} else {
const sequenceId = className.substr(sequenceIndex, constants.SEQUENCE_SIZE);
// Handles a case with mixed classnames, i.e. "ui-button ATOMIC_CLASSES"
if (sequenceIndex > 0) {
resultClassName += className.slice(0, sequenceIndex);
}
sequenceMatch += sequenceId;
sequencesIds[i] = sequenceId;
}
if (process.env.NODE_ENV !== 'production') {
if (className.indexOf(constants.SEQUENCE_PREFIX, sequenceIndex + 1) !== -1) {
// eslint-disable-next-line no-console
console.error('mergeClasses(): a passed string contains multiple identifiers of atomic classes (classes that start ' + `with "${constants.SEQUENCE_PREFIX}"), it's possible that passed classes were concatenated in a wrong way. ` + `Source string: ${className}`);
}
}
}
}
// .slice() there allows to avoid trailing space for non-atomic classes
// "ui-button ui-flex " => "ui-button ui-flex"
if (sequenceMatch === '') {
return resultClassName.slice(0, -1);
}
// It's safe to reuse results to avoid continuous merging as results are stable
// "__seq1 ... __seq2 ..." => "__seq12 ..."
const mergeClassesResult = mergeClassesCachedResults[sequenceMatch];
if (mergeClassesResult !== undefined) {
return resultClassName + mergeClassesResult;
}
const sequenceMappings = [];
for (let i = 0; i < arguments.length; i++) {
const sequenceId = sequencesIds[i];
if (sequenceId) {
const sequenceMapping = constants.DEFINITION_LOOKUP_TABLE[sequenceId];
if (sequenceMapping) {
sequenceMappings.push(sequenceMapping[constants.LOOKUP_DEFINITIONS_INDEX]);
if (process.env.NODE_ENV !== 'production') {
if (dir !== null && dir !== sequenceMapping[constants.LOOKUP_DIR_INDEX]) {
// eslint-disable-next-line no-console
console.error(`mergeClasses(): a passed string contains an identifier (${sequenceId}) that has different direction ` + `(dir="${sequenceMapping[1] ? 'rtl' : 'ltr'}") setting than other classes. This is not supported. ` + `Source string: ${arguments[i]}`);
}
}
dir = sequenceMapping[constants.LOOKUP_DIR_INDEX];
} else {
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line no-console
console.error(`mergeClasses(): a passed string contains an identifier (${sequenceId}) that does not match any entry ` + `in cache. Source string: ${arguments[i]}`);
}
}
}
}
// eslint-disable-next-line prefer-spread
const resultClassesMap = Object.assign.apply(Object,
// .assign() mutates the first object, we can't mutate mappings as it will produce invalid results later
[{}].concat(sequenceMappings));
const [atomicClasses, classesMapHash] = reduceToClassNameForSlots.reduceToClassName(resultClassesMap, dir);
// Each merge of classes generates a new sequence of atomic classes that needs to be registered
const newSequenceHash = hashSequence.hashSequence(classesMapHash, dir, sequencesIds);
const newClassName = newSequenceHash + ' ' + atomicClasses;
mergeClassesCachedResults[sequenceMatch] = newClassName;
constants.DEFINITION_LOOKUP_TABLE[newSequenceHash] = [resultClassesMap, dir];
return resultClassName + newClassName;
}
exports.mergeClasses = mergeClasses;
exports.mergeClassesCachedResults = mergeClassesCachedResults;
//# sourceMappingURL=mergeClasses.cjs.js.map

1
node_modules/@griffel/core/mergeClasses.cjs.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

101
node_modules/@griffel/core/mergeClasses.esm.js generated vendored Normal file
View File

@@ -0,0 +1,101 @@
import { SEQUENCE_PREFIX, RESET_HASH_PREFIX, DEBUG_RESET_CLASSES, SEQUENCE_SIZE, DEFINITION_LOOKUP_TABLE, LOOKUP_DEFINITIONS_INDEX, LOOKUP_DIR_INDEX } from './constants.esm.js';
import { hashSequence } from './runtime/utils/hashSequence.esm.js';
import { reduceToClassName } from './runtime/reduceToClassNameForSlots.esm.js';
// Contains a mapping of previously resolved sequences of atomic classnames
const mergeClassesCachedResults = {};
function mergeClasses() {
// arguments are parsed manually to avoid double loops as TS & Babel transforms rest via an additional loop
// @see https://babeljs.io/docs/en/babel-plugin-transform-parameters
/* eslint-disable prefer-rest-params */
let dir = null;
let resultClassName = '';
// Is used as a cache key to avoid object merging
let sequenceMatch = '';
const sequencesIds = new Array(arguments.length);
let containsResetClassName = '';
for (let i = 0; i < arguments.length; i++) {
const className = arguments[i];
if (typeof className === 'string' && className !== '') {
// All classes generated by `makeStyles()` are prefixed by a sequence hash, this allows to identify class sets
// without parsing each className in a string
const sequenceIndex = className.indexOf(SEQUENCE_PREFIX);
if (sequenceIndex === -1) {
if (process.env.NODE_ENV !== 'production') {
className.split(' ').forEach(entry => {
if (entry.startsWith(RESET_HASH_PREFIX) && DEBUG_RESET_CLASSES[entry]) {
if (containsResetClassName) {
// eslint-disable-next-line no-console
console.error('mergeClasses(): a passed string contains multiple classes produced by makeResetStyles (' + `${className} & ${resultClassName}, this will lead to non-deterministic behavior. Learn more:` + 'https://griffel.js.org/react/api/make-reset-styles#limitations' + '\n' + `Source string: ${className}`);
} else {
containsResetClassName = entry;
}
}
});
}
resultClassName += className + ' ';
} else {
const sequenceId = className.substr(sequenceIndex, SEQUENCE_SIZE);
// Handles a case with mixed classnames, i.e. "ui-button ATOMIC_CLASSES"
if (sequenceIndex > 0) {
resultClassName += className.slice(0, sequenceIndex);
}
sequenceMatch += sequenceId;
sequencesIds[i] = sequenceId;
}
if (process.env.NODE_ENV !== 'production') {
if (className.indexOf(SEQUENCE_PREFIX, sequenceIndex + 1) !== -1) {
// eslint-disable-next-line no-console
console.error('mergeClasses(): a passed string contains multiple identifiers of atomic classes (classes that start ' + `with "${SEQUENCE_PREFIX}"), it's possible that passed classes were concatenated in a wrong way. ` + `Source string: ${className}`);
}
}
}
}
// .slice() there allows to avoid trailing space for non-atomic classes
// "ui-button ui-flex " => "ui-button ui-flex"
if (sequenceMatch === '') {
return resultClassName.slice(0, -1);
}
// It's safe to reuse results to avoid continuous merging as results are stable
// "__seq1 ... __seq2 ..." => "__seq12 ..."
const mergeClassesResult = mergeClassesCachedResults[sequenceMatch];
if (mergeClassesResult !== undefined) {
return resultClassName + mergeClassesResult;
}
const sequenceMappings = [];
for (let i = 0; i < arguments.length; i++) {
const sequenceId = sequencesIds[i];
if (sequenceId) {
const sequenceMapping = DEFINITION_LOOKUP_TABLE[sequenceId];
if (sequenceMapping) {
sequenceMappings.push(sequenceMapping[LOOKUP_DEFINITIONS_INDEX]);
if (process.env.NODE_ENV !== 'production') {
if (dir !== null && dir !== sequenceMapping[LOOKUP_DIR_INDEX]) {
// eslint-disable-next-line no-console
console.error(`mergeClasses(): a passed string contains an identifier (${sequenceId}) that has different direction ` + `(dir="${sequenceMapping[1] ? 'rtl' : 'ltr'}") setting than other classes. This is not supported. ` + `Source string: ${arguments[i]}`);
}
}
dir = sequenceMapping[LOOKUP_DIR_INDEX];
} else {
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line no-console
console.error(`mergeClasses(): a passed string contains an identifier (${sequenceId}) that does not match any entry ` + `in cache. Source string: ${arguments[i]}`);
}
}
}
}
// eslint-disable-next-line prefer-spread
const resultClassesMap = Object.assign.apply(Object,
// .assign() mutates the first object, we can't mutate mappings as it will produce invalid results later
[{}].concat(sequenceMappings));
const [atomicClasses, classesMapHash] = reduceToClassName(resultClassesMap, dir);
// Each merge of classes generates a new sequence of atomic classes that needs to be registered
const newSequenceHash = hashSequence(classesMapHash, dir, sequencesIds);
const newClassName = newSequenceHash + ' ' + atomicClasses;
mergeClassesCachedResults[sequenceMatch] = newClassName;
DEFINITION_LOOKUP_TABLE[newSequenceHash] = [resultClassesMap, dir];
return resultClassName + newClassName;
}
export { mergeClasses, mergeClassesCachedResults };
//# sourceMappingURL=mergeClasses.esm.js.map

1
node_modules/@griffel/core/mergeClasses.esm.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

22
node_modules/@griffel/core/package.json generated vendored Normal file
View File

@@ -0,0 +1,22 @@
{
"name": "@griffel/core",
"version": "1.20.1",
"description": "DOM implementation of Atomic CSS-in-JS",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/microsoft/griffel"
},
"sideEffects": false,
"dependencies": {
"@emotion/hash": "^0.9.0",
"@griffel/style-types": "^1.4.0",
"csstype": "^3.1.3",
"rtl-css-js": "^1.16.1",
"stylis": "^4.2.0",
"tslib": "^2.1.0"
},
"module": "./index.esm.js",
"main": "./index.cjs.js",
"types": "./index.d.ts"
}

View File

@@ -0,0 +1,67 @@
'use strict';
var injectDevTools = require('../devtools/injectDevTools.cjs.js');
var isDevToolsEnabled = require('../devtools/isDevToolsEnabled.cjs.js');
var store = require('../devtools/store.cjs.js');
var normalizeCSSBucketEntry = require('../runtime/utils/normalizeCSSBucketEntry.cjs.js');
var getStyleSheetForBucket = require('./getStyleSheetForBucket.cjs.js');
var safeInsertRule = require('./safeInsertRule.cjs.js');
let lastIndex = 0;
/** @internal */
const defaultCompareMediaQueries = (a, b) => a < b ? -1 : a > b ? 1 : 0;
/**
* Creates a new instances of a renderer.
*
* @public
*/
function createDOMRenderer(targetDocument = typeof document === 'undefined' ? undefined : document, options = {}) {
const {
classNameHashSalt,
unstable_filterCSSRule,
insertionPoint,
styleElementAttributes,
compareMediaQueries = defaultCompareMediaQueries
} = options;
const renderer = {
classNameHashSalt,
insertionCache: {},
stylesheets: {},
styleElementAttributes: Object.freeze(styleElementAttributes),
compareMediaQueries,
id: `d${lastIndex++}`,
insertCSSRules(cssRules) {
// eslint-disable-next-line guard-for-in
for (const styleBucketName in cssRules) {
const cssRulesForBucket = cssRules[styleBucketName];
// This is a hot path in rendering styles: ".length" is cached in "l" var to avoid accesses the property
for (let i = 0, l = cssRulesForBucket.length; i < l; i++) {
const [ruleCSS, metadata] = normalizeCSSBucketEntry.normalizeCSSBucketEntry(cssRulesForBucket[i]);
const sheet = getStyleSheetForBucket.getStyleSheetForBucket(styleBucketName, targetDocument, insertionPoint || null, renderer, metadata);
if (renderer.insertionCache[ruleCSS]) {
continue;
}
renderer.insertionCache[ruleCSS] = styleBucketName;
if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled.isDevToolsEnabled) {
store.debugData.addCSSRule(ruleCSS);
}
if (unstable_filterCSSRule) {
if (unstable_filterCSSRule(ruleCSS)) {
safeInsertRule.safeInsertRule(sheet, ruleCSS);
}
} else {
safeInsertRule.safeInsertRule(sheet, ruleCSS);
}
}
}
}
};
if (targetDocument && process.env.NODE_ENV !== 'production' && isDevToolsEnabled.isDevToolsEnabled) {
injectDevTools.injectDevTools(targetDocument);
}
return renderer;
}
exports.createDOMRenderer = createDOMRenderer;
exports.defaultCompareMediaQueries = defaultCompareMediaQueries;
//# sourceMappingURL=createDOMRenderer.cjs.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,64 @@
import { injectDevTools } from '../devtools/injectDevTools.esm.js';
import { isDevToolsEnabled } from '../devtools/isDevToolsEnabled.esm.js';
import { debugData } from '../devtools/store.esm.js';
import { normalizeCSSBucketEntry } from '../runtime/utils/normalizeCSSBucketEntry.esm.js';
import { getStyleSheetForBucket } from './getStyleSheetForBucket.esm.js';
import { safeInsertRule } from './safeInsertRule.esm.js';
let lastIndex = 0;
/** @internal */
const defaultCompareMediaQueries = (a, b) => a < b ? -1 : a > b ? 1 : 0;
/**
* Creates a new instances of a renderer.
*
* @public
*/
function createDOMRenderer(targetDocument = typeof document === 'undefined' ? undefined : document, options = {}) {
const {
classNameHashSalt,
unstable_filterCSSRule,
insertionPoint,
styleElementAttributes,
compareMediaQueries = defaultCompareMediaQueries
} = options;
const renderer = {
classNameHashSalt,
insertionCache: {},
stylesheets: {},
styleElementAttributes: Object.freeze(styleElementAttributes),
compareMediaQueries,
id: `d${lastIndex++}`,
insertCSSRules(cssRules) {
// eslint-disable-next-line guard-for-in
for (const styleBucketName in cssRules) {
const cssRulesForBucket = cssRules[styleBucketName];
// This is a hot path in rendering styles: ".length" is cached in "l" var to avoid accesses the property
for (let i = 0, l = cssRulesForBucket.length; i < l; i++) {
const [ruleCSS, metadata] = normalizeCSSBucketEntry(cssRulesForBucket[i]);
const sheet = getStyleSheetForBucket(styleBucketName, targetDocument, insertionPoint || null, renderer, metadata);
if (renderer.insertionCache[ruleCSS]) {
continue;
}
renderer.insertionCache[ruleCSS] = styleBucketName;
if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {
debugData.addCSSRule(ruleCSS);
}
if (unstable_filterCSSRule) {
if (unstable_filterCSSRule(ruleCSS)) {
safeInsertRule(sheet, ruleCSS);
}
} else {
safeInsertRule(sheet, ruleCSS);
}
}
}
}
};
if (targetDocument && process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {
injectDevTools(targetDocument);
}
return renderer;
}
export { createDOMRenderer, defaultCompareMediaQueries };
//# sourceMappingURL=createDOMRenderer.esm.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,45 @@
'use strict';
var constants = require('../constants.cjs.js');
function createIsomorphicStyleSheet(styleElement, bucketName, priority, elementAttributes) {
// no CSSStyleSheet in SSR, just append rules here for server render
const __cssRulesForSSR = [];
elementAttributes[constants.DATA_BUCKET_ATTR] = bucketName;
elementAttributes[constants.DATA_PRIORITY_ATTR] = String(priority);
if (styleElement) {
for (const attrName in elementAttributes) {
styleElement.setAttribute(attrName, elementAttributes[attrName]);
}
}
function insertRule(rule) {
if (styleElement === null || styleElement === void 0 ? void 0 : styleElement.sheet) {
return styleElement.sheet.insertRule(rule, styleElement.sheet.cssRules.length);
}
return __cssRulesForSSR.push(rule);
}
return {
elementAttributes,
insertRule,
element: styleElement,
bucketName,
cssRules() {
if (styleElement === null || styleElement === void 0 ? void 0 : styleElement.sheet) {
return Array.from(styleElement.sheet.cssRules).map(cssRule => cssRule.cssText);
}
return __cssRulesForSSR;
}
};
}
function createIsomorphicStyleSheetFromElement(element) {
const elementAttributes = Array.from(element.attributes).reduce((acc, attr) => {
acc[attr.name] = attr.value;
return acc;
}, {});
const stylesheet = createIsomorphicStyleSheet(element, elementAttributes[constants.DATA_BUCKET_ATTR], Number(elementAttributes[constants.DATA_PRIORITY_ATTR]), elementAttributes);
return stylesheet;
}
exports.createIsomorphicStyleSheet = createIsomorphicStyleSheet;
exports.createIsomorphicStyleSheetFromElement = createIsomorphicStyleSheetFromElement;
//# sourceMappingURL=createIsomorphicStyleSheet.cjs.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"createIsomorphicStyleSheet.cjs.js","sources":["../../../../packages/core/src/renderer/createIsomorphicStyleSheet.ts"],"sourcesContent":["import { DATA_BUCKET_ATTR, DATA_PRIORITY_ATTR } from '../constants';\nimport type { IsomorphicStyleSheet, StyleBucketName } from '../types';\n\nexport function createIsomorphicStyleSheet(\n styleElement: HTMLStyleElement | undefined,\n bucketName: StyleBucketName,\n priority: number,\n elementAttributes: Record<string, string>,\n): IsomorphicStyleSheet {\n // no CSSStyleSheet in SSR, just append rules here for server render\n const __cssRulesForSSR: string[] = [];\n\n elementAttributes[DATA_BUCKET_ATTR] = bucketName;\n elementAttributes[DATA_PRIORITY_ATTR] = String(priority);\n\n if (styleElement) {\n for (const attrName in elementAttributes) {\n styleElement.setAttribute(attrName, elementAttributes[attrName]);\n }\n }\n\n function insertRule(rule: string) {\n if (styleElement?.sheet) {\n return styleElement.sheet.insertRule(rule, styleElement.sheet.cssRules.length);\n }\n\n return __cssRulesForSSR.push(rule);\n }\n\n return {\n elementAttributes,\n insertRule,\n element: styleElement,\n bucketName,\n cssRules() {\n if (styleElement?.sheet) {\n return Array.from(styleElement.sheet.cssRules).map(cssRule => cssRule.cssText);\n }\n\n return __cssRulesForSSR;\n },\n };\n}\n\nexport function createIsomorphicStyleSheetFromElement(element: HTMLStyleElement) {\n const elementAttributes = Array.from(element.attributes).reduce((acc, attr) => {\n acc[attr.name] = attr.value;\n return acc;\n }, {} as Record<string, string>);\n const stylesheet = createIsomorphicStyleSheet(\n element,\n elementAttributes[DATA_BUCKET_ATTR] as StyleBucketName,\n Number(elementAttributes[DATA_PRIORITY_ATTR]),\n elementAttributes,\n );\n return stylesheet;\n}\n"],"names":["createIsomorphicStyleSheet","styleElement","bucketName","priority","elementAttributes","__cssRulesForSSR","DATA_BUCKET_ATTR","DATA_PRIORITY_ATTR","String","attrName","setAttribute","insertRule","rule","sheet","cssRules","length","push","element","Array","from","map","cssRule","cssText","createIsomorphicStyleSheetFromElement","attributes","reduce","acc","attr","name","value","stylesheet","Number"],"mappings":";;;;AAGM,SAAUA,0BAA0BA,CACxCC,YAA0C,EAC1CC,UAA2B,EAC3BC,QAAgB,EAChBC,iBAAyC,EAAA;AAEzC;EACA,MAAMC,gBAAgB,GAAa,EAAE;AAErCD,EAAAA,iBAAiB,CAACE,0BAAgB,CAAC,GAAGJ,UAAU;AAChDE,EAAAA,iBAAiB,CAACG,4BAAkB,CAAC,GAAGC,MAAM,CAACL,QAAQ,CAAC;AAExD,EAAA,IAAIF,YAAY,EAAE;AAChB,IAAA,KAAK,MAAMQ,QAAQ,IAAIL,iBAAiB,EAAE;MACxCH,YAAY,CAACS,YAAY,CAACD,QAAQ,EAAEL,iBAAiB,CAACK,QAAQ,CAAC,CAAC;AAClE,IAAA;AACF,EAAA;EAEA,SAASE,UAAUA,CAACC,IAAY,EAAA;AAC9B,IAAA,IAAIX,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEY,KAAK,EAAE;AACvB,MAAA,OAAOZ,YAAY,CAACY,KAAK,CAACF,UAAU,CAACC,IAAI,EAAEX,YAAY,CAACY,KAAK,CAACC,QAAQ,CAACC,MAAM,CAAC;AAChF,IAAA;AAEA,IAAA,OAAOV,gBAAgB,CAACW,IAAI,CAACJ,IAAI,CAAC;AACpC,EAAA;EAEA,OAAO;IACLR,iBAAiB;IACjBO,UAAU;AACVM,IAAAA,OAAO,EAAEhB,YAAY;IACrBC,UAAU;AACVY,IAAAA,QAAQA,GAAA;AACN,MAAA,IAAIb,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEY,KAAK,EAAE;AACvB,QAAA,OAAOK,KAAK,CAACC,IAAI,CAAClB,YAAY,CAACY,KAAK,CAACC,QAAQ,CAAC,CAACM,GAAG,CAACC,OAAO,IAAIA,OAAO,CAACC,OAAO,CAAC;AAChF,MAAA;AAEA,MAAA,OAAOjB,gBAAgB;AACzB,IAAA;GACD;AACH;AAEM,SAAUkB,qCAAqCA,CAACN,OAAyB,EAAA;AAC7E,EAAA,MAAMb,iBAAiB,GAAGc,KAAK,CAACC,IAAI,CAACF,OAAO,CAACO,UAAU,CAAC,CAACC,MAAM,CAAC,CAACC,GAAG,EAAEC,IAAI,KAAI;IAC5ED,GAAG,CAACC,IAAI,CAACC,IAAI,CAAC,GAAGD,IAAI,CAACE,KAAK;AAC3B,IAAA,OAAOH,GAAG;EACZ,CAAC,EAAE,EAA4B,CAAC;EAChC,MAAMI,UAAU,GAAG9B,0BAA0B,CAC3CiB,OAAO,EACPb,iBAAiB,CAACE,0BAAgB,CAAoB,EACtDyB,MAAM,CAAC3B,iBAAiB,CAACG,4BAAkB,CAAC,CAAC,EAC7CH,iBAAiB,CAClB;AACD,EAAA,OAAO0B,UAAU;AACnB;;;;;"}

View File

@@ -0,0 +1,42 @@
import { DATA_PRIORITY_ATTR, DATA_BUCKET_ATTR } from '../constants.esm.js';
function createIsomorphicStyleSheet(styleElement, bucketName, priority, elementAttributes) {
// no CSSStyleSheet in SSR, just append rules here for server render
const __cssRulesForSSR = [];
elementAttributes[DATA_BUCKET_ATTR] = bucketName;
elementAttributes[DATA_PRIORITY_ATTR] = String(priority);
if (styleElement) {
for (const attrName in elementAttributes) {
styleElement.setAttribute(attrName, elementAttributes[attrName]);
}
}
function insertRule(rule) {
if (styleElement === null || styleElement === void 0 ? void 0 : styleElement.sheet) {
return styleElement.sheet.insertRule(rule, styleElement.sheet.cssRules.length);
}
return __cssRulesForSSR.push(rule);
}
return {
elementAttributes,
insertRule,
element: styleElement,
bucketName,
cssRules() {
if (styleElement === null || styleElement === void 0 ? void 0 : styleElement.sheet) {
return Array.from(styleElement.sheet.cssRules).map(cssRule => cssRule.cssText);
}
return __cssRulesForSSR;
}
};
}
function createIsomorphicStyleSheetFromElement(element) {
const elementAttributes = Array.from(element.attributes).reduce((acc, attr) => {
acc[attr.name] = attr.value;
return acc;
}, {});
const stylesheet = createIsomorphicStyleSheet(element, elementAttributes[DATA_BUCKET_ATTR], Number(elementAttributes[DATA_PRIORITY_ATTR]), elementAttributes);
return stylesheet;
}
export { createIsomorphicStyleSheet, createIsomorphicStyleSheetFromElement };
//# sourceMappingURL=createIsomorphicStyleSheet.esm.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"createIsomorphicStyleSheet.esm.js","sources":["../../../../packages/core/src/renderer/createIsomorphicStyleSheet.ts"],"sourcesContent":["import { DATA_BUCKET_ATTR, DATA_PRIORITY_ATTR } from '../constants';\nimport type { IsomorphicStyleSheet, StyleBucketName } from '../types';\n\nexport function createIsomorphicStyleSheet(\n styleElement: HTMLStyleElement | undefined,\n bucketName: StyleBucketName,\n priority: number,\n elementAttributes: Record<string, string>,\n): IsomorphicStyleSheet {\n // no CSSStyleSheet in SSR, just append rules here for server render\n const __cssRulesForSSR: string[] = [];\n\n elementAttributes[DATA_BUCKET_ATTR] = bucketName;\n elementAttributes[DATA_PRIORITY_ATTR] = String(priority);\n\n if (styleElement) {\n for (const attrName in elementAttributes) {\n styleElement.setAttribute(attrName, elementAttributes[attrName]);\n }\n }\n\n function insertRule(rule: string) {\n if (styleElement?.sheet) {\n return styleElement.sheet.insertRule(rule, styleElement.sheet.cssRules.length);\n }\n\n return __cssRulesForSSR.push(rule);\n }\n\n return {\n elementAttributes,\n insertRule,\n element: styleElement,\n bucketName,\n cssRules() {\n if (styleElement?.sheet) {\n return Array.from(styleElement.sheet.cssRules).map(cssRule => cssRule.cssText);\n }\n\n return __cssRulesForSSR;\n },\n };\n}\n\nexport function createIsomorphicStyleSheetFromElement(element: HTMLStyleElement) {\n const elementAttributes = Array.from(element.attributes).reduce((acc, attr) => {\n acc[attr.name] = attr.value;\n return acc;\n }, {} as Record<string, string>);\n const stylesheet = createIsomorphicStyleSheet(\n element,\n elementAttributes[DATA_BUCKET_ATTR] as StyleBucketName,\n Number(elementAttributes[DATA_PRIORITY_ATTR]),\n elementAttributes,\n );\n return stylesheet;\n}\n"],"names":["createIsomorphicStyleSheet","styleElement","bucketName","priority","elementAttributes","__cssRulesForSSR","DATA_BUCKET_ATTR","DATA_PRIORITY_ATTR","String","attrName","setAttribute","insertRule","rule","sheet","cssRules","length","push","element","Array","from","map","cssRule","cssText","createIsomorphicStyleSheetFromElement","attributes","reduce","acc","attr","name","value","stylesheet","Number"],"mappings":";;AAGM,SAAUA,0BAA0BA,CACxCC,YAA0C,EAC1CC,UAA2B,EAC3BC,QAAgB,EAChBC,iBAAyC,EAAA;AAEzC;EACA,MAAMC,gBAAgB,GAAa,EAAE;AAErCD,EAAAA,iBAAiB,CAACE,gBAAgB,CAAC,GAAGJ,UAAU;AAChDE,EAAAA,iBAAiB,CAACG,kBAAkB,CAAC,GAAGC,MAAM,CAACL,QAAQ,CAAC;AAExD,EAAA,IAAIF,YAAY,EAAE;AAChB,IAAA,KAAK,MAAMQ,QAAQ,IAAIL,iBAAiB,EAAE;MACxCH,YAAY,CAACS,YAAY,CAACD,QAAQ,EAAEL,iBAAiB,CAACK,QAAQ,CAAC,CAAC;AAClE,IAAA;AACF,EAAA;EAEA,SAASE,UAAUA,CAACC,IAAY,EAAA;AAC9B,IAAA,IAAIX,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEY,KAAK,EAAE;AACvB,MAAA,OAAOZ,YAAY,CAACY,KAAK,CAACF,UAAU,CAACC,IAAI,EAAEX,YAAY,CAACY,KAAK,CAACC,QAAQ,CAACC,MAAM,CAAC;AAChF,IAAA;AAEA,IAAA,OAAOV,gBAAgB,CAACW,IAAI,CAACJ,IAAI,CAAC;AACpC,EAAA;EAEA,OAAO;IACLR,iBAAiB;IACjBO,UAAU;AACVM,IAAAA,OAAO,EAAEhB,YAAY;IACrBC,UAAU;AACVY,IAAAA,QAAQA,GAAA;AACN,MAAA,IAAIb,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEY,KAAK,EAAE;AACvB,QAAA,OAAOK,KAAK,CAACC,IAAI,CAAClB,YAAY,CAACY,KAAK,CAACC,QAAQ,CAAC,CAACM,GAAG,CAACC,OAAO,IAAIA,OAAO,CAACC,OAAO,CAAC;AAChF,MAAA;AAEA,MAAA,OAAOjB,gBAAgB;AACzB,IAAA;GACD;AACH;AAEM,SAAUkB,qCAAqCA,CAACN,OAAyB,EAAA;AAC7E,EAAA,MAAMb,iBAAiB,GAAGc,KAAK,CAACC,IAAI,CAACF,OAAO,CAACO,UAAU,CAAC,CAACC,MAAM,CAAC,CAACC,GAAG,EAAEC,IAAI,KAAI;IAC5ED,GAAG,CAACC,IAAI,CAACC,IAAI,CAAC,GAAGD,IAAI,CAACE,KAAK;AAC3B,IAAA,OAAOH,GAAG;EACZ,CAAC,EAAE,EAA4B,CAAC;EAChC,MAAMI,UAAU,GAAG9B,0BAA0B,CAC3CiB,OAAO,EACPb,iBAAiB,CAACE,gBAAgB,CAAoB,EACtDyB,MAAM,CAAC3B,iBAAiB,CAACG,kBAAkB,CAAC,CAAC,EAC7CH,iBAAiB,CAClB;AACD,EAAA,OAAO0B,UAAU;AACnB;;;;"}

Some files were not shown because too many files have changed in this diff Show More