2026-10-17 10:49:38 +00:00
|
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
|
|
|
|
|
|
export default defineNuxtConfig({
|
|
|
|
|
compatibilityDate: '2025-05-01',
|
|
|
|
|
devtools: { enabled: false },
|
|
|
|
|
|
|
|
|
|
// The editor lives in the browser (canvas, localStorage), so no SSR.
|
|
|
|
|
ssr: false,
|
|
|
|
|
|
|
|
|
|
modules: ['@nuxt/fonts', '@nuxt/icon'],
|
|
|
|
|
|
|
|
|
|
fonts: {
|
|
|
|
|
families: [
|
|
|
|
|
{ name: 'Inter', weights: [400, 500, 600, 700], provider: 'google' },
|
|
|
|
|
{ name: 'JetBrains Mono', weights: [400, 600], provider: 'google' },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
css: ['~/assets/css/main.css'],
|
|
|
|
|
|
|
|
|
|
vite: {
|
|
|
|
|
plugins: [tailwindcss()],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
icon: {
|
|
|
|
|
serverBundle: { collections: ['lucide'] },
|
|
|
|
|
cssLayer: 'base',
|
A right-click menu for parts, wires and the canvas, "Wire them all to" as cards, plugged latches in plain greys
- Right click (or the menu key) shows what can be done with what is under the pointer: one part (open, rename, change to, inputs, colour, speed, panels, unpack, plug and unplug, cable colour), several parts (wire them all to with live preview, connect one by one, switches, change all, arrange, keep only, make a component), wires (bundle, colour, whole signal, straighten, remove cable) or empty canvas (paste here, add a part here, select all, fit, tidy, undo); right drag still moves the view
- "Wire them all to": a card per part, each fit a strip of its pins, and which wire goes where for the fit pointed at
- Plugged cable ends no longer look selected: grey connector, steel clips
- Icons named in menus are bundled for the browser too
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 10:33:30 +00:00
|
|
|
// Icons named in menus (app/composables) count too, not only those in templates.
|
|
|
|
|
clientBundle: { scan: { globInclude: ['**/*.{vue,ts}'] } },
|
2026-10-17 10:49:38 +00:00
|
|
|
},
|
|
|
|
|
|
2026-10-20 11:20:55 +00:00
|
|
|
// Share links and accounts live as JSON files in data/ (a volume in
|
|
|
|
|
// production), written crash-safe; see server/plugins/storage.ts.
|
A component faces, project library with share links, fine-grained wire editing
- Lamps and hex displays inside a component show on its box with their
labels, lit by that instance's state; Counter 4 example shows its count.
- Several projects per browser; share links at /p/<id> that the creator's
edits save to automatically, others get their own copy. Export, open a
file as project, or add a file's components to the open project.
- Wires: drag any segment or corner, Alt+drag for a new bend, Ctrl+drag to
branch, double-click selects the whole signal, multi-select, arrow keys,
colour tags.
- Share-link API (POST/GET/PUT /api/p) on Nitro fs storage in data/, mounted
as a volume on edgerealm.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 11:21:49 +00:00
|
|
|
|
2026-10-17 10:49:38 +00:00
|
|
|
runtimeConfig: {
|
|
|
|
|
public: {
|
|
|
|
|
siteUrl: 'https://logicate.blax.at',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
app: {
|
|
|
|
|
head: {
|
|
|
|
|
htmlAttrs: { lang: 'en' },
|
|
|
|
|
title: 'Logigate: build a computer from NAND gates',
|
|
|
|
|
meta: [
|
|
|
|
|
{ charset: 'utf-8' },
|
|
|
|
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
|
|
|
{
|
|
|
|
|
name: 'description',
|
|
|
|
|
content: 'Draw logic circuits, simulate them live, and package them into reusable components. Start with a NAND gate and work up to a computer.',
|
|
|
|
|
},
|
|
|
|
|
{ name: 'theme-color', content: '#0e1116' },
|
|
|
|
|
],
|
|
|
|
|
link: [{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' }],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
routeRules: {
|
|
|
|
|
'/**': {
|
|
|
|
|
headers: {
|
|
|
|
|
'X-Content-Type-Options': 'nosniff',
|
|
|
|
|
'X-Frame-Options': 'DENY',
|
|
|
|
|
'Referrer-Policy': 'strict-origin-when-cross-origin',
|
|
|
|
|
'Permissions-Policy': 'camera=(), microphone=(), geolocation=(), payment=(), usb=(), interest-cohort=()',
|
|
|
|
|
'Content-Security-Policy': [
|
|
|
|
|
"default-src 'self'",
|
|
|
|
|
"img-src 'self' data: blob:",
|
|
|
|
|
"font-src 'self' data:",
|
|
|
|
|
"style-src 'self' 'unsafe-inline'",
|
|
|
|
|
"script-src 'self' 'unsafe-inline'",
|
|
|
|
|
"connect-src 'self'",
|
|
|
|
|
"frame-ancestors 'none'",
|
|
|
|
|
"base-uri 'self'",
|
|
|
|
|
"form-action 'self'",
|
|
|
|
|
].join('; '),
|
|
|
|
|
'x-powered-by': '',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|