mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-23 10:08:38 +02:00
* fix(editor): bump hast-util-to-html to v9 so lowlight output actually serializes
Source view of fenced ```html (and any other code block falling through to
the lowlight branch in ReadonlyContent) silently rendered as un-highlighted
escaped text. Root cause was a stale dep pin: `hast-util-to-html: ^4.0.1`
predates the package's ESM/named-export rewrite — v4 only exports a CJS
default function, so the `import { toHtml } from "hast-util-to-html"` in
code-block-static.tsx:19 and readonly-content.tsx:32 resolved to
`undefined` at runtime. The try/catch in both call sites caught the
"toHtml is not a function" throw and fell through to escapeHtml plain
text, so no `.hljs-*` spans ever made it to the DOM and the syntax-color
CSS added in #2808 had nothing to attach to.
Bumping to ^9.0.5 (matches the v9 line that lowlight@3 / remark / rehype
ship in the rest of the tree) makes the named `toHtml` export available
and source-view highlighting works.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(editor): open HTML attachment in new tab + full-page preview route
Adds a third toolbar button to HtmlAttachmentPreview between Maximize and
Download: open the attachment in a new app tab (desktop) or browser tab
(web). The full-screen modal stays — they serve different scenarios:
modal for a quick "see it bigger" without leaving the issue context,
new-tab when the user wants to keep the rendered HTML around while
working on something else.
Components:
- New workspace path: `/{slug}/attachments/{id}/preview?name={filename}`.
Lives outside the (dashboard) group on web so the iframe gets the full
viewport — sidebar would defeat the point. Desktop registers the route
inside `WorkspaceRouteLayout` so workspace context resolution still
runs (no slug → no path is built).
- `packages/views/attachments/attachment-preview-page.tsx`: shared full-
page view that reuses `useAttachmentHtmlText` for the iframe srcDoc.
Sandbox stays `allow-scripts` (no allow-same-origin) — same security
posture as the inline preview.
- `HtmlAttachmentPreview`: adds Open-in-new-tab button. Routes through
`useNavigation().openInNewTab` when available (desktop), falls back to
`window.open(getShareableUrl(path))` on web. Button is hidden when no
workspace slug is in scope (shouldn't happen in practice, but the
shared component must not throw outside a workspace route).
Tests cover: desktop openInNewTab call args, web window.open fallback,
and that the failure-mode toolbar still surfaces all three actions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(editor): drop now-stale @ts-expect-error on hast-util-to-html imports
v9 ships bundled type declarations, so the directives added for v4 trigger
TS2578 ("Unused '@ts-expect-error' directive") on CI typecheck.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
123 lines
4.4 KiB
JSON
123 lines
4.4 KiB
JSON
{
|
|
"name": "@multica/views",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "eslint .",
|
|
"test": "vitest run"
|
|
},
|
|
"exports": {
|
|
"./navigation": "./navigation/index.ts",
|
|
"./common/actor-avatar": "./common/actor-avatar.tsx",
|
|
"./common/markdown": "./common/markdown.tsx",
|
|
"./editor": "./editor/index.ts",
|
|
"./issues/components": "./issues/components/index.ts",
|
|
"./issues/hooks": "./issues/hooks/index.ts",
|
|
"./issues/utils/filter": "./issues/utils/filter.ts",
|
|
"./issues/utils/sort": "./issues/utils/sort.ts",
|
|
"./common/task-transcript": "./common/task-transcript/index.ts",
|
|
"./projects/components": "./projects/components/index.ts",
|
|
"./autopilots/components": "./autopilots/components/index.ts",
|
|
"./modals/registry": "./modals/registry.tsx",
|
|
"./modals/create-issue": "./modals/create-issue.tsx",
|
|
"./my-issues": "./my-issues/index.ts",
|
|
"./skills": "./skills/index.ts",
|
|
"./agents": "./agents/index.ts",
|
|
"./members": "./members/index.ts",
|
|
"./inbox": "./inbox/index.ts",
|
|
"./runtimes": "./runtimes/index.ts",
|
|
"./dashboard": "./dashboard/index.ts",
|
|
"./squads": "./squads/index.ts",
|
|
"./squads/components": "./squads/components/index.ts",
|
|
"./workspace/workspace-avatar": "./workspace/workspace-avatar.tsx",
|
|
"./workspace/create-workspace-form": "./workspace/create-workspace-form.tsx",
|
|
"./workspace/no-access-page": "./workspace/no-access-page.tsx",
|
|
"./workspace/new-workspace-page": "./workspace/new-workspace-page.tsx",
|
|
"./workspace/use-workspace-seen": "./workspace/use-workspace-seen.ts",
|
|
"./layout": "./layout/index.ts",
|
|
"./auth": "./auth/index.ts",
|
|
"./search": "./search/index.ts",
|
|
"./chat": "./chat/index.ts",
|
|
"./settings": "./settings/index.ts",
|
|
"./invite": "./invite/index.ts",
|
|
"./invitations": "./invitations/index.ts",
|
|
"./onboarding": "./onboarding/index.ts",
|
|
"./platform": "./platform/index.ts",
|
|
"./i18n": "./i18n/index.ts",
|
|
"./attachments": "./attachments/index.ts",
|
|
"./locales": "./locales/index.ts",
|
|
"./locales/*": "./locales/*"
|
|
},
|
|
"dependencies": {
|
|
"@base-ui/react": "^1.3.0",
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@floating-ui/dom": "^1.7.6",
|
|
"@multica/core": "workspace:*",
|
|
"@multica/ui": "workspace:*",
|
|
"@tiptap/core": "^3.22.1",
|
|
"@tiptap/extension-code-block-lowlight": "^3.22.1",
|
|
"@tiptap/extension-document": "^3.22.1",
|
|
"@tiptap/extension-image": "^3.22.1",
|
|
"@tiptap/extension-link": "^3.22.1",
|
|
"@tiptap/extension-mention": "^3.22.1",
|
|
"@tiptap/extension-paragraph": "^3.22.1",
|
|
"@tiptap/extension-placeholder": "^3.22.1",
|
|
"@tiptap/extension-table": "^3.22.1",
|
|
"@tiptap/extension-table-cell": "^3.22.1",
|
|
"@tiptap/extension-table-header": "^3.22.1",
|
|
"@tiptap/extension-table-row": "^3.22.1",
|
|
"@tiptap/extension-text": "^3.22.1",
|
|
"@tiptap/extension-typography": "^3.22.1",
|
|
"@tiptap/markdown": "^3.22.1",
|
|
"@tiptap/pm": "^3.22.1",
|
|
"@tiptap/react": "^3.22.1",
|
|
"@tiptap/starter-kit": "^3.22.1",
|
|
"@tiptap/suggestion": "^3.22.1",
|
|
"cmdk": "^1.1.1",
|
|
"hast-util-to-html": "^9.0.5",
|
|
"katex": "catalog:",
|
|
"lowlight": "^3.3.0",
|
|
"mermaid": "catalog:",
|
|
"motion": "^12.38.0",
|
|
"pinyin-pro": "3.26.0",
|
|
"react-markdown": "^10.1.0",
|
|
"react-resizable-panels": "^4.7.5",
|
|
"react-virtuoso": "catalog:",
|
|
"recharts": "3.8.0",
|
|
"rehype-katex": "catalog:",
|
|
"rehype-raw": "^7.0.0",
|
|
"remark-breaks": "^4.0.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"remark-math": "catalog:",
|
|
"sonner": "^2.0.7"
|
|
},
|
|
"peerDependencies": {
|
|
"@tanstack/react-query": "catalog:",
|
|
"@tanstack/react-table": "catalog:",
|
|
"i18next": "catalog:",
|
|
"lucide-react": "catalog:",
|
|
"react": "catalog:",
|
|
"react-dom": "catalog:",
|
|
"react-i18next": "catalog:",
|
|
"zustand": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@multica/tsconfig": "workspace:*",
|
|
"@testing-library/jest-dom": "catalog:",
|
|
"@testing-library/react": "catalog:",
|
|
"@testing-library/user-event": "catalog:",
|
|
"@types/react": "catalog:",
|
|
"@types/react-dom": "catalog:",
|
|
"@vitejs/plugin-react": "catalog:",
|
|
"eslint-plugin-i18next": "catalog:",
|
|
"jsdom": "catalog:",
|
|
"rehype-sanitize": "^6.0.0",
|
|
"typescript": "catalog:",
|
|
"vitest": "catalog:"
|
|
}
|
|
}
|