@react-spectrum/provider
Advanced tools
Comparing version 3.0.0-nightly-533a02fe1-241009 to 3.0.0-nightly-56e575731-241121
@@ -1,4 +0,4 @@ | ||
module.exports = JSON.parse("{\"name\":\"@react-spectrum/provider\",\"version\":\"3.9.11\",\"description\":\"Spectrum UI components in React\",\"license\":\"Apache-2.0\",\"main\":\"dist/main.js\",\"module\":\"dist/module.js\",\"exports\":{\"types\":\"./dist/types.d.ts\",\"import\":\"./dist/import.mjs\",\"require\":\"./dist/main.js\"},\"types\":\"dist/types.d.ts\",\"source\":\"src/index.ts\",\"files\":[\"dist\",\"src\"],\"sideEffects\":[\"*.css\"],\"targets\":{\"main\":{\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]},\"module\":{\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]}},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/adobe/react-spectrum\"},\"dependencies\":{\"@react-aria/i18n\":\"^3.12.3\",\"@react-aria/overlays\":\"^3.23.3\",\"@react-aria/utils\":\"^3.25.3\",\"@react-spectrum/utils\":\"^3.11.11\",\"@react-types/provider\":\"^3.8.4\",\"@react-types/shared\":\"^3.25.0\",\"@swc/helpers\":\"^0.5.0\",\"clsx\":\"^2.0.0\"},\"devDependencies\":{\"@adobe/spectrum-css-temp\":\"3.0.0-alpha.1\"},\"peerDependencies\":{\"react\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0\"},\"publishConfig\":{\"access\":\"public\"}}"); | ||
module.exports = JSON.parse("{\"name\":\"@react-spectrum/provider\",\"version\":\"3.10.0\",\"description\":\"Spectrum UI components in React\",\"license\":\"Apache-2.0\",\"main\":\"dist/main.js\",\"module\":\"dist/module.js\",\"exports\":{\"types\":\"./dist/types.d.ts\",\"import\":\"./dist/import.mjs\",\"require\":\"./dist/main.js\"},\"types\":\"dist/types.d.ts\",\"source\":\"src/index.ts\",\"files\":[\"dist\",\"src\"],\"sideEffects\":[\"*.css\"],\"targets\":{\"main\":{\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]},\"module\":{\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]}},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/adobe/react-spectrum\"},\"dependencies\":{\"@react-aria/i18n\":\"^3.12.4\",\"@react-aria/overlays\":\"^3.24.0\",\"@react-aria/utils\":\"^3.26.0\",\"@react-spectrum/utils\":\"^3.12.0\",\"@react-types/provider\":\"^3.8.5\",\"@react-types/shared\":\"^3.26.0\",\"@swc/helpers\":\"^0.5.0\",\"clsx\":\"^2.0.0\"},\"devDependencies\":{\"@adobe/spectrum-css-temp\":\"3.0.0-alpha.1\"},\"peerDependencies\":{\"react\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"},\"publishConfig\":{\"access\":\"public\"}}"); | ||
//# sourceMappingURL=package.main.js.map |
var $7b22e09dddddd7da$exports = {}; | ||
$7b22e09dddddd7da$exports = JSON.parse("{\"name\":\"@react-spectrum/provider\",\"version\":\"3.9.11\",\"description\":\"Spectrum UI components in React\",\"license\":\"Apache-2.0\",\"main\":\"dist/main.js\",\"module\":\"dist/module.js\",\"exports\":{\"types\":\"./dist/types.d.ts\",\"import\":\"./dist/import.mjs\",\"require\":\"./dist/main.js\"},\"types\":\"dist/types.d.ts\",\"source\":\"src/index.ts\",\"files\":[\"dist\",\"src\"],\"sideEffects\":[\"*.css\"],\"targets\":{\"main\":{\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]},\"module\":{\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]}},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/adobe/react-spectrum\"},\"dependencies\":{\"@react-aria/i18n\":\"^3.12.3\",\"@react-aria/overlays\":\"^3.23.3\",\"@react-aria/utils\":\"^3.25.3\",\"@react-spectrum/utils\":\"^3.11.11\",\"@react-types/provider\":\"^3.8.4\",\"@react-types/shared\":\"^3.25.0\",\"@swc/helpers\":\"^0.5.0\",\"clsx\":\"^2.0.0\"},\"devDependencies\":{\"@adobe/spectrum-css-temp\":\"3.0.0-alpha.1\"},\"peerDependencies\":{\"react\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0\"},\"publishConfig\":{\"access\":\"public\"}}"); | ||
$7b22e09dddddd7da$exports = JSON.parse("{\"name\":\"@react-spectrum/provider\",\"version\":\"3.10.0\",\"description\":\"Spectrum UI components in React\",\"license\":\"Apache-2.0\",\"main\":\"dist/main.js\",\"module\":\"dist/module.js\",\"exports\":{\"types\":\"./dist/types.d.ts\",\"import\":\"./dist/import.mjs\",\"require\":\"./dist/main.js\"},\"types\":\"dist/types.d.ts\",\"source\":\"src/index.ts\",\"files\":[\"dist\",\"src\"],\"sideEffects\":[\"*.css\"],\"targets\":{\"main\":{\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]},\"module\":{\"includeNodeModules\":[\"@adobe/spectrum-css-temp\"]}},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/adobe/react-spectrum\"},\"dependencies\":{\"@react-aria/i18n\":\"^3.12.4\",\"@react-aria/overlays\":\"^3.24.0\",\"@react-aria/utils\":\"^3.26.0\",\"@react-spectrum/utils\":\"^3.12.0\",\"@react-types/provider\":\"^3.8.5\",\"@react-types/shared\":\"^3.26.0\",\"@swc/helpers\":\"^0.5.0\",\"clsx\":\"^2.0.0\"},\"devDependencies\":{\"@adobe/spectrum-css-temp\":\"3.0.0-alpha.1\"},\"peerDependencies\":{\"react\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\",\"react-dom\":\"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1\"},\"publishConfig\":{\"access\":\"public\"}}"); | ||
@@ -4,0 +4,0 @@ |
@@ -24,4 +24,4 @@ var $a5b4f4e252b5a021$exports = require("./context.main.js"); | ||
$parcel$export(module.exports, "Provider", () => $96cabdf5b0aed55b$export$2881499e37b75b9a); | ||
$parcel$export(module.exports, "useProvider", () => $96cabdf5b0aed55b$export$693cdb10cec23617); | ||
$parcel$export(module.exports, "Provider", () => $96cabdf5b0aed55b$export$2881499e37b75b9a); | ||
$parcel$export(module.exports, "useProviderProps", () => $96cabdf5b0aed55b$export$521c373ccc32c300); | ||
@@ -57,3 +57,3 @@ /* | ||
function $96cabdf5b0aed55b$var$Provider(props, ref) { | ||
let prevContext = $96cabdf5b0aed55b$export$693cdb10cec23617(); | ||
let prevContext = (0, $dbjUM$react.useContext)((0, $a5b4f4e252b5a021$exports.Context)); | ||
let prevColorScheme = prevContext && prevContext.colorScheme; | ||
@@ -64,9 +64,9 @@ let prevBreakpoints = prevContext && prevContext.breakpoints; | ||
// Hooks must always be called. | ||
let autoColorScheme = (0, $a6e2b5f4621e4690$exports.useColorScheme)(theme, defaultColorScheme); | ||
let autoColorScheme = (0, $a6e2b5f4621e4690$exports.useColorScheme)(theme, defaultColorScheme || 'light'); | ||
let autoScale = (0, $a6e2b5f4621e4690$exports.useScale)(theme); | ||
let { locale: prevLocale } = (0, $dbjUM$reactariai18n.useLocale)(); | ||
// if the new theme doesn't support the prevColorScheme, we must resort to the auto | ||
let usePrevColorScheme = !!theme[prevColorScheme]; | ||
let usePrevColorScheme = prevColorScheme ? !!theme[prevColorScheme] : false; | ||
// importance of color scheme props > parent > auto:(OS > default > omitted) | ||
let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme, scale: scale = prevContext ? prevContext.scale : autoScale, locale: locale = prevContext ? prevLocale : null, breakpoints: breakpoints = prevContext ? prevBreakpoints : $96cabdf5b0aed55b$var$DEFAULT_BREAKPOINTS, children: children, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isRequired: isRequired, isReadOnly: isReadOnly, validationState: validationState, router: router, ...otherProps } = props; | ||
let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme, scale: scale = prevContext ? prevContext.scale : autoScale, locale: locale = prevContext ? prevLocale : undefined, breakpoints: breakpoints = prevContext ? prevBreakpoints : $96cabdf5b0aed55b$var$DEFAULT_BREAKPOINTS, children: children, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isRequired: isRequired, isReadOnly: isReadOnly, validationState: validationState, router: router, ...otherProps } = props; | ||
// select only the props with values so undefined props don't overwrite prevContext values | ||
@@ -97,3 +97,3 @@ let currentProps = { | ||
}); | ||
if (!prevContext || props.locale || theme !== prevContext.theme || colorScheme !== prevContext.colorScheme || scale !== prevContext.scale || Object.keys(domProps).length > 0 || otherProps.UNSAFE_className || Object.keys(styleProps.style).length > 0) contents = /*#__PURE__*/ (0, ($parcel$interopDefault($dbjUM$react))).createElement($96cabdf5b0aed55b$var$ProviderWrapper, { | ||
if (!prevContext || props.locale || theme !== prevContext.theme || colorScheme !== prevContext.colorScheme || scale !== prevContext.scale || Object.keys(domProps).length > 0 || otherProps.UNSAFE_className || styleProps.style && Object.keys(styleProps.style).length > 0) contents = /*#__PURE__*/ (0, ($parcel$interopDefault($dbjUM$react))).createElement($96cabdf5b0aed55b$var$ProviderWrapper, { | ||
...props, | ||
@@ -145,3 +145,4 @@ UNSAFE_style: { | ||
if (direction && domRef.current) { | ||
let closestDir = domRef.current.parentElement.closest('[dir]'); | ||
var _domRef_current_parentElement, _domRef_current; | ||
let closestDir = (_domRef_current = domRef.current) === null || _domRef_current === void 0 ? void 0 : (_domRef_current_parentElement = _domRef_current.parentElement) === null || _domRef_current_parentElement === void 0 ? void 0 : _domRef_current_parentElement.closest('[dir]'); | ||
let dir = closestDir && closestDir.getAttribute('dir'); | ||
@@ -170,6 +171,8 @@ if (dir && dir !== direction && !hasWarned.current) { | ||
function $96cabdf5b0aed55b$export$693cdb10cec23617() { | ||
return (0, $dbjUM$react.useContext)((0, $a5b4f4e252b5a021$exports.Context)); | ||
let context = (0, $dbjUM$react.useContext)((0, $a5b4f4e252b5a021$exports.Context)); | ||
if (!context) throw new Error("No root provider found, please make sure your app is wrapped within a <Provider>. Alternatively, this issue may be caused by duplicate packages, see https://github.com/adobe/react-spectrum/wiki/Frequently-Asked-Questions-(FAQs)#why-are-there-errors-after-upgrading-a-react-spectrum-package for more information."); | ||
return context; | ||
} | ||
function $96cabdf5b0aed55b$export$521c373ccc32c300(props) { | ||
let context = $96cabdf5b0aed55b$export$693cdb10cec23617(); | ||
let context = (0, $dbjUM$react.useContext)((0, $a5b4f4e252b5a021$exports.Context)); | ||
if (!context) return props; | ||
@@ -176,0 +179,0 @@ return Object.assign({}, { |
@@ -13,3 +13,3 @@ import {Context as $a8430f637b4ccbce$export$841858b892ce1f4c} from "./context.module.js"; | ||
import {ModalProvider as $dyW1v$ModalProvider, useModalProvider as $dyW1v$useModalProvider} from "@react-aria/overlays"; | ||
import $dyW1v$react, {useRef as $dyW1v$useRef, useEffect as $dyW1v$useEffect, useContext as $dyW1v$useContext} from "react"; | ||
import $dyW1v$react, {useContext as $dyW1v$useContext, useRef as $dyW1v$useRef, useEffect as $dyW1v$useEffect} from "react"; | ||
@@ -49,3 +49,3 @@ | ||
function $7167f8da3cce35e4$var$Provider(props, ref) { | ||
let prevContext = $7167f8da3cce35e4$export$693cdb10cec23617(); | ||
let prevContext = (0, $dyW1v$useContext)((0, $a8430f637b4ccbce$export$841858b892ce1f4c)); | ||
let prevColorScheme = prevContext && prevContext.colorScheme; | ||
@@ -56,9 +56,9 @@ let prevBreakpoints = prevContext && prevContext.breakpoints; | ||
// Hooks must always be called. | ||
let autoColorScheme = (0, $d8453c5ae7fac713$export$6343629ee1b29116)(theme, defaultColorScheme); | ||
let autoColorScheme = (0, $d8453c5ae7fac713$export$6343629ee1b29116)(theme, defaultColorScheme || 'light'); | ||
let autoScale = (0, $d8453c5ae7fac713$export$a8d2043b2d807f4d)(theme); | ||
let { locale: prevLocale } = (0, $dyW1v$useLocale)(); | ||
// if the new theme doesn't support the prevColorScheme, we must resort to the auto | ||
let usePrevColorScheme = !!theme[prevColorScheme]; | ||
let usePrevColorScheme = prevColorScheme ? !!theme[prevColorScheme] : false; | ||
// importance of color scheme props > parent > auto:(OS > default > omitted) | ||
let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme, scale: scale = prevContext ? prevContext.scale : autoScale, locale: locale = prevContext ? prevLocale : null, breakpoints: breakpoints = prevContext ? prevBreakpoints : $7167f8da3cce35e4$var$DEFAULT_BREAKPOINTS, children: children, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isRequired: isRequired, isReadOnly: isReadOnly, validationState: validationState, router: router, ...otherProps } = props; | ||
let { colorScheme: colorScheme = usePrevColorScheme ? prevColorScheme : autoColorScheme, scale: scale = prevContext ? prevContext.scale : autoScale, locale: locale = prevContext ? prevLocale : undefined, breakpoints: breakpoints = prevContext ? prevBreakpoints : $7167f8da3cce35e4$var$DEFAULT_BREAKPOINTS, children: children, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isRequired: isRequired, isReadOnly: isReadOnly, validationState: validationState, router: router, ...otherProps } = props; | ||
// select only the props with values so undefined props don't overwrite prevContext values | ||
@@ -89,3 +89,3 @@ let currentProps = { | ||
}); | ||
if (!prevContext || props.locale || theme !== prevContext.theme || colorScheme !== prevContext.colorScheme || scale !== prevContext.scale || Object.keys(domProps).length > 0 || otherProps.UNSAFE_className || Object.keys(styleProps.style).length > 0) contents = /*#__PURE__*/ (0, $dyW1v$react).createElement($7167f8da3cce35e4$var$ProviderWrapper, { | ||
if (!prevContext || props.locale || theme !== prevContext.theme || colorScheme !== prevContext.colorScheme || scale !== prevContext.scale || Object.keys(domProps).length > 0 || otherProps.UNSAFE_className || styleProps.style && Object.keys(styleProps.style).length > 0) contents = /*#__PURE__*/ (0, $dyW1v$react).createElement($7167f8da3cce35e4$var$ProviderWrapper, { | ||
...props, | ||
@@ -137,3 +137,4 @@ UNSAFE_style: { | ||
if (direction && domRef.current) { | ||
let closestDir = domRef.current.parentElement.closest('[dir]'); | ||
var _domRef_current_parentElement, _domRef_current; | ||
let closestDir = (_domRef_current = domRef.current) === null || _domRef_current === void 0 ? void 0 : (_domRef_current_parentElement = _domRef_current.parentElement) === null || _domRef_current_parentElement === void 0 ? void 0 : _domRef_current_parentElement.closest('[dir]'); | ||
let dir = closestDir && closestDir.getAttribute('dir'); | ||
@@ -162,6 +163,8 @@ if (dir && dir !== direction && !hasWarned.current) { | ||
function $7167f8da3cce35e4$export$693cdb10cec23617() { | ||
return (0, $dyW1v$useContext)((0, $a8430f637b4ccbce$export$841858b892ce1f4c)); | ||
let context = (0, $dyW1v$useContext)((0, $a8430f637b4ccbce$export$841858b892ce1f4c)); | ||
if (!context) throw new Error("No root provider found, please make sure your app is wrapped within a <Provider>. Alternatively, this issue may be caused by duplicate packages, see https://github.com/adobe/react-spectrum/wiki/Frequently-Asked-Questions-(FAQs)#why-are-there-errors-after-upgrading-a-react-spectrum-package for more information."); | ||
return context; | ||
} | ||
function $7167f8da3cce35e4$export$521c373ccc32c300(props) { | ||
let context = $7167f8da3cce35e4$export$693cdb10cec23617(); | ||
let context = (0, $dyW1v$useContext)((0, $a8430f637b4ccbce$export$841858b892ce1f4c)); | ||
if (!context) return props; | ||
@@ -179,3 +182,3 @@ return Object.assign({}, { | ||
export {$7167f8da3cce35e4$export$693cdb10cec23617 as useProvider, $7167f8da3cce35e4$export$2881499e37b75b9a as Provider, $7167f8da3cce35e4$export$521c373ccc32c300 as useProviderProps}; | ||
export {$7167f8da3cce35e4$export$2881499e37b75b9a as Provider, $7167f8da3cce35e4$export$693cdb10cec23617 as useProvider, $7167f8da3cce35e4$export$521c373ccc32c300 as useProviderProps}; | ||
//# sourceMappingURL=Provider.module.js.map |
{ | ||
"name": "@react-spectrum/provider", | ||
"version": "3.0.0-nightly-533a02fe1-241009", | ||
"version": "3.0.0-nightly-56e575731-241121", | ||
"description": "Spectrum UI components in React", | ||
@@ -39,8 +39,8 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/i18n": "^3.0.0-nightly-533a02fe1-241009", | ||
"@react-aria/overlays": "^3.0.0-nightly-533a02fe1-241009", | ||
"@react-aria/utils": "^3.0.0-nightly-533a02fe1-241009", | ||
"@react-spectrum/utils": "^3.0.0-nightly-533a02fe1-241009", | ||
"@react-types/provider": "^3.0.0-nightly-533a02fe1-241009", | ||
"@react-types/shared": "^3.0.0-nightly-533a02fe1-241009", | ||
"@react-aria/i18n": "^3.0.0-nightly-56e575731-241121", | ||
"@react-aria/overlays": "^3.0.0-nightly-56e575731-241121", | ||
"@react-aria/utils": "^3.0.0-nightly-56e575731-241121", | ||
"@react-spectrum/utils": "^3.0.0-nightly-56e575731-241121", | ||
"@react-types/provider": "^3.0.0-nightly-56e575731-241121", | ||
"@react-types/shared": "^3.0.0-nightly-56e575731-241121", | ||
"@swc/helpers": "^0.5.0", | ||
@@ -53,4 +53,4 @@ "clsx": "^2.0.0" | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0", | ||
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", | ||
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" | ||
}, | ||
@@ -60,3 +60,3 @@ "publishConfig": { | ||
}, | ||
"stableVersion": "3.9.11" | ||
"stableVersion": "3.10.0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
151617
1335