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

@windicss/plugin-utils

Package Overview
Dependencies
Maintainers
4
Versions
166
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@windicss/plugin-utils - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

4

dist/index.d.ts

@@ -312,2 +312,4 @@ import * as windicss_types_interfaces from 'windicss/types/interfaces';

declare function SvelteExtractor(code: string, id?: string): ExtractorResultDetailed;
declare type NestedArrayable<T> = T | (T | T[])[];

@@ -326,2 +328,2 @@ declare function flattenArray<T>(v: NestedArrayable<T>): T[];

export { CompletionsResult, DefaultExtractor, LayerMeta, LayerName, NestedArrayable, PugExtractor, ResolvedOptions, SupportedLayers, TagNames, TransformCssOptions, Transformer, TransformerFunction, TransformerOptions, UserOptions, WindiPluginUtils, WindiPluginUtilsOptions, applyExtractors, buildAliasTransformer, createUtils, defaultAlias, defineConfig, escapeRegExp, exclude, flattenArray, getDefaultExtractors, htmlTags, include, isResolvedOptions, kebabCase, mergeArrays, mergeWindicssConfig, preflightTags, resolveOptions, transformGroups };
export { CompletionsResult, DefaultExtractor, LayerMeta, LayerName, NestedArrayable, PugExtractor, ResolvedOptions, SupportedLayers, SvelteExtractor, TagNames, TransformCssOptions, Transformer, TransformerFunction, TransformerOptions, UserOptions, WindiPluginUtils, WindiPluginUtilsOptions, applyExtractors, buildAliasTransformer, createUtils, defaultAlias, defineConfig, escapeRegExp, exclude, flattenArray, getDefaultExtractors, htmlTags, include, isResolvedOptions, kebabCase, mergeArrays, mergeWindicssConfig, preflightTags, resolveOptions, transformGroups };

@@ -47,2 +47,3 @@ var __create = Object.create;

SupportedLayers: () => SupportedLayers,
SvelteExtractor: () => SvelteExtractor,
WindiCssOptions: () => import_config2.WindiCssOptions,

@@ -262,3 +263,3 @@ applyExtractors: () => applyExtractors,

var regexClassSplitter = /[\s'"`{}]/g;
var regexClassGroup = /([!\w+-<@][\w+:_/-]*?\w):\(([!\w\s:/\\,%#\[\].$-]*?)\)/gm;
var regexClassGroup = /([!\w+-<@][\w+:_/-]*?\w):\(((?:[!\w\s:/\\,%#.$-]|\[.*?\])*?)\)/gm;
var regexAttributifyItem = /(?:\s|^)([\w+:_/-]+)=(['"{])((?:\\\2|\\\\|\n|\r|.)*?)(?:\2|\})/gm;

@@ -271,2 +272,3 @@ var regexClassCheck1 = /^!?[a-z\d@<>.+-](?:\([\w,.%#-]*\)|[\w:/\\,%#\[\].$-])*$/;

];
var regexSvelteClass = /class:([\w:/\\,%#\[\].$-]+?)=\{/g;
function validClassName(i) {

@@ -347,5 +349,27 @@ return regexClassChecks.every((r) => i.length > 2 && i.match(r));

// src/extractors/svelte.ts
function SvelteExtractor(code, id) {
const result = DefaultExtractor(code, id);
return {
tags: result.tags,
get classes() {
return [
...result.classes,
...Array.from(code.matchAll(regexSvelteClass)).map((i) => i[1]).filter(Boolean)
];
},
get attributes() {
return result.attributes;
}
};
}
// src/extractors/helper.ts
function getDefaultExtractors() {
const extractors = [];
const extractors = [
{
extractor: SvelteExtractor,
extensions: ["svelte"]
}
];
try {

@@ -951,2 +975,3 @@ require("pug");

SupportedLayers,
SvelteExtractor,
WindiCssOptions,

@@ -953,0 +978,0 @@ applyExtractors,

{
"name": "@windicss/plugin-utils",
"version": "1.3.0",
"version": "1.4.0",
"description": "Common utils for building integrations of Windi CSS",

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

"@antfu/utils": "^0.2.4",
"@windicss/config": "1.3.0",
"@windicss/config": "1.4.0",
"debug": "^4.3.2",

@@ -29,0 +29,0 @@ "fast-glob": "^3.2.7",

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