1737 Commits

Author SHA1 Message Date
mahula
6f45c47765 chore(lib): add marked dependency and cleanup 2026-01-15 18:22:47 +01:00
mahula
df62f39b8f fix(tiptap): prevent video embed replacement when adding content below 2026-01-15 18:22:16 +01:00
mahula
5e2d19fb46 test(tiptap): add Cypress component tests for TipTap extensions 2026-01-15 18:21:56 +01:00
mahula
64b6e60951 docs: add TipTap migration testing strategy 2026-01-15 18:21:44 +01:00
mahula
ff6d940ad9 test(tiptap): add unit tests for markdown preprocessing and XSS prevention
- preprocessMarkdown.spec.ts: 76 tests covering URL conversion, video links,
  hashtags, item mentions, markdown removal, and truncation
- simpleMarkdownToHtml.spec.ts: 21 tests for HTML conversion and formatting
- xss.spec.ts: 22 security tests covering script injection, event handlers,
  javascript URLs, tag restoration bypass, and attribute injection
2026-01-15 13:29:46 +01:00
mahula
783a205c58 fix(security): prevent XSS in simpleMarkdownToHtml tag restoration
- Add strict regex patterns for tag restoration that only match exact expected format
- Add sanitizeUrl() to block javascript:, data:, vbscript: URLs in markdown links
- Add containsDangerousAttributes() to detect event handlers in restored content
- Prevents onclick/onload injection via malformed preprocessed tags
2026-01-15 13:29:34 +01:00
b052a877cd fix: address GitHub Copilot review feedback
- Add missing dependencies to useEditor in TextView.tsx (items, getItemColor, addFilterTag)
- Remove redundant useEffect that duplicated editor initialization
- Update all TipTap packages to v3.15.3 for version consistency
- Make YouTube video ID pattern more flexible (10-12 chars instead of exactly 11)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 09:51:40 +01:00
0ef35df335 fix: use @tiptap/markdown API for Hashtag and ItemMention extensions
- Replace addStorage() with markdownTokenizer/parseMarkdown/renderMarkdown
- Remove tiptap-markdown from rollup commonjs config
- These changes fix serialization of hashtags and mentions to markdown
2026-01-15 09:12:35 +01:00
237c84528b fix: lint import order 2026-01-15 09:08:39 +01:00
3d7307b759 fix(lib): improve markdown processing and truncation
- Add convertNakedUrls() to skip URLs already inside markdown links
- Rewrite truncateMarkdown() with token-aware truncation
- Add @tiptap/markdown support to VideoEmbed, ItemMention, Hashtag
- Fix double-conversion of URLs in existing links
- Fix truncation cutting tokens in the middle
- Fix eslint warnings with proper types

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 08:53:37 +01:00
3a8477f863 fix: use preprocessMarkdown for parsing hashtags and item mentions
The @tiptap/markdown extension doesn't automatically parse custom
markdown syntax like [@Label](/item/id). We need to preprocess the
markdown before loading it into the editor to convert these patterns
to HTML spans that the extensions' parseHTML handlers can recognize.

- RichTextEditor: preprocess defaultValue before loading
- TextView: preprocess innerText before loading

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 08:53:27 +01:00
90eb66bc80 refactor: clean up markdown serialization, use @tiptap/markdown API
- Remove old addStorage.markdown.serialize (community tiptap-markdown)
- Keep only renderMarkdown (official @tiptap/markdown)
- Update TextView.tsx to use @tiptap/markdown with contentType

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 08:53:13 +01:00
acda71ee7b fix(lib): remove extra blank line in RichTextEditor
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 08:52:57 +01:00
77391dde19 refactor(editor): migrate to native @tiptap/markdown extension
- Replace community `tiptap-markdown` with official `@tiptap/markdown`
- Use new API: `editor.getMarkdown()` instead of `editor.storage.markdown.getMarkdown()`
- Add `contentType: 'markdown'` for direct markdown loading
- Remove unused `@tiptap/extension-color` (no UI was using it)
- Remove custom MarkdownStorage type declaration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 08:52:57 +01:00
Anton Tranelis
02bce69ab3
Merge branch 'main' into feature/tiptap-textview-migration 2026-01-15 08:36:28 +01:00
b40b6c8160 fix: case-insensitive UUID matching in preprocessItemMentions
UUIDs can contain both uppercase and lowercase hex characters (A-F, a-f).
The regex was only matching lowercase, causing @mentions to not be
converted to links in TextViewStatic.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 16:58:15 +01:00
b944a7f401 feat(TextViewStatic): add item colors to @mentions
- Pass items and getItemColor to simpleMarkdownToHtml
- Item mentions now display with correct colors (item.color → tag color → layer default)
- Add font-weight: bold to hashtags and item mentions for consistency

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 16:54:39 +01:00
33f99ce4a2 fix(VideoEmbed): resolve lint errors
- Replace deprecated frameBorder with style={{ border: 'none' }}
- Fix unsafe regex patterns to prevent ReDoS vulnerabilities
  - Anchor patterns with ^ for exact matching
  - Use fixed-length YouTube video IDs (11 chars)
  - Add proper terminators for URL parsing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 15:42:42 +01:00
