@malva-ui/editor 0.1.13 → 0.1.14

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.
Files changed (134) hide show
  1. package/README.md +5 -5
  2. package/fesm2022/malva-ui-editor-ai.mjs +17 -0
  3. package/fesm2022/malva-ui-editor-ai.mjs.map +1 -0
  4. package/fesm2022/malva-ui-editor.mjs +10227 -0
  5. package/fesm2022/malva-ui-editor.mjs.map +1 -0
  6. package/package.json +35 -26
  7. package/types/malva-ui-editor-ai.d.ts +1 -0
  8. package/types/malva-ui-editor.d.ts +2995 -0
  9. package/ai/index.d.ts +0 -12
  10. package/ai/malva-ui-editor-ai.d.ts +0 -5
  11. package/esm2022/ai/index.js +0 -12
  12. package/esm2022/ai/index.js.map +0 -1
  13. package/esm2022/ai/malva-ui-editor-ai.js +0 -5
  14. package/esm2022/ai/malva-ui-editor-ai.js.map +0 -1
  15. package/esm2022/index.js +0 -37
  16. package/esm2022/index.js.map +0 -1
  17. package/esm2022/lib/ai/editor-ai-actions.js +0 -69
  18. package/esm2022/lib/ai/editor-ai-actions.js.map +0 -1
  19. package/esm2022/lib/ai/editor-ai-context.js +0 -612
  20. package/esm2022/lib/ai/editor-ai-context.js.map +0 -1
  21. package/esm2022/lib/ai/editor-ai-menu.js +0 -288
  22. package/esm2022/lib/ai/editor-ai-menu.js.map +0 -1
  23. package/esm2022/lib/ai/editor-ai-review-bar.js +0 -223
  24. package/esm2022/lib/ai/editor-ai-review-bar.js.map +0 -1
  25. package/esm2022/lib/ai/editor-ai-stream.js +0 -677
  26. package/esm2022/lib/ai/editor-ai-stream.js.map +0 -1
  27. package/esm2022/lib/ai/editor-ai-suggestions.js +0 -751
  28. package/esm2022/lib/ai/editor-ai-suggestions.js.map +0 -1
  29. package/esm2022/lib/ai/editor-ai.tokens.js +0 -10
  30. package/esm2022/lib/ai/editor-ai.tokens.js.map +0 -1
  31. package/esm2022/lib/ai/editor-ai.types.js +0 -1
  32. package/esm2022/lib/ai/editor-ai.types.js.map +0 -1
  33. package/esm2022/lib/editor/editor.js +0 -985
  34. package/esm2022/lib/editor/editor.js.map +0 -1
  35. package/esm2022/lib/editor-extension-preflight.js +0 -83
  36. package/esm2022/lib/editor-extension-preflight.js.map +0 -1
  37. package/esm2022/lib/editor-serialization.js +0 -152
  38. package/esm2022/lib/editor-serialization.js.map +0 -1
  39. package/esm2022/lib/editor-toolbar-context.js +0 -259
  40. package/esm2022/lib/editor-toolbar-context.js.map +0 -1
  41. package/esm2022/lib/editor.tokens.js +0 -10
  42. package/esm2022/lib/editor.tokens.js.map +0 -1
  43. package/esm2022/lib/editor.types.js +0 -48
  44. package/esm2022/lib/editor.types.js.map +0 -1
  45. package/esm2022/lib/extensions/editor-block-handle.js +0 -760
  46. package/esm2022/lib/extensions/editor-block-handle.js.map +0 -1
  47. package/esm2022/lib/extensions/editor-extensions.js +0 -321
  48. package/esm2022/lib/extensions/editor-extensions.js.map +0 -1
  49. package/esm2022/lib/extensions/editor-markdown-compatibility.js +0 -162
  50. package/esm2022/lib/extensions/editor-markdown-compatibility.js.map +0 -1
  51. package/esm2022/lib/extensions/editor-upload-placeholder.js +0 -156
  52. package/esm2022/lib/extensions/editor-upload-placeholder.js.map +0 -1
  53. package/esm2022/lib/status/editor-status.js +0 -64
  54. package/esm2022/lib/status/editor-status.js.map +0 -1
  55. package/esm2022/lib/toolbar/editor-alignment.js +0 -203
  56. package/esm2022/lib/toolbar/editor-alignment.js.map +0 -1
  57. package/esm2022/lib/toolbar/editor-block-insert.js +0 -101
  58. package/esm2022/lib/toolbar/editor-block-insert.js.map +0 -1
  59. package/esm2022/lib/toolbar/editor-color-control.js +0 -71
  60. package/esm2022/lib/toolbar/editor-color-control.js.map +0 -1
  61. package/esm2022/lib/toolbar/editor-command-button.js +0 -115
  62. package/esm2022/lib/toolbar/editor-command-button.js.map +0 -1
  63. package/esm2022/lib/toolbar/editor-heading.js +0 -266
  64. package/esm2022/lib/toolbar/editor-heading.js.map +0 -1
  65. package/esm2022/lib/toolbar/editor-highlight.js +0 -84
  66. package/esm2022/lib/toolbar/editor-highlight.js.map +0 -1
  67. package/esm2022/lib/toolbar/editor-image-upload-dialog.js +0 -289
  68. package/esm2022/lib/toolbar/editor-image-upload-dialog.js.map +0 -1
  69. package/esm2022/lib/toolbar/editor-image-upload.js +0 -315
  70. package/esm2022/lib/toolbar/editor-image-upload.js.map +0 -1
  71. package/esm2022/lib/toolbar/editor-inline-marks.js +0 -124
  72. package/esm2022/lib/toolbar/editor-inline-marks.js.map +0 -1
  73. package/esm2022/lib/toolbar/editor-link.js +0 -265
  74. package/esm2022/lib/toolbar/editor-link.js.map +0 -1
  75. package/esm2022/lib/toolbar/editor-list.js +0 -249
  76. package/esm2022/lib/toolbar/editor-list.js.map +0 -1
  77. package/esm2022/lib/toolbar/editor-table.js +0 -292
  78. package/esm2022/lib/toolbar/editor-table.js.map +0 -1
  79. package/esm2022/lib/toolbar/editor-text-color.js +0 -82
  80. package/esm2022/lib/toolbar/editor-text-color.js.map +0 -1
  81. package/esm2022/lib/toolbar/editor-toolbar-widget.js +0 -41
  82. package/esm2022/lib/toolbar/editor-toolbar-widget.js.map +0 -1
  83. package/esm2022/lib/toolbar/editor-toolbar.defs.js +0 -60
  84. package/esm2022/lib/toolbar/editor-toolbar.defs.js.map +0 -1
  85. package/esm2022/lib/toolbar/editor-toolbar.js +0 -826
  86. package/esm2022/lib/toolbar/editor-toolbar.js.map +0 -1
  87. package/esm2022/lib/toolbar/editor-undo-redo.js +0 -72
  88. package/esm2022/lib/toolbar/editor-undo-redo.js.map +0 -1
  89. package/esm2022/lib/toolbar/editor-zoom.js +0 -330
  90. package/esm2022/lib/toolbar/editor-zoom.js.map +0 -1
  91. package/esm2022/lib/upload/editor-image-upload-coordinator.js +0 -480
  92. package/esm2022/lib/upload/editor-image-upload-coordinator.js.map +0 -1
  93. package/esm2022/malva-ui-editor.js +0 -5
  94. package/esm2022/malva-ui-editor.js.map +0 -1
  95. package/index.d.ts +0 -35
  96. package/lib/ai/editor-ai-actions.d.ts +0 -27
  97. package/lib/ai/editor-ai-context.d.ts +0 -307
  98. package/lib/ai/editor-ai-menu.d.ts +0 -142
  99. package/lib/ai/editor-ai-review-bar.d.ts +0 -116
  100. package/lib/ai/editor-ai-stream.d.ts +0 -207
  101. package/lib/ai/editor-ai-suggestions.d.ts +0 -219
  102. package/lib/ai/editor-ai.tokens.d.ts +0 -10
  103. package/lib/ai/editor-ai.types.d.ts +0 -176
  104. package/lib/editor/editor.d.ts +0 -243
  105. package/lib/editor-extension-preflight.d.ts +0 -23
  106. package/lib/editor-serialization.d.ts +0 -74
  107. package/lib/editor-toolbar-context.d.ts +0 -116
  108. package/lib/editor.tokens.d.ts +0 -6
  109. package/lib/editor.types.d.ts +0 -194
  110. package/lib/extensions/editor-block-handle.d.ts +0 -59
  111. package/lib/extensions/editor-extensions.d.ts +0 -165
  112. package/lib/extensions/editor-markdown-compatibility.d.ts +0 -11
  113. package/lib/extensions/editor-upload-placeholder.d.ts +0 -75
  114. package/lib/status/editor-status.d.ts +0 -24
  115. package/lib/toolbar/editor-alignment.d.ts +0 -61
  116. package/lib/toolbar/editor-block-insert.d.ts +0 -26
  117. package/lib/toolbar/editor-color-control.d.ts +0 -32
  118. package/lib/toolbar/editor-command-button.d.ts +0 -29
  119. package/lib/toolbar/editor-heading.d.ts +0 -68
  120. package/lib/toolbar/editor-highlight.d.ts +0 -21
  121. package/lib/toolbar/editor-image-upload-dialog.d.ts +0 -96
  122. package/lib/toolbar/editor-image-upload.d.ts +0 -71
  123. package/lib/toolbar/editor-inline-marks.d.ts +0 -30
  124. package/lib/toolbar/editor-link.d.ts +0 -78
  125. package/lib/toolbar/editor-list.d.ts +0 -67
  126. package/lib/toolbar/editor-table.d.ts +0 -133
  127. package/lib/toolbar/editor-text-color.d.ts +0 -21
  128. package/lib/toolbar/editor-toolbar-widget.d.ts +0 -19
  129. package/lib/toolbar/editor-toolbar.d.ts +0 -157
  130. package/lib/toolbar/editor-toolbar.defs.d.ts +0 -35
  131. package/lib/toolbar/editor-undo-redo.d.ts +0 -26
  132. package/lib/toolbar/editor-zoom.d.ts +0 -108
  133. package/lib/upload/editor-image-upload-coordinator.d.ts +0 -55
  134. package/malva-ui-editor.d.ts +0 -5
