Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new renderer-agnostic layout pagination package (vitrine-layout-pagination) and integrates standalone + gallery demos in vitrine-demo to showcase both presentation-style (explicit slides) and flow-style (paginated document) scenarios.
Changes:
- Introduce
packages/layout-paginationwith document/page models, measurement delegate contracts, and an initial pagination engine (+ vitest tests). - Add demo scenarios + preview renderer and two standalone demo pages (presentation + flow), plus gallery demos.
- Normalize demo navigation flow by redirecting the legacy “regular text selection debug” page and updating nav links.
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents the new vitrine-layout-pagination workspace package. |
| pnpm-lock.yaml | Adds the new package as a workspace importer with existing dev tool deps. |
| packages/layout-pagination/tsconfig.json | TypeScript build output configuration for the new package. |
| packages/layout-pagination/package.json | New publishable package metadata and scripts. |
| packages/layout-pagination/src/model.ts | Document/page/node model types + page spec resolution helpers. |
| packages/layout-pagination/src/measure.ts | Measurement delegate contract and null delegate implementation. |
| packages/layout-pagination/src/engine.ts | Initial pagination engine implementation (flow + presentation). |
| packages/layout-pagination/src/index.ts | Public exports for the new package. |
| packages/layout-pagination/test/page-spec.test.ts | Unit tests covering page spec resolution + basic pagination behaviors. |
| packages/demo/package.json | Adds workspace dependency on vitrine-layout-pagination. |
| packages/demo/vite.config.ts | Adds standalone HTML entries and an alias for vitrine-layout-pagination. |
| packages/demo/layout-pagination-scenarios.ts | Defines presentation + flow scenario documents and runs pagination. |
| packages/demo/layout-pagination-preview.ts | Renders paginated results as Vitrine blocks for demos. |
| packages/demo/layout-pagination-presentation.html | Standalone presentation preview page. |
| packages/demo/layout-pagination-presentation-setup.js | Mounts the presentation preview component and cycles slides. |
| packages/demo/layout-pagination-flow.html | Standalone flow document preview page. |
| packages/demo/layout-pagination-flow-setup.js | Mounts the flow preview component. |
| packages/demo/demos/layout-pagination-presentation.ts | Adds the presentation demo to the gallery registry. |
| packages/demo/demos/layout-pagination-flow.ts | Adds the flow demo to the gallery registry. |
| packages/demo/gallery.ts | Registers the new demos and adds a “Documents & Layout” category. |
| packages/demo/gallery.html | Updates nav linkage to include the new flow demo in the ring. |
| packages/demo/component-demo.html | Updates nav linkage to point to the consolidated text selection page. |
| packages/demo/text-selection.html | Updates nav linkage to align with the new navigation ring. |
| packages/demo/text-selection-debug-texta.html | Updates nav linkage to point into the new layout-pagination standalone demo. |
| packages/demo/text-selection-debug.html | Redirects legacy debug page to the consolidated text selection page. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Comment on lines
+1
to
+5
| import type { LayoutDocument } from 'vitrine-layout-pagination'; | ||
| import { createPaginatedLayoutEngine } from 'vitrine-layout-pagination'; | ||
|
|
||
| function paragraph(id: string, text: string): LayoutDocument['body'] { | ||
| return { |
Comment on lines
+236
to
+240
| case 'pageBreak': | ||
| return 0; | ||
| default: | ||
| return measureLeafNode(node, availableWidth, page, delegate, diagnostics).height; | ||
| } |
| } | ||
| } | ||
|
|
||
| if (node.kind === 'stack') { |
Comment on lines
+55
to
+57
| if (node.kind === 'fixed' && role !== 'body') { | ||
| throw new Error(`Nested fixed nodes are not allowed in ${role}.`); | ||
| } |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vitrine-layout-paginationpackage with document/page models, measurement contracts, and an initial flow/presentation engine foundationTesting