Skip to content

Add TaffyJS website documentation - #5

Merged
hyfdev merged 18 commits into
mainfrom
agent/website-information-architecture
Aug 16, 2026
Merged

hyfdev merged 18 commits into
mainfrom
agent/website-information-architecture

Conversation

@hyfdev

@hyfdev hyfdev commented Aug 14, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • Add a default-theme VitePress site and landing page for the TaffyJS package family.
  • Add a homepage code-to-layout example whose displayed JavaScript runs through the real @taffyjs/wasm package and draws the rectangles returned by getLayout.
  • Add a Guide and Essentials section that teach the layout model through CSS concepts, runnable examples, and a focused explanation of application-owned text and image measurement.
  • Add an @taffyjs/node reference covering runtime support, topology, styles and context, computation, layout results, public value helpers, and errors.
  • Add an @taffyjs/wasm package page covering supported environments, loading, bundling, and its observable differences from the native package.
  • Run the Getting Started width example in the browser through the real @taffyjs/wasm package while keeping the Node example as the canonical code path.
  • Build the website from the Wasm verification graph so the interactive examples and package cannot drift apart.
  • Record the website information architecture and documentation ownership in the repository's decision documents.

Scope

This PR documents the current @taffyjs/node and @taffyjs/wasm APIs. It does not add empty pages for the future @taffyjs/yoga package, deployment configuration, or a release workflow. The packages remain private and unpublished.

Checks

  • vp install --frozen-lockfile
  • vp run ready
  • vp run check:codegen
  • vp run check:wasm
  • Desktop, dark-mode, and 390px browser checks for both interactive Wasm examples, navigation, responsive diagrams, keyboard operation, console errors, and failed-Wasm loading states

@hyfdev hyfdev changed the title Document public website direction Initialize VitePress website Aug 14, 2026
@hyfdev hyfdev changed the title Initialize VitePress website Add TaffyJS website homepage Aug 14, 2026
@hyfdev hyfdev changed the title Add TaffyJS website homepage Add TaffyJS website landing page Aug 14, 2026
@hyfdev hyfdev changed the title Add TaffyJS website landing page Add TaffyJS website documentation Aug 14, 2026
@hyfdev
hyfdev force-pushed the agent/website-information-architecture branch 4 times, most recently from 4abf659 to e66b6d5 Compare August 16, 2026 08:24
@hyfdev
hyfdev force-pushed the agent/website-information-architecture branch from e66b6d5 to 3d2e5f5 Compare August 16, 2026 08:56
@hyfdev
hyfdev marked this pull request as ready for review August 16, 2026 08:56
Copilot AI lite review requested due to automatic review settings August 16, 2026 08:56
@hyfdev
hyfdev merged commit 57c41d2 into main Aug 16, 2026
6 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new VitePress documentation site under apps/website to document the current TaffyJS package family (@taffyjs/node and @taffyjs/wasm), including interactive browser examples that run against the real @taffyjs/wasm package and build integration so the docs and Wasm verification graph stay aligned.

