@useavalon/avalon 0.1.22 → 0.1.24
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/mod.d.ts +50 -0
- package/dist/src/build/integration-bundler-plugin.d.ts +25 -0
- package/dist/src/build/integration-config.d.ts +44 -0
- package/dist/src/build/integration-detection-plugin.d.ts +20 -0
- package/dist/src/build/integration-resolver-plugin.d.ts +10 -0
- package/dist/src/build/island-manifest.d.ts +57 -0
- package/dist/src/build/island-types-generator.d.ts +49 -0
- package/dist/src/build/mdx-island-transform.d.ts +23 -0
- package/dist/src/build/mdx-plugin.d.ts +36 -0
- package/dist/src/build/page-island-transform.d.ts +41 -0
- package/dist/src/build/prop-extractors/index.d.ts +8 -0
- package/dist/src/build/prop-extractors/lit.d.ts +11 -0
- package/dist/src/build/prop-extractors/qwik.d.ts +9 -0
- package/dist/src/build/prop-extractors/solid.d.ts +12 -0
- package/dist/src/build/prop-extractors/svelte.d.ts +13 -0
- package/dist/src/build/prop-extractors/vue.d.ts +19 -0
- package/dist/src/build/sidecar-file-manager.d.ts +23 -0
- package/dist/src/build/sidecar-renderer.d.ts +22 -0
- package/dist/src/client/adapters/index.d.ts +15 -0
- package/dist/src/client/components.d.ts +21 -0
- package/dist/src/client/css-hmr-handler.d.ts +94 -0
- package/dist/src/client/framework-adapter.d.ts +225 -0
- package/dist/src/client/hmr-coordinator.d.ts +88 -0
- package/dist/src/components/Image.d.ts +61 -0
- package/dist/src/components/IslandErrorBoundary.d.ts +37 -0
- package/dist/src/components/IslandErrorBoundary.js +1 -1
- package/dist/src/components/LayoutDataErrorBoundary.d.ts +34 -0
- package/dist/src/components/LayoutDataErrorBoundary.js +1 -1
- package/dist/src/components/LayoutErrorBoundary.d.ts +25 -0
- package/dist/src/components/LayoutErrorBoundary.js +1 -1
- package/dist/src/components/PersistentIsland.d.ts +36 -0
- package/dist/src/components/StreamingErrorBoundary.d.ts +42 -0
- package/dist/src/components/StreamingErrorBoundary.js +1 -1
- package/dist/src/components/StreamingLayout.d.ts +83 -0
- package/dist/src/components/StreamingLayout.js +1 -1
- package/dist/src/core/components/component-analyzer.d.ts +48 -0
- package/dist/src/core/components/component-detection.d.ts +72 -0
- package/dist/src/core/components/enhanced-framework-detector.d.ts +78 -0
- package/dist/src/core/components/framework-registry.d.ts +114 -0
- package/dist/src/core/content/mdx-processor.d.ts +14 -0
- package/dist/src/core/integrations/index.d.ts +6 -0
- package/dist/src/core/integrations/loader.d.ts +35 -0
- package/dist/src/core/integrations/registry.d.ts +51 -0
- package/dist/src/core/islands/island-persistence.d.ts +74 -0
- package/dist/src/core/islands/island-state-serializer.d.ts +53 -0
- package/dist/src/core/islands/persistent-island-context.d.ts +36 -0
- package/dist/src/core/islands/use-persistent-state.d.ts +17 -0
- package/dist/src/core/layout/enhanced-layout-resolver.d.ts +73 -0
- package/dist/src/core/layout/layout-cache-manager.d.ts +66 -0
- package/dist/src/core/layout/layout-composer.d.ts +63 -0
- package/dist/src/core/layout/layout-data-loader.d.ts +146 -0
- package/dist/src/core/layout/layout-discovery.d.ts +51 -0
- package/dist/src/core/layout/layout-matcher.d.ts +77 -0
- package/dist/src/core/layout/layout-types.d.ts +94 -0
- package/dist/src/core/modules/framework-module-resolver.d.ts +85 -0
- package/dist/src/islands/component-analysis.d.ts +38 -0
- package/dist/src/islands/css-utils.d.ts +81 -0
- package/dist/src/islands/discovery/index.d.ts +16 -0
- package/dist/src/islands/discovery/registry.d.ts +141 -0
- package/dist/src/islands/discovery/resolver.d.ts +190 -0
- package/dist/src/islands/discovery/scanner.d.ts +55 -0
- package/dist/src/islands/discovery/types.d.ts +92 -0
- package/dist/src/islands/discovery/validator.d.ts +89 -0
- package/dist/src/islands/discovery/watcher.d.ts +95 -0
- package/dist/src/islands/framework-detection.d.ts +53 -0
- package/dist/src/islands/integration-loader.d.ts +139 -0
- package/dist/src/islands/island.d.ts +55 -0
- package/dist/src/islands/render-cache.d.ts +203 -0
- package/dist/src/islands/types.d.ts +63 -0
- package/dist/src/islands/universal-css-collector.d.ts +41 -0
- package/dist/src/islands/universal-head-collector.d.ts +42 -0
- package/dist/src/layout-system.d.ts +92 -592
- package/dist/src/middleware/discovery.d.ts +70 -0
- package/dist/src/middleware/executor.d.ts +52 -0
- package/dist/src/middleware/index.d.ts +43 -0
- package/dist/src/middleware/types.d.ts +89 -0
- package/dist/src/nitro/build-config.d.ts +163 -0
- package/dist/src/nitro/config.d.ts +268 -0
- package/dist/src/nitro/error-handler.d.ts +151 -0
- package/dist/src/nitro/index.d.ts +15 -0
- package/dist/src/nitro/island-manifest.d.ts +191 -0
- package/dist/src/nitro/middleware-adapter.d.ts +151 -0
- package/dist/src/nitro/renderer.d.ts +342 -0
- package/dist/src/nitro/route-discovery.d.ts +142 -0
- package/dist/src/nitro/types.d.ts +278 -0
- package/dist/src/render/collect-css.d.ts +28 -0
- package/dist/src/render/error-pages.d.ts +14 -0
- package/dist/src/render/isolated-ssr-renderer.d.ts +127 -0
- package/dist/src/render/ssr.d.ts +56 -0
- package/dist/src/schemas/api.d.ts +27 -0
- package/dist/src/schemas/core.d.ts +75 -0
- package/dist/src/schemas/index.d.ts +79 -0
- package/dist/src/schemas/index.js +1 -1
- package/dist/src/schemas/layout.d.ts +282 -0
- package/dist/src/schemas/routing/index.d.ts +181 -0
- package/dist/src/schemas/routing.d.ts +388 -0
- package/dist/src/types/as-island.d.ts +17 -0
- package/dist/src/types/layout.d.ts +177 -0
- package/dist/src/types/routing.d.ts +297 -0
- package/dist/src/types/types.d.ts +6 -0
- package/dist/src/utils/dev-logger.d.ts +84 -0
- package/dist/src/utils/fs.d.ts +41 -0
- package/dist/src/vite-plugin/auto-discover.d.ts +72 -0
- package/dist/src/vite-plugin/config.d.ts +82 -0
- package/dist/src/vite-plugin/errors.d.ts +62 -0
- package/dist/src/vite-plugin/image-optimization.d.ts +36 -0
- package/dist/src/vite-plugin/integration-activator.d.ts +48 -0
- package/dist/src/vite-plugin/island-sidecar-plugin.d.ts +17 -0
- package/dist/src/vite-plugin/module-discovery.d.ts +66 -0
- package/dist/src/vite-plugin/nitro-integration.d.ts +56 -0
- package/dist/src/vite-plugin/nitro-integration.js +1 -1
- package/dist/src/vite-plugin/plugin.d.ts +51 -0
- package/dist/src/vite-plugin/types.d.ts +281 -0
- package/dist/src/vite-plugin/validation.d.ts +93 -0
- package/package.json +33 -9
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { JSX } from "preact";
|
|
2
|
+
import type { AnalyzerOptions } from "../core/components/component-analyzer.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Framework type for island components
|
|
5
|
+
* Represents the supported UI frameworks for island architecture
|
|
6
|
+
*/
|
|
7
|
+
export type Framework = "solid" | "vue" | "svelte" | "preact" | "react" | "lit" | "qwik" | "unknown";
|
|
8
|
+
/**
|
|
9
|
+
* Props for the Island component
|
|
10
|
+
* Defines the configuration for rendering an interactive island component
|
|
11
|
+
*/
|
|
12
|
+
export interface IslandProps {
|
|
13
|
+
/** Path to the island component (e.g., "/islands/Counter.tsx") */
|
|
14
|
+
src: string;
|
|
15
|
+
/** Hydration condition */
|
|
16
|
+
condition?: "on:visible" | "on:interaction" | "on:idle" | "on:client" | `media:${string}`;
|
|
17
|
+
/** Props to pass to the island component */
|
|
18
|
+
props?: Record<string, unknown>;
|
|
19
|
+
/** Children to render inside the island (for SSR) */
|
|
20
|
+
children?: JSX.Element | JSX.Element[] | string;
|
|
21
|
+
/** Whether to render server-side (default: true unless condition is 'on:client') */
|
|
22
|
+
ssr?: boolean;
|
|
23
|
+
/** Framework hint for client hydration */
|
|
24
|
+
framework?: "solid" | "vue" | "preact" | "react" | "svelte" | "lit" | "qwik";
|
|
25
|
+
/** Force SSR-only rendering without hydration */
|
|
26
|
+
ssrOnly?: boolean;
|
|
27
|
+
/** Component render options for intelligent detection */
|
|
28
|
+
renderOptions?: AnalyzerOptions;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Parameters for framework-specific render functions
|
|
32
|
+
* Used by all framework renderers to maintain consistent interface
|
|
33
|
+
*/
|
|
34
|
+
export interface RenderParams {
|
|
35
|
+
/** Path to the island component */
|
|
36
|
+
src: string;
|
|
37
|
+
/** Hydration condition */
|
|
38
|
+
condition: IslandProps["condition"];
|
|
39
|
+
/** Props to pass to the component */
|
|
40
|
+
props: Record<string, unknown>;
|
|
41
|
+
/** Whether to render server-side */
|
|
42
|
+
ssr: boolean;
|
|
43
|
+
/** Component render options for intelligent detection */
|
|
44
|
+
renderOptions?: AnalyzerOptions;
|
|
45
|
+
/** Force SSR-only rendering without hydration */
|
|
46
|
+
ssrOnly?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Entry in the Svelte SSR CSS collection
|
|
50
|
+
* Tracks CSS for Svelte components during server-side rendering
|
|
51
|
+
*/
|
|
52
|
+
export interface SvelteSSRCSSEntry {
|
|
53
|
+
/** The CSS content */
|
|
54
|
+
css: string;
|
|
55
|
+
/** Unique scope identifier for the component */
|
|
56
|
+
scopeId: string;
|
|
57
|
+
/** Source path of the component */
|
|
58
|
+
src: string;
|
|
59
|
+
/** Whether this is global CSS */
|
|
60
|
+
isGlobal: boolean;
|
|
61
|
+
/** Timestamp when the CSS was added */
|
|
62
|
+
timestamp: number;
|
|
63
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Universal CSS Collector
|
|
3
|
+
*
|
|
4
|
+
* Collects and manages CSS from all framework integrations (Vue, Svelte, Solid, Preact)
|
|
5
|
+
* during SSR rendering. Provides a unified interface for CSS injection into the document head.
|
|
6
|
+
*/
|
|
7
|
+
declare global {
|
|
8
|
+
var __universalSSRCSS: Map<string, UniversalCSSEntry> | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface UniversalCSSEntry {
|
|
11
|
+
css: string;
|
|
12
|
+
scopeId: string;
|
|
13
|
+
src: string;
|
|
14
|
+
framework: string;
|
|
15
|
+
timestamp: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Add CSS from any framework integration to the global collection
|
|
19
|
+
*/
|
|
20
|
+
export declare function addUniversalCSS(css: string, src: string, framework: string, scopeId?: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Get all collected CSS from all frameworks
|
|
23
|
+
*/
|
|
24
|
+
export declare function getUniversalCSS(clear?: boolean): string;
|
|
25
|
+
/**
|
|
26
|
+
* Get CSS formatted for document head injection
|
|
27
|
+
*/
|
|
28
|
+
export declare function getUniversalCSSForHead(clear?: boolean): string;
|
|
29
|
+
/**
|
|
30
|
+
* Clear all collected CSS
|
|
31
|
+
*/
|
|
32
|
+
export declare function clearUniversalCSS(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Get CSS statistics
|
|
35
|
+
*/
|
|
36
|
+
export declare function getUniversalCSSStats(): {
|
|
37
|
+
totalComponents: number;
|
|
38
|
+
byFramework: Record<string, number>;
|
|
39
|
+
totalCSSSize: number;
|
|
40
|
+
averageCSSSize: number;
|
|
41
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Universal Head Content Collector for SSR
|
|
3
|
+
*
|
|
4
|
+
* Collects head content (scripts, meta tags, etc.) from framework integrations
|
|
5
|
+
* during SSR and injects them into the HTML head.
|
|
6
|
+
*
|
|
7
|
+
* Similar to universal-css-collector.ts but for head content.
|
|
8
|
+
*/
|
|
9
|
+
interface HeadEntry {
|
|
10
|
+
content: string;
|
|
11
|
+
src: string;
|
|
12
|
+
framework: string;
|
|
13
|
+
type: 'script' | 'meta' | 'link' | 'other';
|
|
14
|
+
}
|
|
15
|
+
declare global {
|
|
16
|
+
var __universalSSRHead: Map<string, HeadEntry>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Add head content to the universal collector
|
|
20
|
+
*
|
|
21
|
+
* @param content - The head content (script, meta tag, etc.)
|
|
22
|
+
* @param src - Source component path
|
|
23
|
+
* @param framework - Framework name
|
|
24
|
+
* @param type - Type of head content
|
|
25
|
+
*/
|
|
26
|
+
export declare function addUniversalHead(content: string, src: string, framework: string, type?: 'script' | 'meta' | 'link' | 'other'): void;
|
|
27
|
+
/**
|
|
28
|
+
* Get all collected head content formatted for injection into HTML head
|
|
29
|
+
*
|
|
30
|
+
* @param clear - Whether to clear the collector after getting content
|
|
31
|
+
* @returns Formatted head content string
|
|
32
|
+
*/
|
|
33
|
+
export declare function getUniversalHeadForInjection(clear?: boolean): string;
|
|
34
|
+
/**
|
|
35
|
+
* Clear all collected head content
|
|
36
|
+
*/
|
|
37
|
+
export declare function clearUniversalHead(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Get the current size of the head collector
|
|
40
|
+
*/
|
|
41
|
+
export declare function getHeadCollectorSize(): number;
|
|
42
|
+
export {};
|