@atlaskit/editor-plugin-synced-block 9.1.19 → 9.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/package.json +2 -2
  3. package/synced-block-plugin/package.json +1 -8
  4. package/synced-block-plugin-type/package.json +1 -8
  5. package/dist/types-ts4.5/editor-actions/index.d.ts +0 -4
  6. package/dist/types-ts4.5/editor-commands/index.d.ts +0 -23
  7. package/dist/types-ts4.5/editor-commands/utils.d.ts +0 -2
  8. package/dist/types-ts4.5/entry-points/synced-block-plugin-type.d.ts +0 -1
  9. package/dist/types-ts4.5/entry-points/synced-block-plugin.d.ts +0 -1
  10. package/dist/types-ts4.5/index.d.ts +0 -2
  11. package/dist/types-ts4.5/nodeviews/bodiedSyncedBlock.d.ts +0 -48
  12. package/dist/types-ts4.5/nodeviews/lazySyncedBlock.d.ts +0 -3
  13. package/dist/types-ts4.5/nodeviews/syncedBlock.d.ts +0 -73
  14. package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -46
  15. package/dist/types-ts4.5/pm-plugins/menu-and-toolbar-experiences.d.ts +0 -12
  16. package/dist/types-ts4.5/pm-plugins/utils/handle-bodied-sync-block-creation.d.ts +0 -9
  17. package/dist/types-ts4.5/pm-plugins/utils/handle-bodied-sync-block-removal.d.ts +0 -9
  18. package/dist/types-ts4.5/pm-plugins/utils/has-synced-blocks.d.ts +0 -12
  19. package/dist/types-ts4.5/pm-plugins/utils/ignore-dom-event.d.ts +0 -8
  20. package/dist/types-ts4.5/pm-plugins/utils/rebase-transaction.d.ts +0 -2
  21. package/dist/types-ts4.5/pm-plugins/utils/selection-decorations.d.ts +0 -4
  22. package/dist/types-ts4.5/pm-plugins/utils/track-sync-blocks.d.ts +0 -19
  23. package/dist/types-ts4.5/pm-plugins/utils/transaction-inserts-synced-block.d.ts +0 -7
  24. package/dist/types-ts4.5/pm-plugins/utils/utils.d.ts +0 -33
  25. package/dist/types-ts4.5/syncedBlockPlugin.d.ts +0 -2
  26. package/dist/types-ts4.5/syncedBlockPluginType.d.ts +0 -106
  27. package/dist/types-ts4.5/types/index.d.ts +0 -94
  28. package/dist/types-ts4.5/ui/BodiedSyncBlockWrapper.d.ts +0 -9
  29. package/dist/types-ts4.5/ui/CreateSyncedBlockButton.d.ts +0 -8
  30. package/dist/types-ts4.5/ui/CreateSyncedBlockDropdownItem.d.ts +0 -7
  31. package/dist/types-ts4.5/ui/DeleteConfirmationModal.d.ts +0 -8
  32. package/dist/types-ts4.5/ui/Flag.d.ts +0 -8
  33. package/dist/types-ts4.5/ui/SyncBlockLabel.d.ts +0 -10
  34. package/dist/types-ts4.5/ui/SyncBlockRefresher.d.ts +0 -7
  35. package/dist/types-ts4.5/ui/SyncBlockRendererWrapper.d.ts +0 -15
  36. package/dist/types-ts4.5/ui/SyncBlockSSRReactContextsProvider.d.ts +0 -19
  37. package/dist/types-ts4.5/ui/SyncedLocationDropdown.d.ts +0 -16
  38. package/dist/types-ts4.5/ui/block-menu-components.d.ts +0 -4
  39. package/dist/types-ts4.5/ui/floating-toolbar.d.ts +0 -6
  40. package/dist/types-ts4.5/ui/quick-insert.d.ts +0 -12
  41. package/dist/types-ts4.5/ui/toolbar-components.d.ts +0 -4
  42. package/dist/types-ts4.5/ui/utils/time.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-plugin-synced-block
2
2
 
3
+ ## 9.1.20
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 9.1.19
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-synced-block",
3
- "version": "9.1.19",
3
+ "version": "9.1.20",
4
4
  "description": "SyncedBlock plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -54,7 +54,7 @@
54
54
  "@atlaskit/platform-feature-flags": "^1.1.0",
55
55
  "@atlaskit/primitives": "^19.0.0",
56
56
  "@atlaskit/spinner": "19.1.2",
57
- "@atlaskit/tmp-editor-statsig": "^102.0.0",
57
+ "@atlaskit/tmp-editor-statsig": "^103.0.0",
58
58
  "@atlaskit/tokens": "13.4.0",
59
59
  "@atlaskit/tooltip": "^22.6.0",
60
60
  "@atlaskit/visually-hidden": "^3.1.0",
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/entry-points/synced-block-plugin.js",
5
5
  "module:es2019": "../dist/es2019/entry-points/synced-block-plugin.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/entry-points/synced-block-plugin.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/entry-points/synced-block-plugin.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/entry-points/synced-block-plugin.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/entry-points/synced-block-plugin-type.js",
