feat(wcctools): Add section-based configuration API for setupWccTools, new Views, and section-aware routing/sidebar

This commit is contained in:
2025-12-28 12:51:55 +00:00
parent dd151bdad8
commit 14e63738b7
14 changed files with 1709 additions and 212 deletions

View File

@@ -2,9 +2,32 @@
import * as deesWccTools from '../ts_web/index.js';
import * as deesDomTools from '@design.estate/dees-domtools';
// elements and pages
// elements, views and pages
import * as elements from '../test/elements/index.js';
import * as views from '../test/views/index.js';
import * as pages from '../test/pages/index.js';
deesWccTools.setupWccTools(elements as any, pages);
// Sections-based API with Views
deesWccTools.setupWccTools({
sections: [
{
name: 'Pages',
type: 'pages',
items: pages,
},
{
name: 'Views',
type: 'elements',
items: views,
icon: 'web',
},
{
name: 'Elements',
type: 'elements',
items: elements,
sort: ([a], [b]) => a.localeCompare(b),
},
],
});
deesDomTools.elementBasic.setup();