@lexical/code 0.50.1-nightly.20260908.0 → 0.50.1-nightly.20260910.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
@@ -2,7 +2,10 @@
2
2
 
3
3
  [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_code)
4
4
 
5
- This package contains the functionality for the code blocks and code highlighting for Lexical.
5
+ This package contains the functionality for the code blocks for Lexical. It is a
6
+ thin re-export of `@lexical/code-core` and contains no syntax highlighting.
6
7
 
7
- Note that the prism highlighting functionality from this module is deprecated and will be removed in a future version of lexical.
8
- If you intend to use code highlighting, depend directly on `@lexical/code-shiki` or `@lexical/code-prism`.
8
+ Code highlighting lives in its own packages: depend directly on
9
+ `@lexical/code-shiki` or `@lexical/code-prism` for that. The deprecated prism
10
+ re-exports that this package used to forward from `@lexical/code-prism` have
11
+ been removed; import them from `@lexical/code-prism` instead.
@@ -6,77 +6,4 @@
6
6
  *
7
7
  */
8
8
 
9
- 'use strict';
10
-
11
- var LexicalCodePrism = require('@lexical/code-prism');
12
- var codeCore = require('@lexical/code-core');
13
-
14
- function _interopNamespaceDefault(e) {
15
- var n = Object.create(null);
16
- if (e) {
17
- for (var k in e) {
18
- n[k] = e[k];
19
- }
20
- }
21
- n.default = e;
22
- return n;
23
- }
24
-
25
- var LexicalCodePrism__namespace = /*#__PURE__*/_interopNamespaceDefault(LexicalCodePrism);
26
-
27
- /**
28
- * Copyright (c) Meta Platforms, Inc. and affiliates.
29
- *
30
- * This source code is licensed under the MIT license found in the
31
- * LICENSE file in the root directory of this source tree.
32
- *
33
- */
34
-
35
-
36
- /** @deprecated moved to `@lexical/code-prism` */
37
- const CODE_LANGUAGE_FRIENDLY_NAME_MAP = LexicalCodePrism__namespace.CODE_LANGUAGE_FRIENDLY_NAME_MAP;
38
- /** @deprecated moved to `@lexical/code-prism` */
39
- const CODE_LANGUAGE_MAP = LexicalCodePrism__namespace.CODE_LANGUAGE_MAP;
40
- /** @deprecated moved to `@lexical/code-prism` */
41
- const getCodeLanguageOptions = LexicalCodePrism__namespace.getCodeLanguageOptions;
42
- /** @deprecated moved to `@lexical/code-prism` */
43
- const getCodeLanguages = LexicalCodePrism__namespace.getCodeLanguages;
44
- /** @deprecated moved to `@lexical/code-prism` */
45
- const getCodeThemeOptions = LexicalCodePrism__namespace.getCodeThemeOptions;
46
- /** @deprecated moved to `@lexical/code-prism` */
47
- const getLanguageFriendlyName = LexicalCodePrism__namespace.getLanguageFriendlyName;
48
- /** @deprecated renamed to `normalizeCodeLanguage` and moved to `@lexical/code-prism` */
49
- const normalizeCodeLang = LexicalCodePrism__namespace.normalizeCodeLanguage;
50
- /** @deprecated moved to `@lexical/code-prism` */
51
- const normalizeCodeLanguage = LexicalCodePrism__namespace.normalizeCodeLanguage;
52
- /** @deprecated moved to `@lexical/code-prism` */
53
- const PrismTokenizer = LexicalCodePrism__namespace.PrismTokenizer;
54
- /** @deprecated moved to `@lexical/code-prism` */
55
- const registerCodeHighlighting = LexicalCodePrism__namespace.registerCodeHighlighting;
56
-
57
- exports.$createCodeHighlightNode = codeCore.$createCodeHighlightNode;
58
- exports.$createCodeNode = codeCore.$createCodeNode;
59
- exports.$getCodeLineDirection = codeCore.$getCodeLineDirection;
60
- exports.$getEndOfCodeInLine = codeCore.$getEndOfCodeInLine;
61
- exports.$getFirstCodeNodeOfLine = codeCore.$getFirstCodeNodeOfLine;
62
- exports.$getLastCodeNodeOfLine = codeCore.$getLastCodeNodeOfLine;
63
- exports.$getStartOfCodeInLine = codeCore.$getStartOfCodeInLine;
64
- exports.$isCodeHighlightNode = codeCore.$isCodeHighlightNode;
65
- exports.$isCodeNode = codeCore.$isCodeNode;
66
- exports.$outdentLeadingSpaces = codeCore.$outdentLeadingSpaces;
67
- exports.CodeExtension = codeCore.CodeExtension;
68
- exports.CodeHighlightNode = codeCore.CodeHighlightNode;
69
- exports.CodeIndentExtension = codeCore.CodeIndentExtension;
70
- exports.CodeNode = codeCore.CodeNode;
71
- exports.DEFAULT_CODE_LANGUAGE = codeCore.DEFAULT_CODE_LANGUAGE;
72
- exports.getDefaultCodeLanguage = codeCore.getDefaultCodeLanguage;
73
- exports.CODE_LANGUAGE_FRIENDLY_NAME_MAP = CODE_LANGUAGE_FRIENDLY_NAME_MAP;
74
- exports.CODE_LANGUAGE_MAP = CODE_LANGUAGE_MAP;
75
- exports.PrismTokenizer = PrismTokenizer;
76
- exports.getCodeLanguageOptions = getCodeLanguageOptions;
77
- exports.getCodeLanguages = getCodeLanguages;
78
- exports.getCodeThemeOptions = getCodeThemeOptions;
79
- exports.getLanguageFriendlyName = getLanguageFriendlyName;
80
- exports.normalizeCodeLang = normalizeCodeLang;
81
- exports.normalizeCodeLanguage = normalizeCodeLanguage;
82
- exports.registerCodeHighlighting = registerCodeHighlighting;
9
+ export { $createCodeHighlightNode, $createCodeNode, $getCodeLineDirection, $getEndOfCodeInLine, $getFirstCodeNodeOfLine, $getLastCodeNodeOfLine, $getStartOfCodeInLine, $isCodeHighlightNode, $isCodeNode, $outdentLeadingSpaces, CodeExtension, CodeHighlightNode, CodeIndentExtension, CodeNode, DEFAULT_CODE_LANGUAGE, getDefaultCodeLanguage } from '@lexical/code-core';
@@ -6,6 +6,22 @@
6
6
  *