0e9548e25f fix(lint): resolve eslint errors in suggestion components
- Fix import order issues
- Fix TypeScript type annotations
- Use .at() for array access to satisfy lint rules
- Cast props to correct types in command handlers
- Fix template literal type issues

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 15:38:56 +01:00
c644f182e4 feat(TipTap): add hashtag and item mention suggestions
- Add suggestion system for #hashtags and @item-mentions in RichTextEditor
- New files:
  - HashtagSuggestion.tsx: autocomplete for existing tags, create new tags
  - ItemMentionSuggestion.tsx: autocomplete for items with @syntax
  - ItemMention.tsx: TipTap node for item links with markdown serialization
  - SuggestionList.tsx: shared popup UI component
  - useItemColor.tsx: hook for consistent item color calculation
- Features:
  - Type # to see tag suggestions, space key confirms selection
  - Type @ to see item suggestions with correct colors
  - New tags can be created inline
  - Clickable mentions in view mode (hashtags filter map, @mentions navigate)
  - Bold styling for all mentions and suggestions
  - Disabled clicks in edit mode
- Refactored components to use useItemColor hook for consistent colors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 15:31:17 +01:00
382f284f31 feat(VideoEmbed): add paste handler, editor preview, and markdown serialization
- Add ReactNodeViewRenderer for video preview in RichTextEditor
- Add ProseMirror plugin for paste detection of video URLs
- Add markdown serialization to output autolink format <url>
- Integrate VideoEmbed extension in RichTextEditor
- Preprocess video links when loading content

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 11:41:14 +01:00
393d882cfe fix(preprocessMarkdown): handle autolink syntax for video URLs
Support markdown autolinks <https://youtube.com/...> in addition to
standard markdown links [text](url) for YouTube and Rumble videos.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 11:07:53 +01:00
5b446f933c chore: export TextViewStatic and use it in MapContainer
- Export TextViewStatic from ItemPopupComponents and Item modules
- Update MapContainer to use TextViewStatic instead of TextView for popups

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 10:35:54 +01:00
7e1d95ecdd feat(TextViewStatic): add lightweight static renderer for popups
Add TextViewStatic component for Leaflet popups and card previews:
- Uses simple HTML rendering instead of TipTap EditorContent
- No contenteditable attribute = no Leaflet click blocking issues
- Better performance for rendering many items

Changes:
- Add TextViewStatic.tsx for popups/cards
- Add simpleMarkdownToHtml.tsx utility for lightweight markdown conversion
- Update ItemViewPopup to use TextViewStatic
- Update ItemCard to use TextViewStatic

TextView (full TipTap) remains for profile pages with all features.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 10:32:07 +01:00
319f4a5057 refactor(TextView): migrate from react-markdown to TipTap
Replace react-markdown with TipTap read-only editor for TextView component.

Changes:
- Create TipTap extensions folder with custom Hashtag and VideoEmbed nodes
- Hashtag extension: clickable hashtags with tag colors and filter integration
- VideoEmbed extension: YouTube and Rumble iframe embeds
- Add preprocessMarkdown utility for URL, email, video link, and hashtag conversion
- Migrate TextView to use TipTap with StarterKit, Markdown, Link extensions
- Remove unused itemId prop from TextView and all callers

