@haklex/rich-ext-embed 0.28.0 → 0.29.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.
@@ -125,7 +125,7 @@ var fallbackLink = "_1xclnejo";
125
125
  var tweet = "_1xclnejp";
126
126
  var loading = "_1xclnejq";
127
127
  //#endregion
128
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
128
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/typeof.js
129
129
  function _typeof(o) {
130
130
  "@babel/helpers - typeof";
131
131
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -135,7 +135,7 @@ function _typeof(o) {
135
135
  }, _typeof(o);
136
136
  }
137
137
  //#endregion
138
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
138
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPrimitive.js
139
139
  function toPrimitive(t, r) {
140
140
  if ("object" != _typeof(t) || !t) return t;
141
141
  var e = t[Symbol.toPrimitive];
@@ -147,13 +147,13 @@ function toPrimitive(t, r) {
147
147
  return ("string" === r ? String : Number)(t);
148
148
  }
149
149
  //#endregion
150
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
150
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPropertyKey.js
151
151
  function toPropertyKey(t) {
152
152
  var i = toPrimitive(t, "string");
153
153
  return "symbol" == _typeof(i) ? i : i + "";
154
154
  }
155
155
  //#endregion
156
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
156
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/defineProperty.js
157
157
  function _defineProperty(e, r, t) {
158
158
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
159
159
  value: t,
@@ -525,7 +525,8 @@ var EmbedNode = class EmbedNode extends DecoratorNode {
525
525
  isInline() {
526
526
  return false;
527
527
  }
528
- static importJSON(serializedNode) {
528
+ static importJSON(_serializedNode) {
529
+ const serializedNode = _serializedNode;
529
530
  return $createEmbedNode(serializedNode.url, serializedNode.source);
530
531
  }
531
532
  exportJSON() {
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-BOzRfwqp.js";
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-B4f-2JSH.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";
@@ -8,7 +8,8 @@ var EmbedEditNode = class EmbedEditNode extends EmbedNode {
8
8
  static clone(node) {
9
9
  return new EmbedEditNode(node.__url, node.__source, node.__key);
10
10
  }
11
- static importJSON(serializedNode) {
11
+ static importJSON(_serializedNode) {
12
+ const serializedNode = _serializedNode;
12
13
  return new EmbedEditNode(serializedNode.url, serializedNode.source);
13
14
  }
14
15
  decorate(_editor, _config) {
@@ -1,12 +1,12 @@
1
1
  import { CommandItemConfig } from '@haklex/rich-editor/commands';
2
- import { EditorConfig, LexicalEditor, LexicalNode } from 'lexical';
2
+ import { EditorConfig, LexicalEditor, LexicalNode, SerializedLexicalNode } from 'lexical';
3
3
  import { ReactElement } from 'react';
4
4
  import { EmbedType } from '../url-matchers';
5
- import { EmbedNode, SerializedEmbedNode } from './EmbedNode';
5
+ import { EmbedNode } from './EmbedNode';
6
6
  export declare class EmbedEditNode extends EmbedNode {
7
7
  static commandItems: CommandItemConfig[];
8
8
  static clone(node: EmbedEditNode): EmbedEditNode;
9
- static importJSON(serializedNode: SerializedEmbedNode): EmbedEditNode;
9
+ static importJSON(_serializedNode: SerializedLexicalNode & Record<string, unknown>): EmbedEditNode;
10
10
  decorate(_editor: LexicalEditor, _config: EditorConfig): ReactElement;
11
11
  }
12
12
  export declare function $createEmbedEditNode(url: string, source: EmbedType | null): EmbedEditNode;
@@ -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,MAAM,SAAS,CAAC;AAGxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,KAAK,mBAAmB,EAAE,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,CAAC,cAAc,EAAE,mBAAmB,GAAG,aAAa;IAIrE,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","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;IAKhB,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"}
@@ -14,7 +14,7 @@ export declare class EmbedNode extends DecoratorNode<ReactElement> {
14
14
  createDOM(_config: EditorConfig): HTMLElement;
15
15
  updateDOM(): boolean;
16
16
  isInline(): boolean;
17
- static importJSON(serializedNode: SerializedEmbedNode): EmbedNode;
17
+ static importJSON(_serializedNode: SerializedLexicalNode & Record<string, unknown>): EmbedNode;
18
18
  exportJSON(): SerializedEmbedNode;
19
19
  getUrl(): string;
20
20
  setUrl(url: string): void;
@@ -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,CAAA;AAChB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAKzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAA;CAAE,EACzC,qBAAqB,CACtB,CAAA;AAED,qBAAa,SAAU,SAAQ,aAAa,CAAC,YAAY,CAAC;IACxD,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAA;IAE1B,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,cAAc,EAAE,mBAAmB,GAAG,SAAS;IAIjE,UAAU,IAAI,mBAAmB;IAUjC,MAAM,IAAI,MAAM;IAIhB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKzB,SAAS,IAAI,SAAS,GAAG,IAAI;IAI7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;IAIpB,QAAQ,IAAI,OAAO;IAInB,MAAM,CAAC,UAAU,CAAC,eAAe,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;IAK9F,UAAU,IAAI,mBAAmB;IAUjC,MAAM,IAAI,MAAM;IAIhB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKzB,SAAS,IAAI,SAAS,GAAG,IAAI;IAI7B,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI;IAKzC,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY;CAMtE;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 +1 @@
1
- {"version":3,"file":"EmbedLinkRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/EmbedLinkRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAS1B,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;AAYD,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,kBAAkB,CAAC;AAS1B,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,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"}
package/dist/static.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, n as createSelfThinkingMatcher, o as isGithubFilePreviewUrl, p as EmbedStaticRenderer, r as isBilibiliVideoUrl, s as isTweetUrl, t as EmbedLinkRenderer, u as $createEmbedNode } from "./EmbedLinkRenderer-BOzRfwqp.js";
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-B4f-2JSH.js";
2
2
  //#region src/static.ts
3
3
  var embedNodes = [EmbedNode];
4
4
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-ext-embed",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "Embed extension for Twitter, YouTube, etc.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,29 +29,29 @@
29
29
  "react-tweet": "npm:@innei/react-tweet@3.4.3"
30
30
  },
31
31
  "devDependencies": {
32
- "@lexical/react": "^0.45.0",
32
+ "@lexical/react": "^0.46.0",
33
33
  "@types/react": "^19.2.17",
34
34
  "@types/react-dom": "^19.2.3",
35
- "@vanilla-extract/css": "^1.20.1",
36
- "@vanilla-extract/vite-plugin": "^5.2.2",
37
- "lexical": "^0.45.0",
38
- "react": "19.2.6",
39
- "react-dom": "19.2.6",
40
- "shiki": "^4.2.0",
41
- "typescript": "^5.9.3",
42
- "unplugin-dts": "^1.0.2",
43
- "vite": "^8.0.16"
35
+ "@vanilla-extract/css": "^1.21.0",
36
+ "@vanilla-extract/vite-plugin": "^5.2.3",
37
+ "lexical": "^0.46.0",
38
+ "react": "^19.2.7",
39
+ "react-dom": "^19.2.7",
40
+ "shiki": "^4.3.0",
41
+ "typescript": "^6.0.3",
42
+ "unplugin-dts": "^1.0.3",
43
+ "vite": "^8.1.0"
44
44
  },
45
45
  "peerDependencies": {
46
- "@lexical/react": "^0.45.0",
47
- "lexical": "^0.45.0",
46
+ "@lexical/react": "^0.46.0",
47
+ "lexical": "^0.46.0",
48
48
  "lucide-react": "^1.0.0",
49
49
  "react": ">=19",
50
50
  "react-dom": ">=19",
51
51
  "shiki": ">=4.0.0",
52
- "@haklex/rich-editor": "^0.28.0",
53
- "@haklex/rich-editor-ui": "^0.28.0",
54
- "@haklex/rich-style-token": "^0.28.0"
52
+ "@haklex/rich-editor": "^0.29.0",
53
+ "@haklex/rich-editor-ui": "^0.29.0",
54
+ "@haklex/rich-style-token": "^0.29.0"
55
55
  },
56
56
  "peerDependenciesMeta": {
57
57
  "shiki": {