Skip to content

feat(plugins/ci-cd) - v1.4.6 build and plugin fixes - #88

Merged
medevod merged 8 commits into
masterfrom
refactor/build-and-plugin-fixes
Sep 8, 2026
Merged

medevod merged 8 commits into
masterfrom
refactor/build-and-plugin-fixes

Conversation

@medevod

@medevod medevod commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR modernizes the build and distribution pipeline, refactors the vanilla TypeScript plugins for SSR safety and accessibility, establishes a unified multi-framework architecture guide, and updates project CI/CD workflows and roadmaps.


Tasks Completed

🏗️ Architecture & Documentation

  • Add Multi-Framework Architecture Specification (ARCHITECTURE.md)
    • Define core architectural principles and separation of concerns (CSS core vs. framework adapters).
    • Specify component API contracts, lifecycle states, and ARIA attributes.
    • Document framework adapter strategy (React, Vue, Svelte, Angular, Solid) and headless state logic.
    • Define CSS custom property contract, theme engine specification, and SSR/SSG compatibility guidelines.
  • Establish Roadmap & Milestones (ROADMAP.md)
    • Define phased evolutionary path (Core Stabilization $\rightarrow$ Multi-Framework Adapters $\rightarrow$ Design Tokens $\rightarrow$ Ecosystem).

📦 Build, Packaging & Distribution

  • Modernize Package Exports & Module Definitions (package.json)
    • Add dual ESM and CJS entry points with conditional exports map (., ./css, ./dist/*).
    • Configure TypeScript declaration emission to dist/types/mgplus.d.ts.
    • Add CDN entries (unpkg, jsdelivr) and style path definitions.
    • Remove duplicate/obsolete .stylelintrc.* config files in favor of unified configurations.
    • Configure dedicated TypeScript library build config (tsconfig.lib.json).
  • Tooling & Package Manager Migration
    • Migrate dependency lockfile and scripts to standard npm workflow (package-lock.json).
    • Add NPM scripts for typecheck, lint:css, lint:js, and unified test.

🧩 Plugin Refactoring & Enhancements

  • SSR Guarding & Idempotent Initialization
    • Add typeof document === "undefined" checks to prevent SSR crashes in Node/Next.js/Nuxt environments.
    • Add dataset initialization flags (data-mg-*-initialized) across plugins to prevent duplicate event listener bindings.
  • Accessibility (a11y) & DOM Improvements
    • Collapse (src/plugins/mgCollapse.ts): Add aria-expanded toggling and event target resolution via .closest().
    • Tabs (src/plugins/mgTabs.ts): Add role="tab", aria-selected, aria-controls, and aria-hidden management.
    • Dropdown (src/plugins/mgDropdown.ts): Add outside click handler, aria-expanded, and keyboard escape dismiss support.
    • Modal (src/plugins/mgModal.ts): Add backdrop click handling and multi-trigger / multi-close button support.
    • Navigation (src/plugins/mgNav.ts): Scope active state toggling strictly to parent container items.
    • Dark Mode (src/plugins/mgDarkMode.ts): Improve theme persistence and auto system preference detection (prefers-color-scheme).
    • Init Entry (src/plugins/mgplus.ts): Provide safe single entry point mgplus.init() and export individual register functions.
  • Demo Cleanup (src/demo/main.ts)
    • Refactor color picker demo, theme previewer, and component playground.

🤖 CI/CD Workflows

  • Update GitHub Actions (.github/workflows/)
    • Upgrade Node.js runner to Node 20.x across workflows.
    • Upgrade action versions to actions/checkout@v4 and actions/setup-node@v4.
    • Fix action metadata typo and switch release step to npm publish --access public.

Verification & Testing

  • npm run typecheck (TypeScript typecheck passed with no diagnostics errors)
  • npm run build:lib (ESM, UMD bundles and .d.ts type declarations generated in dist/)
  • npm run build:demo (Demo application build verified)

@medevod medevod changed the title Refactor/build and plugin fixes feat(plugins/ci-cd) - v1.5.0 build and plugin fixes - baseline for target roadmap Sep 6, 2026
@medevod medevod changed the title feat(plugins/ci-cd) - v1.5.0 build and plugin fixes - baseline for target roadmap feat(plugins/ci-cd) - v1.4.6 build and plugin fixes - baseline for target roadmap Sep 6, 2026
@medevod medevod changed the title feat(plugins/ci-cd) - v1.4.6 build and plugin fixes - baseline for target roadmap feat(plugins/ci-cd) - v1.4.6 build and plugin fixes Sep 6, 2026
@medevod
medevod merged commit fec3dfb into master Sep 8, 2026
3 checks passed
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.

1 participant