Socket
Socket
Sign inDemoInstall

@unocss/preset-mini

Package Overview
Dependencies
Maintainers
1
Versions
285
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unocss/preset-mini - npm Package Compare versions

Comparing version 0.16.4 to 0.17.2

15

dist/rules.d.ts

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

import { Rule, RuleContext } from '@unocss/core';
import { Rule } from '@unocss/core';
import { T as Theme } from './types-7963d0b3';

@@ -14,12 +14,2 @@

declare const parseColorUtil: (body: string, theme: Theme) => {
opacity: string;
name: string;
no: string;
color: string | undefined;
rgba: [number, number, number, number] | [number, number, number] | undefined;
} | undefined;
declare const colorResolver: (attribute: string, varName: string) => ([, body]: string[], { theme }: RuleContext<Theme>) => {
[x: string]: string | number;
} | undefined;
/**

@@ -75,3 +65,2 @@ * @example op10 op-30 opacity-100

declare const cssProps: string[];
declare const varEmpty = "var(--un-empty,/*!*/ /*!*/)";

@@ -108,2 +97,2 @@ declare const displays: Rule[];

export { alignments, appearance, appearances, aspectRatio, bgColors, borderColors, borders, boxShadows, boxSizing, breaks, colorResolver, contents, cssProps, cssVariables, cursors, displays, flex, floats, fontSmoothings, fontStyles, fonts, gaps, grids, insets, justifies, margins, opacity, orders, outline, overflows, paddings, parseColorUtil, placeholder, placements, pointerEvents, positions, questionMark, resizes, ringColors, ringOffsetColors, rings, rules, sizes, svgUtilities, tabSizes, textAligns, textColors, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };
export { alignments, appearance, appearances, aspectRatio, bgColors, borderColors, borders, boxShadows, boxSizing, breaks, contents, cssVariables, cursors, displays, flex, floats, fontSmoothings, fontStyles, fonts, gaps, grids, insets, justifies, margins, opacity, orders, outline, overflows, paddings, placeholder, placements, pointerEvents, positions, questionMark, resizes, ringColors, ringOffsetColors, rings, rules, sizes, svgUtilities, tabSizes, textAligns, textColors, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };

66

dist/utils.d.ts
import * as _unocss_core from '@unocss/core';
import { VariantHandler, CSSEntries } from '@unocss/core';
import { VariantHandler, DynamicMatcher, ParsedColorValue } from '@unocss/core';
import { T as Theme } from './types-7963d0b3';

@@ -9,2 +10,3 @@ declare const directionMap: Record<string, string[]>;

declare function numberWithUnit(str: string): string | undefined;
declare function auto(str: string): "auto" | undefined;
declare function rem(str: string): string | undefined;

@@ -19,4 +21,6 @@ declare function px(str: string): string | undefined;

declare function global(str: string): string | undefined;
declare function properties(str: string): string | undefined;
declare const handlers_numberWithUnit: typeof numberWithUnit;
declare const handlers_auto: typeof auto;
declare const handlers_rem: typeof rem;

@@ -31,5 +35,7 @@ declare const handlers_px: typeof px;

declare const handlers_global: typeof global;
declare const handlers_properties: typeof properties;
declare namespace handlers {
export {
handlers_numberWithUnit as numberWithUnit,
handlers_auto as auto,
handlers_rem as rem,

@@ -44,7 +50,8 @@ handlers_px as px,

handlers_global as global,
handlers_properties as properties,
};
}
declare const handler: _unocss_core.ValueHandler<"number" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "cssvar" | "time" | "global">;
declare const h: _unocss_core.ValueHandler<"number" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "cssvar" | "time" | "global">;
declare const handler: _unocss_core.ValueHandler<"number" | "auto" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "cssvar" | "time" | "global" | "properties">;
declare const h: _unocss_core.ValueHandler<"number" | "auto" | "numberWithUnit" | "rem" | "px" | "percent" | "fraction" | "bracket" | "cssvar" | "time" | "global" | "properties">;

