Skip to content

feat: export expected-pattern engine, refresh docs, untrack artifacts#174

Merged
jaysin586 merged 2 commits into
mainfrom
improve/readme-refresh-and-headless-exports
Jul 19, 2026
Merged

feat: export expected-pattern engine, refresh docs, untrack artifacts#174
jaysin586 merged 2 commits into
mainfrom
improve/readme-refresh-and-headless-exports

Conversation

@jaysin586

Copy link
Copy Markdown
Contributor

Summary

Broadens the library's reuse surface and tidies its docs. The expected-pattern engine — previously only reachable by mounting the component — is now exported as framework-agnostic functions, the README is corrected and completed, and generated docs-kit build artifacts are removed from version control (kept on disk, regenerated at build time).

No runtime behavior changes to the component; this is additive API + docs + repo hygiene.

Changes

✨ New public API

  • Re-export the expected-pattern engine from the package root: parseExpectedPatterns, extractCaptures, tagExpectedRegions, cleanTemplate — usable without the Svelte component.
  • Export the ParseResult and ExtractResult types so consumers can annotate return values instead of relying on inference.
  • ParseResult's implementation-detail fields (groups, parts, matches, linePatterns) are marked @internal — not part of the stable public API; may change in any future release, keeping refactor freedom; cleanedText stays a stable field.

📚 Documentation

  • Removed the stale, rot-prone "Recent Updates" section.
  • Fixed both onProcessing examples: the second arg is SvelteDiffTuple[] (not a single tuple), and the timing fields are timing.main / timing.cleanup (the old computeTime / cleanupTime never existed).
  • Completed the Props table (all snippet props + compact + the expected renderer class), mirroring the docs site.
  • Added a Programmatic API section documenting the newly-exported functions.

🧪 Testing

  • Red-first export test for the four re-exported functions (failed pre-export, green after), plus type-export tests for ParseResult / ExtractResult. Lib suite: 79 → 81 tests, all passing.

🔧 Repo hygiene

  • Stopped tracking files generated by the @humanspeak/docs-kit vite plugins (sitemap/demo manifests, demo-loaders.ts, demo-virtual.d.ts, static/docs + static/examples mirrors, 38 social-card PNGs) and gitignored them under one block, matching the existing convention (llms.txt / llms-full.txt were already ignored). Files remain on disk; nothing is deleted.

Note for reviewers: the untracked manifests/loaders are also build inputs imported by app source. On a fresh clone they regenerate at vite build/dev start, so ensure CI builds before it typechecks.

Commits

  • 989e1fa feat: export expected-pattern engine, refresh README, untrack generated docs artifacts
  • 5b759cd feat: export ParseResult and ExtractResult types

jaysin586 and others added 2 commits July 19, 2026 19:17
…ed docs artifacts

- Re-export parseExpectedPatterns, extractCaptures, tagExpectedRegions,
  and cleanTemplate from the package root (with a red-first export test)
- README: drop stale "Recent Updates" section; fix onProcessing examples
  (array type, timing.main/cleanup fields, segment count); complete the
  Props table (snippet props, compact, expected class); add Programmatic API
- Stop tracking @humanspeak/docs-kit vite build artifacts (sitemap/demo
  manifests, static doc & example mirrors, social cards); they regenerate
  at build time and are now gitignored

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Round out the programmatic API so consumers can annotate the return
types of parseExpectedPatterns and extractCaptures instead of relying
on inference.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jaysin586 jaysin586 added documentation Improvements or additions to documentation enhancement Apply to new features or improvements to existing features minor This is a minor release labels Jul 19, 2026
@jaysin586 jaysin586 self-assigned this Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5433a7d1-8251-41bb-9171-bc38b1e0bb60

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve/readme-refresh-and-headless-exports

Comment @coderabbitai help to get the list of available commands.

@jaysin586
jaysin586 merged commit 123aa11 into main Jul 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement Apply to new features or improvements to existing features minor This is a minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant