Initial commit: bface library, build fixes, and refreshed docs

- Externalize all @tamagui/* and tamagui subpaths so dist no longer vendors Tamagui.
- Emit TypeScript declarations with vite-plugin-dts; fix package exports types for ui/*.
- Align initEnv with profiles: displayName, brandLogo, api.baseURL, themeColor, uiShell.
- Stabilize tests with Node localStorage file; env tests pass.
- Update README and component docs for services, menus, API client, and development.
This commit is contained in:
Amer Agovic
2026-04-18 10:43:52 -05:00
commit 94a9f32969
87 changed files with 19750 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
/** Keep peer/runtime deps out of published dist (including subpaths like @tamagui/config/v3). */
function isExternal(id) {
if (id === 'react' || id === 'react/jsx-runtime' || id === 'react-dom' || id === 'react-dom/client') {
return true;
}
if (id === 'tamagui' || id.startsWith('tamagui/')) return true;
if (id.startsWith('@tamagui/')) return true;
return false;
}
export default defineConfig({
plugins: [
react(),
dts({
tsconfigPath: './tsconfig.json',
insertTypesEntry: true,
include: ['src/**/*.js', 'src/**/*.jsx'],
exclude: ['**/*.test.*', '**/test/**']
})
],
build: {
lib: {
entry: path.resolve(__dirname, 'src/index.js'),
formats: ['es']
},
rollupOptions: {
external: isExternal,
output: {
// Preserve module structure - automatically preserves directory structure
preserveModules: true,
preserveModulesRoot: 'src',
// Use original file names and paths
entryFileNames: '[name].js',
chunkFileNames: '[name].js'
}
},
outDir: 'dist',
emptyOutDir: true,
sourcemap: true
}
});