@richiesams/vitepress-plugin-images 0.1.0 → 0.1.1
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/cache.d.ts +1 -1
- package/dist/imageData.d.ts +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +4 -4
- package/dist/loader.d.ts +1 -1
- package/dist/loader.js +4 -4
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.js +2 -2
- package/dist/presets.d.ts +1 -1
- package/dist/runtime/OptimizedImage.d.ts +1 -1
- package/dist/runtime/register.js +1 -1
- package/dist/sharp.d.ts +1 -1
- package/dist/sharp.js +1 -1
- package/dist/transform.d.ts +1 -1
- package/package.json +1 -1
package/dist/cache.d.ts
CHANGED
package/dist/imageData.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { OptimizedImageData } from "./types";
|
|
1
|
+
export type { OptimizedImageData } from "./types.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { optimizedImagesPlugin } from "./plugin";
|
|
2
|
-
export { defaultPresets } from "./presets";
|
|
3
|
-
export type { OptimizedImageData } from "./imageData";
|
|
4
|
-
export type { OptimizedImagePreset, OptimizedImagesPluginOptions } from "./types";
|
|
5
|
-
export { OptimizedImage } from "./runtime/OptimizedImage";
|
|
6
|
-
export { registerOptimizedImageComponent } from "./runtime/register";
|
|
1
|
+
export { optimizedImagesPlugin } from "./plugin.js";
|
|
2
|
+
export { defaultPresets } from "./presets.js";
|
|
3
|
+
export type { OptimizedImageData } from "./imageData.js";
|
|
4
|
+
export type { OptimizedImagePreset, OptimizedImagesPluginOptions } from "./types.js";
|
|
5
|
+
export { OptimizedImage } from "./runtime/OptimizedImage.js";
|
|
6
|
+
export { registerOptimizedImageComponent } from "./runtime/register.js";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { optimizedImagesPlugin } from "./plugin";
|
|
2
|
-
export { defaultPresets } from "./presets";
|
|
3
|
-
export { OptimizedImage } from "./runtime/OptimizedImage";
|
|
4
|
-
export { registerOptimizedImageComponent } from "./runtime/register";
|
|
1
|
+
export { optimizedImagesPlugin } from "./plugin.js";
|
|
2
|
+
export { defaultPresets } from "./presets.js";
|
|
3
|
+
export { OptimizedImage } from "./runtime/OptimizedImage.js";
|
|
4
|
+
export { registerOptimizedImageComponent } from "./runtime/register.js";
|
package/dist/loader.d.ts
CHANGED
package/dist/loader.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { ImageProcessCache } from "./cache";
|
|
3
|
-
import { defaultPresets, resolvePreset } from "./presets";
|
|
4
|
-
import { processImageWithSharp, toBuildAssetPath } from "./sharp";
|
|
5
|
-
import { ensureStartsWithSlash, isImagePath, normalizePathForId, parseQuery, stripQuery, } from "./utils";
|
|
2
|
+
import { ImageProcessCache } from "./cache.js";
|
|
3
|
+
import { defaultPresets, resolvePreset } from "./presets.js";
|
|
4
|
+
import { processImageWithSharp, toBuildAssetPath } from "./sharp.js";
|
|
5
|
+
import { ensureStartsWithSlash, isImagePath, normalizePathForId, parseQuery, stripQuery, } from "./utils.js";
|
|
6
6
|
const QUERY_FLAG = "optimized-image";
|
|
7
7
|
const DEV_ROUTE_PREFIX = "/@optimized-images/";
|
|
8
8
|
function makeDevUrl(fileName) {
|
package/dist/plugin.d.ts
CHANGED
package/dist/plugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createImageLoaderPlugin } from "./loader";
|
|
2
|
-
import { transformOptimizedImages } from "./transform";
|
|
1
|
+
import { createImageLoaderPlugin } from "./loader.js";
|
|
2
|
+
import { transformOptimizedImages } from "./transform.js";
|
|
3
3
|
export function optimizedImagesPlugin(options = {}) {
|
|
4
4
|
const componentName = options.componentName ?? "OptimizedImage";
|
|
5
5
|
return [
|
package/dist/presets.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { OptimizedImagePreset, ResolvedPreset } from "./types";
|
|
1
|
+
import type { OptimizedImagePreset, ResolvedPreset } from "./types.js";
|
|
2
2
|
export declare const defaultPresets: Record<string, OptimizedImagePreset>;
|
|
3
3
|
export declare function resolvePreset(presets: Record<string, OptimizedImagePreset>, presetName: string): ResolvedPreset;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PropType } from "vue";
|
|
2
|
-
import type { OptimizedImageData } from "../types";
|
|
2
|
+
import type { OptimizedImageData } from "../types.js";
|
|
3
3
|
export declare const OptimizedImage: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
4
|
image: {
|
|
5
5
|
type: PropType<OptimizedImageData>;
|
package/dist/runtime/register.js
CHANGED
package/dist/sharp.d.ts
CHANGED
package/dist/sharp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import sharp from "sharp";
|
|
4
|
-
import { hash } from "./utils";
|
|
4
|
+
import { hash } from "./utils.js";
|
|
5
5
|
const PLUGIN_VERSION = "0.1.0";
|
|
6
6
|
export async function processImageWithSharp(input) {
|
|
7
7
|
const stat = await fs.stat(input.sourcePath);
|
package/dist/transform.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { TransformResult } from "./types";
|
|
1
|
+
import type { TransformResult } from "./types.js";
|
|
2
2
|
export declare function transformOptimizedImages(code: string, id: string, componentName: string): TransformResult | null;
|