package/ai/index.d.ts DELETED
@@ -1,12 +0,0 @@
1
- /**
2
- * Public surface of `@malva-ui/editor/ai`.
3
- *
4
- * The implementation lives in the primary entry point: `mlv-editor` provides
5
- * the per-editor AI context, and the primary entry importing this secondary
6
- * one (which already depends on the primary) would be a package cycle. This
7
- * barrel re-exports the toolkit under its documented import path, so
8
- * consumers keep importing `@malva-ui/editor/ai` and symbol identity is a
9
- * single module in every build.
10
- */
11
- export { applyMlvEditorAiSuggestions, MLV_EDITOR_AI_CARET_CLASS, MLV_EDITOR_AI_CONTEXT, MLV_EDITOR_AI_PROVIDER, MLV_EDITOR_AI_STREAMING_CHUNK_CLASS, MLV_EDITOR_AI_STREAMING_CLASS, MLV_EDITOR_AI_SUGGESTION_CURRENT_CLASS, MLV_EDITOR_AI_SUGGESTION_DELETE_CLASS, MLV_EDITOR_AI_SUGGESTION_INSERT_CLASS, MlvEditorAiContext, mlvEditorAiDefaultActions, MlvEditorAiMenu, MlvEditorAiReviewBar, runMlvEditorAiStream, } from '@malva-ui/editor';
12
- export type { MlvEditorAiAction, MlvEditorAiBuiltInTransformKind, MlvEditorAiFrameScheduler, MlvEditorAiOutputMode, MlvEditorAiProvider, MlvEditorAiRequest, MlvEditorAiReviewSuggestion, MlvEditorAiStatus, MlvEditorAiStreamErrorCode, MlvEditorAiStreamHandle, MlvEditorAiStreamOptions, MlvEditorAiStreamOutputMode, MlvEditorAiStreamResult, MlvEditorAiStreamStatus, MlvEditorAiSuggestion, MlvEditorAiSuggestionKind, MlvEditorAiSuggestionRange, MlvEditorAiSuggestionsOptions, MlvEditorAiSuggestionsSession, MlvEditorAiTransformKind, MlvEditorAiTransformOptions, } from '@malva-ui/editor';
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@malva-ui/editor/ai" />
5
- export * from './index';
@@ -1,12 +0,0 @@
1
- /**
2
- * Public surface of `@malva-ui/editor/ai`.
3
- *
4
- * The implementation lives in the primary entry point: `mlv-editor` provides
5
- * the per-editor AI context, and the primary entry importing this secondary
6
- * one (which already depends on the primary) would be a package cycle. This
7
- * barrel re-exports the toolkit under its documented import path, so
8
- * consumers keep importing `@malva-ui/editor/ai` and symbol identity is a
9
- * single module in every build.
10
- */
11
- export { applyMlvEditorAiSuggestions, MLV_EDITOR_AI_CARET_CLASS, MLV_EDITOR_AI_CONTEXT, MLV_EDITOR_AI_PROVIDER, MLV_EDITOR_AI_STREAMING_CHUNK_CLASS, MLV_EDITOR_AI_STREAMING_CLASS, MLV_EDITOR_AI_SUGGESTION_CURRENT_CLASS, MLV_EDITOR_AI_SUGGESTION_DELETE_CLASS, MLV_EDITOR_AI_SUGGESTION_INSERT_CLASS, MlvEditorAiContext, mlvEditorAiDefaultActions, MlvEditorAiMenu, MlvEditorAiReviewBar, runMlvEditorAiStream, } from '@malva-ui/editor';
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/editor/ai/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,sCAAsC,EACtC,qCAAqC,EACrC,qCAAqC,EACrC,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC","sourcesContent":["/**\n * Public surface of `@malva-ui/editor/ai`.\n *\n * The implementation lives in the primary entry point: `mlv-editor` provides\n * the per-editor AI context, and the primary entry importing this secondary\n * one (which already depends on the primary) would be a package cycle. This\n * barrel re-exports the toolkit under its documented import path, so\n * consumers keep importing `@malva-ui/editor/ai` and symbol identity is a\n * single module in every build.\n */\nexport {\n applyMlvEditorAiSuggestions,\n MLV_EDITOR_AI_CARET_CLASS,\n MLV_EDITOR_AI_CONTEXT,\n MLV_EDITOR_AI_PROVIDER,\n MLV_EDITOR_AI_STREAMING_CHUNK_CLASS,\n MLV_EDITOR_AI_STREAMING_CLASS,\n MLV_EDITOR_AI_SUGGESTION_CURRENT_CLASS,\n MLV_EDITOR_AI_SUGGESTION_DELETE_CLASS,\n MLV_EDITOR_AI_SUGGESTION_INSERT_CLASS,\n MlvEditorAiContext,\n mlvEditorAiDefaultActions,\n MlvEditorAiMenu,\n MlvEditorAiReviewBar,\n runMlvEditorAiStream,\n} from '@malva-ui/editor';\nexport type {\n MlvEditorAiAction,\n MlvEditorAiBuiltInTransformKind,\n MlvEditorAiFrameScheduler,\n MlvEditorAiOutputMode,\n MlvEditorAiProvider,\n MlvEditorAiRequest,\n MlvEditorAiReviewSuggestion,\n MlvEditorAiStatus,\n MlvEditorAiStreamErrorCode,\n MlvEditorAiStreamHandle,\n MlvEditorAiStreamOptions,\n MlvEditorAiStreamOutputMode,\n MlvEditorAiStreamResult,\n MlvEditorAiStreamStatus,\n MlvEditorAiSuggestion,\n MlvEditorAiSuggestionKind,\n MlvEditorAiSuggestionRange,\n MlvEditorAiSuggestionsOptions,\n MlvEditorAiSuggestionsSession,\n MlvEditorAiTransformKind,\n MlvEditorAiTransformOptions,\n} from '@malva-ui/editor';\n"]}
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './index';
5
- //# sourceMappingURL=malva-ui-editor-ai.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"malva-ui-editor-ai.js","sourceRoot":"","sources":["../../../../../libs/editor/ai/src/malva-ui-editor-ai.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}
package/esm2022/index.js DELETED
@@ -1,37 +0,0 @@
1
- export * from './lib/editor.tokens';
2
- export * from './lib/editor.types';
3
- // The AI toolkit implementation lives in this entry point so `mlv-editor`
4
- // can provide the per-editor context without a package cycle; the
5
- // `@malva-ui/editor/ai` barrel re-exports it as the documented surface.
6
- export * from './lib/ai/editor-ai-actions';
7
- export { MLV_EDITOR_AI_CONTEXT, MlvEditorAiContext, } from './lib/ai/editor-ai-context';
8
- export * from './lib/ai/editor-ai-menu';
9
- export * from './lib/ai/editor-ai-review-bar';
10
- export * from './lib/ai/editor-ai-stream';
11
- // The word-diff helper and its run type stay out of the public barrels on
12
- // purpose: they are implementation detail of the suggestion engine.
13
- export { applyMlvEditorAiSuggestions, MLV_EDITOR_AI_SUGGESTION_CURRENT_CLASS, MLV_EDITOR_AI_SUGGESTION_DELETE_CLASS, MLV_EDITOR_AI_SUGGESTION_INSERT_CLASS, } from './lib/ai/editor-ai-suggestions';
14
- export * from './lib/ai/editor-ai.tokens';
15
- export * from './lib/ai/editor-ai.types';
16
- export { MLV_EDITOR_TOOLBAR_CONTEXT } from './lib/editor-toolbar-context';
17
- export * from './lib/editor/editor';
18
- export * from './lib/extensions/editor-block-handle';
19
- export * from './lib/extensions/editor-extensions';
20
- export * from './lib/extensions/editor-upload-placeholder';
21
- export * from './lib/status/editor-status';
22
- export * from './lib/toolbar/editor-alignment';
23
- export * from './lib/toolbar/editor-block-insert';
24
- export * from './lib/toolbar/editor-heading';
25
- export * from './lib/toolbar/editor-highlight';
26
- export * from './lib/toolbar/editor-inline-marks';
27
- export * from './lib/toolbar/editor-list';
28
- export * from './lib/toolbar/editor-link';
29
- export { MlvEditorImageUpload } from './lib/toolbar/editor-image-upload';
30
- export * from './lib/toolbar/editor-table';
31
- export * from './lib/toolbar/editor-toolbar.defs';
32
- export { MlvEditorToolbar } from './lib/toolbar/editor-toolbar';
33
- export * from './lib/toolbar/editor-toolbar-widget';
34
- export * from './lib/toolbar/editor-undo-redo';
35
- export * from './lib/toolbar/editor-zoom';
36
- export * from './lib/toolbar/editor-text-color';
37
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/editor/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,0EAA0E;AAC1E,kEAAkE;AAClE,wEAAwE;AACxE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EACL,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AAKpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,0EAA0E;AAC1E,oEAAoE;AACpE,OAAO,EACL,2BAA2B,EAC3B,sCAAsC,EACtC,qCAAqC,EACrC,qCAAqC,GACtC,MAAM,gCAAgC,CAAC;AAQxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,cAAc,qBAAqB,CAAC;AACpC,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC","sourcesContent":["export * from './lib/editor.tokens';\nexport * from './lib/editor.types';\n// The AI toolkit implementation lives in this entry point so `mlv-editor`\n// can provide the per-editor context without a package cycle; the\n// `@malva-ui/editor/ai` barrel re-exports it as the documented surface.\nexport * from './lib/ai/editor-ai-actions';\nexport {\n MLV_EDITOR_AI_CONTEXT,\n MlvEditorAiContext,\n} from './lib/ai/editor-ai-context';\nexport type {\n MlvEditorAiStatus,\n MlvEditorAiTransformOptions,\n} from './lib/ai/editor-ai-context';\nexport * from './lib/ai/editor-ai-menu';\nexport * from './lib/ai/editor-ai-review-bar';\nexport * from './lib/ai/editor-ai-stream';\n// The word-diff helper and its run type stay out of the public barrels on\n// purpose: they are implementation detail of the suggestion engine.\nexport {\n applyMlvEditorAiSuggestions,\n MLV_EDITOR_AI_SUGGESTION_CURRENT_CLASS,\n MLV_EDITOR_AI_SUGGESTION_DELETE_CLASS,\n MLV_EDITOR_AI_SUGGESTION_INSERT_CLASS,\n} from './lib/ai/editor-ai-suggestions';\nexport type {\n MlvEditorAiSuggestion,\n MlvEditorAiSuggestionKind,\n MlvEditorAiSuggestionRange,\n MlvEditorAiSuggestionsOptions,\n MlvEditorAiSuggestionsSession,\n} from './lib/ai/editor-ai-suggestions';\nexport * from './lib/ai/editor-ai.tokens';\nexport * from './lib/ai/editor-ai.types';\nexport { MLV_EDITOR_TOOLBAR_CONTEXT } from './lib/editor-toolbar-context';\nexport type { MlvEditorToolbarContext } from './lib/editor-toolbar-context';\nexport * from './lib/editor/editor';\nexport * from './lib/extensions/editor-block-handle';\nexport * from './lib/extensions/editor-extensions';\nexport * from './lib/extensions/editor-upload-placeholder';\nexport * from './lib/status/editor-status';\nexport * from './lib/toolbar/editor-alignment';\nexport * from './lib/toolbar/editor-block-insert';\nexport * from './lib/toolbar/editor-heading';\nexport * from './lib/toolbar/editor-highlight';\nexport * from './lib/toolbar/editor-inline-marks';\nexport * from './lib/toolbar/editor-list';\nexport * from './lib/toolbar/editor-link';\nexport { MlvEditorImageUpload } from './lib/toolbar/editor-image-upload';\nexport * from './lib/toolbar/editor-table';\nexport * from './lib/toolbar/editor-toolbar.defs';\nexport { MlvEditorToolbar } from './lib/toolbar/editor-toolbar';\nexport * from './lib/toolbar/editor-toolbar-widget';\nexport * from './lib/toolbar/editor-undo-redo';\nexport * from './lib/toolbar/editor-zoom';\nexport * from './lib/toolbar/editor-text-color';\nexport type {\n Editor,\n EditorOptions,\n Extension,\n Extensions,\n} from '@tiptap/core';\n"]}
@@ -1,69 +0,0 @@
1
- /**
2
- * @internal English fallbacks for the built-in action labels, used when no
3
- * `MLV_EDITOR_I18N` copy is supplied — the same strings the English pack
4
- * ships. Kept beside the factory so the label table exists exactly once: the
5
- * menu builds its own default list through {@link mlvEditorAiDefaultActions}.
6
- */
7
- const BUILT_IN_LABEL_FALLBACKS = {
8
- aiImprove: 'Improve writing',
9
- aiFixGrammar: 'Fix grammar',
10
- aiShorten: 'Shorten',
11
- aiExtend: 'Extend',
12
- aiSummarize: 'Summarize',
13
- aiTone: 'Change tone',
14
- aiTranslate: 'Translate',
15
- };
16
- /**
17
- * Builds the seven built-in AI menu actions, labelled from the supplied
18
- * editor copy.
19
- *
20
- * This is the exact list `MlvEditorAiMenu` renders when its `actions` input is
21
- * omitted, so a host that wants to *extend* rather than replace the built-ins
22
- * spreads the result instead of retyping it:
23
- *
24
- * ```ts
25
- * private readonly _copy = inject(MLV_EDITOR_I18N, { optional: true });
26
- *
27
- * readonly actions = computed<readonly MlvEditorAiAction[]>(() => [
28
- * ...mlvEditorAiDefaultActions(this._copy?.()),
29
- * { kind: 'legal-review', label: 'Legal review', output: 'review' },
30
- * ]);
31
- * ```
32
- *
33
- * The custom-prompt entry is not part of this list: the menu renders it
34
- * separately and it is dropped with `showCustomPrompt="false"`.
35
- *
36
- * @param copy Resolved editor copy, typically `inject(MLV_EDITOR_I18N)()`.
37
- * `null`/`undefined`, or any missing key, falls back to the English label.
38
- * @returns A fresh array of the seven built-in actions, in menu order.
39
- */
40
- export function mlvEditorAiDefaultActions(copy) {
41
- return [
42
- {
43
- kind: 'improve',
44
- label: copy?.aiImprove ?? BUILT_IN_LABEL_FALLBACKS.aiImprove,
45
- },
46
- {
47
- kind: 'fix-grammar',
48
- label: copy?.aiFixGrammar ?? BUILT_IN_LABEL_FALLBACKS.aiFixGrammar,
49
- },
50
- {
51
- kind: 'shorten',
52
- label: copy?.aiShorten ?? BUILT_IN_LABEL_FALLBACKS.aiShorten,
53
- },
54
- {
55
- kind: 'extend',
56
- label: copy?.aiExtend ?? BUILT_IN_LABEL_FALLBACKS.aiExtend,
57
- },
58
- {
59
- kind: 'summarize',
60
- label: copy?.aiSummarize ?? BUILT_IN_LABEL_FALLBACKS.aiSummarize,
61
- },
62
- { kind: 'tone', label: copy?.aiTone ?? BUILT_IN_LABEL_FALLBACKS.aiTone },
63
- {
64
- kind: 'translate',
65
- label: copy?.aiTranslate ?? BUILT_IN_LABEL_FALLBACKS.aiTranslate,
66
- },
67
- ];
68
- }
69
- //# sourceMappingURL=editor-ai-actions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-ai-actions.js","sourceRoot":"","sources":["../../../../../../libs/editor/src/lib/ai/editor-ai-actions.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,wBAAwB,GAAG;IAC/B,SAAS,EAAE,iBAAiB;IAC5B,YAAY,EAAE,aAAa;IAC3B,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,QAAQ;IAClB,WAAW,EAAE,WAAW;IACxB,MAAM,EAAE,aAAa;IACrB,WAAW,EAAE,WAAW;CAChB,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,yBAAyB,CACvC,IAAsC;IAEtC,OAAO;QACL;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,IAAI,EAAE,SAAS,IAAI,wBAAwB,CAAC,SAAS;SAC7D;QACD;YACE,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,IAAI,EAAE,YAAY,IAAI,wBAAwB,CAAC,YAAY;SACnE;QACD;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,IAAI,EAAE,SAAS,IAAI,wBAAwB,CAAC,SAAS;SAC7D;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,IAAI,EAAE,QAAQ,IAAI,wBAAwB,CAAC,QAAQ;SAC3D;QACD;YACE,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,IAAI,EAAE,WAAW,IAAI,wBAAwB,CAAC,WAAW;SACjE;QACD,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,wBAAwB,CAAC,MAAM,EAAE;QACxE;YACE,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,IAAI,EAAE,WAAW,IAAI,wBAAwB,CAAC,WAAW;SACjE;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { MlvEditorI18n } from '@malva-ui/i18n';\nimport type { MlvEditorAiAction } from './editor-ai.types';\n\n/**\n * @internal English fallbacks for the built-in action labels, used when no\n * `MLV_EDITOR_I18N` copy is supplied — the same strings the English pack\n * ships. Kept beside the factory so the label table exists exactly once: the\n * menu builds its own default list through {@link mlvEditorAiDefaultActions}.\n */\nconst BUILT_IN_LABEL_FALLBACKS = {\n aiImprove: 'Improve writing',\n aiFixGrammar: 'Fix grammar',\n aiShorten: 'Shorten',\n aiExtend: 'Extend',\n aiSummarize: 'Summarize',\n aiTone: 'Change tone',\n aiTranslate: 'Translate',\n} as const;\n\n/**\n * Builds the seven built-in AI menu actions, labelled from the supplied\n * editor copy.\n *\n * This is the exact list `MlvEditorAiMenu` renders when its `actions` input is\n * omitted, so a host that wants to *extend* rather than replace the built-ins\n * spreads the result instead of retyping it:\n *\n * ```ts\n * private readonly _copy = inject(MLV_EDITOR_I18N, { optional: true });\n *\n * readonly actions = computed<readonly MlvEditorAiAction[]>(() => [\n * ...mlvEditorAiDefaultActions(this._copy?.()),\n * { kind: 'legal-review', label: 'Legal review', output: 'review' },\n * ]);\n * ```\n *\n * The custom-prompt entry is not part of this list: the menu renders it\n * separately and it is dropped with `showCustomPrompt=\"false\"`.\n *\n * @param copy Resolved editor copy, typically `inject(MLV_EDITOR_I18N)()`.\n * `null`/`undefined`, or any missing key, falls back to the English label.\n * @returns A fresh array of the seven built-in actions, in menu order.\n */\nexport function mlvEditorAiDefaultActions(\n copy: MlvEditorI18n | null | undefined,\n): readonly MlvEditorAiAction[] {\n return [\n {\n kind: 'improve',\n label: copy?.aiImprove ?? BUILT_IN_LABEL_FALLBACKS.aiImprove,\n },\n {\n kind: 'fix-grammar',\n label: copy?.aiFixGrammar ?? BUILT_IN_LABEL_FALLBACKS.aiFixGrammar,\n },\n {\n kind: 'shorten',\n label: copy?.aiShorten ?? BUILT_IN_LABEL_FALLBACKS.aiShorten,\n },\n {\n kind: 'extend',\n label: copy?.aiExtend ?? BUILT_IN_LABEL_FALLBACKS.aiExtend,\n },\n {\n kind: 'summarize',\n label: copy?.aiSummarize ?? BUILT_IN_LABEL_FALLBACKS.aiSummarize,\n },\n { kind: 'tone', label: copy?.aiTone ?? BUILT_IN_LABEL_FALLBACKS.aiTone },\n {\n kind: 'translate',\n label: copy?.aiTranslate ?? BUILT_IN_LABEL_FALLBACKS.aiTranslate,\n },\n ];\n}\n"]}