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

@radix-ui/react-id

Package Overview
Dependencies
Maintainers
8
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-id - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2-rc.1

4

dist/index.d.ts

@@ -1,7 +0,3 @@

import * as React from "react";
export const IdProvider: React.FC<{
children: React.ReactNode;
}>;
export function useId(deterministicId?: string): string;
//# sourceMappingURL=index.d.ts.map

2

dist/index.js

@@ -1,2 +0,2 @@

var e,r,n,t=require("@radix-ui/react-context").createContext,o=(e={},r=require("react"),Object.keys(r).forEach((function(n){"default"!==n&&"__esModule"!==n&&Object.defineProperty(e,n,{enumerable:!0,get:function(){return r[n]}})})),e),i=(n=require("@babel/runtime/helpers/extends"))&&n.__esModule?n.default:n;const d={prefix:Math.round(1e10*Math.random()),current:0},[u,a]=t("IdProvider",d);exports.IdProvider=e=>{const r=a("IdProvider"),n=r===d;/*#__PURE__*/return o.createElement(u,i({prefix:n?0:++r.prefix,current:0},e))},exports.useId=function(e){const r=a("IdProviderConsumer");return Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)||r!==d||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.useMemo((()=>e||`radix-id-${r.prefix}-${++r.current}`),[e])};
var e,t,r=require("@radix-ui/react-use-layout-effect").useLayoutEffect,u=(e={},t=require("react"),Object.keys(t).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e);const n=u.useId||(()=>{});let c=0;exports.useId=function(e){const[t,a]=u.useState(n());return r((()=>{e||a((e=>null!=e?e:String(c++)))}),[e]),e||(t?`radix-${t}`:"")};
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import{createContext as e}from"@radix-ui/react-context";import*as r from"react";import o from"@babel/runtime/helpers/esm/extends";const n={prefix:Math.round(1e10*Math.random()),current:0},[t,i]=e("IdProvider",n);export const IdProvider=e=>{const d=i("IdProvider"),a=d===n;/*#__PURE__*/return r.createElement(t,o({prefix:a?0:++d.prefix,current:0},e))};export function useId(e){const o=i("IdProviderConsumer");return Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)||o!==n||console.warn("When server rendering, you must wrap your application in an <IdProvider> to ensure consistent ids are generated between the client and server."),r.useMemo((()=>e||`radix-id-${o.prefix}-${++o.current}`),[e])}
import{useLayoutEffect as t}from"@radix-ui/react-use-layout-effect";import*as e from"react";const r=e.useId||(()=>{});let o=0;export function useId(u){const[a,i]=e.useState(r());return t((()=>{u||i((t=>null!=t?t:String(o++)))}),[u]),u||(a?`radix-${a}`:"")}
//# sourceMappingURL=index.module.js.map
{
"name": "@radix-ui/react-id",
"version": "0.1.1",
"version": "0.1.2-rc.1",
"license": "MIT",

@@ -31,4 +31,5 @@ "source": "src/index.ts",

"@babel/runtime": "^7.13.10",
"@radix-ui/react-context": "0.1.1"
}
"@radix-ui/react-use-layout-effect": "0.1.0"
},
"stableVersion": "0.1.1"
}

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