overtype 2.0.4 → 2.0.5

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * OverType v2.0.4
2
+ * OverType v2.0.5
3
3
  * A lightweight markdown editor library with perfect WYSIWYG alignment
4
4
  * @license MIT
5
5
  * @author David Miranda
@@ -33,7 +33,7 @@ ${a}`:r;if(d){let L=o.value[o.selectionStart-1];o.selectionStart!==0&&L!=null&&!
33
33
  `)+u;return t?(n=Math.max(n+_(0,e.unorderedList).length+h.length,0),i=n):a.processed?(n=Math.max(o.selectionStart+h.length,0),i=o.selectionEnd+h.length+l-c):(n=Math.max(o.selectionStart+h.length,0),i=o.selectionEnd+h.length+l),{text:f,selectionStart:n,selectionEnd:i}}function he(o,e){let t=R(o,n=>Qe(n,e),{adjustSelection:(n,i,r,s)=>{let a=o.value.slice(s,o.selectionEnd),p=/^\d+\.\s+/,d=/^- /,l=p.test(a),c=d.test(a),h=e.orderedList&&l||e.unorderedList&&c;if(i===r)if(h){let u=a.match(e.orderedList?p:d),f=u?u[0].length:0;return{start:Math.max(i-f,s),end:Math.max(i-f,s)}}else if(l||c){let u=a.match(l?p:d),f=u?u[0].length:0,g=(e.unorderedList?2:3)-f;return{start:i+g,end:i+g}}else{let u=e.unorderedList?2:3;return{start:i+u,end:i+u}}else if(h){let u=a.match(e.orderedList?p:d),f=u?u[0].length:0;return{start:Math.max(i-f,s),end:Math.max(r-f,s)}}else if(l||c){let u=a.match(l?p:d),f=u?u[0].length:0,g=(e.unorderedList?2:3)-f;return{start:i+g,end:r+g}}else{let u=e.unorderedList?2:3;return{start:i+u,end:r+u}}}});I(o,t)}function Xe(o){if(!o)return[];let e=[],{selectionStart:t,selectionEnd:n,value:i}=o,r=i.split(`
34
34
  `),s=0,a="";for(let c of r){if(t>=s&&t<=s+c.length){a=c;break}s+=c.length+1}a.startsWith("- ")&&(a.startsWith("- [ ] ")||a.startsWith("- [x] ")?e.push("task-list"):e.push("bullet-list")),/^\d+\.\s/.test(a)&&e.push("numbered-list"),a.startsWith("> ")&&e.push("quote"),a.startsWith("# ")&&e.push("header"),a.startsWith("## ")&&e.push("header-2"),a.startsWith("### ")&&e.push("header-3");let p=Math.max(0,t-10),d=Math.min(i.length,n+10),l=i.slice(p,d);if(l.includes("**")){let c=i.slice(Math.max(0,t-100),t),h=i.slice(n,Math.min(i.length,n+100)),u=c.lastIndexOf("**"),f=h.indexOf("**");u!==-1&&f!==-1&&e.push("bold")}if(l.includes("_")){let c=i.slice(Math.max(0,t-100),t),h=i.slice(n,Math.min(i.length,n+100)),u=c.lastIndexOf("_"),f=h.indexOf("_");u!==-1&&f!==-1&&e.push("italic")}if(l.includes("`")){let c=i.slice(Math.max(0,t-100),t),h=i.slice(n,Math.min(i.length,n+100));c.includes("`")&&h.includes("`")&&e.push("code")}if(l.includes("[")&&l.includes("]")){let c=i.slice(Math.max(0,t-100),t),h=i.slice(n,Math.min(i.length,n+100)),u=c.lastIndexOf("["),f=h.indexOf("]");u!==-1&&f!==-1&&i.slice(n+f+1,n+f+10).startsWith("(")&&e.push("link")}return e}function U(o){if(!o||o.disabled||o.readOnly)return;y("toggleBold","Starting"),z(o,"Before");let e=$(E.bold),t=V(o,e);ce(t),I(o,t),z(o,"After")}function D(o){if(!o||o.disabled||o.readOnly)return;let e=$(E.italic),t=V(o,e);I(o,t)}function ue(o){if(!o||o.disabled||o.readOnly)return;let e=$(E.code),t=V(o,e);I(o,t)}function q(o,e={}){if(!o||o.disabled||o.readOnly)return;let t=o.value.slice(o.selectionStart,o.selectionEnd),n=$(E.link);if(t&&t.match(/^https?:\/\//)&&!e.url?(n.suffix=`](${t})`,n.replaceNext=""):e.url&&(n.suffix=`](${e.url})`,n.replaceNext=""),e.text&&!t){let s=o.selectionStart;o.value=o.value.slice(0,s)+e.text+o.value.slice(s),o.selectionStart=s,o.selectionEnd=s+e.text.length}let r=V(o,n);I(o,r)}function W(o){if(!o||o.disabled||o.readOnly)return;let e=$(E.bulletList);he(o,e)}function K(o){if(!o||o.disabled||o.readOnly)return;let e=$(E.numberedList);he(o,e)}function me(o){if(!o||o.disabled||o.readOnly)return;y("toggleQuote","Starting"),z(o,"Initial");let e=$(E.quote),t=R(o,n=>de(n,e),{prefix:e.prefix});ce(t),I(o,t),z(o,"Final")}function X(o){if(!o||o.disabled||o.readOnly)return;let e=$(E.taskList),t=R(o,n=>de(n,e),{prefix:e.prefix});I(o,t)}function Y(o,e=1,t=!1){if(!o||o.disabled||o.readOnly)return;(e<1||e>6)&&(e=1),y("insertHeader","============ START ============"),y("insertHeader",`Level: ${e}, Toggle: ${t}`),y("insertHeader",`Initial cursor: ${o.selectionStart}-${o.selectionEnd}`);let n=`header${e===1?"1":e}`,i=$(E[n]||E.header1);y("insertHeader",`Style prefix: "${i.prefix}"`);let r=o.value,s=o.selectionStart,a=o.selectionEnd,p=s;for(;p>0&&r[p-1]!==`
35
35
  `;)p--;let d=a;for(;d<r.length&&r[d]!==`
36
- `;)d++;let l=r.slice(p,d);y("insertHeader",`Current line (before): "${l}"`);let c=l.match(/^(#{1,6})\s*/),h=c?c[1].length:0,u=c?c[0].length:0;y("insertHeader","Existing header check:"),y("insertHeader",` - Match: ${c?`"${c[0]}"`:"none"}`),y("insertHeader",` - Existing level: ${h}`),y("insertHeader",` - Existing prefix length: ${u}`),y("insertHeader",` - Target level: ${e}`);let f=t&&h===e;y("insertHeader",`Should toggle OFF: ${f} (toggle=${t}, existingLevel=${h}, level=${e})`);let m=R(o,g=>{let v=g.value.slice(g.selectionStart,g.selectionEnd);y("insertHeader",`Line in operation: "${v}"`);let b=v.replace(/^#{1,6}\s*/,"");y("insertHeader",`Cleaned line: "${b}"`);let k;return f?(y("insertHeader","ACTION: Toggling OFF - removing header"),k=b):h>0?(y("insertHeader",`ACTION: Replacing H${h} with H${e}`),k=i.prefix+b):(y("insertHeader","ACTION: Adding new header"),k=i.prefix+b),y("insertHeader",`New line: "${k}"`),{text:k,selectionStart:g.selectionStart,selectionEnd:g.selectionEnd}},{prefix:i.prefix,adjustSelection:(g,v,b,k)=>{if(y("insertHeader","Adjusting selection:"),y("insertHeader",` - isRemoving param: ${g}`),y("insertHeader",` - shouldToggleOff: ${f}`),y("insertHeader",` - selStart: ${v}, selEnd: ${b}`),y("insertHeader",` - lineStartPos: ${k}`),f){let M=Math.max(v-u,k);return y("insertHeader",` - Removing header, adjusting by -${u}`),{start:M,end:v===b?M:Math.max(b-u,k)}}else if(u>0){let M=i.prefix.length-u;return y("insertHeader",` - Replacing header, adjusting by ${M}`),{start:v+M,end:b+M}}else return y("insertHeader",` - Adding header, adjusting by +${i.prefix.length}`),{start:v+i.prefix.length,end:b+i.prefix.length}}});y("insertHeader",`Final result: text="${m.text}", cursor=${m.selectionStart}-${m.selectionEnd}`),y("insertHeader","============ END ============"),I(o,m)}function fe(o){Y(o,1,!0)}function ge(o){Y(o,2,!0)}function ve(o){Y(o,3,!0)}function ye(o){return Xe(o)}var O=class{constructor(e){this.editor=e,this.textarea=e.textarea}handleKeydown(e){if(!(navigator.platform.toLowerCase().includes("mac")?e.metaKey:e.ctrlKey))return!1;let i=null;switch(e.key.toLowerCase()){case"b":e.shiftKey||(i="toggleBold");break;case"i":e.shiftKey||(i="toggleItalic");break;case"k":e.shiftKey||(i="insertLink");break;case"7":e.shiftKey&&(i="toggleNumberedList");break;case"8":e.shiftKey&&(i="toggleBulletList");break}return i?(e.preventDefault(),this.editor.toolbar?this.editor.toolbar.handleAction(i):this.handleAction(i),!0):!1}async handleAction(e){let t=this.textarea;if(t){t.focus();try{switch(e){case"toggleBold":U(t);break;case"toggleItalic":D(t);break;case"insertLink":q(t);break;case"toggleBulletList":W(t);break;case"toggleNumberedList":K(t);break}t.dispatchEvent(new Event("input",{bubbles:!0}))}catch(n){console.error("Error in markdown action:",n)}}}destroy(){}};var P={name:"solar",colors:{bgPrimary:"#faf0ca",bgSecondary:"#ffffff",text:"#0d3b66",h1:"#f95738",h2:"#ee964b",h3:"#3d8a51",strong:"#ee964b",em:"#f95738",link:"#0d3b66",code:"#0d3b66",codeBg:"rgba(244, 211, 94, 0.4)",blockquote:"#5a7a9b",hr:"#5a7a9b",syntaxMarker:"rgba(13, 59, 102, 0.52)",cursor:"#f95738",selection:"rgba(244, 211, 94, 0.4)",listMarker:"#ee964b",toolbarBg:"#ffffff",toolbarBorder:"rgba(13, 59, 102, 0.15)",toolbarIcon:"#0d3b66",toolbarHover:"#f5f5f5",toolbarActive:"#faf0ca"}},be={name:"cave",colors:{bgPrimary:"#141E26",bgSecondary:"#1D2D3E",text:"#c5dde8",h1:"#d4a5ff",h2:"#f6ae2d",h3:"#9fcfec",strong:"#f6ae2d",em:"#9fcfec",link:"#9fcfec",code:"#c5dde8",codeBg:"#1a232b",blockquote:"#9fcfec",hr:"#c5dde8",syntaxMarker:"rgba(159, 207, 236, 0.73)",cursor:"#f26419",selection:"rgba(51, 101, 138, 0.4)",listMarker:"#f6ae2d",toolbarBg:"#1D2D3E",toolbarBorder:"rgba(197, 221, 232, 0.1)",toolbarIcon:"#c5dde8",toolbarHover:"#243546",toolbarActive:"#2a3f52"}},we={solar:P,cave:be,light:P,dark:be};function B(o){return typeof o=="string"?{...we[o]||we.solar,name:o}:o}function N(o){let e=[];for(let[t,n]of Object.entries(o)){let i=t.replace(/([A-Z])/g,"-$1").toLowerCase();e.push(`--${i}: ${n};`)}return e.join(`
36
+ `;)d++;let l=r.slice(p,d);y("insertHeader",`Current line (before): "${l}"`);let c=l.match(/^(#{1,6})\s*/),h=c?c[1].length:0,u=c?c[0].length:0;y("insertHeader","Existing header check:"),y("insertHeader",` - Match: ${c?`"${c[0]}"`:"none"}`),y("insertHeader",` - Existing level: ${h}`),y("insertHeader",` - Existing prefix length: ${u}`),y("insertHeader",` - Target level: ${e}`);let f=t&&h===e;y("insertHeader",`Should toggle OFF: ${f} (toggle=${t}, existingLevel=${h}, level=${e})`);let m=R(o,g=>{let v=g.value.slice(g.selectionStart,g.selectionEnd);y("insertHeader",`Line in operation: "${v}"`);let b=v.replace(/^#{1,6}\s*/,"");y("insertHeader",`Cleaned line: "${b}"`);let k;return f?(y("insertHeader","ACTION: Toggling OFF - removing header"),k=b):h>0?(y("insertHeader",`ACTION: Replacing H${h} with H${e}`),k=i.prefix+b):(y("insertHeader","ACTION: Adding new header"),k=i.prefix+b),y("insertHeader",`New line: "${k}"`),{text:k,selectionStart:g.selectionStart,selectionEnd:g.selectionEnd}},{prefix:i.prefix,adjustSelection:(g,v,b,k)=>{if(y("insertHeader","Adjusting selection:"),y("insertHeader",` - isRemoving param: ${g}`),y("insertHeader",` - shouldToggleOff: ${f}`),y("insertHeader",` - selStart: ${v}, selEnd: ${b}`),y("insertHeader",` - lineStartPos: ${k}`),f){let M=Math.max(v-u,k);return y("insertHeader",` - Removing header, adjusting by -${u}`),{start:M,end:v===b?M:Math.max(b-u,k)}}else if(u>0){let M=i.prefix.length-u;return y("insertHeader",` - Replacing header, adjusting by ${M}`),{start:v+M,end:b+M}}else return y("insertHeader",` - Adding header, adjusting by +${i.prefix.length}`),{start:v+i.prefix.length,end:b+i.prefix.length}}});y("insertHeader",`Final result: text="${m.text}", cursor=${m.selectionStart}-${m.selectionEnd}`),y("insertHeader","============ END ============"),I(o,m)}function fe(o){Y(o,1,!0)}function ge(o){Y(o,2,!0)}function ve(o){Y(o,3,!0)}function ye(o){return Xe(o)}var O=class{constructor(e){this.editor=e,this.textarea=e.textarea}handleKeydown(e){if(!(navigator.platform.toLowerCase().includes("mac")?e.metaKey:e.ctrlKey))return!1;let i=null;switch(e.key.toLowerCase()){case"b":e.shiftKey||(i="toggleBold");break;case"i":e.shiftKey||(i="toggleItalic");break;case"k":e.shiftKey||(i="insertLink");break;case"7":e.shiftKey&&(i="toggleNumberedList");break;case"8":e.shiftKey&&(i="toggleBulletList");break}return i?(e.preventDefault(),this.editor.toolbar?this.editor.toolbar.handleAction(i):this.handleAction(i),!0):!1}async handleAction(e){let t=this.textarea;if(t){t.focus();try{switch(e){case"toggleBold":U(t);break;case"toggleItalic":D(t);break;case"insertLink":q(t);break;case"toggleBulletList":W(t);break;case"toggleNumberedList":K(t);break}t.dispatchEvent(new Event("input",{bubbles:!0}))}catch(n){console.error("Error in markdown action:",n)}}}destroy(){}};var P={name:"solar",colors:{bgPrimary:"#faf0ca",bgSecondary:"#ffffff",text:"#0d3b66",textPrimary:"#0d3b66",textSecondary:"#5a7a9b",h1:"#f95738",h2:"#ee964b",h3:"#3d8a51",strong:"#ee964b",em:"#f95738",del:"#ee964b",link:"#0d3b66",code:"#0d3b66",codeBg:"rgba(244, 211, 94, 0.4)",blockquote:"#5a7a9b",hr:"#5a7a9b",syntaxMarker:"rgba(13, 59, 102, 0.52)",syntax:"#999999",cursor:"#f95738",selection:"rgba(244, 211, 94, 0.4)",listMarker:"#ee964b",rawLine:"#5a7a9b",border:"#e0e0e0",hoverBg:"#f0f0f0",primary:"#0d3b66",toolbarBg:"#ffffff",toolbarIcon:"#0d3b66",toolbarHover:"#f5f5f5",toolbarActive:"#faf0ca"}},be={name:"cave",colors:{bgPrimary:"#141E26",bgSecondary:"#1D2D3E",text:"#c5dde8",textPrimary:"#c5dde8",textSecondary:"#9fcfec",h1:"#d4a5ff",h2:"#f6ae2d",h3:"#9fcfec",strong:"#f6ae2d",em:"#9fcfec",del:"#f6ae2d",link:"#9fcfec",code:"#c5dde8",codeBg:"#1a232b",blockquote:"#9fcfec",hr:"#c5dde8",syntaxMarker:"rgba(159, 207, 236, 0.73)",syntax:"#7a8c98",cursor:"#f26419",selection:"rgba(51, 101, 138, 0.4)",listMarker:"#f6ae2d",rawLine:"#9fcfec",border:"#2a3f52",hoverBg:"#243546",primary:"#9fcfec",toolbarBg:"#1D2D3E",toolbarIcon:"#c5dde8",toolbarHover:"#243546",toolbarActive:"#2a3f52"}},we={solar:P,cave:be,light:P,dark:be};function B(o){return typeof o=="string"?{...we[o]||we.solar,name:o}:o}function N(o){let e=[];for(let[t,n]of Object.entries(o)){let i=t.replace(/([A-Z])/g,"-$1").toLowerCase();e.push(`--${i}: ${n};`)}return e.join(`
37
37
  `)}function ke(o,e={}){return{...o,colors:{...o.colors,...e}}}function xe(o={}){let{fontSize:e="14px",lineHeight:t=1.6,fontFamily:n='"SF Mono", SFMono-Regular, Menlo, Monaco, "Cascadia Code", Consolas, "Roboto Mono", "Noto Sans Mono", "Droid Sans Mono", "Ubuntu Mono", "DejaVu Sans Mono", "Liberation Mono", "Courier New", Courier, monospace',padding:i="20px",theme:r=null,mobile:s={}}=o,a=Object.keys(s).length>0?`
38
38
  @media (max-width: 640px) {
39
39
  .overtype-wrapper .overtype-input,
@@ -498,6 +498,7 @@ ${a}`:r;if(d){let L=o.value[o.selectionStart-1];o.selectionStart!==0&&L!=null&&!
498
498
  gap: 4px !important;
499
499
  padding: 8px !important; /* Override reset */
500
500
  background: var(--toolbar-bg, var(--bg-primary, #f8f9fa)) !important; /* Override reset */
501
+ border-bottom: 1px solid var(--toolbar-border, transparent) !important; /* Override reset */
501
502
  overflow-x: auto !important; /* Allow horizontal scrolling */
502
503
  overflow-y: hidden !important; /* Hide vertical overflow */
503
504
  -webkit-overflow-scrolling: touch !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "overtype",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "A lightweight markdown editor library with perfect WYSIWYG alignment using an invisible textarea overlay",
5
5
  "main": "dist/overtype.cjs",
6
6
  "module": "dist/overtype.esm.js",
@@ -26,7 +26,8 @@
26
26
  },
27
27
  "type": "module",
28
28
  "scripts": {
29
- "build": "node scripts/build.js",
29
+ "generate:types": "node scripts/generate-types.js",
30
+ "build": "npm run generate:types && node scripts/build.js",
30
31
  "build:prod": "npm test && npm run build",
31
32
  "dev": "http-server website -p 8080 -c-1",
32
33
  "watch": "node scripts/build.js --watch",
@@ -315,8 +315,12 @@ class OverTypeEditor extends HTMLElement {
315
315
  break;
316
316
 
317
317
  case 'theme':
318
- // Theme changes require re-injecting styles
318
+ // Theme changes require re-injecting styles and updating the editor instance
319
319
  this._reinjectStyles();
320
+ // Update the OverType instance's theme so it sets data-theme attribute
321
+ if (this._editor && this._editor.setTheme) {
322
+ this._editor.setTheme(value || 'solar');
323
+ }
320
324
  break;
321
325
 
322
326
  case 'placeholder':
package/src/overtype.d.ts CHANGED
@@ -1,35 +1,41 @@
1
1
  // Type definitions for OverType
2
2
  // Project: https://github.com/panphora/overtype
3
- // Definitions generated from JSDoc comments and implementation
3
+ // Definitions generated from themes.js and styles.js
4
+ // DO NOT EDIT MANUALLY - Run 'npm run generate:types' to regenerate
4
5
 
5
6
  export interface Theme {
6
7
  name: string;
7
8
  colors: {
8
9
  bgPrimary?: string;
9
10
  bgSecondary?: string;
10
- text?: string;
11
- textSecondary?: string;
11
+ blockquote?: string;
12
+ border?: string;
13
+ code?: string;
14
+ codeBg?: string;
15
+ cursor?: string;
16
+ del?: string;
17
+ em?: string;
12
18
  h1?: string;
13
19
  h2?: string;
14
20
  h3?: string;
15
- strong?: string;
16
- em?: string;
17
- link?: string;
18
- code?: string;
19
- codeBg?: string;
20
- blockquote?: string;
21
+ hoverBg?: string;
21
22
  hr?: string;
22
- syntaxMarker?: string;
23
+ link?: string;
23
24
  listMarker?: string;
24
- cursor?: string;
25
- selection?: string;
25
+ primary?: string;
26
26
  rawLine?: string;
27
- // Toolbar theme colors
27
+ selection?: string;
28
+ strong?: string;
29
+ syntax?: string;
30
+ syntaxMarker?: string;
31
+ text?: string;
32
+ textPrimary?: string;
33
+ textSecondary?: string;
34
+ toolbarActive?: string;
28
35
  toolbarBg?: string;
29
- toolbarIcon?: string;
36
+ toolbarBorder?: string;
30
37
  toolbarHover?: string;
31
- toolbarActive?: string;
32
- border?: string;
38
+ toolbarIcon?: string;
33
39
  };
34
40
  }
35
41
 
@@ -166,12 +172,12 @@ export interface OverTypeInstance {
166
172
  setTheme(theme: string | Theme): this;
167
173
  setCodeHighlighter(highlighter: ((code: string, language: string) => string) | null): void;
168
174
  updatePreview(): void;
169
-
175
+
170
176
  // HTML output methods
171
177
  getRenderedHTML(options?: RenderOptions): string;
172
178
  getCleanHTML(): string;
173
179
  getPreviewHTML(): string;
174
-
180
+
175
181
  // View mode methods
176
182
  showNormalEditMode(): this;
177
183
  showPlainTextarea(): this;
@@ -209,4 +215,4 @@ export const toolbarButtons: {
209
215
  /**
210
216
  * Default toolbar button layout with separators
211
217
  */
212
- export const defaultToolbarButtons: ToolbarButton[];
218
+ export const defaultToolbarButtons: ToolbarButton[];
package/src/styles.js CHANGED
@@ -495,6 +495,7 @@ export function generateStyles(options = {}) {
495
495
  gap: 4px !important;
496
496
  padding: 8px !important; /* Override reset */
497
497
  background: var(--toolbar-bg, var(--bg-primary, #f8f9fa)) !important; /* Override reset */
498
+ border-bottom: 1px solid var(--toolbar-border, transparent) !important; /* Override reset */
498
499
  overflow-x: auto !important; /* Allow horizontal scrolling */
499
500
  overflow-y: hidden !important; /* Hide vertical overflow */
500
501
  -webkit-overflow-scrolling: touch !important;
package/src/themes.js CHANGED
@@ -12,23 +12,30 @@ export const solar = {
12
12
  bgPrimary: '#faf0ca', // Lemon Chiffon - main background
13
13
  bgSecondary: '#ffffff', // White - editor background
14
14
  text: '#0d3b66', // Yale Blue - main text
15
+ textPrimary: '#0d3b66', // Yale Blue - primary text (same as text)
16
+ textSecondary: '#5a7a9b', // Muted blue - secondary text
15
17
  h1: '#f95738', // Tomato - h1 headers
16
- h2: '#ee964b', // Sandy Brown - h2 headers
18
+ h2: '#ee964b', // Sandy Brown - h2 headers
17
19
  h3: '#3d8a51', // Forest green - h3 headers
18
20
  strong: '#ee964b', // Sandy Brown - bold text
19
21
  em: '#f95738', // Tomato - italic text
22
+ del: '#ee964b', // Sandy Brown - deleted text (same as strong)
20
23
  link: '#0d3b66', // Yale Blue - links
21
24
  code: '#0d3b66', // Yale Blue - inline code
22
25
  codeBg: 'rgba(244, 211, 94, 0.4)', // Naples Yellow with transparency
23
26
  blockquote: '#5a7a9b', // Muted blue - blockquotes
24
27
  hr: '#5a7a9b', // Muted blue - horizontal rules
25
28
  syntaxMarker: 'rgba(13, 59, 102, 0.52)', // Yale Blue with transparency
29
+ syntax: '#999999', // Gray - syntax highlighting fallback
26
30
  cursor: '#f95738', // Tomato - cursor
27
31
  selection: 'rgba(244, 211, 94, 0.4)', // Naples Yellow with transparency
28
32
  listMarker: '#ee964b', // Sandy Brown - list markers
33
+ rawLine: '#5a7a9b', // Muted blue - raw line indicators
34
+ border: '#e0e0e0', // Light gray - borders
35
+ hoverBg: '#f0f0f0', // Very light gray - hover backgrounds
36
+ primary: '#0d3b66', // Yale Blue - primary accent
29
37
  // Toolbar colors
30
38
  toolbarBg: '#ffffff', // White - toolbar background
31
- toolbarBorder: 'rgba(13, 59, 102, 0.15)', // Yale Blue border
32
39
  toolbarIcon: '#0d3b66', // Yale Blue - icon color
33
40
  toolbarHover: '#f5f5f5', // Light gray - hover background
34
41
  toolbarActive: '#faf0ca', // Lemon Chiffon - active button background
@@ -44,23 +51,30 @@ export const cave = {
44
51
  bgPrimary: '#141E26', // Deep ocean - main background
45
52
  bgSecondary: '#1D2D3E', // Darker charcoal - editor background
46
53
  text: '#c5dde8', // Light blue-gray - main text
54
+ textPrimary: '#c5dde8', // Light blue-gray - primary text (same as text)
55
+ textSecondary: '#9fcfec', // Brighter blue - secondary text
47
56
  h1: '#d4a5ff', // Rich lavender - h1 headers
48
57
  h2: '#f6ae2d', // Hunyadi Yellow - h2 headers
49
58
  h3: '#9fcfec', // Brighter blue - h3 headers
50
59
  strong: '#f6ae2d', // Hunyadi Yellow - bold text
51
60
  em: '#9fcfec', // Brighter blue - italic text
61
+ del: '#f6ae2d', // Hunyadi Yellow - deleted text (same as strong)
52
62
  link: '#9fcfec', // Brighter blue - links
53
63
  code: '#c5dde8', // Light blue-gray - inline code
54
64
  codeBg: '#1a232b', // Very dark blue - code background
55
65
  blockquote: '#9fcfec', // Brighter blue - same as italic
56
66
  hr: '#c5dde8', // Light blue-gray - horizontal rules
57
67
  syntaxMarker: 'rgba(159, 207, 236, 0.73)', // Brighter blue semi-transparent
68
+ syntax: '#7a8c98', // Muted gray-blue - syntax highlighting fallback
58
69
  cursor: '#f26419', // Orange Pantone - cursor
59
70
  selection: 'rgba(51, 101, 138, 0.4)', // Lapis Lazuli with transparency
60
71
  listMarker: '#f6ae2d', // Hunyadi Yellow - list markers
72
+ rawLine: '#9fcfec', // Brighter blue - raw line indicators
73
+ border: '#2a3f52', // Dark blue-gray - borders
74
+ hoverBg: '#243546', // Slightly lighter charcoal - hover backgrounds
75
+ primary: '#9fcfec', // Brighter blue - primary accent
61
76
  // Toolbar colors for dark theme
62
77
  toolbarBg: '#1D2D3E', // Darker charcoal - toolbar background
63
- toolbarBorder: 'rgba(197, 221, 232, 0.1)', // Light blue-gray border
64
78
  toolbarIcon: '#c5dde8', // Light blue-gray - icon color
65
79
  toolbarHover: '#243546', // Slightly lighter charcoal - hover background
66
80
  toolbarActive: '#2a3f52', // Even lighter - active button background