@clubmed/trident-ui 1.3.0-beta.1 → 1.3.0-beta.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/CHANGELOG.md +956 -862
- package/README.md +11 -1
- package/assets/style.css +1 -1
- package/atoms/Clickable/Clickable.d.ts +5 -0
- package/atoms/Clickable/Clickable.js +25 -0
- package/atoms/Clickable/Clickable.js.map +1 -0
- package/atoms/Heading/Heading.d.ts +6 -0
- package/atoms/Heading/Heading.js +14 -0
- package/atoms/Heading/Heading.js.map +1 -0
- package/atoms/Heading/HeadingGroup.d.ts +7 -0
- package/atoms/Heading/HeadingGroup.js +15 -0
- package/atoms/Heading/HeadingGroup.js.map +1 -0
- package/atoms/Image/Image.d.ts +7 -0
- package/atoms/Image/Image.js +18 -0
- package/atoms/Image/Image.js.map +1 -0
- package/atoms/Prose/Prose.d.ts +5 -0
- package/atoms/Prose/Prose.js +18 -0
- package/atoms/Prose/Prose.js.map +1 -0
- package/chunks/ResizeObserver.js +287 -0
- package/chunks/ResizeObserver.js.map +1 -0
- package/chunks/_commonjsHelpers.js +24 -4
- package/chunks/_commonjsHelpers.js.map +1 -1
- package/chunks/index.js.map +1 -1
- package/chunks/plugin.js +53 -0
- package/chunks/plugin.js.map +1 -0
- package/contexts/Device.d.ts +2 -22
- package/contexts/Device.js +5 -59
- package/contexts/Device.js.map +1 -1
- package/contexts/Devices/Device.d.ts +11 -0
- package/contexts/Devices/Device.js +23 -0
- package/contexts/Devices/Device.js.map +1 -0
- package/contexts/Devices/hooks/useQueries.d.ts +6 -0
- package/contexts/Devices/hooks/useQueries.js +24 -0
- package/contexts/Devices/hooks/useQueries.js.map +1 -0
- package/contexts/Devices/reducers/reducer.d.ts +25 -0
- package/contexts/Devices/reducers/reducer.js +50 -0
- package/contexts/Devices/reducers/reducer.js.map +1 -0
- package/contexts/TridentUIConfig.js +228 -228
- package/contexts/TridentUIConfig.js.map +1 -1
- package/helpers/colors/colors.d.ts +108 -0
- package/helpers/colors/colors.js +132 -0
- package/helpers/colors/colors.js.map +1 -0
- package/hooks/keyboard.constants.js.map +1 -1
- package/hooks/useInternalStatus.js.map +1 -1
- package/hooks/useKeyboardControls.js.map +1 -1
- package/hooks/useResizeObserver.d.ts +2 -0
- package/hooks/useResizeObserver.js +84 -0
- package/hooks/useResizeObserver.js.map +1 -0
- package/hooks/useSafeBoop.js.map +1 -1
- package/hooks/useValue.js.map +1 -1
- package/molecules/Arrows/Arrows.d.ts +16 -0
- package/molecules/Arrows/Arrows.js +66 -0
- package/molecules/Arrows/Arrows.js.map +1 -0
- package/molecules/Arrows/ArrowsLabels.d.js +2 -0
- package/molecules/Arrows/ArrowsLabels.d.js.map +1 -0
- package/molecules/Arrows.d.ts +1 -50
- package/molecules/Arrows.js +2 -56
- package/molecules/Arrows.js.map +1 -1
- package/molecules/Avatar.js.map +1 -1
- package/molecules/Backdrop.js.map +1 -1
- package/molecules/Breadcrumb.js +8 -9
- package/molecules/Breadcrumb.js.map +1 -1
- package/molecules/Buttons/ArrowButton.d.ts +7 -0
- package/molecules/Buttons/ArrowButton.js +14 -0
- package/molecules/Buttons/ArrowButton.js.map +1 -0
- package/molecules/Buttons/Button.d.ts +15 -32
- package/molecules/Buttons/Button.js +52 -42
- package/molecules/Buttons/Button.js.map +1 -1
- package/molecules/Buttons/ButtonAnchor.d.ts +7 -3
- package/molecules/Buttons/ButtonAnchor.js +17 -36
- package/molecules/Buttons/ButtonAnchor.js.map +1 -1
- package/molecules/Buttons/ButtonContent.d.ts +12 -4
- package/molecules/Buttons/ButtonContent.js +14 -8
- package/molecules/Buttons/ButtonContent.js.map +1 -1
- package/molecules/Buttons/FakeButton.d.ts +8 -0
- package/molecules/Buttons/FakeButton.js +8 -0
- package/molecules/Buttons/FakeButton.js.map +1 -0
- package/molecules/Buttons/InertButton.d.ts +4 -0
- package/molecules/Buttons/InertButton.js +15 -31
- package/molecules/Buttons/InertButton.js.map +1 -1
- package/molecules/Buttons/v2/Button.d.ts +2289 -0
- package/molecules/Buttons/v2/Button.js +57 -0
- package/molecules/Buttons/v2/Button.js.map +1 -0
- package/molecules/Buttons/v2/Button.type.d.ts +57 -0
- package/molecules/Buttons/v2/Button.type.js +45 -0
- package/molecules/Buttons/v2/Button.type.js.map +1 -0
- package/molecules/Card.d.ts +1 -11
- package/molecules/Card.js +2 -35
- package/molecules/Card.js.map +1 -1
- package/molecules/Cards/Card.d.ts +13 -0
- package/molecules/Cards/Card.js +22 -0
- package/molecules/Cards/Card.js.map +1 -0
- package/molecules/Cards/CardAspectRatios.d.ts +6 -0
- package/molecules/Cards/CardAspectRatios.js +10 -0
- package/molecules/Cards/CardAspectRatios.js.map +1 -0
- package/molecules/Cards/CardBackground.d.ts +4 -0
- package/molecules/Cards/CardBackground.js +30 -0
- package/molecules/Cards/CardBackground.js.map +1 -0
- package/molecules/Cards/CardBackgroundContext.d.ts +6 -0
- package/molecules/Cards/CardBackgroundContext.js +10 -0
- package/molecules/Cards/CardBackgroundContext.js.map +1 -0
- package/molecules/Cards/CardClickable.d.ts +6 -0
- package/molecules/Cards/CardClickable.js +37 -0
- package/molecules/Cards/CardClickable.js.map +1 -0
- package/molecules/Cards/ExpandableCard.d.ts +14 -0
- package/molecules/Cards/ExpandableCard.js +80 -0
- package/molecules/Cards/ExpandableCard.js.map +1 -0
- package/molecules/Cards/v2/Card.d.ts +15 -0
- package/molecules/Cards/v2/Card.js +34 -0
- package/molecules/Cards/v2/Card.js.map +1 -0
- package/molecules/Chip.d.ts +9 -0
- package/molecules/Chip.js +31 -0
- package/molecules/Chip.js.map +1 -0
- package/molecules/Chip.themes.d.ts +12 -0
- package/molecules/Chip.themes.js +24 -0
- package/molecules/Chip.themes.js.map +1 -0
- package/molecules/ElasticHeight.d.ts +6 -27
- package/molecules/ElasticHeight.js +28 -33
- package/molecules/ElasticHeight.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkbox.js +12 -13
- package/molecules/Forms/Checkboxes/Checkbox.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkboxes.js.map +1 -1
- package/molecules/Forms/DateField.d.ts +1 -1
- package/molecules/Forms/DateField.js +142 -116
- package/molecules/Forms/DateField.js.map +1 -1
- package/molecules/Forms/Filter.js +12 -13
- package/molecules/Forms/Filter.js.map +1 -1
- package/molecules/Forms/FormControl.js +15 -16
- package/molecules/Forms/FormControl.js.map +1 -1
- package/molecules/Forms/FormLabel.js.map +1 -1
- package/molecules/Forms/NumberField.d.ts +28 -28
- package/molecules/Forms/NumberField.js +68 -68
- package/molecules/Forms/NumberField.js.map +1 -1
- package/molecules/Forms/Password/Password.js +10 -11
- package/molecules/Forms/Password/Password.js.map +1 -1
- package/molecules/Forms/Password/ValidationMessage.js +8 -9
- package/molecules/Forms/Password/ValidationMessage.js.map +1 -1
- package/molecules/Forms/Radios/Radio.js.map +1 -1
- package/molecules/Forms/Radios/RadioGroup.js +2 -2
- package/molecules/Forms/Radios/RadioGroup.js.map +1 -1
- package/molecules/Forms/Range.js +124 -406
- package/molecules/Forms/Range.js.map +1 -1
- package/molecules/Forms/Select.d.ts +1 -1
- package/molecules/Forms/Select.js +3 -4
- package/molecules/Forms/Select.js.map +1 -1
- package/molecules/Forms/Switch.js.map +1 -1
- package/molecules/Forms/TextField.d.ts +1 -1
- package/molecules/Forms/TextField.js +7 -8
- package/molecules/Forms/TextField.js.map +1 -1
- package/molecules/HamburgerIcon.js.map +1 -1
- package/molecules/Link.d.ts +1 -1
- package/molecules/Link.js +8 -9
- package/molecules/Link.js.map +1 -1
- package/molecules/Loader.js.map +1 -1
- package/molecules/Pagination.d.ts +2 -1
- package/molecules/Pagination.helper.js.map +1 -1
- package/molecules/Pagination.js +67 -45
- package/molecules/Pagination.js.map +1 -1
- package/molecules/Popin.js +16 -16
- package/molecules/Popin.js.map +1 -1
- package/molecules/Spinner.js.map +1 -1
- package/molecules/Tabs/Tab.d.ts +1 -1
- package/molecules/Tabs/Tab.js +51 -49
- package/molecules/Tabs/Tab.js.map +1 -1
- package/molecules/Tabs/TabList.js.map +1 -1
- package/molecules/Tabs/TabPanel.js +31 -29
- package/molecules/Tabs/TabPanel.js.map +1 -1
- package/molecules/Tabs/Tabs.js +7 -9
- package/molecules/Tabs/Tabs.js.map +1 -1
- package/molecules/Tabs/TabsBody.js.map +1 -1
- package/molecules/Tabs/context/TabControl.d.ts +29 -27
- package/molecules/Tabs/context/TabControl.js +67 -66
- package/molecules/Tabs/context/TabControl.js.map +1 -1
- package/molecules/Tabs/hooks/tabControl.d.ts +25 -14
- package/molecules/Tabs/hooks/tabControl.js +26 -23
- package/molecules/Tabs/hooks/tabControl.js.map +1 -1
- package/molecules/Tabs/theme.js.map +1 -1
- package/molecules/Tag.d.ts +43 -0
- package/molecules/Tag.js +73 -0
- package/molecules/Tag.js.map +1 -0
- package/package.json +29 -5
- package/styles/globals.css +16 -15
- package/tailwind/colors.d.ts +38 -0
- package/tailwind/colors.js +44 -0
- package/tailwind/colors.js.map +1 -0
- package/tailwind/plugins/animationDelay.d.ts +4 -0
- package/tailwind/plugins/animationDelay.js +15 -0
- package/tailwind/plugins/animationDelay.js.map +1 -0
- package/tailwind/plugins/hocus.d.ts +4 -0
- package/tailwind/plugins/hocus.js +11 -0
- package/tailwind/plugins/hocus.js.map +1 -0
- package/tailwind/plugins/lineClampFix.d.ts +4 -0
- package/tailwind/plugins/lineClampFix.js +13 -0
- package/tailwind/plugins/lineClampFix.js.map +1 -0
- package/tailwind/plugins/popover.d.ts +4 -0
- package/tailwind/plugins/popover.js +8 -0
- package/tailwind/plugins/popover.js.map +1 -0
- package/tailwind/plugins/startingStyle.d.ts +4 -0
- package/tailwind/plugins/startingStyle.js +8 -0
- package/tailwind/plugins/startingStyle.js.map +1 -0
- package/tailwind/plugins/transitionBehavior.d.ts +4 -0
- package/tailwind/plugins/transitionBehavior.js +11 -0
- package/tailwind/plugins/transitionBehavior.js.map +1 -0
- package/tailwind/tailwind.preset.d.ts +730 -510
- package/tailwind/tailwind.preset.js +705 -631
- package/tailwind/tailwind.preset.js.map +1 -1
- package/types/Colors.d.js +2 -0
- package/types/Colors.d.js.map +1 -0
- package/types/Devices.d.ts +8 -0
- package/types/Devices.js +11 -0
- package/types/Devices.js.map +1 -0
- package/types/Direction.d.js +2 -0
- package/types/Direction.d.js.map +1 -0
- package/types/LiteralUnion.d.js +2 -0
- package/types/LiteralUnion.d.js.map +1 -0
- package/types/ScrollerLabels.d.js +2 -0
- package/types/ScrollerLabels.d.js.map +1 -0
- package/types/Theme.d.js +2 -0
- package/types/Theme.d.js.map +1 -0
- package/molecules/Buttons/Button.helpers.d.ts +0 -8
- package/molecules/Buttons/Button.helpers.js +0 -12
- package/molecules/Buttons/Button.helpers.js.map +0 -1
- package/molecules/Buttons/Button.themes.d.ts +0 -1
- package/molecules/Buttons/Button.themes.js +0 -25
- package/molecules/Buttons/Button.themes.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizeObserver.js","sources":["../../node_modules/@juggle/resize-observer/lib/utils/resizeObservers.js","../../node_modules/@juggle/resize-observer/lib/algorithms/hasActiveObservations.js","../../node_modules/@juggle/resize-observer/lib/algorithms/hasSkippedObservations.js","../../node_modules/@juggle/resize-observer/lib/algorithms/deliverResizeLoopError.js","../../node_modules/@juggle/resize-observer/lib/ResizeObserverBoxOptions.js","../../node_modules/@juggle/resize-observer/lib/utils/freeze.js","../../node_modules/@juggle/resize-observer/lib/ResizeObserverSize.js","../../node_modules/@juggle/resize-observer/lib/DOMRectReadOnly.js","../../node_modules/@juggle/resize-observer/lib/utils/element.js","../../node_modules/@juggle/resize-observer/lib/utils/global.js","../../node_modules/@juggle/resize-observer/lib/algorithms/calculateBoxSize.js","../../node_modules/@juggle/resize-observer/lib/ResizeObserverEntry.js","../../node_modules/@juggle/resize-observer/lib/algorithms/calculateDepthForNode.js","../../node_modules/@juggle/resize-observer/lib/algorithms/broadcastActiveObservations.js","../../node_modules/@juggle/resize-observer/lib/algorithms/gatherActiveObservationsAtDepth.js","../../node_modules/@juggle/resize-observer/lib/utils/process.js","../../node_modules/@juggle/resize-observer/lib/utils/queueMicroTask.js","../../node_modules/@juggle/resize-observer/lib/utils/queueResizeObserver.js","../../node_modules/@juggle/resize-observer/lib/utils/scheduler.js","../../node_modules/@juggle/resize-observer/lib/ResizeObservation.js","../../node_modules/@juggle/resize-observer/lib/ResizeObserverDetail.js","../../node_modules/@juggle/resize-observer/lib/ResizeObserverController.js","../../node_modules/@juggle/resize-observer/lib/ResizeObserver.js"],"sourcesContent":["var resizeObservers = [];\nexport { resizeObservers };\n","import { resizeObservers } from '../utils/resizeObservers';\nvar hasActiveObservations = function () {\n return resizeObservers.some(function (ro) { return ro.activeTargets.length > 0; });\n};\nexport { hasActiveObservations };\n","import { resizeObservers } from '../utils/resizeObservers';\nvar hasSkippedObservations = function () {\n return resizeObservers.some(function (ro) { return ro.skippedTargets.length > 0; });\n};\nexport { hasSkippedObservations };\n","var msg = 'ResizeObserver loop completed with undelivered notifications.';\nvar deliverResizeLoopError = function () {\n var event;\n if (typeof ErrorEvent === 'function') {\n event = new ErrorEvent('error', {\n message: msg\n });\n }\n else {\n event = document.createEvent('Event');\n event.initEvent('error', false, false);\n event.message = msg;\n }\n window.dispatchEvent(event);\n};\nexport { deliverResizeLoopError };\n","var ResizeObserverBoxOptions;\n(function (ResizeObserverBoxOptions) {\n ResizeObserverBoxOptions[\"BORDER_BOX\"] = \"border-box\";\n ResizeObserverBoxOptions[\"CONTENT_BOX\"] = \"content-box\";\n ResizeObserverBoxOptions[\"DEVICE_PIXEL_CONTENT_BOX\"] = \"device-pixel-content-box\";\n})(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));\nexport { ResizeObserverBoxOptions };\n","export var freeze = function (obj) { return Object.freeze(obj); };\n","import { freeze } from './utils/freeze';\nvar ResizeObserverSize = (function () {\n function ResizeObserverSize(inlineSize, blockSize) {\n this.inlineSize = inlineSize;\n this.blockSize = blockSize;\n freeze(this);\n }\n return ResizeObserverSize;\n}());\nexport { ResizeObserverSize };\n","import { freeze } from './utils/freeze';\nvar DOMRectReadOnly = (function () {\n function DOMRectReadOnly(x, y, width, height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.top = this.y;\n this.left = this.x;\n this.bottom = this.top + this.height;\n this.right = this.left + this.width;\n return freeze(this);\n }\n DOMRectReadOnly.prototype.toJSON = function () {\n var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;\n return { x: x, y: y, top: top, right: right, bottom: bottom, left: left, width: width, height: height };\n };\n DOMRectReadOnly.fromRect = function (rectangle) {\n return new DOMRectReadOnly(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n };\n return DOMRectReadOnly;\n}());\nexport { DOMRectReadOnly };\n","var isSVG = function (target) { return target instanceof SVGElement && 'getBBox' in target; };\nvar isHidden = function (target) {\n if (isSVG(target)) {\n var _a = target.getBBox(), width = _a.width, height = _a.height;\n return !width && !height;\n }\n var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;\n return !(offsetWidth || offsetHeight || target.getClientRects().length);\n};\nvar isElement = function (obj) {\n var _a;\n if (obj instanceof Element) {\n return true;\n }\n var scope = (_a = obj === null || obj === void 0 ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;\n return !!(scope && obj instanceof scope.Element);\n};\nvar isReplacedElement = function (target) {\n switch (target.tagName) {\n case 'INPUT':\n if (target.type !== 'image') {\n break;\n }\n case 'VIDEO':\n case 'AUDIO':\n case 'EMBED':\n case 'OBJECT':\n case 'CANVAS':\n case 'IFRAME':\n case 'IMG':\n return true;\n }\n return false;\n};\nexport { isSVG, isHidden, isElement, isReplacedElement };\n","export var global = typeof window !== 'undefined' ? window : {};\n","import { ResizeObserverBoxOptions } from '../ResizeObserverBoxOptions';\nimport { ResizeObserverSize } from '../ResizeObserverSize';\nimport { DOMRectReadOnly } from '../DOMRectReadOnly';\nimport { isSVG, isHidden } from '../utils/element';\nimport { freeze } from '../utils/freeze';\nimport { global } from '../utils/global';\nvar cache = new WeakMap();\nvar scrollRegexp = /auto|scroll/;\nvar verticalRegexp = /^tb|vertical/;\nvar IE = (/msie|trident/i).test(global.navigator && global.navigator.userAgent);\nvar parseDimension = function (pixel) { return parseFloat(pixel || '0'); };\nvar size = function (inlineSize, blockSize, switchSizes) {\n if (inlineSize === void 0) { inlineSize = 0; }\n if (blockSize === void 0) { blockSize = 0; }\n if (switchSizes === void 0) { switchSizes = false; }\n return new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);\n};\nvar zeroBoxes = freeze({\n devicePixelContentBoxSize: size(),\n borderBoxSize: size(),\n contentBoxSize: size(),\n contentRect: new DOMRectReadOnly(0, 0, 0, 0)\n});\nvar calculateBoxSizes = function (target, forceRecalculation) {\n if (forceRecalculation === void 0) { forceRecalculation = false; }\n if (cache.has(target) && !forceRecalculation) {\n return cache.get(target);\n }\n if (isHidden(target)) {\n cache.set(target, zeroBoxes);\n return zeroBoxes;\n }\n var cs = getComputedStyle(target);\n var svg = isSVG(target) && target.ownerSVGElement && target.getBBox();\n var removePadding = !IE && cs.boxSizing === 'border-box';\n var switchSizes = verticalRegexp.test(cs.writingMode || '');\n var canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || '');\n var canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || '');\n var paddingTop = svg ? 0 : parseDimension(cs.paddingTop);\n var paddingRight = svg ? 0 : parseDimension(cs.paddingRight);\n var paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom);\n var paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft);\n var borderTop = svg ? 0 : parseDimension(cs.borderTopWidth);\n var borderRight = svg ? 0 : parseDimension(cs.borderRightWidth);\n var borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth);\n var borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth);\n var horizontalPadding = paddingLeft + paddingRight;\n var verticalPadding = paddingTop + paddingBottom;\n var horizontalBorderArea = borderLeft + borderRight;\n var verticalBorderArea = borderTop + borderBottom;\n var horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight;\n var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;\n var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;\n var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;\n var contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;\n var contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;\n var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;\n var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;\n var boxes = freeze({\n devicePixelContentBoxSize: size(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),\n borderBoxSize: size(borderBoxWidth, borderBoxHeight, switchSizes),\n contentBoxSize: size(contentWidth, contentHeight, switchSizes),\n contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)\n });\n cache.set(target, boxes);\n return boxes;\n};\nvar calculateBoxSize = function (target, observedBox, forceRecalculation) {\n var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;\n switch (observedBox) {\n case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:\n return devicePixelContentBoxSize;\n case ResizeObserverBoxOptions.BORDER_BOX:\n return borderBoxSize;\n default:\n return contentBoxSize;\n }\n};\nexport { calculateBoxSize, calculateBoxSizes };\n","import { calculateBoxSizes } from './algorithms/calculateBoxSize';\nimport { freeze } from './utils/freeze';\nvar ResizeObserverEntry = (function () {\n function ResizeObserverEntry(target) {\n var boxes = calculateBoxSizes(target);\n this.target = target;\n this.contentRect = boxes.contentRect;\n this.borderBoxSize = freeze([boxes.borderBoxSize]);\n this.contentBoxSize = freeze([boxes.contentBoxSize]);\n this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);\n }\n return ResizeObserverEntry;\n}());\nexport { ResizeObserverEntry };\n","import { isHidden } from '../utils/element';\nvar calculateDepthForNode = function (node) {\n if (isHidden(node)) {\n return Infinity;\n }\n var depth = 0;\n var parent = node.parentNode;\n while (parent) {\n depth += 1;\n parent = parent.parentNode;\n }\n return depth;\n};\nexport { calculateDepthForNode };\n","import { resizeObservers } from '../utils/resizeObservers';\nimport { ResizeObserverEntry } from '../ResizeObserverEntry';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nimport { calculateBoxSize } from './calculateBoxSize';\nvar broadcastActiveObservations = function () {\n var shallowestDepth = Infinity;\n var callbacks = [];\n resizeObservers.forEach(function processObserver(ro) {\n if (ro.activeTargets.length === 0) {\n return;\n }\n var entries = [];\n ro.activeTargets.forEach(function processTarget(ot) {\n var entry = new ResizeObserverEntry(ot.target);\n var targetDepth = calculateDepthForNode(ot.target);\n entries.push(entry);\n ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox);\n if (targetDepth < shallowestDepth) {\n shallowestDepth = targetDepth;\n }\n });\n callbacks.push(function resizeObserverCallback() {\n ro.callback.call(ro.observer, entries, ro.observer);\n });\n ro.activeTargets.splice(0, ro.activeTargets.length);\n });\n for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {\n var callback = callbacks_1[_i];\n callback();\n }\n return shallowestDepth;\n};\nexport { broadcastActiveObservations };\n","import { resizeObservers } from '../utils/resizeObservers';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nvar gatherActiveObservationsAtDepth = function (depth) {\n resizeObservers.forEach(function processObserver(ro) {\n ro.activeTargets.splice(0, ro.activeTargets.length);\n ro.skippedTargets.splice(0, ro.skippedTargets.length);\n ro.observationTargets.forEach(function processTarget(ot) {\n if (ot.isActive()) {\n if (calculateDepthForNode(ot.target) > depth) {\n ro.activeTargets.push(ot);\n }\n else {\n ro.skippedTargets.push(ot);\n }\n }\n });\n });\n};\nexport { gatherActiveObservationsAtDepth };\n","import { hasActiveObservations } from '../algorithms/hasActiveObservations';\nimport { hasSkippedObservations } from '../algorithms/hasSkippedObservations';\nimport { deliverResizeLoopError } from '../algorithms/deliverResizeLoopError';\nimport { broadcastActiveObservations } from '../algorithms/broadcastActiveObservations';\nimport { gatherActiveObservationsAtDepth } from '../algorithms/gatherActiveObservationsAtDepth';\nvar process = function () {\n var depth = 0;\n gatherActiveObservationsAtDepth(depth);\n while (hasActiveObservations()) {\n depth = broadcastActiveObservations();\n gatherActiveObservationsAtDepth(depth);\n }\n if (hasSkippedObservations()) {\n deliverResizeLoopError();\n }\n return depth > 0;\n};\nexport { process };\n","var trigger;\nvar callbacks = [];\nvar notify = function () { return callbacks.splice(0).forEach(function (cb) { return cb(); }); };\nvar queueMicroTask = function (callback) {\n if (!trigger) {\n var toggle_1 = 0;\n var el_1 = document.createTextNode('');\n var config = { characterData: true };\n new MutationObserver(function () { return notify(); }).observe(el_1, config);\n trigger = function () { el_1.textContent = \"\".concat(toggle_1 ? toggle_1-- : toggle_1++); };\n }\n callbacks.push(callback);\n trigger();\n};\nexport { queueMicroTask };\n","import { queueMicroTask } from './queueMicroTask';\nvar queueResizeObserver = function (cb) {\n queueMicroTask(function ResizeObserver() {\n requestAnimationFrame(cb);\n });\n};\nexport { queueResizeObserver };\n","import { process } from './process';\nimport { global } from './global';\nimport { queueResizeObserver } from './queueResizeObserver';\nvar watching = 0;\nvar isWatching = function () { return !!watching; };\nvar CATCH_PERIOD = 250;\nvar observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };\nvar events = [\n 'resize',\n 'load',\n 'transitionend',\n 'animationend',\n 'animationstart',\n 'animationiteration',\n 'keyup',\n 'keydown',\n 'mouseup',\n 'mousedown',\n 'mouseover',\n 'mouseout',\n 'blur',\n 'focus'\n];\nvar time = function (timeout) {\n if (timeout === void 0) { timeout = 0; }\n return Date.now() + timeout;\n};\nvar scheduled = false;\nvar Scheduler = (function () {\n function Scheduler() {\n var _this = this;\n this.stopped = true;\n this.listener = function () { return _this.schedule(); };\n }\n Scheduler.prototype.run = function (timeout) {\n var _this = this;\n if (timeout === void 0) { timeout = CATCH_PERIOD; }\n if (scheduled) {\n return;\n }\n scheduled = true;\n var until = time(timeout);\n queueResizeObserver(function () {\n var elementsHaveResized = false;\n try {\n elementsHaveResized = process();\n }\n finally {\n scheduled = false;\n timeout = until - time();\n if (!isWatching()) {\n return;\n }\n if (elementsHaveResized) {\n _this.run(1000);\n }\n else if (timeout > 0) {\n _this.run(timeout);\n }\n else {\n _this.start();\n }\n }\n });\n };\n Scheduler.prototype.schedule = function () {\n this.stop();\n this.run();\n };\n Scheduler.prototype.observe = function () {\n var _this = this;\n var cb = function () { return _this.observer && _this.observer.observe(document.body, observerConfig); };\n document.body ? cb() : global.addEventListener('DOMContentLoaded', cb);\n };\n Scheduler.prototype.start = function () {\n var _this = this;\n if (this.stopped) {\n this.stopped = false;\n this.observer = new MutationObserver(this.listener);\n this.observe();\n events.forEach(function (name) { return global.addEventListener(name, _this.listener, true); });\n }\n };\n Scheduler.prototype.stop = function () {\n var _this = this;\n if (!this.stopped) {\n this.observer && this.observer.disconnect();\n events.forEach(function (name) { return global.removeEventListener(name, _this.listener, true); });\n this.stopped = true;\n }\n };\n return Scheduler;\n}());\nvar scheduler = new Scheduler();\nvar updateCount = function (n) {\n !watching && n > 0 && scheduler.start();\n watching += n;\n !watching && scheduler.stop();\n};\nexport { scheduler, updateCount };\n","import { ResizeObserverBoxOptions } from './ResizeObserverBoxOptions';\nimport { calculateBoxSize } from './algorithms/calculateBoxSize';\nimport { isSVG, isReplacedElement } from './utils/element';\nvar skipNotifyOnElement = function (target) {\n return !isSVG(target)\n && !isReplacedElement(target)\n && getComputedStyle(target).display === 'inline';\n};\nvar ResizeObservation = (function () {\n function ResizeObservation(target, observedBox) {\n this.target = target;\n this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX;\n this.lastReportedSize = {\n inlineSize: 0,\n blockSize: 0\n };\n }\n ResizeObservation.prototype.isActive = function () {\n var size = calculateBoxSize(this.target, this.observedBox, true);\n if (skipNotifyOnElement(this.target)) {\n this.lastReportedSize = size;\n }\n if (this.lastReportedSize.inlineSize !== size.inlineSize\n || this.lastReportedSize.blockSize !== size.blockSize) {\n return true;\n }\n return false;\n };\n return ResizeObservation;\n}());\nexport { ResizeObservation };\n","var ResizeObserverDetail = (function () {\n function ResizeObserverDetail(resizeObserver, callback) {\n this.activeTargets = [];\n this.skippedTargets = [];\n this.observationTargets = [];\n this.observer = resizeObserver;\n this.callback = callback;\n }\n return ResizeObserverDetail;\n}());\nexport { ResizeObserverDetail };\n","import { scheduler, updateCount } from './utils/scheduler';\nimport { ResizeObservation } from './ResizeObservation';\nimport { ResizeObserverDetail } from './ResizeObserverDetail';\nimport { resizeObservers } from './utils/resizeObservers';\nvar observerMap = new WeakMap();\nvar getObservationIndex = function (observationTargets, target) {\n for (var i = 0; i < observationTargets.length; i += 1) {\n if (observationTargets[i].target === target) {\n return i;\n }\n }\n return -1;\n};\nvar ResizeObserverController = (function () {\n function ResizeObserverController() {\n }\n ResizeObserverController.connect = function (resizeObserver, callback) {\n var detail = new ResizeObserverDetail(resizeObserver, callback);\n observerMap.set(resizeObserver, detail);\n };\n ResizeObserverController.observe = function (resizeObserver, target, options) {\n var detail = observerMap.get(resizeObserver);\n var firstObservation = detail.observationTargets.length === 0;\n if (getObservationIndex(detail.observationTargets, target) < 0) {\n firstObservation && resizeObservers.push(detail);\n detail.observationTargets.push(new ResizeObservation(target, options && options.box));\n updateCount(1);\n scheduler.schedule();\n }\n };\n ResizeObserverController.unobserve = function (resizeObserver, target) {\n var detail = observerMap.get(resizeObserver);\n var index = getObservationIndex(detail.observationTargets, target);\n var lastObservation = detail.observationTargets.length === 1;\n if (index >= 0) {\n lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1);\n detail.observationTargets.splice(index, 1);\n updateCount(-1);\n }\n };\n ResizeObserverController.disconnect = function (resizeObserver) {\n var _this = this;\n var detail = observerMap.get(resizeObserver);\n detail.observationTargets.slice().forEach(function (ot) { return _this.unobserve(resizeObserver, ot.target); });\n detail.activeTargets.splice(0, detail.activeTargets.length);\n };\n return ResizeObserverController;\n}());\nexport { ResizeObserverController };\n","import { ResizeObserverController } from './ResizeObserverController';\nimport { isElement } from './utils/element';\nvar ResizeObserver = (function () {\n function ResizeObserver(callback) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (typeof callback !== 'function') {\n throw new TypeError(\"Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.\");\n }\n ResizeObserverController.connect(this, callback);\n }\n ResizeObserver.prototype.observe = function (target, options) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (!isElement(target)) {\n throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n }\n ResizeObserverController.observe(this, target, options);\n };\n ResizeObserver.prototype.unobserve = function (target) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (!isElement(target)) {\n throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n }\n ResizeObserverController.unobserve(this, target);\n };\n ResizeObserver.prototype.disconnect = function () {\n ResizeObserverController.disconnect(this);\n };\n ResizeObserver.toString = function () {\n return 'function ResizeObserver () { [polyfill code] }';\n };\n return ResizeObserver;\n}());\nexport { ResizeObserver };\n"],"names":["resizeObservers","hasActiveObservations","ro","hasSkippedObservations","msg","deliverResizeLoopError","event","ResizeObserverBoxOptions","freeze","obj","ResizeObserverSize","inlineSize","blockSize","DOMRectReadOnly","x","y","width","height","_a","top","right","bottom","left","rectangle","isSVG","target","isHidden","_b","offsetWidth","offsetHeight","isElement","scope","isReplacedElement","global","cache","scrollRegexp","verticalRegexp","IE","parseDimension","pixel","size","switchSizes","zeroBoxes","calculateBoxSizes","forceRecalculation","cs","svg","removePadding","canScrollVertically","canScrollHorizontally","paddingTop","paddingRight","paddingBottom","paddingLeft","borderTop","borderRight","borderBottom","borderLeft","horizontalPadding","verticalPadding","horizontalBorderArea","verticalBorderArea","horizontalScrollbarThickness","verticalScrollbarThickness","widthReduction","heightReduction","contentWidth","contentHeight","borderBoxWidth","borderBoxHeight","boxes","calculateBoxSize","observedBox","borderBoxSize","contentBoxSize","devicePixelContentBoxSize","ResizeObserverEntry","calculateDepthForNode","node","depth","parent","broadcastActiveObservations","shallowestDepth","callbacks","entries","ot","entry","targetDepth","_i","callbacks_1","callback","gatherActiveObservationsAtDepth","process","trigger","notify","cb","queueMicroTask","toggle_1","el_1","config","queueResizeObserver","watching","isWatching","CATCH_PERIOD","observerConfig","events","time","timeout","scheduled","Scheduler","_this","until","elementsHaveResized","name","scheduler","updateCount","n","skipNotifyOnElement","ResizeObservation","ResizeObserverDetail","resizeObserver","observerMap","getObservationIndex","observationTargets","i","ResizeObserverController","detail","options","firstObservation","index","lastObservation","ResizeObserver"],"mappings":"AAAA,IAAIA,IAAkB,CAAA,GCClBC,KAAwB,WAAY;AACpC,SAAOD,EAAgB,KAAK,SAAUE,GAAI;AAAE,WAAOA,EAAG,cAAc,SAAS;AAAA,EAAG,CAAC;AACrF,GCFIC,KAAyB,WAAY;AACrC,SAAOH,EAAgB,KAAK,SAAUE,GAAI;AAAE,WAAOA,EAAG,eAAe,SAAS;AAAA,EAAG,CAAC;AACtF,GCHIE,IAAM,iEACNC,KAAyB,WAAY;AACrC,MAAIC;AACJ,EAAI,OAAO,cAAe,aACtBA,IAAQ,IAAI,WAAW,SAAS;AAAA,IAC5B,SAASF;AAAA,EACrB,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ACAM,EAAe,WAAW,WAAY;AAClC,WAAO;AAAA,EACX,GACOA;AACX,EAAC;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]}
|
|
@@ -1,9 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
1
|
+
var u = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function f(e) {
|
|
3
3
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
4
|
}
|
|
5
|
+
function l(e) {
|
|
6
|
+
if (e.__esModule) return e;
|
|
7
|
+
var r = e.default;
|
|
8
|
+
if (typeof r == "function") {
|
|
9
|
+
var t = function o() {
|
|
10
|
+
return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
t.prototype = r.prototype;
|
|
13
|
+
} else t = {};
|
|
14
|
+
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
|
|
15
|
+
var n = Object.getOwnPropertyDescriptor(e, o);
|
|
16
|
+
Object.defineProperty(t, o, n.get ? n : {
|
|
17
|
+
enumerable: !0,
|
|
18
|
+
get: function() {
|
|
19
|
+
return e[o];
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}), t;
|
|
23
|
+
}
|
|
5
24
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
25
|
+
l as a,
|
|
26
|
+
u as c,
|
|
27
|
+
f as g
|
|
8
28
|
};
|
|
9
29
|
//# sourceMappingURL=_commonjsHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
package/chunks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../node_modules/classnames/index.js"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"],"names":["hasOwn","classNames","classes","i","arg","appendClass","parseValue","key","value","newClass","module"],"mappings":";;;;;;;;AAOA,GAAC,WAAY;AAGZ,QAAIA,IAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../node_modules/classnames/index.js"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"],"names":["hasOwn","classNames","classes","i","arg","appendClass","parseValue","key","value","newClass","module"],"mappings":";;;;;;;;AAOA,GAAC,WAAY;AAGZ,QAAIA,IAAS,CAAA,EAAG;AAEhB,aAASC,IAAc;AAGtB,eAFIC,IAAU,IAELC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AAC1C,YAAIC,IAAM,UAAUD,CAAC;AACrB,QAAIC,MACHF,IAAUG,EAAYH,GAASI,EAAWF,CAAG,CAAC;AAAA,MAElD;AAEE,aAAOF;AAAA,IACT;AAEC,aAASI,EAAYF,GAAK;AACzB,UAAI,OAAOA,KAAQ,YAAY,OAAOA,KAAQ;AAC7C,eAAOA;AAGR,UAAI,OAAOA,KAAQ;AAClB,eAAO;AAGR,UAAI,MAAM,QAAQA,CAAG;AACpB,eAAOH,EAAW,MAAM,MAAMG,CAAG;AAGlC,UAAIA,EAAI,aAAa,OAAO,UAAU,YAAY,CAACA,EAAI,SAAS,SAAQ,EAAG,SAAS,eAAe;AAClG,eAAOA,EAAI,SAAQ;AAGpB,UAAIF,IAAU;AAEd,eAASK,KAAOH;AACf,QAAIJ,EAAO,KAAKI,GAAKG,CAAG,KAAKH,EAAIG,CAAG,MACnCL,IAAUG,EAAYH,GAASK,CAAG;AAIpC,aAAOL;AAAA,IACT;AAEC,aAASG,EAAaG,GAAOC,GAAU;AACtC,aAAKA,IAIDD,IACIA,IAAQ,MAAMC,IAGfD,IAAQC,IAPPD;AAAA,IAQV;AAEC,IAAqCE,EAAO,WAC3CT,EAAW,UAAUA,GACrBS,EAAA,UAAiBT,KAOjB,OAAO,aAAaA;AAAA,EAEtB;;;;","x_google_ignoreList":[0]}
|
package/chunks/plugin.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { g as f } from "./_commonjsHelpers.js";
|
|
2
|
+
var a = {}, c = {};
|
|
3
|
+
(function(n) {
|
|
4
|
+
Object.defineProperty(n, "__esModule", {
|
|
5
|
+
value: !0
|
|
6
|
+
}), Object.defineProperty(n, "default", {
|
|
7
|
+
enumerable: !0,
|
|
8
|
+
get: function() {
|
|
9
|
+
return i;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
function u(t, e) {
|
|
13
|
+
return {
|
|
14
|
+
handler: t,
|
|
15
|
+
config: e
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
u.withOptions = function(t, e = () => ({})) {
|
|
19
|
+
const r = function(l) {
|
|
20
|
+
return {
|
|
21
|
+
__options: l,
|
|
22
|
+
handler: t(l),
|
|
23
|
+
config: e(l)
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
return r.__isOptionsFunction = !0, r.__pluginFunction = t, r.__configFunction = e, r;
|
|
27
|
+
};
|
|
28
|
+
const i = u;
|
|
29
|
+
})(c);
|
|
30
|
+
(function(n) {
|
|
31
|
+
Object.defineProperty(n, "__esModule", {
|
|
32
|
+
value: !0
|
|
33
|
+
}), Object.defineProperty(n, "default", {
|
|
34
|
+
enumerable: !0,
|
|
35
|
+
get: function() {
|
|
36
|
+
return t;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const u = /* @__PURE__ */ i(c);
|
|
40
|
+
function i(e) {
|
|
41
|
+
return e && e.__esModule ? e : {
|
|
42
|
+
default: e
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const t = u.default;
|
|
46
|
+
})(a);
|
|
47
|
+
let o = a;
|
|
48
|
+
var _ = (o.__esModule ? o : { default: o }).default;
|
|
49
|
+
const s = /* @__PURE__ */ f(_);
|
|
50
|
+
export {
|
|
51
|
+
s as p
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["../../node_modules/tailwindcss/lib/util/createPlugin.js","../../node_modules/tailwindcss/lib/public/create-plugin.js","../../node_modules/tailwindcss/plugin.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nfunction createPlugin(plugin, config) {\n return {\n handler: plugin,\n config\n };\n}\ncreatePlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {\n const optionsFunction = function(options) {\n return {\n __options: options,\n handler: pluginFunction(options),\n config: configFunction(options)\n };\n };\n optionsFunction.__isOptionsFunction = true;\n // Expose plugin dependencies so that `object-hash` returns a different\n // value if anything here changes, to ensure a rebuild is triggered.\n optionsFunction.__pluginFunction = pluginFunction;\n optionsFunction.__configFunction = configFunction;\n return optionsFunction;\n};\nconst _default = createPlugin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nconst _createPlugin = /*#__PURE__*/ _interop_require_default(require(\"../util/createPlugin\"));\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nconst _default = _createPlugin.default;\n","let createPlugin = require('./lib/public/create-plugin')\nmodule.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default\n"],"names":["exports","_default","createPlugin","plugin","config","pluginFunction","configFunction","optionsFunction","options","_createPlugin","_interop_require_default","require$$0","obj"],"mappings":";;;AACA,SAAO,eAAcA,GAAU,cAAc;AAAA,IACzC,OAAO;AAAA,EACX,CAAC,GACD,OAAO,eAAeA,GAAS,WAAW;AAAA,IACtC,YAAY;AAAA,IACZ,KAAK,WAAW;AACZ,aAAOC;AAAA,IACf;AAAA,EACA,CAAC;AACD,WAASC,EAAaC,GAAQC,GAAQ;AAClC,WAAO;AAAA,MACH,SAASD;AAAA,MACT,QAAAC;AAAA,IACR;AAAA,EACA;AACA,EAAAF,EAAa,cAAc,SAASG,GAAgBC,IAAiB,OAAK,CAAA,IAAK;AAC3E,UAAMC,IAAkB,SAASC,GAAS;AACtC,aAAO;AAAA,QACH,WAAWA;AAAA,QACX,SAASH,EAAeG,CAAO;AAAA,QAC/B,QAAQF,EAAeE,CAAO;AAAA,MAC1C;AAAA,IACA;AACI,WAAAD,EAAgB,sBAAsB,IAGtCA,EAAgB,mBAAmBF,GACnCE,EAAgB,mBAAmBD,GAC5BC;AAAA,EACX;AACA,QAAMN,IAAWC;;;AC9BjB,SAAO,eAAcF,GAAU,cAAc;AAAA,IACzC,OAAO;AAAA,EACX,CAAC,GACD,OAAO,eAAeA,GAAS,WAAW;AAAA,IACtC,YAAY;AAAA,IACZ,KAAK,WAAW;AACZ,aAAOC;AAAA,IACf;AAAA,EACA,CAAC;AACD,QAAMQ,IAA8B,gBAAAC,EAAyBC,CAA+B;AAC5F,WAASD,EAAyBE,GAAK;AACnC,WAAOA,KAAOA,EAAI,aAAaA,IAAM;AAAA,MACjC,SAASA;AAAA,IACjB;AAAA,EACA;AACA,QAAMX,IAAWQ,EAAc;;AChB/B,IAAIP,IAAeS;AACnB,IAAAR,KAAkBD,EAAa,aAAaA,IAAe,EAAE,SAASA,KAAgB;;","x_google_ignoreList":[0,1,2]}
|
package/contexts/Device.d.ts
CHANGED
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
MOBILE: string;
|
|
4
|
-
TABLET: string;
|
|
5
|
-
DESKTOP: string;
|
|
6
|
-
};
|
|
7
|
-
type Devices = Lowercase<keyof typeof QUERIES>;
|
|
8
|
-
type Direction = 'ltr' | 'rtl';
|
|
9
|
-
interface Props {
|
|
10
|
-
device: Devices;
|
|
11
|
-
direction?: Direction;
|
|
12
|
-
}
|
|
13
|
-
export interface DeviceContext {
|
|
14
|
-
desktop: boolean;
|
|
15
|
-
mobile: boolean;
|
|
16
|
-
tablet: boolean;
|
|
17
|
-
direction: Direction;
|
|
18
|
-
}
|
|
19
|
-
export declare const DeviceProvider: FunctionComponent<PropsWithChildren<Props>>;
|
|
20
|
-
export declare function useDevice(device: Devices): boolean;
|
|
21
|
-
export declare function useDevice(direction: 'direction'): Direction;
|
|
22
|
-
export {};
|
|
1
|
+
export * from '../types/Devices';
|
|
2
|
+
export * from './Devices/Device';
|
package/contexts/Device.js
CHANGED
|
@@ -1,62 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { createContext as m, useReducer as h, useEffect as w, useContext as v } from "react";
|
|
4
|
-
const n = {
|
|
5
|
-
MOBILE: "(min-width: 0)",
|
|
6
|
-
TABLET: "(min-width: 640px)",
|
|
7
|
-
DESKTOP: "(min-width: 768px)"
|
|
8
|
-
}, c = m(null), E = (e, t) => {
|
|
9
|
-
switch (t.type) {
|
|
10
|
-
case "mobile":
|
|
11
|
-
return e;
|
|
12
|
-
case "desktop":
|
|
13
|
-
return {
|
|
14
|
-
...e,
|
|
15
|
-
desktop: t.payload
|
|
16
|
-
};
|
|
17
|
-
case "tablet":
|
|
18
|
-
return {
|
|
19
|
-
...e,
|
|
20
|
-
tablet: t.payload
|
|
21
|
-
};
|
|
22
|
-
default:
|
|
23
|
-
return e;
|
|
24
|
-
}
|
|
25
|
-
}, b = ({ device: e, direction: t }) => typeof window < "u" ? {
|
|
26
|
-
direction: t,
|
|
27
|
-
desktop: window.matchMedia(n.DESKTOP).matches,
|
|
28
|
-
mobile: !0,
|
|
29
|
-
tablet: window.matchMedia(n.TABLET).matches
|
|
30
|
-
} : {
|
|
31
|
-
direction: t,
|
|
32
|
-
desktop: e === "desktop",
|
|
33
|
-
mobile: !0,
|
|
34
|
-
tablet: e === "tablet" || e === "desktop"
|
|
35
|
-
}, D = ({
|
|
36
|
-
children: e,
|
|
37
|
-
device: t,
|
|
38
|
-
direction: l = "ltr"
|
|
39
|
-
}) => {
|
|
40
|
-
const [u, o] = h(E, { device: t, direction: l }, b);
|
|
41
|
-
return w(() => {
|
|
42
|
-
const s = window.matchMedia(n.DESKTOP), i = window.matchMedia(n.TABLET), a = ({ matches: r }) => {
|
|
43
|
-
o({ type: "desktop", payload: r });
|
|
44
|
-
}, d = ({ matches: r }) => {
|
|
45
|
-
o({ type: "tablet", payload: r });
|
|
46
|
-
};
|
|
47
|
-
return s.addEventListener("change", a, { passive: !0 }), i.addEventListener("change", d, { passive: !0 }), () => {
|
|
48
|
-
s.removeEventListener("change", a), i.removeEventListener("change", d);
|
|
49
|
-
};
|
|
50
|
-
}, []), /* @__PURE__ */ p(c.Provider, { value: u, children: e });
|
|
51
|
-
};
|
|
52
|
-
function k(e) {
|
|
53
|
-
const t = v(c);
|
|
54
|
-
if (t === null)
|
|
55
|
-
throw new Error("useDevice(string) should be used in DeviceContext.Provider");
|
|
56
|
-
return t[e];
|
|
57
|
-
}
|
|
1
|
+
import { QUERIES as o } from "../types/Devices.js";
|
|
2
|
+
import { DeviceProvider as v, useDevice as c } from "./Devices/Device.js";
|
|
58
3
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
4
|
+
v as DeviceProvider,
|
|
5
|
+
o as QUERIES,
|
|
6
|
+
c as useDevice
|
|
61
7
|
};
|
|
62
8
|
//# sourceMappingURL=Device.js.map
|
package/contexts/Device.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Device.js","sources":[
|
|
1
|
+
{"version":3,"file":"Device.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FunctionComponent, type PropsWithChildren } from 'react';
|
|
2
|
+
import type { Direction } from '../../types/Direction';
|
|
3
|
+
import type { Devices } from '../Device';
|
|
4
|
+
interface Props {
|
|
5
|
+
device: Devices;
|
|
6
|
+
direction?: Direction;
|
|
7
|
+
}
|
|
8
|
+
export declare const DeviceProvider: FunctionComponent<PropsWithChildren<Props>>;
|
|
9
|
+
export declare function useDevice(device: Devices): device is Devices;
|
|
10
|
+
export declare function useDevice(direction: 'direction'): Direction;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as s, useContext as u } from "react";
|
|
4
|
+
import { useQueries as c } from "./hooks/useQueries.js";
|
|
5
|
+
const r = s(null), m = ({
|
|
6
|
+
children: t,
|
|
7
|
+
device: e,
|
|
8
|
+
direction: o = "ltr"
|
|
9
|
+
}) => {
|
|
10
|
+
const n = c({ device: e, direction: o });
|
|
11
|
+
return /* @__PURE__ */ i(r.Provider, { value: n, children: t });
|
|
12
|
+
};
|
|
13
|
+
function d(t) {
|
|
14
|
+
const e = u(r);
|
|
15
|
+
if (e === null)
|
|
16
|
+
throw new Error("useDevice(string) should be used in DeviceContext.Provider");
|
|
17
|
+
return e[t];
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
m as DeviceProvider,
|
|
21
|
+
d as useDevice
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=Device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Device.js","sources":["../../../lib/contexts/Devices/Device.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, type FunctionComponent, type PropsWithChildren, useContext } from 'react';\nimport type { Direction } from '@/types/Direction';\nimport { useQueries } from '@/contexts/Devices/hooks/useQueries';\nimport type { Devices } from '../Device';\nimport type { DeviceState } from './reducers/reducer';\n\ninterface Props {\n device: Devices;\n direction?: Direction;\n}\n\nconst DeviceContext = createContext<DeviceState | null>(null);\n\nexport const DeviceProvider: FunctionComponent<PropsWithChildren<Props>> = ({\n children,\n device,\n direction = 'ltr',\n}) => {\n const state = useQueries({ device: device, direction: direction });\n\n return <DeviceContext.Provider value={state}>{children}</DeviceContext.Provider>;\n};\n\nexport function useDevice(device: Devices): device is Devices;\nexport function useDevice(direction: 'direction'): Direction;\nexport function useDevice(device: Devices | 'direction') {\n const context = useContext(DeviceContext);\n\n if (context === null) {\n throw new Error('useDevice(string) should be used in DeviceContext.Provider');\n }\n\n return context[device];\n}\n"],"names":["DeviceContext","createContext","DeviceProvider","children","device","direction","state","useQueries","useDevice","context","useContext"],"mappings":";;;;AAaA,MAAMA,IAAgBC,EAAkC,IAAI,GAE/CC,IAA8D,CAAC;AAAA,EAC1E,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC,IAAY;AACd,MAAM;AACJ,QAAMC,IAAQC,EAAW,EAAE,QAAAH,GAAgB,WAAAC,GAAsB;AAEjE,2BAAQL,EAAc,UAAd,EAAuB,OAAOM,GAAQ,UAAAH,GAAS;AACzD;AAIO,SAASK,EAAUJ,GAA+B;AACvD,QAAMK,IAAUC,EAAWV,CAAa;AAExC,MAAIS,MAAY;AACd,UAAM,IAAI,MAAM,4DAA4D;AAG9E,SAAOA,EAAQL,CAAM;AACvB;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useReducer as v, useEffect as L } from "react";
|
|
2
|
+
import { reducer as g, getInitialState as E } from "../reducers/reducer.js";
|
|
3
|
+
import { QUERIES as n } from "../../../types/Devices.js";
|
|
4
|
+
function y({ device: l, direction: p }) {
|
|
5
|
+
const [u, t] = v(g, { device: l, direction: p }, E);
|
|
6
|
+
return L(() => {
|
|
7
|
+
const a = window.matchMedia(n.SMALL), r = window.matchMedia(n.MEDIUM), s = window.matchMedia(n.LARGE), i = window.matchMedia(n.XLARGE), o = ({ matches: e }) => {
|
|
8
|
+
t({ type: "small", payload: e });
|
|
9
|
+
}, c = ({ matches: e }) => {
|
|
10
|
+
t({ type: "medium", payload: e });
|
|
11
|
+
}, d = ({ matches: e }) => {
|
|
12
|
+
t({ type: "large", payload: e });
|
|
13
|
+
}, m = ({ matches: e }) => {
|
|
14
|
+
t({ type: "xlarge", payload: e });
|
|
15
|
+
};
|
|
16
|
+
return a.addEventListener("change", o, { passive: !0 }), r.addEventListener("change", c, { passive: !0 }), s.addEventListener("change", d, { passive: !0 }), i.addEventListener("change", m, { passive: !0 }), () => {
|
|
17
|
+
a.removeEventListener("change", o), r.removeEventListener("change", c), s.removeEventListener("change", d), i.removeEventListener("change", m);
|
|
18
|
+
};
|
|
19
|
+
}, []), u;
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
y as useQueries
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=useQueries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useQueries.js","sources":["../../../../lib/contexts/Devices/hooks/useQueries.ts"],"sourcesContent":["import type { Direction } from '@/types/Direction';\nimport { useEffect, useReducer } from 'react';\nimport { getInitialState, reducer } from '@/contexts/Devices/reducers/reducer';\nimport { QUERIES, type Devices } from '@/types/Devices';\n\nexport function useQueries({ device, direction }: { device: Devices; direction: Direction }) {\n const [state, dispatch] = useReducer(reducer, { device, direction }, getInitialState);\n\n useEffect(() => {\n const mqlSmall = window.matchMedia(QUERIES.SMALL);\n const mqlMedium = window.matchMedia(QUERIES.MEDIUM);\n const mqlLarge = window.matchMedia(QUERIES.LARGE);\n const mqlXLarge = window.matchMedia(QUERIES.XLARGE);\n\n const listenerSmall = ({ matches }: MediaQueryListEventMap['change']) => {\n dispatch({ type: 'small', payload: matches });\n };\n const listenerMedium = ({ matches }: MediaQueryListEventMap['change']) => {\n dispatch({ type: 'medium', payload: matches });\n };\n const listenerLarge = ({ matches }: MediaQueryListEventMap['change']) => {\n dispatch({ type: 'large', payload: matches });\n };\n const listenerXLarge = ({ matches }: MediaQueryListEventMap['change']) => {\n dispatch({ type: 'xlarge', payload: matches });\n };\n\n mqlSmall.addEventListener('change', listenerSmall, { passive: true });\n mqlMedium.addEventListener('change', listenerMedium, { passive: true });\n mqlLarge.addEventListener('change', listenerLarge, { passive: true });\n mqlXLarge.addEventListener('change', listenerXLarge, { passive: true });\n\n return () => {\n mqlSmall.removeEventListener('change', listenerSmall);\n mqlMedium.removeEventListener('change', listenerMedium);\n mqlLarge.removeEventListener('change', listenerLarge);\n mqlXLarge.removeEventListener('change', listenerXLarge);\n };\n }, []);\n return state;\n}\n"],"names":["useQueries","device","direction","state","dispatch","useReducer","reducer","getInitialState","useEffect","mqlSmall","QUERIES","mqlMedium","mqlLarge","mqlXLarge","listenerSmall","matches","listenerMedium","listenerLarge","listenerXLarge"],"mappings":";;;AAKO,SAASA,EAAW,EAAE,QAAAC,GAAQ,WAAAC,KAAwD;AAC3F,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAWC,GAAS,EAAE,QAAAL,GAAQ,WAAAC,EAAA,GAAaK,CAAe;AAEpF,SAAAC,EAAU,MAAM;AACd,UAAMC,IAAW,OAAO,WAAWC,EAAQ,KAAK,GAC1CC,IAAY,OAAO,WAAWD,EAAQ,MAAM,GAC5CE,IAAW,OAAO,WAAWF,EAAQ,KAAK,GAC1CG,IAAY,OAAO,WAAWH,EAAQ,MAAM,GAE5CI,IAAgB,CAAC,EAAE,SAAAC,QAAgD;AACvE,MAAAX,EAAS,EAAE,MAAM,SAAS,SAASW,GAAS;AAAA,IAC9C,GACMC,IAAiB,CAAC,EAAE,SAAAD,QAAgD;AACxE,MAAAX,EAAS,EAAE,MAAM,UAAU,SAASW,GAAS;AAAA,IAC/C,GACME,IAAgB,CAAC,EAAE,SAAAF,QAAgD;AACvE,MAAAX,EAAS,EAAE,MAAM,SAAS,SAASW,GAAS;AAAA,IAC9C,GACMG,IAAiB,CAAC,EAAE,SAAAH,QAAgD;AACxE,MAAAX,EAAS,EAAE,MAAM,UAAU,SAASW,GAAS;AAAA,IAC/C;AAEA,WAAAN,EAAS,iBAAiB,UAAUK,GAAe,EAAE,SAAS,IAAM,GACpEH,EAAU,iBAAiB,UAAUK,GAAgB,EAAE,SAAS,IAAM,GACtEJ,EAAS,iBAAiB,UAAUK,GAAe,EAAE,SAAS,IAAM,GACpEJ,EAAU,iBAAiB,UAAUK,GAAgB,EAAE,SAAS,IAAM,GAE/D,MAAM;AACX,MAAAT,EAAS,oBAAoB,UAAUK,CAAa,GACpDH,EAAU,oBAAoB,UAAUK,CAAc,GACtDJ,EAAS,oBAAoB,UAAUK,CAAa,GACpDJ,EAAU,oBAAoB,UAAUK,CAAc;AAAA,IACxD;AAAA,EACF,GAAG,CAAA,CAAE,GACEf;AACT;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Direction } from '../../../types/Direction';
|
|
2
|
+
import { type Devices } from '../../../types/Devices';
|
|
3
|
+
export interface DeviceState {
|
|
4
|
+
all: boolean;
|
|
5
|
+
small: boolean;
|
|
6
|
+
medium: boolean;
|
|
7
|
+
large: boolean;
|
|
8
|
+
xlarge: boolean;
|
|
9
|
+
direction: Direction;
|
|
10
|
+
}
|
|
11
|
+
export declare const reducer: (state: DeviceState, action: {
|
|
12
|
+
type: string;
|
|
13
|
+
payload: boolean;
|
|
14
|
+
}) => DeviceState;
|
|
15
|
+
export declare const getInitialState: ({ device, direction, }: {
|
|
16
|
+
device: Devices;
|
|
17
|
+
direction: Direction;
|
|
18
|
+
}) => {
|
|
19
|
+
direction: Direction;
|
|
20
|
+
all: boolean;
|
|
21
|
+
small: boolean;
|
|
22
|
+
medium: boolean;
|
|
23
|
+
large: boolean;
|
|
24
|
+
xlarge: boolean;
|
|
25
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { QUERIES as r } from "../../../types/Devices.js";
|
|
2
|
+
const m = (a, l) => {
|
|
3
|
+
switch (l.type) {
|
|
4
|
+
case "small":
|
|
5
|
+
return {
|
|
6
|
+
...a,
|
|
7
|
+
small: l.payload
|
|
8
|
+
};
|
|
9
|
+
case "medium":
|
|
10
|
+
return {
|
|
11
|
+
...a,
|
|
12
|
+
medium: l.payload
|
|
13
|
+
};
|
|
14
|
+
case "large":
|
|
15
|
+
return {
|
|
16
|
+
...a,
|
|
17
|
+
large: l.payload
|
|
18
|
+
};
|
|
19
|
+
case "xlarge":
|
|
20
|
+
return {
|
|
21
|
+
...a,
|
|
22
|
+
xlarge: l.payload
|
|
23
|
+
};
|
|
24
|
+
case "all":
|
|
25
|
+
default:
|
|
26
|
+
return a;
|
|
27
|
+
}
|
|
28
|
+
}, u = ({
|
|
29
|
+
device: a,
|
|
30
|
+
direction: l
|
|
31
|
+
}) => typeof window < "u" ? {
|
|
32
|
+
direction: l,
|
|
33
|
+
all: !0,
|
|
34
|
+
small: window.matchMedia(r.SMALL).matches,
|
|
35
|
+
medium: window.matchMedia(r.MEDIUM).matches,
|
|
36
|
+
large: window.matchMedia(r.LARGE).matches,
|
|
37
|
+
xlarge: window.matchMedia(r.XLARGE).matches
|
|
38
|
+
} : {
|
|
39
|
+
direction: l,
|
|
40
|
+
all: !0,
|
|
41
|
+
small: a === "small" || a === "medium" || a === "large" || a === "xlarge",
|
|
42
|
+
medium: a === "medium" || a === "large" || a === "xlarge",
|
|
43
|
+
large: a === "large" || a === "xlarge",
|
|
44
|
+
xlarge: a === "xlarge"
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
u as getInitialState,
|
|
48
|
+
m as reducer
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=reducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer.js","sources":["../../../../lib/contexts/Devices/reducers/reducer.ts"],"sourcesContent":["import type { Direction } from '@/types/Direction';\nimport { type Devices, QUERIES } from '@/types/Devices';\n\nexport interface DeviceState {\n all: boolean;\n small: boolean;\n medium: boolean;\n large: boolean;\n xlarge: boolean;\n direction: Direction;\n}\n\nexport const reducer = (state: DeviceState, action: { type: string; payload: boolean }) => {\n switch (action.type) {\n case 'small':\n return {\n ...state,\n small: action.payload,\n };\n case 'medium':\n return {\n ...state,\n medium: action.payload,\n };\n case 'large':\n return {\n ...state,\n large: action.payload,\n };\n case 'xlarge':\n return {\n ...state,\n xlarge: action.payload,\n };\n case 'all':\n default:\n return state;\n }\n};\n\nexport const getInitialState = ({\n device,\n direction,\n}: {\n device: Devices;\n direction: Direction;\n}) => {\n if (typeof window !== 'undefined') {\n return {\n direction,\n all: true,\n small: window.matchMedia(QUERIES.SMALL).matches,\n medium: window.matchMedia(QUERIES.MEDIUM).matches,\n large: window.matchMedia(QUERIES.LARGE).matches,\n xlarge: window.matchMedia(QUERIES.XLARGE).matches,\n };\n }\n\n return {\n direction,\n all: true,\n small: device === 'small' || device === 'medium' || device === 'large' || device === 'xlarge',\n medium: device === 'medium' || device === 'large' || device === 'xlarge',\n large: device === 'large' || device === 'xlarge',\n xlarge: device === 'xlarge',\n };\n};\n"],"names":["reducer","state","action","getInitialState","device","direction","QUERIES"],"mappings":";AAYO,MAAMA,IAAU,CAACC,GAAoBC,MAA+C;AACzF,UAAQA,EAAO,MAAA;AAAA,IACb,KAAK;AACH,aAAO;AAAA,QACL,GAAGD;AAAA,QACH,OAAOC,EAAO;AAAA,MAAA;AAAA,IAElB,KAAK;AACH,aAAO;AAAA,QACL,GAAGD;AAAA,QACH,QAAQC,EAAO;AAAA,MAAA;AAAA,IAEnB,KAAK;AACH,aAAO;AAAA,QACL,GAAGD;AAAA,QACH,OAAOC,EAAO;AAAA,MAAA;AAAA,IAElB,KAAK;AACH,aAAO;AAAA,QACL,GAAGD;AAAA,QACH,QAAQC,EAAO;AAAA,MAAA;AAAA,IAEnB,KAAK;AAAA,IACL;AACE,aAAOD;AAAA,EAAA;AAEb,GAEaE,IAAkB,CAAC;AAAA,EAC9B,QAAAC;AAAA,EACA,WAAAC;AACF,MAIM,OAAO,SAAW,MACb;AAAA,EACL,WAAAA;AAAA,EACA,KAAK;AAAA,EACL,OAAO,OAAO,WAAWC,EAAQ,KAAK,EAAE;AAAA,EACxC,QAAQ,OAAO,WAAWA,EAAQ,MAAM,EAAE;AAAA,EAC1C,OAAO,OAAO,WAAWA,EAAQ,KAAK,EAAE;AAAA,EACxC,QAAQ,OAAO,WAAWA,EAAQ,MAAM,EAAE;AAAA,IAIvC;AAAA,EACL,WAAAD;AAAA,EACA,KAAK;AAAA,EACL,OAAOD,MAAW,WAAWA,MAAW,YAAYA,MAAW,WAAWA,MAAW;AAAA,EACrF,QAAQA,MAAW,YAAYA,MAAW,WAAWA,MAAW;AAAA,EAChE,OAAOA,MAAW,WAAWA,MAAW;AAAA,EACxC,QAAQA,MAAW;AAAA;"}
|