@atlaskit/editor-core 198.6.9 → 198.6.11
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 +17 -0
- package/dist/cjs/composable-editor/core-editor.js +2 -5
- package/dist/cjs/composable-editor/editor-internal.js +3 -10
- package/dist/cjs/composable-editor/hooks/useMeasureEditorMountTime.js +2 -2
- package/dist/cjs/composable-editor/hooks/useMemoEditorProps.js +3 -3
- package/dist/cjs/create-editor/ReactEditorView.js +59 -110
- package/dist/cjs/create-editor/create-plugins-list.js +1 -4
- package/dist/cjs/create-editor/feature-flags-from-props.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/core-editor.js +2 -5
- package/dist/es2019/composable-editor/editor-internal.js +3 -10
- package/dist/es2019/composable-editor/hooks/useMeasureEditorMountTime.js +2 -2
- package/dist/es2019/composable-editor/hooks/useMemoEditorProps.js +3 -3
- package/dist/es2019/create-editor/ReactEditorView.js +51 -100
- package/dist/es2019/create-editor/create-plugins-list.js +1 -4
- package/dist/es2019/create-editor/feature-flags-from-props.js +2 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/core-editor.js +2 -5
- package/dist/esm/composable-editor/editor-internal.js +3 -10
- package/dist/esm/composable-editor/hooks/useMeasureEditorMountTime.js +2 -2
- package/dist/esm/composable-editor/hooks/useMemoEditorProps.js +3 -3
- package/dist/esm/create-editor/ReactEditorView.js +50 -101
- package/dist/esm/create-editor/create-plugins-list.js +1 -4
- package/dist/esm/create-editor/feature-flags-from-props.js +2 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +3 -4
- package/dist/types/create-editor/create-universal-preset.d.ts +72 -0
- package/dist/types/editor-appearances/ChromelessEditor.d.ts +1 -1
- package/dist/types/editor-appearances/CommentEditor.d.ts +1 -1
- package/dist/types/editor-appearances/FullPageEditor.d.ts +1 -1
- package/dist/types/editor-appearances/FullWidthEditor.d.ts +1 -1
- package/dist/types/presets/default.d.ts +36 -0
- package/dist/types/presets/universal.d.ts +72 -0
- package/dist/types/presets/useUniversalPreset.d.ts +72 -0
- package/dist/types/types/editor-props.d.ts +2 -1
- package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +3 -4
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +72 -0
- package/dist/types-ts4.5/editor-appearances/ChromelessEditor.d.ts +1 -1
- package/dist/types-ts4.5/editor-appearances/CommentEditor.d.ts +1 -1
- package/dist/types-ts4.5/editor-appearances/FullPageEditor.d.ts +1 -1
- package/dist/types-ts4.5/editor-appearances/FullWidthEditor.d.ts +1 -1
- package/dist/types-ts4.5/presets/default.d.ts +36 -0
- package/dist/types-ts4.5/presets/universal.d.ts +72 -0
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +72 -0
- package/dist/types-ts4.5/types/editor-props.d.ts +2 -1
- package/package.json +2 -6
|
@@ -35,7 +35,7 @@ import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
|
35
35
|
import measurements from '../utils/performance/measure-enum';
|
|
36
36
|
import { PluginPerformanceObserver } from '../utils/performance/plugin-performance-observer';
|
|
37
37
|
import { freezeUnsafeTransactionProperties } from '../utils/performance/safer-transactions';
|
|
38
|
-
import { EVENT_NAME_DISPATCH_TRANSACTION, EVENT_NAME_ON_CHANGE, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED
|
|
38
|
+
import { EVENT_NAME_DISPATCH_TRANSACTION, EVENT_NAME_ON_CHANGE, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED } from '../utils/performance/track-transactions';
|
|
39
39
|
import { validateNodes, validNode } from '../utils/validateNodes';
|
|
40
40
|
import { PROSEMIRROR_RENDERED_DEGRADED_SEVERITY_THRESHOLD, PROSEMIRROR_RENDERED_NORMAL_SEVERITY_THRESHOLD } from './consts';
|
|
41
41
|
import { createErrorReporter, createPMPlugins, processPluginsList } from './create-editor';
|
|
@@ -86,7 +86,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
86
86
|
_inherits(ReactEditorView, _React$Component);
|
|
87
87
|
var _super = _createSuper(ReactEditorView);
|
|
88
88
|
function ReactEditorView(props) {
|
|
89
|
-
var _this$props$
|
|
89
|
+
var _this$props$editorPro3, _props$setEditorAPI;
|
|
90
90
|
var _this;
|
|
91
91
|
_classCallCheck(this, ReactEditorView);
|
|
92
92
|
_this = _super.call(this, props);
|
|
@@ -248,31 +248,20 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
248
248
|
transactions = _ref2.transactions,
|
|
249
249
|
oldEditorState = _ref2.oldEditorState,
|
|
250
250
|
newEditorState = _ref2.newEditorState;
|
|
251
|
-
var trackinEnabled = _this.transactionTracking.enabled;
|
|
252
251
|
_this.config.onEditorViewStateUpdatedCallbacks.forEach(function (entry) {
|
|
253
|
-
trackinEnabled && startMeasure("\uD83E\uDD89 ".concat(entry.pluginName, "::onEditorViewStateUpdated"));
|
|
254
252
|
entry.callback({
|
|
255
253
|
originalTransaction: originalTransaction,
|
|
256
254
|
transactions: transactions,
|
|
257
255
|
oldEditorState: oldEditorState,
|
|
258
256
|
newEditorState: newEditorState
|
|
259
257
|
});
|
|
260
|
-
trackinEnabled && stopMeasure("\uD83E\uDD89 ".concat(entry.pluginName, "::onEditorViewStateUpdated"));
|
|
261
258
|
});
|
|
262
259
|
});
|
|
263
260
|
_defineProperty(_assertThisInitialized(_this), "dispatchTransaction", function (unsafeTransaction) {
|
|
264
261
|
if (!_this.view) {
|
|
265
262
|
return;
|
|
266
263
|
}
|
|
267
|
-
_this.transactionTracker.bumpDispatchCounter(_this.transactionTracking);
|
|
268
|
-
var _this$transactionTrac = _this.transactionTracker.getMeasureHelpers(_this.transactionTracking),
|
|
269
|
-
startMeasure = _this$transactionTrac.startMeasure,
|
|
270
|
-
stopMeasure = _this$transactionTrac.stopMeasure;
|
|
271
264
|
startMeasure(EVENT_NAME_DISPATCH_TRANSACTION);
|
|
272
|
-
if (_this.transactionTracker.shouldTrackTransaction(_this.transactionTracking)) {
|
|
273
|
-
var _this$experienceStore;
|
|
274
|
-
(_this$experienceStore = _this.experienceStore) === null || _this$experienceStore === void 0 || _this$experienceStore.start(EditorExperience.interaction);
|
|
275
|
-
}
|
|
276
265
|
var nodes = findChangedNodesFromTransaction(unsafeTransaction);
|
|
277
266
|
var changedNodesValid = validateNodes(nodes);
|
|
278
267
|
var transaction = new Proxy(unsafeTransaction, freezeUnsafeTransactionProperties({
|
|
@@ -288,8 +277,8 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
288
277
|
editorState = _this$view$state$appl.state,
|
|
289
278
|
transactions = _this$view$state$appl.transactions;
|
|
290
279
|
stopMeasure(EVENT_NAME_STATE_APPLY, function (duration, startTime) {
|
|
291
|
-
var _this$
|
|
292
|
-
(_this$
|
|
280
|
+
var _this$experienceStore;
|
|
281
|
+
(_this$experienceStore = _this.experienceStore) === null || _this$experienceStore === void 0 || _this$experienceStore.mark(EditorExperience.interaction, 'stateApply', startTime + duration);
|
|
293
282
|
});
|
|
294
283
|
if (editorState === oldEditorState) {
|
|
295
284
|
return;
|
|
@@ -297,8 +286,8 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
297
286
|
startMeasure(EVENT_NAME_UPDATE_STATE);
|
|
298
287
|
_this.view.updateState(editorState);
|
|
299
288
|
stopMeasure(EVENT_NAME_UPDATE_STATE, function (duration, startTime) {
|
|
300
|
-
var _this$
|
|
301
|
-
(_this$
|
|
289
|
+
var _this$experienceStore2;
|
|
290
|
+
(_this$experienceStore2 = _this.experienceStore) === null || _this$experienceStore2 === void 0 || _this$experienceStore2.mark(EditorExperience.interaction, 'viewUpdateState', startTime + duration);
|
|
302
291
|
});
|
|
303
292
|
_this.pluginInjectionAPI.onEditorViewUpdated({
|
|
304
293
|
newEditorState: editorState,
|
|
@@ -312,8 +301,8 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
312
301
|
newEditorState: editorState
|
|
313
302
|
});
|
|
314
303
|
stopMeasure(EVENT_NAME_VIEW_STATE_UPDATED, function (duration, startTime) {
|
|
315
|
-
var _this$
|
|
316
|
-
(_this$
|
|
304
|
+
var _this$experienceStore3;
|
|
305
|
+
(_this$experienceStore3 = _this.experienceStore) === null || _this$experienceStore3 === void 0 || _this$experienceStore3.mark(EditorExperience.interaction, 'onEditorViewStateUpdated', startTime + duration);
|
|
317
306
|
});
|
|
318
307
|
if (_this.props.editorProps.onChange && transaction.docChanged) {
|
|
319
308
|
var source = transaction.getMeta('isRemote') ? 'remote' : 'local';
|
|
@@ -322,11 +311,8 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
322
311
|
source: source
|
|
323
312
|
});
|
|
324
313
|
stopMeasure(EVENT_NAME_ON_CHANGE, function (duration, startTime) {
|
|
325
|
-
var _this$
|
|
326
|
-
(_this$
|
|
327
|
-
if (((_this$props$editorPro3 = _this.props.editorProps.performanceTracking) === null || _this$props$editorPro3 === void 0 || (_this$props$editorPro3 = _this$props$editorPro3.onChangeCallbackTracking) === null || _this$props$editorPro3 === void 0 ? void 0 : _this$props$editorPro3.enabled) !== true) {
|
|
328
|
-
return;
|
|
329
|
-
}
|
|
314
|
+
var _this$experienceStore4;
|
|
315
|
+
(_this$experienceStore4 = _this.experienceStore) === null || _this$experienceStore4 === void 0 || _this$experienceStore4.mark(EditorExperience.interaction, 'onChange', startTime + duration);
|
|
330
316
|
_this.dispatchAnalyticsEvent({
|
|
331
317
|
action: ACTION.ON_CHANGE_CALLBACK,
|
|
332
318
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
@@ -340,12 +326,11 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
340
326
|
}
|
|
341
327
|
_this.editorState = editorState;
|
|
342
328
|
stopMeasure(EVENT_NAME_DISPATCH_TRANSACTION, function (duration, startTime) {
|
|
343
|
-
var _this$
|
|
344
|
-
(_this$
|
|
345
|
-
(_this$
|
|
329
|
+
var _this$experienceStore5, _this$experienceStore6;
|
|
330
|
+
(_this$experienceStore5 = _this.experienceStore) === null || _this$experienceStore5 === void 0 || _this$experienceStore5.mark(EditorExperience.interaction, 'dispatchTransaction', startTime + duration);
|
|
331
|
+
(_this$experienceStore6 = _this.experienceStore) === null || _this$experienceStore6 === void 0 || _this$experienceStore6.success(EditorExperience.interaction);
|
|
346
332
|
});
|
|
347
333
|
} else {
|
|
348
|
-
var _this$experienceStore8;
|
|
349
334
|
var invalidNodes = nodes.filter(function (node) {
|
|
350
335
|
return !validNode(node);
|
|
351
336
|
}).map(function (node) {
|
|
@@ -353,20 +338,14 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
353
338
|
compact: true
|
|
354
339
|
});
|
|
355
340
|
});
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
(_this$experienceStore8 = _this.experienceStore) === null || _this$experienceStore8 === void 0 || _this$experienceStore8.fail(EditorExperience.interaction, {
|
|
368
|
-
reason: 'invalid transaction',
|
|
369
|
-
invalidNodes: invalidNodes.toString()
|
|
341
|
+
_this.dispatchAnalyticsEvent({
|
|
342
|
+
action: ACTION.DISPATCHED_INVALID_TRANSACTION,
|
|
343
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
344
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
345
|
+
attributes: {
|
|
346
|
+
analyticsEventPayloads: getAnalyticsEventsFromTransaction(transaction),
|
|
347
|
+
invalidNodes: invalidNodes
|
|
348
|
+
}
|
|
370
349
|
});
|
|
371
350
|
}
|
|
372
351
|
});
|
|
@@ -392,15 +371,12 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
392
371
|
});
|
|
393
372
|
_defineProperty(_assertThisInitialized(_this), "createEditorView", function (node) {
|
|
394
373
|
measureRender(measurements.PROSEMIRROR_RENDERED, function (_ref3) {
|
|
395
|
-
var _this$props$editorPro4, _proseMirrorRenderedT, _proseMirrorRenderedT2;
|
|
396
374
|
var duration = _ref3.duration,
|
|
397
375
|
startTime = _ref3.startTime,
|
|
398
376
|
distortedDuration = _ref3.distortedDuration;
|
|
399
|
-
|
|
400
|
-
var forceSeverityTracking = typeof proseMirrorRenderedTracking === 'undefined';
|
|
401
|
-
_this.proseMirrorRenderedSeverity = !!forceSeverityTracking || proseMirrorRenderedTracking !== null && proseMirrorRenderedTracking !== void 0 && proseMirrorRenderedTracking.trackSeverity ? getAnalyticsEventSeverity(duration, (_proseMirrorRenderedT = proseMirrorRenderedTracking === null || proseMirrorRenderedTracking === void 0 ? void 0 : proseMirrorRenderedTracking.severityNormalThreshold) !== null && _proseMirrorRenderedT !== void 0 ? _proseMirrorRenderedT : PROSEMIRROR_RENDERED_NORMAL_SEVERITY_THRESHOLD, (_proseMirrorRenderedT2 = proseMirrorRenderedTracking === null || proseMirrorRenderedTracking === void 0 ? void 0 : proseMirrorRenderedTracking.severityDegradedThreshold) !== null && _proseMirrorRenderedT2 !== void 0 ? _proseMirrorRenderedT2 : PROSEMIRROR_RENDERED_DEGRADED_SEVERITY_THRESHOLD) : undefined;
|
|
377
|
+
_this.proseMirrorRenderedSeverity = getAnalyticsEventSeverity(duration, PROSEMIRROR_RENDERED_NORMAL_SEVERITY_THRESHOLD, PROSEMIRROR_RENDERED_DEGRADED_SEVERITY_THRESHOLD);
|
|
402
378
|
if (_this.view) {
|
|
403
|
-
var _this$pluginInjection2, _this$
|
|
379
|
+
var _this$pluginInjection2, _this$experienceStore8;
|
|
404
380
|
var nodes = getNodesCount(_this.view.state.doc);
|
|
405
381
|
var ttfb = getResponseEndTime();
|
|
406
382
|
var contextIdentifier = (_this$pluginInjection2 = _this.pluginInjectionAPI.api().base) === null || _this$pluginInjection2 === void 0 ? void 0 : _this$pluginInjection2.sharedState.currentState();
|
|
@@ -419,10 +395,10 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
419
395
|
eventType: EVENT_TYPE.OPERATIONAL
|
|
420
396
|
});
|
|
421
397
|
if (!distortedDuration) {
|
|
422
|
-
var _this$
|
|
423
|
-
(_this$
|
|
398
|
+
var _this$experienceStore7;
|
|
399
|
+
(_this$experienceStore7 = _this.experienceStore) === null || _this$experienceStore7 === void 0 || _this$experienceStore7.mark(EditorExperience.loadEditor, ACTION.PROSEMIRROR_RENDERED, startTime + duration);
|
|
424
400
|
}
|
|
425
|
-
(_this$
|
|
401
|
+
(_this$experienceStore8 = _this.experienceStore) === null || _this$experienceStore8 === void 0 || _this$experienceStore8.addMetadata(EditorExperience.loadEditor, {
|
|
426
402
|
nodes: nodes,
|
|
427
403
|
ttfb: ttfb
|
|
428
404
|
});
|
|
@@ -459,11 +435,11 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
459
435
|
reliabilityInterval: RELIABILITY_INTERVAL
|
|
460
436
|
});
|
|
461
437
|
_this.reliabilityInterval = window.setInterval(function () {
|
|
462
|
-
var _this$
|
|
463
|
-
(_this$
|
|
464
|
-
var _this$
|
|
465
|
-
(_this$
|
|
466
|
-
(_this$
|
|
438
|
+
var _this$experienceStore9;
|
|
439
|
+
(_this$experienceStore9 = _this.experienceStore) === null || _this$experienceStore9 === void 0 || (_this$experienceStore9 = _this$experienceStore9.success(EditorExperience.editSession)) === null || _this$experienceStore9 === void 0 || _this$experienceStore9.finally(function () {
|
|
440
|
+
var _this$experienceStore10, _this$experienceStore11;
|
|
441
|
+
(_this$experienceStore10 = _this.experienceStore) === null || _this$experienceStore10 === void 0 || _this$experienceStore10.start(EditorExperience.editSession);
|
|
442
|
+
(_this$experienceStore11 = _this.experienceStore) === null || _this$experienceStore11 === void 0 || _this$experienceStore11.addMetadata(EditorExperience.editSession, {
|
|
467
443
|
reliabilityInterval: RELIABILITY_INTERVAL
|
|
468
444
|
});
|
|
469
445
|
});
|
|
@@ -534,7 +510,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
534
510
|
"data-editor-id": _this.editorId
|
|
535
511
|
});
|
|
536
512
|
});
|
|
537
|
-
_defineProperty(_assertThisInitialized(_this), "editor", _this.createEditor(_this.props.editorProps.assistiveLabel, (_this$props$
|
|
513
|
+
_defineProperty(_assertThisInitialized(_this), "editor", _this.createEditor(_this.props.editorProps.assistiveLabel, (_this$props$editorPro3 = _this.props.editorProps) === null || _this$props$editorPro3 === void 0 ? void 0 : _this$props$editorPro3.assistiveDescribedBy));
|
|
538
514
|
_this.pluginInjectionAPI = new EditorPluginInjectionAPI({
|
|
539
515
|
getEditorState: _this.getEditorState,
|
|
540
516
|
getEditorView: _this.getEditorView
|
|
@@ -544,17 +520,12 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
544
520
|
_this.eventDispatcher = new EventDispatcher();
|
|
545
521
|
_this.dispatch = createDispatch(_this.eventDispatcher);
|
|
546
522
|
_this.errorReporter = createErrorReporter(props.editorProps.errorReporterHandler);
|
|
547
|
-
_this.transactionTracker = new TransactionTracker();
|
|
548
523
|
_this.pluginPerformanceObserver = new PluginPerformanceObserver(function (report) {
|
|
549
524
|
return _this.onPluginObservation(report);
|
|
550
525
|
}).withPlugins(function () {
|
|
551
526
|
return _this.getPluginNames();
|
|
552
527
|
}).withNodeCounts(function () {
|
|
553
528
|
return _this.countNodes();
|
|
554
|
-
}).withOptions(function () {
|
|
555
|
-
return _this.transactionTracking;
|
|
556
|
-
}).withTransactionTracker(function () {
|
|
557
|
-
return _this.transactionTracker;
|
|
558
529
|
});
|
|
559
530
|
_this.featureFlags = createFeatureFlagsFromProps(_this.props.editorProps);
|
|
560
531
|
var featureFlagsEnabled = _this.featureFlags ? getEnabledFeatureFlagKeys(_this.featureFlags) : [];
|
|
@@ -569,29 +540,23 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
569
540
|
// ED-4759: Don't set selection at end for full-page editor - should be at start.
|
|
570
541
|
selectionAtStart: isFullPage(props.editorProps.appearance)
|
|
571
542
|
});
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
attributes: {
|
|
582
|
-
platform: PLATFORMS.WEB,
|
|
583
|
-
featureFlags: featureFlagsEnabled
|
|
584
|
-
},
|
|
585
|
-
eventType: EVENT_TYPE.UI
|
|
586
|
-
});
|
|
587
|
-
}
|
|
543
|
+
_this.dispatchAnalyticsEvent({
|
|
544
|
+
action: ACTION.STARTED,
|
|
545
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
546
|
+
attributes: {
|
|
547
|
+
platform: PLATFORMS.WEB,
|
|
548
|
+
featureFlags: featureFlagsEnabled
|
|
549
|
+
},
|
|
550
|
+
eventType: EVENT_TYPE.UI
|
|
551
|
+
});
|
|
588
552
|
return _this;
|
|
589
553
|
}
|
|
590
554
|
_createClass(ReactEditorView, [{
|
|
591
555
|
key: "transactionTracking",
|
|
592
|
-
get:
|
|
593
|
-
|
|
594
|
-
|
|
556
|
+
get:
|
|
557
|
+
//TODO: clean up
|
|
558
|
+
function get() {
|
|
559
|
+
return {
|
|
595
560
|
enabled: false
|
|
596
561
|
};
|
|
597
562
|
}
|
|
@@ -608,19 +573,10 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
608
573
|
value: function countNodes() {
|
|
609
574
|
return _countNodes(this.editorState);
|
|
610
575
|
}
|
|
611
|
-
}, {
|
|
612
|
-
key: "isTransactionTrackingExplicitlyDisabled",
|
|
613
|
-
value: function isTransactionTrackingExplicitlyDisabled() {
|
|
614
|
-
var _this$props$editorPro8;
|
|
615
|
-
// ED-16320: Check for explicit disable so that by default
|
|
616
|
-
// it will still be enabled as it currently is. Then we can
|
|
617
|
-
// progressively opt out synthetic tenants.
|
|
618
|
-
return ((_this$props$editorPro8 = this.props.editorProps) === null || _this$props$editorPro8 === void 0 || (_this$props$editorPro8 = _this$props$editorPro8.performanceTracking) === null || _this$props$editorPro8 === void 0 || (_this$props$editorPro8 = _this$props$editorPro8.transactionTracking) === null || _this$props$editorPro8 === void 0 ? void 0 : _this$props$editorPro8.enabled) === false;
|
|
619
|
-
}
|
|
620
576
|
}, {
|
|
621
577
|
key: "UNSAFE_componentWillReceiveProps",
|
|
622
578
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
623
|
-
var _nextProps$editorProp, _this$props$
|
|
579
|
+
var _nextProps$editorProp, _this$props$editorPro4;
|
|
624
580
|
if (this.view && this.props.editorProps.disabled !== nextProps.editorProps.disabled) {
|
|
625
581
|
// Disables the contentEditable attribute of the editor if the editor is disabled
|
|
626
582
|
this.view.setProps({
|
|
@@ -650,10 +606,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
650
606
|
});
|
|
651
607
|
}
|
|
652
608
|
}
|
|
653
|
-
if (
|
|
654
|
-
this.pluginPerformanceObserver.disconnect();
|
|
655
|
-
}
|
|
656
|
-
if (nextProps.editorProps.assistiveLabel !== this.props.editorProps.assistiveLabel || ((_nextProps$editorProp = nextProps.editorProps) === null || _nextProps$editorProp === void 0 ? void 0 : _nextProps$editorProp.assistiveDescribedBy) !== ((_this$props$editorPro9 = this.props.editorProps) === null || _this$props$editorPro9 === void 0 ? void 0 : _this$props$editorPro9.assistiveDescribedBy)) {
|
|
609
|
+
if (nextProps.editorProps.assistiveLabel !== this.props.editorProps.assistiveLabel || ((_nextProps$editorProp = nextProps.editorProps) === null || _nextProps$editorProp === void 0 ? void 0 : _nextProps$editorProp.assistiveDescribedBy) !== ((_this$props$editorPro4 = this.props.editorProps) === null || _this$props$editorPro4 === void 0 ? void 0 : _this$props$editorPro4.assistiveDescribedBy)) {
|
|
657
610
|
var _nextProps$editorProp2;
|
|
658
611
|
this.editor = this.createEditor(nextProps.editorProps.assistiveLabel, (_nextProps$editorProp2 = nextProps.editorProps) === null || _nextProps$editorProp2 === void 0 ? void 0 : _nextProps$editorProp2.assistiveDescribedBy);
|
|
659
612
|
}
|
|
@@ -709,9 +662,6 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
709
662
|
// we do so here so that we can intercept and abort asynchronous
|
|
710
663
|
// ProseMirror transactions when a dismount is imminent.
|
|
711
664
|
this.canDispatchTransactions = true;
|
|
712
|
-
if (this.transactionTracking.enabled) {
|
|
713
|
-
this.pluginPerformanceObserver.observe();
|
|
714
|
-
}
|
|
715
665
|
}
|
|
716
666
|
|
|
717
667
|
/**
|
|
@@ -754,10 +704,9 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
754
704
|
}, {
|
|
755
705
|
key: "render",
|
|
756
706
|
value: function render() {
|
|
757
|
-
var _this$props$
|
|
758
|
-
var
|
|
759
|
-
var
|
|
760
|
-
var useShallow = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.useShallow;
|
|
707
|
+
var _this$props$render, _this$props$render2, _this$props;
|
|
708
|
+
var renderTrackingEnabled = true;
|
|
709
|
+
var useShallow = true;
|
|
761
710
|
return /*#__PURE__*/React.createElement(ReactEditorViewContext.Provider, {
|
|
762
711
|
value: {
|
|
763
712
|
editorRef: this.editorRef,
|
|
@@ -22,9 +22,8 @@ export function getScrollGutterOptions(props) {
|
|
|
22
22
|
export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEvent
|
|
23
23
|
// Omit placeholder since it's an existing prop in `DefaultPresetPluginOptions` and will get overidden there
|
|
24
24
|
) {
|
|
25
|
-
var _props$
|
|
25
|
+
var _props$linking, _props$textFormatting, _props$linking2;
|
|
26
26
|
var appearance = props.appearance;
|
|
27
|
-
var inputTracking = (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : _props$performanceTra.inputTracking;
|
|
28
27
|
var cardOptions = ((_props$linking = props.linking) === null || _props$linking === void 0 ? void 0 : _props$linking.smartLinks) || props.smartLinks || props.UNSAFE_cards;
|
|
29
28
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
30
29
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
@@ -39,8 +38,6 @@ export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEve
|
|
|
39
38
|
base: {
|
|
40
39
|
allowInlineCursorTarget: true,
|
|
41
40
|
allowScrollGutter: getScrollGutterOptions(props),
|
|
42
|
-
inputTracking: inputTracking,
|
|
43
|
-
browserFreezeTracking: (_props$performanceTra2 = props.performanceTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.bFreezeTracking,
|
|
44
41
|
ufo: createFeatureFlagsFromProps(props).ufo
|
|
45
42
|
},
|
|
46
43
|
blockType: {
|
|
@@ -25,10 +25,10 @@ function getSpellCheck(featureFlags) {
|
|
|
25
25
|
* which is used by both current and archv3 editors.
|
|
26
26
|
*/
|
|
27
27
|
export function createFeatureFlagsFromProps(props) {
|
|
28
|
-
var _props$
|
|
28
|
+
var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$collabEdit, _props$collabEdit2;
|
|
29
29
|
var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
|
|
30
30
|
return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
|
|
31
|
-
catchAllTracking:
|
|
31
|
+
catchAllTracking: false,
|
|
32
32
|
showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.showAvatarGroupAsPlugin) : false),
|
|
33
33
|
errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.useErrorBoundaryDocStructure) : false),
|
|
34
34
|
synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags5 = props.featureFlags) === null || _props$featureFlags5 === void 0 ? void 0 : _props$featureFlags5.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags6 = props.featureFlags) !== null && _props$featureFlags6 !== void 0 && _props$featureFlags6.synchronyErrorDocStructure) : false),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "198.6.
|
|
2
|
+
export var version = "198.6.11";
|
|
@@ -18,7 +18,6 @@ import { EventDispatcher } from '../event-dispatcher';
|
|
|
18
18
|
import type { Dispatch } from '../event-dispatcher';
|
|
19
19
|
import type { EditorAppearance, EditorConfig, EditorPlugin, EditorProps } from '../types';
|
|
20
20
|
import type { EditorNextProps } from '../types/editor-props';
|
|
21
|
-
import { TransactionTracker } from '../utils/performance/track-transactions';
|
|
22
21
|
export interface EditorViewProps {
|
|
23
22
|
editorProps: (EditorProps | EditorNextProps) & {
|
|
24
23
|
preset?: EditorNextProps['preset'];
|
|
@@ -69,7 +68,6 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
69
68
|
errorReporter: ErrorReporter;
|
|
70
69
|
dispatch: Dispatch;
|
|
71
70
|
proseMirrorRenderedSeverity?: SEVERITY;
|
|
72
|
-
transactionTracker: TransactionTracker;
|
|
73
71
|
experienceStore?: ExperienceStore;
|
|
74
72
|
editorRef: React.RefObject<HTMLDivElement>;
|
|
75
73
|
private canDispatchTransactions;
|
|
@@ -79,10 +77,11 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
79
77
|
private featureFlags;
|
|
80
78
|
private pluginInjectionAPI;
|
|
81
79
|
private onPluginObservation;
|
|
82
|
-
get transactionTracking():
|
|
80
|
+
get transactionTracking(): {
|
|
81
|
+
enabled: boolean;
|
|
82
|
+
};
|
|
83
83
|
private getPluginNames;
|
|
84
84
|
private countNodes;
|
|
85
|
-
private isTransactionTrackingExplicitlyDisabled;
|
|
86
85
|
constructor(props: EditorViewProps & WrappedComponentProps & T);
|
|
87
86
|
getEditorState: () => EditorState | undefined;
|
|
88
87
|
getEditorView: () => EditorView | undefined;
|
|
@@ -802,6 +802,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
802
802
|
mark: import("prosemirror-model").Mark;
|
|
803
803
|
}) => boolean;
|
|
804
804
|
isRemoteReplaceDocumentTransaction: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
805
|
+
getCurrentCollabState: () => {
|
|
806
|
+
version: number | undefined;
|
|
807
|
+
sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
|
|
808
|
+
content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
|
|
809
|
+
};
|
|
810
|
+
validatePMJSONDocument: (doc: any) => boolean;
|
|
805
811
|
};
|
|
806
812
|
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
807
813
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -952,6 +958,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
952
958
|
mark: import("prosemirror-model").Mark;
|
|
953
959
|
}) => boolean;
|
|
954
960
|
isRemoteReplaceDocumentTransaction: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
961
|
+
getCurrentCollabState: () => {
|
|
962
|
+
version: number | undefined;
|
|
963
|
+
sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
|
|
964
|
+
content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
|
|
965
|
+
};
|
|
966
|
+
validatePMJSONDocument: (doc: any) => boolean;
|
|
955
967
|
};
|
|
956
968
|
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
957
969
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -1157,6 +1169,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
1157
1169
|
mark: import("prosemirror-model").Mark;
|
|
1158
1170
|
}) => boolean;
|
|
1159
1171
|
isRemoteReplaceDocumentTransaction: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
1172
|
+
getCurrentCollabState: () => {
|
|
1173
|
+
version: number | undefined;
|
|
1174
|
+
sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
|
|
1175
|
+
content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
|
|
1176
|
+
};
|
|
1177
|
+
validatePMJSONDocument: (doc: any) => boolean;
|
|
1160
1178
|
};
|
|
1161
1179
|
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
|
|
1162
1180
|
sharedState: import("@atlaskit/editor-plugin-primary-toolbar").PrimaryToolbarPluginState | undefined;
|
|
@@ -1921,6 +1939,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
1921
1939
|
mark: import("prosemirror-model").Mark;
|
|
1922
1940
|
}) => boolean;
|
|
1923
1941
|
isRemoteReplaceDocumentTransaction: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
1942
|
+
getCurrentCollabState: () => {
|
|
1943
|
+
version: number | undefined;
|
|
1944
|
+
sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
|
|
1945
|
+
content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
|
|
1946
|
+
};
|
|
1947
|
+
validatePMJSONDocument: (doc: any) => boolean;
|
|
1924
1948
|
};
|
|
1925
1949
|
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
1926
1950
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -2144,6 +2168,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
2144
2168
|
mark: import("prosemirror-model").Mark;
|
|
2145
2169
|
}) => boolean;
|
|
2146
2170
|
isRemoteReplaceDocumentTransaction: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
2171
|
+
getCurrentCollabState: () => {
|
|
2172
|
+
version: number | undefined;
|
|
2173
|
+
sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
|
|
2174
|
+
content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
|
|
2175
|
+
};
|
|
2176
|
+
validatePMJSONDocument: (doc: any) => boolean;
|
|
2147
2177
|
};
|
|
2148
2178
|
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"media", {
|
|
2149
2179
|
pluginConfiguration: import("@atlaskit/editor-plugins/media/types").MediaOptions | undefined;
|
|
@@ -2546,6 +2576,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
2546
2576
|
mark: import("prosemirror-model").Mark;
|
|
2547
2577
|
}) => boolean;
|
|
2548
2578
|
isRemoteReplaceDocumentTransaction: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
2579
|
+
getCurrentCollabState: () => {
|
|
2580
|
+
version: number | undefined;
|
|
2581
|
+
sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
|
|
2582
|
+
content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
|
|
2583
|
+
};
|
|
2584
|
+
validatePMJSONDocument: (doc: any) => boolean;
|
|
2549
2585
|
};
|
|
2550
2586
|
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
2551
2587
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -3433,6 +3469,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
3433
3469
|
mark: import("prosemirror-model").Mark;
|
|
3434
3470
|
}) => boolean;
|
|
3435
3471
|
isRemoteReplaceDocumentTransaction: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
3472
|
+
getCurrentCollabState: () => {
|
|
3473
|
+
version: number | undefined;
|
|
3474
|
+
sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
|
|
3475
|
+
content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
|
|
3476
|
+
};
|
|
3477
|
+
validatePMJSONDocument: (doc: any) => boolean;
|
|
3436
3478
|
};
|
|
3437
3479
|
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
3438
3480
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -3883,6 +3925,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
3883
3925
|
mark: import("prosemirror-model").Mark;
|
|
3884
3926
|
}) => boolean;
|
|
3885
3927
|
isRemoteReplaceDocumentTransaction: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
3928
|
+
getCurrentCollabState: () => {
|
|
3929
|
+
version: number | undefined;
|
|
3930
|
+
sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
|
|
3931
|
+
content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
|
|
3932
|
+
};
|
|
3933
|
+
validatePMJSONDocument: (doc: any) => boolean;
|
|
3886
3934
|
};
|
|
3887
3935
|
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
3888
3936
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -3982,6 +4030,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
3982
4030
|
mark: import("prosemirror-model").Mark;
|
|
3983
4031
|
}) => boolean;
|
|
3984
4032
|
isRemoteReplaceDocumentTransaction: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
4033
|
+
getCurrentCollabState: () => {
|
|
4034
|
+
version: number | undefined;
|
|
4035
|
+
sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
|
|
4036
|
+
content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
|
|
4037
|
+
};
|
|
4038
|
+
validatePMJSONDocument: (doc: any) => boolean;
|
|
3985
4039
|
};
|
|
3986
4040
|
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
3987
4041
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -4975,6 +5029,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
4975
5029
|
mark: import("prosemirror-model").Mark;
|
|
4976
5030
|
}) => boolean;
|
|
4977
5031
|
isRemoteReplaceDocumentTransaction: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
5032
|
+
getCurrentCollabState: () => {
|
|
5033
|
+
version: number | undefined;
|
|
5034
|
+
sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
|
|
5035
|
+
content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
|
|
5036
|
+
};
|
|
5037
|
+
validatePMJSONDocument: (doc: any) => boolean;
|
|
4978
5038
|
};
|
|
4979
5039
|
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
4980
5040
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -6498,6 +6558,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
6498
6558
|
mark: import("prosemirror-model").Mark;
|
|
6499
6559
|
}) => boolean;
|
|
6500
6560
|
isRemoteReplaceDocumentTransaction: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
6561
|
+
getCurrentCollabState: () => {
|
|
6562
|
+
version: number | undefined;
|
|
6563
|
+
sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
|
|
6564
|
+
content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
|
|
6565
|
+
};
|
|
6566
|
+
validatePMJSONDocument: (doc: any) => boolean;
|
|
6501
6567
|
};
|
|
6502
6568
|
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
6503
6569
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -6648,6 +6714,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
6648
6714
|
mark: import("prosemirror-model").Mark;
|
|
6649
6715
|
}) => boolean;
|
|
6650
6716
|
isRemoteReplaceDocumentTransaction: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
6717
|
+
getCurrentCollabState: () => {
|
|
6718
|
+
version: number | undefined;
|
|
6719
|
+
sendableSteps: import("@atlaskit/editor-plugin-collab-edit").CollabSendableSteps | null | undefined;
|
|
6720
|
+
content: import("@atlaskit/editor-json-transformer").JSONNode | undefined;
|
|
6721
|
+
};
|
|
6722
|
+
validatePMJSONDocument: (doc: any) => boolean;
|
|
6651
6723
|
};
|
|
6652
6724
|
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
6653
6725
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type EditorNextProps } from '../types/editor-props';
|
|
3
|
-
export type ChromelessEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'assistiveLabel' | 'disabled' | 'shouldFocus' | '
|
|
3
|
+
export type ChromelessEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'assistiveLabel' | 'disabled' | 'shouldFocus' | 'quickInsert' | 'performanceTracking' | 'secondaryToolbarComponents' | 'featureFlags' | 'onChange' | 'onDestroy' | 'onEditorReady' | 'onSave' | 'onCancel' | 'mentionProvider' | 'contextIdentifierProvider' | 'searchProvider' | 'extensionProviders'>;
|
|
4
4
|
/**
|
|
5
5
|
* Editor component based on `ComposableEditor` which sets the `appearance` to "chromeless".
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type EditorNextProps } from '../types/editor-props';
|
|
3
|
-
export type CommentEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'assistiveLabel' | 'disabled' | 'shouldFocus' | '
|
|
3
|
+
export type CommentEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'assistiveLabel' | 'disabled' | 'shouldFocus' | 'quickInsert' | 'performanceTracking' | 'secondaryToolbarComponents' | 'featureFlags' | 'onChange' | 'onDestroy' | 'onEditorReady' | 'onSave' | 'onCancel' | 'mentionProvider' | 'contextIdentifierProvider' | 'searchProvider' | 'extensionProviders'>;
|
|
4
4
|
/**
|
|
5
5
|
* Editor component based on `ComposableEditor` which sets the `appearance` to "comment".
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type EditorNextProps } from '../types/editor-props';
|
|
3
|
-
export type FullPageEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'disabled' | 'mentionProvider' | 'contextIdentifierProvider' | 'searchProvider' | 'annotationProviders' | 'collabEditProvider' | 'collabEdit' | 'taskDecisionProvider' | 'extensionProviders' | 'shouldFocus' | '
|
|
3
|
+
export type FullPageEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'disabled' | 'mentionProvider' | 'performanceTracking' | 'contextIdentifierProvider' | 'searchProvider' | 'annotationProviders' | 'collabEditProvider' | 'collabEdit' | 'taskDecisionProvider' | 'extensionProviders' | 'shouldFocus' | 'quickInsert' | 'secondaryToolbarComponents' | 'featureFlags' | 'primaryToolbarComponents' | 'contextPanel' | 'contentComponents' | 'primaryToolbarIconBefore' | 'sanitizePrivateContent'> & {
|
|
4
4
|
onChange?: () => void;
|
|
5
5
|
onEditorReady?: () => void;
|
|
6
6
|
appearance: 'full-page' | 'full-width';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type EditorNextProps } from '../types/editor-props';
|
|
3
|
-
export type FullWidthEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'disabled' | 'mentionProvider' | 'contextIdentifierProvider' | 'searchProvider' | 'annotationProviders' | 'collabEditProvider' | 'collabEdit' | 'taskDecisionProvider' | 'extensionProviders' | 'shouldFocus' | '
|
|
3
|
+
export type FullWidthEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'disabled' | 'mentionProvider' | 'performanceTracking' | 'contextIdentifierProvider' | 'searchProvider' | 'annotationProviders' | 'collabEditProvider' | 'collabEdit' | 'taskDecisionProvider' | 'extensionProviders' | 'shouldFocus' | 'quickInsert' | 'secondaryToolbarComponents' | 'featureFlags' | 'primaryToolbarComponents' | 'contextPanel' | 'contentComponents' | 'primaryToolbarIconBefore' | 'sanitizePrivateContent'> & {
|
|
4
4
|
onChange?: () => void;
|
|
5
5
|
onEditorReady?: () => void;
|
|
6
6
|
};
|