Merge branch 'main' into feat/extra-window

This commit is contained in:
SiriusXT 2025-12-29 14:44:25 +08:00
commit 19a75acf3f
325 changed files with 64857 additions and 13333 deletions

4
.envrc
View File

@ -1 +1,3 @@
use flake
if has nix; then
use flake
fi

View File

@ -9,9 +9,9 @@
"keywords": [],
"author": "Elian Doran <contact@eliandoran.me>",
"license": "AGPL-3.0-only",
"packageManager": "pnpm@10.26.1",
"packageManager": "pnpm@10.26.2",
"devDependencies": {
"@redocly/cli": "2.14.0",
"@redocly/cli": "2.14.1",
"archiver": "7.0.1",
"fs-extra": "11.3.3",
"react": "19.2.3",

View File

@ -1,6 +1,6 @@
{
"name": "@triliumnext/client",
"version": "0.100.0",
"version": "0.101.1",
"description": "JQuery-based client for TriliumNext, used for both web and desktop (via Electron)",
"private": true,
"license": "AGPL-3.0-only",
@ -17,12 +17,12 @@
},
"dependencies": {
"@excalidraw/excalidraw": "0.18.0",
"@fullcalendar/core": "6.1.19",
"@fullcalendar/daygrid": "6.1.19",
"@fullcalendar/interaction": "6.1.19",
"@fullcalendar/list": "6.1.19",
"@fullcalendar/multimonth": "6.1.19",
"@fullcalendar/timegrid": "6.1.19",
"@fullcalendar/core": "6.1.20",
"@fullcalendar/daygrid": "6.1.20",
"@fullcalendar/interaction": "6.1.20",
"@fullcalendar/list": "6.1.20",
"@fullcalendar/multimonth": "6.1.20",
"@fullcalendar/timegrid": "6.1.20",
"@maplibre/maplibre-gl-leaflet": "0.1.3",
"@mermaid-js/layout-elk": "0.2.0",
"@mind-elixir/node-menu": "5.0.1",
@ -59,8 +59,9 @@
"mind-elixir": "5.3.8",
"normalize.css": "8.0.1",
"panzoom": "9.4.3",
"preact": "10.28.0",
"preact": "10.28.1",
"react-i18next": "16.5.0",
"react-window": "2.2.3",
"reveal.js": "5.2.1",
"svg-pan-zoom": "3.6.2",
"tabulator-tables": "6.3.1",

View File

@ -1,17 +1,18 @@
import appContext from "./components/app_context.js";
import utils from "./services/utils.js";
import noteTooltipService from "./services/note_tooltip.js";
import bundleService from "./services/bundle.js";
import toastService from "./services/toast.js";
import noteAutocompleteService from "./services/note_autocomplete.js";
import electronContextMenu from "./menus/electron_context_menu.js";
import glob from "./services/glob.js";
import { t } from "./services/i18n.js";
import options from "./services/options.js";
import "autocomplete.js/index_jquery.js";
import type ElectronRemote from "@electron/remote";
import type Electron from "electron";
import "boxicons/css/boxicons.min.css";
import "autocomplete.js/index_jquery.js";
import appContext from "./components/app_context.js";
import electronContextMenu from "./menus/electron_context_menu.js";
import bundleService from "./services/bundle.js";
import glob from "./services/glob.js";
import { t } from "./services/i18n.js";
import noteAutocompleteService from "./services/note_autocomplete.js";
import noteTooltipService from "./services/note_tooltip.js";
import options from "./services/options.js";
import toastService from "./services/toast.js";
import utils from "./services/utils.js";
await appContext.earlyInit();

View File

@ -1,3 +1,5 @@
import { MIME_TYPES_DICT } from "@triliumnext/commons";
import cssClassManager from "../services/css_class_manager.js";
import type { Froca } from "../services/froca-interface.js";
import noteAttributeCache from "../services/note_attribute_cache.js";
@ -580,6 +582,10 @@ export default class FNote {
}
getIcon() {
return `tn-icon ${this.#getIconInternal()}`;
}
#getIconInternal() {
const iconClassLabels = this.getLabels("iconClass");
const workspaceIconClass = this.getWorkspaceIconClass();
@ -597,8 +603,9 @@ export default class FNote {
return "bx bx-folder";
}
return "bx bx-note";
} else if (this.type === "code" && this.mime.startsWith("text/x-sql")) {
return "bx bx-data";
} else if (this.type === "code") {
const correspondingMimeType = MIME_TYPES_DICT.find(m => m.mime === this.mime);
return correspondingMimeType?.icon ?? NOTE_TYPE_ICONS.code;
}
return NOTE_TYPE_ICONS[this.type];
}
@ -989,6 +996,10 @@ export default class FNote {
);
}
isJsx() {
return (this.type === "code" && this.mime === "text/jsx");
}
/** @returns true if this note is HTML */
isHtml() {
return (this.type === "code" || this.type === "file" || this.type === "render") && this.mime === "text/html";
@ -996,7 +1007,7 @@ export default class FNote {
/** @returns JS script environment - either "frontend" or "backend" */
getScriptEnv() {
if (this.isHtml() || (this.isJavaScript() && this.mime.endsWith("env=frontend"))) {
if (this.isHtml() || (this.isJavaScript() && this.mime.endsWith("env=frontend")) || this.isJsx()) {
return "frontend";
}
@ -1018,7 +1029,7 @@ export default class FNote {
* @returns a promise that resolves when the script has been run. Additionally, for front-end notes, the promise will contain the value that is returned by the script.
*/
async executeScript() {
if (!this.isJavaScript()) {
if (!(this.isJavaScript() || this.isJsx())) {
throw new Error(`Note ${this.noteId} is of type ${this.type} and mime ${this.mime} and thus cannot be executed`);
}

Binary file not shown.

View File

@ -92,7 +92,7 @@ export default class DesktopLayout {
.optChild(launcherPaneIsHorizontal, <LeftPaneToggle isHorizontalLayout={true} />)
.child(<TabHistoryNavigationButtons />)
.child(new TabRowWidget().class("full-width"))
.optChild(launcherPaneIsHorizontal && isNewLayout, <RightPaneToggle />)
.optChild(isNewLayout, <RightPaneToggle />)
.optChild(customTitleBarButtons, <TitleBarButtons />)
.css("height", "40px")
.css("background-color", "var(--launcher-pane-background-color)")
@ -184,7 +184,7 @@ export default class DesktopLayout {
.child(new HighlightsListWidget())
.child(...this.customWidgets.get("right-pane"))
)
.optChild(isNewLayout, <RightPanelContainer customWidgets={this.customWidgets.get("right-pane")} />)
.optChild(isNewLayout, <RightPanelContainer widgetsByParent={this.customWidgets} />)
)
.optChild(!launcherPaneIsHorizontal && isNewLayout, <StatusBar />)
)

View File

@ -1,9 +1,9 @@
import appContext from "./components/app_context.js";
import noteAutocompleteService from "./services/note_autocomplete.js";
import glob from "./services/glob.js";
import "boxicons/css/boxicons.min.css";
import "autocomplete.js/index_jquery.js";
import appContext from "./components/app_context.js";
import glob from "./services/glob.js";
import noteAutocompleteService from "./services/note_autocomplete.js";
glob.setupGlobs();
await appContext.earlyInit();

View File

@ -1,17 +1,25 @@
import FNote from "./entities/fnote";
import { render } from "preact";
import { CustomNoteList, useNoteViewType } from "./widgets/collections/NoteList";
import { useCallback, useLayoutEffect, useRef } from "preact/hooks";
import FNote from "./entities/fnote";
import content_renderer from "./services/content_renderer";
import { dynamicRequire, isElectron } from "./services/utils";
import { applyInlineMermaid } from "./services/content_renderer_text";
import { dynamicRequire, isElectron } from "./services/utils";
import { CustomNoteList, useNoteViewType } from "./widgets/collections/NoteList";
interface RendererProps {
note: FNote;
onReady: () => void;
onReady: (data: PrintReport) => void;
onProgressChanged?: (progress: number) => void;
}
export type PrintReport = {
type: "single-note";
} | {
type: "collection";
ignoredNoteIds: string[];
};
async function main() {
const notePath = window.location.hash.substring(1);
const noteId = notePath.split("/").at(-1);
@ -34,15 +42,17 @@ function App({ note, noteId }: { note: FNote | null | undefined, noteId: string
window.dispatchEvent(new CustomEvent("note-load-progress", { detail: { progress } }));
}
}, []);
const onReady = useCallback(() => {
const onReady = useCallback((printReport: PrintReport) => {
if (sentReadyEvent.current) return;
window.dispatchEvent(new Event("note-ready"));
window._noteReady = true;
window.dispatchEvent(new CustomEvent("note-ready", {
detail: printReport
}));
window._noteReady = printReport;
sentReadyEvent.current = true;
}, []);
const props: RendererProps | undefined | null = note && { note, onReady, onProgressChanged };
if (!note || !props) return <Error404 noteId={noteId} />
if (!note || !props) return <Error404 noteId={noteId} />;
useLayoutEffect(() => {
document.body.dataset.noteType = note.type;
@ -51,8 +61,8 @@ function App({ note, noteId }: { note: FNote | null | undefined, noteId: string
return (
<>
{note.type === "book"
? <CollectionRenderer {...props} />
: <SingleNoteRenderer {...props} />
? <CollectionRenderer {...props} />
: <SingleNoteRenderer {...props} />
}
</>
);
@ -91,7 +101,9 @@ function SingleNoteRenderer({ note, onReady }: RendererProps) {
await loadCustomCss(note);
}
load().then(() => requestAnimationFrame(onReady))
load().then(() => requestAnimationFrame(() => onReady({
type: "single-note"
})));
}, [ note ]);
return <>
@ -110,9 +122,9 @@ function CollectionRenderer({ note, onReady, onProgressChanged }: RendererProps)
ntxId="print"
highlightedTokens={null}
media="print"
onReady={async () => {
onReady={async (data: PrintReport) => {
await loadCustomCss(note);
onReady();
onReady(data);
}}
onProgressChanged={onProgressChanged}
/>;
@ -124,12 +136,12 @@ function Error404({ noteId }: { noteId: string }) {
<p>The note you are trying to print could not be found.</p>
<small>{noteId}</small>
</main>
)
);
}
async function loadCustomCss(note: FNote) {
const printCssNotes = await note.getRelationTargets("printCss");
let loadPromises: JQueryPromise<void>[] = [];
const loadPromises: JQueryPromise<void>[] = [];
for (const printCssNote of printCssNotes) {
if (!printCssNote || (printCssNote.type !== "code" && printCssNote.mime !== "text/css")) continue;

View File

@ -1,10 +1,15 @@
import { h, VNode } from "preact";
import BasicWidget, { ReactWrappedWidget } from "../widgets/basic_widget.js";
import RightPanelWidget from "../widgets/right_panel_widget.js";
import froca from "./froca.js";
import type { Entity } from "./frontend_script_api.js";
import { WidgetDefinitionWithType } from "./frontend_script_api_preact.js";
import { t } from "./i18n.js";
import ScriptContext from "./script_context.js";
import server from "./server.js";
import toastService, { showError } from "./toast.js";
import froca from "./froca.js";
import utils from "./utils.js";
import { t } from "./i18n.js";
import type { Entity } from "./frontend_script_api.js";
import toastService, { showErrorForScriptNote } from "./toast.js";
import utils, { getErrorMessage } from "./utils.js";
// TODO: Deduplicate with server.
export interface Bundle {
@ -14,9 +19,13 @@ export interface Bundle {
allNoteIds: string[];
}
interface Widget {
type LegacyWidget = (BasicWidget | RightPanelWidget) & {
parentWidget?: string;
}
};
type WithNoteId<T> = T & {
_noteId: string;
};
export type Widget = WithNoteId<(LegacyWidget | WidgetDefinitionWithType)>;
async function getAndExecuteBundle(noteId: string, originEntity = null, script = null, params = null) {
const bundle = await server.post<Bundle>(`script/bundle/${noteId}`, {
@ -27,6 +36,8 @@ async function getAndExecuteBundle(noteId: string, originEntity = null, script =
return await executeBundle(bundle, originEntity);
}
export type ParentName = "left-pane" | "center-pane" | "note-detail-pane" | "right-pane";
export async function executeBundle(bundle: Bundle, originEntity?: Entity | null, $container?: JQuery<HTMLElement>) {
const apiContext = await ScriptContext(bundle.noteId, bundle.allNoteIds, originEntity, $container);
@ -35,24 +46,14 @@ export async function executeBundle(bundle: Bundle, originEntity?: Entity | null
return eval(`const apiContext = this; (async function() { ${bundle.script}\r\n})()`);
}.call(apiContext);
} catch (e: any) {
const note = await froca.getNote(bundle.noteId);
toastService.showPersistent({
id: `custom-script-failure-${note?.noteId}`,
title: t("toast.bundle-error.title"),
icon: "bx bx-error-circle",
message: t("toast.bundle-error.message", {
id: note?.noteId,
title: note?.title,
message: e.message
})
});
showErrorForScriptNote(bundle.noteId, t("toast.bundle-error.message", { message: e.message }));
logError("Widget initialization failed: ", e);
}
}
async function executeStartupBundles() {
const isMobile = utils.isMobile();
const scriptBundles = await server.get<Bundle[]>("script/startup" + (isMobile ? "?mobile=true" : ""));
const scriptBundles = await server.get<Bundle[]>(`script/startup${ isMobile ? "?mobile=true" : ""}`);
for (const bundle of scriptBundles) {
await executeBundle(bundle);
@ -60,68 +61,99 @@ async function executeStartupBundles() {
}
export class WidgetsByParent {
private byParent: Record<string, Widget[]>;
private legacyWidgets: Record<string, WithNoteId<LegacyWidget>[]>;
private preactWidgets: Record<string, WithNoteId<WidgetDefinitionWithType>[]>;
constructor() {
this.byParent = {};
this.legacyWidgets = {};
this.preactWidgets = {};
}
add(widget: Widget) {
if (!widget.parentWidget) {
console.log(`Custom widget does not have mandatory 'parentWidget' property defined`);
return;
let hasParentWidget = false;
let isPreact = false;
if ("type" in widget && widget.type === "preact-widget") {
// React-based script.
const reactWidget = widget as WithNoteId<WidgetDefinitionWithType>;
this.preactWidgets[reactWidget.parent] = this.preactWidgets[reactWidget.parent] || [];
this.preactWidgets[reactWidget.parent].push(reactWidget);
isPreact = true;
hasParentWidget = !!reactWidget.parent;
} else if ("parentWidget" in widget && widget.parentWidget) {
this.legacyWidgets[widget.parentWidget] = this.legacyWidgets[widget.parentWidget] || [];
this.legacyWidgets[widget.parentWidget].push(widget);
hasParentWidget = !!widget.parentWidget;
}
this.byParent[widget.parentWidget] = this.byParent[widget.parentWidget] || [];
this.byParent[widget.parentWidget].push(widget);
if (!hasParentWidget) {
showErrorForScriptNote(widget._noteId, t("toast.widget-missing-parent", {
property: isPreact ? "parent" : "parentWidget"
}));
}
}
get(parentName: string) {
if (!this.byParent[parentName]) {
return [];
get(parentName: ParentName) {
const widgets: (BasicWidget | VNode)[] = this.getLegacyWidgets(parentName);
for (const preactWidget of this.getPreactWidgets(parentName)) {
const el = h(preactWidget.render, {});
const widget = new ReactWrappedWidget(el);
widget.contentSized();
if (preactWidget.position) {
widget.position = preactWidget.position;
}
widgets.push(widget);
}
return widgets;
}
getLegacyWidgets(parentName: ParentName): (BasicWidget | RightPanelWidget)[] {
if (!this.legacyWidgets[parentName]) return [];
return (
this.byParent[parentName]
this.legacyWidgets[parentName]
// previously, custom widgets were provided as a single instance, but that has the disadvantage
// for splits where we actually need multiple instaces and thus having a class to instantiate is better
// https://github.com/zadam/trilium/issues/4274
.map((w: any) => (w.prototype ? new w() : w))
);
}
getPreactWidgets(parentName: ParentName) {
return this.preactWidgets[parentName] ?? [];
}
}
async function getWidgetBundlesByParent() {
const scriptBundles = await server.get<Bundle[]>("script/widgets");
const widgetsByParent = new WidgetsByParent();
for (const bundle of scriptBundles) {
let widget;
try {
const scriptBundles = await server.get<Bundle[]>("script/widgets");
try {
widget = await executeBundle(bundle);
if (widget) {
widget._noteId = bundle.noteId;
widgetsByParent.add(widget);
for (const bundle of scriptBundles) {
let widget;
try {
widget = await executeBundle(bundle);
if (widget) {
widget._noteId = bundle.noteId;
widgetsByParent.add(widget);
}
} catch (e: any) {
const noteId = bundle.noteId;
showErrorForScriptNote(noteId, t("toast.bundle-error.message", { message: e.message }));
logError("Widget initialization failed: ", e);
continue;
}
} catch (e: any) {
const noteId = bundle.noteId;
const note = await froca.getNote(noteId);
toastService.showPersistent({
id: `custom-script-failure-${noteId}`,
title: t("toast.bundle-error.title"),
icon: "bx bx-error-circle",
message: t("toast.bundle-error.message", {
id: noteId,
title: note?.title,
message: e.message
})
});
logError("Widget initialization failed: ", e);
continue;
}
} catch (e) {
toastService.showPersistent({
id: `custom-widget-list-failure`,
title: t("toast.widget-list-error.title"),
message: getErrorMessage(e),
icon: "bx bx-error-circle"
});
}
return widgetsByParent;

View File

@ -1,13 +1,13 @@
import { formatCodeBlocks } from "./syntax_highlight.js";
import { getMermaidConfig } from "./mermaid.js";
import { renderMathInElement } from "./math.js";
import FNote from "../entities/fnote.js";
import FAttachment from "../entities/fattachment.js";
import tree from "./tree.js";
import FNote from "../entities/fnote.js";
import { default as content_renderer, type RenderOptions } from "./content_renderer.js";
import froca from "./froca.js";
import link from "./link.js";
import { renderMathInElement } from "./math.js";
import { getMermaidConfig } from "./mermaid.js";
import { formatCodeBlocks } from "./syntax_highlight.js";
import tree from "./tree.js";
import { isHtmlEmpty } from "./utils.js";
import { default as content_renderer, type RenderOptions } from "./content_renderer.js";
export default async function renderText(note: FNote | FAttachment, $renderedContent: JQuery<HTMLElement>, options: RenderOptions = {}) {
// entity must be FNote
@ -22,12 +22,14 @@ export default async function renderText(note: FNote | FAttachment, $renderedCon
}
const getNoteIdFromLink = (el: HTMLElement) => tree.getNoteIdFromUrl($(el).attr("href") || "");
const referenceLinks = $renderedContent.find("a.reference-link");
const referenceLinks = $renderedContent.find<HTMLAnchorElement>("a.reference-link");
const noteIdsToPrefetch = referenceLinks.map((i, el) => getNoteIdFromLink(el));
await froca.getNotes(noteIdsToPrefetch);
for (const el of referenceLinks) {
await link.loadReferenceLinkTitle($(el));
const innerSpan = document.createElement("span");
await link.loadReferenceLinkTitle($(innerSpan), el.href);
el.replaceChildren(innerSpan);
}
await rewriteMermaidDiagramsInContainer($renderedContent[0] as HTMLDivElement);

View File

@ -54,6 +54,7 @@ function getEnabledFeatures() {
console.warn("Failed to parse experimental features from options:", e);
}
enabledFeatures = new Set(features);
enabledFeatures.delete("new-layout"); // handled separately.
}
return enabledFeatures;
}

View File

@ -1,26 +1,27 @@
import server from "./server.js";
import utils from "./utils.js";
import toastService from "./toast.js";
import linkService from "./link.js";
import { dayjs, formatLogMessage } from "@triliumnext/commons";
import appContext from "../components/app_context.js";
import type Component from "../components/component.js";
import type NoteContext from "../components/note_context.js";
import type FNote from "../entities/fnote.js";
import BasicWidget, { ReactWrappedWidget } from "../widgets/basic_widget.js";
import NoteContextAwareWidget from "../widgets/note_context_aware_widget.js";
import RightPanelWidget from "../widgets/right_panel_widget.js";
import dateNotesService from "./date_notes.js";
import dialogService from "./dialog.js";
import froca from "./froca.js";
import { preactAPI } from "./frontend_script_api_preact.js";
import { t } from "./i18n.js";
import linkService from "./link.js";
import noteTooltipService from "./note_tooltip.js";
import protectedSessionService from "./protected_session.js";
import dateNotesService from "./date_notes.js";
import searchService from "./search.js";
import RightPanelWidget from "../widgets/right_panel_widget.js";
import ws from "./ws.js";
import appContext from "../components/app_context.js";
import NoteContextAwareWidget from "../widgets/note_context_aware_widget.js";
import BasicWidget, { ReactWrappedWidget } from "../widgets/basic_widget.js";
import SpacedUpdate from "./spaced_update.js";
import server from "./server.js";
import shortcutService from "./shortcuts.js";
import dialogService from "./dialog.js";
import type FNote from "../entities/fnote.js";
import { t } from "./i18n.js";
import { dayjs } from "@triliumnext/commons";
import type NoteContext from "../components/note_context.js";
import type Component from "../components/component.js";
import { formatLogMessage } from "@triliumnext/commons";
import SpacedUpdate from "./spaced_update.js";
import toastService from "./toast.js";
import utils from "./utils.js";
import ws from "./ws.js";
/**
* A whole number
@ -464,6 +465,8 @@ export interface Api {
* Log given message to the log pane in UI
*/
log(message: string | object): void;
preact: typeof preactAPI;
}
/**
@ -533,9 +536,8 @@ function FrontendScriptApi(this: Api, startNote: FNote, currentNote: FNote, orig
return params.map((p) => {
if (typeof p === "function") {
return `!@#Function: ${p.toString()}`;
} else {
return p;
}
return p;
});
}
@ -562,9 +564,8 @@ function FrontendScriptApi(this: Api, startNote: FNote, currentNote: FNote, orig
await ws.waitForMaxKnownEntityChangeId();
return ret.executionResult;
} else {
throw new Error(`server error: ${ret.error}`);
}
throw new Error(`server error: ${ret.error}`);
};
this.runOnBackend = async (func, params = []) => {
@ -721,6 +722,8 @@ function FrontendScriptApi(this: Api, startNote: FNote, currentNote: FNote, orig
this.logMessages[noteId].push(message);
this.logSpacedUpdates[noteId].scheduleUpdate();
};
this.preact = preactAPI;
}
export default FrontendScriptApi as any as {

View File

@ -0,0 +1,101 @@
import { Fragment, h, VNode } from "preact";
import * as hooks from "preact/hooks";
import ActionButton from "../widgets/react/ActionButton";
import Admonition from "../widgets/react/Admonition";
import Button from "../widgets/react/Button";
import CKEditor from "../widgets/react/CKEditor";
import Collapsible from "../widgets/react/Collapsible";
import Dropdown from "../widgets/react/Dropdown";
import FormCheckbox from "../widgets/react/FormCheckbox";
import FormDropdownList from "../widgets/react/FormDropdownList";
import { FormFileUploadActionButton, FormFileUploadButton } from "../widgets/react/FormFileUpload";
import FormGroup from "../widgets/react/FormGroup";
import { FormDropdownDivider, FormDropdownSubmenu, FormListItem } from "../widgets/react/FormList";
import FormRadioGroup from "../widgets/react/FormRadioGroup";
import FormText from "../widgets/react/FormText";
import FormTextArea from "../widgets/react/FormTextArea";
import FormTextBox from "../widgets/react/FormTextBox";
import FormToggle from "../widgets/react/FormToggle";
import * as triliumHooks from "../widgets/react/hooks";
import Icon from "../widgets/react/Icon";
import LinkButton from "../widgets/react/LinkButton";
import LoadingSpinner from "../widgets/react/LoadingSpinner";
import Modal from "../widgets/react/Modal";
import NoteAutocomplete from "../widgets/react/NoteAutocomplete";
import NoteLink from "../widgets/react/NoteLink";
import RawHtml from "../widgets/react/RawHtml";
import Slider from "../widgets/react/Slider";
import RightPanelWidget from "../widgets/sidebar/RightPanelWidget";
export interface WidgetDefinition {
parent: "right-pane",
render: () => VNode,
position?: number,
}
export interface WidgetDefinitionWithType extends WidgetDefinition {
type: "preact-widget"
}
export interface LauncherWidgetDefinitionWithType {
type: "preact-launcher-widget"
render: () => VNode
}
export const preactAPI = Object.freeze({
// Core
h,
Fragment,
/**
* Method that must be run for widget scripts that run on Preact, using JSX. The method just returns the same definition, reserved for future typechecking and perhaps validation purposes.
*
* @param definition the widget definition.
*/
defineWidget(definition: WidgetDefinition) {
return {
type: "preact-widget",
...definition
};
},
defineLauncherWidget(definition: Omit<LauncherWidgetDefinitionWithType, "type">) {
return {
type: "preact-launcher-widget",
...definition
};
},
// Basic widgets
ActionButton,
Admonition,
Button,
CKEditor,
Collapsible,
Dropdown,
FormCheckbox,
FormDropdownList,
FormFileUploadButton, FormFileUploadActionButton,
FormGroup,
FormListItem, FormDropdownDivider, FormDropdownSubmenu,
FormRadioGroup,
FormText,
FormTextArea,
FormTextBox,
FormToggle,
Icon,
LinkButton,
LoadingSpinner,
Modal,
NoteAutocomplete,
NoteLink,
RawHtml,
Slider,
// Specialized widgets
RightPanelWidget,
...hooks,
...triliumHooks
});

View File

@ -1,6 +1,10 @@
import server from "./server.js";
import bundleService, { type Bundle } from "./bundle.js";
import { h, VNode } from "preact";
import type FNote from "../entities/fnote.js";
import { renderReactWidgetAtElement } from "../widgets/react/react_utils.jsx";
import bundleService, { type Bundle } from "./bundle.js";
import froca from "./froca.js";
import server from "./server.js";
async function render(note: FNote, $el: JQuery<HTMLElement>) {
const relations = note.getRelations("renderNote");
@ -17,12 +21,34 @@ async function render(note: FNote, $el: JQuery<HTMLElement>) {
$scriptContainer.append(bundle.html);
// async so that scripts cannot block trilium execution
bundleService.executeBundle(bundle, note, $scriptContainer);
bundleService.executeBundle(bundle, note, $scriptContainer).then(result => {
// Render JSX
if (bundle.html === "") {
renderIfJsx(bundle, result, $el);
}
});
}
return renderNoteIds.length > 0;
}
async function renderIfJsx(bundle: Bundle, result: unknown, $el: JQuery<HTMLElement>) {
// Ensure the root script note is actually a JSX.
const rootScriptNoteId = await froca.getNote(bundle.noteId);
if (rootScriptNoteId?.mime !== "text/jsx") return;
// Ensure the output is a valid el.
if (typeof result !== "function") return;
// Obtain the parent component.
const closestComponent = glob.getComponentByEl($el.closest(".component")[0]);
if (!closestComponent) return;
// Render the element.
const el = h(result as () => VNode, {});
renderReactWidgetAtElement(closestComponent, el, $el[0]);
}
export default {
render
};

View File

@ -133,11 +133,11 @@ async function call<T>(method: string, url: string, componentId?: string, option
};
ipc.send("server-request", {
requestId: requestId,
headers: headers,
method: method,
requestId,
headers,
method,
url: `/${window.glob.baseApiUrl}${url}`,
data: data
data
});
})) as any;
} else {
@ -161,7 +161,7 @@ function ajax(url: string, method: string, data: unknown, headers: Headers, sile
const options: JQueryAjaxSettings = {
url: window.glob.baseApiUrl + url,
type: method,
headers: headers,
headers,
timeout: 60000,
success: (body, textStatus, jqXhr) => {
const respHeaders: Headers = {};
@ -288,8 +288,8 @@ async function reportError(method: string, url: string, statusCode: number, resp
t("server.unknown_http_error_content", { statusCode, method, url, message: messageStr }),
15_000);
}
const { throwError } = await import("./ws.js");
throwError(`${statusCode} ${method} ${url} - ${message}`);
const { logError } = await import("./ws.js");
logError(`${statusCode} ${method} ${url} - ${message}`);
}
}

View File

@ -1,6 +1,9 @@
import { signal } from "@preact/signals";
import utils from "./utils.js";
import appContext from "../components/app_context.js";
import froca from "./froca.js";
import { t } from "./i18n.js";
import utils, { randomString } from "./utils.js";
export interface ToastOptions {
id?: string;
@ -61,11 +64,29 @@ function showErrorTitleAndMessage(title: string, message: string, timeout = 1000
});
}
export async function showErrorForScriptNote(noteId: string, message: string) {
const note = await froca.getNote(noteId, true);
showPersistent({
id: `custom-widget-failure-${noteId}`,
title: t("toast.scripting-error", { title: note?.title ?? "" }),
icon: note?.getIcon() ?? "bx bx-error-circle",
message,
timeout: 15_000,
buttons: [
{
text: t("toast.open-script-note"),
onClick: () => appContext.tabManager.openInNewTab(noteId, null, true)
}
]
});
}
//#region Toast store
export const toasts = signal<ToastOptionsWithRequiredId[]>([]);
function addToast(opts: ToastOptions) {
const id = opts.id ?? crypto.randomUUID();
const id = opts.id ?? randomString();
const toast = { ...opts, id };
toasts.value = [ ...toasts.value, toast ];
return id;
@ -74,7 +95,7 @@ function addToast(opts: ToastOptions) {
function updateToast(id: string, partial: Partial<ToastOptions>) {
toasts.value = toasts.value.map(toast => {
if (toast.id === id) {
return { ...toast, ...partial }
return { ...toast, ...partial };
}
return toast;
});

View File

@ -1,8 +1,9 @@
import { dayjs } from "@triliumnext/commons";
import type { ViewMode, ViewScope } from "./link.js";
import FNote from "../entities/fnote";
import { snapdom } from "@zumer/snapdom";
import FNote from "../entities/fnote";
import type { ViewMode, ViewScope } from "./link.js";
const SVG_MIME = "image/svg+xml";
export const isShare = !window.glob;
@ -113,9 +114,8 @@ function formatDateISO(date: Date) {
export function formatDateTime(date: Date, userSuppliedFormat?: string): string {
if (userSuppliedFormat?.trim()) {
return dayjs(date).format(userSuppliedFormat);
} else {
return `${formatDate(date)} ${formatTime(date)}`;
}
return `${formatDate(date)} ${formatTime(date)}`;
}
function localNowDateTime() {
@ -191,9 +191,9 @@ export function formatSize(size: number | null | undefined) {
if (size < 1024) {
return `${size} KiB`;
} else {
return `${Math.round(size / 102.4) / 10} MiB`;
}
return `${Math.round(size / 102.4) / 10} MiB`;
}
function toObject<T, R>(array: T[], fn: (arg0: T) => [key: string, value: R]) {
@ -208,7 +208,7 @@ function toObject<T, R>(array: T[], fn: (arg0: T) => [key: string, value: R]) {
return obj;
}
export function randomString(len: number) {
export function randomString(len: number = 16) {
let text = "";
const possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
@ -297,18 +297,18 @@ function formatHtml(html: string) {
let indent = "\n";
const tab = "\t";
let i = 0;
let pre: { indent: string; tag: string }[] = [];
const pre: { indent: string; tag: string }[] = [];
html = html
.replace(new RegExp("<pre>([\\s\\S]+?)?</pre>"), function (x) {
.replace(new RegExp("<pre>([\\s\\S]+?)?</pre>"), (x) => {
pre.push({ indent: "", tag: x });
return "<--TEMPPRE" + i++ + "/-->";
return `<--TEMPPRE${i++}/-->`;
})
.replace(new RegExp("<[^<>]+>[^<]?", "g"), function (x) {
.replace(new RegExp("<[^<>]+>[^<]?", "g"), (x) => {
let ret;
const tagRegEx = /<\/?([^\s/>]+)/.exec(x);
let tag = tagRegEx ? tagRegEx[1] : "";
let p = new RegExp("<--TEMPPRE(\\d+)/-->").exec(x);
const tag = tagRegEx ? tagRegEx[1] : "";
const p = new RegExp("<--TEMPPRE(\\d+)/-->").exec(x);
if (p) {
const pInd = parseInt(p[1]);
@ -318,24 +318,22 @@ function formatHtml(html: string) {
if (["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "menuitem", "meta", "param", "source", "track", "wbr"].indexOf(tag) >= 0) {
// self closing tag
ret = indent + x;
} else if (x.indexOf("</") < 0) {
//open tag
if (x.charAt(x.length - 1) !== ">") ret = indent + x.substr(0, x.length - 1) + indent + tab + x.substr(x.length - 1, x.length);
else ret = indent + x;
!p && (indent += tab);
} else {
if (x.indexOf("</") < 0) {
//open tag
if (x.charAt(x.length - 1) !== ">") ret = indent + x.substr(0, x.length - 1) + indent + tab + x.substr(x.length - 1, x.length);
else ret = indent + x;
!p && (indent += tab);
} else {
//close tag
indent = indent.substr(0, indent.length - 1);
if (x.charAt(x.length - 1) !== ">") ret = indent + x.substr(0, x.length - 1) + indent + x.substr(x.length - 1, x.length);
else ret = indent + x;
}
//close tag
indent = indent.substr(0, indent.length - 1);
if (x.charAt(x.length - 1) !== ">") ret = indent + x.substr(0, x.length - 1) + indent + x.substr(x.length - 1, x.length);
else ret = indent + x;
}
return ret;
});
for (i = pre.length; i--;) {
html = html.replace("<--TEMPPRE" + i + "/-->", pre[i].tag.replace("<pre>", "<pre>\n").replace("</pre>", pre[i].indent + "</pre>"));
html = html.replace(`<--TEMPPRE${i}/-->`, pre[i].tag.replace("<pre>", "<pre>\n").replace("</pre>", `${pre[i].indent}</pre>`));
}
return html.charAt(0) === "\n" ? html.substr(1, html.length - 1) : html;
@ -364,11 +362,11 @@ type dynamicRequireMappings = {
export function dynamicRequire<T extends keyof dynamicRequireMappings>(moduleName: T): Awaited<dynamicRequireMappings[T]>{
if (typeof __non_webpack_require__ !== "undefined") {
return __non_webpack_require__(moduleName);
} else {
// explicitly pass as string and not as expression to suppress webpack warning
// 'Critical dependency: the request of a dependency is an expression'
return require(`${moduleName}`);
}
// explicitly pass as string and not as expression to suppress webpack warning
// 'Critical dependency: the request of a dependency is an expression'
return require(`${moduleName}`);
}
function timeLimit<T>(promise: Promise<T>, limitMs: number, errorMessage?: string) {
@ -509,8 +507,8 @@ export function escapeRegExp(str: string) {
function areObjectsEqual(...args: unknown[]) {
let i;
let l;
let leftChain: Object[];
let rightChain: Object[];
let leftChain: object[];
let rightChain: object[];
function compare2Objects(x: unknown, y: unknown) {
let p;
@ -695,9 +693,9 @@ async function downloadAsSvg(nameWithoutExtension: string, svgSource: string | S
try {
const result = await snapdom(element, {
backgroundColor: "transparent",
scale: 2
});
backgroundColor: "transparent",
scale: 2
});
triggerDownload(`${nameWithoutExtension}.svg`, result.url);
} finally {
cleanup();
@ -733,9 +731,9 @@ async function downloadAsPng(nameWithoutExtension: string, svgSource: string | S
try {
const result = await snapdom(element, {
backgroundColor: "transparent",
scale: 2
});
backgroundColor: "transparent",
scale: 2
});
const pngImg = await result.toPng();
await triggerDownload(`${nameWithoutExtension}.png`, pngImg.src);
} finally {
@ -763,11 +761,11 @@ export function getSizeFromSvg(svgContent: string) {
return {
width: parseFloat(width),
height: parseFloat(height)
}
} else {
console.warn("SVG export error", svgDocument.documentElement);
return null;
};
}
console.warn("SVG export error", svgDocument.documentElement);
return null;
}
/**
@ -896,9 +894,9 @@ export function mapToKeyValueArray<K extends string | number | symbol, V>(map: R
export function getErrorMessage(e: unknown) {
if (e && typeof e === "object" && "message" in e && typeof e.message === "string") {
return e.message;
} else {
return "Unknown error";
}
return "Unknown error";
}
/**

View File

@ -0,0 +1,498 @@
.bx-ul
{
margin-left: 2em;
padding-left: 0;
list-style: none;
}
.bx-ul > li
{
position: relative;
}
.bx-ul .bx
{
font-size: inherit;
line-height: inherit;
position: absolute;
left: -2em;
width: 2em;
text-align: center;
}
@-webkit-keyframes spin
{
0%
{
-webkit-transform: rotate(0);
transform: rotate(0);
}
100%
{
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes spin
{
0%
{
-webkit-transform: rotate(0);
transform: rotate(0);
}
100%
{
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-webkit-keyframes burst
{
0%
{
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
90%
{
-webkit-transform: scale(1.5);
transform: scale(1.5);
opacity: 0;
}
}
@keyframes burst
{
0%
{
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
90%
{
-webkit-transform: scale(1.5);
transform: scale(1.5);
opacity: 0;
}
}
@-webkit-keyframes flashing
{
0%
{
opacity: 1;
}
45%
{
opacity: 0;
}
90%
{
opacity: 1;
}
}
@keyframes flashing
{
0%
{
opacity: 1;
}
45%
{
opacity: 0;
}
90%
{
opacity: 1;
}
}
@-webkit-keyframes fade-left
{
0%
{
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
75%
{
-webkit-transform: translateX(-20px);
transform: translateX(-20px);
opacity: 0;
}
}
@keyframes fade-left
{
0%
{
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
75%
{
-webkit-transform: translateX(-20px);
transform: translateX(-20px);
opacity: 0;
}
}
@-webkit-keyframes fade-right
{
0%
{
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
75%
{
-webkit-transform: translateX(20px);
transform: translateX(20px);
opacity: 0;
}
}
@keyframes fade-right
{
0%
{
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
75%
{
-webkit-transform: translateX(20px);
transform: translateX(20px);
opacity: 0;
}
}
@-webkit-keyframes fade-up
{
0%
{
-webkit-transform: translateY(0);
transform: translateY(0);
opacity: 1;
}
75%
{
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
opacity: 0;
}
}
@keyframes fade-up
{
0%
{
-webkit-transform: translateY(0);
transform: translateY(0);
opacity: 1;
}
75%
{
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
opacity: 0;
}
}
@-webkit-keyframes fade-down
{
0%
{
-webkit-transform: translateY(0);
transform: translateY(0);
opacity: 1;
}
75%
{
-webkit-transform: translateY(20px);
transform: translateY(20px);
opacity: 0;
}
}
@keyframes fade-down
{
0%
{
-webkit-transform: translateY(0);
transform: translateY(0);
opacity: 1;
}
75%
{
-webkit-transform: translateY(20px);
transform: translateY(20px);
opacity: 0;
}
}
@-webkit-keyframes tada
{
from
{
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
10%,
20%
{
-webkit-transform: scale3d(.95, .95, .95) rotate3d(0, 0, 1, -10deg);
transform: scale3d(.95, .95, .95) rotate3d(0, 0, 1, -10deg);
}
30%,
50%,
70%,
90%
{
-webkit-transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, 10deg);
transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, 10deg);
}
40%,
60%,
80%
{
-webkit-transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, -10deg);
transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, -10deg);
}
to
{
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes tada
{
from
{
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
10%,
20%
{
-webkit-transform: scale3d(.95, .95, .95) rotate3d(0, 0, 1, -10deg);
transform: scale3d(.95, .95, .95) rotate3d(0, 0, 1, -10deg);
}
30%,
50%,
70%,
90%
{
-webkit-transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, 10deg);
transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, 10deg);
}
40%,
60%,
80%
{
-webkit-transform: rotate3d(0, 0, 1, -10deg);
transform: rotate3d(0, 0, 1, -10deg);
}
to
{
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
.bx-spin
{
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
.bx-spin-hover:hover
{
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
.bx-tada
{
-webkit-animation: tada 1.5s ease infinite;
animation: tada 1.5s ease infinite;
}
.bx-tada-hover:hover
{
-webkit-animation: tada 1.5s ease infinite;
animation: tada 1.5s ease infinite;
}
.bx-flashing
{
-webkit-animation: flashing 1.5s infinite linear;
animation: flashing 1.5s infinite linear;
}
.bx-flashing-hover:hover
{
-webkit-animation: flashing 1.5s infinite linear;
animation: flashing 1.5s infinite linear;
}
.bx-burst
{
-webkit-animation: burst 1.5s infinite linear;
animation: burst 1.5s infinite linear;
}
.bx-burst-hover:hover
{
-webkit-animation: burst 1.5s infinite linear;
animation: burst 1.5s infinite linear;
}
.bx-fade-up
{
-webkit-animation: fade-up 1.5s infinite linear;
animation: fade-up 1.5s infinite linear;
}
.bx-fade-up-hover:hover
{
-webkit-animation: fade-up 1.5s infinite linear;
animation: fade-up 1.5s infinite linear;
}
.bx-fade-down
{
-webkit-animation: fade-down 1.5s infinite linear;
animation: fade-down 1.5s infinite linear;
}
.bx-fade-down-hover:hover
{
-webkit-animation: fade-down 1.5s infinite linear;
animation: fade-down 1.5s infinite linear;
}
.bx-fade-left
{
-webkit-animation: fade-left 1.5s infinite linear;
animation: fade-left 1.5s infinite linear;
}
.bx-fade-left-hover:hover
{
-webkit-animation: fade-left 1.5s infinite linear;
animation: fade-left 1.5s infinite linear;
}
.bx-fade-right
{
-webkit-animation: fade-right 1.5s infinite linear;
animation: fade-right 1.5s infinite linear;
}
.bx-fade-right-hover:hover
{
-webkit-animation: fade-right 1.5s infinite linear;
animation: fade-right 1.5s infinite linear;
}
.bx-xs
{
font-size: 1rem!important;
}
.bx-sm
{
font-size: 1.55rem!important;
}
.bx-md
{
font-size: 2.25rem!important;
}
.bx-lg
{
font-size: 3.0rem!important;
}
.bx-fw
{
font-size: 1.2857142857em;
line-height: .8em;
width: 1.2857142857em;
height: .8em;
margin-top: -.2em!important;
vertical-align: middle;
}
.bx-pull-left
{
float: left;
margin-right: .3em!important;
}
.bx-pull-right
{
float: right;
margin-left: .3em!important;
}
.bx-rotate-90
{
transform: rotate(90deg);
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=1)';
}
.bx-rotate-180
{
transform: rotate(180deg);
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=2)';
}
.bx-rotate-270
{
transform: rotate(270deg);
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=3)';
}
.bx-flip-horizontal
{
transform: scaleX(-1);
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)';
}
.bx-flip-vertical
{
transform: scaleY(-1);
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)';
}
.bx-border
{
padding: .25em;
border: .07em solid rgba(0,0,0,.1);
border-radius: .25em;
}
.bx-border-circle
{
padding: .25em;
border: .07em solid rgba(0,0,0,.1);
border-radius: 50%;
}
/** Custom icon **/
.bx-empty {
width: 1em;
display: inline-block;
}

View File

@ -1,3 +1,5 @@
@import "./boxicons-compat.css";
@font-face {
font-family: Montserrat;
src: url(../fonts/Montserrat-Light.ttf);
@ -436,7 +438,6 @@ body.desktop .tabulator-popup-container,
opacity: 1;
}
.dropdown-menu a:hover:not(.disabled),
.dropdown-item:hover:not(.disabled, .dropdown-container-item),
.tabulator-menu-item:hover,
:root .excalidraw .context-menu .context-menu-item:hover {
@ -458,6 +459,7 @@ body.desktop .tabulator-popup-container,
}
body.desktop .dropdown-menu:not(#context-menu-container) .dropdown-item,
body.desktop .dropdown-menu .dropdown-toggle,
body #context-menu-container .dropdown-item > span,
body.mobile .dropdown .dropdown-submenu > span {
display: flex;
@ -717,7 +719,6 @@ table.promoted-attributes-in-tooltip th {
.tooltip {
font-size: var(--main-font-size) !important;
z-index: calc(var(--ck-z-panel) - 1) !important;
white-space: pre-wrap;
}
.tooltip.tooltip-top {
@ -1129,11 +1130,6 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href
border-color: var(--main-border-color) !important;
}
.bx-empty {
width: 1em;
display: inline-block;
}
.modal-header {
padding: 0.5rem 1rem 0.5rem 1rem !important; /* make modal header padding slightly smaller */
}
@ -1800,7 +1796,7 @@ button.close:hover {
display: none;
}
.reference-link .bx {
.reference-link .tn-icon {
position: relative;
top: 1px;
margin-inline-end: 3px;
@ -1952,6 +1948,10 @@ body.electron.platform-darwin:not(.native-titlebar) .tab-row-container {
padding-inline-start: 1em;
}
.tab-row-widget {
contain: inline-size;
}
#tab-row-left-spacer {
width: env(titlebar-area-x);
-webkit-app-region: drag;
@ -1961,7 +1961,7 @@ body.electron.platform-darwin:not(.native-titlebar):not(.full-screen) #tab-row-l
width: 80px;
}
.tab-row-container {
body.electron:not(.platform-darwin) .tab-row-container {
padding-inline-end: calc(100vw - env(titlebar-area-width, 100vw));
}
@ -2196,8 +2196,9 @@ body.zen.experimental-feature-new-layout {
border-radius: 8px;
border: 1px solid var(--main-border-color);
padding: 4px;
background: var(--menu-background-color);
background: var(--menu-background-color) !important;
transform: translateX(-50%);
backdrop-filter: blur(6px);
}
#root-widget:has(.note-split.type-text:focus-within) .classic-toolbar-widget,
@ -2414,7 +2415,7 @@ footer.webview-footer button {
gap: 5px;
}
.right-pane-tab .tab-title .bx {
.right-pane-tab .tab-title .tn-icon {
font-size: 1.1em;
}
@ -2542,18 +2543,11 @@ footer.webview-footer button {
inset-inline-end: 10px;
}
.content-floating-buttons button.bx {
.content-floating-buttons button.tn-icon {
font-size: 130%;
padding: 1px 10px 1px 10px;
}
/* Customized icons */
.bx-tn-toc::before {
content: "\ec24";
transform: rotate(180deg);
}
/* CK Editor */
/* Insert text snippet: limit the width of the listed items to avoid overly long names */

View File

@ -115,3 +115,7 @@ body .todo-list input[type="checkbox"]:not(:checked):before {
.use-note-color {
--custom-color: var(--dark-theme-custom-color);
}
span.fancytree-active {
color: var(--dark-theme-custom-color, var(--active-item-text-color));
}

View File

@ -99,3 +99,7 @@ html {
.use-note-color {
--custom-color: var(--light-theme-custom-color);
}
span.fancytree-active {
color: var(--light-theme-custom-color, var(--active-item-text-color));
}

View File

@ -21,7 +21,7 @@
--subtle-border-color: #313131;
--dropdown-border-color: #404040;
--dropdown-shadow-opacity: 0.6;
--dropdown-item-icon-destructive-color: #de6e5b;
--dropdown-item-icon-destructive-color: #d58477;
--contextual-help-icon-color: #7fd2ef;
--accented-background-color: #555;
@ -77,6 +77,7 @@
--link-color: #95c3d9;
--link-hover-background: #75c2e324;
--link-hover-color: var(--link-color);
--link-selection-outline-color: #75c2e385;
--hover-item-text-color: #efefef;
--hover-item-background-color: #ffffff16;
@ -236,7 +237,9 @@
--bottom-panel-background-color: #11111180;
--bottom-panel-title-bar-background-color: #3F3F3F80;
--status-bar-border-color: var(--main-border-color);
--scrollbar-thumb-color: #fdfdfd5c;
--scrollbar-thumb-hover-color: #ffffff7d;
--scrollbar-background-color: transparent;
@ -346,5 +349,5 @@ body .todo-list input[type="checkbox"]:not(:checked):before {
.note-split.with-hue *::selection,
.quick-edit-dialog-wrapper.with-hue *::selection {
background: hsl(var(--custom-color-hue), 49.2%, 35%);
--selection-background-color: hsl(var(--custom-color-hue), 49.2%, 35%);
}

View File

@ -21,7 +21,7 @@
--subtle-border-color: rgba(0, 0, 0, 0.1);
--dropdown-border-color: #ccc;
--dropdown-shadow-opacity: 0.2;
--dropdown-item-icon-destructive-color: #ec5138;
--dropdown-item-icon-destructive-color: #de4027;
--contextual-help-icon-color: #004382;
--accented-background-color: #f5f5f5;
@ -77,6 +77,7 @@
--link-color: #0076af;
--link-hover-background: #3c7fa017;
--link-hover-color: var(--link-color);
--link-selection-outline-color: #95c3d9db;
--hover-item-text-color: black;
--hover-item-background-color: #0000001a;
@ -232,8 +233,10 @@
--right-pane-item-hover-background: #00000013;
--right-pane-item-hover-color: inherit;
--bottom-panel-background-color: #0000000a;
--bottom-panel-title-bar-background-color: #00000017;
--bottom-panel-background-color: #ffffff8c;
--bottom-panel-title-bar-background-color: #94949414;
--status-bar-border-color: #0000003a;
--scrollbar-thumb-color: #0000005c;
--scrollbar-thumb-hover-color: #00000066;
@ -317,5 +320,5 @@
.note-split.with-hue *::selection,
.quick-edit-dialog-wrapper.with-hue *::selection {
background: hsl(var(--custom-color-hue), 60%, 90%);
--selection-background-color: hsl(var(--custom-color-hue), 60%, 90%);
}

View File

@ -128,10 +128,20 @@ body.backdrop-effects-disabled {
font-size: 0.9rem !important;
}
/* Use this class for non-legacy menus */
.dropdown-menu.tn-dropdown-menu {
--menu-item-icon-vert-offset: 0;
white-space-collapse: discard;
}
.dropdown-menu.tn-dropdown-menu .dropdown-item .tn-icon {
margin-inline-end: 6px;
}
.dropdown-menu.tn-dropdown-menu-scrollable {
/* Note: scrollable dropdowns does not support submenus */
max-height: 90vh;
overflow: scroll;
overflow-y: auto;
}
body.desktop .dropdown-menu::before,
@ -153,14 +163,14 @@ body.desktop .dropdown-menu.tn-dropdown-list {
backdrop-filter: var(--dropdown-backdrop-filter);
}
body.desktop .dropdown-menu.tn-dropdown-list::before {
display: none;
}
body.desktop .dropdown-submenu .dropdown-menu::before {
content: unset;
}
body.desktop .dropdown-menu.tn-dropdown-list::before {
display: none;
}
body.desktop .dropdown-submenu .dropdown-menu {
backdrop-filter: var(--dropdown-backdrop-filter);
background: transparent;
@ -224,6 +234,10 @@ html body .dropdown-item[disabled] {
opacity: var(--menu-item-disabled-opacity);
}
.dropdown-item:not(.disabled) .destructive-action-icon,
.dropdown-item:not(.disabled) .bx-trash {
--menu-item-icon-color: var(--dropdown-item-icon-destructive-color);
}
/* Badges */
:root .badge {
--bs-badge-color: var(--badge-text-color);
@ -235,7 +249,7 @@ html body .dropdown-item[disabled] {
}
/* Menu item icon */
.dropdown-item .bx {
.dropdown-item .tn-icon {
translate: 0 var(--menu-item-icon-vert-offset);
color: var(--menu-item-icon-color) !important;
font-size: 1.1em;
@ -482,7 +496,7 @@ li.dropdown-item a.dropdown-item-button {
border: unset;
}
li.dropdown-item a.dropdown-item-button.bx {
li.dropdown-item a.dropdown-item-button.tn-icon {
color: var(--menu-text-color) !important;
}
@ -543,13 +557,13 @@ li.dropdown-item a.dropdown-item-button:focus-visible {
padding-top: 0;
}
#toast-container .toast:not(.no-title) .bx {
#toast-container .toast:not(.no-title) .tn-icon {
margin-inline-end: 0.5em;
font-size: 1.1em;
opacity: 0.85;
}
#toast-container .toast.no-title .bx {
#toast-container .toast.no-title .tn-icon {
margin-inline-end: 0;
font-size: 1.3em;
}
@ -740,7 +754,7 @@ li.dropdown-item a.dropdown-item-button:focus-visible {
margin-bottom: 0;
}
.note-list-wrapper .note-book-card .bx {
.note-list-wrapper .note-book-card .tn-icon {
color: var(--left-pane-icon-color) !important;
}
@ -748,11 +762,6 @@ li.dropdown-item a.dropdown-item-button:focus-visible {
filter: contrast(105%);
}
.note-list.grid-view .note-book-card img {
object-fit: cover !important;
width: 100%;
}
.note-list.grid-view .ck-content {
line-height: 1.3;
}

View File

@ -423,6 +423,6 @@ div.tn-tool-dialog {
font-size: unset;
}
.note-type-chooser-dialog div.note-type-dropdown .dropdown-item span.bx {
.note-type-chooser-dialog div.note-type-dropdown .dropdown-item span.tn-icon {
margin-inline-end: .25em;
}
}

View File

@ -62,10 +62,10 @@ button.ck.ck-button:is(.ck-button-action, .ck-button-save, .ck-button-cancel, .c
}
/* Button's icon */
button.btn.btn-primary span.bx,
button.btn.btn-secondary span.bx,
button.btn.btn-sm span.bx,
button.btn.btn-success span.bx {
button.btn.btn-primary span.tn-icon,
button.btn.btn-secondary span.tn-icon,
button.btn.btn-sm span.tn-icon,
button.btn.btn-success span.tn-icon {
color: var(--cmd-button-icon-color);
padding-inline-end: 0.35em;
font-size: 1.2em;
@ -353,6 +353,11 @@ label.input-group.tn-number-unit-pair input {
padding-inline-end: 0;
}
:root .input-group > pre[aria-hidden="true"] {
margin: 0;
padding: 0;
}
/* Combo box-like dropdown buttons */
.select-button.dropdown-toggle::after {

View File

@ -634,6 +634,10 @@ html .note-detail-editable-text :not(figure, .include-note, hr):first-child {
font-weight: 300;
}
.ck-content strong {
font-weight: 600;
}
.ck-content hr {
margin: 5px 0;
height: 1px;
@ -678,8 +682,8 @@ html .note-detail-editable-text :not(figure, .include-note, hr):first-child {
.ck-content a.ck-widget.ck-widget_selected,
.ck-content a.ck-link_selected {
outline: 2px solid var(--input-focus-outline-color);
outline-offset: 2px;
outline: none;
box-shadow: 0 0 0 2px var(--link-selection-outline-color);
background: var(--link-hover-background);
}
@ -692,7 +696,7 @@ html .note-detail-editable-text :not(figure, .include-note, hr):first-child {
text-decoration: none;
}
.ck-content a.reference-link.use-note-color > span {
.ck-content a.reference-link > span.use-note-color {
color: var(--custom-color, inherit);
}

View File

@ -151,6 +151,11 @@
--options-title-font-size: .75rem;
--options-title-offset: 13px;
}
.note-split.options {
--preferred-max-content-width: var(--options-card-max-width);
}
/* Create a gap at the top of the option pages */
.note-detail-content-widget-content.options>*:first-child {
margin-top: var(--options-first-item-top-margin, 1em);
@ -172,6 +177,10 @@
height: 0;
}
body.experimental-feature-new-layout .note-detail-content-widget-content.options {
padding-inline: 25px;
}
.options-section:not(.tn-no-card) {
margin-bottom: calc(var(--options-title-offset) + 26px) !important;
box-shadow: var(--card-box-shadow);
@ -181,10 +190,6 @@
padding: var(--options-card-padding);
}
body.prefers-centered-content .options-section:not(.tn-no-card) {
margin-inline: auto;
}
body.desktop .options-section:not(.tn-no-card) {
min-width: var(--options-card-min-width);
max-width: var(--options-card-max-width);

View File

@ -497,7 +497,7 @@ div.bookmark-folder-widget .note-link:hover a {
}
/* The item's icon */
div.bookmark-folder-widget .note-link .bx {
div.bookmark-folder-widget .note-link .tn-icon {
color: var(--menu-item-icon-color);
font-size: 1.2em;
}
@ -1085,7 +1085,7 @@ body.desktop:not(.background-effects.platform-win32) #root-widget.horizontal-lay
margin-top: calc((var(--tab-bar-height) - var(--tab-height)) * -1);
}
body.layout-horizontal .tab-row-widget .note-tab .note-tab-wrapper {
body.layout-horizontal div.tab-row-widget div.note-tab div.note-tab-wrapper {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
@ -1374,6 +1374,10 @@ body.mobile .note-title {
border-bottom: 2px solid #0000001c !important;
}
body.experimental-feature-new-layout #center-pane .note-split > div.alert {
margin-top: 0;
}
/*
* Promoted attributes
*/
@ -1799,6 +1803,10 @@ div.find-replace-widget div.find-widget-found-wrapper > span {
background: var(--right-pane-background-color);
}
#right-pane > * {
animation: fade-in 200ms ease-in;
}
#right-pane div.card-header {
align-items: center;
border: 0;

View File

@ -229,11 +229,11 @@ span.fancytree-node.archived {
opacity: 0.6;
}
.fancytree-node:hover .bx.tree-item-button {
.fancytree-node:hover .tn-icon.tree-item-button {
display: inline-block;
}
.bx.tree-item-button {
.tn-icon.tree-item-button {
display: none;
font-size: 120%;
cursor: pointer;
@ -243,7 +243,7 @@ span.fancytree-node.archived {
border-radius: 5px;
}
.unhoist-button.bx.tree-item-button {
.unhoist-button.tn-icon.tree-item-button {
margin-inline-start: 0; /* unhoist button is on the left and doesn't need more margin */
display: block; /* keep always visible */
}

View File

@ -11,11 +11,25 @@
},
"toast": {
"critical-error": {
"title": "خطأ فادح"
"title": "خطأ فادح",
"message": "حدث خطأ حرج يمنع تشغيل تطبيق العميل:\n\n{{message}}\n\nيُرجّح أن يكون سبب هذا الخطأ هو تعطل أحد البرامج النصية بشكل غير متوقع. حاول تشغيل التطبيق في الوضع الآمن لحل المشكلة."
},
"widget-error": {
"title": "فشل في البدء بعنصر الواجهة"
}
"title": "فشل في البدء بعنصر الواجهة",
"message-custom": "تعذر تهيئة عنصر واجهة المستخدم المخصص من الملاحظة ذات المعرّف \"{{id}}\" والعنوان \"{{title}}\" بسبب:\n\n{{message}}",
"message-unknown": "تعذر تهيئة عنصر واجهة المستخدم غير المعروف بسبب:\n\n{{message}}"
},
"bundle-error": {
"title": "فشل تحميل البرنامج النصي المخصص",
"message": "تعذر تنفيذ البرنامج النصي بسبب:\n\n{{message}}"
},
"widget-list-error": {
"title": "فشل في الحصول على قائمة الأدوات من الخادم"
},
"widget-render-error": {
"title": "فشل عرض عنصر واجهة مستخدم React مخصص"
},
"widget-missing-parent": "لا تحتوي الأداة المخصصة على خاصية إلزامية '{{property}}'.\n\nإذا كان من المفترض تشغيل هذا البرنامج النصي بدون عنصر واجهة مستخدم، فاستخدم '#run=frontendStartup' بدلاً من ذلك."
},
"add_link": {
"add_link": "أضافة رابط",
@ -209,7 +223,6 @@
"backlink_other": ""
},
"note_icon": {
"category": "الفئة:",
"search": "بحث:",
"change_note_icon": "تغيير ايقونة الملاحظة",
"reset-default": "اعادة تعيين الى الايقونة الافتراضية"

View File

@ -146,7 +146,6 @@
"relation": "relació"
},
"note_icon": {
"category": "Categoria:",
"search": "Cerca:"
},
"basic_properties": {

View File

@ -21,8 +21,17 @@
},
"bundle-error": {
"title": "加载自定义脚本失败",
"message": "来自 ID 为 \"{{id}}\"、标题为 \"{{title}}\" 的笔记的脚本因以下原因无法执行:\n\n{{message}}"
}
"message": "脚本因以下原因无法执行:\n\n{{message}}"
},
"widget-list-error": {
"title": "无法从服务器取得小部件清单"
},
"widget-render-error": {
"title": "渲染自定义 React 小部件失败"
},
"widget-missing-parent": "自定义小部件未定义强制性的 \"{{property}}\" 属性。\n\n如果此脚本需要在没有 UI 元素的情况下运行,请改用“#run=frontendStartup”。",
"open-script-note": "打开脚本笔记",
"scripting-error": "自定义脚本错误:{{title}}"
},
"add_link": {
"add_link": "添加链接",
@ -755,7 +764,6 @@
},
"note_icon": {
"change_note_icon": "更改笔记图标",
"category": "类别:",
"search": "搜索:",
"reset-default": "重置为默认图标"
},
@ -817,7 +825,8 @@
},
"inherited_attribute_list": {
"title": "继承的属性",
"no_inherited_attributes": "没有继承的属性。"
"no_inherited_attributes": "没有继承的属性。",
"none": "无"
},
"note_info_widget": {
"note_id": "笔记 ID",
@ -1587,7 +1596,11 @@
"note_detail": {
"could_not_find_typewidget": "找不到类型为 '{{type}}' 的 typeWidget",
"printing": "正在打印…",
"printing_pdf": "正在导出为PDF…"
"printing_pdf": "正在导出为PDF…",
"print_report_title": "打印报告",
"print_report_collection_content_other": "集合中的 {{count}} 篇笔记无法打印,因为它们不受支持或受到保护。",
"print_report_collection_details_button": "查看详情",
"print_report_collection_details_ignored_notes": "忽略的笔记"
},
"note_title": {
"placeholder": "请输入笔记标题...",
@ -1597,7 +1610,8 @@
"note_type_switcher_others": "其他笔记类型",
"note_type_switcher_templates": "模板",
"note_type_switcher_collection": "集合",
"edited_notes": "编辑过的笔记"
"edited_notes": "今天编辑过的笔记",
"promoted_attributes": "升级属性"
},
"search_result": {
"no_notes_found": "没有找到符合搜索条件的笔记。",
@ -2200,5 +2214,8 @@
"toggle": "切换右侧面板",
"custom_widget_go_to_source": "跳转到源码",
"empty_message": "这篇笔记没有展示内容"
},
"attributes_panel": {
"title": "笔记属性"
}
}

View File

@ -21,7 +21,10 @@
},
"bundle-error": {
"title": "Benutzerdefiniertes Skript konnte nicht geladen werden",
"message": "Skript aus der Notiz \"{{title}}\" mit der ID \"{{id}}\", konnte nicht ausgeführt werden wegen:\n\n{{message}}"
"message": "Skript konnte nicht ausgeführt werden wegen:\n\n{{message}}"
},
"widget-list-error": {
"title": "Abruf der Liste von Widgets vom Server ist fehlgeschlagen"
}
},
"add_link": {
@ -746,7 +749,6 @@
},
"note_icon": {
"change_note_icon": "Notiz-Icon ändern",
"category": "Kategorie:",
"search": "Suche:",
"reset-default": "Standard wiederherstellen"
},

View File

@ -21,8 +21,17 @@
},
"bundle-error": {
"title": "Failed to load a custom script",
"message": "Script from note with ID \"{{id}}\", titled \"{{title}}\" could not be executed due to:\n\n{{message}}"
}
"message": "Script could not be executed due to:\n\n{{message}}"
},
"widget-list-error": {
"title": "Failed to obtain the list of widgets from the server"
},
"widget-render-error": {
"title": "Failed to render a custom React widget"
},
"widget-missing-parent": "Custom widget does not have mandatory '{{property}}' property defined.\n\nIf this script is meant to be run without a UI element, use '#run=frontendStartup' instead.",
"open-script-note": "Open script note",
"scripting-error": "Custom script error: {{title}}"
},
"add_link": {
"add_link": "Add link",
@ -756,9 +765,16 @@
},
"note_icon": {
"change_note_icon": "Change note icon",
"category": "Category:",
"search": "Search:",
"reset-default": "Reset to default icon"
"search_placeholder_one": "Search {{number}} icons across {{count}} packs",
"search_placeholder_other": "Search {{number}} icons across {{count}} packs",
"search_placeholder_filtered": "Search {{number}} icons in {{name}}",
"reset-default": "Reset to default icon",
"filter": "Filter",
"filter-none": "All icons",
"filter-default": "Default icons",
"icon_tooltip": "{{name}}\nIcon pack: {{iconPack}}",
"no_results": "No icons found."
},
"basic_properties": {
"note_type": "Note type",
@ -1604,7 +1620,7 @@
"will_be_deleted_in": "This attachment will be automatically deleted in {{time}}",
"will_be_deleted_soon": "This attachment will be automatically deleted soon",
"deletion_reason": ", because the attachment is not linked in the note's content. To prevent deletion, add the attachment link back into the content or convert the attachment into note.",
"role_and_size": "Role: {{role}}, Size: {{size}}",
"role_and_size": "Role: {{role}}, size: {{size}}, MIME: {{- mimeType}}",
"link_copied": "Attachment link copied to clipboard.",
"unrecognized_role": "Unrecognized attachment role '{{role}}'."
},
@ -1761,7 +1777,12 @@
"note_detail": {
"could_not_find_typewidget": "Could not find typeWidget for type '{{type}}'",
"printing": "Printing in progress...",
"printing_pdf": "Exporting to PDF in progress..."
"printing_pdf": "Exporting to PDF in progress...",
"print_report_title": "Print report",
"print_report_collection_content_one": "{{count}} note in the collection could not be printed because they are not supported or they are protected.",
"print_report_collection_content_other": "{{count}} notes in the collection could not be printed because they are not supported or they are protected.",
"print_report_collection_details_button": "See details",
"print_report_collection_details_ignored_notes": "Ignored notes"
},
"note_title": {
"placeholder": "type note's title here...",
@ -1771,7 +1792,8 @@
"note_type_switcher_others": "Other note type",
"note_type_switcher_templates": "Template",
"note_type_switcher_collection": "Collection",
"edited_notes": "Edited notes"
"edited_notes": "Notes edited on this day",
"promoted_attributes": "Promoted attributes"
},
"search_result": {
"no_notes_found": "No notes have been found for given search parameters.",

View File

@ -749,7 +749,6 @@
},
"note_icon": {
"change_note_icon": "Cambiar icono de nota",
"category": "Categoría:",
"search": "Búsqueda:",
"reset-default": "Restablecer a icono por defecto"
},

View File

@ -756,7 +756,6 @@
},
"note_icon": {
"change_note_icon": "Changer l'icône de note",
"category": "Catégorie :",
"search": "Recherche :",
"reset-default": "Réinitialiser l'icône par défaut"
},

View File

@ -523,7 +523,8 @@
},
"toc": {
"table_of_contents": "Sommario",
"options": "Opzioni"
"options": "Opzioni",
"no_headings": "Nessun titolo."
},
"table_of_contents": {
"title": "Sommario",
@ -556,7 +557,13 @@
},
"highlights_list_2": {
"title": "Punti salienti",
"options": "Opzioni"
"options": "Opzioni",
"title_with_count_one": "{{count}} evidenza",
"title_with_count_many": "{{count}} evidenze",
"title_with_count_other": "{{count}} evidenze",
"modal_title": "Configura elenco dei punti salienti",
"menu_configure": "Configura elenco dei punti salienti...",
"no_highlights": "Nessun punto saliente trovato."
},
"quick-search": {
"placeholder": "Ricerca rapida",
@ -1326,7 +1333,6 @@
},
"note_icon": {
"change_note_icon": "Cambia icona nota",
"category": "Categoria:",
"search": "Ricerca:",
"reset-default": "Ripristina l'icona predefinita"
},
@ -1388,7 +1394,8 @@
},
"inherited_attribute_list": {
"title": "Attributi ereditati",
"no_inherited_attributes": "Nessun attributo ereditato."
"no_inherited_attributes": "Nessun attributo ereditato.",
"none": "nessuno"
},
"note_info_widget": {
"note_id": "ID nota",
@ -1400,7 +1407,8 @@
"calculate": "calcolare",
"subtree_size": "(dimensione del sottoalbero: {{size}} in {{count}} note)",
"title": "Nota informativa",
"show_similar_notes": "Mostra note simili"
"show_similar_notes": "Mostra note simili",
"mime": "Tipo MIME"
},
"note_map": {
"open_full": "Espandi completamente",
@ -2095,14 +2103,20 @@
"background_effects_title": "Gli effetti di sfondo sono ora stabili",
"background_effects_message": "Sui dispositivi Windows, gli effetti di sfondo sono ora completamente stabili. Gli effetti di sfondo aggiungono un tocco di colore all'interfaccia utente sfocando lo sfondo retrostante. Questa tecnica è utilizzata anche in altre applicazioni come Esplora risorse di Windows.",
"background_effects_button": "Abilita gli effetti di sfondo",
"dismiss": "Congedare"
"dismiss": "Congedare",
"new_layout_title": "Nuovo layout",
"new_layout_message": "Abbiamo introdotto un layout modernizzato per Trilium. La barra multifunzione è stata rimossa e integrata perfettamente nell'interfaccia principale, con una nuova barra di stato e sezioni espandibili (come gli attributi promossi) che assumono le funzioni chiave.\n\nIl nuovo layout è abilitato di default e può essere temporaneamente disabilitato tramite Opzioni → Aspetto.",
"new_layout_button": "Maggiori informazioni"
},
"settings": {
"related_settings": "Impostazioni correlate"
},
"settings_appearance": {
"related_code_blocks": "Schema di colori per i blocchi di codice nelle note di testo",
"related_code_notes": "Schema di colori per le note del codice"
"related_code_notes": "Schema di colori per le note del codice",
"ui": "Interfaccia utente",
"ui_old_layout": "Vecchio layout",
"ui_new_layout": "Nuovo layout"
},
"units": {
"percentage": "%"
@ -2159,13 +2173,18 @@
"execute_script": "Esegui script",
"execute_script_description": "Questa nota è una nota di script. Clicca per eseguire lo script.",
"execute_sql": "Esegui SQL",
"execute_sql_description": "Questa nota è una nota SQL. Clicca per eseguire la query SQL."
"execute_sql_description": "Questa nota è una nota SQL. Clicca per eseguire la query SQL.",
"shared_copy_to_clipboard": "Copia link negli appunti",
"shared_open_in_browser": "Apri il link nel browser",
"shared_unshare": "Rimuovi condivisione"
},
"breadcrumb": {
"workspace_badge": "Area di lavoro",
"scroll_to_top_title": "Vai all'inizio della nota",
"hoisted_badge": "Sollevato",
"hoisted_badge_title": "Abbassato"
"hoisted_badge_title": "Abbassato",
"create_new_note": "Crea nuova nota secondaria",
"empty_hide_archived_notes": "Nascondi note archiviate"
},
"status_bar": {
"language_title": "Cambia lingua dei contenuti",
@ -2191,5 +2210,14 @@
"note_paths_other": "{{count}} percorsi",
"note_paths_title": "Nota percorsi",
"code_note_switcher": "Cambia modalità lingua"
},
"attributes_panel": {
"title": "Attributi delle note"
},
"right_pane": {
"empty_message": "Nulla da segnalare per questa nota",
"empty_button": "Nascondi il pannello",
"toggle": "Attiva/disattiva pannello destro",
"custom_widget_go_to_source": "Vai al codice sorgente"
}
}

View File

@ -21,8 +21,17 @@
},
"bundle-error": {
"title": "カスタムスクリプトの読み込みに失敗しました",
"message": "ートID”{{id}}”, ノートタイトル “{{title}}” のスクリプトを実行できませんでした。理由は以下の通りです:\n\n{{message}}"
}
"message": "次の理由によりスクリプトを実行できませんでした:\n\n{{message}}"
},
"widget-list-error": {
"title": "サーバーからウィジェットのリストを取得できませんでした"
},
"widget-render-error": {
"title": "カスタム React ウィジェットのレンダリングに失敗しました"
},
"widget-missing-parent": "カスタムウィジェットに必須の '{{property}}' プロパティが定義されていません。\n\nこのスクリプトを UI 要素なしで実行する場合は、代わりに '#run=frontendStartup' を使用してください。",
"open-script-note": "スクリプトノートを開く",
"scripting-error": "カスタムスクリプトエラー: {{title}}"
},
"add_link": {
"add_link": "リンクを追加",
@ -143,7 +152,6 @@
},
"note_icon": {
"change_note_icon": "ノートアイコンの変更",
"category": "カテゴリー:",
"search": "検索:",
"reset-default": "アイコンをデフォルトに戻す"
},
@ -152,7 +160,7 @@
"editable": "編集可能",
"basic_properties": "基本プロパティ",
"language": "言語",
"configure_code_notes": "コードノートを設定しています..."
"configure_code_notes": "コードノートを設定..."
},
"i18n": {
"title": "ローカライゼーション",
@ -1254,7 +1262,8 @@
"note_type_switcher_others": "その他のノートタイプ",
"note_type_switcher_templates": "テンプレート",
"note_type_switcher_collection": "コレクション",
"edited_notes": "編集済みノート"
"edited_notes": "この日に編集されたノート",
"promoted_attributes": "プロモート属性"
},
"search_result": {
"no_notes_found": "指定された検索パラメータに該当するノートは見つかりませんでした。",
@ -1621,7 +1630,8 @@
},
"inherited_attribute_list": {
"title": "継承属性",
"no_inherited_attributes": "継承属性はありません。"
"no_inherited_attributes": "継承属性はありません。",
"none": "なし"
},
"note_map": {
"open_full": "拡大表示",
@ -1919,7 +1929,11 @@
"note_detail": {
"could_not_find_typewidget": "タイプ {{type}} の typeWidget が見つかりませんでした",
"printing": "印刷中です...",
"printing_pdf": "PDF へのエクスポート中です..."
"printing_pdf": "PDF へのエクスポート中です...",
"print_report_title": "レポートを印刷",
"print_report_collection_content_other": "コレクション内の {{count}} 件のノートは、サポートされていないか保護されているため、印刷できませんでした。",
"print_report_collection_details_button": "詳細を見る",
"print_report_collection_details_ignored_notes": "無視されたノート"
},
"watched_file_update_status": {
"ignore_this_change": "この変更を無視する",
@ -2200,5 +2214,8 @@
"empty_button": "パネルを非表示",
"toggle": "右パネルを切り替え",
"custom_widget_go_to_source": "ソースコードへ移動"
},
"attributes_panel": {
"title": "ノート属性"
}
}

View File

@ -22,7 +22,15 @@
"bundle-error": {
"title": "Nie udało się załadować niestandardowego skryptu",
"message": "Skrypt z notatki o ID \"{{id}}\", zatytułowany \"{{title}}\", nie mógł zostać wykonany z powodu:\n\n{{message}}"
}
},
"widget-list-error": {
"title": "Nie udało się pobrać listy widżetów z serwera"
},
"widget-render-error": {
"title": "Nie udało się wyrenderować niestandardowego widżetu React"
},
"widget-missing-parent": "Niestandardowy widżet nie ma zdefiniowanej obowiązkowej właściwości „{{property}}”.",
"open-script-note": "Otwórz notatkę ze skryptem"
},
"add_link": {
"add_link": "Dodaj link",
@ -434,7 +442,8 @@
},
"inherited_attribute_list": {
"title": "Dziedziczone atrybuty",
"no_inherited_attributes": "Brak dziedziczonych atrybutów."
"no_inherited_attributes": "Brak dziedziczonych atrybutów.",
"none": "brak"
},
"note_info_widget": {
"note_id": "ID notatki",
@ -1277,7 +1286,6 @@
},
"note_icon": {
"change_note_icon": "Zmień ikonę notatki",
"category": "Kategoria:",
"search": "Szukaj:",
"reset-default": "Przywróć domyślną ikonę"
},
@ -1937,7 +1945,10 @@
"options": "Opcje",
"modal_title": "Konfiguracja listy wyróżnień",
"menu_configure": "Konfiguracja listy wyróżnień...",
"no_highlights": "Nie znaleziono wyróżnień."
"no_highlights": "Nie znaleziono wyróżnień.",
"title_with_count_one": "{{count}} podświetlenie",
"title_with_count_few": "{{count}} podświetlenia",
"title_with_count_many": "{{count}} podświetleń"
},
"quick-search": {
"placeholder": "Szybkie wyszukiwanie",
@ -2008,7 +2019,8 @@
},
"toc": {
"table_of_contents": "Spis treści",
"options": "Opcje"
"options": "Opcje",
"no_headings": "Brak nagłówków."
},
"watched_file_update_status": {
"file_last_modified": "Plik <code class=\"file-path\"></code> został ostatnio zmodyfikowany <span class=\"file-last-modified\"></span>.",
@ -2206,5 +2218,14 @@
"scroll_to_top_title": "Przejdź na początek notatki",
"create_new_note": "Utwórz nową notatkę podrzędną",
"empty_hide_archived_notes": "Ukryj zarchiwizowane notatki"
},
"attributes_panel": {
"title": "Atrybuty notatki"
},
"right_pane": {
"empty_message": "Brak elementów do wyświetlenia dla tej notatki",
"empty_button": "Ukryj panel",
"toggle": "Pokaż/ukryj prawy panel",
"custom_widget_go_to_source": "Przejdź do kodu źródłowego"
}
}

View File

@ -724,7 +724,6 @@
},
"note_icon": {
"change_note_icon": "Alterar ícone da nota",
"category": "Categoria:",
"search": "Pesquisa:",
"reset-default": "Redefinir para o ícone padrão"
},

View File

@ -29,7 +29,15 @@
"bundle-error": {
"title": "Falha para carregar o script customizado",
"message": "O script da nota com ID \"{{id}}\", intitulada \"{{title}}\", não pôde ser executado devido a:\n\n{{message}}"
}
},
"widget-list-error": {
"title": "Falha ao obter a lista de widgets do servidor"
},
"widget-render-error": {
"title": "Falha ao renderizar um widget React personalizado"
},
"widget-missing-parent": "O widget personalizado não possui a propriedade obrigatória '{{property}}' definida.",
"open-script-note": "Abrir nota de script"
},
"add_link": {
"add_link": "Adicionar link",
@ -46,7 +54,10 @@
"save": "Salvar",
"edit_branch_prefix": "Editar Prefixo do Branch",
"help_on_tree_prefix": "Ajuda sobre o prefixo da árvore de notas",
"branch_prefix_saved": "O prefixo de ramificação foi salvo."
"branch_prefix_saved": "O prefixo de ramificação foi salvo.",
"edit_branch_prefix_multiple": "Editar prefixo do ramo para {{count}} ramos",
"branch_prefix_saved_multiple": "O prefixo do ramo foi salvo para {{count}} ramos.",
"affected_branches": "Ramos afetados ({{count}}):"
},
"bulk_actions": {
"bulk_actions": "Ações em massa",
@ -254,7 +265,8 @@
"export_status": "Status da exportação",
"export_in_progress": "Exportação em andamento: {{progressCount}}",
"export_finished_successfully": "Exportação concluída com sucesso.",
"format_pdf": "PDF para impressão ou compartilhamento."
"format_pdf": "PDF para impressão ou compartilhamento.",
"share-format": "HTML para publicação na web — usa o mesmo tema das notas compartilhadas, mas pode ser publicado como um site estático."
},
"help": {
"noteNavigation": "Navegação de notas",
@ -308,7 +320,8 @@
"other": "Outros",
"quickSearch": "focar no campo de pesquisa rápida",
"inPageSearch": "pesquisa na página",
"title": "Folha de Dicas"
"title": "Folha de Dicas",
"editShortcuts": "Editar atalhos de teclado"
},
"import": {
"importIntoNote": "Importar para a nota",
@ -334,7 +347,8 @@
},
"import-status": "Status da importação",
"in-progress": "Importação em andamento: {{progress}}",
"successful": "Importação concluída com sucesso."
"successful": "Importação concluída com sucesso.",
"importZipRecommendation": "Ao importar um arquivo ZIP, a hierarquia de notas refletirá a estrutura de subdiretórios dentro do arquivo."
},
"include_note": {
"dialog_title": "Incluir nota",
@ -349,7 +363,8 @@
"info": {
"modalTitle": "Mensagem informativa",
"closeButton": "Fechar",
"okButton": "OK"
"okButton": "OK",
"copy_to_clipboard": "Copiar para a área de transferência"
},
"jump_to_note": {
"search_placeholder": "Pesquise uma nota pelo nome ou digite > para comandos...",
@ -771,7 +786,7 @@
"import-into-note": "Importar na nota",
"apply-bulk-actions": "Aplicar ações em massa",
"converted-to-attachments": "{{count}} notas foram convertidas em anexos.",
"convert-to-attachment-confirm": "Tem certeza de que deseja converter as notas selecionadas em anexos de suas notas-pai?",
"convert-to-attachment-confirm": "Tem certeza de que deseja converter as notas selecionadas em anexos de suas notas pai? Esta operação se aplica apenas a notas de imagem; outras notas serão ignoradas.",
"open-in-popup": "Edição rápida",
"archive": "Ficheiro",
"unarchive": "Desarquivar"
@ -789,7 +804,7 @@
"show_attachments_description": "Exibir anexos da nota",
"search_notes_title": "Buscar Notas",
"search_notes_description": "Abrir busca avançada",
"configure_launch_bar_description": "Abrir a configuração da barra de lançamento, para adicionar ou remover itens."
"configure_launch_bar_description": "Abrir a configuração da barra de atalho, para adicionar ou remover itens."
},
"delete_note": {
"delete_note": "Excluir nota",
@ -882,7 +897,7 @@
"zoom_out": "Reduzir",
"reset_zoom_level": "Redefinir Zoom",
"zoom_in": "Aumentar",
"configure_launchbar": "Configurar Barra de Lançamento",
"configure_launchbar": "Configurar Barra de Atalhos",
"show_shared_notes_subtree": "Exibir Subárvore de Notas Compartilhadas",
"advanced": "Avançado",
"open_dev_tools": "Abrir Ferramentas de Desenvolvedor",
@ -897,7 +912,9 @@
"logout": "Sair",
"show-cheatsheet": "Exibir Cheatsheet",
"toggle-zen-mode": "Modo Zen",
"reload_hint": "Recarregar pode ajudar com alguns problemas visuais sem reiniciar toda a aplicação."
"reload_hint": "Recarregar pode ajudar com alguns problemas visuais sem reiniciar toda a aplicação.",
"new-version-available": "Nova atualização disponível",
"download-update": "Obter a versão {{latestVersion}}"
},
"zen_mode": {
"button_exit": "Sair do Modo Zen"
@ -935,7 +952,14 @@
"convert_into_attachment_successful": "A nota '{{title}}' foi convertida para anexo.",
"print_pdf": "Exportar como PDF…",
"open_note_externally_title": "O arquivo será aberto em uma aplicação externa e monitorado por alterações. Você então poderá enviar a versão modificada de volta para o Trilium.",
"convert_into_attachment_prompt": "Você tem certeza que quer converter a nota '{{title}}' em um anexo da nota pai?"
"convert_into_attachment_prompt": "Você tem certeza que quer converter a nota '{{title}}' em um anexo da nota pai?",
"open_note_on_server": "Abrir nota no servidor",
"view_revisions": "Revisões da nota…",
"advanced": "Avançado",
"export_as_image": "Exportar como imagem",
"export_as_image_png": "PNG (raster)",
"export_as_image_svg": "SVG (vetorial)",
"note_map": "Mapa de notas"
},
"protected_session_status": {
"inactive": "Clique para entrar na sessão protegida",
@ -979,11 +1003,11 @@
"insert_child_note": "Inserir nota filha",
"delete_this_note": "Excluir essa nota",
"error_unrecognized_command": "Comando não reconhecido {{command}}",
"error_cannot_get_branch_id": "Não foi possível obter o branchId para o notePath '{{notePath}} '"
"error_cannot_get_branch_id": "Não foi possível obter o branchId para o notePath '{{notePath}} '",
"note_revisions": "Revisões de notas"
},
"note_icon": {
"change_note_icon": "Alterar ícone da nota",
"category": "Categoria:",
"search": "Busca:",
"reset-default": "Redefinir para o ícone padrão"
},
@ -1007,7 +1031,12 @@
"table": "Tabela",
"geo-map": "Mapa geográfico",
"board": "Quadro",
"include_archived_notes": "Exibir notas arquivadas"
"include_archived_notes": "Exibir notas arquivadas",
"expand_tooltip": "Expande os filhos diretos desta coleção (um nível). Para mais opções, pressione a seta à direita.",
"expand_first_level": "Expandir filhos diretos",
"expand_nth_level": "Expandir {{depth}} níveis",
"expand_all_levels": "Expandir todos os níveis",
"presentation": "Apresentação"
},
"edited_notes": {
"no_edited_notes_found": "Ainda não há nenhuma nota editada neste dia…",
@ -1020,7 +1049,7 @@
"file_type": "Tipo do arquivo",
"file_size": "Tamanho do arquivo",
"download": "Baixar",
"open": "Abrir",
"open": "Abrir externamente",
"upload_new_revision": "Enviar nova revisão",
"upload_success": "Uma nova revisão de arquivo foi enviada.",
"upload_failed": "O envio de uma nova revisão de arquivo falhou.",
@ -1040,7 +1069,8 @@
},
"inherited_attribute_list": {
"title": "Atributos Herdados",
"no_inherited_attributes": "Nenhum atributo herdado."
"no_inherited_attributes": "Nenhum atributo herdado.",
"none": "nenhum"
},
"note_info_widget": {
"note_id": "ID da Nota",
@ -1051,7 +1081,9 @@
"calculate": "calcular",
"title": "Informações da nota",
"subtree_size": "(tamanho da subárvore: {{size}} em {{count}} notas)",
"note_size_info": "O tamanho da nota fornece uma estimativa aproximada dos requisitos de armazenamento para esta nota. Leva em conta o conteúdo e o conteúdo de suas revisões de nota."
"note_size_info": "O tamanho da nota fornece uma estimativa aproximada dos requisitos de armazenamento para esta nota. Leva em conta o conteúdo e o conteúdo de suas revisões de nota.",
"mime": "Tipo MIME",
"show_similar_notes": "Mostrar notas semelhantes"
},
"note_map": {
"open_full": "Expandir completamente",
@ -1111,7 +1143,8 @@
"search_note_saved": "Nota de pesquisa foi salva em {{- notePathTitle}}",
"fast_search_description": "A opção de pesquisa rápida desabilita a pesquisa de texto completo do conteúdo de nota, o que pode acelerar a pesquisa em grandes bancos de dados.",
"include_archived_notes_description": "As notas arquivadas são por padrão excluídas dos resultados da pesquisa, com esta opção elas serão incluídas.",
"debug_description": "A depuração irá imprimir informações adicionais no console para ajudar na depuração de consultas complexas"
"debug_description": "A depuração irá imprimir informações adicionais no console para ajudar na depuração de consultas complexas",
"view_options": "Ver opções:"
},
"similar_notes": {
"title": "Notas Similares",
@ -1192,7 +1225,13 @@
},
"editable_text": {
"placeholder": "Digite o conteúdo da sua nota aqui…",
"auto-detect-language": "Detectado automaticamente"
"auto-detect-language": "Detectado automaticamente",
"editor_crashed_title": "O editor de texto travou",
"editor_crashed_content": "Seu conteúdo foi recuperado com sucesso, mas algumas das suas alterações mais recentes podem não ter sido salvas.",
"editor_crashed_details_button": "Veja mais detalhes...",
"editor_crashed_details_intro": "Se você encontrar este erro várias vezes, considere relatá-lo no GitHub colando as informações abaixo.",
"editor_crashed_details_title": "Informação técnica",
"keeps-crashing": "O componente de edição continua travando. Tente reiniciar o Trilium. Se o problema persistir, considere criar um relatório de bug."
},
"empty": {
"search_placeholder": "buscar uma nota pelo nome",
@ -1299,7 +1338,8 @@
"title": "Largura do Conteúdo",
"max_width_label": "Largura máxima do conteúdo",
"max_width_unit": "pixels",
"default_description": "Por padrão, o Trilium limita a largura máxima do conteúdo para melhorar a legibilidade em janelas maximizadas em telas wide."
"default_description": "Por padrão, o Trilium limita a largura máxima do conteúdo para melhorar a legibilidade em janelas maximizadas em telas wide.",
"centerContent": "Manter conteúdo centralizado"
},
"native_title_bar": {
"title": "Barra de Título Nativa (requer recarregar o app)",
@ -1319,11 +1359,11 @@
"layout": "Layout",
"layout-vertical-title": "Vertical",
"layout-horizontal-title": "Horizontal",
"layout-vertical-description": "barra de lançamento está a esquerda (padrão)",
"layout-horizontal-description": "barra de lançamento está abaixo da barra de abas, a barra de abas agora tem a largura total."
"layout-vertical-description": "barra de atalho está a esquerda (padrão)",
"layout-horizontal-description": "barra de atalho está abaixo da barra de abas, a barra de abas agora tem a largura total."
},
"note_launcher": {
"this_launcher_doesnt_define_target_note": "Este lançador não define uma nota destino."
"this_launcher_doesnt_define_target_note": "Este atalho não define uma nota destino."
},
"copy_image_reference_button": {
"button_title": "Copiar referência da imagem para a área de transferência, pode ser colado em uma nota de texto."
@ -1378,7 +1418,10 @@
"title": "Editor"
},
"code_mime_types": {
"title": "Tipos MIME disponíveis no dropdown"
"title": "Tipos MIME disponíveis no dropdown",
"tooltip_syntax_highlighting": "Realce de sintaxe",
"tooltip_code_block_syntax": "Blocos de código em notas de texto",
"tooltip_code_note_syntax": "Notas de código"
},
"vim_key_bindings": {
"use_vim_keybindings_in_code_notes": "Atribuições de teclas do Vim",
@ -1498,7 +1541,13 @@
"min-days-in-first-week": "Mínimo de dias da primeira semana",
"first-week-info": "Primeira semana que contenha a primeira Quinta-feira do ano é baseado na <a href=\"https://en.wikipedia.org/wiki/ISO_week_date#First_week\">ISO 8601</a>.",
"first-week-warning": "Alterar as opções de primeira semana pode causar duplicidade nas Notas Semanais existentes e estas Notas não serão atualizadas de acordo.",
"formatting-locale": "Formato de data e número"
"formatting-locale": "Formato de data e número",
"tuesday": "Terça-feira",
"wednesday": "Quarta-feira",
"thursday": "Quinta-feira",
"friday": "Sexta-feira",
"saturday": "Sábado",
"formatting-locale-auto": "Com base no idioma do aplicativo"
},
"backup": {
"automatic_backup": "Backup automático",
@ -1526,7 +1575,7 @@
"mind-map": "Mapa Mental",
"file": "Arquivo",
"image": "Imagem",
"launcher": "Lançador",
"launcher": "Atalho",
"doc": "Documento",
"widget": "Widget",
"confirm-change": "Não é recomentado alterar o tipo da nota quando o conteúdo da nota não está vazio. Quer continuar assim mesmo?",
@ -1569,7 +1618,13 @@
},
"highlights_list_2": {
"title": "Lista de Destaques",
"options": "Opções"
"options": "Opções",
"title_with_count_one": "{{count}} destaque",
"title_with_count_many": "{{count}} destaques",
"title_with_count_other": "{{count}} destaques",
"modal_title": "Configurar lista de destaques",
"menu_configure": "Configurar lista de destaques…",
"no_highlights": "Nenhum destaque encontrado."
},
"quick-search": {
"placeholder": "Busca rápida",
@ -1592,23 +1647,33 @@
"refresh-saved-search-results": "Atualizar resultados de pesquisa salvos",
"create-child-note": "Criar nota filha",
"unhoist": "Desafixar",
"toggle-sidebar": "Alternar barra lateral"
"toggle-sidebar": "Alternar barra lateral",
"dropping-not-allowed": "Não é permitido soltar notas neste local."
},
"title_bar_buttons": {
"window-on-top": "Manter Janela no Topo"
},
"note_detail": {
"could_not_find_typewidget": "Não foi possível encontrar typeWidget para o tipo '{{type}}'"
"could_not_find_typewidget": "Não foi possível encontrar typeWidget para o tipo '{{type}}'",
"printing": "Impressão em andamento…",
"printing_pdf": "Exportação para PDF em andamento…"
},
"note_title": {
"placeholder": "digite o título da nota aqui..."
"placeholder": "digite o título da nota aqui...",
"created_on": "Criado em <Value />",
"last_modified": "Modificado em <Value />",
"note_type_switcher_label": "Alternar de {{type}} para:",
"note_type_switcher_others": "Outro tipo de nota",
"note_type_switcher_templates": "Modelo",
"note_type_switcher_collection": "Coleção",
"edited_notes": "Notas editadas"
},
"search_result": {
"no_notes_found": "Nenhuma nota encontrada para os parâmetros de busca digitados.",
"search_not_executed": "A busca ainda não foi executada. Clique no botão \"Buscar\" acima para ver os resultados."
},
"spacer": {
"configure_launchbar": "Configurar Barra de Lançamento"
"configure_launchbar": "Configurar Barra de Atalhos"
},
"sql_result": {
"no_rows": "Nenhum linha foi retornada para esta consulta"
@ -1630,7 +1695,8 @@
},
"toc": {
"table_of_contents": "Tabela de Conteúdos",
"options": "Opções"
"options": "Opções",
"no_headings": "Nenhum título."
},
"watched_file_update_status": {
"file_last_modified": "O arquivo <code class=\"file-path\"></code> foi modificado pela última vez em <span class=\"file-last-modified\"></span>.",
@ -1673,22 +1739,24 @@
"ws": {
"sync-check-failed": "A verificação de sincronização falhou!",
"consistency-checks-failed": "A verificação de consistência falhou! Veja os logs para detalhes.",
"encountered-error": "Encontrado o erro \"{{message}}\", verifique o console."
"encountered-error": "Encontrado o erro \"{{message}}\", verifique o console.",
"lost-websocket-connection-title": "Conexão com o servidor perdida",
"lost-websocket-connection-message": "Verifique a configuração do seu proxy reverso (por exemplo, nginx ou Apache) para garantir que as conexões WebSocket estejam devidamente permitidas e não estejam sendo bloqueadas."
},
"hoisted_note": {
"confirm_unhoisting": "A nota solicitada '{{requestedNote}}' está fora da árvore da nota fixada '{{hoistedNote}}' e você precisa desafixar para acessar a nota. Quer prosseguir e desafixar?"
},
"launcher_context_menu": {
"reset_launcher_confirm": "Você deseja realmente reiniciar \"{{title}}\"? Todos os dados / configurações desta nota (e suas filhas) serão perdidos o lançador irá retornar para sua localização original.",
"add-note-launcher": "Adicionar um lançador de nota",
"add-script-launcher": "Adicionar um lançador de script",
"reset_launcher_confirm": "Você deseja realmente reiniciar \"{{title}}\"? Todos os dados / configurações desta nota (e suas filhas) serão perdidos o atalho irá retornar para sua localização original.",
"add-note-launcher": "Adicionar um atalho de nota",
"add-script-launcher": "Adicionar um atalho de script",
"add-custom-widget": "Adicionar um componente personalizado",
"add-spacer": "Adicionar um espaçador",
"delete": "Excluir <kbd data-command=\"deleteNotes\"></kbd>",
"reset": "Reiniciar",
"move-to-visible-launchers": "Mover para lançadores visíveis",
"move-to-available-launchers": "Mover para lançadores disponíveis",
"duplicate-launcher": "Duplicar o lançador <kbd data-command=\"duplicateSubtree\">"
"move-to-visible-launchers": "Mover para atalhos visíveis",
"move-to-available-launchers": "Mover para atalhos disponíveis",
"duplicate-launcher": "Duplicar o atalho <kbd data-command=\"duplicateSubtree\">"
},
"highlighting": {
"title": "Blocos de Código",
@ -1722,7 +1790,8 @@
"copy-link": "Copiar link",
"paste": "Colar",
"paste-as-plain-text": "Colar como texto sem formatação",
"search_online": "Buscar por \"{{term}}\" usando {{searchEngine}}"
"search_online": "Buscar por \"{{term}}\" usando {{searchEngine}}",
"search_in_trilium": "Pesquisar por \"{{term}}\" no Trilium"
},
"image_context_menu": {
"copy_reference_to_clipboard": "Copiar referência para a área de transferência",
@ -1732,7 +1801,8 @@
"open_note_in_new_tab": "Abrir nota em nova aba",
"open_note_in_new_split": "Abrir nota em nova divisão",
"open_note_in_new_window": "Abrir nota em nova janela",
"open_note_in_popup": "Edição rápida"
"open_note_in_popup": "Edição rápida",
"open_note_in_other_split": "Abrir nota no outro painel dividido"
},
"electron_integration": {
"desktop-application": "Aplicação Desktop",
@ -1800,8 +1870,9 @@
"unknown_widget": "Componente desconhecido para \"{{id}}\"."
},
"note_language": {
"not_set": "Não atribuído",
"configure-languages": "Configurar idiomas..."
"not_set": "Nenhum idioma definido",
"configure-languages": "Configurar idiomas...",
"help-on-languages": "Ajuda sobre idiomas de conteúdo…"
},
"content_language": {
"title": "Idiomas do conteúdo",
@ -1819,7 +1890,8 @@
"button_title": "Exportar diagrama como PNG"
},
"svg": {
"export_to_png": "O diagrama não pôde ser exportado como PNG."
"export_to_png": "O diagrama não pôde ser exportado como PNG.",
"export_to_svg": "O diagrama não pôde ser exportado para SVG."
},
"code_theme": {
"title": "Aparência",
@ -1838,7 +1910,11 @@
"editorfeatures": {
"title": "Recursos",
"emoji_completion_enabled": "Habilitar auto-completar de Emoji",
"note_completion_enabled": "Habilitar auto-completar de notas"
"note_completion_enabled": "Habilitar auto-completar de notas",
"emoji_completion_description": "Se ativado, emojis podem ser inseridos facilmente no texto digitando`:`, seguido do nome do emoji.",
"note_completion_description": "Se ativado, links para notas podem ser criados digitando `@` seguido do título de uma nota.",
"slash_commands_enabled": "Ativar comandos de barra",
"slash_commands_description": "Se ativado, comandos de edição como inserir quebras de linha ou títulos podem ser acionados digitando`/`."
},
"table_view": {
"new-row": "Nova linha",
@ -1863,7 +1939,7 @@
"book_properties_config": {
"hide-weekends": "Ocultar fins de semana",
"display-week-numbers": "Exibir números de semana",
"map-style": "Estilo do mapa:",
"map-style": "Estilo do mapa",
"max-nesting-depth": "Profundidade máxima de aninhamento:",
"vector_light": "Vetor (Claro)",
"vector_dark": "Vetor (Escuro)",
@ -1888,7 +1964,8 @@
"new-item-placeholder": "Escreva o título da nota...",
"add-column-placeholder": "Escreva o nome da coluna...",
"edit-note-title": "Clique para editar o título da nota",
"edit-column-title": "Clique para editar o título da coluna"
"edit-column-title": "Clique para editar o título da coluna",
"column-already-exists": "Esta coluna já existe no quadro."
},
"call_to_action": {
"next_theme_title": "Testar no novo tema do Trilium",
@ -1897,14 +1974,20 @@
"background_effects_title": "Efeitos de fundo estão estáveis agora",
"background_effects_message": "Em dispositivos Windows, efeitos de fundo estão estáveis agora. Os efeitos de fundo adicionam um toque de cor à interface do usuário borrando o plano de fundo atrás dela. Esta técnica também é usada em outras aplicações como o Windows Explorer.",
"background_effects_button": "Habilitar os efeitos de fundo",
"dismiss": "Dispensar"
"dismiss": "Dispensar",
"new_layout_title": "Novo layout",
"new_layout_message": "Introduzimos um layout modernizado para o Trilium. A faixa de opções foi removida e integrada de forma contínua à interface principal, com uma nova barra de status e seções expansíveis (como atributos promovidos) assumindo funções importantes.\n\nO novo layout vem ativado por padrão e pode ser desativado temporariamente em Opções → Aparência.",
"new_layout_button": "Mais informações"
},
"settings": {
"related_settings": "Configurações relacionadas"
},
"settings_appearance": {
"related_code_blocks": "Esquema de cores para blocos de código em notas de texto",
"related_code_notes": "Esquema de cores para notas de código"
"related_code_notes": "Esquema de cores para notas de código",
"ui": "Interface do usuário",
"ui_old_layout": "Layout antigo",
"ui_new_layout": "Novo Layout"
},
"units": {
"percentage": "%"
@ -2047,5 +2130,102 @@
},
"collections": {
"rendering_error": "Não foi possível exibir o conteúdo devido a um erro."
},
"experimental_features": {
"title": "Opções experimentais",
"disclaimer": "Essas opções são experimentais e podem causar instabilidade. Use com cautela.",
"new_layout_name": "Novo Layout",
"new_layout_description": "Experimente o novo layout para um visual mais moderno e melhor usabilidade. Pode sofrer alterações significativas nas próximas versões."
},
"read-only-info": {
"read-only-note": "Você está visualizando uma nota somente leitura.",
"auto-read-only-note": "Esta nota é exibida em modo somente leitura para carregamento mais rápido.",
"edit-note": "Editar nota"
},
"presentation_view": {
"edit-slide": "Editar este slide",
"start-presentation": "Iniciar apresentação",
"slide-overview": "Alternar a visualização geral dos slides"
},
"calendar_view": {
"delete_note": "Excluir nota…"
},
"note-color": {
"clear-color": "Limpar cor da nota",
"set-color": "Definir cor da nota",
"set-custom-color": "Definir cor personalizada da nota"
},
"popup-editor": {
"maximize": "Alternar para editor completo"
},
"server": {
"unknown_http_error_title": "Erro de comunicação com o servidor",
"unknown_http_error_content": "Código de status: {{statusCode}}\nURL: {{method}} {{url}}\nMensagem: {{message}}",
"traefik_blocks_requests": "Se você estiver usando o proxy reverso Traefik, ele introduziu uma alteração que afeta a comunicação com o servidor."
},
"tab_history_navigation_buttons": {
"go-back": "Voltar para a nota anterior",
"go-forward": "Avançar para a próxima nota"
},
"breadcrumb": {
"hoisted_badge": "Destacado",
"hoisted_badge_title": "Remover destaque",
"workspace_badge": "Espaço de trabalho",
"scroll_to_top_title": "Ir para o início da nota",
"create_new_note": "Criar nova nota filha",
"empty_hide_archived_notes": "Ocultar notas arquivadas"
},
"breadcrumb_badges": {
"read_only_explicit": "Somente leitura",
"read_only_explicit_description": "Esta nota foi definida manualmente como somente leitura.\nClique para editá-la temporariamente.",
"read_only_auto": "Auto Somente leitura",
"read_only_auto_description": "Esta nota foi definida automaticamente como somente leitura por motivos de desempenho. Esse limite automático pode ser ajustado nas configurações.\n\nClique para editá-la temporariamente.",
"read_only_temporarily_disabled": "Editável temporariamente",
"read_only_temporarily_disabled_description": "Esta nota está atualmente editável, mas normalmente é somente leitura. A nota voltará a ser somente leitura assim que você navegar para outra nota.\n\nClique para reativar o modo somente leitura.",
"shared_publicly": "Compartilhado publicamente",
"shared_locally": "Compartilhado localmente",
"shared_copy_to_clipboard": "Copiar link para a área de transferência",
"shared_open_in_browser": "Abrir link no navegador",
"shared_unshare": "Remover compartilhamento",
"clipped_note": "Recorte da web",
"clipped_note_description": "Esta nota foi originalmente obtida de {{url}}.\n\nClique para navegar até a página de origem.",
"execute_script": "Executar script",
"execute_script_description": "Esta nota é uma nota de script. Clique para executar o script.",
"execute_sql": "Executar SQL",
"execute_sql_description": "Esta nota é uma nota SQL. Clique para executar a consulta SQL."
},
"status_bar": {
"language_title": "Alterar idioma do conteúdo",
"note_info_title": "Ver informações da nota (por exemplo, datas, tamanho da nota)",
"backlinks_one": "{{count}} referência inversa",
"backlinks_many": "{{count}} referências inversas",
"backlinks_other": "{{count}} referências inversas",
"backlinks_title_one": "Ver referência inversa",
"backlinks_title_many": "Ver referências inversas",
"backlinks_title_other": "Ver referências inversas",
"attachments_one": "{{count}} anexo",
"attachments_many": "{{count}} anexos",
"attachments_other": "{{count}} anexos",
"attachments_title_one": "Visualizar anexo em uma nova aba",
"attachments_title_many": "Visualizar anexos em uma nova aba",
"attachments_title_other": "Visualizar anexos em uma nova aba",
"attributes_one": "{{count}} atributo",
"attributes_many": "{{count}} atributos",
"attributes_other": "{{count}} atributos",
"attributes_title": "Atributos próprios e atributos herdados",
"note_paths_one": "{{count}} caminho",
"note_paths_many": "{{count}} caminhos",
"note_paths_other": "{{count}} caminhos",
"note_paths_title": "Caminhos da nota",
"code_note_switcher": "Alterar modo de idioma"
},
"attributes_panel": {
"title": "Atributos da nota"
},
"right_pane": {
"empty_message": "Nada para exibir nesta nota",
"empty_button": "Ocultar o painel",
"toggle": "Alternar painel direito",
"custom_widget_go_to_source": "Ir para o código-fonte"
}
}

View File

@ -1483,7 +1483,6 @@
},
"note_icon": {
"change_note_icon": "Schimbă iconița notiței",
"category": "Categorie:",
"reset-default": "Resetează la iconița implicită",
"search": "Căutare:"
},

View File

@ -21,8 +21,17 @@
},
"bundle-error": {
"title": "Не удалось загрузить пользовательский скрипт",
"message": "Скрипт из заметки с идентификатором \"{{id}}\" и названием \"{{title}}\" не может быть выполнен по следующим причинам:\n\n{{message}}"
}
"message": "Скрипт не может быть выполнен. Причина:\n\n{{message}}"
},
"widget-list-error": {
"title": "Не удалось получить список виджетов с сервера"
},
"widget-render-error": {
"title": "Не удалось отобразить пользовательский React виджет"
},
"widget-missing-parent": "В пользовательском виджете не определено обязательное свойство '{{property}}'.\n\nЕсли этот скрипт предназначен для запуска без элемента пользовательского интерфейса, используйте '#run=frontendStartup'.",
"open-script-note": "Открыть заметку со скриптом",
"scripting-error": "Ошибка пользовательского скрипта: {{title}}"
},
"add_link": {
"add_link": "Добавить ссылку",
@ -1001,7 +1010,6 @@
"backlink_many": "{{count}} обратных ссылок"
},
"note_icon": {
"category": "Категория:",
"search": "Поиск:",
"change_note_icon": "Изменить иконку заметки",
"reset-default": "Сбросить к значку по умолчанию"
@ -1686,7 +1694,8 @@
},
"inherited_attribute_list": {
"title": "Унаследованные атрибуты",
"no_inherited_attributes": "Нет унаследованных атрибутов."
"no_inherited_attributes": "Нет унаследованных атрибутов.",
"none": "нет"
},
"note_map": {
"title": "Карта заметок",
@ -2025,13 +2034,14 @@
},
"note_title": {
"placeholder": "введите здесь название заметки...",
"edited_notes": "Измененные заметки",
"edited_notes": "Измененные в этот день заметки",
"note_type_switcher_collection": "Коллекция",
"note_type_switcher_templates": "Шаблон",
"note_type_switcher_others": "Другой тип заметки",
"note_type_switcher_label": "Переключить с {{type}} на:",
"last_modified": "Изменена <Value />",
"created_on": "Создана в <Value />"
"created_on": "Создана в <Value />",
"promoted_attributes": "Продвигаемые атрибуты"
},
"units": {
"percentage": "%"
@ -2101,7 +2111,13 @@
"note_detail": {
"could_not_find_typewidget": "Не удалось найти typeWidget для типа '{{type}}'",
"printing_pdf": "Выполняется экспорт PDF...",
"printing": "Выполняется печать..."
"printing": "Выполняется печать...",
"print_report_title": "Отчет по печати",
"print_report_collection_content_one": "{{count}} заметка в коллекции не удалось распечатать, поскольку она не поддерживается или защищена.",
"print_report_collection_content_few": "{{count}} заметки в коллекции не удалось распечатать, поскольку они не поддерживаются или защищены.",
"print_report_collection_content_many": "{{count}} заметок в коллекции не удалось распечатать, поскольку они не поддерживаются или защищены.",
"print_report_collection_details_button": "Подробнее",
"print_report_collection_details_ignored_notes": "Пропущенные заметки"
},
"book": {
"no_children_help": "В этой коллекции нет дочерних заметок, поэтому отображать нечего. Подробности см. в <a href=\"https://triliumnext.github.io/Docs/Wiki/book-note.html\">wiki</a>.",
@ -2216,5 +2232,8 @@
"toggle": "Переключить панель справа",
"empty_button": "Скрыть панель",
"empty_message": "Нечего отобразить для текущей заметки"
},
"attributes_panel": {
"title": "Атрибуты заметки"
}
}

View File

@ -21,8 +21,16 @@
},
"bundle-error": {
"title": "載入自訂腳本失敗",
"message": "來自 ID 為 \"{{id}}\"、標題為 \"{{title}}\" 的筆記的腳本因以下原因無法執行:\n\n{{message}}"
}
"message": "腳本因以下原因無法執行:\n\n{{message}}"
},
"widget-list-error": {
"title": "無法從伺服器取得元件清單"
},
"widget-render-error": {
"title": "無法渲染自訂 React 元件"
},
"widget-missing-parent": "自訂元件未定義強制性的 \"{{property}}\" 屬性。",
"open-script-note": "打開腳本筆記"
},
"add_link": {
"add_link": "新增連結",
@ -753,7 +761,6 @@
},
"note_icon": {
"change_note_icon": "更改筆記圖標",
"category": "類別:",
"search": "搜尋:",
"reset-default": "重置為預設圖標"
},
@ -815,7 +822,8 @@
},
"inherited_attribute_list": {
"title": "繼承的屬性",
"no_inherited_attributes": "沒有繼承的屬性。"
"no_inherited_attributes": "沒有繼承的屬性。",
"none": "無"
},
"note_info_widget": {
"note_id": "筆記 ID",
@ -1513,6 +1521,7 @@
"title": "高亮列表",
"options": "選項",
"title_with_count_one": "{{count}} 處高亮",
"title_with_count_other": "{{count}} 處高亮",
"modal_title": "設定高亮列表",
"menu_configure": "設定高亮列表…",
"no_highlights": "未找到高亮內容。"
@ -2089,7 +2098,8 @@
"next_theme_button": "試用新主題",
"dismiss": "關閉",
"new_layout_title": "新版面配置",
"new_layout_button": "更多資訊"
"new_layout_button": "更多資訊",
"new_layout_message": "我們為 Trilium 推出了現代化版面配置。功能區分頁已移除並無縫整合至主介面,取而代之的是全新狀態列與可擴展區塊(例如提升屬性)承擔其主要功能。\n\n新版面配置預設為啟用狀態您可透過「選項 → 外觀」暫時停用。"
},
"settings": {
"related_settings": "相關設定"
@ -2167,7 +2177,12 @@
"shared_unshare": "取消分享",
"clipped_note": "網頁擷取",
"execute_script": "運行腳本",
"execute_sql": "運行 SQL"
"execute_sql": "運行 SQL",
"read_only_auto_description": "基於效能考量,此筆記已自動設定為唯讀模式。此自動限制可於設定中調整。\n\n點擊此處可臨時編輯。",
"read_only_temporarily_disabled_description": "此筆記目前可編輯,但通常為唯讀狀態。當您切換至其他筆記時,本筆記將立即恢復為唯讀模式。\n\n點擊此處重新啟用唯讀模式。",
"clipped_note_description": "本筆記原始來源為 {{url}}。\n\n點擊此處前往原網頁。",
"execute_script_description": "此筆記為腳本筆記。點擊以執行腳本。",
"execute_sql_description": "此筆記為 SQL 筆記。點擊以執行 SQL 查詢。"
},
"breadcrumb": {
"hoisted_badge": "聚焦",
@ -2181,18 +2196,28 @@
"language_title": "更改內容語言",
"note_info_title": "查看筆記資訊(如日期、筆記大小)",
"backlinks_one": "{{count}} 個反連結",
"backlinks_other": "",
"backlinks_title_one": "查看反連結",
"backlinks_title_other": "",
"attachments_one": "{{count}} 個附件",
"attachments_other": "",
"attachments_title_one": "在新分頁中查看附件",
"attachments_title_other": "",
"attributes_one": "{{count}} 個屬性",
"attributes_other": "",
"attributes_title": "自有屬性及繼承屬性",
"note_paths_one": "{{count}} 條路徑",
"note_paths_other": "",
"note_paths_title": "筆記路徑",
"code_note_switcher": "更改語言模式"
},
"right_pane": {
"empty_button": "隱藏面板",
"toggle": "切換右側面板",
"custom_widget_go_to_source": "跳轉至原始碼"
"custom_widget_go_to_source": "跳轉至原始碼",
"empty_message": "此筆記無內容可顯示"
},
"attributes_panel": {
"title": "筆記屬性"
}
}

View File

@ -849,7 +849,6 @@
},
"note_icon": {
"change_note_icon": "Змінити значок нотатки",
"category": "Категорія:",
"search": "Пошук:",
"reset-default": "Скинути значок до стандартного значення"
},

View File

@ -17,5 +17,3 @@ declare module "*?raw" {
var content: string;
export default content;
}
declare module "boxicons/css/boxicons.min.css" { }

View File

@ -1,12 +1,14 @@
import type FNote from "./entities/fnote";
import type { Froca } from "./services/froca-interface";
import { Suggestion } from "./services/note_autocomplete";
import utils from "./services/utils";
import { IconRegistry } from "@triliumnext/commons";
import appContext, { AppContext } from "./components/app_context";
import server from "./services/server";
import library_loader, { Library } from "./services/library_loader";
import type FNote from "./entities/fnote";
import type { PrintReport } from "./print";
import type { lint } from "./services/eslint";
import type { Mermaid, MermaidConfig } from "mermaid";
import type { Froca } from "./services/froca-interface";
import { Library } from "./services/library_loader";
import { Suggestion } from "./services/note_autocomplete";
import server from "./services/server";
import utils from "./services/utils";
interface ElectronProcess {
type: string;
@ -47,6 +49,7 @@ interface CustomGlobals {
linter: typeof lint;
hasNativeTitleBar: boolean;
isRtl: boolean;
iconRegistry: IconRegistry;
}
type RequireMethod = (moduleName: string) => any;
@ -60,7 +63,7 @@ declare global {
glob?: CustomGlobals;
/** On the printing endpoint, set to true when the note has fully loaded and is ready to be printed/exported as PDF. */
_noteReady?: boolean;
_noteReady?: PrintReport;
EXCALIDRAW_ASSET_PATH?: string;
}

View File

@ -142,7 +142,7 @@ function ShowTocWidgetButton({ note, noteContext, isDefaultViewMode }: FloatingB
return isEnabled && <FloatingButton
text={t("show_toc_widget_button.show_toc")}
icon="bx bx-tn-toc"
icon="bx bx-spreadsheet bx-rotate-180"
onClick={() => {
if (noteContext?.viewScope && noteContext.noteId) {
noteContext.viewScope.tocTemporarilyHidden = false;

View File

@ -5,13 +5,16 @@ import { useEffect, useRef, useState } from "preact/hooks";
import NoteContext from "../components/note_context";
import FNote from "../entities/fnote";
import type { PrintReport } from "../print";
import attributes from "../services/attributes";
import dialog from "../services/dialog";
import { t } from "../services/i18n";
import protected_session_holder from "../services/protected_session_holder";
import toast from "../services/toast.js";
import { dynamicRequire, isElectron, isMobile } from "../services/utils";
import { ExtendedNoteType, TYPE_MAPPINGS, TypeWidget } from "./note_types";
import { useNoteContext, useTriliumEvent } from "./react/hooks";
import { NoteListWithLinks } from "./react/NoteList";
import { TypeWidgetProps } from "./type_widgets/type_widget";
/**
@ -128,7 +131,10 @@ export default function NoteDetail() {
if (!isElectron()) return;
const { ipcRenderer } = dynamicRequire("electron");
const onPrintProgress = (_e: any, { progress, action }: { progress: number, action: "printing" | "exporting_pdf" }) => showToast(action, progress);
const onPrintDone = () => toast.closePersistent("printing");
const onPrintDone = (_e, printReport: PrintReport) => {
toast.closePersistent("printing");
handlePrintReport(printReport);
};
ipcRenderer.on("print-progress", onPrintProgress);
ipcRenderer.on("print-done", onPrintDone);
return () => {
@ -179,8 +185,13 @@ export default function NoteDetail() {
showToast("printing", e.detail.progress);
});
iframe.contentWindow.addEventListener("note-ready", () => {
iframe.contentWindow.addEventListener("note-ready", (e) => {
toast.closePersistent("printing");
if ("detail" in e) {
handlePrintReport(e.detail as PrintReport);
}
iframe.contentWindow?.print();
document.body.removeChild(iframe);
});
@ -346,3 +357,29 @@ function showToast(type: "printing" | "exporting_pdf", progress: number = 0) {
progress
});
}
function handlePrintReport(printReport: PrintReport) {
if (printReport.type === "collection" && printReport.ignoredNoteIds.length > 0) {
toast.showPersistent({
id: "print-report",
icon: "bx bx-collection",
title: t("note_detail.print_report_title"),
message: t("note_detail.print_report_collection_content", { count: printReport.ignoredNoteIds.length }),
buttons: [
{
text: t("note_detail.print_report_collection_details_button"),
onClick(api) {
api.dismissToast();
dialog.info(<>
<h3>{t("note_detail.print_report_collection_details_ignored_notes")}</h3>
<NoteListWithLinks noteIds={printReport.ignoredNoteIds} />
</>, {
title: t("note_detail.print_report_title"),
size: "md"
});
}
}
]
});
}
}

View File

@ -13,6 +13,7 @@ import debounce from "../services/debounce";
import { t } from "../services/i18n";
import { DefinitionObject, extractAttributeDefinitionTypeAndName, LabelType } from "../services/promoted_attribute_definition_parser";
import server from "../services/server";
import { randomString } from "../services/utils";
import ws from "../services/ws";
import { useNoteContext, useNoteLabel, useTriliumEvent, useUniqueName } from "./react/hooks";
import NoteAutocomplete from "./react/NoteAutocomplete";
@ -116,7 +117,7 @@ export function usePromotedAttributeData(note: FNote | null | undefined, compone
valueAttr.attributeId = "";
}
const uniqueId = `${note.noteId}-${valueAttr.name}-${i}`;
const uniqueId = randomString();
cells.push({ definitionAttr, definition, valueAttr, valueName, uniqueId });
}
}
@ -319,6 +320,7 @@ function MultiplicityCell({ cell, cells, setCells, setCellToFocus, note, compone
const index = cells.indexOf(cell);
const newCell: Cell = {
...cell,
uniqueId: randomString(),
valueAttr: {
attributeId: "",
type: cell.valueAttr.type,

View File

@ -15,7 +15,7 @@ export default function TabHistoryNavigationButtons() {
const legacyBackVisible = useLauncherVisibility("_lbBackInHistory");
const legacyForwardVisible = useLauncherVisibility("_lbForwardInHistory");
return (isElectron() &&
return (
<div className="tab-history-navigation-buttons">
{!legacyBackVisible && <ActionButton
icon="bx bx-left-arrow-alt"

View File

@ -54,6 +54,16 @@
display: flex;
gap: 1em;
justify-content: space-between;
.btn {
color: var(--bs-toast-color);
background: var(--modal-control-button-background);
&:hover {
background: var(--modal-control-button-hover-background);
color: var(--bs-toast-color);
}
}
}
.toast-progress {

View File

@ -82,7 +82,7 @@ const TPL = /*html*/`
<div style="display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px;">
<h5 class="attr-detail-title">${t("attribute_detail.attr_detail_title")}</h5>
<span class="bx bx-x close-attr-detail-button tn-tool-button" title="${t("attribute_detail.close_button_title")}"></span>
<button class="close-attr-detail-button icon-action bx bx-x" title="${t("attribute_detail.close_button_title")}"></button>
</div>
<div class="attr-is-owned-by">${t("attribute_detail.attr_is_owned_by")}</div>

View File

@ -1,8 +1,10 @@
import { isValidElement, VNode } from "preact";
import Component, { TypedComponent } from "../components/component.js";
import froca from "../services/froca.js";
import { t } from "../services/i18n.js";
import toastService from "../services/toast.js";
import toastService, { showErrorForScriptNote } from "../services/toast.js";
import { randomString } from "../services/utils.js";
import { renderReactWidget } from "./react/react_utils.jsx";
export class TypedBasicWidget<T extends TypedComponent<any>> extends TypedComponent<T> {
@ -56,9 +58,8 @@ export class TypedBasicWidget<T extends TypedComponent<any>> extends TypedCompon
optChild(condition: boolean, ...components: (T | VNode)[]) {
if (condition) {
return this.child(...components);
} else {
return this;
}
return this;
}
id(id: string) {
@ -172,20 +173,15 @@ export class TypedBasicWidget<T extends TypedComponent<any>> extends TypedCompon
const noteId = this._noteId;
if (this._noteId) {
froca.getNote(noteId, true).then((note) => {
toastService.showPersistent({
id: `custom-widget-failure-${noteId}`,
title: t("toast.widget-error.title"),
icon: "bx bx-error-circle",
message: t("toast.widget-error.message-custom", {
id: noteId,
title: note?.title,
message: e.message || e.toString()
})
});
showErrorForScriptNote(noteId, t("toast.widget-error.message-custom", {
id: noteId,
title: note?.title,
message: e.message || e.toString()
}));
});
} else {
toastService.showPersistent({
id: `custom-widget-failure-unknown-${crypto.randomUUID()}`,
id: `custom-widget-failure-unknown-${randomString()}`,
title: t("toast.widget-error.title"),
icon: "bx bx-error-circle",
message: t("toast.widget-error.message-unknown", {
@ -213,7 +209,7 @@ export class TypedBasicWidget<T extends TypedComponent<any>> extends TypedCompon
toggleInt(show: boolean | null | undefined) {
this.$widget.toggleClass("hidden-int", !show)
.toggleClass("visible", !!show);
.toggleClass("visible", !!show);
}
isHiddenInt() {
@ -222,7 +218,7 @@ export class TypedBasicWidget<T extends TypedComponent<any>> extends TypedCompon
toggleExt(show: boolean | null | "" | undefined) {
this.$widget.toggleClass("hidden-ext", !show)
.toggleClass("visible", !!show);
.toggleClass("visible", !!show);
}
isHiddenExt() {
@ -250,9 +246,8 @@ export class TypedBasicWidget<T extends TypedComponent<any>> extends TypedCompon
getClosestNtxId() {
if (this.$widget) {
return this.$widget.closest("[data-ntx-id]").attr("data-ntx-id");
} else {
return null;
}
return null;
}
cleanup() {}

View File

@ -108,14 +108,6 @@ button.global-menu-button {
margin-inline-end: 5px;
}
.global-menu .dropdown-item .bx {
position: relative;
top: 3px;
font-size: 120%;
margin-inline-end: 6px;
}
.global-menu-button-wrapper:hover .global-menu-button-update-available-button {
opacity: 1;
}

View File

@ -12,7 +12,7 @@ body.prefers-centered-content .note-list-widget:not(.full-height) {
}
.note-list-widget .note-list {
padding: 10px;
padding-block: 10px;
}
.note-list-widget.full-height,

View File

@ -1,14 +1,17 @@
import { allViewTypes, ViewModeMedia, ViewModeProps, ViewTypeOptions } from "./interface";
import { useNoteContext, useNoteLabel, useNoteLabelBoolean, useNoteProperty, useTriliumEvent } from "../react/hooks";
import FNote from "../../entities/fnote";
import "./NoteList.css";
import { useEffect, useRef, useState } from "preact/hooks";
import ViewModeStorage from "./view_mode_storage";
import { subscribeToMessages, unsubscribeToMessage as unsubscribeFromMessage } from "../../services/ws";
import { WebSocketMessage } from "@triliumnext/commons";
import froca from "../../services/froca";
import { lazy, Suspense } from "preact/compat";
import { VNode } from "preact";
import { lazy, Suspense } from "preact/compat";
import { useEffect, useRef, useState } from "preact/hooks";
import FNote from "../../entities/fnote";
import type { PrintReport } from "../../print";
import froca from "../../services/froca";
import { subscribeToMessages, unsubscribeToMessage as unsubscribeFromMessage } from "../../services/ws";
import { useNoteContext, useNoteLabel, useNoteLabelBoolean, useNoteProperty, useTriliumEvent } from "../react/hooks";
import { allViewTypes, ViewModeMedia, ViewModeProps, ViewTypeOptions } from "./interface";
import ViewModeStorage from "./view_mode_storage";
interface NoteListProps {
note: FNote | null | undefined;
notePath: string | null | undefined;
@ -19,7 +22,7 @@ interface NoteListProps {
ntxId: string | null | undefined;
media: ViewModeMedia;
viewType: ViewTypeOptions | undefined;
onReady?: () => void;
onReady?: (data: PrintReport) => void;
onProgressChanged?(progress: number): void;
}
@ -48,7 +51,7 @@ const ViewComponents: Record<ViewTypeOptions, { normal: LazyLoadedComponent, pri
presentation: {
normal: lazy(() => import("./presentation/index.js"))
}
}
};
export default function NoteList(props: Pick<NoteListProps, "displayOnlyCollections" | "media" | "onReady" | "onProgressChanged">) {
const { note, noteContext, notePath, ntxId, viewScope } = useNoteContext();
@ -57,13 +60,13 @@ export default function NoteList(props: Pick<NoteListProps, "displayOnlyCollecti
const [ enabled, setEnabled ] = useState(noteContext?.hasNoteList());
useEffect(() => {
setEnabled(noteContext?.hasNoteList());
}, [ note, noteContext, viewType, viewScope?.viewMode, noteType ])
return <CustomNoteList viewType={viewType} note={note} isEnabled={!!enabled} notePath={notePath} ntxId={ntxId} {...props} />
}, [ note, noteContext, viewType, viewScope?.viewMode, noteType ]);
return <CustomNoteList viewType={viewType} note={note} isEnabled={!!enabled} notePath={notePath} ntxId={ntxId} {...props} />;
}
export function SearchNoteList(props: Omit<NoteListProps, "isEnabled" | "viewType">) {
const viewType = useNoteViewType(props.note);
return <CustomNoteList {...props} isEnabled={true} viewType={viewType} />
return <CustomNoteList {...props} isEnabled={true} viewType={viewType} />;
}
export function CustomNoteList({ note, viewType, isEnabled: shouldEnable, notePath, highlightedTokens, displayOnlyCollections, ntxId, onReady, onProgressChanged, ...restProps }: NoteListProps) {
@ -112,7 +115,7 @@ export function CustomNoteList({ note, viewType, isEnabled: shouldEnable, notePa
onProgressChanged: onProgressChanged ?? (() => {}),
...restProps
}
};
}
const ComponentToRender = viewType && props && isEnabled && (
@ -140,9 +143,9 @@ export function useNoteViewType(note?: FNote | null): ViewTypeOptions | undefine
} else if (!(allViewTypes as readonly string[]).includes(viewType || "")) {
// when not explicitly set, decide based on the note type
return note.type === "search" ? "list" : "grid";
} else {
return viewType as ViewTypeOptions;
}
return viewType as ViewTypeOptions;
}
export function useNoteIds(note: FNote | null | undefined, viewType: ViewTypeOptions | undefined, ntxId: string | null | undefined) {
@ -161,26 +164,26 @@ export function useNoteIds(note: FNote | null | undefined, viewType: ViewTypeOpt
async function getNoteIds(note: FNote) {
if (directChildrenOnly) {
return await note.getChildNoteIdsWithArchiveFiltering(includeArchived);
} else {
return await note.getSubtreeNoteIds(includeArchived);
}
return await note.getSubtreeNoteIds(includeArchived);
}
// Refresh on note switch.
useEffect(() => {
refreshNoteIds()
refreshNoteIds();
}, [ note, includeArchived, directChildrenOnly ]);
// Refresh on alterations to the note subtree.
useTriliumEvent("entitiesReloaded", ({ loadResults }) => {
if (note && loadResults.getBranchRows().some(branch =>
branch.parentNoteId === note.noteId
branch.parentNoteId === note.noteId
|| noteIds.includes(branch.parentNoteId ?? ""))
|| loadResults.getAttributeRows().some(attr => attr.name === "archived" && attr.noteId && noteIds.includes(attr.noteId))
) {
refreshNoteIds();
}
})
});
// Refresh on search.
useTriliumEvent("searchRefreshed", ({ ntxId: eventNtxId }) => {
@ -201,13 +204,13 @@ export function useNoteIds(note: FNote | null | undefined, viewType: ViewTypeOpt
...noteIds,
...await getNoteIds(importedNote),
importedNoteId
])
]);
}
}
subscribeToMessages(onImport);
return () => unsubscribeFromMessage(onImport);
}, [ note, noteIds, setNoteIds ])
}, [ note, noteIds, setNoteIds ]);
return noteIds;
}

View File

@ -40,7 +40,7 @@
z-index: -1;
}
.geo-map-container .leaflet-div-icon .bx {
.geo-map-container .leaflet-div-icon .tn-icon {
position: absolute;
top: 3px;
inset-inline-start: 2px;

View File

@ -4122,7 +4122,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4144,7 +4144,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4166,7 +4166,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4188,7 +4188,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4210,7 +4210,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4232,7 +4232,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4254,7 +4254,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4276,7 +4276,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4298,7 +4298,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -4319,7 +4319,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -4340,7 +4340,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -4361,7 +4361,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -4381,7 +4381,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -4401,7 +4401,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -4421,7 +4421,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4446,7 +4446,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -4466,7 +4466,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -4486,7 +4486,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -4506,7 +4506,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4531,7 +4531,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4556,7 +4556,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4625,7 +4625,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "bus_stop" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 16, 0.5 ], [ 18, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4652,7 +4652,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "tram_stop" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 15, 0.5 ], [ 17, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4679,7 +4679,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "subway" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4706,7 +4706,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "light_rail" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4733,7 +4733,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "!in", "station", "light_rail", "subway" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4760,7 +4760,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "!has", "iata" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4787,7 +4787,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "has", "iata" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 12, 0.5 ], [ 14, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,

View File

@ -4122,7 +4122,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4144,7 +4144,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4166,7 +4166,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4188,7 +4188,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4210,7 +4210,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4232,7 +4232,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4254,7 +4254,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4276,7 +4276,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4298,7 +4298,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -4319,7 +4319,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -4340,7 +4340,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -4361,7 +4361,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -4381,7 +4381,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -4401,7 +4401,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -4421,7 +4421,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4446,7 +4446,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -4466,7 +4466,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -4486,7 +4486,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -4506,7 +4506,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4531,7 +4531,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4556,7 +4556,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4625,7 +4625,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "bus_stop" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 16, 0.5 ], [ 18, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4652,7 +4652,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "tram_stop" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 15, 0.5 ], [ 17, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4679,7 +4679,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "subway" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4706,7 +4706,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "light_rail" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4733,7 +4733,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "!in", "station", "light_rail", "subway" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4760,7 +4760,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "!has", "iata" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4787,7 +4787,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "has", "iata" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 12, 0.5 ], [ 14, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,

View File

@ -4122,7 +4122,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4144,7 +4144,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4166,7 +4166,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4188,7 +4188,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4210,7 +4210,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4232,7 +4232,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4254,7 +4254,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4276,7 +4276,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4298,7 +4298,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -4319,7 +4319,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -4340,7 +4340,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -4361,7 +4361,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -4381,7 +4381,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -4401,7 +4401,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -4421,7 +4421,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4446,7 +4446,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -4466,7 +4466,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -4486,7 +4486,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -4506,7 +4506,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4531,7 +4531,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4556,7 +4556,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4625,7 +4625,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "bus_stop" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 16, 0.5 ], [ 18, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4652,7 +4652,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "tram_stop" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 15, 0.5 ], [ 17, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4679,7 +4679,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "subway" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4706,7 +4706,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "light_rail" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4733,7 +4733,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "!in", "station", "light_rail", "subway" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4760,7 +4760,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "!has", "iata" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4787,7 +4787,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "has", "iata" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 12, 0.5 ], [ 14, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,

View File

@ -4122,7 +4122,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4144,7 +4144,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4166,7 +4166,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4188,7 +4188,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4210,7 +4210,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4232,7 +4232,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4254,7 +4254,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4276,7 +4276,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4298,7 +4298,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -4319,7 +4319,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -4340,7 +4340,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -4361,7 +4361,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -4381,7 +4381,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -4401,7 +4401,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -4421,7 +4421,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4446,7 +4446,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -4466,7 +4466,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -4486,7 +4486,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -4506,7 +4506,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4531,7 +4531,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4556,7 +4556,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4625,7 +4625,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "bus_stop" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 16, 0.5 ], [ 18, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4652,7 +4652,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "tram_stop" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 15, 0.5 ], [ 17, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4679,7 +4679,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "subway" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4706,7 +4706,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "light_rail" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4733,7 +4733,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "!in", "station", "light_rail", "subway" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4760,7 +4760,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "!has", "iata" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4787,7 +4787,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "has", "iata" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 12, 0.5 ], [ 14, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,

View File

@ -4122,7 +4122,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4144,7 +4144,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4166,7 +4166,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4188,7 +4188,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4210,7 +4210,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4232,7 +4232,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4254,7 +4254,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4276,7 +4276,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4298,7 +4298,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -4319,7 +4319,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -4340,7 +4340,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -4361,7 +4361,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -4381,7 +4381,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -4401,7 +4401,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -4421,7 +4421,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4446,7 +4446,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -4466,7 +4466,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -4486,7 +4486,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -4506,7 +4506,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4531,7 +4531,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4556,7 +4556,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4625,7 +4625,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "bus_stop" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 16, 0.5 ], [ 18, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4652,7 +4652,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "tram_stop" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 15, 0.5 ], [ 17, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4679,7 +4679,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "subway" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4706,7 +4706,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "light_rail" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4733,7 +4733,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "!in", "station", "light_rail", "subway" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4760,7 +4760,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "!has", "iata" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4787,7 +4787,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "has", "iata" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 12, 0.5 ], [ 14, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,

View File

@ -4122,7 +4122,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4144,7 +4144,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4166,7 +4166,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4188,7 +4188,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4210,7 +4210,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4232,7 +4232,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4254,7 +4254,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4276,7 +4276,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4298,7 +4298,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -4319,7 +4319,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -4340,7 +4340,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -4361,7 +4361,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -4381,7 +4381,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -4401,7 +4401,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -4421,7 +4421,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4446,7 +4446,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -4466,7 +4466,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -4486,7 +4486,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -4506,7 +4506,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4531,7 +4531,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4556,7 +4556,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4625,7 +4625,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "bus_stop" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 16, 0.5 ], [ 18, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4652,7 +4652,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "tram_stop" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 15, 0.5 ], [ 17, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4679,7 +4679,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "subway" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4706,7 +4706,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "light_rail" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4733,7 +4733,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "!in", "station", "light_rail", "subway" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4760,7 +4760,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "!has", "iata" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4787,7 +4787,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "has", "iata" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 12, 0.5 ], [ 14, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,

View File

@ -0,0 +1,30 @@
{
"version": 8,
"name": "versatiles-empty",
"metadata": {
"license": "https://creativecommons.org/publicdomain/zero/1.0/"
},
"glyphs": "https://tiles.versatiles.org/assets/glyphs/{fontstack}/{range}.pbf",
"sprite": [
{
"id": "basics",
"url": "https://tiles.versatiles.org/assets/sprites/basics/sprites"
}
],
"sources": {
"versatiles-shortbread": {
"attribution": "© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors",
"tiles": [
"https://tiles.versatiles.org/tiles/osm/{z}/{x}/{y}"
],
"type": "vector",
"scheme": "xyz",
"bounds": [ -180, -85.0511287798066, 180, 85.0511287798066 ],
"minzoom": 0,
"maxzoom": 14
}
},
"layers": [
]
}

View File

@ -4122,7 +4122,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4144,7 +4144,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4166,7 +4166,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4188,7 +4188,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4210,7 +4210,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4232,7 +4232,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4254,7 +4254,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4276,7 +4276,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4298,7 +4298,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -4319,7 +4319,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -4340,7 +4340,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -4361,7 +4361,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -4381,7 +4381,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -4401,7 +4401,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -4421,7 +4421,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4446,7 +4446,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -4466,7 +4466,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -4486,7 +4486,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -4506,7 +4506,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4531,7 +4531,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4556,7 +4556,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4625,7 +4625,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "bus_stop" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 16, 0.5 ], [ 18, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4652,7 +4652,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "tram_stop" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 15, 0.5 ], [ 17, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4679,7 +4679,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "subway" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4706,7 +4706,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "light_rail" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4733,7 +4733,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "!in", "station", "light_rail", "subway" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4760,7 +4760,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "!has", "iata" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4787,7 +4787,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "has", "iata" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 12, 0.5 ], [ 14, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,

View File

@ -4122,7 +4122,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4144,7 +4144,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4166,7 +4166,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4188,7 +4188,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4210,7 +4210,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4232,7 +4232,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4254,7 +4254,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4276,7 +4276,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4298,7 +4298,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -4319,7 +4319,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -4340,7 +4340,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -4361,7 +4361,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -4381,7 +4381,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -4401,7 +4401,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -4421,7 +4421,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4446,7 +4446,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -4466,7 +4466,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -4486,7 +4486,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -4506,7 +4506,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4531,7 +4531,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4556,7 +4556,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4625,7 +4625,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "bus_stop" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 16, 0.5 ], [ 18, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4652,7 +4652,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "tram_stop" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 15, 0.5 ], [ 17, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4679,7 +4679,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "subway" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4706,7 +4706,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "light_rail" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4733,7 +4733,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "!in", "station", "light_rail", "subway" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4760,7 +4760,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "!has", "iata" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4787,7 +4787,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "has", "iata" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 12, 0.5 ], [ 14, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,

View File

@ -4122,7 +4122,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4144,7 +4144,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4166,7 +4166,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4188,7 +4188,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4210,7 +4210,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4232,7 +4232,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4254,7 +4254,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4276,7 +4276,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4298,7 +4298,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -4319,7 +4319,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -4340,7 +4340,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -4361,7 +4361,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -4381,7 +4381,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -4401,7 +4401,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -4421,7 +4421,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4446,7 +4446,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -4466,7 +4466,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -4486,7 +4486,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -4506,7 +4506,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4531,7 +4531,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4556,7 +4556,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4625,7 +4625,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "bus_stop" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 16, 0.5 ], [ 18, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4652,7 +4652,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "tram_stop" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 15, 0.5 ], [ 17, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4679,7 +4679,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "subway" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4706,7 +4706,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "light_rail" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4733,7 +4733,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "!in", "station", "light_rail", "subway" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4760,7 +4760,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "!has", "iata" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4787,7 +4787,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "has", "iata" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 12, 0.5 ], [ 14, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,

View File

@ -2480,7 +2480,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2502,7 +2502,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2524,7 +2524,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2546,7 +2546,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2568,7 +2568,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2590,7 +2590,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2612,7 +2612,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2634,7 +2634,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2656,7 +2656,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -2677,7 +2677,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -2698,7 +2698,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -2719,7 +2719,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -2739,7 +2739,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -2759,7 +2759,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -2779,7 +2779,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_bold" ],
"text-transform": "uppercase",
"text-size": { "stops": [ [ 5, 8 ], [ 8, 12 ] ] }
@ -2800,7 +2800,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -2820,7 +2820,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -2840,7 +2840,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -2860,7 +2860,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_bold" ],
"text-transform": "uppercase",
"text-size": { "stops": [ [ 4, 11 ], [ 5, 14 ] ] }
@ -2881,7 +2881,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_bold" ],
"text-transform": "uppercase",
"text-size": { "stops": [ [ 3, 11 ], [ 5, 15 ] ] }
@ -2902,7 +2902,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_bold" ],
"text-transform": "uppercase",
"text-size": { "stops": [ [ 2, 11 ], [ 5, 16 ] ] }

View File

@ -2480,7 +2480,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2502,7 +2502,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2524,7 +2524,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2546,7 +2546,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2568,7 +2568,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2590,7 +2590,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2612,7 +2612,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2634,7 +2634,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2656,7 +2656,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -2677,7 +2677,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -2698,7 +2698,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -2719,7 +2719,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -2739,7 +2739,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -2759,7 +2759,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -2779,7 +2779,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_bold" ],
"text-transform": "uppercase",
"text-size": { "stops": [ [ 5, 8 ], [ 8, 12 ] ] }
@ -2800,7 +2800,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -2820,7 +2820,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -2840,7 +2840,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -2860,7 +2860,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_bold" ],
"text-transform": "uppercase",
"text-size": { "stops": [ [ 4, 11 ], [ 5, 14 ] ] }
@ -2881,7 +2881,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_bold" ],
"text-transform": "uppercase",
"text-size": { "stops": [ [ 3, 11 ], [ 5, 15 ] ] }
@ -2902,7 +2902,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_bold" ],
"text-transform": "uppercase",
"text-size": { "stops": [ [ 2, 11 ], [ 5, 16 ] ] }

View File

@ -2480,7 +2480,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2502,7 +2502,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2524,7 +2524,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2546,7 +2546,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2568,7 +2568,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2590,7 +2590,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2612,7 +2612,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2634,7 +2634,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -2656,7 +2656,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -2677,7 +2677,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -2698,7 +2698,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -2719,7 +2719,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -2739,7 +2739,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -2759,7 +2759,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -2779,7 +2779,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_bold" ],
"text-transform": "uppercase",
"text-size": { "stops": [ [ 5, 8 ], [ 8, 12 ] ] }
@ -2800,7 +2800,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -2820,7 +2820,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -2840,7 +2840,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -2860,7 +2860,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_bold" ],
"text-transform": "uppercase",
"text-size": { "stops": [ [ 4, 11 ], [ 5, 14 ] ] }
@ -2881,7 +2881,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_bold" ],
"text-transform": "uppercase",
"text-size": { "stops": [ [ 3, 11 ], [ 5, 15 ] ] }
@ -2902,7 +2902,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_bold" ],
"text-transform": "uppercase",
"text-size": { "stops": [ [ 2, 11 ], [ 5, 16 ] ] }

View File

@ -4122,7 +4122,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4144,7 +4144,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4166,7 +4166,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4188,7 +4188,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4210,7 +4210,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4232,7 +4232,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4254,7 +4254,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4276,7 +4276,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4298,7 +4298,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -4319,7 +4319,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -4340,7 +4340,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -4361,7 +4361,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -4381,7 +4381,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -4401,7 +4401,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -4421,7 +4421,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4446,7 +4446,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -4466,7 +4466,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -4486,7 +4486,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -4506,7 +4506,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4531,7 +4531,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4556,7 +4556,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4625,7 +4625,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "bus_stop" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 16, 0.5 ], [ 18, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4652,7 +4652,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "tram_stop" ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 15, 0.5 ], [ 17, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4679,7 +4679,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "subway" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4706,7 +4706,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "light_rail" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4733,7 +4733,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "!in", "station", "light_rail", "subway" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4760,7 +4760,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "!has", "iata" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4787,7 +4787,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "has", "iata" ] ],
"layout": {
"text-field": "{name_de}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_de" ] ], [ "get", "name_de" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 12, 0.5 ], [ 14, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,

View File

@ -4122,7 +4122,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4144,7 +4144,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4166,7 +4166,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4188,7 +4188,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4210,7 +4210,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4232,7 +4232,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4254,7 +4254,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4276,7 +4276,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4298,7 +4298,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -4319,7 +4319,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -4340,7 +4340,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -4361,7 +4361,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -4381,7 +4381,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -4401,7 +4401,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -4421,7 +4421,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4446,7 +4446,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -4466,7 +4466,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -4486,7 +4486,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -4506,7 +4506,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4531,7 +4531,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4556,7 +4556,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4625,7 +4625,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "bus_stop" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 16, 0.5 ], [ 18, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4652,7 +4652,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "tram_stop" ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 15, 0.5 ], [ 17, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4679,7 +4679,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "subway" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4706,7 +4706,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "light_rail" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4733,7 +4733,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "!in", "station", "light_rail", "subway" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4760,7 +4760,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "!has", "iata" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4787,7 +4787,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "has", "iata" ] ],
"layout": {
"text-field": "{name_en}",
"text-field": [ "case", [ "to-boolean", [ "get", "name_en" ] ], [ "get", "name_en" ], [ "get", "name" ] ],
"icon-size": { "stops": [ [ 12, 0.5 ], [ 14, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,

View File

@ -4122,7 +4122,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "pedestrian" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4144,7 +4144,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "living_street" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4166,7 +4166,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "residential" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4188,7 +4188,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "unclassified" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4210,7 +4210,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "tertiary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4232,7 +4232,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "secondary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4254,7 +4254,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "primary" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4276,7 +4276,7 @@
"source-layer": "street_labels",
"filter": [ "==", "kind", "trunk" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"symbol-placement": "line",
"text-anchor": "center",
@ -4298,7 +4298,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "neighbourhood" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 14, 12 ] ] },
"text-transform": "uppercase"
@ -4319,7 +4319,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "quarter" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 13, 13 ] ] },
"text-transform": "uppercase"
@ -4340,7 +4340,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "suburb" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 11, 11 ], [ 13, 14 ] ] },
"text-transform": "uppercase"
@ -4361,7 +4361,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "hamlet" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 10, 11 ], [ 12, 14 ] ] }
},
@ -4381,7 +4381,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "village" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 9, 11 ], [ 12, 14 ] ] }
},
@ -4401,7 +4401,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "town" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 8, 11 ], [ 12, 14 ] ] }
},
@ -4421,7 +4421,7 @@
"source-layer": "boundary_labels",
"filter": [ "in", "admin_level", 4, "4" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4446,7 +4446,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "city" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 7, 11 ], [ 10, 14 ] ] }
},
@ -4466,7 +4466,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "state_capital" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 6, 11 ], [ 10, 15 ] ] }
},
@ -4486,7 +4486,7 @@
"source-layer": "place_labels",
"filter": [ "==", "kind", "capital" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-size": { "stops": [ [ 5, 12 ], [ 10, 16 ] ] }
},
@ -4506,7 +4506,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<=", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4531,7 +4531,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ "<", "way_area", 90000000 ], [ ">", "way_area", 10000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4556,7 +4556,7 @@
"source-layer": "boundary_labels",
"filter": [ "all", [ "in", "admin_level", 2, "2" ], [ ">=", "way_area", 90000000 ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"text-font": [ "noto_sans_regular" ],
"text-transform": "uppercase",
"text-anchor": "top",
@ -4625,7 +4625,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "bus_stop" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 16, 0.5 ], [ 18, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4652,7 +4652,7 @@
"source-layer": "public_transport",
"filter": [ "==", "kind", "tram_stop" ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 15, 0.5 ], [ 17, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4679,7 +4679,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "subway" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4706,7 +4706,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "==", "station", "light_rail" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 14, 0.5 ], [ 16, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4733,7 +4733,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "in", "kind", "station", "halt" ], [ "!in", "station", "light_rail", "subway" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4760,7 +4760,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "!has", "iata" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 13, 0.5 ], [ 15, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,
@ -4787,7 +4787,7 @@
"source-layer": "public_transport",
"filter": [ "all", [ "==", "kind", "aerodrome" ], [ "has", "iata" ] ],
"layout": {
"text-field": "{name}",
"text-field": [ "get", "name" ],
"icon-size": { "stops": [ [ 12, 0.5 ], [ 14, 1 ] ] },
"symbol-placement": "point",
"icon-keep-upright": true,

View File

@ -1,4 +1,5 @@
import FNote from "../../entities/fnote";
import type { PrintReport } from "../../print";
export const allViewTypes = ["list", "grid", "calendar", "table", "geoMap", "board", "presentation"] as const;
export type ViewTypeOptions = typeof allViewTypes[number];
@ -18,6 +19,6 @@ export interface ViewModeProps<T extends object> {
viewConfig: T | undefined;
saveConfig(newConfig: T): void;
media: ViewModeMedia;
onReady(): void;
onReady(data: PrintReport): void;
onProgressChanged?: ProgressChangedFn;
}

View File

@ -75,6 +75,7 @@
justify-content: center;
text-align: center;
padding: 10px;
flex-grow: 1;
}
.note-book-content.type-image img, .note-book-content.type-canvas svg {
@ -141,4 +142,4 @@
border: 1px solid var(--main-border-color);
background: var(--more-accented-background-color);
}
/* #endregion */
/* #endregion */

View File

@ -1,22 +1,25 @@
import { useEffect, useRef, useState } from "preact/hooks";
import FNote from "../../../entities/fnote";
import Icon from "../../react/Icon";
import { ViewModeProps } from "../interface";
import { useImperativeSearchHighlighlighting, useNoteLabel } from "../../react/hooks";
import NoteLink from "../../react/NoteLink";
import "./ListOrGridView.css";
import content_renderer from "../../../services/content_renderer";
import { Pager, usePagination } from "../Pagination";
import tree from "../../../services/tree";
import link from "../../../services/link";
import { t } from "../../../services/i18n";
import { useEffect, useRef, useState } from "preact/hooks";
import FNote from "../../../entities/fnote";
import attribute_renderer from "../../../services/attribute_renderer";
import content_renderer from "../../../services/content_renderer";
import { t } from "../../../services/i18n";
import link from "../../../services/link";
import tree from "../../../services/tree";
import { useImperativeSearchHighlighlighting, useNoteLabel, useNoteLabelBoolean } from "../../react/hooks";
import Icon from "../../react/Icon";
import NoteLink from "../../react/NoteLink";
import { ViewModeProps } from "../interface";
import { Pager, usePagination } from "../Pagination";
import { filterChildNotes, useFilteredNoteIds } from "./utils";
export function ListView({ note, noteIds: unfilteredNoteIds, highlightedTokens }: ViewModeProps<{}>) {
const expandDepth = useExpansionDepth(note);
const noteIds = useFilteredNoteIds(note, unfilteredNoteIds);
const { pageNotes, ...pagination } = usePagination(note, noteIds);
const [ includeArchived ] = useNoteLabelBoolean(note, "includeArchived");
return (
<div class="note-list list-view">
@ -25,7 +28,11 @@ export function ListView({ note, noteIds: unfilteredNoteIds, highlightedTokens }
<div class="note-list-container use-tn-links">
{pageNotes?.map(childNote => (
<ListNoteCard note={childNote} parentNote={note} expandDepth={expandDepth} highlightedTokens={highlightedTokens} currentLevel={1} />
<ListNoteCard
key={childNote.noteId}
note={childNote} parentNote={note}
expandDepth={expandDepth} highlightedTokens={highlightedTokens}
currentLevel={1} includeArchived={includeArchived} />
))}
</div>
@ -56,12 +63,13 @@ export function GridView({ note, noteIds: unfilteredNoteIds, highlightedTokens }
);
}
function ListNoteCard({ note, parentNote, highlightedTokens, currentLevel, expandDepth }: {
function ListNoteCard({ note, parentNote, highlightedTokens, currentLevel, expandDepth, includeArchived }: {
note: FNote,
parentNote: FNote,
currentLevel: number,
expandDepth: number,
highlightedTokens: string[] | null | undefined
highlightedTokens: string[] | null | undefined;
includeArchived: boolean;
}) {
const [ isExpanded, setExpanded ] = useState(currentLevel <= expandDepth);
@ -88,10 +96,10 @@ function ListNoteCard({ note, parentNote, highlightedTokens, currentLevel, expan
{isExpanded && <>
<NoteContent note={note} highlightedTokens={highlightedTokens} noChildrenList />
<NoteChildren note={note} parentNote={parentNote} highlightedTokens={highlightedTokens} currentLevel={currentLevel} expandDepth={expandDepth} />
<NoteChildren note={note} parentNote={parentNote} highlightedTokens={highlightedTokens} currentLevel={currentLevel} expandDepth={expandDepth} includeArchived={includeArchived} />
</>}
</div>
)
);
}
function GridNoteCard({ note, parentNote, highlightedTokens }: { note: FNote, parentNote: FNote, highlightedTokens: string[] | null | undefined }) {
@ -124,7 +132,7 @@ function GridNoteCard({ note, parentNote, highlightedTokens }: { note: FNote, pa
highlightedTokens={highlightedTokens}
/>
</div>
)
);
}
function NoteAttributes({ note }: { note: FNote }) {
@ -135,7 +143,7 @@ function NoteAttributes({ note }: { note: FNote }) {
});
}, [ note ]);
return <span className="note-list-attributes" ref={ref} />
return <span className="note-list-attributes" ref={ref} />;
}
function NoteContent({ note, trim, noChildrenList, highlightedTokens }: { note: FNote, trim?: boolean, noChildrenList?: boolean, highlightedTokens: string[] | null | undefined }) {
@ -161,40 +169,43 @@ function NoteContent({ note, trim, noChildrenList, highlightedTokens }: { note:
console.warn(`Caught error while rendering note '${note.noteId}' of type '${note.type}'`);
console.error(e);
contentRef.current?.replaceChildren(t("collections.rendering_error"));
})
});
}, [ note, highlightedTokens ]);
return <div ref={contentRef} className="note-book-content" />;
}
function NoteChildren({ note, parentNote, highlightedTokens, currentLevel, expandDepth }: {
function NoteChildren({ note, parentNote, highlightedTokens, currentLevel, expandDepth, includeArchived }: {
note: FNote,
parentNote: FNote,
currentLevel: number,
expandDepth: number,
highlightedTokens: string[] | null | undefined
includeArchived: boolean;
}) {
const [ childNotes, setChildNotes ] = useState<FNote[]>();
useEffect(() => {
filterChildNotes(note).then(setChildNotes);
}, [ note ]);
filterChildNotes(note, includeArchived).then(setChildNotes);
}, [ note, includeArchived ]);
return childNotes?.map(childNote => <ListNoteCard
key={childNote.noteId}
note={childNote}
parentNote={parentNote}
highlightedTokens={highlightedTokens}
currentLevel={currentLevel + 1} expandDepth={expandDepth}
/>)
includeArchived={includeArchived}
/>);
}
function getNotePath(parentNote: FNote, childNote: FNote) {
if (parentNote.type === "search") {
// for search note parent, we want to display a non-search path
return childNote.noteId;
} else {
return `${parentNote.noteId}/${childNote.noteId}`
}
return `${parentNote.noteId}/${childNote.noteId}`;
}
function useExpansionDepth(note: FNote) {
@ -206,7 +217,7 @@ function useExpansionDepth(note: FNote) {
return 1;
} else if (expandDepth === "all") {
return Number.MAX_SAFE_INTEGER;
} else {
return parseInt(expandDepth, 10);
}
return parseInt(expandDepth, 10);
}

View File

@ -1,7 +1,9 @@
import { useEffect, useLayoutEffect, useState } from "preact/hooks";
import froca from "../../../services/froca";
import type FNote from "../../../entities/fnote";
import type { PrintReport } from "../../../print";
import content_renderer from "../../../services/content_renderer";
import froca from "../../../services/froca";
import type { ViewModeProps } from "../interface";
import { filterChildNotes, useFilteredNoteIds } from "./utils";
@ -12,27 +14,35 @@ interface NotesWithContent {
export function ListPrintView({ note, noteIds: unfilteredNoteIds, onReady, onProgressChanged }: ViewModeProps<{}>) {
const noteIds = useFilteredNoteIds(note, unfilteredNoteIds);
const [ notesWithContent, setNotesWithContent ] = useState<NotesWithContent[]>();
const [ state, setState ] = useState<{
notesWithContent?: NotesWithContent[],
data?: PrintReport
}>({});
useLayoutEffect(() => {
const noteIdsSet = new Set<string>();
froca.getNotes(noteIds).then(async (notes) => {
const noteIdsWithChildren = await note.getSubtreeNoteIds(true);
const ignoredNoteIds: string[] = [];
const notesWithContent: NotesWithContent[] = [];
async function processNote(note: FNote, depth: number) {
const content = await content_renderer.getRenderedContent(note, {
trim: false,
noChildrenList: true
});
if (isNotePrintable(note)) {
const content = await content_renderer.getRenderedContent(note, {
trim: false,
noChildrenList: true
});
const contentEl = content.$renderedContent[0];
const contentEl = content.$renderedContent[0];
insertPageTitle(contentEl, note.title);
rewriteHeadings(contentEl, depth);
noteIdsSet.add(note.noteId);
notesWithContent.push({ note, contentEl });
insertPageTitle(contentEl, note.title);
rewriteHeadings(contentEl, depth);
noteIdsSet.add(note.noteId);
notesWithContent.push({ note, contentEl });
} else {
ignoredNoteIds.push(note.noteId);
}
if (onProgressChanged) {
onProgressChanged(notesWithContent.length / noteIdsWithChildren.length);
@ -55,22 +65,28 @@ export function ListPrintView({ note, noteIds: unfilteredNoteIds, onReady, onPro
rewriteLinks(contentEl, noteIdsSet);
}
setNotesWithContent(notesWithContent);
setState({
notesWithContent,
data: {
type: "collection",
ignoredNoteIds
}
});
});
}, [noteIds]);
useEffect(() => {
if (notesWithContent && onReady) {
onReady();
if (onReady && state?.data) {
onReady(state.data);
}
}, [ notesWithContent, onReady ]);
}, [ state, onReady ]);
return (
<div class="note-list list-print-view">
<div class="note-list-container use-tn-links">
<h1>{note.title}</h1>
{notesWithContent?.map(({ note: childNote, contentEl }) => (
{state.notesWithContent?.map(({ note: childNote, contentEl }) => (
<section id={`note-${childNote.noteId}`} class="note" dangerouslySetInnerHTML={{ __html: contentEl.innerHTML }} />
))}
</div>
@ -78,6 +94,18 @@ export function ListPrintView({ note, noteIds: unfilteredNoteIds, onReady, onPro
);
}
function isNotePrintable(note: FNote) {
if (!note.isContentAvailable()) {
return false;
}
if (note.type === "file") {
return false;
}
return true;
}
function insertPageTitle(contentEl: HTMLElement, title: string) {
const pageTitleEl = document.createElement("h1");
pageTitleEl.textContent = title;

View File

@ -1,4 +1,5 @@
import { useMemo } from "preact/hooks";
import FNote from "../../../entities/fnote";
/**
@ -12,9 +13,9 @@ export function useFilteredNoteIds(note: FNote, noteIds: string[]) {
}, [ note, noteIds ]);
}
export async function filterChildNotes(note: FNote) {
export async function filterChildNotes(note: FNote, includeArchived = true) {
const imageLinks = note.getRelations("imageLink");
const imageLinkNoteIds = new Set(imageLinks.map(rel => rel.value));
const childNotes = await note.getChildNotes();
return childNotes.filter((childNote) => !imageLinkNoteIds.has(childNote.noteId));
return childNotes.filter((childNote) => !imageLinkNoteIds.has(childNote.noteId) && (includeArchived || !childNote.isArchived));
}

View File

@ -1,6 +1,7 @@
import { beforeAll, describe, expect, it } from "vitest";
import { buildNote } from "../../../test/easy-froca";
import FNote from "../../../entities/fnote";
import { buildNote } from "../../../test/easy-froca";
import { buildPresentationModel, PresentationModel } from "./model";
let presentationNote!: FNote;
@ -65,7 +66,7 @@ describe("Presentation model", () => {
]
}
]
})
});
});
it("empty slides don't render children", () => {
@ -73,11 +74,11 @@ describe("Presentation model", () => {
});
it("rewrites links to other slides", () => {
expect(data.slides[1].content.__html).toStrictEqual(`<div class="ck-content"><p>Go to&nbsp;<a class="reference-link" href="#/slide-slide1"><span class="bx bx-folder"></span>First slide</a>.</p></div>`);
expect(data.slides[1].verticalSlides![0].content.__html).toStrictEqual(`<div class="ck-content"><p>Go to&nbsp;<a class="reference-link" href="#/slide-slide2"><span class="bx bx-note"></span>First-sub</a>.</p></div>`);
expect(data.slides[1].content.__html).toStrictEqual(`<div class="ck-content"><p>Go to&nbsp;<a class="reference-link" href="#/slide-slide1"><span><span class="tn-icon bx bx-folder"></span>First slide</span></a>.</p></div>`);
expect(data.slides[1].verticalSlides![0].content.__html).toStrictEqual(`<div class="ck-content"><p>Go to&nbsp;<a class="reference-link" href="#/slide-slide2"><span><span class="tn-icon bx bx-note"></span>First-sub</span></a>.</p></div>`);
});
it("rewrites links even if they are not part of the slideshow", () => {
expect(data.slides[0].verticalSlides![0].content.__html).toStrictEqual(`<div class="ck-content"><p>Go to&nbsp;<a class="reference-link" href="#/slide-other"><span class="bx bx-note"></span>Other note</a>.</p></div>`);
expect(data.slides[0].verticalSlides![0].content.__html).toStrictEqual(`<div class="ck-content"><p>Go to&nbsp;<a class="reference-link" href="#/slide-other"><span><span class="tn-icon bx bx-note"></span>Other note</span></a>.</p></div>`);
});
});

View File

@ -1,10 +1,12 @@
import "./TablePrintView.css";
import { useEffect, useRef, useState } from "preact/hooks";
import { ExportModule, FormatModule, Tabulator as VanillaTabulator} from 'tabulator-tables';
import { RawHtmlBlock } from "../../react/RawHtml";
import { ViewModeProps } from "../interface";
import useData, { TableConfig } from "./data";
import { ExportModule, FormatModule, Tabulator as VanillaTabulator} from 'tabulator-tables';
import Tabulator from "./tabulator";
import { RawHtmlBlock } from "../../react/RawHtml";
import "./TablePrintView.css";
export default function TablePrintView({ note, noteIds, viewConfig, onReady }: ViewModeProps<TableConfig>) {
const tabulatorRef = useRef<VanillaTabulator>(null);
@ -13,7 +15,10 @@ export default function TablePrintView({ note, noteIds, viewConfig, onReady }: V
useEffect(() => {
if (!html) return;
onReady?.();
onReady?.({
type: "collection",
ignoredNoteIds: []
});
}, [ html ]);
return rowData && (
@ -45,5 +50,5 @@ export default function TablePrintView({ note, noteIds, viewConfig, onReady }: V
</div>
</>
)
);
}

View File

@ -1,9 +1,9 @@
import FlexContainer from "./flex_container.js";
import splitService from "../../services/resizer.js";
import type RightPanelWidget from "../right_panel_widget.js";
import type { EventData, EventNames } from "../../components/app_context.js";
import splitService from "../../services/resizer.js";
import type BasicWidget from "../basic_widget.js";
import FlexContainer from "./flex_container.js";
export default class RightPaneContainer extends FlexContainer<RightPanelWidget> {
export default class RightPaneContainer extends FlexContainer<BasicWidget> {
private rightPaneHidden: boolean;
private firstRender: boolean;

View File

@ -2,9 +2,23 @@
overflow: auto;
scroll-behavior: smooth;
position: relative;
> .inline-title,
> .note-detail > .note-detail-editable-text,
> .note-list-widget:not(.full-height) {
padding-inline: 24px;
}
}
.note-split.type-code:not(.mime-text-x-sqlite) > .scrolling-container {
background-color: var(--code-background-color);
--scrollbar-background-color: var(--main-background-color);
.note-split.type-code:not(.mime-text-x-sqlite) {
&> .scrolling-container {
background-color: var(--code-background-color);
--scrollbar-background-color: var(--main-background-color);
}
.inline-title,
.title-actions {
background-color: var(--main-background-color);
}
}

View File

@ -54,7 +54,7 @@ body.mobile .modal.popup-editor-dialog .modal-dialog {
min-height: unset;
}
.modal.popup-editor-dialog div.note-title-widget {
:root div.modal.popup-editor-dialog div.note-title-widget {
--note-title-padding-inline: 8px;
}
@ -106,4 +106,4 @@ body.mobile .modal.popup-editor-dialog .modal-dialog {
margin: 0;
border-radius: 0;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,9 @@
import { useCallback } from "preact/hooks";
import appContext from "../../components/app_context";
import FNote from "../../entities/fnote";
import link_context_menu from "../../menus/link_context_menu";
import { escapeHtml, isCtrlKey } from "../../services/utils";
import { isCtrlKey } from "../../services/utils";
import { useGlobalShortcut, useNoteLabel } from "../react/hooks";
import { LaunchBarActionButton, useLauncherIconAndTitle } from "./launch_bar_widgets";
@ -26,10 +27,10 @@ export function CustomNoteLauncher({ launcherNote, getTargetNoteId, getHoistedNo
const ctrlKey = isCtrlKey(evt);
if ((evt.which === 1 && ctrlKey) || evt.which === 2) {
const activate = evt.shiftKey ? true : false;
const activate = !!evt.shiftKey;
await appContext.tabManager.openInNewTab(targetNoteId, hoistedNoteIdWithDefault, activate);
} else {
await appContext.tabManager.openInSameTab(targetNoteId);
await appContext.tabManager.openInSameTab(targetNoteId, hoistedNoteIdWithDefault);
}
}, [ launcherNote, getTargetNoteId, getHoistedNoteId ]);
@ -40,7 +41,7 @@ export function CustomNoteLauncher({ launcherNote, getTargetNoteId, getHoistedNo
return (
<LaunchBarActionButton
icon={icon}
text={escapeHtml(title)}
text={title}
onClick={launch}
onAuxClick={launch}
onContextMenu={async evt => {
@ -51,5 +52,5 @@ export function CustomNoteLauncher({ launcherNote, getTargetNoteId, getHoistedNo
}
}}
/>
)
);
}

View File

@ -1,17 +1,20 @@
import { useCallback, useContext, useEffect, useMemo, useState } from "preact/hooks";
import appContext, { CommandNames } from "../../components/app_context";
import FNote from "../../entities/fnote";
import date_notes from "../../services/date_notes";
import dialog from "../../services/dialog";
import { LauncherWidgetDefinitionWithType } from "../../services/frontend_script_api_preact";
import { t } from "../../services/i18n";
import toast from "../../services/toast";
import { getErrorMessage, isMobile } from "../../services/utils";
import BasicWidget from "../basic_widget";
import NoteContextAwareWidget from "../note_context_aware_widget";
import QuickSearchWidget from "../quick_search";
import { useGlobalShortcut, useLegacyWidget, useNoteLabel, useNoteRelationTarget, useTriliumOptionBool } from "../react/hooks";
import { ParentComponent } from "../react/react_utils";
import BasicWidget from "../basic_widget";
import FNote from "../../entities/fnote";
import QuickSearchWidget from "../quick_search";
import { getErrorMessage, isMobile } from "../../services/utils";
import date_notes from "../../services/date_notes";
import { CustomNoteLauncher } from "./GenericButtons";
import { LaunchBarActionButton, LaunchBarContext, LauncherNoteProps, useLauncherIconAndTitle } from "./launch_bar_widgets";
import dialog from "../../services/dialog";
import { t } from "../../services/i18n";
import appContext, { CommandNames } from "../../components/app_context";
import toast from "../../services/toast";
export function CommandButton({ launcherNote }: LauncherNoteProps) {
const { icon, title } = useLauncherIconAndTitle(launcherNote);
@ -23,7 +26,7 @@ export function CommandButton({ launcherNote }: LauncherNoteProps) {
text={title}
triggerCommand={command as CommandNames}
/>
)
);
}
// we're intentionally displaying the launcher title and icon instead of the target,
@ -75,7 +78,7 @@ export function ScriptLauncher({ launcherNote }: LauncherNoteProps) {
text={title}
onClick={launch}
/>
)
);
}
export function AiChatButton({ launcherNote }: LauncherNoteProps) {
@ -88,7 +91,7 @@ export function AiChatButton({ launcherNote }: LauncherNoteProps) {
text={title}
triggerCommand="createAiChat"
/>
)
);
}
export function TodayLauncher({ launcherNote }: LauncherNoteProps) {
@ -114,12 +117,13 @@ export function QuickSearchLauncherWidget() {
<div>
{isEnabled && <LegacyWidgetRenderer widget={widget} />}
</div>
)
);
}
export function CustomWidget({ launcherNote }: LauncherNoteProps) {
const [ widgetNote ] = useNoteRelationTarget(launcherNote, "widget");
const [ widget, setWidget ] = useState<BasicWidget>();
const [ widget, setWidget ] = useState<BasicWidget | NoteContextAwareWidget | LauncherWidgetDefinitionWithType>();
const parentComponent = useContext(ParentComponent) as BasicWidget | null;
parentComponent?.contentSized();
@ -146,9 +150,13 @@ export function CustomWidget({ launcherNote }: LauncherNoteProps) {
return (
<div>
{widget && <LegacyWidgetRenderer widget={widget} />}
{widget && (
("type" in widget && widget.type === "preact-launcher-widget")
? <ReactWidgetRenderer widget={widget as LauncherWidgetDefinitionWithType} />
: <LegacyWidgetRenderer widget={widget as BasicWidget} />
)}
</div>
)
);
}
export function LegacyWidgetRenderer({ widget }: { widget: BasicWidget }) {
@ -158,3 +166,8 @@ export function LegacyWidgetRenderer({ widget }: { widget: BasicWidget }) {
return widgetEl;
}
function ReactWidgetRenderer({ widget }: { widget: LauncherWidgetDefinitionWithType }) {
const El = widget.render;
return <El />;
}

View File

@ -1,17 +1,17 @@
import { createContext } from "preact";
import { useContext } from "preact/hooks";
import FNote from "../../entities/fnote";
import { escapeHtml } from "../../services/utils";
import ActionButton, { ActionButtonProps } from "../react/ActionButton";
import Dropdown, { DropdownProps } from "../react/Dropdown";
import { useNoteLabel, useNoteProperty } from "../react/hooks";
import Icon from "../react/Icon";
import { useContext } from "preact/hooks";
export const LaunchBarContext = createContext<{
isHorizontalLayout: boolean;
}>({
isHorizontalLayout: false
})
});
export interface LauncherNoteProps {
/** The corresponding {@link FNote} of type {@code launcher} in the hidden subtree of this launcher. Generally this launcher note holds information about the launcher via labels and relations, but also the title and the icon of the launcher. Not to be confused with the target note, which is specific to some launchers. */
@ -28,7 +28,7 @@ export function LaunchBarActionButton(props: Omit<ActionButtonProps, "className"
titlePosition={isHorizontalLayout ? "bottom" : "right"}
{...props}
/>
)
);
}
export function LaunchBarDropdownButton({ children, icon, dropdownOptions, ...props }: Pick<DropdownProps, "title" | "children" | "onShown" | "dropdownOptions" | "dropdownRef"> & { icon: string }) {
@ -50,7 +50,7 @@ export function LaunchBarDropdownButton({ children, icon, dropdownOptions, ...pr
}}
{...props}
>{children}</Dropdown>
)
);
}
export function useLauncherIconAndTitle(note: FNote) {
@ -62,6 +62,6 @@ export function useLauncherIconAndTitle(note: FNote) {
return {
icon: note.getIcon(),
title: escapeHtml(title ?? "")
title: title ?? ""
};
}

View File

@ -35,7 +35,7 @@
align-items: center;
min-width: 0;
.bx {
.tn-icon {
margin-inline: 6px;
}
@ -55,9 +55,9 @@
.icon-action {
font-size: .9rem !important;
.bxs-chevron-right {
&.breadcrumb-separator {
transform: translateY(8%);
&::before {
opacity: .75;
}
@ -87,12 +87,10 @@
color: var(--custom-color, inherit) !important;
}
.dropdown .breadcrumb-child-list {
.dropdown.breadcrumb-child-list {
/* Icon */
li > span:first-child {
opacity: .75;
padding-inline-end: 4px;
translate: none;
};
}

View File

@ -25,17 +25,17 @@ import ActionButton from "../react/ActionButton";
import { Badge } from "../react/Badge";
import Dropdown from "../react/Dropdown";
import { FormDropdownDivider, FormListItem } from "../react/FormList";
import { useActiveNoteContext, useChildNotes, useNote, useNoteColorClass, useNoteIcon, useNoteLabel, useNoteLabelBoolean, useNoteProperty, useStaticTooltip, useTriliumOptionBool } from "../react/hooks";
import { useActiveNoteContext, useChildNotes, useNote, useNoteColorClass, useNoteIcon, useNoteLabel, useNoteLabelBoolean, useNoteTitle, useStaticTooltip, useTriliumOptionBool } from "../react/hooks";
import Icon from "../react/Icon";
import { NewNoteLink } from "../react/NoteLink";
import { ParentComponent } from "../react/react_utils";
const COLLAPSE_THRESHOLD = 5;
const INITIAL_ITEMS = 2;
const FINAL_ITEMS = 2;
const FINAL_ITEMS = 3;
export default function Breadcrumb() {
const { note, notePath, notePaths, noteContext } = useNotePaths();
const { notePath, notePaths, noteContext } = useNotePaths();
const parentComponent = useContext(ParentComponent);
const [ hideArchivedNotes ] = useTriliumOptionBool("hideArchivedNotes_main");
const separatorProps: Omit<BreadcrumbSeparatorProps, "notePath" | "activeNotePath"> = { noteContext, hideArchivedNotes };
@ -57,6 +57,7 @@ export default function Breadcrumb() {
<BreadcrumbItem index={notePaths.length - FINAL_ITEMS + index} notePath={item} notePathLength={notePaths.length} noteContext={noteContext} parentComponent={parentComponent} />
</Fragment>
))}
<BreadcrumbSeparator notePath={notePaths.at(-1)} {...separatorProps} />
</>
) : (
notePaths.map((item, index) => (
@ -65,8 +66,7 @@ export default function Breadcrumb() {
? <BreadcrumbRoot noteContext={noteContext} />
: <BreadcrumbItem index={index} notePath={item} notePathLength={notePaths.length} noteContext={noteContext} parentComponent={parentComponent} />
}
{(index < notePaths.length - 1 || note?.hasChildren()) &&
<BreadcrumbSeparator notePath={item} activeNotePath={notePaths[index + 1]} {...separatorProps} />}
<BreadcrumbSeparator notePath={item} activeNotePath={notePaths[index + 1]} {...separatorProps} />
</Fragment>
))
)}
@ -134,9 +134,9 @@ function BreadcrumbHoistedNoteRoot({ noteId }: { noteId: string }) {
function BreadcrumbLastItem({ notePath, parentComponent }: { notePath: string, parentComponent: Component | null }) {
const linkRef = useRef<HTMLAnchorElement>(null);
const noteId = notePath.split("/").at(-1);
const { noteId, parentNoteId } = tree.getNoteIdAndParentIdFromUrl(notePath);
const [ note ] = useState(() => froca.getNoteFromCache(noteId!));
const title = useNoteProperty(note, "title");
const title = useNoteTitle(noteId, parentNoteId);
const colorClass = useNoteColorClass(note);
const [ archived ] = useNoteLabelBoolean(note, "archived");
useStaticTooltip(linkRef, {
@ -180,8 +180,8 @@ function BreadcrumbItem({ index, notePath, noteContext, notePathLength, parentCo
}
interface BreadcrumbSeparatorProps {
notePath: string,
activeNotePath: string,
notePath: string | undefined,
activeNotePath?: string,
noteContext: NoteContext | undefined,
hideArchivedNotes: boolean;
}
@ -191,9 +191,9 @@ function BreadcrumbSeparator(props: BreadcrumbSeparatorProps) {
<Dropdown
text={<Icon icon="bx bxs-chevron-right" />}
noSelectButtonStyle
buttonClassName="icon-action"
buttonClassName="icon-action breadcrumb-separator"
hideToggleArrow
dropdownContainerClassName="tn-dropdown-menu-scrollable"
dropdownContainerClassName="tn-dropdown-menu-scrollable breadcrumb-child-list"
dropdownOptions={{ popperConfig: { strategy: "fixed", placement: "top" } }}
>
<BreadcrumbSeparatorDropdownContent {...props} />
@ -202,12 +202,12 @@ function BreadcrumbSeparator(props: BreadcrumbSeparatorProps) {
}
function BreadcrumbSeparatorDropdownContent({ notePath, noteContext, activeNotePath, hideArchivedNotes }: BreadcrumbSeparatorProps) {
const notePathComponents = notePath.split("/");
const notePathComponents = (notePath ?? "").split("/");
const parentNoteId = notePathComponents.at(-1);
const childNotes = useChildNotes(parentNoteId);
return (
<ul className="breadcrumb-child-list">
<>
{childNotes.map((note) => {
if (note.noteId === "_hidden") return;
if (hideArchivedNotes && note.isArchived) return null;
@ -226,12 +226,12 @@ function BreadcrumbSeparatorDropdownContent({ notePath, noteContext, activeNoteP
</li>;
})}
<FormDropdownDivider />
{childNotes.length > 0 && <FormDropdownDivider />}
<FormListItem
icon="bx bx-plus"
onClick={() => note_create.createNote(notePath, { activate: true })}
>{t("breadcrumb.create_new_note")}</FormListItem>
</ul>
</>
);
}
@ -244,26 +244,25 @@ function BreadcrumbCollapsed({ items, noteContext }: {
text={<Icon icon="bx bx-dots-horizontal-rounded" />}
noSelectButtonStyle
buttonClassName="icon-action"
dropdownContainerClassName="breadcrumb-child-list"
hideToggleArrow
dropdownOptions={{ popperConfig: { strategy: "fixed" } }}
>
<ul className="breadcrumb-child-list">
{items.map((notePath) => {
const notePathComponents = notePath.split("/");
const noteId = notePathComponents[notePathComponents.length - 1];
const note = froca.getNoteFromCache(noteId);
if (!note) return null;
{items.map((notePath) => {
const notePathComponents = notePath.split("/");
const noteId = notePathComponents[notePathComponents.length - 1];
const note = froca.getNoteFromCache(noteId);
if (!note) return null;
return <li key={note.noteId}>
<FormListItem
icon={note.getIcon()}
onClick={() => noteContext?.setNote(notePath)}
>
<span>{note.title}</span>
</FormListItem>
</li>;
})}
</ul>
return <li key={note.noteId}>
<FormListItem
icon={note.getIcon()}
onClick={() => noteContext?.setNote(notePath)}
>
<span>{note.title}</span>
</FormListItem>
</li>;
})}
</Dropdown>
);
}

View File

@ -9,7 +9,7 @@
.inline-title {
max-width: var(--max-content-width);
container-type: inline-size;
padding-inline-start: 24px;
padding-top: 20px;
& > .inline-title-row {
--icon-size: 35px;
@ -75,10 +75,6 @@
}
}
.note-split.type-code:not(.mime-text-x-sqlite) .inline-title {
background-color: var(--main-background-color);
}
body.prefers-centered-content .inline-title {
margin-inline: auto;
}
@ -99,58 +95,3 @@ body.prefers-centered-content .inline-title {
font-weight: 500;
}
}
@keyframes note-type-switcher-intro {
from {
opacity: 0;
} to {
opacity: 1;
}
}
.note-type-switcher {
--badge-radius: 12px;
position: relative;
top: 5px;
padding: .25em 0;
display: flex;
align-items: center;
overflow-x: auto;
min-width: 0;
gap: 5px;
min-height: 35px;
>* {
flex-shrink: 0;
animation: note-type-switcher-intro 200ms ease-in;
}
.ext-badge {
--color: var(--input-background-color);
color: var(--main-text-color);
font-size: 0.9rem;
flex-shrink: 0;
}
}
.edited-notes {
padding: 1.5em 0;
.collapsible-inner-body {
display: flex;
flex-wrap: wrap;
gap: 0.3em;
.badge {
margin: 0;
a.tn-link {
color: inherit;
text-transform: none;
text-decoration: none;
display: inline-block;
}
}
}
}

View File

@ -1,30 +1,19 @@
import "./InlineTitle.css";
import { NoteType } from "@triliumnext/commons";
import { Tooltip } from "bootstrap";
import clsx from "clsx";
import { ComponentChild } from "preact";
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "preact/hooks";
import { useLayoutEffect, useMemo, useRef, useState } from "preact/hooks";
import { Trans } from "react-i18next";
import FNote from "../../entities/fnote";
import attributes from "../../services/attributes";
import froca from "../../services/froca";
import { t } from "../../services/i18n";
import { ViewScope } from "../../services/link";
import { NOTE_TYPES, NoteTypeMapping } from "../../services/note_types";
import server from "../../services/server";
import { formatDateTime } from "../../utils/formatters";
import NoteIcon from "../note_icon";
import NoteTitleWidget from "../note_title";
import SimpleBadge, { Badge, BadgeWithDropdown } from "../react/Badge";
import Collapsible from "../react/Collapsible";
import { FormDropdownDivider, FormListItem } from "../react/FormList";
import { useNoteBlob, useNoteContext, useNoteLabel, useNoteProperty, useStaticTooltip, useTriliumEvent, useTriliumOptionBool } from "../react/hooks";
import NoteLink from "../react/NoteLink";
import { useNoteContext, useNoteProperty, useStaticTooltip } from "../react/hooks";
import { joinElements } from "../react/react_utils";
import { useEditedNotes } from "../ribbon/EditedNotesTab";
import { useNoteMetadata } from "../ribbon/NoteInfoTab";
import { onWheelHorizontalScroll } from "../widget_utils";
const supportedNoteTypes = new Set<NoteType>([
"text", "code"
@ -76,9 +65,6 @@ export default function InlineTitle() {
<NoteTitleDetails />
</div>
</div>
<EditedNotes />
<NoteTypeSwitcher />
</div>
);
}
@ -123,11 +109,13 @@ function TextWithValue({ i18nKey, value, valueTooltip }: {
valueTooltip: string;
}) {
const listItemRef = useRef<HTMLLIElement>(null);
useStaticTooltip(listItemRef, {
const tooltipConfig: Partial<Tooltip.Options> = useMemo(() => ({
selector: "span.value",
title: valueTooltip,
popperConfig: { placement: "bottom" }
});
popperConfig: { placement: "bottom" },
animation: false
}), [ valueTooltip ]);
useStaticTooltip(listItemRef, tooltipConfig);
return (
<li ref={listItemRef}>
@ -142,205 +130,4 @@ function TextWithValue({ i18nKey, value, valueTooltip }: {
}
//#endregion
//#region Note type switcher
const SWITCHER_PINNED_NOTE_TYPES = new Set<NoteType>([ "text", "code", "book", "canvas" ]);
function NoteTypeSwitcher() {
const { note } = useNoteContext();
const blob = useNoteBlob(note);
const currentNoteType = useNoteProperty(note, "type");
const { pinnedNoteTypes, restNoteTypes } = useMemo(() => {
const pinnedNoteTypes: NoteTypeMapping[] = [];
const restNoteTypes: NoteTypeMapping[] = [];
for (const noteType of NOTE_TYPES) {
if (noteType.reserved || noteType.static || noteType.type === "book") continue;
if (SWITCHER_PINNED_NOTE_TYPES.has(noteType.type)) {
pinnedNoteTypes.push(noteType);
} else {
restNoteTypes.push(noteType);
}
}
return { pinnedNoteTypes, restNoteTypes };
}, []);
const currentNoteTypeData = useMemo(() => NOTE_TYPES.find(t => t.type === currentNoteType), [ currentNoteType ]);
const { builtinTemplates, collectionTemplates } = useBuiltinTemplates();
return (currentNoteType && supportedNoteTypes.has(currentNoteType) &&
<div
className="note-type-switcher"
onWheel={onWheelHorizontalScroll}
>
{note && blob?.contentLength === 0 && (
<>
<div className="intro">{t("note_title.note_type_switcher_label", { type: currentNoteTypeData?.title.toLocaleLowerCase() })}</div>
{pinnedNoteTypes.map(noteType => noteType.type !== currentNoteType && (
<Badge
key={noteType.type}
text={noteType.title}
icon={`bx ${noteType.icon}`}
onClick={() => switchNoteType(note.noteId, noteType)}
/>
))}
{collectionTemplates.length > 0 && <CollectionNoteTypes noteId={note.noteId} collectionTemplates={collectionTemplates} />}
{builtinTemplates.length > 0 && <TemplateNoteTypes noteId={note.noteId} builtinTemplates={builtinTemplates} />}
{restNoteTypes.length > 0 && <MoreNoteTypes noteId={note.noteId} restNoteTypes={restNoteTypes} />}
</>
)}
</div>
);
}
function MoreNoteTypes({ noteId, restNoteTypes }: { noteId: string, restNoteTypes: NoteTypeMapping[] }) {
return (
<BadgeWithDropdown
text={t("note_title.note_type_switcher_others")}
icon="bx bx-dots-vertical-rounded"
>
{restNoteTypes.map(noteType => (
<FormListItem
key={noteType.type}
icon={`bx ${noteType.icon}`}
onClick={() => switchNoteType(noteId, noteType)}
>{noteType.title}</FormListItem>
))}
</BadgeWithDropdown>
);
}
function CollectionNoteTypes({ noteId, collectionTemplates }: { noteId: string, collectionTemplates: FNote[] }) {
return (
<BadgeWithDropdown
text={t("note_title.note_type_switcher_collection")}
icon="bx bx-book"
>
{collectionTemplates.map(collectionTemplate => (
<FormListItem
key={collectionTemplate.noteId}
icon={collectionTemplate.getIcon()}
onClick={() => setTemplate(noteId, collectionTemplate.noteId)}
>{collectionTemplate.title}</FormListItem>
))}
</BadgeWithDropdown>
);
}
function TemplateNoteTypes({ noteId, builtinTemplates }: { noteId: string, builtinTemplates: FNote[] }) {
const [ userTemplates, setUserTemplates ] = useState<FNote[]>([]);
async function refreshTemplates() {
const templateNoteIds = await server.get<string[]>("search-templates");
const templateNotes = await froca.getNotes(templateNoteIds);
setUserTemplates(templateNotes);
}
// First load.
useEffect(() => {
refreshTemplates();
}, []);
// React to external changes.
useTriliumEvent("entitiesReloaded", ({ loadResults }) => {
if (loadResults.getAttributeRows().some(attr => attr.type === "label" && attr.name === "template")) {
refreshTemplates();
}
});
return (
<BadgeWithDropdown
text={t("note_title.note_type_switcher_templates")}
icon="bx bx-copy-alt"
>
{userTemplates.map(template => <TemplateItem key={template.noteId} noteId={noteId} template={template} />)}
{userTemplates.length > 0 && <FormDropdownDivider />}
{builtinTemplates.map(template => <TemplateItem key={template.noteId} noteId={noteId} template={template} />)}
</BadgeWithDropdown>
);
}
function TemplateItem({ noteId, template }: { noteId: string, template: FNote }) {
return (
<FormListItem
icon={template.getIcon()}
onClick={() => setTemplate(noteId, template.noteId)}
>{template.title}</FormListItem>
);
}
function switchNoteType(noteId: string, { type, mime }: NoteTypeMapping) {
return server.put(`notes/${noteId}/type`, { type, mime });
}
function setTemplate(noteId: string, templateId: string) {
return attributes.setRelation(noteId, "template", templateId);
}
function useBuiltinTemplates() {
const [ templates, setTemplates ] = useState<{
builtinTemplates: FNote[];
collectionTemplates: FNote[];
}>({
builtinTemplates: [],
collectionTemplates: []
});
async function loadBuiltinTemplates() {
const templatesRoot = await froca.getNote("_templates");
if (!templatesRoot) return;
const childNotes = await templatesRoot.getChildNotes();
const builtinTemplates: FNote[] = [];
const collectionTemplates: FNote[] = [];
for (const childNote of childNotes) {
if (!childNote.hasLabel("template")) continue;
if (childNote.hasLabel("collection")) {
collectionTemplates.push(childNote);
} else {
builtinTemplates.push(childNote);
}
}
setTemplates({ builtinTemplates, collectionTemplates });
}
useEffect(() => {
loadBuiltinTemplates();
}, []);
return templates;
}
//#endregion
//#region Edited Notes
function EditedNotes() {
const { note } = useNoteContext();
const [ dateNote ] = useNoteLabel(note, "dateNote");
const [ editedNotesOpenInRibbon ] = useTriliumOptionBool("editedNotesOpenInRibbon");
return (note && dateNote &&
<Collapsible
className="edited-notes"
title={t("note_title.edited_notes")}
initiallyExpanded={editedNotesOpenInRibbon}
>
<EditedNotesContent note={note} />
</Collapsible>
);
}
function EditedNotesContent({ note }: { note: FNote }) {
const editedNotes = useEditedNotes(note);
return (editedNotes !== undefined &&
(editedNotes.length > 0 ? editedNotes?.map(editedNote => (
<SimpleBadge
key={editedNote.noteId}
title={(
<NoteLink
notePath={editedNote.noteId}
showNoteIcon
/>
)}
/>
)) : (
<div className="no-edited-notes-found">{t("edited_notes.no_edited_notes_found")}</div>
)));
}
//#endregion

View File

@ -16,6 +16,13 @@
&.share-badge {--color: var(--badge-share-background-color);}
&.clipped-note-badge {--color: var(--badge-clipped-note-background-color);}
&.execute-badge {--color: var(--badge-execute-background-color);}
min-width: 0;
.text {
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}
}
.dropdown-badge {

View File

@ -4,8 +4,56 @@ body.experimental-feature-new-layout {
}
.title-actions {
&.visible:not(:empty) {
padding: 0.75em 15px;
--title-actions-padding-start: 12px;
--title-actions-padding-end: 8px;
display: flex;
max-width: var(--max-content-width);
flex-direction: column;
gap: 0.5em;
padding-inline: var(--title-actions-padding-start) var(--title-actions-padding-end);
body.prefers-centered-content .note-split:not(.full-content-width) & {
margin-inline: auto;
}
&:not(:empty) {
padding-block: 0.75em;
}
.edited-notes {
.collapsible-inner-body {
display: flex;
flex-wrap: wrap;
gap: 0.3em;
.badge {
margin: 0;
color: inherit;
text-transform: none;
text-decoration: none;
display: inline-block;
transition: background-color 250ms ease-in, color 250ms ease-in;
&:hover {
background-color: var(--link-hover-background);
color: var(--link-hover-color);
}
}
}
}
.promoted-attributes-widget {
.promoted-attributes-container {
margin: 0;
padding: 0;
}
}
> .collapsible,
> .note-type-switcher {
padding-inline-start: calc(24px - var(--title-actions-padding-start));
padding-inline-end: calc(24px - var(--title-actions-padding-end));
}
}
}

View File

@ -1,7 +1,7 @@
import "./NoteTitleActions.css";
import clsx from "clsx";
import { useEffect, useRef, useState } from "preact/hooks";
import { useEffect, useState } from "preact/hooks";
import NoteContext from "../../components/note_context";
import FNote from "../../entities/fnote";
@ -9,29 +9,31 @@ import { t } from "../../services/i18n";
import CollectionProperties from "../note_bars/CollectionProperties";
import { checkFullHeight, getExtendedWidgetType } from "../NoteDetail";
import { PromotedAttributesContent, usePromotedAttributeData } from "../PromotedAttributes";
import SimpleBadge from "../react/Badge";
import Collapsible, { ExternallyControlledCollapsible } from "../react/Collapsible";
import { useNoteContext, useNoteProperty, useTriliumEvent } from "../react/hooks";
import { useNoteContext, useNoteLabel, useNoteProperty, useTriliumEvent, useTriliumOptionBool } from "../react/hooks";
import NoteLink, { NewNoteLink } from "../react/NoteLink";
import { useEditedNotes } from "../ribbon/EditedNotesTab";
import SearchDefinitionTab from "../ribbon/SearchDefinitionTab";
import NoteTypeSwitcher from "./NoteTypeSwitcher";
export default function NoteTitleActions() {
const { note, ntxId, componentId, noteContext } = useNoteContext();
const isHiddenNote = note && note.noteId !== "_search" && note.noteId.startsWith("_");
const noteType = useNoteProperty(note, "type");
const items = [
note && <PromotedAttributes note={note} componentId={componentId} noteContext={noteContext} />,
note && noteType === "search" && <SearchProperties note={note} ntxId={ntxId} />,
note && !isHiddenNote && noteType === "book" && <CollectionProperties note={note} />
].filter(Boolean);
return (
<div className={clsx("title-actions", items.length > 0 && "visible")}>
{items}
<div className="title-actions">
<PromotedAttributes note={note} componentId={componentId} noteContext={noteContext} />
{noteType === "search" && <SearchProperties note={note} ntxId={ntxId} />}
{!isHiddenNote && note && noteType === "book" && <CollectionProperties note={note} />}
<EditedNotes />
<NoteTypeSwitcher />
</div>
);
}
function SearchProperties({ note, ntxId }: { note: FNote, ntxId: string | null | undefined }) {
function SearchProperties({ note, ntxId }: { note: FNote | null | undefined, ntxId: string | null | undefined }) {
return (note &&
<Collapsible
title={t("search_definition.search_parameters")}
@ -64,10 +66,43 @@ function PromotedAttributes({ note, componentId, noteContext }: {
return (note && (
<ExternallyControlledCollapsible
key={note.noteId}
title={t("promoted_attributes.promoted_attributes")}
title={t("note_title.promoted_attributes")}
expanded={expanded} setExpanded={setExpanded}
>
<PromotedAttributesContent note={note} componentId={componentId} cells={cells} setCells={setCells} />
</ExternallyControlledCollapsible>
));
}
//#region Edited Notes
function EditedNotes() {
const { note } = useNoteContext();
const [ dateNote ] = useNoteLabel(note, "dateNote");
const [ editedNotesOpenInRibbon ] = useTriliumOptionBool("editedNotesOpenInRibbon");
return (note && dateNote &&
<Collapsible
className="edited-notes"
title={t("note_title.edited_notes")}
initiallyExpanded={editedNotesOpenInRibbon}
>
<EditedNotesContent note={note} />
</Collapsible>
);
}
function EditedNotesContent({ note }: { note: FNote }) {
const editedNotes = useEditedNotes(note);
return (editedNotes !== undefined &&
(editedNotes.length > 0 ? editedNotes?.map(editedNote => (
<NewNoteLink
className="badge"
notePath={editedNote.noteId}
showNoteIcon
/>
)) : (
<div className="no-edited-notes-found">{t("edited_notes.no_edited_notes_found")}</div>
)));
}
//#endregion

View File

@ -0,0 +1,33 @@
@keyframes note-type-switcher-intro {
from {
opacity: 0;
} to {
opacity: 1;
}
}
.note-type-switcher {
--badge-radius: 12px;
position: relative;
top: 5px;
padding: .25em 0;
display: flex;
align-items: center;
overflow-x: auto;
min-width: 0;
gap: 5px;
min-height: 35px;
>* {
flex-shrink: 0;
animation: note-type-switcher-intro 200ms ease-in;
}
.ext-badge {
--color: var(--input-background-color);
color: var(--main-text-color);
font-size: 0.9rem;
flex-shrink: 0;
}
}

View File

@ -0,0 +1,182 @@
import "./NoteTypeSwitcher.css";
import { NoteType } from "@triliumnext/commons";
import { useEffect, useMemo, useState } from "preact/hooks";
import FNote from "../../entities/fnote";
import attributes from "../../services/attributes";
import froca from "../../services/froca";
import { t } from "../../services/i18n";
import { NOTE_TYPES, NoteTypeMapping } from "../../services/note_types";
import server from "../../services/server";
import { Badge, BadgeWithDropdown } from "../react/Badge";
import { FormDropdownDivider, FormListItem } from "../react/FormList";
import { useNoteContext, useNoteProperty, useNoteSavedData, useTriliumEvent } from "../react/hooks";
import { onWheelHorizontalScroll } from "../widget_utils";
const SWITCHER_PINNED_NOTE_TYPES = new Set<NoteType>([ "text", "code", "book", "canvas" ]);
const supportedNoteTypes = new Set<NoteType>([
"text", "code"
]);
export default function NoteTypeSwitcher() {
const { note } = useNoteContext();
const blob = useNoteSavedData(note?.noteId);
const currentNoteType = useNoteProperty(note, "type");
const { pinnedNoteTypes, restNoteTypes } = useMemo(() => {
const pinnedNoteTypes: NoteTypeMapping[] = [];
const restNoteTypes: NoteTypeMapping[] = [];
for (const noteType of NOTE_TYPES) {
if (noteType.reserved || noteType.static || noteType.type === "book") continue;
if (SWITCHER_PINNED_NOTE_TYPES.has(noteType.type)) {
pinnedNoteTypes.push(noteType);
} else {
restNoteTypes.push(noteType);
}
}
return { pinnedNoteTypes, restNoteTypes };
}, []);
const currentNoteTypeData = useMemo(() => NOTE_TYPES.find(t => t.type === currentNoteType), [ currentNoteType ]);
const { builtinTemplates, collectionTemplates } = useBuiltinTemplates();
return (currentNoteType && supportedNoteTypes.has(currentNoteType) &&
<div
className="note-type-switcher"
onWheel={onWheelHorizontalScroll}
>
{note && blob?.length === 0 && (
<>
<div className="intro">{t("note_title.note_type_switcher_label", { type: currentNoteTypeData?.title.toLocaleLowerCase() })}</div>
{pinnedNoteTypes.map(noteType => noteType.type !== currentNoteType && (
<Badge
key={noteType.type}
text={noteType.title}
icon={`bx ${noteType.icon}`}
onClick={() => switchNoteType(note.noteId, noteType)}
/>
))}
{collectionTemplates.length > 0 && <CollectionNoteTypes noteId={note.noteId} collectionTemplates={collectionTemplates} />}
{builtinTemplates.length > 0 && <TemplateNoteTypes noteId={note.noteId} builtinTemplates={builtinTemplates} />}
{restNoteTypes.length > 0 && <MoreNoteTypes noteId={note.noteId} restNoteTypes={restNoteTypes} />}
</>
)}
</div>
);
}
function MoreNoteTypes({ noteId, restNoteTypes }: { noteId: string, restNoteTypes: NoteTypeMapping[] }) {
return (
<BadgeWithDropdown
text={t("note_title.note_type_switcher_others")}
icon="bx bx-dots-vertical-rounded"
>
{restNoteTypes.map(noteType => (
<FormListItem
key={noteType.type}
icon={`bx ${noteType.icon}`}
onClick={() => switchNoteType(noteId, noteType)}
>{noteType.title}</FormListItem>
))}
</BadgeWithDropdown>
);
}
function CollectionNoteTypes({ noteId, collectionTemplates }: { noteId: string, collectionTemplates: FNote[] }) {
return (
<BadgeWithDropdown
text={t("note_title.note_type_switcher_collection")}
icon="bx bx-book"
>
{collectionTemplates.map(collectionTemplate => (
<FormListItem
key={collectionTemplate.noteId}
icon={collectionTemplate.getIcon()}
onClick={() => setTemplate(noteId, collectionTemplate.noteId)}
>{collectionTemplate.title}</FormListItem>
))}
</BadgeWithDropdown>
);
}
function TemplateNoteTypes({ noteId, builtinTemplates }: { noteId: string, builtinTemplates: FNote[] }) {
const [ userTemplates, setUserTemplates ] = useState<FNote[]>([]);
async function refreshTemplates() {
const templateNoteIds = await server.get<string[]>("search-templates");
const templateNotes = await froca.getNotes(templateNoteIds);
setUserTemplates(templateNotes);
}
// First load.
useEffect(() => {
refreshTemplates();
}, []);
// React to external changes.
useTriliumEvent("entitiesReloaded", ({ loadResults }) => {
if (loadResults.getAttributeRows().some(attr => attr.type === "label" && attr.name === "template")) {
refreshTemplates();
}
});
return (
<BadgeWithDropdown
text={t("note_title.note_type_switcher_templates")}
icon="bx bx-copy-alt"
>
{userTemplates.map(template => <TemplateItem key={template.noteId} noteId={noteId} template={template} />)}
{userTemplates.length > 0 && <FormDropdownDivider />}
{builtinTemplates.map(template => <TemplateItem key={template.noteId} noteId={noteId} template={template} />)}
</BadgeWithDropdown>
);
}
function TemplateItem({ noteId, template }: { noteId: string, template: FNote }) {
return (
<FormListItem
icon={template.getIcon()}
onClick={() => setTemplate(noteId, template.noteId)}
>{template.title}</FormListItem>
);
}
function switchNoteType(noteId: string, { type, mime }: NoteTypeMapping) {
return server.put(`notes/${noteId}/type`, { type, mime });
}
function setTemplate(noteId: string, templateId: string) {
return attributes.setRelation(noteId, "template", templateId);
}
function useBuiltinTemplates() {
const [ templates, setTemplates ] = useState<{
builtinTemplates: FNote[];
collectionTemplates: FNote[];
}>({
builtinTemplates: [],
collectionTemplates: []
});
async function loadBuiltinTemplates() {
const templatesRoot = await froca.getNote("_templates");
if (!templatesRoot) return;
const childNotes = await templatesRoot.getChildNotes();
const builtinTemplates: FNote[] = [];
const collectionTemplates: FNote[] = [];
for (const childNote of childNotes) {
if (!childNote.hasLabel("template")) continue;
if (childNote.hasLabel("collection")) {
collectionTemplates.push(childNote);
} else {
builtinTemplates.push(childNote);
}
}
setTemplates({ builtinTemplates, collectionTemplates });
}
useEffect(() => {
loadBuiltinTemplates();
}, []);
return templates;
}

View File

@ -1,6 +1,6 @@
.component.status-bar {
contain: none;
border-top: 1px solid var(--main-border-color);
border-top: 1px solid var(--status-bar-border-color);
> .status-bar-main-row {
min-height: 28px;
@ -9,7 +9,7 @@
background-color: var(--left-pane-background-color);
padding-inline: 0.25em;
font-size: 0.85em;
> .breadcrumb {
flex-grow: 1;
--icon-button-size: 23px;
@ -104,7 +104,7 @@
/* Note path card */
li {
--border-radius: 6px;
position: relative;
background: var(--card-background-color);
padding: 8px 20px 8px 25px;
@ -120,7 +120,7 @@
& + li {
margin-top: 2px;
}
/* Current path arrow */
&.path-current::before {
position: absolute;
@ -180,7 +180,7 @@
&:last-child {
border-radius: 0 0 var(--border-radius) var(--border-radius);
}
/* Card header */
& > span:first-child {
display: block;
@ -202,7 +202,7 @@
}
/* Note icon */
> .bx {
> .tn-icon {
color: var(--menu-item-icon-color);
}
@ -298,6 +298,11 @@
margin: 0 !important;
padding: 0;
body.layout-horizontal.background-effects & {
/* Do not apply Mica over the bottom panel in the horizontal layout */
background: var(--right-pane-background-color);
}
.bottom-panel-title-bar {
display: flex;
padding: 6px 12px;
@ -319,6 +324,7 @@
padding: 8px 12px;
max-height: 40vh;
overflow-y: auto;
animation: fade-in 200ms ease-in;
}
}

Some files were not shown because too many files have changed in this diff Show More