entari-plugin-hyw 4.0.0rc6__py3-none-any.whl → 4.0.0rc8__py3-none-any.whl

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.

Potentially problematic release.


This version of entari-plugin-hyw might be problematic. Click here for more details.

Files changed (114) hide show
  1. entari_plugin_hyw/Untitled-1 +1865 -0
  2. entari_plugin_hyw/__init__.py +733 -379
  3. entari_plugin_hyw/history.py +60 -57
  4. entari_plugin_hyw/misc.py +3 -0
  5. entari_plugin_hyw/search_cache.py +154 -0
  6. {entari_plugin_hyw-4.0.0rc6.dist-info → entari_plugin_hyw-4.0.0rc8.dist-info}/METADATA +3 -1
  7. entari_plugin_hyw-4.0.0rc8.dist-info/RECORD +68 -0
  8. {entari_plugin_hyw-4.0.0rc6.dist-info → entari_plugin_hyw-4.0.0rc8.dist-info}/WHEEL +1 -1
  9. {entari_plugin_hyw-4.0.0rc6.dist-info → entari_plugin_hyw-4.0.0rc8.dist-info}/top_level.txt +1 -0
  10. hyw_core/__init__.py +94 -0
  11. hyw_core/browser_control/__init__.py +65 -0
  12. hyw_core/browser_control/assets/card-dist/index.html +409 -0
  13. hyw_core/browser_control/assets/index.html +5691 -0
  14. hyw_core/browser_control/engines/__init__.py +17 -0
  15. hyw_core/browser_control/engines/default.py +166 -0
  16. {entari_plugin_hyw/browser → hyw_core/browser_control}/engines/duckduckgo.py +42 -8
  17. {entari_plugin_hyw/browser → hyw_core/browser_control}/engines/google.py +1 -1
  18. {entari_plugin_hyw/browser → hyw_core/browser_control}/manager.py +15 -8
  19. entari_plugin_hyw/render_vue.py → hyw_core/browser_control/renderer.py +29 -14
  20. hyw_core/browser_control/service.py +720 -0
  21. hyw_core/config.py +154 -0
  22. hyw_core/core.py +322 -0
  23. hyw_core/definitions.py +83 -0
  24. entari_plugin_hyw/modular_pipeline.py → hyw_core/pipeline.py +204 -86
  25. {entari_plugin_hyw → hyw_core}/search.py +60 -19
  26. hyw_core/stages/__init__.py +21 -0
  27. entari_plugin_hyw/stage_base.py → hyw_core/stages/base.py +3 -0
  28. entari_plugin_hyw/stage_summary.py → hyw_core/stages/summary.py +36 -7
  29. entari_plugin_hyw/assets/card-dist/index.html +0 -387
  30. entari_plugin_hyw/browser/__init__.py +0 -10
  31. entari_plugin_hyw/browser/engines/bing.py +0 -95
  32. entari_plugin_hyw/browser/service.py +0 -304
  33. entari_plugin_hyw/card-ui/.gitignore +0 -24
  34. entari_plugin_hyw/card-ui/README.md +0 -5
  35. entari_plugin_hyw/card-ui/index.html +0 -16
  36. entari_plugin_hyw/card-ui/package-lock.json +0 -2342
  37. entari_plugin_hyw/card-ui/package.json +0 -31
  38. entari_plugin_hyw/card-ui/public/logos/anthropic.svg +0 -1
  39. entari_plugin_hyw/card-ui/public/logos/cerebras.svg +0 -9
  40. entari_plugin_hyw/card-ui/public/logos/deepseek.png +0 -0
  41. entari_plugin_hyw/card-ui/public/logos/gemini.svg +0 -1
  42. entari_plugin_hyw/card-ui/public/logos/google.svg +0 -1
  43. entari_plugin_hyw/card-ui/public/logos/grok.png +0 -0
  44. entari_plugin_hyw/card-ui/public/logos/huggingface.png +0 -0
  45. entari_plugin_hyw/card-ui/public/logos/microsoft.svg +0 -15
  46. entari_plugin_hyw/card-ui/public/logos/minimax.png +0 -0
  47. entari_plugin_hyw/card-ui/public/logos/mistral.png +0 -0
  48. entari_plugin_hyw/card-ui/public/logos/nvida.png +0 -0
  49. entari_plugin_hyw/card-ui/public/logos/openai.svg +0 -1
  50. entari_plugin_hyw/card-ui/public/logos/openrouter.png +0 -0
  51. entari_plugin_hyw/card-ui/public/logos/perplexity.svg +0 -24
  52. entari_plugin_hyw/card-ui/public/logos/qwen.png +0 -0
  53. entari_plugin_hyw/card-ui/public/logos/xai.png +0 -0
  54. entari_plugin_hyw/card-ui/public/logos/xiaomi.png +0 -0
  55. entari_plugin_hyw/card-ui/public/logos/zai.png +0 -0
  56. entari_plugin_hyw/card-ui/public/vite.svg +0 -1
  57. entari_plugin_hyw/card-ui/src/App.vue +0 -756
  58. entari_plugin_hyw/card-ui/src/assets/vue.svg +0 -1
  59. entari_plugin_hyw/card-ui/src/components/HelloWorld.vue +0 -41
  60. entari_plugin_hyw/card-ui/src/components/MarkdownContent.vue +0 -382
  61. entari_plugin_hyw/card-ui/src/components/SectionCard.vue +0 -41
  62. entari_plugin_hyw/card-ui/src/components/StageCard.vue +0 -240
  63. entari_plugin_hyw/card-ui/src/main.ts +0 -5
  64. entari_plugin_hyw/card-ui/src/style.css +0 -29
  65. entari_plugin_hyw/card-ui/src/test_regex.js +0 -103
  66. entari_plugin_hyw/card-ui/src/types.ts +0 -61
  67. entari_plugin_hyw/card-ui/tsconfig.app.json +0 -16
  68. entari_plugin_hyw/card-ui/tsconfig.json +0 -7
  69. entari_plugin_hyw/card-ui/tsconfig.node.json +0 -26
  70. entari_plugin_hyw/card-ui/vite.config.ts +0 -16
  71. entari_plugin_hyw/definitions.py +0 -155
  72. entari_plugin_hyw/stage_instruct.py +0 -345
  73. entari_plugin_hyw/stage_instruct_deepsearch.py +0 -104
  74. entari_plugin_hyw-4.0.0rc6.dist-info/RECORD +0 -100
  75. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/anthropic.svg +0 -0
  76. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/cerebras.svg +0 -0
  77. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/deepseek.png +0 -0
  78. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/gemini.svg +0 -0
  79. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/google.svg +0 -0
  80. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/grok.png +0 -0
  81. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/huggingface.png +0 -0
  82. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/microsoft.svg +0 -0
  83. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/minimax.png +0 -0
  84. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/mistral.png +0 -0
  85. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/nvida.png +0 -0
  86. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/openai.svg +0 -0
  87. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/openrouter.png +0 -0
  88. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/perplexity.svg +0 -0
  89. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/qwen.png +0 -0
  90. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/xai.png +0 -0
  91. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/xiaomi.png +0 -0
  92. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/logos/zai.png +0 -0
  93. {entari_plugin_hyw → hyw_core/browser_control}/assets/card-dist/vite.svg +0 -0
  94. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/anthropic.svg +0 -0
  95. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/cerebras.svg +0 -0
  96. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/deepseek.png +0 -0
  97. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/gemini.svg +0 -0
  98. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/google.svg +0 -0
  99. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/grok.png +0 -0
  100. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/huggingface.png +0 -0
  101. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/microsoft.svg +0 -0
  102. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/minimax.png +0 -0
  103. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/mistral.png +0 -0
  104. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/nvida.png +0 -0
  105. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/openai.svg +0 -0
  106. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/openrouter.png +0 -0
  107. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/perplexity.svg +0 -0
  108. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/qwen.png +0 -0
  109. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/xai.png +0 -0
  110. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/xiaomi.png +0 -0
  111. {entari_plugin_hyw/assets/icon → hyw_core/browser_control/assets/logos}/zai.png +0 -0
  112. {entari_plugin_hyw/browser → hyw_core/browser_control}/engines/base.py +0 -0
  113. {entari_plugin_hyw/browser → hyw_core/browser_control}/landing.html +0 -0
  114. {entari_plugin_hyw → hyw_core}/image_cache.py +0 -0
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
@@ -1,41 +0,0 @@
1
- <script setup lang="ts">
2
- import { ref } from 'vue'
3
-
4
- defineProps<{ msg: string }>()
5
-
6
- const count = ref(0)
7
- </script>
8
-
9
- <template>
10
- <h1>{{ msg }}</h1>
11
-
12
- <div class="card">
13
- <button type="button" @click="count++">count is {{ count }}</button>
14
- <p>
15
- Edit
16
- <code>components/HelloWorld.vue</code> to test HMR
17
- </p>
18
- </div>
19
-
20
- <p>
21
- Check out
22
- <a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
23
- >create-vue</a
24
- >, the official Vue + Vite starter
25
- </p>
26
- <p>
27
- Learn more about IDE Support for Vue in the
28
- <a
29
- href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
30
- target="_blank"
31
- >Vue Docs Scaling up Guide</a
32
- >.
33
- </p>
34
- <p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
35
- </template>
36
-
37
- <style scoped>
38
- .read-the-docs {
39
- color: #888;
40
- }
41
- </style>
@@ -1,382 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- import { marked, type Tokens } from 'marked'
5
- import katex from 'katex'
6
- import 'katex/dist/katex.min.css'
7
- import hljs from 'highlight.js/lib/core'
8
- // Import only common languages to reduce bundle size
9
- import python from 'highlight.js/lib/languages/python'
10
- import javascript from 'highlight.js/lib/languages/javascript'
11
- import typescript from 'highlight.js/lib/languages/typescript'
12
- import json from 'highlight.js/lib/languages/json'
13
- import bash from 'highlight.js/lib/languages/bash'
14
- import css from 'highlight.js/lib/languages/css'
15
- import xml from 'highlight.js/lib/languages/xml'
16
- import java from 'highlight.js/lib/languages/java'
17
- import cpp from 'highlight.js/lib/languages/cpp'
18
- import go from 'highlight.js/lib/languages/go'
19
- import rust from 'highlight.js/lib/languages/rust'
20
- import sql from 'highlight.js/lib/languages/sql'
21
- import markdown from 'highlight.js/lib/languages/markdown'
22
- import shell from 'highlight.js/lib/languages/shell'
23
- import yaml from 'highlight.js/lib/languages/yaml'
24
- import properties from 'highlight.js/lib/languages/properties'
25
-
26
- hljs.registerLanguage('python', python)
27
- hljs.registerLanguage('javascript', javascript)
28
- hljs.registerLanguage('js', javascript)
29
- hljs.registerLanguage('typescript', typescript)
30
- hljs.registerLanguage('ts', typescript)
31
- hljs.registerLanguage('json', json)
32
- hljs.registerLanguage('bash', bash)
33
- hljs.registerLanguage('sh', bash)
34
- hljs.registerLanguage('shell', shell)
35
- hljs.registerLanguage('zsh', bash)
36
- hljs.registerLanguage('css', css)
37
- hljs.registerLanguage('html', xml)
38
- hljs.registerLanguage('xml', xml)
39
- hljs.registerLanguage('java', java)
40
- hljs.registerLanguage('cpp', cpp)
41
- hljs.registerLanguage('c', cpp)
42
- hljs.registerLanguage('go', go)
43
- hljs.registerLanguage('rust', rust)
44
- hljs.registerLanguage('sql', sql)
45
- hljs.registerLanguage('markdown', markdown)
46
- hljs.registerLanguage('md', markdown)
47
- hljs.registerLanguage('yaml', yaml)
48
- hljs.registerLanguage('yml', yaml)
49
- hljs.registerLanguage('properties', properties)
50
- hljs.registerLanguage('ini', properties)
51
- hljs.registerLanguage('conf', properties)
52
-
53
- import 'highlight.js/styles/github.css'
54
-
55
- const props = defineProps<{
56
- markdown: string
57
- numSearchRefs?: number
58
- numPageRefs?: number
59
- bare?: boolean
60
- compact?: boolean
61
- }>()
62
-
63
- // Configure marked with syntax highlighting
64
- marked.setOptions({
65
- breaks: true,
66
- gfm: true,
67
- })
68
-
69
- // Custom renderer for code blocks with technical layout
70
- const renderer = new marked.Renderer()
71
- renderer.code = ({ text, lang }: Tokens.Code): string => {
72
- const language = lang || 'text'
73
- let highlighted = ''
74
- if (lang && hljs.getLanguage(lang)) {
75
- try {
76
- highlighted = hljs.highlight(text, { language: lang }).value
77
- } catch {
78
- highlighted = hljs.highlightAuto(text).value
79
- }
80
- } else {
81
- highlighted = hljs.highlightAuto(text).value
82
- }
83
-
84
- // Add line numbers to code
85
- const addLineNumbers = (code: string): string => {
86
- const lines = code.split('\n')
87
- return lines.map((line, i) =>
88
- `<span class="code-line"><span class="line-number">${i + 1}</span><span class="line-content">${line}</span></span>`
89
- ).join('')
90
- }
91
-
92
- const highlightedWithLines = addLineNumbers(highlighted)
93
-
94
- // Bare mode: just the code, no window decoration
95
- if (props.bare) {
96
- return `<pre class="!mt-0 !mb-0 !rounded-none !bg-gray-50 !p-0 border-b border-gray-100 code-with-lines"><code class="hljs language-${language} text-[17.5px] leading-snug font-mono">${highlightedWithLines}</code></pre>`
97
- }
98
-
99
- // Dynamic Icon mapping
100
-
101
-
102
- return `
103
- <div class="my-6 space-y-1 group">
104
- <div class="h-4 w-24 ml-auto" style="background-color: var(--theme-color);"></div>
105
- <div class="">
106
- <pre class="!mt-0 !mb-0 !rounded-none !bg-white !p-0 code-with-lines"><code class="hljs language-${language} text-[17.5px] leading-snug font-mono">${highlightedWithLines}</code></pre>
107
- </div>
108
- </div>
109
- `
110
- }
111
-
112
- marked.use({ renderer })
113
-
114
- // Render LaTeX math with KaTeX
115
- function renderMath(tex: string, displayMode: boolean): string {
116
- try {
117
- return katex.renderToString(tex, {
118
- displayMode,
119
- throwOnError: false,
120
- strict: false,
121
- })
122
- } catch {
123
- return `<code>${tex}</code>`
124
- }
125
- }
126
-
127
- // Process markdown and convert citations to badges
128
- const processedHtml = computed(() => {
129
- let md = props.markdown || ''
130
-
131
- // Remove References section at end
132
- md = md.replace(/(?:^|\n)\s*(?:#{1,3}|\*\*)\s*(?:References|Citations|Sources)[\s\S]*$/i, '')
133
-
134
- // Protect math blocks from markdown parsing by replacing with placeholders
135
- const mathBlocks: { placeholder: string; html: string }[] = []
136
- let mathIndex = 0
137
-
138
- // Block math: $$...$$ or \[...\]
139
- md = md.replace(/\$\$([\s\S]+?)\$\$|\\\[([\s\S]+?)\\\]/g, (_, tex1, tex2) => {
140
- const tex = tex1 || tex2
141
- const placeholder = `%%MATH_BLOCK_${mathIndex++}%%`
142
- mathBlocks.push({ placeholder, html: `<div class="my-4 overflow-x-auto">${renderMath(tex.trim(), true)}</div>` })
143
- return placeholder
144
- })
145
-
146
- // Inline math: $...$ or \(...\) (but not $$)
147
- md = md.replace(/\$([^\$\n]+?)\$|\\\((.+?)\\\)/g, (_, tex1, tex2) => {
148
- const tex = tex1 || tex2
149
- const placeholder = `%%MATH_INLINE_${mathIndex++}%%`
150
- mathBlocks.push({ placeholder, html: renderMath(tex.trim(), false) })
151
- return placeholder
152
- })
153
-
154
- // Convert markdown to HTML
155
- let html = marked.parse(md) as string
156
-
157
- // Restore math blocks
158
- for (const { placeholder, html: mathHtml } of mathBlocks) {
159
- html = html.replace(placeholder, mathHtml)
160
- }
161
-
162
- // Render <summary> tags as technical highlight blocks
163
- html = html.replace(/<summary>([\s\S]*?)<\/summary>/g, (_, content) => {
164
- return `
165
- <div class="my-8 group shadow-sm shadow-black/10">
166
- <div class="h-4 w-full" style="background-color: var(--theme-color);"></div>
167
- <div class="p-6 text-[19px] leading-relaxed font-medium bg-white" style="color: var(--text-body)">
168
- ${content}
169
- </div>
170
- </div>
171
- `
172
- })
173
-
174
- // Wrap tables in crisp technical borders
175
- html = html.replace(/<table[^>]*>([\s\S]*?)<\/table>/g, (_, content) => {
176
- // Parse table content to simple structure
177
- const rows = content.match(/<tr[^>]*>[\s\S]*?<\/tr>/g) || []
178
-
179
- // Extract headers
180
- const headerRow = rows[0] || ''
181
- const headers = (headerRow.match(/<th[^>]*>([\s\S]*?)<\/th>/g) || []).map((h: string) => {
182
- const alignMatch = h.match(/align="([^"]*)"/)
183
- const align = alignMatch ? alignMatch[1] : 'left'
184
- const text = h.replace(/<[^>]+>/g, '')
185
- return { text, align }
186
- })
187
-
188
- // Extract body rows
189
- const bodyRows = rows.slice(1).map((row: string) => {
190
- return (row.match(/<td[^>]*>([\s\S]*?)<\/td>/g) || []).map((c: string, i: number) => {
191
- const alignMatch = c.match(/align="([^"]*)"/)
192
- const align = alignMatch ? alignMatch[1] : (headers[i]?.align || 'left')
193
- const innerHtml = c.replace(/^<td[^>]*>|<\/td>$/g, '')
194
- return { html: innerHtml, align }
195
- })
196
- })
197
-
198
- const containerClass = "w-full bg-white text-[16.5px] select-text";
199
-
200
- let gridHtml = `<div class="${containerClass}">`
201
-
202
- const allRows: any[] = [headers.map((h: any) => ({ html: h.text, align: h.align })), ...bodyRows];
203
-
204
- allRows.forEach((row: any[], rowIndex: number) => {
205
- const isHeader = rowIndex === 0;
206
- const rowBg = isHeader
207
- ? 'bg-white text-gray-800 font-black uppercase tracking-tight'
208
- : (rowIndex % 2 === 0 ? 'bg-white' : 'bg-gray-50/30');
209
- const borderB = rowIndex < allRows.length - 1 ? 'border-b border-gray-200' : '';
210
-
211
- gridHtml += `<div class="flex w-full ${rowBg} ${borderB}">`;
212
-
213
- row.forEach((cell: any, colIndex: number) => {
214
- const justify = cell.align === 'center' ? 'justify-center text-center' : (cell.align === 'right' ? 'justify-end text-right' : 'justify-start');
215
- const borderClass = colIndex === row.length - 1 ? '' : 'border-r border-gray-100';
216
-
217
- gridHtml += `<div class="flex-1 py-3.5 px-4 min-w-0 break-words flex items-center leading-tight ${justify} ${borderClass}">
218
- <span>${cell.html}</span>
219
- </div>`;
220
- });
221
- gridHtml += `</div>`;
222
- });
223
- gridHtml += `</div>`;
224
-
225
- if (props.bare) {
226
- return `<div class="border-b border-gray-200">${gridHtml}</div>`
227
- }
228
-
229
- return `
230
- <div class="my-6 group">
231
- <div class="bg-white p-0 border-t border-gray-100">
232
- ${gridHtml}
233
- </div>
234
- </div>
235
- `
236
- })
237
-
238
- // Convert [N] citations to small square badges with shadow
239
- html = html.replace(/(\s*)\[(\d+)\]/g, (_, _space, n) => {
240
- const num = parseInt(n)
241
- return `<sup class="inline-flex items-center justify-center w-[15px] h-[15px] text-[10px] font-bold cursor-default select-none ml-0.5 mr-0 align-middle" style="background-color: var(--theme-color); color: var(--header-text-color); box-shadow: 0 1px 2px 0 rgba(0,0,0,0.15)">${num}</sup>`
242
- })
243
-
244
- // Style <u> underline tags with theme-colored solid underline
245
- html = html.replace(/<u>([^<]*)<\/u>/g, (_, content) => {
246
- return `<span class="underline decoration-[3px] underline-offset-[6px]" style="text-decoration-color: var(--theme-color)">${content}</span>`
247
- })
248
-
249
- return html
250
- })
251
- </script>
252
-
253
- <template>
254
- <div ref="contentRef"
255
- class="prose prose-slate max-w-none"
256
- :class="props.compact
257
- ? 'prose-sm !prose-p:my-1 !prose-p:leading-snug !prose-p:text-[13.5px] !prose-li:text-[13.5px] !prose-headings:text-[14px] !prose-headings:mt-2 !prose-headings:mb-1 prose-a:text-blue-600 prose-a:no-underline hover:prose-a:underline [&>*:first-child]:!mt-0'
258
- : 'prose-lg prose-headings:font-bold prose-headings:mb-3 prose-headings:mt-8 prose-headings:tracking-tight prose-p:leading-7 prose-p:my-4 prose-p:text-[20px] prose-li:text-[20px] prose-a:text-blue-600 prose-a:no-underline hover:prose-a:underline prose-code:bg-gray-100 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded-none prose-code:text-[0.85em] prose-code:font-mono prose-pre:bg-gray-50 prose-pre:border prose-pre:border-gray-200 prose-pre:rounded-none prose-pre:p-0 prose-img:rounded-none prose-img:my-6 prose-img:max-h-[400px] prose-img:w-auto prose-img:object-contain prose-img:border prose-img:border-gray-200 prose-ol:list-decimal prose-ol:pl-7 prose-ol:list-outside prose-ol:my-5 prose-li:my-2.5 prose-li:leading-7 [&>*:first-child]:!mt-0'"
259
- style="--prose-headings: var(--text-primary); --prose-body: var(--text-body); --prose-bold: var(--text-primary); --prose-code: var(--text-body)"
260
- v-html="processedHtml">
261
- </div>
262
- </template>
263
-
264
-
265
- <style>
266
- /* Highlight.js theme - minimal */
267
- .hljs {
268
- background: transparent !important;
269
- padding: 0 !important;
270
- }
271
-
272
- /* Custom List Styling - Premium technical bullet */
273
- .prose ul {
274
- list-style: none !important;
275
- padding-left: 0.25rem !important;
276
- margin-top: 1rem !important;
277
- margin-bottom: 1rem !important;
278
- }
279
-
280
- .prose ul > li {
281
- position: relative !important;
282
- padding-left: 1.5rem !important;
283
- margin-top: 0.75rem !important;
284
- margin-bottom: 0.75rem !important;
285
- line-height: 1.6 !important;
286
- }
287
-
288
- .prose ul > li::before {
289
- content: "" !important;
290
- position: absolute !important;
291
- left: 0 !important;
292
- top: 0.6em !important;
293
- width: 8px !important;
294
- height: 8px !important;
295
- background-color: var(--theme-color, #ef4444) !important; /* Theme color */
296
- border-radius: 0 !important;
297
- }
298
-
299
- /* Nested list styling */
300
- .prose ul ul {
301
- margin-top: 0.25rem !important;
302
- margin-bottom: 0.25rem !important;
303
- padding-left: 1rem !important;
304
- }
305
-
306
- .prose ul ul > li {
307
- padding-left: 1.25rem !important;
308
- margin-top: 0.25rem !important;
309
- margin-bottom: 0.25rem !important;
310
- }
311
-
312
- .prose ul ul > li::before {
313
- width: 6px !important;
314
- height: 6px !important;
315
- background-color: var(--theme-color, #ef4444) !important; /* Theme color - same as parent, slightly smaller */
316
- top: 0.65em !important;
317
- }
318
-
319
- /* Custom Blockquote Styling - Dual Red Lines */
320
- .prose blockquote {
321
- border-left: none !important;
322
- padding-left: 1rem !important;
323
- margin-left: 0 !important;
324
- position: relative !important;
325
- font-style: italic !important;
326
- color: var(--text-body, #3a3a3c) !important; /* Premium reading color */
327
- }
328
-
329
- .prose blockquote::before {
330
- content: "" !important;
331
- position: absolute !important;
332
- left: 0 !important;
333
- top: 0 !important;
334
- bottom: 0 !important;
335
- width: 5px !important;
336
- background-color: var(--theme-color, #ef4444) !important; /* Theme color - thick line */
337
- }
338
-
339
-
340
-
341
- /* Ensure images don't have artifacts */
342
- .prose img {
343
- display: block;
344
- margin-left: 0;
345
- margin-right: auto;
346
- }
347
- .prose pre {
348
- border: none !important;
349
- }
350
-
351
- /* Code line numbers - Modern minimalist style */
352
- .code-with-lines code {
353
- display: block;
354
- padding: 1.25em 0;
355
- background: white;
356
- }
357
- .code-with-lines .code-line {
358
- display: flex;
359
- align-items: stretch;
360
- }
361
- .code-with-lines .line-number {
362
- flex-shrink: 0;
363
- width: 36px;
364
- padding: 0.1em 8px 0.1em 4px;
365
- text-align: right;
366
- color: var(--text-muted, #9ca3af);
367
- background: white;
368
- border-right: 1px solid #e5e7eb;
369
- user-select: none;
370
- font-size: 11px;
371
- display: flex;
372
- align-items: flex-start;
373
- justify-content: flex-end;
374
- }
375
- .code-with-lines .line-content {
376
- flex: 1;
377
- padding: 0.1em 1.25em 0.1em 1em;
378
- white-space: pre-wrap;
379
- word-break: break-all;
380
- background: white;
381
- }
382
- </style>
@@ -1,41 +0,0 @@
1
- <script setup lang="ts">
2
- import MarkdownContent from './MarkdownContent.vue'
3
-
4
- const props = defineProps<{
5
- title: string
6
- content: string
7
- level: number
8
- numSearchRefs?: number
9
- numPageRefs?: number
10
- index: number
11
- }>()
12
- </script>
13
-
14
- <template>
15
- <div class="mb-5">
16
- <!-- Normal Text Section: macOS Window Style -->
17
- <div class="rounded-none overflow-hidden border border-gray-300 bg-white/70 backdrop-blur-xl">
18
- <!-- Section Window Header with traffic lights + title on right -->
19
- <div class="flex items-center justify-between px-3 py-2 bg-gray-100/80 backdrop-blur-lg border-b border-gray-200/40">
20
- <div class="flex items-center gap-1.5">
21
- <!-- macOS Traffic Lights -->
22
- <div class="flex gap-1.5 mr-2">
23
- <div class="w-2.5 h-2.5 rounded-full bg-[#ff5f56] shadow-md"></div>
24
- <div class="w-2.5 h-2.5 rounded-full bg-[#ffbd2e] shadow-md"></div>
25
- <div class="w-2.5 h-2.5 rounded-full bg-[#27c93f] shadow-md"></div>
26
- </div>
27
- </div>
28
- <span class="text-[11px] font-mono text-gray-700/70 uppercase font-bold tracking-wider">{{ title }}</span>
29
- </div>
30
-
31
- <!-- Section Content -->
32
- <div class="p-5 bg-white/40 backdrop-blur-sm">
33
- <MarkdownContent
34
- :markdown="content"
35
- :num-search-refs="numSearchRefs"
36
- :num-page-refs="numPageRefs"
37
- />
38
- </div>
39
- </div>
40
- </div>
41
- </template>