@useavalon/avalon 0.1.15 → 0.1.16

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,106 +1,106 @@
1
- /**
2
- * Type declarations for image imports with vite-imagetools
3
- *
4
- * These types enable TypeScript support for optimized image imports.
5
- * Include this in your tsconfig.json `types` array:
6
- *
7
- * ```json
8
- * {
9
- * "compilerOptions": {
10
- * "types": ["@useavalon/avalon/types"]
11
- * }
12
- * }
13
- * ```
14
- */
15
-
16
- declare module "*.jpg" {
17
- const src: string;
18
- export default src;
19
- }
20
-
21
- declare module "*.jpeg" {
22
- const src: string;
23
- export default src;
24
- }
25
-
26
- declare module "*.png" {
27
- const src: string;
28
- export default src;
29
- }
30
-
31
- declare module "*.webp" {
32
- const src: string;
33
- export default src;
34
- }
35
-
36
- declare module "*.avif" {
37
- const src: string;
38
- export default src;
39
- }
40
-
41
- declare module "*.gif" {
42
- const src: string;
43
- export default src;
44
- }
45
-
46
- declare module "*.tiff" {
47
- const src: string;
48
- export default src;
49
- }
50
-
51
- declare module "*.svg" {
52
- const src: string;
53
- export default src;
54
- }
55
-
56
- // vite-imagetools srcset output
57
- interface ImageToolsSrcset {
58
- src: string;
59
- srcset: string;
60
- width: number;
61
- height: number;
62
- }
63
-
64
- declare module "*&as=srcset" {
65
- const srcset: ImageToolsSrcset;
66
- export default srcset;
67
- }
68
-
69
- declare module "*?as=srcset" {
70
- const srcset: ImageToolsSrcset;
71
- export default srcset;
72
- }
73
-
74
- // vite-imagetools picture output (multiple formats)
75
- interface ImageToolsPicture {
76
- sources: Record<string, ImageToolsSrcset>;
77
- img: ImageToolsSrcset;
78
- }
79
-
80
- declare module "*&as=picture" {
81
- const picture: ImageToolsPicture;
82
- export default picture;
83
- }
84
-
85
- declare module "*?as=picture" {
86
- const picture: ImageToolsPicture;
87
- export default picture;
88
- }
89
-
90
- // vite-imagetools metadata output
91
- interface ImageToolsMetadata {
92
- src: string;
93
- width: number;
94
- height: number;
95
- format: string;
96
- }
97
-
98
- declare module "*&as=metadata" {
99
- const metadata: ImageToolsMetadata;
100
- export default metadata;
101
- }
102
-
103
- declare module "*?as=metadata" {
104
- const metadata: ImageToolsMetadata;
105
- export default metadata;
106
- }
1
+ /**
2
+ * Type declarations for image imports with vite-imagetools
3
+ *
4
+ * These types enable TypeScript support for optimized image imports.
5
+ * Include this in your tsconfig.json `types` array:
6
+ *
7
+ * ```json
8
+ * {
9
+ * "compilerOptions": {
10
+ * "types": ["@useavalon/avalon/types"]
11
+ * }
12
+ * }
13
+ * ```
14
+ */
15
+
16
+ declare module "*.jpg" {
17
+ const src: string;
18
+ export default src;
19
+ }
20
+
21
+ declare module "*.jpeg" {
22
+ const src: string;
23
+ export default src;
24
+ }
25
+
26
+ declare module "*.png" {
27
+ const src: string;
28
+ export default src;
29
+ }
30
+
31
+ declare module "*.webp" {
32
+ const src: string;
33
+ export default src;
34
+ }
35
+
36
+ declare module "*.avif" {
37
+ const src: string;
38
+ export default src;
39
+ }
40
+
41
+ declare module "*.gif" {
42
+ const src: string;
43
+ export default src;
44
+ }
45
+
46
+ declare module "*.tiff" {
47
+ const src: string;
48
+ export default src;
49
+ }
50
+
51
+ declare module "*.svg" {
52
+ const src: string;
53
+ export default src;
54
+ }
55
+
56
+ // vite-imagetools srcset output
57
+ interface ImageToolsSrcset {
58
+ src: string;
59
+ srcset: string;
60
+ width: number;
61
+ height: number;
62
+ }
63
+
64
+ declare module "*&as=srcset" {
65
+ const srcset: ImageToolsSrcset;
66
+ export default srcset;
67
+ }
68
+
69
+ declare module "*?as=srcset" {
70
+ const srcset: ImageToolsSrcset;
71
+ export default srcset;
72
+ }
73
+
74
+ // vite-imagetools picture output (multiple formats)
75
+ interface ImageToolsPicture {
76
+ sources: Record<string, ImageToolsSrcset>;
77
+ img: ImageToolsSrcset;
78
+ }
79
+
80
+ declare module "*&as=picture" {
81
+ const picture: ImageToolsPicture;
82
+ export default picture;
83
+ }
84
+
85
+ declare module "*?as=picture" {
86
+ const picture: ImageToolsPicture;
87
+ export default picture;
88
+ }
89
+
90
+ // vite-imagetools metadata output
91
+ interface ImageToolsMetadata {
92
+ src: string;
93
+ width: number;
94
+ height: number;
95
+ format: string;
96
+ }
97
+
98
+ declare module "*&as=metadata" {
99
+ const metadata: ImageToolsMetadata;
100
+ export default metadata;
101
+ }
102
+
103
+ declare module "*?as=metadata" {
104
+ const metadata: ImageToolsMetadata;
105
+ export default metadata;
106
+ }
@@ -1,22 +1,22 @@
1
- /**
2
- * Avalon type definitions.
3
- *
4
- * Include this in your tsconfig.json `types` array to get island prop support:
5
- *
6
- * ```json
7
- * {
8
- * "compilerOptions": {
9
- * "types": ["@useavalon/avalon/types"]
10
- * }
11
- * }
12
- * ```
13
- */
14
-
15
- // Re-export island prop types
16
- export * from './island-prop.d.ts';
17
-
18
- // Import JSX augmentations (side-effect import for type augmentation)
19
- import './island-jsx.d.ts';
20
-
21
- // Import image type declarations
22
- import './image.d.ts';
1
+ /**
2
+ * Avalon type definitions.
3
+ *
4
+ * Include this in your tsconfig.json `types` array to get island prop support:
5
+ *
6
+ * ```json
7
+ * {
8
+ * "compilerOptions": {
9
+ * "types": ["@useavalon/avalon/types"]
10
+ * }
11
+ * }
12
+ * ```
13
+ */
14
+
15
+ // Re-export island prop types
16
+ export * from './island-prop.d.ts';
17
+
18
+ // Import JSX augmentations (side-effect import for type augmentation)
19
+ import './island-jsx.d.ts';
20
+
21
+ // Import image type declarations
22
+ import './image.d.ts';
@@ -1,33 +1,33 @@
1
- /**
2
- * JSX augmentation for the `island` prop.
3
- *
4
- * Automatically included via tsconfig.json `compilerOptions.types`.
5
- */
6
-
7
- import type { IslandDirective } from './island-prop.d.ts';
8
-
9
- declare module 'preact' {
10
- namespace JSX {
11
- interface IntrinsicAttributes {
12
- island?: IslandDirective;
13
- }
14
- }
15
- }
16
-
17
- // Augment the global JSX namespace so the `island` prop is accepted on
18
- // non-Preact components (Svelte, Solid) when used in a Preact JSX context.
19
- declare global {
20
- namespace JSX {
21
- interface IntrinsicAttributes {
22
- island?: IslandDirective;
23
- }
24
- }
25
- }
26
-
27
- // Augment Vue's ComponentCustomProps so Volar accepts `island` on all Vue SFCs.
28
- declare module '@vue/runtime-core' {
29
- interface ComponentCustomProps {
30
- island?: IslandDirective;
31
- }
32
- }
33
-
1
+ /**
2
+ * JSX augmentation for the `island` prop.
3
+ *
4
+ * Automatically included via tsconfig.json `compilerOptions.types`.
5
+ */
6
+
7
+ import type { IslandDirective } from './island-prop.d.ts';
8
+
9
+ declare module 'preact' {
10
+ namespace JSX {
11
+ interface IntrinsicAttributes {
12
+ island?: IslandDirective;
13
+ }
14
+ }
15
+ }
16
+
17
+ // Augment the global JSX namespace so the `island` prop is accepted on
18
+ // non-Preact components (Svelte, Solid) when used in a Preact JSX context.
19
+ declare global {
20
+ namespace JSX {
21
+ interface IntrinsicAttributes {
22
+ island?: IslandDirective;
23
+ }
24
+ }
25
+ }
26
+
27
+ // Augment Vue's ComponentCustomProps so Volar accepts `island` on all Vue SFCs.
28
+ declare module '@vue/runtime-core' {
29
+ interface ComponentCustomProps {
30
+ island?: IslandDirective;
31
+ }
32
+ }
33
+
@@ -1,20 +1,20 @@
1
- /**
2
- * Type augmentation for the `island` prop on island components.
3
- *
4
- * When importing a component from the islands directory and using it in a page,
5
- * you can pass an `island` prop to control hydration behavior. The Vite transform
6
- * plugin intercepts this at build time and converts it to a renderIsland() call.
7
- *
8
- * Usage:
9
- * import Counter from '../islands/Counter.tsx';
10
- * <Counter island={{ condition: 'on:interaction' }} someProp={42} />
11
- */
12
-
13
- export interface IslandDirective {
14
- /** Hydration condition */
15
- condition?: 'on:visible' | 'on:interaction' | 'on:idle' | 'on:client' | `media:${string}`;
16
- /** Force SSR-only rendering without client hydration */
17
- ssrOnly?: boolean;
18
- /** Whether to render server-side (default: true) */
19
- ssr?: boolean;
20
- }
1
+ /**
2
+ * Type augmentation for the `island` prop on island components.
3
+ *
4
+ * When importing a component from the islands directory and using it in a page,
5
+ * you can pass an `island` prop to control hydration behavior. The Vite transform
6
+ * plugin intercepts this at build time and converts it to a renderIsland() call.
7
+ *
8
+ * Usage:
9
+ * import Counter from '../islands/Counter.tsx';
10
+ * <Counter island={{ condition: 'on:interaction' }} someProp={42} />
11
+ */
12
+
13
+ export interface IslandDirective {
14
+ /** Hydration condition */
15
+ condition?: 'on:visible' | 'on:interaction' | 'on:idle' | 'on:client' | `media:${string}`;
16
+ /** Force SSR-only rendering without client hydration */
17
+ ssrOnly?: boolean;
18
+ /** Whether to render server-side (default: true) */
19
+ ssr?: boolean;
20
+ }
@@ -1,6 +1,6 @@
1
- import type { ComponentType } from 'preact';
2
-
3
- declare module '*.mdx' {
4
- const MDXComponent: ComponentType<Record<string, unknown>>;
5
- export default MDXComponent;
6
- }
1
+ import type { ComponentType } from 'preact';
2
+
3
+ declare module '*.mdx' {
4
+ const MDXComponent: ComponentType<Record<string, unknown>>;
5
+ export default MDXComponent;
6
+ }
@@ -1,49 +1,49 @@
1
- /**
2
- * Global URLPattern type declaration.
3
- * URLPattern is available at runtime in Node 22+, Bun, and Deno,
4
- * but TypeScript's lib.dom.d.ts may not include it in all configurations.
5
- */
6
- declare class URLPattern {
7
- constructor(init?: URLPatternInit | string, baseURL?: string);
8
- readonly protocol: string;
9
- readonly username: string;
10
- readonly password: string;
11
- readonly hostname: string;
12
- readonly port: string;
13
- readonly pathname: string;
14
- readonly search: string;
15
- readonly hash: string;
16
- test(input?: URLPatternInput, baseURL?: string): boolean;
17
- exec(input?: URLPatternInput, baseURL?: string): URLPatternResult | null;
18
- }
19
-
20
- interface URLPatternInit {
21
- baseURL?: string;
22
- username?: string;
23
- password?: string;
24
- hostname?: string;
25
- port?: string;
26
- pathname?: string;
27
- search?: string;
28
- hash?: string;
29
- protocol?: string;
30
- }
31
-
32
- type URLPatternInput = URLPatternInit | string;
33
-
34
- interface URLPatternComponentResult {
35
- input: string;
36
- groups: Record<string, string | undefined>;
37
- }
38
-
39
- interface URLPatternResult {
40
- inputs: [URLPatternInput, string?];
41
- protocol: URLPatternComponentResult;
42
- username: URLPatternComponentResult;
43
- password: URLPatternComponentResult;
44
- hostname: URLPatternComponentResult;
45
- port: URLPatternComponentResult;
46
- pathname: URLPatternComponentResult;
47
- search: URLPatternComponentResult;
48
- hash: URLPatternComponentResult;
49
- }
1
+ /**
2
+ * Global URLPattern type declaration.
3
+ * URLPattern is available at runtime in Node 22+, Bun, and Deno,
4
+ * but TypeScript's lib.dom.d.ts may not include it in all configurations.
5
+ */
6
+ declare class URLPattern {
7
+ constructor(init?: URLPatternInit | string, baseURL?: string);
8
+ readonly protocol: string;
9
+ readonly username: string;
10
+ readonly password: string;
11
+ readonly hostname: string;
12
+ readonly port: string;
13
+ readonly pathname: string;
14
+ readonly search: string;
15
+ readonly hash: string;
16
+ test(input?: URLPatternInput, baseURL?: string): boolean;
17
+ exec(input?: URLPatternInput, baseURL?: string): URLPatternResult | null;
18
+ }
19
+
20
+ interface URLPatternInit {
21
+ baseURL?: string;
22
+ username?: string;
23
+ password?: string;
24
+ hostname?: string;
25
+ port?: string;
26
+ pathname?: string;
27
+ search?: string;
28
+ hash?: string;
29
+ protocol?: string;
30
+ }
31
+
32
+ type URLPatternInput = URLPatternInit | string;
33
+
34
+ interface URLPatternComponentResult {
35
+ input: string;
36
+ groups: Record<string, string | undefined>;
37
+ }
38
+
39
+ interface URLPatternResult {
40
+ inputs: [URLPatternInput, string?];
41
+ protocol: URLPatternComponentResult;
42
+ username: URLPatternComponentResult;
43
+ password: URLPatternComponentResult;
44
+ hostname: URLPatternComponentResult;
45
+ port: URLPatternComponentResult;
46
+ pathname: URLPatternComponentResult;
47
+ search: URLPatternComponentResult;
48
+ hash: URLPatternComponentResult;
49
+ }
@@ -1,11 +1,11 @@
1
- /// <reference types="vite/client" />
2
-
3
- interface ImportMetaEnv {
4
- readonly VITE_APP_TITLE: string;
5
- // more env variables...
6
- }
7
-
8
- interface ImportMeta {
9
- readonly env: ImportMetaEnv;
10
- readonly hot?: import('vite/types/hot').ViteHotContext;
11
- }
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_APP_TITLE: string;
5
+ // more env variables...
6
+ }
7
+
8
+ interface ImportMeta {
9
+ readonly env: ImportMetaEnv;
10
+ readonly hot?: import('vite/types/hot').ViteHotContext;
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useavalon/avalon",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Multi-framework islands architecture for the modern web",
5
5
  "license": "MIT",
6
6
  "type": "module",