rimecms 0.25.12 → 0.25.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.
@@ -110,7 +110,11 @@
110
110
  let activeItems = $state<Record<string, boolean>>({});
111
111
  </script>
112
112
 
113
- <div id={pluginKey} bind:this={element} class="rz-bubble-menu">
113
+ <div
114
+ id={pluginKey}
115
+ bind:this={element}
116
+ class="rz-bubble-menu {isOpen ? 'rz-bubble-menu--open' : ''}"
117
+ >
114
118
  {#if nodeItems.length > 1}
115
119
  <NodeSelector {editor} items={nodeItems} isMenuOpen={isOpen} />
116
120
  {/if}
@@ -140,3 +144,14 @@
140
144
  {/each}
141
145
  {/if}
142
146
  </div>
147
+
148
+ <style>
149
+ .rz-bubble-menu {
150
+ opacity: 0;
151
+ pointer-events: none;
152
+ &.rz-bubble-menu--open {
153
+ opacity: 1;
154
+ pointer-events: all;
155
+ }
156
+ }
157
+ </style>
@@ -1 +1,2 @@
1
- export declare const sanitizeJSONContent: (content: any) => any;
1
+ import type { JSONContent } from '@tiptap/core';
2
+ export declare const sanitizeJSONContent: (content: JSONContent) => any;
@@ -3,6 +3,10 @@ import { sanitize } from '../../util/string.js';
3
3
  export const sanitizeJSONContent = (content) => {
4
4
  if (!content)
5
5
  return content;
6
+ // Prevent code mark from being sanitized (preserve original content)
7
+ if (Array.isArray(content.marks) && content.marks.map((m) => m.type).includes('code')) {
8
+ return content;
9
+ }
6
10
  // Handle text nodes - sanitize the text content
7
11
  if (content.type === 'text' && content.text) {
8
12
  return {
@@ -11,7 +15,7 @@ export const sanitizeJSONContent = (content) => {
11
15
  };
12
16
  }
13
17
  // Skip sanitization for code blocks (preserve original content)
14
- if (content.type === 'codeBlock' || content.type === 'code') {
18
+ if (content.type === 'codeBlock') {
15
19
  return content;
16
20
  }
17
21
  // Recursively handle content array
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimecms",
3
- "version": "0.25.12",
3
+ "version": "0.25.14",
4
4
  "homepage": "https://github.com/bienbiendev/rime",
5
5
  "scripts": {
6
6
  "dev": "vite dev",