@atlaskit/editor-plugin-placeholder-text 12.0.2 → 13.0.1
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 +32 -0
- package/package.json +8 -16
- package/placeholder-text-plugin/package.json +1 -8
- package/placeholder-text-plugin-type/package.json +1 -8
- package/dist/types-ts4.5/editor-actions/actions.d.ts +0 -4
- package/dist/types-ts4.5/entry-points/placeholder-text-plugin-type.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/placeholder-text-plugin.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -2
- package/dist/types-ts4.5/placeholderTextPlugin.d.ts +0 -7
- package/dist/types-ts4.5/placeholderTextPluginType.d.ts +0 -29
- package/dist/types-ts4.5/pm-plugins/fake-text-cursor/cursor.d.ts +0 -30
- package/dist/types-ts4.5/pm-plugins/placeholder-text-nodeview.d.ts +0 -17
- package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/utils/selection-utils.d.ts +0 -2
- package/dist/types-ts4.5/ui/FloatingToolbar/index.d.ts +0 -29
- package/dist/types-ts4.5/ui/FloatingToolbar/styles.d.ts +0 -2
- package/dist/types-ts4.5/ui/FloatingToolbar/utils.d.ts +0 -18
- package/dist/types-ts4.5/ui/PlaceholderFloatingToolbar/index.d.ts +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder-text
|
|
2
2
|
|
|
3
|
+
## 13.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 13.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
14
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
15
|
+
|
|
16
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
17
|
+
|
|
18
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
19
|
+
|
|
20
|
+
```diff
|
|
21
|
+
- "typesVersions": {
|
|
22
|
+
- ">=4.5 <4.9": {
|
|
23
|
+
- "*": [
|
|
24
|
+
- "dist/types-ts4.5/*",
|
|
25
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
26
|
+
- ]
|
|
27
|
+
- }
|
|
28
|
+
- },
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
|
|
3
35
|
## 12.0.2
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder-text",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.1",
|
|
4
4
|
"description": "placeholder text plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-schema": "^
|
|
31
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
32
|
-
"@atlaskit/editor-plugin-type-ahead": "^
|
|
33
|
-
"@atlaskit/editor-prosemirror": "^
|
|
34
|
-
"@atlaskit/icon": "^
|
|
35
|
-
"@atlaskit/tokens": "^
|
|
30
|
+
"@atlaskit/adf-schema": "^56.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-type-ahead": "^12.0.0",
|
|
33
|
+
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
34
|
+
"@atlaskit/icon": "^36.0.0",
|
|
35
|
+
"@atlaskit/tokens": "^14.0.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"@emotion/react": "^11.7.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@atlaskit/editor-common": "^
|
|
40
|
+
"@atlaskit/editor-common": "^116.4.0",
|
|
41
41
|
"react": "^18.2.0",
|
|
42
42
|
"react-dom": "^18.2.0",
|
|
43
43
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -89,13 +89,5 @@
|
|
|
89
89
|
"platform_editor_element_browser_analytic": {
|
|
90
90
|
"type": "boolean"
|
|
91
91
|
}
|
|
92
|
-
},
|
|
93
|
-
"typesVersions": {
|
|
94
|
-
">=4.5 <4.9": {
|
|
95
|
-
"*": [
|
|
96
|
-
"dist/types-ts4.5/*",
|
|
97
|
-
"dist/types-ts4.5/index.d.ts"
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
92
|
}
|
|
101
93
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/placeholder-text-plugin.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/placeholder-text-plugin.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/placeholder-text-plugin.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/placeholder-text-plugin-type.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/placeholder-text-plugin-type.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/placeholder-text-plugin-type.d.ts"
|
|
17
10
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export declare const showPlaceholderFloatingToolbar: (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
|
|
3
|
-
export declare const insertPlaceholderTextAtSelection: (value: string) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
|
|
4
|
-
export declare const hidePlaceholderFloatingToolbar: (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { PlaceholderTextPlugin, PlaceholderTextPluginState, PlaceholderTextOptions, PlaceholderTextPluginOptions, PlaceholderTextPluginDependencies, } from '../placeholderTextPluginType';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as placeholderTextPlugin } from '../placeholderTextPlugin';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { PlaceholderTextOptions, PlaceholderTextPlugin, PlaceholderTextPluginState } from './placeholderTextPluginType';
|
|
5
|
-
export declare function createPlugin(dispatch: Dispatch<PlaceholderTextPluginState>, options: PlaceholderTextOptions, api: ExtractInjectionAPI<PlaceholderTextPlugin> | undefined): SafePlugin | undefined;
|
|
6
|
-
declare const placeholderTextPlugin: PlaceholderTextPlugin;
|
|
7
|
-
export default placeholderTextPlugin;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
-
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
4
|
-
import type { showPlaceholderFloatingToolbar } from './editor-actions/actions';
|
|
5
|
-
export interface PlaceholderTextPluginOptions {
|
|
6
|
-
allowInserting?: boolean;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* @private
|
|
10
|
-
* @deprecated Use {@link PlaceholderTextPluginOptions} instead.
|
|
11
|
-
* @see https://product-fabric.atlassian.net/browse/ED-27496
|
|
12
|
-
*/
|
|
13
|
-
export type PlaceholderTextOptions = PlaceholderTextPluginOptions;
|
|
14
|
-
export interface PlaceholderTextPluginState {
|
|
15
|
-
allowInserting: boolean;
|
|
16
|
-
showInsertPanelAt: number | null;
|
|
17
|
-
}
|
|
18
|
-
export type PlaceholderTextPluginDependencies = [
|
|
19
|
-
OptionalPlugin<typeof analyticsPlugin>,
|
|
20
|
-
OptionalPlugin<TypeAheadPlugin>
|
|
21
|
-
];
|
|
22
|
-
export type PlaceholderTextPlugin = NextEditorPlugin<'placeholderText', {
|
|
23
|
-
actions: {
|
|
24
|
-
showPlaceholderFloatingToolbar: typeof showPlaceholderFloatingToolbar;
|
|
25
|
-
};
|
|
26
|
-
dependencies: PlaceholderTextPluginDependencies;
|
|
27
|
-
pluginConfiguration: PlaceholderTextPluginOptions;
|
|
28
|
-
sharedState: PlaceholderTextPluginState | undefined;
|
|
29
|
-
}>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Node, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { EditorState, SelectionBookmark, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import type { Mappable } from '@atlaskit/editor-prosemirror/transform';
|
|
6
|
-
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
export declare class FakeTextCursorBookmark {
|
|
8
|
-
pos: undefined | number;
|
|
9
|
-
visible: boolean;
|
|
10
|
-
constructor(pos: number);
|
|
11
|
-
map(mapping: Mappable): FakeTextCursorBookmark;
|
|
12
|
-
resolve(doc: Node): Selection;
|
|
13
|
-
}
|
|
14
|
-
export declare class FakeTextCursorSelection extends Selection {
|
|
15
|
-
constructor($pos: ResolvedPos);
|
|
16
|
-
map(doc: Node, mapping: Mappable): Selection;
|
|
17
|
-
static content(): Slice;
|
|
18
|
-
eq(other: Selection): boolean;
|
|
19
|
-
toJSON(): {
|
|
20
|
-
type: string;
|
|
21
|
-
pos: number;
|
|
22
|
-
};
|
|
23
|
-
static fromJSON(doc: Node, json: {
|
|
24
|
-
pos: number;
|
|
25
|
-
}): Selection;
|
|
26
|
-
getBookmark(): SelectionBookmark;
|
|
27
|
-
}
|
|
28
|
-
export declare const addFakeTextCursor: (state: EditorState, dispatch: (tr: Transaction) => void) => void;
|
|
29
|
-
export declare const removeFakeTextCursor: (state: EditorState, dispatch: (tr: Transaction) => void) => void;
|
|
30
|
-
export declare const drawFakeTextCursor: (state: EditorState) => DecorationSet | null;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { getPosHandler } from '@atlaskit/editor-common/react-node-view';
|
|
2
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
type PmMutationRecord = MutationRecord | {
|
|
5
|
-
target: Node;
|
|
6
|
-
type: 'selection';
|
|
7
|
-
};
|
|
8
|
-
export declare class PlaceholderTextNodeView implements NodeView {
|
|
9
|
-
private readonly node;
|
|
10
|
-
private readonly view;
|
|
11
|
-
private readonly getPos;
|
|
12
|
-
readonly dom: Node;
|
|
13
|
-
constructor(node: PMNode, view: EditorView, getPos: getPosHandler);
|
|
14
|
-
stopEvent(e: Event): boolean;
|
|
15
|
-
ignoreMutation(record: PmMutationRecord): boolean;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
export type Coordinates = {
|
|
8
|
-
bottom?: number;
|
|
9
|
-
left?: number;
|
|
10
|
-
right?: number;
|
|
11
|
-
top?: number;
|
|
12
|
-
};
|
|
13
|
-
export type PositionOffset = Coordinates;
|
|
14
|
-
export interface Props {
|
|
15
|
-
absoluteOffset?: PositionOffset;
|
|
16
|
-
alignX?: 'left' | 'center' | 'right';
|
|
17
|
-
alignY?: 'bottom' | 'top';
|
|
18
|
-
children?: React.ReactNode;
|
|
19
|
-
className?: string;
|
|
20
|
-
fitHeight?: number;
|
|
21
|
-
fitWidth?: number;
|
|
22
|
-
offset?: number[];
|
|
23
|
-
onPositionCalculated?: (position: Coordinates) => Coordinates;
|
|
24
|
-
popupsBoundariesElement?: HTMLElement;
|
|
25
|
-
popupsMountPoint?: HTMLElement;
|
|
26
|
-
target?: HTMLElement;
|
|
27
|
-
zIndex?: number;
|
|
28
|
-
}
|
|
29
|
-
export default function FloatingToolbar({ children, target, offset, fitWidth, fitHeight, onPositionCalculated, popupsMountPoint, popupsBoundariesElement, className, absoluteOffset, alignX, alignY, zIndex, }: Props): jsx.JSX.Element | null;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const getOffsetParent: (editorViewDom: HTMLElement, popupsMountPoint?: HTMLElement) => HTMLElement;
|
|
2
|
-
export declare const getNearestNonTextNode: (node: Node) => HTMLElement;
|
|
3
|
-
export declare const handlePositionCalculatedWith: (offsetParent: HTMLElement, node: Node, getCurrentFixedCoordinates: () => {
|
|
4
|
-
bottom?: number;
|
|
5
|
-
left?: number;
|
|
6
|
-
right?: number;
|
|
7
|
-
top?: number;
|
|
8
|
-
}) => (position: {
|
|
9
|
-
bottom?: number;
|
|
10
|
-
left?: number;
|
|
11
|
-
right?: number;
|
|
12
|
-
top?: number;
|
|
13
|
-
}) => {
|
|
14
|
-
bottom?: number;
|
|
15
|
-
left?: number;
|
|
16
|
-
right?: number;
|
|
17
|
-
top?: number;
|
|
18
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
3
|
-
import type { Coordinates } from '../FloatingToolbar';
|
|
4
|
-
export interface Props {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
editorViewDOM: HTMLElement;
|
|
7
|
-
getFixedCoordinatesFromPos: (pos: number) => Coordinates;
|
|
8
|
-
getNodeFromPos: (pos: number) => Node;
|
|
9
|
-
hidePlaceholderFloatingToolbar: () => void;
|
|
10
|
-
insertPlaceholder: (value: string) => void;
|
|
11
|
-
popupsBoundariesElement?: HTMLElement;
|
|
12
|
-
popupsMountPoint?: HTMLElement;
|
|
13
|
-
setFocusInEditor: () => void;
|
|
14
|
-
showInsertPanelAt: number;
|
|
15
|
-
}
|
|
16
|
-
declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
17
|
-
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
18
|
-
};
|
|
19
|
-
export default _default_1;
|