From 54e46a83172ac9f630097505e3459a6f0118f2d6 Mon Sep 17 00:00:00 2001 From: contra Date: Fri, 16 Sep 2022 12:16:46 -0700 Subject: [PATCH] 9.0.0 release --- CHANGELOG.md | 16 ++++++-- dist/react-responsive.min.js.map | 2 +- package.json | 10 ++--- types/mediaQuery.d.ts | 70 ++++++++++++++++---------------- 4 files changed, 53 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc60bb4..b3b9ccd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,15 +2,23 @@ ### v9.0.0 -#### Beta9 +- Convert project to typescript +- Upgrade to Webpack 5 +- Fix a memory leak with useMediaQuery hook +- Add support for React 18 +- Add docs webpage + +### v9.0.0-beta + +#### Beta 9 - Fix typescript output -#### Beta8 +#### Beta 8 - Fix webpack bundle issue (self is not defined) -#### Beta7 +#### Beta 7 - Improve typescript typings - Add typing support for React 18 @@ -18,7 +26,7 @@ - Upgrade to Webpack 5 - Fix a bug with React 18 not re-rendering -#### Beta6 +#### Beta 6 - Convert project to typescript - Remove UMD build from project diff --git a/dist/react-responsive.min.js.map b/dist/react-responsive.min.js.map index 2781b55..1c01690 100644 --- a/dist/react-responsive.min.js.map +++ b/dist/react-responsive.min.js.map @@ -1 +1 @@ -{"version":3,"file":"react-responsive.min.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,UACR,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,SAAUJ,GACQ,iBAAZC,QACdA,QAAoB,WAAID,EAAQG,QAAQ,UAExCJ,EAAiB,WAAIC,EAAQD,EAAY,OAR3C,CASGO,MAAOC,G,sCCDVN,EAAQ,EAWR,SAAoBO,EAAYC,GAC5B,OAkEJ,SAAoBD,GAChB,OAAOA,EAAWE,MAAM,KAAKC,KAAI,SAAUC,GAGvC,IAAIC,GAFJD,EAAQA,EAAME,QAEUC,MAAM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5EL,OAAOkH,eAAepO,EAASuH,EAAK,CAAE8G,YAAY,EAAMC,IAAKJ,EAAW3G,MCJ3EsG,EAAoBM,EAAI,CAAC/C,EAAKmD,IAAUrH,OAAOM,UAAUpE,eAAeY,KAAKoH,EAAKmD,GCClFV,EAAoBW,EAAKxO,IACH,oBAAXyO,QAA0BA,OAAOC,aAC1CxH,OAAOkH,eAAepO,EAASyO,OAAOC,YAAa,CAAEhN,MAAO,WAE7DwF,OAAOkH,eAAepO,EAAS,aAAc,CAAE0B,OAAO,KCF7BmM,EAAoB,M","sources":["webpack://MediaQuery/webpack/universalModuleDefinition","webpack://MediaQuery/./node_modules/css-mediaquery/index.js","webpack://MediaQuery/./node_modules/hyphenate-style-name/index.js","webpack://MediaQuery/./node_modules/matchmediaquery/index.js","webpack://MediaQuery/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://MediaQuery/./node_modules/prop-types/index.js","webpack://MediaQuery/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://MediaQuery/./node_modules/shallow-equal/dist/index.esm.js","webpack://MediaQuery/./src/Component.ts","webpack://MediaQuery/./src/Context.ts","webpack://MediaQuery/./src/index.ts","webpack://MediaQuery/./src/mediaQuery.ts","webpack://MediaQuery/./src/toQuery.ts","webpack://MediaQuery/./src/useMediaQuery.ts","webpack://MediaQuery/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","webpack://MediaQuery/webpack/bootstrap","webpack://MediaQuery/webpack/runtime/define property getters","webpack://MediaQuery/webpack/runtime/hasOwnProperty shorthand","webpack://MediaQuery/webpack/runtime/make namespace object","webpack://MediaQuery/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MediaQuery\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"MediaQuery\"] = factory(root[\"React\"]);\n})(this, (__WEBPACK_EXTERNAL_MODULE__359__) => {\nreturn ","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n'use strict';\n\nexports.match = matchQuery;\nexports.parse = parseQuery;\n\n// -----------------------------------------------------------------------------\n\nvar RE_MEDIA_QUERY = /(?:(only|not)?\\s*([^\\s\\(\\)]+)(?:\\s*and)?\\s*)?(.+)?/i,\n RE_MQ_EXPRESSION = /\\(\\s*([^\\s\\:\\)]+)\\s*(?:\\:\\s*([^\\s\\)]+))?\\s*\\)/,\n RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/,\n RE_LENGTH_UNIT = /(em|rem|px|cm|mm|in|pt|pc)?$/,\n RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/;\n\nfunction matchQuery(mediaQuery, values) {\n return parseQuery(mediaQuery).some(function (query) {\n var inverse = query.inverse;\n\n // Either the parsed or specified `type` is \"all\", or the types must be\n // equal for a match.\n var typeMatch = query.type === 'all' || values.type === query.type;\n\n // Quit early when `type` doesn't match, but take \"not\" into account.\n if ((typeMatch && inverse) || !(typeMatch || inverse)) {\n return false;\n }\n\n var expressionsMatch = query.expressions.every(function (expression) {\n var feature = expression.feature,\n modifier = expression.modifier,\n expValue = expression.value,\n value = values[feature];\n\n // Missing or falsy values don't match.\n if (!value) { return false; }\n\n switch (feature) {\n case 'orientation':\n case 'scan':\n return value.toLowerCase() === expValue.toLowerCase();\n\n case 'width':\n case 'height':\n case 'device-width':\n case 'device-height':\n expValue = toPx(expValue);\n value = toPx(value);\n break;\n\n case 'resolution':\n expValue = toDpi(expValue);\n value = toDpi(value);\n break;\n\n case 'aspect-ratio':\n case 'device-aspect-ratio':\n case /* Deprecated */ 'device-pixel-ratio':\n expValue = toDecimal(expValue);\n value = toDecimal(value);\n break;\n\n case 'grid':\n case 'color':\n case 'color-index':\n case 'monochrome':\n expValue = parseInt(expValue, 10) || 1;\n value = parseInt(value, 10) || 0;\n break;\n }\n\n switch (modifier) {\n case 'min': return value >= expValue;\n case 'max': return value <= expValue;\n default : return value === expValue;\n }\n });\n\n return (expressionsMatch && !inverse) || (!expressionsMatch && inverse);\n });\n}\n\nfunction parseQuery(mediaQuery) {\n return mediaQuery.split(',').map(function (query) {\n query = query.trim();\n\n var captures = query.match(RE_MEDIA_QUERY),\n modifier = captures[1],\n type = captures[2],\n expressions = captures[3] || '',\n parsed = {};\n\n parsed.inverse = !!modifier && modifier.toLowerCase() === 'not';\n parsed.type = type ? type.toLowerCase() : 'all';\n\n // Split expressions into a list.\n expressions = expressions.match(/\\([^\\)]+\\)/g) || [];\n\n parsed.expressions = expressions.map(function (expression) {\n var captures = expression.match(RE_MQ_EXPRESSION),\n feature = captures[1].toLowerCase().match(RE_MQ_FEATURE);\n\n return {\n modifier: feature[1],\n feature : feature[2],\n value : captures[2]\n };\n });\n\n return parsed;\n });\n}\n\n// -- Utilities ----------------------------------------------------------------\n\nfunction toDecimal(ratio) {\n var decimal = Number(ratio),\n numbers;\n\n if (!decimal) {\n numbers = ratio.match(/^(\\d+)\\s*\\/\\s*(\\d+)$/);\n decimal = numbers[1] / numbers[2];\n }\n\n return decimal;\n}\n\nfunction toDpi(resolution) {\n var value = parseFloat(resolution),\n units = String(resolution).match(RE_RESOLUTION_UNIT)[1];\n\n switch (units) {\n case 'dpcm': return value / 2.54;\n case 'dppx': return value * 96;\n default : return value;\n }\n}\n\nfunction toPx(length) {\n var value = parseFloat(length),\n units = String(length).match(RE_LENGTH_UNIT)[1];\n\n switch (units) {\n case 'em' : return value * 16;\n case 'rem': return value * 16;\n case 'cm' : return value * 96 / 2.54;\n case 'mm' : return value * 96 / 2.54 / 10;\n case 'in' : return value * 96;\n case 'pt' : return value * 72;\n case 'pc' : return value * 72 / 12;\n default : return value;\n }\n}\n","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\nexport default hyphenateStyleName\n","'use strict';\n\nvar staticMatch = require('css-mediaquery').match;\nvar dynamicMatch = typeof window !== 'undefined' ? window.matchMedia : null;\n\n// our fake MediaQueryList\nfunction Mql(query, values, forceStatic){\n var self = this;\n if(dynamicMatch && !forceStatic){\n var mql = dynamicMatch.call(window, query);\n this.matches = mql.matches;\n this.media = mql.media;\n // TODO: is there a time it makes sense to remove this listener?\n mql.addListener(update);\n } else {\n this.matches = staticMatch(query, values);\n this.media = query;\n }\n\n this.addListener = addListener;\n this.removeListener = removeListener;\n this.dispose = dispose;\n\n function addListener(listener){\n if(mql){\n mql.addListener(listener);\n }\n }\n\n function removeListener(listener){\n if(mql){\n mql.removeListener(listener);\n }\n }\n\n // update ourselves!\n function update(evt){\n self.matches = evt.matches;\n self.media = evt.media;\n }\n\n function dispose(){\n if(mql){\n mql.removeListener(update);\n }\n }\n}\n\nfunction matchMedia(query, values, forceStatic){\n return new Mql(query, values, forceStatic);\n}\n\nmodule.exports = matchMedia;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","function shallowEqualObjects(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n if (!objA || !objB) {\n return false;\n }\n\n var aKeys = Object.keys(objA);\n var bKeys = Object.keys(objB);\n var len = aKeys.length;\n\n if (bKeys.length !== len) {\n return false;\n }\n\n for (var i = 0; i < len; i++) {\n var key = aKeys[i];\n\n if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction shallowEqualArrays(arrA, arrB) {\n if (arrA === arrB) {\n return true;\n }\n\n if (!arrA || !arrB) {\n return false;\n }\n\n var len = arrA.length;\n\n if (arrB.length !== len) {\n return false;\n }\n\n for (var i = 0; i < len; i++) {\n if (arrA[i] !== arrB[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nexport { shallowEqualArrays, shallowEqualObjects };\n","import useMediaQuery from './useMediaQuery';\nimport { ReactNode, FC, CSSProperties } from 'react';\nimport { MediaQueryAllQueryable, MediaQueryMatchers } from './types';\n\ninterface MediaQueryProps extends MediaQueryAllQueryable {\n component?: ReactNode\n // eslint-disable-next-line @typescript-eslint/ban-types\n children?: ReactNode | Function;\n query?: string;\n style?: CSSProperties;\n className?: string;\n device?: MediaQueryMatchers;\n values?: Partial;\n onBeforeChange?: (_matches: boolean) => void;\n onChange?: (_matches: boolean) => void;\n}\n\nconst MediaQuery: FC = ({\n children,\n device,\n onChange,\n ...settings\n}) => {\n const matches = useMediaQuery(settings, device, onChange);\n\n if (typeof children === 'function') {\n return children(matches);\n }\n return matches ? children : null;\n};\n\nexport default MediaQuery;\n","import { createContext } from 'react'\nimport { MediaQueryAllQueryable } from './types'\n\nconst Context = createContext | undefined>(undefined)\n\nexport default Context\n","import useMediaQuery from './useMediaQuery'\nimport MediaQuery from './Component'\nimport toQuery from './toQuery'\nimport Context from './Context'\n\nexport {\n MediaQuery as default,\n useMediaQuery,\n toQuery,\n Context\n}\n\nexport type {\n MediaQueryTypes,\n MediaQueryType,\n MediaQueryFeatures,\n MediaQueryAllQueryable\n} from './types'\n","import PropTypes from 'prop-types'\n\nconst stringOrNumber = PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n])\n\n// media types\nconst types = {\n all: PropTypes.bool,\n grid: PropTypes.bool,\n aural: PropTypes.bool,\n braille: PropTypes.bool,\n handheld: PropTypes.bool,\n print: PropTypes.bool,\n projection: PropTypes.bool,\n screen: PropTypes.bool,\n tty: PropTypes.bool,\n tv: PropTypes.bool,\n embossed: PropTypes.bool\n}\n\n// properties that match media queries\nconst matchers = {\n orientation: PropTypes.oneOf([\n 'portrait',\n 'landscape'\n ]),\n\n scan: PropTypes.oneOf([\n 'progressive',\n 'interlace'\n ]),\n\n aspectRatio: PropTypes.string,\n deviceAspectRatio: PropTypes.string,\n\n height: stringOrNumber,\n deviceHeight: stringOrNumber,\n\n width: stringOrNumber,\n deviceWidth: stringOrNumber,\n\n color: PropTypes.bool,\n\n colorIndex: PropTypes.bool,\n\n monochrome: PropTypes.bool,\n resolution: stringOrNumber,\n type: Object.keys(types)\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst { type, ...featureMatchers } = matchers\n\n// media features\nconst features = {\n minAspectRatio: PropTypes.string,\n maxAspectRatio: PropTypes.string,\n minDeviceAspectRatio: PropTypes.string,\n maxDeviceAspectRatio: PropTypes.string,\n\n minHeight: stringOrNumber,\n maxHeight: stringOrNumber,\n minDeviceHeight: stringOrNumber,\n maxDeviceHeight: stringOrNumber,\n\n minWidth: stringOrNumber,\n maxWidth: stringOrNumber,\n minDeviceWidth: stringOrNumber,\n maxDeviceWidth: stringOrNumber,\n\n minColor: PropTypes.number,\n maxColor: PropTypes.number,\n\n minColorIndex: PropTypes.number,\n maxColorIndex: PropTypes.number,\n\n minMonochrome: PropTypes.number,\n maxMonochrome: PropTypes.number,\n\n minResolution: stringOrNumber,\n maxResolution: stringOrNumber,\n\n ...featureMatchers\n}\n\nconst all = { ...types, ...features }\n\nexport default {\n all: all,\n types: types,\n matchers: matchers,\n features: features\n}\n","import hyphenate from 'hyphenate-style-name'\nimport mq from './mediaQuery'\nimport { MediaQueryAllQueryable } from './types'\n\nconst negate = (cond: string) => `not ${cond}`\n\nconst keyVal = (k: string, v: unknown): string => {\n const realKey = hyphenate(k)\n\n // px shorthand\n if (typeof v === 'number') {\n v = `${v}px`\n }\n if (v === true) {\n return realKey\n }\n if (v === false) {\n return negate(realKey)\n }\n return `(${realKey}: ${v})`\n}\n\nconst join = (conds: string[]): string => conds.join(' and ')\n\nconst toQuery = (obj: Partial): string => {\n const rules: string[] = []\n Object.keys(mq.all).forEach((k) => {\n const v = obj[k as keyof MediaQueryAllQueryable]\n if (v != null) {\n rules.push(keyVal(k, v))\n }\n })\n return join(rules)\n}\n\nexport default toQuery\n","import { useRef, useEffect, useContext, useState } from 'react'\nimport matchMedia from 'matchmediaquery'\nimport hyphenate from 'hyphenate-style-name'\nimport { shallowEqualObjects } from 'shallow-equal'\nimport toQuery from './toQuery'\nimport Context from './Context'\nimport { MediaQueryAllQueryable, MediaQueryMatchers } from './types'\n\ntype MediaQuerySettings = Partial\ntype HyphenateKeyTypes = MediaQueryMatchers | MediaQueryAllQueryable;\n\nconst makeQuery = (settings: MediaQuerySettings) => settings.query || toQuery(settings)\n\nconst hyphenateKeys = (obj?: HyphenateKeyTypes) => {\n type K = keyof HyphenateKeyTypes;\n\n if (!obj) return undefined\n const keys = Object.keys(obj) as K[]\n\n return keys.reduce((result, key) => {\n result[hyphenate(key)] = obj[key]\n return result\n }, {} as Record)\n}\n\nconst useIsUpdate = () => {\n const ref = useRef(false)\n\n useEffect(() => {\n ref.current = true\n }, [])\n\n return ref.current\n}\n\nconst useDevice = (deviceFromProps?: MediaQueryMatchers): Partial | undefined => {\n const deviceFromContext = useContext(Context)\n const getDevice = () =>\n hyphenateKeys(deviceFromProps) || hyphenateKeys(deviceFromContext)\n const [ device, setDevice ] = useState(getDevice)\n\n useEffect(() => {\n const newDevice = getDevice()\n if (!shallowEqualObjects(device, newDevice)) {\n setDevice(newDevice)\n }\n }, [ deviceFromProps, deviceFromContext ])\n\n return device\n}\n\nconst useQuery = (settings: MediaQuerySettings) => {\n const getQuery = () => makeQuery(settings)\n const [ query, setQuery ] = useState(getQuery)\n\n useEffect(() => {\n const newQuery = getQuery()\n if (query !== newQuery) {\n setQuery(newQuery)\n }\n }, [ settings ])\n\n return query\n}\n\nconst useMatchMedia = (query: string, device?: MediaQueryMatchers) => {\n const getMatchMedia = () => matchMedia(query, device || {}, !!device)\n const [ mq, setMq ] = useState(getMatchMedia)\n const isUpdate = useIsUpdate()\n\n useEffect(() => {\n if (isUpdate) {\n // skip on mounting, it has already been set\n const newMq = getMatchMedia()\n setMq(newMq)\n\n return () => {\n if (newMq) {\n newMq.dispose()\n }\n }\n }\n }, [ query, device ])\n\n return mq\n}\n\nconst useMatches = (mediaQuery: MediaQueryList): boolean => {\n const [ matches, setMatches ] = useState(mediaQuery.matches)\n\n useEffect(() => {\n const updateMatches = (ev: MediaQueryListEvent) => {\n setMatches(ev.matches)\n }\n mediaQuery.addListener(updateMatches)\n setMatches(mediaQuery.matches)\n\n return () => {\n mediaQuery.removeListener(updateMatches)\n }\n }, [ mediaQuery ])\n\n return matches\n}\n\nconst useMediaQuery = (settings: MediaQuerySettings, device?: MediaQueryMatchers, onChange?: (_: boolean) => void) => {\n const deviceSettings = useDevice(device)\n const query = useQuery(settings)\n if (!query) throw new Error('Invalid or missing MediaQuery!')\n const mq = useMatchMedia(query, deviceSettings)\n const matches = useMatches(mq as unknown as MediaQueryList)\n const isUpdate = useIsUpdate()\n\n useEffect(() => {\n if (isUpdate && onChange) {\n onChange(matches)\n }\n }, [ matches ])\n\n useEffect(() => () => {\n if (mq) {\n mq.dispose()\n }\n }, [])\n\n return matches\n}\n\nexport default useMediaQuery\n","module.exports = __WEBPACK_EXTERNAL_MODULE__359__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(607);\n"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE__359__","mediaQuery","values","split","map","query","captures","trim","match","RE_MEDIA_QUERY","modifier","type","expressions","parsed","inverse","toLowerCase","expression","RE_MQ_EXPRESSION","feature","RE_MQ_FEATURE","value","parseQuery","some","typeMatch","expressionsMatch","every","expValue","toPx","toDpi","toDecimal","parseInt","RE_LENGTH_UNIT","RE_RESOLUTION_UNIT","ratio","numbers","decimal","Number","resolution","parseFloat","String","length","uppercasePattern","msPattern","cache","toHyphenLower","name","hasOwnProperty","hName","replace","test","staticMatch","dynamicMatch","window","matchMedia","Mql","forceStatic","self","mql","call","matches","media","addListener","update","evt","listener","removeListener","dispose","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","shallowEqualObjects","objA","objB","aKeys","Object","keys","bKeys","len","i","key","prototype","shallowEqualArrays","arrA","arrB","children","device","onChange","settings","Context","createContext","undefined","useMediaQuery","toQuery","stringOrNumber","types","all","grid","aural","braille","handheld","print","projection","screen","tty","tv","embossed","matchers","orientation","scan","aspectRatio","deviceAspectRatio","height","deviceHeight","width","deviceWidth","color","colorIndex","monochrome","featureMatchers","features","minAspectRatio","maxAspectRatio","minDeviceAspectRatio","maxDeviceAspectRatio","minHeight","maxHeight","minDeviceHeight","maxDeviceHeight","minWidth","maxWidth","minDeviceWidth","maxDeviceWidth","minColor","maxColor","minColorIndex","maxColorIndex","minMonochrome","maxMonochrome","minResolution","maxResolution","obj","rules","forEach","k","v","push","realKey","keyVal","join","hyphenateKeys","reduce","result","useIsUpdate","ref","useRef","useEffect","current","deviceSettings","deviceFromProps","deviceFromContext","useContext","getDevice","useState","setDevice","newDevice","useDevice","getQuery","makeQuery","setQuery","newQuery","useQuery","mq","getMatchMedia","setMq","isUpdate","useMatchMedia","setMatches","updateMatches","ev","useMatches","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","o","defineProperty","enumerable","get","prop","r","Symbol","toStringTag"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"react-responsive.min.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,UACR,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,SAAUJ,GACQ,iBAAZC,QACdA,QAAoB,WAAID,EAAQG,QAAQ,UAExCJ,EAAiB,WAAIC,EAAQD,EAAY,MAC1C,CATD,CASGO,MAAOC,G,sCCDVN,EAAQ,EAWR,SAAoBO,EAAYC,GAC5B,OAkEJ,SAAoBD,GAChB,OAAOA,EAAWE,MAAM,KAAKC,KAAI,SAAUC,GAGvC,IAAIC,GAFJD,EAAQA,EAAME,QAEUC,MAAMC,GAC1BC,EAAcJ,EAAS,GACvBK,EAAcL,EAAS,GACvBM,EAAcN,EAAS,I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,QAGrB,IAAIC,EAAS2N,EAAyBE,GAAY,CAGjD9N,QAAS,CAAC,GAOX,OAHAgO,EAAoBF,GAAU9J,KAAK/D,EAAOD,QAASC,EAAQA,EAAOD,QAAS6N,GAGpE5N,EAAOD,OACf,C,OCrBA6N,EAAoBI,EAAI,CAACjO,EAASkO,KACjC,IAAI,IAAI3G,KAAO2G,EACXL,EAAoBM,EAAED,EAAY3G,KAASsG,EAAoBM,EAAEnO,EAASuH,IAC5EL,OAAOkH,eAAepO,EAASuH,EAAK,CAAE8G,YAAY,EAAMC,IAAKJ,EAAW3G,IAE1E,ECNDsG,EAAoBM,EAAI,CAAC/C,EAAKmD,IAAUrH,OAAOM,UAAUpE,eAAeY,KAAKoH,EAAKmD,GCClFV,EAAoBW,EAAKxO,IACH,oBAAXyO,QAA0BA,OAAOC,aAC1CxH,OAAOkH,eAAepO,EAASyO,OAAOC,YAAa,CAAEhN,MAAO,WAE7DwF,OAAOkH,eAAepO,EAAS,aAAc,CAAE0B,OAAO,GAAO,ECFpCmM,EAAoB,I","sources":["webpack://MediaQuery/webpack/universalModuleDefinition","webpack://MediaQuery/./node_modules/css-mediaquery/index.js","webpack://MediaQuery/./node_modules/hyphenate-style-name/index.js","webpack://MediaQuery/./node_modules/matchmediaquery/index.js","webpack://MediaQuery/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://MediaQuery/./node_modules/prop-types/index.js","webpack://MediaQuery/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://MediaQuery/./node_modules/shallow-equal/dist/index.esm.js","webpack://MediaQuery/./src/Component.ts","webpack://MediaQuery/./src/Context.ts","webpack://MediaQuery/./src/index.ts","webpack://MediaQuery/./src/mediaQuery.ts","webpack://MediaQuery/./src/toQuery.ts","webpack://MediaQuery/./src/useMediaQuery.ts","webpack://MediaQuery/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","webpack://MediaQuery/webpack/bootstrap","webpack://MediaQuery/webpack/runtime/define property getters","webpack://MediaQuery/webpack/runtime/hasOwnProperty shorthand","webpack://MediaQuery/webpack/runtime/make namespace object","webpack://MediaQuery/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MediaQuery\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"MediaQuery\"] = factory(root[\"React\"]);\n})(this, (__WEBPACK_EXTERNAL_MODULE__359__) => {\nreturn ","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n'use strict';\n\nexports.match = matchQuery;\nexports.parse = parseQuery;\n\n// -----------------------------------------------------------------------------\n\nvar RE_MEDIA_QUERY = /(?:(only|not)?\\s*([^\\s\\(\\)]+)(?:\\s*and)?\\s*)?(.+)?/i,\n RE_MQ_EXPRESSION = /\\(\\s*([^\\s\\:\\)]+)\\s*(?:\\:\\s*([^\\s\\)]+))?\\s*\\)/,\n RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/,\n RE_LENGTH_UNIT = /(em|rem|px|cm|mm|in|pt|pc)?$/,\n RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/;\n\nfunction matchQuery(mediaQuery, values) {\n return parseQuery(mediaQuery).some(function (query) {\n var inverse = query.inverse;\n\n // Either the parsed or specified `type` is \"all\", or the types must be\n // equal for a match.\n var typeMatch = query.type === 'all' || values.type === query.type;\n\n // Quit early when `type` doesn't match, but take \"not\" into account.\n if ((typeMatch && inverse) || !(typeMatch || inverse)) {\n return false;\n }\n\n var expressionsMatch = query.expressions.every(function (expression) {\n var feature = expression.feature,\n modifier = expression.modifier,\n expValue = expression.value,\n value = values[feature];\n\n // Missing or falsy values don't match.\n if (!value) { return false; }\n\n switch (feature) {\n case 'orientation':\n case 'scan':\n return value.toLowerCase() === expValue.toLowerCase();\n\n case 'width':\n case 'height':\n case 'device-width':\n case 'device-height':\n expValue = toPx(expValue);\n value = toPx(value);\n break;\n\n case 'resolution':\n expValue = toDpi(expValue);\n value = toDpi(value);\n break;\n\n case 'aspect-ratio':\n case 'device-aspect-ratio':\n case /* Deprecated */ 'device-pixel-ratio':\n expValue = toDecimal(expValue);\n value = toDecimal(value);\n break;\n\n case 'grid':\n case 'color':\n case 'color-index':\n case 'monochrome':\n expValue = parseInt(expValue, 10) || 1;\n value = parseInt(value, 10) || 0;\n break;\n }\n\n switch (modifier) {\n case 'min': return value >= expValue;\n case 'max': return value <= expValue;\n default : return value === expValue;\n }\n });\n\n return (expressionsMatch && !inverse) || (!expressionsMatch && inverse);\n });\n}\n\nfunction parseQuery(mediaQuery) {\n return mediaQuery.split(',').map(function (query) {\n query = query.trim();\n\n var captures = query.match(RE_MEDIA_QUERY),\n modifier = captures[1],\n type = captures[2],\n expressions = captures[3] || '',\n parsed = {};\n\n parsed.inverse = !!modifier && modifier.toLowerCase() === 'not';\n parsed.type = type ? type.toLowerCase() : 'all';\n\n // Split expressions into a list.\n expressions = expressions.match(/\\([^\\)]+\\)/g) || [];\n\n parsed.expressions = expressions.map(function (expression) {\n var captures = expression.match(RE_MQ_EXPRESSION),\n feature = captures[1].toLowerCase().match(RE_MQ_FEATURE);\n\n return {\n modifier: feature[1],\n feature : feature[2],\n value : captures[2]\n };\n });\n\n return parsed;\n });\n}\n\n// -- Utilities ----------------------------------------------------------------\n\nfunction toDecimal(ratio) {\n var decimal = Number(ratio),\n numbers;\n\n if (!decimal) {\n numbers = ratio.match(/^(\\d+)\\s*\\/\\s*(\\d+)$/);\n decimal = numbers[1] / numbers[2];\n }\n\n return decimal;\n}\n\nfunction toDpi(resolution) {\n var value = parseFloat(resolution),\n units = String(resolution).match(RE_RESOLUTION_UNIT)[1];\n\n switch (units) {\n case 'dpcm': return value / 2.54;\n case 'dppx': return value * 96;\n default : return value;\n }\n}\n\nfunction toPx(length) {\n var value = parseFloat(length),\n units = String(length).match(RE_LENGTH_UNIT)[1];\n\n switch (units) {\n case 'em' : return value * 16;\n case 'rem': return value * 16;\n case 'cm' : return value * 96 / 2.54;\n case 'mm' : return value * 96 / 2.54 / 10;\n case 'in' : return value * 96;\n case 'pt' : return value * 72;\n case 'pc' : return value * 72 / 12;\n default : return value;\n }\n}\n","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\nexport default hyphenateStyleName\n","'use strict';\n\nvar staticMatch = require('css-mediaquery').match;\nvar dynamicMatch = typeof window !== 'undefined' ? window.matchMedia : null;\n\n// our fake MediaQueryList\nfunction Mql(query, values, forceStatic){\n var self = this;\n if(dynamicMatch && !forceStatic){\n var mql = dynamicMatch.call(window, query);\n this.matches = mql.matches;\n this.media = mql.media;\n // TODO: is there a time it makes sense to remove this listener?\n mql.addListener(update);\n } else {\n this.matches = staticMatch(query, values);\n this.media = query;\n }\n\n this.addListener = addListener;\n this.removeListener = removeListener;\n this.dispose = dispose;\n\n function addListener(listener){\n if(mql){\n mql.addListener(listener);\n }\n }\n\n function removeListener(listener){\n if(mql){\n mql.removeListener(listener);\n }\n }\n\n // update ourselves!\n function update(evt){\n self.matches = evt.matches;\n self.media = evt.media;\n }\n\n function dispose(){\n if(mql){\n mql.removeListener(update);\n }\n }\n}\n\nfunction matchMedia(query, values, forceStatic){\n return new Mql(query, values, forceStatic);\n}\n\nmodule.exports = matchMedia;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","function shallowEqualObjects(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n if (!objA || !objB) {\n return false;\n }\n\n var aKeys = Object.keys(objA);\n var bKeys = Object.keys(objB);\n var len = aKeys.length;\n\n if (bKeys.length !== len) {\n return false;\n }\n\n for (var i = 0; i < len; i++) {\n var key = aKeys[i];\n\n if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction shallowEqualArrays(arrA, arrB) {\n if (arrA === arrB) {\n return true;\n }\n\n if (!arrA || !arrB) {\n return false;\n }\n\n var len = arrA.length;\n\n if (arrB.length !== len) {\n return false;\n }\n\n for (var i = 0; i < len; i++) {\n if (arrA[i] !== arrB[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nexport { shallowEqualArrays, shallowEqualObjects };\n","import useMediaQuery from './useMediaQuery';\nimport { ReactNode, FC, CSSProperties } from 'react';\nimport { MediaQueryAllQueryable, MediaQueryMatchers } from './types';\n\ninterface MediaQueryProps extends MediaQueryAllQueryable {\n component?: ReactNode\n // eslint-disable-next-line @typescript-eslint/ban-types\n children?: ReactNode | Function;\n query?: string;\n style?: CSSProperties;\n className?: string;\n device?: MediaQueryMatchers;\n values?: Partial;\n onBeforeChange?: (_matches: boolean) => void;\n onChange?: (_matches: boolean) => void;\n}\n\nconst MediaQuery: FC = ({\n children,\n device,\n onChange,\n ...settings\n}) => {\n const matches = useMediaQuery(settings, device, onChange);\n\n if (typeof children === 'function') {\n return children(matches);\n }\n return matches ? children : null;\n};\n\nexport default MediaQuery;\n","import { createContext } from 'react'\nimport { MediaQueryAllQueryable } from './types'\n\nconst Context = createContext | undefined>(undefined)\n\nexport default Context\n","import useMediaQuery from './useMediaQuery'\nimport MediaQuery from './Component'\nimport toQuery from './toQuery'\nimport Context from './Context'\n\nexport {\n MediaQuery as default,\n useMediaQuery,\n toQuery,\n Context\n}\n\nexport type {\n MediaQueryTypes,\n MediaQueryType,\n MediaQueryFeatures,\n MediaQueryAllQueryable\n} from './types'\n","import PropTypes from 'prop-types'\n\nconst stringOrNumber = PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n])\n\n// media types\nconst types = {\n all: PropTypes.bool,\n grid: PropTypes.bool,\n aural: PropTypes.bool,\n braille: PropTypes.bool,\n handheld: PropTypes.bool,\n print: PropTypes.bool,\n projection: PropTypes.bool,\n screen: PropTypes.bool,\n tty: PropTypes.bool,\n tv: PropTypes.bool,\n embossed: PropTypes.bool\n}\n\n// properties that match media queries\nconst matchers = {\n orientation: PropTypes.oneOf([\n 'portrait',\n 'landscape'\n ]),\n\n scan: PropTypes.oneOf([\n 'progressive',\n 'interlace'\n ]),\n\n aspectRatio: PropTypes.string,\n deviceAspectRatio: PropTypes.string,\n\n height: stringOrNumber,\n deviceHeight: stringOrNumber,\n\n width: stringOrNumber,\n deviceWidth: stringOrNumber,\n\n color: PropTypes.bool,\n\n colorIndex: PropTypes.bool,\n\n monochrome: PropTypes.bool,\n resolution: stringOrNumber,\n type: Object.keys(types)\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst { type, ...featureMatchers } = matchers\n\n// media features\nconst features = {\n minAspectRatio: PropTypes.string,\n maxAspectRatio: PropTypes.string,\n minDeviceAspectRatio: PropTypes.string,\n maxDeviceAspectRatio: PropTypes.string,\n\n minHeight: stringOrNumber,\n maxHeight: stringOrNumber,\n minDeviceHeight: stringOrNumber,\n maxDeviceHeight: stringOrNumber,\n\n minWidth: stringOrNumber,\n maxWidth: stringOrNumber,\n minDeviceWidth: stringOrNumber,\n maxDeviceWidth: stringOrNumber,\n\n minColor: PropTypes.number,\n maxColor: PropTypes.number,\n\n minColorIndex: PropTypes.number,\n maxColorIndex: PropTypes.number,\n\n minMonochrome: PropTypes.number,\n maxMonochrome: PropTypes.number,\n\n minResolution: stringOrNumber,\n maxResolution: stringOrNumber,\n\n ...featureMatchers\n}\n\nconst all = { ...types, ...features }\n\nexport default {\n all: all,\n types: types,\n matchers: matchers,\n features: features\n}\n","import hyphenate from 'hyphenate-style-name'\nimport mq from './mediaQuery'\nimport { MediaQueryAllQueryable } from './types'\n\nconst negate = (cond: string) => `not ${cond}`\n\nconst keyVal = (k: string, v: unknown): string => {\n const realKey = hyphenate(k)\n\n // px shorthand\n if (typeof v === 'number') {\n v = `${v}px`\n }\n if (v === true) {\n return realKey\n }\n if (v === false) {\n return negate(realKey)\n }\n return `(${realKey}: ${v})`\n}\n\nconst join = (conds: string[]): string => conds.join(' and ')\n\nconst toQuery = (obj: Partial): string => {\n const rules: string[] = []\n Object.keys(mq.all).forEach((k) => {\n const v = obj[k as keyof MediaQueryAllQueryable]\n if (v != null) {\n rules.push(keyVal(k, v))\n }\n })\n return join(rules)\n}\n\nexport default toQuery\n","import { useRef, useEffect, useContext, useState } from 'react'\nimport matchMedia from 'matchmediaquery'\nimport hyphenate from 'hyphenate-style-name'\nimport { shallowEqualObjects } from 'shallow-equal'\nimport toQuery from './toQuery'\nimport Context from './Context'\nimport { MediaQueryAllQueryable, MediaQueryMatchers } from './types'\n\ntype MediaQuerySettings = Partial\ntype HyphenateKeyTypes = MediaQueryMatchers | MediaQueryAllQueryable;\n\nconst makeQuery = (settings: MediaQuerySettings) => settings.query || toQuery(settings)\n\nconst hyphenateKeys = (obj?: HyphenateKeyTypes) => {\n type K = keyof HyphenateKeyTypes;\n\n if (!obj) return undefined\n const keys = Object.keys(obj) as K[]\n\n return keys.reduce((result, key) => {\n result[hyphenate(key)] = obj[key]\n return result\n }, {} as Record)\n}\n\nconst useIsUpdate = () => {\n const ref = useRef(false)\n\n useEffect(() => {\n ref.current = true\n }, [])\n\n return ref.current\n}\n\nconst useDevice = (deviceFromProps?: MediaQueryMatchers): Partial | undefined => {\n const deviceFromContext = useContext(Context)\n const getDevice = () =>\n hyphenateKeys(deviceFromProps) || hyphenateKeys(deviceFromContext)\n const [ device, setDevice ] = useState(getDevice)\n\n useEffect(() => {\n const newDevice = getDevice()\n if (!shallowEqualObjects(device, newDevice)) {\n setDevice(newDevice)\n }\n }, [ deviceFromProps, deviceFromContext ])\n\n return device\n}\n\nconst useQuery = (settings: MediaQuerySettings) => {\n const getQuery = () => makeQuery(settings)\n const [ query, setQuery ] = useState(getQuery)\n\n useEffect(() => {\n const newQuery = getQuery()\n if (query !== newQuery) {\n setQuery(newQuery)\n }\n }, [ settings ])\n\n return query\n}\n\nconst useMatchMedia = (query: string, device?: MediaQueryMatchers) => {\n const getMatchMedia = () => matchMedia(query, device || {}, !!device)\n const [ mq, setMq ] = useState(getMatchMedia)\n const isUpdate = useIsUpdate()\n\n useEffect(() => {\n if (isUpdate) {\n // skip on mounting, it has already been set\n const newMq = getMatchMedia()\n setMq(newMq)\n\n return () => {\n if (newMq) {\n newMq.dispose()\n }\n }\n }\n }, [ query, device ])\n\n return mq\n}\n\nconst useMatches = (mediaQuery: MediaQueryList): boolean => {\n const [ matches, setMatches ] = useState(mediaQuery.matches)\n\n useEffect(() => {\n const updateMatches = (ev: MediaQueryListEvent) => {\n setMatches(ev.matches)\n }\n mediaQuery.addListener(updateMatches)\n setMatches(mediaQuery.matches)\n\n return () => {\n mediaQuery.removeListener(updateMatches)\n }\n }, [ mediaQuery ])\n\n return matches\n}\n\nconst useMediaQuery = (settings: MediaQuerySettings, device?: MediaQueryMatchers, onChange?: (_: boolean) => void) => {\n const deviceSettings = useDevice(device)\n const query = useQuery(settings)\n if (!query) throw new Error('Invalid or missing MediaQuery!')\n const mq = useMatchMedia(query, deviceSettings)\n const matches = useMatches(mq as unknown as MediaQueryList)\n const isUpdate = useIsUpdate()\n\n useEffect(() => {\n if (isUpdate && onChange) {\n onChange(matches)\n }\n }, [ matches ])\n\n useEffect(() => () => {\n if (mq) {\n mq.dispose()\n }\n }, [])\n\n return matches\n}\n\nexport default useMediaQuery\n","module.exports = __WEBPACK_EXTERNAL_MODULE__359__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(607);\n"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE__359__","mediaQuery","values","split","map","query","captures","trim","match","RE_MEDIA_QUERY","modifier","type","expressions","parsed","inverse","toLowerCase","expression","RE_MQ_EXPRESSION","feature","RE_MQ_FEATURE","value","parseQuery","some","typeMatch","expressionsMatch","every","expValue","toPx","toDpi","toDecimal","parseInt","RE_LENGTH_UNIT","RE_RESOLUTION_UNIT","ratio","numbers","decimal","Number","resolution","parseFloat","String","length","uppercasePattern","msPattern","cache","toHyphenLower","name","hasOwnProperty","hName","replace","test","staticMatch","dynamicMatch","window","matchMedia","Mql","forceStatic","self","mql","call","matches","media","addListener","update","evt","listener","removeListener","dispose","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","shallowEqualObjects","objA","objB","aKeys","Object","keys","bKeys","len","i","key","prototype","shallowEqualArrays","arrA","arrB","children","device","onChange","settings","Context","createContext","undefined","useMediaQuery","toQuery","stringOrNumber","types","all","grid","aural","braille","handheld","print","projection","screen","tty","tv","embossed","matchers","orientation","scan","aspectRatio","deviceAspectRatio","height","deviceHeight","width","deviceWidth","color","colorIndex","monochrome","featureMatchers","features","minAspectRatio","maxAspectRatio","minDeviceAspectRatio","maxDeviceAspectRatio","minHeight","maxHeight","minDeviceHeight","maxDeviceHeight","minWidth","maxWidth","minDeviceWidth","maxDeviceWidth","minColor","maxColor","minColorIndex","maxColorIndex","minMonochrome","maxMonochrome","minResolution","maxResolution","obj","rules","forEach","k","v","push","realKey","keyVal","join","hyphenateKeys","reduce","result","useIsUpdate","ref","useRef","useEffect","current","deviceSettings","deviceFromProps","deviceFromContext","useContext","getDevice","useState","setDevice","newDevice","useDevice","getQuery","makeQuery","setQuery","newQuery","useQuery","mq","getMatchMedia","setMq","isUpdate","useMatchMedia","setMatches","updateMatches","ev","useMatches","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","o","defineProperty","enumerable","get","prop","r","Symbol","toStringTag"],"sourceRoot":""} \ No newline at end of file diff --git a/package.json b/package.json index f7a02ec..778d03a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-responsive", "description": "Media queries in react for responsive design", - "version": "9.0.0-beta.10", + "version": "9.0.0", "homepage": "http://github.com/contra/react-responsive", "repository": { "type": "git", @@ -42,7 +42,7 @@ "devDependencies": { "@types/chai": "^4.3.1", "@types/hyphenate-style-name": "^1.0.0", - "@types/jsdom": "^16.2.6", + "@types/jsdom": "^20.0.0", "@types/match-media-mock": "^0.1.5", "@types/matchmediaquery": "^0.3.0", "@types/mocha": "^9.0.0", @@ -56,7 +56,7 @@ "eslint": "^8.13.0", "eslint-plugin-compat": "^4.0.2", "gh-pages": "^4.0.0", - "jsdom": "^19.0.0", + "jsdom": "^20.0.0", "match-media-mock": "^0.1.1", "mocha": "^10.0.0", "react": "^18.0.0", @@ -65,8 +65,8 @@ "sinon": "^14.0.0", "ts-loader": "^9.2.8", "ts-node": "^10.0.0", - "typedoc": "^0.22.15", - "typescript": "^4.6.3", + "typedoc": "^0.23.14", + "typescript": "^4.8.3", "webpack": "^5.72.0", "webpack-cli": "^4.9.2" }, diff --git a/types/mediaQuery.d.ts b/types/mediaQuery.d.ts index a454d5f..03ffd0a 100644 --- a/types/mediaQuery.d.ts +++ b/types/mediaQuery.d.ts @@ -5,34 +5,34 @@ declare const _default: { scan: PropTypes.Requireable; aspectRatio: PropTypes.Requireable; deviceAspectRatio: PropTypes.Requireable; - height: PropTypes.Requireable; - deviceHeight: PropTypes.Requireable; - width: PropTypes.Requireable; - deviceWidth: PropTypes.Requireable; + height: PropTypes.Requireable>; + deviceHeight: PropTypes.Requireable>; + width: PropTypes.Requireable>; + deviceWidth: PropTypes.Requireable>; color: PropTypes.Requireable; colorIndex: PropTypes.Requireable; monochrome: PropTypes.Requireable; - resolution: PropTypes.Requireable; + resolution: PropTypes.Requireable>; minAspectRatio: PropTypes.Requireable; maxAspectRatio: PropTypes.Requireable; minDeviceAspectRatio: PropTypes.Requireable; maxDeviceAspectRatio: PropTypes.Requireable; - minHeight: PropTypes.Requireable; - maxHeight: PropTypes.Requireable; - minDeviceHeight: PropTypes.Requireable; - maxDeviceHeight: PropTypes.Requireable; - minWidth: PropTypes.Requireable; - maxWidth: PropTypes.Requireable; - minDeviceWidth: PropTypes.Requireable; - maxDeviceWidth: PropTypes.Requireable; + minHeight: PropTypes.Requireable>; + maxHeight: PropTypes.Requireable>; + minDeviceHeight: PropTypes.Requireable>; + maxDeviceHeight: PropTypes.Requireable>; + minWidth: PropTypes.Requireable>; + maxWidth: PropTypes.Requireable>; + minDeviceWidth: PropTypes.Requireable>; + maxDeviceWidth: PropTypes.Requireable>; minColor: PropTypes.Requireable; maxColor: PropTypes.Requireable; minColorIndex: PropTypes.Requireable; maxColorIndex: PropTypes.Requireable; minMonochrome: PropTypes.Requireable; maxMonochrome: PropTypes.Requireable; - minResolution: PropTypes.Requireable; - maxResolution: PropTypes.Requireable; + minResolution: PropTypes.Requireable>; + maxResolution: PropTypes.Requireable>; all: PropTypes.Requireable; grid: PropTypes.Requireable; aural: PropTypes.Requireable; @@ -63,14 +63,14 @@ declare const _default: { scan: PropTypes.Requireable; aspectRatio: PropTypes.Requireable; deviceAspectRatio: PropTypes.Requireable; - height: PropTypes.Requireable; - deviceHeight: PropTypes.Requireable; - width: PropTypes.Requireable; - deviceWidth: PropTypes.Requireable; + height: PropTypes.Requireable>; + deviceHeight: PropTypes.Requireable>; + width: PropTypes.Requireable>; + deviceWidth: PropTypes.Requireable>; color: PropTypes.Requireable; colorIndex: PropTypes.Requireable; monochrome: PropTypes.Requireable; - resolution: PropTypes.Requireable; + resolution: PropTypes.Requireable>; type: string[]; }; features: { @@ -78,34 +78,34 @@ declare const _default: { scan: PropTypes.Requireable; aspectRatio: PropTypes.Requireable; deviceAspectRatio: PropTypes.Requireable; - height: PropTypes.Requireable; - deviceHeight: PropTypes.Requireable; - width: PropTypes.Requireable; - deviceWidth: PropTypes.Requireable; + height: PropTypes.Requireable>; + deviceHeight: PropTypes.Requireable>; + width: PropTypes.Requireable>; + deviceWidth: PropTypes.Requireable>; color: PropTypes.Requireable; colorIndex: PropTypes.Requireable; monochrome: PropTypes.Requireable; - resolution: PropTypes.Requireable; + resolution: PropTypes.Requireable>; minAspectRatio: PropTypes.Requireable; maxAspectRatio: PropTypes.Requireable; minDeviceAspectRatio: PropTypes.Requireable; maxDeviceAspectRatio: PropTypes.Requireable; - minHeight: PropTypes.Requireable; - maxHeight: PropTypes.Requireable; - minDeviceHeight: PropTypes.Requireable; - maxDeviceHeight: PropTypes.Requireable; - minWidth: PropTypes.Requireable; - maxWidth: PropTypes.Requireable; - minDeviceWidth: PropTypes.Requireable; - maxDeviceWidth: PropTypes.Requireable; + minHeight: PropTypes.Requireable>; + maxHeight: PropTypes.Requireable>; + minDeviceHeight: PropTypes.Requireable>; + maxDeviceHeight: PropTypes.Requireable>; + minWidth: PropTypes.Requireable>; + maxWidth: PropTypes.Requireable>; + minDeviceWidth: PropTypes.Requireable>; + maxDeviceWidth: PropTypes.Requireable>; minColor: PropTypes.Requireable; maxColor: PropTypes.Requireable; minColorIndex: PropTypes.Requireable; maxColorIndex: PropTypes.Requireable; minMonochrome: PropTypes.Requireable; maxMonochrome: PropTypes.Requireable; - minResolution: PropTypes.Requireable; - maxResolution: PropTypes.Requireable; + minResolution: PropTypes.Requireable>; + maxResolution: PropTypes.Requireable>; }; }; export default _default;