7
7
  */
8
8
 
9
- 'use strict'
10
- const LexicalCode = process.env.NODE_ENV !== 'production' ? require('./LexicalCode.dev.js') : require('./LexicalCode.prod.js');
11
- module.exports = LexicalCode;
9
+ import * as modDev from './LexicalCode.dev.js';
10
+ import * as modProd from './LexicalCode.prod.js';
11
+ const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
12
+ export const $createCodeHighlightNode = mod.$createCodeHighlightNode;
13
+ export const $createCodeNode = mod.$createCodeNode;
14
+ export const $getCodeLineDirection = mod.$getCodeLineDirection;
15
+ export const $getEndOfCodeInLine = mod.$getEndOfCodeInLine;
16
+ export const $getFirstCodeNodeOfLine = mod.$getFirstCodeNodeOfLine;
17
+ export const $getLastCodeNodeOfLine = mod.$getLastCodeNodeOfLine;
18
+ export const $getStartOfCodeInLine = mod.$getStartOfCodeInLine;
19
+ export const $isCodeHighlightNode = mod.$isCodeHighlightNode;
20
+ export const $isCodeNode = mod.$isCodeNode;
21
+ export const $outdentLeadingSpaces = mod.$outdentLeadingSpaces;
22
+ export const CodeExtension = mod.CodeExtension;
23
+ export const CodeHighlightNode = mod.CodeHighlightNode;
24
+ export const CodeIndentExtension = mod.CodeIndentExtension;
25
+ export const CodeNode = mod.CodeNode;
26
+ export const DEFAULT_CODE_LANGUAGE = mod.DEFAULT_CODE_LANGUAGE;
27
+ export const getDefaultCodeLanguage = mod.getDefaultCodeLanguage;
@@ -14,7 +14,6 @@ import type {
14
14
  ParagraphNode,
15
15
  RangeSelection,
16
16
  EditorThemeClasses,
17
- LexicalEditor,
18
17
  LineBreakNode,
19
18
  SerializedElementNode,
20
19
  SerializedTabNode,
@@ -112,33 +111,3 @@ export type CodeIndentConfig = {
112
111
  };
113
112
 
114
113
  declare export var CodeIndentExtension: LexicalExtension<CodeIndentConfig, "@lexical/code-indent", unknown, unknown>;
115
-
116
- /**
117
- * Deprecated @lexical/code-prism re-exports
118
- */
119
-
120
- type TokenContent = string | Token | (string | Token)[];
121
- export interface Token {
122
- type: string;
123
- content: TokenContent;
124
- }
125
- export interface Tokenizer {
126
- defaultLanguage: string | null;
127
- tokenize(code: string, language?: string): (string | Token)[];
128
- }
129
- declare export var PrismTokenizer: Tokenizer;
130
-
131
- declare export function registerCodeHighlighting(
132
- editor: LexicalEditor,
133
- tokenizer?: Tokenizer,
134
- ): () => void;
135
-
136
- /** @deprecated renamed to {@link normalizeCodeLanguage} and moved to `@lexical/code-prism` */
137
- declare export function normalizeCodeLang(lang: string): string;
138
- declare export function normalizeCodeLanguage(lang: string): string;
139
-
140
- declare export var getCodeLanguages: () => string[];
141
- declare export function getLanguageFriendlyName(lang: string): string;
142
-
143
- declare export var CODE_LANGUAGE_FRIENDLY_NAME_MAP: {[string]: string};
144
- declare export var CODE_LANGUAGE_MAP: {[string]: string};
@@ -6,4 +6,4 @@
6
6
  *
7
7
  */
8
8
 
9
- "use strict";var e=require("@lexical/code-prism"),o=require("@lexical/code-core");function t(e){var o=Object.create(null);if(e)for(var t in e)o[t]=e[t];return o.default=e,o}var d=/*#__PURE__*/t(e);const i=d.CODE_LANGUAGE_FRIENDLY_NAME_MAP,n=d.CODE_LANGUAGE_MAP,g=d.getCodeLanguageOptions,r=d.getCodeLanguages,s=d.getCodeThemeOptions,a=d.getLanguageFriendlyName,C=d.normalizeCodeLanguage,L=d.normalizeCodeLanguage,p=d.PrismTokenizer,x=d.registerCodeHighlighting;exports.$createCodeHighlightNode=o.$createCodeHighlightNode,exports.$createCodeNode=o.$createCodeNode,exports.$getCodeLineDirection=o.$getCodeLineDirection,exports.$getEndOfCodeInLine=o.$getEndOfCodeInLine,exports.$getFirstCodeNodeOfLine=o.$getFirstCodeNodeOfLine,exports.$getLastCodeNodeOfLine=o.$getLastCodeNodeOfLine,exports.$getStartOfCodeInLine=o.$getStartOfCodeInLine,exports.$isCodeHighlightNode=o.$isCodeHighlightNode,exports.$isCodeNode=o.$isCodeNode,exports.$outdentLeadingSpaces=o.$outdentLeadingSpaces,exports.CodeExtension=o.CodeExtension,exports.CodeHighlightNode=o.CodeHighlightNode,exports.CodeIndentExtension=o.CodeIndentExtension,exports.CodeNode=o.CodeNode,exports.DEFAULT_CODE_LANGUAGE=o.DEFAULT_CODE_LANGUAGE,exports.getDefaultCodeLanguage=o.getDefaultCodeLanguage,exports.CODE_LANGUAGE_FRIENDLY_NAME_MAP=i,exports.CODE_LANGUAGE_MAP=n,exports.PrismTokenizer=p,exports.getCodeLanguageOptions=g,exports.getCodeLanguages=r,exports.getCodeThemeOptions=s,exports.getLanguageFriendlyName=a,exports.normalizeCodeLang=C,exports.normalizeCodeLanguage=L,exports.registerCodeHighlighting=x;
9
+ export{$createCodeHighlightNode,$createCodeNode,$getCodeLineDirection,$getEndOfCodeInLine,$getFirstCodeNodeOfLine,$getLastCodeNodeOfLine,$getStartOfCodeInLine,$isCodeHighlightNode,$isCodeNode,$outdentLeadingSpaces,CodeExtension,CodeHighlightNode,CodeIndentExtension,CodeNode,DEFAULT_CODE_LANGUAGE,getDefaultCodeLanguage}from"@lexical/code-core";
package/dist/index.d.ts CHANGED
@@ -5,26 +5,5 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import * as LexicalCodePrism from '@lexical/code-prism';
9
8
  export type { SerializedCodeNode } from '@lexical/code-core';
10
9
  export { $createCodeHighlightNode, $createCodeNode, $getCodeLineDirection, $getEndOfCodeInLine, $getFirstCodeNodeOfLine, $getLastCodeNodeOfLine, $getStartOfCodeInLine, $isCodeHighlightNode, $isCodeNode, $outdentLeadingSpaces, CodeExtension, CodeHighlightNode, type CodeIndentConfig, CodeIndentExtension, CodeNode, DEFAULT_CODE_LANGUAGE, getDefaultCodeLanguage, } from '@lexical/code-core';
11
- /** @deprecated moved to `@lexical/code-prism` */
12
- export declare const CODE_LANGUAGE_FRIENDLY_NAME_MAP: Record<string, string>;
13
- /** @deprecated moved to `@lexical/code-prism` */
14
- export declare const CODE_LANGUAGE_MAP: Record<string, string>;
15
- /** @deprecated moved to `@lexical/code-prism` */
16
- export declare const getCodeLanguageOptions: typeof LexicalCodePrism.getCodeLanguageOptions;
17
- /** @deprecated moved to `@lexical/code-prism` */
18
- export declare const getCodeLanguages: () => string[];
19
- /** @deprecated moved to `@lexical/code-prism` */
20
- export declare const getCodeThemeOptions: typeof LexicalCodePrism.getCodeThemeOptions;
21
- /** @deprecated moved to `@lexical/code-prism` */
22
- export declare const getLanguageFriendlyName: typeof LexicalCodePrism.getLanguageFriendlyName;
23
- /** @deprecated renamed to `normalizeCodeLanguage` and moved to `@lexical/code-prism` */
24
- export declare const normalizeCodeLang: typeof LexicalCodePrism.normalizeCodeLanguage;
25
- /** @deprecated moved to `@lexical/code-prism` */
26
- export declare const normalizeCodeLanguage: typeof LexicalCodePrism.normalizeCodeLanguage;
27
- /** @deprecated moved to `@lexical/code-prism` */
28
- export declare const PrismTokenizer: LexicalCodePrism.Tokenizer;
29
- /** @deprecated moved to `@lexical/code-prism` */
30
- export declare const registerCodeHighlighting: typeof LexicalCodePrism.registerCodeHighlighting;
package/package.json CHANGED
@@ -8,40 +8,29 @@
8
8
  "code"
9
9
  ],
