@atlaskit/editor-core 189.0.1 → 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 (48) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/plugins/index.js +2 -2
  3. package/dist/cjs/plugins/placeholder-text/index.js +6 -240
  4. package/dist/cjs/plugins/placeholder-text/plugin.js +266 -0
  5. package/dist/cjs/{ui → plugins/placeholder-text/ui}/FloatingToolbar/styles.js +1 -1
  6. package/dist/cjs/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.js +1 -1
  7. package/dist/cjs/version-wrapper.js +1 -1
  8. package/dist/es2019/plugins/index.js +1 -1
  9. package/dist/es2019/plugins/placeholder-text/index.js +1 -224
  10. package/dist/es2019/plugins/placeholder-text/plugin.js +246 -0
  11. package/dist/es2019/{ui → plugins/placeholder-text/ui}/FloatingToolbar/styles.js +1 -1
  12. package/dist/es2019/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.js +1 -1
  13. package/dist/es2019/version-wrapper.js +1 -1
  14. package/dist/esm/plugins/index.js +1 -1
  15. package/dist/esm/plugins/placeholder-text/index.js +1 -239
  16. package/dist/esm/plugins/placeholder-text/plugin.js +258 -0
  17. package/dist/esm/{ui → plugins/placeholder-text/ui}/FloatingToolbar/styles.js +1 -1
  18. package/dist/esm/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.js +1 -1
  19. package/dist/esm/version-wrapper.js +1 -1
  20. package/dist/types/plugins/index.d.ts +1 -1
  21. package/dist/types/plugins/placeholder-text/index.d.ts +2 -16
  22. package/dist/types/plugins/placeholder-text/placeholder-text-nodeview.d.ts +1 -1
  23. package/dist/types/plugins/placeholder-text/plugin-key.d.ts +2 -2
  24. package/dist/types/plugins/placeholder-text/plugin.d.ts +7 -0
  25. package/dist/types/plugins/placeholder-text/types.d.ts +9 -1
  26. package/dist/types/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.d.ts +2 -2
  27. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  28. package/dist/types-ts4.5/plugins/index.d.ts +1 -1
  29. package/dist/types-ts4.5/plugins/placeholder-text/index.d.ts +2 -22
  30. package/dist/types-ts4.5/plugins/placeholder-text/placeholder-text-nodeview.d.ts +1 -1
  31. package/dist/types-ts4.5/plugins/placeholder-text/plugin-key.d.ts +2 -2
  32. package/dist/types-ts4.5/plugins/placeholder-text/plugin.d.ts +7 -0
  33. package/dist/types-ts4.5/plugins/placeholder-text/types.d.ts +12 -1
  34. package/dist/types-ts4.5/plugins/placeholder-text/ui/PlaceholderFloatingToolbar/index.d.ts +2 -2
  35. package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  36. package/package.json +2 -2
  37. /package/dist/cjs/{ui → plugins/placeholder-text/ui}/FloatingToolbar/index.js +0 -0
  38. /package/dist/cjs/{ui → plugins/placeholder-text/ui}/FloatingToolbar/utils.js +0 -0
  39. /package/dist/es2019/{ui → plugins/placeholder-text/ui}/FloatingToolbar/index.js +0 -0
  40. /package/dist/es2019/{ui → plugins/placeholder-text/ui}/FloatingToolbar/utils.js +0 -0
  41. /package/dist/esm/{ui → plugins/placeholder-text/ui}/FloatingToolbar/index.js +0 -0
  42. /package/dist/esm/{ui → plugins/placeholder-text/ui}/FloatingToolbar/utils.js +0 -0
  43. /package/dist/types/{ui → plugins/placeholder-text/ui}/FloatingToolbar/index.d.ts +0 -0
  44. /package/dist/types/{ui → plugins/placeholder-text/ui}/FloatingToolbar/styles.d.ts +0 -0
  45. /package/dist/types/{ui → plugins/placeholder-text/ui}/FloatingToolbar/utils.d.ts +0 -0
  46. /package/dist/types-ts4.5/{ui → plugins/placeholder-text/ui}/FloatingToolbar/index.d.ts +0 -0
  47. /package/dist/types-ts4.5/{ui → plugins/placeholder-text/ui}/FloatingToolbar/styles.d.ts +0 -0
  48. /package/dist/types-ts4.5/{ui → plugins/placeholder-text/ui}/FloatingToolbar/utils.d.ts +0 -0
@@ -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.1",
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.14.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",