@nervmor/codexui 1.0.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.
@@ -0,0 +1,52 @@
1
+ <svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <defs>
3
+ <linearGradient id="cloud" x1="256" y1="80" x2="256" y2="438" gradientUnits="userSpaceOnUse">
4
+ <stop offset="0" stop-color="#9BE7D1" />
5
+ <stop offset="0.46" stop-color="#53CDB0" />
6
+ <stop offset="1" stop-color="#11856E" />
7
+ </linearGradient>
8
+ <radialGradient id="sheen" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(226 150) rotate(58.2) scale(208 200)">
9
+ <stop offset="0" stop-color="#E8FFF8" stop-opacity="0.85" />
10
+ <stop offset="0.52" stop-color="#D7FFF4" stop-opacity="0.22" />
11
+ <stop offset="1" stop-color="#D7FFF4" stop-opacity="0" />
12
+ </radialGradient>
13
+ <filter id="cardShadow" x="-24" y="-24" width="560" height="560" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
14
+ <feFlood flood-opacity="0" result="BackgroundImageFix" />
15
+ <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" />
16
+ <feOffset dy="12" />
17
+ <feGaussianBlur stdDeviation="16" />
18
+ <feColorMatrix type="matrix" values="0 0 0 0 0.0470588 0 0 0 0 0.105882 0 0 0 0 0.0980392 0 0 0 0.18 0" />
19
+ <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_1" />
20
+ <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_1" result="shape" />
21
+ </filter>
22
+ <filter id="cloudShadow" x="40" y="48" width="432" height="428" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
23
+ <feFlood flood-opacity="0" result="BackgroundImageFix" />
24
+ <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" />
25
+ <feOffset dy="10" />
26
+ <feGaussianBlur stdDeviation="12" />
27
+ <feColorMatrix type="matrix" values="0 0 0 0 0.054902 0 0 0 0 0.196078 0 0 0 0 0.164706 0 0 0 0.22 0" />
28
+ <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_1" />
29
+ <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_1" result="shape" />
30
+ </filter>
31
+ </defs>
32
+
33
+ <g transform="translate(44 44) scale(0.828125)">
34
+ <g filter="url(#cardShadow)">
35
+ <rect x="8" y="8" width="496" height="496" rx="104" fill="#FCFEFD" />
36
+ </g>
37
+
38
+ <g filter="url(#cloudShadow)">
39
+ <circle cx="256" cy="160" r="104" fill="url(#cloud)" />
40
+ <circle cx="330" cy="186" r="94" fill="url(#cloud)" />
41
+ <circle cx="178" cy="232" r="114" fill="url(#cloud)" />
42
+ <circle cx="352" cy="280" r="96" fill="url(#cloud)" />
43
+ <circle cx="186" cy="320" r="104" fill="url(#cloud)" />
44
+ <circle cx="282" cy="354" r="96" fill="url(#cloud)" />
45
+ <circle cx="256" cy="252" r="118" fill="url(#cloud)" />
46
+ <circle cx="256" cy="252" r="118" fill="url(#sheen)" />
47
+ </g>
48
+
49
+ <path d="M169 203L210 272L169 338" stroke="white" stroke-width="28" stroke-linecap="round" stroke-linejoin="round" />
50
+ <path d="M268 309H348" stroke="white" stroke-width="28" stroke-linecap="round" />
51
+ </g>
52
+ </svg>
Binary file
Binary file
Binary file
@@ -0,0 +1,38 @@
1
+ <svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <defs>
3
+ <linearGradient id="background" x1="74" y1="44" x2="444" y2="470" gradientUnits="userSpaceOnUse">
4
+ <stop offset="0" stop-color="#F7FBFD" />
5
+ <stop offset="1" stop-color="#E7EEF5" />
6
+ </linearGradient>
7
+ <linearGradient id="cloud" x1="256" y1="96" x2="256" y2="424" gradientUnits="userSpaceOnUse">
8
+ <stop offset="0" stop-color="#A9EFDB" />
9
+ <stop offset="0.48" stop-color="#58D2B3" />
10
+ <stop offset="1" stop-color="#12866F" />
11
+ </linearGradient>
12
+ <radialGradient id="sheen" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(226 156) rotate(57.6) scale(210 202)">
13
+ <stop offset="0" stop-color="#F2FFFB" stop-opacity="0.82" />
14
+ <stop offset="0.56" stop-color="#E6FFF8" stop-opacity="0.22" />
15
+ <stop offset="1" stop-color="#E6FFF8" stop-opacity="0" />
16
+ </radialGradient>
17
+ </defs>
18
+
19
+ <rect width="512" height="512" fill="url(#background)" />
20
+ <g>
21
+ <rect x="50" y="50" width="412" height="412" rx="116" fill="url(#background)" />
22
+ <rect x="51.5" y="51.5" width="409" height="409" rx="114.5" stroke="#D7E2EB" stroke-width="3" />
23
+ </g>
24
+
25
+ <g>
26
+ <circle cx="256" cy="174" r="104" fill="url(#cloud)" />
27
+ <circle cx="334" cy="204" r="96" fill="url(#cloud)" />
28
+ <circle cx="176" cy="248" r="118" fill="url(#cloud)" />
29
+ <circle cx="356" cy="294" r="98" fill="url(#cloud)" />
30
+ <circle cx="188" cy="336" r="106" fill="url(#cloud)" />
31
+ <circle cx="286" cy="360" r="98" fill="url(#cloud)" />
32
+ <circle cx="262" cy="262" r="122" fill="url(#cloud)" />
33
+ <circle cx="262" cy="262" r="122" fill="url(#sheen)" />
34
+ </g>
35
+
36
+ <path d="M170 214L214 286L170 352" stroke="#F8FBFC" stroke-width="28" stroke-linecap="round" stroke-linejoin="round" />
37
+ <path d="M274 318H354" stroke="#F8FBFC" stroke-width="28" stroke-linecap="round" />
38
+ </svg>
@@ -0,0 +1,36 @@
1
+ <svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <defs>
3
+ <linearGradient id="background" x1="66" y1="34" x2="448" y2="478" gradientUnits="userSpaceOnUse">
4
+ <stop offset="0" stop-color="#F7FBFD" />
5
+ <stop offset="1" stop-color="#E5EDF4" />
6
+ </linearGradient>
7
+ <linearGradient id="cloud" x1="256" y1="100" x2="256" y2="420" gradientUnits="userSpaceOnUse">
8
+ <stop offset="0" stop-color="#ADF1DE" />
9
+ <stop offset="0.48" stop-color="#59D3B4" />
10
+ <stop offset="1" stop-color="#12866F" />
11
+ </linearGradient>
12
+ <radialGradient id="sheen" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(228 160) rotate(57.8) scale(206 198)">
13
+ <stop offset="0" stop-color="#F2FFFB" stop-opacity="0.84" />
14
+ <stop offset="0.56" stop-color="#E6FFF8" stop-opacity="0.22" />
15
+ <stop offset="1" stop-color="#E6FFF8" stop-opacity="0" />
16
+ </radialGradient>
17
+ </defs>
18
+
19
+ <rect width="512" height="512" fill="url(#background)" />
20
+ <rect x="22" y="22" width="468" height="468" rx="146" fill="url(#background)" />
21
+ <rect x="33" y="33" width="446" height="446" rx="131" stroke="#D8E2EA" stroke-width="2" />
22
+
23
+ <g>
24
+ <circle cx="256" cy="176" r="102" fill="url(#cloud)" />
25
+ <circle cx="332" cy="206" r="94" fill="url(#cloud)" />
26
+ <circle cx="178" cy="248" r="116" fill="url(#cloud)" />
27
+ <circle cx="352" cy="292" r="96" fill="url(#cloud)" />
28
+ <circle cx="190" cy="334" r="104" fill="url(#cloud)" />
29
+ <circle cx="286" cy="358" r="96" fill="url(#cloud)" />
30
+ <circle cx="262" cy="262" r="120" fill="url(#cloud)" />
31
+ <circle cx="262" cy="262" r="120" fill="url(#sheen)" />
32
+ </g>
33
+
34
+ <path d="M172 216L214 286L172 350" stroke="#F8FBFC" stroke-width="28" stroke-linecap="round" stroke-linejoin="round" />
35
+ <path d="M274 316H350" stroke="#F8FBFC" stroke-width="28" stroke-linecap="round" />
36
+ </svg>
@@ -0,0 +1,21 @@
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" />
6
+ <meta name="theme-color" content="#020617" />
7
+ <meta name="apple-mobile-web-app-capable" content="yes" />
8
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
9
+ <meta name="apple-mobile-web-app-title" content="Codex Web" />
10
+ <link rel="manifest" href="/manifest.webmanifest" />
11
+ <link rel="icon" type="image/svg+xml" href="/icons/codexui-icon.svg" />
12
+ <link rel="icon" type="image/png" sizes="192x192" href="/icons/pwa-192x192.png" />
13
+ <link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png" />
14
+ <title>Codex Web</title>
15
+ <script type="module" crossorigin src="/assets/index-BVMDEsG8.js"></script>
16
+ <link rel="stylesheet" crossorigin href="/assets/index-CN8KEIbg.css">
17
+ </head>
18
+ <body class="bg-slate-950">
19
+ <div id="app"></div>
20
+ </body>
21
+ </html>
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "Codex Web",
3
+ "short_name": "Codex Web",
4
+ "description": "A lightweight web interface for Codex that can be installed like an app in Chrome.",
5
+ "start_url": "/",
6
+ "scope": "/",
7
+ "display": "standalone",
8
+ "background_color": "#020617",
9
+ "theme_color": "#020617",
10
+ "icons": [
11
+ {
12
+ "src": "/icons/pwa-192x192.png",
13
+ "sizes": "192x192",
14
+ "type": "image/png",
15
+ "purpose": "any"
16
+ },
17
+ {
18
+ "src": "/icons/pwa-512x512.png",
19
+ "sizes": "512x512",
20
+ "type": "image/png",
21
+ "purpose": "any"
22
+ },
23
+ {
24
+ "src": "/icons/apple-touch-icon.png",
25
+ "sizes": "180x180",
26
+ "type": "image/png",
27
+ "purpose": "any"
28
+ },
29
+ {
30
+ "src": "/icons/maskable-512x512.png",
31
+ "sizes": "512x512",
32
+ "type": "image/png",
33
+ "purpose": "maskable"
34
+ }
35
+ ]
36
+ }
package/dist/sw.js ADDED
@@ -0,0 +1,73 @@
1
+ const CACHE_NAME = 'codexweb-shell-v1'
2
+ const APP_SHELL_PATHS = ['/', '/manifest.webmanifest']
3
+ const STATIC_DESTINATIONS = new Set(['document', 'script', 'style', 'image', 'font'])
4
+ const BYPASS_PREFIXES = ['/codex-api/', '/codex-local-image', '/codex-local-file', '/codex-local-browse/', '/codex-local-edit/']
5
+
6
+ self.addEventListener('install', (event) => {
7
+ event.waitUntil(
8
+ caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL_PATHS)),
9
+ )
10
+ self.skipWaiting()
11
+ })
12
+
13
+ self.addEventListener('activate', (event) => {
14
+ event.waitUntil(
15
+ caches.keys().then((keys) =>
16
+ Promise.all(
17
+ keys
18
+ .filter((key) => key !== CACHE_NAME)
19
+ .map((key) => caches.delete(key)),
20
+ ),
21
+ ),
22
+ )
23
+ self.clients.claim()
24
+ })
25
+
26
+ self.addEventListener('fetch', (event) => {
27
+ const { request } = event
28
+ if (request.method !== 'GET') return
29
+
30
+ const url = new URL(request.url)
31
+ if (url.origin !== self.location.origin) return
32
+ if (BYPASS_PREFIXES.some((prefix) => url.pathname.startsWith(prefix))) return
33
+
34
+ if (request.mode === 'navigate') {
35
+ event.respondWith(networkFirstNavigation(request))
36
+ return
37
+ }
38
+
39
+ if (STATIC_DESTINATIONS.has(request.destination) || url.pathname === '/manifest.webmanifest') {
40
+ event.respondWith(staleWhileRevalidate(request))
41
+ }
42
+ })
43
+
44
+ async function networkFirstNavigation(request) {
45
+ const cache = await caches.open(CACHE_NAME)
46
+ try {
47
+ const response = await fetch(request)
48
+ cache.put('/', response.clone())
49
+ return response
50
+ } catch {
51
+ return (await cache.match('/')) || Response.error()
52
+ }
53
+ }
54
+
55
+ async function staleWhileRevalidate(request) {
56
+ const cache = await caches.open(CACHE_NAME)
57
+ const cached = await cache.match(request)
58
+ const networkPromise = fetch(request)
59
+ .then((response) => {
60
+ if (response.ok) {
61
+ cache.put(request, response.clone())
62
+ }
63
+ return response
64
+ })
65
+ .catch(() => null)
66
+
67
+ if (cached) {
68
+ return cached
69
+ }
70
+
71
+ const response = await networkPromise
72
+ return response || Response.error()
73
+ }