10
10
  "license": "MIT",
11
- "version": "0.50.1-nightly.20260908.0",
11
+ "version": "0.50.1-nightly.20260910.0",
12
12
  "main": "./dist/LexicalCode.js",
13
13
  "types": "./dist/typescript-too-old.d.ts",
14
14
  "dependencies": {
15
- "@lexical/code-core": "0.50.1-nightly.20260908.0",
16
- "@lexical/code-prism": "0.50.1-nightly.20260908.0",
17
- "@lexical/extension": "0.50.1-nightly.20260908.0",
18
- "lexical": "0.50.1-nightly.20260908.0"
15
+ "@lexical/code-core": "0.50.1-nightly.20260910.0",
16
+ "@lexical/extension": "0.50.1-nightly.20260910.0",
17
+ "lexical": "0.50.1-nightly.20260910.0"
19
18
  },
20
19
  "repository": {
21
20
  "type": "git",
22
21
  "url": "git+https://github.com/facebook/lexical.git",
23
22
  "directory": "packages/lexical-code"
24
23
  },
25
- "module": "./dist/LexicalCode.mjs",
26
- "sideEffects": true,
24
+ "module": "./dist/LexicalCode.js",
25
+ "sideEffects": false,
27
26
  "exports": {
28
27
  ".": {
29
28
  "source": "./src/index.ts",
30
- "import": {
31
- "types@<5.2": "./dist/typescript-too-old.d.ts",
32
- "types": "./dist/index.d.ts",
33
- "development": "./dist/LexicalCode.dev.mjs",
34
- "production": "./dist/LexicalCode.prod.mjs",
35
- "node": "./dist/LexicalCode.node.mjs",
36
- "default": "./dist/LexicalCode.mjs"
37
- },
38
- "require": {
39
- "types@<5.2": "./dist/typescript-too-old.d.ts",
40
- "types": "./dist/index.d.ts",
41
- "development": "./dist/LexicalCode.dev.js",
42
- "production": "./dist/LexicalCode.prod.js",
43
- "default": "./dist/LexicalCode.js"
44
- }
29
+ "types@<5.2": "./dist/typescript-too-old.d.ts",
30
+ "types": "./dist/index.d.ts",
31
+ "development": "./dist/LexicalCode.dev.js",
32
+ "production": "./dist/LexicalCode.prod.js",
33
+ "default": "./dist/LexicalCode.js"
45
34
  }
46
35
  },
