@atlaskit/editor-core 188.3.1 → 188.4.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.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/labs/next/presets/universal.js +2 -1
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -4
- package/dist/cjs/plugins/mentions/index.js +31 -21
- package/dist/cjs/plugins/mentions/ui/ToolbarMention/index.js +1 -3
- package/dist/cjs/plugins/placeholder-text/index.js +9 -9
- package/dist/cjs/plugins/type-ahead/api.js +8 -26
- package/dist/cjs/plugins/type-ahead/index.js +135 -4
- package/dist/cjs/plugins/undo-redo/index.js +10 -8
- package/dist/cjs/plugins/undo-redo/types.js +5 -0
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +10 -9
- package/dist/cjs/test-utils.js +0 -7
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/labs/next/presets/universal.js +2 -1
- package/dist/es2019/plugins/index.js +1 -2
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -4
- package/dist/es2019/plugins/mentions/index.js +30 -22
- package/dist/es2019/plugins/mentions/ui/ToolbarMention/index.js +2 -5
- package/dist/es2019/plugins/placeholder-text/index.js +8 -8
- package/dist/es2019/plugins/type-ahead/api.js +9 -28
- package/dist/es2019/plugins/type-ahead/index.js +140 -5
- package/dist/es2019/plugins/undo-redo/index.js +5 -2
- package/dist/es2019/plugins/undo-redo/types.js +1 -0
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +10 -9
- package/dist/es2019/test-utils.js +0 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/labs/next/presets/universal.js +2 -1
- package/dist/esm/plugins/index.js +1 -2
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -4
- package/dist/esm/plugins/mentions/index.js +32 -22
- package/dist/esm/plugins/mentions/ui/ToolbarMention/index.js +2 -5
- package/dist/esm/plugins/placeholder-text/index.js +9 -9
- package/dist/esm/plugins/type-ahead/api.js +9 -27
- package/dist/esm/plugins/type-ahead/index.js +136 -5
- package/dist/esm/plugins/undo-redo/index.js +10 -8
- package/dist/esm/plugins/undo-redo/types.js +1 -0
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +10 -9
- package/dist/esm/test-utils.js +0 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/labs/next/presets/default.d.ts +228 -18
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/insert-block/types.d.ts +3 -1
- package/dist/types/plugins/mentions/index.d.ts +11 -4
- package/dist/types/plugins/mentions/ui/ToolbarMention/index.d.ts +1 -0
- package/dist/types/plugins/placeholder-text/index.d.ts +8 -3
- package/dist/types/plugins/type-ahead/api.d.ts +7 -9
- package/dist/types/plugins/type-ahead/utils.d.ts +1 -2
- package/dist/types/plugins/undo-redo/index.d.ts +2 -2
- package/dist/types/plugins/undo-redo/types.d.ts +5 -0
- package/dist/types/plugins/undo-redo/ui/ToolbarUndoRedo/index.d.ts +3 -0
- package/dist/types/test-utils.d.ts +0 -1
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +256 -18
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +3 -1
- package/dist/types-ts4.5/plugins/mentions/index.d.ts +11 -4
- package/dist/types-ts4.5/plugins/mentions/ui/ToolbarMention/index.d.ts +1 -0
- package/dist/types-ts4.5/plugins/placeholder-text/index.d.ts +12 -3
- package/dist/types-ts4.5/plugins/type-ahead/api.d.ts +7 -9
- package/dist/types-ts4.5/plugins/type-ahead/utils.d.ts +1 -2
- package/dist/types-ts4.5/plugins/undo-redo/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/undo-redo/types.d.ts +7 -0
- package/dist/types-ts4.5/plugins/undo-redo/ui/ToolbarUndoRedo/index.d.ts +3 -0
- package/dist/types-ts4.5/test-utils.d.ts +0 -1
- package/package.json +6 -5
- package/dist/cjs/plugins/border/index.js +0 -19
- package/dist/es2019/plugins/border/index.js +0 -11
- package/dist/esm/plugins/border/index.js +0 -13
- package/dist/types/plugins/border/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/border/index.d.ts +0 -3
|
@@ -275,35 +275,140 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
275
275
|
sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
|
|
276
276
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
277
277
|
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
278
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
279
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
280
|
+
sharedState: {
|
|
281
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
282
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
283
|
+
};
|
|
284
|
+
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
285
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
286
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
287
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>];
|
|
288
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
289
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
|
|
290
|
+
sharedState: {
|
|
291
|
+
query: string;
|
|
292
|
+
};
|
|
278
293
|
actions: {
|
|
279
294
|
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
280
295
|
isAllowed: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
296
|
+
insert: (props: {
|
|
297
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
298
|
+
contentItem: import("@atlaskit/editor-common/types").TypeAheadItem;
|
|
299
|
+
query: string;
|
|
300
|
+
sourceListItem: import("@atlaskit/editor-common/types").TypeAheadItem[];
|
|
301
|
+
mode?: import("@atlaskit/editor-common/type-ahead").SelectItemMode | undefined;
|
|
302
|
+
}) => boolean;
|
|
303
|
+
findHandlerByTrigger: (trigger: string) => import("@atlaskit/editor-common/types").TypeAheadHandler | null;
|
|
304
|
+
open: (props: {
|
|
284
305
|
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
285
306
|
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
286
307
|
query?: string | undefined;
|
|
287
|
-
}) =>
|
|
308
|
+
}) => boolean;
|
|
309
|
+
close: (props: {
|
|
310
|
+
insertCurrentQueryAsRawText: boolean;
|
|
311
|
+
attachCommand?: import("@atlaskit/editor-common/types").Command | undefined;
|
|
312
|
+
}) => boolean;
|
|
313
|
+
openAtTransaction: (props: {
|
|
314
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
315
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
316
|
+
query?: string | undefined;
|
|
317
|
+
}) => (tr: import("prosemirror-state").Transaction) => boolean;
|
|
288
318
|
};
|
|
289
319
|
}, TypeAheadPluginOptions | undefined>];
|
|
290
320
|
}, PlaceholderPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
291
321
|
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
322
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
323
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
324
|
+
sharedState: {
|
|
325
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
326
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
327
|
+
};
|
|
328
|
+
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
329
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
330
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
331
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>];
|
|
332
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
333
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
|
|
334
|
+
sharedState: {
|
|
335
|
+
query: string;
|
|
336
|
+
};
|
|
292
337
|
actions: {
|
|
293
338
|
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
294
339
|
isAllowed: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
340
|
+
insert: (props: {
|
|
341
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
342
|
+
contentItem: import("@atlaskit/editor-common/types").TypeAheadItem;
|
|
343
|
+
query: string;
|
|
344
|
+
sourceListItem: import("@atlaskit/editor-common/types").TypeAheadItem[];
|
|
345
|
+
mode?: import("@atlaskit/editor-common/type-ahead").SelectItemMode | undefined;
|
|
346
|
+
}) => boolean;
|
|
347
|
+
findHandlerByTrigger: (trigger: string) => import("@atlaskit/editor-common/types").TypeAheadHandler | null;
|
|
348
|
+
open: (props: {
|
|
298
349
|
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
299
350
|
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
300
351
|
query?: string | undefined;
|
|
301
|
-
}) =>
|
|
352
|
+
}) => boolean;
|
|
353
|
+
close: (props: {
|
|
354
|
+
insertCurrentQueryAsRawText: boolean;
|
|
355
|
+
attachCommand?: import("@atlaskit/editor-common/types").Command | undefined;
|
|
356
|
+
}) => boolean;
|
|
357
|
+
openAtTransaction: (props: {
|
|
358
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
359
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
360
|
+
query?: string | undefined;
|
|
361
|
+
}) => (tr: import("prosemirror-state").Transaction) => boolean;
|
|
302
362
|
};
|
|
303
363
|
}, TypeAheadPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"quickInsert", {
|
|
304
364
|
pluginConfiguration: QuickInsertPluginOptions | undefined;
|
|
305
|
-
|
|
365
|
+
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
366
|
+
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
367
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
368
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
369
|
+
sharedState: {
|
|
370
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
371
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
372
|
+
};
|
|
373
|
+
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
374
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
375
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
376
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>];
|
|
377
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
378
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
|
|
379
|
+
sharedState: {
|
|
380
|
+
query: string;
|
|
381
|
+
};
|
|
382
|
+
actions: {
|
|
383
|
+
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
384
|
+
isAllowed: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
385
|
+
insert: (props: {
|
|
386
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
387
|
+
contentItem: import("@atlaskit/editor-common/types").TypeAheadItem;
|
|
388
|
+
query: string;
|
|
389
|
+
sourceListItem: import("@atlaskit/editor-common/types").TypeAheadItem[];
|
|
390
|
+
mode?: import("@atlaskit/editor-common/type-ahead").SelectItemMode | undefined;
|
|
391
|
+
}) => boolean;
|
|
392
|
+
findHandlerByTrigger: (trigger: string) => import("@atlaskit/editor-common/types").TypeAheadHandler | null;
|
|
393
|
+
open: (props: {
|
|
394
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
395
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
396
|
+
query?: string | undefined;
|
|
397
|
+
}) => boolean;
|
|
398
|
+
close: (props: {
|
|
399
|
+
insertCurrentQueryAsRawText: boolean;
|
|
400
|
+
attachCommand?: import("@atlaskit/editor-common/types").Command | undefined;
|
|
401
|
+
}) => boolean;
|
|
402
|
+
openAtTransaction: (props: {
|
|
403
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
404
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
405
|
+
query?: string | undefined;
|
|
406
|
+
}) => (tr: import("prosemirror-state").Transaction) => boolean;
|
|
407
|
+
};
|
|
408
|
+
}, TypeAheadPluginOptions | undefined>];
|
|
409
|
+
sharedState: import("@atlaskit/editor-plugin-quick-insert").QuickInsertSharedState | null;
|
|
306
410
|
actions: {
|
|
411
|
+
openTypeAhead: (inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod) => boolean;
|
|
307
412
|
insertItem: (item: import("@atlaskit/editor-common/provider-factory").QuickInsertItem) => import("@atlaskit/editor-common/types").Command;
|
|
308
413
|
getSuggestions: (searchOptions: import("@atlaskit/editor-common/types").QuickInsertSearchOptions) => import("@atlaskit/editor-common/provider-factory").QuickInsertItem[];
|
|
309
414
|
};
|
|
@@ -605,35 +710,140 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
605
710
|
sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
|
|
606
711
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
607
712
|
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
713
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
714
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
715
|
+
sharedState: {
|
|
716
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
717
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
718
|
+
};
|
|
719
|
+
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
720
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
721
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
722
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>];
|
|
723
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
724
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
|
|
725
|
+
sharedState: {
|
|
726
|
+
query: string;
|
|
727
|
+
};
|
|
608
728
|
actions: {
|
|
609
729
|
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
610
730
|
isAllowed: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
731
|
+
insert: (props: {
|
|
732
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
733
|
+
contentItem: import("@atlaskit/editor-common/types").TypeAheadItem;
|
|
734
|
+
query: string;
|
|
735
|
+
sourceListItem: import("@atlaskit/editor-common/types").TypeAheadItem[];
|
|
736
|
+
mode?: import("@atlaskit/editor-common/type-ahead").SelectItemMode | undefined;
|
|
737
|
+
}) => boolean;
|
|
738
|
+
findHandlerByTrigger: (trigger: string) => import("@atlaskit/editor-common/types").TypeAheadHandler | null;
|
|
739
|
+
open: (props: {
|
|
614
740
|
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
615
741
|
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
616
742
|
query?: string | undefined;
|
|
617
|
-
}) =>
|
|
743
|
+
}) => boolean;
|
|
744
|
+
close: (props: {
|
|
745
|
+
insertCurrentQueryAsRawText: boolean;
|
|
746
|
+
attachCommand?: import("@atlaskit/editor-common/types").Command | undefined;
|
|
747
|
+
}) => boolean;
|
|
748
|
+
openAtTransaction: (props: {
|
|
749
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
750
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
751
|
+
query?: string | undefined;
|
|
752
|
+
}) => (tr: import("prosemirror-state").Transaction) => boolean;
|
|
618
753
|
};
|
|
619
754
|
}, TypeAheadPluginOptions | undefined>];
|
|
620
755
|
}, PlaceholderPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
621
756
|
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
757
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
758
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
759
|
+
sharedState: {
|
|
760
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
761
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
762
|
+
};
|
|
763
|
+
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
764
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
765
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
766
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>];
|
|
767
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
768
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
|
|
769
|
+
sharedState: {
|
|
770
|
+
query: string;
|
|
771
|
+
};
|
|
622
772
|
actions: {
|
|
623
773
|
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
624
774
|
isAllowed: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
775
|
+
insert: (props: {
|
|
776
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
777
|
+
contentItem: import("@atlaskit/editor-common/types").TypeAheadItem;
|
|
778
|
+
query: string;
|
|
779
|
+
sourceListItem: import("@atlaskit/editor-common/types").TypeAheadItem[];
|
|
780
|
+
mode?: import("@atlaskit/editor-common/type-ahead").SelectItemMode | undefined;
|
|
781
|
+
}) => boolean;
|
|
782
|
+
findHandlerByTrigger: (trigger: string) => import("@atlaskit/editor-common/types").TypeAheadHandler | null;
|
|
783
|
+
open: (props: {
|
|
628
784
|
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
629
785
|
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
630
786
|
query?: string | undefined;
|
|
631
|
-
}) =>
|
|
787
|
+
}) => boolean;
|
|
788
|
+
close: (props: {
|
|
789
|
+
insertCurrentQueryAsRawText: boolean;
|
|
790
|
+
attachCommand?: import("@atlaskit/editor-common/types").Command | undefined;
|
|
791
|
+
}) => boolean;
|
|
792
|
+
openAtTransaction: (props: {
|
|
793
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
794
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
795
|
+
query?: string | undefined;
|
|
796
|
+
}) => (tr: import("prosemirror-state").Transaction) => boolean;
|
|
632
797
|
};
|
|
633
798
|
}, TypeAheadPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"quickInsert", {
|
|
634
799
|
pluginConfiguration: QuickInsertPluginOptions | undefined;
|
|
635
|
-
|
|
800
|
+
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
801
|
+
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
802
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
803
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
804
|
+
sharedState: {
|
|
805
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
806
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
807
|
+
};
|
|
808
|
+
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
809
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
810
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
811
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>];
|
|
812
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
813
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
|
|
814
|
+
sharedState: {
|
|
815
|
+
query: string;
|
|
816
|
+
};
|
|
817
|
+
actions: {
|
|
818
|
+
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
819
|
+
isAllowed: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
820
|
+
insert: (props: {
|
|
821
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
822
|
+
contentItem: import("@atlaskit/editor-common/types").TypeAheadItem;
|
|
823
|
+
query: string;
|
|
824
|
+
sourceListItem: import("@atlaskit/editor-common/types").TypeAheadItem[];
|
|
825
|
+
mode?: import("@atlaskit/editor-common/type-ahead").SelectItemMode | undefined;
|
|
826
|
+
}) => boolean;
|
|
827
|
+
findHandlerByTrigger: (trigger: string) => import("@atlaskit/editor-common/types").TypeAheadHandler | null;
|
|
828
|
+
open: (props: {
|
|
829
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
830
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
831
|
+
query?: string | undefined;
|
|
832
|
+
}) => boolean;
|
|
833
|
+
close: (props: {
|
|
834
|
+
insertCurrentQueryAsRawText: boolean;
|
|
835
|
+
attachCommand?: import("@atlaskit/editor-common/types").Command | undefined;
|
|
836
|
+
}) => boolean;
|
|
837
|
+
openAtTransaction: (props: {
|
|
838
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
839
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
840
|
+
query?: string | undefined;
|
|
841
|
+
}) => (tr: import("prosemirror-state").Transaction) => boolean;
|
|
842
|
+
};
|
|
843
|
+
}, TypeAheadPluginOptions | undefined>];
|
|
844
|
+
sharedState: import("@atlaskit/editor-plugin-quick-insert").QuickInsertSharedState | null;
|
|
636
845
|
actions: {
|
|
846
|
+
openTypeAhead: (inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod) => boolean;
|
|
637
847
|
insertItem: (item: import("@atlaskit/editor-common/provider-factory").QuickInsertItem) => import("@atlaskit/editor-common/types").Command;
|
|
638
848
|
getSuggestions: (searchOptions: import("@atlaskit/editor-common/types").QuickInsertSearchOptions) => import("@atlaskit/editor-common/provider-factory").QuickInsertItem[];
|
|
639
849
|
};
|
|
@@ -42,4 +42,3 @@ export { default as avatarGroupPlugin } from './avatar-group';
|
|
|
42
42
|
export { default as viewUpdateSubscriptionPlugin } from './view-update-subscription';
|
|
43
43
|
export { default as beforePrimaryToolbarPlugin } from './before-primaryToolbar';
|
|
44
44
|
export { default as codeBidiWarningPlugin } from './code-bidi-warning';
|
|
45
|
-
export { default as borderPlugin } from './border';
|
|
@@ -13,6 +13,7 @@ import type codeBlockPlugin from '../code-block';
|
|
|
13
13
|
import type panelPlugin from '../panel';
|
|
14
14
|
import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
15
15
|
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
16
|
+
import type { MentionPlugin } from '../mentions';
|
|
16
17
|
export type InsertBlockPluginDependencies = [
|
|
17
18
|
FeatureFlagsPlugin,
|
|
18
19
|
OptionalPlugin<typeof tablesPlugin>,
|
|
@@ -27,5 +28,6 @@ export type InsertBlockPluginDependencies = [
|
|
|
27
28
|
OptionalPlugin<RulePlugin>,
|
|
28
29
|
OptionalPlugin<typeof codeBlockPlugin>,
|
|
29
30
|
OptionalPlugin<typeof panelPlugin>,
|
|
30
|
-
OptionalPlugin<MediaPlugin
|
|
31
|
+
OptionalPlugin<MediaPlugin>,
|
|
32
|
+
OptionalPlugin<MentionPlugin>
|
|
31
33
|
];
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { MentionPluginOptions, MentionPluginState } from './types';
|
|
3
3
|
import { mentionPluginKey } from './pm-plugins/key';
|
|
4
4
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
|
-
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
5
|
+
import type { TypeAheadPlugin, TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
|
|
6
6
|
export { mentionPluginKey };
|
|
7
|
-
|
|
7
|
+
export type MentionSharedState = MentionPluginState & {
|
|
8
|
+
typeAheadHandler: TypeAheadHandler;
|
|
9
|
+
};
|
|
10
|
+
export type MentionPlugin = NextEditorPlugin<'mention', {
|
|
8
11
|
pluginConfiguration: MentionPluginOptions | undefined;
|
|
9
12
|
dependencies: [OptionalPlugin<typeof analyticsPlugin>, TypeAheadPlugin];
|
|
10
|
-
sharedState:
|
|
13
|
+
sharedState: MentionSharedState | undefined;
|
|
14
|
+
actions: {
|
|
15
|
+
openTypeAhead: (inputMethod: TypeAheadInputMethod) => boolean;
|
|
16
|
+
};
|
|
11
17
|
}>;
|
|
18
|
+
declare const mentionsPlugin: MentionPlugin;
|
|
12
19
|
export default mentionsPlugin;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
4
|
interface Props {
|
|
5
|
+
onInsertMention: () => void;
|
|
5
6
|
editorView?: EditorView;
|
|
6
7
|
isDisabled?: boolean;
|
|
7
8
|
testId?: string;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { Dispatch } from '../../event-dispatcher';
|
|
4
4
|
import type { PlaceholderTextOptions, PluginState } from './types';
|
|
5
5
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
|
-
|
|
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: [OptionalPlugin<typeof analyticsPlugin>, TypeAheadPlugin];
|
|
10
|
+
pluginConfiguration: PlaceholderTextOptions;
|
|
11
|
+
}>;
|
|
7
12
|
declare const placeholderTextPlugin: NextEditorPlugin<'placeholderText', {
|
|
8
|
-
dependencies: [OptionalPlugin<typeof analyticsPlugin
|
|
13
|
+
dependencies: [OptionalPlugin<typeof analyticsPlugin>, TypeAheadPlugin];
|
|
9
14
|
pluginConfiguration: PlaceholderTextOptions;
|
|
10
15
|
}>;
|
|
11
16
|
export default placeholderTextPlugin;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
2
|
import type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
|
|
4
3
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
5
4
|
import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
|
|
@@ -14,14 +13,13 @@ type InsertItemProps = {
|
|
|
14
13
|
query: string;
|
|
15
14
|
sourceListItem: TypeAheadItem[];
|
|
16
15
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
16
|
+
/**
|
|
17
|
+
* Please do not use it. Ping #help-editor and talk to the Lego team before use it.
|
|
18
|
+
*
|
|
19
|
+
* @private
|
|
20
|
+
* @deprecated
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
25
23
|
export declare const createTypeAheadTools: (editorView: EditorView) => {
|
|
26
24
|
isOpen: () => TypeAheadHandler | false;
|
|
27
25
|
currentQuery: () => string | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
4
3
|
import type { TypeAheadHandler, TypeAheadItem } from './types';
|
|
5
4
|
import type { IntlShape } from 'react-intl-next';
|
|
6
5
|
export declare const isTypeAheadHandler: (handler: any) => handler is TypeAheadHandler;
|
|
@@ -10,7 +9,7 @@ export declare const getPluginState: (editorState: EditorState) => import("./typ
|
|
|
10
9
|
export declare const getTypeAheadHandler: (editorState: EditorState) => TypeAheadHandler | undefined;
|
|
11
10
|
export declare const getTypeAheadQuery: (editorState: EditorState) => string | undefined;
|
|
12
11
|
export declare const isTypeAheadAllowed: (state: EditorState) => boolean;
|
|
13
|
-
export declare const findHandler: (id:
|
|
12
|
+
export declare const findHandler: (id: string, state: EditorState) => TypeAheadHandler | null;
|
|
14
13
|
export declare const findHandlerByTrigger: ({ trigger, editorState, }: {
|
|
15
14
|
trigger: string;
|
|
16
15
|
editorState: EditorState;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const undoRedoPlugin:
|
|
1
|
+
import type { UndoRedoPlugin } from './types';
|
|
2
|
+
declare const undoRedoPlugin: UndoRedoPlugin;
|
|
3
3
|
export default undoRedoPlugin;
|
|
@@ -4,6 +4,8 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { HistoryPluginState } from '../../../history/types';
|
|
7
|
+
import type { UndoRedoPlugin } from '../../types';
|
|
8
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
9
|
export interface Props {
|
|
8
10
|
undoDisabled?: boolean;
|
|
9
11
|
redoDisabled?: boolean;
|
|
@@ -11,6 +13,7 @@ export interface Props {
|
|
|
11
13
|
isReducedSpacing?: boolean;
|
|
12
14
|
historyState: HistoryPluginState;
|
|
13
15
|
editorView: EditorView;
|
|
16
|
+
api: ExtractInjectionAPI<UndoRedoPlugin> | undefined;
|
|
14
17
|
}
|
|
15
18
|
export declare class ToolbarUndoRedo extends PureComponent<Props & WrappedComponentProps> {
|
|
16
19
|
render(): jsx.JSX.Element;
|
|
@@ -6,7 +6,6 @@ import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
|
6
6
|
import type { AllEditorPresetPluginTypes, ReactHookFactory, UIComponentFactory } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { LightPMPlugin, LightPMPluginFactoryParams, OnEditorViewStateUpdated } from './create-editor/get-plugins';
|
|
8
8
|
import type { MarkConfig, NodeConfig } from './types/pm-config';
|
|
9
|
-
export { createTypeAheadTools } from './plugins/type-ahead/api';
|
|
10
9
|
export type { LightEditorPlugin } from './create-editor/get-plugins';
|
|
11
10
|
export type { DispatchAnalyticsEvent } from './plugins/analytics/types';
|
|
12
11
|
export type { FeatureFlags } from './types/feature-flags';
|