markupeditor 0.9.25 → 0.9.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markupeditor",
3
- "version": "0.9.25",
3
+ "version": "0.9.27",
4
4
  "description": "A web component and API for WYSIWYG HTML editing.",
5
5
  "keywords": [
6
6
  "wysiwyg",
@@ -31,6 +31,7 @@
31
31
  "dependencies": {
32
32
  "crelt": "^1.0.6",
33
33
  "express": "^5.1.0",
34
+ "highlight.js": "^11.11.1",
34
35
  "prosemirror-commands": "^1.0.0",
35
36
  "prosemirror-dropcursor": "^1.8.1",
36
37
  "prosemirror-gapcursor": "^1.3.2",
@@ -48,14 +49,15 @@
48
49
  "devDependencies": {
49
50
  "@custom-elements-manifest/analyzer": "^0.11.0",
50
51
  "@eslint/js": "^9.35.0",
51
- "@rollup/plugin-node-resolve": "^16.0.0",
52
+ "@rollup/plugin-commonjs": "^29.0.3",
52
53
  "@rollup/plugin-json": "6.1.0",
54
+ "@rollup/plugin-node-resolve": "^16.0.0",
53
55
  "eslint": "^9.35.0",
54
56
  "jsdoc": "^4.0.5",
55
57
  "jsdom": "^27.0.1",
56
58
  "modern-jsdoc-template": "^1.0.0",
57
59
  "rollup": "^4.31.0",
58
- "rollup-plugin-import-css": "4.0.1",
60
+ "rollup-plugin-import-css": "4.0.1",
59
61
  "vitest": "^3.2.4"
60
62
  },
61
63
  "scripts": {
package/styles/markup.css CHANGED
@@ -265,6 +265,46 @@ img {
265
265
  color: #ccc;
266
266
  }
267
267
 
268
+ /* Scoped to :has() rather than styling pre unconditionally, since a code_block's
269
+ <pre> should only become a positioning context when it's actually carrying the
270
+ language overlay (highlightCode on, block selected) — not for every code block. */
271
+ pre:has(.Markup-code-language-overlay) {
272
+ position: relative;
273
+ }
274
+
275
+ .Markup-code-language-overlay {
276
+ position: absolute;
277
+ bottom: 100%;
278
+ right: 0;
279
+ font-size: 0.75rem;
280
+ padding: 2px 6px;
281
+ border: none;
282
+ border-radius: 4px 4px 0 0;
283
+ cursor: pointer;
284
+ opacity: 0.6;
285
+ color: white;
286
+ background: var(--Markup-accent-color, blue);
287
+ }
288
+
289
+ .Markup-code-language-overlay:hover {
290
+ opacity: 0.9;
291
+ }
292
+
293
+ /* Applied (setup/index.js, hasRoomAboveOverlay) when the code_block is too close to
294
+ the top of the view for the label to fit above it — attach to the bottom instead. */
295
+ .Markup-code-language-overlay-below {
296
+ bottom: auto;
297
+ top: 100%;
298
+ border-radius: 0 0 4px 4px;
299
+ }
300
+
301
+ @media (prefers-color-scheme: dark) {
302
+ .Markup-code-language-overlay {
303
+ background: var(--Markup-accent-color, lightblue);
304
+ color: black;
305
+ }
306
+ }
307
+
268
308
  /* Classes set by prosemirror-search module, modified for MarkupEditor */
269
309
  /* Note the dark and light mode are the same */
270
310
 
@@ -267,6 +267,16 @@
267
267
  padding: 2px 8px 2px 4px;
268
268
  }
269
269
 
270
+ .Markup-menu-dropdown-separator {
271
+ border-top: 1px solid var(--Markup-border-color, lightgray);
272
+ margin: 4px 0;
273
+ }
274
+ @media (prefers-color-scheme: dark) {
275
+ .Markup-menu-dropdown-separator {
276
+ border-top: 1px solid var(--Markup-border-color, gray);
277
+ }
278
+ }
279
+
270
280
  /* Used to overlfow and ellipsis-truncate text in Dropdown menu items */
271
281
  .Markup-menuitem-clipped {
272
282
  white-space: nowrap; /* Required for text-overflow */
@@ -519,6 +529,11 @@
519
529
  width: 300px;
520
530
  }
521
531
 
532
+ .Markup-prompt-language {
533
+ height: 96px;
534
+ width: 300px;
535
+ }
536
+
522
537
  .Markup-prompt img {
523
538
  display: inline-block;
524
539
  vertical-align: middle;