@atlaskit/editor-core 189.0.0 → 189.0.3

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 (57) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/labs/next/presets/universal.js +6 -0
  3. package/dist/cjs/plugins/index.js +2 -2
  4. package/dist/cjs/plugins/placeholder-text/index.js +6 -240
  5. package/dist/cjs/plugins/placeholder-text/plugin.js +266 -0
  6. package/dist/cjs/{ui → plugins/placeholder-text/ui}/FloatingToolbar/styles.js +1 -1
  7. package/dist/cjs/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.js +1 -1
  8. package/dist/cjs/ui/Addon/click-area-helper.js +1 -0
  9. package/dist/cjs/ui/ContentStyles/index.js +12 -11
  10. package/dist/cjs/version-wrapper.js +1 -1
  11. package/dist/es2019/labs/next/presets/universal.js +6 -0
  12. package/dist/es2019/plugins/index.js +1 -1
  13. package/dist/es2019/plugins/placeholder-text/index.js +1 -224
  14. package/dist/es2019/plugins/placeholder-text/plugin.js +246 -0
  15. package/dist/es2019/{ui → plugins/placeholder-text/ui}/FloatingToolbar/styles.js +1 -1
  16. package/dist/es2019/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.js +1 -1
  17. package/dist/es2019/ui/Addon/click-area-helper.js +1 -0
  18. package/dist/es2019/ui/ContentStyles/index.js +2 -0
  19. package/dist/es2019/version-wrapper.js +1 -1
  20. package/dist/esm/labs/next/presets/universal.js +6 -0
  21. package/dist/esm/plugins/index.js +1 -1
  22. package/dist/esm/plugins/placeholder-text/index.js +1 -239
  23. package/dist/esm/plugins/placeholder-text/plugin.js +258 -0
  24. package/dist/esm/{ui → plugins/placeholder-text/ui}/FloatingToolbar/styles.js +1 -1
  25. package/dist/esm/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.js +1 -1
  26. package/dist/esm/ui/Addon/click-area-helper.js +1 -0
  27. package/dist/esm/ui/ContentStyles/index.js +3 -2
  28. package/dist/esm/version-wrapper.js +1 -1
  29. package/dist/types/plugins/index.d.ts +1 -1
  30. package/dist/types/plugins/placeholder-text/index.d.ts +2 -16
  31. package/dist/types/plugins/placeholder-text/placeholder-text-nodeview.d.ts +1 -1
  32. package/dist/types/plugins/placeholder-text/plugin-key.d.ts +2 -2
  33. package/dist/types/plugins/placeholder-text/plugin.d.ts +7 -0
  34. package/dist/types/plugins/placeholder-text/types.d.ts +9 -1
  35. package/dist/types/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.d.ts +2 -2
  36. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  37. package/dist/types-ts4.5/plugins/index.d.ts +1 -1
  38. package/dist/types-ts4.5/plugins/placeholder-text/index.d.ts +2 -22
  39. package/dist/types-ts4.5/plugins/placeholder-text/placeholder-text-nodeview.d.ts +1 -1
  40. package/dist/types-ts4.5/plugins/placeholder-text/plugin-key.d.ts +2 -2
  41. package/dist/types-ts4.5/plugins/placeholder-text/plugin.d.ts +7 -0
  42. package/dist/types-ts4.5/plugins/placeholder-text/types.d.ts +12 -1
  43. package/dist/types-ts4.5/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.d.ts +2 -2
  44. package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  45. package/package.json +7 -3
  46. /package/dist/cjs/{ui → plugins/placeholder-text/ui}/FloatingToolbar/index.js +0 -0
  47. /package/dist/cjs/{ui → plugins/placeholder-text/ui}/FloatingToolbar/utils.js +0 -0
  48. /package/dist/es2019/{ui → plugins/placeholder-text/ui}/FloatingToolbar/index.js +0 -0
  49. /package/dist/es2019/{ui → plugins/placeholder-text/ui}/FloatingToolbar/utils.js +0 -0
  50. /package/dist/esm/{ui → plugins/placeholder-text/ui}/FloatingToolbar/index.js +0 -0
  51. /package/dist/esm/{ui → plugins/placeholder-text/ui}/FloatingToolbar/utils.js +0 -0
  52. /package/dist/types/{ui → plugins/placeholder-text/ui}/FloatingToolbar/index.d.ts +0 -0
  53. /package/dist/types/{ui → plugins/placeholder-text/ui}/FloatingToolbar/styles.d.ts +0 -0
  54. /package/dist/types/{ui → plugins/placeholder-text/ui}/FloatingToolbar/utils.d.ts +0 -0
  55. /package/dist/types-ts4.5/{ui → plugins/placeholder-text/ui}/FloatingToolbar/index.d.ts +0 -0
  56. /package/dist/types-ts4.5/{ui → plugins/placeholder-text/ui}/FloatingToolbar/styles.d.ts +0 -0
  57. /package/dist/types-ts4.5/{ui → plugins/placeholder-text/ui}/FloatingToolbar/utils.d.ts +0 -0
