instantsearch-ui-components
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -0,6 +1,4 @@ | ||
import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; | ||
var _excluded = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"]; | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
/** @jsx createElement */ | ||
import { cx } from "../lib/index.js"; | ||
@@ -7,0 +5,0 @@ function createHighlightPartComponent(_ref) { |
@@ -1,1 +0,3 @@ | ||
export declare function cx(...classNames: Array<string | number | boolean | undefined | null>): string; | ||
type ClassValue = string | undefined | boolean | null | number; | ||
export declare function cx(...classNames: Array<ClassValue | ClassValue[]>): string; | ||
export {}; |
@@ -5,3 +5,8 @@ export function cx() { | ||
} | ||
return classNames.filter(Boolean).join(' '); | ||
return classNames.reduce(function (acc, className) { | ||
if (Array.isArray(className)) { | ||
return acc.concat(className); | ||
} | ||
return acc.concat([className]); | ||
}, []).filter(Boolean).join(' '); | ||
} |
@@ -1,2 +0,2 @@ | ||
declare const _default: "0.2.0"; | ||
declare const _default: "0.3.0"; | ||
export default _default; |
@@ -1,1 +0,1 @@ | ||
export default '0.2.0'; | ||
export default '0.3.0'; |
{ | ||
"name": "instantsearch-ui-components", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Common UI components for InstantSearch.", | ||
"source": "src/index.ts", | ||
"types": "dist/es/index.d.ts", | ||
"main": "dist/es/index.js", | ||
"main": "dist/cjs/index.js", | ||
"module": "dist/es/index.js", | ||
@@ -12,2 +11,3 @@ "type": "module", | ||
"types": "./dist/es/index.d.ts", | ||
"require": "./dist/cjs/index.js", | ||
"default": "./dist/es/index.js" | ||
@@ -42,8 +42,9 @@ }, | ||
"clean": "rm -rf dist", | ||
"build": "yarn build:es && yarn build:types", | ||
"build": "yarn build:cjs && yarn build:es && yarn build:types", | ||
"build:es": "BABEL_ENV=es babel src --root-mode upward --extensions '.js,.ts,.tsx' --out-dir dist/es --ignore '**/__tests__/**/*','**/__mocks__/**/*' --quiet", | ||
"build:cjs": "BABEL_ENV=cjs babel src --root-mode upward --extensions '.js,.ts,.tsx' --out-dir dist/cjs --ignore '**/__tests__/**/*','**/__mocks__/**/*' --quiet && ../../scripts/prepare-cjs.sh", | ||
"build:types": "tsc -p ./tsconfig.declaration.json --outDir ./dist/es", | ||
"version": "./scripts/version.cjs" | ||
}, | ||
"gitHead": "9afbaecd8ae25e3b3746be05f858a83b03843102" | ||
"gitHead": "084aff3d29e15cea8125076c46fb753c83d4dcad" | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
17508
28
319
0