@haklex/rich-renderer-linkcard 0.0.25 → 0.0.27

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.
package/dist/index.mjs CHANGED
@@ -178,6 +178,7 @@ const leetcodePlugin = {
178
178
  displayName: "LeetCode",
179
179
  priority: 65,
180
180
  typeClass: "wide",
181
+ provider: "leetcode",
181
182
  matchUrl(url) {
182
183
  if (url.hostname !== "leetcode.cn" && url.hostname !== "leetcode.com")
183
184
  return null;
@@ -188,7 +189,7 @@ const leetcodePlugin = {
188
189
  isValidId(id) {
189
190
  return typeof id === "string" && id.length > 0;
190
191
  },
191
- async fetch(id) {
192
+ async fetch(id, _meta, context) {
192
193
  const body = {
193
194
  query: `query questionData($titleSlug: String!) {
194
195
  question(titleSlug: $titleSlug) {translatedTitle
@@ -202,14 +203,16 @@ const leetcodePlugin = {
202
203
  `,
203
204
  variables: { titleSlug: id }
204
205
  };
205
- const questionData = await fetch("/api/leetcode", {
206
- method: "POST",
207
- headers: { "Content-Type": "application/json" },
208
- body: JSON.stringify(body)
209
- }).then(async (res) => {
210
- if (!res.ok) throw new Error("Failed to fetch LeetCode question");
211
- return res.json();
212
- });
206
+ const questionData = await fetchJsonWithContext(
207
+ "https://leetcode.cn/graphql/",
208
+ context,
209
+ "leetcode",
210
+ {
211
+ method: "POST",
212
+ headers: { "Content-Type": "application/json" },
213
+ body: JSON.stringify(body)
214
+ }
215
+ );
213
216
  const questionTitleData = camelcaseKeys(questionData.data.question);
214
217
  const stats = JSON.parse(questionTitleData.stats);
215
218
  return {
@@ -615,6 +618,7 @@ const bangumiPlugin = {
615
618
  displayName: "Bangumi",
616
619
  priority: 70,
617
620
  typeClass: "media",
621
+ provider: "bangumi",
618
622
  matchUrl(url) {
619
623
  if (url.hostname !== "bgm.tv" && url.hostname !== "bangumi.tv") return null;
620
624
  const parts = url.pathname.split("/").filter(Boolean);
@@ -627,10 +631,12 @@ const bangumiPlugin = {
627
631
  const [type, realId] = id.split("/");
628
632
  return allowedBangumiTypes.includes(type) && realId?.length > 0;
629
633
  },
630
- async fetch(id) {
634
+ async fetch(id, _meta, context) {
631
635
  const [type, realId] = id.split("/");
632
- const json = await fetch(`/api/bangumi/${type}/${realId}`).then(
633
- (r) => r.json()
636
+ const json = await fetchJsonWithContext(
637
+ `https://api.bgm.tv/v0/${bangumiTypeMap[type]}/${realId}`,
638
+ context,
639
+ "bangumi"
634
640
  );
635
641
  let title2 = "";
636
642
  let originalTitle = "";
@@ -734,6 +740,7 @@ const neteaseMusicPlugin = {
734
740
  displayName: "Netease Music Song",
735
741
  priority: 60,
736
742
  typeClass: "wide",
743
+ provider: "netease-music",
737
744
  matchUrl(url) {
738
745
  if (url.hostname !== "music.163.com") return null;
739
746
  if (!url.pathname.includes("/song") && !url.hash.includes("/song"))
@@ -747,15 +754,12 @@ const neteaseMusicPlugin = {
747
754
  isValidId(id) {
748
755
  return id.length > 0;
749
756
  },
750
- async fetch(id) {
751
- const songData = await fetch("/api/music/netease", {
752
- method: "POST",
753
- headers: { "Content-Type": "application/json" },
754
- body: JSON.stringify({ songId: id })
755
- }).then(async (res) => {
756
- if (!res.ok) throw new Error("Failed to fetch NeteaseMusic song");
757
- return res.json();
758
- });
757
+ async fetch(id, _meta, context) {
758
+ const songData = await fetchJsonWithContext(
759
+ `https://music.163.com/song/${id}`,
760
+ context,
761
+ "netease-music"
762
+ );
759
763
  const songInfo = songData.songs[0];
760
764
  const albumInfo = songInfo.al;
761
765
  const singerInfo = songInfo.ar;
@@ -794,6 +798,7 @@ const qqMusicPlugin = {
794
798
  displayName: "QQ Music Song",
795
799
  priority: 60,
796
800
  typeClass: "wide",
801
+ provider: "qq-music",
797
802
  matchUrl(url) {
798
803
  if (url.hostname !== "y.qq.com") return null;
799
804
  if (!url.pathname.includes("/songDetail/")) return null;
@@ -805,15 +810,12 @@ const qqMusicPlugin = {
805
810
  isValidId(id) {
806
811
  return typeof id === "string" && id.length > 0;
807
812
  },
808
- async fetch(id) {
809
- const songData = await fetch("/api/music/tencent", {
810
- method: "POST",
811
- headers: { "Content-Type": "application/json" },
812
- body: JSON.stringify({ songId: id })
813
- }).then(async (res) => {
814
- if (!res.ok) throw new Error("Failed to fetch QQMusic song");
815
- return res.json();
816
- });
813
+ async fetch(id, _meta, context) {
814
+ const songData = await fetchJsonWithContext(
815
+ `https://y.qq.com/song/${id}`,
816
+ context,
817
+ "qq-music"
818
+ );
817
819
  const songInfo = songData.data[0];
818
820
  const albumId = songInfo.album.mid;
819
821
  return {
@@ -948,12 +950,12 @@ const tmdbPlugin = {
948
950
  }
949
951
  };
950
952
  function createMxSpacePlugin(config) {
951
- const { webUrl, apiBaseUrl } = config;
952
- const webHost = new URL(webUrl).hostname;
953
+ const webHost = new URL(config.webUrl).hostname;
953
954
  return {
954
955
  name: "self",
955
956
  displayName: "MxSpace Article",
956
957
  priority: 10,
958
+ provider: "mx-space",
957
959
  matchUrl(url) {
958
960
  if (webHost !== url.hostname) return null;
959
961
  if (!url.pathname.startsWith("/posts/") && !url.pathname.startsWith("/notes/")) {
@@ -967,19 +969,22 @@ function createMxSpacePlugin(config) {
967
969
  if (type === "posts") return rest.length === 2;
968
970
  return rest.length === 1;
969
971
  },
970
- async fetch(id) {
972
+ async fetch(id, _meta, context) {
971
973
  const [type, ...rest] = id.split("/");
972
- const base = apiBaseUrl || "";
973
974
  let data = { title: "", text: "" };
974
975
  if (type === "posts") {
975
976
  const [cate, slug] = rest;
976
- data = await fetch(`${base}/api/v2/posts/${cate}/${slug}`).then(
977
- (r) => r.json()
977
+ data = await fetchJsonWithContext(
978
+ `posts/${cate}/${slug}`,
979
+ context,
980
+ "mx-space"
978
981
  );
979
982
  } else if (type === "notes") {
980
983
  const [nid] = rest;
981
- const response = await fetch(`${base}/api/v2/notes/${nid}`).then(
982
- (r) => r.json()
984
+ const response = await fetchJsonWithContext(
985
+ `notes/${nid}`,
986
+ context,
987
+ "mx-space"
983
988
  );
984
989
  data = response.data || response;
985
990
  }
@@ -998,6 +1003,7 @@ const mxSpacePlugin = {
998
1003
  name: "self",
999
1004
  displayName: "MxSpace Article",
1000
1005
  priority: 10,
1006
+ provider: "mx-space",
1001
1007
  matchUrl(_url) {
1002
1008
  return null;
1003
1009
  },
@@ -1007,10 +1013,33 @@ const mxSpacePlugin = {
1007
1013
  if (type === "posts") return rest.length === 2;
1008
1014
  return rest.length === 1;
1009
1015
  },
1010
- async fetch(_id) {
1011
- throw new Error(
1012
- "MxSpace plugin requires configuration. Use createMxSpacePlugin()."
1013
- );
1016
+ async fetch(id, _meta, context) {
1017
+ const [type, ...rest] = id.split("/");
1018
+ let data = { title: "", text: "" };
1019
+ if (type === "posts") {
1020
+ const [cate, slug] = rest;
1021
+ data = await fetchJsonWithContext(
1022
+ `posts/${cate}/${slug}`,
1023
+ context,
1024
+ "mx-space"
1025
+ );
1026
+ } else if (type === "notes") {
1027
+ const [nid] = rest;
1028
+ const response = await fetchJsonWithContext(
1029
+ `notes/${nid}`,
1030
+ context,
1031
+ "mx-space"
1032
+ );
1033
+ data = response.data || response;
1034
+ }
1035
+ const coverImage = data.cover || data.meta?.cover;
1036
+ const spotlightColor = generateColor(data.title);
1037
+ return {
1038
+ title: data.title,
1039
+ desc: data.summary || `${stripMarkdown(data.text).slice(0, 50)}...`,
1040
+ image: coverImage || data.images?.[0]?.src,
1041
+ color: spotlightColor
1042
+ };
1014
1043
  }
1015
1044
  };
1016
1045
  const plugins = [
@@ -1 +1 @@
1
- {"version":3,"file":"leetcode.d.ts","sourceRoot":"","sources":["../../../src/plugins/code/leetcode.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,cAAc,EAAkB,MAAM,aAAa,CAAA;AAgB/E,eAAO,MAAM,cAAc,EAAE,cAsF5B,CAAA"}
1
+ {"version":3,"file":"leetcode.d.ts","sourceRoot":"","sources":["../../../src/plugins/code/leetcode.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,aAAa,CAAA;AAgBpB,eAAO,MAAM,cAAc,EAAE,cA6F5B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"bangumi.d.ts","sourceRoot":"","sources":["../../../src/plugins/media/bangumi.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,cAAc,EAAkB,MAAM,aAAa,CAAA;AAG/E,eAAO,MAAM,aAAa,EAAE,cA0I3B,CAAA"}
1
+ {"version":3,"file":"bangumi.d.ts","sourceRoot":"","sources":["../../../src/plugins/media/bangumi.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,aAAa,CAAA;AAQpB,eAAO,MAAM,aAAa,EAAE,cAiJ3B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"netease-music.d.ts","sourceRoot":"","sources":["../../../src/plugins/media/netease-music.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,cAAc,EAAkB,MAAM,aAAa,CAAA;AAE/E,eAAO,MAAM,kBAAkB,EAAE,cAoEhC,CAAA"}
1
+ {"version":3,"file":"netease-music.d.ts","sourceRoot":"","sources":["../../../src/plugins/media/netease-music.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,aAAa,CAAA;AAGpB,eAAO,MAAM,kBAAkB,EAAE,cAsEhC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"qq-music.d.ts","sourceRoot":"","sources":["../../../src/plugins/media/qq-music.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,cAAc,EAAkB,MAAM,aAAa,CAAA;AAE/E,eAAO,MAAM,aAAa,EAAE,cAiE3B,CAAA"}
1
+ {"version":3,"file":"qq-music.d.ts","sourceRoot":"","sources":["../../../src/plugins/media/qq-music.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,aAAa,CAAA;AAGpB,eAAO,MAAM,aAAa,EAAE,cAmE3B,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { LinkCardPlugin } from '../../types';
2
2
  export interface MxSpacePluginConfig {
3
3
  webUrl: string;
4
- apiBaseUrl?: string;
5
4
  }
6
5
  export declare function createMxSpacePlugin(config: MxSpacePluginConfig): LinkCardPlugin;
7
6
  export declare const mxSpacePlugin: LinkCardPlugin;
@@ -1 +1 @@
1
- {"version":3,"file":"mx-space.d.ts","sourceRoot":"","sources":["../../../src/plugins/self/mx-space.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,cAAc,EAAkB,MAAM,aAAa,CAAA;AAG/E,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,mBAAmB,GAC1B,cAAc,CA+DhB;AAED,eAAO,MAAM,aAAa,EAAE,cAqB3B,CAAA"}
1
+ {"version":3,"file":"mx-space.d.ts","sourceRoot":"","sources":["../../../src/plugins/self/mx-space.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,aAAa,CAAA;AAGpB,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,mBAAmB,GAC1B,cAAc,CAsEhB;AAED,eAAO,MAAM,aAAa,EAAE,cA2D3B,CAAA"}
@@ -1 +1 @@
1
- @keyframes _13weebvm{0%,to{opacity:1}50%{opacity:.5}}._13weebv0{position:relative;display:flex;box-sizing:border-box;align-items:flex-start;gap:.75rem;width:32rem;max-width:100%;margin:1.25rem auto;padding:1rem;border-radius:.5rem;overflow:hidden;cursor:pointer;text-decoration:none;color:inherit;text-indent:0;font-family:ui-sans-serif,system-ui,-apple-system,sans-serif;border:1px solid color-mix(in srgb,var(--rc-border) 80%,transparent);background-color:color-mix(in srgb,var(--rc-bg-secondary) 80%,transparent);backdrop-filter:blur(12px) saturate(150%);transition:background-color .2s}._13weebv0:hover{border-color:var(--rc-border);background-color:var(--rc-bg-secondary)}._13weebv1{align-items:center}._13weebv0 *{font-style:normal!important}._13weebv0 span{border-bottom:0!important}._13weebv2{position:absolute;inset:0;z-index:0;pointer-events:none}._13weebv3{position:relative;flex-shrink:0;width:2.5rem;height:2.5rem;border-radius:.5rem;background-size:cover;background-position:center;background-repeat:no-repeat;background-color:var(--rc-bg-secondary);z-index:1}._13weebv4{width:6.25rem!important;height:auto!important;min-height:8.75rem;aspect-ratio:2 / 3;align-self:stretch}._13weebv5{width:3.5rem!important;height:5rem!important;aspect-ratio:auto;align-self:flex-start}._13weebv6{width:3.5rem!important;height:3.5rem!important;aspect-ratio:auto;align-self:flex-start}._13weebv7{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border-radius:.5rem;background-color:var(--rc-bg-secondary);z-index:1}._13weebv7 img{width:1.25rem;height:1.25rem;border-radius:.25rem}._13weebv7 svg{width:1.25rem;height:1.25rem;color:var(--rc-text-secondary)}._13weebv8{flex:1;min-width:0;position:relative;z-index:1}._13weebv9{display:flex;align-items:center;gap:.5rem;line-height:1.25rem}._13weebva{flex:1;min-width:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;font-size:var(--rc-font-size-md);font-weight:600;line-height:1.25rem}._13weebvb{flex-shrink:0;margin-left:auto;width:.875rem;height:.875rem;color:var(--rc-text-secondary);opacity:0;transition:opacity .2s}._13weebv0:hover ._13weebvb{opacity:1}._13weebvc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;margin-top:.375rem;font-size:var(--rc-font-size-md);line-height:1.5;color:var(--rc-text-secondary);min-width:0}._13weebve{flex-shrink:0;width:1rem;height:1rem;display:inline;vertical-align:middle;margin-right:.375rem}._13weebvf{width:100%!important;height:auto!important;padding:0}._13weebvf ._13weebv3{border-radius:0}._13weebvf ._13weebv3:after{content:"";position:absolute;inset:0;background:linear-gradient(to right,transparent 60%,var(--rc-bg-secondary));pointer-events:none}._13weebvf ._13weebv8{padding:1rem;display:flex;flex-direction:column;justify-content:center}._13weebvg{width:100%;max-width:40rem}._13weebvh,._13weebvi{width:100%}._13weebvi ._13weebvc{-webkit-line-clamp:4}._13weebvj{width:36rem}._13weebvk{width:38rem}._13weebvk ._13weebvc{-webkit-line-clamp:3}._13weebv0[data-source=gh-repo]{height:6.25rem}._13weebv0[data-source=gh-commit],._13weebv0[data-source=gh-pr],._13weebv0[data-source=gh-issue],._13weebv0[data-source=gh-discussion]{height:5rem}._13weebv0[data-source=leetcode]{height:5.25rem}._13weebv0[data-source=arxiv]{height:6rem}._13weebv0[data-source=netease-music-song],._13weebv0[data-source=qq-music-song]{height:5.75rem}._13weebvl{animation-play-state:paused}._13weebvl ._13weebva{width:8rem;height:1.25rem;border-radius:.375rem;background-color:var(--rc-border)}._13weebvl ._13weebvc{width:100%;margin-top:.5rem;height:.875rem;border-radius:.375rem;background-color:var(--rc-border)}._13weebvl ._13weebvd{width:80%}._13weebvl ._13weebv3{background-color:var(--rc-border)}._13weebvl ._13weebva,._13weebvl ._13weebvc,._13weebvl ._13weebv3{animation:_13weebvm 2s cubic-bezier(.4,0,.6,1) infinite}._13weebvl._13weebvn{background-color:color-mix(in srgb,var(--rc-alert-caution) 12%,transparent)!important}._13weebvl._13weebvn ._13weebva,._13weebvl._13weebvn ._13weebvc,._13weebvl._13weebvn ._13weebv3{background-color:color-mix(in srgb,var(--rc-alert-caution) 47%,transparent);color:transparent}._13weebvl._13weebvn ._13weebv3{background-image:none!important}._13weebvo{display:block}._13weebvp{display:flex;flex-direction:column;gap:8px;width:340px;padding:12px;font-size:var(--rc-font-size-sm);background-color:var(--rc-bg);border-color:var(--rc-border);color:var(--rc-text)}._13weebvq{display:flex;align-items:center;gap:8px;padding:8px 12px;background-color:var(--rc-bg-secondary);border-radius:var(--rc-radius-md);min-width:0}._13weebvr{flex-shrink:0;color:var(--rc-text-secondary)}._13weebvs{flex:1;color:var(--rc-text);font-family:var(--rc-font-mono);font-size:var(--rc-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}._13weebvt{flex:1;appearance:none;border:none;background-color:transparent;color:var(--rc-text);font-family:var(--rc-font-mono);font-size:var(--rc-font-size-sm);padding:0;outline:none;min-width:0}._13weebvu{display:flex;align-items:center;gap:4px}._13weebvv{display:inline-flex;align-items:center;gap:6px;appearance:none;border:none;background:none;color:var(--rc-text);font-size:var(--rc-font-size-sm);font-weight:500;cursor:pointer;padding:4px 8px;border-radius:var(--rc-radius-sm);transition:color .15s ease,background-color .15s ease;white-space:nowrap}._13weebvv:hover{background-color:var(--rc-bg-secondary)}._13weebvw{margin-left:auto}@media(max-width:640px){._13weebvj{width:100%}}
1
+ @keyframes _13weebvm{0%,to{opacity:1}50%{opacity:.5}}._13weebv0{position:relative;display:flex;box-sizing:border-box;align-items:flex-start;gap:.75rem;width:32rem;max-width:100%;margin:1.25rem auto;padding:1rem;border-radius:.5rem;overflow:hidden;cursor:pointer;text-decoration:none;color:inherit;text-indent:0;font-family:var(--rc-font-family);border:1px solid color-mix(in srgb,var(--rc-border) 80%,transparent);background-color:color-mix(in srgb,var(--rc-bg-secondary) 80%,transparent);backdrop-filter:blur(12px) saturate(150%);transition:background-color .2s}._13weebv0:hover{border-color:var(--rc-border);background-color:var(--rc-bg-secondary)}._13weebv1{align-items:center}._13weebv0 *{font-style:normal!important}._13weebv0 span{border-bottom:0!important}._13weebv2{position:absolute;inset:0;z-index:0;pointer-events:none}._13weebv3{position:relative;flex-shrink:0;width:2.5rem;height:2.5rem;border-radius:.5rem;background-size:cover;background-position:center;background-repeat:no-repeat;background-color:var(--rc-bg-secondary);z-index:1}._13weebv4{width:6.25rem!important;height:auto!important;min-height:8.75rem;aspect-ratio:2 / 3;align-self:stretch}._13weebv5{width:3.5rem!important;height:5rem!important;aspect-ratio:auto;align-self:flex-start}._13weebv6{width:3.5rem!important;height:3.5rem!important;aspect-ratio:auto;align-self:flex-start}._13weebv7{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border-radius:.5rem;background-color:var(--rc-bg-secondary);z-index:1}._13weebv7 img{width:1.25rem;height:1.25rem;border-radius:.25rem}._13weebv7 svg{width:1.25rem;height:1.25rem;color:var(--rc-text-secondary)}._13weebv8{flex:1;min-width:0;position:relative;z-index:1}._13weebv9{display:flex;align-items:center;gap:.5rem;line-height:1.25rem}._13weebva{flex:1;min-width:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;font-size:var(--rc-font-size-md);font-weight:600;line-height:1.25rem}._13weebvb{flex-shrink:0;margin-left:auto;width:.875rem;height:.875rem;color:var(--rc-text-secondary);opacity:0;transition:opacity .2s}._13weebv0:hover ._13weebvb{opacity:1}._13weebvc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;margin-top:.375rem;font-size:var(--rc-font-size-md);line-height:1.5;color:var(--rc-text-secondary);min-width:0}._13weebve{flex-shrink:0;width:1rem;height:1rem;display:inline;vertical-align:middle;margin-right:.375rem}._13weebvf{width:100%!important;height:auto!important;max-width:40rem;padding:0}._13weebvf ._13weebv3{border-radius:0;align-self:stretch;height:auto!important}._13weebvf ._13weebv3:after{content:"";position:absolute;inset:0;background:linear-gradient(to right,transparent 60%,var(--rc-bg-secondary));pointer-events:none}._13weebvf ._13weebv8{padding:1rem;display:flex;flex-direction:column;justify-content:center}._13weebvg{width:100%;max-width:40rem}._13weebvh,._13weebvi{width:100%}._13weebvi ._13weebvc{-webkit-line-clamp:4}._13weebvj{width:36rem}._13weebvk{width:38rem}._13weebvk ._13weebvc{-webkit-line-clamp:3}._13weebv0[data-source=gh-repo]{height:6.25rem}._13weebv0[data-source=gh-commit],._13weebv0[data-source=gh-pr],._13weebv0[data-source=gh-issue],._13weebv0[data-source=gh-discussion]{height:5rem}._13weebv0[data-source=leetcode]{height:5.25rem}._13weebv0[data-source=arxiv]{height:6rem}._13weebv0[data-source=netease-music-song],._13weebv0[data-source=qq-music-song]{height:5.75rem}._13weebvl{animation-play-state:paused}._13weebvl ._13weebva{width:8rem;height:1.25rem;border-radius:.375rem;background-color:var(--rc-border)}._13weebvl ._13weebvc{width:100%;margin-top:.5rem;height:.875rem;border-radius:.375rem;background-color:var(--rc-border)}._13weebvl ._13weebvd{width:80%}._13weebvl ._13weebv3{background-color:var(--rc-border)}._13weebvl ._13weebva,._13weebvl ._13weebvc,._13weebvl ._13weebv3{animation:_13weebvm 2s cubic-bezier(.4,0,.6,1) infinite}._13weebvl._13weebvn{background-color:color-mix(in srgb,var(--rc-alert-caution) 12%,transparent)!important}._13weebvl._13weebvn ._13weebva,._13weebvl._13weebvn ._13weebvc,._13weebvl._13weebvn ._13weebv3{background-color:color-mix(in srgb,var(--rc-alert-caution) 47%,transparent);color:transparent}._13weebvl._13weebvn ._13weebv3{background-image:none!important}._13weebvo{display:block}._13weebvp{display:flex;flex-direction:column;gap:8px;width:340px;padding:12px;font-size:var(--rc-font-size-sm);background-color:var(--rc-bg);border-color:var(--rc-border);color:var(--rc-text)}._13weebvq{display:flex;align-items:center;gap:8px;padding:8px 12px;background-color:var(--rc-bg-secondary);border-radius:var(--rc-radius-md);min-width:0}._13weebvr{flex-shrink:0;color:var(--rc-text-secondary)}._13weebvs{flex:1;color:var(--rc-text);font-family:var(--rc-font-mono);font-size:var(--rc-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}._13weebvt{flex:1;appearance:none;border:none;background-color:transparent;color:var(--rc-text);font-family:var(--rc-font-mono);font-size:var(--rc-font-size-sm);padding:0;outline:none;min-width:0}._13weebvu{display:flex;align-items:center;gap:4px}._13weebvv{display:inline-flex;align-items:center;gap:6px;appearance:none;border:none;background:none;color:var(--rc-text);font-size:var(--rc-font-size-sm);font-weight:500;cursor:pointer;padding:4px 8px;border-radius:var(--rc-radius-sm);transition:color .15s ease,background-color .15s ease;white-space:nowrap}._13weebvv:hover{background-color:var(--rc-bg-secondary)}._13weebvw{margin-left:auto}@media(max-width:640px){._13weebvj{width:100%}}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../src/styles.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCrB,CAAA;AAEV,eAAO,MAAM,IAAI,QA2Bf,CAAA;AAEF,eAAO,MAAM,aAAa,QAExB,CAAA;AAKF,eAAO,MAAM,EAAE,QAKb,CAAA;AAEF,eAAO,MAAM,KAAK,QAWhB,CAAA;AAEF,eAAO,MAAM,WAAW,QAMtB,CAAA;AAEF,eAAO,MAAM,aAAa,QAKxB,CAAA;AAEF,eAAO,MAAM,aAAa,QAKxB,CAAA;AAEF,eAAO,MAAM,IAAI,QAUf,CAAA;AAcF,eAAO,MAAM,OAAO,QAKlB,CAAA;AAEF,eAAO,MAAM,KAAK,QAKhB,CAAA;AAEF,eAAO,MAAM,SAAS,QAWpB,CAAA;AAEF,eAAO,MAAM,QAAQ,QAanB,CAAA;AAEF,eAAO,MAAM,IAAI,QAWf,CAAA;AAEF,eAAO,MAAM,KAAK,QAAY,CAAA;AAE9B,eAAO,MAAM,OAAO,QAOlB,CAAA;AAEF,eAAO,MAAM,YAAY,QAIvB,CAAA;AAmBF,eAAO,MAAM,QAAQ,QAA8C,CAAA;AACnE,eAAO,MAAM,QAAQ,QAA2B,CAAA;AAChD,eAAO,MAAM,SAAS,QAA2B,CAAA;AAGjD,eAAO,MAAM,UAAU,QAGrB,CAAA;AAEF,eAAO,MAAM,YAAY,QAA4B,CAAA;AAerD,eAAO,MAAM,YAAY,QAA0C,CAAA;AAmCnE,eAAO,MAAM,SAAS,QAAY,CAAA;AAmBlC,eAAO,MAAM,WAAW,QAEtB,CAAA;AAEF,eAAO,MAAM,SAAS,QAUpB,CAAA;AAEF,eAAO,MAAM,UAAU,QAQrB,CAAA;AAEF,eAAO,MAAM,YAAY,QAGvB,CAAA;AAEF,eAAO,MAAM,WAAW,QAStB,CAAA;AAEF,eAAO,MAAM,SAAS,QAWpB,CAAA;AAEF,eAAO,MAAM,WAAW,QAItB,CAAA;AAEF,eAAO,MAAM,gBAAgB,QAoB3B,CAAA;AAEF,eAAO,MAAM,mBAAmB,QAE9B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAA;AAEV,eAAO,MAAM,sBAAsB;;;;;;CAMzB,CAAA;AAEV,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAavD,CAAA"}
1
+ {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../src/styles.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCrB,CAAA;AAEV,eAAO,MAAM,IAAI,QA2Bf,CAAA;AAEF,eAAO,MAAM,aAAa,QAExB,CAAA;AAKF,eAAO,MAAM,EAAE,QAKb,CAAA;AAEF,eAAO,MAAM,KAAK,QAWhB,CAAA;AAEF,eAAO,MAAM,WAAW,QAMtB,CAAA;AAEF,eAAO,MAAM,aAAa,QAKxB,CAAA;AAEF,eAAO,MAAM,aAAa,QAKxB,CAAA;AAEF,eAAO,MAAM,IAAI,QAUf,CAAA;AAcF,eAAO,MAAM,OAAO,QAKlB,CAAA;AAEF,eAAO,MAAM,KAAK,QAKhB,CAAA;AAEF,eAAO,MAAM,SAAS,QAWpB,CAAA;AAEF,eAAO,MAAM,QAAQ,QAanB,CAAA;AAEF,eAAO,MAAM,IAAI,QAWf,CAAA;AAEF,eAAO,MAAM,KAAK,QAAY,CAAA;AAE9B,eAAO,MAAM,OAAO,QAOlB,CAAA;AAEF,eAAO,MAAM,YAAY,QAKvB,CAAA;AAuBF,eAAO,MAAM,QAAQ,QAA8C,CAAA;AACnE,eAAO,MAAM,QAAQ,QAA2B,CAAA;AAChD,eAAO,MAAM,SAAS,QAA2B,CAAA;AAGjD,eAAO,MAAM,UAAU,QAGrB,CAAA;AAEF,eAAO,MAAM,YAAY,QAA4B,CAAA;AAerD,eAAO,MAAM,YAAY,QAA0C,CAAA;AAmCnE,eAAO,MAAM,SAAS,QAAY,CAAA;AAmBlC,eAAO,MAAM,WAAW,QAEtB,CAAA;AAEF,eAAO,MAAM,SAAS,QAUpB,CAAA;AAEF,eAAO,MAAM,UAAU,QAQrB,CAAA;AAEF,eAAO,MAAM,YAAY,QAGvB,CAAA;AAEF,eAAO,MAAM,WAAW,QAStB,CAAA;AAEF,eAAO,MAAM,SAAS,QAWpB,CAAA;AAEF,eAAO,MAAM,WAAW,QAItB,CAAA;AAEF,eAAO,MAAM,gBAAgB,QAoB3B,CAAA;AAEF,eAAO,MAAM,mBAAmB,QAE9B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAA;AAEV,eAAO,MAAM,sBAAsB;;;;;;CAMzB,CAAA;AAEV,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAavD,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-renderer-linkcard",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -17,9 +17,9 @@
17
17
  "dependencies": {
18
18
  "lucide-react": "^0.574.0",
19
19
  "react-intersection-observer": "^9.16.0",
20
- "@haklex/rich-editor": "0.0.25",
21
- "@haklex/rich-editor-ui": "0.0.25",
22
- "@haklex/rich-style-token": "0.0.25"
20
+ "@haklex/rich-editor": "0.0.27",
21
+ "@haklex/rich-editor-ui": "0.0.27",
22
+ "@haklex/rich-style-token": "0.0.27"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@lexical/link": "^0.40.0",