🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@sk-web-gui/utils

Package Overview
Dependencies
Maintainers
5
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sk-web-gui/utils - npm Package Compare versions

Comparing version

to
1.0.0

3

dist/cjs/assertion.js
"use strict";
exports.__esModule = true;
exports.__DEV__ = void 0;
exports.__REACT_NAME__ = exports.__DEV__ = void 0;
exports.isArray = isArray;

@@ -20,2 +20,3 @@ exports.isObject = isObject;

var __DEV__ = exports.__DEV__ = process.env.NODE_ENV !== 'production';
var __REACT_NAME__ = exports.__REACT_NAME__ = __DEV__ ? 'displayName' : 'name';
//# sourceMappingURL=assertion.js.map

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

exports.getValidChildren = getValidChildren;
var React = _interopRequireWildcard(require("react"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**

@@ -16,6 +15,6 @@ * Gets only the valid children of a component,

function getValidChildren(children) {
return React.Children.toArray(children).filter(function (child) {
return /*#__PURE__*/React.isValidElement(child);
return _react["default"].Children.toArray(children).filter(function (child) {
return /*#__PURE__*/_react["default"].isValidElement(child);
});
}
//# sourceMappingURL=children.js.map

@@ -6,2 +6,3 @@ "use strict";

exports.hwb2rgb = hwb2rgb;
exports.rgbStringToHex = void 0;
exports.toColor = toColor;

@@ -92,2 +93,14 @@ exports.toRGB = toRGB;

}
var rgbStringToHex = exports.rgbStringToHex = function rgbStringToHex(rgbString) {
var regex = /^rgb\s*\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/;
var hex = '';
var match = rgbString.match(regex);
if (match) {
var r = parseInt(match[1]);
var g = parseInt(match[2]);
var b = parseInt(match[3]);
hex = "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1).toUpperCase();
}
return hex;
};
//# sourceMappingURL=color.js.map

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

exports.useForkRef = useForkRef;
var React = _interopRequireWildcard(require("react"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/* eslint-disable @typescript-eslint/no-explicit-any */

@@ -22,3 +21,3 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */

function useForkRef(refA, refB) {
return React.useMemo(function () {
return _react["default"].useMemo(function () {
if (refA == null && refB == null) {

@@ -25,0 +24,0 @@ return null;

@@ -14,2 +14,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

export var __DEV__ = process.env.NODE_ENV !== 'production';
export var __REACT_NAME__ = __DEV__ ? 'displayName' : 'name';
//# sourceMappingURL=assertion.js.map

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

import * as React from 'react';
import React from 'react';

@@ -3,0 +3,0 @@ /**

@@ -82,2 +82,14 @@ import colorString from 'color-string';

}
export var rgbStringToHex = rgbString => {
var regex = /^rgb\s*\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/;
var hex = '';
var match = rgbString.match(regex);
if (match) {
var r = parseInt(match[1]);
var g = parseInt(match[2]);
var b = parseInt(match[3]);
hex = "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1).toUpperCase();
}
return hex;
};
//# sourceMappingURL=color.js.map
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/ban-ts-comment */
import * as React from 'react';
import React from 'react';
export function setRef(ref, value) {

@@ -5,0 +5,0 @@ if (typeof ref === 'function') {

@@ -5,1 +5,2 @@ import { Dict } from './types';

export declare const __DEV__: boolean;
export declare const __REACT_NAME__: 'displayName' | 'name';

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

import * as React from 'react';
import React from 'react';
/**

@@ -3,0 +3,0 @@ * Gets only the valid children of a component,

@@ -10,1 +10,2 @@ import type { Color } from 'color-string';

};
export declare const rgbStringToHex: (rgbString: string) => string;

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

import * as React from 'react';
import React from 'react';
type ReactRef<T> = React.Ref<T> | React.RefObject<T> | React.MutableRefObject<T>;

@@ -3,0 +3,0 @@ export declare function setRef<T = any>(ref: ReactRef<T> | undefined, value: T): void;

{
"name": "@sk-web-gui/utils",
"version": "0.1.8",
"version": "1.0.0",
"sideEffects": false,

@@ -47,3 +47,3 @@ "license": "MIT",

},
"gitHead": "c34ffa09211bc344fff14ae3598af36758bbdab8"
"gitHead": "8364bb14200fea471d903d7b225447d4f70b7879"
}

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

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