docs: add plugin decoupling design document (#2)

* Initial plan

* Add comprehensive plugin decoupling design document

Co-authored-by: saberzero1 <8161064+saberzero1@users.noreply.github.com>

* Address code review feedback: fix incomplete types and missing files

- Add missing transformer files to Appendix A (gfm, linebreaks, oxhugofm, roam)
- Complete emit/partialEmit return types in QuartzEmitterPluginInstance
- Export TocEntry interface in vfile-schema to fix reference issue
- Add missing externalResources method to QuartzTransformerPluginInstance

Co-authored-by: saberzero1 <8161064+saberzero1@users.noreply.github.com>

* Address code review: add imports, fix component example, clarify interfaces, update file count

- Add missing import statements to all code examples (vfile-schema, plugin-context, registry, emitter types, test helpers)
- Fix component example to properly use QuartzComponentConstructor pattern
- Remove redundant externalResources from init() return type to avoid ambiguity
- Add placeholder implementations for helper functions in test example
- Update total file count from ~65 to ~71 to match breakdown (3+13+2+14+30+5+4)

Co-authored-by: saberzero1 <8161064+saberzero1@users.noreply.github.com>

* Address code review: fix type references, add missing properties, improve examples

- Fix JSResourceOptions/CSSResourceOptions to use actual JSResource/CSSResource types
- Add missing externalResources property to QuartzEmitterPluginInstance
- Clarify that requiredComponents is only for emitters, not transformers
- Fix TOC slug comment to indicate no "#" prefix (e.g., "some-heading")
- Expand frontmatter interface to include all fields from actual implementation
- Improve migration guide with complete example showing type import pattern
- Add skeleton implementations for test helper mock functions with realistic return types

Co-authored-by: saberzero1 <8161064+saberzero1@users.noreply.github.com>

* Address code review: fix imports, add required fields, simplify types

- Fix QuartzVFileData import from "./vfile-schema" instead of "./plugin-context"
- Add all missing import statements for types used in test helpers
- Add required config fields (enableSPA, enablePopovers, analytics, ignorePatterns, defaultDateType, theme)
- Import TocEntry type alongside QuartzVFileData in migration guide
- Simplify resource creation to separate createExternalJS/createInlineJS functions
- Remove circular import of ChangeEvent from "./types" (already defined in that file)
- Fix enableToc type to boolean | string for consistency with other frontmatter fields
- Update mock utilities to match new resource creation pattern

Co-authored-by: saberzero1 <8161064+saberzero1@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: saberzero1 <8161064+saberzero1@users.noreply.github.com>
This commit is contained in:
Copilot 2025-11-16 14:11:50 +01:00 committed by GitHub
parent e7d2a57aad
commit ad55761811
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

File diff suppressed because it is too large Load Diff