Changes:

  • Introduces the @taffyjs/website VitePress app with Guide/Essentials content, per-package reference pages, and interactive demos.
  • Wires website build/dev into the root Vite+ task graph and adds apps/* to the pnpm workspace with VitePress dependencies pinned via catalog.
  • Adds/updates Project Context Records and READMEs to reflect documentation ownership and structure.

Reviewed changes

Copilot reviewed 32 out of 36 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vite.config.ts Adds build:website / dev:website tasks and runs the website build as part of check:wasm.
README.md Links repo README to the new website docs entry points.
pnpm-workspace.yaml Adds apps/* to the workspace and adds vitepress to the catalog.
pnpm-lock.yaml Locks the new apps/website importer and VitePress/Vue dependency graph.
packages/taffyjs-node/README.md Replaces long-form README content with install + links into the website reference.
apps/website/package.json Defines the private VitePress app package and scripts.
apps/website/index.md Adds the VitePress home/landing page and embeds the code-to-layout showcase.
apps/website/examples/home-layout.js Provides the real runnable Wasm-backed layout example used by the home page.
apps/website/.vitepress/config.ts Defines VitePress nav + sidebar structure for Guide/Node/Wasm sections.
apps/website/.vitepress/components/LayoutWidthDemo.vue Implements the interactive Getting Started width demo using @taffyjs/wasm.
apps/website/.vitepress/components/HomeLayoutShowcase.vue Implements the landing-page code-to-rectangles showcase and visualization.
apps/website/guide/index.md Adds the Guide introduction and product framing.
apps/website/guide/getting-started.md Adds Getting Started content plus an in-page interactive Wasm demo.
apps/website/guide/tree-compute-read.md Adds an Essentials page explaining the core lifecycle and concepts.
apps/website/guide/styles-and-values.md Adds an Essentials page explaining defaults, value helpers, and output snapshots.
apps/website/guide/block.md Adds a Block-layout Essentials page with examples.
apps/website/guide/flexbox.md Adds a Flexbox Essentials page with examples.
apps/website/guide/grid.md Adds a Grid Essentials page with examples.
apps/website/guide/measuring-content.md Adds the measurement Essentials page (text/images boundary + callback model).
apps/website/guide/getting-started-layout-model.svg Adds the “browser vs TaffyJS layout pipeline” diagram.
apps/website/guide/measuring-text-and-images.svg Adds the measurement flow diagram.
apps/website/node/index.md Adds the @taffyjs/node overview page and section entry.
apps/website/node/nodes-and-topology.md Adds the node/topology reference documentation.
apps/website/node/styles-and-context.md Adds the styles/context reference documentation.
apps/website/node/computing-layout.md Adds the compute/dirty/rounding/measurement reference documentation.
apps/website/node/layout-results.md Adds the layout/detailed-grid output reference documentation.
apps/website/node/style.md Adds the grouped StyleInput/Style field documentation.
apps/website/node/value-helpers.md Documents numeric families and tagged value helper APIs.
apps/website/node/errors.md Documents stable error codes and failure guarantees.
apps/website/wasm/index.md Adds the @taffyjs/wasm overview/setup page and differences from native.
.gitignore Ignores VitePress cache and build output directories.
.agents/docs/README.md Adds the website PCR to the context record index.
.agents/docs/website.md Records website information architecture and content ownership.
.agents/docs/technology-stack.md Records the website build/tooling decisions and CI placement.
.agents/docs/intent.md Refines intent wording and package-family direction statements.
.agents/docs/architecture.md Updates the architecture PCR (but contains an inconsistency noted in review).
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

The `@taffyjs/node` public entry bundles the private napi-rs root loader, which selects the matching optional platform package. Its generated loader and declaration remain repository build inputs rather than published package files. The `@taffyjs/wasm` default entry reaches a no-TLA ESM bridge that imports the shared payload and immediately invokes a synchronous CommonJS factory mechanically derived from napi-rs's eager Node loader; its browser entry reaches a TLA adapter and the unmodified deferred loader. Neither package exposes an intermediate binding package, JavaScript shadow tree, separate core crate, public binding, or public initialization API.

A future Yoga package should be a JavaScript or TypeScript compatibility layer over `@taffyjs/node` unless a concrete need requires a different native boundary.
A future `@taffyjs/yoga` package should be a JavaScript or TypeScript compatibility layer over `@taffyjs/node` unless a concrete need requires a different native boundary. A future `@taffyjs/wasm` package should preserve the direct package's high-level JavaScript API while replacing the runtime binding layer; its concrete Rust and packaging boundaries remain open until implementation.
hyfdev added a commit that referenced this pull request Aug 16, 2026
Add the public website, package documentation, guides, and usage examples.

Refs: #5, #18, #21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants