@atlaskit/editor-common 111.35.0 → 112.0.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 +31 -0
- package/dist/cjs/analytics/types/enums.js +2 -0
- package/dist/cjs/extensibility/ExtensionComponent.js +6 -5
- package/dist/cjs/extensions/UnknownMacroPlaceholder.compiled.css +28 -0
- package/dist/cjs/extensions/UnknownMacroPlaceholder.js +70 -0
- package/dist/cjs/extensions/extension-handlers.js +16 -0
- package/dist/cjs/extensions/messages.js +10 -0
- package/dist/cjs/hooks/index.js +1 -8
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ncs-step-metrics/index.js +1 -0
- package/dist/cjs/preset/core-plugin/index.js +4 -0
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/enums.js +2 -0
- package/dist/es2019/extensibility/ExtensionComponent.js +6 -5
- package/dist/es2019/extensions/UnknownMacroPlaceholder.compiled.css +28 -0
- package/dist/es2019/extensions/UnknownMacroPlaceholder.js +46 -0
- package/dist/es2019/extensions/extension-handlers.js +16 -0
- package/dist/es2019/extensions/messages.js +10 -0
- package/dist/es2019/hooks/index.js +1 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ncs-step-metrics/index.js +1 -0
- package/dist/es2019/preset/core-plugin/index.js +4 -0
- package/dist/es2019/styles/shared/table.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/enums.js +2 -0
- package/dist/esm/extensibility/ExtensionComponent.js +6 -5
- package/dist/esm/extensions/UnknownMacroPlaceholder.compiled.css +28 -0
- package/dist/esm/extensions/UnknownMacroPlaceholder.js +61 -0
- package/dist/esm/extensions/extension-handlers.js +16 -0
- package/dist/esm/extensions/messages.js +10 -0
- package/dist/esm/hooks/index.js +1 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ncs-step-metrics/index.js +1 -0
- package/dist/esm/preset/core-plugin/index.js +4 -0
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/index.d.ts +1 -1
- package/dist/types/analytics/types/enums.d.ts +1 -0
- package/dist/types/analytics/types/events.d.ts +2 -2
- package/dist/types/analytics/types/paste-events.d.ts +6 -1
- package/dist/types/experiences/ExperienceCheckDomMutation.d.ts +2 -2
- package/dist/types/extensions/UnknownMacroPlaceholder.d.ts +7 -0
- package/dist/types/extensions/extension-handlers.d.ts +1 -0
- package/dist/types/extensions/messages.d.ts +10 -0
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types-ts4.5/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/events.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/paste-events.d.ts +6 -1
- package/dist/types-ts4.5/experiences/ExperienceCheckDomMutation.d.ts +2 -2
- package/dist/types-ts4.5/extensions/UnknownMacroPlaceholder.d.ts +7 -0
- package/dist/types-ts4.5/extensions/extension-handlers.d.ts +1 -0
- package/dist/types-ts4.5/extensions/messages.d.ts +10 -0
- package/dist/types-ts4.5/hooks/index.d.ts +0 -1
- package/package.json +7 -4
- package/dist/cjs/hooks/useSmartCardReloadAfterCache.js +0 -54
- package/dist/es2019/hooks/useSmartCardReloadAfterCache.js +0 -49
- package/dist/esm/hooks/useSmartCardReloadAfterCache.js +0 -49
- package/dist/types/hooks/useSmartCardReloadAfterCache.d.ts +0 -16
- package/dist/types-ts4.5/hooks/useSmartCardReloadAfterCache.d.ts +0 -16
|
@@ -16,6 +16,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
16
16
|
import React, { Component, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
17
17
|
import memoizeOne from 'memoize-one';
|
|
18
18
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
19
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
21
|
import { getExtensionModuleNodePrivateProps, getNodeRenderer } from '../extensions';
|
|
21
22
|
import { getExtensionRenderer, nodeToJSON, toJSON } from '../utils';
|
|
@@ -187,12 +188,12 @@ var ExtensionComponentInner = /*#__PURE__*/function (_Component) {
|
|
|
187
188
|
references: _this.props.references,
|
|
188
189
|
actions: actions
|
|
189
190
|
});
|
|
190
|
-
} else {
|
|
191
|
-
return /*#__PURE__*/React.createElement(NodeRenderer, {
|
|
192
|
-
node: node,
|
|
193
|
-
references: _this.props.references
|
|
194
|
-
});
|
|
195
191
|
}
|
|
192
|
+
return /*#__PURE__*/React.createElement(NodeRenderer, {
|
|
193
|
+
node: node,
|
|
194
|
+
references: _this.props.references,
|
|
195
|
+
showUnknownMacroPlaceholder: fg('tinymce_display_unknown_macro_body_content')
|
|
196
|
+
});
|
|
196
197
|
}
|
|
197
198
|
}
|
|
198
199
|
return result;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
._11c81a4x{font:var(--ds-font-body-small,9pt)}
|
|
2
|
+
._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
|
+
._19it7tl1{border:var(--_98ihdp)}
|
|
4
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
5
|
+
._2rko14xi{border-radius:var(--ds-radius-small,4px) var(--ds-radius-small,4px) 0 0}
|
|
6
|
+
._n7zl7tl1{border-bottom:var(--_98ihdp)}
|
|
7
|
+
._154i1n1a{top:-1px}
|
|
8
|
+
._18m915vq{overflow-y:hidden}
|
|
9
|
+
._18u0idpf{margin-left:0}
|
|
10
|
+
._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
|
|
11
|
+
._19bvutpp{padding-left:var(--ds-space-150,9pt)}
|
|
12
|
+
._19pkidpf{margin-top:0}
|
|
13
|
+
._1nmz1hna{word-break:break-word}
|
|
14
|
+
._1reo15vq{overflow-x:hidden}
|
|
15
|
+
._2hwxidpf{margin-right:0}
|
|
16
|
+
._6z24egat{tab-size:4}
|
|
17
|
+
._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
|
|
18
|
+
._bfhkrnwa{background-color:var(--ds-surface-raised,#fffdf6)}
|
|
19
|
+
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
20
|
+
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
21
|
+
._ca0qutpp{padding-top:var(--ds-space-150,9pt)}
|
|
22
|
+
._kqswh2mm{position:relative}
|
|
23
|
+
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
|
24
|
+
._n3tdutpp{padding-bottom:var(--ds-space-150,9pt)}
|
|
25
|
+
._o5721jtm{white-space:pre-wrap}
|
|
26
|
+
._otyridpf{margin-bottom:0}
|
|
27
|
+
._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
|
|
28
|
+
._u5f3utpp{padding-right:var(--ds-space-150,9pt)}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import "./UnknownMacroPlaceholder.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { useIntl } from 'react-intl-next';
|
|
7
|
+
import { messages } from './messages';
|
|
8
|
+
// Unknown macro placeholder styling aligned with Legacy Content Macro (LCM) for consistent look
|
|
9
|
+
var neutralBorder = "var(--ds-background-neutral, #0515240F)";
|
|
10
|
+
var unknownMacroContainerStyles = null;
|
|
11
|
+
|
|
12
|
+
// Match LCM header exactly: lcmHeaderStyles from LegacyContentHeader/index.tsx
|
|
13
|
+
var unknownMacroHeaderStyles = null;
|
|
14
|
+
|
|
15
|
+
// Match LCM content area: white surface, text color inherits
|
|
16
|
+
var unknownMacroBodyStyles = null;
|
|
17
|
+
var unknownMacroPreStyles = null;
|
|
18
|
+
export function UnknownMacroPlaceholder(_ref) {
|
|
19
|
+
var _extensionNode$parame, _extensionNode$parame2, _extensionNode$parame3, _extensionNode$parame4;
|
|
20
|
+
var extensionNode = _ref.extensionNode;
|
|
21
|
+
var intl = useIntl();
|
|
22
|
+
var macroTitle = ((_extensionNode$parame = extensionNode.parameters) === null || _extensionNode$parame === void 0 || (_extensionNode$parame = _extensionNode$parame.macroMetadata) === null || _extensionNode$parame === void 0 ? void 0 : _extensionNode$parame.title) || extensionNode.extensionKey;
|
|
23
|
+
var bodyContent = (_extensionNode$parame2 = extensionNode.parameters) === null || _extensionNode$parame2 === void 0 || (_extensionNode$parame2 = _extensionNode$parame2.macroParams) === null || _extensionNode$parame2 === void 0 || (_extensionNode$parame2 = _extensionNode$parame2.__bodyContent) === null || _extensionNode$parame2 === void 0 ? void 0 : _extensionNode$parame2.value;
|
|
24
|
+
var macroParams = (_extensionNode$parame3 = (_extensionNode$parame4 = extensionNode.parameters) === null || _extensionNode$parame4 === void 0 ? void 0 : _extensionNode$parame4.macroParams) !== null && _extensionNode$parame3 !== void 0 ? _extensionNode$parame3 : {};
|
|
25
|
+
var formatParam = function formatParam(key, param) {
|
|
26
|
+
var _param$value;
|
|
27
|
+
var value = String((_param$value = param === null || param === void 0 ? void 0 : param.value) !== null && _param$value !== void 0 ? _param$value : '').trim();
|
|
28
|
+
return "".concat(key, " = ").concat(value);
|
|
29
|
+
};
|
|
30
|
+
var visibleParams = Object.entries(macroParams).filter(function (_ref2) {
|
|
31
|
+
var _ref3 = _slicedToArray(_ref2, 1),
|
|
32
|
+
key = _ref3[0];
|
|
33
|
+
return !key.startsWith('_');
|
|
34
|
+
}).map(function (_ref4) {
|
|
35
|
+
var _ref5 = _slicedToArray(_ref4, 2),
|
|
36
|
+
key = _ref5[0],
|
|
37
|
+
param = _ref5[1];
|
|
38
|
+
return formatParam(key, param);
|
|
39
|
+
}).join(' | ');
|
|
40
|
+
var headerText = visibleParams ? "".concat(intl.formatMessage(messages.unknownMacroHeader, {
|
|
41
|
+
macroTitle: macroTitle
|
|
42
|
+
}), " | ").concat(visibleParams) : intl.formatMessage(messages.unknownMacroHeader, {
|
|
43
|
+
macroTitle: macroTitle
|
|
44
|
+
});
|
|
45
|
+
return /*#__PURE__*/React.createElement("section", {
|
|
46
|
+
"aria-label": intl.formatMessage(messages.unknownMacroPlaceholderAriaLabel),
|
|
47
|
+
className: ax(["_19it7tl1 _2rko12b0 _1reo15vq _18m915vq _bfhkrnwa"]),
|
|
48
|
+
style: {
|
|
49
|
+
"--_98ihdp": ix("1px solid ".concat(neutralBorder))
|
|
50
|
+
}
|
|
51
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: ax(["_2rko14xi _11c81a4x _n7zl7tl1 _bfhki8nm _ca0qu2gc _u5f3pxbi _n3td1b66 _19bvpxbi _kqswh2mm _154i1n1a"]),
|
|
53
|
+
style: {
|
|
54
|
+
"--_98ihdp": ix("1px solid ".concat(neutralBorder))
|
|
55
|
+
}
|
|
56
|
+
}, headerText), /*#__PURE__*/React.createElement("div", {
|
|
57
|
+
className: ax(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _bfhkvuon _ca0qutpp _u5f3utpp _n3tdutpp _19bvutpp"])
|
|
58
|
+
}, /*#__PURE__*/React.createElement("pre", {
|
|
59
|
+
className: ax(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _11c8fhey _o5721jtm _1nmz1hna _6z24egat"])
|
|
60
|
+
}, bodyContent)));
|
|
61
|
+
}
|
|
@@ -4,8 +4,10 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
6
|
import Loadable from 'react-loadable';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { getExtensionKeyAndNodeKey, resolveImport, resolveImportSync } from './manifest-helpers';
|
|
8
9
|
import { messages } from './messages';
|
|
10
|
+
import { UnknownMacroPlaceholder } from './UnknownMacroPlaceholder';
|
|
9
11
|
function getNodeFromManifest(
|
|
10
12
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
13
|
manifest, extKey, nodeKey, extensionType, extensionKey) {
|
|
@@ -100,11 +102,21 @@ function _getExtensionModuleNodePrivateProps() {
|
|
|
100
102
|
}));
|
|
101
103
|
return _getExtensionModuleNodePrivateProps.apply(this, arguments);
|
|
102
104
|
}
|
|
105
|
+
function isUnknownConfluenceMacroWithBody(extensionNode) {
|
|
106
|
+
var _extensionNode$parame;
|
|
107
|
+
return extensionNode !== null && extensionNode.type === 'extension' && extensionNode.extensionType === 'com.atlassian.confluence.macro.core' && !!((_extensionNode$parame = extensionNode.parameters) !== null && _extensionNode$parame !== void 0 && (_extensionNode$parame = _extensionNode$parame.macroParams) !== null && _extensionNode$parame !== void 0 && (_extensionNode$parame = _extensionNode$parame.__bodyContent) !== null && _extensionNode$parame !== void 0 && _extensionNode$parame.value);
|
|
108
|
+
}
|
|
103
109
|
function ExtensionLoading(props) {
|
|
104
110
|
var intl = useIntl();
|
|
111
|
+
var extensionNode = props.node;
|
|
105
112
|
if (props.error || props.timedOut) {
|
|
106
113
|
// eslint-disable-next-line no-console
|
|
107
114
|
console.error('Error rendering extension', props.error);
|
|
115
|
+
if (props.error && props.showUnknownMacroPlaceholder && extensionNode && isUnknownConfluenceMacroWithBody(extensionNode) && fg('tinymce_display_unknown_macro_body_content')) {
|
|
116
|
+
return /*#__PURE__*/React.createElement(UnknownMacroPlaceholder, {
|
|
117
|
+
extensionNode: extensionNode
|
|
118
|
+
});
|
|
119
|
+
}
|
|
108
120
|
return /*#__PURE__*/React.createElement("div", null, intl.formatMessage(messages.extensionLoadingError));
|
|
109
121
|
} else {
|
|
110
122
|
return null;
|
|
@@ -128,6 +140,10 @@ export function getNodeRenderer(extensionProvider, extensionType, extensionKey)
|
|
|
128
140
|
resolveImportSync(preloaded) : resolveImport(maybePromise.render());
|
|
129
141
|
}
|
|
130
142
|
},
|
|
143
|
+
// react-loadable passes all props from <NodeRenderer> to the loading component at runtime,
|
|
144
|
+
// but its TypeScript types only expect LoadingComponentProps. We cast here because
|
|
145
|
+
// ExtensionLoading accepts additional props (node, showUnknownMacroPlaceholder) that
|
|
146
|
+
// react-loadable will pass through but doesn't know about in its type definitions.
|
|
131
147
|
loading: ExtensionLoading
|
|
132
148
|
});
|
|
133
149
|
}
|
|
@@ -44,6 +44,16 @@ export var messages = defineMessages({
|
|
|
44
44
|
id: 'fabric.editor.extension.loading-error',
|
|
45
45
|
defaultMessage: 'Error loading the extension!',
|
|
46
46
|
description: 'Error message displayed when an extension fails to load in the editor. Indicates a problem occurred during the extension initialization or rendering process.'
|
|
47
|
+
},
|
|
48
|
+
unknownMacroPlaceholderAriaLabel: {
|
|
49
|
+
id: 'fabric.editor.extension.unknownMacroPlaceholderAriaLabel',
|
|
50
|
+
defaultMessage: 'Unknown macro placeholder',
|
|
51
|
+
description: 'Accessible label for the unknown macro fallback block shown when a Confluence macro cannot be resolved.'
|
|
52
|
+
},
|
|
53
|
+
unknownMacroHeader: {
|
|
54
|
+
id: 'fabric.editor.extension.unknownMacroHeader',
|
|
55
|
+
defaultMessage: "Unknown macro: ''{macroTitle}''",
|
|
56
|
+
description: 'Header text for an unresolved Confluence macro placeholder.'
|
|
47
57
|
}
|
|
48
58
|
});
|
|
49
59
|
export var configPanelMessages = defineMessages({
|
package/dist/esm/hooks/index.js
CHANGED
|
@@ -4,5 +4,4 @@
|
|
|
4
4
|
export { default as usePreviousState } from './usePreviousState';
|
|
5
5
|
export { default as useConstructor } from './useConstructor';
|
|
6
6
|
export { useSharedPluginState } from './useSharedPluginState';
|
|
7
|
-
export { useSharedPluginStateWithSelector } from './useSharedPluginStateWithSelector';
|
|
8
|
-
export { default as useSmartCardReloadAfterCache } from './useSmartCardReloadAfterCache';
|
|
7
|
+
export { useSharedPluginStateWithSelector } from './useSharedPluginStateWithSelector';
|
|
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
|
|
|
10
10
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
11
11
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
12
12
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
13
|
-
var packageVersion = "
|
|
13
|
+
var packageVersion = "111.35.1";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// Ignored via go/ees007
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
3
3
|
|
|
4
4
|
export var NCS_STORAGE = /*#__PURE__*/function (NCS_STORAGE) {
|
|
5
|
+
// remove step metrics keys when cleaning up platform_editor_remove_collab_step_metrics
|
|
5
6
|
NCS_STORAGE["NCS_STORAGE_CLIENT_KEY"] = "ncs-session-step-metrics-storage";
|
|
6
7
|
NCS_STORAGE["NCS_SESSION_STEP_METRICS"] = "ncsSessionStepMetrics";
|
|
7
8
|
NCS_STORAGE["NCS_ACTIVE_SESSIONS"] = "ncsActiveSessions";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
3
|
import { getNodeIdProvider } from '../../node-anchor/node-anchor-provider';
|
|
3
4
|
import { processRawFragmentValue, processRawValue, processRawValueWithoutValidation } from '../../utils/processRawValue';
|
|
4
5
|
import { editorCommandToPMCommand } from '../editor-commands';
|
|
@@ -96,6 +97,9 @@ export var corePlugin = function corePlugin(_ref) {
|
|
|
96
97
|
if (content) {
|
|
97
98
|
var _options$scrollIntoVi2;
|
|
98
99
|
var tr = state.tr.replaceWith(0, state.doc.nodeSize - 2, content);
|
|
100
|
+
if (expValEquals('platform_editor_are_nodes_equal_ignore_mark_order', 'isEnabled', true)) {
|
|
101
|
+
tr.setMeta('replaceDocument', true);
|
|
102
|
+
}
|
|
99
103
|
if ((options === null || options === void 0 ? void 0 : options.addToHistory) === false) {
|
|
100
104
|
tr.setMeta('addToHistory', false);
|
|
101
105
|
}
|
|
@@ -58,7 +58,7 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
|
58
58
|
var tableSharedStyle = function tableSharedStyle() {
|
|
59
59
|
var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
60
60
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
|
|
61
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t", "\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin: 0 auto ", ";\n\t\t\tbox-sizing: border-box;\n\n\t\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t.", ",\n\t\t\t\t.", " {\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 1px;\n\t\t\t\theight: calc(100% - ", ");\n\t\t\t\tbackground: ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tright: 0;\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t.", "[data-with-numbered-table='true'] {\n\t\t\t\tleft: ", "px;\n\t\t\t}\n\t\t}\n\t\t.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t\tclear: both;\n\t\t}\n\n\t\t.", " {\n\t\t\twill-change: width, margin-left;\n\t\t}\n\n\t\t.", " table {\n\t\t\twill-change: width;\n\t\t}\n\n\t\t.", " > table {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\n\t\t.", " > table,\n\t\t.", " > table {\n\t\t\tmargin: ", " ", " 0 0;\n\t\t}\n\n\t\t/* support panel nested in table */\n\t\t", "\n\
|
|
61
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t", "\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin: 0 auto ", ";\n\t\t\tbox-sizing: border-box;\n\n\t\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t.", ",\n\t\t\t\t.", " {\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 1px;\n\t\t\t\theight: calc(100% - ", ");\n\t\t\t\tbackground: ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tright: 0;\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t.", "[data-with-numbered-table='true'] {\n\t\t\t\tleft: ", "px;\n\t\t\t}\n\t\t}\n\t\t.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t\tclear: both;\n\t\t}\n\n\t\t.", " {\n\t\t\twill-change: width, margin-left;\n\t\t}\n\n\t\t.", " table {\n\t\t\twill-change: width;\n\t\t}\n\n\t\t.", " > table {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\n\t\t.", " > table,\n\t\t.", " > table {\n\t\t\tmargin: ", " ", " 0 0;\n\t\t}\n\n\t\t/* support panel nested in table */\n\t\t", "\n\n\t\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\t\tborder-collapse: collapse;\n\t\t\tborder: ", "px solid\n\t\t\t\t", ";\n\t\t\tborder-left-color: transparent;\n\t\t\tborder-right-color: transparent;\n\t\t\ttable-layout: fixed;\n\t\t\tfont-size: 1em;\n\t\t\twidth: 100%;\n\n\t\t\t&[data-autosize='true'] {\n\t\t\t\ttable-layout: auto;\n\t\t\t}\n\n\t\t\t& {\n\t\t\t\t* {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\t\t\t\thr {\n\t\t\t\t\tbox-sizing: content-box;\n\t\t\t\t}\n\n\t\t\t\ttbody {\n\t\t\t\t\tborder-bottom: none;\n\t\t\t\t}\n\t\t\t\tth td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\t> tbody > tr > th,\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tmin-width: ", "px;\n\t\t\t\t\tfont-weight: ", ";\n\t\t\t\t\tvertical-align: top;\n\t\t\t\t\tborder: 1px solid ", ";\n\t\t\t\t\tborder-right-width: 0;\n\t\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\t\tpadding: ", ";\n\t\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t\t", "\n\n\t\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected */\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\tth {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\ttext-align: left;\n\n\t\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t\t", " {\n\t\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t\t/* selector lives inside @atlaskit/code */\n\t\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_RIGHT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, "var(--ds-space-300, 24px)", "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_RIGHT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", fg('platform_editor_bordered_panel_nested_in_table') ? ".".concat(TableSharedCssClassName.TABLE_NODE_WRAPPER, " .ak-editor-panel {\n\t\t\tborder: ", "var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #d9dbea)", ";\n\t\t}") : '', TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-space-100, 8px)", browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", "var(--ds-surface, #FFFFFF)", "var(--ds-background-accent-gray-subtlest, ".concat(akEditorTableToolbar, ")"), expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? '&:not(.danger)' : '&:not([style]):not(.danger)', CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", akEditorSelectedNodeClassName, "var(--ds-border, transparent)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, overflowShadow({
|
|
62
62
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
63
63
|
}), "var(--ds-background-neutral, rgb(235, 237, 240))", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, rgb(226, 229, 233))", overflowShadow({
|
|
64
64
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "
|
|
24
|
+
var packageVersion = "111.35.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -11,7 +11,7 @@ export type { InputMethodInsertLink, InputMethodInsertMedia, InsertMediaVia, Ins
|
|
|
11
11
|
export { CHANGE_ALIGNMENT_REASON, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_CHANGE_TRIGGER, TABLE_STATUS, TABLE_DISPLAY_MODE, } from './types/table-events';
|
|
12
12
|
export type { TableEventPayload, OverflowStateInfo } from './types/table-events';
|
|
13
13
|
export { PasteContents, PasteSources, PasteTypes } from './types/paste-events';
|
|
14
|
-
export type { PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, } from './types/paste-events';
|
|
14
|
+
export type { PASTE_ACTION_SUBJECT_ID, PasteActionsMenuEventPayload, PasteActionsMenuOpenedAEP, PasteContent, PasteEventPayload, PasteSource, PasteType, } from './types/paste-events';
|
|
15
15
|
export type { MediaSwitchType, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, CaptionTrackAction, MediaResizeTrackAction, MediaInputResizeTrackAction, } from './types/media-events';
|
|
16
16
|
export type { MoveContentEventPayload } from './types/move-content-events';
|
|
17
17
|
export type { DispatchAnalyticsEvent } from './types/dispatch-analytics-event';
|
|
@@ -353,6 +353,7 @@ export declare enum ACTION_SUBJECT {
|
|
|
353
353
|
TOOLBAR_DROPDOWN_MENU_ITEM = "toolbarDropdownMenuItem",
|
|
354
354
|
BLOCK_MENU = "blockMenu",
|
|
355
355
|
BLOCK_MENU_ITEM = "blockMenuItem",
|
|
356
|
+
PASTE_ACTIONS_MENU = "pasteActionsMenu",
|
|
356
357
|
SYNCED_BLOCK = "syncedBlock"
|
|
357
358
|
}
|
|
358
359
|
export declare enum ACTION_SUBJECT_ID {
|
|
@@ -45,7 +45,7 @@ import type { NcsSessionStepEventAEP } from './ncs-session-step-events';
|
|
|
45
45
|
import type { NestedTableActionsEventPayload } from './nested-table-events';
|
|
46
46
|
import type { NodeEventPayload } from './node-events';
|
|
47
47
|
import type { OfflineEditingEventPayload } from './offline-editing-event';
|
|
48
|
-
import type { PasteEventPayload } from './paste-events';
|
|
48
|
+
import type { PasteActionsMenuEventPayload, PasteEventPayload } from './paste-events';
|
|
49
49
|
import type { ReferentialityEventPayload } from './referentiality-events';
|
|
50
50
|
import type { SelectionEventPayload } from './selection-events';
|
|
51
51
|
import type { SelectionExtensionEventPayload } from './selection-extension-events';
|
|
@@ -66,7 +66,7 @@ export type SimplifiedNode = {
|
|
|
66
66
|
pos: number;
|
|
67
67
|
type: string;
|
|
68
68
|
};
|
|
69
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | PreviewItemClickedAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIStreamingEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | BlockMenuEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | ExperienceEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload | NcsSessionStepEventAEP | FloatingToolbarOverflowEventPayload | SyncBlockEventPayload | FloatingToolbarEventPayload;
|
|
69
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | PasteActionsMenuEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | PreviewItemClickedAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIStreamingEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | BlockMenuEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | ExperienceEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload | NcsSessionStepEventAEP | FloatingToolbarOverflowEventPayload | SyncBlockEventPayload | FloatingToolbarEventPayload;
|
|
70
70
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
71
71
|
newColor: string;
|
|
72
72
|
previousColor: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
2
|
-
import type { OperationalAEP, TrackAEP } from './utils';
|
|
2
|
+
import type { OperationalAEP, TrackAEP, UIAEP } from './utils';
|
|
3
3
|
export declare const PasteTypes: {
|
|
4
4
|
[type: string]: PasteType;
|
|
5
5
|
};
|
|
@@ -18,6 +18,7 @@ type PasteBaseOperationalAEP<Action, Attributes> = OperationalAEP<Action, ACTION
|
|
|
18
18
|
type PasteAEP = PasteBaseAEP<ACTION.PASTED, {
|
|
19
19
|
content: PasteContent;
|
|
20
20
|
inputMethod: INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
|
|
21
|
+
invokedFrom?: string;
|
|
21
22
|
pasteSize: number;
|
|
22
23
|
source?: PasteSource;
|
|
23
24
|
type: PasteType;
|
|
@@ -36,4 +37,8 @@ type PastedTimedAEP = PasteBaseOperationalAEP<ACTION.PASTED_TIMED, {
|
|
|
36
37
|
time: number;
|
|
37
38
|
}>;
|
|
38
39
|
export type PasteEventPayload = PasteAEP | PasteAsPlainAEP | PastedTimedAEP;
|
|
40
|
+
export type PasteActionsMenuOpenedAEP = UIAEP<ACTION.OPENED, ACTION_SUBJECT.PASTE_ACTIONS_MENU, undefined, {
|
|
41
|
+
visibleAiActions: string[];
|
|
42
|
+
}, undefined>;
|
|
43
|
+
export type PasteActionsMenuEventPayload = PasteActionsMenuOpenedAEP;
|
|
39
44
|
export {};
|
|
@@ -44,8 +44,8 @@ export type ExperienceCheckDomMutationConfig = {
|
|
|
44
44
|
* !!IMPORTANT!!
|
|
45
45
|
* Return null if the target element cannot be found.
|
|
46
46
|
* This will immediately fail the experience with experienceFailureReason 'domMutationTargetNotFound'.
|
|
47
|
-
|
|
48
|
-
observeConfig: () =>
|
|
47
|
+
*/
|
|
48
|
+
observeConfig: () => ExperienceCheckDomMutationObserveConfig | ExperienceCheckDomMutationObserveConfig[] | null;
|
|
49
49
|
/**
|
|
50
50
|
* Callback invoked when DOM mutations are detected
|
|
51
51
|
*
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExtensionParams } from './types/extension-handler';
|
|
2
|
+
import type { Parameters } from './types/extension-parameters';
|
|
3
|
+
interface UnknownMacroPlaceholderProps {
|
|
4
|
+
extensionNode: ExtensionParams<Parameters>;
|
|
5
|
+
}
|
|
6
|
+
export declare function UnknownMacroPlaceholder({ extensionNode }: UnknownMacroPlaceholderProps): JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -44,6 +44,16 @@ export declare const messages: {
|
|
|
44
44
|
defaultMessage: string;
|
|
45
45
|
description: string;
|
|
46
46
|
};
|
|
47
|
+
unknownMacroPlaceholderAriaLabel: {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
unknownMacroHeader: {
|
|
53
|
+
id: string;
|
|
54
|
+
defaultMessage: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
47
57
|
};
|
|
48
58
|
export declare const configPanelMessages: {
|
|
49
59
|
configFailedToLoad: {
|
|
@@ -2,4 +2,3 @@ export { default as usePreviousState } from './usePreviousState';
|
|
|
2
2
|
export { default as useConstructor } from './useConstructor';
|
|
3
3
|
export { useSharedPluginState } from './useSharedPluginState';
|
|
4
4
|
export { useSharedPluginStateWithSelector, type NamedPluginStatesFromInjectionAPI, } from './useSharedPluginStateWithSelector';
|
|
5
|
-
export { default as useSmartCardReloadAfterCache } from './useSmartCardReloadAfterCache';
|
|
@@ -11,7 +11,7 @@ export type { InputMethodInsertLink, InputMethodInsertMedia, InsertMediaVia, Ins
|
|
|
11
11
|
export { CHANGE_ALIGNMENT_REASON, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_CHANGE_TRIGGER, TABLE_STATUS, TABLE_DISPLAY_MODE, } from './types/table-events';
|
|
12
12
|
export type { TableEventPayload, OverflowStateInfo } from './types/table-events';
|
|
13
13
|
export { PasteContents, PasteSources, PasteTypes } from './types/paste-events';
|
|
14
|
-
export type { PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, } from './types/paste-events';
|
|
14
|
+
export type { PASTE_ACTION_SUBJECT_ID, PasteActionsMenuEventPayload, PasteActionsMenuOpenedAEP, PasteContent, PasteEventPayload, PasteSource, PasteType, } from './types/paste-events';
|
|
15
15
|
export type { MediaSwitchType, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, CaptionTrackAction, MediaResizeTrackAction, MediaInputResizeTrackAction, } from './types/media-events';
|
|
16
16
|
export type { MoveContentEventPayload } from './types/move-content-events';
|
|
17
17
|
export type { DispatchAnalyticsEvent } from './types/dispatch-analytics-event';
|
|
@@ -353,6 +353,7 @@ export declare enum ACTION_SUBJECT {
|
|
|
353
353
|
TOOLBAR_DROPDOWN_MENU_ITEM = "toolbarDropdownMenuItem",
|
|
354
354
|
BLOCK_MENU = "blockMenu",
|
|
355
355
|
BLOCK_MENU_ITEM = "blockMenuItem",
|
|
356
|
+
PASTE_ACTIONS_MENU = "pasteActionsMenu",
|
|
356
357
|
SYNCED_BLOCK = "syncedBlock"
|
|
357
358
|
}
|
|
358
359
|
export declare enum ACTION_SUBJECT_ID {
|
|
@@ -45,7 +45,7 @@ import type { NcsSessionStepEventAEP } from './ncs-session-step-events';
|
|
|
45
45
|
import type { NestedTableActionsEventPayload } from './nested-table-events';
|
|
46
46
|
import type { NodeEventPayload } from './node-events';
|
|
47
47
|
import type { OfflineEditingEventPayload } from './offline-editing-event';
|
|
48
|
-
import type { PasteEventPayload } from './paste-events';
|
|
48
|
+
import type { PasteActionsMenuEventPayload, PasteEventPayload } from './paste-events';
|
|
49
49
|
import type { ReferentialityEventPayload } from './referentiality-events';
|
|
50
50
|
import type { SelectionEventPayload } from './selection-events';
|
|
51
51
|
import type { SelectionExtensionEventPayload } from './selection-extension-events';
|
|
@@ -66,7 +66,7 @@ export type SimplifiedNode = {
|
|
|
66
66
|
pos: number;
|
|
67
67
|
type: string;
|
|
68
68
|
};
|
|
69
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | PreviewItemClickedAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIStreamingEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | BlockMenuEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | ExperienceEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload | NcsSessionStepEventAEP | FloatingToolbarOverflowEventPayload | SyncBlockEventPayload | FloatingToolbarEventPayload;
|
|
69
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | PasteActionsMenuEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | PreviewItemClickedAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIStreamingEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | BlockMenuEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | ExperienceEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload | NcsSessionStepEventAEP | FloatingToolbarOverflowEventPayload | SyncBlockEventPayload | FloatingToolbarEventPayload;
|
|
70
70
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
71
71
|
newColor: string;
|
|
72
72
|
previousColor: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
2
|
-
import type { OperationalAEP, TrackAEP } from './utils';
|
|
2
|
+
import type { OperationalAEP, TrackAEP, UIAEP } from './utils';
|
|
3
3
|
export declare const PasteTypes: {
|
|
4
4
|
[type: string]: PasteType;
|
|
5
5
|
};
|
|
@@ -18,6 +18,7 @@ type PasteBaseOperationalAEP<Action, Attributes> = OperationalAEP<Action, ACTION
|
|
|
18
18
|
type PasteAEP = PasteBaseAEP<ACTION.PASTED, {
|
|
19
19
|
content: PasteContent;
|
|
20
20
|
inputMethod: INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
|
|
21
|
+
invokedFrom?: string;
|
|
21
22
|
pasteSize: number;
|
|
22
23
|
source?: PasteSource;
|
|
23
24
|
type: PasteType;
|
|
@@ -36,4 +37,8 @@ type PastedTimedAEP = PasteBaseOperationalAEP<ACTION.PASTED_TIMED, {
|
|
|
36
37
|
time: number;
|
|
37
38
|
}>;
|
|
38
39
|
export type PasteEventPayload = PasteAEP | PasteAsPlainAEP | PastedTimedAEP;
|
|
40
|
+
export type PasteActionsMenuOpenedAEP = UIAEP<ACTION.OPENED, ACTION_SUBJECT.PASTE_ACTIONS_MENU, undefined, {
|
|
41
|
+
visibleAiActions: string[];
|
|
42
|
+
}, undefined>;
|
|
43
|
+
export type PasteActionsMenuEventPayload = PasteActionsMenuOpenedAEP;
|
|
39
44
|
export {};
|
|
@@ -44,8 +44,8 @@ export type ExperienceCheckDomMutationConfig = {
|
|
|
44
44
|
* !!IMPORTANT!!
|
|
45
45
|
* Return null if the target element cannot be found.
|
|
46
46
|
* This will immediately fail the experience with experienceFailureReason 'domMutationTargetNotFound'.
|
|
47
|
-
|
|
48
|
-
observeConfig: () =>
|
|
47
|
+
*/
|
|
48
|
+
observeConfig: () => ExperienceCheckDomMutationObserveConfig | ExperienceCheckDomMutationObserveConfig[] | null;
|
|
49
49
|
/**
|
|
50
50
|
* Callback invoked when DOM mutations are detected
|
|
51
51
|
*
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExtensionParams } from './types/extension-handler';
|
|
2
|
+
import type { Parameters } from './types/extension-parameters';
|
|
3
|
+
interface UnknownMacroPlaceholderProps {
|
|
4
|
+
extensionNode: ExtensionParams<Parameters>;
|
|
5
|
+
}
|
|
6
|
+
export declare function UnknownMacroPlaceholder({ extensionNode }: UnknownMacroPlaceholderProps): JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -44,6 +44,16 @@ export declare const messages: {
|
|
|
44
44
|
defaultMessage: string;
|
|
45
45
|
description: string;
|
|
46
46
|
};
|
|
47
|
+
unknownMacroPlaceholderAriaLabel: {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
unknownMacroHeader: {
|
|
53
|
+
id: string;
|
|
54
|
+
defaultMessage: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
47
57
|
};
|
|
48
58
|
export declare const configPanelMessages: {
|
|
49
59
|
configFailedToLoad: {
|
|
@@ -2,4 +2,3 @@ export { default as usePreviousState } from './usePreviousState';
|
|
|
2
2
|
export { default as useConstructor } from './useConstructor';
|
|
3
3
|
export { useSharedPluginState } from './useSharedPluginState';
|
|
4
4
|
export { useSharedPluginStateWithSelector, type NamedPluginStatesFromInjectionAPI, } from './useSharedPluginStateWithSelector';
|
|
5
|
-
export { default as useSmartCardReloadAfterCache } from './useSmartCardReloadAfterCache';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "112.0.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
43
43
|
"@atlaskit/css": "^0.19.0",
|
|
44
44
|
"@atlaskit/custom-steps": "^0.16.0",
|
|
45
|
-
"@atlaskit/dropdown-menu": "^16.
|
|
45
|
+
"@atlaskit/dropdown-menu": "^16.6.0",
|
|
46
46
|
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
47
47
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
48
48
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/icon": "^32.0.0",
|
|
55
55
|
"@atlaskit/icon-object": "^7.4.0",
|
|
56
56
|
"@atlaskit/link": "^3.3.0",
|
|
57
|
-
"@atlaskit/link-datasource": "^4.
|
|
57
|
+
"@atlaskit/link-datasource": "^4.34.0",
|
|
58
58
|
"@atlaskit/link-picker": "^4.2.0",
|
|
59
59
|
"@atlaskit/media-card": "^79.15.0",
|
|
60
60
|
"@atlaskit/media-client": "^36.0.0",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@atlaskit/task-decision": "^19.3.0",
|
|
83
83
|
"@atlaskit/textfield": "^8.2.0",
|
|
84
84
|
"@atlaskit/theme": "^22.0.0",
|
|
85
|
-
"@atlaskit/tmp-editor-statsig": "^35.
|
|
85
|
+
"@atlaskit/tmp-editor-statsig": "^35.10.0",
|
|
86
86
|
"@atlaskit/tokens": "^11.1.0",
|
|
87
87
|
"@atlaskit/tooltip": "^20.14.0",
|
|
88
88
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -276,6 +276,9 @@
|
|
|
276
276
|
},
|
|
277
277
|
"jim-lower-ranking-in-jira-macro-search": {
|
|
278
278
|
"type": "boolean"
|
|
279
|
+
},
|
|
280
|
+
"tinymce_display_unknown_macro_body_content": {
|
|
281
|
+
"type": "boolean"
|
|
279
282
|
}
|
|
280
283
|
}
|
|
281
284
|
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _hooks = require("@atlaskit/smart-card/hooks");
|
|
9
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
10
|
-
/**
|
|
11
|
-
* Hook to manage smart card reload behavior when content is loaded from local cache.
|
|
12
|
-
*
|
|
13
|
-
* Handles:
|
|
14
|
-
* - Capturing initial card status on mount (synchronously to avoid race conditions)
|
|
15
|
-
* - Tracking URL changes and resetting state
|
|
16
|
-
* - Only reloading data that was initially loaded from cache
|
|
17
|
-
* - Ensuring reload is called at most once per URL
|
|
18
|
-
* - Respecting page SSR state to avoid reloading on server-rendered pages
|
|
19
|
-
*
|
|
20
|
-
* @param url - The smart card URL
|
|
21
|
-
* @param cardStatus - The current card resolution status ('pending', 'resolved', etc)
|
|
22
|
-
* @param isPageSSRed - Whether the page was server-side rendered
|
|
23
|
-
*/
|
|
24
|
-
var useSmartCardReloadAfterCache = function useSmartCardReloadAfterCache(url, cardStatus, isPageSSRed) {
|
|
25
|
-
var initialCardStatus = (0, _react.useRef)(undefined);
|
|
26
|
-
var hasReloaded = (0, _react.useRef)(false);
|
|
27
|
-
var previousUrl = (0, _react.useRef)(url);
|
|
28
|
-
var reload = (0, _hooks.useSmartLinkReload)({
|
|
29
|
-
url: url || ''
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// Reset refs when URL changes (do this before capturing initial status)
|
|
33
|
-
if (previousUrl.current !== url) {
|
|
34
|
-
initialCardStatus.current = undefined;
|
|
35
|
-
hasReloaded.current = false;
|
|
36
|
-
previousUrl.current = url;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Capture initial card status on first render (synchronously)
|
|
40
|
-
// This determines if the card was loaded from cache (resolved on mount)
|
|
41
|
-
// or if it's being fetched fresh (pending on mount)
|
|
42
|
-
if ((0, _expValEquals.expValEquals)('platform_editor_smartlink_local_cache', 'isEnabled', true) && cardStatus && initialCardStatus.current === undefined) {
|
|
43
|
-
initialCardStatus.current = cardStatus;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Reload from cache in the background if needed
|
|
47
|
-
(0, _react.useEffect)(function () {
|
|
48
|
-
if ((0, _expValEquals.expValEquals)('platform_editor_smartlink_local_cache', 'isEnabled', true) && !isPageSSRed && url && initialCardStatus.current === 'resolved' && cardStatus === 'resolved' && !hasReloaded.current) {
|
|
49
|
-
hasReloaded.current = true;
|
|
50
|
-
reload();
|
|
51
|
-
}
|
|
52
|
-
}, [isPageSSRed, url, cardStatus, reload]);
|
|
53
|
-
};
|
|
54
|
-
var _default = exports.default = useSmartCardReloadAfterCache;
|