diff --git a/content/_types/doc-page.md b/content/_types/doc-page.md index 75ace5c..abed6b2 100644 --- a/content/_types/doc-page.md +++ b/content/_types/doc-page.md @@ -20,7 +20,7 @@ schema: type: string minLength: 1 section: - enum: [sdk, mcp, editor, reader, writer] + enum: [sdk, mcp, editor, reader, writer, guides] collection: display: name_field: title @@ -36,13 +36,14 @@ address, so `apps/reader/index.md` is `/apps/reader/`. `section` is the documentation set the page belongs to, which picks its sidebar. -The body is ordinary Markdown with four additions the site understands: +The body is ordinary Markdown with the additions the site understands: - A heading can keep a fixed anchor: `## Saved views {#views}`. - A code block can name its file: ` ```ts title="src/mdbase.ts" `. With `file="examples/worklog/src/mdbase.ts"` it shows that file from the site's repository instead of its own contents; `pick="scripts"` keeps one key of a JSON file. +- A standalone screenshot pointing to a registered light capture in `/images/apps/` uses the same themed frame and phone crop as the app pages. - An image whose address is a recording in `/videos/` is shown as that recording, with its captions and text description. - A heading marked `{.cards}` shows the list under it as cards, two to a row. diff --git a/content/apps/editor/index.md b/content/apps/editor/index.md index 1af9602..b3d9de9 100644 --- a/content/apps/editor/index.md +++ b/content/apps/editor/index.md @@ -40,3 +40,5 @@ Open the collection switcher from the rail. It lists collections you opened befo ## The Connect workspace {#connect} [editor.mdbase.dev/connect](https://editor.mdbase.dev/connect) is where you manage your mdbase Connect account: collections, storage and sync, sharing, connected applications, devices, sign-in methods and browser sessions. It uses your account session, not a collection grant, so it can list your collections but cannot read their contents. + +For the folder setup and a worked edit, see [Edit an Obsidian vault in your browser](/guides/obsidian-browser/). diff --git a/content/apps/mcp/collections.md b/content/apps/mcp/collections.md index a705fe9..bcacb1b 100644 --- a/content/apps/mcp/collections.md +++ b/content/apps/mcp/collections.md @@ -51,3 +51,5 @@ Your approval travels with the collection, so every copy checks it before it ans For a **Cloud copy** collection, requests go to the readable copy mdbase keeps, so tools work while your devices are off. For a **Private** collection, requests travel from the MCP server through the mdbase relay to one of your devices. They are encrypted end to end between the MCP server and that device, and the relay cannot read them. One of your devices must be online. If none is, tools return `connector_offline`. A new approval for a Private collection takes effect once one of your signed-in devices has recorded it. See [Troubleshooting](/apps/mcp/troubleshooting/). + +For a read-only setup in ChatGPT, see [Connect ChatGPT to your Markdown notes](/guides/chatgpt-markdown/). diff --git a/content/apps/mcp/index.md b/content/apps/mcp/index.md index 6daf7f7..bb463d0 100644 --- a/content/apps/mcp/index.md +++ b/content/apps/mcp/index.md @@ -59,3 +59,5 @@ The client should call `list_connections` and then `describe_collection`. `list_ - [Working with records](/apps/mcp/working-with-records/) covers queries, edits and safe retries. - [Tool reference](/apps/mcp/tools/) lists every tool and its inputs. - [Data handling](/apps/mcp/data-handling/) describes what the MCP server stores and what it can see. +- [Connect Claude to your Obsidian vault](/guides/claude-obsidian/) walks through read-only access and checks the result against a note on disk. +- [Compare local and hosted MCP servers for an Obsidian vault](/guides/obsidian-mcp-servers/) to choose where requests run. diff --git a/content/apps/reader/import.md b/content/apps/reader/import.md index e30a2b9..6bdcfb4 100644 --- a/content/apps/reader/import.md +++ b/content/apps/reader/import.md @@ -25,6 +25,8 @@ The experimental exporter includes all of **My Library**, not a selected collect Reader checks every payload file against its checksum before collection writes. Selecting a folder needs a supporting browser such as Chrome. Export bundles contain private notes and attachment content; keep them private. +See the [Zotero annotations guide](/guides/zotero-annotations/) for a complete example with a PDF highlight. + ## From Readwise Reader {#readwise} Readwise imports bring Reader documents and files, plus highlights from classic Readwise sources such as Kindle, Apple Books and Instapaper. Classic sources import as metadata and highlights, without the book text. @@ -46,3 +48,5 @@ Imported files are stored under `files/reader/imports`. When the import finishes Choose **Stop safely** to pause an active import. Everything already written is kept, and **Resume import** continues the confirmed job. The job stays bound to its destination; switching collections cannot redirect it. After reloading, reselect the same export folder or reconnect Readwise, choose the same collection and scan again. Check the destination before resuming. Records already imported are kept; review the completion warnings for missing or unavailable content. + +For a worked example with a book, a highlight and the resulting file, see [Export Readwise highlights to Markdown](/guides/readwise-markdown/). diff --git a/content/apps/writer/citations.md b/content/apps/writer/citations.md index 3893e91..5734ac3 100644 --- a/content/apps/writer/citations.md +++ b/content/apps/writer/citations.md @@ -43,3 +43,5 @@ Preview and Word export use the same citation metadata and style, with separate ## Missing or unknown sources {#missing} An unknown citekey appears in Problems and may offer a similar known key. Check its spelling, the selected collection and the source's citation data. Editing a source citekey can leave older manuscript citations unresolved; update those references as well. + +[Write a thesis in Markdown with citations](/guides/markdown-thesis/) follows one source from the library into a downloadable manuscript and bibliography. diff --git a/content/guides/chatgpt-markdown.md b/content/guides/chatgpt-markdown.md new file mode 100644 index 0000000..d5698df --- /dev/null +++ b/content/guides/chatgpt-markdown.md @@ -0,0 +1,60 @@ +--- +title: Connect ChatGPT to your Markdown notes +description: Add mdbase as a custom MCP server in ChatGPT, approve one collection and ask for the paths and contents of matching Markdown notes. +section: guides +--- + +You need a ChatGPT workspace that allows custom MCP servers, an mdbase account and a synced collection. An Obsidian vault can be that collection. Choose a folder whose entire contents you’re comfortable making available to ChatGPT. + +## 1. Sync the folder that holds your notes + +Use one sync service for a given folder. If you already sync this vault, decide which service will own that job before you turn on mdbase sync. The [mdbase plugin for Obsidian](https://github.com/mdbase-dev/mdbase-obsidian#sync) can sync the vault in place of the desktop app. + +In the [mdbase Connect desktop app](/downloads/), open **Collections → Add existing** and select the folder. In the folder’s actions menu, choose **Turn on sync**. If the folder already syncs with mdbase, use that collection. Write down its name. You’ll select it again during approval. + +**Cloud copy** makes a readable copy available while your computer is off. For **Private**, select end-to-end encryption under **Advanced**. A computer serving the Private collection must be online when ChatGPT requests a note. + +![The desktop app explains the availability of the Field research collection when end-to-end encryption is selected.](/images/apps/vault-sync-light.webp) + +## 2. Add the remote MCP server + +In ChatGPT, open **Plugins**. Choose the plus button and **Add custom MCP server**. Give the plugin the name `mdbase` and a description such as “Read my field notes.” Under **Connection**, select the public endpoint option and enter: + +```text title="MCP server URL" +https://mcp.mdbase.dev/mcp +``` + +Choose OAuth authentication. Review the warning, select **I understand and want to continue**, then **Create as a plugin**. Check the discovered tools for `list_connections`, `query_records` and `read_record`. Install the resulting plugin. If the custom-server option is missing, check your workspace’s policy with its owner. [OpenAI’s connection instructions](https://developers.openai.com/plugins/deploy/connect-chatgpt#add-the-mcp-server) + +## 3. Choose the collection and permissions + +When ChatGPT asks you to connect, sign in to mdbase. Check the collection name. The approval screen identifies the service as **mdbase** at `https://mcp.mdbase.dev`. For searches and quotations, keep read access and clear the optional create, edit, delete and definition permissions. Choose **Allow access**. + +![The mdbase approval screen shows the required read permission and the optional write permissions cleared.](/images/apps/mcp-permissions-light.webp) + +![Review and approve one collection in Connect.](/videos/mcp-read.mp4) + +## 4. Find a note by its properties + +Save the following file in your synced folder. In an Obsidian vault, `status` is a property of the note. Its value gives ChatGPT a field it can search even when the file name contains no mention of the count. + +```markdown title="surveys/east-bank.md" +--- +title: East bank survey +status: awaiting-count +--- + +Return at low tide to count the nesting pairs. +``` + +In a new ChatGPT conversation, type `@` and select **mdbase**. Replace “Field research” with your collection name: + +> In Field research, find notes where the status is awaiting-count. Give me their relative paths. Read surveys/east-bank.md and quote its field instruction. + +Check for `surveys/east-bank.md` and the instruction about low tide. You can open the same file on disk and compare the text. + +![The local Markdown file, read with the mdbase CLI, contains the same status and field instruction.](/images/apps/survey-note-light.webp) + +## Access after the chat + +Closing the chat leaves the collection approval in place. [Revoke the application grant in Connect](/apps/mcp/collections/#revoke) to stop further reads. A Private collection protects the synced copy. The MCP gateway and ChatGPT still receive the content you ask them to read. See [MCP data handling](/apps/mcp/data-handling/) or [connect Claude to the same vault](/guides/claude-obsidian/). diff --git a/content/guides/claude-obsidian.md b/content/guides/claude-obsidian.md new file mode 100644 index 0000000..d72dafd --- /dev/null +++ b/content/guides/claude-obsidian.md @@ -0,0 +1,69 @@ +--- +title: Connect Claude to your Obsidian vault +description: Sync your vault folder with mdbase Connect, then give Claude read access through MCP. Try it with one note whose answer you can check. +section: guides +--- + +You need an [Obsidian vault folder](https://obsidian.md/help/vault), the [mdbase Connect desktop app](/downloads/), an mdbase account and access to connectors in Claude. If only a few notes should be visible to Claude, put them in a separate vault. Approval covers the whole collection. + +## 1. Connect the vault folder + +Use one sync service for a given folder. If you already sync this vault, decide which service will own that job before you turn on mdbase sync. The [mdbase plugin for Obsidian](https://github.com/mdbase-dev/mdbase-obsidian#sync) can sync the vault in place of the desktop app. + +Sign in to the desktop app. Under **Collections**, choose **Add existing** and select the folder that contains your notes. Open the actions menu beside that folder and choose **Turn on sync**. If the vault already syncs with mdbase, use its existing collection. + +The default, **Cloud copy**, keeps a copy readable by mdbase. Claude can use it while your computer is off. For **Private**, open **Advanced** and select **Encrypt end to end so mdbase cannot read it**. Keep a computer with Connect and that collection online when you use Claude. Confirm with **Turn on sync**. + +![The desktop app with the encryption option selected for the Field research folder. The dialog explains when agents can reach it.](/images/apps/vault-sync-light.webp) + +## 2. Add mdbase in Claude + +In Claude on the web, open **Customize → Connectors**. On a personal account, choose **+ Add → Add custom connector**, enter `mdbase` as the name and paste this server URL. + +```text title="Remote MCP server URL" +https://mcp.mdbase.dev/mcp +``` + +Choose **Continue**. Review the detected authentication settings and continue. Choose **Sign in now** and **Register automatically** for the OAuth client. Choose **Add**. If Claude shows **Connect** beside mdbase, select it to start sign-in. A managed workspace may need an owner to add the connector first. [Claude’s connector instructions](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp) + +## 3. Approve read access + +In the mdbase sign-in window, choose the collection that matches your vault folder. On the review screen, check the app address and collection name. Keep the required read permission. Clear the optional permissions for creating, editing and deleting records and files, and for managing definitions. Choose **Allow access**. + +![Connect lists the required read permission and optional write permissions for the mdbase MCP connector.](/images/apps/mcp-permissions-light.webp) + +![Review the collection permissions and approve read access.](/videos/mcp-read.mp4) + +## 4. Read a note you can check + +Save this file as `surveys/east-bank.md` in your vault. The lines between the two sets of dashes are its properties. The sentence below them is its body. + +```markdown title="surveys/east-bank.md" +--- +title: East bank survey +status: awaiting-count +--- + +Return at low tide to count the nesting pairs. +``` + +Once the folder has synced, open a chat. In **+ → Connectors**, enable mdbase. Ask: + +> List my connected collections. In Field research, read surveys/east-bank.md. Give me the status and quote the field instruction. + +Substitute your collection name. Claude can use `list_connections` to find it and `read_record` to read the file. Check for **awaiting-count** and the sentence about low tide. A read leaves the file as you wrote it. + +![The mdbase CLI reads the saved survey note, including its status and field instruction.](/images/apps/survey-note-light.webp) + +## What Claude can see + + +Claude + +mdbase MCP +Vault collection + + +Private encrypts the synced collection. When you ask Claude to read a note, the gateway processes the result and sends it to Claude. The read permission also covers other records in that collection. To stop access, revoke the grant in [Connect’s Applications screen](/apps/mcp/collections/#revoke). + +See [MCP data handling](/apps/mcp/data-handling/) for what leaves your device, or [connection errors](/apps/mcp/troubleshooting/) if the collection is offline. diff --git a/content/guides/index.md b/content/guides/index.md new file mode 100644 index 0000000..27b1a74 --- /dev/null +++ b/content/guides/index.md @@ -0,0 +1,61 @@ +--- +title: Markdown guides +description: Follow a task from the first setting to the Markdown file on your computer. +section: guides +--- + +## Work with your notes {.cards} + +- **Connect Claude to your Obsidian vault** + + Give Claude read access to a vault and check its answer against a note on disk. + + [Connect Claude to a vault](/guides/claude-obsidian/) + +- **Export Readwise highlights to Markdown** + + Import saved highlights and find the quotation, comment and source link on disk. + + [Import Readwise highlights](/guides/readwise-markdown/) + +- **Edit an Obsidian vault in your browser** + + Edit the body and properties of a note, then check the file in your vault. + + [Open a vault in Editor](/guides/obsidian-browser/) + +- **Connect ChatGPT to your Markdown notes** + + Ask for notes that match a property and check the quoted text against the file. + + [Connect ChatGPT](/guides/chatgpt-markdown/) + +- **Save Zotero annotations as Markdown notes** + + Bring a marked-up passage, your comment and the original attachment into the same collection. + + [Import Zotero annotations](/guides/zotero-annotations/) + +- **Obsidian MCP servers compared** + + Choose where the server reads your notes and see which computer must stay online. + + [Compare local and hosted MCP](/guides/obsidian-mcp-servers/) + +- **Write a thesis in Markdown with citations** + + Insert a source from Reader, check the bibliography and download the manuscript with its references. + + [Write and cite a thesis](/guides/markdown-thesis/) + +- **Query YAML frontmatter from the command line** + + Filter a folder of Markdown notes by status and read a matching file. + + [Run a frontmatter query](/guides/query-frontmatter/) + +- **Build a personal web app without a backend** + + Run a work log, save a browser record and check where its data lives. + + [Build a browser work log](/guides/local-first-web-app/) diff --git a/content/guides/local-first-web-app.md b/content/guides/local-first-web-app.md new file mode 100644 index 0000000..0230101 --- /dev/null +++ b/content/guides/local-first-web-app.md @@ -0,0 +1,57 @@ +--- +title: Build a personal web app without a backend +description: Run a local-first work log with React and the mdbase SDK. Save entries in your browser, check they survive a reload and see how one maps to Markdown. +section: guides +--- + +You can build a personal work log as a static web app. The mdbase SDK stores entries in the browser before sign-in. If you later want the same records in a folder or on another device, Connect can sync them to a collection. + +## 1. Run the working example + +You need Git, npm, Node.js 24 or later and a browser. Clone the example and install its locked dependencies. + +```sh title="Terminal" +git clone --depth 1 https://github.com/mdbase-dev/mdbase.dev.git +cd mdbase.dev/examples/worklog +npm ci +npm run dev +``` + +Open `http://localhost:5173` in your browser. Keep the hostname and port as written. The development script puts that exact address in the app’s manifest. + +![A terminal reports the installed SDK version and generates the development manifest for localhost on port 5173.](/images/apps/worklog-setup-light.webp) + +## 2. Save an entry and reload + +Set a date, enter a summary such as “Counted shorebirds at low tide,” and enter `45` for minutes. Choose **Add**. The dated summary appears below the form. The list shows the summary and date. The record also holds the minutes. + +![Worklog’s form contains a date, the shorebird count summary and 45 minutes.](/images/apps/worklog-form-light.webp) + +Reload the page at the same address. Your entry is still there, with **Saved only in this browser** above it. Clearing site data removes that local copy. A different browser profile starts with its own storage. + +![The same entry appears below Worklog’s empty form after reloading, with the browser-only storage notice above.](/images/apps/worklog-reload-light.webp) + +![Add an entry in Worklog and find it again after reloading.](/videos/worklog-save.mp4) + +## 3. Trace the form to a Markdown record + +Open `src/Worklog.tsx`. The form calls `db.create()` with three things: the type `worklog-entry`, a file path and the frontmatter fields. The path includes the date and eight characters from a random UUID, so two entries on one day get different filenames. A live query for that type updates the list. + +The generated path in this run was `worklog/2026-11-24-c8633a7f.md`. Here is the same record written to a collection folder. The browser-only app keeps the record in site storage. You won’t find a new file in the project folder when you press **Add**. + +```markdown title="worklog/2026-11-24-c8633a7f.md" +--- +date: "2026-11-24" +minutes: 45 +summary: Counted shorebirds at low tide +type: worklog-entry +--- +``` + +To adapt the form, change its inputs and the frontmatter passed to `db.create()` together. Update `mdbase/types/worklog-entry.md` if you add a field that needs validation. Run `npm run check` to regenerate the manifest and typecheck the app. [The complete example and its source files](/sdk/connect-quickstart/) + +## 4. Choose where your entries live + +For one browser, you can keep using the app without an account. For collection storage, use **Connect to sync your work**. Sign in, choose a collection and review the proposed type setup and transfer of existing entries. A collection synced to a computer gives you the Markdown files there. [How browser records move into a collection](/sdk/unsynced/#transfer) + +To build static files, run `WORKLOG_ORIGIN=https://worklog.example.com npm run build`, substituting your own HTTPS origin. Vite writes the site to `dist/`. Choose an app ID under your own domain before publishing. The published origin has separate browser storage, so opening it won’t bring across entries saved under localhost. [Manifest and origin requirements](/sdk/local-development/) diff --git a/content/guides/markdown-thesis.md b/content/guides/markdown-thesis.md new file mode 100644 index 0000000..99b886f --- /dev/null +++ b/content/guides/markdown-thesis.md @@ -0,0 +1,55 @@ +--- +title: Write a thesis in Markdown with citations +description: Use mdbase Writer to cite sources from Reader, typeset a thesis and download editable Markdown with its bibliography and citation style. +section: guides +--- + +Write your chapters in Markdown and cite each source by its key, such as `[@darwinStructure42]`. Writer looks up the source in your Reader library and formats both the citation and its bibliography entry. + +To follow the example, open the [Writer demo](https://lab.mdbase-writer.pages.dev/?demo). It includes the cited book and resets when you reload. For your own thesis, open [Writer](https://writer.mdbase.dev), connect the collection that holds your Reader sources and check that each source has a [unique citekey and citation metadata](/apps/reader/notes/#citation). + +## 1. Create a thesis manuscript + +Choose **New manuscript**, enter a title and set **Layout** to **Thesis or book**. Select the citation style required by your department. This example uses **Chicago (author-date)**. Leave the worked example unchecked and choose **Create manuscript**. + +![Writer’s new manuscript form names the thesis Reading the reef and selects the thesis layout and Chicago author-date style.](/images/apps/thesis-layout-light.webp) + +## 2. Insert a source at the claim it supports + +Type `# Field evidence` on a line of its own. Leave a blank line, then write “Darwin traces the formation of atolls” followed by a space. With the cursor there, open **Sources** with **Ctrl+Shift+E** (**⌘+Shift+E** on Mac). Search for `darwinStructure42` in the demo, or for the title or key of your own source. + +![Writer finds Darwin’s 1842 study of coral reefs in the source panel beside the draft.](/images/apps/thesis-source-light.webp) + +Press **Enter** to cite the first match. Type the final period. The Markdown now ends with `[@darwinStructure42].` and the preview reads “(Darwin 1842).” Look for the full book entry under **Bibliography**. To cite a particular page, include its locator inside the brackets, as in `[@darwinStructure42, p. 12]`. Check the page against the edition you used. + +![Insert the citation and inspect the typeset result before exporting.](/videos/thesis-cite.mp4) + +## 3. Export a copy with its references + +In the menu beside **Export**, choose **Pandoc bundle (zip)**. Unzip the download. Keep `references.json` and `style.csl` beside `manuscript.md`. The first file contains the cited book’s metadata. The second tells a citation processor how to display it. + +![Writer’s export menu offers PDF, Word and a Pandoc bundle while the cited thesis is open.](/images/apps/thesis-export-light.webp) + +Here is the complete `manuscript.md` from the example download. Its frontmatter names the two companion files. In the collection, Writer keeps layout and citation-style choices in the [manuscript record](/apps/writer/data/#records). + +```markdown title="manuscript.md" +--- +title: Reading the reef +lang: en-US +number-sections: true +bibliography: references.json +csl: style.csl +link-citations: true +reference-section-title: Bibliography +--- + +# Field evidence + +Darwin traces the formation of atolls [@darwinStructure42]. +``` + +## Add chapters and prepare the submission + +For a longer thesis, put each chapter in its own record and add its embed, such as `![[chapters/results]]`, on a separate line in the main manuscript. Writer assembles the chapters in order before resolving citations. See [chapters and embeds](/apps/writer/chapters/) for the steps and a recording. + +Use PDF when you need the typeset layout. Word uses separate document styles and can paginate differently. In the file you plan to submit, inspect the references, captions and page breaks, and compare them with your department’s requirements. [Layouts and export formats](/apps/writer/export/) diff --git a/content/guides/obsidian-browser.md b/content/guides/obsidian-browser.md new file mode 100644 index 0000000..79ae10c --- /dev/null +++ b/content/guides/obsidian-browser.md @@ -0,0 +1,61 @@ +--- +title: Edit an Obsidian vault in your browser +description: Open your vault folder as an mdbase collection. Use mdbase Editor to edit the Markdown body and YAML properties, then open the same file in Obsidian. +section: guides +--- + +Use the [Connect desktop app](/downloads/) on the computer that holds your vault, and [mdbase Editor](https://editor.mdbase.dev/) in the browser. You need an mdbase account and the path to your vault. Obsidian describes a vault as [a folder on your computer](https://obsidian.md/help/vault). + +## 1. Make the vault available + +Use one sync service for a given folder. If you already sync this vault, decide which service will own that job before you turn on mdbase sync. The [mdbase plugin for Obsidian](https://github.com/mdbase-dev/mdbase-obsidian#sync) can sync the vault in place of the desktop app. + +In the desktop app, sign in and open **Collections → Add existing**. Select the vault folder. Open its actions menu and choose **Turn on sync**. If your vault already syncs with mdbase, use that collection. + +Choose **Cloud copy** (the default) if you need access while your computers are off. mdbase can read this copy. For **Private**, open **Advanced**, select end-to-end encryption and confirm. To use Editor with a Private collection, keep a computer that serves it online. + +![The sync dialog for Field research shows the end-to-end encryption option under Advanced.](/images/apps/vault-sync-light.webp) + +## 2. Open the collection in Editor + +Open [mdbase Editor](https://editor.mdbase.dev/) and choose **Choose a collection** in the collections sidebar. Sign in and select your vault. If another collection is already open, choose **Connect another collection**. Review the name and the requested permissions. Allow reading and editing. To create the example below, also allow creating records. + +Check that the collection name in the rail matches the vault. **Saved only in this browser** indicates a local workspace. Connect the vault before you expect changes to appear on your computer. + +![Editor’s collections sidebar shows Choose a collection above All notes and the local-only status at the bottom.](/images/apps/editor-chooser-light.webp) + +## 3. Write a note and edit it + +Select an existing note, or choose **New note**. For a new note, use **East bank survey** as the title and write the field instruction below. Check the suggested path and press **Ctrl Enter** (**⌘ Enter** on Mac) to create it. + +![A new East bank survey draft in Editor, with a title and a field instruction before creation.](/images/apps/editor-draft-light.webp) + +After the survey, open the note again. Add a second paragraph with your count. Editor saves edits to an existing note automatically. The screenshots use a browser-local sample so you can see the edit without granting access to a vault. + +![Editor shows the saved survey with the instruction and a second paragraph recording six nesting pairs.](/images/apps/editor-survey-light.webp) + +## 4. Check the Markdown and properties + +Open **Note properties**. On a narrow screen, look under **More note actions**. In the properties panel, open **Property options → Edit as source**. Add the three frontmatter lines at the top of the note, then leave the field to save. + +![The source view in Note properties shows the status property and both survey paragraphs.](/images/apps/editor-source-light.webp) + +![Inspect the survey note’s Markdown in the browser.](/videos/editor-note.mp4) + +With a connected collection, wait for the desktop app to finish syncing. Open the same note in Obsidian. This is the file to check: + +```markdown title="East bank survey.md" +--- +status: counted +--- +# East bank survey + +Return at low tide to count the nesting pairs. + + +Counted six pairs on the east bank. +``` + +![Obsidian opens the East bank survey file with the counted status in Properties and both paragraphs in the note.](/images/apps/obsidian-survey-light.webp) + +The browser runs mdbase Editor with its own commands and views. Your Obsidian plugins and workspace layout live in Obsidian. If both apps edit the same note, review Editor’s **This note changed elsewhere** prompt before choosing which version to keep. See [editing and conflicts](/apps/editor/notes/#conflicts) or [give Claude read access to the vault](/guides/claude-obsidian/). diff --git a/content/guides/obsidian-mcp-servers.md b/content/guides/obsidian-mcp-servers.md new file mode 100644 index 0000000..6a64bd5 --- /dev/null +++ b/content/guides/obsidian-mcp-servers.md @@ -0,0 +1,77 @@ +--- +title: Obsidian MCP servers compared +description: Run a filesystem MCP server beside your Obsidian vault, or grant a hosted connector access to a synced collection. Compare permissions and offline access. +section: guides +--- + +Choose a local server if you want a desktop client to work directly with one folder. Choose the hosted mdbase connector if you want to reach the collection from a web client such as Claude or ChatGPT. + +| | Local filesystem server | Hosted mdbase connector | +| --- | --- | --- | +| What you connect | A folder path on the computer running the client | One synced collection per approval | +| What the client can do | The reference server offers file reads and writes inside its allowed directories | Read records and query their properties. You can decline optional write permissions | +| What must be online | The computer with the vault and desktop client | With Cloud copy, the connector can read while your computer is off. With Private, a computer serving the collection must be online | + +## 1. Make a test vault + +Start with a folder containing just this file. Open the folder as a vault in Obsidian. Keep the copy small enough to check exactly which files you’re offering to the client. [How Obsidian stores notes](https://obsidian.md/help/vault) + +```markdown title="surveys/east-bank.md" +--- +title: East bank survey +status: awaiting-count +--- + +Return at low tide to count the nesting pairs. +``` + +## 2. Connect your preferred server + +### Local folder in Claude Desktop + +You need Claude Desktop, Node.js with `npx`, and the absolute path to the test vault. In Claude Desktop’s application menu, open **Settings → Developer → Edit Config**. Add the following entry to the configuration. Keep any servers you already use under `mcpServers`. Replace the example path with your vault’s location. On Windows, escape each backslash in the JSON string. + +```json title="claude_desktop_config.json" +{ + "mcpServers": { + "vault": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-filesystem", "/absolute/path/to/Field research"] + } + } +} +``` + +Save and fully restart Claude Desktop. It starts the server as a local process and talks to it over standard input and output. The filesystem server offers editing tools too. Review the tool name and file path before approving a request. [Official local MCP setup](https://modelcontextprotocol.io/docs/develop/connect-local-servers) + +### Hosted collection in a web client + +Use one sync service for a given folder. If you already sync this vault, decide which service will own that job before you turn on mdbase sync. The [mdbase plugin for Obsidian](https://github.com/mdbase-dev/mdbase-obsidian#sync) can sync the vault in place of the desktop app. + +You need an mdbase account and the [Connect desktop app](/downloads/). Add the folder under **Collections → Add existing**, then **Turn on sync** in its actions menu. Choose **Cloud copy** for access while this computer is off, or **Private** for an encrypted copy. Follow the setup for [Claude](/guides/claude-obsidian/) or [ChatGPT](/guides/chatgpt-markdown/) using `https://mcp.mdbase.dev/mcp`. + +On the mdbase approval screen, select the test collection. Keep read access and clear the optional permissions. + +![Connect lists the required read permission and the optional write permissions for the selected collection.](/images/apps/mcp-permissions-light.webp) + +![Select read access before approving the hosted connector.](/videos/mcp-read.mp4) + +## 3. Check which file the client reads + + +Desktop client +Local process +Vault folder +Web client +MCP gateway +Collection + + + +For the local server, ask the client to list its allowed directories, then read `surveys/east-bank.md` under the returned path. The terminal capture shows the responses from those two MCP calls against the example folder. + +![The local filesystem server reports its allowed directory and returns the survey note with its YAML and instruction.](/images/apps/local-mcp-light.webp) + +For the hosted server, ask the client to list its connected collections, choose the test collection and read the same relative path. Both routes should return the instruction about low tide. The hosted route also lets you ask for records where `status` equals `awaiting-count` without first supplying a path. [Working with records](/apps/mcp/working-with-records/) + +A local server reads files on your machine. When you use a hosted AI model, the client can still send the retrieved text to the model. For the hosted connector, the gateway processes the text as well. [What the mdbase gateway can see](/apps/mcp/data-handling/) diff --git a/content/guides/query-frontmatter.md b/content/guides/query-frontmatter.md new file mode 100644 index 0000000..1011c0c --- /dev/null +++ b/content/guides/query-frontmatter.md @@ -0,0 +1,58 @@ +--- +title: Query YAML frontmatter from the command line +description: Use the mdbase CLI to filter Markdown files by a YAML property. Return paths, inspect a matching note or get structured JSON for a script. +section: guides +--- + +Run `mdbase query --where 'status == "awaiting-count"'` in a collection folder. It reads the YAML properties in your Markdown files and prints one matching path per line. You can do this locally without signing in. + +## 1. Prepare two notes with different statuses + +Download the [mdbase command-line tool](/downloads/#command-line) for your platform and put the executable on your path. In a new folder, save this configuration as `mdbase.yaml`. The examples below use a Bash-compatible shell. + +```yaml title="mdbase.yaml" +spec_version: "0.3.0" +name: Field research +``` + +Create a subfolder named `surveys`. Save this first note there as `east-bank.md`. The dashes delimit the YAML, and the blank line separates it from the field instruction. + +```markdown title="surveys/east-bank.md" +--- +title: East bank survey +status: awaiting-count +--- + +Return at low tide to count the nesting pairs. +``` + +Save a second note as `surveys/west-bank.md` with the title `West bank survey`, status `counted` and body `Counted three nesting pairs at high tide.` Open a terminal in the folder containing `mdbase.yaml`. Run `mdbase --version` and `ls surveys` to check your setup. + +![The terminal shows mdbase 0.1.43, both survey filenames and the collection configuration.](/images/apps/query-folder-light.webp) + +## 2. Filter by a property + +```bash title="Run each query from the collection folder" +mdbase query --where 'status == "awaiting-count"' +mdbase query --where 'status == "counted"' +``` + +The first command prints `surveys/east-bank.md`. The second prints `surveys/west-bank.md`. The outer single quotes keep the shell from changing the expression. Inside the expression, double quotes mark a string value. A value that matches neither record produces no paths. + +![Changing the status filter from awaiting-count to counted returns the other survey path.](/images/apps/query-status-light.webp) + +![Run two status filters against the same collection.](/videos/query-notes.mp4) + +## 3. Read a result or pass it to a script + +Run `mdbase read surveys/east-bank.md` to print the complete file. Querying a property looks at frontmatter. A word in the body, such as “tide,” does not become a value of `status`. + +![The read command prints the east bank record with its two YAML fields and its field instruction.](/images/apps/query-read-light.webp) + +For machine-readable output, add `--json`. The result has a `records` array. Each entry includes its relative path and a `frontmatter` object. Add `--include-body` when you also need the prose. + +```bash title="Return the matching record as JSON" +mdbase query --where 'status == "counted"' --json --include-body +``` + +From another working directory, put `--root "/path/to/Field research"` after `query`. To use the same fields in an application or AI client, see [SDK queries](/sdk/operations/) and [querying records through MCP](/apps/mcp/working-with-records/). diff --git a/content/guides/readwise-markdown.md b/content/guides/readwise-markdown.md new file mode 100644 index 0000000..600b37d --- /dev/null +++ b/content/guides/readwise-markdown.md @@ -0,0 +1,71 @@ +--- +title: Export Readwise highlights to Markdown +description: Import a Readwise library into mdbase Reader. Each highlight becomes a Markdown note linked to its source, with your quote and comment together. +section: guides +--- + +Use Reader’s experimental importer with a fresh collection first. You need a Readwise account with API access, an mdbase account and a destination folder synced through [mdbase Connect](/connect/). Keep the import tab open. + +## 1. Choose what to bring + +Open [Import from Readwise Reader](https://reader.mdbase.dev/import/readwise). Get your token from [Readwise](https://readwise.io/access_token) and paste it into **API token**. The token stays in this tab and goes only to Readwise. Reader uses it to read your library. + +Leave **Include unsaved Feed items** off to import just your saved library and classic highlights. Archived library items are included either way. Choose **Scan Readwise library**. The scan can take several minutes. + +![Reader’s Readwise input screen with the API token field and the option to include unsaved Feed items.](/images/apps/readwise-input-light.webp) + +## 2. Check the preview + +Compare the counts for sources, annotations and files. Expand the warnings under the category table. A Kindle book in classic Readwise supplies metadata and highlights. Its full text does not come across. Reader documents can bring saved article HTML, PDFs or EPUBs. Original PDFs and EPUBs download after confirmation. + +![Reader’s preview counts a sample book and its highlight before writing to the destination.](/images/apps/readwise-preview-light.webp) + +## 3. Import into your collection + +Choose the destination collection. If Reader asks to install its types, review them and select **Apply reviewed setup**. Choose **Check destination**, read the numbers of new and existing records, then choose **Import** on the button naming your collection. + +When the import finishes, review its warnings and choose **Open imported collection**. To pause a large job, use **Stop safely**. Use **Resume import** in the same destination. After reloading the page, reconnect Readwise and scan again. Existing records matched by import identity keep their contents. + +![Reader reports the number of imported records and offers to open the destination collection.](/images/apps/readwise-result-light.webp) + +![Check the destination and confirm the Readwise import.](/videos/readwise.mp4) + +## 4. Open a highlight on disk + +Open the synced folder on your computer. The starter layout puts each book or article in `sources/` and its individual highlights in `annotations/`. A highlight records its source link in the properties. Its body keeps the quotation and your comment. This sample is from a classic book with a highlight at location 42. + +```markdown title="annotations/imports/ann_d500f2f77ecda2a76edb74faf3ce7ab4.md" +--- +annotation_type: highlight +color: yellow +created_at: "2026-03-08T09:15:00.000Z" +created_by: readwise +id: ann_d500f2f77ecda2a76edb74faf3ce7ab4 +import: + key: v2:82016 + namespace: readwise:reader + native: + color: yellow + created_at: "2026-03-08T09:15:00Z" + id: 82016 + location: 42 + location_type: location + note: Check the east bank after low tide. + text: The marsh drains from its creeks first. + service: readwise + supplemental: {} +locator: + label: location 42 +source: "[[src_294663b42fbc2fca4ee3418f038f291b]]" +tags: [] +target: + quote: + exact: The marsh drains from its creeks first. +type: reader-annotation +--- +> The marsh drains from its creeks first. + +Check the east bank after low tide. +``` + +Content files and the import’s metadata archive live under `files/reader/imports/`. To work with the notes after import, see [Reader’s collection layout](/apps/reader/data/) and [notes and citations](/apps/reader/notes/). diff --git a/content/guides/zotero-annotations.md b/content/guides/zotero-annotations.md new file mode 100644 index 0000000..8ef2343 --- /dev/null +++ b/content/guides/zotero-annotations.md @@ -0,0 +1,98 @@ +--- +title: Save Zotero annotations as Markdown notes +description: Export a Zotero library with mdbase Reader’s experimental exporter. Import the bundle to get one Markdown record per annotation alongside the original PDF. +section: guides +--- + +Zotero stores annotations made in its PDF reader in its database. Copying the PDF alone leaves those annotations behind. The mdbase Reader exporter brings the original file, the quotes and your comments across together. [How Zotero stores annotations](https://www.zotero.org/support/pdf_reader) + +You need Zotero **10.0.x** with a signed-in account, a browser that can select a whole folder (such as Chrome) and an mdbase collection. Try this experimental import with a new collection first. To read the results in Obsidian, use a [synced folder](/guides/obsidian-browser/) as the destination. + +## 1. Install the exporter + +On [Reader’s Zotero import page](https://reader.mdbase.dev/import/zotero), download the exporter ending in `.xpi`. In Zotero, open **Tools → Plugins**. Drag the XPI into that window or use the gear menu’s **Install Plugin From File…** option. + +![Reader’s Zotero import instructions show the supported version, exporter download and installation steps.](/images/apps/zotero-input-light.webp) + +## 2. Export My Library + +Finish syncing Zotero. Choose **Tools → Export for mdbase Reader…**. Select a parent folder outside Zotero’s data directory. Review the counts and missing-file warnings, then choose **Export library**. Leave Zotero open and avoid editing until the export finishes. + +The exporter includes all of **My Library** except trash. It skips group libraries. It cannot export just one selected collection. **Show folder** reveals the new child folder. Keep it private: it contains your library metadata, notes and attachments. + +## 3. Select the finished bundle in Reader + +Return to the import page and select the whole generated child folder. Its top level contains `manifest.json`. Reader checks the payload checksums before writing to your collection. If the export was cancelled, run the exporter again and choose the new completed bundle. + +![Reader previews the sources, annotations and content files from a completed sample export.](/images/apps/zotero-preview-light.webp) + +## 4. Confirm the destination + +Choose your mdbase collection. If Reader asks for its types, review them and choose **Apply reviewed setup**. Choose **Check destination**, review how many records already exist, then choose **Import** on the button naming the destination. Leave the tab open until Reader finishes verification. + +![The completed import shows verified records and the link to open the imported collection.](/images/apps/zotero-result-light.webp) + +![Confirm the Zotero import and inspect its completion state.](/videos/zotero.mp4) + +## 5. Read the annotation on disk + +Open the synced folder. Under `annotations/imports/`, each annotation has a source link, its quoted passage and your comment. In this example, the PDF page and rectangle identify where the highlight belongs. The PDF stays under `files/reader/imports/`. + +```markdown title="annotations/imports/ann_628275aea0ca6dbafb6c43e1b41fb128.md" +--- +annotation_type: highlight +color: "#ffd400" +created_at: "2026-03-14T09:00:00.000Z" +created_by: zotero +document: + file: "[[files/reader/imports/zotero_a5804395c8e7552b4cf67a738317c9cb/files/AN8H7C6W/east-bank.pdf]]" + file_id: "01a20c58-b0aa-742e-8f06-06b9c24c7ba5" + revision: sha256:d8d3916ccdd1bcc4d61d61bdcf5a4a40ed0a58d056339b235230af2988793029 +id: ann_628275aea0ca6dbafb6c43e1b41fb128 +import: + key: BH87Q4JZ + namespace: zotero:user:18471 + native: + annotationColor: "#ffd400" + annotationComment: Compare with the unplanted bank. + annotationPageLabel: "1" + annotationPosition: "{\"pageIndex\":0,\"rects\":[[72,648,312,662]]}" + annotationText: Reeds collect fine sediment along the bank. + annotationType: highlight + key: BH87Q4JZ + parentItem: AN8H7C6W + service: zotero +locator: + label: "1" +source: "[[src_07f93bfdd5cc6dd96ac09f4febca3777]]" +tags: [] +target: + pdf: + coordinate_space: + box: crop + origin: top_left + profile: embedpdf-selection-page-points-v1 + page_index: 0 + quad_points: + - + - 72 + - 130 + - 312 + - 130 + - 72 + - 144 + - 312 + - 144 + quote: + exact: Reeds collect fine sediment along the bank. + zotero: + position: "{\"pageIndex\":0,\"rects\":[[72,648,312,662]]}" + profile: zotero-annotation-position-v1 +type: reader-annotation +--- +> Reeds collect fine sediment along the bank. + +Compare with the unplanted bank. +``` + +If a position cannot be converted for Reader’s viewer, Reader keeps Zotero’s position data. Check the import warnings before relying on jump-to-highlight links. For working with the imported text, see [Reader’s annotation guide](/apps/reader/annotating/). For highlights from an e-reader, use the [Readwise import](/guides/readwise-markdown/). diff --git a/content/sdk/connect-quickstart.md b/content/sdk/connect-quickstart.md index ca6e4aa..7e1162c 100644 --- a/content/sdk/connect-quickstart.md +++ b/content/sdk/connect-quickstart.md @@ -12,7 +12,7 @@ The finished app is about 150 lines. mdbase supplies sign-in, the collection pic > **What you need** > -> Node 20 or later. You need no account to start: the app first runs in a collection kept in your browser. Signing in to an mdbase account comes at step 7. Developing on `http://localhost` needs an `@mdbase-dev/sdk` release after `0.1.0-beta.168`. +> Node.js 24 or later and npm. You need no account to start: the app first runs in a collection kept in your browser. Signing in to an mdbase account comes at step 7. ## 1. Create the project {#project} @@ -25,7 +25,7 @@ npm install --save-exact @mdbase-dev/sdk @mdbase-dev/ui @mdbase-dev/i18n \ npm install --save-dev --save-exact @mdbase-dev/connect-dev ``` -`@mdbase-dev/sdk` is the client. `@mdbase-dev/ui` has the sign-in and collection screens; `@mdbase-dev/i18n` and the two Lingui packages are its peer dependencies. `@mdbase-dev/connect-dev` checks the manifest at build time. The packages are in beta, so the versions are pinned exactly. +`@mdbase-dev/sdk` is the client. `@mdbase-dev/ui` has the sign-in and collection screens; `@mdbase-dev/i18n` and the two Lingui packages are its peer dependencies. `@mdbase-dev/connect-dev` checks the manifest at build time. Delete the template’s `src/App.tsx`, `src/App.css` and `src/index.css`; the steps below replace them. Then fix the development port, because the manifest names the exact origin the app is served from: @@ -124,7 +124,7 @@ WORKLOG_ORIGIN=https://worklog.example.com npm run build # Upload dist/ to the static host that serves https://worklog.example.com ``` -The build is a folder of static files. Host it anywhere that serves HTTPS at the origin you built for. There is no server component, no API key and no secret: the app holds nothing until a user signs in and approves it. +The build is a folder of static files. Host it anywhere that serves HTTPS at the origin you built for. There is no server component, no API key and no secret: entries stay in this browser until the user connects a collection. - The manifest’s `homepage` origin and the site’s origin must match exactly, including `www` and any port. - The deployed app is a separate application from your localhost build. Users approve it on its own, and its storage is its own. @@ -164,3 +164,5 @@ You can draw each phase yourself, or mount the shared screens into an element wi - [Pending writes and sync status](/sdk/offline-sync/): show what is saved and what is waiting. - [Contracts and adapters](/sdk/contracts/): work with records other apps also use. - [Testing](/sdk/testing/): run the same code against an in-memory collection. + +[Build a personal web app without a backend](/guides/local-first-web-app/) runs the finished Worklog example and follows a saved entry into its Markdown representation. diff --git a/content/sdk/operations.md b/content/sdk/operations.md index 5dd9bda..5dbef64 100644 --- a/content/sdk/operations.md +++ b/content/sdk/operations.md @@ -157,3 +157,5 @@ for await (const f of db.files.list()) { - Uploads go in 1 MiB chunks. To resume an interrupted upload, call `upload()` again with the same `transferId`. Pass `fileId` to replace an existing file. - `download()` reads up to 64 MiB into memory. For anything larger, use `downloadStream()`, which also takes a byte `range`. - `move()` and `delete()` take `ifRevision`, like records. + +[Query YAML frontmatter from the command line](/guides/query-frontmatter/) shows the same status filter against two files on disk. diff --git a/docs/app-documentation.md b/docs/app-documentation.md index b6e1ed3..47404ad 100644 --- a/docs/app-documentation.md +++ b/docs/app-documentation.md @@ -65,7 +65,7 @@ renderer in a browser). Each script's header gives the steps. Retake them when t change. On a phone each screenshot shows only the part of the window named for it in -`AppShot.astro` (`crops`), and opening it shows the whole capture; set a crop when you add +`src/markdown/app-shot.mjs` (`crops`), and opening it shows the whole capture; set a crop when you add a screenshot. The social share image, `public/og-card.jpg`, is drawn from the homepage's sky by diff --git a/examples/worklog/package-lock.json b/examples/worklog/package-lock.json index 06aa3e5..f9629b6 100644 --- a/examples/worklog/package-lock.json +++ b/examples/worklog/package-lock.json @@ -10,14 +10,14 @@ "dependencies": { "@lingui/core": "6.9.0", "@lingui/react": "6.9.0", - "@mdbase-dev/i18n": "0.1.0-beta.166", - "@mdbase-dev/sdk": "0.1.0-beta.168", - "@mdbase-dev/ui": "0.1.0-beta.166", + "@mdbase-dev/i18n": "0.2.2", + "@mdbase-dev/sdk": "0.2.2", + "@mdbase-dev/ui": "0.2.3", "react": "^19.2.0", "react-dom": "^19.2.0" }, "devDependencies": { - "@mdbase-dev/connect-dev": "0.1.0-beta.166", + "@mdbase-dev/connect-dev": "0.1.37", "@types/react": "^19.2.0", "@types/react-dom": "^19.2.0", "@vitejs/plugin-react": "^6.3.0", @@ -691,24 +691,24 @@ } }, "node_modules/@mdbase-dev/connect": { - "version": "0.1.0-beta.166", - "resolved": "https://registry.npmjs.org/@mdbase-dev/connect/-/connect-0.1.0-beta.166.tgz", - "integrity": "sha512-LApM4CInwayn9ZJ/nUbOEKIPpbDutwYDerW3cpfECP8qDAJEGtbPeluDL1voHu7QZqInKjpKyWC4AJoJHvcGJg==", + "version": "0.1.37", + "resolved": "https://registry.npmjs.org/@mdbase-dev/connect/-/connect-0.1.37.tgz", + "integrity": "sha512-qZucpCkpx3goz5PtEjMOMQb/QbgBApzx5hibsLWDpzxdTMcbxgP0lBEEXVs5SOZLtT/QRSVSfYcfdChNVBI1NA==", "dev": true, "license": "MIT", "dependencies": { - "@mdbase-dev/connect-protocol": "0.1.0-beta.166" + "@mdbase-dev/connect-protocol": "0.1.37" } }, "node_modules/@mdbase-dev/connect-dev": { - "version": "0.1.0-beta.166", - "resolved": "https://registry.npmjs.org/@mdbase-dev/connect-dev/-/connect-dev-0.1.0-beta.166.tgz", - "integrity": "sha512-olylXeMyvkZJkc2pYg4Gu3u5D0VdwLSG3Cet6OkVboJVyQ2r8hWueL2oU5HAKS/C13hRPW8/nxKwJsqu4hLtmA==", + "version": "0.1.37", + "resolved": "https://registry.npmjs.org/@mdbase-dev/connect-dev/-/connect-dev-0.1.37.tgz", + "integrity": "sha512-SSqTpeCEj/lbLQw90MQ8P7bjbRY+hX9KDlS8lGP+R+rlFrpuc8spumSe7VwQt7E/dyX8Y443ppD/r3U+ZFRzrg==", "dev": true, "license": "MIT", "dependencies": { - "@mdbase-dev/connect": "0.1.0-beta.166", - "@mdbase-dev/connect-protocol": "0.1.0-beta.166", + "@mdbase-dev/connect": "0.1.37", + "@mdbase-dev/connect-protocol": "0.1.37", "ajv": "^8.20.0", "yaml": "^2.9.1" }, @@ -717,9 +717,10 @@ } }, "node_modules/@mdbase-dev/connect-protocol": { - "version": "0.1.0-beta.166", - "resolved": "https://registry.npmjs.org/@mdbase-dev/connect-protocol/-/connect-protocol-0.1.0-beta.166.tgz", - "integrity": "sha512-owBhZOSO6DbDEgdMS2Jl3Nut0wPs4DjbHKh6gLgfDGooxrnQz9ZqTzDvwMiI2aDW3VGelFfIRUZY6XHrLzhCjQ==", + "version": "0.1.37", + "resolved": "https://registry.npmjs.org/@mdbase-dev/connect-protocol/-/connect-protocol-0.1.37.tgz", + "integrity": "sha512-/H/pHs2IkaXnCpmFo/XwW8WxpY+MIfruxf0bMhrQSSa7bTeurMZU2s1K0oNdYSGbZkdDKneKQDBguHBz7MCE2Q==", + "dev": true, "license": "MIT", "dependencies": { "@noble/hashes": "2.4.0", @@ -727,9 +728,9 @@ } }, "node_modules/@mdbase-dev/i18n": { - "version": "0.1.0-beta.166", - "resolved": "https://registry.npmjs.org/@mdbase-dev/i18n/-/i18n-0.1.0-beta.166.tgz", - "integrity": "sha512-Ny4M+yQFf1D9CiSjoDLRB9xrVTKBbbxw6FhbHuGV4PAsXvZPWH5Tlq+vb+MsSXwXeXFhPYJBl6wffvUN/SZQNw==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@mdbase-dev/i18n/-/i18n-0.2.2.tgz", + "integrity": "sha512-13OMRiIgJUwh6+XxchBRUQs6sC6InEZvOx9L7uvUWkKUnSjMMB67cBXwpxZCSRHBFVWeWnlW7BT1fhIF2BHdpg==", "license": "MIT", "dependencies": { "@lingui/cli": "6.9.0", @@ -748,15 +749,15 @@ } }, "node_modules/@mdbase-dev/sdk": { - "version": "0.1.0-beta.168", - "resolved": "https://registry.npmjs.org/@mdbase-dev/sdk/-/sdk-0.1.0-beta.168.tgz", - "integrity": "sha512-hwQhUAdknThDhGU3QxKVMBZlXZb/HnEl7dhuc9qPFUX75diTFPjyzAwPhJbbgnIh1c1PtT9aUyuUlaVtafZ/6Q==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@mdbase-dev/sdk/-/sdk-0.2.2.tgz", + "integrity": "sha512-AWZKYrF4n4dl+ltwMWM7gHPL3AYGRburo3JODbJqnfBM123CSlSyBgWifAQR83mi3ZILtMJF1NkqeJw0GLdTlw==", "bundleDependencies": [ "@mdbase-dev/connect-protocol" ], "license": "MIT", "dependencies": { - "@mdbase-dev/connect-protocol": "file:vendor/mdbase-dev-connect-protocol-0.1.0-beta.145-e6e66bcd172f.tgz", + "@mdbase-dev/connect-protocol": "file:vendor/mdbase-dev-connect-protocol-0.1.0-beta.152-3d3f95b80c9a.tgz", "@noble/ciphers": "2.4.0", "@noble/curves": "2.4.0", "@noble/hashes": "2.4.0" @@ -766,7 +767,7 @@ } }, "node_modules/@mdbase-dev/sdk/node_modules/@mdbase-dev/connect-protocol": { - "version": "0.1.0-beta.145", + "version": "0.1.0-beta.152", "inBundle": true, "license": "MIT", "dependencies": { @@ -800,13 +801,15 @@ } }, "node_modules/@mdbase-dev/ui": { - "version": "0.1.0-beta.166", - "resolved": "https://registry.npmjs.org/@mdbase-dev/ui/-/ui-0.1.0-beta.166.tgz", - "integrity": "sha512-Bv6WfY/tT7f8wlZBu+Ll7KyjmL/pSjGQiKcQidlW82OWUmtX+fxAXbOPu8/OINNxyYS+8mWLaB0lCjBRZK0Exg==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@mdbase-dev/ui/-/ui-0.2.3.tgz", + "integrity": "sha512-TcAzVzqRSTh/yY64e3XBEH9jM+3C+yXFWfYabtf1HP7WoFOujd1mJVNaxLa+kQ8ul21FACG4eYQr4BWOVaErHA==", "license": "MIT", "dependencies": { "@fontsource/azeret-mono": "^5.3.0", - "@fontsource/ibm-plex-sans": "^5.3.0" + "@fontsource/ibm-plex-sans": "^5.3.0", + "katex": "0.19.1", + "pele": "1.13.0" }, "peerDependencies": { "@codemirror/commands": "^6.0.0", @@ -814,10 +817,11 @@ "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.42.1", "@lezer/common": "^1.0.0", + "@lezer/markdown": "^1.0.0", "@lingui/core": "6.9.0", "@lingui/react": "6.9.0", "@mdbase-dev/i18n": "*", - "@mdbase-dev/sdk": "*", + "@mdbase-dev/sdk": ">=0.1.0-beta.188", "react": "^19.2.0", "react-dom": "^19.2.0" }, @@ -837,6 +841,9 @@ "@lezer/common": { "optional": true }, + "@lezer/markdown": { + "optional": true + }, "@mdbase-dev/sdk": { "optional": true }, @@ -1782,6 +1789,31 @@ "node": ">=6" } }, + "node_modules/katex": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.19.1.tgz", + "integrity": "sha512-jG8uKntjSEcm2EpQOh0XturpPuuC9r3Sq5HLHdsFdWZT27E672SF19QEi+of0/YeOy15lDgRhKvr5614uRrEfA==", + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^15.0.0" + }, + "bin": { + "katex": "cli.js" + } + }, + "node_modules/katex/node_modules/commander": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-15.1.0.tgz", + "integrity": "sha512-cgnQ88TRrWcC7pVq46RzJVRMktu3W2RcbnoidnfBsl1bmDCBwJS/udcIZpKoCrbAYYaCqsz1yZCVIgbIaU3ddQ==", + "license": "MIT", + "engines": { + "node": ">=22.12.0" + } + }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -2255,6 +2287,15 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/pele": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/pele/-/pele-1.13.0.tgz", + "integrity": "sha512-Ie8UKY9x00MsuR3jO6AzUwzK2Z6MIV3Tf4EDdITiuk8Uaz8K7g0R082WqsqNaSU8DdgkrRvZThzhit83mi/uiw==", + "license": "MIT", + "engines": { + "node": ">=20" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -2785,6 +2826,7 @@ "version": "2.9.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz", "integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==", + "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" diff --git a/examples/worklog/package.json b/examples/worklog/package.json index 9292631..cdb1cac 100644 --- a/examples/worklog/package.json +++ b/examples/worklog/package.json @@ -13,14 +13,14 @@ "dependencies": { "@lingui/core": "6.9.0", "@lingui/react": "6.9.0", - "@mdbase-dev/i18n": "0.1.0-beta.166", - "@mdbase-dev/sdk": "0.1.0-beta.168", - "@mdbase-dev/ui": "0.1.0-beta.166", + "@mdbase-dev/i18n": "0.2.2", + "@mdbase-dev/sdk": "0.2.2", + "@mdbase-dev/ui": "0.2.3", "react": "^19.2.0", "react-dom": "^19.2.0" }, "devDependencies": { - "@mdbase-dev/connect-dev": "0.1.0-beta.166", + "@mdbase-dev/connect-dev": "0.1.37", "@types/react": "^19.2.0", "@types/react-dom": "^19.2.0", "@vitejs/plugin-react": "^6.3.0", diff --git a/examples/worklog/src/Worklog.tsx b/examples/worklog/src/Worklog.tsx index a0326b3..1a974fd 100644 --- a/examples/worklog/src/Worklog.tsx +++ b/examples/worklog/src/Worklog.tsx @@ -79,8 +79,8 @@ export function Worklog({ db }: { db: MdbaseClient }) {