Commit Graph

382 Commits

Author SHA1 Message Date
johnnyjoygh 6387991fdd chore(web): update focus mode
- Bump @usememos/editor to 26.10.27: Markdown mode now highlights syntax
  inside table cells, so a URL anchor in a table-cell link, such as
  [Kappa](/memos/abc#ikebukuro), reads as part of the URL instead of a
  tag.
  Refs usememos/memos#6480 (item 13).
- Focus mode: a narrower sheet (max-w-3xl) with larger text through
  MEMO_FOCUS_EDITOR_THEME; its header shows only the memo's time ("Now"
  before it has one) and the exit button; toggling it runs a view
  transition that grows the frame out of its place on the page and back,
  instant under reduced motion or without view transitions.
- Markdown mode's + menu item uses Lucide's CodeXml instead of the
  pilcrow.
2026-10-26 08:40:24 +08:00
Johnny 0bfa31e89e feat(web): editor 26.10.26 with Markdown mode, checklist chip and plain tags in source mode (#6498) 2026-10-24 19:48:46 +08:00
johnnyjoygh 334925a5f1 chore(web): bump @usememos/editor to 26.10.25
Tables are styled like claude.ai's: the table fills the editor's width
with a round frame, a tinted header row, lines between rows and no
vertical lines, and cells wrap at words instead of mid-word. HTML tables
rendered through the html view look the same.

Footnote definitions render their text as Markdown. In read-only memos
the referenced definitions are collected in a section at the end of the
note, above the attachments, in order of first reference, each with a
backlink per reference; unreferenced definitions are left out and
labels show as written. While editing, definitions stay where they are
written.

Both fix items reported in #6480. Wire the editor's two new labels,
`footnotes` and `backToReference`, to new `editor` keys in every locale.
2026-10-21 23:30:18 +08:00
johnnyjoygh 24cce5ca27 perf(editor): replace highlight.js with Highlights tokens 2026-10-21 21:46:11 +08:00
johnnyjoygh 59afd178ff chore(web): bump @usememos/editor to 26.10.24
Pass the editor palette once as `tokens.colors` instead of the same object
as `light` and `dark`. Drop the heading sizes, leading and weight from the
app's heading classes: the editor sets them in its own unlayered stylesheet,
scaled from its `fontSize` and `lineHeight` tokens, so the Tailwind sizes
never applied and would not follow a changed token. Only the muted h6 color
remains. No `highlight` token: memos' HTML sanitizer drops `<mark>`.

Correct the color guide's theme-switching section, which described a
`.dark` class memos does not use and which the editor would now follow.

Inline raw HTML inside a link, such as ruby annotations in a table cell,
now renders through the HTML view in both the composer and the memo view.
2026-10-20 23:21:42 +08:00
johnnyjoygh bf67323d1d chore(web): draw Mermaid diagrams with Pele
Replace mermaid with pele for ```mermaid code blocks. Diagram types load
on first use through pele/lazy, the SVG takes its colors from --pele-*
variables mapped to the theme tokens in index.css, so a color scheme
change needs no redraw, and the layout shrinks to the memo's width while
keeping the author's direction.

Bump @usememos/editor to 26.10.22.
2026-10-19 00:35:57 +08:00
johnnyjoygh 0b53427b82 chore(web): bump @usememos/editor to 26.10.21
Brings the inline HTML pairing fix so ruby annotations render again.
2026-10-18 22:50:37 +08:00
boojack 3bea6df030 refactor(web): one memo component, MemoEditor, with view and edit modes (#6481) 2026-10-18 12:11:55 +08:00
johnnyjoygh b736c0202c chore(web): bump @usememos/editor to 26.10.16
- Tag autocomplete follows the backend tag grammar: `hello#work` and `C#`
  now match while typing, so the test expectations move with it.
- A titled link (`[url](url "title")`) is no longer treated as a bare URL
  for link-preview cards, since the card would drop its title.
2026-10-17 00:20:58 +08:00
johnnyjoygh af07ca804c chore(web): bump @usememos/editor to 26.10.15
Quotes and callouts can hold lists, so a quote with a bullet list
renders
instead of showing its Markdown source, and callouts take the Linear and
Notion style: a tinted box with the type's icon.
2026-10-16 07:38:58 +08:00
Johnny 42ae244767 chore(web): bump @usememos/editor to 26.10.14 (#6479) 2026-10-15 20:49:28 +08:00
johnnyjoygh 6529609283 chore: bump editor version 2026-10-14 21:09:29 +08:00
johnnyjoygh 25419a5239 chore: bump memo editor 2026-10-14 09:31:28 +08:00
johnnyjoygh fa90981671 fix(web): load managed attachment images on instances served over http 2026-10-14 08:36:21 +08:00
Johnny 5cfe9c09dd feat(web): replace CodeMirror and react-markdown with @usememos/editor (#6466) 2026-10-14 07:34:48 +08:00
ABird 45519accd3 refactor: name packages by role and enforce import direction (#6317) 2026-09-13 18:22:54 +08:00
johnnyjoygh bc89ec0006 feat(map): add a map page for located memos
Replace the profile's map tab with a /map route (also under Spaces) that
shows every located memo on a Positron vector basemap with clustering,
falling back to raster tiles when the vector style cannot load.

Selecting a pin or a cluster opens a side rail (a bottom sheet on
phones)
with the memos at that place; "Write here" expands into the editor in
place, seeded with the location. Selection and viewport live in the URL.

The sidebar's tag counts are scoped to located memos on this route, and
the editor draft cache now remembers a memo's location.
2026-09-09 23:04:06 +08:00
johnnyjoygh 1ed894bee4 chore(web): bump CodeMirror packages
Update @codemirror/view 6.43.6 -> 6.43.10, commands 6.10.4 -> 6.11.0,
state 6.7.1 -> 6.7.2, lang-markdown 6.5.0 -> 6.5.2 and @lezer/markdown
1.6.4 -> 1.7.2 to pick up upstream composition and Android/iOS fixes
while investigating #6183.
2026-09-03 23:43:38 +08:00
amblued 9d2b77ced8 feat(space): add client-defined UIDs and identity cues
- Generate UUID v4 values in the client with validated custom UID
  support.\n- Show immutable UIDs where Space titles need
  disambiguation.\n- Standardize Space surfaces on the Lucide Astroid
  icon.
2026-08-28 00:33:09 +08:00
amblued f36ca9317d feat(web): add a global memo composer to the sidebar (#6219) 2026-08-21 21:14:28 +08:00
Johnny 7d971b1c61 feat(storage): add named attachment storage drivers (#6184) 2026-08-13 22:37:11 +08:00
Johnny da81b6b48f feat: persist and display client media metadata (#6180) 2026-08-11 23:47:21 +08:00
Johnny f75d49f9b6 fix(web): restore sidebar and outline behavior (#6161) 2026-08-08 08:58:07 +08:00
johnnyjoygh 4eee9a5fb4 chore(web): prune frontend dependencies
- Upgrade Base UI and i18n packages for TypeScript 7 support
- Remove unused runtime, type, and build dependencies
- Delete the orphaned UUID helper
2026-08-06 00:13:09 +08:00
Johnny c68e3d5bf9 feat(markdown): unify tag syntax and recognition (#6132) 2026-08-02 14:46:04 +08:00
boojack 9c3bd44a1b chore(web): migrate UI primitives to Base UI 2026-07-14 09:06:40 +08:00
boojack a9ac008a68 fix(editor): let CodeMirror own caret layout
Keep caret and placeholder behavior on CodeMirror's standard extensions, and move height and scrolling to the editor elements so empty space stays interactive across browsers.\n\n- disable unused multi-cursor selection\n- upgrade CodeMirror state and view patches
2026-07-10 08:51:16 +08:00
boojack 0150040056 chore(web): upgrade typescript to 7.0
TS 7.0 is the native compiler and stays CLI-compatible, so the tsc-based lint is unchanged. Verified pnpm lint and pnpm build pass.
2026-07-09 21:38:32 +08:00
johnnyjoygh 5a73d7d3e5 refactor: rebuild the editor on CodeMirror as decorated source
Rebuild the memo editor as a single CodeMirror 6 "decorated source"
editor. The document is the raw markdown, stored verbatim and styled in
place (markers stay visible), so the editor never serializes a tree back
to markdown — removing the round-trip fidelity bug class (inline images,
setext headings, ordered-list indentation, HTML entities) that the old
editor needed per-case patches for.

- MemoEditor/Editor: CodeMirror 6 + lang-markdown (GFM). Tokens, heading
  lines, #tag/@mention, and the autocomplete popover are styled in plain
  CSS (Editor/editor.css) with theme tokens, not a CSS-in-JS theme.
- Tab/Shift-Tab nest/outdent list items (marker-aware, ordered items
  renumbered so nesting is CommonMark-valid); Escape blurs; #tag
  autocomplete sourced from useTagCounts.
- Focus-mode toolbar reimplemented as markdown-text ops; active state read
  from the Lezer tree via the backend-agnostic formatting/commands catalog.
- Remove the old serialize-back-to-markdown editor (its Editor dir,
  PlainEditor, the editor-mode system) and its now-unused dependencies
  (marked, textarea-caret, and the rich-text editor packages).
- Consolidate toolbar components under Toolbar/. Read-only MemoContent
  rendering is unchanged.
2026-06-28 22:59:14 +08:00
johnnyjoygh f5a60263b2 chore(ui): align frontend on shadcn kit
Design system:
- add semantic --success/--warning OKLCH tokens across themes; replace
  hardcoded green/amber feedback colors and their manual dark: overrides
- drop the unused @emotion dependency

Kit usage:
- migrate raw <button>/<input> to ui-kit components (actions) or
  <div>/<span> (non-action surfaces); keep genuinely custom looks as
  raw HTML with their own styles
- make kit usage prop-only (no className overrides): add Button
  size="icon-sm", Badge "warning" variant + "pill" shape
- extract a shared Tabs primitive (segmented/underline) and migrate
  Inboxes + UserProfile onto it
- tokenize z-index tiers as z-overlay/z-dropdown/z-tooltip
- export variant types (ButtonVariant/Size, BadgeVariant/Shape, TabsVariant)
- document the kit and its policy in components/ui/README.md
2026-06-21 09:17:04 +08:00
boojack 00225db922 refactor(web): share markdown element styles between viewer and editor
Extract the Tailwind classes for common markdown elements (paragraph,
blockquote, lists, inline code, link, hr, headings) into a single
markdownStyles.ts consumed by both the read-only MemoContent components
and the WYSIWYG editor, replacing the duplicated per-element strings and
the .memo-wysiwyg CSS block. Heading classes are precomputed per level so
the hot renderHTML path is a lookup, not a cn() merge.

Also require at least one character after `#` before opening the tag
suggestion menu so a bare `#` (or `# ` heading) no longer conflicts with
markdown headings.
2026-06-13 22:17:00 +08:00
boojack 797f1ff15d feat(web): markdown WYSIWYG editor with raw-mode toggle (#6030)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:34:51 +08:00
boojack 53abb8020e refactor(frontend): remove react-use dependency 2026-05-31 18:32:17 +08:00
boojack b6f42cbe6b chore: upgrade frontend to React 19 (#5940) 2026-05-08 22:10:48 +08:00
Steven a0b6417689 chore: bump pnpm to 11.0.1 and align list test assertions 2026-04-30 20:05:39 +08:00
boojack ee65e90a39 chore: upgrade pnpm to 11 (#5911) 2026-04-28 22:16:22 +08:00
boojack 616487fa37 chore: update backend and frontend dependencies (#5900)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-04-28 08:25:26 +08:00
boojack 88cb58ab64 refactor(web/routing): guard-based auth flow, migrate tests to Vitest (#5848) 2026-04-18 01:06:54 +08:00
boojack 38fc22b754 feat(memo): add image sharing in detail view
Keep the unpublished image-sharing flow scoped to memo detail pages.

- add a dedicated share-image preview and export pipeline
- measure the rendered memo card so preview and exported image stay aligned
- move the entry point into the detail sidebar and drawer only
2026-04-06 18:30:01 +08:00
memoclaw 6a03917f6e chore: upgrade TypeScript to 6.0.2 2026-03-24 08:45:56 +08:00
memoclaw 2aaca27bd5 refactor(web): improve MemoDetail and sidebar maintainability (#5769)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-23 22:51:24 +08:00
memoclaw 6f5f0d94e8 chore(web): update frontend dependencies and Node runtime (#5729) 2026-03-16 20:37:16 +08:00
Faizaan pochi 874a4a7142 fix: KaTeX math rendering with underscores (#5438) 2026-01-06 20:16:01 +08:00
Johnny 12f32acd09 chore: remove dnd-kit dependencies 2025-12-31 09:32:23 +08:00
Johnny 0735c11d75 feat: implement memo map in user profile 2025-12-30 20:41:44 +08:00
Johnny 64ae13839a fix: add missing @types/hast dependency 2025-12-28 12:49:41 +08:00
Johnny 0ad75b8f08 refactor: replace useResponsiveWidth with useMediaQuery across components 2025-12-26 23:44:52 +08:00
Johnny f87f728b0f feat: react query migration (#5379) 2025-12-24 22:59:18 +08:00
Johnny edd3ced9bf refactor: migrate to connect-rpc (#5338) 2025-12-11 19:49:07 +08:00
Steven 8af8b9d238 fix(web): use AST parsing for task detection to handle code blocks correctly
Fixes #5319. Checkboxes inside code blocks were incorrectly counted when
toggling tasks, causing the wrong checkbox to be checked. Replaced regex-based
task detection with mdast AST parsing which properly ignores code block content.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 08:26:16 +08:00