mirror of
https://github.com/foambubble/foam.git
synced 2026-01-11 06:58:11 -05:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a004e61b2a | ||
|
|
1a7e633edc | ||
|
|
fb78e2baff | ||
|
|
9d143394dc | ||
|
|
249e3dd924 | ||
|
|
3398ab08ac | ||
|
|
2a197cfee5 | ||
|
|
e95aa05059 | ||
|
|
dc8df6fd1e | ||
|
|
babcbb1ec1 | ||
|
|
82e46b22ff |
@@ -1139,6 +1139,15 @@
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Tenormis",
|
||||
"name": "Tenormis",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/61572102?v=4",
|
||||
"profile": "https://github.com/Tenormis",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
|
||||
@@ -266,6 +266,7 @@ If that sounds like something you're interested in, I'd love to have you along o
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://schaver.com/"><img src="https://avatars.githubusercontent.com/u/7584?v=4?s=60" width="60px;" alt="Mark Schaver"/><br /><sub><b>Mark Schaver</b></sub></a><br /><a href="https://github.com/foambubble/foam/commits?author=markschaver" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/n8layman"><img src="https://avatars.githubusercontent.com/u/25353944?v=4?s=60" width="60px;" alt="Nathan Layman"/><br /><sub><b>Nathan Layman</b></sub></a><br /><a href="https://github.com/foambubble/foam/commits?author=n8layman" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/emmanuel-ferdman"><img src="https://avatars.githubusercontent.com/u/35470921?v=4?s=60" width="60px;" alt="Emmanuel Ferdman"/><br /><sub><b>Emmanuel Ferdman</b></sub></a><br /><a href="https://github.com/foambubble/foam/commits?author=emmanuel-ferdman" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Tenormis"><img src="https://avatars.githubusercontent.com/u/61572102?v=4?s=60" width="60px;" alt="Tenormis"/><br /><sub><b>Tenormis</b></sub></a><br /><a href="https://github.com/foambubble/foam/commits?author=Tenormis" title="Code">💻</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -38,6 +38,7 @@ A sample configuration object is provided below, you can provide as many or as l
|
||||
"foam.graph.style": {
|
||||
"background": "#202020",
|
||||
"fontSize": 12,
|
||||
"fontFamily": "Sans-Serif",
|
||||
"lineColor": "#277da1",
|
||||
"lineWidth": 0.2,
|
||||
"particleWidth": 1.0,
|
||||
@@ -50,6 +51,7 @@ A sample configuration object is provided below, you can provide as many or as l
|
||||
|
||||
- `background` background color of the graph, adjust to increase contrast
|
||||
- `fontSize` size of the title font for each node
|
||||
- `fontFamily` font of the title font for each node
|
||||
- `lineColor` color of the edges between nodes in the graph
|
||||
- `lineWidth` thickness of the edges between nodes
|
||||
- `particleWidth` size of the particle animation showing link direction when highlighting a node
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
],
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"version": "0.26.9"
|
||||
"version": "0.26.11"
|
||||
}
|
||||
|
||||
@@ -4,6 +4,18 @@ All notable changes to the "foam-vscode" extension will be documented in this fi
|
||||
|
||||
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
|
||||
|
||||
## [0.26.11] - 2025-04-19
|
||||
|
||||
Fixes and Improvements:
|
||||
|
||||
- Support for custom fonts in graph view (#1457 - thanks @Tenormis)
|
||||
|
||||
## [0.26.10] - 2025-03-29
|
||||
|
||||
Fixes and Improvements:
|
||||
|
||||
- General improvment of wiki embeds (#1443)
|
||||
|
||||
## [0.26.9] - 2025-03-29
|
||||
|
||||
Fixes and Improvements:
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
"type": "git"
|
||||
},
|
||||
"homepage": "https://github.com/foambubble/foam",
|
||||
"version": "0.26.9",
|
||||
"version": "0.26.11",
|
||||
"license": "MIT",
|
||||
"publisher": "foam",
|
||||
"engines": {
|
||||
"vscode": "^1.70.0"
|
||||
"vscode": "^1.96.0"
|
||||
},
|
||||
"icon": "assets/icon/FOAM_ICON_256.png",
|
||||
"categories": [
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { ResourceLink } from '../model/note';
|
||||
import { TextEdit } from './text-edit';
|
||||
|
||||
export abstract class MarkdownLink {
|
||||
private static wikilinkRegex = new RegExp(
|
||||
@@ -45,7 +46,7 @@ export abstract class MarkdownLink {
|
||||
type?: 'wikilink' | 'link';
|
||||
isEmbed?: boolean;
|
||||
}
|
||||
) {
|
||||
): TextEdit {
|
||||
const { target, section, alias } = MarkdownLink.analyzeLink(link);
|
||||
const newTarget = delta.target ?? target;
|
||||
const newSection = delta.section ?? section ?? '';
|
||||
|
||||
@@ -85,7 +85,7 @@ export const markdownItWikilinkEmbed = (
|
||||
md
|
||||
);
|
||||
refsStack.pop();
|
||||
return content;
|
||||
return refsStack.length === 0 ? md.render(content) : content;
|
||||
} catch (e) {
|
||||
Logger.error(
|
||||
`Error while including ${wikilinkItem} into the current document of the Preview panel`,
|
||||
@@ -105,7 +105,7 @@ function getNoteContent(
|
||||
md: markdownit
|
||||
): string {
|
||||
let content = `Embed for [[${includedNote.uri.path}]]`;
|
||||
let html: string;
|
||||
let toRender: string;
|
||||
|
||||
switch (includedNote.type) {
|
||||
case 'note': {
|
||||
@@ -126,7 +126,7 @@ function getNoteContent(
|
||||
: cardFormatter;
|
||||
|
||||
content = extractor(includedNote, parser, workspace);
|
||||
html = formatter(content, md);
|
||||
toRender = formatter(content, md);
|
||||
break;
|
||||
}
|
||||
case 'attachment':
|
||||
@@ -135,19 +135,19 @@ function getNoteContent(
|
||||
${md.renderInline('[[' + includedNote.uri.path + ']]')}<br/>
|
||||
Embed for attachments is not supported
|
||||
</div>`;
|
||||
html = md.render(content);
|
||||
toRender = md.render(content);
|
||||
break;
|
||||
case 'image':
|
||||
content = `<div class="embed-container-image">${md.render(
|
||||
`})`
|
||||
)}</div>`;
|
||||
html = md.render(content);
|
||||
toRender = md.render(content);
|
||||
break;
|
||||
default:
|
||||
html = content;
|
||||
toRender = content;
|
||||
}
|
||||
|
||||
return html;
|
||||
return toRender;
|
||||
}
|
||||
|
||||
function withLinksRelativeToWorkspaceRoot(
|
||||
@@ -271,13 +271,11 @@ function contentExtractor(
|
||||
export type EmbedNoteFormatter = (content: string, md: markdownit) => string;
|
||||
|
||||
function cardFormatter(content: string, md: markdownit): string {
|
||||
return md.render(
|
||||
`<div class="embed-container-note">${md.render(content)}</div>`
|
||||
);
|
||||
return `<div class="embed-container-note">\n\n${content}\n\n</div>`;
|
||||
}
|
||||
|
||||
function inlineFormatter(content: string, md: markdownit): string {
|
||||
return md.render(content);
|
||||
return content;
|
||||
}
|
||||
|
||||
export default markdownItWikilinkEmbed;
|
||||
|
||||
@@ -45,10 +45,11 @@ async function main() {
|
||||
extensionTestsPath,
|
||||
launchArgs: [
|
||||
testWorkspace,
|
||||
'--disable-gpu',
|
||||
'--disable-extensions',
|
||||
'--disable-workspace-trust',
|
||||
],
|
||||
version: '1.70.0',
|
||||
version: '1.96.0',
|
||||
});
|
||||
} catch (err) {
|
||||
console.log('Error occurred while running Foam e2e tests:', err);
|
||||
|
||||
@@ -47,6 +47,7 @@ function getStyle(name) {
|
||||
const defaultStyle = {
|
||||
background: getStyle(`--vscode-panel-background`) ?? '#202020',
|
||||
fontSize: parseInt(getStyle(`--vscode-font-size`) ?? 12) - 2,
|
||||
fontFamily: 'Sans-Serif',
|
||||
lineColor: getStyle('--vscode-editor-foreground') ?? '#277da1',
|
||||
lineWidth: 0.2,
|
||||
particleWidth: 1.0,
|
||||
@@ -229,7 +230,14 @@ function initDataviz(channel) {
|
||||
|
||||
painter
|
||||
.circle(node.x, node.y, size, fill, border)
|
||||
.text(label, node.x, node.y + size + 1, fontSize, textColor);
|
||||
.text(
|
||||
label,
|
||||
node.x,
|
||||
node.y + size + 1,
|
||||
fontSize,
|
||||
model.style.fontFamily,
|
||||
textColor
|
||||
);
|
||||
})
|
||||
.onRenderFramePost(ctx => {
|
||||
painter.paint(ctx);
|
||||
@@ -462,9 +470,9 @@ class Painter {
|
||||
return this;
|
||||
}
|
||||
|
||||
text(text, x, y, size, color) {
|
||||
text(text, x, y, size, family, color) {
|
||||
if (color.opacity > 0) {
|
||||
this.texts.push({ x, y, text, size, color });
|
||||
this.texts.push({ x, y, text, size, family, color });
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -489,7 +497,7 @@ class Painter {
|
||||
ctx.textAlign = 'center';
|
||||
ctx.textBaseline = 'top';
|
||||
for (const text of this.texts) {
|
||||
ctx.font = `${text.size}px Sans-Serif`;
|
||||
ctx.font = `${text.size}px ${text.family}`;
|
||||
ctx.fillStyle = text.color;
|
||||
ctx.fillText(text.text, text.x, text.y);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
👀*This is an early stage project under rapid development. For updates join the [Foam community Discord](https://foambubble.github.io/join-discord/g)! 💬*
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
[](#contributors-)
|
||||
[](#contributors-)
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
|
||||
[](https://marketplace.visualstudio.com/items?itemName=foam.foam-vscode)
|
||||
@@ -366,6 +366,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://schaver.com/"><img src="https://avatars.githubusercontent.com/u/7584?v=4?s=60" width="60px;" alt="Mark Schaver"/><br /><sub><b>Mark Schaver</b></sub></a><br /><a href="https://github.com/foambubble/foam/commits?author=markschaver" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/n8layman"><img src="https://avatars.githubusercontent.com/u/25353944?v=4?s=60" width="60px;" alt="Nathan Layman"/><br /><sub><b>Nathan Layman</b></sub></a><br /><a href="https://github.com/foambubble/foam/commits?author=n8layman" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/emmanuel-ferdman"><img src="https://avatars.githubusercontent.com/u/35470921?v=4?s=60" width="60px;" alt="Emmanuel Ferdman"/><br /><sub><b>Emmanuel Ferdman</b></sub></a><br /><a href="https://github.com/foambubble/foam/commits?author=emmanuel-ferdman" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Tenormis"><img src="https://avatars.githubusercontent.com/u/61572102?v=4?s=60" width="60px;" alt="Tenormis"/><br /><sub><b>Tenormis</b></sub></a><br /><a href="https://github.com/foambubble/foam/commits?author=Tenormis" title="Code">💻</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
ons = "ons" # add-ons
|
||||
pallette = "pallette"
|
||||
[files]
|
||||
extend-exclude = ["CHANGELOG.md", "d3.v6.min.js", "force-graph.1.40.5.min.js", "dat.gui.min.js"]
|
||||
extend-exclude = ["CHANGELOG.md", "d3.v6.min.js", "force-graph.1.49.5.min.js", "dat.gui.min.js"]
|
||||
|
||||
Reference in New Issue
Block a user