@ereo/bundler 0.1.6

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/README.md ADDED
@@ -0,0 +1,91 @@
1
+ # @ereo/bundler
2
+
3
+ Build system for the EreoJS framework. Includes Hot Module Replacement (HMR), production builds, error overlays, and plugins for islands and Tailwind CSS.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ bun add @ereo/bundler
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```typescript
14
+ import { build, createHMRServer } from '@ereo/bundler';
15
+
16
+ // Production build
17
+ await build({
18
+ entry: './src/entry.tsx',
19
+ outdir: './dist',
20
+ minify: true,
21
+ });
22
+
23
+ // Development with HMR
24
+ const hmr = createHMRServer({ port: 3001 });
25
+ hmr.start();
26
+ ```
27
+
28
+ ## Key Features
29
+
30
+ - **Production Builds** - Optimized builds with `build`, tree-shaking, and minification
31
+ - **Hot Module Replacement** - Fast refresh with `createHMRServer` and `createHMRWatcher`
32
+ - **Error Overlay** - Developer-friendly error display with stack traces
33
+ - **Build Analysis** - Bundle size analysis with `analyzeBuild` and `printBuildReport`
34
+ - **Islands Plugin** - Extract and transform island components with `createIslandsPlugin`
35
+ - **Types Plugin** - Generate route types with `createTypesPlugin`
36
+ - **Tailwind Plugin** - Integrated Tailwind CSS support with `createTailwindPlugin`
37
+
38
+ ## Production Build
39
+
40
+ ```typescript
41
+ import { build, printBuildReport, analyzeBuild } from '@ereo/bundler';
42
+
43
+ const result = await build({
44
+ entry: './src/entry.tsx',
45
+ outdir: './dist',
46
+ minify: true,
47
+ sourcemap: true,
48
+ });
49
+
50
+ printBuildReport(result);
51
+ const analysis = analyzeBuild(result);
52
+ ```
53
+
54
+ ## Development Server
55
+
56
+ ```typescript
57
+ import { createHMRServer, createHMRWatcher } from '@ereo/bundler';
58
+
59
+ const hmr = createHMRServer({ port: 3001 });
60
+ const watcher = createHMRWatcher({
61
+ watchDir: './src',
62
+ onUpdate: (update) => hmr.broadcast(update),
63
+ });
64
+
65
+ hmr.start();
66
+ watcher.start();
67
+ ```
68
+
69
+ ## Plugins
70
+
71
+ ```typescript
72
+ import { createIslandsPlugin, createTailwindPlugin, createTypesPlugin } from '@ereo/bundler';
73
+
74
+ const plugins = [
75
+ createTypesPlugin({ routesDir: './src/routes' }),
76
+ createIslandsPlugin({ componentsDir: './src/components' }),
77
+ createTailwindPlugin({ config: './tailwind.config.js' }),
78
+ ];
79
+ ```
80
+
81
+ ## Documentation
82
+
83
+ For full documentation, visit [https://ereojs.dev/docs/bundler](https://ereojs.dev/docs/bundler)
84
+
85
+ ## Part of EreoJS
86
+
87
+ This package is part of the [EreoJS](https://github.com/ereojs/ereo) monorepo - a modern full-stack framework built for Bun.
88
+
89
+ ## License
90
+
91
+ MIT
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @ereo/bundler - Error Overlay
3
+ *
4
+ * Development error display with source mapping.
5
+ */
6
+ /**
7
+ * Error info for display.
8
+ */
9
+ export interface ErrorInfo {
10
+ message: string;
11
+ stack?: string;
12
+ source?: {
13
+ file: string;
14
+ line: number;
15
+ column: number;
16
+ code?: string;
17
+ };
18
+ type: 'runtime' | 'build' | 'syntax' | 'type';
19
+ }
20
+ /**
21
+ * Parse an error into displayable info.
22
+ */
23
+ export declare function parseError(error: Error | string): ErrorInfo;
24
+ /**
25
+ * Generate HTML for error overlay.
26
+ */
27
+ export declare function generateErrorOverlayHTML(error: ErrorInfo): string;
28
+ /**
29
+ * Create error overlay response.
30
+ */
31
+ export declare function createErrorResponse(error: Error | string): Response;
32
+ /**
33
+ * Create error JSON response.
34
+ */
35
+ export declare function createErrorJSON(error: Error | string): Response;
36
+ /**
37
+ * Client-side error overlay script.
38
+ */
39
+ export declare const ERROR_OVERLAY_SCRIPT = "\n<script>\n(function() {\n window.addEventListener('error', function(event) {\n showOverlay({\n message: event.message,\n source: {\n file: event.filename,\n line: event.lineno,\n column: event.colno,\n },\n type: 'runtime',\n });\n });\n\n window.addEventListener('unhandledrejection', function(event) {\n const error = event.reason;\n showOverlay({\n message: error instanceof Error ? error.message : String(error),\n stack: error instanceof Error ? error.stack : undefined,\n type: 'runtime',\n });\n });\n\n function showOverlay(error) {\n let overlay = document.getElementById('ereo-error-overlay');\n if (overlay) overlay.remove();\n\n overlay = document.createElement('div');\n overlay.id = 'ereo-error-overlay';\n overlay.innerHTML = `\n <style>\n #ereo-error-overlay {\n position: fixed;\n inset: 0;\n background: rgba(0,0,0,0.95);\n color: #fff;\n padding: 2rem;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n overflow: auto;\n z-index: 99999;\n }\n #ereo-error-overlay .close {\n position: absolute;\n top: 1rem;\n right: 1rem;\n background: none;\n border: 1px solid #666;\n color: #fff;\n padding: 0.5rem 1rem;\n cursor: pointer;\n border-radius: 4px;\n }\n #ereo-error-overlay .close:hover {\n background: #333;\n }\n #ereo-error-overlay h2 {\n color: #ff5555;\n margin: 0 0 1rem;\n }\n #ereo-error-overlay pre {\n background: #1a1a1a;\n padding: 1rem;\n border-radius: 4px;\n overflow-x: auto;\n color: #888;\n }\n </style>\n <button class=\"close\" onclick=\"this.parentElement.remove()\">Close (Esc)</button>\n <h2>${escapeHtml(error.message)}</h2>\n ${error.source ? '<p style=\"color:#888\">' + escapeHtml(error.source.file) + ':' + error.source.line + '</p>' : ''}\n ${error.stack ? '<pre>' + escapeHtml(error.stack) + '</pre>' : ''}\n `;\n\n document.body.appendChild(overlay);\n\n document.addEventListener('keydown', function handler(e) {\n if (e.key === 'Escape') {\n overlay.remove();\n document.removeEventListener('keydown', handler);\n }\n });\n }\n\n function escapeHtml(str) {\n if (!str) return '';\n return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n }\n})();\n</script>\n";
40
+ //# sourceMappingURL=error-overlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-overlay.d.ts","sourceRoot":"","sources":["../../src/dev/error-overlay.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC/C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAkC3D;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAgGjE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAUnE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAS/D;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,8kFA0FhC,CAAC"}
@@ -0,0 +1,161 @@
1
+ /**
2
+ * @ereo/bundler - Hot Module Replacement
3
+ *
4
+ * Sub-100ms HMR for rapid development with granular JS updates.
5
+ */
6
+ import type { ServerWebSocket } from 'bun';
7
+ /**
8
+ * HMR update types.
9
+ */
10
+ export type HMRUpdateType = 'full-reload' | 'css-update' | 'js-update' | 'island-update' | 'loader-update' | 'component-update' | 'error';
11
+ /**
12
+ * HMR update message.
13
+ */
14
+ export interface HMRUpdate {
15
+ type: HMRUpdateType;
16
+ path?: string;
17
+ timestamp: number;
18
+ error?: {
19
+ message: string;
20
+ stack?: string;
21
+ };
22
+ /** For granular JS updates */
23
+ module?: {
24
+ id: string;
25
+ exports?: string[];
26
+ isIsland?: boolean;
27
+ isLoader?: boolean;
28
+ isAction?: boolean;
29
+ isComponent?: boolean;
30
+ };
31
+ /** Explanation for why this update type was chosen */
32
+ reason?: string;
33
+ }
34
+ /**
35
+ * Module dependency graph for granular HMR.
36
+ */
37
+ export interface ModuleDependencyGraph {
38
+ /** Module ID -> list of modules that depend on it */
39
+ dependents: Map<string, Set<string>>;
40
+ /** Module ID -> list of modules it imports */
41
+ dependencies: Map<string, Set<string>>;
42
+ /** Module ID -> export names */
43
+ exports: Map<string, Set<string>>;
44
+ /** Module ID -> whether it's an island component */
45
+ islands: Set<string>;
46
+ /** Module ID -> whether it's a route module */
47
+ routes: Set<string>;
48
+ }
49
+ /**
50
+ * HMR client code injected into the page.
51
+ * Supports granular JS updates for islands and components.
52
+ */
53
+ export declare const HMR_CLIENT_CODE = "\n(function() {\n const ws = new WebSocket('ws://' + location.host + '/__hmr');\n\n // Module registry for hot updates\n window.__EREO_HMR__ = window.__EREO_HMR__ || {\n modules: new Map(),\n islands: new Map(),\n acceptedModules: new Set(),\n };\n\n ws.onmessage = function(event) {\n const update = JSON.parse(event.data);\n const startTime = performance.now();\n\n // Log with timing info\n const logUpdate = (msg) => {\n const duration = (performance.now() - startTime).toFixed(1);\n console.log('[HMR] ' + msg + ' (' + duration + 'ms)');\n };\n\n switch (update.type) {\n case 'full-reload':\n logHMRReason(update);\n location.reload();\n break;\n\n case 'css-update':\n updateCSS(update.path);\n logUpdate('CSS updated: ' + update.path);\n break;\n\n case 'island-update':\n if (handleIslandUpdate(update)) {\n logUpdate('Island hot-updated: ' + (update.module?.id || update.path));\n } else {\n logHMRReason(update);\n location.reload();\n }\n break;\n\n case 'component-update':\n if (handleComponentUpdate(update)) {\n logUpdate('Component hot-updated: ' + (update.module?.id || update.path));\n } else {\n logHMRReason(update);\n location.reload();\n }\n break;\n\n case 'loader-update':\n // Loaders require data refetch, do soft reload\n logUpdate('Loader changed, refreshing data...');\n refreshLoaderData(update.path);\n break;\n\n case 'js-update':\n // Check if we can do granular update\n if (update.module?.isIsland && handleIslandUpdate(update)) {\n logUpdate('Island hot-updated: ' + (update.module?.id || update.path));\n } else if (update.module?.isComponent && handleComponentUpdate(update)) {\n logUpdate('Component hot-updated: ' + (update.module?.id || update.path));\n } else {\n logHMRReason(update);\n location.reload();\n }\n break;\n\n case 'error':\n showErrorOverlay(update.error);\n break;\n }\n };\n\n ws.onclose = function() {\n console.log('[HMR] Connection lost, attempting reconnect...');\n setTimeout(function() {\n location.reload();\n }, 1000);\n };\n\n function updateCSS(path) {\n const links = document.querySelectorAll('link[rel=\"stylesheet\"]');\n for (const link of links) {\n if (link.href.includes(path)) {\n const newHref = link.href.split('?')[0] + '?t=' + Date.now();\n link.href = newHref;\n }\n }\n }\n\n function handleIslandUpdate(update) {\n const moduleId = update.module?.id || update.path;\n if (!moduleId) return false;\n\n // Find all island elements for this component\n const componentName = moduleId.split('/').pop()?.replace(/\\.[jt]sx?$/, '');\n if (!componentName) return false;\n\n const islands = document.querySelectorAll('[data-component=\"' + componentName + '\"]');\n if (islands.length === 0) return false;\n\n // Fetch the updated module and re-hydrate islands\n return fetchAndRehydrate(moduleId, islands);\n }\n\n function handleComponentUpdate(update) {\n // For now, component updates trigger a soft reload\n // Future: implement React Fast Refresh integration\n return false;\n }\n\n function fetchAndRehydrate(moduleId, islands) {\n // Dynamic import with cache busting\n const importUrl = '/' + moduleId + '?t=' + Date.now();\n\n import(importUrl)\n .then(function(module) {\n const Component = module.default;\n if (!Component) return;\n\n // Re-render each island\n islands.forEach(function(element) {\n const propsJson = element.getAttribute('data-props');\n const props = propsJson ? JSON.parse(propsJson) : {};\n\n // Use React to re-render\n if (window.__EREO_REACT__) {\n const { createRoot } = window.__EREO_REACT_DOM__;\n const { createElement } = window.__EREO_REACT__;\n\n // Unmount existing\n const existingRoot = window.__EREO_HMR__.islands.get(element);\n if (existingRoot) {\n existingRoot.unmount();\n }\n\n // Create new root and render\n const root = createRoot(element);\n root.render(createElement(Component, props));\n window.__EREO_HMR__.islands.set(element, root);\n }\n });\n })\n .catch(function(err) {\n console.error('[HMR] Failed to hot-update island:', err);\n location.reload();\n });\n\n return true;\n }\n\n function refreshLoaderData(path) {\n // Fetch fresh loader data and update the page\n const routePath = path.replace(/\\/routes\\//, '/').replace(/\\.[jt]sx?$/, '');\n fetch('/__ereo/loader-data' + routePath + '?t=' + Date.now())\n .then(function(res) { return res.json(); })\n .then(function(data) {\n // Emit event for components to update\n window.dispatchEvent(new CustomEvent('ereo:loader-update', {\n detail: { path: routePath, data: data }\n }));\n })\n .catch(function() {\n location.reload();\n });\n }\n\n function logHMRReason(update) {\n if (update.reason) {\n console.log('[HMR] ' + update.reason);\n }\n }\n\n function showErrorOverlay(error) {\n if (!error) return;\n\n let overlay = document.getElementById('ereo-error-overlay');\n if (!overlay) {\n overlay = document.createElement('div');\n overlay.id = 'ereo-error-overlay';\n overlay.style.cssText = 'position:fixed;inset:0;background:rgba(0,0,0,0.9);color:#ff5555;padding:2rem;font-family:monospace;white-space:pre-wrap;overflow:auto;z-index:99999';\n document.body.appendChild(overlay);\n }\n\n overlay.innerHTML = '<h2 style=\"color:#ff5555;margin:0 0 1rem\">Error</h2>' +\n '<p style=\"color:#fff\">' + escapeHtml(error.message) + '</p>' +\n (error.stack ? '<pre style=\"color:#888;margin-top:1rem\">' + escapeHtml(error.stack) + '</pre>' : '') +\n '<button onclick=\"this.parentElement.remove()\" style=\"position:absolute;top:1rem;right:1rem;background:none;border:1px solid #666;color:#fff;padding:0.5rem 1rem;cursor:pointer\">Close</button>';\n }\n\n function escapeHtml(str) {\n return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n }\n\n // Clear error overlay on successful update\n ws.addEventListener('message', function(event) {\n const update = JSON.parse(event.data);\n if (update.type !== 'error') {\n const overlay = document.getElementById('ereo-error-overlay');\n if (overlay) overlay.remove();\n }\n });\n})();\n";
54
+ /**
55
+ * HMR server for WebSocket connections.
56
+ * Supports granular JS updates through module analysis.
57
+ */
58
+ export declare class HMRServer {
59
+ private clients;
60
+ private lastUpdate;
61
+ private depGraph;
62
+ private moduleAnalyzer;
63
+ constructor();
64
+ /**
65
+ * Handle new WebSocket connection.
66
+ */
67
+ handleConnection(ws: ServerWebSocket<unknown>): void;
68
+ /**
69
+ * Handle WebSocket close.
70
+ */
71
+ handleClose(ws: ServerWebSocket<unknown>): void;
72
+ /**
73
+ * Send update to all connected clients.
74
+ */
75
+ send(update: HMRUpdate): void;
76
+ /**
77
+ * Trigger a full reload.
78
+ */
79
+ reload(reason?: string): void;
80
+ /**
81
+ * Notify of a CSS update.
82
+ */
83
+ cssUpdate(path: string): void;
84
+ /**
85
+ * Notify of a JS update with granular analysis.
86
+ */
87
+ jsUpdate(path: string): Promise<void>;
88
+ /**
89
+ * Get human-readable reason for full reload.
90
+ */
91
+ private getReloadReason;
92
+ /**
93
+ * Register a module in the dependency graph.
94
+ */
95
+ registerModule(moduleId: string, info: {
96
+ dependencies?: string[];
97
+ exports?: string[];
98
+ isIsland?: boolean;
99
+ isRoute?: boolean;
100
+ }): void;
101
+ /**
102
+ * Check if a module can be hot-updated without full reload.
103
+ */
104
+ canHotUpdate(moduleId: string): boolean;
105
+ /**
106
+ * Send error to clients.
107
+ */
108
+ error(message: string, stack?: string): void;
109
+ /**
110
+ * Clear error state.
111
+ */
112
+ clearError(): void;
113
+ /**
114
+ * Get number of connected clients.
115
+ */
116
+ getClientCount(): number;
117
+ /**
118
+ * Get the dependency graph (for debugging).
119
+ */
120
+ getDependencyGraph(): ModuleDependencyGraph;
121
+ }
122
+ /**
123
+ * Create HMR server.
124
+ */
125
+ export declare function createHMRServer(): HMRServer;
126
+ /**
127
+ * Create WebSocket handler for HMR.
128
+ */
129
+ export declare function createHMRWebSocket(hmr: HMRServer): {
130
+ open(ws: ServerWebSocket<unknown>): void;
131
+ close(ws: ServerWebSocket<unknown>): void;
132
+ message(): void;
133
+ };
134
+ /**
135
+ * File watcher for HMR with intelligent change detection.
136
+ */
137
+ export declare class HMRWatcher {
138
+ private hmr;
139
+ private watching;
140
+ private debounceTimer;
141
+ private pendingChanges;
142
+ private watchDir;
143
+ constructor(hmr: HMRServer);
144
+ /**
145
+ * Start watching a directory.
146
+ */
147
+ watch(dir: string): void;
148
+ /**
149
+ * Process all pending changes as a batch.
150
+ */
151
+ private processPendingChanges;
152
+ /**
153
+ * Stop watching.
154
+ */
155
+ stop(): void;
156
+ }
157
+ /**
158
+ * Create file watcher for HMR.
159
+ */
160
+ export declare function createHMRWatcher(hmr: HMRServer): HMRWatcher;
161
+ //# sourceMappingURL=hmr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hmr.d.ts","sourceRoot":"","sources":["../../src/dev/hmr.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAU,eAAe,EAAE,MAAM,KAAK,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,aAAa,GACb,YAAY,GACZ,WAAW,GACX,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,OAAO,CAAC;AAEZ;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,8BAA8B;IAC9B,MAAM,CAAC,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IACF,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,qDAAqD;IACrD,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACrC,8CAA8C;IAC9C,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACvC,gCAAgC;IAChC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IAClC,oDAAoD;IACpD,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,+CAA+C;IAC/C,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,qqNA4M3B,CAAC;AAEF;;;GAGG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,OAAO,CAAuC;IACtD,OAAO,CAAC,UAAU,CAA0B;IAC5C,OAAO,CAAC,QAAQ,CAAwB;IACxC,OAAO,CAAC,cAAc,CAAiB;;IAavC;;OAEG;IACH,gBAAgB,CAAC,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,IAAI;IASpD;;OAEG;IACH,WAAW,CAAC,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,IAAI;IAI/C;;OAEG;IACH,IAAI,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI;IAa7B;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAQ7B;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAQ7B;;OAEG;IACG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkE3C;;OAEG;IACH,OAAO,CAAC,eAAe;IAsBvB;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE;QACrC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,GAAG,IAAI;IA0BR;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAmBvC;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAQ5C;;OAEG;IACH,UAAU,IAAI,IAAI;IAMlB;;OAEG;IACH,cAAc,IAAI,MAAM;IAIxB;;OAEG;IACH,kBAAkB,IAAI,qBAAqB;CAG5C;AAwID;;GAEG;AACH,wBAAgB,eAAe,IAAI,SAAS,CAE3C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,SAAS;aAEpC,eAAe,CAAC,OAAO,CAAC;cAGvB,eAAe,CAAC,OAAO,CAAC;;EAOrC;AAED;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,GAAG,CAAY;IACvB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAA8C;IACnE,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,QAAQ,CAAc;gBAElB,GAAG,EAAE,SAAS;IAI1B;;OAEG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IA+BxB;;OAEG;YACW,qBAAqB;IAmEnC;;OAEG;IACH,IAAI,IAAI,IAAI;CAOb;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,SAAS,GAAG,UAAU,CAE3D"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @ereo/bundler
3
+ *
4
+ * Build system for the EreoJS framework.
5
+ * Includes HMR, production builds, and plugin system.
6
+ */
7
+ export { HMRServer, HMRWatcher, createHMRServer, createHMRWatcher, createHMRWebSocket, HMR_CLIENT_CODE, } from './dev/hmr';
8
+ export type { HMRUpdate, HMRUpdateType } from './dev/hmr';
9
+ export { parseError, generateErrorOverlayHTML, createErrorResponse, createErrorJSON, ERROR_OVERLAY_SCRIPT, } from './dev/error-overlay';
10
+ export type { ErrorInfo } from './dev/error-overlay';
11
+ export { build, formatSize, printBuildReport, analyzeBuild, } from './prod/build';
12
+ export type { BuildOptions, BuildResult, BuildOutput } from './prod/build';
13
+ export { extractParams, generateRouteTypes, writeRouteTypes, createTypesPlugin, generateLinkTypes, generateHookTypes, } from './plugins/types';
14
+ export type { RouteTypeInfo } from './plugins/types';
15
+ export { extractIslands, transformIslandJSX, generateIslandManifest, generateIslandEntry, createIslandsPlugin, findIslandByName, hasIslands, } from './plugins/islands';
16
+ export type { IslandMeta } from './plugins/islands';
17
+ export { createTailwindPlugin, generateTailwindConfig, generateCSSEntry, hasTailwindConfig, tailwindMiddleware, extractTailwindClasses, generateSafelist, } from './plugins/tailwind';
18
+ export type { TailwindPluginOptions } from './plugins/tailwind';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,SAAS,EACT,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,GAChB,MAAM,WAAW,CAAC;AAEnB,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1D,OAAO,EACL,UAAU,EACV,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EACL,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,YAAY,GACb,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3E,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,GACX,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC"}