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

secptrum-ui

Package Overview
Dependencies
Maintainers
0
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secptrum-ui - npm Package Compare versions

Comparing version 1.1.33-beta.1 to 1.1.33-beta.1.0

dist/nextjs/components/Backdrop/Backdrop.d.ts

35

package.json
{
"name": "secptrum-ui",
"version": "1.1.33-beta.1",
"version": "1.1.33-beta.1.0",
"description": "**SecptrumUI** A React component library with adaptable, responsive designs using `styled-chroma`",

@@ -13,11 +13,23 @@ "homepage": "https://secptrumui.vercel.app",

},
"main": "dist/secptrum-ui.cjs.js",
"module": "dist/secptrum-ui.es.js",
"unpkg": "dist/secptrum-ui.umd.js",
"types": "dist/types/index.d.ts",
"main": "dist/react/secptrum-ui.cjs.js",
"module": "dist/react/secptrum-ui.es.js",
"unpkg": "dist/react/secptrum-ui.umd.js",
"types": "dist/react/index.d.ts",
"mainNext": "dist/nextjs/secptrum-ui.cjs.js",
"moduleNext": "dist/nextjs/secptrum-ui.es.js",
"exports": {
".": {
"import": "./dist/secptrum-ui.es.js",
"require": "./dist/secptrum-ui.cjs.js",
"types": "./dist/index.d.ts"
"import": "./dist/react/secptrum-ui.es.js",
"require": "./dist/react/secptrum-ui.cjs.js",
"types": "./dist/react/index.d.ts"
},
"./react": {
"import": "./dist/react/secptrum-ui.es.js",
"require": "./dist/react/secptrum-ui.cjs.js",
"types": "./dist/react/index.d.ts"
},
"./nextjs": {
"import": "./dist/nextjs/secptrum-ui.es.js",
"require": "./dist/nextjs/secptrum-ui.cjs.js",
"types": "./dist/nextjs/index.d.ts"
}

@@ -27,3 +39,4 @@ },

"dist",
"dist/types",
"dist/react",
"dist/nextjs",
"scripts"

@@ -34,3 +47,5 @@ ],

"insert-client": "node scripts/insertUseClient.js",
"postbuild": "copyfiles -u 1 src/types/**/* dist/",
"copy-react": "copyfiles -u 1 src/types/**/* dist/react/",
"copy-nextjs": "copyfiles -u 1 src/types/**/* dist/nextjs/",
"postbuild": "npm run copy-react && npm run copy-nextjs && npm run insert-client",
"prerelease": "npx tsc --noEmit",

@@ -37,0 +52,0 @@ "release": "npm version patch && git push origin master --follow-tags",

@@ -6,40 +6,32 @@ #!/usr/bin/env node

// Ensure the path to the dist directory is correct
const distDir = path.join(__dirname, '../dist');
// Add "use client" to all files in the Next.js build
const nextJsDir = path.join(__dirname, '../dist/nextjs');
// Check if the directory exists
if (fs.existsSync(distDir)) {
// Recursively add 'use client' directive to all relevant files in 'dist'
function addUseClientToFiles(dir) {
const files = fs.readdirSync(dir);
function addUseClientToFiles(dir) {
const files = fs.readdirSync(dir);
files.forEach((file) => {
const fullPath = path.join(dir, file);
const stat = fs.statSync(fullPath);
files.forEach((file) => {
const fullPath = path.join(dir, file);
const stat = fs.statSync(fullPath);
if (stat.isDirectory()) {
// Recursively check subdirectories
addUseClientToFiles(fullPath);
} else if (file.endsWith('.js') || file.endsWith('.ts')) {
// Read the file
const content = fs.readFileSync(fullPath, 'utf8');
if (stat.isDirectory()) {
addUseClientToFiles(fullPath); // Recursively process subdirectories
} else if (file.endsWith('.js') || file.endsWith('.ts')) {
const content = fs.readFileSync(fullPath, 'utf8');
// Check if 'use client' is already present
if (!content.startsWith('"use client";')) {
// Add 'use client' at the top
const newContent = `"use client";\n${content}`;
// Write the file back with 'use client' at the top
fs.writeFileSync(fullPath, newContent, 'utf8');
console.log(`Added 'use client' to: ${fullPath}`);
}
if (!content.startsWith('"use client";')) {
const newContent = `"use client";\n${content}`;
fs.writeFileSync(fullPath, newContent, 'utf8');
console.log(`Added 'use client' to: ${fullPath}`);
}
});
}
}
});
}
addUseClientToFiles(distDir);
// Only apply this to the Next.js folder
if (fs.existsSync(nextJsDir)) {
addUseClientToFiles(nextJsDir);
console.log('Next.js build modified with "use client".');
} else {
console.error(
`Directory ${distDir} does not exist. Make sure Rollup build was successful.`
);
console.error(`Directory ${nextJsDir} does not exist.`);
}
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