mrmd-editor 0.7.1 → 0.8.0

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 (58) hide show
  1. package/package.json +3 -1
  2. package/src/commands.js +112 -4
  3. package/src/comment-syntax.js +364 -39
  4. package/src/config/handlers.js +1 -2
  5. package/src/config/schema.js +46 -4
  6. package/src/document-template.js +2236 -0
  7. package/src/frontmatter-updater.js +204 -74
  8. package/src/grammar.js +758 -0
  9. package/src/index.js +1074 -55
  10. package/src/keymap.js +11 -2
  11. package/src/markdown/block-decorations.js +108 -5
  12. package/src/markdown/facets.js +37 -0
  13. package/src/markdown/html-inline.js +9 -5
  14. package/src/markdown/index.js +13 -3
  15. package/src/markdown/inline-commands.js +256 -0
  16. package/src/markdown/inline-model.js +578 -0
  17. package/src/markdown/inline-state.js +103 -0
  18. package/src/markdown/renderer.js +219 -12
  19. package/src/markdown/styles.js +290 -3
  20. package/src/markdown/widgets/alert-title.js +10 -8
  21. package/src/markdown/widgets/frontmatter.js +0 -6
  22. package/src/markdown/widgets/index.js +1 -0
  23. package/src/markdown/widgets/list-marker.js +29 -0
  24. package/src/markdown/wysiwyg.js +1158 -0
  25. package/src/mrp-types.js +2 -0
  26. package/src/output-widget.js +532 -18
  27. package/src/page-view-pagination.js +127 -0
  28. package/src/runtime-lsp.js +1757 -150
  29. package/src/section-controls/commands.js +617 -0
  30. package/src/section-controls/index.js +63 -0
  31. package/src/section-controls/plugin.js +165 -0
  32. package/src/section-controls/widgets.js +936 -0
  33. package/src/shell/ai-menu.js +11 -0
  34. package/src/shell/components/context-panel.js +572 -0
  35. package/src/shell/components/status-bar.js +10 -2
  36. package/src/shell/layouts/studio.js +206 -14
  37. package/src/shell/orchestrator-client.js +69 -0
  38. package/src/spellcheck.js +166 -0
  39. package/src/tables/README.md +97 -0
  40. package/src/tables/commands/insert-linked-table.js +122 -0
  41. package/src/tables/commands/open-table-workspace.js +43 -0
  42. package/src/tables/index.js +24 -0
  43. package/src/tables/jobs/client.js +158 -0
  44. package/src/tables/parsing/anchors.js +82 -0
  45. package/src/tables/parsing/linked-table-blocks.js +61 -0
  46. package/src/tables/state/linked-table-state.js +68 -0
  47. package/src/tables/widgets/linked-table-source-banner.js +77 -0
  48. package/src/tables/widgets/linked-table-widget.js +256 -0
  49. package/src/tables/workspace/controller.js +616 -0
  50. package/src/term-pty-client.js +51 -2
  51. package/src/term-widget.js +43 -3
  52. package/src/widgets/theme-utils.js +24 -16
  53. package/src/widgets/theme.js +1015 -1
  54. package/src/runtime-codelens/detector.js +0 -279
  55. package/src/runtime-codelens/index.js +0 -76
  56. package/src/runtime-codelens/plugin.js +0 -142
  57. package/src/runtime-codelens/styles.js +0 -184
  58. package/src/runtime-codelens/widgets.js +0 -216
@@ -13,11 +13,11 @@ import { WidgetType } from '@codemirror/view';
13
13
  * Icons for each alert type (using Unicode symbols)
14
14
  */
15
15
  const ALERT_ICONS = {
16
- note: 'ℹ️',
17
- tip: '💡',
18
- important: '',
19
- warning: '⚠️',
20
- caution: '🛑',
16
+ note: 'i',
17
+ tip: '',
18
+ important: '!',
19
+ warning: '',
20
+ caution: '×',
21
21
  };
22
22
 
23
23
  /**
@@ -26,14 +26,16 @@ const ALERT_ICONS = {
26
26
  export class AlertTitleWidget extends WidgetType {
27
27
  /**
28
28
  * @param {string} type - Alert type: 'note', 'tip', 'important', 'warning', 'caution'
29
+ * @param {string} [title] - Optional custom title text
29
30
  */
30
- constructor(type) {
31
+ constructor(type, title = null) {
31
32
  super();
32
33
  this.type = type.toLowerCase();
34
+ this.title = title || (this.type.charAt(0).toUpperCase() + this.type.slice(1));
33
35
  }
34
36
 
35
37
  eq(other) {
36
- return this.type === other.type;
38
+ return this.type === other.type && this.title === other.title;
37
39
  }
38
40
 
39
41
  toDOM() {
@@ -49,7 +51,7 @@ export class AlertTitleWidget extends WidgetType {
49
51
  // Text
50
52
  const text = document.createElement('span');
51
53
  text.className = 'cm-alert-text';
52
- text.textContent = this.type.charAt(0).toUpperCase() + this.type.slice(1);
54
+ text.textContent = this.title;
53
55
  span.appendChild(text);
54
56
 
55
57
  return span;
@@ -3,7 +3,6 @@
3
3
  *
4
4
  * Renders YAML frontmatter as a styled document header.
5
5
  * Shows title, subtitle, author, date, and abstract.
6
- * Session/runtime config keys are skipped (handled by runtime-codelens).
7
6
  *
8
7
  * @module markdown/widgets/frontmatter
9
8
  */
@@ -11,11 +10,6 @@
11
10
  import { WidgetType } from '@codemirror/view';
12
11
  import yaml from 'yaml';
13
12
 
14
- // Keys that are handled by runtime-codelens (not rendered here)
15
- const RUNTIME_KEYS = new Set([
16
- 'session', 'python', 'bash', 'node', 'julia', 'r', 'shell', 'term',
17
- ]);
18
-
19
13
  const TITLE_COMMIT_EVENT = 'mrmd:frontmatter-title-commit';
20
14
 
21
15
  let stylesInjected = false;
@@ -7,6 +7,7 @@
7
7
  */
8
8
 
9
9
  export { TaskCheckboxWidget } from './checkbox.js';
10
+ export { ListMarkerWidget } from './list-marker.js';
10
11
  export {
11
12
  ImageWidget,
12
13
  ImagePlaceholder,
@@ -0,0 +1,29 @@
1
+ /**
2
+ * List Marker Widget
3
+ *
4
+ * Renders cleaner list bullets for unordered markdown lists.
5
+ *
6
+ * @module markdown/widgets/list-marker
7
+ */
8
+
9
+ import { WidgetType } from '@codemirror/view';
10
+
11
+ /**
12
+ * Widget for rendering unordered list bullets.
13
+ */
14
+ export class ListMarkerWidget extends WidgetType {
15
+ eq() {
16
+ return true;
17
+ }
18
+
19
+ toDOM() {
20
+ const span = document.createElement('span');
21
+ span.className = 'cm-md-list-bullet';
22
+ span.textContent = '•';
23
+ return span;
24
+ }
25
+
26
+ ignoreEvent() {
27
+ return true;
28
+ }
29
+ }