@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.
@@ -1,12 +1,12 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, ref } from 'vue';
3
- import type { ImageProps } from '../../../types/image';
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 '../../utils/imageProcessing';
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,5 +1,5 @@
1
1
  <script lang="ts">
2
- import type { Metadata, RobotsDirective } from '../../types/metadata';
2
+ import type { Metadata, RobotsDirective } from '../../../types/metadata';
3
3
 
4
4
  let {
5
5
  title = 'AbsoluteJS',
@@ -1,11 +1,11 @@
1
1
  <script lang="ts">
2
- import type { ImageProps } from '../../types/image';
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 '../../image-client/imageClient';
8
+ } from '@absolutejs/absolute/image';
9
9
 
10
10
  let {
11
11
  src,
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import type { JsonLdSchema, WithContext } from '../../types/jsonLd';
2
+ import type { JsonLdSchema, WithContext } from '../../../types/jsonLd';
3
3
 
4
4
  let { schema }: { schema: JsonLdSchema | JsonLdSchema[] } = $props();
5
5
 
@@ -1,12 +1,12 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, ref } from 'vue';
3
- import type { ImageProps } from '../../types/image';
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 '../../image-client/imageClient';
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-fpjk72vg.vue";
78
+ var Image_default = "../../Image-a1aswang.vue";
79
79
  export {
80
80
  Image_default as Image
81
81
  };
package/package.json CHANGED
@@ -208,5 +208,5 @@
208
208
  "typecheck": "bun run vue-tsc --noEmit"
209
209
  },
210
210
  "types": "./dist/src/index.d.ts",
211
- "version": "0.19.0-beta.194"
211
+ "version": "0.19.0-beta.195"
212
212
  }
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
- const content = await Bun.file(join("src", "svelte", "components", file)).text();
118
- await Bun.write(join(DIST, "svelte", "components", file), rewriteSfcImports(content));
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
- const content = await Bun.file(join("src", "vue", "components", file)).text();
125
- await Bun.write(join(DIST, "vue", "components", file), rewriteSfcImports(content));
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...");