47
36
  "files": [
@@ -71,5 +60,6 @@
71
60
  "typescript": {
72
61
  "optional": true
73
62
  }
74
- }
63
+ },
64
+ "type": "module"
75
65
  }
package/src/index.ts CHANGED
@@ -6,8 +6,6 @@
6
6
  *
7
7
  */
8
8
 
9
- import * as LexicalCodePrism from '@lexical/code-prism';
10
-
11
9
  export type {SerializedCodeNode} from '@lexical/code-core';
12
10
  export {
13
11
  $createCodeHighlightNode,
@@ -28,26 +26,3 @@ export {
28
26
  DEFAULT_CODE_LANGUAGE,
29
27
  getDefaultCodeLanguage,
30
28
  } from '@lexical/code-core';
31
-
32
- /** @deprecated moved to `@lexical/code-prism` */
33
- export const CODE_LANGUAGE_FRIENDLY_NAME_MAP =
34
- LexicalCodePrism.CODE_LANGUAGE_FRIENDLY_NAME_MAP;
35
- /** @deprecated moved to `@lexical/code-prism` */
36
- export const CODE_LANGUAGE_MAP = LexicalCodePrism.CODE_LANGUAGE_MAP;
37
- /** @deprecated moved to `@lexical/code-prism` */
38
- export const getCodeLanguageOptions = LexicalCodePrism.getCodeLanguageOptions;
39
- /** @deprecated moved to `@lexical/code-prism` */
40
- export const getCodeLanguages = LexicalCodePrism.getCodeLanguages;
41
- /** @deprecated moved to `@lexical/code-prism` */
42
- export const getCodeThemeOptions = LexicalCodePrism.getCodeThemeOptions;
43
- /** @deprecated moved to `@lexical/code-prism` */
44
- export const getLanguageFriendlyName = LexicalCodePrism.getLanguageFriendlyName;
45
- /** @deprecated renamed to `normalizeCodeLanguage` and moved to `@lexical/code-prism` */
46
- export const normalizeCodeLang = LexicalCodePrism.normalizeCodeLanguage;
47
- /** @deprecated moved to `@lexical/code-prism` */
48
- export const normalizeCodeLanguage = LexicalCodePrism.normalizeCodeLanguage;
49
- /** @deprecated moved to `@lexical/code-prism` */
50
- export const PrismTokenizer = LexicalCodePrism.PrismTokenizer;
51
- /** @deprecated moved to `@lexical/code-prism` */
52
- export const registerCodeHighlighting =
53
- LexicalCodePrism.registerCodeHighlighting;
@@ -1,42 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- import * as LexicalCodePrism from '@lexical/code-prism';
10
- export { $createCodeHighlightNode, $createCodeNode, $getCodeLineDirection, $getEndOfCodeInLine, $getFirstCodeNodeOfLine, $getLastCodeNodeOfLine, $getStartOfCodeInLine, $isCodeHighlightNode, $isCodeNode, $outdentLeadingSpaces, CodeExtension, CodeHighlightNode, CodeIndentExtension, CodeNode, DEFAULT_CODE_LANGUAGE, getDefaultCodeLanguage } from '@lexical/code-core';
11
-
12
- /**
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- *
18
- */
19
-
20
-
21
- /** @deprecated moved to `@lexical/code-prism` */
22
- const CODE_LANGUAGE_FRIENDLY_NAME_MAP = LexicalCodePrism.CODE_LANGUAGE_FRIENDLY_NAME_MAP;
23
- /** @deprecated moved to `@lexical/code-prism` */
24
- const CODE_LANGUAGE_MAP = LexicalCodePrism.CODE_LANGUAGE_MAP;
25
- /** @deprecated moved to `@lexical/code-prism` */
26
- const getCodeLanguageOptions = LexicalCodePrism.getCodeLanguageOptions;
27
- /** @deprecated moved to `@lexical/code-prism` */
28
- const getCodeLanguages = LexicalCodePrism.getCodeLanguages;
29
- /** @deprecated moved to `@lexical/code-prism` */
30
- const getCodeThemeOptions = LexicalCodePrism.getCodeThemeOptions;
31
- /** @deprecated moved to `@lexical/code-prism` */
32
- const getLanguageFriendlyName = LexicalCodePrism.getLanguageFriendlyName;
33
- /** @deprecated renamed to `normalizeCodeLanguage` and moved to `@lexical/code-prism` */
34
- const normalizeCodeLang = LexicalCodePrism.normalizeCodeLanguage;
35
- /** @deprecated moved to `@lexical/code-prism` */
36
- const normalizeCodeLanguage = LexicalCodePrism.normalizeCodeLanguage;
37
- /** @deprecated moved to `@lexical/code-prism` */
38
- const PrismTokenizer = LexicalCodePrism.PrismTokenizer;
39
- /** @deprecated moved to `@lexical/code-prism` */
40
- const registerCodeHighlighting = LexicalCodePrism.registerCodeHighlighting;
41
-
42
- export { CODE_LANGUAGE_FRIENDLY_NAME_MAP, CODE_LANGUAGE_MAP, PrismTokenizer, getCodeLanguageOptions, getCodeLanguages, getCodeThemeOptions, getLanguageFriendlyName, normalizeCodeLang, normalizeCodeLanguage, registerCodeHighlighting };
@@ -1,37 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- import * as modDev from './LexicalCode.dev.mjs';
10
- import * as modProd from './LexicalCode.prod.mjs';
11
- const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
12
- export const $createCodeHighlightNode = mod.$createCodeHighlightNode;
13
- export const $createCodeNode = mod.$createCodeNode;
14
- export const $getCodeLineDirection = mod.$getCodeLineDirection;
15
- export const $getEndOfCodeInLine = mod.$getEndOfCodeInLine;
16
- export const $getFirstCodeNodeOfLine = mod.$getFirstCodeNodeOfLine;
17
- export const $getLastCodeNodeOfLine = mod.$getLastCodeNodeOfLine;
18
- export const $getStartOfCodeInLine = mod.$getStartOfCodeInLine;
19
- export const $isCodeHighlightNode = mod.$isCodeHighlightNode;
20
- export const $isCodeNode = mod.$isCodeNode;
21
- export const $outdentLeadingSpaces = mod.$outdentLeadingSpaces;
22
- export const CODE_LANGUAGE_FRIENDLY_NAME_MAP = mod.CODE_LANGUAGE_FRIENDLY_NAME_MAP;
23
- export const CODE_LANGUAGE_MAP = mod.CODE_LANGUAGE_MAP;
24
- export const CodeExtension = mod.CodeExtension;
25
- export const CodeHighlightNode = mod.CodeHighlightNode;
26
- export const CodeIndentExtension = mod.CodeIndentExtension;
27
- export const CodeNode = mod.CodeNode;
28
- export const DEFAULT_CODE_LANGUAGE = mod.DEFAULT_CODE_LANGUAGE;
29
- export const PrismTokenizer = mod.PrismTokenizer;
30
- export const getCodeLanguageOptions = mod.getCodeLanguageOptions;
31
- export const getCodeLanguages = mod.getCodeLanguages;
32
- export const getCodeThemeOptions = mod.getCodeThemeOptions;
33
- export const getDefaultCodeLanguage = mod.getDefaultCodeLanguage;
34
- export const getLanguageFriendlyName = mod.getLanguageFriendlyName;
35
- export const normalizeCodeLang = mod.normalizeCodeLang;
36
- export const normalizeCodeLanguage = mod.normalizeCodeLanguage;
37
- export const registerCodeHighlighting = mod.registerCodeHighlighting;
@@ -1,35 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- const mod = await (process.env.NODE_ENV !== 'production' ? import('./LexicalCode.dev.mjs') : import('./LexicalCode.prod.mjs'));
10
- export const $createCodeHighlightNode = mod.$createCodeHighlightNode;
11
- export const $createCodeNode = mod.$createCodeNode;
12
- export const $getCodeLineDirection = mod.$getCodeLineDirection;
13
- export const $getEndOfCodeInLine = mod.$getEndOfCodeInLine;
14
- export const $getFirstCodeNodeOfLine = mod.$getFirstCodeNodeOfLine;
15
- export const $getLastCodeNodeOfLine = mod.$getLastCodeNodeOfLine;
16
- export const $getStartOfCodeInLine = mod.$getStartOfCodeInLine;
17
- export const $isCodeHighlightNode = mod.$isCodeHighlightNode;
18
- export const $isCodeNode = mod.$isCodeNode;
19
- export const $outdentLeadingSpaces = mod.$outdentLeadingSpaces;
20
- export const CODE_LANGUAGE_FRIENDLY_NAME_MAP = mod.CODE_LANGUAGE_FRIENDLY_NAME_MAP;
21
- export const CODE_LANGUAGE_MAP = mod.CODE_LANGUAGE_MAP;
22
- export const CodeExtension = mod.CodeExtension;
23
- export const CodeHighlightNode = mod.CodeHighlightNode;
24
- export const CodeIndentExtension = mod.CodeIndentExtension;
25
- export const CodeNode = mod.CodeNode;
26
- export const DEFAULT_CODE_LANGUAGE = mod.DEFAULT_CODE_LANGUAGE;
27
- export const PrismTokenizer = mod.PrismTokenizer;
28
- export const getCodeLanguageOptions = mod.getCodeLanguageOptions;
29
- export const getCodeLanguages = mod.getCodeLanguages;
30
- export const getCodeThemeOptions = mod.getCodeThemeOptions;
31
- export const getDefaultCodeLanguage = mod.getDefaultCodeLanguage;
32
- export const getLanguageFriendlyName = mod.getLanguageFriendlyName;
33
- export const normalizeCodeLang = mod.normalizeCodeLang;
34
- export const normalizeCodeLanguage = mod.normalizeCodeLanguage;
35
- export const registerCodeHighlighting = mod.registerCodeHighlighting;
@@ -1,9 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- import*as e from"@lexical/code-prism";export{$createCodeHighlightNode,$createCodeNode,$getCodeLineDirection,$getEndOfCodeInLine,$getFirstCodeNodeOfLine,$getLastCodeNodeOfLine,$getStartOfCodeInLine,$isCodeHighlightNode,$isCodeNode,$outdentLeadingSpaces,CodeExtension,CodeHighlightNode,CodeIndentExtension,CodeNode,DEFAULT_CODE_LANGUAGE,getDefaultCodeLanguage}from"@lexical/code-core";const o=e.CODE_LANGUAGE_FRIENDLY_NAME_MAP,d=e.CODE_LANGUAGE_MAP,i=e.getCodeLanguageOptions,t=e.getCodeLanguages,g=e.getCodeThemeOptions,n=e.getLanguageFriendlyName,a=e.normalizeCodeLanguage,C=e.normalizeCodeLanguage,r=e.PrismTokenizer,L=e.registerCodeHighlighting;export{o as CODE_LANGUAGE_FRIENDLY_NAME_MAP,d as CODE_LANGUAGE_MAP,r as PrismTokenizer,i as getCodeLanguageOptions,t as getCodeLanguages,g as getCodeThemeOptions,n as getLanguageFriendlyName,a as normalizeCodeLang,C as normalizeCodeLanguage,L as registerCodeHighlighting};