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.
@@ -0,0 +1,4 @@
1
+ export declare const components: Record<string, {
2
+ path: string;
3
+ classes: string[];
4
+ }>;
@@ -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;
@@ -0,0 +1,3 @@
1
+ export { default as OptimizeCssPlugin } from "./plugins/OptimizeCssPlugin";
2
+ export { optimizeCss } from "./plugins/optimize-css";
3
+ export { optimizeImports } from "./preprocessors/optimize-imports";
@@ -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 {};
@@ -0,0 +1,3 @@
1
+ import type { Plugin } from "vite";
2
+ import type { OptimizeCssOptions } from "./create-optimized-css";
3
+ export declare const optimizeCss: (options?: OptimizeCssOptions) => Plugin;
@@ -0,0 +1,5 @@
1
+ export declare function printDiff(props: {
2
+ original_css: Uint8Array | Buffer | string;
3
+ optimized_css: string;
4
+ id: string;
5
+ }): void;
@@ -0,0 +1,2 @@
1
+ import type { SveltePreprocessor } from "svelte/types/compiler/preprocess";
2
+ export declare const optimizeImports: SveltePreprocessor<"script">;
@@ -0,0 +1,3 @@
1
+ export declare function isSvelteFile(id: string): id is `${string}.svelte`;
2
+ export declare function isCssFile(id: string): id is `${string}.css`;
3
+ export declare function isCarbonSvelteImport(id: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-preprocess-svelte",
3
- "version": "0.11.21",
3
+ "version": "0.11.22",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Svelte preprocessors for the Carbon Design System",
6
6
  "author": "Eric Liu (https://github.com/metonym)",