5
5
  "module:es2019": "../dist/es2019/entry-points/synced-block-plugin-type.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/entry-points/synced-block-plugin-type.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/entry-points/synced-block-plugin-type.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/entry-points/synced-block-plugin-type.d.ts"
15
8
  }
@@ -1,4 +0,0 @@
1
- import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
2
- export declare const flushBodiedSyncBlocks: (syncBlockStore: SyncBlockStoreManager) => Promise<boolean>;
3
- export declare const flushSyncBlocks: (syncBlockStore: SyncBlockStoreManager) => Promise<boolean>;
4
- export declare const discardUnpublishedSyncBlocks: (syncBlockStore: SyncBlockStoreManager) => Promise<boolean>;
@@ -1,23 +0,0 @@
1
- import { type INPUT_METHOD, type DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
- import type { Command, EditorCommand, ExtractInjectionAPI, TypeAheadInsert } from '@atlaskit/editor-common/types';
3
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
6
- import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
7
- type createSyncedBlockProps = {
8
- fireAnalyticsEvent?: DispatchAnalyticsEvent;
9
- syncBlockStore: SyncBlockStoreManager;
10
- tr: Transaction;
11
- typeAheadInsert?: TypeAheadInsert;
12
- };
13
- export declare const createSyncedBlock: ({ tr, syncBlockStore, typeAheadInsert, fireAnalyticsEvent, }: createSyncedBlockProps) => false | Transaction;
14
- export declare const copySyncedBlockReferenceToClipboardEditorCommand: (syncBlockStore: SyncBlockStoreManager, inputMethod: INPUT_METHOD, api?: ExtractInjectionAPI<SyncedBlockPlugin>) => EditorCommand;
15
- export declare const copySyncedBlockReferenceToClipboard: (syncBlockStore: SyncBlockStoreManager, inputMethod: INPUT_METHOD, api?: ExtractInjectionAPI<SyncedBlockPlugin>) => Command;
16
- export declare const editSyncedBlockSource: (syncBlockStore: SyncBlockStoreManager, api?: ExtractInjectionAPI<SyncedBlockPlugin>) => Command;
17
- export declare const removeSyncedBlock: (api?: ExtractInjectionAPI<SyncedBlockPlugin>) => Command;
18
- export declare const removeSyncedBlockAtPos: (api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, pos: number) => void;
19
- /**
20
- * Deletes (bodied)SyncBlock node and paste its content to the editor
21
- */
22
- export declare const unsync: (storeManager: SyncBlockStoreManager, isBodiedSyncBlock: boolean, view?: EditorView) => boolean;
23
- export {};
@@ -1,2 +0,0 @@
1
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
- export declare const pasteSyncBlockHTMLContent: (contentDOM: HTMLElement | DocumentFragment, view: EditorView) => boolean;
@@ -1 +0,0 @@
1
- export type { SyncedBlockPlugin, SyncedBlockPluginOptions, SyncedBlockEditorProps, SyncedBlockRendererProps, } from '../syncedBlockPluginType';
@@ -1 +0,0 @@
1
- export { syncedBlockPlugin } from '../syncedBlockPlugin';
@@ -1,2 +0,0 @@
1
- export { syncedBlockPlugin } from './syncedBlockPlugin';
2
- export type { SyncedBlockPlugin, SyncedBlockPluginOptions, SyncedBlockEditorProps, SyncedBlockRendererProps, } from './syncedBlockPluginType';
@@ -1,48 +0,0 @@
1
- import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
2
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
3
- import ReactNodeView, { type ReactComponentProps, type getPosHandler } from '@atlaskit/editor-common/react-node-view';
4
- import type { ExtractInjectionAPI, getPosHandlerNode, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
5
- import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
6
- import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
7
- import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
8
- import type { SyncedBlockPlugin, SyncedBlockPluginOptions } from '../syncedBlockPluginType';
9
- export interface BodiedSyncBlockNodeViewProps extends ReactComponentProps {
10
- api?: ExtractInjectionAPI<SyncedBlockPlugin>;
11
- eventDispatcher: EventDispatcher;
12
- getPos: getPosHandler;
13
- node: PMNode;
14
- pluginOptions: SyncedBlockPluginOptions | undefined;
15
- portalProviderAPI: PortalProviderAPI;
16
- syncBlockStore?: SyncBlockStoreManager;
17
- view: EditorView;
18
- }
19
- export interface BodiedSyncBlockNodeViewProperties {
20
- api?: ExtractInjectionAPI<SyncedBlockPlugin>;
21
- pluginOptions: SyncedBlockPluginOptions | undefined;
22
- pmPluginFactoryParams: PMPluginFactoryParams;
23
- syncBlockStore?: SyncBlockStoreManager;
24
- }
25
- export declare const bodiedSyncBlockNodeViewOld: (props: BodiedSyncBlockNodeViewProperties) => (node: PMNode, view: EditorView, getPos: getPosHandler) => ReactNodeView<BodiedSyncBlockNodeViewProps>;
26
- export declare class BodiedSyncBlock implements NodeView {
27
- dom: HTMLElement;
28
- contentDOM: HTMLElement;
29
- node: PMNode;
30
- view: EditorView;
31
- getPos: getPosHandlerNode;
32
- nodeViewPortalProviderAPI: PortalProviderAPI;
33
- private api?;
34
- private cleanupConnectivityModeListener?;
35
- private cleanupViewModeListener?;
36
- private labelKey;
37
- constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI);
38
- private updateContentEditable;
39
- private handleConnectivityModeChange;
40
- private handleViewModeChange;
41
- update(node: PMNode): boolean;
42
- ignoreMutation(mutation: MutationRecord | {
43
- target: Node;
44
- type: 'selection';
45
- }): boolean;
46
- destroy(): void;
47
- }
48
- export declare const bodiedSyncBlockNodeView: (props: BodiedSyncBlockNodeViewProperties) => ((node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView);
@@ -1,3 +0,0 @@
1
- import type { NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
2
- import type { SyncBlockNodeViewProperties } from './syncedBlock';
3
- export declare const lazySyncBlockView: (props: SyncBlockNodeViewProperties) => NodeViewConstructor;
@@ -1,73 +0,0 @@
1
- import React from 'react';
2
- import type { IntlShape } from 'react-intl';
3
- import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
5
- import ReactNodeView from '@atlaskit/editor-common/react-node-view';
6
- import type { getPosHandler } from '@atlaskit/editor-common/react-node-view';
7
- import type { ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
8
- import type { ExtractInjectionAPI, getPosHandlerNode, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
9
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
10
- import type { EditorView, Decoration, DecorationSource } from '@atlaskit/editor-prosemirror/view';
11
- import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
12
- import type { SyncedBlockPlugin, SyncedBlockPluginOptions } from '../syncedBlockPluginType';
13
- export interface SyncBlockNodeViewProps extends ReactComponentProps {
14
- api?: ExtractInjectionAPI<SyncedBlockPlugin>;
15
- eventDispatcher: EventDispatcher;
16
- getPos: getPosHandlerNode;
17
- intl?: IntlShape;
18
- isNodeNested?: boolean;
19
- node: PMNode;
20
- options: SyncedBlockPluginOptions | undefined;
21
- portalProviderAPI: PortalProviderAPI;
22
- syncBlockStore?: SyncBlockStoreManager;
23
- view: EditorView;
24
- }
25
- export declare class SyncBlock extends ReactNodeView<SyncBlockNodeViewProps> {
26
- private options;
27
- private api?;
28
- private syncBlockStore?;
29
- private intl?;
30
- constructor(props: SyncBlockNodeViewProps);
31
- private removeSyncBlockStable;
32
- private fetchSyncBlockSourceInfoStable;
33
- unsubscribe: (() => void) | undefined;
34
- private dragStartHandler;
35
- createDomRef(): HTMLElement;
36
- /**
37
- * Allow mouse and selection events inside the renderer content to pass
38
- * through to the browser so that users can select and copy text within a
39
- * reference sync block.
40
- *
41
- * Events that originate inside the sync block content area (but not the label)
42
- * are stopped so ProseMirror does not intercept them for node-level selection.
43
- * This includes the full click-drag cycle (mousedown, mousemove, mouseup),
44
- * click, dblclick, selectstart and cut. The `cut` event is stopped because
45
- * mousedown explicitly sets a NodeSelection on the sync block — without
46
- * stopping `cut`, a subsequent Ctrl+X would cause ProseMirror to delete the
47
- * entire sync block node instead of cutting the user's text selection.
48
- *
49
- * Copy events are conditionally stopped: when the user has an active native
50
- * text selection inside the renderer, `copy` is stopped so the browser handles
51
- * it natively (copying the selected text). When there is no text selection
52
- * (just a PM NodeSelection), `copy` is NOT stopped so ProseMirror's copy
53
- * handler runs and sets the "sync-block-copied" flag for the reference paste flow.
54
- *
55
- * Events on the SyncBlockLabel are left for ProseMirror to handle, preserving
56
- * label click interactions and the floating toolbar.
57
- *
58
- * The renderer wrapper sets contentEditable="true" to create a re-editable
59
- * island inside ProseMirror's contentEditable="false" nodeview, enabling
60
- * native text selection and preventing browser drag behaviour.
61
- */
62
- stopEvent(event: Event): boolean;
63
- validUpdate(currentNode: PMNode, newNode: PMNode): boolean;
64
- update(node: PMNode, decorations: ReadonlyArray<Decoration>, innerDecorations?: DecorationSource): boolean;
65
- render({ getPos }: SyncBlockNodeViewProps): React.JSX.Element | null;
66
- destroy(): void;
67
- }
68
- export interface SyncBlockNodeViewProperties {
69
- api?: ExtractInjectionAPI<SyncedBlockPlugin>;
70
- options: SyncedBlockPluginOptions | undefined;
71
- pmPluginFactoryParams: PMPluginFactoryParams;
72
- }
73
- export declare const syncBlockNodeView: (props: SyncBlockNodeViewProperties) => (node: PMNode, view: EditorView, getPos: getPosHandler) => ReactNodeView<SyncBlockNodeViewProps>;
@@ -1,46 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
3
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
- import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
5
- import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
6
- import type { SyncedBlockPlugin, SyncedBlockPluginOptions } from '../syncedBlockPluginType';
7
- import type { ActiveFlag, BodiedSyncBlockDeletionStatus, RetryCreationPosMap } from '../types';
8
- export declare const syncedBlockPluginKey: PluginKey;
9
- type SyncedBlockPluginState = {
10
- activeFlag: ActiveFlag;
11
- bodiedSyncBlockDeletionStatus?: BodiedSyncBlockDeletionStatus;
12
- /**
13
- * When `editor_synced_block_perf` is ON, this flag tracks whether the
14
- * document currently contains any synced block (source or reference). When
15
- * `false`, downstream work in `appendTransaction`, `decorations`, and the
16
- * `contentComponent` short-circuits to avoid the per-transition feature tax
17
- * on the ~99.97% of pages that have no synced blocks (see EDITOR-6586).
18
- *
19
- * When the gate is OFF this is always `true` so existing behavior is
20
- * preserved.
21
- */
22
- hasSyncedBlocks: boolean;
23
- hasUnsavedBodiedSyncBlockChanges?: boolean;
24
- /**
25
- * Cached previous values for shared-state signals. Used inside `apply()` to
26
- * detect when a status change requires a full rebuild of `statusDecorationSet`
27
- * instead of a cheap `map()` call. Only meaningful when
28
- * `editor_synced_block_perf` is ON.
29
- */
30
- prevIsDragging: boolean;
31
- prevIsOffline: boolean;
32
- prevIsViewMode: boolean;
33
- retryCreationPosMap: RetryCreationPosMap;
34
- selectionDecorationSet: DecorationSet;
35
- /**
36
- * Cached decoration set for sync-block status decorations (offline overlay,
37
- * view-mode class, creation-loading spinner, drag border). When the perf
38
- * gate is ON this is computed in `apply()` and mapped through edits so the
39
- * `decorations` prop becomes an O(1) lookup instead of a full
40
- * `doc.descendants()` walk every transaction (see EDITOR-6930).
41
- */
42
- statusDecorationSet: DecorationSet;
43
- syncBlockStore: SyncBlockStoreManager;
44
- };
45
- export declare const createPlugin: (options: SyncedBlockPluginOptions | undefined, pmPluginFactoryParams: PMPluginFactoryParams, syncBlockStore: SyncBlockStoreManager, api?: ExtractInjectionAPI<SyncedBlockPlugin>) => SafePlugin<SyncedBlockPluginState>;
46
- export {};
@@ -1,12 +0,0 @@
1
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
- type ExperienceOptions = {
4
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
5
- refs: {
6
- containerElement?: HTMLElement;
7
- popupsMountPoint?: HTMLElement;
8
- wrapperElement?: HTMLElement;
9
- };
10
- };
11
- export declare const getMenuAndToolbarExperiencesPlugin: ({ refs, dispatchAnalyticsEvent, }: ExperienceOptions) => SafePlugin;
12
- export {};
@@ -1,9 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
- import type { SyncedBlockPlugin } from '../../syncedBlockPluginType';
4
- import type { SyncBlockInfo } from '../../types';
5
- /**
6
- *
7
- * Save the new bodiedSyncBlock to backend with empty content and handles revert (if failed) and retry flow
8
- */
9
- export declare const handleBodiedSyncBlockCreation: (bodiedSyncBlockAdded: SyncBlockInfo[], editorState: EditorState, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined) => void;
@@ -1,9 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
- import type { DeletionReason, SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
4
- import type { SyncedBlockPlugin } from '../../syncedBlockPluginType';
5
- import type { SyncBlockInfo } from '../../types';
6
- export type TransactionRef = {
7
- current: Transaction | undefined;
8
- };
9
- export declare const handleBodiedSyncBlockRemoval: (bodiedSyncBlockRemoved: SyncBlockInfo[], syncBlockStore: SyncBlockStoreManager, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, confirmationTransactionRef: TransactionRef, deletionReason: DeletionReason) => boolean;
@@ -1,12 +0,0 @@
1
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- /**
3
- * Cheap detector for the presence of any synced block (source or reference)
4
- * at the top level of the document.
5
- *
6
- * Both `syncBlock` and `bodiedSyncBlock` are top-level nodes in the schema, so
7
- * a single shallow scan is sufficient — no need for a recursive `descendants`
8
- * walk. This is used by the `editor_synced_block_perf` experiment to avoid
9
- * spinning up the synced block subsystem on documents that don't contain any
10
- * synced blocks (which is ~99.97% of pages, see EDITOR-6586).
11
- */
12
- export declare const hasSyncedBlocks: (doc: PMNode) => boolean;
@@ -1,8 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { SyncedBlockPlugin } from '../../syncedBlockPluginType';
4
- /**
5
- *
6
- * @returns true if should ignore event happens within bodiedSyncBlock node when offline
7
- */
8
- export declare const shouldIgnoreDomEvent: (view: EditorView, event: MouseEvent | PointerEvent, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined) => boolean | undefined;
@@ -1,2 +0,0 @@
1
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export declare const rebaseTransaction: (currentTr: Transaction, incomingTr: Transaction, state: EditorState) => Transaction;
@@ -1,4 +0,0 @@
1
- import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
2
- import type { Selection } from '@atlaskit/editor-prosemirror/state';
3
- import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
4
- export declare const calculateDecorations: (doc: PMNode, selection: Selection, schema: Schema) => DecorationSet;
@@ -1,19 +0,0 @@
1
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
- import type { SyncBlockInfo } from '../../types';
4
- /**
5
- * Tracks changes to sync blocks in a transaction.
6
- * @param predicate - A function that returns true if a node is a sync block (source or reference or both).
7
- * @param tr - The transaction to track changes in.
8
- * @param state - The editor state.
9
- * @returns An object containing the removed and added sync blocks.
10
- */
11
- export declare const trackSyncBlocks: (predicate: (node: PMNode) => boolean, tr: Transaction, state: EditorState) => {
12
- added: SyncBlockInfo[];
13
- removed: SyncBlockInfo[];
14
- };
15
- /**
16
- *
17
- * @returns true if steps modifies children node within bodiedSyncBlock
18
- */
19
- export declare const hasEditInSyncBlock: (tr: Transaction, state: EditorState) => boolean;
@@ -1,7 +0,0 @@
1
- import type { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- /**
3
- * Cheap step-level scan to detect whether the given transaction inserts a
4
- * synced block (source or reference). Used by the lazy-init path to know when
5
- * a previously "no synced blocks" document has gained one.
6
- */
7
- export declare const transactionInsertsSyncedBlock: (tr: ReadonlyTransaction | Transaction) => boolean;
@@ -1,33 +0,0 @@
1
- import { Fragment } from '@atlaskit/editor-prosemirror/model';
2
- import type { NodeType, Node as PMNode, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
3
- import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
4
- import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
5
- /**
6
- * Defers a callback to the next microtask (when gated) or next macrotask via setTimeout(0).
7
- * Used to avoid re-entrant ProseMirror dispatch cycles.
8
- */
9
- export declare const deferDispatch: (fn: () => void) => void;
10
- export declare const findSyncBlock: (schema: Schema, selection: Selection) => ContentNodeWithPos | undefined;
11
- export declare const findBodiedSyncBlock: (schema: Schema, selection: Selection) => ContentNodeWithPos | undefined;
12
- export declare const findSyncBlockOrBodiedSyncBlock: (schema: Schema, selection: Selection) => ContentNodeWithPos | undefined;
13
- export declare const isBodiedSyncBlockNode: (node: PMNode, bodiedSyncBlock: NodeType) => boolean;
14
- export interface SyncBlockConversionInfo {
15
- contentToInclude: Fragment;
16
- from: number;
17
- to: number;
18
- }
19
- /**
20
- * Checks whether the selection can be converted to sync block
21
- *
22
- * @param selection - the current editor selection to validate for sync block conversion
23
- * @returns A fragment containing the content to include in the synced block,
24
- * stripping out unsupported marks (breakout on codeblock/expand/layout), as well as from and to positions,
25
- * or false if conversion is not possible
26
- */
27
- export declare const canBeConvertedToSyncBlock: (selection: Selection) => SyncBlockConversionInfo | false;
28
- export declare const sliceFullyContainsNode: (slice: Slice, node: PMNode) => boolean;
29
- /**
30
- * Returns the resourceId of the bodied sync block where an inline extension was inserted, or undefined.
31
- * Used to show a warning flag only on the first instance per sync block.
32
- */
33
- export declare const wasExtensionInsertedInBodiedSyncBlock: (tr: Transaction, state: EditorState) => string | undefined;
@@ -1,2 +0,0 @@
1
- import type { SyncedBlockPlugin } from './syncedBlockPluginType';
2
- export declare const syncedBlockPlugin: SyncedBlockPlugin;
@@ -1,106 +0,0 @@
1
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
3
- import type { EditorCommand, ExtractInjectionAPI, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
4
- import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
5
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
- import type { BlockControlsPlugin } from '@atlaskit/editor-plugin-block-controls';
7
- import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu';
8
- import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
9
- import type { ContentFormatPlugin } from '@atlaskit/editor-plugin-content-format';
10
- import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
11
- import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
12
- import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
13
- import type { FocusPlugin } from '@atlaskit/editor-plugin-focus';
14
- import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
15
- import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
16
- import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
17
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
18
- import type { SyncBlockDataProviderInterface, UseFetchSyncBlockDataResult } from '@atlaskit/editor-synced-block-provider';
19
- import type { SyncedBlockSharedState } from './types';
20
- export type SyncedBlockEditorProps = {
21
- defaultDocument: JSONDocNode;
22
- onChange: (editorView: EditorView, meta: {
23
- /**
24
- * Indicates whether or not the change may be unnecessary to listen to (dirty
25
- * changes can generally be ignored).
26
- *
27
- * This might be changes to media attributes for example when it gets updated
28
- * due to initial setup.
29
- *
30
- * We still fire these events however to avoid a breaking change.
31
- */
32
- isDirtyChange: boolean;
33
- source: 'local' | 'remote';
34
- }) => void;
35
- onEditorReady: ({ editorView, eventDispatcher, }: {
36
- editorView: EditorView;
37
- eventDispatcher: EventDispatcher;
38
- }) => void;
39
- popupsBoundariesElement: HTMLElement;
40
- popupsMountPoint: HTMLElement;
41
- };
42
- export type SyncedBlockRendererProps = {
43
- api?: ExtractInjectionAPI<SyncedBlockPlugin>;
44
- syncBlockFetchResult: UseFetchSyncBlockDataResult;
45
- };
46
- export interface SyncedBlockPluginOptions extends LongPressSelectionPluginOptions {
47
- /**
48
- * Enables Live Page specific behaviour for the synced block plugin.
49
- *
50
- * It is only supported for use by Confluence.
51
- *
52
- * @default false
53
- */
54
- __livePage?: boolean;
55
- enableSourceCreation?: boolean;
56
- syncBlockDataProvider: SyncBlockDataProviderInterface;
57
- syncedBlockRenderer: (props: SyncedBlockRendererProps) => React.JSX.Element;
58
- }
59
- export type SyncedBlockPlugin = NextEditorPlugin<'syncedBlock', {
60
- actions: {
61
- /**
62
- * Delete all source sync blocks with 'unpublished' status.
63
- * Used to clean up orphaned blocks when a user cancels editing
64
- * without saving.
65
- *
66
- * @returns true if all deletions succeeded, false otherwise
67
- */
68
- discardUnpublishedSyncBlocks: () => Promise<boolean>;
69
- /**
70
- * Save content of bodiedSyncBlock nodes in local cache to backend.
71
- * This action allows bodiedSyncBlock to be saved in sync with product saving experience
72
- * as per {@link https://hello.atlassian.net/wiki/spaces/egcuc/pages/5932393240/Synced+Blocks+Save+refresh+principles}
73
- *
74
- * @returns true if saving all nodes successfully, false if fail to save some/all nodes
75
- */
76
- flushBodiedSyncBlocks: () => Promise<boolean>;
77
- /**
78
- * Save reference synced blocks on the document (tracked by local cache)to the backend.
79
- * This action allows syncBlock on the document to be saved in sync with product saving experience
80
- * as per {@link https://hello.atlassian.net/wiki/spaces/egcuc/pages/5932393240/Synced+Blocks+Save+refresh+principles}
81
- *
82
- * @returns true if flushing all syncBlocks successfully, false otherwise
83
- */
84
- flushSyncedBlocks: () => Promise<boolean>;
85
- };
86
- commands: {
87
- copySyncedBlockReferenceToClipboard: (inputMethod: INPUT_METHOD) => EditorCommand;
88
- insertSyncedBlock: () => EditorCommand;
89
- };
90
- dependencies: [
91
- SelectionPlugin,
92
- FloatingToolbarPlugin,
93
- DecorationsPlugin,
94
- OptionalPlugin<BlockControlsPlugin>,
95
- OptionalPlugin<ToolbarPlugin>,
96
- OptionalPlugin<BlockMenuPlugin>,
97
- OptionalPlugin<AnalyticsPlugin>,
98
- OptionalPlugin<ConnectivityPlugin>,
99
- OptionalPlugin<EditorViewModePlugin>,
100
- OptionalPlugin<ContentFormatPlugin>,
101
- OptionalPlugin<UserIntentPlugin>,
102
- OptionalPlugin<FocusPlugin>
103
- ];
104
- pluginConfiguration: SyncedBlockPluginOptions | undefined;
105
- sharedState: SyncedBlockSharedState | undefined;
106
- }>;
@@ -1,94 +0,0 @@
1
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
- import type { SyncBlockProduct, SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
4
- export declare enum FLAG_ID {
5
- CANNOT_DELETE_WHEN_OFFLINE = "cannot-delete-when-offline",
6
- CANNOT_EDIT_WHEN_OFFLINE = "cannot-edit-when-offline",
7
- CANNOT_CREATE_WHEN_OFFLINE = "cannot-create-when-offline",
8
- FAIL_TO_DELETE = "fail-to-delete",
9
- SYNC_BLOCK_COPIED = "sync-block-copied",
10
- UNPUBLISHED_SYNC_BLOCK_PASTED = "unpublished-sync-block-pasted",
11
- CANNOT_CREATE_SYNC_BLOCK = "cannot-create-sync-block",
12
- INLINE_EXTENSION_IN_SYNC_BLOCK = "inline-extension-in-sync-block",
13
- EXTENSION_IN_SYNC_BLOCK = "extension-in-sync-block",
14
- DUPLICATE_SOURCE_SYNC_BLOCK = "duplicate-source-sync-block"
15
- }
16
- type FlagConfig = {
17
- id: FLAG_ID;
18
- onDismissed?: (tr: Transaction) => Transaction | void;
19
- onRetry?: () => void;
20
- /**
21
- * Optional source product for the synced block triggering this flag. Currently used
22
- * by the UNPUBLISHED_SYNC_BLOCK_PASTED flag so the displayed copy can be tailored
23
- * for Jira work items vs Confluence pages.
24
- */
25
- sourceProduct?: SyncBlockProduct;
26
- };
27
- export type BodiedSyncBlockDeletionStatus = 'none' | 'processing' | 'completed';
28
- export type ActiveFlag = FlagConfig | false;
29
- type RetryCreationPos = {
30
- from: number;
31
- to: number;
32
- };
33
- export type RetryCreationPosMap = Map<string, RetryCreationPos>;
34
- export type RetryCreationPosEntry = {
35
- pos?: RetryCreationPos;
36
- resourceId: string;
37
- };
38
- export type SyncedBlockSharedState = {
39
- /**
40
- * Whether to show a flag (usually for errors, e.g. fail to delete)
41
- */
42
- activeFlag: ActiveFlag;
43
- /**
44
- * Whether the plugin is currently saving bodiedSyncBlock deletion to backend
45
- */
46
- bodiedSyncBlockDeletionStatus?: BodiedSyncBlockDeletionStatus;
47
- /**
48
- * Whether the document currently contains any synced block (source or
49
- * reference). Sticky once flipped to `true` for the lifetime of the
50
- * editor session. When `editor_synced_block_perf` is OFF this is
51
- * always `true`.
52
- */
53
- hasSyncedBlocks: boolean;
54
- /**
55
- * Whether there are unsaved bodiedSyncBlock changes in the cache
56
- */
57
- hasUnsavedBodiedSyncBlockChanges: boolean;
58
- /**
59
- * Positions of pending creations keyed by resourceId, used for retry/revert flow.
60
- * When a new bodiedSyncBlock is added, a new entry is added to map for mapping. The entry is removed when creation succeeds or retry option is dismissed.
61
- *
62
- */
63
- retryCreationPosMap?: RetryCreationPosMap;
64
- /**
65
- * The current sync block store manager, used to manage fetching and updating sync block data
66
- */
67
- syncBlockStore: SyncBlockStoreManager;
68
- };
69
- export type SyncBlockAttrs = {
70
- localId: string;
71
- resourceId: string;
72
- };
73
- export type SyncBlockInfo = {
74
- attrs: SyncBlockAttrs;
75
- from?: number;
76
- node?: PMNode;
77
- to?: number;
78
- };
79
- export type SyncBlockMap = {
80
- [key: string]: SyncBlockInfo;
81
- };
82
- export declare const SYNCED_BLOCK_BUTTON_TEST_ID: {
83
- readonly primaryToolbarCreate: "create-synced-block-toolbar-btn";
84
- readonly blockMenuCreate: "create-synced-block-block-menu-btn";
85
- readonly quickInsertCreate: "create-synced-block-quick-insert-btn";
86
- readonly syncedBlockToolbarReferenceDelete: "reference-synced-block-delete-btn";
87
- readonly syncedBlockToolbarSourceDelete: "source-synced-block-delete-btn";
88
- readonly syncedBlockToolbarReferenceUnsync: "reference-synced-block-unsync-btn";
89
- readonly syncedBlockToolbarSourceUnsync: "source-synced-block-unsync-btn";
90
- readonly syncedBlockToolbarSyncedLocationsTrigger: "synced-block-synced-locations-dropdown--trigger";
91
- readonly syncedBlockToolbarReferenceOverflowTrigger: "reference-synced-block-overflow-dropdown--trigger";
92
- readonly syncedBlockToolbarSourceOverflowTrigger: "source-synced-block-overflow-dropdown--trigger";
93
- };
94
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
- import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
4
- interface BodiedSyncBlockWrapperProps {
5
- node: PMNode;
6
- syncBlockStore: SyncBlockStoreManager;
7
- }
8
- export declare const BodiedSyncBlockWrapper: React.ForwardRefExoticComponent<BodiedSyncBlockWrapperProps & React.RefAttributes<HTMLDivElement>>;
9
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
4
- type CreateSyncedBlockButtonProps = {
5
- api?: ExtractInjectionAPI<SyncedBlockPlugin>;
6
- };
7
- export declare const CreateSyncedBlockButton: ({ api, }: CreateSyncedBlockButtonProps) => React.JSX.Element;
8
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
4
- export declare const CreateOrCopySyncedBlockDropdownItem: ({ api, enableSourceSyncedBlockCreation, }: {
5
- api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined;
6
- enableSourceSyncedBlockCreation: boolean;
7
- }) => React.JSX.Element | null;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
4
- import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
5
- export declare const DeleteConfirmationModal: ({ syncBlockStoreManager, api, }: {
6
- api?: ExtractInjectionAPI<SyncedBlockPlugin>;
7
- syncBlockStoreManager: SyncBlockStoreManager;
8
- }) => React.JSX.Element;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
4
- type Props = {
5
- api?: ExtractInjectionAPI<SyncedBlockPlugin>;
6
- };
7
- export declare const Flag: ({ api }: Props) => React.JSX.Element | undefined;
8
- export {};
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- type SyncBlockLabelProps = {
3
- contentUpdatedAt?: string;
4
- isSource: boolean;
5
- isUnsyncedBlock?: boolean;
6
- localId: string;
7
- title?: string;
8
- };
9
- export declare const SyncBlockLabel: React.MemoExoticComponent<({ contentUpdatedAt, isSource, localId, title, isUnsyncedBlock, }: SyncBlockLabelProps) => React.JSX.Element>;
10
- export {};
@@ -1,7 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
3
- import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
4
- export declare const SyncBlockRefresher: ({ syncBlockStoreManager, api, }: {
5
- api?: ExtractInjectionAPI<SyncedBlockPlugin>;
6
- syncBlockStoreManager: SyncBlockStoreManager;
7
- }) => null;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
- import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
5
- import type { SyncedBlockPlugin, SyncedBlockRendererProps } from '../syncedBlockPluginType';
6
- type Props = {
7
- api?: ExtractInjectionAPI<SyncedBlockPlugin>;
8
- localId: string;
9
- node: PMNode;
10
- resourceId: string;
11
- syncBlockStore: SyncBlockStoreManager;
12
- syncedBlockRenderer: (props: SyncedBlockRendererProps) => React.JSX.Element;
13
- };
14
- export declare const SyncBlockRendererWrapper: React.MemoExoticComponent<({ syncedBlockRenderer, syncBlockStore, node, resourceId, localId, api, }: Props) => React.JSX.Element>;
15
- export {};
@@ -1,19 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import { type IntlShape } from 'react-intl';
3
- interface Props {
4
- children: ReactNode;
5
- intl: IntlShape | undefined;
6
- }
7
- /**
8
- * Wraps syncBlock nodeview children with the editor's actual IntlProvider during
9
- * SSR streaming (renderToStaticMarkup). This ensures that components using
10
- * useIntl() — such as SyncBlockLabel, SyncedBlockLoadingState, and
11
- * ReactRenderer's table/code-block node renderers — have a valid intl context
12
- * and do not throw during the static render pass.
13
- *
14
- * Outside of SSR streaming this is a no-op passthrough.
15
- *
16
- * Follows the same pattern as MediaSSRReactContextsProvider.
17
- */
18
- export declare function SyncBlockSSRReactContextsProvider({ children, intl }: Props): ReactNode;
19
- export {};
@@ -1,16 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { ExtractInjectionAPI, FloatingToolbarCustomRenderContext } from '@atlaskit/editor-common/types';
3
- import type { SyncBlockSourceInfo, SyncBlockStoreManager, ReferencesSourceInfo } from '@atlaskit/editor-synced-block-provider';
4
- import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
5
- interface Props {
6
- api?: ExtractInjectionAPI<SyncedBlockPlugin>;
7
- floatingToolbarRenderContext?: FloatingToolbarCustomRenderContext;
8
- intl: IntlShape;
9
- isSource: boolean;
10
- localId: string;
11
- resourceId: string;
12
- syncBlockStore: SyncBlockStoreManager;
13
- }
14
- export declare const processReferenceData: (referenceData: ReferencesSourceInfo["references"], intl: IntlShape) => SyncBlockSourceInfo[];
15
- export declare const SyncedLocationDropdown: ({ syncBlockStore, resourceId, intl, isSource, localId, api, floatingToolbarRenderContext, }: Props) => JSX.Element;
16
- export {};
@@ -1,4 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { RegisterBlockMenuComponent } from '@atlaskit/editor-plugin-block-menu';
3
- import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
4
- export declare const getBlockMenuComponents: (api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, enableSourceSyncedBlockCreation: boolean) => RegisterBlockMenuComponent[];
@@ -1,6 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { ExtractInjectionAPI, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
3
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
- import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
5
- import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
6
- export declare const getToolbarConfig: (state: EditorState, intl: IntlShape, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, syncBlockStore: SyncBlockStoreManager) => FloatingToolbarConfig | undefined;
@@ -1,12 +0,0 @@
1
- import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
4
- import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
5
- export declare const getQuickInsertConfig: (config: {
6
- enableSourceCreation?: boolean;
7
- } | undefined, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, syncBlockStore: SyncBlockStoreManager) => (({ formatMessage, }: {
8
- formatMessage: (message: {
9
- defaultMessage: string;
10
- id: string;
11
- }) => string;
12
- }) => QuickInsertItem[]);
@@ -1,4 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
3
- import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
4
- export declare const getToolbarComponents: (api?: ExtractInjectionAPI<SyncedBlockPlugin>, enableSourceSyncedBlockCreation?: boolean) => RegisterComponent[];
@@ -1,2 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- export declare const formatElapsedTime: (isoDate: string, intl: IntlShape) => string;