@lexical/internal 0.45.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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +14 -0
  3. package/dist/LexicalInternalDevInvariant.dev.js +38 -0
  4. package/dist/LexicalInternalDevInvariant.dev.mjs +36 -0
  5. package/dist/LexicalInternalDevInvariant.js +11 -0
  6. package/dist/LexicalInternalDevInvariant.js.flow +14 -0
  7. package/dist/LexicalInternalDevInvariant.mjs +12 -0
  8. package/dist/LexicalInternalDevInvariant.node.mjs +10 -0
  9. package/dist/LexicalInternalDevInvariant.prod.js +9 -0
  10. package/dist/LexicalInternalDevInvariant.prod.mjs +9 -0
  11. package/dist/LexicalInternalFormatDevErrorMessage.dev.js +25 -0
  12. package/dist/LexicalInternalFormatDevErrorMessage.dev.mjs +23 -0
  13. package/dist/LexicalInternalFormatDevErrorMessage.js +11 -0
  14. package/dist/LexicalInternalFormatDevErrorMessage.js.flow +10 -0
  15. package/dist/LexicalInternalFormatDevErrorMessage.mjs +12 -0
  16. package/dist/LexicalInternalFormatDevErrorMessage.node.mjs +10 -0
  17. package/dist/LexicalInternalFormatDevErrorMessage.prod.js +9 -0
  18. package/dist/LexicalInternalFormatDevErrorMessage.prod.mjs +9 -0
  19. package/dist/LexicalInternalFormatDevWarningMessage.dev.js +25 -0
  20. package/dist/LexicalInternalFormatDevWarningMessage.dev.mjs +23 -0
  21. package/dist/LexicalInternalFormatDevWarningMessage.js +11 -0
  22. package/dist/LexicalInternalFormatDevWarningMessage.js.flow +10 -0
  23. package/dist/LexicalInternalFormatDevWarningMessage.mjs +12 -0
  24. package/dist/LexicalInternalFormatDevWarningMessage.node.mjs +10 -0
  25. package/dist/LexicalInternalFormatDevWarningMessage.prod.js +9 -0
  26. package/dist/LexicalInternalFormatDevWarningMessage.prod.mjs +9 -0
  27. package/dist/LexicalInternalFormatProdErrorMessage.dev.js +34 -0
  28. package/dist/LexicalInternalFormatProdErrorMessage.dev.mjs +32 -0
  29. package/dist/LexicalInternalFormatProdErrorMessage.js +11 -0
  30. package/dist/LexicalInternalFormatProdErrorMessage.js.flow +13 -0
  31. package/dist/LexicalInternalFormatProdErrorMessage.mjs +12 -0
  32. package/dist/LexicalInternalFormatProdErrorMessage.node.mjs +10 -0
  33. package/dist/LexicalInternalFormatProdErrorMessage.prod.js +9 -0
  34. package/dist/LexicalInternalFormatProdErrorMessage.prod.mjs +9 -0
  35. package/dist/LexicalInternalFormatProdWarningMessage.dev.js +30 -0
  36. package/dist/LexicalInternalFormatProdWarningMessage.dev.mjs +28 -0
  37. package/dist/LexicalInternalFormatProdWarningMessage.js +11 -0
  38. package/dist/LexicalInternalFormatProdWarningMessage.js.flow +13 -0
  39. package/dist/LexicalInternalFormatProdWarningMessage.mjs +12 -0
  40. package/dist/LexicalInternalFormatProdWarningMessage.node.mjs +10 -0
  41. package/dist/LexicalInternalFormatProdWarningMessage.prod.js +9 -0
  42. package/dist/LexicalInternalFormatProdWarningMessage.prod.mjs +9 -0
  43. package/dist/LexicalInternalInvariant.dev.js +36 -0
  44. package/dist/LexicalInternalInvariant.dev.mjs +34 -0
  45. package/dist/LexicalInternalInvariant.js +11 -0
  46. package/dist/LexicalInternalInvariant.js.flow +14 -0
  47. package/dist/LexicalInternalInvariant.mjs +12 -0
  48. package/dist/LexicalInternalInvariant.node.mjs +10 -0
  49. package/dist/LexicalInternalInvariant.prod.js +9 -0
  50. package/dist/LexicalInternalInvariant.prod.mjs +9 -0
  51. package/dist/LexicalInternalVersion.dev.js +36 -0
  52. package/dist/LexicalInternalVersion.dev.mjs +34 -0
  53. package/dist/LexicalInternalVersion.js +11 -0
  54. package/dist/LexicalInternalVersion.js.flow +10 -0
  55. package/dist/LexicalInternalVersion.mjs +12 -0
  56. package/dist/LexicalInternalVersion.node.mjs +10 -0
  57. package/dist/LexicalInternalVersion.prod.js +9 -0
  58. package/dist/LexicalInternalVersion.prod.mjs +9 -0
  59. package/dist/LexicalInternalWarnOnlyOnce.dev.js +33 -0
  60. package/dist/LexicalInternalWarnOnlyOnce.dev.mjs +31 -0
  61. package/dist/LexicalInternalWarnOnlyOnce.js +11 -0
  62. package/dist/LexicalInternalWarnOnlyOnce.js.flow +10 -0
  63. package/dist/LexicalInternalWarnOnlyOnce.mjs +12 -0
  64. package/dist/LexicalInternalWarnOnlyOnce.node.mjs +10 -0
  65. package/dist/LexicalInternalWarnOnlyOnce.prod.js +9 -0
  66. package/dist/LexicalInternalWarnOnlyOnce.prod.mjs +9 -0
  67. package/dist/devInvariant.d.ts +16 -0
  68. package/dist/formatDevErrorMessage.d.ts +8 -0
  69. package/dist/formatDevWarningMessage.d.ts +8 -0
  70. package/dist/formatProdErrorMessage.d.ts +8 -0
  71. package/dist/formatProdWarningMessage.d.ts +8 -0
  72. package/dist/invariant.d.ts +8 -0
  73. package/dist/version.d.ts +8 -0
  74. package/dist/warnOnlyOnce.d.ts +8 -0
  75. package/package.json +289 -0
  76. package/src/devInvariant.ts +37 -0
  77. package/src/formatDevErrorMessage.ts +13 -0
  78. package/src/formatDevWarningMessage.ts +13 -0
  79. package/src/formatProdErrorMessage.ts +28 -0
  80. package/src/formatProdWarningMessage.ts +24 -0
  81. package/src/invariant.ts +31 -0
  82. package/src/version.ts +24 -0
  83. package/src/warnOnlyOnce.ts +24 -0
