Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@mui/x-internals

Package Overview
Dependencies
Maintainers
16
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mui/x-internals - npm Package Compare versions

Comparing version
8.17.0
to
8.18.0
+2
-1
esm/export/loadStyleSheets.d.ts

@@ -6,3 +6,4 @@ /**

* @param root Document or ShadowRoot to load stylesheets from
* @param nonce Optional nonce to set on style elements for CSP compliance
*/
export declare function loadStyleSheets(document: Document, root: Document | ShadowRoot): Promise<void>[];
export declare function loadStyleSheets(document: Document, root: Document | ShadowRoot, nonce?: string): Promise<void>[];

@@ -6,4 +6,5 @@ /**

* @param root Document or ShadowRoot to load stylesheets from
* @param nonce Optional nonce to set on style elements for CSP compliance
*/
export function loadStyleSheets(document, root) {
export function loadStyleSheets(document, root, nonce) {
const stylesheetLoadPromises = [];

@@ -13,4 +14,4 @@ const headStyleElements = root.querySelectorAll("style, link[rel='stylesheet']");

const node = headStyleElements[i];
const newHeadStyleElements = document.createElement(node.tagName);
if (node.tagName === 'STYLE') {
const newHeadStyleElements = document.createElement(node.tagName);
const sheet = node.sheet;

@@ -25,8 +26,4 @@ if (sheet) {

newHeadStyleElements.appendChild(document.createTextNode(styleCSS));
document.head.appendChild(newHeadStyleElements);
}
} else if (node.getAttribute('href')) {
// If `href` tag is empty, avoid loading these links
const newHeadStyleElements = document.createElement(node.tagName);
for (let j = 0; j < node.attributes.length; j += 1) {

@@ -41,6 +38,9 @@ const attr = node.attributes[j];

}));
document.head.appendChild(newHeadStyleElements);
}
if (nonce) {
newHeadStyleElements.nonce = nonce;
}
document.head.appendChild(newHeadStyleElements);
}
return stylesheetLoadPromises;
}

@@ -6,3 +6,4 @@ /**

* @param root Document or ShadowRoot to load stylesheets from
* @param nonce Optional nonce to set on style elements for CSP compliance
*/
export declare function loadStyleSheets(document: Document, root: Document | ShadowRoot): Promise<void>[];
export declare function loadStyleSheets(document: Document, root: Document | ShadowRoot, nonce?: string): Promise<void>[];

@@ -12,4 +12,5 @@ "use strict";

* @param root Document or ShadowRoot to load stylesheets from
* @param nonce Optional nonce to set on style elements for CSP compliance
*/
function loadStyleSheets(document, root) {
function loadStyleSheets(document, root, nonce) {
const stylesheetLoadPromises = [];

@@ -19,4 +20,4 @@ const headStyleElements = root.querySelectorAll("style, link[rel='stylesheet']");

const node = headStyleElements[i];
const newHeadStyleElements = document.createElement(node.tagName);
if (node.tagName === 'STYLE') {
const newHeadStyleElements = document.createElement(node.tagName);
const sheet = node.sheet;

@@ -31,8 +32,4 @@ if (sheet) {

newHeadStyleElements.appendChild(document.createTextNode(styleCSS));
document.head.appendChild(newHeadStyleElements);
}
} else if (node.getAttribute('href')) {
// If `href` tag is empty, avoid loading these links
const newHeadStyleElements = document.createElement(node.tagName);
for (let j = 0; j < node.attributes.length; j += 1) {

@@ -47,6 +44,9 @@ const attr = node.attributes[j];

}));
document.head.appendChild(newHeadStyleElements);
}
if (nonce) {
newHeadStyleElements.nonce = nonce;
}
document.head.appendChild(newHeadStyleElements);
}
return stylesheetLoadPromises;
}
{
"name": "@mui/x-internals",
"version": "8.17.0",
"version": "8.18.0",
"author": "MUI Team",

@@ -34,3 +34,3 @@ "description": "Utility functions for the MUI X packages (internal use only).",

"@babel/runtime": "^7.28.4",
"@mui/utils": "^7.3.3",
"@mui/utils": "^7.3.5",
"reselect": "^5.1.1",

@@ -37,0 +37,0 @@ "use-sync-external-store": "^1.6.0"

Sorry, the diff of this file is too big to display