@@ -18,5 +18,5 @@ type Props = {
18
18
  isLoading?: boolean;
19
19
  featureFlags?: FeatureFlags;
20
20
  } & WithAnalyticsEventsProps;
21
- declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "autoSaveReject" | "onChange" | "isLoading" | "fields" | "parameters" | "onCancel" | "featureFlags" | "autoSave" | "analyticsContext" | "errorMessage" | "extensionManifest" | "autoSaveTrigger" | "showHeader" | "closeOnEsc"> & React.RefAttributes<any>>;
21
+ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "autoSaveReject" | "onChange" | "isLoading" | "fields" | "parameters" | "featureFlags" | "onCancel" | "autoSave" | "analyticsContext" | "errorMessage" | "extensionManifest" | "autoSaveTrigger" | "showHeader" | "closeOnEsc"> & React.RefAttributes<any>>;
22
22
  export default _default;
@@ -11,7 +11,7 @@ export { default as macroPlugin } from './macro';
11
11
  export { default as maxContentSizePlugin } from './max-content-size';
12
12
  export { default as panelPlugin } from './panel';
13
13
  export { default as pastePlugin } from './paste';
14
- export { default as placeholderTextPlugin } from './placeholder-text';
14
+ export { placeholderTextPlugin } from './placeholder-text';
15
15
  export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
16
16
  export { default as textColorPlugin } from './text-color';
17
17
  export { default as breakoutPlugin } from './breakout';