@@ -0,0 +1,13 @@
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
+ * @flow strict
8
+ */
9
+
10
+ declare export default function formatProdWarningMessage(
11
+ code: string,
12
+ ...args: Array<string>
13
+ ): void;
@@ -0,0 +1,12 @@
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 './LexicalInternalFormatProdWarningMessage.dev.mjs';
10
+ import * as modProd from './LexicalInternalFormatProdWarningMessage.prod.mjs';
11
+ const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
12
+ export default mod.default;
@@ -0,0 +1,10 @@
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('./LexicalInternalFormatProdWarningMessage.dev.mjs') : import('./LexicalInternalFormatProdWarningMessage.prod.mjs'));
10
+ export default mod.default;
@@ -0,0 +1,9 @@
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
+ "use strict";exports.default=function(e,...n){const r=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",e);for(const e of n)o.append("v",e);r.search=o.toString(),console.warn(`Minified Lexical warning #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};
@@ -0,0 +1,9 @@
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
+ function e(e,...n){const o=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const e of n)r.append("v",e);o.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}export{e as default};
@@ -0,0 +1,36 @@
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
+ 'use strict';
10
+
11
+ /**
12
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ *
14
+ * This source code is licensed under the MIT license found in the
15
+ * LICENSE file in the root directory of this source tree.
16
+ *
17
+ */
18
+
19
+ // invariant(condition, message) will refine types based on "condition", and
20
+ // if "condition" is false will throw an error. This function is special-cased
21
+ // in flow itself, so we can't name it anything else.
22
+ //
23
+ // In a production build the `transformErrorMessages` Babel plugin replaces
24
+ // every call site with a hoisted `if (!cond)` check plus a
25
+ // `formatProdErrorMessage(code, ...args)` call, so this body is only reached
26
+ // when the source is consumed without that transform (the `source` export
27
+ // condition or an untransformed dev build). It must therefore stand on its
28
+ // own: interpolate `%s` placeholders against args and throw.
29
+ function invariant(cond, message = 'Internal Lexical error: invariant() called without a message', ...args) {
30
+ if (cond) {
31
+ return;
32
+ }
33
+ throw new Error(args.reduce((msg, arg) => msg.replace('%s', String(arg)), message));
34
+ }
35
+
36
+ exports.default = invariant;
@@ -0,0 +1,34 @@
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
+ /**
10
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
11
+ *
12
+ * This source code is licensed under the MIT license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ *
15
+ */
16
+
17
+ // invariant(condition, message) will refine types based on "condition", and
18
+ // if "condition" is false will throw an error. This function is special-cased
19
+ // in flow itself, so we can't name it anything else.
20
+ //
21
+ // In a production build the `transformErrorMessages` Babel plugin replaces
22
+ // every call site with a hoisted `if (!cond)` check plus a
23
+ // `formatProdErrorMessage(code, ...args)` call, so this body is only reached
24
+ // when the source is consumed without that transform (the `source` export
25
+ // condition or an untransformed dev build). It must therefore stand on its
26
+ // own: interpolate `%s` placeholders against args and throw.
27
+ function invariant(cond, message = 'Internal Lexical error: invariant() called without a message', ...args) {
28
+ if (cond) {
29
+ return;
30
+ }
31
+ throw new Error(args.reduce((msg, arg) => msg.replace('%s', String(arg)), message));
32
+ }
33
+
34
+ export { invariant as default };
@@ -0,0 +1,11 @@
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
+ 'use strict'
10
+ const LexicalInternalInvariant = process.env.NODE_ENV !== 'production' ? require('./LexicalInternalInvariant.dev.js') : require('./LexicalInternalInvariant.prod.js');
11
+ module.exports = LexicalInternalInvariant;
@@ -0,0 +1,14 @@
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
+ * @flow strict
8
+ */
9
+
10
+ declare export default function invariant(
11
+ cond?: boolean,
12
+ message?: string,
13
+ ...args: Array<string>
14
+ ): void;
@@ -0,0 +1,12 @@
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 './LexicalInternalInvariant.dev.mjs';
10
+ import * as modProd from './LexicalInternalInvariant.prod.mjs';
11
+ const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
12
+ export default mod.default;
@@ -0,0 +1,10 @@
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('./LexicalInternalInvariant.dev.mjs') : import('./LexicalInternalInvariant.prod.mjs'));
10
+ export default mod.default;
@@ -0,0 +1,9 @@
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
+ "use strict";exports.default=function(e,r="Internal Lexical error: invariant() called without a message",...t){if(!e)throw new Error(t.reduce((e,r)=>e.replace("%s",String(r)),r))};
@@ -0,0 +1,9 @@
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
+ function e(e,r="Internal Lexical error: invariant() called without a message",...a){if(!e)throw new Error(a.reduce((e,r)=>e.replace("%s",String(r)),r))}export{e as default};
@@ -0,0 +1,36 @@
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
+ 'use strict';
10
+
11
+ /**
12
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ *
14
+ * This source code is licensed under the MIT license found in the
15
+ * LICENSE file in the root directory of this source tree.
16
+ *
17
+ */
18
+
19
+ // `"0.45.0+dev.cjs"` is statically replaced with the build-specific
20
+ // version string in a Rollup build, and a consumer's bundler `define` can
21
+ // inject it the same way — so the exact `"0.45.0+dev.cjs"` member
22
+ // expression must be preserved for that substitution to match. Reading it
23
+ // inside a try/catch lets the source be consumed directly (via the `source`
24
+ // export condition) in a browser bundle, where `process` is undefined and
25
+ // nothing replaced the reference, without throwing a ReferenceError; it falls
26
+ // back to the literal below instead. The literal is regenerated by
27
+ // `pnpm run update-version`.
28
+ let envLexicalVersion;
29
+ try {
30
+ envLexicalVersion = "0.45.0+dev.cjs";
31
+ } catch (_unused) {
32
+ // `process` is not defined in some browser bundles; use the fallback.
33
+ }
34
+ const LEXICAL_VERSION = envLexicalVersion ?? '0.45.0+source';
35
+
36
+ exports.LEXICAL_VERSION = LEXICAL_VERSION;
@@ -0,0 +1,34 @@
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
+ /**
10
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
11
+ *
12
+ * This source code is licensed under the MIT license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ *
15
+ */
16
+
17
+ // `"0.45.0+dev.esm"` is statically replaced with the build-specific
18
+ // version string in a Rollup build, and a consumer's bundler `define` can
19
+ // inject it the same way — so the exact `"0.45.0+dev.esm"` member
20
+ // expression must be preserved for that substitution to match. Reading it
21
+ // inside a try/catch lets the source be consumed directly (via the `source`
22
+ // export condition) in a browser bundle, where `process` is undefined and
23
+ // nothing replaced the reference, without throwing a ReferenceError; it falls
24
+ // back to the literal below instead. The literal is regenerated by
25
+ // `pnpm run update-version`.
26
+ let envLexicalVersion;
27
+ try {
28
+ envLexicalVersion = "0.45.0+dev.esm";
29
+ } catch (_unused) {
30
+ // `process` is not defined in some browser bundles; use the fallback.
31
+ }
32
+ const LEXICAL_VERSION = envLexicalVersion ?? '0.45.0+source';
33
+
34
+ export { LEXICAL_VERSION };
@@ -0,0 +1,11 @@
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
+ 'use strict'
10
+ const LexicalInternalVersion = process.env.NODE_ENV !== 'production' ? require('./LexicalInternalVersion.dev.js') : require('./LexicalInternalVersion.prod.js');
11
+ module.exports = LexicalInternalVersion;
@@ -0,0 +1,10 @@
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
+ * @flow strict
8
+ */
9
+
10
+ declare export var LEXICAL_VERSION: string;
@@ -0,0 +1,12 @@
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 './LexicalInternalVersion.dev.mjs';
10
+ import * as modProd from './LexicalInternalVersion.prod.mjs';
11
+ const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
12
+ export const LEXICAL_VERSION = mod.LEXICAL_VERSION;
@@ -0,0 +1,10 @@
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('./LexicalInternalVersion.dev.mjs') : import('./LexicalInternalVersion.prod.mjs'));
10
+ export const LEXICAL_VERSION = mod.LEXICAL_VERSION;
@@ -0,0 +1,9 @@
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
+ "use strict";let t;try{t="0.45.0+prod.cjs"}catch(t){}const c=t??"0.45.0+source";exports.LEXICAL_VERSION=c;
@@ -0,0 +1,9 @@
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
+ let t;try{t="0.45.0+prod.esm"}catch(t){}const c=t??"0.45.0+source";export{c as LEXICAL_VERSION};
@@ -0,0 +1,33 @@
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
+ 'use strict';
10
+
11
+ /**
12
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ *
14
+ * This source code is licensed under the MIT license found in the
15
+ * LICENSE file in the root directory of this source tree.
16
+ *
17
+ */
18
+
19
+
20
+ /*@__INLINE__*/
21
+ function warnOnlyOnce(message) {
22
+ {
23
+ let run = false;
24
+ return () => {
25
+ if (!run) {
26
+ console.warn(message);
27
+ }
28
+ run = true;
29
+ };
30
+ }
31
+ }
32
+
33
+ exports.default = warnOnlyOnce;
@@ -0,0 +1,31 @@
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
+ /**
10
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
11
+ *
12
+ * This source code is licensed under the MIT license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ *
15
+ */
16
+
17
+
18
+ /*@__INLINE__*/
19
+ function warnOnlyOnce(message) {
20
+ {
21
+ let run = false;
22
+ return () => {
23
+ if (!run) {
24
+ console.warn(message);
25
+ }
26
+ run = true;
27
+ };
28
+ }
29
+ }
30
+
31
+ export { warnOnlyOnce as default };
@@ -0,0 +1,11 @@
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
+ 'use strict'
10
+ const LexicalInternalWarnOnlyOnce = process.env.NODE_ENV !== 'production' ? require('./LexicalInternalWarnOnlyOnce.dev.js') : require('./LexicalInternalWarnOnlyOnce.prod.js');
11
+ module.exports = LexicalInternalWarnOnlyOnce;
@@ -0,0 +1,10 @@
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
+ * @flow strict
8
+ */
9
+
10
+ declare export default function warnOnlyOnce(message: string): () => void;
@@ -0,0 +1,12 @@
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 './LexicalInternalWarnOnlyOnce.dev.mjs';
10
+ import * as modProd from './LexicalInternalWarnOnlyOnce.prod.mjs';
11
+ const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
12
+ export default mod.default;
@@ -0,0 +1,10 @@
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('./LexicalInternalWarnOnlyOnce.dev.mjs') : import('./LexicalInternalWarnOnlyOnce.prod.mjs'));
10
+ export default mod.default;
@@ -0,0 +1,9 @@
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
+ "use strict";exports.default=function(t){return()=>{}};
@@ -0,0 +1,9 @@
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
+ function t(t){return()=>{}}export{t as default};
@@ -0,0 +1,16 @@
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
+ * If `!cond`, throw in `__DEV__` like an invariant and warn in prod.
10
+ *
11
+ * A production build rewrites call sites via `transformErrorMessages`
12
+ * (throwing dev message in dev, `formatProdWarningMessage` in prod), so this
13
+ * body is only reached when consumed as untransformed source. It interpolates
14
+ * `%s` placeholders and throws outside production, otherwise warns.
15
+ */
16
+ export default function devInvariant(cond?: boolean, message?: string, ...args: string[]): void;
@@ -0,0 +1,8 @@
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
+ export default function formatDevErrorMessage(message: string): never;
@@ -0,0 +1,8 @@
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
+ export default function formatDevWarningMessage(message: string): void;
@@ -0,0 +1,8 @@
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
+ export default function formatProdErrorMessage(code: string, ...args: string[]): never;
@@ -0,0 +1,8 @@
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
+ export default function formatProdWarningMessage(code: string, ...args: string[]): void;
@@ -0,0 +1,8 @@
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
+ export default function invariant(cond?: boolean, message?: string, ...args: string[]): asserts cond;
@@ -0,0 +1,8 @@
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
+ export declare const LEXICAL_VERSION: string;
@@ -0,0 +1,8 @@
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
+ export default function warnOnlyOnce(message: string): () => void;