diff --git a/.changeset/add-code2-layout-icons.md b/.changeset/add-code2-layout-icons.md new file mode 100644 index 00000000..bd5e53f6 --- /dev/null +++ b/.changeset/add-code2-layout-icons.md @@ -0,0 +1,5 @@ +--- +"@stackwright/icons": patch +--- + +Add Code2 and Layout icons to Lucide preset for docs site compatibility diff --git a/.changeset/bright-otters-glow.md b/.changeset/bright-otters-glow.md new file mode 100644 index 00000000..9e829ad9 --- /dev/null +++ b/.changeset/bright-otters-glow.md @@ -0,0 +1,5 @@ +--- +"@stackwright/icons": minor +--- + +Register the full Lucide icon set (~1,500+ icons) by default. `registerDefaultIcons()` now includes every Lucide icon — YAML authors can use any icon by PascalCase name without code changes. Added `registerAllLucideIcons()` and `lucideAllIconsPreset` exports. The curated ~40-icon preset remains available via `registerLucideIcons()` for bundle-conscious apps. diff --git a/.changeset/built-in-search-feature.md b/.changeset/built-in-search-feature.md new file mode 100644 index 00000000..252fafac --- /dev/null +++ b/.changeset/built-in-search-feature.md @@ -0,0 +1,26 @@ +--- +"@stackwright/core": minor +"@stackwright/build-scripts": minor +"@stackwright/types": minor +"@stackwright/e2e": minor +--- + +Add built-in full-text search to every Stackwright site. + +**New feature (`@stackwright/core`):** +- Client-side search using Fuse.js with fuzzy matching +- Search modal triggered by clicking search button or pressing `/` +- Keyboard navigation (↑↓ to navigate, Enter to select, Esc to close) +- Accessible: proper ARIA labels, focus trapping, screen reader announcements +- SSR-safe: no hydration mismatches + +**Prebuild changes (`@stackwright/build-scripts`):** +- Generate search index JSON during prebuild containing all page content +- Index includes page slugs, headings, and text content +- Index placed in public folder for client-side fetching + +**Type updates (`@stackwright/types`):** +- Add `searchIndexPath` option to SiteConfig + +**E2E tests (`@stackwright/e2e`):** +- Add accessibility and interaction tests for search functionality diff --git a/.changeset/compose-site-atomic.md b/.changeset/compose-site-atomic.md new file mode 100644 index 00000000..2598d757 --- /dev/null +++ b/.changeset/compose-site-atomic.md @@ -0,0 +1,11 @@ +--- +"@stackwright/cli": minor +"@stackwright/mcp": minor +--- + +Add `stackwright_compose_site` MCP tool and `stackwright compose` CLI command for atomic whole-site generation with cross-page semantic validation. + +New capabilities: +- Validate and write site config + all pages in a single atomic operation +- Cross-page semantic checks: nav linkage, orphan pages, button hrefs, collection sources, duplicate titles, theme colors +- Errors block all writes; warnings are reported but don't block diff --git a/.changeset/declarative-entry-pages.md b/.changeset/declarative-entry-pages.md new file mode 100644 index 00000000..05f8a4ad --- /dev/null +++ b/.changeset/declarative-entry-pages.md @@ -0,0 +1,27 @@ +--- +"@stackwright/build-scripts": minor +"@stackwright/cli": minor +"@stackwright/mcp": minor +"@stackwright/types": minor +--- + +Declarative collection entry pages with YAML-based layout templates. + +Collections with `entryPage` config in `_collection.yaml` now automatically generate full page JSON during prebuild — zero custom React code required. + +**Template system (`@stackwright/build-scripts`, `@stackwright/types`):** +- Define entry page layouts using the same `content_items` syntax as regular pages, with `{{fieldName}}` placeholders resolved against each entry's data +- Single `{{field}}` references preserve the raw value type (arrays, objects pass through) +- Inline interpolation: `"{{date}} · {{author}} · {{tags}}"` with auto array-to-comma conversion +- Smart null handling: missing fields cause their containing block to be omitted, so a single template works for entries with and without optional fields (e.g., cover images) +- Default template used when `template` key is absent (backward-compatible with `body`/`meta`/`tags` config) +- Path traversal protection on `basePath` and slug values + +**CLI (`@stackwright/cli`):** +- New `stackwright collection list` command shows all collections with entry counts +- New `stackwright collection add ` command with `--entry-page`, `--base-path`, `--sort` flags +- Scaffold template updated: `[slug].tsx` → `[...slug].tsx` catch-all route supporting nested paths + +**MCP (`@stackwright/mcp`):** +- New `stackwright_list_collections` MCP tool +- New `stackwright_create_collection` MCP tool with full parameter validation diff --git a/.changeset/docs-architecture-principles.md b/.changeset/docs-architecture-principles.md new file mode 100644 index 00000000..9e99cebe --- /dev/null +++ b/.changeset/docs-architecture-principles.md @@ -0,0 +1,15 @@ +--- +"@stackwright/core": patch +--- + +docs: add architecture principles, ecosystem analogy, and CI philosophy + +Added to PHILOSOPHY.md: +- "The Ecosystem Analogy" (Spring comparison table) +- 4 constraints that must never be violated + +Added to CLAUDE.md: +- "No Hard Dependencies" principle with type-only imports, interface contracts, and registration patterns + +Added to CONTRIBUTING.md: +- "CI Hardening Philosophy" section explaining the "bugs drive CI" approach diff --git a/.changeset/fix-cli-scaffold-smoke-test.md b/.changeset/fix-cli-scaffold-smoke-test.md new file mode 100644 index 00000000..8fe22df0 --- /dev/null +++ b/.changeset/fix-cli-scaffold-smoke-test.md @@ -0,0 +1,5 @@ +--- +"@stackwright/cli": patch +--- + +Fix scaffold smoke-test TypeError by excluding _font-links.json from static page generation diff --git a/.changeset/fix-dark-mode-bugs.md b/.changeset/fix-dark-mode-bugs.md new file mode 100644 index 00000000..ad7d8761 --- /dev/null +++ b/.changeset/fix-dark-mode-bugs.md @@ -0,0 +1,6 @@ +--- +"@stackwright/core": patch +"@stackwright/themes": patch +--- + +fix: dark mode toggle now updates in real-time (#252) and background images no longer override dark background color (#251) diff --git a/.changeset/fix-dark-mode.md b/.changeset/fix-dark-mode.md new file mode 100644 index 00000000..a6cb2123 --- /dev/null +++ b/.changeset/fix-dark-mode.md @@ -0,0 +1,11 @@ +--- +"@stackwright/core": patch +--- + +Fixed dark mode text colors and background handling for improved demo/hackathon quality: + +- **#252**: Verified ThemeProvider toggle updates correctly (no code changes needed) +- **#251**: Added dark overlay for background images to ensure text contrast +- **Alert component**: Added dark-mode-aware accent colors +- **CodeBlock component**: Added dark mode syntax highlighting palette +- **useSafeTheme hook**: Added `useSafeColorMode` hook for safe color mode access diff --git a/.changeset/fix-unpin-otter-models.md b/.changeset/fix-unpin-otter-models.md new file mode 100644 index 00000000..4b4cdc7b --- /dev/null +++ b/.changeset/fix-unpin-otter-models.md @@ -0,0 +1,5 @@ +--- +"@stackwright/otters": patch +--- + +fix(otters): unpin AI model versions to allow automatic model updates diff --git a/.changeset/integrations-config.md b/.changeset/integrations-config.md new file mode 100644 index 00000000..58f7aee2 --- /dev/null +++ b/.changeset/integrations-config.md @@ -0,0 +1,9 @@ +--- +"@stackwright/types": minor +--- + +feat: add integrations config to site schema + +Adds `integrations` field to site config schema for Pro package integrations (OpenAPI, GraphQL, REST). Each integration requires `type` and `name` fields, with additional plugin-specific config allowed via passthrough. + +Closes #240 diff --git a/.changeset/launch-stackwright-package.md b/.changeset/launch-stackwright-package.md new file mode 100644 index 00000000..13fb3086 --- /dev/null +++ b/.changeset/launch-stackwright-package.md @@ -0,0 +1,13 @@ +--- +"launch-stackwright": minor +--- + +Add new `launch-stackwright` package — an npx-compatible scaffolding tool for creating new Stackwright projects. Automatically sets up a fully configured Next.js + Stackwright project with the otter raft (AI agents) ready to build your site through conversation. + +Includes: +- Project scaffolding with Next.js and Stackwright dependencies +- Pre-configured otter agent templates (foreman, page, theme, and brand) +- MCP server auto-configuration for Code Puppy +- Full AI-assisted development workflow out of the box + +Usage: `npx launch-stackwright my-site` diff --git a/.changeset/map-adapter-phases-1-2.md b/.changeset/map-adapter-phases-1-2.md new file mode 100644 index 00000000..6df9da2a --- /dev/null +++ b/.changeset/map-adapter-phases-1-2.md @@ -0,0 +1,30 @@ +--- +"@stackwright/core": minor +"@stackwright/types": minor +"@stackwright/maplibre": minor +--- + +Add map adapter system with MapLibre GL free tier - Phases 1 & 2 of geospatial visualization support + +**Phase 1: Map Adapter Interface and Registry** +- Create MapAdapter interface following Image/Link/Router adapter pattern +- Add map registry with setMapAdapter/getMapAdapter functions +- Export map adapter types and utilities from @stackwright/core + +**Phase 2: MapLibre GL Implementation** +- Create @stackwright/maplibre package with MapLibreAdapter +- Support map initialization with center, zoom, pitch, bearing controls +- Handle marker placement with simple format and GeoJSON FeatureCollections +- Add camera animation for smooth transitions +- Use MapLibre GL JS v4.7.1 for OSM-based vector tile rendering + +**Content Type Support** +- Add MapContent schema with Zod validation +- Support declarative map configuration through YAML content files +- Generate JSON schema for MCP tool introspection + +**Examples** +- Add comprehensive /maps showcase page to hellostackwright example +- Demonstrate simple maps, markers, custom styles, animations, 3D terrain, and GeoJSON layers + +This establishes the foundation for pluggable map providers (MapLibre, Cesium, etc.) without coupling the core framework to any specific implementation. Phase 3 (Cesium ion integration) awaits OpenAPI work in pro repo. diff --git a/.changeset/nav-sidebar-override.md b/.changeset/nav-sidebar-override.md new file mode 100644 index 00000000..ff3626cc --- /dev/null +++ b/.changeset/nav-sidebar-override.md @@ -0,0 +1,16 @@ +--- +"@stackwright/core": minor +"@stackwright/types": minor +--- + +feat(core): add page-level `navSidebar` override in `content.yml` + +Pages can now override the site-wide sidebar defined in `stackwright.yml` using the `navSidebar` field. This enables: + +- Dashboard pages to hide the sidebar (`navSidebar: null`) for full-width content +- Documentation chapters to show page-specific navigation in the sidebar +- Page Otter to customize sidebar behavior without editing the theme + +The resolution order is: page `navSidebar` > site `sidebar` (from Theme Otter) > no sidebar. + +Docs and AGENTS.md updated with examples and Otter responsibility notes. diff --git a/.changeset/otter-monorepo-relocation.md b/.changeset/otter-monorepo-relocation.md new file mode 100644 index 00000000..19268301 --- /dev/null +++ b/.changeset/otter-monorepo-relocation.md @@ -0,0 +1,5 @@ +--- +"@stackwright/otters": patch +--- + +Relocate otters to packages/otters/src/ directory for proper monorepo structure diff --git a/.changeset/otters-as-package.md b/.changeset/otters-as-package.md new file mode 100644 index 00000000..727e9362 --- /dev/null +++ b/.changeset/otters-as-package.md @@ -0,0 +1,13 @@ +--- +"@stackwright/otters": minor +"@stackwright/cli": patch +"launch-stackwright": patch +--- + +feat(otters): install @stackwright/otters as npm package instead of copying files + +Following the "Otters as Packages" pattern established by @stackwright-pro/otters: +- Created new @stackwright/otters package with all 4 otter JSON files +- Updated CLI to add @stackwright/otters as dependency in generated package.json +- Updated launch-stackwright to generate .code-puppy.json pointing to node_modules +- Removed file copying logic from launch-stackwright diff --git a/.changeset/otters-postinstall.md b/.changeset/otters-postinstall.md new file mode 100644 index 00000000..34203416 --- /dev/null +++ b/.changeset/otters-postinstall.md @@ -0,0 +1,11 @@ +--- +"@stackwright/otters": minor +--- + +Add postinstall script to install otters to ~/.code_puppy/agents/ + +- Created scripts/install-agents.js that copies agent JSON files to ~/.code_puppy/agents/ +- Updated package.json with postinstall hook +- Updated README with installation instructions +- Fixed .code-puppy.json config (removed agents_path) +- Bumped version to 0.2.0-alpha.1 diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000..8fc524c4 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,50 @@ +{ + "mode": "pre", + "tag": "alpha", + "initialVersions": { + "stackwright-docs": "0.1.1-alpha.1", + "@stackwright/build-scripts": "0.4.0-alpha.7", + "@stackwright/cli": "0.7.0-alpha.11", + "@stackwright/collections": "0.1.0", + "@stackwright/core": "0.7.0-alpha.7", + "@stackwright/e2e": "0.2.0-alpha.0", + "@stackwright/icons": "0.4.0-alpha.1", + "launch-stackwright": "0.2.0-alpha.10", + "@stackwright/maplibre": "1.0.0-alpha.3", + "@stackwright/mcp": "0.3.0-alpha.11", + "@stackwright/nextjs": "0.3.1-alpha.7", + "@stackwright/otters": "0.2.0-alpha.4", + "@stackwright/sbom-generator": "0.1.0-alpha.0", + "@stackwright/scaffold-core": "0.1.0-alpha.1", + "@stackwright/themes": "0.5.1-alpha.0", + "@stackwright/types": "1.1.0-alpha.6", + "@stackwright/ui-shadcn": "0.1.0" + }, + "changesets": [ + "add-code2-layout-icons", + "bright-otters-glow", + "built-in-search-feature", + "compose-site-atomic", + "declarative-entry-pages", + "fix-cli-scaffold-smoke-test", + "fix-dark-mode-bugs", + "fix-dark-mode", + "fix-unpin-otter-models", + "integrations-config", + "launch-stackwright-package", + "map-adapter-phases-1-2", + "nav-sidebar-override", + "otter-monorepo-relocation", + "otters-as-package", + "otters-postinstall", + "resolve-background-utility", + "sbom-generator-addition", + "sbom-hooks-addition", + "scaffold-bundled-default", + "scaffold-hooks-system", + "scaffold-pin-versions", + "text-block-feature", + "video-media-type", + "visual-render-tools" + ] +} diff --git a/.changeset/resolve-background-utility.md b/.changeset/resolve-background-utility.md new file mode 100644 index 00000000..48930c52 --- /dev/null +++ b/.changeset/resolve-background-utility.md @@ -0,0 +1,9 @@ +--- +"@stackwright/core": minor +--- + +feat: add resolveBackground utility for dark-mode-aware section backgrounds + +All content components now resolve background values through resolveBackground(). +Theme color keys (e.g., 'surface', 'primary') are mapped to the current theme.colors, +which is dark-mode-aware. Literal hex values pass through unchanged (backward compatible). diff --git a/.changeset/sbom-generator-addition.md b/.changeset/sbom-generator-addition.md new file mode 100644 index 00000000..5eb3fc10 --- /dev/null +++ b/.changeset/sbom-generator-addition.md @@ -0,0 +1,19 @@ +--- +"@stackwright/sbom-generator": minor +"@stackwright/build-scripts": minor +"@stackwright/cli": minor +--- + +feat: Add SBOM generation for supply chain transparency + +Every Stackwright build now generates a Software Bill of Materials (SBOM) with: +- SPDX 2.3 format (US Government compliance) +- CycloneDX 1.5 format (OWASP tooling compatibility) +- Stackwright build manifest (internal format) + +New CLI commands: +- `stackwright sbom generate` - Regenerate SBOM +- `stackwright sbom validate` - Validate SBOM schemas +- `stackwright sbom diff` - Compare SBOMs between builds + +Use `--no-sbom` flag to skip generation if needed. diff --git a/.changeset/sbom-hooks-addition.md b/.changeset/sbom-hooks-addition.md new file mode 100644 index 00000000..9ee71c4a --- /dev/null +++ b/.changeset/sbom-hooks-addition.md @@ -0,0 +1,17 @@ +--- +"@stackwright/sbom-generator": minor +--- + +feat: Add pluggable hook system for SBOM extensibility + +Pro packages can now register hooks to extend SBOM generation: +- `preGenerate` / `postAnalyze` / `preFormat` / `postFormat` / `preWrite` / `postWrite` + +Hook types: +- `priority`: Controls execution order (lower = first) +- `critical`: If true, failure fails entire SBOM generation + +Auto-registration pattern (consistent with registerNextJSComponents, etc.): +```typescript +import '@stackwright-pro/sbom-enterprise'; // auto-registers hooks +``` diff --git a/.changeset/scaffold-bundled-default.md b/.changeset/scaffold-bundled-default.md new file mode 100644 index 00000000..63ba839d --- /dev/null +++ b/.changeset/scaffold-bundled-default.md @@ -0,0 +1,10 @@ +--- +"@stackwright/cli": patch +--- + +fix: scaffold uses bundled templates by default and includes _document.tsx for dark mode support + +- Flip template fetch to bundled-by-default (eliminates network dependency and 10-second timeout risk) +- Add `--online` flag (replaces `--offline`) for explicit GitHub template fetch +- Add `_document.tsx` to scaffold template for ColorModeScript / dark mode persistence +- Make `check-template-sync` CI job non-blocking (informational warning instead of hard failure) diff --git a/.changeset/scaffold-hooks-system.md b/.changeset/scaffold-hooks-system.md new file mode 100644 index 00000000..6920c246 --- /dev/null +++ b/.changeset/scaffold-hooks-system.md @@ -0,0 +1,7 @@ +--- +"@stackwright/scaffold-core": minor +"@stackwright/cli": minor +"launch-stackwright": minor +--- + +Add scaffold hooks system for extensible post-scaffold processing. Pro packages can now register hooks at lifecycle points (preScaffold, preInstall, postInstall, postScaffold) to inject dependencies, configure MCP servers, and add custom setup. diff --git a/.changeset/scaffold-pin-versions.md b/.changeset/scaffold-pin-versions.md new file mode 100644 index 00000000..a8194771 --- /dev/null +++ b/.changeset/scaffold-pin-versions.md @@ -0,0 +1,5 @@ +--- +"@stackwright/cli": patch +--- + +fix: scaffold now pins @stackwright/* deps to stable caret ranges instead of 'latest' diff --git a/.changeset/text-block-feature.md b/.changeset/text-block-feature.md new file mode 100644 index 00000000..441a8b6d --- /dev/null +++ b/.changeset/text-block-feature.md @@ -0,0 +1,6 @@ +--- +"@stackwright/types": minor +"@stackwright/core": minor +--- + +Add text_block content type - a simpler alternative to main for heading + text + buttons without media-related fields. Perfect for text-heavy sections, announcements, and callouts within grid layouts. diff --git a/.changeset/turborepo-integration.md b/.changeset/turborepo-integration.md new file mode 100644 index 00000000..19594bf4 --- /dev/null +++ b/.changeset/turborepo-integration.md @@ -0,0 +1,5 @@ +--- +"stackwright-workspace": patch +--- + +Add Turborepo for incremental builds and intelligent CI caching \ No newline at end of file diff --git a/.changeset/video-media-type.md b/.changeset/video-media-type.md new file mode 100644 index 00000000..ef95fa1f --- /dev/null +++ b/.changeset/video-media-type.md @@ -0,0 +1,12 @@ +--- +"@stackwright/types": minor +"@stackwright/core": minor +"@stackwright/build-scripts": minor +--- + +Add video media type support to the Stackwright framework. + +- New `video` discriminator in the `MediaItem` union (`@stackwright/types`) +- `VideoContent` type with `src`, `autoplay`, `loop`, `muted`, `controls`, and `poster` fields +- `Media` component renders `