@haklex/rich-ext-embed 0.68.0 → 0.69.1

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.
@@ -56,11 +56,11 @@ var dot = "_1qucygce";
56
56
  var divider = "_1qucygcf";
57
57
  var input = "_1qucygcg";
58
58
  //#endregion
59
- //#region src/context/EmbedRendererContext.tsx
60
- var EmbedRendererCtx = createContext({});
61
- var EmbedRendererProvider = EmbedRendererCtx.Provider;
59
+ //#region src/context/EmbedRendererContext.ts
60
+ var EmbedRendererContext = createContext({});
61
+ var EmbedRendererProvider = EmbedRendererContext;
62
62
  function useEmbedRenderers() {
63
- return use(EmbedRendererCtx);
63
+ return use(EmbedRendererContext);
64
64
  }
65
65
  //#endregion
66
66
  //#region src/styles-static.css.ts
@@ -376,44 +376,72 @@ function GithubFileEmbed({ url, href }) {
376
376
  endLine = Number.parseInt(matchResult[1].slice(1));
377
377
  }
378
378
  }
379
- const [content, setContent] = useState(null);
380
- const [highlightedHtml, setHighlightedHtml] = useState(null);
381
- const [loading$1, setLoading] = useState(true);
382
- const [error, setError] = useState(false);
383
379
  const lang = useMemo(() => getLangFromPath(path), [path]);
