veryfront 0.0.90 → 0.0.91
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 +0 -9
- package/esm/_dnt.shims.d.ts +14 -14
- package/esm/_dnt.shims.d.ts.map +1 -1
- package/esm/deno.js +1 -1
- package/esm/src/cli/mcp/advanced-tools.d.ts +2 -2
- package/esm/src/cli/templates/manifest.d.ts +449 -449
- package/esm/src/cli/templates/manifest.js +480 -480
- package/esm/src/html/styles-builder/tailwind-compiler.d.ts.map +1 -1
- package/esm/src/html/styles-builder/tailwind-compiler.js +26 -4
- package/esm/src/modules/import-map/default-import-map.d.ts.map +1 -1
- package/esm/src/modules/import-map/default-import-map.js +9 -4
- package/esm/src/platform/compat/path-helper.d.ts +7 -7
- package/esm/src/platform/compat/path-helper.d.ts.map +1 -1
- package/esm/src/react/components/ai/agent-card.d.ts +1 -1
- package/esm/src/react/components/ai/agent-card.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/composition/api.d.ts +4 -5
- package/esm/src/react/components/ai/chat/composition/api.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/index.d.ts +2 -7
- package/esm/src/react/components/ai/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/ai/message.d.ts +2 -2
- package/esm/src/react/components/ai/message.d.ts.map +1 -1
- package/esm/src/react/primitives/agent-primitives.d.ts +3 -3
- package/esm/src/react/primitives/agent-primitives.d.ts.map +1 -1
- package/esm/src/react/primitives/chat-container.d.ts +1 -1
- package/esm/src/react/primitives/chat-container.d.ts.map +1 -1
- package/esm/src/react/primitives/input-box.d.ts +3 -3
- package/esm/src/react/primitives/input-box.d.ts.map +1 -1
- package/esm/src/react/primitives/message-list.d.ts +4 -4
- package/esm/src/react/primitives/message-list.d.ts.map +1 -1
- package/esm/src/react/primitives/tool-primitives.d.ts +3 -3
- package/esm/src/react/primitives/tool-primitives.d.ts.map +1 -1
- package/esm/src/rendering/ssr-globals/context.d.ts +1 -6
- package/esm/src/rendering/ssr-globals/context.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/deno.js +1 -1
- package/src/src/cli/templates/manifest.js +480 -480
- package/src/src/html/styles-builder/tailwind-compiler.ts +27 -5
- package/src/src/modules/import-map/default-import-map.ts +11 -4
|
@@ -582,12 +582,32 @@ async function loadPlugin(id: string): Promise<unknown> {
|
|
|
582
582
|
return pluginCache.get(id);
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
-
const
|
|
585
|
+
const isDeno = typeof (dntShim.dntGlobalThis as { Deno?: unknown }).Deno !== "undefined";
|
|
586
586
|
|
|
587
587
|
try {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
588
|
+
let mod: unknown;
|
|
589
|
+
|
|
590
|
+
if (isDeno) {
|
|
591
|
+
// Deno supports HTTP imports natively
|
|
592
|
+
const url = `https://esm.sh/${id}`;
|
|
593
|
+
logger.debug("[tailwind] Loading plugin via esm.sh", { id, url });
|
|
594
|
+
mod = await import(url);
|
|
595
|
+
} else {
|
|
596
|
+
// Node.js: Try to import from node_modules
|
|
597
|
+
// First try the bare specifier, then fall back to global node_modules
|
|
598
|
+
logger.debug("[tailwind] Loading plugin from node_modules", { id });
|
|
599
|
+
try {
|
|
600
|
+
mod = await import(id);
|
|
601
|
+
} catch {
|
|
602
|
+
// Plugin not installed - this is expected for most user projects
|
|
603
|
+
// Log at debug level since it's not an error, just a missing optional plugin
|
|
604
|
+
logger.debug("[tailwind] Plugin not installed", { id });
|
|
605
|
+
pluginCache.set(id, null);
|
|
606
|
+
return null;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
const plugin = (mod as { default?: unknown }).default ?? mod;
|
|
591
611
|
pluginCache.set(id, plugin);
|
|
592
612
|
return plugin;
|
|
593
613
|
} catch (error) {
|
|
@@ -645,8 +665,10 @@ async function getCompiler(stylesheet: string): Promise<Awaited<ReturnType<typeo
|
|
|
645
665
|
},
|
|
646
666
|
loadModule: async (id: string) => {
|
|
647
667
|
const plugin = await loadPlugin(id);
|
|
668
|
+
// If plugin is null (not installed in Node.js), return empty module to prevent crash
|
|
669
|
+
// The stylesheet will compile but plugin-specific features won't work
|
|
648
670
|
// deno-lint-ignore no-explicit-any
|
|
649
|
-
return { module: plugin as any, base: "/", path: "/" };
|
|
671
|
+
return { module: (plugin ?? {}) as any, base: "/", path: "/" };
|
|
650
672
|
},
|
|
651
673
|
});
|
|
652
674
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as dntShim from "../../../_dnt.shims.js";
|
|
2
2
|
import type { ImportMapConfig } from "./types.js";
|
|
3
3
|
import { getReactImportMap } from "../../transforms/esm/package-registry.js";
|
|
4
|
+
import { isDeno } from "../../platform/compat/runtime.js";
|
|
4
5
|
|
|
5
6
|
function ensureTrailingSlash(path: string): string {
|
|
6
7
|
return path.endsWith("/") ? path : `${path}/`;
|
|
@@ -24,10 +25,16 @@ function getFrameworkRoot(): string {
|
|
|
24
25
|
|
|
25
26
|
function getVeryfrontSsrImportMap(): Record<string, string> {
|
|
26
27
|
const srcPath = `file://${getFrameworkRoot()}src`;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
28
|
+
|
|
29
|
+
// In Deno source, files have .tsx/.ts extensions
|
|
30
|
+
// In npm package (Node.js/Bun), dnt transforms to .js
|
|
31
|
+
const tsxExt = isDeno ? ".tsx" : ".js";
|
|
32
|
+
const tsExt = isDeno ? ".ts" : ".js";
|
|
33
|
+
|
|
34
|
+
const head = `${srcPath}/react/components/Head${tsxExt}`;
|
|
35
|
+
const router = `${srcPath}/react/router/index${tsExt}`;
|
|
36
|
+
const context = `${srcPath}/react/context/index${tsExt}`;
|
|
37
|
+
const fonts = `${srcPath}/react/fonts/index${tsExt}`;
|
|
31
38
|
|
|
32
39
|
return {
|
|
33
40
|
"veryfront/head": head,
|