@pinkpixel/marzipan 1.0.5 → 1.0.7
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/dist/_basePickBy-BXyyc71p.js +152 -0
- package/dist/_basePickBy-BXyyc71p.js.map +1 -0
- package/dist/_baseUniq-Dde5pUWM.js +615 -0
- package/dist/_baseUniq-Dde5pUWM.js.map +1 -0
- package/dist/actions/core/detection.d.ts +11 -0
- package/dist/actions/core/detection.d.ts.map +1 -0
- package/dist/actions/core/detection.js +142 -0
- package/dist/actions/core/detection.js.map +1 -0
- package/dist/actions/core/formats.d.ts +5 -0
- package/dist/actions/core/formats.d.ts.map +1 -0
- package/dist/actions/core/formats.js +75 -0
- package/dist/actions/core/formats.js.map +1 -0
- package/dist/actions/core/insertion.d.ts +5 -0
- package/dist/actions/core/insertion.d.ts.map +1 -0
- package/dist/actions/core/insertion.js +116 -0
- package/dist/actions/core/insertion.js.map +1 -0
- package/dist/actions/core/selection.d.ts +13 -0
- package/dist/actions/core/selection.d.ts.map +1 -0
- package/dist/actions/core/selection.js +137 -0
- package/dist/actions/core/selection.js.map +1 -0
- package/dist/actions/debug.d.ts +10 -0
- package/dist/actions/debug.d.ts.map +1 -0
- package/dist/actions/debug.js +39 -0
- package/dist/actions/debug.js.map +1 -0
- package/dist/actions/index.d.ts +48 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +237 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/operations/block.d.ts +5 -0
- package/dist/actions/operations/block.d.ts.map +1 -0
- package/dist/actions/operations/block.js +120 -0
- package/dist/actions/operations/block.js.map +1 -0
- package/dist/actions/operations/list.d.ts +4 -0
- package/dist/actions/operations/list.d.ts.map +1 -0
- package/dist/actions/operations/list.js +151 -0
- package/dist/actions/operations/list.js.map +1 -0
- package/dist/actions/types.d.ts +43 -0
- package/dist/actions/types.d.ts.map +1 -0
- package/dist/actions/types.js +2 -0
- package/dist/actions/types.js.map +1 -0
- package/dist/arc-CfMWIGxd.js +84 -0
- package/dist/arc-CfMWIGxd.js.map +1 -0
- package/dist/architectureDiagram-VXUJARFQ-Bb4i7x-6.js +4663 -0
- package/dist/architectureDiagram-VXUJARFQ-Bb4i7x-6.js.map +1 -0
- package/dist/blockDiagram-VD42YOAC-ldSoJhgA.js +2262 -0
- package/dist/blockDiagram-VD42YOAC-ldSoJhgA.js.map +1 -0
- package/dist/c4Diagram-YG6GDRKO-D-ENeA7h.js +1581 -0
- package/dist/c4Diagram-YG6GDRKO-D-ENeA7h.js.map +1 -0
- package/dist/channel-BCTxewZI.js +6 -0
- package/dist/channel-BCTxewZI.js.map +1 -0
- package/dist/chunk-4BX2VUAB-Cfh_4i4X.js +9 -0
- package/dist/chunk-4BX2VUAB-Cfh_4i4X.js.map +1 -0
- package/dist/chunk-55IACEB6-DNOIVRvW.js +9 -0
- package/dist/chunk-55IACEB6-DNOIVRvW.js.map +1 -0
- package/dist/chunk-B4BG7PRW-C_qWbbk6.js +1376 -0
- package/dist/chunk-B4BG7PRW-C_qWbbk6.js.map +1 -0
- package/dist/chunk-DI55MBZ5-D_yXJA03.js +1371 -0
- package/dist/chunk-DI55MBZ5-D_yXJA03.js.map +1 -0
- package/dist/chunk-FMBD7UC4-B9NJjOBf.js +20 -0
- package/dist/chunk-FMBD7UC4-B9NJjOBf.js.map +1 -0
- package/dist/chunk-QN33PNHL-CVrLUVsI.js +20 -0
- package/dist/chunk-QN33PNHL-CVrLUVsI.js.map +1 -0
- package/dist/chunk-QZHKN3VN-FvAf_VJR.js +16 -0
- package/dist/chunk-QZHKN3VN-FvAf_VJR.js.map +1 -0
- package/dist/chunk-TZMSLE5B-DxYTPD3t.js +65 -0
- package/dist/chunk-TZMSLE5B-DxYTPD3t.js.map +1 -0
- package/dist/classDiagram-2ON5EDUG-Cg641kit.js +17 -0
- package/dist/classDiagram-2ON5EDUG-Cg641kit.js.map +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-Cg641kit.js +17 -0
- package/dist/classDiagram-v2-WZHVMYZB-Cg641kit.js.map +1 -0
- package/dist/clone-D062_nJ-.js +9 -0
- package/dist/clone-D062_nJ-.js.map +1 -0
- package/dist/cose-bilkent-S5V4N54A-DIb5rck_.js +2609 -0
- package/dist/cose-bilkent-S5V4N54A-DIb5rck_.js.map +1 -0
- package/dist/cytoscape.esm-DfdJODL8.js +18736 -0
- package/dist/cytoscape.esm-DfdJODL8.js.map +1 -0
- package/dist/dagre-6UL2VRFP-CZKadRq9.js +445 -0
- package/dist/dagre-6UL2VRFP-CZKadRq9.js.map +1 -0
- package/dist/defaultLocale-D7EN2tov.js +172 -0
- package/dist/defaultLocale-D7EN2tov.js.map +1 -0
- package/dist/diagram-PSM6KHXK-VDtnZynV.js +532 -0
- package/dist/diagram-PSM6KHXK-VDtnZynV.js.map +1 -0
- package/dist/diagram-QEK2KX5R-DxjNZqZ_.js +218 -0
- package/dist/diagram-QEK2KX5R-DxjNZqZ_.js.map +1 -0
- package/dist/diagram-S2PKOQOG-CCX3j4vi.js +143 -0
- package/dist/diagram-S2PKOQOG-CCX3j4vi.js.map +1 -0
- package/dist/erDiagram-Q2GNP2WA-nwmrf6lJ.js +842 -0
- package/dist/erDiagram-Q2GNP2WA-nwmrf6lJ.js.map +1 -0
- package/dist/flowDiagram-NV44I4VS-DQEdMlRX.js +1621 -0
- package/dist/flowDiagram-NV44I4VS-DQEdMlRX.js.map +1 -0
- package/dist/ganttDiagram-LVOFAZNH-WMiy-Gep.js +2506 -0
- package/dist/ganttDiagram-LVOFAZNH-WMiy-Gep.js.map +1 -0
- package/dist/gitGraphDiagram-NY62KEGX-BgmbSTgN.js +700 -0
- package/dist/gitGraphDiagram-NY62KEGX-BgmbSTgN.js.map +1 -0
- package/dist/graph-CSVEP8oS.js +248 -0
- package/dist/graph-CSVEP8oS.js.map +1 -0
- package/dist/icons.d.ts +17 -0
- package/dist/icons.d.ts.map +1 -0
- package/dist/icons.js +67 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +143 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/infoDiagram-F6ZHWCRC-BzTgHHGF.js +25 -0
- package/dist/infoDiagram-F6ZHWCRC-BzTgHHGF.js.map +1 -0
- package/dist/init-DjUOC4st.js +17 -0
- package/dist/init-DjUOC4st.js.map +1 -0
- package/dist/journeyDiagram-XKPGCS4Q-B5P7hkT-.js +835 -0
- package/dist/journeyDiagram-XKPGCS4Q-B5P7hkT-.js.map +1 -0
- package/dist/kanban-definition-3W4ZIXB7-CLtnd0xR.js +720 -0
- package/dist/kanban-definition-3W4ZIXB7-CLtnd0xR.js.map +1 -0
- package/dist/katex-CmGeg_OO.js +11693 -0
- package/dist/katex-CmGeg_OO.js.map +1 -0
- package/dist/layout-CdTiJocX.js +1325 -0
- package/dist/layout-CdTiJocX.js.map +1 -0
- package/dist/linear-BhblBDrV.js +260 -0
- package/dist/linear-BhblBDrV.js.map +1 -0
- package/dist/link-tooltip.d.ts +27 -0
- package/dist/link-tooltip.d.ts.map +1 -0
- package/dist/link-tooltip.js +224 -0
- package/dist/link-tooltip.js.map +1 -0
- package/dist/marzipan.d.ts +472 -0
- package/dist/marzipan.d.ts.map +1 -0
- package/dist/marzipan.js +1185 -0
- package/dist/marzipan.js.map +1 -0
- package/dist/mermaid.core-DENutRS8.js +15249 -0
- package/dist/mermaid.core-DENutRS8.js.map +1 -0
- package/dist/mindmap-definition-VGOIOE7T-BXBE9eta.js +785 -0
- package/dist/mindmap-definition-VGOIOE7T-BXBE9eta.js.map +1 -0
- package/dist/ordinal-DfAQgscy.js +62 -0
- package/dist/ordinal-DfAQgscy.js.map +1 -0
- package/dist/parser.d.ts +234 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +886 -0
- package/dist/parser.js.map +1 -0
- package/dist/pieDiagram-ADFJNKIX-BND3UUQ-.js +162 -0
- package/dist/pieDiagram-ADFJNKIX-BND3UUQ-.js.map +1 -0
- package/dist/plugins/accentSwatchPlugin.d.ts +15 -0
- package/dist/plugins/accentSwatchPlugin.d.ts.map +1 -0
- package/dist/plugins/accentSwatchPlugin.js +142 -0
- package/dist/plugins/accentSwatchPlugin.js.map +1 -0
- package/dist/plugins/imageManagerPlugin.d.ts +16 -0
- package/dist/plugins/imageManagerPlugin.d.ts.map +1 -0
- package/dist/plugins/imageManagerPlugin.js +161 -0
- package/dist/plugins/imageManagerPlugin.js.map +1 -0
- package/dist/plugins/imagePicker.d.ts +7 -0
- package/dist/plugins/imagePicker.d.ts.map +1 -0
- package/dist/plugins/imagePicker.js +33 -0
- package/dist/plugins/imagePicker.js.map +1 -0
- package/dist/plugins/imagePickerPlugin.d.ts +3 -0
- package/dist/plugins/imagePickerPlugin.d.ts.map +1 -0
- package/dist/plugins/imagePickerPlugin.js +12 -0
- package/dist/plugins/imagePickerPlugin.js.map +1 -0
- package/dist/plugins/mermaidExternal.d.ts +2 -0
- package/dist/plugins/mermaidExternal.d.ts.map +1 -0
- package/dist/plugins/mermaidExternal.js +44 -0
- package/dist/plugins/mermaidExternal.js.map +1 -0
- package/dist/plugins/mermaidPlugin.d.ts +2 -0
- package/dist/plugins/mermaidPlugin.d.ts.map +1 -0
- package/dist/plugins/mermaidPlugin.js +25 -0
- package/dist/plugins/mermaidPlugin.js.map +1 -0
- package/dist/plugins/tableGenerator.d.ts +2 -0
- package/dist/plugins/tableGenerator.d.ts.map +1 -0
- package/dist/plugins/tableGenerator.js +24 -0
- package/dist/plugins/tableGenerator.js.map +1 -0
- package/dist/plugins/tableGridPlugin.d.ts +14 -0
- package/dist/plugins/tableGridPlugin.d.ts.map +1 -0
- package/dist/plugins/tableGridPlugin.js +77 -0
- package/dist/plugins/tableGridPlugin.js.map +1 -0
- package/dist/plugins/tablePlugin.d.ts +2 -0
- package/dist/plugins/tablePlugin.d.ts.map +1 -0
- package/dist/plugins/tablePlugin.js +26 -0
- package/dist/plugins/tablePlugin.js.map +1 -0
- package/dist/plugins/tinyHighlight.d.ts +10 -0
- package/dist/plugins/tinyHighlight.d.ts.map +1 -0
- package/dist/plugins/tinyHighlight.js +109 -0
- package/dist/plugins/tinyHighlight.js.map +1 -0
- package/dist/plugins/utils/table.d.ts +3 -0
- package/dist/plugins/utils/table.d.ts.map +1 -0
- package/dist/plugins/utils/table.js +25 -0
- package/dist/plugins/utils/table.js.map +1 -0
- package/dist/quadrantDiagram-AYHSOK5B-CnLHbrEF.js +1023 -0
- package/dist/quadrantDiagram-AYHSOK5B-CnLHbrEF.js.map +1 -0
- package/dist/requirementDiagram-UZGBJVZJ-caC7K17a.js +851 -0
- package/dist/requirementDiagram-UZGBJVZJ-caC7K17a.js.map +1 -0
- package/dist/sankeyDiagram-TZEHDZUN-CV5-bwv8.js +811 -0
- package/dist/sankeyDiagram-TZEHDZUN-CV5-bwv8.js.map +1 -0
- package/dist/sequenceDiagram-WL72ISMW-Cq1otbHU.js +2512 -0
- package/dist/sequenceDiagram-WL72ISMW-Cq1otbHU.js.map +1 -0
- package/dist/shortcuts.d.ts +15 -0
- package/dist/shortcuts.d.ts.map +1 -0
- package/dist/shortcuts.js +78 -0
- package/dist/shortcuts.js.map +1 -0
- package/dist/stateDiagram-FKZM4ZOC-BJ5UwskL.js +264 -0
- package/dist/stateDiagram-FKZM4ZOC-BJ5UwskL.js.map +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-H1gqsSsO.js +17 -0
- package/dist/stateDiagram-v2-4FDKWEC3-H1gqsSsO.js.map +1 -0
- package/dist/styles.d.ts +11 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +854 -0
- package/dist/styles.js.map +1 -0
- package/dist/table-DMIy93NJ.js +25 -0
- package/dist/table-DMIy93NJ.js.map +1 -0
- package/dist/themes.d.ts +197 -0
- package/dist/themes.d.ts.map +1 -0
- package/dist/themes.js +120 -0
- package/dist/themes.js.map +1 -0
- package/dist/timeline-definition-IT6M3QCI-CqPEUsh4.js +796 -0
- package/dist/timeline-definition-IT6M3QCI-CqPEUsh4.js.map +1 -0
- package/dist/toolbar.d.ts +37 -0
- package/dist/toolbar.d.ts.map +1 -0
- package/dist/toolbar.js +283 -0
- package/dist/toolbar.js.map +1 -0
- package/dist/treemap-75Q7IDZK-DmPg5GN7.js +12988 -0
- package/dist/treemap-75Q7IDZK-DmPg5GN7.js.map +1 -0
- package/dist/xychartDiagram-PRI3JC2R-C3_IO4Rm.js +1341 -0
- package/dist/xychartDiagram-PRI3JC2R-C3_IO4Rm.js.map +1 -0
- package/docs/types.d.ts +1 -1
- package/package.json +15 -11
package/dist/styles.js
ADDED
|
@@ -0,0 +1,854 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* CSS styles for Marzipan editor
|
|
4
|
+
* Embedded in JavaScript to ensure single-file distribution
|
|
5
|
+
*/
|
|
6
|
+
import { themeToCSSVars } from './themes';
|
|
7
|
+
/**
|
|
8
|
+
* Generate the complete CSS for the editor
|
|
9
|
+
* @param {Object} options - Configuration options
|
|
10
|
+
* @returns {string} Complete CSS string
|
|
11
|
+
*/
|
|
12
|
+
export function generateStyles(options = {}) {
|
|
13
|
+
const { fontSize = '14px', lineHeight = 1.6,
|
|
14
|
+
/* System-first, guaranteed monospaced; avoids Android 'ui-monospace' pitfalls */
|
|
15
|
+
fontFamily = '"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 = '20px', theme = null, mobile = {} } = options;
|
|
16
|
+
// Generate mobile overrides
|
|
17
|
+
const mobileStyles = Object.keys(mobile).length > 0 ? `
|
|
18
|
+
@media (max-width: 640px) {
|
|
19
|
+
.marzipan-wrapper .marzipan-input,
|
|
20
|
+
.marzipan-wrapper .marzipan-preview {
|
|
21
|
+
${Object.entries(mobile)
|
|
22
|
+
.map(([prop, val]) => {
|
|
23
|
+
const cssProp = prop.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
24
|
+
return `${cssProp}: ${val} !important;`;
|
|
25
|
+
})
|
|
26
|
+
.join('\n ')}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
` : '';
|
|
30
|
+
// Generate theme variables if provided
|
|
31
|
+
const themeVars = theme && theme.colors ? themeToCSSVars(theme.colors) : '';
|
|
32
|
+
return `
|
|
33
|
+
/* Marzipan Editor Styles */
|
|
34
|
+
|
|
35
|
+
/* Middle-ground CSS Reset - Prevent parent styles from leaking in */
|
|
36
|
+
.marzipan-container * {
|
|
37
|
+
/* Box model - these commonly leak */
|
|
38
|
+
margin: 0 !important;
|
|
39
|
+
padding: 0 !important;
|
|
40
|
+
border: 0 !important;
|
|
41
|
+
|
|
42
|
+
/* Layout - these can break our layout */
|
|
43
|
+
/* Don't reset position - it breaks dropdowns */
|
|
44
|
+
float: none !important;
|
|
45
|
+
clear: none !important;
|
|
46
|
+
|
|
47
|
+
/* Typography - only reset decorative aspects */
|
|
48
|
+
text-decoration: none !important;
|
|
49
|
+
text-transform: none !important;
|
|
50
|
+
letter-spacing: normal !important;
|
|
51
|
+
|
|
52
|
+
/* Visual effects that can interfere */
|
|
53
|
+
box-shadow: none !important;
|
|
54
|
+
text-shadow: none !important;
|
|
55
|
+
|
|
56
|
+
/* Ensure box-sizing is consistent */
|
|
57
|
+
box-sizing: border-box !important;
|
|
58
|
+
|
|
59
|
+
/* Keep inheritance for these */
|
|
60
|
+
/* font-family, color, line-height, font-size - inherit */
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Container base styles after reset */
|
|
64
|
+
.marzipan-container {
|
|
65
|
+
display: grid !important;
|
|
66
|
+
grid-template-rows: auto 1fr auto !important;
|
|
67
|
+
width: 100% !important;
|
|
68
|
+
height: 100% !important;
|
|
69
|
+
position: relative !important; /* Override reset - needed for absolute children */
|
|
70
|
+
overflow: visible !important; /* Allow dropdown to overflow container */
|
|
71
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
|
|
72
|
+
text-align: left !important;
|
|
73
|
+
${themeVars ? `
|
|
74
|
+
/* Theme Variables */
|
|
75
|
+
${themeVars}` : ''}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Force left alignment for all elements in the editor */
|
|
79
|
+
.marzipan-container .marzipan-wrapper * {
|
|
80
|
+
text-align: left !important;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Auto-resize mode styles */
|
|
84
|
+
.marzipan-container.marzipan-auto-resize {
|
|
85
|
+
height: auto !important;
|
|
86
|
+
grid-template-rows: auto auto auto !important;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.marzipan-container.marzipan-auto-resize .marzipan-wrapper {
|
|
90
|
+
height: auto !important;
|
|
91
|
+
min-height: 60px !important;
|
|
92
|
+
overflow: visible !important;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.marzipan-wrapper {
|
|
96
|
+
position: relative !important; /* Override reset - needed for absolute children */
|
|
97
|
+
width: 100% !important;
|
|
98
|
+
height: 100% !important; /* Take full height of grid cell */
|
|
99
|
+
min-height: 60px !important; /* Minimum usable height */
|
|
100
|
+
overflow: hidden !important;
|
|
101
|
+
background: var(--bg-secondary, #ffffff) !important;
|
|
102
|
+
grid-row: 2 !important; /* Always second row in grid */
|
|
103
|
+
z-index: 1; /* Below toolbar and dropdown */
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Critical alignment styles - must be identical for both layers */
|
|
107
|
+
.marzipan-wrapper .marzipan-input,
|
|
108
|
+
.marzipan-wrapper .marzipan-preview {
|
|
109
|
+
/* Positioning - must be identical */
|
|
110
|
+
position: absolute !important; /* Override reset - required for overlay */
|
|
111
|
+
top: 0 !important;
|
|
112
|
+
left: 0 !important;
|
|
113
|
+
width: 100% !important;
|
|
114
|
+
height: 100% !important;
|
|
115
|
+
|
|
116
|
+
/* Font properties - any difference breaks alignment */
|
|
117
|
+
font-family: ${fontFamily} !important;
|
|
118
|
+
font-variant-ligatures: none !important; /* keep metrics stable for code */
|
|
119
|
+
font-size: var(--instance-font-size, ${fontSize}) !important;
|
|
120
|
+
line-height: var(--instance-line-height, ${lineHeight}) !important;
|
|
121
|
+
font-weight: normal !important;
|
|
122
|
+
font-style: normal !important;
|
|
123
|
+
font-variant: normal !important;
|
|
124
|
+
font-stretch: normal !important;
|
|
125
|
+
font-kerning: none !important;
|
|
126
|
+
font-feature-settings: normal !important;
|
|
127
|
+
|
|
128
|
+
/* Box model - must match exactly */
|
|
129
|
+
padding: var(--instance-padding, ${padding}) !important;
|
|
130
|
+
margin: 0 !important;
|
|
131
|
+
border: none !important;
|
|
132
|
+
outline: none !important;
|
|
133
|
+
box-sizing: border-box !important;
|
|
134
|
+
|
|
135
|
+
/* Text layout - critical for character positioning */
|
|
136
|
+
white-space: pre-wrap !important;
|
|
137
|
+
word-wrap: break-word !important;
|
|
138
|
+
word-break: normal !important;
|
|
139
|
+
overflow-wrap: break-word !important;
|
|
140
|
+
tab-size: 2 !important;
|
|
141
|
+
-moz-tab-size: 2 !important;
|
|
142
|
+
text-align: left !important;
|
|
143
|
+
text-indent: 0 !important;
|
|
144
|
+
letter-spacing: normal !important;
|
|
145
|
+
word-spacing: normal !important;
|
|
146
|
+
|
|
147
|
+
/* Text rendering */
|
|
148
|
+
text-transform: none !important;
|
|
149
|
+
text-rendering: auto !important;
|
|
150
|
+
-webkit-font-smoothing: auto !important;
|
|
151
|
+
-webkit-text-size-adjust: 100% !important;
|
|
152
|
+
|
|
153
|
+
/* Direction and writing */
|
|
154
|
+
direction: ltr !important;
|
|
155
|
+
writing-mode: horizontal-tb !important;
|
|
156
|
+
unicode-bidi: normal !important;
|
|
157
|
+
text-orientation: mixed !important;
|
|
158
|
+
|
|
159
|
+
/* Visual effects that could shift perception */
|
|
160
|
+
text-shadow: none !important;
|
|
161
|
+
filter: none !important;
|
|
162
|
+
transform: none !important;
|
|
163
|
+
zoom: 1 !important;
|
|
164
|
+
|
|
165
|
+
/* Vertical alignment */
|
|
166
|
+
vertical-align: baseline !important;
|
|
167
|
+
|
|
168
|
+
/* Size constraints */
|
|
169
|
+
min-width: 0 !important;
|
|
170
|
+
min-height: 0 !important;
|
|
171
|
+
max-width: none !important;
|
|
172
|
+
max-height: none !important;
|
|
173
|
+
|
|
174
|
+
/* Overflow */
|
|
175
|
+
overflow-y: auto !important;
|
|
176
|
+
overflow-x: auto !important;
|
|
177
|
+
/* overscroll-behavior removed to allow scroll-through to parent */
|
|
178
|
+
scrollbar-width: auto !important;
|
|
179
|
+
scrollbar-gutter: auto !important;
|
|
180
|
+
|
|
181
|
+
/* Animation/transition - disabled to prevent movement */
|
|
182
|
+
animation: none !important;
|
|
183
|
+
transition: none !important;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* Input layer styles */
|
|
187
|
+
.marzipan-wrapper .marzipan-input {
|
|
188
|
+
/* Layer positioning */
|
|
189
|
+
z-index: 1 !important;
|
|
190
|
+
|
|
191
|
+
/* Text visibility */
|
|
192
|
+
color: transparent !important;
|
|
193
|
+
caret-color: var(--cursor, #f95738) !important;
|
|
194
|
+
background-color: transparent !important;
|
|
195
|
+
|
|
196
|
+
/* Textarea-specific */
|
|
197
|
+
resize: none !important;
|
|
198
|
+
appearance: none !important;
|
|
199
|
+
-webkit-appearance: none !important;
|
|
200
|
+
-moz-appearance: none !important;
|
|
201
|
+
|
|
202
|
+
/* Prevent mobile zoom on focus */
|
|
203
|
+
touch-action: manipulation !important;
|
|
204
|
+
|
|
205
|
+
/* Disable autofill and spellcheck */
|
|
206
|
+
autocomplete: off !important;
|
|
207
|
+
autocorrect: off !important;
|
|
208
|
+
autocapitalize: off !important;
|
|
209
|
+
spellcheck: false !important;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.marzipan-wrapper .marzipan-input::selection {
|
|
213
|
+
background-color: var(--selection, rgba(244, 211, 94, 0.4));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Preview layer styles */
|
|
217
|
+
.marzipan-wrapper .marzipan-preview {
|
|
218
|
+
/* Layer positioning */
|
|
219
|
+
z-index: 0 !important;
|
|
220
|
+
pointer-events: none !important;
|
|
221
|
+
color: var(--text, #0d3b66) !important;
|
|
222
|
+
background-color: transparent !important;
|
|
223
|
+
|
|
224
|
+
/* Prevent text selection */
|
|
225
|
+
user-select: none !important;
|
|
226
|
+
-webkit-user-select: none !important;
|
|
227
|
+
-moz-user-select: none !important;
|
|
228
|
+
-ms-user-select: none !important;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* Defensive styles for preview child divs */
|
|
232
|
+
.marzipan-wrapper .marzipan-preview div {
|
|
233
|
+
/* Reset any inherited styles */
|
|
234
|
+
margin: 0 !important;
|
|
235
|
+
padding: 0 !important;
|
|
236
|
+
border: none !important;
|
|
237
|
+
text-align: left !important;
|
|
238
|
+
text-indent: 0 !important;
|
|
239
|
+
display: block !important;
|
|
240
|
+
position: static !important;
|
|
241
|
+
transform: none !important;
|
|
242
|
+
min-height: 0 !important;
|
|
243
|
+
max-height: none !important;
|
|
244
|
+
line-height: inherit !important;
|
|
245
|
+
font-size: inherit !important;
|
|
246
|
+
font-family: inherit !important;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* Markdown element styling - NO SIZE CHANGES */
|
|
250
|
+
.marzipan-wrapper .marzipan-preview .header {
|
|
251
|
+
font-weight: bold !important;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/* Header colors */
|
|
255
|
+
.marzipan-wrapper .marzipan-preview .h1 {
|
|
256
|
+
color: var(--h1, #f95738) !important;
|
|
257
|
+
}
|
|
258
|
+
.marzipan-wrapper .marzipan-preview .h2 {
|
|
259
|
+
color: var(--h2, #ee964b) !important;
|
|
260
|
+
}
|
|
261
|
+
.marzipan-wrapper .marzipan-preview .h3 {
|
|
262
|
+
color: var(--h3, #3d8a51) !important;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* Semantic headers - flatten in edit mode */
|
|
266
|
+
.marzipan-wrapper .marzipan-preview h1,
|
|
267
|
+
.marzipan-wrapper .marzipan-preview h2,
|
|
268
|
+
.marzipan-wrapper .marzipan-preview h3 {
|
|
269
|
+
font-size: inherit !important;
|
|
270
|
+
font-weight: bold !important;
|
|
271
|
+
margin: 0 !important;
|
|
272
|
+
padding: 0 !important;
|
|
273
|
+
display: inline !important;
|
|
274
|
+
line-height: inherit !important;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/* Header colors for semantic headers */
|
|
278
|
+
.marzipan-wrapper .marzipan-preview h1 {
|
|
279
|
+
color: var(--h1, #f95738) !important;
|
|
280
|
+
}
|
|
281
|
+
.marzipan-wrapper .marzipan-preview h2 {
|
|
282
|
+
color: var(--h2, #ee964b) !important;
|
|
283
|
+
}
|
|
284
|
+
.marzipan-wrapper .marzipan-preview h3 {
|
|
285
|
+
color: var(--h3, #3d8a51) !important;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* Lists - remove styling in edit mode */
|
|
289
|
+
.marzipan-wrapper .marzipan-preview ul,
|
|
290
|
+
.marzipan-wrapper .marzipan-preview ol {
|
|
291
|
+
list-style: none !important;
|
|
292
|
+
margin: 0 !important;
|
|
293
|
+
padding: 0 !important;
|
|
294
|
+
display: block !important; /* Lists need to be block for line breaks */
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.marzipan-wrapper .marzipan-preview li {
|
|
298
|
+
display: block !important; /* Each item on its own line */
|
|
299
|
+
margin: 0 !important;
|
|
300
|
+
padding: 0 !important;
|
|
301
|
+
/* Don't set list-style here - let ul/ol control it */
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* Bold text */
|
|
305
|
+
.marzipan-wrapper .marzipan-preview strong {
|
|
306
|
+
color: var(--strong, #ee964b) !important;
|
|
307
|
+
font-weight: bold !important;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/* Italic text */
|
|
311
|
+
.marzipan-wrapper .marzipan-preview em {
|
|
312
|
+
color: var(--em, #f95738) !important;
|
|
313
|
+
text-decoration-color: var(--em, #f95738) !important;
|
|
314
|
+
text-decoration-thickness: 1px !important;
|
|
315
|
+
font-style: italic !important;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* Strikethrough text */
|
|
319
|
+
.marzipan-wrapper .marzipan-preview del {
|
|
320
|
+
color: var(--del, #ee964b) !important;
|
|
321
|
+
text-decoration: line-through !important;
|
|
322
|
+
text-decoration-color: var(--del, #ee964b) !important;
|
|
323
|
+
text-decoration-thickness: 1px !important;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/* Inline code */
|
|
327
|
+
.marzipan-wrapper .marzipan-preview code {
|
|
328
|
+
background: var(--code-bg, rgba(244, 211, 94, 0.4)) !important;
|
|
329
|
+
color: var(--code, #0d3b66) !important;
|
|
330
|
+
padding: 0 !important;
|
|
331
|
+
border-radius: 2px !important;
|
|
332
|
+
font-family: inherit !important;
|
|
333
|
+
font-size: inherit !important;
|
|
334
|
+
line-height: inherit !important;
|
|
335
|
+
font-weight: normal !important;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* Code blocks - consolidated pre blocks */
|
|
339
|
+
.marzipan-wrapper .marzipan-preview pre {
|
|
340
|
+
padding: 0 !important;
|
|
341
|
+
margin: 0 !important;
|
|
342
|
+
border-radius: 4px !important;
|
|
343
|
+
overflow-x: auto !important;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/* Code block styling in normal mode - yellow background */
|
|
347
|
+
.marzipan-wrapper .marzipan-preview pre.code-block {
|
|
348
|
+
background: var(--code-bg, rgba(244, 211, 94, 0.4)) !important;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/* Code inside pre blocks - remove background */
|
|
352
|
+
.marzipan-wrapper .marzipan-preview pre code {
|
|
353
|
+
background: transparent !important;
|
|
354
|
+
color: var(--code, #0d3b66) !important;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/* Blockquotes */
|
|
358
|
+
.marzipan-wrapper .marzipan-preview .blockquote {
|
|
359
|
+
color: var(--blockquote, #5a7a9b) !important;
|
|
360
|
+
padding: 0 !important;
|
|
361
|
+
margin: 0 !important;
|
|
362
|
+
border: none !important;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/* Links */
|
|
366
|
+
.marzipan-wrapper .marzipan-preview a {
|
|
367
|
+
color: var(--link, #0d3b66) !important;
|
|
368
|
+
text-decoration: underline !important;
|
|
369
|
+
font-weight: normal !important;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.marzipan-wrapper .marzipan-preview a:hover {
|
|
373
|
+
text-decoration: underline !important;
|
|
374
|
+
color: var(--link, #0d3b66) !important;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/* Lists - no list styling */
|
|
378
|
+
.marzipan-wrapper .marzipan-preview ul,
|
|
379
|
+
.marzipan-wrapper .marzipan-preview ol {
|
|
380
|
+
list-style: none !important;
|
|
381
|
+
margin: 0 !important;
|
|
382
|
+
padding: 0 !important;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
/* Horizontal rules */
|
|
387
|
+
.marzipan-wrapper .marzipan-preview hr {
|
|
388
|
+
border: none !important;
|
|
389
|
+
color: var(--hr, #5a7a9b) !important;
|
|
390
|
+
margin: 0 !important;
|
|
391
|
+
padding: 0 !important;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.marzipan-wrapper .marzipan-preview .hr-marker {
|
|
395
|
+
color: var(--hr, #5a7a9b) !important;
|
|
396
|
+
opacity: 0.6 !important;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/* Code fence markers - with background when not in code block */
|
|
400
|
+
.marzipan-wrapper .marzipan-preview .code-fence {
|
|
401
|
+
color: var(--code, #0d3b66) !important;
|
|
402
|
+
background: var(--code-bg, rgba(244, 211, 94, 0.4)) !important;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/* Code block lines - background for entire code block */
|
|
406
|
+
.marzipan-wrapper .marzipan-preview .code-block-line {
|
|
407
|
+
background: var(--code-bg, rgba(244, 211, 94, 0.4)) !important;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/* Remove background from code fence when inside code block line */
|
|
411
|
+
.marzipan-wrapper .marzipan-preview .code-block-line .code-fence {
|
|
412
|
+
background: transparent !important;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/* Raw markdown line */
|
|
416
|
+
.marzipan-wrapper .marzipan-preview .raw-line {
|
|
417
|
+
color: var(--raw-line, #5a7a9b) !important;
|
|
418
|
+
font-style: normal !important;
|
|
419
|
+
font-weight: normal !important;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/* Syntax markers */
|
|
423
|
+
.marzipan-wrapper .marzipan-preview .syntax-marker {
|
|
424
|
+
color: var(--syntax-marker, rgba(13, 59, 102, 0.52)) !important;
|
|
425
|
+
opacity: 0.7 !important;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/* List markers */
|
|
429
|
+
.marzipan-wrapper .marzipan-preview .list-marker {
|
|
430
|
+
color: var(--list-marker, #ee964b) !important;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/* Stats bar */
|
|
434
|
+
|
|
435
|
+
/* Stats bar - positioned by grid, not absolute */
|
|
436
|
+
.marzipan-stats {
|
|
437
|
+
height: 40px !important;
|
|
438
|
+
padding: 0 20px !important;
|
|
439
|
+
background: #f8f9fa !important;
|
|
440
|
+
border-top: 1px solid #e0e0e0 !important;
|
|
441
|
+
display: flex !important;
|
|
442
|
+
justify-content: space-between !important;
|
|
443
|
+
align-items: center !important;
|
|
444
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
|
|
445
|
+
font-size: 0.85rem !important;
|
|
446
|
+
color: #666 !important;
|
|
447
|
+
grid-row: 3 !important; /* Always third row in grid */
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/* Dark theme stats bar */
|
|
451
|
+
.marzipan-container[data-theme="cave"] .marzipan-stats {
|
|
452
|
+
background: var(--bg-secondary, #1D2D3E) !important;
|
|
453
|
+
border-top: 1px solid rgba(197, 221, 232, 0.1) !important;
|
|
454
|
+
color: var(--text, #c5dde8) !important;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.marzipan-stats .marzipan-stat {
|
|
458
|
+
display: flex !important;
|
|
459
|
+
align-items: center !important;
|
|
460
|
+
gap: 5px !important;
|
|
461
|
+
white-space: nowrap !important;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.marzipan-stats .live-dot {
|
|
465
|
+
width: 8px !important;
|
|
466
|
+
height: 8px !important;
|
|
467
|
+
background: #4caf50 !important;
|
|
468
|
+
border-radius: 50% !important;
|
|
469
|
+
animation: marzipan-pulse 2s infinite !important;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
@keyframes marzipan-pulse {
|
|
473
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
474
|
+
50% { opacity: 0.6; transform: scale(1.2); }
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
/* Toolbar Styles */
|
|
479
|
+
.marzipan-toolbar {
|
|
480
|
+
display: flex !important;
|
|
481
|
+
align-items: center !important;
|
|
482
|
+
gap: 4px !important;
|
|
483
|
+
padding: 8px !important; /* Override reset */
|
|
484
|
+
background: var(--toolbar-bg, var(--bg-primary, #f8f9fa)) !important; /* Override reset */
|
|
485
|
+
border-bottom: 1px solid var(--toolbar-border, rgba(0, 0, 0, 0.08)) !important;
|
|
486
|
+
overflow-x: auto !important; /* Allow horizontal scrolling */
|
|
487
|
+
overflow-y: hidden !important; /* Hide vertical overflow */
|
|
488
|
+
-webkit-overflow-scrolling: touch !important;
|
|
489
|
+
flex-shrink: 0 !important;
|
|
490
|
+
height: auto !important;
|
|
491
|
+
grid-row: 1 !important; /* Always first row in grid */
|
|
492
|
+
position: relative !important; /* Override reset */
|
|
493
|
+
z-index: 100 !important; /* Ensure toolbar is above wrapper */
|
|
494
|
+
scrollbar-width: thin; /* Thin scrollbar on Firefox */
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/* Thin scrollbar styling */
|
|
498
|
+
.marzipan-toolbar::-webkit-scrollbar {
|
|
499
|
+
height: 4px;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.marzipan-toolbar::-webkit-scrollbar-track {
|
|
503
|
+
background: transparent;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.marzipan-toolbar::-webkit-scrollbar-thumb {
|
|
507
|
+
background: rgba(0, 0, 0, 0.2);
|
|
508
|
+
border-radius: 2px;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.marzipan-toolbar-button {
|
|
512
|
+
display: flex;
|
|
513
|
+
align-items: center;
|
|
514
|
+
justify-content: center;
|
|
515
|
+
width: 32px;
|
|
516
|
+
height: 32px;
|
|
517
|
+
padding: 0;
|
|
518
|
+
border: none;
|
|
519
|
+
border-radius: 6px;
|
|
520
|
+
background: transparent;
|
|
521
|
+
color: var(--toolbar-icon, var(--text-secondary, #666));
|
|
522
|
+
cursor: pointer;
|
|
523
|
+
transition: all 0.2s ease;
|
|
524
|
+
flex-shrink: 0;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.marzipan-toolbar-button svg {
|
|
528
|
+
width: 20px;
|
|
529
|
+
height: 20px;
|
|
530
|
+
fill: currentColor;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.marzipan-toolbar-button:hover {
|
|
534
|
+
background: var(--toolbar-hover, var(--bg-secondary, #e9ecef));
|
|
535
|
+
color: var(--toolbar-icon, var(--text-primary, #333));
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.marzipan-toolbar-button:active {
|
|
539
|
+
transform: scale(0.95);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.marzipan-toolbar-button.active {
|
|
543
|
+
background: var(--toolbar-active, var(--primary, #007bff));
|
|
544
|
+
color: var(--toolbar-icon, var(--text-primary, #333));
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.marzipan-toolbar-button:disabled {
|
|
548
|
+
opacity: 0.5;
|
|
549
|
+
cursor: not-allowed;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.marzipan-toolbar-separator {
|
|
553
|
+
width: 1px;
|
|
554
|
+
height: 24px;
|
|
555
|
+
background: var(--border, #e0e0e0);
|
|
556
|
+
margin: 0 4px;
|
|
557
|
+
flex-shrink: 0;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/* Adjust wrapper when toolbar is present */
|
|
561
|
+
.marzipan-container .marzipan-toolbar + .marzipan-wrapper {
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/* Mobile toolbar adjustments */
|
|
565
|
+
@media (max-width: 640px) {
|
|
566
|
+
.marzipan-toolbar {
|
|
567
|
+
padding: 6px;
|
|
568
|
+
gap: 2px;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.marzipan-toolbar-button {
|
|
572
|
+
width: 36px;
|
|
573
|
+
height: 36px;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.marzipan-toolbar-separator {
|
|
577
|
+
margin: 0 2px;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/* Plain mode - hide preview and show textarea text */
|
|
582
|
+
.marzipan-container.plain-mode .marzipan-preview {
|
|
583
|
+
display: none !important;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.marzipan-container.plain-mode .marzipan-input {
|
|
587
|
+
color: var(--text, #0d3b66) !important;
|
|
588
|
+
/* Use system font stack for better plain text readability */
|
|
589
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
590
|
+
"Helvetica Neue", Arial, sans-serif !important;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/* Ensure textarea remains transparent in overlay mode */
|
|
594
|
+
.marzipan-container:not(.plain-mode) .marzipan-input {
|
|
595
|
+
color: transparent !important;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/* Dropdown menu styles */
|
|
599
|
+
.marzipan-toolbar-button {
|
|
600
|
+
position: relative !important; /* Override reset - needed for dropdown */
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.marzipan-toolbar-button.dropdown-active {
|
|
604
|
+
background: var(--toolbar-active, var(--hover-bg, #f0f0f0));
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.marzipan-dropdown-menu {
|
|
608
|
+
position: fixed !important; /* Fixed positioning relative to viewport */
|
|
609
|
+
background: var(--bg-secondary, white) !important; /* Override reset */
|
|
610
|
+
border: 1px solid var(--border, #e0e0e0) !important; /* Override reset */
|
|
611
|
+
border-radius: 6px;
|
|
612
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important; /* Override reset */
|
|
613
|
+
z-index: 10000; /* Very high z-index to ensure visibility */
|
|
614
|
+
min-width: 150px;
|
|
615
|
+
padding: 4px 0 !important; /* Override reset */
|
|
616
|
+
/* Position will be set via JavaScript based on button position */
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
.marzipan-dropdown-item {
|
|
620
|
+
display: flex;
|
|
621
|
+
align-items: center;
|
|
622
|
+
width: 100%;
|
|
623
|
+
padding: 8px 12px;
|
|
624
|
+
border: none;
|
|
625
|
+
background: none;
|
|
626
|
+
text-align: left;
|
|
627
|
+
cursor: pointer;
|
|
628
|
+
font-size: 14px;
|
|
629
|
+
color: var(--text, #333);
|
|
630
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.marzipan-dropdown-item:hover {
|
|
634
|
+
background: var(--hover-bg, #f0f0f0);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
.marzipan-dropdown-item.active {
|
|
638
|
+
font-weight: 600;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.marzipan-dropdown-check {
|
|
642
|
+
width: 16px;
|
|
643
|
+
margin-right: 8px;
|
|
644
|
+
color: var(--h1, #007bff);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/* Preview mode styles */
|
|
648
|
+
.marzipan-container.preview-mode .marzipan-input {
|
|
649
|
+
display: none !important;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.marzipan-container.preview-mode .marzipan-preview {
|
|
653
|
+
pointer-events: auto !important;
|
|
654
|
+
user-select: text !important;
|
|
655
|
+
cursor: text !important;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
/* Hide syntax markers in preview mode */
|
|
659
|
+
.marzipan-container.preview-mode .syntax-marker {
|
|
660
|
+
display: none !important;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
/* Hide URL part of links in preview mode - extra specificity */
|
|
664
|
+
.marzipan-container.preview-mode .syntax-marker.url-part,
|
|
665
|
+
.marzipan-container.preview-mode .url-part {
|
|
666
|
+
display: none !important;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/* Hide all syntax markers inside links too */
|
|
670
|
+
.marzipan-container.preview-mode a .syntax-marker {
|
|
671
|
+
display: none !important;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/* Headers - restore proper sizing in preview mode */
|
|
675
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview h1,
|
|
676
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview h2,
|
|
677
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview h3 {
|
|
678
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
|
|
679
|
+
font-weight: 600 !important;
|
|
680
|
+
margin: 0 !important;
|
|
681
|
+
display: block !important;
|
|
682
|
+
color: inherit !important; /* Use parent text color */
|
|
683
|
+
line-height: 1 !important; /* Tight line height for headings */
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview h1 {
|
|
687
|
+
font-size: 2em !important;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview h2 {
|
|
691
|
+
font-size: 1.5em !important;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview h3 {
|
|
695
|
+
font-size: 1.17em !important;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
/* Lists - restore list styling in preview mode */
|
|
699
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview ul {
|
|
700
|
+
display: block !important;
|
|
701
|
+
list-style: disc !important;
|
|
702
|
+
padding-left: 2em !important;
|
|
703
|
+
margin: 1em 0 !important;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview ol {
|
|
707
|
+
display: block !important;
|
|
708
|
+
list-style: decimal !important;
|
|
709
|
+
padding-left: 2em !important;
|
|
710
|
+
margin: 1em 0 !important;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview li {
|
|
714
|
+
display: list-item !important;
|
|
715
|
+
margin: 0 !important;
|
|
716
|
+
padding: 0 !important;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
/* Links - make clickable in preview mode */
|
|
720
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview a {
|
|
721
|
+
pointer-events: auto !important;
|
|
722
|
+
cursor: pointer !important;
|
|
723
|
+
color: var(--link, #0066cc) !important;
|
|
724
|
+
text-decoration: underline !important;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/* Code blocks - proper pre/code styling in preview mode */
|
|
728
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview pre.code-block {
|
|
729
|
+
background: #2d2d2d !important;
|
|
730
|
+
color: #f8f8f2 !important;
|
|
731
|
+
padding: 1.2em !important;
|
|
732
|
+
border-radius: 3px !important;
|
|
733
|
+
overflow-x: auto !important;
|
|
734
|
+
margin: 0 !important;
|
|
735
|
+
display: block !important;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/* Cave theme code block background in preview mode */
|
|
739
|
+
.marzipan-container[data-theme="cave"].preview-mode .marzipan-wrapper .marzipan-preview pre.code-block {
|
|
740
|
+
background: #11171F !important;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview pre.code-block code {
|
|
744
|
+
background: transparent !important;
|
|
745
|
+
color: inherit !important;
|
|
746
|
+
padding: 0 !important;
|
|
747
|
+
font-family: ${fontFamily} !important;
|
|
748
|
+
font-size: 0.9em !important;
|
|
749
|
+
line-height: 1.4 !important;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
/* Hide old code block lines and fences in preview mode */
|
|
753
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview .code-block-line {
|
|
754
|
+
display: none !important;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview .code-fence {
|
|
758
|
+
display: none !important;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/* Blockquotes - enhanced styling in preview mode */
|
|
762
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview .blockquote {
|
|
763
|
+
display: block !important;
|
|
764
|
+
border-left: 4px solid var(--blockquote, #ddd) !important;
|
|
765
|
+
padding-left: 1em !important;
|
|
766
|
+
margin: 1em 0 !important;
|
|
767
|
+
font-style: italic !important;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/* Typography improvements in preview mode */
|
|
771
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview {
|
|
772
|
+
font-family: Georgia, 'Times New Roman', serif !important;
|
|
773
|
+
font-size: 16px !important;
|
|
774
|
+
line-height: 1.8 !important;
|
|
775
|
+
color: var(--text, #333) !important; /* Consistent text color */
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/* Inline code in preview mode - keep monospace */
|
|
779
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview code {
|
|
780
|
+
font-family: ${fontFamily} !important;
|
|
781
|
+
font-size: 0.9em !important;
|
|
782
|
+
background: rgba(135, 131, 120, 0.15) !important;
|
|
783
|
+
padding: 0.2em 0.4em !important;
|
|
784
|
+
border-radius: 3px !important;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
/* Strong and em elements in preview mode */
|
|
788
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview strong {
|
|
789
|
+
font-weight: 700 !important;
|
|
790
|
+
color: inherit !important; /* Use parent text color */
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview em {
|
|
794
|
+
font-style: italic !important;
|
|
795
|
+
color: inherit !important; /* Use parent text color */
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/* HR in preview mode */
|
|
799
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview .hr-marker {
|
|
800
|
+
display: block !important;
|
|
801
|
+
border-top: 2px solid var(--hr, #ddd) !important;
|
|
802
|
+
text-indent: -9999px !important;
|
|
803
|
+
height: 2px !important;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
/* Tables - GFM-style table rendering */
|
|
807
|
+
.marzipan-preview .marzipan-table {
|
|
808
|
+
border-collapse: collapse;
|
|
809
|
+
margin: 1em 0;
|
|
810
|
+
width: 100%;
|
|
811
|
+
overflow: auto;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
.marzipan-preview .marzipan-table th,
|
|
815
|
+
.marzipan-preview .marzipan-table td {
|
|
816
|
+
border: 1px solid var(--border, #ddd);
|
|
817
|
+
padding: 0.5em 1em;
|
|
818
|
+
text-align: left;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.marzipan-preview .marzipan-table th {
|
|
822
|
+
background: var(--bgSecondary, #f5f5f5);
|
|
823
|
+
font-weight: 600;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.marzipan-preview .marzipan-table tr:nth-child(even) {
|
|
827
|
+
background: var(--bgSecondary, #f9f9f9);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/* In preview mode - hide table syntax markers */
|
|
831
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview .table-row,
|
|
832
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview .table-separator {
|
|
833
|
+
display: none !important;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/* Images - responsive and styled */
|
|
837
|
+
.marzipan-preview .marzipan-image {
|
|
838
|
+
max-width: 100%;
|
|
839
|
+
height: auto;
|
|
840
|
+
display: inline-block;
|
|
841
|
+
border-radius: 4px;
|
|
842
|
+
margin: 0.5em 0;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/* In preview mode - make images fully visible */
|
|
846
|
+
.marzipan-container.preview-mode .marzipan-wrapper .marzipan-preview .marzipan-image {
|
|
847
|
+
display: block;
|
|
848
|
+
margin: 1em auto;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
${mobileStyles}
|
|
852
|
+
`;
|
|
853
|
+
}
|
|
854
|
+
//# sourceMappingURL=styles.js.map
|