Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-spectrum/provider

Package Overview
Dependencies
Maintainers
2
Versions
808
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-spectrum/provider - npm Package Compare versions

Comparing version 3.0.0-nightly-0ddbe6f95-241021 to 3.0.0-nightly-10a43de88-241127

2

dist/package.main.js

@@ -1,4 +0,4 @@

module.exports = JSON.parse("{\"name\":\"@react-spectrum/provider\",\"version\":\"3.9.12\",\"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.4\",\"@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.12\",\"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.4\",\"@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);

@@ -56,4 +56,4 @@ /*

};
function $96cabdf5b0aed55b$var$Provider(props, ref) {
let prevContext = $96cabdf5b0aed55b$export$693cdb10cec23617();
const $96cabdf5b0aed55b$export$2881499e37b75b9a = /*#__PURE__*/ (0, ($parcel$interopDefault($dbjUM$react))).forwardRef(function Provider(props, ref) {
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,

@@ -114,8 +114,3 @@ UNSAFE_style: {

}, /*#__PURE__*/ (0, ($parcel$interopDefault($dbjUM$react))).createElement((0, $dbjUM$reactariaoverlays.ModalProvider), null, contents))));
}
/**
* Provider is the container for all React Spectrum applications.
* It defines the theme, locale, and other application level settings,
* and can also be used to provide common properties to a group of components.
*/ let $96cabdf5b0aed55b$export$2881499e37b75b9a = /*#__PURE__*/ (0, ($parcel$interopDefault($dbjUM$react))).forwardRef($96cabdf5b0aed55b$var$Provider);
});
const $96cabdf5b0aed55b$var$ProviderWrapper = /*#__PURE__*/ (0, ($parcel$interopDefault($dbjUM$react))).forwardRef(function ProviderWrapper(props, ref) {

@@ -146,3 +141,4 @@ let { children: children, ...otherProps } = props;

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');

@@ -171,6 +167,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;

@@ -177,0 +175,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";

@@ -48,4 +48,4 @@

};
function $7167f8da3cce35e4$var$Provider(props, ref) {
let prevContext = $7167f8da3cce35e4$export$693cdb10cec23617();
const $7167f8da3cce35e4$export$2881499e37b75b9a = /*#__PURE__*/ (0, $dyW1v$react).forwardRef(function Provider(props, ref) {
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,

@@ -106,8 +106,3 @@ UNSAFE_style: {

}, /*#__PURE__*/ (0, $dyW1v$react).createElement((0, $dyW1v$ModalProvider), null, contents))));
}
/**
* Provider is the container for all React Spectrum applications.
* It defines the theme, locale, and other application level settings,
* and can also be used to provide common properties to a group of components.
*/ let $7167f8da3cce35e4$export$2881499e37b75b9a = /*#__PURE__*/ (0, $dyW1v$react).forwardRef($7167f8da3cce35e4$var$Provider);
});
const $7167f8da3cce35e4$var$ProviderWrapper = /*#__PURE__*/ (0, $dyW1v$react).forwardRef(function ProviderWrapper(props, ref) {

@@ -138,3 +133,4 @@ let { children: children, ...otherProps } = props;

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');

@@ -163,6 +159,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;

@@ -180,3 +178,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

@@ -9,3 +9,3 @@ import { ProviderContext, ProviderProps } from "@react-types/provider";

*/
export let Provider: React.ForwardRefExoticComponent<ProviderProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
export const Provider: React.ForwardRefExoticComponent<ProviderProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
/**

@@ -12,0 +12,0 @@ * Returns the various settings and styles applied by the nearest parent Provider.

{
"name": "@react-spectrum/provider",
"version": "3.0.0-nightly-0ddbe6f95-241021",
"version": "3.0.0-nightly-10a43de88-241127",
"description": "Spectrum UI components in React",

@@ -39,8 +39,8 @@ "license": "Apache-2.0",

"dependencies": {
"@react-aria/i18n": "^3.0.0-nightly-0ddbe6f95-241021",
"@react-aria/overlays": "^3.0.0-nightly-0ddbe6f95-241021",
"@react-aria/utils": "^3.0.0-nightly-0ddbe6f95-241021",
"@react-spectrum/utils": "^3.0.0-nightly-0ddbe6f95-241021",
"@react-types/provider": "^3.0.0-nightly-0ddbe6f95-241021",
"@react-types/shared": "^3.0.0-nightly-0ddbe6f95-241021",
"@react-aria/i18n": "^3.0.0-nightly-10a43de88-241127",
"@react-aria/overlays": "^3.0.0-nightly-10a43de88-241127",
"@react-aria/utils": "^3.0.0-nightly-10a43de88-241127",
"@react-spectrum/utils": "^3.0.0-nightly-10a43de88-241127",
"@react-types/provider": "^3.0.0-nightly-10a43de88-241127",
"@react-types/shared": "^3.0.0-nightly-10a43de88-241127",
"@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.12"
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc