@absolutejs/absolute 0.19.0-beta.225 → 0.19.0-beta.227
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/.absolutejs/eslint-cache +1 -0
- package/.absolutejs/prettier.cache.json +42 -19
- package/.absolutejs/vue-tsc.tsbuildinfo +1 -1
- package/.claude/settings.local.json +3 -1
- package/ROADMAP.md +0 -25
- package/dist/{Image-y5bdvj57.vue → Image-b3r6hxqk.vue} +6 -1
- package/dist/ai/index.js +529 -0
- package/dist/ai/index.js.map +13 -0
- package/dist/ai/providers/anthropic.js +396 -0
- package/dist/ai/providers/anthropic.js.map +10 -0
- package/dist/ai/providers/ollama.js +233 -0
- package/dist/ai/providers/ollama.js.map +10 -0
- package/dist/ai/providers/openai.js +355 -0
- package/dist/ai/providers/openai.js.map +10 -0
- package/dist/ai-client/angular/ai/index.js +532 -0
- package/dist/ai-client/react/ai/index.js +499 -0
- package/dist/ai-client/vue/ai/index.js +460 -0
- package/dist/angular/ai/index.js +668 -0
- package/dist/angular/ai/index.js.map +15 -0
- package/dist/angular/components/image.component.js +1 -1
- package/dist/angular/index.js +23 -3
- package/dist/angular/index.js.map +3 -3
- package/dist/build.js +64 -4
- package/dist/build.js.map +5 -5
- package/dist/index.js +66 -4
- package/dist/index.js.map +7 -7
- package/dist/react/ai/index.js +635 -0
- package/dist/react/ai/index.js.map +16 -0
- package/dist/react/components/index.js +11 -1
- package/dist/react/components/index.js.map +2 -2
- package/dist/react/hooks/index.js +11 -1
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +23 -3
- package/dist/react/index.js.map +3 -3
- package/dist/src/ai/client/actions.d.ts +46 -0
- package/dist/src/ai/client/connection.d.ts +9 -0
- package/dist/src/ai/client/messageStore.d.ts +12 -0
- package/dist/src/ai/conversationManager.d.ts +11 -0
- package/dist/src/ai/index.d.ts +3 -0
- package/dist/src/ai/protocol.d.ts +4 -0
- package/dist/src/ai/providers/anthropic.d.ts +3 -0
- package/dist/src/ai/providers/ollama.d.ts +6 -0
- package/dist/src/ai/providers/openai.d.ts +7 -0
- package/dist/src/ai/streamAI.d.ts +2 -0
- package/dist/src/angular/ai/ai-stream.service.d.ts +15 -0
- package/dist/src/angular/ai/index.d.ts +1 -0
- package/dist/src/react/ai/AIStreamProvider.d.ts +13 -0
- package/dist/src/react/ai/index.d.ts +2 -0
- package/dist/src/react/ai/useAIStream.d.ts +8 -0
- package/dist/src/svelte/ai/createAIStream.d.ts +10 -0
- package/dist/src/svelte/ai/index.d.ts +1 -0
- package/dist/src/vue/ai/index.d.ts +1 -0
- package/dist/src/vue/ai/useAIStream.d.ts +22 -0
- package/dist/svelte/ai/index.js +590 -0
- package/dist/svelte/ai/index.js.map +15 -0
- package/dist/svelte/components/Image.svelte +6 -1
- package/dist/svelte/index.js +23 -3
- package/dist/svelte/index.js.map +3 -3
- package/dist/types/ai.d.ts +188 -0
- package/dist/types/anthropic.d.ts +18 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/typeGuards.d.ts +3 -0
- package/dist/vue/ai/index.js +596 -0
- package/dist/vue/ai/index.js.map +15 -0
- package/dist/vue/components/Image.vue +6 -1
- package/dist/vue/components/index.js +12 -2
- package/dist/vue/components/index.js.map +1 -1
- package/dist/vue/index.js +23 -3
- package/dist/vue/index.js.map +3 -3
- package/package.json +36 -1
- package/scripts/build.ts +33 -0
- package/types/ai.ts +235 -0
- package/types/anthropic.ts +17 -0
- package/types/index.ts +1 -0
- package/types/typeGuards.ts +72 -1
package/dist/index.js
CHANGED
|
@@ -61,11 +61,57 @@ var __export = (target, all) => {
|
|
|
61
61
|
set: __exportSetter.bind(all, name)
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
|
+
var __legacyDecorateClassTS = function(decorators, target, key, desc) {
|
|
65
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
66
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
67
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
68
|
+
else
|
|
69
|
+
for (var i = decorators.length - 1;i >= 0; i--)
|
|
70
|
+
if (d = decorators[i])
|
|
71
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
72
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
73
|
+
};
|
|
64
74
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
65
75
|
var __require = import.meta.require;
|
|
66
76
|
|
|
67
77
|
// types/typeGuards.ts
|
|
68
|
-
var
|
|
78
|
+
var isValidAIClientMessage = (data) => {
|
|
79
|
+
if (!data || typeof data !== "object") {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
if (!("type" in data) || typeof data.type !== "string") {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
switch (data.type) {
|
|
86
|
+
case "message":
|
|
87
|
+
return "content" in data && typeof data.content === "string";
|
|
88
|
+
case "cancel":
|
|
89
|
+
return "conversationId" in data && typeof data.conversationId === "string";
|
|
90
|
+
case "branch":
|
|
91
|
+
return "messageId" in data && typeof data.messageId === "string" && "content" in data && typeof data.content === "string" && "conversationId" in data && typeof data.conversationId === "string";
|
|
92
|
+
default:
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
}, isValidAIServerMessage = (data) => {
|
|
96
|
+
if (!data || typeof data !== "object") {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
if (!("type" in data) || typeof data.type !== "string") {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
switch (data.type) {
|
|
103
|
+
case "chunk":
|
|
104
|
+
return "content" in data && typeof data.content === "string" && "messageId" in data && "conversationId" in data;
|
|
105
|
+
case "tool_status":
|
|
106
|
+
return "name" in data && "status" in data && "messageId" in data && "conversationId" in data;
|
|
107
|
+
case "complete":
|
|
108
|
+
return "messageId" in data && "conversationId" in data;
|
|
109
|
+
case "error":
|
|
110
|
+
return "message" in data && typeof data.message === "string";
|
|
111
|
+
default:
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
}, isValidHMRClientMessage = (data) => {
|
|
69
115
|
if (!data || typeof data !== "object") {
|
|
70
116
|
return false;
|
|
71
117
|
}
|
|
@@ -241,7 +287,12 @@ var CONVENTIONS_KEY = "__absoluteConventions", getMap = () => globalThis[CONVENT
|
|
|
241
287
|
}
|
|
242
288
|
}
|
|
243
289
|
} catch (renderError) {
|
|
244
|
-
|
|
290
|
+
const message = renderError instanceof Error ? renderError.message : "";
|
|
291
|
+
if (message.includes("Cannot find module") || message.includes("Cannot find package") || message.includes("not found in module")) {
|
|
292
|
+
console.error(`[SSR] Convention error page for ${framework} failed: missing framework package. Ensure the ${framework} runtime is installed (e.g. bun add ${framework === "react" ? "react react-dom" : framework}).`);
|
|
293
|
+
} else {
|
|
294
|
+
console.error(`[SSR] Failed to render ${framework} convention error page:`, renderError);
|
|
295
|
+
}
|
|
245
296
|
}
|
|
246
297
|
return null;
|
|
247
298
|
}, renderConventionNotFound = async (framework) => {
|
|
@@ -305,7 +356,12 @@ var CONVENTIONS_KEY = "__absoluteConventions", getMap = () => globalThis[CONVENT
|
|
|
305
356
|
}
|
|
306
357
|
}
|
|
307
358
|
} catch (renderError) {
|
|
308
|
-
|
|
359
|
+
const message = renderError instanceof Error ? renderError.message : "";
|
|
360
|
+
if (message.includes("Cannot find module") || message.includes("Cannot find package") || message.includes("not found in module")) {
|
|
361
|
+
console.error(`[SSR] Convention not-found page for ${framework} failed: missing framework package. Ensure the ${framework} runtime is installed (e.g. bun add ${framework === "react" ? "react react-dom" : framework}).`);
|
|
362
|
+
} else {
|
|
363
|
+
console.error(`[SSR] Failed to render ${framework} convention not-found page:`, renderError);
|
|
364
|
+
}
|
|
309
365
|
}
|
|
310
366
|
return null;
|
|
311
367
|
}, NOT_FOUND_PRIORITY, renderFirstNotFound = async () => {
|
|
@@ -172388,6 +172444,10 @@ ${content.slice(firstUseIdx)}`;
|
|
|
172388
172444
|
conventionsMap.vue = vueConventionResult.conventions;
|
|
172389
172445
|
if (angularConventionResult.conventions)
|
|
172390
172446
|
conventionsMap.angular = angularConventionResult.conventions;
|
|
172447
|
+
const notFoundFrameworks = ["react", "svelte", "vue", "angular"].filter((fw) => conventionsMap[fw]?.defaults?.notFound);
|
|
172448
|
+
if (notFoundFrameworks.length > 1) {
|
|
172449
|
+
logWarn(`Multiple frameworks define not-found convention files: ${notFoundFrameworks.join(", ")}. Only one will be used (priority: ${notFoundFrameworks[0]}). Remove not-found files from other frameworks to avoid ambiguity.`);
|
|
172450
|
+
}
|
|
172391
172451
|
const shouldIncludeHtmlAssets = !isIncremental || normalizedIncrementalFiles?.some((f) => f.includes("/html/") && (f.endsWith(".html") || f.endsWith(".css")));
|
|
172392
172452
|
const reactEntries = isIncremental && reactIndexesPath && reactPagesPath ? filterToIncrementalEntries(allReactEntries, (entry) => {
|
|
172393
172453
|
if (entry.startsWith(resolve13(reactIndexesPath))) {
|
|
@@ -178274,6 +178334,8 @@ export {
|
|
|
178274
178334
|
networking,
|
|
178275
178335
|
jsonLd2 as jsonLd,
|
|
178276
178336
|
isValidHMRClientMessage,
|
|
178337
|
+
isValidAIServerMessage,
|
|
178338
|
+
isValidAIClientMessage,
|
|
178277
178339
|
hmrState,
|
|
178278
178340
|
handleReactPageRequest,
|
|
178279
178341
|
handleHTMXPageRequest,
|
|
@@ -178337,5 +178399,5 @@ export {
|
|
|
178337
178399
|
ANGULAR_INIT_TIMEOUT_MS
|
|
178338
178400
|
};
|
|
178339
178401
|
|
|
178340
|
-
//# debugId=
|
|
178402
|
+
//# debugId=E279BFE08A160EC764756E2164756E21
|
|
178341
178403
|
//# sourceMappingURL=index.js.map
|