@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
|
@@ -363,38 +363,157 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
363
363
|
}, undefined>,
|
|
364
364
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
365
365
|
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
366
|
+
dependencies: [
|
|
367
|
+
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: [
|
|
374
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
375
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
376
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
377
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>
|
|
378
|
+
];
|
|
379
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
380
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
381
|
+
];
|
|
382
|
+
sharedState: {
|
|
383
|
+
query: string;
|
|
384
|
+
};
|
|
366
385
|
actions: {
|
|
367
386
|
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
368
387
|
isAllowed: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
388
|
+
insert: (props: {
|
|
389
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
390
|
+
contentItem: import("@atlaskit/editor-common/types").TypeAheadItem;
|
|
391
|
+
query: string;
|
|
392
|
+
sourceListItem: import("@atlaskit/editor-common/types").TypeAheadItem[];
|
|
393
|
+
mode?: import("@atlaskit/editor-common/type-ahead").SelectItemMode | undefined;
|
|
394
|
+
}) => boolean;
|
|
395
|
+
findHandlerByTrigger: (trigger: string) => import("@atlaskit/editor-common/types").TypeAheadHandler | null;
|
|
396
|
+
open: (props: {
|
|
372
397
|
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
373
398
|
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
374
399
|
query?: string | undefined;
|
|
375
|
-
}) =>
|
|
400
|
+
}) => boolean;
|
|
401
|
+
close: (props: {
|
|
402
|
+
insertCurrentQueryAsRawText: boolean;
|
|
403
|
+
attachCommand?: import("@atlaskit/editor-common/types").Command | undefined;
|
|
404
|
+
}) => boolean;
|
|
405
|
+
openAtTransaction: (props: {
|
|
406
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
407
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
408
|
+
query?: string | undefined;
|
|
409
|
+
}) => (tr: import("prosemirror-state").Transaction) => boolean;
|
|
376
410
|
};
|
|
377
411
|
}, TypeAheadPluginOptions | undefined>
|
|
378
412
|
];
|
|
379
413
|
}, PlaceholderPluginOptions | undefined>,
|
|
380
414
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
381
415
|
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
416
|
+
dependencies: [
|
|
417
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
418
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
419
|
+
sharedState: {
|
|
420
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
421
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
422
|
+
};
|
|
423
|
+
dependencies: [
|
|
424
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
425
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
426
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
427
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>
|
|
428
|
+
];
|
|
429
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
430
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
431
|
+
];
|
|
432
|
+
sharedState: {
|
|
433
|
+
query: string;
|
|
434
|
+
};
|
|
382
435
|
actions: {
|
|
383
436
|
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
384
437
|
isAllowed: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
438
|
+
insert: (props: {
|
|
439
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
440
|
+
contentItem: import("@atlaskit/editor-common/types").TypeAheadItem;
|
|
441
|
+
query: string;
|
|
442
|
+
sourceListItem: import("@atlaskit/editor-common/types").TypeAheadItem[];
|
|
443
|
+
mode?: import("@atlaskit/editor-common/type-ahead").SelectItemMode | undefined;
|
|
444
|
+
}) => boolean;
|
|
445
|
+
findHandlerByTrigger: (trigger: string) => import("@atlaskit/editor-common/types").TypeAheadHandler | null;
|
|
446
|
+
open: (props: {
|
|
447
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
448
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
449
|
+
query?: string | undefined;
|
|
450
|
+
}) => boolean;
|
|
451
|
+
close: (props: {
|
|
452
|
+
insertCurrentQueryAsRawText: boolean;
|
|
453
|
+
attachCommand?: import("@atlaskit/editor-common/types").Command | undefined;
|
|
454
|
+
}) => boolean;
|
|
455
|
+
openAtTransaction: (props: {
|
|
388
456
|
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
389
457
|
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
390
458
|
query?: string | undefined;
|
|
391
|
-
}) => import("
|
|
459
|
+
}) => (tr: import("prosemirror-state").Transaction) => boolean;
|
|
392
460
|
};
|
|
393
461
|
}, TypeAheadPluginOptions | undefined>,
|
|
394
462
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"quickInsert", {
|
|
395
463
|
pluginConfiguration: QuickInsertPluginOptions | undefined;
|
|
396
|
-
|
|
464
|
+
dependencies: [
|
|
465
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
466
|
+
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
467
|
+
dependencies: [
|
|
468
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
469
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
470
|
+
sharedState: {
|
|
471
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
472
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
473
|
+
};
|
|
474
|
+
dependencies: [
|
|
475
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
476
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
477
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
478
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>
|
|
479
|
+
];
|
|
480
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
481
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
482
|
+
];
|
|
483
|
+
sharedState: {
|
|
484
|
+
query: string;
|
|
485
|
+
};
|
|
486
|
+
actions: {
|
|
487
|
+
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
488
|
+
isAllowed: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
489
|
+
insert: (props: {
|
|
490
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
491
|
+
contentItem: import("@atlaskit/editor-common/types").TypeAheadItem;
|
|
492
|
+
query: string;
|
|
493
|
+
sourceListItem: import("@atlaskit/editor-common/types").TypeAheadItem[];
|
|
494
|
+
mode?: import("@atlaskit/editor-common/type-ahead").SelectItemMode | undefined;
|
|
495
|
+
}) => boolean;
|
|
496
|
+
findHandlerByTrigger: (trigger: string) => import("@atlaskit/editor-common/types").TypeAheadHandler | null;
|
|
497
|
+
open: (props: {
|
|
498
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
499
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
500
|
+
query?: string | undefined;
|
|
501
|
+
}) => boolean;
|
|
502
|
+
close: (props: {
|
|
503
|
+
insertCurrentQueryAsRawText: boolean;
|
|
504
|
+
attachCommand?: import("@atlaskit/editor-common/types").Command | undefined;
|
|
505
|
+
}) => boolean;
|
|
506
|
+
openAtTransaction: (props: {
|
|
507
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
508
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
509
|
+
query?: string | undefined;
|
|
510
|
+
}) => (tr: import("prosemirror-state").Transaction) => boolean;
|
|
511
|
+
};
|
|
512
|
+
}, TypeAheadPluginOptions | undefined>
|
|
513
|
+
];
|
|
514
|
+
sharedState: import("@atlaskit/editor-plugin-quick-insert").QuickInsertSharedState | null;
|
|
397
515
|
actions: {
|
|
516
|
+
openTypeAhead: (inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod) => boolean;
|
|
398
517
|
insertItem: (item: import("@atlaskit/editor-common/provider-factory").QuickInsertItem) => import("@atlaskit/editor-common/types").Command;
|
|
399
518
|
getSuggestions: (searchOptions: import("@atlaskit/editor-common/types").QuickInsertSearchOptions) => import("@atlaskit/editor-common/provider-factory").QuickInsertItem[];
|
|
400
519
|
};
|
|
@@ -798,38 +917,157 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
798
917
|
}, undefined>,
|
|
799
918
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
800
919
|
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
920
|
+
dependencies: [
|
|
921
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
922
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
923
|
+
sharedState: {
|
|
924
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
925
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
926
|
+
};
|
|
927
|
+
dependencies: [
|
|
928
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
929
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
930
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
931
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>
|
|
932
|
+
];
|
|
933
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
934
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
935
|
+
];
|
|
936
|
+
sharedState: {
|
|
937
|
+
query: string;
|
|
938
|
+
};
|
|
801
939
|
actions: {
|
|
802
940
|
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
803
941
|
isAllowed: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
942
|
+
insert: (props: {
|
|
943
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
944
|
+
contentItem: import("@atlaskit/editor-common/types").TypeAheadItem;
|
|
945
|
+
query: string;
|
|
946
|
+
sourceListItem: import("@atlaskit/editor-common/types").TypeAheadItem[];
|
|
947
|
+
mode?: import("@atlaskit/editor-common/type-ahead").SelectItemMode | undefined;
|
|
948
|
+
}) => boolean;
|
|
949
|
+
findHandlerByTrigger: (trigger: string) => import("@atlaskit/editor-common/types").TypeAheadHandler | null;
|
|
950
|
+
open: (props: {
|
|
807
951
|
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
808
952
|
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
809
953
|
query?: string | undefined;
|
|
810
|
-
}) =>
|
|
954
|
+
}) => boolean;
|
|
955
|
+
close: (props: {
|
|
956
|
+
insertCurrentQueryAsRawText: boolean;
|
|
957
|
+
attachCommand?: import("@atlaskit/editor-common/types").Command | undefined;
|
|
958
|
+
}) => boolean;
|
|
959
|
+
openAtTransaction: (props: {
|
|
960
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
961
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
962
|
+
query?: string | undefined;
|
|
963
|
+
}) => (tr: import("prosemirror-state").Transaction) => boolean;
|
|
811
964
|
};
|
|
812
965
|
}, TypeAheadPluginOptions | undefined>
|
|
813
966
|
];
|
|
814
967
|
}, PlaceholderPluginOptions | undefined>,
|
|
815
968
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
816
969
|
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
970
|
+
dependencies: [
|
|
971
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
972
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
973
|
+
sharedState: {
|
|
974
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
975
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
976
|
+
};
|
|
977
|
+
dependencies: [
|
|
978
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
979
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
980
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
981
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>
|
|
982
|
+
];
|
|
983
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
984
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
985
|
+
];
|
|
986
|
+
sharedState: {
|
|
987
|
+
query: string;
|
|
988
|
+
};
|
|
817
989
|
actions: {
|
|
818
990
|
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
819
991
|
isAllowed: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
992
|
+
insert: (props: {
|
|
993
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
994
|
+
contentItem: import("@atlaskit/editor-common/types").TypeAheadItem;
|
|
995
|
+
query: string;
|
|
996
|
+
sourceListItem: import("@atlaskit/editor-common/types").TypeAheadItem[];
|
|
997
|
+
mode?: import("@atlaskit/editor-common/type-ahead").SelectItemMode | undefined;
|
|
998
|
+
}) => boolean;
|
|
999
|
+
findHandlerByTrigger: (trigger: string) => import("@atlaskit/editor-common/types").TypeAheadHandler | null;
|
|
1000
|
+
open: (props: {
|
|
1001
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
1002
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
1003
|
+
query?: string | undefined;
|
|
1004
|
+
}) => boolean;
|
|
1005
|
+
close: (props: {
|
|
1006
|
+
insertCurrentQueryAsRawText: boolean;
|
|
1007
|
+
attachCommand?: import("@atlaskit/editor-common/types").Command | undefined;
|
|
1008
|
+
}) => boolean;
|
|
1009
|
+
openAtTransaction: (props: {
|
|
823
1010
|
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
824
1011
|
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
825
1012
|
query?: string | undefined;
|
|
826
|
-
}) => import("
|
|
1013
|
+
}) => (tr: import("prosemirror-state").Transaction) => boolean;
|
|
827
1014
|
};
|
|
828
1015
|
}, TypeAheadPluginOptions | undefined>,
|
|
829
1016
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"quickInsert", {
|
|
830
1017
|
pluginConfiguration: QuickInsertPluginOptions | undefined;
|
|
831
|
-
|
|
1018
|
+
dependencies: [
|
|
1019
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
|
|
1020
|
+
pluginConfiguration: TypeAheadPluginOptions | undefined;
|
|
1021
|
+
dependencies: [
|
|
1022
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
1023
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
1024
|
+
sharedState: {
|
|
1025
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
1026
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
1027
|
+
};
|
|
1028
|
+
dependencies: [
|
|
1029
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
1030
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
1031
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
1032
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>
|
|
1033
|
+
];
|
|
1034
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
1035
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
1036
|
+
];
|
|
1037
|
+
sharedState: {
|
|
1038
|
+
query: string;
|
|
1039
|
+
};
|
|
1040
|
+
actions: {
|
|
1041
|
+
isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
1042
|
+
isAllowed: (editorState: import("prosemirror-state").EditorState) => boolean;
|
|
1043
|
+
insert: (props: {
|
|
1044
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
1045
|
+
contentItem: import("@atlaskit/editor-common/types").TypeAheadItem;
|
|
1046
|
+
query: string;
|
|
1047
|
+
sourceListItem: import("@atlaskit/editor-common/types").TypeAheadItem[];
|
|
1048
|
+
mode?: import("@atlaskit/editor-common/type-ahead").SelectItemMode | undefined;
|
|
1049
|
+
}) => boolean;
|
|
1050
|
+
findHandlerByTrigger: (trigger: string) => import("@atlaskit/editor-common/types").TypeAheadHandler | null;
|
|
1051
|
+
open: (props: {
|
|
1052
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
1053
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
1054
|
+
query?: string | undefined;
|
|
1055
|
+
}) => boolean;
|
|
1056
|
+
close: (props: {
|
|
1057
|
+
insertCurrentQueryAsRawText: boolean;
|
|
1058
|
+
attachCommand?: import("@atlaskit/editor-common/types").Command | undefined;
|
|
1059
|
+
}) => boolean;
|
|
1060
|
+
openAtTransaction: (props: {
|
|
1061
|
+
triggerHandler: import("@atlaskit/editor-common/types").TypeAheadHandler;
|
|
1062
|
+
inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod;
|
|
1063
|
+
query?: string | undefined;
|
|
1064
|
+
}) => (tr: import("prosemirror-state").Transaction) => boolean;
|
|
1065
|
+
};
|
|
1066
|
+
}, TypeAheadPluginOptions | undefined>
|
|
1067
|
+
];
|
|
1068
|
+
sharedState: import("@atlaskit/editor-plugin-quick-insert").QuickInsertSharedState | null;
|
|
832
1069
|
actions: {
|
|
1070
|
+
openTypeAhead: (inputMethod: import("@atlaskit/editor-plugin-type-ahead").TypeAheadInputMethod) => boolean;
|
|
833
1071
|
insertItem: (item: import("@atlaskit/editor-common/provider-factory").QuickInsertItem) => import("@atlaskit/editor-common/types").Command;
|
|
834
1072
|
getSuggestions: (searchOptions: import("@atlaskit/editor-common/types").QuickInsertSearchOptions) => import("@atlaskit/editor-common/provider-factory").QuickInsertItem[];
|
|
835
1073
|
};
|
|
@@ -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,15 +1,22 @@
|
|
|
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: [
|
|
10
13
|
OptionalPlugin<typeof analyticsPlugin>,
|
|
11
14
|
TypeAheadPlugin
|
|
12
15
|
];
|
|
13
|
-
sharedState:
|
|
16
|
+
sharedState: MentionSharedState | undefined;
|
|
17
|
+
actions: {
|
|
18
|
+
openTypeAhead: (inputMethod: TypeAheadInputMethod) => boolean;
|
|
19
|
+
};
|
|
14
20
|
}>;
|
|
21
|
+
declare const mentionsPlugin: MentionPlugin;
|
|
15
22
|
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,12 +1,21 @@
|
|
|
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: [
|
|
10
|
+
OptionalPlugin<typeof analyticsPlugin>,
|
|
11
|
+
TypeAheadPlugin
|
|
12
|
+
];
|
|
13
|
+
pluginConfiguration: PlaceholderTextOptions;
|
|
14
|
+
}>;
|
|
7
15
|
declare const placeholderTextPlugin: NextEditorPlugin<'placeholderText', {
|
|
8
16
|
dependencies: [
|
|
9
|
-
OptionalPlugin<typeof analyticsPlugin
|
|
17
|
+
OptionalPlugin<typeof analyticsPlugin>,
|
|
18
|
+
TypeAheadPlugin
|
|
10
19
|
];
|
|
11
20
|
pluginConfiguration: PlaceholderTextOptions;
|
|
12
21
|
}>;
|
|
@@ -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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "188.
|
|
3
|
+
"version": "188.4.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"@atlaskit/editor-plugin-analytics": "^0.2.0",
|
|
63
63
|
"@atlaskit/editor-plugin-base": "^0.2.0",
|
|
64
64
|
"@atlaskit/editor-plugin-block-type": "^2.0.0",
|
|
65
|
+
"@atlaskit/editor-plugin-border": "^0.1.0",
|
|
65
66
|
"@atlaskit/editor-plugin-caption": "^0.2.0",
|
|
66
67
|
"@atlaskit/editor-plugin-card": "^0.9.0",
|
|
67
68
|
"@atlaskit/editor-plugin-clipboard": "^0.1.0",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
"@atlaskit/editor-plugin-copy-button": "^1.0.0",
|
|
72
73
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
73
74
|
"@atlaskit/editor-plugin-editor-disabled": "^0.2.0",
|
|
74
|
-
"@atlaskit/editor-plugin-emoji": "^0.
|
|
75
|
+
"@atlaskit/editor-plugin-emoji": "^0.4.0",
|
|
75
76
|
"@atlaskit/editor-plugin-extension": "^0.2.0",
|
|
76
77
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
77
78
|
"@atlaskit/editor-plugin-floating-toolbar": "^0.6.0",
|
|
@@ -84,11 +85,11 @@
|
|
|
84
85
|
"@atlaskit/editor-plugin-list": "^1.3.0",
|
|
85
86
|
"@atlaskit/editor-plugin-media": "^0.3.0",
|
|
86
87
|
"@atlaskit/editor-plugin-placeholder": "^0.1.0",
|
|
87
|
-
"@atlaskit/editor-plugin-quick-insert": "^0.
|
|
88
|
+
"@atlaskit/editor-plugin-quick-insert": "^0.2.0",
|
|
88
89
|
"@atlaskit/editor-plugin-rule": "^0.1.0",
|
|
89
90
|
"@atlaskit/editor-plugin-table": "^4.1.0",
|
|
90
91
|
"@atlaskit/editor-plugin-text-formatting": "^0.4.0",
|
|
91
|
-
"@atlaskit/editor-plugin-type-ahead": "^0.
|
|
92
|
+
"@atlaskit/editor-plugin-type-ahead": "^0.5.0",
|
|
92
93
|
"@atlaskit/editor-plugin-unsupported-content": "^0.2.0",
|
|
93
94
|
"@atlaskit/editor-plugin-width": "^0.2.0",
|
|
94
95
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
@@ -173,7 +174,7 @@
|
|
|
173
174
|
"@atlaskit/webdriver-runner": "*",
|
|
174
175
|
"@atlassian/adf-schema-json": "^1.0.7",
|
|
175
176
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
176
|
-
"@atlassian/editor-extension-link-create": "^0.
|
|
177
|
+
"@atlassian/editor-extension-link-create": "^0.6.0",
|
|
177
178
|
"@atlassian/feature-flags-test-utils": "^0.1.1",
|
|
178
179
|
"@atlassian/link-picker-plugins": "^23.1.0",
|
|
179
180
|
"@atlassian/search-provider": "2.4.8",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _adfSchema = require("@atlaskit/adf-schema");
|
|
8
|
-
var borderPlugin = function borderPlugin() {
|
|
9
|
-
return {
|
|
10
|
-
name: 'border',
|
|
11
|
-
marks: function marks() {
|
|
12
|
-
return [{
|
|
13
|
-
name: 'border',
|
|
14
|
-
mark: _adfSchema.border
|
|
15
|
-
}];
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
var _default = exports.default = borderPlugin;
|