@elliemae/ds-utilities 3.16.0-next.1 → 3.16.0-next.10
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/cjs/deprecated/index.js +6 -6
- package/dist/cjs/deprecated/index.js.map +2 -2
- package/dist/cjs/deprecated/reactTypesUtility.js +1 -1
- package/dist/cjs/deprecated/reactTypesUtility.js.map +1 -1
- package/dist/cjs/deprecated/scrollingTimer.js +1 -1
- package/dist/cjs/deprecated/scrollingTimer.js.map +1 -1
- package/dist/cjs/deprecated/useSetRef.js +1 -1
- package/dist/cjs/deprecated/useSetRef.js.map +1 -1
- package/dist/cjs/deprecated/useUncontrolled.js +1 -1
- package/dist/cjs/deprecated/useUncontrolled.js.map +1 -1
- package/dist/cjs/deprecated/useWindowSize.js +1 -1
- package/dist/cjs/deprecated/useWindowSize.js.map +1 -1
- package/dist/cjs/hooks/index.js +19 -19
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/useDerivedStateFromProps.js +1 -1
- package/dist/cjs/hooks/useDerivedStateFromProps.js.map +1 -1
- package/dist/cjs/hooks/useExpandState.js +2 -2
- package/dist/cjs/hooks/useExpandState.js.map +1 -1
- package/dist/cjs/hooks/useFocusTrap.js +1 -1
- package/dist/cjs/hooks/useFocusTrap.js.map +1 -1
- package/dist/cjs/{props-helpers/useDeprecateComponent/index.js → hooks/useNativeResizeObserver.js} +19 -8
- package/dist/cjs/hooks/useNativeResizeObserver.js.map +7 -0
- package/dist/cjs/hooks/useOnBlurOut.js +1 -1
- package/dist/cjs/hooks/useOnBlurOut.js.map +1 -1
- package/dist/cjs/hooks/useOnFirstFocusIn.js +1 -1
- package/dist/cjs/hooks/useOnFirstFocusIn.js.map +1 -1
- package/dist/cjs/hooks/useOnSpecificFocus.js +1 -1
- package/dist/cjs/hooks/useOnSpecificFocus.js.map +1 -1
- package/dist/cjs/index.js +16 -16
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/props-helpers/index.js +1 -7
- package/dist/cjs/props-helpers/index.js.map +2 -2
- package/dist/cjs/system.js +1 -1
- package/dist/cjs/system.js.map +1 -1
- package/dist/cjs/timeUtils.js +1 -1
- package/dist/cjs/timeUtils.js.map +1 -1
- package/dist/cjs/validations.js +1 -1
- package/dist/cjs/validations.js.map +1 -1
- package/dist/esm/deprecated/index.js +6 -6
- package/dist/esm/deprecated/index.js.map +1 -1
- package/dist/esm/deprecated/reactTypesUtility.js +1 -1
- package/dist/esm/deprecated/reactTypesUtility.js.map +1 -1
- package/dist/esm/deprecated/scrollingTimer.js +1 -1
- package/dist/esm/deprecated/scrollingTimer.js.map +1 -1
- package/dist/esm/deprecated/useSetRef.js +1 -1
- package/dist/esm/deprecated/useSetRef.js.map +1 -1
- package/dist/esm/deprecated/useUncontrolled.js +1 -1
- package/dist/esm/deprecated/useUncontrolled.js.map +1 -1
- package/dist/esm/deprecated/useWindowSize.js +1 -1
- package/dist/esm/deprecated/useWindowSize.js.map +1 -1
- package/dist/esm/hooks/index.js +19 -19
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/useDerivedStateFromProps.js +1 -1
- package/dist/esm/hooks/useDerivedStateFromProps.js.map +1 -1
- package/dist/esm/hooks/useExpandState.js +2 -2
- package/dist/esm/hooks/useExpandState.js.map +1 -1
- package/dist/esm/hooks/useFocusTrap.js +1 -1
- package/dist/esm/hooks/useFocusTrap.js.map +1 -1
- package/dist/esm/hooks/useNativeResizeObserver.js +22 -0
- package/dist/esm/hooks/useNativeResizeObserver.js.map +7 -0
- package/dist/esm/hooks/useOnBlurOut.js +1 -1
- package/dist/esm/hooks/useOnBlurOut.js.map +1 -1
- package/dist/esm/hooks/useOnFirstFocusIn.js +1 -1
- package/dist/esm/hooks/useOnFirstFocusIn.js.map +1 -1
- package/dist/esm/hooks/useOnSpecificFocus.js +1 -1
- package/dist/esm/hooks/useOnSpecificFocus.js.map +1 -1
- package/dist/esm/index.js +16 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/esm/props-helpers/index.js +1 -7
- package/dist/esm/props-helpers/index.js.map +2 -2
- package/dist/esm/system.js +1 -1
- package/dist/esm/system.js.map +1 -1
- package/dist/esm/timeUtils.js +1 -1
- package/dist/esm/timeUtils.js.map +1 -1
- package/dist/esm/validations.js +1 -1
- package/dist/esm/validations.js.map +1 -1
- package/dist/types/deprecated/index.d.ts +6 -6
- package/dist/types/hooks/index.d.ts +19 -19
- package/dist/types/hooks/useFocusTrap.d.ts +1 -1
- package/dist/types/hooks/useNativeResizeObserver.d.ts +4 -0
- package/dist/types/hooks/useOnBlurOut.d.ts +1 -1
- package/dist/types/hooks/useOnFirstFocusIn.d.ts +1 -1
- package/dist/types/hooks/useOnSpecificFocus.d.ts +1 -1
- package/dist/types/index.d.ts +16 -16
- package/dist/types/props-helpers/index.d.ts +1 -7
- package/package.json +3 -5
- package/dist/cjs/props-helpers/defaultProps/index.js +0 -26
- package/dist/cjs/props-helpers/defaultProps/index.js.map +0 -7
- package/dist/cjs/props-helpers/defaultProps/useMemoMergePropsWithDefault.js +0 -45
- package/dist/cjs/props-helpers/defaultProps/useMemoMergePropsWithDefault.js.map +0 -7
- package/dist/cjs/props-helpers/getProps/index.js +0 -34
- package/dist/cjs/props-helpers/getProps/index.js.map +0 -7
- package/dist/cjs/props-helpers/globalProps/constants.js +0 -396
- package/dist/cjs/props-helpers/globalProps/constants.js.map +0 -7
- package/dist/cjs/props-helpers/globalProps/getGlobalAttributes.js +0 -49
- package/dist/cjs/props-helpers/globalProps/getGlobalAttributes.js.map +0 -7
- package/dist/cjs/props-helpers/globalProps/globalAttributesPropTypes.js +0 -398
- package/dist/cjs/props-helpers/globalProps/globalAttributesPropTypes.js.map +0 -7
- package/dist/cjs/props-helpers/globalProps/index.js +0 -28
- package/dist/cjs/props-helpers/globalProps/index.js.map +0 -7
- package/dist/cjs/props-helpers/globalProps/useGetGlobalAttributes.js +0 -40
- package/dist/cjs/props-helpers/globalProps/useGetGlobalAttributes.js.map +0 -7
- package/dist/cjs/props-helpers/propTypes/PropTypes.js +0 -137
- package/dist/cjs/props-helpers/propTypes/PropTypes.js.map +0 -7
- package/dist/cjs/props-helpers/propTypes/customPropTypes.js +0 -35
- package/dist/cjs/props-helpers/propTypes/customPropTypes.js.map +0 -7
- package/dist/cjs/props-helpers/propTypes/describe.js +0 -75
- package/dist/cjs/props-helpers/propTypes/describe.js.map +0 -7
- package/dist/cjs/props-helpers/propTypes/describeConversions.js +0 -103
- package/dist/cjs/props-helpers/propTypes/describeConversions.js.map +0 -7
- package/dist/cjs/props-helpers/propTypes/describeGuards.js +0 -46
- package/dist/cjs/props-helpers/propTypes/describeGuards.js.map +0 -7
- package/dist/cjs/props-helpers/propTypes/index.js +0 -34
- package/dist/cjs/props-helpers/propTypes/index.js.map +0 -7
- package/dist/cjs/props-helpers/propTypes/toTypescript.js +0 -136
- package/dist/cjs/props-helpers/propTypes/toTypescript.js.map +0 -7
- package/dist/cjs/props-helpers/propTypes/types.js +0 -24
- package/dist/cjs/props-helpers/propTypes/types.js.map +0 -7
- package/dist/cjs/props-helpers/tests/globalProps/TestComponent.js +0 -38
- package/dist/cjs/props-helpers/tests/globalProps/TestComponent.js.map +0 -7
- package/dist/cjs/props-helpers/tests/validation/test.schema.js +0 -66
- package/dist/cjs/props-helpers/tests/validation/test.schema.js.map +0 -7
- package/dist/cjs/props-helpers/tests/xstyledProps/TestComponent.js +0 -39
- package/dist/cjs/props-helpers/tests/xstyledProps/TestComponent.js.map +0 -7
- package/dist/cjs/props-helpers/useDeprecateComponent/index.js.map +0 -7
- package/dist/cjs/props-helpers/validation/errorTemplates.js +0 -49
- package/dist/cjs/props-helpers/validation/errorTemplates.js.map +0 -7
- package/dist/cjs/props-helpers/validation/index.js +0 -27
- package/dist/cjs/props-helpers/validation/index.js.map +0 -7
- package/dist/cjs/props-helpers/validation/typescriptGuards.js +0 -80
- package/dist/cjs/props-helpers/validation/typescriptGuards.js.map +0 -7
- package/dist/cjs/props-helpers/validation/typescriptParsers.js +0 -73
- package/dist/cjs/props-helpers/validation/typescriptParsers.js.map +0 -7
- package/dist/cjs/props-helpers/validation/typescriptValidator.js +0 -195
- package/dist/cjs/props-helpers/validation/typescriptValidator.js.map +0 -7
- package/dist/cjs/props-helpers/xstyledProps/constants.js +0 -128
- package/dist/cjs/props-helpers/xstyledProps/constants.js.map +0 -7
- package/dist/cjs/props-helpers/xstyledProps/index.js +0 -27
- package/dist/cjs/props-helpers/xstyledProps/index.js.map +0 -7
- package/dist/cjs/props-helpers/xstyledProps/useGetXstyledProps.js +0 -45
- package/dist/cjs/props-helpers/xstyledProps/useGetXstyledProps.js.map +0 -7
- package/dist/cjs/props-helpers/xstyledProps/xstyledPropTypes.js +0 -123
- package/dist/cjs/props-helpers/xstyledProps/xstyledPropTypes.js.map +0 -7
- package/dist/esm/props-helpers/defaultProps/index.js +0 -3
- package/dist/esm/props-helpers/defaultProps/index.js.map +0 -7
- package/dist/esm/props-helpers/defaultProps/useMemoMergePropsWithDefault.js +0 -19
- package/dist/esm/props-helpers/defaultProps/useMemoMergePropsWithDefault.js.map +0 -7
- package/dist/esm/props-helpers/getProps/index.js +0 -8
- package/dist/esm/props-helpers/getProps/index.js.map +0 -7
- package/dist/esm/props-helpers/globalProps/constants.js +0 -370
- package/dist/esm/props-helpers/globalProps/constants.js.map +0 -7
- package/dist/esm/props-helpers/globalProps/getGlobalAttributes.js +0 -23
- package/dist/esm/props-helpers/globalProps/getGlobalAttributes.js.map +0 -7
- package/dist/esm/props-helpers/globalProps/globalAttributesPropTypes.js +0 -372
- package/dist/esm/props-helpers/globalProps/globalAttributesPropTypes.js.map +0 -7
- package/dist/esm/props-helpers/globalProps/index.js +0 -5
- package/dist/esm/props-helpers/globalProps/index.js.map +0 -7
- package/dist/esm/props-helpers/globalProps/useGetGlobalAttributes.js +0 -14
- package/dist/esm/props-helpers/globalProps/useGetGlobalAttributes.js.map +0 -7
- package/dist/esm/props-helpers/propTypes/PropTypes.js +0 -111
- package/dist/esm/props-helpers/propTypes/PropTypes.js.map +0 -7
- package/dist/esm/props-helpers/propTypes/customPropTypes.js +0 -9
- package/dist/esm/props-helpers/propTypes/customPropTypes.js.map +0 -7
- package/dist/esm/props-helpers/propTypes/describe.js +0 -49
- package/dist/esm/props-helpers/propTypes/describe.js.map +0 -7
- package/dist/esm/props-helpers/propTypes/describeConversions.js +0 -86
- package/dist/esm/props-helpers/propTypes/describeConversions.js.map +0 -7
- package/dist/esm/props-helpers/propTypes/describeGuards.js +0 -20
- package/dist/esm/props-helpers/propTypes/describeGuards.js.map +0 -7
- package/dist/esm/props-helpers/propTypes/index.js +0 -8
- package/dist/esm/props-helpers/propTypes/index.js.map +0 -7
- package/dist/esm/props-helpers/propTypes/toTypescript.js +0 -110
- package/dist/esm/props-helpers/propTypes/toTypescript.js.map +0 -7
- package/dist/esm/props-helpers/propTypes/types.js +0 -2
- package/dist/esm/props-helpers/propTypes/types.js.map +0 -7
- package/dist/esm/props-helpers/tests/globalProps/TestComponent.js +0 -12
- package/dist/esm/props-helpers/tests/globalProps/TestComponent.js.map +0 -7
- package/dist/esm/props-helpers/tests/validation/test.schema.js +0 -40
- package/dist/esm/props-helpers/tests/validation/test.schema.js.map +0 -7
- package/dist/esm/props-helpers/tests/xstyledProps/TestComponent.js +0 -13
- package/dist/esm/props-helpers/tests/xstyledProps/TestComponent.js.map +0 -7
- package/dist/esm/props-helpers/useDeprecateComponent/index.js +0 -11
- package/dist/esm/props-helpers/useDeprecateComponent/index.js.map +0 -7
- package/dist/esm/props-helpers/validation/errorTemplates.js +0 -23
- package/dist/esm/props-helpers/validation/errorTemplates.js.map +0 -7
- package/dist/esm/props-helpers/validation/index.js +0 -4
- package/dist/esm/props-helpers/validation/index.js.map +0 -7
- package/dist/esm/props-helpers/validation/typescriptGuards.js +0 -54
- package/dist/esm/props-helpers/validation/typescriptGuards.js.map +0 -7
- package/dist/esm/props-helpers/validation/typescriptParsers.js +0 -47
- package/dist/esm/props-helpers/validation/typescriptParsers.js.map +0 -7
- package/dist/esm/props-helpers/validation/typescriptValidator.js +0 -180
- package/dist/esm/props-helpers/validation/typescriptValidator.js.map +0 -7
- package/dist/esm/props-helpers/xstyledProps/constants.js +0 -102
- package/dist/esm/props-helpers/xstyledProps/constants.js.map +0 -7
- package/dist/esm/props-helpers/xstyledProps/index.js +0 -4
- package/dist/esm/props-helpers/xstyledProps/index.js.map +0 -7
- package/dist/esm/props-helpers/xstyledProps/useGetXstyledProps.js +0 -19
- package/dist/esm/props-helpers/xstyledProps/useGetXstyledProps.js.map +0 -7
- package/dist/esm/props-helpers/xstyledProps/xstyledPropTypes.js +0 -97
- package/dist/esm/props-helpers/xstyledProps/xstyledPropTypes.js.map +0 -7
- package/dist/types/props-helpers/defaultProps/index.d.ts +0 -1
- package/dist/types/props-helpers/defaultProps/useMemoMergePropsWithDefault.d.ts +0 -1
- package/dist/types/props-helpers/getProps/index.d.ts +0 -2
- package/dist/types/props-helpers/globalProps/constants.d.ts +0 -3
- package/dist/types/props-helpers/globalProps/getGlobalAttributes.d.ts +0 -6
- package/dist/types/props-helpers/globalProps/globalAttributesPropTypes.d.ts +0 -366
- package/dist/types/props-helpers/globalProps/index.d.ts +0 -3
- package/dist/types/props-helpers/globalProps/useGetGlobalAttributes.d.ts +0 -3
- package/dist/types/props-helpers/propTypes/PropTypes.d.ts +0 -3
- package/dist/types/props-helpers/propTypes/customPropTypes.d.ts +0 -2
- package/dist/types/props-helpers/propTypes/describe.d.ts +0 -3
- package/dist/types/props-helpers/propTypes/describeConversions.d.ts +0 -3
- package/dist/types/props-helpers/propTypes/describeGuards.d.ts +0 -9
- package/dist/types/props-helpers/propTypes/index.d.ts +0 -4
- package/dist/types/props-helpers/propTypes/toTypescript.d.ts +0 -3
- package/dist/types/props-helpers/propTypes/types.d.ts +0 -116
- package/dist/types/props-helpers/tests/globalProps/TestComponent.d.ts +0 -1
- package/dist/types/props-helpers/tests/globalProps/globalAttributes.test.d.ts +0 -1
- package/dist/types/props-helpers/tests/validation/any.validation.test.d.ts +0 -1
- package/dist/types/props-helpers/tests/validation/array.validation.test.d.ts +0 -1
- package/dist/types/props-helpers/tests/validation/boolean.validation.test.d.ts +0 -1
- package/dist/types/props-helpers/tests/validation/function.validation.test.d.ts +0 -1
- package/dist/types/props-helpers/tests/validation/isRequiredIf.validation.test.d.ts +0 -1
- package/dist/types/props-helpers/tests/validation/number.validation.test.d.ts +0 -1
- package/dist/types/props-helpers/tests/validation/object.validation.test.d.ts +0 -1
- package/dist/types/props-helpers/tests/validation/schema.validation.test.d.ts +0 -1
- package/dist/types/props-helpers/tests/validation/string.validation.test.d.ts +0 -1
- package/dist/types/props-helpers/tests/validation/test.schema.d.ts +0 -1
- package/dist/types/props-helpers/tests/validation/union.validation.test.d.ts +0 -1
- package/dist/types/props-helpers/tests/xstyledProps/TestComponent.d.ts +0 -1
- package/dist/types/props-helpers/tests/xstyledProps/xstyledProps.test.d.ts +0 -1
- package/dist/types/props-helpers/useDeprecateComponent/index.d.ts +0 -6
- package/dist/types/props-helpers/validation/errorTemplates.d.ts +0 -2
- package/dist/types/props-helpers/validation/index.d.ts +0 -2
- package/dist/types/props-helpers/validation/typescriptGuards.d.ts +0 -12
- package/dist/types/props-helpers/validation/typescriptParsers.d.ts +0 -1
- package/dist/types/props-helpers/validation/typescriptValidator.d.ts +0 -4
- package/dist/types/props-helpers/xstyledProps/constants.d.ts +0 -7
- package/dist/types/props-helpers/xstyledProps/index.d.ts +0 -2
- package/dist/types/props-helpers/xstyledProps/useGetXstyledProps.d.ts +0 -6
- package/dist/types/props-helpers/xstyledProps/xstyledPropTypes.d.ts +0 -84
|
@@ -22,10 +22,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var deprecated_exports = {};
|
|
23
23
|
module.exports = __toCommonJS(deprecated_exports);
|
|
24
24
|
var React = __toESM(require("react"));
|
|
25
|
-
__reExport(deprecated_exports, require("./reactTypesUtility"), module.exports);
|
|
26
|
-
__reExport(deprecated_exports, require("./scrollingTimer"), module.exports);
|
|
27
|
-
__reExport(deprecated_exports, require("./useParentElement"), module.exports);
|
|
28
|
-
__reExport(deprecated_exports, require("./useSetRef"), module.exports);
|
|
29
|
-
__reExport(deprecated_exports, require("./useUncontrolled"), module.exports);
|
|
30
|
-
__reExport(deprecated_exports, require("./useWindowSize"), module.exports);
|
|
25
|
+
__reExport(deprecated_exports, require("./reactTypesUtility.js"), module.exports);
|
|
26
|
+
__reExport(deprecated_exports, require("./scrollingTimer.js"), module.exports);
|
|
27
|
+
__reExport(deprecated_exports, require("./useParentElement.js"), module.exports);
|
|
28
|
+
__reExport(deprecated_exports, require("./useSetRef.js"), module.exports);
|
|
29
|
+
__reExport(deprecated_exports, require("./useUncontrolled.js"), module.exports);
|
|
30
|
+
__reExport(deprecated_exports, require("./useWindowSize.js"), module.exports);
|
|
31
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/deprecated/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './reactTypesUtility';\nexport * from './scrollingTimer';\nexport * from './useParentElement';\nexport * from './useSetRef';\nexport * from './useUncontrolled';\nexport * from './useWindowSize';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc,
|
|
4
|
+
"sourcesContent": ["export * from './reactTypesUtility.js';\nexport * from './scrollingTimer.js';\nexport * from './useParentElement.js';\nexport * from './useSetRef.js';\nexport * from './useUncontrolled.js';\nexport * from './useWindowSize.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc,mCAAd;AACA,+BAAc,gCADd;AAEA,+BAAc,kCAFd;AAGA,+BAAc,2BAHd;AAIA,+BAAc,iCAJd;AAKA,+BAAc,+BALd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -33,7 +33,7 @@ __export(reactTypesUtility_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(reactTypesUtility_exports);
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_deprecatedMsg = require("./deprecatedMsg");
|
|
36
|
+
var import_deprecatedMsg = require("./deprecatedMsg.js");
|
|
37
37
|
function isClassComponent(component) {
|
|
38
38
|
console.warn(`isClassComponent ${import_deprecatedMsg.deprecatedMsg}`);
|
|
39
39
|
return !!(typeof component === "function" && !!component.prototype.isReactComponent);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/deprecated/reactTypesUtility.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport React from 'react';\nimport { deprecatedMsg } from './deprecatedMsg';\n\nexport function isClassComponent(component: any) {\n console.warn(`isClassComponent ${deprecatedMsg}`);\n return !!(typeof component === 'function' && !!component.prototype.isReactComponent);\n}\n\nexport function isFunctionComponent(component: any) {\n console.warn(`isFunctionComponent ${deprecatedMsg}`);\n return typeof component === 'function' && String(component).includes('return React.createElement');\n}\n\nexport function isReactComponent(component: any) {\n console.warn(`isReactComponent ${deprecatedMsg}`);\n return !!(isClassComponent(component) || isFunctionComponent(component));\n}\n\nexport function isElement(element: Record<string, unknown> | null | undefined) {\n console.warn(`isElement ${deprecatedMsg}`);\n return React.isValidElement(element);\n}\n\nexport function isCompositeTypeElement(element: Record<string, unknown> | null | undefined) {\n console.warn(`isCompositeTypeElement ${deprecatedMsg}`);\n return isElement(element) && typeof element?.type === 'function';\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport React from 'react';\nimport { deprecatedMsg } from './deprecatedMsg.js';\n\nexport function isClassComponent(component: any) {\n console.warn(`isClassComponent ${deprecatedMsg}`);\n return !!(typeof component === 'function' && !!component.prototype.isReactComponent);\n}\n\nexport function isFunctionComponent(component: any) {\n console.warn(`isFunctionComponent ${deprecatedMsg}`);\n return typeof component === 'function' && String(component).includes('return React.createElement');\n}\n\nexport function isReactComponent(component: any) {\n console.warn(`isReactComponent ${deprecatedMsg}`);\n return !!(isClassComponent(component) || isFunctionComponent(component));\n}\n\nexport function isElement(element: Record<string, unknown> | null | undefined) {\n console.warn(`isElement ${deprecatedMsg}`);\n return React.isValidElement(element);\n}\n\nexport function isCompositeTypeElement(element: Record<string, unknown> | null | undefined) {\n console.warn(`isCompositeTypeElement ${deprecatedMsg}`);\n return isElement(element) && typeof element?.type === 'function';\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAkB;AAClB,2BAA8B;AAEvB,SAAS,iBAAiB,WAAgB;AAC/C,UAAQ,KAAK,oBAAoB,oCAAe;AAChD,SAAO,CAAC,EAAE,OAAO,cAAc,cAAc,CAAC,CAAC,UAAU,UAAU;AACrE;AAEO,SAAS,oBAAoB,WAAgB;AAClD,UAAQ,KAAK,uBAAuB,oCAAe;AACnD,SAAO,OAAO,cAAc,cAAc,OAAO,SAAS,EAAE,SAAS,4BAA4B;AACnG;AAEO,SAAS,iBAAiB,WAAgB;AAC/C,UAAQ,KAAK,oBAAoB,oCAAe;AAChD,SAAO,CAAC,EAAE,iBAAiB,SAAS,KAAK,oBAAoB,SAAS;AACxE;AAEO,SAAS,UAAU,SAAqD;AAC7E,UAAQ,KAAK,aAAa,oCAAe;AACzC,SAAO,aAAAA,QAAM,eAAe,OAAO;AACrC;AAEO,SAAS,uBAAuB,SAAqD;AAC1F,UAAQ,KAAK,0BAA0B,oCAAe;AACtD,SAAO,UAAU,OAAO,KAAK,OAAO,SAAS,SAAS;AACxD;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -28,7 +28,7 @@ __export(scrollingTimer_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(scrollingTimer_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
|
-
var import_deprecatedMsg = require("./deprecatedMsg");
|
|
31
|
+
var import_deprecatedMsg = require("./deprecatedMsg.js");
|
|
32
32
|
const resetTimer = (func) => {
|
|
33
33
|
console.warn(`resetTimer ${import_deprecatedMsg.deprecatedMsg}`);
|
|
34
34
|
let timeout;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/deprecated/scrollingTimer.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable func-names */\nimport { deprecatedMsg } from './deprecatedMsg';\n\nexport const resetTimer = (func: (...args: unknown[]) => unknown) => {\n console.warn(`resetTimer ${deprecatedMsg}`);\n let timeout: NodeJS.Timeout | null;\n return function (this: any, ...args: unknown[]) {\n const lastCall = () => {\n timeout = null;\n func.apply(this, args);\n };\n\n if (timeout) clearTimeout(timeout);\n timeout = setTimeout(lastCall, 300);\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable func-names */\nimport { deprecatedMsg } from './deprecatedMsg.js';\n\nexport const resetTimer = (func: (...args: unknown[]) => unknown) => {\n console.warn(`resetTimer ${deprecatedMsg}`);\n let timeout: NodeJS.Timeout | null;\n return function (this: any, ...args: unknown[]) {\n const lastCall = () => {\n timeout = null;\n func.apply(this, args);\n };\n\n if (timeout) clearTimeout(timeout);\n timeout = setTimeout(lastCall, 300);\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,2BAA8B;AAEvB,MAAM,aAAa,CAAC,SAA0C;AACnE,UAAQ,KAAK,cAAc,oCAAe;AAC1C,MAAI;AACJ,SAAO,YAAwB,MAAiB;AAC9C,UAAM,WAAW,MAAM;AACrB,gBAAU;AACV,WAAK,MAAM,MAAM,IAAI;AAAA,IACvB;AAEA,QAAI;AAAS,mBAAa,OAAO;AACjC,cAAU,WAAW,UAAU,GAAG;AAAA,EACpC;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -29,7 +29,7 @@ __export(useSetRef_exports, {
|
|
|
29
29
|
module.exports = __toCommonJS(useSetRef_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
31
|
var import_react = require("react");
|
|
32
|
-
var import_deprecatedMsg = require("./deprecatedMsg");
|
|
32
|
+
var import_deprecatedMsg = require("./deprecatedMsg.js");
|
|
33
33
|
const useSetRef = (initial) => {
|
|
34
34
|
console.warn(`useSetRef ${import_deprecatedMsg.deprecatedMsg}`);
|
|
35
35
|
const ref = (0, import_react.useRef)(initial);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/deprecated/useSetRef.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-console, @typescript-eslint/ban-ts-comment */\n// @ts-nocheck\nimport { useCallback, useRef } from 'react';\nimport { deprecatedMsg } from './deprecatedMsg';\n\nexport const useSetRef = (initial: unknown) => {\n console.warn(`useSetRef ${deprecatedMsg}`);\n const ref = useRef(initial);\n const setRef = useCallback((node) => {\n ref.current = node;\n }, []);\n return [ref, setRef];\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-console, @typescript-eslint/ban-ts-comment */\n// @ts-nocheck\nimport { useCallback, useRef } from 'react';\nimport { deprecatedMsg } from './deprecatedMsg.js';\n\nexport const useSetRef = (initial: unknown) => {\n console.warn(`useSetRef ${deprecatedMsg}`);\n const ref = useRef(initial);\n const setRef = useCallback((node) => {\n ref.current = node;\n }, []);\n return [ref, setRef];\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAoC;AACpC,2BAA8B;AAEvB,MAAM,YAAY,CAAC,YAAqB;AAC7C,UAAQ,KAAK,aAAa,oCAAe;AACzC,QAAM,UAAM,qBAAO,OAAO;AAC1B,QAAM,aAAS,0BAAY,CAAC,SAAS;AACnC,QAAI,UAAU;AAAA,EAChB,GAAG,CAAC,CAAC;AACL,SAAO,CAAC,KAAK,MAAM;AACrB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -29,7 +29,7 @@ __export(useUncontrolled_exports, {
|
|
|
29
29
|
module.exports = __toCommonJS(useUncontrolled_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
31
|
var import_uncontrollable = require("uncontrollable");
|
|
32
|
-
var import_deprecatedMsg = require("./deprecatedMsg");
|
|
32
|
+
var import_deprecatedMsg = require("./deprecatedMsg.js");
|
|
33
33
|
const useUncontrolled = (...args) => {
|
|
34
34
|
console.warn(`useUncontrolled ${import_deprecatedMsg.deprecatedMsg}`);
|
|
35
35
|
return (0, import_uncontrollable.useUncontrolled)(...args);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/deprecated/useUncontrolled.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useUncontrolled as useUncontrolledImplementation } from 'uncontrollable';\nimport { deprecatedMsg } from './deprecatedMsg';\n\nexport const useUncontrolled = (...args: any[]) => {\n console.warn(`useUncontrolled ${deprecatedMsg}`);\n return useUncontrolledImplementation(...args);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useUncontrolled as useUncontrolledImplementation } from 'uncontrollable';\nimport { deprecatedMsg } from './deprecatedMsg.js';\n\nexport const useUncontrolled = (...args: any[]) => {\n console.warn(`useUncontrolled ${deprecatedMsg}`);\n return useUncontrolledImplementation(...args);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADKvB,4BAAiE;AACjE,2BAA8B;AAEvB,MAAM,kBAAkB,IAAI,SAAgB;AACjD,UAAQ,KAAK,mBAAmB,oCAAe;AAC/C,aAAO,sBAAAA,iBAA8B,GAAG,IAAI;AAC9C;",
|
|
6
6
|
"names": ["useUncontrolledImplementation"]
|
|
7
7
|
}
|
|
@@ -30,7 +30,7 @@ __export(useWindowSize_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(useWindowSize_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_react = require("react");
|
|
33
|
-
var import_deprecatedMsg = require("./deprecatedMsg");
|
|
33
|
+
var import_deprecatedMsg = require("./deprecatedMsg.js");
|
|
34
34
|
const noop = () => {
|
|
35
35
|
};
|
|
36
36
|
const useWindowSize = () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/deprecated/useWindowSize.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-console */\nimport { useLayoutEffect, useState } from 'react';\nimport { deprecatedMsg } from './deprecatedMsg';\n\nconst noop = () => {};\n\nexport const useWindowSize = () => {\n console.warn(`useWindowSize ${deprecatedMsg}`);\n const [size, setSize] = useState([0, 0]);\n useLayoutEffect(() => {\n if (!window) return noop;\n function updateSize() {\n setSize([window.innerWidth, window.innerHeight]);\n }\n window.addEventListener('resize', updateSize);\n window.addEventListener('orientationchange', updateSize);\n updateSize();\n return () => {\n window.removeEventListener('resize', updateSize);\n window.removeEventListener('orientationchange', updateSize);\n };\n }, []);\n if (!window) return noop;\n return size;\n};\n\nexport default useWindowSize;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-console */\nimport { useLayoutEffect, useState } from 'react';\nimport { deprecatedMsg } from './deprecatedMsg.js';\n\nconst noop = () => {};\n\nexport const useWindowSize = () => {\n console.warn(`useWindowSize ${deprecatedMsg}`);\n const [size, setSize] = useState([0, 0]);\n useLayoutEffect(() => {\n if (!window) return noop;\n function updateSize() {\n setSize([window.innerWidth, window.innerHeight]);\n }\n window.addEventListener('resize', updateSize);\n window.addEventListener('orientationchange', updateSize);\n updateSize();\n return () => {\n window.removeEventListener('resize', updateSize);\n window.removeEventListener('orientationchange', updateSize);\n };\n }, []);\n if (!window) return noop;\n return size;\n};\n\nexport default useWindowSize;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA0C;AAC1C,2BAA8B;AAE9B,MAAM,OAAO,MAAM;AAAC;AAEb,MAAM,gBAAgB,MAAM;AACjC,UAAQ,KAAK,iBAAiB,oCAAe;AAC7C,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,CAAC,GAAG,CAAC,CAAC;AACvC,oCAAgB,MAAM;AACpB,QAAI,CAAC;AAAQ,aAAO;AACpB,aAAS,aAAa;AACpB,cAAQ,CAAC,OAAO,YAAY,OAAO,WAAW,CAAC;AAAA,IACjD;AACA,WAAO,iBAAiB,UAAU,UAAU;AAC5C,WAAO,iBAAiB,qBAAqB,UAAU;AACvD,eAAW;AACX,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,UAAU;AAC/C,aAAO,oBAAoB,qBAAqB,UAAU;AAAA,IAC5D;AAAA,EACF,GAAG,CAAC,CAAC;AACL,MAAI,CAAC;AAAQ,WAAO;AACpB,SAAO;AACT;AAEA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/hooks/index.js
CHANGED
|
@@ -56,23 +56,23 @@ var React = __toESM(require("react"));
|
|
|
56
56
|
var import_use_measure = __toESM(require("use-measure"));
|
|
57
57
|
var import_use_force_update = __toESM(require("use-force-update"));
|
|
58
58
|
var import_use_onclickoutside = __toESM(require("use-onclickoutside"));
|
|
59
|
-
var import_useCallbackAfterRender = require("./useCallbackAfterRender");
|
|
60
|
-
var import_useCancellableDelayedCallback = require("./useCancellableDelayedCallback");
|
|
61
|
-
var import_useDerivedStateFromProps = require("./useDerivedStateFromProps");
|
|
62
|
-
var import_useExecutionTimer = require("./useExecutionTimer");
|
|
63
|
-
var import_useExpandState = require("./useExpandState");
|
|
64
|
-
var import_useFocusTrap = require("./useFocusTrap");
|
|
65
|
-
var import_useHotkeys = require("./useHotkeys");
|
|
66
|
-
var import_useHoverHandlersDelay = require("./useHoverHandlersDelay");
|
|
67
|
-
var import_useIsMobile = require("./useIsMobile");
|
|
68
|
-
var import_useIsShowingEllipsis = require("./useIsShowingEllipsis");
|
|
69
|
-
var import_useMakeMutable = require("./useMakeMutable");
|
|
70
|
-
var import_useOnBlurOut = require("./useOnBlurOut");
|
|
71
|
-
var import_useOnElementResize = require("./useOnElementResize");
|
|
72
|
-
var import_useOnFirstFocusIn = require("./useOnFirstFocusIn");
|
|
73
|
-
var import_useOnSpecificFocus = require("./useOnSpecificFocus");
|
|
74
|
-
var import_usePrevious = require("./usePrevious");
|
|
75
|
-
var import_useResizeObserver = require("./useResizeObserver");
|
|
76
|
-
var import_useShouldRecalculate = require("./useShouldRecalculate");
|
|
77
|
-
var import_useWindowScrollerList = require("./useWindowScrollerList");
|
|
59
|
+
var import_useCallbackAfterRender = require("./useCallbackAfterRender.js");
|
|
60
|
+
var import_useCancellableDelayedCallback = require("./useCancellableDelayedCallback.js");
|
|
61
|
+
var import_useDerivedStateFromProps = require("./useDerivedStateFromProps.js");
|
|
62
|
+
var import_useExecutionTimer = require("./useExecutionTimer.js");
|
|
63
|
+
var import_useExpandState = require("./useExpandState.js");
|
|
64
|
+
var import_useFocusTrap = require("./useFocusTrap.js");
|
|
65
|
+
var import_useHotkeys = require("./useHotkeys.js");
|
|
66
|
+
var import_useHoverHandlersDelay = require("./useHoverHandlersDelay.js");
|
|
67
|
+
var import_useIsMobile = require("./useIsMobile.js");
|
|
68
|
+
var import_useIsShowingEllipsis = require("./useIsShowingEllipsis.js");
|
|
69
|
+
var import_useMakeMutable = require("./useMakeMutable.js");
|
|
70
|
+
var import_useOnBlurOut = require("./useOnBlurOut.js");
|
|
71
|
+
var import_useOnElementResize = require("./useOnElementResize.js");
|
|
72
|
+
var import_useOnFirstFocusIn = require("./useOnFirstFocusIn.js");
|
|
73
|
+
var import_useOnSpecificFocus = require("./useOnSpecificFocus.js");
|
|
74
|
+
var import_usePrevious = require("./usePrevious.js");
|
|
75
|
+
var import_useResizeObserver = require("./useResizeObserver.js");
|
|
76
|
+
var import_useShouldRecalculate = require("./useShouldRecalculate.js");
|
|
77
|
+
var import_useWindowScrollerList = require("./useWindowScrollerList.js");
|
|
78
78
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export { default as useMeasure } from 'use-measure';\nexport { default as useForceUpdate } from 'use-force-update';\nexport { default as useOnClickOutside } from 'use-onclickoutside';\n\nexport { useCallbackAfterRender } from './useCallbackAfterRender';\nexport { useCancellableDelayedCallback } from './useCancellableDelayedCallback';\nexport { useDerivedStateFromProps } from './useDerivedStateFromProps';\nexport { useExecutionTimer } from './useExecutionTimer';\nexport { useExpandState } from './useExpandState';\nexport { useFocusTrap, UseFocusTrapWithSchema } from './useFocusTrap';\nexport { useHotkeys } from './useHotkeys';\nexport { useHoverHandlersDelay } from './useHoverHandlersDelay';\nexport { useIsMobile } from './useIsMobile';\nexport { useIsShowingEllipsis } from './useIsShowingEllipsis';\nexport { useMakeMutable } from './useMakeMutable';\nexport { useOnBlurOut, UseOnBlurOutWithSchema } from './useOnBlurOut';\nexport { useOnElementResize } from './useOnElementResize';\nexport { useOnFirstFocusIn, UseOnFirstFocusInWithSchema } from './useOnFirstFocusIn';\nexport { useOnSpecificFocus, UseOnSpecificFocusWithSchema } from './useOnSpecificFocus';\nexport { usePrevious } from './usePrevious';\nexport { useResizeObserver } from './useResizeObserver';\nexport { useShouldRecalculate } from './useShouldRecalculate';\nexport { useWindowScrollerList } from './useWindowScrollerList';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["export { default as useMeasure } from 'use-measure';\nexport { default as useForceUpdate } from 'use-force-update';\nexport { default as useOnClickOutside } from 'use-onclickoutside';\n\nexport { useCallbackAfterRender } from './useCallbackAfterRender.js';\nexport { useCancellableDelayedCallback } from './useCancellableDelayedCallback.js';\nexport { useDerivedStateFromProps } from './useDerivedStateFromProps.js';\nexport { useExecutionTimer } from './useExecutionTimer.js';\nexport { useExpandState } from './useExpandState.js';\nexport { useFocusTrap, UseFocusTrapWithSchema } from './useFocusTrap.js';\nexport { useHotkeys } from './useHotkeys.js';\nexport { useHoverHandlersDelay } from './useHoverHandlersDelay.js';\nexport { useIsMobile } from './useIsMobile.js';\nexport { useIsShowingEllipsis } from './useIsShowingEllipsis.js';\nexport { useMakeMutable } from './useMakeMutable.js';\nexport { useOnBlurOut, UseOnBlurOutWithSchema } from './useOnBlurOut.js';\nexport { useOnElementResize } from './useOnElementResize.js';\nexport { useOnFirstFocusIn, UseOnFirstFocusInWithSchema } from './useOnFirstFocusIn.js';\nexport { useOnSpecificFocus, UseOnSpecificFocusWithSchema } from './useOnSpecificFocus.js';\nexport { usePrevious } from './usePrevious.js';\nexport { useResizeObserver } from './useResizeObserver.js';\nexport { useShouldRecalculate } from './useShouldRecalculate.js';\nexport { useWindowScrollerList } from './useWindowScrollerList.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAsC;AACtC,8BAA0C;AAC1C,gCAA6C;AAE7C,oCAAuC;AACvC,2CAA8C;AAC9C,sCAAyC;AACzC,+BAAkC;AAClC,4BAA+B;AAC/B,0BAAqD;AACrD,wBAA2B;AAC3B,mCAAsC;AACtC,yBAA4B;AAC5B,kCAAqC;AACrC,4BAA+B;AAC/B,0BAAqD;AACrD,gCAAmC;AACnC,+BAA+D;AAC/D,gCAAiE;AACjE,yBAA4B;AAC5B,+BAAkC;AAClC,kCAAqC;AACrC,mCAAsC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -30,7 +30,7 @@ __export(useDerivedStateFromProps_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(useDerivedStateFromProps_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_react = require("react");
|
|
33
|
-
var import_utils = require("../utils");
|
|
33
|
+
var import_utils = require("../utils.js");
|
|
34
34
|
const defaultPropUpdateOnChange = (prop) => prop;
|
|
35
35
|
function defaultShouldUpdate({ prop, prevProp, stateValue }) {
|
|
36
36
|
return !(0, import_utils.isEqual)(prop, prevProp) && !(0, import_utils.isEqual)(prop, stateValue);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useDerivedStateFromProps.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type React from 'react';\nimport { useRef, useState } from 'react';\nimport { isEqual, isFunction } from '../utils';\n\ninterface ShouldUpdateArg {\n prop: unknown;\n prevProp: unknown;\n stateValue: unknown;\n}\n\ntype OnUpdateT<T> = (prop: T, prevProp?: T | Record<string, never>) => T;\n\ninterface OptionsT<T> {\n onUpdate?: OnUpdateT<T>;\n shouldUpdate?: (arg: ShouldUpdateArg) => boolean;\n updateOnStateChange?: boolean;\n}\n\nconst defaultPropUpdateOnChange = <T,>(prop: T) => prop;\n\nfunction defaultShouldUpdate({ prop, prevProp, stateValue }: ShouldUpdateArg) {\n return !isEqual(prop, prevProp) && !isEqual(prop, stateValue);\n}\n\nfunction setStateWithUpdate<T>(onUpdate: OnUpdateT<T>, setState: React.Dispatch<React.SetStateAction<T>>) {\n return (state: React.SetStateAction<T>) => {\n setState((prevState: T) => onUpdate(isFunction(state) ? state(prevState) : state, prevState));\n };\n}\n\nexport const useDerivedStateFromProps = <T,>(\n prop: T,\n options: OptionsT<T> = {},\n): [T, React.Dispatch<React.SetStateAction<T>>] => {\n const {\n onUpdate = defaultPropUpdateOnChange as OnUpdateT<T>,\n shouldUpdate = defaultShouldUpdate,\n updateOnStateChange = false,\n } = options;\n\n const [stateValue, setState] = useState(onUpdate(prop, {}));\n const handleSetState = updateOnStateChange ? setStateWithUpdate(onUpdate, setState) : setState;\n const prevProp = useRef(prop);\n\n if (\n shouldUpdate({\n prop,\n prevProp: prevProp.current,\n stateValue,\n })\n ) {\n const nextProp = onUpdate(prop, prevProp.current);\n setState(nextProp);\n }\n prevProp.current = prop;\n return [stateValue, handleSetState];\n};\n\nexport default useDerivedStateFromProps;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import type React from 'react';\nimport { useRef, useState } from 'react';\nimport { isEqual, isFunction } from '../utils.js';\n\ninterface ShouldUpdateArg {\n prop: unknown;\n prevProp: unknown;\n stateValue: unknown;\n}\n\ntype OnUpdateT<T> = (prop: T, prevProp?: T | Record<string, never>) => T;\n\ninterface OptionsT<T> {\n onUpdate?: OnUpdateT<T>;\n shouldUpdate?: (arg: ShouldUpdateArg) => boolean;\n updateOnStateChange?: boolean;\n}\n\nconst defaultPropUpdateOnChange = <T,>(prop: T) => prop;\n\nfunction defaultShouldUpdate({ prop, prevProp, stateValue }: ShouldUpdateArg) {\n return !isEqual(prop, prevProp) && !isEqual(prop, stateValue);\n}\n\nfunction setStateWithUpdate<T>(onUpdate: OnUpdateT<T>, setState: React.Dispatch<React.SetStateAction<T>>) {\n return (state: React.SetStateAction<T>) => {\n setState((prevState: T) => onUpdate(isFunction(state) ? state(prevState) : state, prevState));\n };\n}\n\nexport const useDerivedStateFromProps = <T,>(\n prop: T,\n options: OptionsT<T> = {},\n): [T, React.Dispatch<React.SetStateAction<T>>] => {\n const {\n onUpdate = defaultPropUpdateOnChange as OnUpdateT<T>,\n shouldUpdate = defaultShouldUpdate,\n updateOnStateChange = false,\n } = options;\n\n const [stateValue, setState] = useState(onUpdate(prop, {}));\n const handleSetState = updateOnStateChange ? setStateWithUpdate(onUpdate, setState) : setState;\n const prevProp = useRef(prop);\n\n if (\n shouldUpdate({\n prop,\n prevProp: prevProp.current,\n stateValue,\n })\n ) {\n const nextProp = onUpdate(prop, prevProp.current);\n setState(nextProp);\n }\n prevProp.current = prop;\n return [stateValue, handleSetState];\n};\n\nexport default useDerivedStateFromProps;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAiC;AACjC,mBAAoC;AAgBpC,MAAM,4BAA4B,CAAK,SAAY;AAEnD,SAAS,oBAAoB,EAAE,MAAM,UAAU,WAAW,GAAoB;AAC5E,SAAO,KAAC,sBAAQ,MAAM,QAAQ,KAAK,KAAC,sBAAQ,MAAM,UAAU;AAC9D;AAEA,SAAS,mBAAsB,UAAwB,UAAmD;AACxG,SAAO,CAAC,UAAmC;AACzC,aAAS,CAAC,cAAiB,aAAS,yBAAW,KAAK,IAAI,MAAM,SAAS,IAAI,OAAO,SAAS,CAAC;AAAA,EAC9F;AACF;AAEO,MAAM,2BAA2B,CACtC,MACA,UAAuB,CAAC,MACyB;AACjD,QAAM;AAAA,IACJ,WAAW;AAAA,IACX,eAAe;AAAA,IACf,sBAAsB;AAAA,EACxB,IAAI;AAEJ,QAAM,CAAC,YAAY,QAAQ,QAAI,uBAAS,SAAS,MAAM,CAAC,CAAC,CAAC;AAC1D,QAAM,iBAAiB,sBAAsB,mBAAmB,UAAU,QAAQ,IAAI;AACtF,QAAM,eAAW,qBAAO,IAAI;AAE5B,MACE,aAAa;AAAA,IACX;AAAA,IACA,UAAU,SAAS;AAAA,IACnB;AAAA,EACF,CAAC,GACD;AACA,UAAM,WAAW,SAAS,MAAM,SAAS,OAAO;AAChD,aAAS,QAAQ;AAAA,EACnB;AACA,WAAS,UAAU;AACnB,SAAO,CAAC,YAAY,cAAc;AACpC;AAEA,IAAO,mCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -30,8 +30,8 @@ __export(useExpandState_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(useExpandState_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_react = require("react");
|
|
33
|
-
var import_utils = require("../utils");
|
|
34
|
-
var import_useDerivedStateFromProps = require("./useDerivedStateFromProps");
|
|
33
|
+
var import_utils = require("../utils.js");
|
|
34
|
+
var import_useDerivedStateFromProps = require("./useDerivedStateFromProps.js");
|
|
35
35
|
const toggleStateInObject = (obj, key, value) => {
|
|
36
36
|
const nextObj = { ...obj };
|
|
37
37
|
if (nextObj[key]) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useExpandState.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { useMemo } from 'react';\nimport { isFunction } from '../utils';\nimport { useDerivedStateFromProps } from './useDerivedStateFromProps';\n\ntype ItemT = Record<string, string>;\ninterface UseExpandStateArg {\n items?: ItemT[];\n itemKey?: keyof ItemT;\n expanded?: Record<string, boolean>;\n onExpand: (item: ItemT) => void;\n onExpandChange: (nextState: Record<string, boolean>, item?: ItemT) => void;\n onExpandAll: (nextState: Record<string, boolean>) => void;\n onToggleExpand: (item: ItemT) => void;\n onCollapse: (item: ItemT) => void;\n}\n\nconst toggleStateInObject = <T,>(obj: Record<string, T>, key: string, value: T) => {\n const nextObj = { ...obj };\n if (nextObj[key]) {\n delete nextObj[key];\n } else {\n nextObj[key] = value;\n }\n return nextObj;\n};\n\nconst noop = () => null;\n\nexport const useExpandState = ({\n items = [],\n itemKey = 'id',\n expanded: expandedProp = {},\n onExpand,\n onExpandChange = noop,\n onExpandAll = noop,\n onToggleExpand,\n onCollapse,\n}: UseExpandStateArg) => {\n const [expanded, setExpanded] = useDerivedStateFromProps(expandedProp);\n\n const isExpandedAll = useMemo(() => Object.keys(expanded).length === items.length, [expanded, items]);\n\n const toggleExpandAll = (stateData = true) => {\n setExpanded(() => {\n const nextState: Record<string, boolean> = {};\n if (!isExpandedAll) {\n items.forEach((item) => {\n nextState[item[itemKey]] = stateData;\n });\n }\n onExpandChange(nextState);\n onExpandAll(nextState);\n return nextState;\n });\n };\n\n const expand = (item: ItemT, stateData = true) => {\n if (!item) return;\n if (isFunction(onExpand)) {\n onExpand(item);\n }\n setExpanded((prevState) => {\n const key = item[itemKey];\n const nextState = { ...prevState, [key]: stateData };\n onExpandChange(nextState, item);\n return nextState;\n });\n };\n\n const toggleExpand = (item: ItemT, stateData = true) => {\n if (isFunction(onToggleExpand)) {\n onToggleExpand(item);\n }\n setExpanded((prevState) => {\n const key = item[itemKey];\n const nextState = toggleStateInObject(prevState, key, stateData);\n onExpandChange(nextState, item);\n return nextState;\n });\n };\n\n const collapse = (item: ItemT) => {\n if (isFunction(onCollapse)) {\n onCollapse(item);\n }\n setExpanded((prevState) => {\n const nextState = { ...prevState };\n delete nextState[item[itemKey]];\n onExpandChange(nextState, item);\n return nextState;\n });\n };\n\n return {\n state: { expanded, isExpandedAll },\n actions: {\n expand,\n toggleExpandAll,\n toggleExpand,\n collapse,\n },\n setExpanded,\n };\n};\n\nexport default useExpandState;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import { useMemo } from 'react';\nimport { isFunction } from '../utils.js';\nimport { useDerivedStateFromProps } from './useDerivedStateFromProps.js';\n\ntype ItemT = Record<string, string>;\ninterface UseExpandStateArg {\n items?: ItemT[];\n itemKey?: keyof ItemT;\n expanded?: Record<string, boolean>;\n onExpand: (item: ItemT) => void;\n onExpandChange: (nextState: Record<string, boolean>, item?: ItemT) => void;\n onExpandAll: (nextState: Record<string, boolean>) => void;\n onToggleExpand: (item: ItemT) => void;\n onCollapse: (item: ItemT) => void;\n}\n\nconst toggleStateInObject = <T,>(obj: Record<string, T>, key: string, value: T) => {\n const nextObj = { ...obj };\n if (nextObj[key]) {\n delete nextObj[key];\n } else {\n nextObj[key] = value;\n }\n return nextObj;\n};\n\nconst noop = () => null;\n\nexport const useExpandState = ({\n items = [],\n itemKey = 'id',\n expanded: expandedProp = {},\n onExpand,\n onExpandChange = noop,\n onExpandAll = noop,\n onToggleExpand,\n onCollapse,\n}: UseExpandStateArg) => {\n const [expanded, setExpanded] = useDerivedStateFromProps(expandedProp);\n\n const isExpandedAll = useMemo(() => Object.keys(expanded).length === items.length, [expanded, items]);\n\n const toggleExpandAll = (stateData = true) => {\n setExpanded(() => {\n const nextState: Record<string, boolean> = {};\n if (!isExpandedAll) {\n items.forEach((item) => {\n nextState[item[itemKey]] = stateData;\n });\n }\n onExpandChange(nextState);\n onExpandAll(nextState);\n return nextState;\n });\n };\n\n const expand = (item: ItemT, stateData = true) => {\n if (!item) return;\n if (isFunction(onExpand)) {\n onExpand(item);\n }\n setExpanded((prevState) => {\n const key = item[itemKey];\n const nextState = { ...prevState, [key]: stateData };\n onExpandChange(nextState, item);\n return nextState;\n });\n };\n\n const toggleExpand = (item: ItemT, stateData = true) => {\n if (isFunction(onToggleExpand)) {\n onToggleExpand(item);\n }\n setExpanded((prevState) => {\n const key = item[itemKey];\n const nextState = toggleStateInObject(prevState, key, stateData);\n onExpandChange(nextState, item);\n return nextState;\n });\n };\n\n const collapse = (item: ItemT) => {\n if (isFunction(onCollapse)) {\n onCollapse(item);\n }\n setExpanded((prevState) => {\n const nextState = { ...prevState };\n delete nextState[item[itemKey]];\n onExpandChange(nextState, item);\n return nextState;\n });\n };\n\n return {\n state: { expanded, isExpandedAll },\n actions: {\n expand,\n toggleExpandAll,\n toggleExpand,\n collapse,\n },\n setExpanded,\n };\n};\n\nexport default useExpandState;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwB;AACxB,mBAA2B;AAC3B,sCAAyC;AAczC,MAAM,sBAAsB,CAAK,KAAwB,KAAa,UAAa;AACjF,QAAM,UAAU,EAAE,GAAG,IAAI;AACzB,MAAI,QAAQ,MAAM;AAChB,WAAO,QAAQ;AAAA,EACjB,OAAO;AACL,YAAQ,OAAO;AAAA,EACjB;AACA,SAAO;AACT;AAEA,MAAM,OAAO,MAAM;AAEZ,MAAM,iBAAiB,CAAC;AAAA,EAC7B,QAAQ,CAAC;AAAA,EACT,UAAU;AAAA,EACV,UAAU,eAAe,CAAC;AAAA,EAC1B;AAAA,EACA,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd;AAAA,EACA;AACF,MAAyB;AACvB,QAAM,CAAC,UAAU,WAAW,QAAI,0DAAyB,YAAY;AAErE,QAAM,oBAAgB,sBAAQ,MAAM,OAAO,KAAK,QAAQ,EAAE,WAAW,MAAM,QAAQ,CAAC,UAAU,KAAK,CAAC;AAEpG,QAAM,kBAAkB,CAAC,YAAY,SAAS;AAC5C,gBAAY,MAAM;AAChB,YAAM,YAAqC,CAAC;AAC5C,UAAI,CAAC,eAAe;AAClB,cAAM,QAAQ,CAAC,SAAS;AACtB,oBAAU,KAAK,YAAY;AAAA,QAC7B,CAAC;AAAA,MACH;AACA,qBAAe,SAAS;AACxB,kBAAY,SAAS;AACrB,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,SAAS,CAAC,MAAa,YAAY,SAAS;AAChD,QAAI,CAAC;AAAM;AACX,YAAI,yBAAW,QAAQ,GAAG;AACxB,eAAS,IAAI;AAAA,IACf;AACA,gBAAY,CAAC,cAAc;AACzB,YAAM,MAAM,KAAK;AACjB,YAAM,YAAY,EAAE,GAAG,WAAW,CAAC,MAAM,UAAU;AACnD,qBAAe,WAAW,IAAI;AAC9B,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,eAAe,CAAC,MAAa,YAAY,SAAS;AACtD,YAAI,yBAAW,cAAc,GAAG;AAC9B,qBAAe,IAAI;AAAA,IACrB;AACA,gBAAY,CAAC,cAAc;AACzB,YAAM,MAAM,KAAK;AACjB,YAAM,YAAY,oBAAoB,WAAW,KAAK,SAAS;AAC/D,qBAAe,WAAW,IAAI;AAC9B,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,WAAW,CAAC,SAAgB;AAChC,YAAI,yBAAW,UAAU,GAAG;AAC1B,iBAAW,IAAI;AAAA,IACjB;AACA,gBAAY,CAAC,cAAc;AACzB,YAAM,YAAY,EAAE,GAAG,UAAU;AACjC,aAAO,UAAU,KAAK;AACtB,qBAAe,WAAW,IAAI;AAC9B,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,OAAO,EAAE,UAAU,cAAc;AAAA,IACjC,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,EACF;AACF;AAEA,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -30,7 +30,7 @@ __export(useFocusTrap_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(useFocusTrap_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_react = require("react");
|
|
33
|
-
var import_props_helpers = require("../props-helpers");
|
|
33
|
+
var import_props_helpers = require("../props-helpers/index.js");
|
|
34
34
|
const useFocusTrapProps = {
|
|
35
35
|
firstElementRef: "object",
|
|
36
36
|
lastElementRef: "object",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useFocusTrap.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport { useCallback, useEffect } from 'react';\nimport { describe, PropTypes } from '../props-helpers';\n\nconst useFocusTrapProps: { [index: string]: string } = {\n firstElementRef: 'object',\n lastElementRef: 'object',\n onKeyDown: 'function',\n};\n\nconst getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nconst throwTypeError = (validPropKey: string, invalidProp: unknown): void => {\n throw new Error(\n `Warning: You are trying to pass a not valid \"${validPropKey}\" property to use a useFocusTrap hook, please provide a valid type.\n\n Received: ${getVariableType(invalidProp)}\n Expected: ${useFocusTrapProps[validPropKey]}\n `,\n );\n};\n\nconst throwRequiredError = (validPropKey: string): void => {\n throw new Error(\n `Warning: Please provide a \"${validPropKey}\" property to use a useFocusTrap hook, this property is required.`,\n );\n};\n\nconst validateProps = (componentProps: Record<string, unknown>): void => {\n if (componentProps.firstElementRef === undefined) {\n throwRequiredError('firstElementRef');\n }\n if (componentProps.lastElementRef === undefined) {\n throwRequiredError('lastElementRef');\n }\n if (componentProps.firstElementRef && typeof componentProps.firstElementRef !== 'object') {\n throwTypeError('firstElementRef', componentProps.firstElementRef);\n }\n if (componentProps.lastElementRef && typeof componentProps.lastElementRef !== 'object') {\n throwTypeError('lastElementRef', componentProps.lastElementRef);\n }\n if (componentProps.onKeyDown && typeof componentProps.onKeyDown !== 'function') {\n throwTypeError('onKeyDown', componentProps.onKeyDown);\n }\n};\n\nconst propTypes = {\n firstElementRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.node]).description(\n 'Reference to the first element in the focus trap.',\n ).isRequired,\n lastElementRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.node]).description(\n 'Reference to the second element in the focus trap.',\n ).isRequired,\n onKeyDown: PropTypes.func.description('Optional onKeyDown callback.'),\n} as WeakValidationMap<unknown>;\n\ntype UseFocusTrapFunctionT = <T extends HTMLElement = HTMLElement, K extends HTMLElement = HTMLElement>({\n firstElementRef,\n lastElementRef,\n onKeyDown,\n}: {\n firstElementRef: React.MutableRefObject<T | null>;\n lastElementRef: React.MutableRefObject<K | null>;\n onKeyDown?: (e: KeyboardEvent) => void;\n}) => (e: KeyboardEvent) => void;\n\ninterface UseFocusTrapT extends UseFocusTrapFunctionT {\n displayName: 'useFocusTrap';\n}\n\nconst useFocusTrap: UseFocusTrapT = (props) => {\n // We need to investigate how to validate references with useValidateTypescriptPropTypes.\n useEffect(() => validateProps(props), [props]);\n\n const { firstElementRef, lastElementRef, onKeyDown } = props;\n\n return useCallback(\n (e: KeyboardEvent) => {\n if (onKeyDown) onKeyDown(e);\n // we need to check all the condition before preventing default\n // because we want last-element/first-element tab/shift-tab to keep working\n\n if (e.key === 'Tab' && !e.shiftKey && e.target === lastElementRef.current && firstElementRef.current) {\n e.preventDefault();\n e.stopPropagation();\n firstElementRef.current.focus();\n }\n if (e.key === 'Tab' && e.shiftKey && e.target === firstElementRef.current && lastElementRef.current) {\n e.preventDefault();\n e.stopPropagation();\n lastElementRef.current.focus();\n }\n },\n [firstElementRef, lastElementRef, onKeyDown],\n );\n};\n\nuseFocusTrap.displayName = 'useFocusTrap';\nconst UseFocusTrapWithSchema = describe(useFocusTrap);\n\nUseFocusTrapWithSchema.propTypes = propTypes;\n\nexport { useFocusTrap, UseFocusTrapWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport { useCallback, useEffect } from 'react';\nimport { describe, PropTypes } from '../props-helpers/index.js';\n\nconst useFocusTrapProps: { [index: string]: string } = {\n firstElementRef: 'object',\n lastElementRef: 'object',\n onKeyDown: 'function',\n};\n\nconst getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nconst throwTypeError = (validPropKey: string, invalidProp: unknown): void => {\n throw new Error(\n `Warning: You are trying to pass a not valid \"${validPropKey}\" property to use a useFocusTrap hook, please provide a valid type.\n\n Received: ${getVariableType(invalidProp)}\n Expected: ${useFocusTrapProps[validPropKey]}\n `,\n );\n};\n\nconst throwRequiredError = (validPropKey: string): void => {\n throw new Error(\n `Warning: Please provide a \"${validPropKey}\" property to use a useFocusTrap hook, this property is required.`,\n );\n};\n\nconst validateProps = (componentProps: Record<string, unknown>): void => {\n if (componentProps.firstElementRef === undefined) {\n throwRequiredError('firstElementRef');\n }\n if (componentProps.lastElementRef === undefined) {\n throwRequiredError('lastElementRef');\n }\n if (componentProps.firstElementRef && typeof componentProps.firstElementRef !== 'object') {\n throwTypeError('firstElementRef', componentProps.firstElementRef);\n }\n if (componentProps.lastElementRef && typeof componentProps.lastElementRef !== 'object') {\n throwTypeError('lastElementRef', componentProps.lastElementRef);\n }\n if (componentProps.onKeyDown && typeof componentProps.onKeyDown !== 'function') {\n throwTypeError('onKeyDown', componentProps.onKeyDown);\n }\n};\n\nconst propTypes = {\n firstElementRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.node]).description(\n 'Reference to the first element in the focus trap.',\n ).isRequired,\n lastElementRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.node]).description(\n 'Reference to the second element in the focus trap.',\n ).isRequired,\n onKeyDown: PropTypes.func.description('Optional onKeyDown callback.'),\n} as WeakValidationMap<unknown>;\n\ntype UseFocusTrapFunctionT = <T extends HTMLElement = HTMLElement, K extends HTMLElement = HTMLElement>({\n firstElementRef,\n lastElementRef,\n onKeyDown,\n}: {\n firstElementRef: React.MutableRefObject<T | null>;\n lastElementRef: React.MutableRefObject<K | null>;\n onKeyDown?: (e: KeyboardEvent) => void;\n}) => (e: KeyboardEvent) => void;\n\ninterface UseFocusTrapT extends UseFocusTrapFunctionT {\n displayName: 'useFocusTrap';\n}\n\nconst useFocusTrap: UseFocusTrapT = (props) => {\n // We need to investigate how to validate references with useValidateTypescriptPropTypes.\n useEffect(() => validateProps(props), [props]);\n\n const { firstElementRef, lastElementRef, onKeyDown } = props;\n\n return useCallback(\n (e: KeyboardEvent) => {\n if (onKeyDown) onKeyDown(e);\n // we need to check all the condition before preventing default\n // because we want last-element/first-element tab/shift-tab to keep working\n\n if (e.key === 'Tab' && !e.shiftKey && e.target === lastElementRef.current && firstElementRef.current) {\n e.preventDefault();\n e.stopPropagation();\n firstElementRef.current.focus();\n }\n if (e.key === 'Tab' && e.shiftKey && e.target === firstElementRef.current && lastElementRef.current) {\n e.preventDefault();\n e.stopPropagation();\n lastElementRef.current.focus();\n }\n },\n [firstElementRef, lastElementRef, onKeyDown],\n );\n};\n\nuseFocusTrap.displayName = 'useFocusTrap';\nconst UseFocusTrapWithSchema = describe(useFocusTrap);\n\nUseFocusTrapWithSchema.propTypes = propTypes;\n\nexport { useFocusTrap, UseFocusTrapWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAuC;AACvC,2BAAoC;AAEpC,MAAM,oBAAiD;AAAA,EACrD,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,WAAW;AACb;AAEA,MAAM,kBAAkB,CAAC,QAAyB;AAChD,MAAI,MAAM,QAAQ,GAAG;AAAG,WAAO;AAC/B,MAAI,QAAQ;AAAM,WAAO;AACzB,MAAI,QAAQ;AAAW,WAAO;AAC9B,SAAO,OAAO;AAChB;AAEA,MAAM,iBAAiB,CAAC,cAAsB,gBAA+B;AAC3E,QAAM,IAAI;AAAA,IACR,gDAAgD;AAAA;AAAA,cAEtC,gBAAgB,WAAW;AAAA,cAC3B,kBAAkB;AAAA;AAAA,EAE9B;AACF;AAEA,MAAM,qBAAqB,CAAC,iBAA+B;AACzD,QAAM,IAAI;AAAA,IACR,8BAA8B;AAAA,EAChC;AACF;AAEA,MAAM,gBAAgB,CAAC,mBAAkD;AACvE,MAAI,eAAe,oBAAoB,QAAW;AAChD,uBAAmB,iBAAiB;AAAA,EACtC;AACA,MAAI,eAAe,mBAAmB,QAAW;AAC/C,uBAAmB,gBAAgB;AAAA,EACrC;AACA,MAAI,eAAe,mBAAmB,OAAO,eAAe,oBAAoB,UAAU;AACxF,mBAAe,mBAAmB,eAAe,eAAe;AAAA,EAClE;AACA,MAAI,eAAe,kBAAkB,OAAO,eAAe,mBAAmB,UAAU;AACtF,mBAAe,kBAAkB,eAAe,cAAc;AAAA,EAChE;AACA,MAAI,eAAe,aAAa,OAAO,eAAe,cAAc,YAAY;AAC9E,mBAAe,aAAa,eAAe,SAAS;AAAA,EACtD;AACF;AAEA,MAAM,YAAY;AAAA,EAChB,iBAAiB,+BAAU,UAAU,CAAC,+BAAU,MAAM,CAAC,IAAI,CAAC,GAAG,+BAAU,IAAI,CAAC,EAAE;AAAA,IAC9E;AAAA,EACF,EAAE;AAAA,EACF,gBAAgB,+BAAU,UAAU,CAAC,+BAAU,MAAM,CAAC,IAAI,CAAC,GAAG,+BAAU,IAAI,CAAC,EAAE;AAAA,IAC7E;AAAA,EACF,EAAE;AAAA,EACF,WAAW,+BAAU,KAAK,YAAY,8BAA8B;AACtE;AAgBA,MAAM,eAA8B,CAAC,UAAU;AAE7C,8BAAU,MAAM,cAAc,KAAK,GAAG,CAAC,KAAK,CAAC;AAE7C,QAAM,EAAE,iBAAiB,gBAAgB,UAAU,IAAI;AAEvD,aAAO;AAAA,IACL,CAAC,MAAqB;AACpB,UAAI;AAAW,kBAAU,CAAC;AAI1B,UAAI,EAAE,QAAQ,SAAS,CAAC,EAAE,YAAY,EAAE,WAAW,eAAe,WAAW,gBAAgB,SAAS;AACpG,UAAE,eAAe;AACjB,UAAE,gBAAgB;AAClB,wBAAgB,QAAQ,MAAM;AAAA,MAChC;AACA,UAAI,EAAE,QAAQ,SAAS,EAAE,YAAY,EAAE,WAAW,gBAAgB,WAAW,eAAe,SAAS;AACnG,UAAE,eAAe;AACjB,UAAE,gBAAgB;AAClB,uBAAe,QAAQ,MAAM;AAAA,MAC/B;AAAA,IACF;AAAA,IACA,CAAC,iBAAiB,gBAAgB,SAAS;AAAA,EAC7C;AACF;AAEA,aAAa,cAAc;AAC3B,MAAM,6BAAyB,+BAAS,YAAY;AAEpD,uBAAuB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/{props-helpers/useDeprecateComponent/index.js → hooks/useNativeResizeObserver.js}
RENAMED
|
@@ -22,16 +22,27 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
-
var
|
|
26
|
-
__export(
|
|
27
|
-
|
|
25
|
+
var useNativeResizeObserver_exports = {};
|
|
26
|
+
__export(useNativeResizeObserver_exports, {
|
|
27
|
+
useNativeResizeObserver: () => useNativeResizeObserver
|
|
28
28
|
});
|
|
29
|
-
module.exports = __toCommonJS(
|
|
29
|
+
module.exports = __toCommonJS(useNativeResizeObserver_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
31
|
var import_react = require("react");
|
|
32
|
-
const
|
|
32
|
+
const useNativeResizeObserver = (el, callback) => {
|
|
33
|
+
const resizeObserver = (0, import_react.useMemo)(
|
|
34
|
+
() => new ResizeObserver((entries) => {
|
|
35
|
+
const entry = entries[0];
|
|
36
|
+
const contentRect = entry.contentRect;
|
|
37
|
+
const target = entry.target;
|
|
38
|
+
callback({ contentRect, target });
|
|
39
|
+
}),
|
|
40
|
+
[callback]
|
|
41
|
+
);
|
|
33
42
|
(0, import_react.useEffect)(() => {
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
if (el)
|
|
44
|
+
resizeObserver.observe(el);
|
|
45
|
+
return () => resizeObserver.disconnect();
|
|
46
|
+
}, [el, resizeObserver]);
|
|
36
47
|
};
|
|
37
|
-
//# sourceMappingURL=
|
|
48
|
+
//# sourceMappingURL=useNativeResizeObserver.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/useNativeResizeObserver.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useEffect, useMemo } from 'react';\n\n// Custom hook to use the resize observer api,\n// to observe changes in the size of an **UNIQUE** element\n// Will trigger the callback with the contentRect,\n// which contains width, height, top, bottom, etc of the element,\n// and the html element itself, so you can query for offsetWidth, etc\nexport const useNativeResizeObserver = <T extends HTMLElement>(\n el: T | null,\n callback: (entry: { contentRect: DOMRectReadOnly; target: T }) => void,\n) => {\n const resizeObserver = useMemo(\n () =>\n new ResizeObserver((entries) => {\n const entry = entries[0]; // We will only observe one element\n\n const contentRect = entry.contentRect;\n\n const target = entry.target as T;\n\n callback({ contentRect, target });\n }),\n [callback],\n );\n\n useEffect(() => {\n if (el) resizeObserver.observe(el);\n return () => resizeObserver.disconnect();\n }, [el, resizeObserver]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAmC;AAO5B,MAAM,0BAA0B,CACrC,IACA,aACG;AACH,QAAM,qBAAiB;AAAA,IACrB,MACE,IAAI,eAAe,CAAC,YAAY;AAC9B,YAAM,QAAQ,QAAQ;AAEtB,YAAM,cAAc,MAAM;AAE1B,YAAM,SAAS,MAAM;AAErB,eAAS,EAAE,aAAa,OAAO,CAAC;AAAA,IAClC,CAAC;AAAA,IACH,CAAC,QAAQ;AAAA,EACX;AAEA,8BAAU,MAAM;AACd,QAAI;AAAI,qBAAe,QAAQ,EAAE;AACjC,WAAO,MAAM,eAAe,WAAW;AAAA,EACzC,GAAG,CAAC,IAAI,cAAc,CAAC;AACzB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -30,7 +30,7 @@ __export(useOnBlurOut_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(useOnBlurOut_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_react = require("react");
|
|
33
|
-
var import_props_helpers = require("../props-helpers");
|
|
33
|
+
var import_props_helpers = require("../props-helpers/index.js");
|
|
34
34
|
const propTypes = {
|
|
35
35
|
onBlur: import_props_helpers.PropTypes.func.description("The function to be invoked when focus exits the wrapping container").signature("((e: React.FocusEvent, ...args: unknown[]) => void)").isRequired
|
|
36
36
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useOnBlurOut.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport { useCallback } from 'react';\nimport { describe, PropTypes } from '../props-helpers';\n\nconst propTypes = {\n onBlur: PropTypes.func\n .description('The function to be invoked when focus exits the wrapping container')\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)').isRequired,\n} as WeakValidationMap<unknown>;\n\ntype OnBlurCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype UseOnBlurOut = ({ onBlur }: { onBlur: OnBlurCb }) => OnBlurCb;\nconst useOnBlurOut: UseOnBlurOut = ({ onBlur }) =>\n useCallback<OnBlurCb>(\n (e, ...args) => {\n const { currentTarget } = e;\n // Give browser time to focus the next element\n requestAnimationFrame(() => {\n // Check if the new focused element is a child of the original container\n if (!currentTarget.contains(document.activeElement)) {\n onBlur(e, ...args);\n }\n });\n },\n [onBlur],\n );\n\nconst UseOnBlurOutWithSchema = describe(useOnBlurOut);\nUseOnBlurOutWithSchema.propTypes = propTypes;\n\nexport { useOnBlurOut, UseOnBlurOutWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport { useCallback } from 'react';\nimport { describe, PropTypes } from '../props-helpers/index.js';\n\nconst propTypes = {\n onBlur: PropTypes.func\n .description('The function to be invoked when focus exits the wrapping container')\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)').isRequired,\n} as WeakValidationMap<unknown>;\n\ntype OnBlurCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype UseOnBlurOut = ({ onBlur }: { onBlur: OnBlurCb }) => OnBlurCb;\nconst useOnBlurOut: UseOnBlurOut = ({ onBlur }) =>\n useCallback<OnBlurCb>(\n (e, ...args) => {\n const { currentTarget } = e;\n // Give browser time to focus the next element\n requestAnimationFrame(() => {\n // Check if the new focused element is a child of the original container\n if (!currentTarget.contains(document.activeElement)) {\n onBlur(e, ...args);\n }\n });\n },\n [onBlur],\n );\n\nconst UseOnBlurOutWithSchema = describe(useOnBlurOut);\nUseOnBlurOutWithSchema.propTypes = propTypes;\n\nexport { useOnBlurOut, UseOnBlurOutWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA4B;AAC5B,2BAAoC;AAEpC,MAAM,YAAY;AAAA,EAChB,QAAQ,+BAAU,KACf,YAAY,oEAAoE,EAChF,UAAU,qDAAqD,EAAE;AACtE;AAIA,MAAM,eAA6B,CAAC,EAAE,OAAO,UAC3C;AAAA,EACE,CAAC,MAAM,SAAS;AACd,UAAM,EAAE,cAAc,IAAI;AAE1B,0BAAsB,MAAM;AAE1B,UAAI,CAAC,cAAc,SAAS,SAAS,aAAa,GAAG;AACnD,eAAO,GAAG,GAAG,IAAI;AAAA,MACnB;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EACA,CAAC,MAAM;AACT;AAEF,MAAM,6BAAyB,+BAAS,YAAY;AACpD,uBAAuB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -30,7 +30,7 @@ __export(useOnFirstFocusIn_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(useOnFirstFocusIn_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_react = require("react");
|
|
33
|
-
var import_props_helpers = require("../props-helpers");
|
|
33
|
+
var import_props_helpers = require("../props-helpers/index.js");
|
|
34
34
|
const propTypes = {
|
|
35
35
|
onFirstFocusCb: import_props_helpers.PropTypes.func.description("The function to be invoked when focus enters the wrapping container for the first time").signature("((e: React.FocusEvent, ...args: unknown[]) => void)").isRequired,
|
|
36
36
|
onBlurCb: import_props_helpers.PropTypes.func.description("Optional onBlur function to be invoked along the returned onBlur handler").signature("((e: React.FocusEvent, ...args: unknown[]) => void)")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useOnFirstFocusIn.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport { useCallback, useMemo, useRef } from 'react';\nimport { describe, PropTypes } from '../props-helpers';\n\nconst propTypes = {\n onFirstFocusCb: PropTypes.func\n .description('The function to be invoked when focus enters the wrapping container for the first time')\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)').isRequired,\n onBlurCb: PropTypes.func\n .description('Optional onBlur function to be invoked along the returned onBlur handler')\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)'),\n} as WeakValidationMap<unknown>;\n\ntype OnBlurCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype OnFirstFocusCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype UseFirstFocusIn = ({ onFirstFocus, onBlur }: { onFirstFocus: OnFirstFocusCb; onBlur: OnBlurCb }) => {\n onFirstFocus: OnFirstFocusCb;\n onBlur: OnBlurCb;\n};\n\nconst useOnFirstFocusIn: UseFirstFocusIn = ({ onFirstFocus, onBlur }) => {\n const mutableDidChildBlur = useRef(false);\n const onFirstFocusHelper = useCallback<OnFirstFocusCb>(\n (e, ...args) => {\n const { currentTarget } = e;\n // Give browser time to focus the next element\n requestAnimationFrame(() => {\n const isChildFocus = currentTarget.contains(document.activeElement);\n const isFirstFocus = isChildFocus && !mutableDidChildBlur.current;\n if (isFirstFocus) {\n onFirstFocus(e, ...args);\n }\n });\n },\n [onFirstFocus],\n );\n const onBlurHelper = useCallback<OnBlurCb>(\n (e, ...args) => {\n onBlur?.(e, ...args);\n const { currentTarget } = e;\n // Give browser time to focus the next element\n requestAnimationFrame(() => {\n const isChildBlur = currentTarget.contains(document.activeElement);\n mutableDidChildBlur.current = isChildBlur;\n });\n },\n [onBlur],\n );\n return useMemo(\n () => ({\n onFirstFocus: onFirstFocusHelper,\n onBlur: onBlurHelper,\n }),\n [onFirstFocusHelper, onBlurHelper],\n );\n};\n\nconst UseOnFirstFocusInWithSchema = describe(useOnFirstFocusIn);\nUseOnFirstFocusInWithSchema.propTypes = propTypes;\n\nexport { useOnFirstFocusIn, UseOnFirstFocusInWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport { useCallback, useMemo, useRef } from 'react';\nimport { describe, PropTypes } from '../props-helpers/index.js';\n\nconst propTypes = {\n onFirstFocusCb: PropTypes.func\n .description('The function to be invoked when focus enters the wrapping container for the first time')\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)').isRequired,\n onBlurCb: PropTypes.func\n .description('Optional onBlur function to be invoked along the returned onBlur handler')\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)'),\n} as WeakValidationMap<unknown>;\n\ntype OnBlurCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype OnFirstFocusCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype UseFirstFocusIn = ({ onFirstFocus, onBlur }: { onFirstFocus: OnFirstFocusCb; onBlur: OnBlurCb }) => {\n onFirstFocus: OnFirstFocusCb;\n onBlur: OnBlurCb;\n};\n\nconst useOnFirstFocusIn: UseFirstFocusIn = ({ onFirstFocus, onBlur }) => {\n const mutableDidChildBlur = useRef(false);\n const onFirstFocusHelper = useCallback<OnFirstFocusCb>(\n (e, ...args) => {\n const { currentTarget } = e;\n // Give browser time to focus the next element\n requestAnimationFrame(() => {\n const isChildFocus = currentTarget.contains(document.activeElement);\n const isFirstFocus = isChildFocus && !mutableDidChildBlur.current;\n if (isFirstFocus) {\n onFirstFocus(e, ...args);\n }\n });\n },\n [onFirstFocus],\n );\n const onBlurHelper = useCallback<OnBlurCb>(\n (e, ...args) => {\n onBlur?.(e, ...args);\n const { currentTarget } = e;\n // Give browser time to focus the next element\n requestAnimationFrame(() => {\n const isChildBlur = currentTarget.contains(document.activeElement);\n mutableDidChildBlur.current = isChildBlur;\n });\n },\n [onBlur],\n );\n return useMemo(\n () => ({\n onFirstFocus: onFirstFocusHelper,\n onBlur: onBlurHelper,\n }),\n [onFirstFocusHelper, onBlurHelper],\n );\n};\n\nconst UseOnFirstFocusInWithSchema = describe(useOnFirstFocusIn);\nUseOnFirstFocusInWithSchema.propTypes = propTypes;\n\nexport { useOnFirstFocusIn, UseOnFirstFocusInWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA6C;AAC7C,2BAAoC;AAEpC,MAAM,YAAY;AAAA,EAChB,gBAAgB,+BAAU,KACvB,YAAY,wFAAwF,EACpG,UAAU,qDAAqD,EAAE;AAAA,EACpE,UAAU,+BAAU,KACjB,YAAY,0EAA0E,EACtF,UAAU,qDAAqD;AACpE;AASA,MAAM,oBAAqC,CAAC,EAAE,cAAc,OAAO,MAAM;AACvE,QAAM,0BAAsB,qBAAO,KAAK;AACxC,QAAM,yBAAqB;AAAA,IACzB,CAAC,MAAM,SAAS;AACd,YAAM,EAAE,cAAc,IAAI;AAE1B,4BAAsB,MAAM;AAC1B,cAAM,eAAe,cAAc,SAAS,SAAS,aAAa;AAClE,cAAM,eAAe,gBAAgB,CAAC,oBAAoB;AAC1D,YAAI,cAAc;AAChB,uBAAa,GAAG,GAAG,IAAI;AAAA,QACzB;AAAA,MACF,CAAC;AAAA,IACH;AAAA,IACA,CAAC,YAAY;AAAA,EACf;AACA,QAAM,mBAAe;AAAA,IACnB,CAAC,MAAM,SAAS;AACd,eAAS,GAAG,GAAG,IAAI;AACnB,YAAM,EAAE,cAAc,IAAI;AAE1B,4BAAsB,MAAM;AAC1B,cAAM,cAAc,cAAc,SAAS,SAAS,aAAa;AACjE,4BAAoB,UAAU;AAAA,MAChC,CAAC;AAAA,IACH;AAAA,IACA,CAAC,MAAM;AAAA,EACT;AACA,aAAO;AAAA,IACL,OAAO;AAAA,MACL,cAAc;AAAA,MACd,QAAQ;AAAA,IACV;AAAA,IACA,CAAC,oBAAoB,YAAY;AAAA,EACnC;AACF;AAEA,MAAM,kCAA8B,+BAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -30,7 +30,7 @@ __export(useOnSpecificFocus_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(useOnSpecificFocus_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
32
|
var import_react = require("react");
|
|
33
|
-
var import_props_helpers = require("../props-helpers");
|
|
33
|
+
var import_props_helpers = require("../props-helpers/index.js");
|
|
34
34
|
const propTypes = {
|
|
35
35
|
onFocus: import_props_helpers.PropTypes.func.description(
|
|
36
36
|
"The function to be invoked when focusing specifically the element attached to (ignoring child focus events)"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useOnSpecificFocus.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport { useCallback } from 'react';\nimport { describe, PropTypes } from '../props-helpers';\n\nconst propTypes = {\n onFocus: PropTypes.func\n .description(\n 'The function to be invoked when focusing specifically the element attached to (ignoring child focus events)',\n )\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)').isRequired,\n} as WeakValidationMap<unknown>;\n\ntype OnFocusCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype UseOnBlurOut = ({ onFocus }: { onFocus: OnFocusCb }) => OnFocusCb;\nconst useOnSpecificFocus: UseOnBlurOut = ({ onFocus }) =>\n useCallback<OnFocusCb>(\n (e, ...args) => {\n const { currentTarget, target } = e;\n if (currentTarget === target && document.activeElement === currentTarget) onFocus(e, ...args);\n },\n [onFocus],\n );\nconst UseOnSpecificFocusWithSchema = describe(useOnSpecificFocus);\nUseOnSpecificFocusWithSchema.propTypes = propTypes;\n\nexport { useOnSpecificFocus, UseOnSpecificFocusWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport { useCallback } from 'react';\nimport { describe, PropTypes } from '../props-helpers/index.js';\n\nconst propTypes = {\n onFocus: PropTypes.func\n .description(\n 'The function to be invoked when focusing specifically the element attached to (ignoring child focus events)',\n )\n .signature('((e: React.FocusEvent, ...args: unknown[]) => void)').isRequired,\n} as WeakValidationMap<unknown>;\n\ntype OnFocusCb = (e: React.FocusEvent, ...args: unknown[]) => void;\ntype UseOnBlurOut = ({ onFocus }: { onFocus: OnFocusCb }) => OnFocusCb;\nconst useOnSpecificFocus: UseOnBlurOut = ({ onFocus }) =>\n useCallback<OnFocusCb>(\n (e, ...args) => {\n const { currentTarget, target } = e;\n if (currentTarget === target && document.activeElement === currentTarget) onFocus(e, ...args);\n },\n [onFocus],\n );\nconst UseOnSpecificFocusWithSchema = describe(useOnSpecificFocus);\nUseOnSpecificFocusWithSchema.propTypes = propTypes;\n\nexport { useOnSpecificFocus, UseOnSpecificFocusWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA4B;AAC5B,2BAAoC;AAEpC,MAAM,YAAY;AAAA,EAChB,SAAS,+BAAU,KAChB;AAAA,IACC;AAAA,EACF,EACC,UAAU,qDAAqD,EAAE;AACtE;AAIA,MAAM,qBAAmC,CAAC,EAAE,QAAQ,UAClD;AAAA,EACE,CAAC,MAAM,SAAS;AACd,UAAM,EAAE,eAAe,OAAO,IAAI;AAClC,QAAI,kBAAkB,UAAU,SAAS,kBAAkB;AAAe,cAAQ,GAAG,GAAG,IAAI;AAAA,EAC9F;AAAA,EACA,CAAC,OAAO;AACV;AACF,MAAM,mCAA+B,+BAAS,kBAAkB;AAChE,6BAA6B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -133,20 +133,20 @@ __export(src_exports, {
|
|
|
133
133
|
});
|
|
134
134
|
module.exports = __toCommonJS(src_exports);
|
|
135
135
|
var React = __toESM(require("react"));
|
|
136
|
-
var import_getComponentFromProps = __toESM(require("./getComponentFromProps"));
|
|
137
|
-
var import_onClickHandlerForNonInteractiveElements = __toESM(require("./onClickHandlerForNonInteractiveElements"));
|
|
138
|
-
var import_capitalize = require("./capitalize");
|
|
139
|
-
var import_objectUtilities = require("./objectUtilities");
|
|
140
|
-
var import_operators = require("./operators");
|
|
141
|
-
var import_utils = require("./utils");
|
|
142
|
-
var import_system = require("./system");
|
|
143
|
-
var import_hooks = require("./hooks");
|
|
144
|
-
var import_timeUtils = require("./timeUtils");
|
|
145
|
-
var import_compose = require("./compose");
|
|
146
|
-
var import_platform = require("./platform");
|
|
147
|
-
var import_reactTypesUtility = require("./reactTypesUtility");
|
|
148
|
-
var import_validations = require("./validations");
|
|
149
|
-
var import_crossTypeSort = require("./algorithms/crossTypeSort");
|
|
150
|
-
__reExport(src_exports, require("./deprecated"), module.exports);
|
|
151
|
-
__reExport(src_exports, require("./props-helpers"), module.exports);
|
|
136
|
+
var import_getComponentFromProps = __toESM(require("./getComponentFromProps.js"));
|
|
137
|
+
var import_onClickHandlerForNonInteractiveElements = __toESM(require("./onClickHandlerForNonInteractiveElements.js"));
|
|
138
|
+
var import_capitalize = require("./capitalize.js");
|
|
139
|
+
var import_objectUtilities = require("./objectUtilities.js");
|
|
140
|
+
var import_operators = require("./operators.js");
|
|
141
|
+
var import_utils = require("./utils.js");
|
|
142
|
+
var import_system = require("./system.js");
|
|
143
|
+
var import_hooks = require("./hooks/index.js");
|
|
144
|
+
var import_timeUtils = require("./timeUtils.js");
|
|
145
|
+
var import_compose = require("./compose.js");
|
|
146
|
+
var import_platform = require("./platform.js");
|
|
147
|
+
var import_reactTypesUtility = require("./reactTypesUtility.js");
|
|
148
|
+
var import_validations = require("./validations.js");
|
|
149
|
+
var import_crossTypeSort = require("./algorithms/crossTypeSort.js");
|
|
150
|
+
__reExport(src_exports, require("./deprecated/index.js"), module.exports);
|
|
151
|
+
__reExport(src_exports, require("./props-helpers/index.js"), module.exports);
|
|
152
152
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export { default as getComponentFromProps } from './getComponentFromProps';\nexport { default as onClickHandlerForNonInteractiveElements } from './onClickHandlerForNonInteractiveElements';\nexport { capitalize } from './capitalize';\nexport { getObjectValuesToArray, getObjectKeysToArray } from './objectUtilities';\nexport {\n checkNotEmpty,\n checkEmpty,\n greaterThan,\n validDate,\n equal,\n notEqual,\n isNull,\n isNotNull,\n isIn,\n isNotIn,\n greaterThanOrEquals,\n lessThanOrEquals,\n startsWith,\n contains,\n} from './operators';\nexport {\n cx,\n runAll,\n hashArray,\n safeCall,\n removeUndefinedProperties,\n isObject,\n curry,\n arrayMove,\n uniq,\n filter,\n uniqBy,\n groupBy,\n property,\n get,\n set,\n cloneDeep,\n debounce,\n findIndex,\n isEmpty,\n isString,\n isEqual,\n maxBy,\n meanBy,\n noop,\n omit,\n orderBy,\n pull,\n sortBy,\n sumBy,\n transform,\n isFunction,\n range,\n parseInt,\n padStart,\n isNaN,\n values,\n throttle,\n toggleInObject,\n toggleInArray,\n pick,\n pickBy,\n differenceBy,\n differenceWith,\n addOrRemove,\n isEqualWith,\n isBoolean,\n} from './utils';\nexport { setRef, mergeRefs, setMultipleRefs, logger } from './system';\nexport {\n useMeasure,\n useForceUpdate,\n useOnClickOutside,\n useExecutionTimer,\n useExpandState,\n useHotkeys,\n useHoverHandlersDelay,\n useResizeObserver,\n useShouldRecalculate,\n useWindowScrollerList,\n usePrevious,\n useCancellableDelayedCallback,\n useDerivedStateFromProps,\n useOnElementResize,\n useIsShowingEllipsis,\n useMakeMutable,\n useCallbackAfterRender,\n useFocusTrap,\n UseFocusTrapWithSchema,\n useIsMobile,\n useOnBlurOut,\n UseOnBlurOutWithSchema,\n useOnFirstFocusIn,\n UseOnFirstFocusInWithSchema,\n useOnSpecificFocus,\n UseOnSpecificFocusWithSchema,\n} from './hooks';\nexport { getVisibleTimeByFormat, addLeadingZeros } from './timeUtils';\nexport { compose } from './compose';\nexport { DOCUMENT, WINDOW } from './platform';\nexport { isDOMTypeElement } from './reactTypesUtility';\nexport { isRequired, isGreaterThan, isValidDate } from './validations';\n\nexport { crossTypeSort } from './algorithms/crossTypeSort';\n\n// TODO -- REMOVE WHEN READY\nexport * from './deprecated';\nexport * from './props-helpers';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mCAAiD;AACjD,qDAAmE;AACnE,wBAA2B;AAC3B,6BAA6D;AAC7D,uBAeO;AACP,mBA+CO;AACP,oBAA2D;AAC3D,mBA2BO;AACP,uBAAwD;AACxD,qBAAwB;AACxB,sBAAiC;AACjC,+BAAiC;AACjC,yBAAuD;AAEvD,2BAA8B;AAG9B,wBAAc,
|
|
4
|
+
"sourcesContent": ["export { default as getComponentFromProps } from './getComponentFromProps.js';\nexport { default as onClickHandlerForNonInteractiveElements } from './onClickHandlerForNonInteractiveElements.js';\nexport { capitalize } from './capitalize.js';\nexport { getObjectValuesToArray, getObjectKeysToArray } from './objectUtilities.js';\nexport {\n checkNotEmpty,\n checkEmpty,\n greaterThan,\n validDate,\n equal,\n notEqual,\n isNull,\n isNotNull,\n isIn,\n isNotIn,\n greaterThanOrEquals,\n lessThanOrEquals,\n startsWith,\n contains,\n} from './operators.js';\nexport {\n cx,\n runAll,\n hashArray,\n safeCall,\n removeUndefinedProperties,\n isObject,\n curry,\n arrayMove,\n uniq,\n filter,\n uniqBy,\n groupBy,\n property,\n get,\n set,\n cloneDeep,\n debounce,\n findIndex,\n isEmpty,\n isString,\n isEqual,\n maxBy,\n meanBy,\n noop,\n omit,\n orderBy,\n pull,\n sortBy,\n sumBy,\n transform,\n isFunction,\n range,\n parseInt,\n padStart,\n isNaN,\n values,\n throttle,\n toggleInObject,\n toggleInArray,\n pick,\n pickBy,\n differenceBy,\n differenceWith,\n addOrRemove,\n isEqualWith,\n isBoolean,\n} from './utils.js';\nexport { setRef, mergeRefs, setMultipleRefs, logger } from './system.js';\nexport {\n useMeasure,\n useForceUpdate,\n useOnClickOutside,\n useExecutionTimer,\n useExpandState,\n useHotkeys,\n useHoverHandlersDelay,\n useResizeObserver,\n useShouldRecalculate,\n useWindowScrollerList,\n usePrevious,\n useCancellableDelayedCallback,\n useDerivedStateFromProps,\n useOnElementResize,\n useIsShowingEllipsis,\n useMakeMutable,\n useCallbackAfterRender,\n useFocusTrap,\n UseFocusTrapWithSchema,\n useIsMobile,\n useOnBlurOut,\n UseOnBlurOutWithSchema,\n useOnFirstFocusIn,\n UseOnFirstFocusInWithSchema,\n useOnSpecificFocus,\n UseOnSpecificFocusWithSchema,\n} from './hooks/index.js';\nexport { getVisibleTimeByFormat, addLeadingZeros } from './timeUtils.js';\nexport { compose } from './compose.js';\nexport { DOCUMENT, WINDOW } from './platform.js';\nexport { isDOMTypeElement } from './reactTypesUtility.js';\nexport { isRequired, isGreaterThan, isValidDate } from './validations.js';\n\nexport { crossTypeSort } from './algorithms/crossTypeSort.js';\n\n// TODO -- REMOVE WHEN READY\nexport * from './deprecated/index.js';\nexport * from './props-helpers/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mCAAiD;AACjD,qDAAmE;AACnE,wBAA2B;AAC3B,6BAA6D;AAC7D,uBAeO;AACP,mBA+CO;AACP,oBAA2D;AAC3D,mBA2BO;AACP,uBAAwD;AACxD,qBAAwB;AACxB,sBAAiC;AACjC,+BAAiC;AACjC,yBAAuD;AAEvD,2BAA8B;AAG9B,wBAAc,kCA1Gd;AA2GA,wBAAc,qCA3Gd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,11 +22,5 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var props_helpers_exports = {};
|
|
23
23
|
module.exports = __toCommonJS(props_helpers_exports);
|
|
24
24
|
var React = __toESM(require("react"));
|
|
25
|
-
__reExport(props_helpers_exports, require("
|
|
26
|
-
__reExport(props_helpers_exports, require("./getProps"), module.exports);
|
|
27
|
-
__reExport(props_helpers_exports, require("./globalProps"), module.exports);
|
|
28
|
-
__reExport(props_helpers_exports, require("./propTypes"), module.exports);
|
|
29
|
-
__reExport(props_helpers_exports, require("./validation"), module.exports);
|
|
30
|
-
__reExport(props_helpers_exports, require("./xstyledProps"), module.exports);
|
|
31
|
-
__reExport(props_helpers_exports, require("./useDeprecateComponent"), module.exports);
|
|
25
|
+
__reExport(props_helpers_exports, require("@elliemae/ds-props-helpers"), module.exports);
|
|
32
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/props-helpers/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type {} from '@elliemae/ds-props-helpers';\nexport * from '@elliemae/ds-props-helpers';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADCvB,kCAAc,uCADd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/system.js
CHANGED
|
@@ -31,7 +31,7 @@ __export(system_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(system_exports);
|
|
33
33
|
var React = __toESM(require("react"));
|
|
34
|
-
var import_utils = require("./utils");
|
|
34
|
+
var import_utils = require("./utils.js");
|
|
35
35
|
const setRef = (ref, value) => {
|
|
36
36
|
if ((0, import_utils.isFunction)(ref)) {
|
|
37
37
|
ref(value);
|
package/dist/cjs/system.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/system.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type React from 'react';\nimport { isFunction } from './utils';\n\ntype AnyRef<T extends HTMLElement> =\n | React.MutableRefObject<T | null>\n | ((_ref: T | null) => void)\n | React.Dispatch<React.SetStateAction<T | null>>\n | false;\n\nexport const setRef = <T extends HTMLElement>(ref: AnyRef<T>, value: T) => {\n if (isFunction(ref)) {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n};\n\nexport const mergeRefs = <T extends HTMLElement>(...refs: AnyRef<T>[]) => {\n const mergeRefsFunc = (node: T | null) => {\n if (!node) return;\n refs.forEach((ref) => setRef(ref, node));\n };\n return mergeRefsFunc;\n};\n\nexport function setMultipleRefs<T = unknown>(\n refs: Array<React.RefObject<T> | React.LegacyRef<T>>,\n): React.RefCallback<T> {\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n (ref as React.MutableRefObject<T | null>).current = value;\n }\n });\n };\n}\n\nexport function logger(...args: unknown[]) {\n // eslint-disable-next-line no-console\n console.log(...args);\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import type React from 'react';\nimport { isFunction } from './utils.js';\n\ntype AnyRef<T extends HTMLElement> =\n | React.MutableRefObject<T | null>\n | ((_ref: T | null) => void)\n | React.Dispatch<React.SetStateAction<T | null>>\n | false;\n\nexport const setRef = <T extends HTMLElement>(ref: AnyRef<T>, value: T) => {\n if (isFunction(ref)) {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n};\n\nexport const mergeRefs = <T extends HTMLElement>(...refs: AnyRef<T>[]) => {\n const mergeRefsFunc = (node: T | null) => {\n if (!node) return;\n refs.forEach((ref) => setRef(ref, node));\n };\n return mergeRefsFunc;\n};\n\nexport function setMultipleRefs<T = unknown>(\n refs: Array<React.RefObject<T> | React.LegacyRef<T>>,\n): React.RefCallback<T> {\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n (ref as React.MutableRefObject<T | null>).current = value;\n }\n });\n };\n}\n\nexport function logger(...args: unknown[]) {\n // eslint-disable-next-line no-console\n console.log(...args);\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA2B;AAQpB,MAAM,SAAS,CAAwB,KAAgB,UAAa;AACzE,UAAI,yBAAW,GAAG,GAAG;AACnB,QAAI,KAAK;AAAA,EACX,WAAW,KAAK;AACd,QAAI,UAAU;AAAA,EAChB;AACF;AAEO,MAAM,YAAY,IAA2B,SAAsB;AACxE,QAAM,gBAAgB,CAAC,SAAmB;AACxC,QAAI,CAAC;AAAM;AACX,SAAK,QAAQ,CAAC,QAAQ,OAAO,KAAK,IAAI,CAAC;AAAA,EACzC;AACA,SAAO;AACT;AAEO,SAAS,gBACd,MACsB;AACtB,SAAO,CAAC,UAAU;AAChB,SAAK,QAAQ,CAAC,QAAQ;AACpB,UAAI,OAAO,QAAQ,YAAY;AAC7B,YAAI,KAAK;AAAA,MACX,WAAW,OAAO,MAAM;AACtB,QAAC,IAAyC,UAAU;AAAA,MACtD;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEO,SAAS,UAAU,MAAiB;AAEzC,UAAQ,IAAI,GAAG,IAAI;AACrB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|