380
+ const requestKey = JSON.stringify([
381
+ owner,
382
+ repo,
383
+ ref,
384
+ path,
385
+ startLine,
386
+ endLine,
387
+ highlightScheme
388
+ ]);
389
+ const [fileState, setFileState] = useState(null);
390
+ const currentState = fileState?.requestKey === requestKey ? fileState : null;
391
+ const content = currentState?.content ?? null;
392
+ const highlightedHtml = currentState?.highlightedHtml ?? null;
393
+ const loading$1 = currentState?.loading ?? true;
394
+ const error = currentState?.error ?? false;
384
395
  useEffect(() => {
385
396
  let cancelled = false;
386
- setContent(null);
387
- setHighlightedHtml(null);
388
- setLoading(true);
389
- setError(false);
390
- fetch(`https://cdn.jsdelivr.net/gh/${owner}/${repo}${ref ? `@${ref}` : ""}/${path}`).then((res) => {
397
+ const controller = new AbortController();
398
+ fetch(`https://cdn.jsdelivr.net/gh/${owner}/${repo}${ref ? `@${ref}` : ""}/${path}`, { signal: controller.signal }).then((res) => {
391
399
  if (!res.ok) throw new Error(`HTTP ${res.status}`);
392
400
  return res.text();
393
401
  }).then((text) => {
394
402
  if (cancelled) return;
395
- setContent(text);
403
+ setFileState({
404
+ requestKey,
405
+ content: text,
406
+ highlightedHtml: null,
407
+ loading: true,
408
+ error: false
409
+ });
396
410
  const lines = text.split("\n");
397
411
  const end = endLine ?? lines.length;
398
412
  const displayCode = lines.slice(startLine, end).join("\n");
399
413
  highlightCode(displayCode, lang, highlightScheme).then((html) => {
400
- if (!cancelled) {
401
- setHighlightedHtml(html);
402
- setLoading(false);
403
- }
414
+ if (!cancelled) setFileState({
415
+ requestKey,
416
+ content: text,
417
+ highlightedHtml: html,
418
+ loading: false,
419
+ error: false
420
+ });
404
421
  }).catch(() => {
405
- if (!cancelled) setLoading(false);
422
+ if (!cancelled) setFileState({
423
+ requestKey,
424
+ content: text,
425
+ highlightedHtml: null,
426
+ loading: false,
427
+ error: false
428
+ });
406
429
  });
407
430
  }).catch(() => {
408
- if (!cancelled) {
409
- setError(true);
410
- setLoading(false);
411
- }
431
+ if (!cancelled) setFileState({
432
+ requestKey,
433
+ content: null,
434
+ highlightedHtml: null,
435
+ loading: false,
436
+ error: true
437
+ });
412
438
  });
413
439
  return () => {
414
440
  cancelled = true;
441
+ controller.abort();
415
442
  };
416
443
  }, [
444
+ requestKey,
417
445
  owner,
418
446
  repo,
419
447
  ref,
@@ -434,6 +462,10 @@ function GithubFileEmbed({ url, href }) {
434
462
  const lines = content.split("\n");
435
463
  const end = endLine ?? lines.length;
436
464
  const isLong = end - startLine > 20;
465
+ const displayLines = lines.slice(startLine, end).map((text, offset) => ({
466
+ lineNumber: startLine + offset + 1,
467
+ text
468
+ }));
437
469
  return /* @__PURE__ */ jsxs("div", {
438
470
  className: `${githubFile} ${semanticClassNames.githubFile}`,
439
471
  children: [/* @__PURE__ */ jsx("div", {
@@ -442,17 +474,17 @@ function GithubFileEmbed({ url, href }) {
442
474
  className: `${code} ${semanticClassNames.code}`,
443
475
  dangerouslySetInnerHTML: { __html: highlightedHtml },
444
476
  style: { "--start-line": startLine }
445
- }) : /* @__PURE__ */ jsx("pre", { children: /* @__PURE__ */ jsx("code", { children: lines.slice(startLine, end).map((line, i) => /* @__PURE__ */ jsxs("span", {
477
+ }) : /* @__PURE__ */ jsx("pre", { children: /* @__PURE__ */ jsx("code", { children: displayLines.map(({ lineNumber, text }) => /* @__PURE__ */ jsxs("span", {
446
478
  className: `${githubFileLine} ${semanticClassNames.githubFileLine}`,
447
479
  children: [
448
480
  /* @__PURE__ */ jsx("span", {
449
481
  className: `${githubFileLineNum} ${semanticClassNames.githubFileLineNum}`,
450
- children: startLine + i + 1
482
+ children: lineNumber
451
483
  }),
452
- line,
484
+ text,
453
485
  "\n"
454
486
  ]
455
- }, i)) }) })
487
+ }, lineNumber)) }) })
456
488
  }), /* @__PURE__ */ jsxs("a", {
457
489
  className: `${sourceLink} ${semanticClassNames.sourceLink}`,
458
490
  href,
@@ -663,10 +695,12 @@ var typeLabels = {
663
695
  function EmbedLinkRenderer({ type, url, nodeKey }) {
664
696
  const [editor] = useLexicalComposerContext();
665
697
  const [editUrl, setEditUrl] = useState(url);
698
+ const [syncedUrl, setSyncedUrl] = useState(url);
666
699
  const inputRef = useRef(null);
667
- useEffect(() => {
700
+ if (url !== syncedUrl) {
701
+ setSyncedUrl(url);
668
702
  setEditUrl(url);
669
- }, [url]);
703
+ }
670
704
  useEffect(() => {
671
705
  if (!url) inputRef.current?.focus();
672
706
  }, [url]);
@@ -1,4 +1,3 @@
1
- export declare const INSERT_EMBED_COMMAND: import('lexical').LexicalCommand<string>;
2
1
  export interface EmbedPluginProps {
3
2
  selfHostnames?: string[];
4
3
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EmbedPlugin.d.ts","sourceRoot":"","sources":["../src/EmbedPlugin.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,0CAAwC,CAAC;AAE1E,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,WAAW,CAAC,EAAE,aAAa,EAAE,EAAE,gBAAgB,QA2D9D"}
1
+ {"version":3,"file":"EmbedPlugin.d.ts","sources":["../src/EmbedPlugin.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,WAAW,CAAC,EAAE,aAAa,EAAE,EAAE,gBAAgB,QA2D9D"}
@@ -0,0 +1,2 @@
1
+ export declare const INSERT_EMBED_COMMAND: import("lexical").LexicalCommand<string>;
2
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sources":["../src/commands.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,0CAAwC,CAAC"}
@@ -1,9 +1,9 @@
1
- import { ComponentType } from 'react';
1
+ import type { ComponentType } from 'react';
2
2
  export type EmbedRendererComponent = ComponentType<{
3
3
  url: string;
4
4
  type: string | null;
5
5
  }>;
6
6
  export type EmbedRendererMap = Partial<Record<string, EmbedRendererComponent>>;
7
- export declare const EmbedRendererProvider: import('react').Provider<Partial<Record<string, EmbedRendererComponent>>>;
7
+ export declare const EmbedRendererProvider: import("react").Context<Partial<Record<string, EmbedRendererComponent>>>;
8
8
  export declare function useEmbedRenderers(): EmbedRendererMap;
9
9
  //# sourceMappingURL=EmbedRendererContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmbedRendererContext.d.ts","sourceRoot":"","sources":["../../src/context/EmbedRendererContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC;IACjD,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB,CAAC,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAA;AAI9E,eAAO,MAAM,qBAAqB,2EAA4B,CAAA;AAE9D,wBAAgB,iBAAiB,IAAI,gBAAgB,CAEpD"}
1
+ {"version":3,"file":"EmbedRendererContext.d.ts","sources":["../../src/context/EmbedRendererContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAAC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC;AAI/E,eAAO,MAAM,qBAAqB,0EAAuB,CAAC;AAE1D,wBAAgB,iBAAiB,IAAI,gBAAgB,CAEpD"}
package/dist/index.d.ts CHANGED
@@ -1,15 +1,16 @@
1
1
  export type { SerializedEmbedNode } from './nodes/EmbedNode';
2
2
  export { $createEmbedNode, $isEmbedNode, EmbedNode } from './nodes/EmbedNode';
3
- export { $createEmbedEditNode, $isEmbedEditNode, EmbedEditNode, } from './nodes/EmbedEditNode';
3
+ export { $createEmbedEditNode, $isEmbedEditNode, EmbedEditNode } from './nodes/EmbedEditNode';
4
4
  export { embedEditNodes, embedNodes } from './nodes';
5
+ export { INSERT_EMBED_COMMAND } from './commands';
5
6
  export type { EmbedPluginProps } from './EmbedPlugin';
6
- export { EmbedPlugin, INSERT_EMBED_COMMAND } from './EmbedPlugin';
7
+ export { EmbedPlugin } from './EmbedPlugin';
7
8
  export type { EmbedLinkRendererProps } from './renderers/EmbedLinkRenderer';
8
9
  export { EmbedLinkRenderer } from './renderers/EmbedLinkRenderer';
9
10
  export type { EmbedStaticRendererProps } from './renderers/EmbedStaticRenderer';
10
11
  export { EmbedStaticRenderer } from './renderers/EmbedStaticRenderer';
11
- export type { EmbedRendererComponent, EmbedRendererMap, } from './context/EmbedRendererContext';
12
- export { EmbedRendererProvider, useEmbedRenderers, } from './context/EmbedRendererContext';
12
+ export type { EmbedRendererComponent, EmbedRendererMap } from './context/EmbedRendererContext';
13
+ export { EmbedRendererProvider, useEmbedRenderers } from './context/EmbedRendererContext';
13
14
  export type { EmbedType } from './url-matchers';
14
15
  export { createSelfThinkingMatcher, isAppleMusicUrl, isBilibiliVideoUrl, isCodesandboxUrl, isGistUrl, isGithubFilePreviewUrl, isSpotifyUrl, isTweetUrl, isYoutubeUrl, matchEmbedUrl, } from './url-matchers';
15
16
  //# 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,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,sBAAsB,EACtB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAC"}
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
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-UWcO3Rut.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-DrnAIIzr.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";
@@ -52,8 +52,10 @@ function $isEmbedEditNode(node) {
52
52
  var embedNodes = [EmbedNode];
53
53
  var embedEditNodes = [EmbedEditNode];
54
54
  //#endregion
55
- //#region src/EmbedPlugin.tsx
55
+ //#region src/commands.ts
56
56
  var INSERT_EMBED_COMMAND = createCommand("INSERT_EMBED");
57
+ //#endregion
58
+ //#region src/EmbedPlugin.tsx
57
59
  function EmbedPlugin({ selfHostnames }) {
58
60
  const [editor] = useLexicalComposerContext();
59
61
  const thinkingMatcher = useMemo(() => selfHostnames?.length ? createSelfThinkingMatcher(selfHostnames) : void 0, [selfHostnames]);
@@ -1,7 +1,7 @@
1
- import { CommandItemConfig } from '@haklex/rich-editor/commands';
2
- import { EditorConfig, LexicalEditor, LexicalNode, SerializedLexicalNode } from 'lexical';
3
- import { ReactElement } from 'react';
4
- import { EmbedType } from '../url-matchers';
1
+ import type { CommandItemConfig } from '@haklex/rich-editor/commands';
2
+ import type { EditorConfig, LexicalEditor, LexicalNode, SerializedLexicalNode } from 'lexical';
3
+ import type { ReactElement } from 'react';
4
+ import type { EmbedType } from '../url-matchers';
5
5
  import { EmbedNode } from './EmbedNode';
6
6
  export declare class EmbedEditNode extends EmbedNode {
7
7
  static commandItems: CommandItemConfig[];
@@ -1 +1 @@
1
- {"version":3,"file":"EmbedEditNode.d.ts","sourceRoot":"","sources":["../../src/nodes/EmbedEditNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAG/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,EAA4B,MAAM,aAAa,CAAC;AAElE,qBAAa,aAAc,SAAQ,SAAS;IAC1C,MAAM,CAAC,YAAY,EAAE,iBAAiB,EAAE,CAetC;IAEF,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa;IAIhD,MAAM,CAAC,UAAU,CACf,eAAe,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/D,aAAa;IAOhB,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY;CAOtE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,GAAG,aAAa,CAEzF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,aAAa,CAE5F"}
1
+ {"version":3,"file":"EmbedEditNode.d.ts","sources":["../../src/nodes/EmbedEditNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAG/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,EAA4B,MAAM,aAAa,CAAC;AAElE,qBAAa,aAAc,SAAQ,SAAS;IAC1C,MAAM,CAAC,YAAY,EAAE,iBAAiB,EAAE,CAetC;IAEF,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa,CAE/C;IAED,MAAM,CAAC,UAAU,CACf,eAAe,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/D,aAAa,CAKf;IAED,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY,CAMpE;CACF;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,GAAG,aAAa,CAEzF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,aAAa,CAE5F"}
@@ -1,6 +1,7 @@
1
- import { EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedLexicalNode, Spread, DecoratorNode } from 'lexical';
2
- import { ReactElement } from 'react';
3
- import { EmbedType } from '../url-matchers';
1
+ import type { EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
2
+ import { DecoratorNode } from 'lexical';
3
+ import type { ReactElement } from 'react';
4
+ import type { EmbedType } from '../url-matchers';
4
5
  export type SerializedEmbedNode = Spread<{
5
6
  url: string;
6
7
  source: EmbedType | null;
@@ -1 +1 @@
1
- {"version":3,"file":"EmbedNode.d.ts","sourceRoot":"","sources":["../../src/nodes/EmbedNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,MAAM,EACP,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAA;CAAE,EACzC,qBAAqB,CACtB,CAAC;AAEF,qBAAa,SAAU,SAAQ,aAAa,CAAC,YAAY,CAAC;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAE3B,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS;gBAI5B,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,OAAO;IAMhE,SAAS,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW;IAM7C,SAAS,IAAI,OAAO;IAIpB,QAAQ,IAAI,OAAO;IAInB,MAAM,CAAC,UAAU,CAAC,eAAe,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;IAO9F,UAAU,IAAI,mBAAmB;I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AS,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,OAAO,EAI/D;IAED,SAAS,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW,CAI5C;IAED,SAAS,IAAI,OAAO,CAEnB;IAED,QAAQ,IAAI,OAAO,CAElB;IAED,MAAM,CAAC,UAAU,CAAC,eAAe,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAK7F;IAED,UAAU,IAAI,mBAAmB,CAQhC;IAED,MAAM,IAAI,MAAM,CAEf;IAED,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAGxB;IAED,SAAS,IAAI,SAAS,GAAG,IAAI,CAE5B;IAED,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAGxC;IAED,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY,CAKpE;CACF;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAEjF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,SAAS,CAEpF"}
@@ -1,4 +1,4 @@
1
- import { Klass, LexicalNode } from 'lexical';
1
+ import type { Klass, LexicalNode } from 'lexical';
2
2
  export declare const embedNodes: Array<Klass<LexicalNode>>;
3
3
  export declare const embedEditNodes: Array<Klass<LexicalNode>>;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/nodes/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAKjD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAe,CAAA;AAChE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../src/nodes/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAKjD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAe,CAAA;AAChE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAmB,CAAA"}
@@ -1,8 +1,9 @@
1
- import { EmbedType } from '../url-matchers';
1
+
2
+ import type { EmbedType } from '../url-matchers';
2
3
  export interface EmbedLinkRendererProps {
3
4
  nodeKey: string;
4
5
  type: EmbedType | null;
5
6
  url: string;
6
7
  }
7
- export declare function EmbedLinkRenderer({ type, url, nodeKey }: EmbedLinkRendererProps): import('react').JSX.Element;
8
+ export declare function EmbedLinkRenderer({ type, url, nodeKey }: EmbedLinkRendererProps): import("react").JSX.Element;
8
9
  //# sourceMappingURL=EmbedLinkRenderer.d.ts.map
@@ -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;AAcD,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,sBAAsB,+BAgG/E"}
1
+ {"version":3,"file":"EmbedLinkRenderer.d.ts","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,+BAkG/E"}
@@ -1,7 +1,8 @@
1
- import { EmbedType } from '../url-matchers';
1
+
2
+ import { type EmbedType } from '../url-matchers';
2
3
  export interface EmbedStaticRendererProps {
3
4
  type: EmbedType | null;
4
5
  url: string;
5
6
  }
6
- export declare function EmbedStaticRenderer({ type, url }: EmbedStaticRendererProps): import('react').JSX.Element | null;
7
+ export declare function EmbedStaticRenderer({ type, url }: EmbedStaticRendererProps): import("react").JSX.Element | null;
7
8
  //# sourceMappingURL=EmbedStaticRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmbedStaticRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/EmbedStaticRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAUvB,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,iBAAiB,CAAC;AAoDtE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb;AA+PD,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,wBAAwB,sCAmI1E"}
1
+ {"version":3,"file":"EmbedStaticRenderer.d.ts","sources":["../../src/renderers/EmbedStaticRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAUvB,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,iBAAiB,CAAC;AAoDtE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb;AAqSD,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,wBAAwB,sCAoI1E"}
package/dist/static.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Klass, LexicalNode } from 'lexical';
1
+ import type { Klass, LexicalNode } from 'lexical';
2
2
  export type { SerializedEmbedNode } from './nodes/EmbedNode';
3
3
  export { $createEmbedNode, $isEmbedNode, EmbedNode } from './nodes/EmbedNode';
4
4
  export declare const embedNodes: Array<Klass<LexicalNode>>;
@@ -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,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,sBAAsB,EACtB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"static.d.ts","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,4 +1,4 @@
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-UWcO3Rut.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-DrnAIIzr.js";
2
2
  //#region src/static.ts
3
3
  var embedNodes = [EmbedNode];
4
4
  //#endregion
@@ -1,32 +1,32 @@
1
1
  export declare const semanticClassNames: {
2
- readonly ratioContainer: "embed-static-ratio-container";
3
- readonly ratioInner: "embed-static-ratio-inner";
4
- readonly iframe: "embed-static-iframe";
5
- readonly gist: "embed-static-gist";
6
- readonly gistIframe: "embed-static-gist__iframe";
7
- readonly sourceLink: "embed-static-source-link";
8
- readonly githubFile: "embed-static-github-file";
9
- readonly githubFileCode: "embed-static-github-file__code";
10
- readonly githubFileCodeLong: "embed-static-github-file__code--long";
11
- readonly githubFileLine: "embed-static-github-file__line";
12
- readonly githubFileLineNum: "embed-static-github-file__line-num";
13
- readonly code: "embed-static-code";
14
- readonly fallback: "embed-static-fallback";
15
- readonly fallbackGeneric: "embed-static-fallback--generic";
16
- readonly fallbackTweet: "embed-static-fallback--tweet";
17
- readonly fallbackYoutube: "embed-static-fallback--youtube";
18
- readonly fallbackAppleMusic: "embed-static-fallback--apple-music";
19
- readonly fallbackSpotify: "embed-static-fallback--spotify";
20
- readonly fallbackCodesandbox: "embed-static-fallback--codesandbox";
21
- readonly fallbackBilibili: "embed-static-fallback--bilibili";
22
- readonly fallbackGithubFile: "embed-static-fallback--github-file";
23
- readonly fallbackGithubGist: "embed-static-fallback--github-gist";
24
- readonly fallbackThinking: "embed-static-fallback--thinking";
25
- readonly fallbackBadge: "embed-static-fallback__badge";
26
- readonly fallbackDot: "embed-static-fallback__dot";
27
- readonly fallbackLink: "embed-static-fallback__link";
28
- readonly tweet: "embed-static-tweet";
29
- readonly loading: "embed-static-loading";
2
+ readonly ratioContainer: 'embed-static-ratio-container';
3
+ readonly ratioInner: 'embed-static-ratio-inner';
4
+ readonly iframe: 'embed-static-iframe';
5
+ readonly gist: 'embed-static-gist';
6
+ readonly gistIframe: 'embed-static-gist__iframe';
7
+ readonly sourceLink: 'embed-static-source-link';
8
+ readonly githubFile: 'embed-static-github-file';
9
+ readonly githubFileCode: 'embed-static-github-file__code';
10
+ readonly githubFileCodeLong: 'embed-static-github-file__code--long';
11
+ readonly githubFileLine: 'embed-static-github-file__line';
12
+ readonly githubFileLineNum: 'embed-static-github-file__line-num';
13
+ readonly code: 'embed-static-code';
14
+ readonly fallback: 'embed-static-fallback';
15
+ readonly fallbackGeneric: 'embed-static-fallback--generic';
16
+ readonly fallbackTweet: 'embed-static-fallback--tweet';
17
+ readonly fallbackYoutube: 'embed-static-fallback--youtube';
18
+ readonly fallbackAppleMusic: 'embed-static-fallback--apple-music';
19
+ readonly fallbackSpotify: 'embed-static-fallback--spotify';
20
+ readonly fallbackCodesandbox: 'embed-static-fallback--codesandbox';
21
+ readonly fallbackBilibili: 'embed-static-fallback--bilibili';
22
+ readonly fallbackGithubFile: 'embed-static-fallback--github-file';
23
+ readonly fallbackGithubGist: 'embed-static-fallback--github-gist';
24
+ readonly fallbackThinking: 'embed-static-fallback--thinking';
25
+ readonly fallbackBadge: 'embed-static-fallback__badge';
26
+ readonly fallbackDot: 'embed-static-fallback__dot';
27
+ readonly fallbackLink: 'embed-static-fallback__link';
28
+ readonly tweet: 'embed-static-tweet';
29
+ readonly loading: 'embed-static-loading';
30
30
  };
31
31
  export declare const semanticFallbackModifierClass: {
32
32
  readonly generic: "embed-static-fallback--generic";
@@ -53,7 +53,7 @@ export declare const githubFileLine: string;
53
53
  export declare const githubFileLineNum: string;
54
54
  export declare const code: string;
55
55
  export declare const fallback: string;
56
- export declare const fallbackType: Record<"generic" | "tweet" | "youtube" | "apple-music" | "spotify" | "codesandbox" | "bilibili" | "github-file" | "github-gist" | "thinking", string>;
56
+ export declare const fallbackType: Record<"apple-music" | "bilibili" | "codesandbox" | "generic" | "github-file" | "github-gist" | "spotify" | "thinking" | "tweet" | "youtube", string>;
57
57
  export declare const fallbackBadge: string;
58
58
  export declare const fallbackDot: string;
59
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,IAAI,QAEf,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"}
1
+ {"version":3,"file":"styles-static.css.d.ts","sources":["../src/styles-static.css.ts"],"names":[],"mappings":"A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cAAc,QAGzB,CAAC;AAEH,eAAO,MAAM,kBAAkB,QAE7B,CAAC;AAaH,eAAO,MAAM,cAAc,QAEzB,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAO5B,CAAC;AAEH,eAAO,MAAM,IAAI,QAEf,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"}
@@ -1,20 +1,20 @@
1
1
  export declare const semanticClassNames: {
2
- readonly wrapper: "rich-embed-link-wrapper";
3
- readonly embed: "rich-embed";
4
- readonly embedGeneric: "rich-embed--generic";
5
- readonly embedTweet: "rich-embed--tweet";
6
- readonly embedYoutube: "rich-embed--youtube";
7
- readonly embedAppleMusic: "rich-embed--apple-music";
8
- readonly embedSpotify: "rich-embed--spotify";
9
- readonly embedCodesandbox: "rich-embed--codesandbox";
10
- readonly embedBilibili: "rich-embed--bilibili";
11
- readonly embedGithubFile: "rich-embed--github-file";
12
- readonly embedGithubGist: "rich-embed--github-gist";
13
- readonly embedThinking: "rich-embed--thinking";
14
- readonly badge: "rich-embed__badge";
15
- readonly dot: "rich-embed__dot";
16
- readonly divider: "rich-embed__divider";
17
- readonly input: "rich-embed__input";
2
+ readonly wrapper: 'rich-embed-link-wrapper';
3
+ readonly embed: 'rich-embed';
4
+ readonly embedGeneric: 'rich-embed--generic';
5
+ readonly embedTweet: 'rich-embed--tweet';
6
+ readonly embedYoutube: 'rich-embed--youtube';
7
+ readonly embedAppleMusic: 'rich-embed--apple-music';
8
+ readonly embedSpotify: 'rich-embed--spotify';
9
+ readonly embedCodesandbox: 'rich-embed--codesandbox';
10
+ readonly embedBilibili: 'rich-embed--bilibili';
11
+ readonly embedGithubFile: 'rich-embed--github-file';
12
+ readonly embedGithubGist: 'rich-embed--github-gist';
13
+ readonly embedThinking: 'rich-embed--thinking';
14
+ readonly badge: 'rich-embed__badge';
15
+ readonly dot: 'rich-embed__dot';
16
+ readonly divider: 'rich-embed__divider';
17
+ readonly input: 'rich-embed__input';
18
18
  };
19
19
  export declare const semanticEmbedModifierClass: {
20
20
  readonly generic: "rich-embed--generic";
@@ -30,7 +30,7 @@ export declare const semanticEmbedModifierClass: {
30
30
  };
31
31
  export declare const wrapper: string;
32
32
  export declare const embed: string;
33
- export declare const embedType: Record<"generic" | "tweet" | "youtube" | "apple-music" | "spotify" | "codesandbox" | "bilibili" | "github-file" | "github-gist" | "thinking", string>;
33
+ export declare const embedType: Record<"apple-music" | "bilibili" | "codesandbox" | "generic" | "github-file" | "github-gist" | "spotify" | "thinking" | "tweet" | "youtube", string>;
34
34
  export declare const badge: string;
35
35
  export declare const dot: string;
36
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;;;;;;;;;;;;;;;;;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
+ {"version":3,"file":"styles.css.d.ts","sources":["../src/styles.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;aAC7B,OAAO,EAAE,yBAAyB;aAClC,KAAK,EAAE,YAAY;aACnB,YAAY,EAAE,qBAAqB;a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E,SAC9C,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.68.0",
3
+ "version": "0.69.1",
4
4
  "description": "Embed extension for Twitter, YouTube, etc.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,14 +37,12 @@
37
37
  "lexical": "^0.53.0",
38
38
  "react": "^19.3.1",
39
39
  "react-dom": "^19.3.1",
40
- "typescript": "^7.0.2",
41
- "unplugin-dts": "^1.1.2",
42
40
  "vite": "^8.3.5"
43
41
  },
44
42
  "peerDependencies": {
45
- "@haklex/rich-editor": "^0.68.0",
46
- "@haklex/rich-editor-ui": "^0.68.0",
47
- "@haklex/rich-style-token": "^0.68.0",
43
+ "@haklex/rich-editor": "^0.69.1",
44
+ "@haklex/rich-editor-ui": "^0.69.1",
45
+ "@haklex/rich-style-token": "^0.69.1",
48
46
  "@lexical/react": "^0.53.0",
49
47
  "lexical": "^0.53.0",
50
48
  "lucide-react": "^1.0.0",