@radix-ui/react-id
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -1,2 +0,2 @@ | ||
function e(e){return e&&e.__esModule?e.default:e}function r(e,r,n){Object.defineProperty(e,r,{get:n,enumerable:!0})}var n=require("react"),t=n.createContext,o=n.useContext,u=n.useMemo,i=n.createElement,a=e(require("@babel/runtime-corejs3/core-js-stable/instance/concat")),c=e(require("@babel/runtime-corejs3/helpers/extends"));require("core-js/modules/esnext.global-this.js");var s={},l={prefix:Math.round(1e10*Math.random()),current:0},d=t(l),f=function(e){var r=o(d),n=r===l,t=u((function(){return{prefix:n?0:++r.prefix,current:0}}),[n,r]);return i(d.Provider,c({value:t},e))};function v(e){var r=o(d);return Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)||r!==l||console.warn("When server rendering, you must wrap your application in an <IdProvider> to ensure consistent ids are generated between the client and server."),u((function(){var n;return e||a(n="radix-id-".concat(r.prefix,"-")).call(n,++r.current)}),[e])}exports.IdProvider=f,exports.useId=v,r(s,"useId",(function(){return v})),r(s,"IdProvider",(function(){return f})); | ||
function e(e,r,n){Object.defineProperty(e,r,{get:n,enumerable:!0})}var r,n=require("react"),t=n.createContext,o=n.useContext,i=n.useMemo,u=n.createElement,a=(r=require("@babel/runtime/helpers/extends"))&&r.__esModule?r.default:r,d={};const s={prefix:Math.round(1e10*Math.random()),current:0},c=t(s),l=e=>{const r=o(c),n=r===s,t=i((()=>({prefix:n?0:++r.prefix,current:0})),[n,r]);return u(c.Provider,a({value:t},e))};function p(e){const r=o(c);return Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)||r!==s||console.warn("When server rendering, you must wrap your application in an <IdProvider> to ensure consistent ids are generated between the client and server."),i((()=>e||`radix-id-${r.prefix}-${++r.current}`),[e])}exports.IdProvider=l,exports.useId=p,e(d,"useId",(function(){return p})),e(d,"IdProvider",(function(){return l})); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
function e(e,r,n){Object.defineProperty(e,r,{get:n,enumerable:!0})}import{createContext as r,useContext as n,useMemo as o,createElement as t}from"react";import i from"@babel/runtime-corejs3/core-js-stable/instance/concat";import a from"@babel/runtime-corejs3/helpers/esm/extends";import"core-js/modules/esnext.global-this.js";var u={},c={prefix:Math.round(1e10*Math.random()),current:0},s=r(c);export var IdProvider=function(e){var r=n(s),i=r===c,u=o((function(){return{prefix:i?0:++r.prefix,current:0}}),[i,r]);return t(s.Provider,a({value:u},e))};function d(e){var r=n(s);return Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)||r!==c||console.warn("When server rendering, you must wrap your application in an <IdProvider> to ensure consistent ids are generated between the client and server."),o((function(){var n;return e||i(n="radix-id-".concat(r.prefix,"-")).call(n,++r.current)}),[e])}export{d as useId};e(u,"useId",(function(){return d})),e(u,"IdProvider",(function(){return IdProvider})); | ||
function e(e,r,n){Object.defineProperty(e,r,{get:n,enumerable:!0})}import{createContext as r,useContext as n,useMemo as o,createElement as t}from"react";import i from"@babel/runtime/helpers/esm/extends";var d={};const u={prefix:Math.round(1e10*Math.random()),current:0},a=r(u);export const IdProvider=e=>{const r=n(a),d=r===u,s=o((()=>({prefix:d?0:++r.prefix,current:0})),[d,r]);return t(a.Provider,i({value:s},e))};function s(e){const r=n(a);return Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)||r!==u||console.warn("When server rendering, you must wrap your application in an <IdProvider> to ensure consistent ids are generated between the client and server."),o((()=>e||`radix-id-${r.prefix}-${++r.current}`),[e])}export{s as useId};e(d,"useId",(function(){return s})),e(d,"IdProvider",(function(){return IdProvider})); | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@radix-ui/react-id", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"license": "MIT", | ||
@@ -31,4 +31,4 @@ "source": "src/index.ts", | ||
"dependencies": { | ||
"@babel/runtime-corejs3": "^7.13.10" | ||
"@babel/runtime": "^7.13.10" | ||
} | ||
} |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
0
10538
14
+ Added@babel/runtime@^7.13.10
+ Added@babel/runtime@7.25.6(transitive)
- Removed@babel/runtime-corejs3@^7.13.10
- Removed@babel/runtime-corejs3@7.25.6(transitive)
- Removedcore-js-pure@3.38.1(transitive)