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

@stylable/core

Package Overview
Dependencies
Maintainers
5
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylable/core - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

8

cjs/stylable.d.ts

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

import { StylableOptimizer } from '@stylable/optimizer';
import { FileProcessor, MinimalFS } from './cached-process-file';

@@ -7,2 +6,3 @@ import { Diagnostics } from './diagnostics';

import { Options, StylableResults, StylableTransformer, TransformHooks } from './stylable-transformer';
import { IStylableOptimizer } from './types';
export interface StylableConfig {

@@ -21,3 +21,3 @@ projectRoot: string;

};
optimizer?: StylableOptimizer;
optimizer?: IStylableOptimizer;
mode?: 'production' | 'development';

@@ -35,3 +35,3 @@ resolveNamespace?: typeof processNamespace;

protected resolveOptions: any;
optimizer?: StylableOptimizer | undefined;
optimizer?: IStylableOptimizer | undefined;
protected mode: 'production' | 'development';

@@ -43,3 +43,3 @@ protected resolveNamespace?: typeof processNamespace | undefined;

resolvePath: (ctx: string | undefined, path: string) => string;
constructor(projectRoot: string, fileSystem: MinimalFS, requireModule: (path: string) => any, delimiter?: string, onProcess?: ((meta: StylableMeta, path: string) => StylableMeta) | undefined, diagnostics?: Diagnostics, hooks?: TransformHooks, resolveOptions?: any, optimizer?: StylableOptimizer | undefined, mode?: 'production' | 'development', resolveNamespace?: typeof processNamespace | undefined);
constructor(projectRoot: string, fileSystem: MinimalFS, requireModule: (path: string) => any, delimiter?: string, onProcess?: ((meta: StylableMeta, path: string) => StylableMeta) | undefined, diagnostics?: Diagnostics, hooks?: TransformHooks, resolveOptions?: any, optimizer?: IStylableOptimizer | undefined, mode?: 'production' | 'development', resolveNamespace?: typeof processNamespace | undefined);
createTransformer(options?: Partial<Options>): StylableTransformer;

@@ -46,0 +46,0 @@ transform(meta: StylableMeta): StylableResults;

@@ -0,1 +1,4 @@

import * as postcss from 'postcss';
import { StylableMeta } from './stylable-meta';
import { StylableResults } from './stylable-transformer';
export declare type Pojo<T = any> = {

@@ -23,2 +26,23 @@ [key: string]: T;

}
export interface IStylableOptimizer {
classNameOptimizer: IStylableClassNameOptimizer;
namespaceOptimizer: IStylableNamespaceOptimizer;
minifyCSS(css: string): string;
optimize(config: object, stylableResult: StylableResults, delimiter?: string, usageMapping?: Pojo<boolean>): void;
removeStylableDirectives(root: postcss.Root, shouldComment: boolean): void;
}
export interface IStylableClassNameOptimizer {
context: {
names: Pojo<string>;
};
rewriteSelector(selector: string, namespace: string, globals: Pojo<boolean>): string;
generateName(name: string): string;
optimizeAstAndExports(ast: postcss.Root, exported: Pojo<string>, classes: string[], namespace: string, globals?: Pojo<boolean>): void;
}
export interface IStylableNamespaceOptimizer {
index: number;
namespacePrefix: string;
namespaceMapping: Pojo<string>;
getNamespace(meta: StylableMeta, ..._env: any[]): string;
}
//# sourceMappingURL=types.d.ts.map
{
"name": "@stylable/core",
"version": "2.0.0",
"version": "2.0.1",
"description": "CSS for Components",

@@ -50,3 +50,3 @@ "main": "./cjs/index.js",

"license": "BSD-3-Clause",
"gitHead": "feb73fcd4e1045b44b095f589638892859d3ffd7"
"gitHead": "f1a673b3959d9cf4dc670ff011686740557e8f36"
}

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

import { StylableOptimizer } from '@stylable/optimizer';
import { FileProcessor, MinimalFS } from './cached-process-file';

@@ -14,2 +13,3 @@ import { createInfrastructure } from './create-infra-structure';

} from './stylable-transformer';
import { IStylableOptimizer } from './types';

@@ -29,3 +29,3 @@ export interface StylableConfig {

};
optimizer?: StylableOptimizer;
optimizer?: IStylableOptimizer;
mode?: 'production' | 'development';

@@ -68,3 +68,3 @@ resolveNamespace?: typeof processNamespace;

protected resolveOptions: any = {},
public optimizer?: StylableOptimizer,
public optimizer?: IStylableOptimizer,
protected mode: 'production' | 'development' = 'production',

@@ -71,0 +71,0 @@ protected resolveNamespace?: typeof processNamespace

@@ -0,1 +1,5 @@

import * as postcss from 'postcss';
import { StylableMeta } from './stylable-meta';
import { StylableResults } from './stylable-transformer';
export type Pojo<T = any> = { [key: string]: T } & object;

@@ -25,1 +29,36 @@ export type PartialObject<T> = Partial<T> & object;

}
export interface IStylableOptimizer {
classNameOptimizer: IStylableClassNameOptimizer;
namespaceOptimizer: IStylableNamespaceOptimizer;
minifyCSS(css: string): string;
optimize(
config: object,
stylableResult: StylableResults,
delimiter?: string,
usageMapping?: Pojo<boolean>
): void;
removeStylableDirectives(root: postcss.Root, shouldComment: boolean): void;
}
export interface IStylableClassNameOptimizer {
context: {
names: Pojo<string>
};
rewriteSelector(selector: string, namespace: string, globals: Pojo<boolean>): string;
generateName(name: string): string;
optimizeAstAndExports(
ast: postcss.Root,
exported: Pojo<string>,
classes: string[],
namespace: string,
globals?: Pojo<boolean>
): void;
}
export interface IStylableNamespaceOptimizer {
index: number;
namespacePrefix: string;
namespaceMapping: Pojo<string>;
getNamespace(meta: StylableMeta, ..._env: any[]): string;
}

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