@haklex/rich-ext-embed 0.31.1 → 0.32.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @haklex/rich-ext-embed
2
2
 
3
- URL embed extension supporting Twitter, YouTube, Bilibili, CodeSandbox, and GitHub Gist.
3
+ URL embed extension supporting Twitter, YouTube, Apple Music, Spotify, Bilibili, CodeSandbox, and GitHub Gist.
4
4
 
5
5
  ## Installation
6
6
 
@@ -86,6 +86,8 @@ import {
86
86
  matchEmbedUrl,
87
87
  isTweetUrl,
88
88
  isYoutubeUrl,
89
+ isAppleMusicUrl,
90
+ isSpotifyUrl,
89
91
  isBilibiliVideoUrl,
90
92
  isCodesandboxUrl,
91
93
  isGistUrl,
@@ -128,7 +130,7 @@ import '@haklex/rich-ext-embed/style.css';
128
130
  ### URL Matchers
129
131
 
130
132
  - `matchEmbedUrl` -- match a URL against all supported embed types
131
- - `isTweetUrl`, `isYoutubeUrl`, `isBilibiliVideoUrl`, `isCodesandboxUrl`, `isGistUrl`, `isGithubFilePreviewUrl` -- individual URL matchers
133
+ - `isTweetUrl`, `isYoutubeUrl`, `isAppleMusicUrl`, `isSpotifyUrl`, `isBilibiliVideoUrl`, `isCodesandboxUrl`, `isGistUrl`, `isGithubFilePreviewUrl` -- individual URL matchers
132
134
  - `createSelfThinkingMatcher` -- factory for custom URL matchers
133
135
 
134
136
  ### Types
@@ -13,6 +13,8 @@ var semanticClassNames$1 = {
13
13
  embedGeneric: "rich-embed--generic",
14
14
  embedTweet: "rich-embed--tweet",
15
15
  embedYoutube: "rich-embed--youtube",
16
+ embedAppleMusic: "rich-embed--apple-music",
17
+ embedSpotify: "rich-embed--spotify",
16
18
  embedCodesandbox: "rich-embed--codesandbox",
17
19
  embedBilibili: "rich-embed--bilibili",
18
20
  embedGithubFile: "rich-embed--github-file",
@@ -27,6 +29,8 @@ var semanticEmbedModifierClass = {
27
29
  generic: "rich-embed--generic",
28
30
  tweet: "rich-embed--tweet",
29
31
  youtube: "rich-embed--youtube",
32
+ "apple-music": "rich-embed--apple-music",
33
+ spotify: "rich-embed--spotify",
30
34
  codesandbox: "rich-embed--codesandbox",
31
35
  bilibili: "rich-embed--bilibili",
32
36
  "github-file": "rich-embed--github-file",
@@ -39,16 +43,18 @@ var embedType = {
39
43
  generic: "_1qucygc3",
40
44
  tweet: "_1qucygc4",
41
45
  youtube: "_1qucygc5",
42
- codesandbox: "_1qucygc6",
43
- bilibili: "_1qucygc7",
44
- "github-file": "_1qucygc8",
45
- "github-gist": "_1qucygc9",
46
- thinking: "_1qucygca"
46
+ "apple-music": "_1qucygc6",
47
+ spotify: "_1qucygc7",
48
+ codesandbox: "_1qucygc8",
49
+ bilibili: "_1qucygc9",
50
+ "github-file": "_1qucygca",
51
+ "github-gist": "_1qucygcb",
52
+ thinking: "_1qucygcc"
47
53
  };
48
- var badge = "_1qucygcb";
49
- var dot = "_1qucygcc";
50
- var divider = "_1qucygcd";
51
- var input = "_1qucygce";
54
+ var badge = "_1qucygcd";
55
+ var dot = "_1qucygce";
56
+ var divider = "_1qucygcf";
57
+ var input = "_1qucygcg";
52
58
  //#endregion
53
59
  //#region src/context/EmbedRendererContext.tsx
54
60
  var EmbedRendererCtx = createContext({});
@@ -75,6 +81,8 @@ var semanticClassNames = {
75
81
  fallbackGeneric: "embed-static-fallback--generic",
76
82
  fallbackTweet: "embed-static-fallback--tweet",
77
83
  fallbackYoutube: "embed-static-fallback--youtube",
84
+ fallbackAppleMusic: "embed-static-fallback--apple-music",
85
+ fallbackSpotify: "embed-static-fallback--spotify",
78
86
  fallbackCodesandbox: "embed-static-fallback--codesandbox",
79
87
  fallbackBilibili: "embed-static-fallback--bilibili",
80
88
  fallbackGithubFile: "embed-static-fallback--github-file",
@@ -90,6 +98,8 @@ var semanticFallbackModifierClass = {
90
98
  generic: "embed-static-fallback--generic",
91
99
  tweet: "embed-static-fallback--tweet",
92
100
  youtube: "embed-static-fallback--youtube",
101
+ "apple-music": "embed-static-fallback--apple-music",
102
+ spotify: "embed-static-fallback--spotify",
93
103
  codesandbox: "embed-static-fallback--codesandbox",
94
104
  bilibili: "embed-static-fallback--bilibili",
95
105
  "github-file": "embed-static-fallback--github-file",
@@ -113,17 +123,61 @@ var fallbackType = {
113
123
  generic: "_1xclneje",
114
124
  tweet: "_1xclnejf",
115
125
  youtube: "_1xclnejg",
116
- codesandbox: "_1xclnejh",
117
- bilibili: "_1xclneji",
118
- "github-file": "_1xclnejj",
119
- "github-gist": "_1xclnejk",
120
- thinking: "_1xclnejl"
126
+ "apple-music": "_1xclnejh",
127
+ spotify: "_1xclneji",
128
+ codesandbox: "_1xclnejj",
129
+ bilibili: "_1xclnejk",
130
+ "github-file": "_1xclnejl",
131
+ "github-gist": "_1xclnejm",
132
+ thinking: "_1xclnejn"
121
133
  };
122
- var fallbackBadge = "_1xclnejm";
123
- var fallbackDot = "_1xclnejn";
124
- var fallbackLink = "_1xclnejo";
125
- var tweet = "_1xclnejp";
126
- var loading = "_1xclnejq";
134
+ var fallbackBadge = "_1xclnejo";
135
+ var fallbackDot = "_1xclnejp";
136
+ var fallbackLink = "_1xclnejq";
137
+ var tweet = "_1xclnejr";
138
+ var loading = "_1xclnejs";
139
+ //#endregion
140
+ //#region src/url-matchers.ts
141
+ var isTweetUrl = (url) => (url.hostname === "twitter.com" || url.hostname === "x.com") && url.pathname.startsWith("/");
142
+ var isYoutubeUrl = (url) => url.hostname === "www.youtube.com" && url.pathname.startsWith("/watch");
143
+ var isAppleMusicUrl = (url) => (url.hostname === "music.apple.com" || url.hostname === "embed.music.apple.com") && url.pathname.startsWith("/");
144
+ var spotifyEmbedTypes = [
145
+ "album",
146
+ "artist",
147
+ "episode",
148
+ "playlist",
149
+ "show",
150
+ "track"
151
+ ];
152
+ function getSpotifyEmbedPath(url) {
153
+ if (url.hostname !== "open.spotify.com") return null;
154
+ const [first, second, third] = url.pathname.split("/").filter(Boolean);
155
+ const [type, id] = first === "embed" || first?.startsWith("intl-") ? [second, third] : [first, second];
156
+ return type && id && spotifyEmbedTypes.includes(type) ? `/embed/${type}/${id}` : null;
157
+ }
158
+ var isSpotifyUrl = (url) => getSpotifyEmbedPath(url) !== null;
159
+ var isCodesandboxUrl = (url) => url.hostname === "codesandbox.io" && url.pathname.split("/").length === 3;
160
+ var isBilibiliVideoUrl = (url) => url.hostname.includes("bilibili.com") && url.pathname.startsWith("/video/BV");
161
+ var isGithubFilePreviewUrl = (url) => {
162
+ const [, , , type] = url.pathname.split("/");
163
+ return url.hostname === "github.com" && type === "blob";
164
+ };
165
+ var isGistUrl = (url) => url.hostname === "gist.github.com";
166
+ function createSelfThinkingMatcher(hostnames) {
167
+ return (url) => hostnames.includes(url.hostname) && url.pathname.startsWith("/thinking/");
168
+ }
169
+ function matchEmbedUrl(url, selfThinkingMatcher) {
170
+ if (isTweetUrl(url)) return "tweet";
171
+ if (isYoutubeUrl(url)) return "youtube";
172
+ if (isAppleMusicUrl(url)) return "apple-music";
173
+ if (isSpotifyUrl(url)) return "spotify";
174
+ if (isCodesandboxUrl(url)) return "codesandbox";
175
+ if (isBilibiliVideoUrl(url)) return "bilibili";
176
+ if (isGithubFilePreviewUrl(url)) return "github-file";
177
+ if (isGistUrl(url)) return "github-gist";
178
+ if (selfThinkingMatcher?.(url)) return "thinking";
179
+ return null;
180
+ }
127
181
  //#endregion
128
182
  //#region \0@oxc-project+runtime@0.139.0/helpers/esm/typeof.js
129
183
  function _typeof(o) {
@@ -212,10 +266,12 @@ function getLangFromPath(path) {
212
266
  if (dot === -1) return "text";
213
267
  return extToLang[path.slice(dot).toLowerCase()] || "text";
214
268
  }
215
- var shikiPromise = import("shiki/bundle/web").catch(() => null);
269
+ var shikiPromise = import("shiki/bundle/full").catch(() => null);
216
270
  var typeLabels$1 = {
217
271
  "tweet": "X / Twitter",
218
272
  "youtube": "YouTube",
273
+ "apple-music": "Apple Music",
274
+ "spotify": "Spotify",
219
275
  "codesandbox": "CodeSandbox",
220
276
  "bilibili": "Bilibili",
221
277
  "github-file": "GitHub File",
@@ -448,6 +504,39 @@ function EmbedStaticRenderer({ type, url }) {
448
504
  title: "YouTube video player"
449
505
  }) });
450
506
  }
507
+ case "apple-music":
508
+ parsedUrl.hostname = "embed.music.apple.com";
509
+ parsedUrl.protocol = "https:";
510
+ return /* @__PURE__ */ jsx(FixedRatioContainer, {
511
+ ratio: 68,
512
+ children: /* @__PURE__ */ jsx("iframe", {
513
+ allowFullScreen: true,
514
+ allow: "autoplay *; encrypted-media *; fullscreen *; clipboard-write",
515
+ className: `${iframe} ${semanticClassNames.iframe}`,
516
+ sandbox: "allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation-by-user-activation",
517
+ src: parsedUrl.toString(),
518
+ title: "Apple Music player"
519
+ })
520
+ });
521
+ case "spotify": {
522
+ const embedPath = getSpotifyEmbedPath(parsedUrl);
523
+ if (!embedPath) return /* @__PURE__ */ jsx(FallbackLink, {
524
+ type,
525
+ url
526
+ });
527
+ parsedUrl.pathname = embedPath;
528
+ return /* @__PURE__ */ jsx(FixedRatioContainer, {
529
+ ratio: 54,
530
+ children: /* @__PURE__ */ jsx("iframe", {
531
+ allowFullScreen: true,
532
+ allow: "autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",
533
+ className: `${iframe} ${semanticClassNames.iframe}`,
534
+ loading: "lazy",
535
+ src: parsedUrl.toString(),
536
+ title: "Spotify player"
537
+ })
538
+ });
539
+ }
451
540
  case "bilibili": {
452
541
  const id = parsedUrl.pathname.split("/")[2];
453
542
  if (!id) return /* @__PURE__ */ jsx(FallbackLink, {
@@ -566,34 +655,12 @@ function $isEmbedNode(node) {
566
655
  return node instanceof EmbedNode;
567
656
  }
568
657
  //#endregion
569
- //#region src/url-matchers.ts
570
- var isTweetUrl = (url) => (url.hostname === "twitter.com" || url.hostname === "x.com") && url.pathname.startsWith("/");
571
- var isYoutubeUrl = (url) => url.hostname === "www.youtube.com" && url.pathname.startsWith("/watch");
572
- var isCodesandboxUrl = (url) => url.hostname === "codesandbox.io" && url.pathname.split("/").length === 3;
573
- var isBilibiliVideoUrl = (url) => url.hostname.includes("bilibili.com") && url.pathname.startsWith("/video/BV");
574
- var isGithubFilePreviewUrl = (url) => {
575
- const [, , , type] = url.pathname.split("/");
576
- return url.hostname === "github.com" && type === "blob";
577
- };
578
- var isGistUrl = (url) => url.hostname === "gist.github.com";
579
- function createSelfThinkingMatcher(hostnames) {
580
- return (url) => hostnames.includes(url.hostname) && url.pathname.startsWith("/thinking/");
581
- }
582
- function matchEmbedUrl(url, selfThinkingMatcher) {
583
- if (isTweetUrl(url)) return "tweet";
584
- if (isYoutubeUrl(url)) return "youtube";
585
- if (isCodesandboxUrl(url)) return "codesandbox";
586
- if (isBilibiliVideoUrl(url)) return "bilibili";
587
- if (isGithubFilePreviewUrl(url)) return "github-file";
588
- if (isGistUrl(url)) return "github-gist";
589
- if (selfThinkingMatcher?.(url)) return "thinking";
590
- return null;
591
- }
592
- //#endregion
593
658
  //#region src/renderers/EmbedLinkRenderer.tsx
594
659
  var typeLabels = {
595
660
  "tweet": "X / Twitter",
596
661
  "youtube": "YouTube",
662
+ "apple-music": "Apple Music",
663
+ "spotify": "Spotify",
597
664
  "codesandbox": "CodeSandbox",
598
665
  "bilibili": "Bilibili",
599
666
  "github-file": "GitHub File",
@@ -688,4 +755,4 @@ function EmbedLinkRenderer({ type, url, nodeKey }) {
688
755
  });
689
756
  }
690
757
  //#endregion
691
- export { isGistUrl as a, isYoutubeUrl as c, $isEmbedNode as d, EmbedNode as f, useEmbedRenderers as g, EmbedRendererProvider as h, isCodesandboxUrl as i, matchEmbedUrl as l, _defineProperty as m, createSelfThinkingMatcher as n, isGithubFilePreviewUrl as o, EmbedStaticRenderer as p, isBilibiliVideoUrl as r, isTweetUrl as s, EmbedLinkRenderer as t, $createEmbedNode as u };
758
+ export { EmbedRendererProvider as _, EmbedStaticRenderer as a, isAppleMusicUrl as c, isGistUrl as d, isGithubFilePreviewUrl as f, matchEmbedUrl as g, isYoutubeUrl as h, EmbedNode as i, isBilibiliVideoUrl as l, isTweetUrl as m, $createEmbedNode as n, _defineProperty as o, isSpotifyUrl as p, $isEmbedNode as r, createSelfThinkingMatcher as s, EmbedLinkRenderer as t, isCodesandboxUrl as u, useEmbedRenderers as v };
package/dist/index.d.ts CHANGED
@@ -11,5 +11,5 @@ export { EmbedStaticRenderer } from './renderers/EmbedStaticRenderer';
11
11
  export type { EmbedRendererComponent, EmbedRendererMap, } from './context/EmbedRendererContext';
12
12
  export { EmbedRendererProvider, useEmbedRenderers, } from './context/EmbedRendererContext';
13
13
  export type { EmbedType } from './url-matchers';
14
- export { createSelfThinkingMatcher, isBilibiliVideoUrl, isCodesandboxUrl, isGistUrl, isGithubFilePreviewUrl, isTweetUrl, isYoutubeUrl, matchEmbedUrl, } from './url-matchers';
14
+ export { createSelfThinkingMatcher, isAppleMusicUrl, isBilibiliVideoUrl, isCodesandboxUrl, isGistUrl, isGithubFilePreviewUrl, isSpotifyUrl, isTweetUrl, isYoutubeUrl, matchEmbedUrl, } from './url-matchers';
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAG7E,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,GACd,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGpD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAGjE,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,YAAY,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAGrE,YAAY,EACV,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,gCAAgC,CAAA;AAGvC,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,sBAAsB,EACtB,UAAU,EACV,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAG7E,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,GACd,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGpD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAGjE,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,YAAY,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAGrE,YAAY,EACV,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,gCAAgC,CAAA;AAGvC,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,sBAAsB,EACtB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAA"}
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as isGistUrl, c as isYoutubeUrl, d as $isEmbedNode, f as EmbedNode, g as useEmbedRenderers, h as EmbedRendererProvider, i as isCodesandboxUrl, l as matchEmbedUrl, m as _defineProperty, n as createSelfThinkingMatcher, o as isGithubFilePreviewUrl, p as EmbedStaticRenderer, r as isBilibiliVideoUrl, s as isTweetUrl, t as EmbedLinkRenderer, u as $createEmbedNode } from "./EmbedLinkRenderer-CWd-6ieh.js";
1
+ import { _ as EmbedRendererProvider, a as EmbedStaticRenderer, c as isAppleMusicUrl, d as isGistUrl, f as isGithubFilePreviewUrl, g as matchEmbedUrl, h as isYoutubeUrl, i as EmbedNode, l as isBilibiliVideoUrl, m as isTweetUrl, n as $createEmbedNode, o as _defineProperty, p as isSpotifyUrl, r as $isEmbedNode, s as createSelfThinkingMatcher, t as EmbedLinkRenderer, u as isCodesandboxUrl, v as useEmbedRenderers } from "./EmbedLinkRenderer-Bj7R8TDp.js";
2
2
  import { $insertNodes, COMMAND_PRIORITY_LOW, PASTE_COMMAND, createCommand } from "lexical";
3
3
  import { createElement, useEffect, useMemo } from "react";
4
4
  import { Code } from "lucide-react";
@@ -93,4 +93,4 @@ function EmbedPlugin({ selfHostnames }) {
93
93
  return null;
94
94
  }
95
95
  //#endregion
96
- export { $createEmbedEditNode, $createEmbedNode, $isEmbedEditNode, $isEmbedNode, EmbedEditNode, EmbedLinkRenderer, EmbedNode, EmbedPlugin, EmbedRendererProvider, EmbedStaticRenderer, INSERT_EMBED_COMMAND, createSelfThinkingMatcher, embedEditNodes, embedNodes, isBilibiliVideoUrl, isCodesandboxUrl, isGistUrl, isGithubFilePreviewUrl, isTweetUrl, isYoutubeUrl, matchEmbedUrl, useEmbedRenderers };
96
+ export { $createEmbedEditNode, $createEmbedNode, $isEmbedEditNode, $isEmbedNode, EmbedEditNode, EmbedLinkRenderer, EmbedNode, EmbedPlugin, EmbedRendererProvider, EmbedStaticRenderer, INSERT_EMBED_COMMAND, createSelfThinkingMatcher, embedEditNodes, embedNodes, isAppleMusicUrl, isBilibiliVideoUrl, isCodesandboxUrl, isGistUrl, isGithubFilePreviewUrl, isSpotifyUrl, isTweetUrl, isYoutubeUrl, matchEmbedUrl, useEmbedRenderers };
@@ -1 +1 @@
1
- {"version":3,"file":"EmbedLinkRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/EmbedLinkRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AASvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AASjD,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb;AAYD,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,sBAAsB,+BAgG/E"}
1
+ {"version":3,"file":"EmbedLinkRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/EmbedLinkRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AASvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AASjD,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb;AAcD,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,sBAAsB,+BAgG/E"}
@@ -1 +1 @@
1
- {"version":3,"file":"EmbedStaticRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/EmbedStaticRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AASvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAuDjD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb;AAsQD,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,wBAAwB,sCAgG1E"}
1
+ {"version":3,"file":"EmbedStaticRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/EmbedStaticRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AASvB,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,iBAAiB,CAAC;AAuDtE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb;AAwQD,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,wBAAwB,sCAmI1E"}
@@ -1,2 +1,2 @@
1
- :root{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}:root.dark,[data-theme=dark]{--rc-text:#fafafa;--rc-text-secondary:#a3a3a3;--rc-text-tertiary:#737373;--rc-text-quaternary:#525252;--rc-bg:#0a0a0a;--rc-bg-secondary:#171717;--rc-bg-tertiary:#262626;--rc-fill:#2a2a2a;--rc-fill-secondary:#222;--rc-fill-tertiary:#1a1a1a;--rc-fill-quaternary:#141414;--rc-border:#262626;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#262626;--rc-hr-border:#262626;--rc-quote-border:#60a5fa;--rc-quote-bg:#262626;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006}._1cz4fjc0{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1cz4fjc1{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.8;--rc-line-height-tight:1.4;--rc-font-family:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1cz4fjc2{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#a3a3a3;--rc-quote-bg:#fafafa;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:none;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:2px;--rc-space-sm:4px;--rc-space-md:10px;--rc-space-lg:16px;--rc-space-xl:20px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:14px;--rc-font-size-small:12px;--rc-line-height:1.5;--rc-line-height-tight:1.3;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:3px;--rc-radius-md:6px;--rc-radius-lg:12px}.dark ._1cz4fjc0,[data-theme=dark] ._1cz4fjc0,.dark._1cz4fjc0,[data-theme=dark]._1cz4fjc0,.dark ._1cz4fjc1,[data-theme=dark] ._1cz4fjc1,.dark._1cz4fjc1,[data-theme=dark]._1cz4fjc1,.dark ._1cz4fjc2,[data-theme=dark] ._1cz4fjc2,.dark._1cz4fjc2,[data-theme=dark]._1cz4fjc2{--rc-text:#fafafa;--rc-text-secondary:#a3a3a3;--rc-text-tertiary:#737373;--rc-text-quaternary:#525252;--rc-bg:#0a0a0a;--rc-bg-secondary:#171717;--rc-bg-tertiary:#262626;--rc-fill:#2a2a2a;--rc-fill-secondary:#222;--rc-fill-tertiary:#1a1a1a;--rc-fill-quaternary:#141414;--rc-border:#262626;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#262626;--rc-hr-border:#262626;--rc-quote-border:#60a5fa;--rc-quote-bg:#262626;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006}._1qucygc1{margin:8px 0}._1qucygc2{--_1qucygc0:115, 115, 115;border:1px solid color-mix(in srgb, rgb(var(--_1qucygc0)) 25%, transparent);background-color:color-mix(in srgb, rgb(var(--_1qucygc0)) 12%, transparent);height:48px;font-family:var(--rc-font-family-sans);font-size:var(--rc-font-size-md);border-radius:12px;align-items:center;gap:0;padding:0 14px;transition:border-color .15s,background-color .15s;display:flex}._1qucygc2:focus-within{border-color:color-mix(in srgb, rgb(var(--_1qucygc0)) 50%, transparent)}._1qucygc4{--_1qucygc0:29, 155, 240}._1qucygc5{--_1qucygc0:255, 0, 0}._1qucygc6{--_1qucygc0:163, 163, 163}._1qucygc7{--_1qucygc0:0, 161, 214}._1qucygc8,._1qucygc9{--_1qucygc0:110, 84, 148}._1qucygca{--_1qucygc0:139, 92, 246}._1qucygcb{font-weight:500;font-size:var(--rc-font-size-md);color:var(--rc-text-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none;font-family:var(--rc-font-family-sans);flex-shrink:0;align-items:center;gap:8px;padding-right:14px;display:inline-flex}._1qucygcc{background-color:rgb(var(--_1qucygc0));border-radius:50%;flex-shrink:0;width:8px;height:8px}._1qucygcd{background-color:var(--rc-border);flex-shrink:0;width:1px;height:20px}._1qucygce{min-width:0;height:100%;font-size:var(--rc-font-size-md);font-family:var(--rc-font-mono);color:var(--rc-text);background:0 0;border:none;outline:none;flex:1;padding:0 14px}._1qucygce::placeholder{color:color-mix(in srgb, var(--rc-text-secondary) 60%, transparent)}._1xclnej1{justify-content:center;margin:8px 0;display:flex}._1xclnej2{width:100%;height:0;position:relative}._1xclnej3{border:none;border-radius:8px;width:100%;height:100%;position:absolute;top:0;bottom:0;left:0;right:0}._1xclnej4{flex-direction:column;align-items:center;display:flex}._1xclnej5{border:none;width:100%;height:300px;overflow:auto}._1xclnej6{color:var(--rc-text-secondary);font-size:var(--rc-font-size-md);word-break:break-all;align-items:flex-start;gap:8px;margin-top:8px;line-height:1.4;text-decoration:none;display:inline-flex}._1xclnej6:hover{color:var(--rc-text)}._1xclnej6 svg{flex-shrink:0;margin-top:2px}._1xclnej7{flex-direction:column;align-items:center;width:100%;display:flex}._1xclnej8{width:100%;overflow:auto}._1xclnej9{max-height:50vh}._1xclnej8 pre{background:var(--rc-code-bg);font-size:var(--rc-font-size-sm);line-height:1.5;font-family:var(--rc-font-mono);color:var(--rc-text);border-radius:8px;margin:0;padding:16px}._1xclneja{display:block}._1xclnejb{text-align:right;width:4ch;color:color-mix(in srgb, var(--rc-text-secondary) 60%, transparent);-webkit-user-select:none;user-select:none;margin-right:16px;display:inline-block}._1xclnejc{counter-reset:shiki-line var(--start-line,0)}._1xclnejc pre{font-size:var(--rc-font-size-sm);line-height:1.5;font-family:var(--rc-font-mono);border-radius:8px;margin:0;padding:16px;overflow-x:auto}._1xclnejc code{flex-direction:column;font-family:inherit;display:flex}._1xclnejc .line{line-height:1.5;display:flex}._1xclnejc .line:before{content:counter(shiki-line);counter-increment:shiki-line;text-align:right;width:4ch;color:color-mix(in srgb, var(--rc-text-secondary) 60%, transparent);-webkit-user-select:none;user-select:none;flex-shrink:0;margin-right:16px}._1xclnejd{--_1xclnej0:115, 115, 115;border:1px solid color-mix(in srgb, rgb(var(--_1xclnej0)) 25%, transparent);background-color:color-mix(in srgb, rgb(var(--_1xclnej0)) 8%, transparent);height:48px;font-family:var(--rc-font-family-sans);font-size:var(--rc-font-size-md);border-radius:12px;align-items:center;gap:0;margin:8px 0;padding:0 14px;display:flex}._1xclnejf{--_1xclnej0:29, 155, 240}._1xclnejg{--_1xclnej0:255, 0, 0}._1xclnejh{--_1xclnej0:163, 163, 163}._1xclneji{--_1xclnej0:0, 161, 214}._1xclnejj,._1xclnejk{--_1xclnej0:110, 84, 148}._1xclnejl{--_1xclnej0:139, 92, 246}._1xclnejm{font-weight:500;font-size:var(--rc-font-size-md);color:var(--rc-text-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none;flex-shrink:0;align-items:center;gap:8px;padding-right:14px;display:inline-flex}._1xclnejn{background-color:rgb(var(--_1xclnej0));border-radius:50%;flex-shrink:0;width:8px;height:8px}._1xclnejo{min-width:0;font-size:var(--rc-font-size-md);font-family:var(--rc-font-mono);color:var(--rc-text-secondary);text-overflow:ellipsis;white-space:nowrap;flex:1;text-decoration:none;overflow:hidden}._1xclnejo:hover{color:var(--rc-text);text-decoration:underline}._1xclnejp{justify-content:center;width:100%;margin:8px 0;display:flex}._1xclnejq{height:200px;color:var(--rc-text-secondary);font-size:var(--rc-font-size-md);justify-content:center;align-items:center;display:flex}
1
+ :root{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}:root.dark,[data-theme=dark]{--rc-text:#fafafa;--rc-text-secondary:#a3a3a3;--rc-text-tertiary:#737373;--rc-text-quaternary:#525252;--rc-bg:#0a0a0a;--rc-bg-secondary:#171717;--rc-bg-tertiary:#262626;--rc-fill:#2a2a2a;--rc-fill-secondary:#222;--rc-fill-tertiary:#1a1a1a;--rc-fill-quaternary:#141414;--rc-border:#262626;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#262626;--rc-hr-border:#262626;--rc-quote-border:#60a5fa;--rc-quote-bg:#262626;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006}._1cz4fjc0{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1cz4fjc1{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.8;--rc-line-height-tight:1.4;--rc-font-family:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1cz4fjc2{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#a3a3a3;--rc-quote-bg:#fafafa;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:none;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:2px;--rc-space-sm:4px;--rc-space-md:10px;--rc-space-lg:16px;--rc-space-xl:20px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:14px;--rc-font-size-small:12px;--rc-line-height:1.5;--rc-line-height-tight:1.3;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:3px;--rc-radius-md:6px;--rc-radius-lg:12px}.dark ._1cz4fjc0,[data-theme=dark] ._1cz4fjc0,.dark._1cz4fjc0,[data-theme=dark]._1cz4fjc0,.dark ._1cz4fjc1,[data-theme=dark] ._1cz4fjc1,.dark._1cz4fjc1,[data-theme=dark]._1cz4fjc1,.dark ._1cz4fjc2,[data-theme=dark] ._1cz4fjc2,.dark._1cz4fjc2,[data-theme=dark]._1cz4fjc2{--rc-text:#fafafa;--rc-text-secondary:#a3a3a3;--rc-text-tertiary:#737373;--rc-text-quaternary:#525252;--rc-bg:#0a0a0a;--rc-bg-secondary:#171717;--rc-bg-tertiary:#262626;--rc-fill:#2a2a2a;--rc-fill-secondary:#222;--rc-fill-tertiary:#1a1a1a;--rc-fill-quaternary:#141414;--rc-border:#262626;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#262626;--rc-hr-border:#262626;--rc-quote-border:#60a5fa;--rc-quote-bg:#262626;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006}._1qucygc1{margin:8px 0}._1qucygc2{--_1qucygc0:115, 115, 115;border:1px solid color-mix(in srgb, rgb(var(--_1qucygc0)) 25%, transparent);background-color:color-mix(in srgb, rgb(var(--_1qucygc0)) 12%, transparent);height:48px;font-family:var(--rc-font-family-sans);font-size:var(--rc-font-size-md);border-radius:12px;align-items:center;gap:0;padding:0 14px;transition:border-color .15s,background-color .15s;display:flex}._1qucygc2:focus-within{border-color:color-mix(in srgb, rgb(var(--_1qucygc0)) 50%, transparent)}._1qucygc4{--_1qucygc0:29, 155, 240}._1qucygc5{--_1qucygc0:255, 0, 0}._1qucygc6{--_1qucygc0:250, 36, 60}._1qucygc7{--_1qucygc0:29, 185, 84}._1qucygc8{--_1qucygc0:163, 163, 163}._1qucygc9{--_1qucygc0:0, 161, 214}._1qucygca,._1qucygcb{--_1qucygc0:110, 84, 148}._1qucygcc{--_1qucygc0:139, 92, 246}._1qucygcd{font-weight:500;font-size:var(--rc-font-size-md);color:var(--rc-text-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none;font-family:var(--rc-font-family-sans);flex-shrink:0;align-items:center;gap:8px;padding-right:14px;display:inline-flex}._1qucygce{background-color:rgb(var(--_1qucygc0));border-radius:50%;flex-shrink:0;width:8px;height:8px}._1qucygcf{background-color:var(--rc-border);flex-shrink:0;width:1px;height:20px}._1qucygcg{min-width:0;height:100%;font-size:var(--rc-font-size-md);font-family:var(--rc-font-mono);color:var(--rc-text);background:0 0;border:none;outline:none;flex:1;padding:0 14px}._1qucygcg::placeholder{color:color-mix(in srgb, var(--rc-text-secondary) 60%, transparent)}._1xclnej1{justify-content:center;margin:8px 0;display:flex}._1xclnej2{width:100%;height:0;position:relative}._1xclnej3{border:none;border-radius:8px;width:100%;height:100%;position:absolute;top:0;bottom:0;left:0;right:0}._1xclnej4{flex-direction:column;align-items:center;display:flex}._1xclnej5{border:none;width:100%;height:300px;overflow:auto}._1xclnej6{color:var(--rc-text-secondary);font-size:var(--rc-font-size-md);word-break:break-all;align-items:flex-start;gap:8px;margin-top:8px;line-height:1.4;text-decoration:none;display:inline-flex}._1xclnej6:hover{color:var(--rc-text)}._1xclnej6 svg{flex-shrink:0;margin-top:2px}._1xclnej7{flex-direction:column;align-items:center;width:100%;display:flex}._1xclnej8{width:100%;overflow:auto}._1xclnej9{max-height:50vh}._1xclnej8 pre{background:var(--rc-code-bg);font-size:var(--rc-font-size-sm);line-height:1.5;font-family:var(--rc-font-mono);color:var(--rc-text);border-radius:8px;margin:0;padding:16px}._1xclneja{display:block}._1xclnejb{text-align:right;width:4ch;color:color-mix(in srgb, var(--rc-text-secondary) 60%, transparent);-webkit-user-select:none;user-select:none;margin-right:16px;display:inline-block}._1xclnejc{counter-reset:shiki-line var(--start-line,0)}._1xclnejc pre{font-size:var(--rc-font-size-sm);line-height:1.5;font-family:var(--rc-font-mono);border-radius:8px;margin:0;padding:16px;overflow-x:auto}._1xclnejc code{flex-direction:column;font-family:inherit;display:flex}._1xclnejc .line{line-height:1.5;display:flex}._1xclnejc .line:before{content:counter(shiki-line);counter-increment:shiki-line;text-align:right;width:4ch;color:color-mix(in srgb, var(--rc-text-secondary) 60%, transparent);-webkit-user-select:none;user-select:none;flex-shrink:0;margin-right:16px}._1xclnejd{--_1xclnej0:115, 115, 115;border:1px solid color-mix(in srgb, rgb(var(--_1xclnej0)) 25%, transparent);background-color:color-mix(in srgb, rgb(var(--_1xclnej0)) 8%, transparent);height:48px;font-family:var(--rc-font-family-sans);font-size:var(--rc-font-size-md);border-radius:12px;align-items:center;gap:0;margin:8px 0;padding:0 14px;display:flex}._1xclnejf{--_1xclnej0:29, 155, 240}._1xclnejg{--_1xclnej0:255, 0, 0}._1xclnejh{--_1xclnej0:250, 36, 60}._1xclneji{--_1xclnej0:29, 185, 84}._1xclnejj{--_1xclnej0:163, 163, 163}._1xclnejk{--_1xclnej0:0, 161, 214}._1xclnejl,._1xclnejm{--_1xclnej0:110, 84, 148}._1xclnejn{--_1xclnej0:139, 92, 246}._1xclnejo{font-weight:500;font-size:var(--rc-font-size-md);color:var(--rc-text-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none;flex-shrink:0;align-items:center;gap:8px;padding-right:14px;display:inline-flex}._1xclnejp{background-color:rgb(var(--_1xclnej0));border-radius:50%;flex-shrink:0;width:8px;height:8px}._1xclnejq{min-width:0;font-size:var(--rc-font-size-md);font-family:var(--rc-font-mono);color:var(--rc-text-secondary);text-overflow:ellipsis;white-space:nowrap;flex:1;text-decoration:none;overflow:hidden}._1xclnejq:hover{color:var(--rc-text);text-decoration:underline}._1xclnejr{justify-content:center;width:100%;margin:8px 0;display:flex}._1xclnejs{height:200px;color:var(--rc-text-secondary);font-size:var(--rc-font-size-md);justify-content:center;align-items:center;display:flex}
2
2
  /*$vite$:1*/
package/dist/static.d.ts CHANGED
@@ -9,5 +9,5 @@ export { EmbedLinkRenderer } from './renderers/EmbedLinkRenderer';
9
9
  export type { EmbedStaticRendererProps } from './renderers/EmbedStaticRenderer';
10
10
  export { EmbedStaticRenderer } from './renderers/EmbedStaticRenderer';
11
11
  export type { EmbedType } from './url-matchers';
12
- export { createSelfThinkingMatcher, isBilibiliVideoUrl, isCodesandboxUrl, isGistUrl, isGithubFilePreviewUrl, isTweetUrl, isYoutubeUrl, matchEmbedUrl, } from './url-matchers';
12
+ export { createSelfThinkingMatcher, isAppleMusicUrl, isBilibiliVideoUrl, isCodesandboxUrl, isGistUrl, isGithubFilePreviewUrl, isSpotifyUrl, isTweetUrl, isYoutubeUrl, matchEmbedUrl, } from './url-matchers';
13
13
  //# sourceMappingURL=static.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../src/static.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAIjD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE7E,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAe,CAAA;AAEhE,YAAY,EACV,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,gCAAgC,CAAA;AACvC,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,YAAY,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,sBAAsB,EACtB,UAAU,EACV,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../src/static.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAIjD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE7E,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAe,CAAA;AAEhE,YAAY,EACV,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,gCAAgC,CAAA;AACvC,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,YAAY,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,sBAAsB,EACtB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAA"}
package/dist/static.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { a as isGistUrl, c as isYoutubeUrl, d as $isEmbedNode, f as EmbedNode, g as useEmbedRenderers, h as EmbedRendererProvider, i as isCodesandboxUrl, l as matchEmbedUrl, n as createSelfThinkingMatcher, o as isGithubFilePreviewUrl, p as EmbedStaticRenderer, r as isBilibiliVideoUrl, s as isTweetUrl, t as EmbedLinkRenderer, u as $createEmbedNode } from "./EmbedLinkRenderer-CWd-6ieh.js";
1
+ import { _ as EmbedRendererProvider, a as EmbedStaticRenderer, c as isAppleMusicUrl, d as isGistUrl, f as isGithubFilePreviewUrl, g as matchEmbedUrl, h as isYoutubeUrl, i as EmbedNode, l as isBilibiliVideoUrl, m as isTweetUrl, n as $createEmbedNode, p as isSpotifyUrl, r as $isEmbedNode, s as createSelfThinkingMatcher, t as EmbedLinkRenderer, u as isCodesandboxUrl, v as useEmbedRenderers } from "./EmbedLinkRenderer-Bj7R8TDp.js";
2
2
  //#region src/static.ts
3
3
  var embedNodes = [EmbedNode];
4
4
  //#endregion
5
- export { $createEmbedNode, $isEmbedNode, EmbedLinkRenderer, EmbedNode, EmbedRendererProvider, EmbedStaticRenderer, createSelfThinkingMatcher, embedNodes, isBilibiliVideoUrl, isCodesandboxUrl, isGistUrl, isGithubFilePreviewUrl, isTweetUrl, isYoutubeUrl, matchEmbedUrl, useEmbedRenderers };
5
+ export { $createEmbedNode, $isEmbedNode, EmbedLinkRenderer, EmbedNode, EmbedRendererProvider, EmbedStaticRenderer, createSelfThinkingMatcher, embedNodes, isAppleMusicUrl, isBilibiliVideoUrl, isCodesandboxUrl, isGistUrl, isGithubFilePreviewUrl, isSpotifyUrl, isTweetUrl, isYoutubeUrl, matchEmbedUrl, useEmbedRenderers };
@@ -15,6 +15,8 @@ export declare const semanticClassNames: {
15
15
  readonly fallbackGeneric: "embed-static-fallback--generic";
16
16
  readonly fallbackTweet: "embed-static-fallback--tweet";
17
17
  readonly fallbackYoutube: "embed-static-fallback--youtube";
18
+ readonly fallbackAppleMusic: "embed-static-fallback--apple-music";
19
+ readonly fallbackSpotify: "embed-static-fallback--spotify";
18
20
  readonly fallbackCodesandbox: "embed-static-fallback--codesandbox";
19
21
  readonly fallbackBilibili: "embed-static-fallback--bilibili";
20
22
  readonly fallbackGithubFile: "embed-static-fallback--github-file";
@@ -30,6 +32,8 @@ export declare const semanticFallbackModifierClass: {
30
32
  readonly generic: "embed-static-fallback--generic";
31
33
  readonly tweet: "embed-static-fallback--tweet";
32
34
  readonly youtube: "embed-static-fallback--youtube";
35
+ readonly 'apple-music': "embed-static-fallback--apple-music";
36
+ readonly spotify: "embed-static-fallback--spotify";
33
37
  readonly codesandbox: "embed-static-fallback--codesandbox";
34
38
  readonly bilibili: "embed-static-fallback--bilibili";
35
39
  readonly 'github-file': "embed-static-fallback--github-file";
@@ -49,7 +53,7 @@ export declare const githubFileLine: string;
49
53
  export declare const githubFileLineNum: string;
50
54
  export declare const shiki: string;
51
55
  export declare const fallback: string;
52
- export declare const fallbackType: Record<"generic" | "tweet" | "youtube" | "codesandbox" | "bilibili" | "github-file" | "github-gist" | "thinking", string>;
56
+ export declare const fallbackType: Record<"generic" | "tweet" | "youtube" | "apple-music" | "spotify" | "codesandbox" | "bilibili" | "github-file" | "github-gist" | "thinking", string>;
53
57
  export declare const fallbackBadge: string;
54
58
  export declare const fallbackDot: string;
55
59
  export declare const fallbackLink: string;
@@ -1 +1 @@
1
- {"version":3,"file":"styles-static.css.d.ts","sourceRoot":"","sources":["../src/styles-static.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BrB,CAAC;AAEX,eAAO,MAAM,6BAA6B;;;;;;;;;CAShC,CAAC;AAEX,eAAO,MAAM,cAAc,QAIzB,CAAC;AAEH,eAAO,MAAM,UAAU,QAIrB,CAAC;AAEH,eAAO,MAAM,MAAM,QAOjB,CAAC;AAEH,eAAO,MAAM,IAAI,QAIf,CAAC;AAEH,eAAO,MAAM,UAAU,QAKrB,CAAC;AAEH,eAAO,MAAM,UAAU,QAerB,CAAC;AAOH,eAAO,MAAM,UAAU,QAKrB,CAAC;AAEH,eAAO,MAAM,cAAc,QAGzB,CAAC;AAEH,eAAO,MAAM,kBAAkB,QAE7B,CAAC;AAaH,eAAO,MAAM,cAAc,QAEzB,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAO5B,CAAC;AAEH,eAAO,MAAM,KAAK,QAEhB,CAAC;AAkCH,eAAO,MAAM,QAAQ,QAanB,CAAC;AAEH,eAAO,MAAM,YAAY,2HASvB,CAAC;AAEH,eAAO,MAAM,aAAa,QAWxB,CAAC;AAEH,eAAO,MAAM,WAAW,QAMtB,CAAC;AAEH,eAAO,MAAM,YAAY,QAgBvB,CAAC;AAEH,eAAO,MAAM,KAAK,QAKhB,CAAC;AAEH,eAAO,MAAM,OAAO,QAOlB,CAAC"}
1
+ {"version":3,"file":"styles-static.css.d.ts","sourceRoot":"","sources":["../src/styles-static.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BrB,CAAC;AAEX,eAAO,MAAM,6BAA6B;;;;;;;;;;;CAWhC,CAAC;AAEX,eAAO,MAAM,cAAc,QAIzB,CAAC;AAEH,eAAO,MAAM,UAAU,QAIrB,CAAC;AAEH,eAAO,MAAM,MAAM,QAOjB,CAAC;AAEH,eAAO,MAAM,IAAI,QAIf,CAAC;AAEH,eAAO,MAAM,UAAU,QAKrB,CAAC;AAEH,eAAO,MAAM,UAAU,QAerB,CAAC;AAOH,eAAO,MAAM,UAAU,QAKrB,CAAC;AAEH,eAAO,MAAM,cAAc,QAGzB,CAAC;AAEH,eAAO,MAAM,kBAAkB,QAE7B,CAAC;AAaH,eAAO,MAAM,cAAc,QAEzB,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAO5B,CAAC;AAEH,eAAO,MAAM,KAAK,QAEhB,CAAC;AAkCH,eAAO,MAAM,QAAQ,QAanB,CAAC;AAEH,eAAO,MAAM,YAAY,uJAWvB,CAAC;AAEH,eAAO,MAAM,aAAa,QAWxB,CAAC;AAEH,eAAO,MAAM,WAAW,QAMtB,CAAC;AAEH,eAAO,MAAM,YAAY,QAgBvB,CAAC;AAEH,eAAO,MAAM,KAAK,QAKhB,CAAC;AAEH,eAAO,MAAM,OAAO,QAOlB,CAAC"}
@@ -4,6 +4,8 @@ export declare const semanticClassNames: {
4
4
  readonly embedGeneric: "rich-embed--generic";
5
5
  readonly embedTweet: "rich-embed--tweet";
6
6
  readonly embedYoutube: "rich-embed--youtube";
7
+ readonly embedAppleMusic: "rich-embed--apple-music";
8
+ readonly embedSpotify: "rich-embed--spotify";
7
9
  readonly embedCodesandbox: "rich-embed--codesandbox";
8
10
  readonly embedBilibili: "rich-embed--bilibili";
9
11
  readonly embedGithubFile: "rich-embed--github-file";
@@ -18,6 +20,8 @@ export declare const semanticEmbedModifierClass: {
18
20
  readonly generic: "rich-embed--generic";
19
21
  readonly tweet: "rich-embed--tweet";
20
22
  readonly youtube: "rich-embed--youtube";
23
+ readonly 'apple-music': "rich-embed--apple-music";
24
+ readonly spotify: "rich-embed--spotify";
21
25
  readonly codesandbox: "rich-embed--codesandbox";
22
26
  readonly bilibili: "rich-embed--bilibili";
23
27
  readonly 'github-file': "rich-embed--github-file";
@@ -26,7 +30,7 @@ export declare const semanticEmbedModifierClass: {
26
30
  };
27
31
  export declare const wrapper: string;
28
32
  export declare const embed: string;
29
- export declare const embedType: Record<"generic" | "tweet" | "youtube" | "codesandbox" | "bilibili" | "github-file" | "github-gist" | "thinking", string>;
33
+ export declare const embedType: Record<"generic" | "tweet" | "youtube" | "apple-music" | "spotify" | "codesandbox" | "bilibili" | "github-file" | "github-gist" | "thinking", string>;
30
34
  export declare const badge: string;
31
35
  export declare const dot: string;
32
36
  export declare const divider: string;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../src/styles.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;CAerB,CAAC;AAEX,eAAO,MAAM,0BAA0B;;;;;;;;;CAS7B,CAAC;AAEX,eAAO,MAAM,OAAO,QAElB,CAAC;AAEH,eAAO,MAAM,KAAK,QAkBhB,CAAC;AAEH,eAAO,MAAM,SAAS,2HASpB,CAAC;AAEH,eAAO,MAAM,KAAK,QAYhB,CAAC;AAEH,eAAO,MAAM,GAAG,QAMd,CAAC;AAEH,eAAO,MAAM,OAAO,QAKlB,CAAC;AAEH,eAAO,MAAM,KAAK,QAgBhB,CAAC"}
1
+ {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../src/styles.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;CAiBrB,CAAC;AAEX,eAAO,MAAM,0BAA0B;;;;;;;;;;;CAW7B,CAAC;AAEX,eAAO,MAAM,OAAO,QAElB,CAAC;AAEH,eAAO,MAAM,KAAK,QAkBhB,CAAC;AAEH,eAAO,MAAM,SAAS,uJAWpB,CAAC;AAEH,eAAO,MAAM,KAAK,QAYhB,CAAC;AAEH,eAAO,MAAM,GAAG,QAMd,CAAC;AAEH,eAAO,MAAM,OAAO,QAKlB,CAAC;AAEH,eAAO,MAAM,KAAK,QAgBhB,CAAC"}
@@ -1,6 +1,9 @@
1
- export type EmbedType = 'tweet' | 'youtube' | 'codesandbox' | 'bilibili' | 'github-file' | 'github-gist' | 'thinking';
1
+ export type EmbedType = 'tweet' | 'youtube' | 'apple-music' | 'spotify' | 'codesandbox' | 'bilibili' | 'github-file' | 'github-gist' | 'thinking';
2
2
  export declare const isTweetUrl: (url: URL) => boolean;
3
3
  export declare const isYoutubeUrl: (url: URL) => boolean;
4
+ export declare const isAppleMusicUrl: (url: URL) => boolean;
5
+ export declare function getSpotifyEmbedPath(url: URL): string | null;
6
+ export declare const isSpotifyUrl: (url: URL) => boolean;
4
7
  export declare const isCodesandboxUrl: (url: URL) => boolean;
5
8
  export declare const isBilibiliVideoUrl: (url: URL) => boolean;
6
9
  export declare const isGithubFilePreviewUrl: (url: URL) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"url-matchers.d.ts","sourceRoot":"","sources":["../src/url-matchers.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,SAAS,GACT,aAAa,GACb,UAAU,GACV,aAAa,GACb,aAAa,GACb,UAAU,CAAA;AAEd,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,YAEL,CAAA;AAE9B,eAAO,MAAM,YAAY,GAAI,KAAK,GAAG,YACoC,CAAA;AAEzE,eAAO,MAAM,gBAAgB,GAAI,KAAK,GAAG,YACkC,CAAA;AAE3E,eAAO,MAAM,kBAAkB,GAAI,KAAK,GAAG,YACoC,CAAA;AAE/E,eAAO,MAAM,sBAAsB,GAAI,KAAK,GAAG,YAG9C,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,KAAK,GAAG,YAAuC,CAAA;AAEzE,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,IACnD,KAAK,GAAG,aAEjB;AAED,wBAAgB,aAAa,CAC3B,GAAG,EAAE,GAAG,EACR,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,GAC1C,SAAS,GAAG,IAAI,CASlB"}
1
+ {"version":3,"file":"url-matchers.d.ts","sourceRoot":"","sources":["../src/url-matchers.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,SAAS,GACT,aAAa,GACb,SAAS,GACT,aAAa,GACb,UAAU,GACV,aAAa,GACb,aAAa,GACb,UAAU,CAAA;AAEd,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,YAEL,CAAA;AAE9B,eAAO,MAAM,YAAY,GAAI,KAAK,GAAG,YACoC,CAAA;AAEzE,eAAO,MAAM,eAAe,GAAI,KAAK,GAAG,YAEV,CAAA;AAI9B,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,IAAI,CAM3D;AAED,eAAO,MAAM,YAAY,GAAI,KAAK,GAAG,YAAsC,CAAA;AAE3E,eAAO,MAAM,gBAAgB,GAAI,KAAK,GAAG,YACkC,CAAA;AAE3E,eAAO,MAAM,kBAAkB,GAAI,KAAK,GAAG,YACoC,CAAA;AAE/E,eAAO,MAAM,sBAAsB,GAAI,KAAK,GAAG,YAG9C,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,KAAK,GAAG,YAAuC,CAAA;AAEzE,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,IACnD,KAAK,GAAG,aAEjB;AAED,wBAAgB,aAAa,CAC3B,GAAG,EAAE,GAAG,EACR,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,GAC1C,SAAS,GAAG,IAAI,CAWlB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-ext-embed",
3
- "version": "0.31.1",
3
+ "version": "0.32.0",
4
4
  "description": "Embed extension for Twitter, YouTube, etc.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,10 +35,10 @@
35
35
  "@vanilla-extract/css": "^1.21.1",
36
36
  "@vanilla-extract/vite-plugin": "^5.2.5",
37
37
  "lexical": "^0.48.0",
38
- "react": "^19.2.7",
39
- "react-dom": "^19.2.7",
38
+ "react": "^19.2.8",
39
+ "react-dom": "^19.2.8",
40
40
  "shiki": "^4.3.1",
41
- "typescript": "^6.0.3",
41
+ "typescript": "^7.0.2",
42
42
  "unplugin-dts": "^1.0.3",
43
43
  "vite": "^8.1.5"
44
44
  },
@@ -49,9 +49,9 @@
49
49
  "react": ">=19",
50
50
  "react-dom": ">=19",
51
51
  "shiki": ">=4.0.0",
52
- "@haklex/rich-editor": "^0.31.1",
53
- "@haklex/rich-editor-ui": "^0.31.1",
54
- "@haklex/rich-style-token": "^0.31.1"
52
+ "@haklex/rich-editor": "^0.32.0",
53
+ "@haklex/rich-editor-ui": "^0.32.0",
54
+ "@haklex/rich-style-token": "^0.32.0"
55
55
  },
56
56
  "peerDependenciesMeta": {
57
57
  "shiki": {