@abstractframework/code 0.1.0

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/dist/icon.svg ADDED
@@ -0,0 +1,40 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="none">
2
+ <!-- Background -->
3
+ <rect width="512" height="512" rx="96" fill="#1a1a2e"/>
4
+
5
+ <!-- Subtle gradient overlay -->
6
+ <defs>
7
+ <linearGradient id="bgGrad" x1="0%" y1="0%" x2="100%" y2="100%">
8
+ <stop offset="0%" stop-color="#7dd3fc" stop-opacity="0.12"/>
9
+ <stop offset="100%" stop-color="#60a5fa" stop-opacity="0.06"/>
10
+ </linearGradient>
11
+ <linearGradient id="accentGrad" x1="0%" y1="0%" x2="100%" y2="100%">
12
+ <stop offset="0%" stop-color="#7dd3fc"/>
13
+ <stop offset="100%" stop-color="#38bdf8"/>
14
+ </linearGradient>
15
+ </defs>
16
+
17
+ <rect width="512" height="512" rx="96" fill="url(#bgGrad)"/>
18
+
19
+ <!-- Abstract "A" symbol with gradient -->
20
+ <g transform="translate(256, 256)">
21
+ <!-- Main "A" shape -->
22
+ <path
23
+ d="M-80 80 L0 -100 L80 80"
24
+ stroke="url(#accentGrad)"
25
+ stroke-width="32"
26
+ stroke-linecap="round"
27
+ stroke-linejoin="round"
28
+ fill="none"
29
+ />
30
+ <!-- Crossbar -->
31
+ <path
32
+ d="M-50 20 L50 20"
33
+ stroke="url(#accentGrad)"
34
+ stroke-width="24"
35
+ stroke-linecap="round"
36
+ />
37
+ <!-- Dot accent -->
38
+ <circle cx="0" cy="-100" r="12" fill="#7dd3fc"/>
39
+ </g>
40
+ </svg>
@@ -0,0 +1,37 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover, maximum-scale=1, user-scalable=no" />
6
+
7
+ <!-- PWA Manifest -->
8
+ <link rel="manifest" href="./manifest.webmanifest" />
9
+
10
+ <!-- Theme & Status Bar -->
11
+ <meta name="theme-color" content="#1a1a2e" />
12
+ <meta name="color-scheme" content="dark" />
13
+
14
+ <!-- iOS PWA / Home Screen -->
15
+ <meta name="apple-mobile-web-app-capable" content="yes" />
16
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
17
+ <meta name="apple-mobile-web-app-title" content="AbstractCode" />
18
+ <link rel="apple-touch-icon" href="./icon.svg" />
19
+
20
+ <!-- Favicon -->
21
+ <link rel="icon" type="image/svg+xml" href="./icon.svg" />
22
+
23
+ <!-- App Description -->
24
+ <meta name="description" content="AbstractCode - Agentic Chat Interface for AbstractRuntime" />
25
+
26
+ <title>AbstractCode</title>
27
+
28
+ <!-- Preconnect to font CDN -->
29
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
30
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
31
+ <script type="module" crossorigin src="./assets/index-CUxisNNY.js"></script>
32
+ <link rel="stylesheet" crossorigin href="./assets/index-CEDSdZfs.css">
33
+ </head>
34
+ <body>
35
+ <div id="root"></div>
36
+ </body>
37
+ </html>
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "AbstractCode",
3
+ "short_name": "Abstract",
4
+ "description": "Agentic Chat Interface for the AbstractFramework",
5
+ "start_url": ".",
6
+ "display": "standalone",
7
+ "orientation": "portrait-primary",
8
+ "background_color": "#1a1a2e",
9
+ "theme_color": "#1a1a2e",
10
+ "icons": [
11
+ {
12
+ "src": "icon.svg",
13
+ "sizes": "any",
14
+ "type": "image/svg+xml",
15
+ "purpose": "any maskable"
16
+ }
17
+ ],
18
+ "categories": ["developer", "productivity", "utilities"]
19
+ }
package/dist/sw.js ADDED
@@ -0,0 +1,50 @@
1
+ // Minimal service worker (PWA shell cache).
2
+ // Note: PWA on iOS requires HTTPS (except localhost) and has platform-specific limitations.
3
+
4
+ const CACHE_NAME = "abstractcode-web-v1";
5
+
6
+ self.addEventListener("install", (event) => {
7
+ event.waitUntil(
8
+ (async () => {
9
+ const cache = await caches.open(CACHE_NAME);
10
+ await cache.addAll(["./"]);
11
+ self.skipWaiting();
12
+ })()
13
+ );
14
+ });
15
+
16
+ self.addEventListener("activate", (event) => {
17
+ event.waitUntil(
18
+ (async () => {
19
+ const keys = await caches.keys();
20
+ await Promise.all(keys.map((k) => (k === CACHE_NAME ? Promise.resolve() : caches.delete(k))));
21
+ self.clients.claim();
22
+ })()
23
+ );
24
+ });
25
+
26
+ self.addEventListener("fetch", (event) => {
27
+ const req = event.request;
28
+ const url = new URL(req.url);
29
+
30
+ // Never cache API calls.
31
+ if (url.pathname.startsWith("/api/")) return;
32
+
33
+ event.respondWith(
34
+ (async () => {
35
+ const cache = await caches.open(CACHE_NAME);
36
+ // Network-first to avoid stale bundles after deploy; cache as a fallback for offline.
37
+ try {
38
+ const resp = await fetch(req);
39
+ if (req.method === "GET" && resp && resp.status === 200 && url.origin === self.location.origin) {
40
+ cache.put(req, resp.clone());
41
+ }
42
+ return resp;
43
+ } catch {
44
+ const cached = await cache.match(req);
45
+ if (cached) return cached;
46
+ throw new Error("offline and not cached");
47
+ }
48
+ })()
49
+ );
50
+ });
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@abstractframework/code",
3
+ "version": "0.1.0",
4
+ "description": "AI-powered coding assistant for AbstractFramework - chat-based IDE interface",
5
+ "type": "module",
6
+ "author": "Laurent-Philippe Albou",
7
+ "license": "MIT",
8
+ "keywords": [
9
+ "abstractframework",
10
+ "code",
11
+ "ide",
12
+ "ai",
13
+ "assistant",
14
+ "ui",
15
+ "react"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/lpalbou/abstractcode.git",
20
+ "directory": "web"
21
+ },
22
+ "homepage": "https://github.com/lpalbou/abstractcode#readme",
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "bin": {
27
+ "abstractcode": "./bin/cli.js"
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "bin",
32
+ "README.md"
33
+ ],
34
+ "scripts": {
35
+ "dev": "vite --host --port 3002",
36
+ "build": "tsc && vite build",
37
+ "preview": "vite preview",
38
+ "start": "node ./bin/cli.js",
39
+ "test": "vitest run",
40
+ "prepublishOnly": "npm run build"
41
+ },
42
+ "dependencies": {
43
+ "@monaco-editor/react": "^4.6.0",
44
+ "dompurify": "3.2.7",
45
+ "marked": "14.0.0",
46
+ "react": "^18.2.0",
47
+ "react-dom": "^18.2.0"
48
+ },
49
+ "devDependencies": {
50
+ "@types/react": "^18.2.48",
51
+ "@types/react-dom": "^18.2.18",
52
+ "@vitejs/plugin-react": "^4.7.0",
53
+ "typescript": "^5.3.3",
54
+ "vite": "^6.4.1",
55
+ "vitest": "^3.2.4"
56
+ },
57
+ "engines": {
58
+ "node": ">=18.0.0"
59
+ }
60
+ }