Some checks failed
CI / test (pull_request) Has been cancelled
New packages/display/ — Vue 3 primitives for products running a secondary 1920x480 landscape / 480x1920 portrait kiosk display, per the strip display spec. First non-Python module in this repo; published as its own npm package (not part of the Python circuitforge-core distribution) so products that don't use a strip display never pull in Vue as a dependency. - DisplayLayout — root wrapper: identity zone, orientation-aware grid (landscape/portrait), dark-default theme, #metrics/#alerts/#macros slots. - DisplayMetric — value/label tile with optional unit, severity colour, sparkline. - DisplayAlert — timestamped, severity-coloured alert row. - DisplayMacroButton — touch target (44px+ min) emitting a shell/url/api/display_switch action payload; execution stays product-side. - theme.ts — central theme file: CSS custom properties (dark/light) plus UnoCSS theme/shortcut fragments for products that already run UnoCSS (Turnstone, Robin) to spread into their own uno.config.ts. - launcher/launcher.html — static, framework-free product switcher reading a sibling launcher.config.json. 37 Vitest tests across all four components; vue-tsc type-checks clean; vite build produces ESM/CJS bundles + CSS + .d.ts. First consumer: Turnstone's sysadmin profile (turnstone#25, currently blocked on this ticket). Closes: #69
25 lines
661 B
TypeScript
25 lines
661 B
TypeScript
import { resolve } from 'node:path'
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
build: {
|
|
// vue-tsc --emitDeclarationOnly runs before this and writes .d.ts files
|
|
// into dist/ — don't let Vite's default emptyOutDir wipe them out.
|
|
emptyOutDir: false,
|
|
lib: {
|
|
entry: resolve(__dirname, 'src/index.ts'),
|
|
name: 'CircuitForgeDisplay',
|
|
fileName: 'circuitforge-display',
|
|
formats: ['es', 'cjs'],
|
|
},
|
|
rollupOptions: {
|
|
external: ['vue'],
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
include: ['src/tests/**/*.spec.ts'],
|
|
},
|
|
})
|