@townco/gui-template 0.1.0 → 0.1.3

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/package.json CHANGED
@@ -1,20 +1,18 @@
1
1
  {
2
2
  "name": "@townco/gui-template",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
7
7
  "src",
8
8
  "index.html",
9
- "vite.config.ts",
10
- "postcss.config.js",
9
+ "public",
11
10
  "README.md"
12
11
  ],
13
12
  "repository": {
14
13
  "type": "git",
15
14
  "url": "git+https://github.com/federicoweber/agent_hub.git"
16
15
  },
17
- "author": "Federico Weber",
18
16
  "scripts": {
19
17
  "dev": "vite",
20
18
  "build": "vite build",
@@ -22,14 +20,14 @@
22
20
  "check": "tsc --noEmit"
23
21
  },
24
22
  "dependencies": {
25
- "@townco/ui": "^0.1.0",
23
+ "@townco/ui": "workspace:*",
26
24
  "lucide-react": "^0.552.0",
27
25
  "react": "^19.2.0",
28
26
  "react-dom": "^19.2.0"
29
27
  },
30
28
  "devDependencies": {
31
29
  "@tailwindcss/postcss": "^4.1.17",
32
- "@townco/tsconfig": "^0.1.0",
30
+ "@townco/tsconfig": "workspace:*",
33
31
  "@types/react": "^19.2.2",
34
32
  "@types/react-dom": "^19.2.2",
35
33
  "@vitejs/plugin-react": "^5.1.0",
package/src/App.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { AcpClient } from "@townco/ui";
1
+ import { AcpClient } from "@town/ui";
2
2
  import { useEffect, useState } from "react";
3
3
  import { ChatView } from "./ChatView.js";
4
4
  import { config } from "./config.js";
package/src/ChatView.tsx CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  useChatMessages,
4
4
  useChatSession,
5
5
  useChatStore,
6
- } from "@townco/ui";
6
+ } from "@town/ui";
7
7
  import {
8
8
  ChatInputField,
9
9
  ChatInputRoot,
@@ -15,7 +15,7 @@ import {
15
15
  Message,
16
16
  MessageContent,
17
17
  type TodoItem,
18
- } from "@townco/ui/gui";
18
+ } from "@town/ui/gui";
19
19
  import { ChevronDown, SendIcon } from "lucide-react";
20
20
  import { useEffect, useRef, useState } from "react";
21
21
 
@@ -24,7 +24,7 @@ export interface ChatViewProps {
24
24
  }
25
25
 
26
26
  export function ChatView({ client }: ChatViewProps) {
27
- // Use shared hooks from @townco/ui/core
27
+ // Use shared hooks from @town/ui/core
28
28
  const { connectionStatus, connect } = useChatSession(client);
29
29
  const { messages } = useChatMessages(client);
30
30
  const error = useChatStore((state) => state.error);
package/src/main.tsx CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import ReactDOM from "react-dom/client";
3
3
  import App from "./App.js";
4
- import "@townco/ui/styles/global.css";
4
+ import "@town/ui/styles/global.css";
5
5
 
6
6
  const rootElement = document.getElementById("root");
7
7
  if (!rootElement) throw new Error("Root element not found");
package/postcss.config.js DELETED
@@ -1,5 +0,0 @@
1
- export default {
2
- plugins: {
3
- "@tailwindcss/postcss": {},
4
- },
5
- };
package/vite.config.ts DELETED
@@ -1,94 +0,0 @@
1
- import path from "node:path";
2
- import react from "@vitejs/plugin-react";
3
- import { defineConfig } from "vite";
4
-
5
- // Create a stub module for stdio transport to prevent Node.js dependencies
6
- const stdioStubPlugin = () => ({
7
- name: "stdio-stub",
8
- resolveId(id: string) {
9
- // Intercept stdio transport imports and replace with stub
10
- if (
11
- id.includes("sdk/transports/stdio") ||
12
- id.includes("transports/stdio.js")
13
- ) {
14
- return id;
15
- }
16
- return null;
17
- },
18
- load(id: string) {
19
- if (
20
- id.includes("sdk/transports/stdio") ||
21
- id.includes("transports/stdio.js")
22
- ) {
23
- // Return a stub implementation that throws an error if used
24
- return `
25
- export class StdioTransport {
26
- constructor() {
27
- throw new Error("StdioTransport is not available in the browser. Use HttpTransport or WebSocketTransport instead.");
28
- }
29
- async connect() { throw new Error("StdioTransport not available in browser"); }
30
- async disconnect() {}
31
- async send() { throw new Error("StdioTransport not available in browser"); }
32
- async *receive() { throw new Error("StdioTransport not available in browser"); }
33
- isConnected() { return false; }
34
- onSessionUpdate() { return () => {}; }
35
- onError() { return () => {}; }
36
- }
37
- export const StdioTransportOptions = {};
38
- `;
39
- }
40
- return null;
41
- },
42
- });
43
-
44
- // https://vitejs.dev/config/
45
- export default defineConfig({
46
- plugins: [react(), stdioStubPlugin()],
47
- resolve: {
48
- alias: {
49
- "@": path.resolve(__dirname, "./src"),
50
- },
51
- },
52
- optimizeDeps: {
53
- exclude: [],
54
- },
55
- build: {
56
- rollupOptions: {
57
- output: {
58
- manualChunks: (id) => {
59
- // Split React and ReactDOM into their own chunk
60
- if (
61
- id.includes("node_modules/react") ||
62
- id.includes("node_modules/react-dom")
63
- ) {
64
- return "react";
65
- }
66
- // Split Radix UI components into their own chunk
67
- if (id.includes("node_modules/@radix-ui")) {
68
- return "radix";
69
- }
70
- // Split markdown rendering into its own chunk
71
- if (
72
- id.includes("node_modules/react-markdown") ||
73
- id.includes("node_modules/remark-gfm")
74
- ) {
75
- return "markdown";
76
- }
77
- // Split lucide icons into their own chunk
78
- if (id.includes("node_modules/lucide-react")) {
79
- return "icons";
80
- }
81
- // Split ACP SDK into its own chunk
82
- if (id.includes("node_modules/@agentclientprotocol")) {
83
- return "acp-sdk";
84
- }
85
- // Split other node_modules into a vendor chunk
86
- if (id.includes("node_modules")) {
87
- return "vendor";
88
- }
89
- },
90
- },
91
- },
92
- chunkSizeWarningLimit: 600, // Slightly increase limit to avoid false positives
93
- },
94
- });