Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions packages/react/components/editor/__tests__/bundle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,24 @@ describe('Markdown bundle cost', () => {
expect(withAdapter).toMatch(/from ['"]marked['"]/);
}, 180_000);
});

/* PromptInput runs on the core store, so it must not ship the rich editor. */

describe('PromptInput bundle cost', () => {
it('leaves out the rich editor features', async () => {
const promptInput = await bundle(
`import { PromptInput } from ${JSON.stringify(PACKAGE_INDEX)};\n` +
'export const input = PromptInput;\n'
);
expect(promptInput).toContain('PromptInput.Editor');
for (const name of [
'prosemirror-schema-list',
'prosemirror-inputrules',
'prosemirror-dropcursor',
'prosemirror-gapcursor'
]) {
expect(promptInput).not.toMatch(new RegExp(`from ['"]${name}['"]`));
}
expect(promptInput).not.toContain('class RichEditorStore');
}, 180_000);
});
241 changes: 0 additions & 241 deletions packages/react/components/editor/core/composer/markup.ts

This file was deleted.

25 changes: 0 additions & 25 deletions packages/react/components/editor/core/composer/schema.ts

This file was deleted.

Loading
Loading