Merge branch 'main' into feature/manifest-v3-update
@ -38,7 +38,7 @@
|
||||
"@playwright/test": "1.55.1",
|
||||
"@stylistic/eslint-plugin": "5.4.0",
|
||||
"@types/express": "5.0.3",
|
||||
"@types/node": "22.18.7",
|
||||
"@types/node": "22.18.8",
|
||||
"@types/yargs": "17.0.33",
|
||||
"@vitest/coverage-v8": "3.2.4",
|
||||
"eslint": "9.36.0",
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
"draggabilly": "3.0.0",
|
||||
"force-graph": "1.51.0",
|
||||
"globals": "16.4.0",
|
||||
"i18next": "25.5.2",
|
||||
"i18next": "25.5.3",
|
||||
"i18next-http-backend": "3.0.2",
|
||||
"jquery": "3.7.1",
|
||||
"jquery.fancytree": "2.38.5",
|
||||
@ -53,7 +53,7 @@
|
||||
"mark.js": "8.11.1",
|
||||
"marked": "16.3.0",
|
||||
"mermaid": "11.12.0",
|
||||
"mind-elixir": "5.2.1",
|
||||
"mind-elixir": "5.3.1",
|
||||
"normalize.css": "8.0.1",
|
||||
"panzoom": "9.4.3",
|
||||
"preact": "10.27.2",
|
||||
@ -75,6 +75,6 @@
|
||||
"copy-webpack-plugin": "13.0.1",
|
||||
"happy-dom": "19.0.2",
|
||||
"script-loader": "0.7.2",
|
||||
"vite-plugin-static-copy": "3.1.2"
|
||||
"vite-plugin-static-copy": "3.1.3"
|
||||
}
|
||||
}
|
||||
@ -21,6 +21,7 @@ import dayjs from "dayjs";
|
||||
import type NoteContext from "../components/note_context.js";
|
||||
import type NoteDetailWidget from "../widgets/note_detail.js";
|
||||
import type Component from "../components/component.js";
|
||||
import { formatLogMessage } from "@triliumnext/commons";
|
||||
|
||||
/**
|
||||
* A whole number
|
||||
@ -455,7 +456,7 @@ export interface Api {
|
||||
/**
|
||||
* Log given message to the log pane in UI
|
||||
*/
|
||||
log(message: string): void;
|
||||
log(message: string | object): void;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -696,7 +697,7 @@ function FrontendScriptApi(this: Api, startNote: FNote, currentNote: FNote, orig
|
||||
this.log = (message) => {
|
||||
const { noteId } = this.startNote;
|
||||
|
||||
message = `${utils.now()}: ${message}`;
|
||||
message = `${utils.now()}: ${formatLogMessage(message)}`;
|
||||
|
||||
console.log(`Script ${noteId}: ${message}`);
|
||||
|
||||
|
||||
@ -35,8 +35,7 @@ async function getLinkIcon(noteId: string, viewMode: ViewMode | undefined) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
// TODO: Remove `string` once all the view modes have been mapped.
|
||||
type ViewMode = "default" | "source" | "attachments" | "contextual-help" | string;
|
||||
export type ViewMode = "default" | "source" | "attachments" | "contextual-help";
|
||||
|
||||
export interface ViewScope {
|
||||
/**
|
||||
|
||||
@ -119,11 +119,6 @@ describe("shortcuts", () => {
|
||||
metaKey: options.metaKey || false
|
||||
} as KeyboardEvent);
|
||||
|
||||
it("should match simple key shortcuts", () => {
|
||||
const event = createKeyboardEvent({ key: "a", code: "KeyA" });
|
||||
expect(matchesShortcut(event, "a")).toBe(true);
|
||||
});
|
||||
|
||||
it("should match shortcuts with modifiers", () => {
|
||||
const event = createKeyboardEvent({ key: "a", code: "KeyA", ctrlKey: true });
|
||||
expect(matchesShortcut(event, "ctrl+a")).toBe(true);
|
||||
@ -148,6 +143,20 @@ describe("shortcuts", () => {
|
||||
expect(matchesShortcut(event, "a")).toBe(false);
|
||||
});
|
||||
|
||||
it("should not match when no modifiers are used", () => {
|
||||
const event = createKeyboardEvent({ key: "a", code: "KeyA" });
|
||||
expect(matchesShortcut(event, "a")).toBe(false);
|
||||
});
|
||||
|
||||
it("should match function keys even with no modifiers", () => {
|
||||
let event = createKeyboardEvent({ key: "F1", code: "F1" });
|
||||
expect(matchesShortcut(event, "F1")).toBeTruthy();
|
||||
expect(matchesShortcut(event, "f1")).toBeTruthy();
|
||||
|
||||
event = createKeyboardEvent({ key: "F1", code: "F1", shiftKey: true });
|
||||
expect(matchesShortcut(event, "Shift+F1")).toBeTruthy();
|
||||
});
|
||||
|
||||
it("should handle alternative modifier names", () => {
|
||||
const ctrlEvent = createKeyboardEvent({ key: "a", code: "KeyA", ctrlKey: true });
|
||||
expect(matchesShortcut(ctrlEvent, "control+a")).toBe(true);
|
||||
|
||||
@ -162,6 +162,12 @@ export function matchesShortcut(e: KeyboardEvent, shortcut: string): boolean {
|
||||
const expectedShift = modifiers.includes('shift');
|
||||
const expectedMeta = modifiers.includes('meta') || modifiers.includes('cmd') || modifiers.includes('command');
|
||||
|
||||
// Refuse key combinations that don't include modifiers because they interfere with the normal usage of the application.
|
||||
// Function keys are an exception.
|
||||
if (!(expectedCtrl || expectedAlt || expectedShift || expectedMeta) && !/f\d+/.test(key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return e.ctrlKey === expectedCtrl &&
|
||||
e.altKey === expectedAlt &&
|
||||
e.shiftKey === expectedShift &&
|
||||
|
||||
@ -592,7 +592,18 @@
|
||||
"september": "Septiembre",
|
||||
"october": "Octubre",
|
||||
"november": "Noviembre",
|
||||
"december": "Diciembre"
|
||||
"december": "Diciembre",
|
||||
"week": "Semana",
|
||||
"week_previous": "Semana anterior",
|
||||
"week_next": "Semana siguiente",
|
||||
"month": "Mes",
|
||||
"month_previous": "Mes anterior",
|
||||
"month_next": "Mes siguiente",
|
||||
"year": "Año",
|
||||
"year_previous": "Año anterior",
|
||||
"year_next": "Año siguiente",
|
||||
"list": "Lista",
|
||||
"today": "Hoy"
|
||||
},
|
||||
"close_pane_button": {
|
||||
"close_this_pane": "Cerrar este panel"
|
||||
@ -753,7 +764,8 @@
|
||||
"book_properties": "Propiedades de colección",
|
||||
"table": "Tabla",
|
||||
"geo-map": "Mapa Geo",
|
||||
"board": "Tablero"
|
||||
"board": "Tablero",
|
||||
"include_archived_notes": "Mostrar notas archivadas"
|
||||
},
|
||||
"edited_notes": {
|
||||
"no_edited_notes_found": "Aún no hay notas editadas en este día...",
|
||||
|
||||
@ -15,6 +15,9 @@
|
||||
},
|
||||
"widget-error": {
|
||||
"title": "Widgetin luonti epäonnistui"
|
||||
},
|
||||
"bundle-error": {
|
||||
"title": "Mukautetun skriptin lataus epäonnistui"
|
||||
}
|
||||
},
|
||||
"add_link": {
|
||||
|
||||
@ -587,7 +587,18 @@
|
||||
"october": "Octobre",
|
||||
"november": "Novembre",
|
||||
"december": "Décembre",
|
||||
"cannot_find_week_note": "Impossible de trouver la note de la semaine"
|
||||
"cannot_find_week_note": "Impossible de trouver la note de la semaine",
|
||||
"week": "Semaine",
|
||||
"week_previous": "Semaine précédente",
|
||||
"week_next": "Semaine suivante",
|
||||
"month": "Mois",
|
||||
"month_previous": "Mois précédent",
|
||||
"month_next": "Mois suivant",
|
||||
"year": "Année",
|
||||
"year_previous": "Année précédente",
|
||||
"year_next": "Année suivante",
|
||||
"list": "Liste",
|
||||
"today": "Aujourd'hui"
|
||||
},
|
||||
"close_pane_button": {
|
||||
"close_this_pane": "Fermer ce volet"
|
||||
@ -732,7 +743,8 @@
|
||||
"note_type": "Type de note",
|
||||
"editable": "Modifiable",
|
||||
"basic_properties": "Propriétés de base",
|
||||
"language": "Langage"
|
||||
"language": "Langage",
|
||||
"configure_code_notes": "Configurer les notes de code..."
|
||||
},
|
||||
"book_properties": {
|
||||
"view_type": "Type d'affichage",
|
||||
@ -747,7 +759,8 @@
|
||||
"book_properties": "Propriétés de la collection",
|
||||
"table": "Tableau",
|
||||
"geo-map": "Carte géographique",
|
||||
"board": "Tableau de bord"
|
||||
"board": "Tableau de bord",
|
||||
"include_archived_notes": "Afficher les notes archivées"
|
||||
},
|
||||
"edited_notes": {
|
||||
"no_edited_notes_found": "Aucune note modifiée ce jour-là...",
|
||||
@ -948,7 +961,9 @@
|
||||
"no_attachments": "Cette note ne contient aucune pièce jointe."
|
||||
},
|
||||
"book": {
|
||||
"no_children_help": "Cette note de type Livre n'a aucune note enfant, donc il n'y a rien à afficher. Consultez le <a href=\"https://triliumnext.github.io/Docs/Wiki/book-note.html\">wiki</a> pour plus de détails."
|
||||
"no_children_help": "Cette note de type Livre n'a aucune note enfant, donc il n'y a rien à afficher. Consultez le <a href=\"https://triliumnext.github.io/Docs/Wiki/book-note.html\">wiki</a> pour plus de détails.",
|
||||
"drag_locked_title": "Edition verrouillée",
|
||||
"drag_locked_message": "Le glisser-déposer n'est pas autorisé car l'édition de cette collection est verrouillé."
|
||||
},
|
||||
"editable_code": {
|
||||
"placeholder": "Saisir le contenu de votre note de code ici..."
|
||||
@ -1690,6 +1705,72 @@
|
||||
"anthropic_configuration": "Configuration Anthropic",
|
||||
"voyage_configuration": "Configuration IA Voyage",
|
||||
"voyage_url_description": "Défaut: https://api.voyageai.com/v1",
|
||||
"ollama_configuration": "Configuration Ollama"
|
||||
"ollama_configuration": "Configuration Ollama",
|
||||
"total_notes": "Notes totales",
|
||||
"progress": "Progrès",
|
||||
"queued_notes": "Notes dans la file d'attente",
|
||||
"refresh_stats": "Rafraîchir les statistiques",
|
||||
"enable_ai_features": "Activer les fonctionnalités IA/LLM",
|
||||
"enable_ai_description": "Activer les fonctionnalités IA telles que le résumé des notes, la génération de contenu et autres fonctionnalités LLM",
|
||||
"openai_tab": "OpenAI",
|
||||
"anthropic_tab": "Anthropic",
|
||||
"voyage_tab": "Voyage AI",
|
||||
"ollama_tab": "Ollama",
|
||||
"enable_ai": "Activer les fonctionnalités IA/LLM",
|
||||
"enable_ai_desc": "Activer les fonctionnalités IA telles que le résumé des notes, la génération de contenu et autres fonctionnalités LLM",
|
||||
"provider_configuration": "Configuration du fournisseur IA",
|
||||
"provider_precedence_description": "Liste de fournisseurs séparés par virgule, par ordre de préférence (ex. 'openai,anthopic,ollama')",
|
||||
"temperature": "Température",
|
||||
"temperature_description": "Contrôle de l'aléatoirité dans les réponses (0 = déterministe, 2 = hasard maximum)",
|
||||
"system_prompt": "Prompt système",
|
||||
"system_prompt_description": "Prompt système par défaut pour toutes les intéractions IA",
|
||||
"openai_configuration": "Configuration OpenAI",
|
||||
"openai_settings": "Options OpenAI",
|
||||
"api_key": "Clef API",
|
||||
"url": "URL de base",
|
||||
"model": "Modèle",
|
||||
"openai_api_key_description": "Votre clef API OpenAI pour accéder à leurs services IA",
|
||||
"anthropic_api_key_description": "Votre clef API Anthropic pour accéder aux modèles Claude",
|
||||
"default_model": "Modèle par défaut",
|
||||
"openai_model_description": "Exemples : gpt-4o, gpt-4-turbo, gpt-3.5-turbo",
|
||||
"base_url": "URL de base",
|
||||
"openai_url_description": "Défaut : https://api.openai.com/v1",
|
||||
"anthropic_settings": "Réglages Anthropic",
|
||||
"enable_ollama": "Activer Ollama",
|
||||
"enable_ollama_description": "Activer Ollama comme modèle d'IA local",
|
||||
"ollama_url": "URL Ollama",
|
||||
"ollama_model": "Modèle Ollama",
|
||||
"refresh_models": "Rafraîchir les modèles",
|
||||
"refreshing_models": "Mise à jour...",
|
||||
"enable_automatic_indexing": "Activer l'indexage automatique",
|
||||
"rebuild_index": "Rafraîchir l'index",
|
||||
"rebuild_index_error": "Erreur dans le démarrage du rafraichissement de l'index. Veuillez consulter les logs pour plus de détails.",
|
||||
"note_title": "Titre de la note",
|
||||
"error": "Erreur",
|
||||
"last_attempt": "Dernier essai",
|
||||
"actions": "Actions",
|
||||
"retry": "Réessayer",
|
||||
"partial": "Complété à {{ percentage }}%",
|
||||
"retry_queued": "Note ajoutée à la file d'attente",
|
||||
"retry_failed": "Echec de l'ajout de la note à la file d'attente",
|
||||
"max_notes_per_llm_query": "Notes maximum par requête",
|
||||
"max_notes_per_llm_query_description": "Nombre maximum de notes similaires à inclure dans le contexte IA",
|
||||
"active_providers": "Fournisseurs actifs",
|
||||
"disabled_providers": "Fournisseurs désactivés",
|
||||
"remove_provider": "Retirer le fournisseur de la recherche",
|
||||
"similarity_threshold": "Seuil de similarité",
|
||||
"similarity_threshold_description": "Seuil de similarité minimum (0-1) pour que inclure les notes dans le contexte d'une requête IA",
|
||||
"reprocess_index": "Rafraîchir l'index de recherche",
|
||||
"reprocessing_index": "Mise à jour...",
|
||||
"reprocess_index_started": "L'optimisation de l'indice de recherche à commencer en arrière-plan",
|
||||
"reprocess_index_error": "Erreur dans le rafraichissement de l'indice de recherche"
|
||||
},
|
||||
"ui-performance": {
|
||||
"title": "Performance",
|
||||
"enable-motion": "Activer les transitions et animations",
|
||||
"enable-shadows": "Activer les ombres",
|
||||
"enable-backdrop-effects": "Activer les effets d'arrière plan pour les menus, popups et panneaux",
|
||||
"enable-smooth-scroll": "Active le défilement fluide",
|
||||
"app-restart-required": "(redémarrer l'application pour appliquer les changements)"
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
"link_title_mirrors": "il titolo del collegamento rispecchia il titolo della nota corrente",
|
||||
"link_title_arbitrary": "il titolo del collegamento può essere modificato arbitrariamente",
|
||||
"link_title": "Titolo del collegamento",
|
||||
"button_add_link": "Aggiungi il collegamento <kbd>invio</kbd>",
|
||||
"button_add_link": "Aggiungi il collegamento",
|
||||
"help_on_links": "Aiuto sui collegamenti"
|
||||
},
|
||||
"branch_prefix": {
|
||||
|
||||
1
apps/client/src/translations/nb-NO/translation.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
||||
@ -1587,7 +1587,9 @@
|
||||
"ws": {
|
||||
"consistency-checks-failed": "Au fost identificate erori de consistență! Vedeți mai multe detalii în loguri.",
|
||||
"encountered-error": "A fost întâmpinată o eroare: „{{message}}”. Vedeți în loguri pentru mai multe detalii.",
|
||||
"sync-check-failed": "Verificările de sincronizare au eșuat!"
|
||||
"sync-check-failed": "Verificările de sincronizare au eșuat!",
|
||||
"lost-websocket-connection-title": "S-a pierdut conexiunea la server",
|
||||
"lost-websocket-connection-message": "Verificați configurația reverse proxy-ului (e.g. nginx sau Apache) astfel încât să permită comunicarea prin WebSocket."
|
||||
},
|
||||
"hoisted_note": {
|
||||
"confirm_unhoisting": "Notița dorită „{{requestedNote}}” este în afara ierarhiei notiței focalizate „{{hoistedNote}}”. Doriți defocalizarea pentru a accesa notița?"
|
||||
@ -1668,7 +1670,7 @@
|
||||
},
|
||||
"electron_integration": {
|
||||
"background-effects": "Activează efectele de fundal (doar pentru Windows 11)",
|
||||
"background-effects-description": "Efectul Mica adaugă un fundal estompat și elegant ferestrelor aplicațiilor, creând profunzime și un aspect modern.",
|
||||
"background-effects-description": "Efectul Mica adaugă un fundal estompat și elegant ferestrelor aplicațiilor, creând profunzime și un aspect modern. Opțiunea „Bară de titlu nativă” trebuie să fie dezactivată.",
|
||||
"desktop-application": "Aplicația desktop",
|
||||
"native-title-bar": "Bară de titlu nativă",
|
||||
"native-title-bar-description": "Pentru Windows și macOS, dezactivarea bării de titlu native face aplicația să pară mai compactă. Pe Linux, păstrarea bării integrează mai bine aplicația cu restul sistemului de operare.",
|
||||
@ -1956,7 +1958,11 @@
|
||||
"editorfeatures": {
|
||||
"title": "Funcții",
|
||||
"emoji_completion_enabled": "Activează auto-completarea pentru emoji-uri",
|
||||
"note_completion_enabled": "Activează auto-completarea pentru notițe"
|
||||
"note_completion_enabled": "Activează auto-completarea pentru notițe",
|
||||
"emoji_completion_description": "Dacă această funcție este pornită, emoji-urile pot fi inserate rapid prin tastarea caracterului „:”, urmat de denumirea emoji-ului.",
|
||||
"note_completion_description": "Dacă această funcție este pornită, se pot crea ușor legături către notițe prin tastarea „@”, urmată de titlul notiței dorite.",
|
||||
"slash_commands_enabled": "Activează comenzi rapide prin tasta slash",
|
||||
"slash_commands_description": "Dacă această funcție este pornită, se poate folosi tasta „/” pentru a rula rapid comenzi de editare precum inserarea de întreruperi de pagină sau titluri."
|
||||
},
|
||||
"table_view": {
|
||||
"new-row": "Rând nou",
|
||||
|
||||
@ -529,7 +529,7 @@
|
||||
"run_on_branch_creation": "выполняется при создании ветви. Ветвь — это связующее звено между родительской и дочерней заметками и создаётся, например, при клонировании или перемещении заметки.",
|
||||
"run_on_branch_change": "выполняется при обновлении ветки.",
|
||||
"run_on_attribute_creation": "выполняется, когда создается новый атрибут для заметки, определяющей это отношение",
|
||||
"run_on_attribute_change": "выполняется при изменении атрибута заметки, определяющей это отношение. Также срабатывает при удалении атрибута",
|
||||
"run_on_attribute_change": " выполняется при изменении атрибута заметки, определяющей это отношение. Также срабатывает при удалении атрибута",
|
||||
"relation_template": "атрибуты заметки будут унаследованы даже без родительско-дочерних отношений. Содержимое заметки и её поддерево будут добавлены к экземпляру заметки, если оно пустое. Подробности см. в документации.",
|
||||
"inherit": "атрибуты заметки будут унаследованы даже без родительско-дочерних отношений. См. описание шаблонных отношений для получения аналогичной информации. См. раздел «Наследование атрибутов» в документации.",
|
||||
"render_note": "заметки типа «Рендер HTML» будут отображаться с использованием кодовой заметки (HTML или скрипта), и необходимо указать с помощью этой связи, какую заметку следует отобразить",
|
||||
@ -585,7 +585,11 @@
|
||||
"editorfeatures": {
|
||||
"note_completion_enabled": "Включить автодополнение",
|
||||
"emoji_completion_enabled": "Включить автодополнение эмодзи",
|
||||
"title": "Особенности"
|
||||
"title": "Особенности",
|
||||
"slash_commands_description": "Если эта опция включена, команды редактирования, такие как вставка переносов строк или заголовков, можно переключать, вводя `/`.",
|
||||
"slash_commands_enabled": "Включить слэш-команды",
|
||||
"note_completion_description": "Если эта опция включена, ссылки на заметки можно создавать, вводя `@`, а затем название заметки.",
|
||||
"emoji_completion_description": "Если эта функция включена, эмодзи можно легко вставлять в текст, набрав `:`, а затем название эмодзи."
|
||||
},
|
||||
"cpu_arch_warning": {
|
||||
"dont_show_again": "Больше не показывать это предупреждение",
|
||||
|
||||
@ -136,7 +136,7 @@ ws.subscribeToMessages(async (message) => {
|
||||
id: id,
|
||||
title: t("export.export_status"),
|
||||
message: message,
|
||||
icon: "arrow-square-up-right"
|
||||
icon: "export"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ import Mark from "mark.js";
|
||||
import { DragData } from "../note_tree";
|
||||
import Component from "../../components/component";
|
||||
import toast, { ToastOptions } from "../../services/toast";
|
||||
import { ViewMode } from "../../services/link";
|
||||
|
||||
export function useTriliumEvent<T extends EventNames>(eventName: T, handler: (data: EventData<T>) => void) {
|
||||
const parentComponent = useContext(ParentComponent);
|
||||
@ -196,6 +197,7 @@ export function useNoteContext() {
|
||||
const [ noteContext, setNoteContext ] = useState<NoteContext>();
|
||||
const [ notePath, setNotePath ] = useState<string | null | undefined>();
|
||||
const [ note, setNote ] = useState<FNote | null | undefined>();
|
||||
const [ , setViewMode ] = useState<ViewMode>();
|
||||
const [ refreshCounter, setRefreshCounter ] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
@ -205,6 +207,7 @@ export function useNoteContext() {
|
||||
useTriliumEvents([ "setNoteContext", "activeContextChanged", "noteSwitchedAndActivated", "noteSwitched" ], ({ noteContext }) => {
|
||||
setNoteContext(noteContext);
|
||||
setNotePath(noteContext.notePath);
|
||||
setViewMode(noteContext.viewScope?.viewMode);
|
||||
});
|
||||
useTriliumEvent("frocaReloaded", () => {
|
||||
setNote(noteContext?.note);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import TypeWidget from "./type_widget.js";
|
||||
import appContext, { type EventData } from "../../components/app_context.js";
|
||||
import froca from "../../services/froca.js";
|
||||
import linkService from "../../services/link.js";
|
||||
import linkService, { type ViewScope } from "../../services/link.js";
|
||||
import contentRenderer from "../../services/content_renderer.js";
|
||||
import utils from "../../services/utils.js";
|
||||
import options from "../../services/options.js";
|
||||
@ -44,14 +44,14 @@ export default class AbstractTextTypeWidget extends TypeWidget {
|
||||
async openImageInNewTab($img: JQuery<HTMLElement>, activate: boolean = false) {
|
||||
const parsedImage = await this.parseFromImage($img);
|
||||
|
||||
if (parsedImage) {
|
||||
if (parsedImage?.noteId) {
|
||||
appContext.tabManager.openTabWithNoteWithHoisting(parsedImage.noteId, { activate, viewScope: parsedImage.viewScope });
|
||||
} else {
|
||||
window.open($img.prop("src"), "_blank");
|
||||
}
|
||||
}
|
||||
|
||||
async parseFromImage($img: JQuery<HTMLElement>) {
|
||||
async parseFromImage($img: JQuery<HTMLElement>): Promise<{ noteId?: string, viewScope: ViewScope } | null> {
|
||||
const imgSrc = $img.prop("src");
|
||||
|
||||
const imageNoteMatch = imgSrc.match(/\/api\/images\/([A-Za-z0-9_]+)\//);
|
||||
|
||||
@ -43,6 +43,6 @@
|
||||
"@electron-forge/maker-squirrel": "7.9.0",
|
||||
"@electron-forge/maker-zip": "7.9.0",
|
||||
"@electron-forge/plugin-auto-unpack-natives": "7.9.0",
|
||||
"prebuild-install": "^7.1.1"
|
||||
"prebuild-install": "7.1.3"
|
||||
}
|
||||
}
|
||||
@ -5,15 +5,15 @@
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"better-sqlite3": "12.4.1",
|
||||
"mime-types": "^3.0.0",
|
||||
"sanitize-filename": "^1.6.3",
|
||||
"tsx": "^4.19.3",
|
||||
"yargs": "^18.0.0"
|
||||
"mime-types": "3.0.1",
|
||||
"sanitize-filename": "1.6.3",
|
||||
"tsx": "4.20.6",
|
||||
"yargs": "18.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/better-sqlite3": "^7.6.11",
|
||||
"@types/mime-types": "^3.0.0",
|
||||
"@types/yargs": "^17.0.33"
|
||||
"@types/better-sqlite3": "7.6.13",
|
||||
"@types/mime-types": "3.0.1",
|
||||
"@types/yargs": "17.0.33"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "tsx src/main.ts",
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
"escape-html": "1.0.3",
|
||||
"express": "5.1.0",
|
||||
"express-http-proxy": "2.1.2",
|
||||
"express-openid-connect": "^2.17.1",
|
||||
"express-openid-connect": "2.19.2",
|
||||
"express-rate-limit": "8.1.0",
|
||||
"express-session": "1.18.2",
|
||||
"file-uri-to-path": "2.0.0",
|
||||
@ -97,7 +97,7 @@
|
||||
"html2plaintext": "2.1.4",
|
||||
"http-proxy-agent": "7.0.2",
|
||||
"https-proxy-agent": "7.0.6",
|
||||
"i18next": "25.5.2",
|
||||
"i18next": "25.5.3",
|
||||
"i18next-fs-backend": "2.6.0",
|
||||
"image-type": "6.0.0",
|
||||
"ini": "5.0.0",
|
||||
@ -110,7 +110,7 @@
|
||||
"multer": "2.0.2",
|
||||
"normalize-strings": "1.1.1",
|
||||
"ollama": "0.6.0",
|
||||
"openai": "5.12.0",
|
||||
"openai": "6.0.1",
|
||||
"rand-token": "1.0.1",
|
||||
"safe-compare": "1.1.4",
|
||||
"sanitize-filename": "1.6.3",
|
||||
@ -123,11 +123,11 @@
|
||||
"supertest": "7.1.4",
|
||||
"swagger-jsdoc": "6.2.8",
|
||||
"swagger-ui-express": "5.0.1",
|
||||
"time2fa": "^1.3.0",
|
||||
"time2fa": "1.4.2",
|
||||
"tmp": "0.2.5",
|
||||
"turndown": "7.2.1",
|
||||
"unescape": "1.0.1",
|
||||
"vite": "^7.1.3",
|
||||
"vite": "7.1.7",
|
||||
"ws": "8.18.3",
|
||||
"xml2js": "0.6.2",
|
||||
"yauzl": "3.2.0"
|
||||
|
||||
2
apps/server/src/assets/doc_notes/en/User Guide/!!!meta.json
generated
vendored
58
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html
generated
vendored
@ -6,22 +6,19 @@ class="image">
|
||||
<img style="aspect-ratio:1144/660;" src="Sharing_image.png" width="1144"
|
||||
height="660">
|
||||
</figure>
|
||||
<h2>Features, interaction and limitations</h2>
|
||||
|
||||
<h2>Features, interaction and limitations</h2>
|
||||
<ul>
|
||||
<li data-list-item-id="e865d86fdfe94260d08e3631d5b36047f">Searching by note title.</li>
|
||||
<li data-list-item-id="e13b5deb15035a950c34a64d66ca76459">Automatic dark/light mode based on the user's browser settings.</li>
|
||||
<li
|
||||
data-list-item-id="eae144f08e29157dad576c0011d14f99d">Mobile-friendly layout, with sidebar.</li>
|
||||
<li data-list-item-id="e25712924a5a1322c8b903f832475bf0a">Collapsible tree with the same note icons as the application.</li>
|
||||
<li
|
||||
data-list-item-id="ed9e131634923af3f9811002b4efb6f83">Customizable logo.</li>
|
||||
<li data-list-item-id="ef52ad44bbd9f39ac8884848c8ac94c02">Toggle button for dark/light mode, which also stores the user preferences.</li>
|
||||
<li
|
||||
data-list-item-id="e80f263d244ef7c4ecdff6b5d08804eab">Quick navigation buttons (previous and next note).</li>
|
||||
<li data-list-item-id="e2db5592f720a18e9609e2d97ab687bf1">Displaying the date of the last update of the note.</li>
|
||||
<li>Searching by note title.</li>
|
||||
<li>Automatic dark/light mode based on the user's browser settings.</li>
|
||||
<li>Mobile-friendly layout, with sidebar.</li>
|
||||
<li>Collapsible tree with the same note icons as the application.</li>
|
||||
<li>Customizable logo.</li>
|
||||
<li>Toggle button for dark/light mode, which also stores the user preferences.</li>
|
||||
<li>Quick navigation buttons (previous and next note).</li>
|
||||
<li>Displaying the date of the last update of the note.</li>
|
||||
</ul>
|
||||
<h3>By note type</h3>
|
||||
<figure class="table">
|
||||
<table class="ck-table-resized">
|
||||
<colgroup>
|
||||
<col style="width:19.92%;">
|
||||
@ -45,11 +42,12 @@ class="image">
|
||||
<li data-list-item-id="e9707fdfa2c92d66690cf932f7e647253">Syntax highlight of code blocks, provided a language is selected (does
|
||||
not work if “Auto-detected” is enabled).</li>
|
||||
<li data-list-item-id="e84420a10c6d64bd107edb6e867c91d4b">Rendering for math equations.</li>
|
||||
<li data-list-item-id="e10834dcd0619d77ae2e94d3695bedf58"><a href="#root/_help_nBAXQFj20hS1">Including notes</a> (only if the included
|
||||
notes are also shared).</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li data-list-item-id="ecbc365d4886911af8859ccd0e1bbc465">Including notes is not supported.</li>
|
||||
<li data-list-item-id="e41cc4139377f9f88d653d1eb8ca47bb4">Inline Mermaid diagrams are not rendered.</li>
|
||||
</ul>
|
||||
</td>
|
||||
@ -168,15 +166,13 @@ class="image">
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
<p>While the sharing feature is powerful, it has some limitations:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e2312093b1e13d2599a9ba5032b61eb0a"><strong>Code Notes</strong>: No syntax highlighting.</li>
|
||||
<li class="ck-list-marker-bold"
|
||||
data-list-item-id="e98268625774f3e965d611ae78200368c"><strong>Static Note Tree</strong>
|
||||
<li><strong>Code Notes</strong>: No syntax highlighting.</li>
|
||||
<li><strong>Static Note Tree</strong>
|
||||
</li>
|
||||
<li data-list-item-id="e9664263c42aa5c17dd020ea6bc9c2331"><strong>Protected Notes</strong>: Cannot be shared.</li>
|
||||
<li data-list-item-id="e253afa5417e7d2662da0ac5c2050ab5b"><strong>Include Notes</strong>: Not supported.</li>
|
||||
<li><strong>Protected Notes</strong>: Cannot be shared.</li>
|
||||
<li><strong>Include Notes</strong>: Not supported.</li>
|
||||
</ul>
|
||||
<p>Some of these limitations may be addressed in future updates.</p>
|
||||
<h2>Prerequisites</h2>
|
||||
@ -185,7 +181,7 @@ class="image">
|
||||
This is necessary because the notes will be hosted from the server.</p>
|
||||
<h2>Sharing a note</h2>
|
||||
<ol>
|
||||
<li data-list-item-id="ef366c658e86436a1c6e1c41d14ba5d52">
|
||||
<li>
|
||||
<p><strong>Enable Sharing</strong>: To share a note, toggle the <code>Shared</code> switch
|
||||
within the note's interface. Once sharing is enabled, an URL will appear,
|
||||
which you can click to access the shared note.</p>
|
||||
@ -193,9 +189,11 @@ class="image">
|
||||
<img src="Sharing_share-single-note.png" alt="Share Note">
|
||||
</p>
|
||||
</li>
|
||||
<li data-list-item-id="ed6d52c6af04e448e70c75fcafc74e579"><strong>Access the Shared Note</strong>: The link provided will open the
|
||||
<li>
|
||||
<p><strong>Access the Shared Note</strong>: The link provided will open the
|
||||
note in your browser. If your server is not configured with a public IP,
|
||||
the URL will refer to <code>localhost (127.0.0.1)</code>.</li>
|
||||
the URL will refer to <code>localhost (127.0.0.1)</code>.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h2>Sharing a note subtree</h2>
|
||||
<p>When you share a note, you actually share the entire subtree of notes
|
||||
@ -221,13 +219,12 @@ class="image">
|
||||
<p>The default design should be a good starting point, but you can customize
|
||||
it using your own CSS:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="eafdf40b502bfe064f8b75b3e1be2e092"><strong>Custom CSS</strong>: Link a CSS <a class="reference-link"
|
||||
<li><strong>Custom CSS</strong>: Link a CSS <a class="reference-link"
|
||||
href="#root/_help_6f9hih2hXXZk">Code</a> note to the shared page by
|
||||
adding a <code>~shareCss</code> relation to the note. If you want this style
|
||||
to apply to the entire subtree, make the label inheritable. You can hide
|
||||
the CSS code note from the tree navigation by adding the <code>#shareHiddenFromTree</code> label.</li>
|
||||
<li
|
||||
data-list-item-id="e228b06548a3174c9367e47c741c627b4"><strong>Omitting Default CSS</strong>: For extensive styling changes,
|
||||
<li><strong>Omitting Default CSS</strong>: For extensive styling changes,
|
||||
use the <code>#shareOmitDefaultCss</code> label to avoid conflicts with Trilium's
|
||||
<a
|
||||
href="#root/_help_Wy267RK4M69c">default stylesheet</a>.</li>
|
||||
@ -250,8 +247,8 @@ for (const attr of parentNote.attributes) {
|
||||
This will change the URL to <code>http://domain.tld/share/highlighting</code>.</p>
|
||||
<p><strong>Important</strong>:</p>
|
||||
<ol>
|
||||
<li data-list-item-id="e51281f9bb5d53a9e9eb8e54b48ec8793">Ensure that aliases are unique.</li>
|
||||
<li data-list-item-id="e75aef50730416cfd9764769de2780895">Using slashes (<code>/</code>) within aliases to create subpaths is not
|
||||
<li>Ensure that aliases are unique.</li>
|
||||
<li>Using slashes (<code>/</code>) within aliases to create subpaths is not
|
||||
supported.</li>
|
||||
</ol>
|
||||
<h3>Setting a custom favicon</h3>
|
||||
@ -274,7 +271,6 @@ for (const attr of parentNote.attributes) {
|
||||
When viewed, the list of shared roots will be displayed at the bottom of
|
||||
the note.</p>
|
||||
<h2>Attribute reference</h2>
|
||||
<figure class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -350,8 +346,8 @@ for (const attr of parentNote.attributes) {
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
<h2>Credits</h2>
|
||||
|
||||
<h2>Credits</h2>
|
||||
<p>Since v0.95.0, a new theme was introduced (and enabled by default) which
|
||||
greatly improves the visual aspect of the Share feature, as well as its
|
||||
functionality (such as mobile support, dark/light mode, collapsible tree,
|
||||
|
||||
@ -6,3 +6,10 @@
|
||||
look for the
|
||||
<img src="Include Note_image.png">button. There is also a keyboard shortcut defined for it but it is not
|
||||
allocated by default.</p>
|
||||
<h2>Included notes in the share functionality</h2>
|
||||
<p>If a <a href="#root/_help_R9pX4DGra2Vt">shared note</a> contains one or
|
||||
more included notes, they will be displayed in the content of the note
|
||||
as if they were part of the note itself.</p>
|
||||
<p>For this to work, the included notes must also be shared, otherwise they
|
||||
will not be shown. However, the included notes can still be hidden from
|
||||
the note tree via <code>#shareHiddenFromTree</code>.</p>
|
||||
@ -6,12 +6,6 @@
|
||||
the
|
||||
<img src="1_Math Equations_image.png" width="20" height="15">button from the <a class="reference-link" href="#root/_help_nRhnJkTT8cPs">Formatting toolbar</a> (generally
|
||||
found under the <a class="reference-link" href="#root/_help_CohkqWQC1iBv">Insert buttons</a>).</p>
|
||||
<p>If inserting equations frequently, using the <kbd>Ctrl</kbd>+<kbd>M</kbd> keyboard
|
||||
shortcut can be more comfortable. Alternatively, type <code>$$</code> or <code>\[</code> to
|
||||
trigger the popup directly.</p>
|
||||
<p>There is currently no quick way to insert an equation, such as surrounding
|
||||
it with <code>$</code> or pressing <kbd>Ctrl</kbd>+<kbd>M</kbd> on an already
|
||||
typed-out equation.</p>
|
||||
<p>The mathematical expression must be written in the TeX format. There is
|
||||
no visual editor for the math equations, only a preview. </p>
|
||||
<p>Enabling <em>Display mode</em> will render the equation slightly bigger
|
||||
@ -19,6 +13,12 @@
|
||||
center it. Display mode equations will act as blocks (i.e. like paragraphs,
|
||||
or tables) and can be inserted for example in lists. Non-display equations
|
||||
can be part of the text.</p>
|
||||
<h2>Keyboard shortcuts</h2>
|
||||
<p>If inserting equations frequently, using the <kbd>Ctrl</kbd>+<kbd>M</kbd> keyboard
|
||||
shortcut can be more comfortable. Alternatively, type <code>$$</code> or <code>\[</code> to
|
||||
trigger the popup directly.</p>
|
||||
<p>There is currently no quick way to turn an already typed-out equation,
|
||||
such as surrounding it with <code>$</code> or pressing <kbd>Ctrl</kbd>+<kbd>M</kbd>.</p>
|
||||
<h2>Supported math features</h2>
|
||||
<p>Technically we are using the KaTeX library which allows for a subset of
|
||||
the TeX format. To see the full list of supported features, consult the
|
||||
@ -27,8 +27,12 @@
|
||||
the official documentation.</p>
|
||||
<h2>Markdown support</h2>
|
||||
<p>Math equations will be preserved when exporting to or importing from Markdown,
|
||||
surrounded by <code>\(</code> characters for inline math expressions, and <code>$\)</code> for
|
||||
surrounded by <code>$</code> characters for inline math expressions, and <code>$$</code> for
|
||||
display mode.</p>
|
||||
<p>If you notice any issue with the Markdown import/export for equations,
|
||||
feel free to <a href="#root/_help_wy8So3yZZlH9">report</a> it while providing
|
||||
the equation that causes issues.</p>
|
||||
<h2>Formatting the equation</h2>
|
||||
<p>It is possible to customize the font size and foreground color for both
|
||||
inline and display-mode equations, just like any other text. For inline
|
||||
equations, the background color/highlight can also be adjusted.</p>
|
||||
24
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Logging.html
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
<p>Both front-end and back-end notes can log messages for debugging.</p>
|
||||
<h2>UI logging via <code>api.log</code></h2>
|
||||
<figure class="image image_resized image-style-align-center" style="width:57.74%;">
|
||||
<img style="aspect-ratio:749/545;" src="Logging_image.png" width="749"
|
||||
height="545">
|
||||
</figure>
|
||||
<p>The API log feature integrates with the script editor and it displays
|
||||
all the messages logged via <code>api.log</code>. This works for both back-end
|
||||
and front-end scripts.</p>
|
||||
<p>The API log panel will appear after executing a script that uses <code>api.log</code> and
|
||||
it can be dismissed temporarily by pressing the close button in the top-right
|
||||
of the panel.</p>
|
||||
<p>Apart from strings, an object can be passed as well in which case it will
|
||||
be pretty-formatted if possible (e.g. recursive objects are not supported).</p>
|
||||
<h2>Console logging</h2>
|
||||
<p>For logs that are not directly visible to the user, the standard <code>console.log</code> can
|
||||
be used as well.</p>
|
||||
<ul>
|
||||
<li>For front-end scripts, the log will be shown in the Developer Tools (also
|
||||
known as Inspect).</li>
|
||||
<li>For back-end scripts, the log will be shown in the server output while
|
||||
running but <strong>will not</strong> be visible in the <a class="reference-link"
|
||||
href="#root/_help_bnyigUA2UK7s">Backend (server) logs</a>.</li>
|
||||
</ul>
|
||||
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Logging_image.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 3.9 KiB |
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/3_Custom app-wide CSS_image.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
@ -1,10 +1,11 @@
|
||||
<p>It is possible to provide a CSS file to be used regardless of the theme
|
||||
set by the user.</p>
|
||||
<table>
|
||||
<figure class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -16,38 +17,76 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="1_Custom app-wide CSS_image.png">
|
||||
<img src="2_Custom app-wide CSS_image.png">
|
||||
</td>
|
||||
<td>In the ribbon, press the “Owned Attributes” section and type <code>#appCss</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="2_Custom app-wide CSS_image.png">
|
||||
<img src="3_Custom app-wide CSS_image.png">
|
||||
</td>
|
||||
<td>Type the desired CSS.
|
||||
<td>Type the desired CSS.
|
||||
<br>
|
||||
<br>Generally it's a good idea to append <code>!important</code> for the styles
|
||||
that are being changed, in order to prevent other</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</table>
|
||||
</figure>
|
||||
<h2>Seeing the changes</h2>
|
||||
<p>Adding a new <em>app CSS note</em> or modifying an existing one does not
|
||||
immediately apply changes. To see the changes, press Ctrl+Shift+R to refresh
|
||||
the page first.</p>
|
||||
<h2>Example use-case: customizing the printing stylesheet</h2>
|
||||
<h2>Sample use cases</h2>
|
||||
<h3>Customizing the printing stylesheet</h3>
|
||||
<p>When printing a document or exporting as PDF, it is possible to adjust
|
||||
the style by creating a CSS note that uses the <code>@media</code> selector.</p>
|
||||
<p>For example, to change the font of the document from the one defined by
|
||||
the theme or the user to a serif one:</p><pre><code class="language-text-x-trilium-auto">@media print {
|
||||
|
||||
body {
|
||||
|
||||
--main-font-family: serif !important;
|
||||
|
||||
--detail-font-family: var(--main-font-family) !important;
|
||||
|
||||
}
|
||||
|
||||
}</code></pre>
|
||||
<h3>Per-workspace styles</h3>
|
||||
<p>When using <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/wArbEsdSae6g/_help_9sRHySam5fXb">Workspaces</a>,
|
||||
it can be helpful to create a visual distinction between notes in different
|
||||
workspaces.</p>
|
||||
<p>To do so:</p>
|
||||
<ol>
|
||||
<li data-list-item-id="ebe7118e85ce0b3102e4333aef27c637d">In the note with <code>#workspace</code>, add an inheritable attribute <code>#cssClass(inheritable)</code> with
|
||||
a value that uniquely identifies the workspace (say <code>my-workspace</code>).</li>
|
||||
<li
|
||||
data-list-item-id="e690ba825e168c5ec987f98c15f9b7a99">Anywhere in the note structure, create a CSS note with <code>#appCss</code>.</li>
|
||||
</ol>
|
||||
<h4>Change the color of the icons in the <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_oPVyFC7WL2Lp">Note Tree</a></h4><pre><code class="language-text-x-trilium-auto">.fancytree-node.my-workspace.fancytree-custom-icon {
|
||||
color: #ff0000;
|
||||
}</code></pre>
|
||||
<h4>Change the color of the note title and the icon</h4>
|
||||
<p>To change the color of the note title and the icon (above the content):</p><pre><code class="language-text-x-trilium-auto">.note-split.my-workspace .note-icon-widget button.note-icon,
|
||||
.note-split.my-workspace .note-title-widget input.note-title {
|
||||
color: #ff0000;
|
||||
}</code></pre>
|
||||
<h4>Add a watermark to the note content</h4>
|
||||
<figure class="image image-style-align-right image_resized" style="width:39.97%;">
|
||||
<img style="aspect-ratio:641/630;" src="1_Custom app-wide CSS_image.png"
|
||||
width="641" height="630">
|
||||
</figure>
|
||||
<ol>
|
||||
<li data-list-item-id="e9796dcbe19c3b9d39839533989b9e104">Insert an image in any note and take the URL of the image.</li>
|
||||
<li data-list-item-id="e8da975b80585c42193516ee5d8d8a56c">Use the following CSS, adjusting the <code>background-image</code> and <code>width</code> and <code>height</code> to
|
||||
the desired values.</li>
|
||||
</ol><pre><code class="language-text-x-trilium-auto">.note-split.my-workspace .scrolling-container:after {
|
||||
position: fixed;
|
||||
content: "";
|
||||
background-image: url("/api/attachments/Rvm3zJNITQI1/image/logo.png");
|
||||
background-size: contain;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
width: 237px;
|
||||
height: 44px;
|
||||
bottom: 1em;
|
||||
right: 1em;
|
||||
opacity: 0.5;
|
||||
z-index: 0;
|
||||
}</code></pre>
|
||||
@ -424,5 +424,12 @@
|
||||
"board_status_todo": "Por hacer",
|
||||
"board_status_done": "Hecho",
|
||||
"board": "Tablero"
|
||||
},
|
||||
"sql_init": {
|
||||
"db_not_initialized_desktop": "Base de datos no inicializada, por favor, siga las instrucciones en pantalla.",
|
||||
"db_not_initialized_server": "Base de datos no inicializada, por favor, visite la página de configuración - http://[your-server-host]:{{port}} para ver instrucciones sobre cómo inicializar Trilium."
|
||||
},
|
||||
"desktop": {
|
||||
"instance_already_running": "Ya hay una instancia en ejecución, enfocando esa instancia en su lugar."
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,9 @@
|
||||
"back-in-note-history": "Palaa edelliseen muistiinpanoon",
|
||||
"forward-in-note-history": "Siirry seuraavaan muistiinpanoon",
|
||||
"open-jump-to-note-dialog": "Avaa \"Siirry muistiinpanoon\" -dialogi",
|
||||
"scroll-to-active-note": "Näytä aktiivinen muistiinpano puunäkymässä"
|
||||
"scroll-to-active-note": "Näytä aktiivinen muistiinpano puunäkymässä",
|
||||
"move-note-down": "Siirrä muistiinpanoa alaspäin",
|
||||
"move-note-up-in-hierarchy": "Siirrä muistiinpanoa hierarkiassa ylöspäin",
|
||||
"move-note-down-in-hierarchy": "Siirrä muistiinpanoa hierarkiassa alaspäin"
|
||||
}
|
||||
}
|
||||
|
||||
@ -376,5 +376,12 @@
|
||||
"reset-zoom-level": "Réinitilaliser le zoom",
|
||||
"copy-without-formatting": "Copier sans mise en forme",
|
||||
"force-save-revision": "Forcer la sauvegarde de la révision"
|
||||
},
|
||||
"sql_init": {
|
||||
"db_not_initialized_desktop": "Base de données non initialisée, merci de suivre les instructions à l'écran.",
|
||||
"db_not_initialized_server": "Base de données non initialisée, veuillez visitez - http://[your-server-host]:{{port}} pour consulter les instructions d'initialisation de Trilium."
|
||||
},
|
||||
"desktop": {
|
||||
"instance_already_running": "Une instance est déjà en cours d'execution, ouverture de cette instance à la place."
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
"paste-markdown-into-text": "Incolla il Markdown dagli appunti nella nota di testo",
|
||||
"cut-into-note": "Taglia la selezione dalla nota corrente e crea una sotto nota col testo selezionato",
|
||||
"add-include-note-to-text": "Apre la finestra di dialogo per includere una nota",
|
||||
"edit-readonly-note": "Modifica una nota di sola lettura",
|
||||
"edit-readonly-note": "Modifica una nota in sola lettura",
|
||||
"attributes-labels-and-relations": "Attributi (etichette e relazioni)",
|
||||
"add-new-label": "Crea una nuova etichetta",
|
||||
"create-new-relation": "Crea una nuova relazione",
|
||||
|
||||
1
apps/server/src/assets/translations/nb-NO/server.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
||||
@ -428,5 +428,8 @@
|
||||
"sql_init": {
|
||||
"db_not_initialized_desktop": "Baza de date nu este inițializată, urmați instrucțiunile de pe ecran.",
|
||||
"db_not_initialized_server": "Baza de date nu este inițializată, vizitați pagina de inițializare la http://[your-server-host]:{{port}}, ce conține instrucțiuni despre inițializarea aplicației."
|
||||
},
|
||||
"desktop": {
|
||||
"instance_already_running": "Se focalizează o instanță a aplicației deja existentă."
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,6 +23,7 @@ import exportService from "./export/zip.js";
|
||||
import syncMutex from "./sync_mutex.js";
|
||||
import backupService from "./backup.js";
|
||||
import optionsService from "./options.js";
|
||||
import { formatLogMessage } from "@triliumnext/commons";
|
||||
import type BNote from "../becca/entities/bnote.js";
|
||||
import type AbstractBeccaEntity from "../becca/entities/abstract_becca_entity.js";
|
||||
import type BBranch from "../becca/entities/bbranch.js";
|
||||
@ -221,7 +222,7 @@ export interface Api {
|
||||
/**
|
||||
* Log given message to trilium logs and log pane in UI
|
||||
*/
|
||||
log(message: string): void;
|
||||
log(message: string | object): void;
|
||||
|
||||
/**
|
||||
* Returns root note of the calendar.
|
||||
@ -556,7 +557,8 @@ function BackendScriptApi(this: Api, currentNote: BNote, apiParams: ApiParams) {
|
||||
this.logMessages = {};
|
||||
this.logSpacedUpdates = {};
|
||||
|
||||
this.log = (message) => {
|
||||
this.log = (rawMessage) => {
|
||||
const message = formatLogMessage(rawMessage);
|
||||
log.info(message);
|
||||
|
||||
if (!this.startNote) {
|
||||
|
||||
@ -5,6 +5,7 @@ import { getOpenAIOptions } from './providers.js';
|
||||
import OpenAI from 'openai';
|
||||
import { PROVIDER_PROMPTS } from '../constants/llm_prompt_constants.js';
|
||||
import log from '../../log.js';
|
||||
import { ChatCompletionMessageFunctionToolCall } from 'openai/resources/index.mjs';
|
||||
|
||||
export class OpenAIService extends BaseAIService {
|
||||
private openai: OpenAI | null = null;
|
||||
@ -101,7 +102,7 @@ export class OpenAIService extends BaseAIService {
|
||||
log.info('OpenAI API Stream Started');
|
||||
|
||||
// Create a closure to hold accumulated tool calls
|
||||
const accumulatedToolCalls: OpenAI.Chat.ChatCompletionMessageToolCall[] = [];
|
||||
const accumulatedToolCalls: OpenAI.Chat.ChatCompletionMessageFunctionToolCall[] = [];
|
||||
|
||||
// Return a response with the stream handler
|
||||
const response: ChatResponse = {
|
||||
@ -201,7 +202,7 @@ export class OpenAIService extends BaseAIService {
|
||||
completeText = content;
|
||||
|
||||
// Check if there are tool calls in the non-stream response
|
||||
const toolCalls = stream.choices[0]?.message?.tool_calls;
|
||||
const toolCalls = stream.choices[0]?.message?.tool_calls as ChatCompletionMessageFunctionToolCall[];
|
||||
if (toolCalls) {
|
||||
response.tool_calls = toolCalls;
|
||||
console.log('OpenAI API Tool Calls in Non-iterable Response:', JSON.stringify(toolCalls, null, 2));
|
||||
@ -251,7 +252,7 @@ export class OpenAIService extends BaseAIService {
|
||||
completionTokens: completion.usage?.completion_tokens,
|
||||
totalTokens: completion.usage?.total_tokens
|
||||
},
|
||||
tool_calls: completion.choices[0].message.tool_calls
|
||||
tool_calls: completion.choices[0].message.tool_calls as ChatCompletionMessageFunctionToolCall[]
|
||||
};
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@ -8,17 +8,17 @@
|
||||
"preview": "pnpm build && vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.26.9",
|
||||
"preact-iso": "^2.10.0",
|
||||
"preact-render-to-string": "^6.6.1"
|
||||
"preact": "10.27.2",
|
||||
"preact-iso": "2.11.0",
|
||||
"preact-render-to-string": "6.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@preact/preset-vite": "^2.10.2",
|
||||
"eslint": "^9.36.0",
|
||||
"eslint-config-preact": "^2.0.0",
|
||||
"typescript": "^5.9.2",
|
||||
"@preact/preset-vite": "2.10.2",
|
||||
"eslint": "9.36.0",
|
||||
"eslint-config-preact": "2.0.0",
|
||||
"typescript": "5.9.3",
|
||||
"user-agent-data-types": "0.4.2",
|
||||
"vite": "^7.0.4"
|
||||
"vite": "7.1.7"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "preact"
|
||||
|
||||
120
docs/User Guide/!!!meta.json
vendored
@ -6276,6 +6276,13 @@
|
||||
"value": "nRhnJkTT8cPs",
|
||||
"isInheritable": false,
|
||||
"position": 10
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "R9pX4DGra2Vt",
|
||||
"isInheritable": false,
|
||||
"position": 20
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
@ -9559,7 +9566,22 @@
|
||||
"isExpanded": false,
|
||||
"type": "text",
|
||||
"mime": "text/html",
|
||||
"attributes": [],
|
||||
"attributes": [
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "9sRHySam5fXb",
|
||||
"isInheritable": false,
|
||||
"position": 10
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "oPVyFC7WL2Lp",
|
||||
"isInheritable": false,
|
||||
"position": 20
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
"dataFileName": "Custom app-wide CSS.md",
|
||||
"attachments": [
|
||||
@ -9572,7 +9594,7 @@
|
||||
"dataFileName": "Custom app-wide CSS_image.png"
|
||||
},
|
||||
{
|
||||
"attachmentId": "TIerrMjmeich",
|
||||
"attachmentId": "qBzZ9Qpxwoba",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/png",
|
||||
@ -9580,12 +9602,20 @@
|
||||
"dataFileName": "1_Custom app-wide CSS_image.png"
|
||||
},
|
||||
{
|
||||
"attachmentId": "YUrNq5vsCwHe",
|
||||
"attachmentId": "TIerrMjmeich",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/png",
|
||||
"position": 10,
|
||||
"dataFileName": "2_Custom app-wide CSS_image.png"
|
||||
},
|
||||
{
|
||||
"attachmentId": "YUrNq5vsCwHe",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/png",
|
||||
"position": 10,
|
||||
"dataFileName": "3_Custom app-wide CSS_image.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -10360,122 +10390,129 @@
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "6f9hih2hXXZk",
|
||||
"value": "nBAXQFj20hS1",
|
||||
"isInheritable": false,
|
||||
"position": 20
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "m523cpzocqaD",
|
||||
"value": "6f9hih2hXXZk",
|
||||
"isInheritable": false,
|
||||
"position": 30
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "iRwzGnHPzonm",
|
||||
"value": "m523cpzocqaD",
|
||||
"isInheritable": false,
|
||||
"position": 40
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "bdUJEHsAPYQR",
|
||||
"value": "iRwzGnHPzonm",
|
||||
"isInheritable": false,
|
||||
"position": 50
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "HcABDtFCkbFN",
|
||||
"value": "bdUJEHsAPYQR",
|
||||
"isInheritable": false,
|
||||
"position": 60
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "GTwFsgaA0lCt",
|
||||
"value": "HcABDtFCkbFN",
|
||||
"isInheritable": false,
|
||||
"position": 70
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "s1aBHPd79XYj",
|
||||
"value": "GTwFsgaA0lCt",
|
||||
"isInheritable": false,
|
||||
"position": 80
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "grjYqerjn243",
|
||||
"value": "s1aBHPd79XYj",
|
||||
"isInheritable": false,
|
||||
"position": 90
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "1vHRoWCEjj0L",
|
||||
"value": "grjYqerjn243",
|
||||
"isInheritable": false,
|
||||
"position": 100
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "gBbsAeiuUxI5",
|
||||
"value": "1vHRoWCEjj0L",
|
||||
"isInheritable": false,
|
||||
"position": 110
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "81SGnPGMk7Xc",
|
||||
"value": "gBbsAeiuUxI5",
|
||||
"isInheritable": false,
|
||||
"position": 120
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "W8vYD3Q1zjCR",
|
||||
"value": "81SGnPGMk7Xc",
|
||||
"isInheritable": false,
|
||||
"position": 130
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "WOcw2SLH6tbX",
|
||||
"value": "W8vYD3Q1zjCR",
|
||||
"isInheritable": false,
|
||||
"position": 140
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "x3i7MxGccDuM",
|
||||
"value": "WOcw2SLH6tbX",
|
||||
"isInheritable": false,
|
||||
"position": 150
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "bwZpz2ajCEwO",
|
||||
"value": "x3i7MxGccDuM",
|
||||
"isInheritable": false,
|
||||
"position": 160
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "Wy267RK4M69c",
|
||||
"value": "bwZpz2ajCEwO",
|
||||
"isInheritable": false,
|
||||
"position": 170
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "Qjt68inQ2bRj",
|
||||
"value": "Wy267RK4M69c",
|
||||
"isInheritable": false,
|
||||
"position": 180
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "Qjt68inQ2bRj",
|
||||
"isInheritable": false,
|
||||
"position": 190
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "shareAlias",
|
||||
@ -13195,6 +13232,49 @@
|
||||
"attachments": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"isClone": false,
|
||||
"noteId": "vElnKeDNPSVl",
|
||||
"notePath": [
|
||||
"pOsGYCXsbNQG",
|
||||
"CdNpE2pqjmI6",
|
||||
"vElnKeDNPSVl"
|
||||
],
|
||||
"title": "Logging",
|
||||
"notePosition": 100,
|
||||
"prefix": null,
|
||||
"isExpanded": false,
|
||||
"type": "text",
|
||||
"mime": "text/html",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "bnyigUA2UK7s",
|
||||
"isInheritable": false,
|
||||
"position": 10
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "iconClass",
|
||||
"value": "bx bx-terminal",
|
||||
"isInheritable": false,
|
||||
"position": 20
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
"dataFileName": "Logging.md",
|
||||
"attachments": [
|
||||
{
|
||||
"attachmentId": "OFVZwVeITJOR",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/png",
|
||||
"position": 10,
|
||||
"dataFileName": "Logging_image.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ Trilium allows you to share selected notes as **publicly accessible** read-only
|
||||
|
||||
### By note type
|
||||
|
||||
<table class="ck-table-resized"><colgroup><col style="width:19.92%;"><col style="width:41.66%;"><col style="width:38.42%;"></colgroup><thead><tr><th> </th><th>Supported features</th><th>Limitations</th></tr></thead><tbody><tr><th><a class="reference-link" href="../Note%20Types/Text.md">Text</a></th><td><ul><li data-list-item-id="e26b4ce9ba4e9dfe224d04e0f341925ed">Table of contents.</li><li data-list-item-id="e9707fdfa2c92d66690cf932f7e647253">Syntax highlight of code blocks, provided a language is selected (does not work if “Auto-detected” is enabled).</li><li data-list-item-id="e84420a10c6d64bd107edb6e867c91d4b">Rendering for math equations.</li></ul></td><td><ul><li data-list-item-id="ecbc365d4886911af8859ccd0e1bbc465">Including notes is not supported.</li><li data-list-item-id="e41cc4139377f9f88d653d1eb8ca47bb4">Inline Mermaid diagrams are not rendered.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Code.md">Code</a></th><td><ul><li data-list-item-id="e291ae6d5130677b4c99f7c3bdbe974b4">Basic support (displaying the contents of the note in a monospace font).</li></ul></td><td><ul><li data-list-item-id="e0270680bbdd7a129306e61e11691e36d">No syntax highlight.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Saved%20Search.md">Saved Search</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Relation%20Map.md">Relation Map</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Note%20Map.md">Note Map</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Render%20Note.md">Render Note</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Collections.md">Collections</a></th><td><ul><li data-list-item-id="ea031e1d4149eb443ace756234490c5a4">The child notes are displayed in a fixed format. </li></ul></td><td><ul><li data-list-item-id="ea4a9d424aec2afbaecc07bbf64b7bebd">More advanced view types such as the calendar view are not supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a></th><td><ul><li data-list-item-id="e582d283f2b1b30cbe5ae35d8e01b2bf2">The diagram is displayed as a vector image.</li></ul></td><td><ul><li data-list-item-id="e33268686446e3c217077201bb5964364">No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a></th><td><ul><li data-list-item-id="e443dd0e97c30cb12c77e8906a71569ea">The diagram is displayed as a vector image.</li></ul></td><td><ul><li data-list-item-id="efe151ef3f3826c825416417525fb5fb2">No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Web%20View.md">Web View</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Mind%20Map.md">Mind Map</a></th><td>The diagram is displayed as a vector image.</td><td><ul><li data-list-item-id="ed3b4fb473042f6e32b4502d4fa11a767">No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Collections/Geo%20Map%20View.md">Geo Map View</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/File.md">File</a></th><td>Basic interaction (downloading the file).</td><td><ul><li data-list-item-id="ed87e836a39d127ebcbb33e9e59045afb">No further interaction supported.</li></ul></td></tr></tbody></table>
|
||||
<table class="ck-table-resized"><colgroup><col style="width:19.92%;"><col style="width:41.66%;"><col style="width:38.42%;"></colgroup><thead><tr><th> </th><th>Supported features</th><th>Limitations</th></tr></thead><tbody><tr><th><a class="reference-link" href="../Note%20Types/Text.md">Text</a></th><td><ul><li data-list-item-id="e26b4ce9ba4e9dfe224d04e0f341925ed">Table of contents.</li><li data-list-item-id="e9707fdfa2c92d66690cf932f7e647253">Syntax highlight of code blocks, provided a language is selected (does not work if “Auto-detected” is enabled).</li><li data-list-item-id="e84420a10c6d64bd107edb6e867c91d4b">Rendering for math equations.</li><li data-list-item-id="e10834dcd0619d77ae2e94d3695bedf58"><a href="../Note%20Types/Text/Include%20Note.md">Including notes</a> (only if the included notes are also shared).</li></ul></td><td><ul><li data-list-item-id="e41cc4139377f9f88d653d1eb8ca47bb4">Inline Mermaid diagrams are not rendered.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Code.md">Code</a></th><td><ul><li data-list-item-id="e291ae6d5130677b4c99f7c3bdbe974b4">Basic support (displaying the contents of the note in a monospace font).</li></ul></td><td><ul><li data-list-item-id="e0270680bbdd7a129306e61e11691e36d">No syntax highlight.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Saved%20Search.md">Saved Search</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Relation%20Map.md">Relation Map</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Note%20Map.md">Note Map</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Render%20Note.md">Render Note</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Collections.md">Collections</a></th><td><ul><li data-list-item-id="ea031e1d4149eb443ace756234490c5a4">The child notes are displayed in a fixed format. </li></ul></td><td><ul><li data-list-item-id="ea4a9d424aec2afbaecc07bbf64b7bebd">More advanced view types such as the calendar view are not supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a></th><td><ul><li data-list-item-id="e582d283f2b1b30cbe5ae35d8e01b2bf2">The diagram is displayed as a vector image.</li></ul></td><td><ul><li data-list-item-id="e33268686446e3c217077201bb5964364">No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a></th><td><ul><li data-list-item-id="e443dd0e97c30cb12c77e8906a71569ea">The diagram is displayed as a vector image.</li></ul></td><td><ul><li data-list-item-id="efe151ef3f3826c825416417525fb5fb2">No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Web%20View.md">Web View</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Mind%20Map.md">Mind Map</a></th><td>The diagram is displayed as a vector image.</td><td><ul><li data-list-item-id="ed3b4fb473042f6e32b4502d4fa11a767">No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Collections/Geo%20Map%20View.md">Geo Map View</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/File.md">File</a></th><td>Basic interaction (downloading the file).</td><td><ul><li data-list-item-id="ed87e836a39d127ebcbb33e9e59045afb">No further interaction supported.</li></ul></td></tr></tbody></table>
|
||||
|
||||
While the sharing feature is powerful, it has some limitations:
|
||||
|
||||
|
||||
@ -4,3 +4,9 @@ Text notes can "include" another note as a read-only widget. This can be useful
|
||||
## Including a note
|
||||
|
||||
In the <a class="reference-link" href="Formatting%20toolbar.md">Formatting toolbar</a>, look for the  button. There is also a keyboard shortcut defined for it but it is not allocated by default.
|
||||
|
||||
## Included notes in the share functionality
|
||||
|
||||
If a [shared note](../../Advanced%20Usage/Sharing.md) contains one or more included notes, they will be displayed in the content of the note as if they were part of the note itself.
|
||||
|
||||
For this to work, the included notes must also be shared, otherwise they will not be shown. However, the included notes can still be hidden from the note tree via `#shareHiddenFromTree`.
|
||||
@ -3,20 +3,26 @@
|
||||
|
||||
Within text notes, it's possible to enter mathematical equations using the <img src="1_Math Equations_image.png" width="20" height="15"> button from the <a class="reference-link" href="Formatting%20toolbar.md">Formatting toolbar</a> (generally found under the <a class="reference-link" href="Insert%20buttons.md">Insert buttons</a>).
|
||||
|
||||
If inserting equations frequently, using the <kbd>Ctrl</kbd>+<kbd>M</kbd> keyboard shortcut can be more comfortable. Alternatively, type `$$` or `\[` to trigger the popup directly.
|
||||
|
||||
There is currently no quick way to insert an equation, such as surrounding it with `$` or pressing <kbd>Ctrl</kbd>+<kbd>M</kbd> on an already typed-out equation.
|
||||
|
||||
The mathematical expression must be written in the TeX format. There is no visual editor for the math equations, only a preview.
|
||||
|
||||
Enabling _Display mode_ will render the equation slightly bigger (especially if using big operators such as summation, or fractions) and center it. Display mode equations will act as blocks (i.e. like paragraphs, or tables) and can be inserted for example in lists. Non-display equations can be part of the text.
|
||||
|
||||
## Keyboard shortcuts
|
||||
|
||||
If inserting equations frequently, using the <kbd>Ctrl</kbd>+<kbd>M</kbd> keyboard shortcut can be more comfortable. Alternatively, type `$$` or `\[` to trigger the popup directly.
|
||||
|
||||
There is currently no quick way to turn an already typed-out equation, such as surrounding it with `$` or pressing <kbd>Ctrl</kbd>+<kbd>M</kbd>.
|
||||
|
||||
## Supported math features
|
||||
|
||||
Technically we are using the KaTeX library which allows for a subset of the TeX format. To see the full list of supported features, consult the [Supported Functions](https://katex.org/docs/supported) and the [Support Table](https://katex.org/docs/support_table) from the official documentation.
|
||||
|
||||
## Markdown support
|
||||
|
||||
Math equations will be preserved when exporting to or importing from Markdown, surrounded by `\(` characters for inline math expressions, and `$\)` for display mode.
|
||||
Math equations will be preserved when exporting to or importing from Markdown, surrounded by `$` characters for inline math expressions, and `$$` for display mode.
|
||||
|
||||
If you notice any issue with the Markdown import/export for equations, feel free to [report](../../Troubleshooting/Reporting%20issues.md) it while providing the equation that causes issues.
|
||||
|
||||
## Formatting the equation
|
||||
|
||||
It is possible to customize the font size and foreground color for both inline and display-mode equations, just like any other text. For inline equations, the background color/highlight can also be adjusted.
|
||||
19
docs/User Guide/User Guide/Scripting/Logging.md
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# Logging
|
||||
Both front-end and back-end notes can log messages for debugging.
|
||||
|
||||
## UI logging via `api.log`
|
||||
|
||||
<figure class="image image_resized image-style-align-center" style="width:57.74%;"><img style="aspect-ratio:749/545;" src="Logging_image.png" width="749" height="545"></figure>
|
||||
|
||||
The API log feature integrates with the script editor and it displays all the messages logged via `api.log`. This works for both back-end and front-end scripts.
|
||||
|
||||
The API log panel will appear after executing a script that uses `api.log` and it can be dismissed temporarily by pressing the close button in the top-right of the panel.
|
||||
|
||||
Apart from strings, an object can be passed as well in which case it will be pretty-formatted if possible (e.g. recursive objects are not supported).
|
||||
|
||||
## Console logging
|
||||
|
||||
For logs that are not directly visible to the user, the standard `console.log` can be used as well.
|
||||
|
||||
* For front-end scripts, the log will be shown in the Developer Tools (also known as Inspect).
|
||||
* For back-end scripts, the log will be shown in the server output while running but **will not** be visible in the <a class="reference-link" href="../Troubleshooting/Error%20logs/Backend%20(server)%20logs.md">Backend (server) logs</a>.
|
||||
BIN
docs/User Guide/User Guide/Scripting/Logging_image.png
vendored
Normal file
|
After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 3.9 KiB |
BIN
docs/User Guide/User Guide/Theme development/3_Custom app-wide CSS_image.png
vendored
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
@ -4,14 +4,16 @@ It is possible to provide a CSS file to be used regardless of the theme set by t
|
||||
| | |
|
||||
| --- | --- |
|
||||
|  | Start by creating a new note and changing the note type to CSS |
|
||||
|  | In the ribbon, press the “Owned Attributes” section and type `#appCss`. |
|
||||
|  | Type the desired CSS. <br> <br>Generally it's a good idea to append `!important` for the styles that are being changed, in order to prevent other |
|
||||
|  | In the ribbon, press the “Owned Attributes” section and type `#appCss`. |
|
||||
|  | Type the desired CSS. <br> <br>Generally it's a good idea to append `!important` for the styles that are being changed, in order to prevent other |
|
||||
|
||||
## Seeing the changes
|
||||
|
||||
Adding a new _app CSS note_ or modifying an existing one does not immediately apply changes. To see the changes, press Ctrl+Shift+R to refresh the page first.
|
||||
|
||||
## Example use-case: customizing the printing stylesheet
|
||||
## Sample use cases
|
||||
|
||||
### Customizing the printing stylesheet
|
||||
|
||||
When printing a document or exporting as PDF, it is possible to adjust the style by creating a CSS note that uses the `@media` selector.
|
||||
|
||||
@ -19,14 +21,61 @@ For example, to change the font of the document from the one defined by the them
|
||||
|
||||
```
|
||||
@media print {
|
||||
|
||||
body {
|
||||
|
||||
--main-font-family: serif !important;
|
||||
|
||||
--detail-font-family: var(--main-font-family) !important;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
### Per-workspace styles
|
||||
|
||||
When using <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Workspaces.md">Workspaces</a>, it can be helpful to create a visual distinction between notes in different workspaces.
|
||||
|
||||
To do so:
|
||||
|
||||
1. In the note with `#workspace`, add an inheritable attribute `#cssClass(inheritable)` with a value that uniquely identifies the workspace (say `my-workspace`).
|
||||
2. Anywhere in the note structure, create a CSS note with `#appCss`.
|
||||
|
||||
#### Change the color of the icons in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a>
|
||||
|
||||
```
|
||||
.fancytree-node.my-workspace.fancytree-custom-icon {
|
||||
color: #ff0000;
|
||||
}
|
||||
```
|
||||
|
||||
#### Change the color of the note title and the icon
|
||||
|
||||
To change the color of the note title and the icon (above the content):
|
||||
|
||||
```
|
||||
.note-split.my-workspace .note-icon-widget button.note-icon,
|
||||
.note-split.my-workspace .note-title-widget input.note-title {
|
||||
color: #ff0000;
|
||||
}
|
||||
```
|
||||
|
||||
#### Add a watermark to the note content
|
||||
|
||||
<figure class="image image-style-align-right image_resized" style="width:39.97%;"><img style="aspect-ratio:641/630;" src="1_Custom app-wide CSS_image.png" width="641" height="630"></figure>
|
||||
|
||||
1. Insert an image in any note and take the URL of the image.
|
||||
2. Use the following CSS, adjusting the `background-image` and `width` and `height` to the desired values.
|
||||
|
||||
```
|
||||
.note-split.my-workspace .scrolling-container:after {
|
||||
position: fixed;
|
||||
content: "";
|
||||
background-image: url("/api/attachments/Rvm3zJNITQI1/image/logo.png");
|
||||
background-size: contain;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
width: 237px;
|
||||
height: 44px;
|
||||
bottom: 1em;
|
||||
right: 1em;
|
||||
opacity: 0.5;
|
||||
z-index: 0;
|
||||
}
|
||||
```
|
||||
34
package.json
@ -37,33 +37,33 @@
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@electron/rebuild": "4.0.1",
|
||||
"@playwright/test": "^1.36.0",
|
||||
"@playwright/test": "1.55.1",
|
||||
"@triliumnext/server": "workspace:*",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/node": "22.18.7",
|
||||
"@vitest/coverage-v8": "^3.0.5",
|
||||
"@vitest/ui": "^3.0.0",
|
||||
"@types/express": "5.0.3",
|
||||
"@types/node": "22.18.8",
|
||||
"@vitest/coverage-v8": "3.2.4",
|
||||
"@vitest/ui": "3.2.4",
|
||||
"chalk": "5.6.2",
|
||||
"cross-env": "10.1.0",
|
||||
"dpdm": "3.14.0",
|
||||
"esbuild": "^0.25.0",
|
||||
"eslint": "^9.8.0",
|
||||
"eslint-config-prettier": "^10.0.0",
|
||||
"eslint-plugin-playwright": "^2.0.0",
|
||||
"eslint-plugin-react-hooks": "5.2.0",
|
||||
"esbuild": "0.25.10",
|
||||
"eslint": "9.36.0",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"eslint-plugin-playwright": "2.2.2",
|
||||
"eslint-plugin-react-hooks": "6.1.0",
|
||||
"happy-dom": "~19.0.0",
|
||||
"jiti": "2.6.0",
|
||||
"jsonc-eslint-parser": "^2.1.0",
|
||||
"react-refresh": "^0.17.0",
|
||||
"jiti": "2.6.1",
|
||||
"jsonc-eslint-parser": "2.4.1",
|
||||
"react-refresh": "0.18.0",
|
||||
"rollup-plugin-webpack-stats": "2.1.5",
|
||||
"tslib": "^2.3.0",
|
||||
"tslib": "2.8.1",
|
||||
"tsx": "4.20.6",
|
||||
"typescript": "~5.9.0",
|
||||
"typescript-eslint": "^8.19.0",
|
||||
"typescript-eslint": "8.45.0",
|
||||
"upath": "2.0.1",
|
||||
"vite": "^7.0.0",
|
||||
"vite": "7.1.7",
|
||||
"vite-plugin-dts": "~4.5.0",
|
||||
"vitest": "^3.0.0"
|
||||
"vitest": "3.2.4"
|
||||
},
|
||||
"license": "AGPL-3.0-only",
|
||||
"author": {
|
||||
|
||||
@ -23,26 +23,26 @@
|
||||
"devDependencies": {
|
||||
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
||||
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
||||
"@ckeditor/ckeditor5-package-tools": "^4.0.0",
|
||||
"@ckeditor/ckeditor5-package-tools": "4.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "~8.45.0",
|
||||
"@typescript-eslint/parser": "^8.0.0",
|
||||
"@vitest/browser": "^3.0.5",
|
||||
"@vitest/coverage-istanbul": "^3.0.5",
|
||||
"ckeditor5": "46.1.1",
|
||||
"eslint": "^9.0.0",
|
||||
"@typescript-eslint/parser": "8.45.0",
|
||||
"@vitest/browser": "3.2.4",
|
||||
"@vitest/coverage-istanbul": "3.2.4",
|
||||
"ckeditor5": "47.0.0",
|
||||
"eslint": "9.36.0",
|
||||
"eslint-config-ckeditor5": ">=9.1.0",
|
||||
"http-server": "^14.1.0",
|
||||
"lint-staged": "^16.0.0",
|
||||
"stylelint": "^16.0.0",
|
||||
"http-server": "14.1.1",
|
||||
"lint-staged": "16.2.3",
|
||||
"stylelint": "16.24.0",
|
||||
"stylelint-config-ckeditor5": ">=9.1.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "5.9.2",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.9.3",
|
||||
"vite-plugin-svgo": "~2.0.0",
|
||||
"vitest": "^3.0.5",
|
||||
"webdriverio": "^9.0.7"
|
||||
"vitest": "3.2.4",
|
||||
"webdriverio": "9.20.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ckeditor5": "46.1.1"
|
||||
"ckeditor5": "47.0.0"
|
||||
},
|
||||
"author": "Elian Doran <contact@eliandoran.me>",
|
||||
"license": "GPL-2.0-or-later",
|
||||
|
||||
@ -24,26 +24,26 @@
|
||||
"devDependencies": {
|
||||
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
||||
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
||||
"@ckeditor/ckeditor5-package-tools": "^4.0.0",
|
||||
"@ckeditor/ckeditor5-package-tools": "4.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "~8.45.0",
|
||||
"@typescript-eslint/parser": "^8.0.0",
|
||||
"@vitest/browser": "^3.0.5",
|
||||
"@vitest/coverage-istanbul": "^3.0.5",
|
||||
"ckeditor5": "46.1.1",
|
||||
"eslint": "^9.0.0",
|
||||
"@typescript-eslint/parser": "8.45.0",
|
||||
"@vitest/browser": "3.2.4",
|
||||
"@vitest/coverage-istanbul": "3.2.4",
|
||||
"ckeditor5": "47.0.0",
|
||||
"eslint": "9.36.0",
|
||||
"eslint-config-ckeditor5": ">=9.1.0",
|
||||
"http-server": "^14.1.0",
|
||||
"lint-staged": "^16.0.0",
|
||||
"stylelint": "^16.0.0",
|
||||
"http-server": "14.1.1",
|
||||
"lint-staged": "16.2.3",
|
||||
"stylelint": "16.24.0",
|
||||
"stylelint-config-ckeditor5": ">=9.1.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "5.9.2",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.9.3",
|
||||
"vite-plugin-svgo": "~2.0.0",
|
||||
"vitest": "^3.0.5",
|
||||
"webdriverio": "^9.0.7"
|
||||
"vitest": "3.2.4",
|
||||
"webdriverio": "9.20.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ckeditor5": "46.1.1"
|
||||
"ckeditor5": "47.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node ./scripts/build-dist.mjs",
|
||||
|
||||
@ -26,26 +26,26 @@
|
||||
"devDependencies": {
|
||||
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
||||
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
||||
"@ckeditor/ckeditor5-package-tools": "^4.0.0",
|
||||
"@ckeditor/ckeditor5-package-tools": "4.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "~8.45.0",
|
||||
"@typescript-eslint/parser": "^8.0.0",
|
||||
"@vitest/browser": "^3.0.5",
|
||||
"@vitest/coverage-istanbul": "^3.0.5",
|
||||
"ckeditor5": "46.1.1",
|
||||
"eslint": "^9.0.0",
|
||||
"@typescript-eslint/parser": "8.45.0",
|
||||
"@vitest/browser": "3.2.4",
|
||||
"@vitest/coverage-istanbul": "3.2.4",
|
||||
"ckeditor5": "47.0.0",
|
||||
"eslint": "9.36.0",
|
||||
"eslint-config-ckeditor5": ">=9.1.0",
|
||||
"http-server": "^14.1.0",
|
||||
"lint-staged": "^16.0.0",
|
||||
"stylelint": "^16.0.0",
|
||||
"http-server": "14.1.1",
|
||||
"lint-staged": "16.2.3",
|
||||
"stylelint": "16.24.0",
|
||||
"stylelint-config-ckeditor5": ">=9.1.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "5.9.2",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.9.3",
|
||||
"vite-plugin-svgo": "~2.0.0",
|
||||
"vitest": "^3.0.5",
|
||||
"webdriverio": "^9.0.7"
|
||||
"vitest": "3.2.4",
|
||||
"webdriverio": "9.20.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ckeditor5": "46.1.1"
|
||||
"ckeditor5": "47.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node ./scripts/build-dist.mjs",
|
||||
|
||||
@ -27,26 +27,26 @@
|
||||
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
||||
"@ckeditor/ckeditor5-dev-utils": "43.1.0",
|
||||
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
||||
"@ckeditor/ckeditor5-package-tools": "^4.0.0",
|
||||
"@ckeditor/ckeditor5-package-tools": "4.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "~8.45.0",
|
||||
"@typescript-eslint/parser": "^8.0.0",
|
||||
"@vitest/browser": "^3.0.5",
|
||||
"@vitest/coverage-istanbul": "^3.0.5",
|
||||
"ckeditor5": "46.1.1",
|
||||
"eslint": "^9.0.0",
|
||||
"@typescript-eslint/parser": "8.45.0",
|
||||
"@vitest/browser": "3.2.4",
|
||||
"@vitest/coverage-istanbul": "3.2.4",
|
||||
"ckeditor5": "47.0.0",
|
||||
"eslint": "9.36.0",
|
||||
"eslint-config-ckeditor5": ">=9.1.0",
|
||||
"http-server": "^14.1.0",
|
||||
"lint-staged": "^16.0.0",
|
||||
"stylelint": "^16.0.0",
|
||||
"http-server": "14.1.1",
|
||||
"lint-staged": "16.2.3",
|
||||
"stylelint": "16.24.0",
|
||||
"stylelint-config-ckeditor5": ">=9.1.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "5.9.2",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.9.3",
|
||||
"vite-plugin-svgo": "~2.0.0",
|
||||
"vitest": "^3.0.5",
|
||||
"webdriverio": "^9.0.7"
|
||||
"vitest": "3.2.4",
|
||||
"webdriverio": "9.20.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ckeditor5": "46.1.1"
|
||||
"ckeditor5": "47.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node ./scripts/build-dist.mjs",
|
||||
@ -71,6 +71,6 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@ckeditor/ckeditor5-icons": "46.1.1"
|
||||
"@ckeditor/ckeditor5-icons": "47.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,10 +33,18 @@ export default class MathCommand extends Command {
|
||||
{ equation, type, display }
|
||||
);
|
||||
} else {
|
||||
const selection = this.editor.model.document.selection;
|
||||
|
||||
// Create new model element
|
||||
mathtex = writer.createElement(
|
||||
display ? 'mathtex-display' : 'mathtex-inline',
|
||||
{ equation, type: outputType, display }
|
||||
{
|
||||
// Inherit all attributes from selection (e.g. color, background color, size).
|
||||
...Object.fromEntries( selection.getAttributes() ),
|
||||
equation,
|
||||
type: outputType,
|
||||
display,
|
||||
}
|
||||
);
|
||||
}
|
||||
model.insertContent( mathtex );
|
||||
|
||||
@ -59,12 +59,12 @@ export default class MathEditing extends Plugin {
|
||||
allowWhere: '$text',
|
||||
isInline: true,
|
||||
isObject: true,
|
||||
allowAttributes: [ 'equation', 'type', 'display' ]
|
||||
allowAttributes: [ 'equation', 'type', 'display', 'fontSize', 'fontColor', 'fontBackgroundColor' ]
|
||||
} );
|
||||
|
||||
schema.register( 'mathtex-display', {
|
||||
inheritAllFrom: '$blockObject',
|
||||
allowAttributes: [ 'equation', 'type', 'display' ]
|
||||
allowAttributes: [ 'equation', 'type', 'display', 'fontSize', 'fontColor' ]
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
@ -26,26 +26,26 @@
|
||||
"devDependencies": {
|
||||
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
||||
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
||||
"@ckeditor/ckeditor5-package-tools": "^4.0.0",
|
||||
"@ckeditor/ckeditor5-package-tools": "4.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "~8.45.0",
|
||||
"@typescript-eslint/parser": "^8.0.0",
|
||||
"@vitest/browser": "^3.0.5",
|
||||
"@vitest/coverage-istanbul": "^3.0.5",
|
||||
"ckeditor5": "46.1.1",
|
||||
"eslint": "^9.0.0",
|
||||
"@typescript-eslint/parser": "8.45.0",
|
||||
"@vitest/browser": "3.2.4",
|
||||
"@vitest/coverage-istanbul": "3.2.4",
|
||||
"ckeditor5": "47.0.0",
|
||||
"eslint": "9.36.0",
|
||||
"eslint-config-ckeditor5": ">=9.1.0",
|
||||
"http-server": "^14.1.0",
|
||||
"lint-staged": "^16.0.0",
|
||||
"stylelint": "^16.0.0",
|
||||
"http-server": "14.1.1",
|
||||
"lint-staged": "16.2.3",
|
||||
"stylelint": "16.24.0",
|
||||
"stylelint-config-ckeditor5": ">=9.1.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "5.9.2",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.9.3",
|
||||
"vite-plugin-svgo": "~2.0.0",
|
||||
"vitest": "^3.0.5",
|
||||
"webdriverio": "^9.0.7"
|
||||
"vitest": "3.2.4",
|
||||
"webdriverio": "9.20.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ckeditor5": "46.1.1"
|
||||
"ckeditor5": "47.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node ./scripts/build-dist.mjs",
|
||||
@ -71,6 +71,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/lodash-es": "4.17.12",
|
||||
"lodash-es": "^4.17.21"
|
||||
"lodash-es": "4.17.21"
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,11 +11,11 @@
|
||||
"@triliumnext/ckeditor5-keyboard-marker": "workspace:*",
|
||||
"@triliumnext/ckeditor5-math": "workspace:*",
|
||||
"@triliumnext/ckeditor5-mermaid": "workspace:*",
|
||||
"ckeditor5": "46.1.1",
|
||||
"ckeditor5-premium-features": "46.1.1"
|
||||
"ckeditor5": "47.0.0",
|
||||
"ckeditor5-premium-features": "47.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@smithy/middleware-retry": "4.3.1",
|
||||
"@smithy/middleware-retry": "4.4.0",
|
||||
"@types/jquery": "3.5.33"
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
"@codemirror/lang-php": "6.0.2",
|
||||
"@codemirror/lang-vue": "0.1.3",
|
||||
"@codemirror/lang-xml": "6.1.0",
|
||||
"@codemirror/legacy-modes": "6.5.1",
|
||||
"@codemirror/legacy-modes": "6.5.2",
|
||||
"@codemirror/search": "6.5.11",
|
||||
"@codemirror/view": "6.38.4",
|
||||
"@fsegurai/codemirror-theme-abcdef": "6.2.2",
|
||||
|
||||
@ -10,3 +10,4 @@ export * from "./lib/server_api.js";
|
||||
export * from "./lib/shared_constants.js";
|
||||
export * from "./lib/ws_api.js";
|
||||
export * from "./lib/attribute_names.js";
|
||||
export * from "./lib/utils.js";
|
||||
|
||||
11
packages/commons/src/lib/utils.ts
Normal file
@ -0,0 +1,11 @@
|
||||
export function formatLogMessage(message: string | object) {
|
||||
if (typeof message === "object") {
|
||||
try {
|
||||
return JSON.stringify(message, null, 4);
|
||||
} catch (e) {
|
||||
return message.toString();
|
||||
}
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
@ -13,6 +13,6 @@
|
||||
"typescript"
|
||||
],
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
"tslib": "2.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,14 +22,14 @@
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@digitak/esrun": "^3.2.24",
|
||||
"@types/swagger-ui": "^5.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
||||
"@typescript-eslint/parser": "^8.0.0",
|
||||
"dotenv": "^17.0.0",
|
||||
"esbuild": "^0.25.0",
|
||||
"eslint": "^9.0.0",
|
||||
"highlight.js": "^11.8.0",
|
||||
"typescript": "^5.2.2"
|
||||
"@digitak/esrun": "3.2.26",
|
||||
"@types/swagger-ui": "5.21.1",
|
||||
"@typescript-eslint/eslint-plugin": "8.45.0",
|
||||
"@typescript-eslint/parser": "8.45.0",
|
||||
"dotenv": "17.2.3",
|
||||
"esbuild": "0.25.10",
|
||||
"eslint": "9.36.0",
|
||||
"highlight.js": "11.11.1",
|
||||
"typescript": "5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||