================================================================================
AUTO FORM BUILDER - SOURCE CODE DOCUMENTATION
WordPress.org Plugin Guidelines Compliance (Section 4 - Human Readable Code)
================================================================================

IMPORTANT FOR WORDPRESS.ORG REVIEWERS:
This file documents all compiled/minified code and their source locations.

NOTE: The plugin distribution includes everything needed to rebuild /dist/:
- /src/ directory (React source code of the form builder)
- /scripts/build-frontend-bundle.js (builds the frontend bundle)
- vite.config.js (build configuration)
- package.json (dependencies list)
- package-lock.json (exact dependency versions)
- This SOURCE-CODE.txt file

The node_modules/ directory is excluded (too large) but can be rebuilt with:
$ npm ci

================================================================================
COMPILED/MINIFIED FILES & THEIR SOURCES
================================================================================

1. REACT FORM BUILDER (Compiled with Vite 4)
   -----------------------------------------------
   Compiled Files:
   - /dist/js/main.js (minified, CSS inlined into JS bundle)
   - /dist/manifest.json (Vite build manifest)

   Source Code Location:
   - /src/ directory (68 JavaScript/JSX files and 24 CSS files, fully human-readable)
     - /src/main.jsx - Entry point
     - /src/App.jsx - Main application
     - /src/components/ - All React components
     - /src/store/ - State management (Zustand)
     - /src/styles/ - CSS files
     - /src/utils/ and /src/utils.js - Utility functions
     - /src/hooks/ - Custom React hooks

   Build Configuration:
   - vite.config.js (plugin root directory)
   - package.json and package-lock.json (plugin root directory)

2. FRONTEND BUNDLE (Concatenated, Not Transpiled)
   --------------------------------------------------------
   Compiled Files:
   - /dist/js/frontend-bundle.js (the listed scripts joined into one file)
   - /dist/css/frontend-bundle.css (the listed stylesheets joined and minified)

   Source Code Location:
   - The human-readable files under /assets/js/ and /assets/css/ that are
     listed in /scripts/build-frontend-bundle.js

   Build Script:
   - /scripts/build-frontend-bundle.js (plugin root directory)

BUILD COMMANDS (rebuild everything in /dist/)
   $ npm ci               # Install the exact dependency versions
   $ npm run build        # Vite build, then the frontend bundle → /dist/

   Node.js Version Required: v18 or higher

3. THIRD-PARTY LIBRARIES (External, Already Minified)
   ----------------------------------------------------
   Flatpickr v4.6.13 (MIT License) - Date Picker Library

   Plugin Files:
   - assets/js/vendor/flatpickr.min.js
   - assets/css/vendor/flatpickr.min.css
   - assets/css/vendor/flatpickr-material-blue.css

   Original Source Code:
   - GitHub: https://github.com/flatpickr/flatpickr
   - Unminified Source: https://github.com/flatpickr/flatpickr/tree/master/src
   - License: https://github.com/flatpickr/flatpickr/blob/master/LICENSE.md

   Chart.js v4.5.1 (MIT License) - Charts for survey results and analytics

   Plugin Files:
   - assets/js/vendor/chart.umd.min.js
   - includes/addons/form-analytics/assets/js/chart.min.js

   Original Source Code:
   - GitHub: https://github.com/chartjs/Chart.js
   - Unminified Source: https://github.com/chartjs/Chart.js/tree/v4.5.1/src
   - License: https://github.com/chartjs/Chart.js/blob/master/LICENSE.md

   React & Dependencies (Bundled in /dist/js/main.js via npm):
   - React 18: https://github.com/facebook/react (MIT)
   - React DOM 18: https://github.com/facebook/react (MIT)
   - @dnd-kit: https://github.com/clauderic/dnd-kit (MIT)
   - Zustand: https://github.com/pmndrs/zustand (MIT)
   - Immer: https://github.com/immerjs/immer (MIT)
   - DOMPurify: https://github.com/cure53/DOMPurify (Apache-2.0 or MPL-2.0)

   All npm dependencies with exact versions: package-lock.json

================================================================================
HUMAN-READABLE (NON-COMPILED) FILES
================================================================================

All other JavaScript and CSS files are human-readable source code:

1. JavaScript and CSS Files:
   - /assets/js/ - Admin, form and frontend scripts (50 files, excluding vendor/)
   - /assets/css/ - Admin, form and frontend styles (61 files, excluding vendor/)
   - /includes/addons/*/assets/ - Add-on scripts and styles

2. PHP Files:
   - /includes/ - All plugin PHP classes
   - auto-form-builder.php - Main plugin file
   - uninstall.php - Uninstall cleanup

================================================================================
COMPLIANCE SUMMARY
================================================================================

✓ All compiled code has source included in plugin
✓ All build tools documented with complete instructions
✓ All third-party libraries documented with GitHub source links
✓ Build process documented and reproducible
✓ No obfuscation beyond standard minification

================================================================================
QUICK REFERENCE
================================================================================

Q: Where is the source code for /dist/js/main.js?
A: /src/ directory

Q: Where is the source code for /dist/js/frontend-bundle.js and /dist/css/frontend-bundle.css?
A: The /assets/ files listed in /scripts/build-frontend-bundle.js

Q: How do I rebuild the compiled files?
A: Run: npm ci && npm run build

Q: Where can I find third-party library sources?
A: See "Third-Party Libraries" section above with GitHub links

================================================================================