@@ -54,4 +61,53 @@ declare const variantMatcher: (name: string, selector?: ((input: string) => string | undefined) | undefined) => (input: string) => VariantHandler | undefined;

declare function capitalize<T extends string>(str: T): Capitalize<T>;
declare const directionSize: (prefix: string) => ([_, direction, size]: string[]) => CSSEntries | undefined;
/**
* Provide {@link DynamicMatcher} function returning spacing definition. See spacing rules.
*
* @param {string} propertyPrefix - Property for the css value to be created. Postfix will be appended according to direction matched.
* @return {DynamicMatcher} {@link DynamicMatcher}
* @see {@link directionMap}
*/
declare const directionSize: (propertyPrefix: string) => DynamicMatcher;
/**
* Parse color string into rgba (if possible) with opacity opacity. Color value will be matched to theme object before converting to rgb value.
*
* @example Parseable strings:
* 'red' // From theme, if 'red' is available
* 'red-100' // From theme, plus scale
* 'red-100/20' // From theme, plus scale/opacity
* '#f12' // Hex color
* 'hex-f12' // Alternative hex color
* '[rgb(100,2,3)]/[var(--op)]' // Bracket with rgb color and bracket with opacity
*
* @param {string} body - Color string to be parsed.
* @param {Theme} theme - {@link Theme} object.
* @return {ParsedColorValue|undefined} {@link ParsedColorValue} object if string is parseable.
*/
declare const parseColor: (body: string, theme: Theme) => ParsedColorValue | undefined;
/**
* Provide {@link DynamicMatcher} function to produce color value matched from rule.
*
* @see {@link parseColor}
*
* @example Resolving 'red' from theme:
* colorResolver('background-color', 'background')('', 'red')
* return { 'background-color': '#f12' }
*
* @example Resolving 'red-100' from theme:
* colorResolver('background-color', 'background')('', 'red-100')
* return { '--un-background-opacity': '1', 'background-color': 'rgba(254,226,226,var(--un-bg-opacity))' }
*
* @example Resolving 'red-100/20' from theme:
* colorResolver('background-color', 'background')('', 'red-100/20')
* return { 'background-color': 'rgba(204,251,241,0.22)' }
*
* @example Resolving 'hex-124':
* colorResolver('color', 'text')('', 'hex-124')
* return { '--un-text-opacity': '1', 'color': 'rgba(17,34,68,var(--un-text-opacity))' }
*
* @param {string} property - Property for the css value to be created.
* @param {string} varName - Base name for the opacity variable.
* @return {DynamicMatcher} {@link DynamicMatcher} object.
*/
declare const colorResolver: (property: string, varName: string) => DynamicMatcher;
export { capitalize, cornerMap, directionMap, directionSize, h, handler, handlers as valueHandlers, variantMatcher, xyzMap };
export { capitalize, colorResolver, cornerMap, directionMap, directionSize, h, handler, parseColor, handlers as valueHandlers, variantMatcher, xyzMap };

@@ -21,3 +21,4 @@ import { Variant, VariantFunction, VariantObject } from '@unocss/core';

declare const variantPseudoClasses: VariantObject;
declare const partClasses: VariantObject;
export { CONTROL_BYPASS_PSEUDO_CLASS, PseudoClasses, variantBreakpoints, variantColorsClass, variantColorsMedia, variantCombinators, variantImportant, variantNegative, variantPseudoClasses, variantPseudoElements, variantSpace, variants };
export { CONTROL_BYPASS_PSEUDO_CLASS, PseudoClasses, partClasses, variantBreakpoints, variantColorsClass, variantColorsMedia, variantCombinators, variantImportant, variantNegative, variantPseudoClasses, variantPseudoElements, variantSpace, variants };
{
"name": "@unocss/preset-mini",
"version": "0.16.4",
"version": "0.17.2",
"description": "The minimal preset for UnoCSS",

@@ -64,3 +64,3 @@ "keywords": [

"dependencies": {
"@unocss/core": "0.16.4"
"@unocss/core": "0.17.2"
},

@@ -67,0 +67,0 @@ "scripts": {

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

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

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