@atlaskit/renderer 153.3.0 → 153.4.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/CHANGELOG.md +27 -0
- package/dist/cjs/entry-points/extension-handoff.js +25 -0
- package/dist/cjs/react/marks/link-compiled.js +1 -1
- package/dist/cjs/react/nodes/ForgeBodiedExtensionHandoff.js +25 -10
- package/dist/cjs/react/nodes/bodiedExtension.js +13 -2
- package/dist/cjs/react/nodes/extension-comments.js +1 -1
- package/dist/cjs/react/nodes/forgeBodiedExtensionHandoffConfig.js +26 -4
- package/dist/cjs/react/nodes/forgeBodiedExtensionHandoffContext.js +12 -0
- package/dist/cjs/react/nodes/heading-anchor-button.js +1 -1
- package/dist/cjs/react/nodes/heading.js +1 -1
- package/dist/cjs/react/nodes/layoutColumn-compiled.js +1 -1
- package/dist/cjs/react/nodes/panel-compiled.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/element/extension.js +1 -1
- package/dist/es2019/entry-points/extension-handoff.js +4 -0
- package/dist/es2019/react/marks/link-compiled.js +1 -1
- package/dist/es2019/react/nodes/ForgeBodiedExtensionHandoff.js +21 -11
- package/dist/es2019/react/nodes/bodiedExtension.js +13 -4
- package/dist/es2019/react/nodes/extension-comments.js +1 -1
- package/dist/es2019/react/nodes/forgeBodiedExtensionHandoffConfig.js +26 -3
- package/dist/es2019/react/nodes/forgeBodiedExtensionHandoffContext.js +7 -0
- package/dist/es2019/react/nodes/heading-anchor-button.js +1 -1
- package/dist/es2019/react/nodes/heading.js +1 -1
- package/dist/es2019/react/nodes/layoutColumn-compiled.js +1 -1
- package/dist/es2019/react/nodes/panel-compiled.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/element/extension.js +1 -1
- package/dist/esm/entry-points/extension-handoff.js +4 -0
- package/dist/esm/react/marks/link-compiled.js +1 -1
- package/dist/esm/react/nodes/ForgeBodiedExtensionHandoff.js +26 -11
- package/dist/esm/react/nodes/bodiedExtension.js +15 -4
- package/dist/esm/react/nodes/extension-comments.js +1 -1
- package/dist/esm/react/nodes/forgeBodiedExtensionHandoffConfig.js +25 -3
- package/dist/esm/react/nodes/forgeBodiedExtensionHandoffContext.js +7 -0
- package/dist/esm/react/nodes/heading-anchor-button.js +1 -1
- package/dist/esm/react/nodes/heading.js +1 -1
- package/dist/esm/react/nodes/layoutColumn-compiled.js +1 -1
- package/dist/esm/react/nodes/panel-compiled.js +1 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/element/extension.js +1 -1
- package/dist/types/entry-points/extension-handoff.d.ts +2 -0
- package/dist/types/react/nodes/ForgeBodiedExtensionHandoff.d.ts +2 -1
- package/dist/types/react/nodes/forgeBodiedExtensionHandoffConfig.d.ts +10 -2
- package/dist/types/react/nodes/forgeBodiedExtensionHandoffContext.d.ts +8 -0
- package/extension-handoff/package.json +10 -0
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 153.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`3d2733c4e7948`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3d2733c4e7948) -
|
|
8
|
+
Update i18n NPM package versions for editor,editor-extensions,activity-platform,media,elements
|
|
9
|
+
(Group 3)
|
|
10
|
+
- [`d993018bd2aac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d993018bd2aac) -
|
|
11
|
+
Add a host-selected SSR body handoff and UI Kit commit readiness behind
|
|
12
|
+
confluence_forge_uikit_bodied_ssr_handoff, preserving existing Aura handoff behavior. Expose an
|
|
13
|
+
optional generic UI Kit commit callback and connect it to the macro handoff in xen-editor-provider
|
|
14
|
+
without coupling Forge UI renderers to ADF instance contexts. Keep Aura instances in their
|
|
15
|
+
existing experiment, expose the new experiment only for qualifying instances, and release the
|
|
16
|
+
preserved body immediately when a selected client render path cannot report readiness.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
22
|
+
## 153.3.1
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- [`76a9e522fc180`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/76a9e522fc180) -
|
|
27
|
+
Delete unreachable source files
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
|
|
3
30
|
## 153.3.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _forgeBodiedExtensionHandoffConfig.FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ForgeBodiedExtensionHandoffContext", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _forgeBodiedExtensionHandoffContext.ForgeBodiedExtensionHandoffContext;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "ForgeBodiedExtensionHandoffReadyContext", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _forgeBodiedExtensionHandoffContext.ForgeBodiedExtensionHandoffReadyContext;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var _forgeBodiedExtensionHandoffContext = require("../react/nodes/forgeBodiedExtensionHandoffContext");
|
|
25
|
+
var _forgeBodiedExtensionHandoffConfig = require("../react/nodes/forgeBodiedExtensionHandoffConfig");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ForgeBodiedExtensionHandoff.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* ForgeBodiedExtensionHandoff.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -13,6 +13,7 @@ var React = _react;
|
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
15
|
var _bindEventListener = require("bind-event-listener");
|
|
16
|
+
var _forgeBodiedExtensionHandoffContext = require("./forgeBodiedExtensionHandoffContext");
|
|
16
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
18
|
var styles = {
|
|
18
19
|
container: "_1e0c11p5",
|
|
@@ -23,12 +24,23 @@ var styles = {
|
|
|
23
24
|
function ForgeBodiedExtensionHandoff(_ref) {
|
|
24
25
|
var fallback = _ref.fallback,
|
|
25
26
|
localId = _ref.localId,
|
|
26
|
-
result = _ref.result
|
|
27
|
+
result = _ref.result,
|
|
28
|
+
_ref$preserveContentU = _ref.preserveContentUntilReady,
|
|
29
|
+
preserveContentUntilReady = _ref$preserveContentU === void 0 ? false : _ref$preserveContentU;
|
|
27
30
|
var _useState = (0, _react.useState)(false),
|
|
28
31
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
29
32
|
ready = _useState2[0],
|
|
30
33
|
setReady = _useState2[1];
|
|
31
34
|
var hasResult = Boolean(result);
|
|
35
|
+
var handoff = (0, _react.useMemo)(function () {
|
|
36
|
+
return preserveContentUntilReady && !ready ? {
|
|
37
|
+
localId: localId,
|
|
38
|
+
onReady: function onReady() {
|
|
39
|
+
return setReady(true);
|
|
40
|
+
}
|
|
41
|
+
} : undefined;
|
|
42
|
+
}, [localId, preserveContentUntilReady, ready]);
|
|
43
|
+
var showNativeBody = preserveContentUntilReady && !ready;
|
|
32
44
|
(0, _react.useEffect)(function () {
|
|
33
45
|
if (!hasResult || ready) {
|
|
34
46
|
return;
|
|
@@ -39,25 +51,28 @@ function ForgeBodiedExtensionHandoff(_ref) {
|
|
|
39
51
|
setReady(true);
|
|
40
52
|
}
|
|
41
53
|
};
|
|
42
|
-
var unbind = (0, _bindEventListener.bind)(window, {
|
|
54
|
+
var unbind = preserveContentUntilReady ? undefined : (0, _bindEventListener.bind)(window, {
|
|
43
55
|
type: 'message',
|
|
44
56
|
listener: onReady
|
|
45
57
|
});
|
|
46
|
-
//
|
|
58
|
+
// Release stalled or intentionally empty apps rather than retaining the server body forever.
|
|
47
59
|
var timeout = window.setTimeout(function () {
|
|
48
60
|
return setReady(true);
|
|
49
61
|
}, 30000);
|
|
50
62
|
return function () {
|
|
51
|
-
unbind();
|
|
63
|
+
unbind === null || unbind === void 0 || unbind();
|
|
52
64
|
window.clearTimeout(timeout);
|
|
53
65
|
};
|
|
54
|
-
}, [hasResult, localId, ready]);
|
|
66
|
+
}, [hasResult, localId, ready, preserveContentUntilReady]);
|
|
55
67
|
return /*#__PURE__*/React.createElement("div", {
|
|
56
68
|
className: (0, _runtime.ax)([styles.container])
|
|
57
69
|
}, (!ready || !hasResult) && /*#__PURE__*/React.createElement("div", {
|
|
58
|
-
"aria-hidden": hasResult || undefined,
|
|
59
|
-
className: (0, _runtime.ax)([styles.layer, hasResult && styles.reservation])
|
|
70
|
+
"aria-hidden": hasResult && !showNativeBody || undefined,
|
|
71
|
+
className: (0, _runtime.ax)([styles.layer, hasResult && !showNativeBody && styles.reservation])
|
|
60
72
|
}, fallback), /*#__PURE__*/React.createElement("div", {
|
|
61
|
-
|
|
62
|
-
|
|
73
|
+
"aria-hidden": showNativeBody || undefined,
|
|
74
|
+
className: (0, _runtime.ax)([styles.layer, showNativeBody && styles.reservation])
|
|
75
|
+
}, /*#__PURE__*/React.createElement(_forgeBodiedExtensionHandoffContext.ForgeBodiedExtensionHandoffReadyContext.Provider, {
|
|
76
|
+
value: handoff
|
|
77
|
+
}, result)));
|
|
63
78
|
}
|
|
@@ -11,7 +11,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _useAnalyticsEvents2 = require("@atlaskit/analytics-next/useAnalyticsEvents");
|
|
13
13
|
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
14
|
-
var _expVal = require("@atlaskit/platform-feature-experiments/exp-val");
|
|
15
14
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
16
15
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
16
|
var _enums2 = require("../../analytics/enums");
|
|
@@ -22,6 +21,7 @@ var _ValidationContext = require("../../ui/Renderer/ValidationContext");
|
|
|
22
21
|
var _extension = require("./extension");
|
|
23
22
|
var _ForgeBodiedExtensionHandoff = _interopRequireDefault(require("./ForgeBodiedExtensionHandoff"));
|
|
24
23
|
var _forgeBodiedExtensionHandoffConfig = require("./forgeBodiedExtensionHandoffConfig");
|
|
24
|
+
var _forgeBodiedExtensionHandoffContext = require("./forgeBodiedExtensionHandoffContext");
|
|
25
25
|
var _useNodeHeight2 = require("./useNodeHeight");
|
|
26
26
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
27
27
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -39,6 +39,7 @@ var BodiedExtensionContent = function BodiedExtensionContent(props) {
|
|
|
39
39
|
localId = props.localId,
|
|
40
40
|
shouldDisplayExtensionAsInline = props.shouldDisplayExtensionAsInline,
|
|
41
41
|
fireAnalyticsEvent = props.fireAnalyticsEvent;
|
|
42
|
+
var preserveUntilReadyInstances = (0, _react.useContext)(_forgeBodiedExtensionHandoffContext.ForgeBodiedExtensionHandoffContext);
|
|
42
43
|
var presetOptions = props.scheduleExtensionHeightRemoval ? {
|
|
43
44
|
height: props.nodePresetHeight
|
|
44
45
|
} : {};
|
|
@@ -76,10 +77,20 @@ var BodiedExtensionContent = function BodiedExtensionContent(props) {
|
|
|
76
77
|
}), function (_ref) {
|
|
77
78
|
var node = _ref.node,
|
|
78
79
|
result = _ref.result;
|
|
79
|
-
|
|
80
|
+
var handoffMode = (0, _forgeBodiedExtensionHandoffConfig.getForgeBodiedExtensionHandoffMode)({
|
|
81
|
+
extensionType: extensionType,
|
|
82
|
+
extensionKey: extensionKey,
|
|
83
|
+
localId: localId,
|
|
84
|
+
isInline: function isInline() {
|
|
85
|
+
return Boolean(shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node));
|
|
86
|
+
},
|
|
87
|
+
preserveUntilReadyInstances: preserveUntilReadyInstances
|
|
88
|
+
});
|
|
89
|
+
if (localId && handoffMode) {
|
|
80
90
|
return (0, _extension.renderExtension)( /*#__PURE__*/_react.default.createElement(_ForgeBodiedExtensionHandoff.default, {
|
|
81
91
|
key: localId,
|
|
82
92
|
localId: localId,
|
|
93
|
+
preserveContentUntilReady: handoffMode === 'preserve-until-ready',
|
|
83
94
|
fallback: children,
|
|
84
95
|
result: /*#__PURE__*/_react.default.isValidElement(result) ? result : null
|
|
85
96
|
}), layout, {
|
|
@@ -3,10 +3,32 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
6
|
+
exports.FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS = void 0;
|
|
7
|
+
exports.getForgeBodiedExtensionHandoffMode = getForgeBodiedExtensionHandoffMode;
|
|
8
|
+
var _expVal = require("@atlaskit/platform-feature-experiments/exp-val");
|
|
9
|
+
/** Exact extension keys whose reservation is released by the Forge bridge ready message.
|
|
8
10
|
* Keep this static so SSR and the first client render use the same allowlist.
|
|
9
11
|
*/
|
|
10
|
-
var
|
|
12
|
+
var FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS = exports.FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS = new Set([
|
|
11
13
|
// Aura Table Filter (production).
|
|
12
|
-
'7be6519f-6039-4662-a5a4-2e38f785dc0a/f9fff7f6-4e74-44eb-9de4-f0be57852570/static/table-filter']);
|
|
14
|
+
'7be6519f-6039-4662-a5a4-2e38f785dc0a/f9fff7f6-4e74-44eb-9de4-f0be57852570/static/table-filter']);
|
|
15
|
+
|
|
16
|
+
/** Select a release policy without re-evaluating eligibility for explicitly selected instances. */
|
|
17
|
+
function getForgeBodiedExtensionHandoffMode(_ref) {
|
|
18
|
+
var extensionType = _ref.extensionType,
|
|
19
|
+
extensionKey = _ref.extensionKey,
|
|
20
|
+
localId = _ref.localId,
|
|
21
|
+
isInline = _ref.isInline,
|
|
22
|
+
preserveUntilReadyInstances = _ref.preserveUntilReadyInstances;
|
|
23
|
+
if (!localId) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
// Keep both Aura cohorts under their existing experiment, even if also selected by a host.
|
|
27
|
+
if (FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS.has(extensionKey)) {
|
|
28
|
+
if (extensionType !== 'com.atlassian.ecosystem' || isInline()) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
return (0, _expVal.expVal)('cc_aura_table_filter_cls', 'isEnabled', false) ? 'release-on-bridge-ready' : undefined;
|
|
32
|
+
}
|
|
33
|
+
return (preserveUntilReadyInstances === null || preserveUntilReadyInstances === void 0 ? void 0 : preserveUntilReadyInstances.get(localId)) === extensionKey ? 'preserve-until-ready' : undefined;
|
|
34
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ForgeBodiedExtensionHandoffReadyContext = exports.ForgeBodiedExtensionHandoffContext = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
/** Instances whose native body stays visible until ready: localId -> extensionKey. Undefined disables it. */
|
|
9
|
+
var ForgeBodiedExtensionHandoffContext = exports.ForgeBodiedExtensionHandoffContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
10
|
+
|
|
11
|
+
/** Only the matching instance may release its preserved native body. */
|
|
12
|
+
var ForgeBodiedExtensionHandoffReadyContext = exports.ForgeBodiedExtensionHandoffReadyContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
/**
|
|
3
3
|
* Compiled branch of the `platform_editor_renderer_static_css` experiment.
|
|
4
4
|
* Used via `componentWithCondition` in `layoutColumn.tsx`.
|
|
@@ -79,7 +79,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
79
79
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
80
80
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
81
81
|
var packageName = "@atlaskit/renderer";
|
|
82
|
-
var packageVersion = "153.
|
|
82
|
+
var packageVersion = "153.3.1";
|
|
83
83
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
84
84
|
containerName: 'ak-renderer-wrapper',
|
|
85
85
|
containerType: 'inline-size'
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/editor/no-re-export -- Public package entry point. */
|
|
2
|
+
|
|
3
|
+
export { ForgeBodiedExtensionHandoffContext, ForgeBodiedExtensionHandoffReadyContext } from '../react/nodes/forgeBodiedExtensionHandoffContext';
|
|
4
|
+
export { FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS } from '../react/nodes/forgeBodiedExtensionHandoffConfig';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
/* ForgeBodiedExtensionHandoff.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* ForgeBodiedExtensionHandoff.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
import "./ForgeBodiedExtensionHandoff.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { useEffect, useState } from 'react';
|
|
5
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
6
6
|
import { bind } from 'bind-event-listener';
|
|
7
|
+
import { ForgeBodiedExtensionHandoffReadyContext } from './forgeBodiedExtensionHandoffContext';
|
|
7
8
|
const styles = {
|
|
8
9
|
container: "_1e0c11p5",
|
|
9
10
|
layer: "_nd5l1ekt _1ul9idpf",
|
|
@@ -13,10 +14,16 @@ const styles = {
|
|
|
13
14
|
export default function ForgeBodiedExtensionHandoff({
|
|
14
15
|
fallback,
|
|
15
16
|
localId,
|
|
16
|
-
result
|
|
17
|
+
result,
|
|
18
|
+
preserveContentUntilReady = false
|
|
17
19
|
}) {
|
|
18
20
|
const [ready, setReady] = useState(false);
|
|
19
21
|
const hasResult = Boolean(result);
|
|
22
|
+
const handoff = useMemo(() => preserveContentUntilReady && !ready ? {
|
|
23
|
+
localId,
|
|
24
|
+
onReady: () => setReady(true)
|
|
25
|
+
} : undefined, [localId, preserveContentUntilReady, ready]);
|
|
26
|
+
const showNativeBody = preserveContentUntilReady && !ready;
|
|
20
27
|
useEffect(() => {
|
|
21
28
|
if (!hasResult || ready) {
|
|
22
29
|
return;
|
|
@@ -27,23 +34,26 @@ export default function ForgeBodiedExtensionHandoff({
|
|
|
27
34
|
setReady(true);
|
|
28
35
|
}
|
|
29
36
|
};
|
|
30
|
-
const unbind = bind(window, {
|
|
37
|
+
const unbind = preserveContentUntilReady ? undefined : bind(window, {
|
|
31
38
|
type: 'message',
|
|
32
39
|
listener: onReady
|
|
33
40
|
});
|
|
34
|
-
//
|
|
41
|
+
// Release stalled or intentionally empty apps rather than retaining the server body forever.
|
|
35
42
|
const timeout = window.setTimeout(() => setReady(true), 30000);
|
|
36
43
|
return () => {
|
|
37
|
-
unbind();
|
|
44
|
+
unbind === null || unbind === void 0 ? void 0 : unbind();
|
|
38
45
|
window.clearTimeout(timeout);
|
|
39
46
|
};
|
|
40
|
-
}, [hasResult, localId, ready]);
|
|
47
|
+
}, [hasResult, localId, ready, preserveContentUntilReady]);
|
|
41
48
|
return /*#__PURE__*/React.createElement("div", {
|
|
42
49
|
className: ax([styles.container])
|
|
43
50
|
}, (!ready || !hasResult) && /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
"aria-hidden": hasResult || undefined,
|
|
45
|
-
className: ax([styles.layer, hasResult && styles.reservation])
|
|
51
|
+
"aria-hidden": hasResult && !showNativeBody || undefined,
|
|
52
|
+
className: ax([styles.layer, hasResult && !showNativeBody && styles.reservation])
|
|
46
53
|
}, fallback), /*#__PURE__*/React.createElement("div", {
|
|
47
|
-
|
|
48
|
-
|
|
54
|
+
"aria-hidden": showNativeBody || undefined,
|
|
55
|
+
className: ax([styles.layer, showNativeBody && styles.reservation])
|
|
56
|
+
}, /*#__PURE__*/React.createElement(ForgeBodiedExtensionHandoffReadyContext.Provider, {
|
|
57
|
+
value: handoff
|
|
58
|
+
}, result)));
|
|
49
59
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React, { useMemo } from 'react';
|
|
2
|
+
import React, { useContext, useMemo } from 'react';
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
4
4
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
|
-
import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
|
|
6
5
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
7
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
7
|
import { ACTION_SUBJECT } from '../../analytics/enums';
|
|
@@ -12,7 +11,8 @@ import { ErrorBoundary } from '../../ui/Renderer/ErrorBoundary';
|
|
|
12
11
|
import { ValidationContextProvider } from '../../ui/Renderer/ValidationContext';
|
|
13
12
|
import { hasExtensionViewportSize, renderExtension } from './extension';
|
|
14
13
|
import ForgeBodiedExtensionHandoff from './ForgeBodiedExtensionHandoff';
|
|
15
|
-
import {
|
|
14
|
+
import { getForgeBodiedExtensionHandoffMode } from './forgeBodiedExtensionHandoffConfig';
|
|
15
|
+
import { ForgeBodiedExtensionHandoffContext } from './forgeBodiedExtensionHandoffContext';
|
|
16
16
|
import { useNodeHeight } from './useNodeHeight';
|
|
17
17
|
const BodiedExtensionContent = props => {
|
|
18
18
|
const {
|
|
@@ -27,6 +27,7 @@ const BodiedExtensionContent = props => {
|
|
|
27
27
|
shouldDisplayExtensionAsInline,
|
|
28
28
|
fireAnalyticsEvent
|
|
29
29
|
} = props;
|
|
30
|
+
const preserveUntilReadyInstances = useContext(ForgeBodiedExtensionHandoffContext);
|
|
30
31
|
const presetOptions = props.scheduleExtensionHeightRemoval ? {
|
|
31
32
|
height: props.nodePresetHeight
|
|
32
33
|
} : {};
|
|
@@ -62,10 +63,18 @@ const BodiedExtensionContent = props => {
|
|
|
62
63
|
node,
|
|
63
64
|
result
|
|
64
65
|
}) => {
|
|
65
|
-
|
|
66
|
+
const handoffMode = getForgeBodiedExtensionHandoffMode({
|
|
67
|
+
extensionType,
|
|
68
|
+
extensionKey,
|
|
69
|
+
localId,
|
|
70
|
+
isInline: () => Boolean(shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)),
|
|
71
|
+
preserveUntilReadyInstances
|
|
72
|
+
});
|
|
73
|
+
if (localId && handoffMode) {
|
|
66
74
|
return renderExtension( /*#__PURE__*/React.createElement(ForgeBodiedExtensionHandoff, {
|
|
67
75
|
key: localId,
|
|
68
76
|
localId: localId,
|
|
77
|
+
preserveContentUntilReady: handoffMode === 'preserve-until-ready',
|
|
69
78
|
fallback: children,
|
|
70
79
|
result: /*#__PURE__*/React.isValidElement(result) ? result : null
|
|
71
80
|
}), layout, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* extension-comments.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* extension-comments.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
import "./extension-comments.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
@@ -1,6 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
|
|
2
|
+
|
|
3
|
+
/** Exact extension keys whose reservation is released by the Forge bridge ready message.
|
|
2
4
|
* Keep this static so SSR and the first client render use the same allowlist.
|
|
3
5
|
*/
|
|
4
|
-
export const
|
|
6
|
+
export const FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS = new Set([
|
|
5
7
|
// Aura Table Filter (production).
|
|
6
|
-
'7be6519f-6039-4662-a5a4-2e38f785dc0a/f9fff7f6-4e74-44eb-9de4-f0be57852570/static/table-filter']);
|
|
8
|
+
'7be6519f-6039-4662-a5a4-2e38f785dc0a/f9fff7f6-4e74-44eb-9de4-f0be57852570/static/table-filter']);
|
|
9
|
+
|
|
10
|
+
/** Select a release policy without re-evaluating eligibility for explicitly selected instances. */
|
|
11
|
+
export function getForgeBodiedExtensionHandoffMode({
|
|
12
|
+
extensionType,
|
|
13
|
+
extensionKey,
|
|
14
|
+
localId,
|
|
15
|
+
isInline,
|
|
16
|
+
preserveUntilReadyInstances
|
|
17
|
+
}) {
|
|
18
|
+
if (!localId) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
// Keep both Aura cohorts under their existing experiment, even if also selected by a host.
|
|
22
|
+
if (FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS.has(extensionKey)) {
|
|
23
|
+
if (extensionType !== 'com.atlassian.ecosystem' || isInline()) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
return expVal('cc_aura_table_filter_cls', 'isEnabled', false) ? 'release-on-bridge-ready' : undefined;
|
|
27
|
+
}
|
|
28
|
+
return (preserveUntilReadyInstances === null || preserveUntilReadyInstances === void 0 ? void 0 : preserveUntilReadyInstances.get(localId)) === extensionKey ? 'preserve-until-ready' : undefined;
|
|
29
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
|
|
3
|
+
/** Instances whose native body stays visible until ready: localId -> extensionKey. Undefined disables it. */
|
|
4
|
+
export const ForgeBodiedExtensionHandoffContext = /*#__PURE__*/createContext(undefined);
|
|
5
|
+
|
|
6
|
+
/** Only the matching instance may release its preserved native body. */
|
|
7
|
+
export const ForgeBodiedExtensionHandoffReadyContext = /*#__PURE__*/createContext(undefined);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* heading-anchor-button.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* heading-anchor-button.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./heading-anchor-button.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
/**
|
|
3
3
|
* Compiled branch of the `platform_editor_renderer_static_css` experiment.
|
|
4
4
|
* Used via `componentWithCondition` in `layoutColumn.tsx`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* panel-compiled.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* panel-compiled.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./panel-compiled.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -64,7 +64,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
64
64
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
65
65
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
66
66
|
const packageName = "@atlaskit/renderer";
|
|
67
|
-
const packageVersion = "153.
|
|
67
|
+
const packageVersion = "153.3.1";
|
|
68
68
|
const setAsQueryContainerStyles = css({
|
|
69
69
|
containerName: 'ak-renderer-wrapper',
|
|
70
70
|
containerType: 'inline-size'
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/editor/no-re-export -- Public package entry point. */
|
|
2
|
+
|
|
3
|
+
export { ForgeBodiedExtensionHandoffContext, ForgeBodiedExtensionHandoffReadyContext } from '../react/nodes/forgeBodiedExtensionHandoffContext';
|
|
4
|
+
export { FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS } from '../react/nodes/forgeBodiedExtensionHandoffConfig';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/* ForgeBodiedExtensionHandoff.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* ForgeBodiedExtensionHandoff.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import "./ForgeBodiedExtensionHandoff.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import { useEffect, useState } from 'react';
|
|
6
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
7
7
|
import { bind } from 'bind-event-listener';
|
|
8
|
+
import { ForgeBodiedExtensionHandoffReadyContext } from './forgeBodiedExtensionHandoffContext';
|
|
8
9
|
var styles = {
|
|
9
10
|
container: "_1e0c11p5",
|
|
10
11
|
layer: "_nd5l1ekt _1ul9idpf",
|
|
@@ -14,12 +15,23 @@ var styles = {
|
|
|
14
15
|
export default function ForgeBodiedExtensionHandoff(_ref) {
|
|
15
16
|
var fallback = _ref.fallback,
|
|
16
17
|
localId = _ref.localId,
|
|
17
|
-
result = _ref.result
|
|
18
|
+
result = _ref.result,
|
|
19
|
+
_ref$preserveContentU = _ref.preserveContentUntilReady,
|
|
20
|
+
preserveContentUntilReady = _ref$preserveContentU === void 0 ? false : _ref$preserveContentU;
|
|
18
21
|
var _useState = useState(false),
|
|
19
22
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
23
|
ready = _useState2[0],
|
|
21
24
|
setReady = _useState2[1];
|
|
22
25
|
var hasResult = Boolean(result);
|
|
26
|
+
var handoff = useMemo(function () {
|
|
27
|
+
return preserveContentUntilReady && !ready ? {
|
|
28
|
+
localId: localId,
|
|
29
|
+
onReady: function onReady() {
|
|
30
|
+
return setReady(true);
|
|
31
|
+
}
|
|
32
|
+
} : undefined;
|
|
33
|
+
}, [localId, preserveContentUntilReady, ready]);
|
|
34
|
+
var showNativeBody = preserveContentUntilReady && !ready;
|
|
23
35
|
useEffect(function () {
|
|
24
36
|
if (!hasResult || ready) {
|
|
25
37
|
return;
|
|
@@ -30,25 +42,28 @@ export default function ForgeBodiedExtensionHandoff(_ref) {
|
|
|
30
42
|
setReady(true);
|
|
31
43
|
}
|
|
32
44
|
};
|
|
33
|
-
var unbind = bind(window, {
|
|
45
|
+
var unbind = preserveContentUntilReady ? undefined : bind(window, {
|
|
34
46
|
type: 'message',
|
|
35
47
|
listener: onReady
|
|
36
48
|
});
|
|
37
|
-
//
|
|
49
|
+
// Release stalled or intentionally empty apps rather than retaining the server body forever.
|
|
38
50
|
var timeout = window.setTimeout(function () {
|
|
39
51
|
return setReady(true);
|
|
40
52
|
}, 30000);
|
|
41
53
|
return function () {
|
|
42
|
-
unbind();
|
|
54
|
+
unbind === null || unbind === void 0 || unbind();
|
|
43
55
|
window.clearTimeout(timeout);
|
|
44
56
|
};
|
|
45
|
-
}, [hasResult, localId, ready]);
|
|
57
|
+
}, [hasResult, localId, ready, preserveContentUntilReady]);
|
|
46
58
|
return /*#__PURE__*/React.createElement("div", {
|
|
47
59
|
className: ax([styles.container])
|
|
48
60
|
}, (!ready || !hasResult) && /*#__PURE__*/React.createElement("div", {
|
|
49
|
-
"aria-hidden": hasResult || undefined,
|
|
50
|
-
className: ax([styles.layer, hasResult && styles.reservation])
|
|
61
|
+
"aria-hidden": hasResult && !showNativeBody || undefined,
|
|
62
|
+
className: ax([styles.layer, hasResult && !showNativeBody && styles.reservation])
|
|
51
63
|
}, fallback), /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
"aria-hidden": showNativeBody || undefined,
|
|
65
|
+
className: ax([styles.layer, showNativeBody && styles.reservation])
|
|
66
|
+
}, /*#__PURE__*/React.createElement(ForgeBodiedExtensionHandoffReadyContext.Provider, {
|
|
67
|
+
value: handoff
|
|
68
|
+
}, result)));
|
|
54
69
|
}
|
|
@@ -2,10 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
import React, { useMemo } from 'react';
|
|
5
|
+
import React, { useContext, useMemo } from 'react';
|
|
6
6
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
7
7
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics/types/enums';
|
|
8
|
-
import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
|
|
9
8
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
10
|
import { ACTION_SUBJECT } from '../../analytics/enums';
|
|
@@ -15,7 +14,8 @@ import { ErrorBoundary } from '../../ui/Renderer/ErrorBoundary';
|
|
|
15
14
|
import { ValidationContextProvider } from '../../ui/Renderer/ValidationContext';
|
|
16
15
|
import { hasExtensionViewportSize, renderExtension } from './extension';
|
|
17
16
|
import ForgeBodiedExtensionHandoff from './ForgeBodiedExtensionHandoff';
|
|
18
|
-
import {
|
|
17
|
+
import { getForgeBodiedExtensionHandoffMode } from './forgeBodiedExtensionHandoffConfig';
|
|
18
|
+
import { ForgeBodiedExtensionHandoffContext } from './forgeBodiedExtensionHandoffContext';
|
|
19
19
|
import { useNodeHeight } from './useNodeHeight';
|
|
20
20
|
var BodiedExtensionContent = function BodiedExtensionContent(props) {
|
|
21
21
|
var children = props.children,
|
|
@@ -30,6 +30,7 @@ var BodiedExtensionContent = function BodiedExtensionContent(props) {
|
|
|
30
30
|
localId = props.localId,
|
|
31
31
|
shouldDisplayExtensionAsInline = props.shouldDisplayExtensionAsInline,
|
|
32
32
|
fireAnalyticsEvent = props.fireAnalyticsEvent;
|
|
33
|
+
var preserveUntilReadyInstances = useContext(ForgeBodiedExtensionHandoffContext);
|
|
33
34
|
var presetOptions = props.scheduleExtensionHeightRemoval ? {
|
|
34
35
|
height: props.nodePresetHeight
|
|
35
36
|
} : {};
|
|
@@ -67,10 +68,20 @@ var BodiedExtensionContent = function BodiedExtensionContent(props) {
|
|
|
67
68
|
}), function (_ref) {
|
|
68
69
|
var node = _ref.node,
|
|
69
70
|
result = _ref.result;
|
|
70
|
-
|
|
71
|
+
var handoffMode = getForgeBodiedExtensionHandoffMode({
|
|
72
|
+
extensionType: extensionType,
|
|
73
|
+
extensionKey: extensionKey,
|
|
74
|
+
localId: localId,
|
|
75
|
+
isInline: function isInline() {
|
|
76
|
+
return Boolean(shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node));
|
|
77
|
+
},
|
|
78
|
+
preserveUntilReadyInstances: preserveUntilReadyInstances
|
|
79
|
+
});
|
|
80
|
+
if (localId && handoffMode) {
|
|
71
81
|
return renderExtension( /*#__PURE__*/React.createElement(ForgeBodiedExtensionHandoff, {
|
|
72
82
|
key: localId,
|
|
73
83
|
localId: localId,
|
|
84
|
+
preserveContentUntilReady: handoffMode === 'preserve-until-ready',
|
|
74
85
|
fallback: children,
|
|
75
86
|
result: /*#__PURE__*/React.isValidElement(result) ? result : null
|
|
76
87
|
}), layout, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* extension-comments.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* extension-comments.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import "./extension-comments.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,6 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
|
|
2
|
+
|
|
3
|
+
/** Exact extension keys whose reservation is released by the Forge bridge ready message.
|
|
2
4
|
* Keep this static so SSR and the first client render use the same allowlist.
|
|
3
5
|
*/
|
|
4
|
-
export var
|
|
6
|
+
export var FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS = new Set([
|
|
5
7
|
// Aura Table Filter (production).
|
|
6
|
-
'7be6519f-6039-4662-a5a4-2e38f785dc0a/f9fff7f6-4e74-44eb-9de4-f0be57852570/static/table-filter']);
|
|
8
|
+
'7be6519f-6039-4662-a5a4-2e38f785dc0a/f9fff7f6-4e74-44eb-9de4-f0be57852570/static/table-filter']);
|
|
9
|
+
|
|
10
|
+
/** Select a release policy without re-evaluating eligibility for explicitly selected instances. */
|
|
11
|
+
export function getForgeBodiedExtensionHandoffMode(_ref) {
|
|
12
|
+
var extensionType = _ref.extensionType,
|
|
13
|
+
extensionKey = _ref.extensionKey,
|
|
14
|
+
localId = _ref.localId,
|
|
15
|
+
isInline = _ref.isInline,
|
|
16
|
+
preserveUntilReadyInstances = _ref.preserveUntilReadyInstances;
|
|
17
|
+
if (!localId) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
// Keep both Aura cohorts under their existing experiment, even if also selected by a host.
|
|
21
|
+
if (FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS.has(extensionKey)) {
|
|
22
|
+
if (extensionType !== 'com.atlassian.ecosystem' || isInline()) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
return expVal('cc_aura_table_filter_cls', 'isEnabled', false) ? 'release-on-bridge-ready' : undefined;
|
|
26
|
+
}
|
|
27
|
+
return (preserveUntilReadyInstances === null || preserveUntilReadyInstances === void 0 ? void 0 : preserveUntilReadyInstances.get(localId)) === extensionKey ? 'preserve-until-ready' : undefined;
|
|
28
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
|
|
3
|
+
/** Instances whose native body stays visible until ready: localId -> extensionKey. Undefined disables it. */
|
|
4
|
+
export var ForgeBodiedExtensionHandoffContext = /*#__PURE__*/createContext(undefined);
|
|
5
|
+
|
|
6
|
+
/** Only the matching instance may release its preserved native body. */
|
|
7
|
+
export var ForgeBodiedExtensionHandoffReadyContext = /*#__PURE__*/createContext(undefined);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* heading-anchor-button.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* heading-anchor-button.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./heading-anchor-button.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* heading.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* heading.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
4
4
|
import "./heading.compiled.css";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
/**
|
|
3
3
|
* Compiled branch of the `platform_editor_renderer_static_css` experiment.
|
|
4
4
|
* Used via `componentWithCondition` in `layoutColumn.tsx`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* panel-compiled.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* panel-compiled.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
@@ -69,7 +69,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
69
69
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
70
70
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
71
71
|
var packageName = "@atlaskit/renderer";
|
|
72
|
-
var packageVersion = "153.
|
|
72
|
+
var packageVersion = "153.3.1";
|
|
73
73
|
var setAsQueryContainerStyles = css({
|
|
74
74
|
containerName: 'ak-renderer-wrapper',
|
|
75
75
|
containerType: 'inline-size'
|
|
@@ -6,8 +6,9 @@ import { type ReactElement, type ReactNode } from 'react';
|
|
|
6
6
|
interface Props {
|
|
7
7
|
fallback: ReactNode;
|
|
8
8
|
localId: string;
|
|
9
|
+
preserveContentUntilReady?: boolean;
|
|
9
10
|
result: ReactNode;
|
|
10
11
|
}
|
|
11
12
|
/** Keep the native body in layout until Forge finishes its initial rendering. */
|
|
12
|
-
export default function ForgeBodiedExtensionHandoff({ fallback, localId, result, }: Props): ReactElement;
|
|
13
|
+
export default function ForgeBodiedExtensionHandoff({ fallback, localId, result, preserveContentUntilReady, }: Props): ReactElement;
|
|
13
14
|
export {};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
/** Exact extension keys whose
|
|
1
|
+
/** Exact extension keys whose reservation is released by the Forge bridge ready message.
|
|
2
2
|
* Keep this static so SSR and the first client render use the same allowlist.
|
|
3
3
|
*/
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const FORGE_BODIED_EXTENSION_BRIDGE_READY_KEYS: ReadonlySet<string>;
|
|
5
|
+
/** Select a release policy without re-evaluating eligibility for explicitly selected instances. */
|
|
6
|
+
export declare function getForgeBodiedExtensionHandoffMode({ extensionType, extensionKey, localId, isInline, preserveUntilReadyInstances, }: {
|
|
7
|
+
extensionKey: string;
|
|
8
|
+
extensionType: string;
|
|
9
|
+
isInline: () => boolean;
|
|
10
|
+
localId?: string;
|
|
11
|
+
preserveUntilReadyInstances?: ReadonlyMap<string, string>;
|
|
12
|
+
}): 'preserve-until-ready' | 'release-on-bridge-ready' | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Context } from 'react';
|
|
2
|
+
/** Instances whose native body stays visible until ready: localId -> extensionKey. Undefined disables it. */
|
|
3
|
+
export declare const ForgeBodiedExtensionHandoffContext: Context<ReadonlyMap<string, string> | undefined>;
|
|
4
|
+
/** Only the matching instance may release its preserved native body. */
|
|
5
|
+
export declare const ForgeBodiedExtensionHandoffReadyContext: Context<{
|
|
6
|
+
localId: string;
|
|
7
|
+
onReady: () => void;
|
|
8
|
+
} | undefined>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/renderer/extension-handoff",
|
|
3
|
+
"main": "../dist/cjs/entry-points/extension-handoff.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/extension-handoff.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/extension-handoff.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/extension-handoff.d.ts"
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "153.
|
|
3
|
+
"version": "153.4.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^57.7.0",
|
|
37
37
|
"@atlaskit/adf-utils": "^20.9.0",
|
|
38
|
-
"@atlaskit/afm-i18n-platform-editor-renderer": "2.
|
|
38
|
+
"@atlaskit/afm-i18n-platform-editor-renderer": "2.306.0",
|
|
39
39
|
"@atlaskit/analytics-listeners": "^11.4.0",
|
|
40
40
|
"@atlaskit/analytics-namespaced-context": "^8.2.0",
|
|
41
41
|
"@atlaskit/analytics-next": "^12.6.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
50
50
|
"@atlaskit/editor-shared-styles": "^5.1.0",
|
|
51
51
|
"@atlaskit/editor-smart-link-draggable": "^1.2.0",
|
|
52
|
-
"@atlaskit/emoji": "^73.
|
|
52
|
+
"@atlaskit/emoji": "^73.6.0",
|
|
53
53
|
"@atlaskit/feature-gate-js-client": "^8.0.0",
|
|
54
54
|
"@atlaskit/icon": "^38.0.0",
|
|
55
55
|
"@atlaskit/link": "^5.1.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@atlaskit/media-client-react": "^7.0.0",
|
|
62
62
|
"@atlaskit/media-common": "^14.7.0",
|
|
63
63
|
"@atlaskit/media-filmstrip": "^53.0.0",
|
|
64
|
-
"@atlaskit/media-ui": "^31.
|
|
64
|
+
"@atlaskit/media-ui": "^31.9.0",
|
|
65
65
|
"@atlaskit/media-viewer": "^54.12.0",
|
|
66
66
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
67
67
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
70
70
|
"@atlaskit/react-ufo": "^8.4.0",
|
|
71
71
|
"@atlaskit/smart-card": "^46.13.0",
|
|
72
|
-
"@atlaskit/status": "^5.
|
|
73
|
-
"@atlaskit/task-decision": "^21.
|
|
72
|
+
"@atlaskit/status": "^5.17.0",
|
|
73
|
+
"@atlaskit/task-decision": "^21.16.0",
|
|
74
74
|
"@atlaskit/tmp-editor-statsig": "^260.0.0",
|
|
75
|
-
"@atlaskit/tokens": "^20.
|
|
75
|
+
"@atlaskit/tokens": "^20.11.0",
|
|
76
76
|
"@atlaskit/tooltip": "^24.4.0",
|
|
77
77
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
78
78
|
"@babel/runtime": "^7.0.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"uuid": "^11.1.1"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@atlaskit/editor-common": "^134.
|
|
89
|
+
"@atlaskit/editor-common": "^134.13.0",
|
|
90
90
|
"@atlaskit/link-provider": "^6.1.0",
|
|
91
91
|
"@atlaskit/media-core": "^39.0.0",
|
|
92
92
|
"react": "^18.2.0 || ^19.2.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@af/visual-regression": "workspace:^",
|
|
99
99
|
"@atlaskit/analytics-gas-types": "^6.2.0",
|
|
100
100
|
"@atlaskit/checkbox": "^19.3.0",
|
|
101
|
-
"@atlaskit/editor-common": "^134.
|
|
101
|
+
"@atlaskit/editor-common": "^134.13.0",
|
|
102
102
|
"@atlaskit/editor-plugin-media": "^32.3.0",
|
|
103
103
|
"@atlaskit/editor-test-helpers": "workspace:^",
|
|
104
104
|
"@atlaskit/inline-edit": "^16.5.0",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
111
111
|
"@atlaskit/media-state": "^4.0.0",
|
|
112
112
|
"@atlaskit/media-test-helpers": "^43.0.0",
|
|
113
|
-
"@atlaskit/mention": "^30.
|
|
113
|
+
"@atlaskit/mention": "^30.9.0",
|
|
114
114
|
"@atlaskit/modal-dialog": "^17.2.0",
|
|
115
115
|
"@atlaskit/navigation-system": "^11.7.0",
|
|
116
116
|
"@atlaskit/primitives": "^22.7.0",
|