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

@kuma-ui/compiler

Package Overview
Dependencies
Maintainers
3
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kuma-ui/compiler - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

dist/chunk-KPBP6BPV.mjs

55

dist/compile.js

@@ -148,2 +148,49 @@ "use strict";

var import_sheet = require("@kuma-ui/sheet");
// src/utils/stableStringify.ts
function stableStringify(data) {
const seen = [];
return function stringify(node) {
if (node && node.toJSON && typeof node.toJSON === "function") {
node = node.toJSON();
}
if (node === void 0)
return;
if (typeof node == "number")
return isFinite(node) ? "" + node : "null";
if (typeof node !== "object")
return JSON.stringify(node);
let i, out;
if (Array.isArray(node)) {
out = "[";
for (i = 0; i < node.length; i++) {
if (i)
out += ",";
out += stringify(node[i]) || "null";
}
return out + "]";
}
if (node === null)
return "null";
if (seen.indexOf(node) !== -1) {
throw new TypeError("Converting circular structure to JSON");
}
const seenIndex = seen.push(node) - 1;
const keys = Object.keys(node).sort();
out = "";
for (i = 0; i < keys.length; i++) {
const key = keys[i];
const value = stringify(node[key]);
if (!value)
continue;
if (out)
out += ",";
out += JSON.stringify(key) + ":" + value;
}
seen.splice(seenIndex, 1);
return "{" + out + "}";
}(data);
}
// src/extractor/extract.ts
var extractProps = (componentName, jsx, propsMap) => {

@@ -196,3 +243,3 @@ const styledProps = {};

};
const key = generateKey(combinedProps);
const key = stableStringify(combinedProps);
let generatedStyle = styleCache[key];

@@ -241,5 +288,2 @@ if (!generatedStyle) {

};
var generateKey = (props) => {
return Object.entries(props).filter(([, value]) => value !== void 0).sort((a, b) => a[0].localeCompare(b[0])).map(([key, value]) => `${key}:${value}`).join("|");
};
var styleCache = {};

@@ -298,4 +342,3 @@

const originalComponentName = Object.keys(bindings).find(
(key) => bindings[key] === jsxTagName && // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- FIXME
Object.values(import_componentList2.componentList).some((c) => c === key)
(key) => bindings[key] === jsxTagName && Object.values(import_componentList2.componentList).some((c) => c === key)
);

@@ -302,0 +345,0 @@ if (!originalComponentName)

@@ -30,2 +30,49 @@ "use strict";

var import_sheet = require("@kuma-ui/sheet");
// src/utils/stableStringify.ts
function stableStringify(data) {
const seen = [];
return function stringify(node) {
if (node && node.toJSON && typeof node.toJSON === "function") {
node = node.toJSON();
}
if (node === void 0)
return;
if (typeof node == "number")
return isFinite(node) ? "" + node : "null";
if (typeof node !== "object")
return JSON.stringify(node);
let i, out;
if (Array.isArray(node)) {
out = "[";
for (i = 0; i < node.length; i++) {
if (i)
out += ",";
out += stringify(node[i]) || "null";
}
return out + "]";
}
if (node === null)
return "null";
if (seen.indexOf(node) !== -1) {
throw new TypeError("Converting circular structure to JSON");
}
const seenIndex = seen.push(node) - 1;
const keys = Object.keys(node).sort();
out = "";
for (i = 0; i < keys.length; i++) {
const key = keys[i];
const value = stringify(node[key]);
if (!value)
continue;
if (out)
out += ",";
out += JSON.stringify(key) + ":" + value;
}
seen.splice(seenIndex, 1);
return "{" + out + "}";
}(data);
}
// src/extractor/extract.ts
var extractProps = (componentName, jsx, propsMap) => {

@@ -78,3 +125,3 @@ const styledProps = {};

};
const key = generateKey(combinedProps);
const key = stableStringify(combinedProps);
let generatedStyle = styleCache[key];

@@ -123,5 +170,2 @@ if (!generatedStyle) {

};
var generateKey = (props) => {
return Object.entries(props).filter(([, value]) => value !== void 0).sort((a, b) => a[0].localeCompare(b[0])).map(([key, value]) => `${key}:${value}`).join("|");
};
var styleCache = {};

@@ -128,0 +172,0 @@ // Annotate the CommonJS export names for ESM import in node:

@@ -32,2 +32,49 @@ "use strict";

