-
-
Notifications
You must be signed in to change notification settings - Fork 12
Implement typst directive with preview and edit modes #1062
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
|
@copilot Do you have other recommandations for this directive? |
Here are some recommendations to enhance this directive:
Let me know if you'd like me to implement any of these enhancements! |
|
@copilot External file support is great. loading indicator. copy button. |
…t directive Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Implemented all three features in commit 1fca126:
|
|
@copilot Can you add a visual separation between the document (typst-doc) and the background. Maybe something like this: border-radius: 8px; box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.16) 0px 3px 6px; Also style the copy and download buttons like the ones from the editor. So that they are attached to the bottom of the preview. |
… bottom Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Applied the styling changes in commit b0013d2:
|
|
@copilot The outline feature did not work, please remove it. But I want to have plus and minus buttons for scaling the preview. I also want a button for expand to container width and a show full page button. |
Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Implemented the zoom controls in commit 4e21562:
Note: I didn't find any "outline feature" in the code to remove - could you clarify what you meant by this? |
|
@copilot Full page means one page should be visible without cut offs. Also add a height parameter to the directive. If it is not specific to should default to calc(100dvh - 128px) in edit mode and to auto in preview mode. Otherwise the specific height should be used for example "100px" or "50vh". |
…t without cut-offs Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Implemented in commit 772b8ab:
|
|
@copilot remove the scaling feature and the typst-preview box-shadow |
Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Removed in commit 6af0295:
|
remarkDirectiveTypst.ts- TypeScript directive handler for the typst container directiveassets/directive-typst/client.js- Client-side JavaScript for typst renderingassets/directive-typst/style.css- Styles for the typst directiveprocess.tsto register it with the remark pluginslocales/en.jsonandlocales/de.jsonstore.jsfor persisting user editsplatforms/vscode/snipptes/hyperbook.code-snippetsplatforms/vscode/syntaxes/hyperbook.jsonwebsite/en/book/elements/typst.mdwebsite/de/book/elements/typst.mdremarkDirectiveTypst.test.tswith snapshotsFeatures
srcattribute (e.g.,:::typst{src="document.typ"})autofor preview mode,calc(100dvh - 128px)for edit modeOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.