Introduce some config props & bundling changes.#8
Open
sid1029 wants to merge 10 commits intoalxnddr:mainfrom
Open
Introduce some config props & bundling changes.#8sid1029 wants to merge 10 commits intoalxnddr:mainfrom
sid1029 wants to merge 10 commits intoalxnddr:mainfrom
Conversation
added 10 commits
July 30, 2025 17:08
- Add line prop for jumping to specific line numbers - Add beforeMount callback for pre-editor setup - Add onValidate callback for validation markers - Add line positioning effect with proper reactivity - Add comprehensive TypeScript interfaces - Add devcontainer configuration for Node.js 24 - Add basic tests for new props functionality These changes improve monaco-react compatibility and provide better developer experience for Monaco Editor integration.
- Document line prop for line positioning - Document beforeMount callback for pre-editor setup - Document onValidate callback for validation markers - Add comprehensive usage examples for each new feature - Highlight new props in props table with bold formatting These docs help developers understand and adopt the new monaco-react compatibility features.
…props - Fix options prop to use IStandaloneDiffEditorConstructionOptions instead of IStandaloneEditorConstructionOptions - Add beforeMount prop with full implementation for pre-editor setup - Improve TypeScript type annotations throughout - Fix container ref handling with proper undefined checks - Update documentation to reflect all enhancements This resolves the incorrect options type that was preventing proper diff editor configuration and adds feature parity with MonacoEditor for the beforeMount callback functionality.
- Enable corepack for pnpm in devcontainer - Change to root user for better permissions - Add .pnpm-store to gitignore
- Fix readonly array type for Monaco validation markers - Remove unnecessary type assertions in ref assignments - Ensure all linting passes with zero warnings All validation complete: TypeScript compilation, tests, build, and linting all pass successfully.
…the bundle size of any downstream project consuming this library. Instead import only the types and use CDN URL as the fallback.
Author
|
@alxnddr would you be able to take a look at this ? This effectively reverts your latest change that bundles 'monaco-editor' with solid-monaco. I've described an alternate way of bundling monaco-editor in the readme while still keeping the old way of CDN loading monaco as the default. Proposing this because currently we (and others #7) are not able to upgrade to the newer version of solid-monaco. |
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.
Introducing a few more config props & bundling changes
The current implementation uses:
which causes the entire 3.2MB Monaco Editor library to be bundled with the solid-monaco wrapper, defeating the purpose of dynamic loading.
✅ Changed to import type * as monacoEditor from 'monaco-editor' (types only)
✅ Added CDN fallback for out-of-the-box functionality
This also addresses ##7
Fixed type definition for DiffEditor options so diff editor specific features can be configured.
New Features
lineprop: Jump to specific line numbers in the editoronBeforeMountprop: Configure Monaco before editor creation (renamed frombeforeMount)onValidateprop: Real-time validation marker callbacksAdded some documentation for how to use the library.
Added a devcontainer config.
GitHub Actions Updates