@atlaskit/editor-plugin-placeholder-text 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/.eslintrc.js +14 -0
  2. package/CHANGELOG.md +1 -0
  3. package/LICENSE.md +13 -0
  4. package/README.md +30 -0
  5. package/dist/cjs/actions.js +35 -0
  6. package/dist/cjs/fake-text-cursor/cursor.js +107 -0
  7. package/dist/cjs/index.js +13 -0
  8. package/dist/cjs/placeholder-text-nodeview.js +89 -0
  9. package/dist/cjs/plugin-key.js +8 -0
  10. package/dist/cjs/plugin.js +270 -0
  11. package/dist/cjs/selection-utils.js +14 -0
  12. package/dist/cjs/styles.js +13 -0
  13. package/dist/cjs/types.js +5 -0
  14. package/dist/cjs/ui/FloatingToolbar/index.js +88 -0
  15. package/dist/cjs/ui/FloatingToolbar/styles.js +15 -0
  16. package/dist/cjs/ui/FloatingToolbar/utils.js +55 -0
  17. package/dist/cjs/ui/PlaceholderFloatingToolbar/index.js +90 -0
  18. package/dist/es2019/actions.js +27 -0
  19. package/dist/es2019/fake-text-cursor/cursor.js +77 -0
  20. package/dist/es2019/index.js +1 -0
  21. package/dist/es2019/placeholder-text-nodeview.js +77 -0
  22. package/dist/es2019/plugin-key.js +2 -0
  23. package/dist/es2019/plugin.js +250 -0
  24. package/dist/es2019/selection-utils.js +8 -0
  25. package/dist/es2019/styles.js +52 -0
  26. package/dist/es2019/types.js +1 -0
  27. package/dist/es2019/ui/FloatingToolbar/index.js +49 -0
  28. package/dist/es2019/ui/FloatingToolbar/styles.js +15 -0
  29. package/dist/es2019/ui/FloatingToolbar/utils.js +42 -0
  30. package/dist/es2019/ui/PlaceholderFloatingToolbar/index.js +61 -0
  31. package/dist/esm/actions.js +29 -0
  32. package/dist/esm/fake-text-cursor/cursor.js +100 -0
  33. package/dist/esm/index.js +1 -0
  34. package/dist/esm/placeholder-text-nodeview.js +82 -0
  35. package/dist/esm/plugin-key.js +2 -0
  36. package/dist/esm/plugin.js +262 -0
  37. package/dist/esm/selection-utils.js +8 -0
  38. package/dist/esm/styles.js +6 -0
  39. package/dist/esm/types.js +1 -0
  40. package/dist/esm/ui/FloatingToolbar/index.js +67 -0
  41. package/dist/esm/ui/FloatingToolbar/styles.js +8 -0
  42. package/dist/esm/ui/FloatingToolbar/utils.js +49 -0
  43. package/dist/esm/ui/PlaceholderFloatingToolbar/index.js +80 -0
  44. package/dist/types/actions.d.ts +4 -0
  45. package/dist/types/fake-text-cursor/cursor.d.ts +30 -0
  46. package/dist/types/index.d.ts +2 -0
  47. package/dist/types/placeholder-text-nodeview.d.ts +17 -0
  48. package/dist/types/plugin-key.d.ts +3 -0
  49. package/dist/types/plugin.d.ts +7 -0
  50. package/dist/types/selection-utils.d.ts +2 -0
  51. package/dist/types/styles.d.ts +1 -0
  52. package/dist/types/types.d.ts +22 -0
  53. package/dist/types/ui/FloatingToolbar/index.d.ts +28 -0
  54. package/dist/types/ui/FloatingToolbar/styles.d.ts +1 -0
  55. package/dist/types/ui/FloatingToolbar/utils.d.ts +18 -0
  56. package/dist/types/ui/PlaceholderFloatingToolbar/index.d.ts +25 -0
  57. package/dist/types-ts4.5/actions.d.ts +4 -0
  58. package/dist/types-ts4.5/fake-text-cursor/cursor.d.ts +30 -0
  59. package/dist/types-ts4.5/index.d.ts +2 -0
  60. package/dist/types-ts4.5/placeholder-text-nodeview.d.ts +17 -0
  61. package/dist/types-ts4.5/plugin-key.d.ts +3 -0
  62. package/dist/types-ts4.5/plugin.d.ts +7 -0
  63. package/dist/types-ts4.5/selection-utils.d.ts +2 -0
  64. package/dist/types-ts4.5/styles.d.ts +1 -0
  65. package/dist/types-ts4.5/types.d.ts +22 -0
  66. package/dist/types-ts4.5/ui/FloatingToolbar/index.d.ts +28 -0
  67. package/dist/types-ts4.5/ui/FloatingToolbar/styles.d.ts +1 -0
  68. package/dist/types-ts4.5/ui/FloatingToolbar/utils.d.ts +18 -0
  69. package/dist/types-ts4.5/ui/PlaceholderFloatingToolbar/index.d.ts +25 -0
  70. package/package.json +100 -0
  71. package/report.api.md +80 -0
  72. package/styles/package.json +15 -0
  73. package/tmp/api-report-tmp.d.ts +49 -0
