@lonik/oh-image 1.2.3 → 1.2.5

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/plugin.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { FormatEnum } from "sharp";
2
- import * as vite0 from "vite";
3
- import * as rollup0 from "rollup";
2
+ import { Plugin } from "vite";
4
3
 
5
4
  //#region src/plugin/types.d.ts
6
5
  interface PluginConfig extends Required<Pick<ImageOptions, "placeholder" | "bps" | "format">> {
@@ -21,18 +20,6 @@ interface ImageOptions {
21
20
  }
22
21
  //#endregion
23
22
  //#region src/plugin/plugin.d.ts
24
- declare function ohImage(options?: Partial<PluginConfig>): {
25
- name: string;
26
- configResolved(this: vite0.MinimalPluginContextWithoutEnvironment, viteConfig: vite0.ResolvedConfig): void;
27
- enforce: "pre";
28
- configureServer(this: vite0.MinimalPluginContextWithoutEnvironment, server: vite0.ViteDevServer): void;
29
- load: {
30
- filter: {
31
- id: RegExp;
32
- };
33
- handler(this: rollup0.PluginContext, id: string): Promise<string | null>;
34
- };
35
- writeBundle(this: rollup0.PluginContext): Promise<void>;
36
- };
23
+ declare function ohImage(options?: Partial<PluginConfig>): Plugin;
37
24
  //#endregion
38
25
  export { type ImageOptions, type PluginConfig, ohImage };
package/dist/plugin.js CHANGED
@@ -36,7 +36,8 @@ function queryToOptions(processKey, uri) {
36
36
  const parsed = queryString.parse(query, {
37
37
  parseBooleans: true,
38
38
  parseNumbers: true,
39
- arrayFormat: "comma"
39
+ arrayFormat: "comma",
40
+ types: { bps: "number[]" }
40
41
  });
41
42
  if (processKey in parsed) return {
42
43
  shouldProcess: true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lonik/oh-image",
3
3
  "type": "module",
4
- "version": "1.2.3",
4
+ "version": "1.2.5",
5
5
  "description": "A React component library for optimized image handling.",
6
6
  "author": "Luka Onikadze <lukonik@gmail.com>",
7
7
  "license": "MIT",