feat(markdown): migrate to methanium/ui's markdown
This commit is contained in:
parent
f83e71be6b
commit
dbb407606b
36 changed files with 1355 additions and 2887 deletions
|
|
@ -23,7 +23,6 @@
|
|||
"@tensamin/chat": "workspace:*",
|
||||
"@tensamin/crypto": "workspace:*",
|
||||
"@tensamin/hotkeys": "workspace:*",
|
||||
"@tensamin/markdown": "workspace:*",
|
||||
"@tensamin/mtp": "workspace:*",
|
||||
"@tensamin/notifications": "workspace:*",
|
||||
"@tensamin/onboarding": "workspace:*",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import type { User } from "@tensamin/user/context";
|
||||
import { Avatar, AvatarFallback, AvatarImage, Button } from "@methanium/ui";
|
||||
import Text from "@tensamin/markdown/text";
|
||||
import { Text } from "@methanium/ui/markdown";
|
||||
import { ChevronDown, ChevronUp } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { createReadStream, realpathSync, statSync } from "node:fs";
|
||||
import { createReadStream, statSync } from "node:fs";
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
|
@ -11,11 +11,6 @@ import { methaniumUi } from "@methanium/ui/vite";
|
|||
|
||||
const host = process.env.TAURI_DEV_HOST;
|
||||
const appDir = dirname(fileURLToPath(import.meta.url));
|
||||
const markdownPackageDir = resolve(appDir, "../../packages/markdown");
|
||||
|
||||
function resolveMarkdownDependency(packageName: string): string {
|
||||
return realpathSync(resolve(markdownPackageDir, "node_modules", packageName));
|
||||
}
|
||||
|
||||
function deepFilterAssetHeaders(rootDir: string): Plugin {
|
||||
const serveModel = (
|
||||
|
|
@ -57,24 +52,6 @@ export default defineConfig({
|
|||
clearScreen: false,
|
||||
resolve: {
|
||||
tsconfigPaths: true,
|
||||
alias: [
|
||||
{
|
||||
find: "@codemirror/commands",
|
||||
replacement: resolveMarkdownDependency("@codemirror/commands"),
|
||||
},
|
||||
{
|
||||
find: "@codemirror/lang-markdown",
|
||||
replacement: resolveMarkdownDependency("@codemirror/lang-markdown"),
|
||||
},
|
||||
{
|
||||
find: "@codemirror/state",
|
||||
replacement: resolveMarkdownDependency("@codemirror/state"),
|
||||
},
|
||||
{
|
||||
find: "@codemirror/view",
|
||||
replacement: resolveMarkdownDependency("@codemirror/view"),
|
||||
},
|
||||
],
|
||||
dedupe: [
|
||||
"react",
|
||||
"react-dom",
|
||||
|
|
@ -90,10 +67,6 @@ export default defineConfig({
|
|||
"@tensamin/user",
|
||||
"@tensamin/tauri",
|
||||
"@tensamin/chat",
|
||||
"@codemirror/commands",
|
||||
"@codemirror/lang-markdown",
|
||||
"@codemirror/state",
|
||||
"@codemirror/view",
|
||||
],
|
||||
},
|
||||
server: {
|
||||
|
|
@ -133,7 +106,6 @@ export default defineConfig({
|
|||
"@tensamin/crypto",
|
||||
"@tensamin/crypto/context",
|
||||
"@tensamin/hotkeys",
|
||||
"@tensamin/markdown",
|
||||
"@tensamin/mtp",
|
||||
"@tensamin/notifications",
|
||||
"@tensamin/onboarding",
|
||||
|
|
|
|||
Loading…
Reference in a new issue