var import_sheet = require("@kuma-ui/sheet");
// src/utils/stableStringify.ts
function stableStringify(data) {
const seen = [];
return function stringify(node) {
if (node && node.toJSON && typeof node.toJSON === "function") {
node = node.toJSON();
}
if (node === void 0)
return;
if (typeof node == "number")
return isFinite(node) ? "" + node : "null";
if (typeof node !== "object")
return JSON.stringify(node);
let i, out;
if (Array.isArray(node)) {
out = "[";
for (i = 0; i < node.length; i++) {
if (i)
out += ",";
out += stringify(node[i]) || "null";
}
return out + "]";
}
if (node === null)
return "null";
if (seen.indexOf(node) !== -1) {
throw new TypeError("Converting circular structure to JSON");
}
const seenIndex = seen.push(node) - 1;
const keys = Object.keys(node).sort();
out = "";
for (i = 0; i < keys.length; i++) {
const key = keys[i];
const value = stringify(node[key]);
if (!value)
continue;
if (out)
out += ",";
out += JSON.stringify(key) + ":" + value;
}
seen.splice(seenIndex, 1);
return "{" + out + "}";
}(data);
}
// src/extractor/extract.ts
var extractProps = (componentName, jsx, propsMap) => {

@@ -80,3 +127,3 @@ const styledProps = {};

};
const key = generateKey(combinedProps);
const key = stableStringify(combinedProps);
let generatedStyle = styleCache[key];

@@ -125,5 +172,2 @@ if (!generatedStyle) {

};
var generateKey = (props) => {
return Object.entries(props).filter(([, value]) => value !== void 0).sort((a, b) => a[0].localeCompare(b[0])).map(([key, value]) => `${key}:${value}`).join("|");
};
var styleCache = {};

@@ -130,0 +174,0 @@ // Annotate the CommonJS export names for ESM import in node:

@@ -150,2 +150,49 @@ "use strict";

var import_sheet = require("@kuma-ui/sheet");
// src/utils/stableStringify.ts
function stableStringify(data) {
const seen = [];
return function stringify(node) {
if (node && node.toJSON && typeof node.toJSON === "function") {
node = node.toJSON();
}
if (node === void 0)
return;
if (typeof node == "number")
return isFinite(node) ? "" + node : "null";
if (typeof node !== "object")
return JSON.stringify(node);
let i, out;
if (Array.isArray(node)) {
out = "[";
for (i = 0; i < node.length; i++) {
if (i)
out += ",";
out += stringify(node[i]) || "null";
}
return out + "]";
}
if (node === null)
return "null";
if (seen.indexOf(node) !== -1) {
throw new TypeError("Converting circular structure to JSON");
}
const seenIndex = seen.push(node) - 1;
const keys = Object.keys(node).sort();
out = "";
for (i = 0; i < keys.length; i++) {
const key = keys[i];
const value = stringify(node[key]);
if (!value)
continue;
if (out)
out += ",";
out += JSON.stringify(key) + ":" + value;
}
seen.splice(seenIndex, 1);
return "{" + out + "}";
}(data);
}
// src/extractor/extract.ts
var extractProps = (componentName, jsx, propsMap) => {

@@ -198,3 +245,3 @@ const styledProps = {};

};
const key = generateKey(combinedProps);
const key = stableStringify(combinedProps);
let generatedStyle = styleCache[key];

@@ -243,5 +290,2 @@ if (!generatedStyle) {

};
var generateKey = (props) => {
return Object.entries(props).filter(([, value]) => value !== void 0).sort((a, b) => a[0].localeCompare(b[0])).map(([key, value]) => `${key}:${value}`).join("|");
};
var styleCache = {};

@@ -300,4 +344,3 @@

const originalComponentName = Object.keys(bindings).find(
(key) => bindings[key] === jsxTagName && // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- FIXME
Object.values(import_componentList2.componentList).some((c) => c === key)
(key) => bindings[key] === jsxTagName && Object.values(import_componentList2.componentList).some((c) => c === key)
);

@@ -304,0 +347,0 @@ if (!originalComponentName)

8

package.json
{
"name": "@kuma-ui/compiler",
"version": "1.0.5",
"version": "1.0.6",
"description": "🐻 Kuma UI is a utility-first, zero-runtime CSS-in-JS library that offers an outstanding developer experience and optimized performance.",

@@ -34,5 +34,5 @@ "repository": {

"ts-pattern": "^5.0.1",
"@kuma-ui/core": "^1.1.2",
"@kuma-ui/sheet": "^1.0.1",
"@kuma-ui/system": "^1.2.0"
"@kuma-ui/core": "^1.1.3",
"@kuma-ui/sheet": "^1.0.2",
"@kuma-ui/system": "^1.2.1"
},

@@ -39,0 +39,0 @@ "publishConfig": {

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