carbon-preprocess-svelte 0.11.21 → 0.11.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component-index.d.ts +4 -0
- package/dist/constants.d.ts +9 -0
- package/dist/index.d.ts +3 -0
- package/dist/plugins/OptimizeCssPlugin.d.ts +8 -0
- package/dist/plugins/create-optimized-css.d.ts +30 -0
- package/dist/plugins/optimize-css.d.ts +3 -0
- package/dist/plugins/print-diff.d.ts +5 -0
- package/dist/preprocessors/optimize-imports.d.ts +2 -0
- package/dist/utils.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CarbonSvelte: {
|
|
2
|
+
readonly Components: "carbon-components-svelte";
|
|
3
|
+
readonly Icons: "carbon-icons-svelte";
|
|
4
|
+
readonly Pictograms: "carbon-pictograms-svelte";
|
|
5
|
+
};
|
|
6
|
+
export declare const CARBON_PREFIX: RegExp;
|
|
7
|
+
export declare const RE_EXT_SVELTE: RegExp;
|
|
8
|
+
export declare const RE_EXT_CSS: RegExp;
|
|
9
|
+
export declare const BITS_DENOM = 1000;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Compiler } from "webpack";
|
|
2
|
+
import type { OptimizeCssOptions } from "./create-optimized-css";
|
|
3
|
+
declare class OptimizeCssPlugin {
|
|
4
|
+
private options;
|
|
5
|
+
constructor(options?: OptimizeCssOptions);
|
|
6
|
+
apply(compiler: Compiler): void;
|
|
7
|
+
}
|
|
8
|
+
export default OptimizeCssPlugin;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type OptimizeCssOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* By default, the plugin will print the size
|
|
4
|
+
* difference between the original and optimized CSS.
|
|
5
|
+
*
|
|
6
|
+
* Set to `false` to disable verbose logging.
|
|
7
|
+
* @default true
|
|
8
|
+
*/
|
|
9
|
+
verbose?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* By default, pre-compiled Carbon StyleSheets ship `@font-face` rules
|
|
12
|
+
* for all available IBM Plex fonts, many of which are not actually
|
|
13
|
+
* used in Carbon Svelte components.
|
|
14
|
+
*
|
|
15
|
+
* The default behavior is to preserve the following IBM Plex fonts:
|
|
16
|
+
* - IBM Plex Sans (300/400/600-weight and normal-font-style rules)
|
|
17
|
+
* - IBM Plex Mono (400-weight and normal-font-style rules)
|
|
18
|
+
*
|
|
19
|
+
* Set to `true` to disable this behavior and
|
|
20
|
+
* retain *all* IBM Plex `@font-face` rules.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
preserveAllIBMFonts?: boolean;
|
|
24
|
+
};
|
|
25
|
+
type CreateOptimizedCssOptions = OptimizeCssOptions & {
|
|
26
|
+
source: Uint8Array | string;
|
|
27
|
+
ids: string[];
|
|
28
|
+
};
|
|
29
|
+
export declare function createOptimizedCss(options: CreateOptimizedCssOptions): string;
|
|
30
|
+
export {};
|
package/dist/utils.d.ts
ADDED