generated from solidjs-community/solid-lib-starter
-
Notifications
You must be signed in to change notification settings - Fork 7
Introduce some config props & bundling changes. #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sid1029
wants to merge
10
commits into
alxnddr:main
Choose a base branch
from
sid1029:feature/enhanced-editor-props
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- 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. |
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