feat(monaco,codemirror): add Storybook demos with sample prompts#522
Merged
feat(monaco,codemirror): add Storybook demos with sample prompts#522
Conversation
This enables @dotprompt/monaco to be installed directly from GitHub without requiring a build step. Changes: - Remove dist/ from .gitignore - Include pre-built dist files (index.js, index.mjs, index.d.ts, index.d.mts) This allows users to install via: pnpm add @dotprompt/monaco@github:google/dotprompt#path:/packages/monaco Previously, installing from GitHub would fail because the dist folder was not checked in and npm/pnpm don't run build scripts for Git dependencies.
000e176 to
b376009
Compare
- Add vite-env.d.ts for TypeScript to understand ?raw imports - Add multilingual/Unicode sample with CJK, Arabic, Cyrillic, emoji - Disable Vim mode by default (still available via toggle and VimMode story) - Add Multilingual and VimMode stories - Update story descriptions to reflect default settings Also applies to @dotprompt/codemirror package.
zarinn3pal
approved these changes
Feb 4, 2026
- Add @replit/codemirror-emacs for Emacs keybindings
- Change vimMode boolean to editorMode select ('standard', 'vim', 'emacs')
- Add EmacsMode story to demonstrate Emacs keybindings
- Update all stories to use new editorMode prop
- Set default height to calc(100vh - 40px) for full viewport - Enable fullscreen layout in Storybook preview - Remove explicit height overrides from individual stories
This was referenced Feb 4, 2026
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.
Summary
This PR adds Storybook.js integration to both the Monaco Editor and CodeMirror editor packages, along with comprehensive sample prompts that exercise all Dotprompt features.
Changes
Storybook Integration
@dotprompt/monacoand@dotprompt/codemirrorpackagesSample Prompts (11 comprehensive examples)
01-basic.prompt02-schema-and-config.prompt03-multimodal-media.prompt04-tools.prompt05-handlebars-helpers.prompt06-partials.prompt07-multi-turn-history.prompt08-sections-thinking.prompt09-complex-schema.prompt10-kitchen-sink.prompt11-multilingual-unicode.promptEditor Keybinding Modes
monaco-vim/@replit/codemirror-vim@replit/codemirror-emacs(CodeMirror only)GitHub-Ready Package Pattern
@dotprompt/monacoand@dotprompt/codemirrornow havedist/checked inpnpm Workspace Configuration
public-hoist-patternfor Storybook packages in root.npmrchoist=falsefor Bazel compatibility while allowing Storybook to resolve correctlyRunning Storybook
Screenshots
The Storybook demos include:
Testing