@haklex/rich-renderer-linkcard 0.0.66 → 0.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -147,7 +147,7 @@ function generateColor(str, saturation = [30, 35], lightness = [60, 70]) {
147
147
  return hslToHex(h, s, l);
148
148
  }
149
149
  function stripMarkdown(text) {
150
- return text.replaceAll(/!\[.*?\]\(.*?\)/g, "").replaceAll(/\[([^\]]*)\]\(.*?\)/g, "$1").replaceAll(/[#*>_`~]/g, "").replaceAll(/\n+/g, " ").trim();
150
+ return text.replaceAll(/!\[[^\]]*\]\([^)]*\)/g, "").replaceAll(/\[([^\]]*)\]\([^)]*\)/g, "$1").replaceAll(/[#*>_`~]/g, "").replaceAll(/\n+/g, " ").trim();
151
151
  }
152
152
  function getDifficultyColor(difficulty) {
153
153
  switch (difficulty) {
package/dist/index.mjs CHANGED
@@ -7,8 +7,8 @@ import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext
7
7
  import { $getNodeByKey, $createTextNode, $createParagraphNode, $insertNodes, $createNodeSelection, $setSelection, PASTE_COMMAND, $getSelection, $isRangeSelection, $isParagraphNode, COMMAND_PRIORITY_LOW } from "lexical";
8
8
  import { Link, ExternalLink, RemoveFormatting, Unlink, CreditCard } from "lucide-react";
9
9
  import { useState, useRef, useEffect, useCallback, createElement, useMemo } from "react";
10
- import { z as editWrapper, A as semanticClassNames, B as editPanel, C as editUrlRow, D as editLinkIcon, E as editInput, r as matchUrl } from "./LinkCardRenderer-7Om5wTfX.js";
11
- import { L, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t, u, v, w, x, y } from "./LinkCardRenderer-7Om5wTfX.js";
10
+ import { z as editWrapper, A as semanticClassNames, B as editPanel, C as editUrlRow, D as editLinkIcon, E as editInput, r as matchUrl } from "./LinkCardRenderer-CJB5CmHP.js";
11
+ import { L, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t, u, v, w, x, y } from "./LinkCardRenderer-CJB5CmHP.js";
12
12
  import { $isLinkCardNode, LinkCardNode } from "@haklex/rich-editor/nodes";
13
13
  import { createRendererDecoration, LinkCardRenderer } from "@haklex/rich-editor/renderers";
14
14
  import { Popover, PopoverTrigger, PopoverPanel, ActionBar, ActionButton } from "@haklex/rich-editor-ui";
package/dist/static.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { L, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y } from "./LinkCardRenderer-7Om5wTfX.js";
1
+ import { L, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y } from "./LinkCardRenderer-CJB5CmHP.js";
2
2
  export {
3
3
  L as LanguageToColorMap,
4
4
  a as LinkCardFetchProvider,
package/package.json CHANGED
@@ -1,8 +1,14 @@
1
1
  {
2
2
  "name": "@haklex/rich-renderer-linkcard",
3
- "type": "module",
4
- "version": "0.0.66",
3
+ "version": "0.0.67",
4
+ "description": "Rich link preview card renderer with extensible URL plugins",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Innei/haklex.git",
8
+ "directory": "packages/rich-renderer-linkcard"
9
+ },
5
10
  "license": "MIT",
11
+ "type": "module",
6
12
  "exports": {
7
13
  ".": {
8
14
  "import": "./dist/index.mjs",
@@ -18,19 +24,12 @@
18
24
  "files": [
19
25
  "dist"
20
26
  ],
21
- "peerDependencies": {
22
- "@lexical/link": "^0.41.0",
23
- "@lexical/react": "^0.41.0",
24
- "lexical": "^0.41.0",
25
- "react": ">=19",
26
- "react-dom": ">=19"
27
- },
28
27
  "dependencies": {
29
28
  "lucide-react": "^0.577.0",
30
29
  "react-intersection-observer": "^10.0.3",
31
- "@haklex/rich-editor": "0.0.66",
32
- "@haklex/rich-editor-ui": "0.0.66",
33
- "@haklex/rich-style-token": "0.0.66"
30
+ "@haklex/rich-editor": "0.0.67",
31
+ "@haklex/rich-editor-ui": "0.0.67",
32
+ "@haklex/rich-style-token": "0.0.67"
34
33
  },
35
34
  "devDependencies": {
36
35
  "@lexical/link": "^0.41.0",
@@ -46,15 +45,16 @@
46
45
  "vite": "^7.3.1",
47
46
  "vite-plugin-dts": "^4.5.4"
48
47
  },
48
+ "peerDependencies": {
49
+ "@lexical/link": "^0.41.0",
50
+ "@lexical/react": "^0.41.0",
51
+ "lexical": "^0.41.0",
52
+ "react": ">=19",
53
+ "react-dom": ">=19"
54
+ },
49
55
  "publishConfig": {
50
56
  "access": "public"
51
57
  },
52
- "repository": {
53
- "type": "git",
54
- "url": "https://github.com/Innei/haklex.git",
55
- "directory": "packages/rich-renderer-linkcard"
56
- },
57
- "description": "Rich link preview card renderer with extensible URL plugins",
58
58
  "scripts": {
59
59
  "build": "vite build",
60
60
  "dev:build": "vite build --watch"