@crimson-education/helios-editor-renderer 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.babelrc ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "presets": [
3
+ [
4
+ "@nx/react/babel",
5
+ {
6
+ "runtime": "automatic",
7
+ "useBuiltIns": "usage"
8
+ }
9
+ ]
10
+ ],
11
+ "plugins": []
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crimson-education/helios-editor-renderer",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
package/project.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "helios-editor-renderer",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "packages/helios-editor-renderer/src",
5
+ "projectType": "library",
6
+ "tags": [],
7
+ "targets": {
8
+ "build": {
9
+ "executor": "@nx/vite:build",
10
+ "outputs": [
11
+ "{options.outputPath}"
12
+ ],
13
+ "options": {
14
+ "outputPath": "dist/packages/helios-editor-renderer",
15
+ "main": "packages/helios-editor-renderer/src/index.ts",
16
+ "tsConfig": "packages/helios-editor-renderer/tsconfig.lib.json",
17
+ "assets": [
18
+ "packages/helios-editor-renderer/*.md"
19
+ ]
20
+ }
21
+ },
22
+ "nx-release-publish": {
23
+ "options": {
24
+ "packageRoot": "dist/{projectRoot}"
25
+ }
26
+ }
27
+ },
28
+ "release": {
29
+ "version": {
30
+ "generatorOptions": {
31
+ "packageRoot": "dist/{projectRoot}",
32
+ "currentVersionResolver": "git-tag",
33
+ "fallbackCurrentVersionResolver": "disk"
34
+ }
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,341 @@
1
+ import { withProps } from '@udecode/cn';
2
+ import {
3
+ type Value,
4
+ BaseParagraphPlugin,
5
+ createSlateEditor,
6
+ SlateLeaf,
7
+ } from '@udecode/plate';
8
+ import { BaseAlignPlugin } from '@udecode/plate-alignment';
9
+ import {
10
+ BaseBoldPlugin,
11
+ BaseCodePlugin,
12
+ BaseItalicPlugin,
13
+ BaseStrikethroughPlugin,
14
+ BaseSubscriptPlugin,
15
+ BaseSuperscriptPlugin,
16
+ BaseUnderlinePlugin,
17
+ } from '@udecode/plate-basic-marks';
18
+ import { BaseBlockquotePlugin } from '@udecode/plate-block-quote';
19
+ import {
20
+ BaseCodeBlockPlugin,
21
+ BaseCodeLinePlugin,
22
+ BaseCodeSyntaxPlugin,
23
+ } from '@udecode/plate-code-block';
24
+ import { BaseCommentsPlugin } from '@udecode/plate-comments';
25
+ import { BaseDatePlugin } from '@udecode/plate-date';
26
+ import {
27
+ BaseFontBackgroundColorPlugin,
28
+ BaseFontColorPlugin,
29
+ BaseFontSizePlugin,
30
+ } from '@udecode/plate-font';
31
+ import {
32
+ BaseHeadingPlugin,
33
+ BaseTocPlugin,
34
+ HEADING_KEYS,
35
+ HEADING_LEVELS,
36
+ } from '@udecode/plate-heading';
37
+ import { BaseHighlightPlugin } from '@udecode/plate-highlight';
38
+ import { BaseHorizontalRulePlugin } from '@udecode/plate-horizontal-rule';
39
+ import { BaseIndentPlugin } from '@udecode/plate-indent';
40
+ import { BaseIndentListPlugin } from '@udecode/plate-indent-list';
41
+ import { BaseKbdPlugin } from '@udecode/plate-kbd';
42
+ import { BaseColumnItemPlugin, BaseColumnPlugin } from '@udecode/plate-layout';
43
+ import { BaseLineHeightPlugin } from '@udecode/plate-line-height';
44
+ import { BaseLinkPlugin } from '@udecode/plate-link';
45
+ import {
46
+ BaseEquationPlugin,
47
+ BaseInlineEquationPlugin,
48
+ } from '@udecode/plate-math';
49
+ import {
50
+ BaseAudioPlugin,
51
+ BaseFilePlugin,
52
+ BaseImagePlugin,
53
+ BaseMediaEmbedPlugin,
54
+ BaseVideoPlugin,
55
+ } from '@udecode/plate-media';
56
+ import { BaseMentionPlugin } from '@udecode/plate-mention';
57
+ import {
58
+ BaseTableCellHeaderPlugin,
59
+ BaseTableCellPlugin,
60
+ BaseTablePlugin,
61
+ BaseTableRowPlugin,
62
+ } from '@udecode/plate-table';
63
+ import { BaseTogglePlugin } from '@udecode/plate-toggle';
64
+ import { all, createLowlight } from 'lowlight';
65
+
66
+ // import { MediaEmbedElement } from '@crimson-education/helios-plate/lib/plate-ui/media-embed-element';
67
+ import { BlockquoteElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/blockquote-element-static';
68
+ import { CodeBlockElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/code-block-element-static';
69
+ import { CodeLeafStatic } from '@crimson-education/helios-plate/lib/plate-ui/code-leaf-static';
70
+ import { CodeLineElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/code-line-element-static';
71
+ import { CodeSyntaxLeafStatic } from '@crimson-education/helios-plate/lib/plate-ui/code-syntax-leaf-static';
72
+ import { ColumnElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/column-element-static';
73
+ import { ColumnGroupElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/column-group-element-static';
74
+ import { CommentLeafStatic } from '@crimson-education/helios-plate/lib/plate-ui/comment-leaf-static';
75
+ import { DateElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/date-element-static';
76
+ import { EditorStatic } from '@crimson-education/helios-plate/lib/plate-ui/editor-static';
77
+ import { HeadingElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/heading-element-static';
78
+ import { HighlightLeafStatic } from '@crimson-education/helios-plate/lib/plate-ui/highlight-leaf-static';
79
+ import { HrElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/hr-element-static';
80
+ import { ImageElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/image-element-static';
81
+ import {
82
+ FireLiComponent,
83
+ FireMarker,
84
+ } from '@crimson-education/helios-plate/lib/plate-ui/indent-fire-marker';
85
+ import {
86
+ TodoLiStatic,
87
+ TodoMarkerStatic,
88
+ } from '@crimson-education/helios-plate/lib/plate-ui/indent-todo-marker-static';
89
+ import { KbdLeafStatic } from '@crimson-education/helios-plate/lib/plate-ui/kbd-leaf-static';
90
+ import { LinkElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/link-element-static';
91
+ import { MediaAudioElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/media-audio-element-static';
92
+ import { MediaFileElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/media-file-element-static';
93
+ import { MediaVideoElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/media-video-element-static';
94
+ import { MentionElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/mention-element-static';
95
+ import { ParagraphElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/paragraph-element-static';
96
+ import {
97
+ TableCellElementStatic,
98
+ TableCellHeaderStaticElement,
99
+ } from '@crimson-education/helios-plate/lib/plate-ui/table-cell-element-static';
100
+ import { TableElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/table-element-static';
101
+ import { TableRowElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/table-row-element-static';
102
+ // import { TocElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/toc-element-static';
103
+ import { ToggleElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/toggle-element-static';
104
+
105
+ // q&a
106
+ import { QASectionTitleElement } from '@crimson-education/helios-plate/lib/plate-ui/qa-section-title-element';
107
+ import { QASectionSubtitleElement } from '@crimson-education/helios-plate/lib/plate-ui/qa-section-subtitle-element';
108
+ import { QAHeaderElement } from '@crimson-education/helios-plate/lib/plate-ui/qa-header-element';
109
+ import { QABodyElement } from '@crimson-education/helios-plate/lib/plate-ui/qa-body-element';
110
+ import { QAItemElement } from '@crimson-education/helios-plate/lib/plate-ui/qa-item-element';
111
+ import { QASectionElement } from '@crimson-education/helios-plate/lib/plate-ui/qa-section-element';
112
+ import {
113
+ ELEMENT_QA_SECTION,
114
+ QASectionPlugin,
115
+ } from '@crimson-education/helios-plate/lib/editor/plugins/qa-section-plugin';
116
+ import {
117
+ ELEMENT_QA_ITEM,
118
+ QAItemPlugin,
119
+ } from '@crimson-education/helios-plate/lib/editor/plugins/qa-item-plugin';
120
+ import {
121
+ ELEMENT_QA_SECTION_TITLE,
122
+ QASectionTitlePlugin,
123
+ } from '@crimson-education/helios-plate/lib/editor/plugins/qa-section-title-plugin';
124
+ import {
125
+ ELEMENT_QA_SECTION_SUBTITLE,
126
+ QASectionSubtitlePlugin,
127
+ } from '@crimson-education/helios-plate/lib/editor/plugins/qa-section-subtitle-plugin';
128
+ import {
129
+ ELEMENT_QA_HEADER,
130
+ QAHeaderPlugin,
131
+ } from '@crimson-education/helios-plate/lib/editor/plugins/qa-header-plugin';
132
+ import {
133
+ ELEMENT_QA_BODY,
134
+ QABodyPlugin,
135
+ } from '@crimson-education/helios-plate/lib/editor/plugins/qa-body-plugin';
136
+
137
+ // essay
138
+ import { EssayExcerptTitleElement } from '@crimson-education/helios-plate/lib/plate-ui/essay-excerpt-title-element';
139
+ import { EssayExcerptSubtitleElement } from '@crimson-education/helios-plate/lib/plate-ui/essay-excerpt-subtitle-element';
140
+ import { EssayExcerptElement } from '@crimson-education/helios-plate/lib/plate-ui/essay-excerpt-element';
141
+ import { EssayExcerptBodyElement } from '@crimson-education/helios-plate/lib/plate-ui/essay-excerpt-body';
142
+ import {
143
+ ELEMENT_ESSAY_EXCERPT,
144
+ EssayExcerptPlugin,
145
+ } from '@crimson-education/helios-plate/lib/editor/plugins/essay-excerpt-plugin';
146
+ import {
147
+ ELEMENT_ESSAY_EXCERPT_TITLE,
148
+ EssayExcerptTitlePlugin,
149
+ } from '@crimson-education/helios-plate/lib/editor/plugins/essay-excerpt-title-plugin';
150
+ import {
151
+ ELEMENT_ESSAY_EXCERPT_SUBTITLE,
152
+ EssayExcerptSubtitlePlugin,
153
+ } from '@crimson-education/helios-plate/lib/editor/plugins/essay-excerpt-subtitle-plugin';
154
+ import {
155
+ ELEMENT_ESSAY_EXCERPT_BODY,
156
+ EssayExcerptBodyPlugin,
157
+ } from '@crimson-education/helios-plate/lib/editor/plugins/essay-excerpt-body-plugin';
158
+
159
+ // quote
160
+ import {
161
+ ELEMENT_QUOTE_BLOCK,
162
+ QuoteBlockPlugin,
163
+ } from '@crimson-education/helios-plate/lib/editor/plugins/quote-block-plugin';
164
+ import {
165
+ ELEMENT_QUOTE_AUTHOR,
166
+ QuoteAuthorPlugin,
167
+ } from '@crimson-education/helios-plate/lib/editor/plugins/quote-author-plugin';
168
+ import { QuoteBlockElement } from '@crimson-education/helios-plate/lib/plate-ui/quote-block-element';
169
+ import { QuoteAuthorElement } from '@crimson-education/helios-plate/lib/plate-ui/quote-author-element';
170
+ import { MediaEmbedElementStatic } from '@crimson-education/helios-plate/lib/plate-ui/media-embed-element-static';
171
+
172
+ const lowlight = createLowlight(all);
173
+
174
+ interface EditorProps {
175
+ value: Value;
176
+ }
177
+ export function RichEditor({ value }: EditorProps) {
178
+ const components = {
179
+ [ELEMENT_QUOTE_BLOCK]: QuoteBlockElement,
180
+ [ELEMENT_QUOTE_AUTHOR]: QuoteAuthorElement,
181
+ [ELEMENT_ESSAY_EXCERPT_BODY]: EssayExcerptBodyElement,
182
+ [ELEMENT_ESSAY_EXCERPT_TITLE]: EssayExcerptTitleElement,
183
+ [ELEMENT_ESSAY_EXCERPT_SUBTITLE]: EssayExcerptSubtitleElement,
184
+ [ELEMENT_ESSAY_EXCERPT]: EssayExcerptElement,
185
+ [ELEMENT_QA_SECTION_TITLE]: QASectionTitleElement,
186
+ [ELEMENT_QA_SECTION_SUBTITLE]: QASectionSubtitleElement,
187
+ [ELEMENT_QA_HEADER]: QAHeaderElement,
188
+ [ELEMENT_QA_ITEM]: QAItemElement,
189
+ [ELEMENT_QA_BODY]: QABodyElement,
190
+ [ELEMENT_QA_SECTION]: QASectionElement,
191
+ [BaseAudioPlugin.key]: MediaAudioElementStatic,
192
+ [BaseBlockquotePlugin.key]: BlockquoteElementStatic,
193
+ [BaseBoldPlugin.key]: withProps(SlateLeaf, { as: 'strong' }),
194
+ [BaseCodeBlockPlugin.key]: CodeBlockElementStatic,
195
+ [BaseCodeLinePlugin.key]: CodeLineElementStatic,
196
+ [BaseCodePlugin.key]: CodeLeafStatic,
197
+ [BaseCodeSyntaxPlugin.key]: CodeSyntaxLeafStatic,
198
+ [BaseColumnItemPlugin.key]: ColumnElementStatic,
199
+ [BaseColumnPlugin.key]: ColumnGroupElementStatic,
200
+ [BaseCommentsPlugin.key]: CommentLeafStatic,
201
+ [BaseDatePlugin.key]: DateElementStatic,
202
+ [BaseFilePlugin.key]: MediaFileElementStatic,
203
+ [BaseHighlightPlugin.key]: HighlightLeafStatic,
204
+ [BaseHorizontalRulePlugin.key]: HrElementStatic,
205
+ [BaseImagePlugin.key]: ImageElementStatic,
206
+ [BaseItalicPlugin.key]: withProps(SlateLeaf, { as: 'em' }),
207
+ [BaseKbdPlugin.key]: KbdLeafStatic,
208
+ [BaseLinkPlugin.key]: LinkElementStatic,
209
+ [BaseMediaEmbedPlugin.key]: MediaEmbedElementStatic,
210
+ [BaseMentionPlugin.key]: MentionElementStatic,
211
+ [BaseParagraphPlugin.key]: ParagraphElementStatic,
212
+ [BaseStrikethroughPlugin.key]: withProps(SlateLeaf, { as: 'del' }),
213
+ [BaseSubscriptPlugin.key]: withProps(SlateLeaf, { as: 'sub' }),
214
+ [BaseSuperscriptPlugin.key]: withProps(SlateLeaf, { as: 'sup' }),
215
+ [BaseTableCellHeaderPlugin.key]: TableCellHeaderStaticElement,
216
+ [BaseTableCellPlugin.key]: TableCellElementStatic,
217
+ [BaseTablePlugin.key]: TableElementStatic,
218
+ [BaseTableRowPlugin.key]: TableRowElementStatic,
219
+ // [BaseTocPlugin.key]: TocElementStatic, // use nextjs custom toc
220
+ [BaseTogglePlugin.key]: ToggleElementStatic,
221
+ [BaseUnderlinePlugin.key]: withProps(SlateLeaf, { as: 'u' }),
222
+ [BaseVideoPlugin.key]: MediaVideoElementStatic,
223
+ [HEADING_KEYS.h1]: withProps(HeadingElementStatic, { variant: 'h1' }),
224
+ [HEADING_KEYS.h2]: withProps(HeadingElementStatic, { variant: 'h2' }),
225
+ [HEADING_KEYS.h3]: withProps(HeadingElementStatic, { variant: 'h3' }),
226
+ [HEADING_KEYS.h4]: withProps(HeadingElementStatic, { variant: 'h4' }),
227
+ [HEADING_KEYS.h5]: withProps(HeadingElementStatic, { variant: 'h5' }),
228
+ [HEADING_KEYS.h6]: withProps(HeadingElementStatic, { variant: 'h6' }),
229
+ };
230
+
231
+ const editor = createSlateEditor({
232
+ plugins: [
233
+ BaseMediaEmbedPlugin,
234
+ QuoteBlockPlugin,
235
+ QuoteAuthorPlugin,
236
+ EssayExcerptBodyPlugin,
237
+ EssayExcerptPlugin,
238
+ EssayExcerptTitlePlugin,
239
+ EssayExcerptSubtitlePlugin,
240
+ QASectionSubtitlePlugin,
241
+ QASectionTitlePlugin,
242
+ QASectionPlugin,
243
+ QAItemPlugin,
244
+ QABodyPlugin,
245
+ QAHeaderPlugin,
246
+ BaseEquationPlugin,
247
+ BaseInlineEquationPlugin,
248
+ BaseColumnPlugin,
249
+ BaseColumnItemPlugin,
250
+ BaseTocPlugin,
251
+ BaseVideoPlugin,
252
+ BaseAudioPlugin,
253
+ BaseParagraphPlugin,
254
+ BaseHeadingPlugin,
255
+ BaseMediaEmbedPlugin,
256
+ BaseBoldPlugin,
257
+ BaseCodePlugin,
258
+ BaseItalicPlugin,
259
+ BaseStrikethroughPlugin,
260
+ BaseSubscriptPlugin,
261
+ BaseSuperscriptPlugin,
262
+ BaseUnderlinePlugin,
263
+ BaseBlockquotePlugin,
264
+ BaseDatePlugin,
265
+ BaseCodeBlockPlugin.configure({
266
+ options: {
267
+ lowlight,
268
+ },
269
+ }),
270
+ BaseIndentPlugin.extend({
271
+ inject: {
272
+ targetPlugins: [
273
+ BaseParagraphPlugin.key,
274
+ BaseBlockquotePlugin.key,
275
+ BaseCodeBlockPlugin.key,
276
+ ],
277
+ },
278
+ }),
279
+ BaseIndentListPlugin.extend({
280
+ inject: {
281
+ targetPlugins: [
282
+ BaseParagraphPlugin.key,
283
+ ...HEADING_LEVELS,
284
+ BaseBlockquotePlugin.key,
285
+ BaseCodeBlockPlugin.key,
286
+ BaseTogglePlugin.key,
287
+ ],
288
+ },
289
+ options: {
290
+ listStyleTypes: {
291
+ fire: {
292
+ liComponent: FireLiComponent,
293
+ markerComponent: FireMarker,
294
+ type: 'fire',
295
+ },
296
+ todo: {
297
+ liComponent: TodoLiStatic,
298
+ markerComponent: TodoMarkerStatic,
299
+ type: 'todo',
300
+ },
301
+ },
302
+ },
303
+ }),
304
+ BaseLinkPlugin,
305
+ BaseTableRowPlugin,
306
+ BaseTablePlugin,
307
+ BaseTableCellPlugin,
308
+ BaseHorizontalRulePlugin,
309
+ BaseFontColorPlugin,
310
+ BaseFontBackgroundColorPlugin,
311
+ BaseFontSizePlugin,
312
+ BaseKbdPlugin,
313
+ BaseAlignPlugin.extend({
314
+ inject: {
315
+ targetPlugins: [
316
+ BaseParagraphPlugin.key,
317
+ BaseMediaEmbedPlugin.key,
318
+ ...HEADING_LEVELS,
319
+ BaseImagePlugin.key,
320
+ ],
321
+ },
322
+ }),
323
+ BaseLineHeightPlugin,
324
+ BaseHighlightPlugin,
325
+ BaseFilePlugin,
326
+ BaseImagePlugin,
327
+ BaseMentionPlugin,
328
+ BaseCommentsPlugin,
329
+ BaseTogglePlugin,
330
+ ],
331
+ value,
332
+ });
333
+
334
+ // const editorHtml = await serializeHtml(editor, {
335
+ // components,
336
+ // editorComponent: EditorStatic,
337
+ // props: { style: { padding: '0 calc(50% - 350px)', paddingBottom: '' } },
338
+ // });
339
+
340
+ return <EditorStatic components={components} editor={editor} />;
341
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "jsx": "react-jsx",
4
+ "allowJs": false,
5
+ "esModuleInterop": false,
6
+ "allowSyntheticDefaultImports": true,
7
+ "strict": true,
8
+ "types": ["vite/client"]
9
+ },
10
+ "files": [],
11
+ "include": [],
12
+ "references": [
13
+ {
14
+ "path": "./tsconfig.lib.json"
15
+ }
16
+ ],
17
+ "extends": "../../tsconfig.base.json"
18
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../dist/out-tsc",
5
+ "types": [
6
+ "node",
7
+ "@nx/react/typings/cssmodule.d.ts",
8
+ "@nx/react/typings/image.d.ts",
9
+ "vite/client"
10
+ ]
11
+ },
12
+ "exclude": [
13
+ "**/*.spec.ts",
14
+ "**/*.test.ts",
15
+ "**/*.spec.tsx",
16
+ "**/*.test.tsx",
17
+ "**/*.spec.js",
18
+ "**/*.test.js",
19
+ "**/*.spec.jsx",
20
+ "**/*.test.jsx"
21
+ ],
22
+ "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
23
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,42 @@
1
+ /// <reference types='vitest' />
2
+ import { defineConfig } from 'vite';
3
+ import react from '@vitejs/plugin-react';
4
+ import dts from 'vite-plugin-dts';
5
+ import * as path from 'path';
6
+ import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
7
+ import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
8
+
9
+ export default defineConfig(() => ({
10
+ root: __dirname,
11
+ cacheDir: '../../node_modules/.vite/packages/helios-editor-renderer',
12
+ plugins: [
13
+ react(),
14
+ nxViteTsPaths(),
15
+ nxCopyAssetsPlugin(['*.md']),
16
+ dts({
17
+ entryRoot: 'src',
18
+ tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
19
+ }),
20
+ ],
21
+ build: {
22
+ outDir: '../../dist/packages/helios-editor-renderer',
23
+ emptyOutDir: true,
24
+ reportCompressedSize: true,
25
+ commonjsOptions: {
26
+ transformMixedEsModules: true,
27
+ },
28
+ lib: {
29
+ // Could also be a dictionary or array of multiple entry points.
30
+ entry: 'src/index.ts',
31
+ name: 'helios-editor-renderer',
32
+ fileName: 'index',
33
+ // Change this to the formats you want to support.
34
+ // Don't forget to update your package.json as well.
35
+ formats: ['es' as const],
36
+ },
37
+ rollupOptions: {
38
+ // External packages that should not be bundled into your library.
39
+ external: ['react', 'react-dom', 'react/jsx-runtime'],
40
+ },
41
+ },
42
+ }));