Socket
Socket
Sign inDemoInstall

@unocss/core

Package Overview
Dependencies
Maintainers
1
Versions
369
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unocss/core - npm Package Compare versions

Comparing version 0.1.0-beta.2 to 0.1.0

18

dist/index.d.ts

@@ -21,6 +21,24 @@ declare type Awaitable<T> = T | Promise<T>;

declare type Variant = {
/**
* The entry function to match and rewrite the selector for futher processing.
*/
match: (input: string, theme: Theme) => string | undefined;
/**
* Rewrite the output selector. Often be used to append pesudo classes or parents.
*/
selector?: (input: string, theme: Theme) => string | undefined;
/**
* Rewrite the output css body. The input come in [key,value][] pairs.
*/
rewrite?: (input: CSSEntries, theme: Theme) => CSSEntries | undefined;
/**
* Provide media query to the output css.
*/
mediaQuery?: (selector: string, theme: Theme) => string | undefined;
/**
* Allows this variant to be used more than once in matching a single rule
*
* @default false
*/
multiPass?: boolean;
};

@@ -27,0 +45,0 @@ interface Theme {

4

dist/index.js

@@ -377,3 +377,3 @@ var __defProp = Object.defineProperty;

// src/extractors/split.ts
var extractorSplit = (code) => new Set(code.split(/[\s'"`;>=]/g).filter(isValidSelector));
var extractorSplit = (code) => new Set(code.split(/[\s'"`;>=]+/g).filter(isValidSelector));

@@ -559,2 +559,4 @@ // src/config.ts

for (const v of this.config.variants) {
if (!v.multiPass && variants.includes(v))
continue;
const result = v.match(processed, this.config.theme);

@@ -561,0 +563,0 @@ if (result && result !== processed) {

{
"name": "@unocss/core",
"version": "0.1.0-beta.2",
"version": "0.1.0",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [],

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