@@ -0,0 +1,22 @@
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 './actions';
5
+ export interface PlaceholderTextOptions {
6
+ allowInserting?: boolean;
7
+ }
8
+ export interface PlaceholderTextPluginState {
9
+ showInsertPanelAt: number | null;
10
+ allowInserting: boolean;
11
+ }
12
+ export type PlaceholderTextPlugin = NextEditorPlugin<'placeholderText', {
13
+ dependencies: [
14
+ OptionalPlugin<typeof analyticsPlugin>,
15
+ OptionalPlugin<TypeAheadPlugin>
16
+ ];
17
+ pluginConfiguration: PlaceholderTextOptions;
18
+ sharedState: PlaceholderTextPluginState | undefined;
19
+ actions: {
20
+ showPlaceholderFloatingToolbar: typeof showPlaceholderFloatingToolbar;
21
+ };
22
+ }>;
@@ -0,0 +1,28 @@
1
+ /** @jsx jsx */
2
+ import { PureComponent } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ export type Coordinates = {
5
+ left?: number;
6
+ right?: number;
7
+ top?: number;
8
+ bottom?: number;
9
+ };
10
+ export type PositionOffset = Coordinates;
11
+ export interface Props {
12
+ zIndex?: number;
13
+ className?: string;
14
+ target?: HTMLElement;
15
+ popupsMountPoint?: HTMLElement;
16
+ popupsBoundariesElement?: HTMLElement;
17
+ offset?: number[];
18
+ fitWidth?: number;
19
+ fitHeight?: number;
20
+ absoluteOffset?: PositionOffset;
21
+ alignX?: 'left' | 'center' | 'right';
22
+ alignY?: 'bottom' | 'top';
23
+ onPositionCalculated?: (position: Coordinates) => Coordinates;
24
+ }
25
+ export { handlePositionCalculatedWith, getOffsetParent, getNearestNonTextNode, } from './utils';
26
+ export default class FloatingToolbar extends PureComponent<Props, unknown> {
27
+ render(): jsx.JSX.Element | null;
28
+ }
@@ -0,0 +1 @@
1
+ export declare const container: (height?: number) => import("@emotion/react").SerializedStyles;
@@ -0,0 +1,18 @@
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
+ top?: number;
5
+ left?: number;
6
+ bottom?: number;
7
+ right?: number;
8
+ }) => (position: {
9
+ top?: number;
10
+ left?: number;
11
+ bottom?: number;
12
+ right?: number;
13
+ }) => {
14
+ top?: number | undefined;
15
+ left?: number | undefined;
16
+ bottom?: number | undefined;
17
+ right?: number | undefined;
18
+ };
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import type { WrappedComponentProps } from 'react-intl-next';
3
+ import type { Coordinates } from '../FloatingToolbar';
4
+ export declare const messages: {
5
+ placeholderTextPlaceholder: {
6
+ id: string;
7
+ defaultMessage: string;
8
+ description: string;
9
+ };
10
+ };
11
+ export interface Props {
12
+ getNodeFromPos: (pos: number) => Node;
13
+ getFixedCoordinatesFromPos: (pos: number) => Coordinates;
14
+ insertPlaceholder: (value: string) => void;
15
+ hidePlaceholderFloatingToolbar: () => void;
16
+ setFocusInEditor: () => void;
17
+ showInsertPanelAt: number;
18
+ editorViewDOM: HTMLElement;
19
+ popupsMountPoint?: HTMLElement;
20
+ popupsBoundariesElement?: HTMLElement;
21
+ }
22
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
23
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
24
+ };
25
+ export default _default;
@@ -0,0 +1,4 @@
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;
@@ -0,0 +1,30 @@
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;
@@ -0,0 +1,2 @@
1
+ export { default as placeholderTextPlugin } from './plugin';
2
+ export type { PlaceholderTextPlugin, PlaceholderTextPluginState, PlaceholderTextOptions, } from './types';
@@ -0,0 +1,17 @@
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
+ type: 'selection';
6
+ target: Element;
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 {};
@@ -0,0 +1,3 @@
1
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
+ import type { PlaceholderTextPluginState } from './types';
3
+ export declare const pluginKey: PluginKey<PlaceholderTextPluginState>;
@@ -0,0 +1,7 @@
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 './types';
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;
@@ -0,0 +1,2 @@
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
+ export declare const isSelectionAtPlaceholder: (selection: Selection) => boolean;
@@ -0,0 +1 @@
1
+ export declare const placeholderTextStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,22 @@
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 './actions';
5
+ export interface PlaceholderTextOptions {
6
+ allowInserting?: boolean;
7
+ }
8
+ export interface PlaceholderTextPluginState {
9
+ showInsertPanelAt: number | null;
10
+ allowInserting: boolean;
11
+ }
12
+ export type PlaceholderTextPlugin = NextEditorPlugin<'placeholderText', {
13
+ dependencies: [
14
+ OptionalPlugin<typeof analyticsPlugin>,
15
+ OptionalPlugin<TypeAheadPlugin>
16
+ ];
17
+ pluginConfiguration: PlaceholderTextOptions;
18
+ sharedState: PlaceholderTextPluginState | undefined;
19
+ actions: {
20
+ showPlaceholderFloatingToolbar: typeof showPlaceholderFloatingToolbar;
21
+ };
22
+ }>;
@@ -0,0 +1,28 @@
1
+ /** @jsx jsx */
2
+ import { PureComponent } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ export type Coordinates = {
5
+ left?: number;
6
+ right?: number;
7
+ top?: number;
8
+ bottom?: number;
9
+ };
10
+ export type PositionOffset = Coordinates;
11
+ export interface Props {
12
+ zIndex?: number;
13
+ className?: string;
14
+ target?: HTMLElement;
15
+ popupsMountPoint?: HTMLElement;
16
+ popupsBoundariesElement?: HTMLElement;
17
+ offset?: number[];
18
+ fitWidth?: number;
19
+ fitHeight?: number;
20
+ absoluteOffset?: PositionOffset;
21
+ alignX?: 'left' | 'center' | 'right';
22
+ alignY?: 'bottom' | 'top';
23
+ onPositionCalculated?: (position: Coordinates) => Coordinates;
24
+ }
25
+ export { handlePositionCalculatedWith, getOffsetParent, getNearestNonTextNode, } from './utils';
26
+ export default class FloatingToolbar extends PureComponent<Props, unknown> {
27
+ render(): jsx.JSX.Element | null;
28
+ }
@@ -0,0 +1 @@
1
+ export declare const container: (height?: number) => import("@emotion/react").SerializedStyles;
@@ -0,0 +1,18 @@
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
+ top?: number;
5
+ left?: number;
6
+ bottom?: number;
7
+ right?: number;
8
+ }) => (position: {
9
+ top?: number;
10
+ left?: number;
11
+ bottom?: number;
12
+ right?: number;
13
+ }) => {
14
+ top?: number | undefined;
15
+ left?: number | undefined;
16
+ bottom?: number | undefined;
17
+ right?: number | undefined;
18
+ };
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import type { WrappedComponentProps } from 'react-intl-next';
3
+ import type { Coordinates } from '../FloatingToolbar';
4
+ export declare const messages: {
5
+ placeholderTextPlaceholder: {
6
+ id: string;
7
+ defaultMessage: string;
8
+ description: string;
9
+ };
10
+ };
11
+ export interface Props {
12
+ getNodeFromPos: (pos: number) => Node;
13
+ getFixedCoordinatesFromPos: (pos: number) => Coordinates;
14
+ insertPlaceholder: (value: string) => void;
15
+ hidePlaceholderFloatingToolbar: () => void;
16
+ setFocusInEditor: () => void;
17
+ showInsertPanelAt: number;
18
+ editorViewDOM: HTMLElement;
19
+ popupsMountPoint?: HTMLElement;
20
+ popupsBoundariesElement?: HTMLElement;
21
+ }
22
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
23
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
24
+ };
25
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,100 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-placeholder-text",
3
+ "version": "0.1.0",
4
+ "description": "placeholder text plugin for @atlaskit/editor-core",
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org/"
7
+ },
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
9
+ "author": "Atlassian Pty Ltd",
10
+ "license": "Apache-2.0",
11
+ "main": "dist/cjs/index.js",
12
+ "module": "dist/esm/index.js",
13
+ "module:es2019": "dist/es2019/index.js",
14
+ "types": "dist/types/index.d.ts",
15
+ "sideEffects": false,
16
+ "atlaskit:src": "src/index.ts",
17
+ "atlassian": {
18
+ "team": "Editor: Scarlet",
19
+ "inPublicMirror": false,
20
+ "releaseModel": "continuous"
21
+ },
22
+ "dependencies": {
23
+ "@atlaskit/adf-schema": "^32.0.0",
24
+ "@atlaskit/editor-common": "^76.18.0",
25
+ "@atlaskit/editor-plugin-analytics": "^0.3.0",
26
+ "@atlaskit/editor-plugin-type-ahead": "^0.7.0",
27
+ "@atlaskit/editor-prosemirror": "1.1.0",
28
+ "@atlaskit/editor-shared-styles": "^2.8.0",
29
+ "@atlaskit/icon": "^21.12.0",
30
+ "@atlaskit/theme": "^12.6.0",
31
+ "@atlaskit/tokens": "^1.28.0",
32
+ "@babel/runtime": "^7.0.0",
33
+ "@emotion/react": "^11.7.1"
34
+ },
35
+ "peerDependencies": {
36
+ "react": "^16.8.0",
37
+ "react-intl-next": "npm:react-intl@^5.18.1"
38
+ },
39
+ "devDependencies": {
40
+ "@af/visual-regression": "*",
41
+ "@atlaskit/analytics-next": "^9.1.0",
42
+ "@atlaskit/editor-plugin-floating-toolbar": "^0.7.0",
43
+ "@atlaskit/ssr": "*",
44
+ "@atlaskit/visual-regression": "*",
45
+ "@atlaskit/webdriver-runner": "*",
46
+ "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
47
+ "@testing-library/react": "^12.1.5",
48
+ "react-dom": "^16.8.0",
49
+ "typescript": "~4.9.5",
50
+ "wait-for-expect": "^1.2.0"
51
+ },
52
+ "techstack": {
53
+ "@atlassian/frontend": {
54
+ "import-structure": [
55
+ "atlassian-conventions"
56
+ ],
57
+ "circular-dependencies": [
58
+ "file-and-folder-level"
59
+ ]
60
+ },
61
+ "@repo/internal": {
62
+ "dom-events": "use-bind-event-listener",
63
+ "analytics": [
64
+ "analytics-next"
65
+ ],
66
+ "design-tokens": [
67
+ "color"
68
+ ],
69
+ "theming": [
70
+ "react-context"
71
+ ],
72
+ "ui-components": [
73
+ "lite-mode"
74
+ ],
75
+ "deprecation": [
76
+ "no-deprecated-imports"
77
+ ],
78
+ "styling": [
79
+ "static",
80
+ "emotion"
81
+ ],
82
+ "imports": [
83
+ "import-no-extraneous-disable-for-examples-and-docs"
84
+ ]
85
+ }
86
+ },
87
+ "typesVersions": {
88
+ ">=4.5 <4.9": {
89
+ "*": [
90
+ "dist/types-ts4.5/*",
91
+ "dist/types-ts4.5/index.d.ts"
92
+ ]
93
+ }
94
+ },
95
+ "af:exports": {
96
+ ".": "./src/index.ts",
97
+ "./styles": "./src/styles.ts"
98
+ },
99
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
100
+ }
package/report.api.md ADDED
@@ -0,0 +1,80 @@
1
+ <!-- API Report Version: 2.3 -->
2
+
3
+ ## API Report File for "@atlaskit/editor-plugin-placeholder-text"
4
+
5
+ > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
6
+ > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
+
8
+ ### Table of contents
9
+
10
+ - [Main Entry Types](#main-entry-types)
11
+ - [Peer Dependencies](#peer-dependencies)
12
+
13
+ ### Main Entry Types
14
+
15
+ <!--SECTION START: Main Entry Types-->
16
+
17
+ ```ts
18
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
19
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
20
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
21
+ import type { OptionalPlugin } from '@atlaskit/editor-common/types';
22
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
23
+ import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
24
+
25
+ // @public (undocumented)
26
+ export interface PlaceholderTextOptions {
27
+ // (undocumented)
28
+ allowInserting?: boolean;
29
+ }
30
+
31
+ // @public (undocumented)
32
+ export type PlaceholderTextPlugin = NextEditorPlugin<
33
+ 'placeholderText',
34
+ {
35
+ dependencies: [
36
+ OptionalPlugin<typeof analyticsPlugin>,
37
+ OptionalPlugin<TypeAheadPlugin>,
38
+ ];
39
+ pluginConfiguration: PlaceholderTextOptions;
40
+ sharedState: PlaceholderTextPluginState | undefined;
41
+ actions: {
42
+ showPlaceholderFloatingToolbar: typeof showPlaceholderFloatingToolbar;
43
+ };
44
+ }
45
+ >;
46
+
47
+ // @public (undocumented)
48
+ export const placeholderTextPlugin: PlaceholderTextPlugin;
49
+
50
+ // @public (undocumented)
51
+ export interface PlaceholderTextPluginState {
52
+ // (undocumented)
53
+ allowInserting: boolean;
54
+ // (undocumented)
55
+ showInsertPanelAt: null | number;
56
+ }
57
+
58
+ // @public (undocumented)
59
+ const showPlaceholderFloatingToolbar: (
60
+ state: EditorState,
61
+ dispatch: (tr: Transaction) => void,
62
+ ) => boolean;
63
+
64
+ // (No @packageDocumentation comment for this package)
65
+ ```
66
+
67
+ <!--SECTION END: Main Entry Types-->
68
+
69
+ ### Peer Dependencies
70
+
71
+ <!--SECTION START: Peer Dependencies-->
72
+
73
+ ```json
74
+ {
75
+ "react": "^16.8.0",
76
+ "react-intl-next": "npm:react-intl@^5.18.1"
77
+ }
78
+ ```
79
+
80
+ <!--SECTION END: Peer Dependencies-->
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-placeholder-text/styles",
3
+ "main": "../dist/cjs/styles.js",
4
+ "module": "../dist/esm/styles.js",
5
+ "module:es2019": "../dist/es2019/styles.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/styles.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <4.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/styles.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,49 @@
1
+ ## API Report File for "@atlaskit/editor-plugin-placeholder-text"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
8
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
9
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
10
+ import type { OptionalPlugin } from '@atlaskit/editor-common/types';
11
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
12
+ import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
13
+
14
+ // @public (undocumented)
15
+ export interface PlaceholderTextOptions {
16
+ // (undocumented)
17
+ allowInserting?: boolean;
18
+ }
19
+
20
+ // @public (undocumented)
21
+ export type PlaceholderTextPlugin = NextEditorPlugin<'placeholderText', {
22
+ dependencies: [
23
+ OptionalPlugin<typeof analyticsPlugin>,
24
+ OptionalPlugin<TypeAheadPlugin>
25
+ ];
26
+ pluginConfiguration: PlaceholderTextOptions;
27
+ sharedState: PlaceholderTextPluginState | undefined;
28
+ actions: {
29
+ showPlaceholderFloatingToolbar: typeof showPlaceholderFloatingToolbar;
30
+ };
31
+ }>;
32
+
33
+ // @public (undocumented)
34
+ export const placeholderTextPlugin: PlaceholderTextPlugin;
35
+
36
+ // @public (undocumented)
37
+ export interface PlaceholderTextPluginState {
38
+ // (undocumented)
39
+ allowInserting: boolean;
40
+ // (undocumented)
41
+ showInsertPanelAt: null | number;
42
+ }
43
+
44
+ // @public (undocumented)
45
+ const showPlaceholderFloatingToolbar: (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
46
+
47
+ // (No @packageDocumentation comment for this package)
48
+
49
+ ```