@@ -1,22 +1,2 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { ExtractInjectionAPI, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
- import type { Dispatch } from '../../event-dispatcher';
4
- import type { PlaceholderTextOptions, PluginState } from './types';
5
- import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
- import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
7
- export declare function createPlugin(dispatch: Dispatch<PluginState>, options: PlaceholderTextOptions, api: ExtractInjectionAPI<PlaceholderTextPlugin> | undefined): SafePlugin | undefined;
8
- type PlaceholderTextPlugin = NextEditorPlugin<'placeholderText', {
9
- dependencies: [
10
- OptionalPlugin<typeof analyticsPlugin>,
11
- TypeAheadPlugin
12
- ];
13
- pluginConfiguration: PlaceholderTextOptions;
14
- }>;
15
- declare const placeholderTextPlugin: NextEditorPlugin<'placeholderText', {
16
- dependencies: [
17
- OptionalPlugin<typeof analyticsPlugin>,
18
- TypeAheadPlugin
19
- ];
20
- pluginConfiguration: PlaceholderTextOptions;
21
- }>;
22
- export default placeholderTextPlugin;
1
+ export { default as placeholderTextPlugin } from './plugin';
2
+ export type { PlaceholderTextPlugin, PlaceholderTextPluginState, PlaceholderTextOptions, } from './types';
@@ -1,6 +1,6 @@
1
1
  import type { NodeView, EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
- import type { getPosHandler } from '../../nodeviews';
3
+ import type { getPosHandler } from '@atlaskit/editor-common/react-node-view';
4
4
  type PmMutationRecord = MutationRecord | {
5
5
  type: 'selection';
6
6
  target: Element;
@@ -1,3 +1,3 @@
1
1
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- import type { PluginState } from './types';
3
- export declare const pluginKey: PluginKey<PluginState>;
2
+ import type { PlaceholderTextPluginState } from './types';
3
+ export declare const pluginKey: PluginKey<PlaceholderTextPluginState>;
@@ -0,0 +1,7 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
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;
@@ -1,7 +1,18 @@
1
+ import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
+ import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
3
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
1
4
  export interface PlaceholderTextOptions {
2
5
  allowInserting?: boolean;
3
6
  }
4
- export interface PluginState {
7
+ export interface PlaceholderTextPluginState {
5
8
  showInsertPanelAt: number | null;
6
9
  allowInserting: boolean;
7
10
  }
11
+ export type PlaceholderTextPlugin = NextEditorPlugin<'placeholderText', {
12
+ dependencies: [
13
+ OptionalPlugin<typeof analyticsPlugin>,
14
+ TypeAheadPlugin
15
+ ];
16
+ pluginConfiguration: PlaceholderTextOptions;
17
+ sharedState: PlaceholderTextPluginState | undefined;
18
+ }>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { WrappedComponentProps } from 'react-intl-next';
3
- import { Coordinates } from '../../../../ui/FloatingToolbar';
2
+ import type { WrappedComponentProps } from 'react-intl-next';
3
+ import type { Coordinates } from '../FloatingToolbar';
4
4
  export declare const messages: {
5
5
  placeholderTextPlaceholder: {
6
6
  id: string;
@@ -18,5 +18,5 @@ type Props = {
18
18
  isLoading?: boolean;
19
19
  featureFlags?: FeatureFlags;
20
20
  } & WithAnalyticsEventsProps;
21
- declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "autoSaveReject" | "onChange" | "isLoading" | "fields" | "parameters" | "onCancel" | "featureFlags" | "autoSave" | "analyticsContext" | "errorMessage" | "extensionManifest" | "autoSaveTrigger" | "showHeader" | "closeOnEsc"> & React.RefAttributes<any>>;
21
+ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "autoSaveReject" | "onChange" | "isLoading" | "fields" | "parameters" | "featureFlags" | "onCancel" | "autoSave" | "analyticsContext" | "errorMessage" | "extensionManifest" | "autoSaveTrigger" | "showHeader" | "closeOnEsc"> & React.RefAttributes<any>>;
22
22
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "189.0.0",
3
+ "version": "189.0.3",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -53,7 +53,7 @@
53
53
  "@atlaskit/code": "^14.6.0",
54
54
  "@atlaskit/date": "^0.10.0",
55
55
  "@atlaskit/datetime-picker": "^12.10.0",
56
- "@atlaskit/editor-common": "^76.13.0",
56
+ "@atlaskit/editor-common": "^76.15.0",
57
57
  "@atlaskit/editor-json-transformer": "^8.10.0",
58
58
  "@atlaskit/editor-markdown-transformer": "^5.2.5",
59
59
  "@atlaskit/editor-palette": "1.5.1",
@@ -75,7 +75,7 @@
75
75
  "@atlaskit/editor-plugin-emoji": "^0.4.0",
76
76
  "@atlaskit/editor-plugin-extension": "^0.2.0",
77
77
  "@atlaskit/editor-plugin-feature-flags": "^1.0.0",
78
- "@atlaskit/editor-plugin-floating-toolbar": "^0.6.0",
78
+ "@atlaskit/editor-plugin-floating-toolbar": "^0.7.0",
79
79
  "@atlaskit/editor-plugin-focus": "^0.2.0",
80
80
  "@atlaskit/editor-plugin-grid": "^0.3.0",
81
81
  "@atlaskit/editor-plugin-guideline": "^0.5.0",
@@ -87,6 +87,7 @@
87
87
  "@atlaskit/editor-plugin-media": "^0.3.0",
88
88
  "@atlaskit/editor-plugin-mentions": "^0.1.0",
89
89
  "@atlaskit/editor-plugin-paste": "^0.1.0",
90
+ "@atlaskit/editor-plugin-paste-options-toolbar": "^0.2.0",
90
91
  "@atlaskit/editor-plugin-placeholder": "^0.1.0",
91
92
  "@atlaskit/editor-plugin-quick-insert": "^0.2.0",
92
93
  "@atlaskit/editor-plugin-rule": "^0.1.0",
@@ -321,6 +322,9 @@
321
322
  },
322
323
  "platform.editor.enable-selection-toolbar_ucdwd": {
323
324
  "type": "boolean"
325
+ },
326
+ "platform.editor.paste-options-toolbar": {
327
+ "type": "boolean"
324
328
  }
325
329
  }
326
330
  }