This repository is a small Yarn monorepo centered on two publishable packages:
core/: framework-agnostic editor engine incore/src, built tocore/distreact/: React bindings and UI tools inreact/src, built toreact/distplayground/: local Vite app for manual verification inplayground/srcdocs/: Docusaurus site with docs content indocs/docs, site code indocs/src, and static assets indocs/staticscripts/: release and version-sync utilities used from the repo root
Keep engine logic in core; React-specific state, components, and styling belong in react.
yarn install: install workspace dependencies with Yarn 4yarn build: build@windoc/coreand@windoc/reactwithtsupyarn dev: watch both packages during local developmentcd playground && yarn dev: run the local playground against the workspace packagescd docs && npm run start: run the documentation site locallycd docs && npm run build: build the docs siteyarn format: run Prettier oncore/srcandreact/src
CI currently validates package builds on Node 20.
- Use
yarn, notnpm, from the repo root.docs/is the only npm-based app. - Package release flow:
core/package.jsonandreact/package.jsonversions must be bumped together, andreactmust update its@windoc/coredependency to the same version. Runyarn install, thenyarn sync-version, thenyarn changelog, thenyarn build. Commit the release, push tomain, then create and push tagvX.Y.Z. Pushing tagv*triggers.github/workflows/publish.ymlto publish@windoc/coreand@windoc/reactto npm. - Docs deploy flow:
pushing to
maintriggers.github/workflows/deploy-docs.ymlto builddocs/and deploy to GitHub Pages.
Use TypeScript with 2-space indentation, semicolons, single quotes, no trailing commas, and an 80-character print width, as defined in .prettierrc. Prefer PascalCase for React component files such as EditorToolbar.tsx, camelCase for utilities such as useDropdown.ts, and descriptive Conventional Commit scopes like core, react, or docs.
There is no dedicated automated test suite yet. Validate changes by:
- running
yarn buildbefore opening a PR - exercising UI and interaction changes in
playground/ - checking docs-related changes with
cd docs && npm run buildornpm run start
Document manual test coverage in the PR, especially for rendering, selection, toolbar, and pagination behavior.
Commits are enforced by Husky and Commitlint. Use Conventional Commits, keep the subject under 72 characters, and write in present tense, for example fix(react): close dropdown on outside click.
PRs should include a short description of what changed, why it changed, and how it was tested. Link related issues when applicable, update docs for user-facing changes, and include screenshots or recordings for visible UI changes.