@absolutejs/voice 0.0.1
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 +150 -0
- package/dist/absolutejs/src/angular/angularDeps.d.ts +2 -0
- package/dist/absolutejs/src/angular/angularPatch.d.ts +1 -0
- package/dist/absolutejs/src/angular/injectorPatch.d.ts +1 -0
- package/dist/absolutejs/src/angular/islands.d.ts +3 -0
- package/dist/absolutejs/src/angular/lowerDeferSyntax.d.ts +18 -0
- package/dist/absolutejs/src/angular/lowerServerIslands.d.ts +1 -0
- package/dist/absolutejs/src/angular/pageHandler.d.ts +26 -0
- package/dist/absolutejs/src/angular/resolveAngularPackage.d.ts +7 -0
- package/dist/absolutejs/src/angular/ssrRender.d.ts +16 -0
- package/dist/absolutejs/src/angular/ssrSanitizer.d.ts +3 -0
- package/dist/absolutejs/src/build/angularLinkerPlugin.d.ts +11 -0
- package/dist/absolutejs/src/build/buildAngularVendor.d.ts +4 -0
- package/dist/absolutejs/src/build/buildDepVendor.d.ts +2 -0
- package/dist/absolutejs/src/build/buildReactVendor.d.ts +8 -0
- package/dist/absolutejs/src/build/buildSvelteVendor.d.ts +6 -0
- package/dist/absolutejs/src/build/buildVueVendor.d.ts +6 -0
- package/dist/absolutejs/src/build/compileAngular.d.ts +29 -0
- package/dist/absolutejs/src/build/compileSvelte.d.ts +13 -0
- package/dist/absolutejs/src/build/compileVue.d.ts +19 -0
- package/dist/absolutejs/src/build/generateManifest.d.ts +2 -0
- package/dist/absolutejs/src/build/generateReactIndexes.d.ts +1 -0
- package/dist/absolutejs/src/build/htmlScriptHMRPlugin.d.ts +13 -0
- package/dist/absolutejs/src/build/islandEntries.d.ts +32 -0
- package/dist/absolutejs/src/build/nativeRewrite.d.ts +5 -0
- package/dist/absolutejs/src/build/optimizeHtmlImages.d.ts +2 -0
- package/dist/absolutejs/src/build/outputLogs.d.ts +1 -0
- package/dist/absolutejs/src/build/resolvePackageImport.d.ts +9 -0
- package/dist/absolutejs/src/build/rewriteImports.d.ts +7 -0
- package/dist/absolutejs/src/build/rewriteReactImports.d.ts +7 -0
- package/dist/absolutejs/src/build/scanConventions.d.ts +5 -0
- package/dist/absolutejs/src/build/scanCssEntryPoints.d.ts +1 -0
- package/dist/absolutejs/src/build/scanEntryPoints.d.ts +1 -0
- package/dist/absolutejs/src/build/staticIslandPages.d.ts +9 -0
- package/dist/absolutejs/src/build/updateAssetPaths.d.ts +1 -0
- package/dist/absolutejs/src/build/wrapHTMLScript.d.ts +17 -0
- package/dist/absolutejs/src/cli/scripts/telemetry.d.ts +5 -0
- package/dist/absolutejs/src/cli/telemetryEvent.d.ts +1 -0
- package/dist/absolutejs/src/client/islandStore.d.ts +22 -0
- package/dist/absolutejs/src/client/streamSwap.d.ts +11 -0
- package/dist/absolutejs/src/constants.d.ts +60 -0
- package/dist/absolutejs/src/core/build.d.ts +9 -0
- package/dist/absolutejs/src/core/currentIslandRegistry.d.ts +7 -0
- package/dist/absolutejs/src/core/devBuild.d.ts +6 -0
- package/dist/absolutejs/src/core/devRouteRegistrationCallsite.d.ts +2 -0
- package/dist/absolutejs/src/core/devVendorPaths.d.ts +13 -0
- package/dist/absolutejs/src/core/index.d.ts +7 -0
- package/dist/absolutejs/src/core/islandManifest.d.ts +3 -0
- package/dist/absolutejs/src/core/islandMarkupAttributes.d.ts +12 -0
- package/dist/absolutejs/src/core/islandPageContext.d.ts +12 -0
- package/dist/absolutejs/src/core/islandSsr.d.ts +6 -0
- package/dist/absolutejs/src/core/islands.d.ts +16 -0
- package/dist/absolutejs/src/core/loadIslandRegistry.d.ts +1 -0
- package/dist/absolutejs/src/core/lookup.d.ts +1 -0
- package/dist/absolutejs/src/core/pageHandlers.d.ts +6 -0
- package/dist/absolutejs/src/core/prepare.d.ts +274 -0
- package/dist/absolutejs/src/core/prerender.d.ts +31 -0
- package/dist/absolutejs/src/core/renderIslandMarkup.d.ts +13 -0
- package/dist/absolutejs/src/core/responseEnhancers.d.ts +10 -0
- package/dist/absolutejs/src/core/staticStreaming.d.ts +25 -0
- package/dist/absolutejs/src/core/streamingSlotRegistrar.d.ts +16 -0
- package/dist/absolutejs/src/core/streamingSlotRegistry.d.ts +2 -0
- package/dist/absolutejs/src/core/streamingSlotWarningScope.d.ts +4 -0
- package/dist/absolutejs/src/core/svelteServerModule.d.ts +1 -0
- package/dist/absolutejs/src/core/wrapPageHandlerWithStreamingSlots.d.ts +2 -0
- package/dist/absolutejs/src/dev/assetStore.d.ts +8 -0
- package/dist/absolutejs/src/dev/buildHMRClient.d.ts +1 -0
- package/dist/absolutejs/src/dev/clientManager.d.ts +31 -0
- package/dist/absolutejs/src/dev/configResolver.d.ts +14 -0
- package/dist/absolutejs/src/dev/dependencyGraph.d.ts +10 -0
- package/dist/absolutejs/src/dev/devCert.d.ts +11 -0
- package/dist/absolutejs/src/dev/fileHashTracker.d.ts +2 -0
- package/dist/absolutejs/src/dev/fileWatcher.d.ts +4 -0
- package/dist/absolutejs/src/dev/moduleMapper.d.ts +27 -0
- package/dist/absolutejs/src/dev/moduleServer.d.ts +21 -0
- package/dist/absolutejs/src/dev/moduleVersionTracker.d.ts +7 -0
- package/dist/absolutejs/src/dev/pathUtils.d.ts +5 -0
- package/dist/absolutejs/src/dev/reactComponentClassifier.d.ts +2 -0
- package/dist/absolutejs/src/dev/rebuildTrigger.d.ts +10 -0
- package/dist/absolutejs/src/dev/simpleHTMLHMR.d.ts +4 -0
- package/dist/absolutejs/src/dev/simpleHTMXHMR.d.ts +4 -0
- package/dist/absolutejs/src/dev/transformCache.d.ts +6 -0
- package/dist/absolutejs/src/dev/webSocket.d.ts +9 -0
- package/dist/absolutejs/src/index.d.ts +5 -0
- package/dist/absolutejs/src/islands/pageMetadata.d.ts +13 -0
- package/dist/absolutejs/src/islands/sourceMetadata.d.ts +10 -0
- package/dist/absolutejs/src/plugins/devtoolsJson.d.ts +58 -0
- package/dist/absolutejs/src/plugins/hmr.d.ts +138 -0
- package/dist/absolutejs/src/plugins/imageOptimizer.d.ts +67 -0
- package/dist/absolutejs/src/plugins/index.d.ts +3 -0
- package/dist/absolutejs/src/plugins/networking.d.ts +2 -0
- package/dist/absolutejs/src/plugins/pageRouter.d.ts +1 -0
- package/dist/absolutejs/src/react/Island.d.ts +2 -0
- package/dist/absolutejs/src/react/bridgeInternals.d.ts +1 -0
- package/dist/absolutejs/src/react/createIsland.d.ts +2 -0
- package/dist/absolutejs/src/react/hooks/useIslandStore.d.ts +3 -0
- package/dist/absolutejs/src/react/index.d.ts +4 -0
- package/dist/absolutejs/src/react/pageHandler.d.ts +21 -0
- package/dist/absolutejs/src/svelte/lowerAwaitSlotSyntax.d.ts +4 -0
- package/dist/absolutejs/src/svelte/lowerIslandSyntax.d.ts +4 -0
- package/dist/absolutejs/src/svelte/pageHandler.d.ts +23 -0
- package/dist/absolutejs/src/svelte/renderToReadableStream.d.ts +14 -0
- package/dist/absolutejs/src/utils/cleanStaleOutputs.d.ts +1 -0
- package/dist/absolutejs/src/utils/cleanup.d.ts +8 -0
- package/dist/absolutejs/src/utils/commonAncestor.d.ts +1 -0
- package/dist/absolutejs/src/utils/defineConfig.d.ts +2 -0
- package/dist/absolutejs/src/utils/defineEnv.d.ts +10 -0
- package/dist/absolutejs/src/utils/escapeScriptContent.d.ts +1 -0
- package/dist/absolutejs/src/utils/generateHeadElement.d.ts +4 -0
- package/dist/absolutejs/src/utils/generateSitemap.d.ts +6 -0
- package/dist/absolutejs/src/utils/getDurationString.d.ts +1 -0
- package/dist/absolutejs/src/utils/getEnv.d.ts +1 -0
- package/dist/absolutejs/src/utils/imageProcessing.d.ts +33 -0
- package/dist/absolutejs/src/utils/index.d.ts +9 -0
- package/dist/absolutejs/src/utils/jsonLd.d.ts +2 -0
- package/dist/absolutejs/src/utils/loadConfig.d.ts +1 -0
- package/dist/absolutejs/src/utils/logger.d.ts +55 -0
- package/dist/absolutejs/src/utils/networking.d.ts +2 -0
- package/dist/absolutejs/src/utils/normalizePath.d.ts +9 -0
- package/dist/absolutejs/src/utils/registerClientScript.d.ts +36 -0
- package/dist/absolutejs/src/utils/resolveConvention.d.ts +9 -0
- package/dist/absolutejs/src/utils/ssrErrorPage.d.ts +1 -0
- package/dist/absolutejs/src/utils/startupBanner.d.ts +9 -0
- package/dist/absolutejs/src/utils/streamingSlotMetricSink.d.ts +18 -0
- package/dist/absolutejs/src/utils/streamingSlots.d.ts +76 -0
- package/dist/absolutejs/src/utils/stringModifiers.d.ts +3 -0
- package/dist/absolutejs/src/utils/validateSafePath.d.ts +1 -0
- package/dist/absolutejs/src/vue/pageHandler.d.ts +29 -0
- package/dist/absolutejs/types/ai.d.ts +4631 -0
- package/dist/absolutejs/types/angular.d.ts +29 -0
- package/dist/absolutejs/types/build.d.ts +67 -0
- package/dist/absolutejs/types/cli.d.ts +19 -0
- package/dist/absolutejs/types/client.d.ts +65 -0
- package/dist/absolutejs/types/conventions.d.ts +20 -0
- package/dist/absolutejs/types/env.d.ts +2 -0
- package/dist/absolutejs/types/image.d.ts +77 -0
- package/dist/absolutejs/types/index.d.ts +19 -0
- package/dist/absolutejs/types/island.d.ts +48 -0
- package/dist/absolutejs/types/jsonLd.d.ts +271 -0
- package/dist/absolutejs/types/messages.d.ts +144 -0
- package/dist/absolutejs/types/metadata.d.ts +49 -0
- package/dist/absolutejs/types/react.d.ts +2 -0
- package/dist/absolutejs/types/session.d.ts +16 -0
- package/dist/absolutejs/types/sitemap.d.ts +14 -0
- package/dist/absolutejs/types/svelte.d.ts +2 -0
- package/dist/absolutejs/types/telemetry.d.ts +15 -0
- package/dist/absolutejs/types/tool.d.ts +11 -0
- package/dist/absolutejs/types/typeGuards.d.ts +5 -0
- package/dist/absolutejs/types/vue.d.ts +14 -0
- package/dist/absolutejs/types/websocket.d.ts +6 -0
- package/dist/angular/index.js +505 -0
- package/dist/client/index.js +521 -0
- package/dist/index.js +693 -0
- package/dist/react/index.js +489 -0
- package/dist/svelte/index.js +456 -0
- package/dist/voice/src/angular/index.d.ts +1 -0
- package/dist/voice/src/angular/voice-stream.service.d.ts +15 -0
- package/dist/voice/src/client/actions.d.ts +58 -0
- package/dist/voice/src/client/connection.d.ts +12 -0
- package/dist/voice/src/client/createVoiceStream.d.ts +14 -0
- package/dist/voice/src/client/index.d.ts +3 -0
- package/dist/voice/src/client/microphone.d.ts +11 -0
- package/dist/voice/src/client/store.d.ts +7 -0
- package/dist/voice/src/index.d.ts +5 -0
- package/dist/voice/src/logger.d.ts +8 -0
- package/dist/voice/src/memoryStore.d.ts +2 -0
- package/dist/voice/src/plugin.d.ts +40 -0
- package/dist/voice/src/react/index.d.ts +1 -0
- package/dist/voice/src/react/useVoiceStream.d.ts +13 -0
- package/dist/voice/src/session.d.ts +2 -0
- package/dist/voice/src/store.d.ts +6 -0
- package/dist/voice/src/svelte/createVoiceStream.d.ts +14 -0
- package/dist/voice/src/svelte/index.d.ts +1 -0
- package/dist/voice/src/turnDetection.d.ts +3 -0
- package/dist/voice/src/types.d.ts +318 -0
- package/dist/voice/src/vue/index.d.ts +1 -0
- package/dist/voice/src/vue/useVoiceStream.d.ts +13 -0
- package/dist/vue/index.js +496 -0
- package/package.json +100 -0
package/README.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# `@absolutejs/voice`
|
|
2
|
+
|
|
3
|
+
`@absolutejs/voice` is the voice session layer for AbsoluteJS. It owns the duplex WebSocket lifecycle, transcript buffering, turn commits, reconnect behavior, and client primitives, while keeping speech vendors and session storage pluggable.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add @absolutejs/voice
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependencies:
|
|
12
|
+
|
|
13
|
+
- `@absolutejs/absolute`
|
|
14
|
+
- `elysia`
|
|
15
|
+
|
|
16
|
+
Optional framework entrypoints:
|
|
17
|
+
|
|
18
|
+
- `@absolutejs/voice/react`
|
|
19
|
+
- `@absolutejs/voice/vue`
|
|
20
|
+
- `@absolutejs/voice/svelte`
|
|
21
|
+
- `@absolutejs/voice/angular`
|
|
22
|
+
- `@absolutejs/voice/client`
|
|
23
|
+
|
|
24
|
+
## Route Setup
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import { Elysia } from 'elysia';
|
|
28
|
+
import { voice, createVoiceMemoryStore } from '@absolutejs/voice';
|
|
29
|
+
import { deepgram } from '@absolutejs/voice-deepgram';
|
|
30
|
+
|
|
31
|
+
const app = new Elysia()
|
|
32
|
+
.use(
|
|
33
|
+
voice({
|
|
34
|
+
path: '/voice',
|
|
35
|
+
onComplete: async ({ session }) => {
|
|
36
|
+
console.log(session.turns);
|
|
37
|
+
},
|
|
38
|
+
async onTurn({ turn }) {
|
|
39
|
+
return {
|
|
40
|
+
assistantText: `You said: ${turn.text}`
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
session: createVoiceMemoryStore(),
|
|
44
|
+
stt: deepgram({
|
|
45
|
+
apiKey: process.env.DEEPGRAM_API_KEY!,
|
|
46
|
+
model: 'nova-3'
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`createVoiceMemoryStore()` is dev-only. Real deployments should provide a shared store backed by Redis, Postgres, or equivalent.
|
|
53
|
+
|
|
54
|
+
## Adapter Contract
|
|
55
|
+
|
|
56
|
+
Adapters normalize vendor behavior into a core event model so the plugin never branches on vendor names.
|
|
57
|
+
|
|
58
|
+
### STT adapter
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
type STTAdapter = {
|
|
62
|
+
kind: 'stt';
|
|
63
|
+
open: (
|
|
64
|
+
options: STTAdapterOpenOptions
|
|
65
|
+
) => Promise<STTAdapterSession> | STTAdapterSession;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
type STTAdapterSession = {
|
|
69
|
+
on: <K extends keyof STTSessionEventMap>(
|
|
70
|
+
event: K,
|
|
71
|
+
handler: (payload: STTSessionEventMap[K]) => void | Promise<void>
|
|
72
|
+
) => () => void;
|
|
73
|
+
send: (audio: AudioChunk) => Promise<void>;
|
|
74
|
+
close: (reason?: string) => Promise<void>;
|
|
75
|
+
};
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Normalized events:
|
|
79
|
+
|
|
80
|
+
- `partial`: interim transcript updates
|
|
81
|
+
- `final`: finalized transcript segments
|
|
82
|
+
- `endOfTurn`: vendor-native turn completion when available
|
|
83
|
+
- `error`: recoverable or fatal adapter failures
|
|
84
|
+
- `close`: adapter transport shutdown
|
|
85
|
+
|
|
86
|
+
Requirements for third-party adapters:
|
|
87
|
+
|
|
88
|
+
- accept `16kHz` mono `pcm_s16le` from core without mutating the contract
|
|
89
|
+
- map vendor transcript payloads into `Transcript`
|
|
90
|
+
- emit `endOfTurn` only when the vendor actually provides a native signal
|
|
91
|
+
- never leak vendor-specific types through the core surface
|
|
92
|
+
|
|
93
|
+
## Session Storage Contract
|
|
94
|
+
|
|
95
|
+
Voice uses the same bring-your-own-session pattern as AI, now via the shared generic `SessionStore` contract.
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
type SessionStore<TSession, TSummary> = {
|
|
99
|
+
get: (id: string) => Promise<TSession | undefined>;
|
|
100
|
+
getOrCreate: (id: string) => Promise<TSession>;
|
|
101
|
+
set: (id: string, value: TSession) => Promise<void>;
|
|
102
|
+
list: () => Promise<TSummary[]>;
|
|
103
|
+
remove: (id: string) => Promise<void>;
|
|
104
|
+
};
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Voice specializes it as:
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
type VoiceSessionStore = SessionStore<
|
|
111
|
+
VoiceSessionRecord,
|
|
112
|
+
VoiceSessionSummary
|
|
113
|
+
>;
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
A storage implementation must:
|
|
117
|
+
|
|
118
|
+
- persist the whole `VoiceSessionRecord`
|
|
119
|
+
- make `getOrCreate()` safe across multiple app instances
|
|
120
|
+
- keep `set()` atomic enough that reconnects do not re-fire committed turns
|
|
121
|
+
- return `list()` summaries without loading full transcripts when possible
|
|
122
|
+
|
|
123
|
+
For Redis or Postgres stores, the usual pattern is:
|
|
124
|
+
|
|
125
|
+
1. `get(sessionId)` before opening a socket
|
|
126
|
+
2. `getOrCreate(sessionId)` on first contact
|
|
127
|
+
3. mutate the record in memory for a single turn transition
|
|
128
|
+
4. `set(sessionId, updatedRecord)` immediately after each state change
|
|
129
|
+
|
|
130
|
+
## Reconnect Behavior
|
|
131
|
+
|
|
132
|
+
Default reconnect strategy is `resume-last-turn`.
|
|
133
|
+
|
|
134
|
+
- `resume-last-turn`: reload the persisted transcript buffer and continue from the last uncommitted turn
|
|
135
|
+
- `restart`: discard the persisted voice turn state and start fresh on reconnect exhaustion
|
|
136
|
+
- `fail`: mark the session failed when reconnect policy is exhausted
|
|
137
|
+
|
|
138
|
+
If an adapter does not emit native end-of-turn events, core falls back to silence detection with a default `700ms` threshold.
|
|
139
|
+
|
|
140
|
+
## Client Primitives
|
|
141
|
+
|
|
142
|
+
Browser and framework helpers sit on top of the same connection core:
|
|
143
|
+
|
|
144
|
+
- `createVoiceStream()` in `@absolutejs/voice/client`
|
|
145
|
+
- `useVoiceStream()` in `@absolutejs/voice/react`
|
|
146
|
+
- `useVoiceStream()` in `@absolutejs/voice/vue`
|
|
147
|
+
- `createVoiceStream()` in `@absolutejs/voice/svelte`
|
|
148
|
+
- `VoiceStreamService` in `@absolutejs/voice/angular`
|
|
149
|
+
|
|
150
|
+
For plain HTML or HTMX flows, use `@absolutejs/voice/client` directly.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const applyPatches: () => Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const patchAngularInjectorSingleton: () => void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const getAngularIslandSelector: (_islandId: string) => string;
|
|
2
|
+
export declare const mountAngularIsland: <Props extends Record<string, unknown>>(component: import("@angular/core").Type<object>, element: HTMLElement, props: Props, islandId: string) => Promise<import("@angular/core").ApplicationRef>;
|
|
3
|
+
export declare const renderAngularIslandToHtml: <Props extends Record<string, unknown>>(component: import("@angular/core").Type<object>, props: Props, islandId: string) => Promise<string>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type LoweredAngularDeferSlot = {
|
|
2
|
+
delayMs: number;
|
|
3
|
+
errorHtml: string | null;
|
|
4
|
+
fallbackHtml: string;
|
|
5
|
+
id: string;
|
|
6
|
+
resolvedBindings: Array<{
|
|
7
|
+
expression: string;
|
|
8
|
+
key: string;
|
|
9
|
+
}>;
|
|
10
|
+
resolvedHtml: string;
|
|
11
|
+
resolvedTemplate: string;
|
|
12
|
+
};
|
|
13
|
+
export type LoweredAngularDeferResult = {
|
|
14
|
+
slots: LoweredAngularDeferSlot[];
|
|
15
|
+
template: string;
|
|
16
|
+
transformed: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const lowerAngularDeferSyntax: (template: string) => LoweredAngularDeferResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const lowerAngularServerIslands: (html: string) => Promise<string>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AngularPageImporter, AngularPagePropsOf } from '../../types/angular';
|
|
2
|
+
import { type StreamingSlotEnhancerOptions } from '../core/responseEnhancers';
|
|
3
|
+
type AngularPageRenderOptions = StreamingSlotEnhancerOptions & {
|
|
4
|
+
collectStreamingSlots?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type AngularPageRequestInput<Page = {
|
|
7
|
+
factory: (props: Record<never, never>) => unknown;
|
|
8
|
+
}> = AngularPageRenderOptions & {
|
|
9
|
+
headTag?: `<head>${string}</head>`;
|
|
10
|
+
indexPath: string;
|
|
11
|
+
pagePath: string;
|
|
12
|
+
} & (keyof AngularPagePropsOf<Page> extends never ? {
|
|
13
|
+
props?: NoInfer<AngularPagePropsOf<Page>>;
|
|
14
|
+
} : {
|
|
15
|
+
props: NoInfer<AngularPagePropsOf<Page>>;
|
|
16
|
+
});
|
|
17
|
+
export type HandleAngularPageRequest = {
|
|
18
|
+
<Page = {
|
|
19
|
+
factory: (props: Record<never, never>) => unknown;
|
|
20
|
+
}>(input: AngularPageRequestInput<Page>): Promise<Response>;
|
|
21
|
+
<Props extends Record<string, unknown> = Record<never, never>>(Page: AngularPageImporter<Props>, pagePath: string, indexPath: string, headTag: `<head>${string}</head>` | undefined, ...args: AngularPageHandlerArgs<Props>): Promise<Response>;
|
|
22
|
+
};
|
|
23
|
+
type AngularPageHandlerArgs<Props extends Record<string, unknown>> = keyof Props extends never ? [props?: NoInfer<Props>, options?: AngularPageRenderOptions] : [props: NoInfer<Props>, options?: AngularPageRenderOptions];
|
|
24
|
+
export declare const invalidateAngularSsrCache: () => void;
|
|
25
|
+
export declare const handleAngularPageRequest: HandleAngularPageRequest;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve an Angular package path from process.cwd()/node_modules/ first,
|
|
3
|
+
* falling back to the bare specifier. This prevents Bun's baked import.meta.dir
|
|
4
|
+
* from resolving Angular packages from the absolutejs source tree instead of
|
|
5
|
+
* the consumer's project when running from a published npm package.
|
|
6
|
+
*/
|
|
7
|
+
export declare const resolveAngularPackage: (specifier: string) => string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { EnvironmentProviders, Provider, Type } from '@angular/core';
|
|
2
|
+
import type { AngularDeps, CachedRouteData, SsrDepsResult } from '../../types/angular';
|
|
3
|
+
export declare const cacheRouteData: (pagePath: string, data: CachedRouteData) => void;
|
|
4
|
+
export declare const getCachedRouteData: (pagePath: string) => CachedRouteData | undefined;
|
|
5
|
+
export declare const buildDeps: (ssrResult: SsrDepsResult | null, baseDeps: AngularDeps) => AngularDeps;
|
|
6
|
+
export declare const buildProviders: (deps: AngularDeps, sanitizer: InstanceType<AngularDeps["DomSanitizer"]>, maybeProps: Record<string, unknown> | undefined, tokenMap: Map<string, unknown>) => (Provider | EnvironmentProviders | {
|
|
7
|
+
provide: unknown;
|
|
8
|
+
useValue: unknown;
|
|
9
|
+
})[];
|
|
10
|
+
export declare const clearSelectorCache: () => void;
|
|
11
|
+
export declare const discoverTokens: (pageModule: Record<string, unknown>) => Map<string, unknown>;
|
|
12
|
+
export declare const loadSsrDeps: (pagePath: string) => Promise<SsrDepsResult | null>;
|
|
13
|
+
export declare const resolveSelector: (deps: AngularDeps, pagePath: string, PageComponent: Type<unknown>) => string;
|
|
14
|
+
export declare const injectSsrScripts: (html: string, requestId: string, indexPath: string, props?: Record<string, unknown>) => string;
|
|
15
|
+
export declare const renderAngularApp: (deps: AngularDeps, PageComponent: Type<unknown>, providers: (Provider | EnvironmentProviders)[], document: string | Document) => Promise<string>;
|
|
16
|
+
export declare const withSuppressedAngularDevLogs: <T>(render: () => Promise<T>) => Promise<T>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BunPlugin } from 'bun';
|
|
2
|
+
/**
|
|
3
|
+
* Bun bundler plugin that runs the Angular Linker on partially compiled
|
|
4
|
+
* Angular libraries at build time. Converts ɵɵngDeclare* declarations
|
|
5
|
+
* into fully AOT-compiled code so @angular/compiler is not shipped to
|
|
6
|
+
* the browser.
|
|
7
|
+
*
|
|
8
|
+
* Uses a disk cache keyed by file content hash — Babel only runs once
|
|
9
|
+
* per Angular package version. Subsequent builds are pure file reads.
|
|
10
|
+
*/
|
|
11
|
+
export declare const angularLinkerPlugin: BunPlugin;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Compute the deterministic vendor paths mapping (no build needed).
|
|
2
|
+
* This can be called before vendor files exist on disk. */
|
|
3
|
+
export declare const buildAngularVendor: (buildDir: string) => Promise<void>;
|
|
4
|
+
export declare const computeAngularVendorPaths: () => Record<string, string>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Compute the deterministic vendor paths mapping (no build needed).
|
|
2
|
+
* This can be called before vendor files exist on disk. */
|
|
3
|
+
export declare const computeVendorPaths: () => Record<string, string>;
|
|
4
|
+
/** Build React packages into stable vendor files (no content hash).
|
|
5
|
+
* Output goes to {buildDir}/react/vendor/ with predictable names like
|
|
6
|
+
* react.js, react-dom_client.js, etc. These files never change between
|
|
7
|
+
* rebuilds, so the browser always loads React from a single source. */
|
|
8
|
+
export declare const buildReactVendor: (buildDir: string) => Promise<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Build Svelte packages into stable vendor files (no content hash).
|
|
2
|
+
* Output goes to {buildDir}/svelte/vendor/ with predictable names. */
|
|
3
|
+
export declare const buildSvelteVendor: (buildDir: string) => Promise<void>;
|
|
4
|
+
/** Compute the deterministic vendor paths mapping (no build needed).
|
|
5
|
+
* This can be called before vendor files exist on disk. */
|
|
6
|
+
export declare const computeSvelteVendorPaths: () => Record<string, string>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Build Vue packages into stable vendor files (no content hash).
|
|
2
|
+
* Output goes to {buildDir}/vue/vendor/ with predictable names. */
|
|
3
|
+
export declare const buildVueVendor: (buildDir: string) => Promise<void>;
|
|
4
|
+
/** Compute the deterministic vendor paths mapping (no build needed).
|
|
5
|
+
* This can be called before vendor files exist on disk. */
|
|
6
|
+
export declare const computeVueVendorPaths: () => Record<string, string>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CompilerOptions } from '@angular/compiler-cli';
|
|
2
|
+
import ts from 'typescript';
|
|
3
|
+
type AngularCompilerCache = {
|
|
4
|
+
host: ts.CompilerHost;
|
|
5
|
+
options: CompilerOptions;
|
|
6
|
+
configHash: string;
|
|
7
|
+
tsLibDir: string;
|
|
8
|
+
lastUsed: number;
|
|
9
|
+
};
|
|
10
|
+
declare global {
|
|
11
|
+
var __angularCompilerCache: AngularCompilerCache | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare const compileAngularFile: (inputPath: string, outDir: string) => Promise<string[]>;
|
|
14
|
+
/** Angular HMR Runtime Layer (Level 3) — JIT-mode compilation for dev/HMR builds.
|
|
15
|
+
* Uses ts.transpileModule() instead of Angular AOT performCompilation().
|
|
16
|
+
* Inlines templateUrl → template and styleUrls → styles from disk.
|
|
17
|
+
* Recursively transpiles all local imports so Bun's bundler can resolve them.
|
|
18
|
+
* ~50-100ms for a tree of ~10 files vs ~500-700ms for AOT. */
|
|
19
|
+
export declare const compileAngularFileJIT: (inputPath: string, outDir: string, rootDir?: string) => Promise<string[]>;
|
|
20
|
+
export declare const compileAngular: (entryPoints: string[], outRoot: string, hmr?: boolean) => Promise<{
|
|
21
|
+
clientPaths: string[];
|
|
22
|
+
serverPaths: string[];
|
|
23
|
+
allIndexesUnchanged?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
allIndexesUnchanged: boolean;
|
|
26
|
+
clientPaths: string[];
|
|
27
|
+
serverPaths: string[];
|
|
28
|
+
}>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Built = {
|
|
2
|
+
ssr: string;
|
|
3
|
+
client: string;
|
|
4
|
+
hasAwaitSlot: boolean;
|
|
5
|
+
};
|
|
6
|
+
type Cache = Map<string, Built>;
|
|
7
|
+
export declare const clearSvelteCompilerCache: () => void;
|
|
8
|
+
export declare const compileSvelte: (entryPoints: string[], svelteRoot: string, cache?: Cache, isDev?: boolean) => Promise<{
|
|
9
|
+
svelteClientPaths: string[];
|
|
10
|
+
svelteIndexPaths: string[];
|
|
11
|
+
svelteServerPaths: string[];
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SFCDescriptor } from '@vue/compiler-sfc';
|
|
2
|
+
export type VueChangeType = 'style-only' | 'template-only' | 'script' | 'full';
|
|
3
|
+
export declare const vueHmrMetadata: Map<string, {
|
|
4
|
+
hmrId: string;
|
|
5
|
+
changeType: VueChangeType;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const clearVueHmrCaches: () => void;
|
|
8
|
+
export declare const detectVueChangeType: (filePath: string, descriptor: SFCDescriptor) => "script" | "style-only" | "template-only" | "full";
|
|
9
|
+
export declare const generateVueHmrId: (sourceFilePath: string, vueRootDir: string) => string;
|
|
10
|
+
export declare const compileVue: (entryPoints: string[], vueRootDir: string, isDev?: boolean) => Promise<{
|
|
11
|
+
hmrMetadata: Map<string, {
|
|
12
|
+
hmrId: string;
|
|
13
|
+
changeType: VueChangeType;
|
|
14
|
+
}>;
|
|
15
|
+
vueClientPaths: string[];
|
|
16
|
+
vueCssPaths: string[];
|
|
17
|
+
vueIndexPaths: string[];
|
|
18
|
+
vueServerPaths: string[];
|
|
19
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generateReactIndexFiles: (reactPagesDirectory: string, reactIndexesDirectory: string, isDev?: boolean) => Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bun build plugin that wraps HTML/HTMX scripts with import.meta.hot support
|
|
3
|
+
* for granular HMR. This allows script changes to hot-reload independently
|
|
4
|
+
* without triggering a full HTML page rebuild.
|
|
5
|
+
*/
|
|
6
|
+
import type { BunPlugin } from 'bun';
|
|
7
|
+
/**
|
|
8
|
+
* Creates a Bun build plugin that wraps HTML/HTMX scripts with HMR support
|
|
9
|
+
* @param htmlDir - The HTML directory path (normalized with forward slashes)
|
|
10
|
+
* @param htmxDir - The HTMX directory path (normalized with forward slashes)
|
|
11
|
+
* @returns Bun build plugin
|
|
12
|
+
*/
|
|
13
|
+
export declare const createHTMLScriptHMRPlugin: (htmlDir?: string, htmxDir?: string) => BunPlugin;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { IslandFramework, IslandRegistryInput } from '../../types/island';
|
|
2
|
+
type IslandBuildEntry = {
|
|
3
|
+
component: string;
|
|
4
|
+
entryPath: string;
|
|
5
|
+
framework: IslandFramework;
|
|
6
|
+
};
|
|
7
|
+
type IslandDefinition = {
|
|
8
|
+
buildReference: {
|
|
9
|
+
export?: string;
|
|
10
|
+
source: string;
|
|
11
|
+
} | null;
|
|
12
|
+
component: string;
|
|
13
|
+
framework: IslandFramework;
|
|
14
|
+
};
|
|
15
|
+
type IslandRegistryBuildInfo = {
|
|
16
|
+
definitions: IslandDefinition[];
|
|
17
|
+
hasNamedExport: boolean;
|
|
18
|
+
registry: IslandRegistryInput;
|
|
19
|
+
resolvedRegistryPath: string;
|
|
20
|
+
};
|
|
21
|
+
type IslandEntryPathMaps = Partial<Record<IslandFramework, Map<string, string>>>;
|
|
22
|
+
export declare const collectIslandFrameworkSources: (buildInfo: IslandRegistryBuildInfo) => Partial<Record<IslandFramework, string[]>>;
|
|
23
|
+
export declare const generateIslandEntryPoints: ({ buildInfo, buildPath, clientPathMaps }: {
|
|
24
|
+
buildInfo: IslandRegistryBuildInfo;
|
|
25
|
+
buildPath: string;
|
|
26
|
+
clientPathMaps?: IslandEntryPathMaps;
|
|
27
|
+
}) => Promise<{
|
|
28
|
+
entries: IslandBuildEntry[];
|
|
29
|
+
generatedRoot: string;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const loadIslandRegistryBuildInfo: (registryPath: string) => Promise<IslandRegistryBuildInfo>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Native Zig import rewriter — 15x faster than JS regex on large files.
|
|
2
|
+
* Falls back to JS if the native addon isn't available (Windows, missing .so). */
|
|
3
|
+
/** Rewrite import specifiers in a string using the native Zig scanner.
|
|
4
|
+
* Returns the rewritten string, or null if native isn't available. */
|
|
5
|
+
export declare const nativeRewriteImports: (content: string, replacements: [string, string][]) => string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const outputLogs: (logs: (BuildMessage | ResolveMessage)[]) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a bare module import (e.g. "@absolutejs/absolute/svelte/components/Image.svelte")
|
|
3
|
+
* to an absolute file path by reading the package's exports map in package.json.
|
|
4
|
+
*
|
|
5
|
+
* Returns the resolved absolute path, or null if the import can't be resolved.
|
|
6
|
+
*/
|
|
7
|
+
type ExportConditions = 'browser' | 'import';
|
|
8
|
+
export declare const resolvePackageImport: (specifier: string, conditions?: ExportConditions[]) => string | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Post-process bundled output files to rewrite bare specifiers
|
|
2
|
+
* (e.g. `from "@angular/core"`) to stable vendor paths
|
|
3
|
+
* (e.g. `from "/angular/vendor/angular_core.js"`).
|
|
4
|
+
*
|
|
5
|
+
* Uses native Zig scanner (15x faster) when available, falls back
|
|
6
|
+
* to JS regex on Windows or when the native addon is missing. */
|
|
7
|
+
export declare const rewriteImports: (outputPaths: string[], vendorPaths: Record<string, string>) => Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Post-process bundled output files to rewrite bare React specifiers
|
|
2
|
+
* (e.g. `from "react"`) to stable vendor paths (e.g. `from "/vendor/react.js"`).
|
|
3
|
+
*
|
|
4
|
+
* Uses native Zig scanner when available (15x faster on large files),
|
|
5
|
+
* falls back to JS regex on Windows or when native addon is missing. */
|
|
6
|
+
export declare const patchRefreshGlobals: (outputPaths: string[]) => Promise<void>;
|
|
7
|
+
export declare const rewriteReactImports: (outputPaths: string[], vendorPaths: Record<string, string>) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const scanCssEntryPoints: (dir: string, ignore?: string[]) => Promise<string[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const scanEntryPoints: (dir: string, pattern: string) => Promise<string[]>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IslandRegistryInput } from '../../types/island';
|
|
2
|
+
export declare const transformStaticPageHtml: (originalHtml: string, registry: IslandRegistryInput) => Promise<string>;
|
|
3
|
+
export declare const transformStaticHTMXStreamSlotHtml: (originalHtml: string) => string;
|
|
4
|
+
export declare const transformStaticStreamingSlotHtml: (originalHtml: string) => string;
|
|
5
|
+
export declare const transformCurrentStaticPageHtml: (html: string, options?: {
|
|
6
|
+
enableHTMXStreaming?: boolean;
|
|
7
|
+
enableStaticStreaming?: boolean;
|
|
8
|
+
}) => Promise<string>;
|
|
9
|
+
export declare const transformStaticPagesWithIslands: (registryPath: string | undefined, pagePaths: string[]) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const updateAssetPaths: (manifest: Record<string, string>, directory: string) => Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wraps HTML/HTMX TypeScript/JavaScript scripts with import.meta.hot support
|
|
3
|
+
* for granular HMR updates. This allows script changes to hot-reload
|
|
4
|
+
* without triggering a full HTML page rebuild.
|
|
5
|
+
*
|
|
6
|
+
* The wrapper is minimal - it just adds import.meta.hot.accept() so Bun
|
|
7
|
+
* knows this module can be hot-reloaded. Event listener cleanup is handled
|
|
8
|
+
* by the HMR client (cloning elements before script re-execution).
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Wrap a script with HMR support using Bun's import.meta.hot API
|
|
12
|
+
* @param code - The original script code
|
|
13
|
+
* @param scriptId - Unique identifier for this script (usually the file path)
|
|
14
|
+
* @returns Wrapped code with HMR support
|
|
15
|
+
*/
|
|
16
|
+
export declare const isHTMLScript: (filePath: string, htmlDir?: string, htmxDir?: string) => boolean;
|
|
17
|
+
export declare const wrapHTMLScriptWithHMR: (code: string, scriptId: string) => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TelemetryConfig } from '../../../types/telemetry';
|
|
2
|
+
export declare const getTelemetryConfig: () => TelemetryConfig | null;
|
|
3
|
+
export declare const isTelemetryEnabled: () => boolean;
|
|
4
|
+
export declare const saveTelemetryConfig: (config: TelemetryConfig) => void;
|
|
5
|
+
export declare const telemetry: (args: string[]) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sendTelemetryEvent: (event: string, payload: Record<string, unknown>) => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type StateCreator, type StoreApi } from 'zustand/vanilla';
|
|
2
|
+
export type IslandStoreState = object;
|
|
3
|
+
type IslandStoreSnapshot = Record<string, unknown>;
|
|
4
|
+
export type IslandStateSnapshot = Record<string, IslandStoreSnapshot>;
|
|
5
|
+
type AnyIslandStore = StoreApi<object>;
|
|
6
|
+
type IslandStoreInstance = {
|
|
7
|
+
applyExternalSnapshot: (snapshot: IslandStoreSnapshot) => void;
|
|
8
|
+
store: AnyIslandStore;
|
|
9
|
+
};
|
|
10
|
+
declare const ABSOLUTE_ISLAND_STATE = "__ABS_ISLAND_STATE__";
|
|
11
|
+
declare const ABSOLUTE_ISLAND_STORES = "__ABS_ISLAND_STORES__";
|
|
12
|
+
declare global {
|
|
13
|
+
var __ABS_ISLAND_STATE__: IslandStateSnapshot | undefined;
|
|
14
|
+
var __ABS_ISLAND_STORES__: Map<string, Set<IslandStoreInstance>> | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare const createIslandStore: <TState extends IslandStoreState, TActions extends object>(storeId: string, initialState: TState, createState: StateCreator<TState, [], [], TActions>) => StoreApi<Omit<TState, keyof TActions> & TActions>;
|
|
17
|
+
export declare const getIslandStoreServerSnapshot: <TState extends IslandStoreState, TSelected>(store: StoreApi<TState>, selector: (state: TState) => TSelected) => TSelected;
|
|
18
|
+
export declare const initializeIslandStores: (state: IslandStateSnapshot) => void;
|
|
19
|
+
export declare const readIslandStore: <TState extends IslandStoreState, TSelected>(store: StoreApi<TState>, selector: (state: TState) => TSelected) => TSelected;
|
|
20
|
+
export declare const resetIslandStoreForTesting: () => void;
|
|
21
|
+
export declare const subscribeIslandStore: <TState extends IslandStoreState, TSelected>(store: StoreApi<TState>, selector: (state: TState) => TSelected, listener: (value: TSelected) => void) => () => void;
|
|
22
|
+
export { ABSOLUTE_ISLAND_STATE, ABSOLUTE_ISLAND_STORES };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
__ABS_SLOT_ENQUEUE__?: (id: string, payload: unknown) => void;
|
|
4
|
+
__ABS_SLOT_FLUSH__?: () => void;
|
|
5
|
+
__ABS_SLOT_CONSUMERS__?: Record<string, ((payload: unknown) => boolean | void) | undefined>;
|
|
6
|
+
__ABS_SLOT_HYDRATION_PENDING__?: boolean;
|
|
7
|
+
__ABS_SLOT_PENDING__?: Record<string, unknown>;
|
|
8
|
+
__ABS_SLOT_RUNTIME__?: boolean;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export declare const getStreamSwapRuntimeScript: () => string;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export declare const ANGULAR_INIT_TIMEOUT_MS = 500;
|
|
2
|
+
export declare const ANSI_ESCAPE_LENGTH = 3;
|
|
3
|
+
export declare const ASCII_SPACE = 32;
|
|
4
|
+
export declare const BASE_36_RADIX = 36;
|
|
5
|
+
export declare const BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet";
|
|
6
|
+
export declare const BODY_SLICE_LENGTH = 2000;
|
|
7
|
+
export declare const BYTES_PER_KILOBYTE = 1024;
|
|
8
|
+
export declare const CLI_ARGS_OFFSET = 3;
|
|
9
|
+
export declare const CSS_ERROR_RESOLVE_DELAY_MS = 50;
|
|
10
|
+
export declare const CSS_MAX_CHECK_ATTEMPTS = 10;
|
|
11
|
+
export declare const CSS_MAX_PARSE_TIMEOUT_MS = 500;
|
|
12
|
+
export declare const CSS_SHEET_READY_TIMEOUT_MS = 100;
|
|
13
|
+
export declare const DEFAULT_CHUNK_SIZE = 16384;
|
|
14
|
+
export declare const DEFAULT_DEBOUNCE_MS = 15;
|
|
15
|
+
export declare const DEFAULT_PORT = 3000;
|
|
16
|
+
export declare const DEV_SERVER_RESTART_DEBOUNCE_MS = 100;
|
|
17
|
+
export declare const DOM_UPDATE_DELAY_MS = 50;
|
|
18
|
+
export declare const FILE_PROTOCOL_PREFIX_LENGTH = 7;
|
|
19
|
+
export declare const FOCUS_ID_PREFIX_LENGTH = 3;
|
|
20
|
+
export declare const FOCUS_IDX_PREFIX_LENGTH = 4;
|
|
21
|
+
export declare const FOCUS_NAME_PREFIX_LENGTH = 5;
|
|
22
|
+
export declare const HMR_UPDATE_TIMEOUT_MS = 2000;
|
|
23
|
+
export declare const HOOK_SIGNATURE_LENGTH = 12;
|
|
24
|
+
export declare const EXCLUDE_LAST_OFFSET = -1;
|
|
25
|
+
export declare const HTTP_STATUS_OK = 200;
|
|
26
|
+
export declare const HTTP_STATUS_BAD_REQUEST = 400;
|
|
27
|
+
export declare const HTTP_STATUS_NOT_FOUND = 404;
|
|
28
|
+
export declare const HOURS_IN_DAY = 24;
|
|
29
|
+
export declare const HOURS_IN_HALF_DAY = 12;
|
|
30
|
+
export declare const MAX_ERROR_LENGTH = 200;
|
|
31
|
+
export declare const MAX_RECONNECT_ATTEMPTS = 60;
|
|
32
|
+
export declare const MILLISECONDS_IN_A_SECOND = 1000;
|
|
33
|
+
export declare const MINUTES_IN_AN_HOUR = 60;
|
|
34
|
+
export declare const SECONDS_IN_A_MINUTE = 60;
|
|
35
|
+
export declare const MILLISECONDS_IN_A_MINUTE: number;
|
|
36
|
+
export declare const MILLISECONDS_IN_A_DAY: number;
|
|
37
|
+
export declare const OVERLAY_FADE_DURATION_MS = 150;
|
|
38
|
+
export declare const PING_INTERVAL_MS = 30000;
|
|
39
|
+
export declare const RAF_BATCH_COUNT = 3;
|
|
40
|
+
export declare const RANDOM_ID_END_INDEX = 11;
|
|
41
|
+
export declare const REBUILD_BATCH_DELAY_MS = 10;
|
|
42
|
+
export declare const REBUILD_RELOAD_DELAY_MS = 200;
|
|
43
|
+
export declare const RECONNECT_INITIAL_DELAY_MS = 500;
|
|
44
|
+
export declare const RECONNECT_POLL_INTERVAL_MS = 300;
|
|
45
|
+
export declare const RAG_CHUNK_ID_PAD_LENGTH = 3;
|
|
46
|
+
export declare const RAG_DOCUMENT_ID_PREVIEW_LENGTH = 32;
|
|
47
|
+
export declare const RAG_DOCUMENT_SLUG_MAX_LENGTH = 48;
|
|
48
|
+
export declare const RAG_MIN_CHUNK_LENGTH_FLOOR = 120;
|
|
49
|
+
export declare const RAG_NATIVE_QUERY_CANDIDATE_LIMIT = 1000;
|
|
50
|
+
export declare const RAG_SEARCH_SCORE_DECIMAL_PLACES = 3;
|
|
51
|
+
export declare const RAG_VECTOR_DIMENSIONS_DEFAULT = 24;
|
|
52
|
+
export declare const REACT_STREAM_SLOT_FAST_DELAY_MS = 5;
|
|
53
|
+
export declare const REACT_STREAM_SLOT_SLOW_DELAY_MS = 20;
|
|
54
|
+
export declare const SIGINT_EXIT_CODE = 130;
|
|
55
|
+
export declare const SIGTERM_EXIT_CODE = 143;
|
|
56
|
+
export declare const SVELTE_CSS_LOAD_TIMEOUT_MS = 500;
|
|
57
|
+
export declare const TIME_PRECISION = 2;
|
|
58
|
+
export declare const TWO_THIRDS: number;
|
|
59
|
+
export declare const UNFOUND_INDEX = -1;
|
|
60
|
+
export declare const WEBSOCKET_NORMAL_CLOSURE = 1000;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ConventionsMap } from '../../types/conventions';
|
|
2
|
+
import type { BuildConfig } from '../../types/build';
|
|
3
|
+
export declare const build: ({ buildDirectory, assetsDirectory, publicDirectory, islands, reactDirectory, htmlDirectory, htmxDirectory, angularDirectory, svelteDirectory, vueDirectory, stylesConfig, tailwind, options, incrementalFiles, mode }: BuildConfig) => Promise<{
|
|
4
|
+
conventions?: undefined;
|
|
5
|
+
manifest?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
conventions: ConventionsMap;
|
|
8
|
+
manifest: Record<string, string>;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IslandRegistryInput } from '../../types/island';
|
|
2
|
+
declare global {
|
|
3
|
+
var __absoluteIslandRegistry: IslandRegistryInput | undefined;
|
|
4
|
+
}
|
|
5
|
+
export declare const getCurrentIslandRegistry: () => Partial<Record<import("..").IslandFramework, Record<string, unknown>>> | undefined;
|
|
6
|
+
export declare const requireCurrentIslandRegistry: () => Partial<Record<import("..").IslandFramework, Record<string, unknown>>>;
|
|
7
|
+
export declare const setCurrentIslandRegistry: (registry: IslandRegistryInput | undefined) => void;
|