@atlaskit/editor-common 118.10.3 → 118.12.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 (54) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/compass.yml +2 -2
  3. package/dist/cjs/core-utils/index.js +1 -8
  4. package/dist/cjs/extensibility/ExtensionSSRReactContextsProvider.js +1 -2
  5. package/dist/cjs/monitoring/error.js +1 -1
  6. package/dist/cjs/portal/common.js +2 -3
  7. package/dist/cjs/react-node-view/NodeViewContentHole.js +1 -2
  8. package/dist/cjs/react-node-view/index.js +1 -1
  9. package/dist/cjs/styles/shared/table.js +1 -1
  10. package/dist/cjs/ui/DropList/index.js +1 -1
  11. package/dist/cjs/ui/Mention/index.js +20 -1
  12. package/dist/cjs/ui/Mention/mention-node-data-provider.js +5 -0
  13. package/dist/cjs/ui/Mention/mention-with-profilecard.js +8 -0
  14. package/dist/cjs/ui/Mention/mention-with-providers.js +92 -15
  15. package/dist/cjs/utils/content-visibility.js +177 -0
  16. package/dist/es2019/core-utils/index.js +1 -2
  17. package/dist/es2019/extensibility/ExtensionSSRReactContextsProvider.js +1 -2
  18. package/dist/es2019/monitoring/error.js +1 -1
  19. package/dist/es2019/portal/common.js +2 -3
  20. package/dist/es2019/react-node-view/NodeViewContentHole.js +1 -2
  21. package/dist/es2019/react-node-view/index.js +2 -2
  22. package/dist/es2019/styles/shared/table.js +8 -0
  23. package/dist/es2019/ui/DropList/index.js +1 -1
  24. package/dist/es2019/ui/Mention/index.js +21 -2
  25. package/dist/es2019/ui/Mention/mention-node-data-provider.js +1 -0
  26. package/dist/es2019/ui/Mention/mention-with-profilecard.js +8 -0
  27. package/dist/es2019/ui/Mention/mention-with-providers.js +69 -2
  28. package/dist/es2019/utils/content-visibility.js +165 -0
  29. package/dist/esm/core-utils/index.js +1 -2
  30. package/dist/esm/extensibility/ExtensionSSRReactContextsProvider.js +1 -2
  31. package/dist/esm/monitoring/error.js +1 -1
  32. package/dist/esm/portal/common.js +2 -3
  33. package/dist/esm/react-node-view/NodeViewContentHole.js +1 -2
  34. package/dist/esm/react-node-view/index.js +2 -2
  35. package/dist/esm/styles/shared/table.js +1 -1
  36. package/dist/esm/ui/DropList/index.js +1 -1
  37. package/dist/esm/ui/Mention/index.js +21 -2
  38. package/dist/esm/ui/Mention/mention-node-data-provider.js +1 -0
  39. package/dist/esm/ui/Mention/mention-with-profilecard.js +8 -0
  40. package/dist/esm/ui/Mention/mention-with-providers.js +92 -15
  41. package/dist/esm/utils/content-visibility.js +166 -0
  42. package/dist/types/core-utils/index.d.ts +0 -1
  43. package/dist/types/mention.d.ts +1 -0
  44. package/dist/types/ui/Mention/index.d.ts +2 -0
  45. package/dist/types/ui/Mention/mention-node-data-provider.d.ts +32 -0
  46. package/dist/types/ui/Mention/mention-with-profilecard.d.ts +5 -1
  47. package/dist/types/ui/Mention/mention-with-providers.d.ts +11 -1
  48. package/dist/types/utils/content-visibility.d.ts +78 -0
  49. package/package.json +9 -3
  50. package/utils/content-visibility/package.json +10 -0
  51. package/dist/cjs/core-utils/is-ssr-streaming.js +0 -22
  52. package/dist/es2019/core-utils/is-ssr-streaming.js +0 -16
  53. package/dist/esm/core-utils/is-ssr-streaming.js +0 -16
  54. package/dist/types/core-utils/is-ssr-streaming.d.ts +0 -10
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isSSRStreaming = isSSRStreaming;
7
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
8
- /** Returns true if React SSR streaming is actually active at runtime. */
9
- function isSSRStreaming() {
10
- try {
11
- var _process$env;
12
- var isSSRRendered =
13
- // In most places there is no document when running on server-side
14
- // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
15
- typeof document === 'undefined' || typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.REACT_SSR) || typeof window !== 'undefined' && window.__SSR_RENDERED__ || globalThis.__SSR_RENDERED__;
16
- var isSSRReactStreaming = typeof window !== 'undefined' && window.__SSR_REACT_STREAMING__ || globalThis.__SSR_REACT_STREAMING__;
17
- return Boolean(isSSRRendered) && (0, _expValEquals.expValEquals)('platform_editor_editor_ssr_streaming', 'isEnabled', true) && Boolean(isSSRReactStreaming);
18
- } catch (_unused) {
19
- // Catch possible error that might occur and just return false
20
- return false;
21
- }
22
- }
@@ -1,16 +0,0 @@
1
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
- /** Returns true if React SSR streaming is actually active at runtime. */
3
- export function isSSRStreaming() {
4
- try {
5
- var _process$env;
6
- const isSSRRendered =
7
- // In most places there is no document when running on server-side
8
- // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
9
- typeof document === 'undefined' || typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.REACT_SSR) || typeof window !== 'undefined' && window.__SSR_RENDERED__ || globalThis.__SSR_RENDERED__;
10
- const isSSRReactStreaming = typeof window !== 'undefined' && window.__SSR_REACT_STREAMING__ || globalThis.__SSR_REACT_STREAMING__;
11
- return Boolean(isSSRRendered) && expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true) && Boolean(isSSRReactStreaming);
12
- } catch {
13
- // Catch possible error that might occur and just return false
14
- return false;
15
- }
16
- }
@@ -1,16 +0,0 @@
1
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
- /** Returns true if React SSR streaming is actually active at runtime. */
3
- export function isSSRStreaming() {
4
- try {
5
- var _process$env;
6
- var isSSRRendered =
7
- // In most places there is no document when running on server-side
8
- // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
9
- typeof document === 'undefined' || typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.REACT_SSR) || typeof window !== 'undefined' && window.__SSR_RENDERED__ || globalThis.__SSR_RENDERED__;
10
- var isSSRReactStreaming = typeof window !== 'undefined' && window.__SSR_REACT_STREAMING__ || globalThis.__SSR_REACT_STREAMING__;
11
- return Boolean(isSSRRendered) && expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true) && Boolean(isSSRReactStreaming);
12
- } catch (_unused) {
13
- // Catch possible error that might occur and just return false
14
- return false;
15
- }
16
- }
@@ -1,10 +0,0 @@
1
- declare global {
2
- var __SSR_RENDERED__: boolean | undefined;
3
- var __SSR_REACT_STREAMING__: boolean | undefined;
4
- interface Window {
5
- __SSR_REACT_STREAMING__?: boolean;
6
- __SSR_RENDERED__?: boolean;
7
- }
8
- }
9
- /** Returns true if React SSR streaming is actually active at runtime. */
10
- export declare function isSSRStreaming(): boolean;