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
feat(code-editor): add package #3309
Conversation
Run & review this pull request in StackBlitz Codeflow. |
🦋 Changeset detectedLatest commit: f63555a The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for paste-theme-designer ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for paste-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit f63555a:
|
Passing run #6234 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
Size Change: +495 B (0%) Total Size: 1.02 MB
ℹ️ View Unchanged
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit f63555a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
96898b3
to
db742da
Compare
@@ -28,6 +28,20 @@ const nextConfig = { | |||
experimental: { | |||
legacyBrowsers: false, | |||
}, | |||
// https://nextjs.org/docs/pages/api-reference/next-config-js/headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I sneak fix in this PR so we can iframe the website from other websites. Normally this feature is defaulted off for security, because you dont want people embedding login flows into their websites and stealing credentials. However our docs doesn't have a login flow and is just information based and open source. So this is fine.
54c9c4e
to
862919d
Compare
This PR adds two new packages.
Code Editor Library
This new library is a wrapper around... a wrapper. That's right, we wrap https://github.com/suren-atoyan/monaco-react which wraps https://microsoft.github.io/monaco-editor/.
Why do this? Well we want to use the Monaco Editor in React, hence the first wrapper. And then we want to use that in Paste so our consumers can roll their own implementations as needed. One such consumer is even ourselves :O
EditableCodeBlock
This new package wraps the above library package and applies the Paste theme. This is our "controlled" editable code block component we recommend consumers use. If for whatever reason our provided defaults don't work, folks can fallback to the library.