@absolutejs/absolute 0.19.0-beta.194 → 0.19.0-beta.195
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/{Image-fpjk72vg.vue → Image-a1aswang.vue} +2 -2
- package/dist/src/utils/imageClient.d.ts +1 -0
- package/dist/svelte/components/Head.svelte +1 -1
- package/dist/svelte/components/Image.svelte +2 -2
- package/dist/svelte/components/JsonLd.svelte +1 -1
- package/dist/vue/components/Image.vue +2 -2
- package/dist/vue/components/index.js +1 -1
- package/package.json +1 -1
- package/scripts/build.ts +8 -18
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, ref } from 'vue';
|
|
3
|
-
import type { ImageProps } from '
|
|
3
|
+
import type { ImageProps } from '@absolutejs/absolute/image';
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_QUALITY,
|
|
6
6
|
buildOptimizedUrl,
|
|
7
7
|
generateBlurSvg,
|
|
8
8
|
generateSrcSet
|
|
9
|
-
} from '
|
|
9
|
+
} from '@absolutejs/absolute/image';
|
|
10
10
|
|
|
11
11
|
const props = withDefaults(defineProps<ImageProps>(), {
|
|
12
12
|
quality: DEFAULT_QUALITY,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Client-safe image utilities — no node:fs, no Sharp, no Bun APIs.
|
|
3
3
|
* These can be imported in both server and client (browser) contexts.
|
|
4
4
|
*/
|
|
5
|
+
export type { ImageProps } from '../../types/image';
|
|
5
6
|
export declare const DEFAULT_DEVICE_SIZES: number[];
|
|
6
7
|
export declare const DEFAULT_IMAGE_SIZES: number[];
|
|
7
8
|
export declare const DEFAULT_QUALITY = 75;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type { ImageProps } from '
|
|
2
|
+
import type { ImageProps } from '@absolutejs/absolute/image';
|
|
3
3
|
import {
|
|
4
4
|
DEFAULT_QUALITY,
|
|
5
5
|
buildOptimizedUrl,
|
|
6
6
|
generateBlurSvg,
|
|
7
7
|
generateSrcSet
|
|
8
|
-
} from '
|
|
8
|
+
} from '@absolutejs/absolute/image';
|
|
9
9
|
|
|
10
10
|
let {
|
|
11
11
|
src,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, ref } from 'vue';
|
|
3
|
-
import type { ImageProps } from '
|
|
3
|
+
import type { ImageProps } from '@absolutejs/absolute/image';
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_QUALITY,
|
|
6
6
|
buildOptimizedUrl,
|
|
7
7
|
generateBlurSvg,
|
|
8
8
|
generateSrcSet
|
|
9
|
-
} from '
|
|
9
|
+
} from '@absolutejs/absolute/image';
|
|
10
10
|
|
|
11
11
|
const props = withDefaults(defineProps<ImageProps>(), {
|
|
12
12
|
quality: DEFAULT_QUALITY,
|
|
@@ -75,7 +75,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
75
75
|
var __require = import.meta.require;
|
|
76
76
|
|
|
77
77
|
// src/vue/components/Image.vue
|
|
78
|
-
var Image_default = "../../Image-
|
|
78
|
+
var Image_default = "../../Image-a1aswang.vue";
|
|
79
79
|
export {
|
|
80
80
|
Image_default as Image
|
|
81
81
|
};
|
package/package.json
CHANGED
package/scripts/build.ts
CHANGED
|
@@ -97,32 +97,22 @@ async function build() {
|
|
|
97
97
|
await mkdir(join(DIST, "dev"), { recursive: true });
|
|
98
98
|
await cp("src/dev/client", join(DIST, "dev", "client"), { recursive: true });
|
|
99
99
|
|
|
100
|
-
// Copy .svelte and .vue SFC files, rewriting relative imports to match
|
|
101
|
-
// dist/ layout. Source files import from e.g. "../../utils/imageProcessing"
|
|
102
|
-
// which resolves in src/ but not in dist/ (where JS lands under dist/src/).
|
|
103
|
-
const rewriteSfcImports = (content: string) =>
|
|
104
|
-
content
|
|
105
|
-
.replace(
|
|
106
|
-
/from\s+(['"])\.\.\/\.\.\/utils\/imageProcessing['"]/g,
|
|
107
|
-
"from $1../../image-client/imageClient$1",
|
|
108
|
-
)
|
|
109
|
-
.replace(
|
|
110
|
-
/from\s+(['"])\.\.\/\.\.\/\.\.\/types\//g,
|
|
111
|
-
"from $1../../types/",
|
|
112
|
-
);
|
|
113
|
-
|
|
114
100
|
await mkdir(join(DIST, "svelte", "components"), { recursive: true });
|
|
115
101
|
const svelteFiles = await readdir("src/svelte/components");
|
|
116
102
|
for (const file of svelteFiles.filter((f) => f.endsWith(".svelte"))) {
|
|
117
|
-
|
|
118
|
-
|
|
103
|
+
await cp(
|
|
104
|
+
join("src", "svelte", "components", file),
|
|
105
|
+
join(DIST, "svelte", "components", file),
|
|
106
|
+
);
|
|
119
107
|
}
|
|
120
108
|
|
|
121
109
|
await mkdir(join(DIST, "vue", "components"), { recursive: true });
|
|
122
110
|
const vueFiles = await readdir("src/vue/components");
|
|
123
111
|
for (const file of vueFiles.filter((f) => f.endsWith(".vue"))) {
|
|
124
|
-
|
|
125
|
-
|
|
112
|
+
await cp(
|
|
113
|
+
join("src", "vue", "components", file),
|
|
114
|
+
join(DIST, "vue", "components", file),
|
|
115
|
+
);
|
|
126
116
|
}
|
|
127
117
|
|
|
128
118
|
console.log("Verifying exports...");
|