Known issue: Popup buttons may not work correctly when TextView has content
due to Leaflet's handling of contenteditable elements. To be fixed in follow-up.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 09:58:43 +01:00
dependabot[bot]
081f4f5476
build(deps-dev): bump rollup from 4.54.0 to 4.55.1 (#653)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 08:47:18 +00:00
dependabot[bot]
25df15ef5e
build(deps-dev): bump globals from 16.5.0 to 17.0.0 (#654)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 09:42:07 +01:00
dependabot[bot]
e80b6da89f
build(deps-dev): bump the vitest-ecosystem group with 2 updates (#659)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 09:36:11 +01:00
dependabot[bot]
d5c35f824e
build(deps-dev): bump typedoc from 0.28.15 to 0.28.16 (#660)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 08:19:26 +00:00
dependabot[bot]
d81acb1919
build(deps-dev): bump @eslint-community/eslint-plugin-eslint-comments from 4.5.0 to 4.6.0 (#669)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 08:14:18 +00:00
dependabot[bot]
22775716f9
build(deps-dev): bump happy-dom from 20.0.11 to 20.1.0 (#661)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 08:07:51 +00:00
dependabot[bot]
087939636b
build(deps-dev): bump cypress from 15.8.1 to 15.9.0 (#663)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 08:02:41 +00:00
dependabot[bot]
dd3c94087a
build(deps-dev): bump vite from 7.3.0 to 7.3.1 (#664)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 07:57:26 +00:00
dependabot[bot]
ad7ad53d26
build(deps): bump maplibre-gl from 5.15.0 to 5.16.0 (#665)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-14 08:51:50 +01:00
b7f5b0092f added docs 2026-01-12 16:28:10 +01:00
dependabot[bot]
122091423b
build(deps-dev): bump rollup from 4.53.5 to 4.54.0 (#650)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-27 08:25:15 +00:00
dependabot[bot]
d270038f39
build(deps): bump react-photo-album from 3.3.0 to 3.4.0 (#649)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-27 08:19:00 +00:00
dependabot[bot]
fde73e5570
build(deps): bump react-router-dom from 7.10.1 to 7.11.0 (#645)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-27 08:12:29 +00:00
dependabot[bot]
91d49857e8
build(deps): bump yet-another-react-lightbox from 3.27.0 to 3.28.0 (#648)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-27 09:06:30 +01:00
Copilot
35acd015b8
fix(app): fix Directus API responses missing relational data (offers, needs, relations) (#619)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: antontranelis <31516529+antontranelis@users.noreply.github.com>
Co-authored-by: mahula <lenzmath@posteo.de>
2025-12-23 07:50:01 +01:00
dependabot[bot]
ed6613ac55
fix(deps-dev): resolve vitest v4 upgrade with breaking changes and dependabot grouping (#635)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mahula <lenzmath@posteo.de>
2025-12-20 02:02:58 +01:00
6aa37a7c39 npm audit fix 2025-12-18 18:25:13 +01:00
dependabot[bot]
9cd6616896
build(deps-dev): bump typedoc-plugin-coverage from 3.4.1 to 4.0.2 (#580)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 12:29:29 +00:00
dependabot[bot]
ce66c09273
build(deps-dev): bump typedoc-plugin-missing-exports from 3.1.0 to 4.1.2 (#557)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 12:23:57 +00:00
dependabot[bot]
24fea0f066
build(deps-dev): bump typedoc from 0.27.9 to 0.28.15 (#599)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 12:18:51 +00:00
dependabot[bot]
f099e7893d
refactor(deps): update react-router-dom from v6 to 7.10.1 and adapt to breaking changes (#579)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
Co-authored-by: mahula <lenzmath@posteo.de>
2025-12-18 13:01:42 +01:00
dependabot[bot]
0c9403f898
build(deps): bump maplibre-gl from 5.9.0 to 5.14.0 (#614)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 09:09:22 +00:00
dependabot[bot]
3f9684137b
build(deps-dev): bump @testing-library/react from 16.3.0 to 16.3.1 (#626)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 08:35:42 +00:00
dependabot[bot]
3ed042199c
build(deps-dev): bump rollup from 4.53.3 to 4.53.5 (#625)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
2025-12-18 07:43:07 +00:00
dependabot[bot]
730ec7e0d4
build(deps): bump yet-another-react-lightbox from 3.26.0 to 3.27.0 (#624)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 07:37:54 +00:00