feat: v0.3.0 — Phase 3/4 façades + AppLayout on AppShell
- Curated re-exports from @limitless/ui through /forms, /data, /feedback, /navigation, /utils sub-paths so apps stop importing from the lower layer. - /forms also re-exports the full @limitless/ui validation surface (hooks, format/security/address validators, types). - AppLayout is now a thin wrapper over @limitless/ui's <AppShell> — same ShellConfig DTO, no duplicated chrome code. - shell/types + shell/index re-export from @limitless/ui to keep one canonical type and one shared context. - auth middleware: loose NextRequestLike typing to avoid two-copies- of-next conflict with the consumer's next. - postbuild: rewrite ../images/ to ./images/ in copied CSS so refs resolve in dist/styles/. Widget family in /data is the intersection of limitless's two Widget files (Widget.d.ts vs Widget/index.d.ts collision in dist); upstream fix needed before exposing IconWidget/UserWidget/etc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,18 @@ function copyDir(src, dst) {
|
||||
}
|
||||
if (fs.existsSync(srcStyles)) {
|
||||
copyDir(srcStyles, distStyles);
|
||||
|
||||
// Rewrite ../images/... references in any copied CSS to ./images/...
|
||||
// The source CSS assumes a sibling src/images/ dir; in dist/ the images
|
||||
// live at dist/styles/images/ alongside the CSS, so the relative path
|
||||
// is one level shorter.
|
||||
for (const f of fs.readdirSync(distStyles)) {
|
||||
if (!f.endsWith(".css")) continue;
|
||||
const p = path.join(distStyles, f);
|
||||
const c = fs.readFileSync(p, "utf8");
|
||||
const fixed = c.replace(/\.\.\/images\//g, "./images/");
|
||||
if (fixed !== c) fs.writeFileSync(p, fixed);
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Fix ESM relative imports: append `.js` to bare specifiers like
|
||||
|
||||
Reference in New Issue
Block a user