Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ent log Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
The live demo at https://edonghyun.github.io/overlapmark/ showed every feature but read as a dashboard. Toggles, an inspector panel, sliders and a nine-color legend competed with the one thing the library does. Its mixed palette also made deep overlaps under
multiplylook muddy gray-brown. There was also nowhere to read usage and the API outside the README.This PR replaces the demo with a two-page static site:
/overlapmark/;/overlapmark/docs/.Approach
One Vite multi-page app in
site/. It is renamed fromexamples/vanilla, because it is no longer an example. Both pages are plain TypeScript and DOM on top of@overlapmark/dom, as the old demo was. A docs framework (VitePress) was considered and dropped, since one reference page doesn't need one.The demo follows a mockup the owner picked over a warm-paper alternative:
01a layers slider,02click/Enter listing every covering highlight,03preset classes, and04framework tabs.Color appears only inside highlights.
The docs. A sticky table of contents, which collapses at narrow widths, beside:
Highlighttype,createHighlighter, options, events;Overlap modes, styling and events each have a live example.
The docs can't drift silently.
Highlightfields, events andHighlightermethods tables are typed against the library's exported types (site/src/api-data.ts). An invented or missing option failspnpm typecheck.--om-*property instyles.cssto be documented.check:readmenow also compares the site's quick starts with the README.Palette rule. At any character, the stacked colors must lie within a 75° arc of hue. A unit test checks every sample. Mixing complementary hues under
multiplyis what produced the mud.Pages under
/overlapmark/. All links are relative. A Playwright suite builds with--base /overlapmark/, serves the build, and fetches every same-origin link and asset on both pages.ci.ymlnow runs it.No library code changed.
Trade-offs and known issues
tabpanelor arrow keys);@playwright/testcomes from the rootpackage.json, notsite/package.json;How to review
site/src/samples.ts,palette.tsandquick-starts.ts, with their tests;check-readme.tschange.site/index.html,site/src/demo.tsandsite/e2e/demo.spec.ts.site/src/api-data.ts, where the facts live; check them againstpackages/*/src;site/docs/index.htmlandsite/src/docs.ts;site/e2e/docs.spec.ts.site/vite.config.ts,site/playwright.config.tsandsite/e2e/pages.spec.ts;.github/workflows/pages.ymlandci.yml;.gitignorenegation!site/docs/.docs-assets/*.png, regenerated bypnpm docs:images;pnpm-lock.yaml;Testing
Local, Node 22.22.0, pnpm 10.26.2, Playwright Chromium. Run on the final head:
pnpm lint,pnpm format:check,pnpm typecheck,pnpm test,pnpm buildandpnpm check:readme: all pass.pnpm --filter overlapmark-site test: 45 unit tests pass.pnpm --filter overlapmark-site test:e2e: 25 pass against the/overlapmark/build. They cover:Live controls:
/docs/link fails the link crawl.check:readme.Each fix from the final review has a test that failed first.
The pages were screenshotted at 1280px and 390px and checked by eye.
Deliberately untested: Firefox and WebKit for the site (the e2e runs Chromium only), and real devices.
Follow-ups
🤖 Generated with Claude Code