@contember/react-utils 1.2.0-alpha.2 → 1.2.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/development/debug-context/Context.js +6 -2
- package/dist/development/debug-context/Context.js.map +1 -1
- package/dist/development/hooks/useArrayMapMemo.js +2 -0
- package/dist/development/hooks/useArrayMapMemo.js.map +1 -1
- package/dist/development/hooks/useConstantLengthInvariant.js +9 -0
- package/dist/development/hooks/useConstantLengthInvariant.js.map +1 -1
- package/dist/development/hooks/useConstantValueInvariant.js +9 -0
- package/dist/development/hooks/useConstantValueInvariant.js.map +1 -1
- package/dist/development/hooks/useExpectSameValueReference.js +6 -0
- package/dist/development/hooks/useExpectSameValueReference.js.map +1 -1
- package/dist/development/index.js +0 -3
- package/dist/development/index.js.map +1 -1
- package/dist/production/index.js +0 -3
- package/dist/production/index.js.map +1 -1
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/hooks/index.ts +0 -1
- package/dist/development/hooks/useCountLayoutSlotChildren.js +0 -31
- package/dist/development/hooks/useCountLayoutSlotChildren.js.map +0 -1
- package/dist/production/hooks/useCountLayoutSlotChildren.js +0 -31
- package/dist/production/hooks/useCountLayoutSlotChildren.js.map +0 -1
- package/dist/types/hooks/useCountLayoutSlotChildren.d.ts +0 -5
- package/dist/types/hooks/useCountLayoutSlotChildren.d.ts.map +0 -1
- package/src/hooks/useCountLayoutSlotChildren.ts +0 -46
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
2
2
|
import { assert, isNonEmptyString } from "@contember/utilities";
|
|
3
3
|
import { createContext, useContext, useMemo, useRef, memo } from "react";
|
|
4
4
|
import { noopScopedConsole, isNoopScopedConsole } from "./Constants.js";
|
|
@@ -56,7 +56,11 @@ const useScopedConsoleRef = (prefix) => {
|
|
|
56
56
|
const DebugChildren = memo(({ active = true, children, id }) => {
|
|
57
57
|
const parentScopedConsole = parentScopedConsoleOrNone(useContext(ScopedConsoleContext));
|
|
58
58
|
const console2 = active && id ? createPrefixedConsole(id, parentScopedConsole) : noopScopedConsole;
|
|
59
|
-
return /* @__PURE__ */
|
|
59
|
+
return /* @__PURE__ */ jsxDEV(ScopedConsoleContext.Provider, { value: active ? console2 : noopScopedConsole, children }, void 0, false, {
|
|
60
|
+
fileName: "/__w/interface/interface/packages/react-utils/src/debug-context/Context.tsx",
|
|
61
|
+
lineNumber: 77,
|
|
62
|
+
columnNumber: 3
|
|
63
|
+
}, globalThis);
|
|
60
64
|
});
|
|
61
65
|
DebugChildren.displayName = "DebugChildren";
|
|
62
66
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Context.js","sources":["../../../src/debug-context/Context.tsx"],"sourcesContent":["import { assert, isNonEmptyString } from '@contember/utilities'\nimport { ReactNode, createContext, memo, useContext, useMemo, useRef } from 'react'\nimport { isNoopScopedConsole, noopScopedConsole } from './Constants'\nimport { ScopedConsoleContextType } from './Types'\n\nfunction createPrefixedConsole(message: string, prefixedConsole?: ScopedConsoleContextType): ScopedConsoleContextType {\n\treturn {\n\t\terror: function error(...parameters: any[]) {\n\t\t\t(prefixedConsole ?? console).error(message, ...parameters)\n\t\t},\n\t\terrored: function errored<T>(message: string, value: T): T {\n\t\t\t(prefixedConsole ?? console).error(message, value)\n\t\t\treturn value\n\t\t},\n\t\tlog: function log(...parameters: any[]) {\n\t\t\t(prefixedConsole ?? console).log(message, ...parameters)\n\t\t},\n\t\tlogged: function logged<T>(message: string, value: T): T {\n\t\t\t(prefixedConsole ?? console).log(message, value)\n\t\t\treturn value\n\t\t},\n\t\ttrace: function trace(...parameters: any[]) {\n\t\t\t(prefixedConsole ?? console).trace(message, ...parameters)\n\t\t},\n\t\ttraced: function traced<T>(message: string, value: T): T {\n\t\t\t(prefixedConsole ?? console).trace(message, value)\n\t\t\treturn value\n\t\t},\n\t\twarn: function warn(...parameters: any[]) {\n\t\t\t(prefixedConsole ?? console).warn(message, ...parameters)\n\t\t},\n\t\twarned: function warned<T>(message: string, value: T): T {\n\t\t\t(prefixedConsole ?? console).warn(message, value)\n\t\t\treturn value\n\t\t},\n\t}\n}\n\nexport const ScopedConsoleContext = createContext<ScopedConsoleContextType>(null!)\nScopedConsoleContext.displayName = 'ScopedConsoleContext'\n\nfunction parentScopedConsoleOrNone(parentConsole: ScopedConsoleContextType): ScopedConsoleContextType | undefined {\n\treturn isNoopScopedConsole(parentConsole) ? undefined : parentConsole\n}\n\nexport const useScopedConsoleRef = (prefix: string) => {\n\tassert('prefix is non-empty string', prefix, isNonEmptyString)\n\n\tconst parentConsole = parentScopedConsoleOrNone(useContext(ScopedConsoleContext))\n\n\tconst scopedConsole = useMemo(() => {\n\t\tif (parentConsole) {\n\t\t\treturn createPrefixedConsole(prefix, parentConsole)\n\t\t} else {\n\t\t\treturn noopScopedConsole\n\t\t}\n\t}, [parentConsole, prefix])\n\n\tconst ref = useRef(scopedConsole)\n\tref.current = scopedConsole\n\n\treturn ref\n}\n\nexport type DebugChildrenProps =\n\t| { active: true; children: ReactNode; id: string; }\n\t| { active?: false; children: ReactNode; id?: string; }\n\nexport const DebugChildren = memo<DebugChildrenProps>(({ active = true, children, id }) => {\n\tconst parentScopedConsole = parentScopedConsoleOrNone(useContext(ScopedConsoleContext))\n\n\tconst console = active && id\n\t\t? createPrefixedConsole(id, parentScopedConsole)\n\t\t: noopScopedConsole\n\n\treturn (\n\t\t<ScopedConsoleContext.Provider value={active ? console : noopScopedConsole}>\n\t\t\t{children}\n\t\t</ScopedConsoleContext.Provider>\n\t)\n})\nDebugChildren.displayName = 'DebugChildren'\n"],"names":["message","console"],"mappings":";;;;AAKA,SAAS,sBAAsB,SAAiB,iBAAsE;AAC9G,SAAA;AAAA,IACN,OAAO,SAAS,SAAS,YAAmB;AAC3C,OAAC,mBAAmB,SAAS,MAAM,SAAS,GAAG,UAAU;AAAA,IAC1D;AAAA,IACA,SAAS,SAAS,QAAWA,UAAiB,OAAa;AAC1D,OAAC,mBAAmB,SAAS,MAAMA,UAAS,KAAK;AAC1C,aAAA;AAAA,IACR;AAAA,IACA,KAAK,SAAS,OAAO,YAAmB;AACvC,OAAC,mBAAmB,SAAS,IAAI,SAAS,GAAG,UAAU;AAAA,IACxD;AAAA,IACA,QAAQ,SAAS,OAAUA,UAAiB,OAAa;AACxD,OAAC,mBAAmB,SAAS,IAAIA,UAAS,KAAK;AACxC,aAAA;AAAA,IACR;AAAA,IACA,OAAO,SAAS,SAAS,YAAmB;AAC3C,OAAC,mBAAmB,SAAS,MAAM,SAAS,GAAG,UAAU;AAAA,IAC1D;AAAA,IACA,QAAQ,SAAS,OAAUA,UAAiB,OAAa;AACxD,OAAC,mBAAmB,SAAS,MAAMA,UAAS,KAAK;AAC1C,aAAA;AAAA,IACR;AAAA,IACA,MAAM,SAAS,QAAQ,YAAmB;AACzC,OAAC,mBAAmB,SAAS,KAAK,SAAS,GAAG,UAAU;AAAA,IACzD;AAAA,IACA,QAAQ,SAAS,OAAUA,UAAiB,OAAa;AACxD,OAAC,mBAAmB,SAAS,KAAKA,UAAS,KAAK;AACzC,aAAA;AAAA,IACR;AAAA,EAAA;AAEF;AAEa,MAAA,uBAAuB,cAAwC,IAAK;AACjF,qBAAqB,cAAc;AAEnC,SAAS,0BAA0B,eAA+E;AAC1G,SAAA,oBAAoB,aAAa,IAAI,SAAY;AACzD;AAEa,MAAA,sBAAsB,CAAC,WAAmB;AAC/C,SAAA,8BAA8B,QAAQ,gBAAgB;AAE7D,QAAM,gBAAgB,0BAA0B,WAAW,oBAAoB,CAAC;AAE1E,QAAA,gBAAgB,QAAQ,MAAM;AACnC,QAAI,eAAe;AACX,aAAA,sBAAsB,QAAQ,aAAa;AAAA,IAAA,OAC5C;AACC,aAAA;AAAA,IACR;AAAA,EAAA,GACE,CAAC,eAAe,MAAM,CAAC;AAEpB,QAAA,MAAM,OAAO,aAAa;AAChC,MAAI,UAAU;AAEP,SAAA;AACR;AAMa,MAAA,gBAAgB,KAAyB,CAAC,EAAE,SAAS,MAAM,UAAU,SAAS;AAC1F,QAAM,sBAAsB,0BAA0B,WAAW,oBAAoB,CAAC;AAEtF,QAAMC,WAAU,UAAU,KACvB,sBAAsB,IAAI,mBAAmB,IAC7C;AAGF,SAAA,
|
|
1
|
+
{"version":3,"file":"Context.js","sources":["../../../src/debug-context/Context.tsx"],"sourcesContent":["import { assert, isNonEmptyString } from '@contember/utilities'\nimport { ReactNode, createContext, memo, useContext, useMemo, useRef } from 'react'\nimport { isNoopScopedConsole, noopScopedConsole } from './Constants'\nimport { ScopedConsoleContextType } from './Types'\n\nfunction createPrefixedConsole(message: string, prefixedConsole?: ScopedConsoleContextType): ScopedConsoleContextType {\n\treturn {\n\t\terror: function error(...parameters: any[]) {\n\t\t\t(prefixedConsole ?? console).error(message, ...parameters)\n\t\t},\n\t\terrored: function errored<T>(message: string, value: T): T {\n\t\t\t(prefixedConsole ?? console).error(message, value)\n\t\t\treturn value\n\t\t},\n\t\tlog: function log(...parameters: any[]) {\n\t\t\t(prefixedConsole ?? console).log(message, ...parameters)\n\t\t},\n\t\tlogged: function logged<T>(message: string, value: T): T {\n\t\t\t(prefixedConsole ?? console).log(message, value)\n\t\t\treturn value\n\t\t},\n\t\ttrace: function trace(...parameters: any[]) {\n\t\t\t(prefixedConsole ?? console).trace(message, ...parameters)\n\t\t},\n\t\ttraced: function traced<T>(message: string, value: T): T {\n\t\t\t(prefixedConsole ?? console).trace(message, value)\n\t\t\treturn value\n\t\t},\n\t\twarn: function warn(...parameters: any[]) {\n\t\t\t(prefixedConsole ?? console).warn(message, ...parameters)\n\t\t},\n\t\twarned: function warned<T>(message: string, value: T): T {\n\t\t\t(prefixedConsole ?? console).warn(message, value)\n\t\t\treturn value\n\t\t},\n\t}\n}\n\nexport const ScopedConsoleContext = createContext<ScopedConsoleContextType>(null!)\nScopedConsoleContext.displayName = 'ScopedConsoleContext'\n\nfunction parentScopedConsoleOrNone(parentConsole: ScopedConsoleContextType): ScopedConsoleContextType | undefined {\n\treturn isNoopScopedConsole(parentConsole) ? undefined : parentConsole\n}\n\nexport const useScopedConsoleRef = (prefix: string) => {\n\tassert('prefix is non-empty string', prefix, isNonEmptyString)\n\n\tconst parentConsole = parentScopedConsoleOrNone(useContext(ScopedConsoleContext))\n\n\tconst scopedConsole = useMemo(() => {\n\t\tif (parentConsole) {\n\t\t\treturn createPrefixedConsole(prefix, parentConsole)\n\t\t} else {\n\t\t\treturn noopScopedConsole\n\t\t}\n\t}, [parentConsole, prefix])\n\n\tconst ref = useRef(scopedConsole)\n\tref.current = scopedConsole\n\n\treturn ref\n}\n\nexport type DebugChildrenProps =\n\t| { active: true; children: ReactNode; id: string; }\n\t| { active?: false; children: ReactNode; id?: string; }\n\nexport const DebugChildren = memo<DebugChildrenProps>(({ active = true, children, id }) => {\n\tconst parentScopedConsole = parentScopedConsoleOrNone(useContext(ScopedConsoleContext))\n\n\tconst console = active && id\n\t\t? createPrefixedConsole(id, parentScopedConsole)\n\t\t: noopScopedConsole\n\n\treturn (\n\t\t<ScopedConsoleContext.Provider value={active ? console : noopScopedConsole}>\n\t\t\t{children}\n\t\t</ScopedConsoleContext.Provider>\n\t)\n})\nDebugChildren.displayName = 'DebugChildren'\n"],"names":["message","console","this"],"mappings":";;;;AAKA,SAAS,sBAAsB,SAAiB,iBAAsE;AAC9G,SAAA;AAAA,IACN,OAAO,SAAS,SAAS,YAAmB;AAC3C,OAAC,mBAAmB,SAAS,MAAM,SAAS,GAAG,UAAU;AAAA,IAC1D;AAAA,IACA,SAAS,SAAS,QAAWA,UAAiB,OAAa;AAC1D,OAAC,mBAAmB,SAAS,MAAMA,UAAS,KAAK;AAC1C,aAAA;AAAA,IACR;AAAA,IACA,KAAK,SAAS,OAAO,YAAmB;AACvC,OAAC,mBAAmB,SAAS,IAAI,SAAS,GAAG,UAAU;AAAA,IACxD;AAAA,IACA,QAAQ,SAAS,OAAUA,UAAiB,OAAa;AACxD,OAAC,mBAAmB,SAAS,IAAIA,UAAS,KAAK;AACxC,aAAA;AAAA,IACR;AAAA,IACA,OAAO,SAAS,SAAS,YAAmB;AAC3C,OAAC,mBAAmB,SAAS,MAAM,SAAS,GAAG,UAAU;AAAA,IAC1D;AAAA,IACA,QAAQ,SAAS,OAAUA,UAAiB,OAAa;AACxD,OAAC,mBAAmB,SAAS,MAAMA,UAAS,KAAK;AAC1C,aAAA;AAAA,IACR;AAAA,IACA,MAAM,SAAS,QAAQ,YAAmB;AACzC,OAAC,mBAAmB,SAAS,KAAK,SAAS,GAAG,UAAU;AAAA,IACzD;AAAA,IACA,QAAQ,SAAS,OAAUA,UAAiB,OAAa;AACxD,OAAC,mBAAmB,SAAS,KAAKA,UAAS,KAAK;AACzC,aAAA;AAAA,IACR;AAAA,EAAA;AAEF;AAEa,MAAA,uBAAuB,cAAwC,IAAK;AACjF,qBAAqB,cAAc;AAEnC,SAAS,0BAA0B,eAA+E;AAC1G,SAAA,oBAAoB,aAAa,IAAI,SAAY;AACzD;AAEa,MAAA,sBAAsB,CAAC,WAAmB;AAC/C,SAAA,8BAA8B,QAAQ,gBAAgB;AAE7D,QAAM,gBAAgB,0BAA0B,WAAW,oBAAoB,CAAC;AAE1E,QAAA,gBAAgB,QAAQ,MAAM;AACnC,QAAI,eAAe;AACX,aAAA,sBAAsB,QAAQ,aAAa;AAAA,IAAA,OAC5C;AACC,aAAA;AAAA,IACR;AAAA,EAAA,GACE,CAAC,eAAe,MAAM,CAAC;AAEpB,QAAA,MAAM,OAAO,aAAa;AAChC,MAAI,UAAU;AAEP,SAAA;AACR;AAMa,MAAA,gBAAgB,KAAyB,CAAC,EAAE,SAAS,MAAM,UAAU,SAAS;AAC1F,QAAM,sBAAsB,0BAA0B,WAAW,oBAAoB,CAAC;AAEtF,QAAMC,WAAU,UAAU,KACvB,sBAAsB,IAAI,mBAAmB,IAC7C;AAGF,SAAA,uBAAC,qBAAqB,UAArB,EAA8B,OAAO,SAASA,WAAU,mBACvD,SADF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAEA,GAAAC,UAAA;AAEF,CAAC;AACD,cAAc,cAAc;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
+
import { useConstantLengthInvariant } from "./useConstantLengthInvariant.js";
|
|
2
3
|
const useArrayMapMemo = (items, map) => {
|
|
4
|
+
useConstantLengthInvariant(items);
|
|
3
5
|
const mapped = useMemo(() => items.map(map), [map, ...items]);
|
|
4
6
|
return useMemo(() => mapped, mapped);
|
|
5
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useArrayMapMemo.js","sources":["../../../src/hooks/useArrayMapMemo.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useConstantLengthInvariant } from './useConstantLengthInvariant'\n\n/**\n * ⚠️ ONLY USE THIS IF YOU *REALLY* KNOW WHAT YOU'RE DOING! ⚠️\n * ⚠ HERE BE DRAGONS THAT KNOW WHERE YOU LIVE! ⚠\n *\n * This is a bit of React naughtiness that allows us to memoize outputs of Array.prototype.map() based on the contents\n * of the original array, and not its referential equality. That way, if we create a new array with identical items,\n * we get an array that is referentially equal to the previous one.\n */\nexport const useArrayMapMemo = <Item, OutputItem>(\n\titems: Item[],\n\tmap: (value: Item, index: number, array: Item[]) => OutputItem,\n): OutputItem[] => {\n\tuseConstantLengthInvariant(items)\n\n\t// This is tricky. We don't want to exclude the map function from the dependency list because if it changes but the\n\t// items array remains the same, we still want to re-compute the new array. However, if that yields the same array,\n\t// in the sense that the items are identical, albeit computed via a different map function, we still want to\n\t// preserve the referential equality of the original. Hence the second memo.\n\n\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\tconst mapped = useMemo(() => items.map(map), [map, ...items])\n\n\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\treturn useMemo(() => mapped, mapped) // This is deliberately not `[mapped]`\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useArrayMapMemo.js","sources":["../../../src/hooks/useArrayMapMemo.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useConstantLengthInvariant } from './useConstantLengthInvariant'\n\n/**\n * ⚠️ ONLY USE THIS IF YOU *REALLY* KNOW WHAT YOU'RE DOING! ⚠️\n * ⚠ HERE BE DRAGONS THAT KNOW WHERE YOU LIVE! ⚠\n *\n * This is a bit of React naughtiness that allows us to memoize outputs of Array.prototype.map() based on the contents\n * of the original array, and not its referential equality. That way, if we create a new array with identical items,\n * we get an array that is referentially equal to the previous one.\n */\nexport const useArrayMapMemo = <Item, OutputItem>(\n\titems: Item[],\n\tmap: (value: Item, index: number, array: Item[]) => OutputItem,\n): OutputItem[] => {\n\tuseConstantLengthInvariant(items)\n\n\t// This is tricky. We don't want to exclude the map function from the dependency list because if it changes but the\n\t// items array remains the same, we still want to re-compute the new array. However, if that yields the same array,\n\t// in the sense that the items are identical, albeit computed via a different map function, we still want to\n\t// preserve the referential equality of the original. Hence the second memo.\n\n\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\tconst mapped = useMemo(() => items.map(map), [map, ...items])\n\n\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\treturn useMemo(() => mapped, mapped) // This is deliberately not `[mapped]`\n}\n"],"names":[],"mappings":";;AAWa,MAAA,kBAAkB,CAC9B,OACA,QACkB;AAClB,6BAA2B,KAAK;AAQ1B,QAAA,SAAS,QAAQ,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC;AAGrD,SAAA,QAAQ,MAAM,QAAQ,MAAM;AACpC;"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
import { usePreviousValue } from "./usePreviousValue.js";
|
|
1
2
|
const useConstantLengthInvariant = (items, message) => {
|
|
3
|
+
{
|
|
4
|
+
const previous = usePreviousValue(items);
|
|
5
|
+
if (previous.length !== items.length) {
|
|
6
|
+
throw new Error(
|
|
7
|
+
`Invariant violation: ${message || "Changing the length of an array whose length must remain constant between renders."}`
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
2
11
|
};
|
|
3
12
|
export {
|
|
4
13
|
useConstantLengthInvariant
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConstantLengthInvariant.js","sources":["../../../src/hooks/useConstantLengthInvariant.ts"],"sourcesContent":["import { usePreviousValue } from './usePreviousValue'\n\n// This entire hook should get optimized away for prod\nexport const useConstantLengthInvariant = <Item>(items: Item[], message?: string) => {\n\tif (import.meta.env.DEV) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst previous = usePreviousValue(items)\n\t\tif (previous.length !== items.length) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invariant violation: ${message || 'Changing the length of an array whose length must remain constant between renders.'\n\t\t\t\t}`,\n\t\t\t)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":"AAGa,MAAA,6BAA6B,CAAO,OAAe,YAAqB;
|
|
1
|
+
{"version":3,"file":"useConstantLengthInvariant.js","sources":["../../../src/hooks/useConstantLengthInvariant.ts"],"sourcesContent":["import { usePreviousValue } from './usePreviousValue'\n\n// This entire hook should get optimized away for prod\nexport const useConstantLengthInvariant = <Item>(items: Item[], message?: string) => {\n\tif (import.meta.env.DEV) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst previous = usePreviousValue(items)\n\t\tif (previous.length !== items.length) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invariant violation: ${message || 'Changing the length of an array whose length must remain constant between renders.'\n\t\t\t\t}`,\n\t\t\t)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";AAGa,MAAA,6BAA6B,CAAO,OAAe,YAAqB;AAC3D;AAElB,UAAA,WAAW,iBAAiB,KAAK;AACnC,QAAA,SAAS,WAAW,MAAM,QAAQ;AACrC,YAAM,IAAI;AAAA,QACT,wBAAwB,WAAW;AAAA,MAAA;AAAA,IAGrC;AAAA,EACD;AACD;"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
import { usePreviousValue } from "./usePreviousValue.js";
|
|
1
2
|
const useConstantValueInvariant = (value, message) => {
|
|
3
|
+
{
|
|
4
|
+
const previous = usePreviousValue(value);
|
|
5
|
+
if (previous !== value) {
|
|
6
|
+
throw new Error(
|
|
7
|
+
`Invariant violation: ${message || "Changing a value which must remain constant between renders."}`
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
2
11
|
};
|
|
3
12
|
export {
|
|
4
13
|
useConstantValueInvariant
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConstantValueInvariant.js","sources":["../../../src/hooks/useConstantValueInvariant.ts"],"sourcesContent":["import { usePreviousValue } from './usePreviousValue'\n\n// This entire hook should get optimized away for prod\nexport const useConstantValueInvariant = <Value>(value: Value, message?: string) => {\n\tif (import.meta.env.DEV) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst previous = usePreviousValue(value)\n\t\tif (previous !== value) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invariant violation: ${message || 'Changing a value which must remain constant between renders.'}`,\n\t\t\t)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":"AAGa,MAAA,4BAA4B,CAAQ,OAAc,YAAqB;
|
|
1
|
+
{"version":3,"file":"useConstantValueInvariant.js","sources":["../../../src/hooks/useConstantValueInvariant.ts"],"sourcesContent":["import { usePreviousValue } from './usePreviousValue'\n\n// This entire hook should get optimized away for prod\nexport const useConstantValueInvariant = <Value>(value: Value, message?: string) => {\n\tif (import.meta.env.DEV) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst previous = usePreviousValue(value)\n\t\tif (previous !== value) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invariant violation: ${message || 'Changing a value which must remain constant between renders.'}`,\n\t\t\t)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";AAGa,MAAA,4BAA4B,CAAQ,OAAc,YAAqB;AAC1D;AAElB,UAAA,WAAW,iBAAiB,KAAK;AACvC,QAAI,aAAa,OAAO;AACvB,YAAM,IAAI;AAAA,QACT,wBAAwB,WAAW;AAAA,MAAA;AAAA,IAErC;AAAA,EACD;AACD;"}
|
|
@@ -3,6 +3,12 @@ import { useRef } from "react";
|
|
|
3
3
|
function useExpectSameValueReference(next, shouldThrow = false) {
|
|
4
4
|
const previous = useRef(next);
|
|
5
5
|
if (next !== previous.current && typeof next === "object" && typeof previous.current === "object" && deepEqual(next, previous.current)) {
|
|
6
|
+
{
|
|
7
|
+
console.error("Previous and next next do not match in reference although match in value", {
|
|
8
|
+
previous: previous.current,
|
|
9
|
+
next
|
|
10
|
+
});
|
|
11
|
+
}
|
|
6
12
|
if (shouldThrow) {
|
|
7
13
|
throw new Error("Expecting same reference for same values");
|
|
8
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExpectSameValueReference.js","sources":["../../../src/hooks/useExpectSameValueReference.ts"],"sourcesContent":["import deepEqual from 'deep-equal'\nimport { useRef } from 'react'\n\n// TODO: Unify error behavior with useConstantValueInvariant() and maybe merge into one hook.\nexport function useExpectSameValueReference<T>(next: T, shouldThrow: boolean = false) {\n\tconst previous = useRef(next)\n\n\tif (next !== previous.current\n\t\t&& typeof next === 'object'\n\t\t&& typeof previous.current === 'object'\n\t\t&& deepEqual(next, previous.current)\n\t) {\n\t\tif (import.meta.env.DEV) {\n\t\t\tconsole.error('Previous and next next do not match in reference although match in value', {\n\t\t\t\tprevious: previous.current,\n\t\t\t\tnext,\n\t\t\t})\n\t\t}\n\n\t\tif (shouldThrow) {\n\t\t\tthrow new Error('Expecting same reference for same values')\n\t\t}\n\t}\n\n\tprevious.current = next\n}\n"],"names":[],"mappings":";;AAIgB,SAAA,4BAA+B,MAAS,cAAuB,OAAO;AAC/E,QAAA,WAAW,OAAO,IAAI;AAE5B,MAAI,SAAS,SAAS,WAClB,OAAO,SAAS,YAChB,OAAO,SAAS,YAAY,YAC5B,UAAU,MAAM,SAAS,OAAO,GAClC;
|
|
1
|
+
{"version":3,"file":"useExpectSameValueReference.js","sources":["../../../src/hooks/useExpectSameValueReference.ts"],"sourcesContent":["import deepEqual from 'deep-equal'\nimport { useRef } from 'react'\n\n// TODO: Unify error behavior with useConstantValueInvariant() and maybe merge into one hook.\nexport function useExpectSameValueReference<T>(next: T, shouldThrow: boolean = false) {\n\tconst previous = useRef(next)\n\n\tif (next !== previous.current\n\t\t&& typeof next === 'object'\n\t\t&& typeof previous.current === 'object'\n\t\t&& deepEqual(next, previous.current)\n\t) {\n\t\tif (import.meta.env.DEV) {\n\t\t\tconsole.error('Previous and next next do not match in reference although match in value', {\n\t\t\t\tprevious: previous.current,\n\t\t\t\tnext,\n\t\t\t})\n\t\t}\n\n\t\tif (shouldThrow) {\n\t\t\tthrow new Error('Expecting same reference for same values')\n\t\t}\n\t}\n\n\tprevious.current = next\n}\n"],"names":[],"mappings":";;AAIgB,SAAA,4BAA+B,MAAS,cAAuB,OAAO;AAC/E,QAAA,WAAW,OAAO,IAAI;AAE5B,MAAI,SAAS,SAAS,WAClB,OAAO,SAAS,YAChB,OAAO,SAAS,YAAY,YAC5B,UAAU,MAAM,SAAS,OAAO,GAClC;AACwB;AACxB,cAAQ,MAAM,4EAA4E;AAAA,QACzF,UAAU,SAAS;AAAA,QACnB;AAAA,MAAA,CACA;AAAA,IACF;AAEA,QAAI,aAAa;AACV,YAAA,IAAI,MAAM,0CAA0C;AAAA,IAC3D;AAAA,EACD;AAEA,WAAS,UAAU;AACpB;"}
|
|
@@ -8,7 +8,6 @@ import { useArrayMapMemo } from "./hooks/useArrayMapMemo.js";
|
|
|
8
8
|
import { useComposeRef } from "./hooks/useComposeRef.js";
|
|
9
9
|
import { useConstantLengthInvariant } from "./hooks/useConstantLengthInvariant.js";
|
|
10
10
|
import { useConstantValueInvariant } from "./hooks/useConstantValueInvariant.js";
|
|
11
|
-
import { useCountLayoutSlotChildren, useHasEmptySlotsClassName } from "./hooks/useCountLayoutSlotChildren.js";
|
|
12
11
|
import { useDebounce } from "./hooks/useDebounce.js";
|
|
13
12
|
import { useDebounceCallback } from "./hooks/useDebounceCallback.js";
|
|
14
13
|
import { useElementSize } from "./hooks/useElementSize.js";
|
|
@@ -53,14 +52,12 @@ export {
|
|
|
53
52
|
useComposeRef,
|
|
54
53
|
useConstantLengthInvariant,
|
|
55
54
|
useConstantValueInvariant,
|
|
56
|
-
useCountLayoutSlotChildren,
|
|
57
55
|
useDebounce,
|
|
58
56
|
useDebounceCallback,
|
|
59
57
|
useElementSize,
|
|
60
58
|
useEventHandler,
|
|
61
59
|
useExpectSameValueReference,
|
|
62
60
|
useForceRender,
|
|
63
|
-
useHasEmptySlotsClassName,
|
|
64
61
|
useIsMounted,
|
|
65
62
|
useObjectMemo,
|
|
66
63
|
useOnElementMutation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/production/index.js
CHANGED
|
@@ -8,7 +8,6 @@ import { useArrayMapMemo } from "./hooks/useArrayMapMemo.js";
|
|
|
8
8
|
import { useComposeRef } from "./hooks/useComposeRef.js";
|
|
9
9
|
import { useConstantLengthInvariant } from "./hooks/useConstantLengthInvariant.js";
|
|
10
10
|
import { useConstantValueInvariant } from "./hooks/useConstantValueInvariant.js";
|
|
11
|
-
import { useCountLayoutSlotChildren, useHasEmptySlotsClassName } from "./hooks/useCountLayoutSlotChildren.js";
|
|
12
11
|
import { useDebounce } from "./hooks/useDebounce.js";
|
|
13
12
|
import { useDebounceCallback } from "./hooks/useDebounceCallback.js";
|
|
14
13
|
import { useElementSize } from "./hooks/useElementSize.js";
|
|
@@ -53,14 +52,12 @@ export {
|
|
|
53
52
|
useComposeRef,
|
|
54
53
|
useConstantLengthInvariant,
|
|
55
54
|
useConstantValueInvariant,
|
|
56
|
-
useCountLayoutSlotChildren,
|
|
57
55
|
useDebounce,
|
|
58
56
|
useDebounceCallback,
|
|
59
57
|
useElementSize,
|
|
60
58
|
useEventHandler,
|
|
61
59
|
useExpectSameValueReference,
|
|
62
60
|
useForceRender,
|
|
63
|
-
useHasEmptySlotsClassName,
|
|
64
61
|
useIsMounted,
|
|
65
62
|
useObjectMemo,
|
|
66
63
|
useOnElementMutation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,6 @@ export * from './useArrayMapMemo';
|
|
|
5
5
|
export * from './useComposeRef';
|
|
6
6
|
export * from './useConstantLengthInvariant';
|
|
7
7
|
export * from './useConstantValueInvariant';
|
|
8
|
-
export * from './useCountLayoutSlotChildren';
|
|
9
8
|
export * from './useDebounce';
|
|
10
9
|
export * from './useDebounceCallback';
|
|
11
10
|
export * from './useElementSize';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/@types/react/global.d.ts","../../../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../../../node_modules/@types/prop-types/index.d.ts","../../../../node_modules/@types/scheduler/tracing.d.ts","../../../../node_modules/@types/react/index.d.ts","../../../../node_modules/@types/react/jsx-runtime.d.ts","../../src/context/createNonNullableContextFactory.ts","../../src/context/index.ts","../../src/debug-context/Types.ts","../../src/debug-context/Constants.ts","../../../utilities/dist/types/assert-types/AssertionError.d.ts","../../../utilities/dist/types/assert-types/Predicates.d.ts","../../../utilities/dist/types/assert-types/assert.d.ts","../../../utilities/dist/types/assert-types/index.d.ts","../../../utilities/dist/types/class-name/Types.d.ts","../../../utilities/dist/types/class-name/classNameFor.d.ts","../../../utilities/dist/types/class-name/listClassName.d.ts","../../../utilities/dist/types/class-name/stateClassName.d.ts","../../../utilities/dist/types/class-name/index.d.ts","../../../utilities/dist/types/css-utilities/px.d.ts","../../../utilities/dist/types/css-utilities/index.d.ts","../../../utilities/dist/types/dom/getMatchingParentElement.d.ts","../../../utilities/dist/types/dom/getSizeFromResizeObserverEntry.d.ts","../../../utilities/dist/types/dom/isScrollable.d.ts","../../../utilities/dist/types/dom/parseTransformMatrix.d.ts","../../../utilities/dist/types/dom/svgSizeProps.d.ts","../../../utilities/dist/types/dom/index.d.ts","../../../utilities/dist/types/functional/pick.d.ts","../../../utilities/dist/types/functional/setHasOneOf.d.ts","../../../utilities/dist/types/functional/index.d.ts","../../../utilities/dist/types/string-utilities/capitalize.d.ts","../../../utilities/dist/types/string-utilities/trimString.d.ts","../../../utilities/dist/types/string-utilities/index.d.ts","../../../utilities/dist/types/typescript-utilities/DeepPartial.d.ts","../../../utilities/dist/types/typescript-utilities/NonNullableRequired.d.ts","../../../utilities/dist/types/typescript-utilities/ObjectKeyValue.d.ts","../../../utilities/dist/types/typescript-utilities/PolymorphicRefs.d.ts","../../../utilities/dist/types/typescript-utilities/Try.d.ts","../../../utilities/dist/types/typescript-utilities/index.d.ts","../../../utilities/dist/types/index.d.ts","../../src/debug-context/Context.tsx","../../src/debug-context/index.ts","../../src/hooks/unwrapRefValue.ts","../../src/hooks/useAbortController.ts","../../src/referentiallyStable/emptyArray.ts","../../src/referentiallyStable/emptyObject.ts","../../src/referentiallyStable/identityFunction.ts","../../src/referentiallyStable/noop.ts","../../src/referentiallyStable/returnFalse.ts","../../src/referentiallyStable/returnTrue.ts","../../src/referentiallyStable/useReferentiallyStableCallback.ts","../../src/referentiallyStable/index.ts","../../src/hooks/useOnWindowResize.ts","../../src/hooks/useAddClassNameDuringResize.ts","../../src/hooks/usePreviousValue.ts","../../src/hooks/useConstantLengthInvariant.ts","../../src/hooks/useArrayMapMemo.ts","../../src/hooks/useComposeRef.ts","../../src/hooks/useConstantValueInvariant.ts","../../../../node_modules/@types/deep-equal/index.d.ts","../../src/hooks/useOnElementMutation.ts","../../src/hooks/useCountLayoutSlotChildren.ts","../../src/hooks/useDebounce.ts","../../src/hooks/useDebounceCallback.ts","../../src/hooks/useOnElementResize.ts","../../src/hooks/useElementSize.ts","../../src/hooks/useEventHandler.ts","../../src/hooks/useExpectSameValueReference.ts","../../src/hooks/useForceRender.ts","../../src/hooks/useIsMounted.ts","../../src/hooks/useObjectMemo.ts","../../src/hooks/useOnScrollWithin.ts","../../src/hooks/useScrollOffsets.ts","../../src/types/PropsWithRequiredChildren.ts","../../src/types/Serializable.ts","../../src/types/index.ts","../../src/hooks/useStoredState.ts","../../src/hooks/useUpdatedRef.ts","../../src/hooks/useWindowSize.ts","../../src/hooks/index.ts","../../src/index.ts","../../../../node_modules/vite/types/hmrPayload.d.ts","../../../../node_modules/vite/types/customEvent.d.ts","../../../../node_modules/vite/types/hot.d.ts","../../../../node_modules/vite/types/importGlob.d.ts","../../../../node_modules/vite/types/importMeta.d.ts","../../../../node_modules/vite/client.d.ts"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"9a60b92bca4c1257db03b349d58e63e4868cfc0d1c8d0ba60c2dbc63f4e6c9f6","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"b7feb7967c6c6003e11f49efa8f5de989484e0a6ba2e5a6c41b55f8b8bd85dba","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"1c29793071152b207c01ea1954e343be9a44d85234447b2b236acae9e709a383","6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"7fb6faf1006c3503d44e4922c8c65772ddc98e92bad7c2ae2d5db123f3e297b3","affectsGlobalScope":true},"af7fd2870746deed40e130fc0a3966de74e8f52a97ec114d0fbb35876ab05ca9",{"version":"fb55838e748c6b05664f35710a54bbc47c3d7c02460c7793b6dc4d66ef170933","signature":"8d9ced16ade46e55b9a69cc93de2f9b1e5978f5c02711e3767c6a85330cc1fef"},{"version":"9fb4e837b1b35f10e97dddf61026c9f9edbfb60074fcb2906920c86e3c50d65e","signature":"bd8229bcce32bf6a61aef9334e3c57c27e2a734ca6c5b2ed866167ffa4d392bb"},{"version":"fd1000297d832f3941f4805499412de58103aa078fffb6e09636bc5497a4a764","signature":"c2d7b2ba06f7ddcfc14a19836a07ca4e4fa995f29323bcf398a1e7b259a2f883"},{"version":"62a72689dd2257182702432b302c8fc9c713bbd3df063ec230577ad20d448564","signature":"1f6c8bf3acd3faf5b580fc7b547057de1eb12a9351a3c882c3027d0442404630"},"f341c93fefe964ea97c5106e3d93c4271bb3951a06a34e08da704c6faf871380","d008cfe24f8735737cd75c908b4a46595eed628952fb1c8866f592d72ebab3f9","fd476e29349bf7fa3585d85a418d12fbbe9ca7003f890388d8689b5bd22ae49a","4208294e49e360d85181893edd94b4fe4b2ae35c39f0e76f8edfb8d0cc6a958a","e6de7bbbc8f1b4516625a0d9b3baf5d5e2188993caa4c6c0fd2bcd57f0b906f1","a19199399eded44250cd989ec6ac0b64b9a64082012cc561a27cd96e3f9d347b","adf99208c7680acbbf39170aaa798b9914286e2c4ef83f301ca45b233b49a737","a81f32494df0e41ff9ccd7ad0ebf03bd3cf57dc6cb3c9d6725f2b7e985b6cfb4","e5f85f0166a2f3e45a23dba6435c306d6ab412ede158aa52c29836a83dfb23bf","afd44534064f3d94cd248096074344857d9e8aaa787eb209b155002f76b44271","f3c9d693e0597f6b1b5dd49bd0beaaa237bd491508991ea3c72b47d3c7d20fdb","7bd62fc2cefeeb76bf935279de114a8f509d70232badea6f02c5235b8efd08a7","cc9bdde4319a73448db9e4dd8dc256d04f0060b90383b4563c3a32a3b67780d5","2a5d65d9ef97588e66e1eb9ba088e3bcd8fad77f56319a34f206f042716d5f98","53870be174a4233e5ceb0b0f7d7b298eb5896f45782236f65cfce1e971e13a02","dfe644b96a0786c3ed103bffe7331349022c647802d40030067cf71c9ce79bb5","80a16e6c4ae5e1fb7bb726540647fd0d687b441d275ee3b429fe46adbcd2820e","16803990fe6e4e75f83a6a35bb69afa0ea6eb7af218c17e67e9449e4e44bd280","f4d6688e7084a99a025d570c620544d5235668cf2fe90acc8b5b311729c83816","016afc13dc57e151a2cebeefbf07b95fbb7429a4c75b79979021d82728e78b83","7a8119cc3d41a3adfa818800df5899f1bf3cc68eed005e44a85c218dbcf3889a","1ea04e06101a73c7896a461675bd5a429b121c5cb6de24c94332ff102d145a98","3c1cda1ddaa0975a89502446e0c8932df2b242971d832648dd380268351e7bf9","d6339e78331aef24260e77249cc452ab8487ed3308a7bdc06135e7b465587127","e1e25bc3db37f4722303072a8f02c3d9408d7c226e2f070f45dc21a7c0214be7","325430df8b9df3d182ab9edfa79b6f772eced949949620db3f2cef29091b24ed","28d766affdde4aa6fd61b870f4d738cfcdb7388f4f26565eba7d0aca87831131","b182b44845c33c2c049c56bbc090c182f8a39e55362b266fdc6871299567a597","611934171fe82ad4c214817603caab99c5ae1844cfe4b18edcd2724fe35cb9f5","9e47c559935123ff2dd8a8b7c07e93c6ac139a4b72ebac8fee3ae3a879e39717",{"version":"3a01695ae8159ee726b996156ac00ff4faffc5d81724e4f337ad19151e0003b2","signature":"047c1966f1591768de6c27cff55fea2004dc29909772653c54ec6175fe89fe0f"},{"version":"4ee566ff97a4bb7fe21c656c2c63942a0fedfcfd1be0cd7880af771ff8ac59be","signature":"d5a966f87b35362b5d996d9ecf3d8508c27156956627498195abfdaf23326506"},{"version":"da2407349c44421984d8c588ecad6213bdbb4b2203d7f7b72e44f676392e6586","signature":"8f2446cd225d6848f764838175f31f918b704800880bd8dc045932d6b2a52673"},{"version":"1119fa53c926c20e281cb27ca310a053daee51ff4d4105fbec8c95cbc51deba8","signature":"76e9a763eef4a0ef8a4f50e387b9fad5266d471d8b0f62619f31bbd3d21b9814"},{"version":"6ed0434b66c265567ba50989270a2a406c1c7290de0ca0606424c5209f15c14b","signature":"944cd92c6b59feb32961d560267393f372b1dcff1d6cd71a6230ba03f91036b5"},{"version":"f9dccb27c442d882186eb81a6613368994304a1e19c581ab2d169e449f41a3ba","signature":"314e888c6a1a1cc4d30295ebacece510231e4e4ee7028434aee277abda977baf"},{"version":"ce96cdf4ec7233fd29eef8a8c8236c259997010527d25124c64760e645377271","signature":"f6e30e59f4a1f0d0e6b231c280322ce9b007ff9c54fdb13b707e870430341778"},{"version":"2f377947a423abcfb75b0e27d9986021be894b808ffa7cfcfde8d1e3b8214c90","signature":"58861fcc3db99d3761938fad76882bb93f726eaddbc3342cced707d00f94f5bd"},{"version":"194018367f7ed61f1bdbd2ce5c7ab2f16fb2f235dee82de70510ad132f6d5890","signature":"bda7d503a370f6aef217e2f68a326d4a5c2d4cae43f8131c084f509c8ccb83a7"},{"version":"9a2d06df39b9eb74e5d947dd74943894a9ad56a46c86bf0940e63a550233c376","signature":"6194964a45d631834d96f0c91ea7041d7e15f94db83b217e92466adf1646b894"},{"version":"59bf5133b21c380d75307ef184d78d14485e875cfea8f94a0393a7a628761a17","signature":"47450610465821f3ef5c6c116a91f2d1f3da33f37a9a4da00fff7a1a3bbaf8c4"},{"version":"31d0453c697851cead7aad3738e70a7ead0dd031185fe5824b994ac5bbbdabc6","signature":"d55e0e385634448cb9df2a75a80e9b44e4bdc1e87d2f942b0ee68c28365b9bfc"},{"version":"0b0cbad1c318fc84bf3fc7e437f2471020647c1125e107c1f0c3883c4cda9d0c","signature":"5d68e76b227ac7a7c2fd863ca5c7168117276051d049b49c3ff475d04390f669"},{"version":"553d8cd33914dc3a15b82f10654050105cf2382aa8bb31ab1c22bfd70b3e0c0d","signature":"5666830778592987b29dac9758fe142b3db2934d845e60d1ad71884fdf3153c3"},{"version":"8ce84c30ed8e4ff9217beacd12b12344fc733ba4d759e016a6c2df97a172cfda","signature":"2bc449b91944ffae1f59471da701908ff793787f257f23b4ef71759acc97939f"},{"version":"1ec802e9ffbe86a6164b5809ed7819d11fb3e29f7b744827bc33830141718c74","signature":"572d37a64f63ea48d1e50cc50a3ffb9dea5fb130926dc53f9eef8e867c6982d5"},{"version":"b1096d58f6517057f746012925a47ec2d066d0c4143337982dc7f15467ca747e","signature":"809cd2debef3870c93afe5ddf02db6f18f4e223163bf252af70241de431f4465"},{"version":"ba81cbdb0e8b70ee378bc4707204d493628f9198a269d3eddee8769f44d96b8d","signature":"273dab284b012bd39052d5068a8e5e493e79f7bbf603c3a6e8aa544d3a37a971"},{"version":"4e9b248518009250ac32d8d2a7537f8915067b27c385b19a9693206e3493d0be","signature":"5d05ccc4198e13f67f653cb968b468bb81cf3e65ae591cf59cf30f8ab6450237"},"2e345cb6511f4c4c60c274df6626c94f3182939034f06cdf414bfbccc584f822",{"version":"93145b1a33f14a5b8fc8eb72b610d52f7c4fa252bc0bb8d67264e5c477994440","signature":"217c927c9096d539fa9ed50cddae8663efb63d7c9a3638ec66e323f124edf944"},{"version":"7bb62df8580778ed6fa9858d6080554249ae1e5991a37ba8a61f096310e75ee7","signature":"33f41a8af7a886c86be004c170cf945d76f1526588114b134ccdc445a596eda3"},{"version":"e7a67060180f7a26df5eb50bc0d146a97ba95ff352e40053ee133acbb1ec54d2","signature":"19fc07b31d401c27075277ed71154ab13c74ef43ab20898e7ae24de8d16fb172"},{"version":"8b46cbe63fa6800d645e6c9225b05988079787674eba03ac3fb7910ce04b2a8a","signature":"807c0151462ab7b02b0a3bf439c110128ebef4644850d10b95a280efad9241fd"},{"version":"e843179dcb12019c61df74d854ecb6c42daabf96acf727fa8567e3c8b91a5c5a","signature":"f4846a5ce4f92bcfbd766a60b500be9132562b536501694b16eac9be117c1a93"},{"version":"455bcd511df43a8aeb600bdea43f29ec9d8efcd3d0ce8e5be2cf7a963f080d7f","signature":"2bd4e30b6f03566988d3f22c36af13c5bca58f78a81292123f49780bd7bc4d9f"},{"version":"c57c3dc474bd33922f44be9e8262f5b363d2f34afa9c456c34183532347438d3","signature":"0989b7833f22432b4effb9dd964ea745c4485174a7f205eff8b6eca7650fdd04"},{"version":"4fecd80080b0cda53c9216c79b0b0c6c6d9dee53dd028e62e168093871e75434","signature":"d6e9cf6e99664ac41e12e0d1a0c9f2d917be8f89507f0b8aa3df4ef4a405ea7d"},{"version":"d0606fc9b7309eef1022f066b55be926544edc47e0b211c60a54367daa7f1320","signature":"2bd4625ce452e0f25677c4d07430710c57d424ec2d33391debae18ea9a67a56a"},{"version":"8e83142922b25c87b8b3d90ecfc44a60a3017129abee86227a71bc2491e79678","signature":"b48798e7ef7f2e4f7bd9e6dbdcb037b24ea8f2effbb4bdd4a9a05930f01d9fc7"},{"version":"e3bac02b563a2ebfb9784935f4a039531c7341c565d1c0707e65623578555e83","signature":"9e9ed85ced77a7b59d07a821d69db8a8e780bcd1caeb5623e6ac04401cba31c4"},{"version":"62f0dba8960e5f96f56691405e257d078c6abbc0748804b3a1cc9f32222442d5","signature":"7975d8566fd9321324b32045a4333e1d7edab85588faef8e9bdfc5efacc94df0"},{"version":"fccdaadd501719ec69070ece163158eaec354d74b2b6a35266afdd4ba74e6e1a","signature":"e74bdf83c107823764f73f5ce4bc4ec44c5771e58c219caaf60de7cffe78bb25"},{"version":"26f0f8afb62e55578d063a85b8466922b60bda21c8cd674fd991543429b0a457","signature":"ba2e3244ab6bb9b566681fe3739144a3f3a6c549f8ffc18af5c6909f34b5367c"},{"version":"1ff0b5a9de5dd2ab9af8f3b2b0827aa5d819e2de0ac22ff9e83a4c7dc6971a2d","signature":"8b4adeab24aaca65cf5145650e670147494fbd9aa71ac29de6685b0bfbf4be05"},{"version":"0e3b9862a0ce71dc8c872a7d9e03aa8df63ebced4798b5a5b2a203648672e479","signature":"40ab9090ab933f2463706b6eab3f6cee55021b38beb59f1e52d323475eac2c92"},{"version":"c770066c63b5fe1bb2ff04fd4cfceb84566ad609fbe4b2cc745c0e082361356f","signature":"9efb264d88f6181d6e763fce12d0f7d19893f48be79fb840a7f68d9bf8ee2da8"},{"version":"552149a29e0c220b7bee747b92a8ec42691443ef616b744a0c8e74a39b2dfa4f","signature":"da4d2fd24b5b25a9fff5fd42166c1fd6e44dacc8362bee445590583d95795f3f"},{"version":"e7ffbe95b1ad2d6a75ec1fa91328506c3e85f9162a53d7c1f81549092eec6a4b","signature":"89a2e13f35eafb164d59a5ec2c46cf97bf12c76a670d546a986c7880bde83c23"},{"version":"ef7eaf2f524589ed999bfe30fb507d4272631dea3f402cc6ade6d17da32ecd31","signature":"d00ad5327db1e75e10d101c3343b21916c584ea140fade51a002547bfc49c49c"},{"version":"c146c9630129ca6e05868042308493adcbe91ab17905b75c3389890d2188dff8","signature":"e4377349ba50d4da674de09a20d45ec7e4ad6522263a40b8029a044d6680b97f"},"bcb6ea18f23dae2c48459d7b86d3adccd6898f824fcbf9da08b935f559896580","0aa7220845f5f3902fe043f646f9d9218bd7dd6c4046e8471580866ea6b03aa2","4d5fb5d6b35f731b2ae4d9d7c592d48e91d6de531dd130628edf4eba16add893","739c2c46edc112421fc023c24b4898b1f413f792bb6a02b40ba182c648e56c2f",{"version":"df93bb67d5ae7be3d599323de42e12cb8da59f0b490c3186ae91d493632b5e36","affectsGlobalScope":true},{"version":"f8b8b34c4f7651c9f7b126af8affda4139a0499e62e74f0f8dc2be36e9f14b59","affectsGlobalScope":true}],"root":[[68,71],[102,120],[122,142]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":4,"module":99,"noEmitOnError":true,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7,"useDefineForClassFields":true},"fileIdsList":[[62,63,64,65],[66],[147],[143],[144],[145,146],[66,67],[67,68],[67,70],[66,67,70,71,101],[67],[67,70,71,102],[67,104,105,114,115,116,117,118,119,120,122,123,124,125,126,127,128,129,130,131,132,134,138,139,140],[66,67,113,114],[66,67,117],[67,116],[66,67,104,122],[66,67,101,103,104,126],[66,67,121],[66,67,103,104,121],[66,67,103,104],[66,67,103],[66,67,101,103,104,113,114,133],[66,67,137],[66,67,114],[67,69,103,113,137,141],[67,106,107,108,109,110,111,112],[67,135,136],[72,73,74],[76],[76,77,78,79],[81],[83,84,85,86,87],[89,90],[75,80,82,88,91,94,100],[92,93],[95,96,97,98,99],[68],[70],[66,70],[70,71,102],[104,105,114,115,116,117,118,119,120,122,123,124,125,126,127,128,129,130,131,132,134,138,139,140],[104],[137],[69,103,113,137,141],[106,107,108,109,110,111,112],[135,136]],"referencedMap":[[66,1],[67,2],[148,3],[144,4],[145,5],[147,6],[68,7],[69,8],[71,9],[102,10],[70,11],[103,12],[141,13],[104,7],[105,7],[115,14],[118,15],[119,7],[117,16],[120,16],[123,17],[124,7],[125,7],[127,18],[128,7],[129,19],[130,7],[131,7],[132,7],[122,20],[126,21],[133,21],[114,22],[116,7],[134,23],[138,24],[139,7],[140,25],[142,26],[106,11],[107,11],[108,11],[113,27],[109,11],[110,11],[111,11],[112,7],[135,7],[136,11],[137,28],[75,29],[77,30],[80,31],[79,30],[82,32],[88,33],[91,34],[101,35],[94,36],[100,37]],"exportedModulesMap":[[66,1],[67,2],[148,3],[144,4],[145,5],[147,6],[68,2],[69,38],[71,39],[102,40],[103,41],[141,42],[104,2],[119,2],[123,43],[127,43],[128,2],[130,2],[131,2],[122,43],[126,43],[133,43],[134,43],[138,44],[139,2],[142,45],[113,46],[135,2],[137,47],[75,29],[77,30],[80,31],[79,30],[82,32],[88,33],[91,34],[101,35],[94,36],[100,37]],"semanticDiagnosticsPerFile":[121,64,62,66,67,63,65,60,61,12,13,15,14,2,16,17,18,19,20,21,22,23,3,4,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,53,54,57,55,56,58,10,1,11,59,148,144,143,145,146,147,68,69,71,102,70,103,141,104,105,115,118,119,117,120,123,124,125,127,128,129,130,131,132,122,126,133,114,116,134,138,139,140,142,106,107,108,113,109,110,111,112,135,136,137,72,73,74,75,76,77,80,78,79,82,81,83,84,88,85,86,87,91,89,90,101,92,94,93,95,96,97,98,99,100],"latestChangedDtsFile":"./index.d.ts"},"version":"5.0.4"}
|
|
1
|
+
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/@types/react/global.d.ts","../../../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../../../node_modules/@types/prop-types/index.d.ts","../../../../node_modules/@types/scheduler/tracing.d.ts","../../../../node_modules/@types/react/index.d.ts","../../../../node_modules/@types/react/jsx-runtime.d.ts","../../src/context/createNonNullableContextFactory.ts","../../src/context/index.ts","../../src/debug-context/Types.ts","../../src/debug-context/Constants.ts","../../../utilities/dist/types/assert-types/AssertionError.d.ts","../../../utilities/dist/types/assert-types/Predicates.d.ts","../../../utilities/dist/types/assert-types/assert.d.ts","../../../utilities/dist/types/assert-types/assertNever.d.ts","../../../utilities/dist/types/assert-types/index.d.ts","../../../utilities/dist/types/class-name/GlobalClassNamePrefixContext.d.ts","../../../utilities/dist/types/class-name/Types.d.ts","../../../utilities/dist/types/class-name/listClassName.d.ts","../../../utilities/dist/types/class-name/stateClassName.d.ts","../../../utilities/dist/types/class-name/useClassName.d.ts","../../../utilities/dist/types/class-name/useClassNameFactory.d.ts","../../../utilities/dist/types/class-name/index.d.ts","../../../utilities/dist/types/css-utilities/px.d.ts","../../../utilities/dist/types/css-utilities/index.d.ts","../../../utilities/dist/types/dom/dataAttribute.d.ts","../../../utilities/dist/types/dom/getMatchingParentElement.d.ts","../../../utilities/dist/types/dom/getSizeFromResizeObserverEntry.d.ts","../../../utilities/dist/types/dom/isScrollable.d.ts","../../../utilities/dist/types/dom/parseTransformMatrix.d.ts","../../../utilities/dist/types/dom/svgSizeProps.d.ts","../../../utilities/dist/types/dom/index.d.ts","../../../utilities/dist/types/functional/pick.d.ts","../../../utilities/dist/types/functional/setHasOneOf.d.ts","../../../utilities/dist/types/functional/index.d.ts","../../../utilities/dist/types/string-utilities/capitalize.d.ts","../../../utilities/dist/types/string-utilities/trimString.d.ts","../../../utilities/dist/types/string-utilities/index.d.ts","../../../utilities/dist/types/typescript-utilities/DeepPartial.d.ts","../../../utilities/dist/types/typescript-utilities/NonNullableRequired.d.ts","../../../utilities/dist/types/typescript-utilities/ObjectKeyValue.d.ts","../../../utilities/dist/types/typescript-utilities/PolymorphicRefs.d.ts","../../../utilities/dist/types/typescript-utilities/Try.d.ts","../../../utilities/dist/types/typescript-utilities/index.d.ts","../../../utilities/dist/types/index.d.ts","../../src/debug-context/Context.tsx","../../src/debug-context/index.ts","../../src/hooks/unwrapRefValue.ts","../../src/hooks/useAbortController.ts","../../src/referentiallyStable/emptyArray.ts","../../src/referentiallyStable/emptyObject.ts","../../src/referentiallyStable/identityFunction.ts","../../src/referentiallyStable/noop.ts","../../src/referentiallyStable/returnFalse.ts","../../src/referentiallyStable/returnTrue.ts","../../src/referentiallyStable/useReferentiallyStableCallback.ts","../../src/referentiallyStable/index.ts","../../src/hooks/useOnWindowResize.ts","../../src/hooks/useAddClassNameDuringResize.ts","../../src/hooks/usePreviousValue.ts","../../src/hooks/useConstantLengthInvariant.ts","../../src/hooks/useArrayMapMemo.ts","../../src/hooks/useComposeRef.ts","../../src/hooks/useConstantValueInvariant.ts","../../src/hooks/useDebounce.ts","../../src/hooks/useDebounceCallback.ts","../../src/hooks/useOnElementResize.ts","../../src/hooks/useElementSize.ts","../../src/hooks/useEventHandler.ts","../../../../node_modules/@types/deep-equal/index.d.ts","../../src/hooks/useExpectSameValueReference.ts","../../src/hooks/useForceRender.ts","../../src/hooks/useIsMounted.ts","../../src/hooks/useObjectMemo.ts","../../src/hooks/useOnElementMutation.ts","../../src/hooks/useOnScrollWithin.ts","../../src/hooks/useScrollOffsets.ts","../../src/types/PropsWithRequiredChildren.ts","../../src/types/Serializable.ts","../../src/types/index.ts","../../src/hooks/useStoredState.ts","../../src/hooks/useUpdatedRef.ts","../../src/hooks/useWindowSize.ts","../../src/hooks/index.ts","../../src/index.ts","../../../../node_modules/vite/types/hmrPayload.d.ts","../../../../node_modules/vite/types/customEvent.d.ts","../../../../node_modules/vite/types/hot.d.ts","../../../../node_modules/vite/types/importGlob.d.ts","../../../../node_modules/vite/types/importMeta.d.ts","../../../../node_modules/vite/client.d.ts"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"9a60b92bca4c1257db03b349d58e63e4868cfc0d1c8d0ba60c2dbc63f4e6c9f6","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"b7feb7967c6c6003e11f49efa8f5de989484e0a6ba2e5a6c41b55f8b8bd85dba","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"1c29793071152b207c01ea1954e343be9a44d85234447b2b236acae9e709a383","6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"7fb6faf1006c3503d44e4922c8c65772ddc98e92bad7c2ae2d5db123f3e297b3","affectsGlobalScope":true},"af7fd2870746deed40e130fc0a3966de74e8f52a97ec114d0fbb35876ab05ca9",{"version":"fb55838e748c6b05664f35710a54bbc47c3d7c02460c7793b6dc4d66ef170933","signature":"8d9ced16ade46e55b9a69cc93de2f9b1e5978f5c02711e3767c6a85330cc1fef"},{"version":"9fb4e837b1b35f10e97dddf61026c9f9edbfb60074fcb2906920c86e3c50d65e","signature":"bd8229bcce32bf6a61aef9334e3c57c27e2a734ca6c5b2ed866167ffa4d392bb"},{"version":"fd1000297d832f3941f4805499412de58103aa078fffb6e09636bc5497a4a764","signature":"c2d7b2ba06f7ddcfc14a19836a07ca4e4fa995f29323bcf398a1e7b259a2f883"},{"version":"62a72689dd2257182702432b302c8fc9c713bbd3df063ec230577ad20d448564","signature":"1f6c8bf3acd3faf5b580fc7b547057de1eb12a9351a3c882c3027d0442404630"},"f341c93fefe964ea97c5106e3d93c4271bb3951a06a34e08da704c6faf871380","d008cfe24f8735737cd75c908b4a46595eed628952fb1c8866f592d72ebab3f9","fd476e29349bf7fa3585d85a418d12fbbe9ca7003f890388d8689b5bd22ae49a","a95c25e1f9146dd90f7cb36c7e306a25a67bdef1eaae7319a60d2f9d3ff66804","16149c524b7c619b07806ba94d745532a4867cecc24aa14b42640d3404f4dd0e","564c57d76966679f0345941dfe3905b43c1c813d10dc6c6de2f1e79501a2c312","e6de7bbbc8f1b4516625a0d9b3baf5d5e2188993caa4c6c0fd2bcd57f0b906f1","adf99208c7680acbbf39170aaa798b9914286e2c4ef83f301ca45b233b49a737","a81f32494df0e41ff9ccd7ad0ebf03bd3cf57dc6cb3c9d6725f2b7e985b6cfb4","6bd7f81319411f28afeebf25871299f2f0ee362669f44ed68a09db95c9fa472a","1adec9773ba21f0a7df63667d1c3082a37443739d62e766371df6ede2de1fb0e","0288097d81e533fb1df7881c43adfb440c3e97fed71f6e53133eb5e700f75875","afd44534064f3d94cd248096074344857d9e8aaa787eb209b155002f76b44271","f3c9d693e0597f6b1b5dd49bd0beaaa237bd491508991ea3c72b47d3c7d20fdb","1c84b348bb07619f2123fddd01c20184c6212540909bd98fdc450f7d4e234717","7bd62fc2cefeeb76bf935279de114a8f509d70232badea6f02c5235b8efd08a7","cc9bdde4319a73448db9e4dd8dc256d04f0060b90383b4563c3a32a3b67780d5","2a5d65d9ef97588e66e1eb9ba088e3bcd8fad77f56319a34f206f042716d5f98","53870be174a4233e5ceb0b0f7d7b298eb5896f45782236f65cfce1e971e13a02","dfe644b96a0786c3ed103bffe7331349022c647802d40030067cf71c9ce79bb5","fd90070d1485a0bf8917bc97443d08c5d26a283e923f5578b7e15d1486befe77","16803990fe6e4e75f83a6a35bb69afa0ea6eb7af218c17e67e9449e4e44bd280","f4d6688e7084a99a025d570c620544d5235668cf2fe90acc8b5b311729c83816","016afc13dc57e151a2cebeefbf07b95fbb7429a4c75b79979021d82728e78b83","7a8119cc3d41a3adfa818800df5899f1bf3cc68eed005e44a85c218dbcf3889a","1ea04e06101a73c7896a461675bd5a429b121c5cb6de24c94332ff102d145a98","3c1cda1ddaa0975a89502446e0c8932df2b242971d832648dd380268351e7bf9","d6339e78331aef24260e77249cc452ab8487ed3308a7bdc06135e7b465587127","e1e25bc3db37f4722303072a8f02c3d9408d7c226e2f070f45dc21a7c0214be7","325430df8b9df3d182ab9edfa79b6f772eced949949620db3f2cef29091b24ed","28d766affdde4aa6fd61b870f4d738cfcdb7388f4f26565eba7d0aca87831131","b182b44845c33c2c049c56bbc090c182f8a39e55362b266fdc6871299567a597","611934171fe82ad4c214817603caab99c5ae1844cfe4b18edcd2724fe35cb9f5","9e47c559935123ff2dd8a8b7c07e93c6ac139a4b72ebac8fee3ae3a879e39717",{"version":"3a01695ae8159ee726b996156ac00ff4faffc5d81724e4f337ad19151e0003b2","signature":"047c1966f1591768de6c27cff55fea2004dc29909772653c54ec6175fe89fe0f"},{"version":"4ee566ff97a4bb7fe21c656c2c63942a0fedfcfd1be0cd7880af771ff8ac59be","signature":"d5a966f87b35362b5d996d9ecf3d8508c27156956627498195abfdaf23326506"},{"version":"da2407349c44421984d8c588ecad6213bdbb4b2203d7f7b72e44f676392e6586","signature":"8f2446cd225d6848f764838175f31f918b704800880bd8dc045932d6b2a52673"},{"version":"1119fa53c926c20e281cb27ca310a053daee51ff4d4105fbec8c95cbc51deba8","signature":"76e9a763eef4a0ef8a4f50e387b9fad5266d471d8b0f62619f31bbd3d21b9814"},{"version":"6ed0434b66c265567ba50989270a2a406c1c7290de0ca0606424c5209f15c14b","signature":"944cd92c6b59feb32961d560267393f372b1dcff1d6cd71a6230ba03f91036b5"},{"version":"f9dccb27c442d882186eb81a6613368994304a1e19c581ab2d169e449f41a3ba","signature":"314e888c6a1a1cc4d30295ebacece510231e4e4ee7028434aee277abda977baf"},{"version":"ce96cdf4ec7233fd29eef8a8c8236c259997010527d25124c64760e645377271","signature":"f6e30e59f4a1f0d0e6b231c280322ce9b007ff9c54fdb13b707e870430341778"},{"version":"2f377947a423abcfb75b0e27d9986021be894b808ffa7cfcfde8d1e3b8214c90","signature":"58861fcc3db99d3761938fad76882bb93f726eaddbc3342cced707d00f94f5bd"},{"version":"194018367f7ed61f1bdbd2ce5c7ab2f16fb2f235dee82de70510ad132f6d5890","signature":"bda7d503a370f6aef217e2f68a326d4a5c2d4cae43f8131c084f509c8ccb83a7"},{"version":"9a2d06df39b9eb74e5d947dd74943894a9ad56a46c86bf0940e63a550233c376","signature":"6194964a45d631834d96f0c91ea7041d7e15f94db83b217e92466adf1646b894"},{"version":"59bf5133b21c380d75307ef184d78d14485e875cfea8f94a0393a7a628761a17","signature":"47450610465821f3ef5c6c116a91f2d1f3da33f37a9a4da00fff7a1a3bbaf8c4"},{"version":"31d0453c697851cead7aad3738e70a7ead0dd031185fe5824b994ac5bbbdabc6","signature":"d55e0e385634448cb9df2a75a80e9b44e4bdc1e87d2f942b0ee68c28365b9bfc"},{"version":"0b0cbad1c318fc84bf3fc7e437f2471020647c1125e107c1f0c3883c4cda9d0c","signature":"5d68e76b227ac7a7c2fd863ca5c7168117276051d049b49c3ff475d04390f669"},{"version":"553d8cd33914dc3a15b82f10654050105cf2382aa8bb31ab1c22bfd70b3e0c0d","signature":"5666830778592987b29dac9758fe142b3db2934d845e60d1ad71884fdf3153c3"},{"version":"8ce84c30ed8e4ff9217beacd12b12344fc733ba4d759e016a6c2df97a172cfda","signature":"2bc449b91944ffae1f59471da701908ff793787f257f23b4ef71759acc97939f"},{"version":"1ec802e9ffbe86a6164b5809ed7819d11fb3e29f7b744827bc33830141718c74","signature":"572d37a64f63ea48d1e50cc50a3ffb9dea5fb130926dc53f9eef8e867c6982d5"},{"version":"b1096d58f6517057f746012925a47ec2d066d0c4143337982dc7f15467ca747e","signature":"809cd2debef3870c93afe5ddf02db6f18f4e223163bf252af70241de431f4465"},{"version":"ba81cbdb0e8b70ee378bc4707204d493628f9198a269d3eddee8769f44d96b8d","signature":"273dab284b012bd39052d5068a8e5e493e79f7bbf603c3a6e8aa544d3a37a971"},{"version":"4e9b248518009250ac32d8d2a7537f8915067b27c385b19a9693206e3493d0be","signature":"5d05ccc4198e13f67f653cb968b468bb81cf3e65ae591cf59cf30f8ab6450237"},{"version":"e7a67060180f7a26df5eb50bc0d146a97ba95ff352e40053ee133acbb1ec54d2","signature":"19fc07b31d401c27075277ed71154ab13c74ef43ab20898e7ae24de8d16fb172"},{"version":"8b46cbe63fa6800d645e6c9225b05988079787674eba03ac3fb7910ce04b2a8a","signature":"807c0151462ab7b02b0a3bf439c110128ebef4644850d10b95a280efad9241fd"},{"version":"e843179dcb12019c61df74d854ecb6c42daabf96acf727fa8567e3c8b91a5c5a","signature":"f4846a5ce4f92bcfbd766a60b500be9132562b536501694b16eac9be117c1a93"},{"version":"455bcd511df43a8aeb600bdea43f29ec9d8efcd3d0ce8e5be2cf7a963f080d7f","signature":"2bd4e30b6f03566988d3f22c36af13c5bca58f78a81292123f49780bd7bc4d9f"},{"version":"c57c3dc474bd33922f44be9e8262f5b363d2f34afa9c456c34183532347438d3","signature":"0989b7833f22432b4effb9dd964ea745c4485174a7f205eff8b6eca7650fdd04"},"2e345cb6511f4c4c60c274df6626c94f3182939034f06cdf414bfbccc584f822",{"version":"4fecd80080b0cda53c9216c79b0b0c6c6d9dee53dd028e62e168093871e75434","signature":"d6e9cf6e99664ac41e12e0d1a0c9f2d917be8f89507f0b8aa3df4ef4a405ea7d"},{"version":"d0606fc9b7309eef1022f066b55be926544edc47e0b211c60a54367daa7f1320","signature":"2bd4625ce452e0f25677c4d07430710c57d424ec2d33391debae18ea9a67a56a"},{"version":"8e83142922b25c87b8b3d90ecfc44a60a3017129abee86227a71bc2491e79678","signature":"b48798e7ef7f2e4f7bd9e6dbdcb037b24ea8f2effbb4bdd4a9a05930f01d9fc7"},{"version":"e3bac02b563a2ebfb9784935f4a039531c7341c565d1c0707e65623578555e83","signature":"9e9ed85ced77a7b59d07a821d69db8a8e780bcd1caeb5623e6ac04401cba31c4"},{"version":"93145b1a33f14a5b8fc8eb72b610d52f7c4fa252bc0bb8d67264e5c477994440","signature":"217c927c9096d539fa9ed50cddae8663efb63d7c9a3638ec66e323f124edf944"},{"version":"62f0dba8960e5f96f56691405e257d078c6abbc0748804b3a1cc9f32222442d5","signature":"7975d8566fd9321324b32045a4333e1d7edab85588faef8e9bdfc5efacc94df0"},{"version":"fccdaadd501719ec69070ece163158eaec354d74b2b6a35266afdd4ba74e6e1a","signature":"e74bdf83c107823764f73f5ce4bc4ec44c5771e58c219caaf60de7cffe78bb25"},{"version":"26f0f8afb62e55578d063a85b8466922b60bda21c8cd674fd991543429b0a457","signature":"ba2e3244ab6bb9b566681fe3739144a3f3a6c549f8ffc18af5c6909f34b5367c"},{"version":"1ff0b5a9de5dd2ab9af8f3b2b0827aa5d819e2de0ac22ff9e83a4c7dc6971a2d","signature":"8b4adeab24aaca65cf5145650e670147494fbd9aa71ac29de6685b0bfbf4be05"},{"version":"0e3b9862a0ce71dc8c872a7d9e03aa8df63ebced4798b5a5b2a203648672e479","signature":"40ab9090ab933f2463706b6eab3f6cee55021b38beb59f1e52d323475eac2c92"},{"version":"c770066c63b5fe1bb2ff04fd4cfceb84566ad609fbe4b2cc745c0e082361356f","signature":"9efb264d88f6181d6e763fce12d0f7d19893f48be79fb840a7f68d9bf8ee2da8"},{"version":"552149a29e0c220b7bee747b92a8ec42691443ef616b744a0c8e74a39b2dfa4f","signature":"da4d2fd24b5b25a9fff5fd42166c1fd6e44dacc8362bee445590583d95795f3f"},{"version":"e7ffbe95b1ad2d6a75ec1fa91328506c3e85f9162a53d7c1f81549092eec6a4b","signature":"89a2e13f35eafb164d59a5ec2c46cf97bf12c76a670d546a986c7880bde83c23"},{"version":"e0bef21b16f06d4c8a7314459833e89b4947e29cba71d4deb964339ee606e3f3","signature":"1c2ac71899a38f52084efb989521ae9320bb9b02b4e950873b2a093244f5cf44"},{"version":"c146c9630129ca6e05868042308493adcbe91ab17905b75c3389890d2188dff8","signature":"e4377349ba50d4da674de09a20d45ec7e4ad6522263a40b8029a044d6680b97f"},"bcb6ea18f23dae2c48459d7b86d3adccd6898f824fcbf9da08b935f559896580","0aa7220845f5f3902fe043f646f9d9218bd7dd6c4046e8471580866ea6b03aa2","4d5fb5d6b35f731b2ae4d9d7c592d48e91d6de531dd130628edf4eba16add893","739c2c46edc112421fc023c24b4898b1f413f792bb6a02b40ba182c648e56c2f",{"version":"df93bb67d5ae7be3d599323de42e12cb8da59f0b490c3186ae91d493632b5e36","affectsGlobalScope":true},{"version":"f8b8b34c4f7651c9f7b126af8affda4139a0499e62e74f0f8dc2be36e9f14b59","affectsGlobalScope":true}],"root":[[68,71],[106,129],[131,145]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":4,"module":99,"noEmitOnError":true,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7,"useDefineForClassFields":true},"fileIdsList":[[62,63,64,65],[66],[150],[146],[147],[148,149],[66,67],[67,68],[67,70],[66,67,70,71,105],[67],[67,70,71,106],[67,108,109,118,119,120,121,122,123,124,125,126,127,128,129,131,132,133,134,135,137,141,142,143],[66,67,117,118],[66,67,121],[67,120],[66,67,105,107,108,127],[66,67,130],[66,67,107,108,130],[66,67,107,108],[66,67,107],[66,67,105,107,108,117,118,136],[66,67,140],[66,67,118],[67,69,107,117,140,144],[67,110,111,112,113,114,115,116],[67,138,139],[72,73,74,75],[77,78,79,80,81,82],[78],[84],[86,87,88,89,90,91],[93,94],[76,83,85,92,95,98,104],[96,97],[99,100,101,102,103],[68],[70],[66,70],[70,71,106],[108,109,118,119,120,121,122,123,124,125,126,127,128,129,131,132,133,134,135,137,141,142,143],[108],[140],[69,107,117,140,144],[110,111,112,113,114,115,116],[138,139]],"referencedMap":[[66,1],[67,2],[151,3],[147,4],[148,5],[150,6],[68,7],[69,8],[71,9],[106,10],[70,11],[107,12],[144,13],[108,7],[109,7],[119,14],[122,15],[123,7],[121,16],[124,16],[125,7],[126,7],[128,17],[129,7],[131,18],[132,7],[133,7],[134,7],[135,19],[127,20],[136,20],[118,21],[120,7],[137,22],[141,23],[142,7],[143,24],[145,25],[110,11],[111,11],[112,11],[117,26],[113,11],[114,11],[115,11],[116,7],[138,7],[139,11],[140,27],[76,28],[77,2],[83,29],[80,30],[81,30],[82,30],[85,31],[92,32],[95,33],[105,34],[98,35],[104,36]],"exportedModulesMap":[[66,1],[67,2],[151,3],[147,4],[148,5],[150,6],[68,2],[69,37],[71,38],[106,39],[107,40],[144,41],[108,2],[123,2],[128,42],[129,2],[132,2],[133,2],[135,42],[127,42],[136,42],[137,42],[141,43],[142,2],[145,44],[117,45],[138,2],[140,46],[76,28],[77,2],[83,29],[80,30],[81,30],[82,30],[85,31],[92,32],[95,33],[105,34],[98,35],[104,36]],"semanticDiagnosticsPerFile":[130,64,62,66,67,63,65,60,61,12,13,15,14,2,16,17,18,19,20,21,22,23,3,4,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,53,54,57,55,56,58,10,1,11,59,151,147,146,148,149,150,68,69,71,106,70,107,144,108,109,119,122,123,121,124,125,126,128,129,131,132,133,134,135,127,136,118,120,137,141,142,143,145,110,111,112,117,113,114,115,116,138,139,140,72,73,74,75,76,77,78,83,79,80,81,82,85,84,86,87,88,92,89,90,91,95,93,94,105,96,98,97,99,100,101,102,103,104],"latestChangedDtsFile":"./index.d.ts"},"version":"5.0.4"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contember/react-utils",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "1.2.0-alpha.
|
|
4
|
+
"version": "1.2.0-alpha.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/production/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"typings": "./dist/types/index.d.ts",
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "yarn build:js:dev && yarn build:js:prod",
|
|
24
|
-
"build:js:dev": "vite build --mode development",
|
|
24
|
+
"build:js:dev": "NODE_ENV=development vite build --mode development",
|
|
25
25
|
"build:js:prod": "vite build --mode production",
|
|
26
26
|
"ae:build": "api-extractor run --local",
|
|
27
27
|
"ae:test": "api-extractor run"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"react": "^17 || ^18"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@contember/utilities": "1.2.0-alpha.
|
|
33
|
+
"@contember/utilities": "1.2.0-alpha.4",
|
|
34
34
|
"deep-equal": "^2.2.0"
|
|
35
35
|
},
|
|
36
36
|
"stableVersion": "0.0.0"
|
package/src/hooks/index.ts
CHANGED
|
@@ -5,7 +5,6 @@ export * from './useArrayMapMemo'
|
|
|
5
5
|
export * from './useComposeRef'
|
|
6
6
|
export * from './useConstantLengthInvariant'
|
|
7
7
|
export * from './useConstantValueInvariant'
|
|
8
|
-
export * from './useCountLayoutSlotChildren'
|
|
9
8
|
export * from './useDebounce'
|
|
10
9
|
export * from './useDebounceCallback'
|
|
11
10
|
export * from './useElementSize'
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useState, useRef, useLayoutEffect } from "react";
|
|
2
|
-
import { unwrapRefValue } from "./unwrapRefValue.js";
|
|
3
|
-
import { useOnElementMutation } from "./useOnElementMutation.js";
|
|
4
|
-
function useCountLayoutSlotChildren(refOrElement, selector = ".layout-slot") {
|
|
5
|
-
const [count, setCount] = useState(Infinity);
|
|
6
|
-
const countChildren = useRef((element) => {
|
|
7
|
-
if (element) {
|
|
8
|
-
setCount(element.querySelectorAll(`${selector} > *`).length);
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
useOnElementMutation(refOrElement, () => {
|
|
12
|
-
countChildren.current(unwrapRefValue(refOrElement));
|
|
13
|
-
}, { attributes: true, childList: true, subtree: true });
|
|
14
|
-
useLayoutEffect(() => {
|
|
15
|
-
countChildren.current(unwrapRefValue(refOrElement));
|
|
16
|
-
});
|
|
17
|
-
return count;
|
|
18
|
-
}
|
|
19
|
-
function useHasEmptySlotsClassName(refOrElement) {
|
|
20
|
-
const slotChildrenCount = useCountLayoutSlotChildren(refOrElement);
|
|
21
|
-
if (slotChildrenCount === 0) {
|
|
22
|
-
return "has-empty-slots";
|
|
23
|
-
} else {
|
|
24
|
-
return "has-non-empty-slots";
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
useCountLayoutSlotChildren,
|
|
29
|
-
useHasEmptySlotsClassName
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=useCountLayoutSlotChildren.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCountLayoutSlotChildren.js","sources":["../../../src/hooks/useCountLayoutSlotChildren.ts"],"sourcesContent":["import { useLayoutEffect, useRef, useState } from 'react'\nimport { RefObjectOrElement, unwrapRefValue } from './unwrapRefValue'\nimport { useOnElementMutation } from './useOnElementMutation'\n\n// TODO: Remove when Firefox supports :has selector, e.g.\n// when selectors like `:has(:not(.layout-slot:empty))` work\n// or below issue can be solved more easily:\n//\n// ISSUE:\n// Targeting containers that are visibly empty and hide them\n// or remove paddings without support for :has() is tedious.\n/** @deprecated Check support for :has() for Firefox before using. */\nexport function useCountLayoutSlotChildren(\n\trefOrElement: RefObjectOrElement<HTMLElement | undefined>,\n\tselector: string = '.layout-slot',\n) {\n\tconst [count, setCount] = useState(Infinity)\n\n\tconst countChildren = useRef((element: HTMLElement | null | undefined) => {\n\t\tif (element) {\n\t\t\tsetCount(element.querySelectorAll(`${selector} > *`).length)\n\t\t}\n\t})\n\n\tuseOnElementMutation(refOrElement, () => {\n\t\tcountChildren.current(unwrapRefValue(refOrElement))\n\t}, { attributes: true, childList: true, subtree: true })\n\n\tuseLayoutEffect(() => {\n\t\tcountChildren.current(unwrapRefValue(refOrElement))\n\t})\n\n\treturn count\n}\n\nexport function useHasEmptySlotsClassName(\n\trefOrElement: RefObjectOrElement<HTMLElement | undefined>,\n) {\n\tconst slotChildrenCount = useCountLayoutSlotChildren(refOrElement)\n\n\tif (slotChildrenCount === 0) {\n\t\treturn 'has-empty-slots'\n\t} else {\n\t\treturn 'has-non-empty-slots'\n\t}\n}\n"],"names":[],"mappings":";;;AAYgB,SAAA,2BACf,cACA,WAAmB,gBAClB;AACD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,QAAQ;AAErC,QAAA,gBAAgB,OAAO,CAAC,YAA4C;AACzE,QAAI,SAAS;AACZ,eAAS,QAAQ,iBAAiB,GAAG,cAAc,EAAE,MAAM;AAAA,IAC5D;AAAA,EAAA,CACA;AAED,uBAAqB,cAAc,MAAM;AAC1B,kBAAA,QAAQ,eAAe,YAAY,CAAC;AAAA,EAAA,GAChD,EAAE,YAAY,MAAM,WAAW,MAAM,SAAS,MAAM;AAEvD,kBAAgB,MAAM;AACP,kBAAA,QAAQ,eAAe,YAAY,CAAC;AAAA,EAAA,CAClD;AAEM,SAAA;AACR;AAEO,SAAS,0BACf,cACC;AACK,QAAA,oBAAoB,2BAA2B,YAAY;AAEjE,MAAI,sBAAsB,GAAG;AACrB,WAAA;AAAA,EAAA,OACD;AACC,WAAA;AAAA,EACR;AACD;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useState, useRef, useLayoutEffect } from "react";
|
|
2
|
-
import { unwrapRefValue } from "./unwrapRefValue.js";
|
|
3
|
-
import { useOnElementMutation } from "./useOnElementMutation.js";
|
|
4
|
-
function useCountLayoutSlotChildren(refOrElement, selector = ".layout-slot") {
|
|
5
|
-
const [count, setCount] = useState(Infinity);
|
|
6
|
-
const countChildren = useRef((element) => {
|
|
7
|
-
if (element) {
|
|
8
|
-
setCount(element.querySelectorAll(`${selector} > *`).length);
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
useOnElementMutation(refOrElement, () => {
|
|
12
|
-
countChildren.current(unwrapRefValue(refOrElement));
|
|
13
|
-
}, { attributes: true, childList: true, subtree: true });
|
|
14
|
-
useLayoutEffect(() => {
|
|
15
|
-
countChildren.current(unwrapRefValue(refOrElement));
|
|
16
|
-
});
|
|
17
|
-
return count;
|
|
18
|
-
}
|
|
19
|
-
function useHasEmptySlotsClassName(refOrElement) {
|
|
20
|
-
const slotChildrenCount = useCountLayoutSlotChildren(refOrElement);
|
|
21
|
-
if (slotChildrenCount === 0) {
|
|
22
|
-
return "has-empty-slots";
|
|
23
|
-
} else {
|
|
24
|
-
return "has-non-empty-slots";
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
useCountLayoutSlotChildren,
|
|
29
|
-
useHasEmptySlotsClassName
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=useCountLayoutSlotChildren.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCountLayoutSlotChildren.js","sources":["../../../src/hooks/useCountLayoutSlotChildren.ts"],"sourcesContent":["import { useLayoutEffect, useRef, useState } from 'react'\nimport { RefObjectOrElement, unwrapRefValue } from './unwrapRefValue'\nimport { useOnElementMutation } from './useOnElementMutation'\n\n// TODO: Remove when Firefox supports :has selector, e.g.\n// when selectors like `:has(:not(.layout-slot:empty))` work\n// or below issue can be solved more easily:\n//\n// ISSUE:\n// Targeting containers that are visibly empty and hide them\n// or remove paddings without support for :has() is tedious.\n/** @deprecated Check support for :has() for Firefox before using. */\nexport function useCountLayoutSlotChildren(\n\trefOrElement: RefObjectOrElement<HTMLElement | undefined>,\n\tselector: string = '.layout-slot',\n) {\n\tconst [count, setCount] = useState(Infinity)\n\n\tconst countChildren = useRef((element: HTMLElement | null | undefined) => {\n\t\tif (element) {\n\t\t\tsetCount(element.querySelectorAll(`${selector} > *`).length)\n\t\t}\n\t})\n\n\tuseOnElementMutation(refOrElement, () => {\n\t\tcountChildren.current(unwrapRefValue(refOrElement))\n\t}, { attributes: true, childList: true, subtree: true })\n\n\tuseLayoutEffect(() => {\n\t\tcountChildren.current(unwrapRefValue(refOrElement))\n\t})\n\n\treturn count\n}\n\nexport function useHasEmptySlotsClassName(\n\trefOrElement: RefObjectOrElement<HTMLElement | undefined>,\n) {\n\tconst slotChildrenCount = useCountLayoutSlotChildren(refOrElement)\n\n\tif (slotChildrenCount === 0) {\n\t\treturn 'has-empty-slots'\n\t} else {\n\t\treturn 'has-non-empty-slots'\n\t}\n}\n"],"names":[],"mappings":";;;AAYgB,SAAA,2BACf,cACA,WAAmB,gBAClB;AACD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,QAAQ;AAErC,QAAA,gBAAgB,OAAO,CAAC,YAA4C;AACzE,QAAI,SAAS;AACZ,eAAS,QAAQ,iBAAiB,GAAG,cAAc,EAAE,MAAM;AAAA,IAC5D;AAAA,EAAA,CACA;AAED,uBAAqB,cAAc,MAAM;AAC1B,kBAAA,QAAQ,eAAe,YAAY,CAAC;AAAA,EAAA,GAChD,EAAE,YAAY,MAAM,WAAW,MAAM,SAAS,MAAM;AAEvD,kBAAgB,MAAM;AACP,kBAAA,QAAQ,eAAe,YAAY,CAAC;AAAA,EAAA,CAClD;AAEM,SAAA;AACR;AAEO,SAAS,0BACf,cACC;AACK,QAAA,oBAAoB,2BAA2B,YAAY;AAEjE,MAAI,sBAAsB,GAAG;AACrB,WAAA;AAAA,EAAA,OACD;AACC,WAAA;AAAA,EACR;AACD;"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { RefObjectOrElement } from './unwrapRefValue';
|
|
2
|
-
/** @deprecated Check support for :has() for Firefox before using. */
|
|
3
|
-
export declare function useCountLayoutSlotChildren(refOrElement: RefObjectOrElement<HTMLElement | undefined>, selector?: string): number;
|
|
4
|
-
export declare function useHasEmptySlotsClassName(refOrElement: RefObjectOrElement<HTMLElement | undefined>): "has-empty-slots" | "has-non-empty-slots";
|
|
5
|
-
//# sourceMappingURL=useCountLayoutSlotChildren.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCountLayoutSlotChildren.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCountLayoutSlotChildren.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,kBAAkB,CAAA;AAUrE,sEAAsE;AACtE,wBAAgB,0BAA0B,CACzC,YAAY,EAAE,kBAAkB,CAAC,WAAW,GAAG,SAAS,CAAC,EACzD,QAAQ,GAAE,MAAuB,UAmBjC;AAED,wBAAgB,yBAAyB,CACxC,YAAY,EAAE,kBAAkB,CAAC,WAAW,GAAG,SAAS,CAAC,6CASzD"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { useLayoutEffect, useRef, useState } from 'react'
|
|
2
|
-
import { RefObjectOrElement, unwrapRefValue } from './unwrapRefValue'
|
|
3
|
-
import { useOnElementMutation } from './useOnElementMutation'
|
|
4
|
-
|
|
5
|
-
// TODO: Remove when Firefox supports :has selector, e.g.
|
|
6
|
-
// when selectors like `:has(:not(.layout-slot:empty))` work
|
|
7
|
-
// or below issue can be solved more easily:
|
|
8
|
-
//
|
|
9
|
-
// ISSUE:
|
|
10
|
-
// Targeting containers that are visibly empty and hide them
|
|
11
|
-
// or remove paddings without support for :has() is tedious.
|
|
12
|
-
/** @deprecated Check support for :has() for Firefox before using. */
|
|
13
|
-
export function useCountLayoutSlotChildren(
|
|
14
|
-
refOrElement: RefObjectOrElement<HTMLElement | undefined>,
|
|
15
|
-
selector: string = '.layout-slot',
|
|
16
|
-
) {
|
|
17
|
-
const [count, setCount] = useState(Infinity)
|
|
18
|
-
|
|
19
|
-
const countChildren = useRef((element: HTMLElement | null | undefined) => {
|
|
20
|
-
if (element) {
|
|
21
|
-
setCount(element.querySelectorAll(`${selector} > *`).length)
|
|
22
|
-
}
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
useOnElementMutation(refOrElement, () => {
|
|
26
|
-
countChildren.current(unwrapRefValue(refOrElement))
|
|
27
|
-
}, { attributes: true, childList: true, subtree: true })
|
|
28
|
-
|
|
29
|
-
useLayoutEffect(() => {
|
|
30
|
-
countChildren.current(unwrapRefValue(refOrElement))
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
return count
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export function useHasEmptySlotsClassName(
|
|
37
|
-
refOrElement: RefObjectOrElement<HTMLElement | undefined>,
|
|
38
|
-
) {
|
|
39
|
-
const slotChildrenCount = useCountLayoutSlotChildren(refOrElement)
|
|
40
|
-
|
|
41
|
-
if (slotChildrenCount === 0) {
|
|
42
|
-
return 'has-empty-slots'
|
|
43
|
-
} else {
|
|
44
|
-
return 'has-non-empty-slots'
|
|
45
|
-
}
|
|
46
|
-
}
|