@atlaskit/editor-plugin-insert-block 1.9.2 → 1.10.1

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 (61) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/cjs/assets/action-list.js +79 -0
  3. package/dist/cjs/assets/approvals-tracker.js +66 -0
  4. package/dist/cjs/assets/decision-matrix.js +82 -0
  5. package/dist/cjs/assets/discussion-notes.js +82 -0
  6. package/dist/cjs/assets/expand.js +4 -3
  7. package/dist/cjs/assets/instructions-outline.js +73 -0
  8. package/dist/cjs/assets/switch.js +15 -19
  9. package/dist/cjs/assets/use-icon-themed.js +19 -0
  10. package/dist/cjs/plugin.js +35 -6
  11. package/dist/cjs/ui/ToolbarInsertBlock/dropdown-button.js +9 -23
  12. package/dist/cjs/ui/ToolbarInsertBlock/item.js +23 -36
  13. package/dist/cjs/ui/templateOptions.js +70 -0
  14. package/dist/cjs/ui/transformOptions.js +5 -1
  15. package/dist/es2019/assets/action-list.js +73 -0
  16. package/dist/es2019/assets/approvals-tracker.js +60 -0
  17. package/dist/es2019/assets/decision-matrix.js +76 -0
  18. package/dist/es2019/assets/discussion-notes.js +76 -0
  19. package/dist/es2019/assets/expand.js +5 -3
  20. package/dist/es2019/assets/instructions-outline.js +67 -0
  21. package/dist/es2019/assets/switch.js +14 -19
  22. package/dist/es2019/assets/use-icon-themed.js +15 -0
  23. package/dist/es2019/plugin.js +37 -10
  24. package/dist/es2019/ui/ToolbarInsertBlock/dropdown-button.js +7 -21
  25. package/dist/es2019/ui/ToolbarInsertBlock/item.js +20 -33
  26. package/dist/es2019/ui/templateOptions.js +53 -0
  27. package/dist/es2019/ui/transformOptions.js +5 -1
  28. package/dist/esm/assets/action-list.js +72 -0
  29. package/dist/esm/assets/approvals-tracker.js +59 -0
  30. package/dist/esm/assets/decision-matrix.js +75 -0
  31. package/dist/esm/assets/discussion-notes.js +75 -0
  32. package/dist/esm/assets/expand.js +4 -3
  33. package/dist/esm/assets/instructions-outline.js +66 -0
  34. package/dist/esm/assets/switch.js +14 -19
  35. package/dist/esm/assets/use-icon-themed.js +14 -0
  36. package/dist/esm/plugin.js +35 -6
  37. package/dist/esm/ui/ToolbarInsertBlock/dropdown-button.js +7 -21
  38. package/dist/esm/ui/ToolbarInsertBlock/item.js +20 -33
  39. package/dist/esm/ui/templateOptions.js +63 -0
  40. package/dist/esm/ui/transformOptions.js +5 -1
  41. package/dist/types/assets/action-list.d.ts +2 -0
  42. package/dist/types/assets/approvals-tracker.d.ts +2 -0
  43. package/dist/types/assets/decision-matrix.d.ts +2 -0
  44. package/dist/types/assets/discussion-notes.d.ts +2 -0
  45. package/dist/types/assets/expand.d.ts +3 -1
  46. package/dist/types/assets/instructions-outline.d.ts +2 -0
  47. package/dist/types/assets/switch.d.ts +6 -2
  48. package/dist/types/assets/use-icon-themed.d.ts +6 -0
  49. package/dist/types/ui/templateOptions.d.ts +2 -0
  50. package/dist/types/ui/transformOptions.d.ts +4 -1
  51. package/dist/types-ts4.5/assets/action-list.d.ts +2 -0
  52. package/dist/types-ts4.5/assets/approvals-tracker.d.ts +2 -0
  53. package/dist/types-ts4.5/assets/decision-matrix.d.ts +2 -0
  54. package/dist/types-ts4.5/assets/discussion-notes.d.ts +2 -0
  55. package/dist/types-ts4.5/assets/expand.d.ts +3 -1
  56. package/dist/types-ts4.5/assets/instructions-outline.d.ts +2 -0
  57. package/dist/types-ts4.5/assets/switch.d.ts +6 -2
  58. package/dist/types-ts4.5/assets/use-icon-themed.d.ts +6 -0
  59. package/dist/types-ts4.5/ui/templateOptions.d.ts +2 -0
  60. package/dist/types-ts4.5/ui/transformOptions.d.ts +4 -1
  61. package/package.json +8 -14
@@ -0,0 +1,63 @@
1
+ import React from 'react';
2
+ import ActionListIcon from '../assets/action-list';
3
+ import ApprovalsTrackerIcon from '../assets/approvals-tracker';
4
+ import DecisionMatrixIcon from '../assets/decision-matrix';
5
+ import DiscussionNotesIcon from '../assets/discussion-notes';
6
+ import InstructionsOutlineIcon from '../assets/instructions-outline';
7
+ export var templateOptions = [{
8
+ title: 'Discussion notes',
9
+ description: 'Record discussion points and action items',
10
+ keywords: ['decisions', 'summary', 'meeting', 'chat', 'debrief', 'track', 'keep track', 'tasks', 'outstanding items', 'owners'],
11
+ // Place templates right after AI item
12
+ priority: 99,
13
+ icon: function icon() {
14
+ return /*#__PURE__*/React.createElement(DiscussionNotesIcon, null);
15
+ },
16
+ action: function action() {
17
+ return false;
18
+ }
19
+ }, {
20
+ title: 'Approvals tracker',
21
+ description: 'Track reviewer approvals and dates',
22
+ keywords: ['reviews', 'requests', 'rejected requests', 'review dates', 'timeline', 'checklist', 'sme timeline', 'sme requests', 'sme check', 'table'],
23
+ priority: 99,
24
+ icon: function icon() {
25
+ return /*#__PURE__*/React.createElement(ApprovalsTrackerIcon, null);
26
+ },
27
+ action: function action() {
28
+ return false;
29
+ }
30
+ }, {
31
+ title: 'Decision matrix',
32
+ description: 'Compare options and make recommendations',
33
+ keywords: ['pros', 'cons', 'recommended', 'rationale', 'evaluation', 'options', 'choice', 'table'],
34
+ priority: 99,
35
+ icon: function icon() {
36
+ return /*#__PURE__*/React.createElement(DecisionMatrixIcon, null);
37
+ },
38
+ action: function action() {
39
+ return false;
40
+ }
41
+ }, {
42
+ title: 'List of actions',
43
+ description: 'Track tasks, assignees and deadlines',
44
+ keywords: ['checklist', 'check', 'items', 'shopping list', 'jtbd', 'jobs to be done', 'due date', 'progress', 'task', 'tasks', 'prioritization', 'timeline', 'approvals', 'reviewers', 'review date'],
45
+ priority: 99,
46
+ icon: function icon() {
47
+ return /*#__PURE__*/React.createElement(ActionListIcon, null);
48
+ },
49
+ action: function action() {
50
+ return false;
51
+ }
52
+ }, {
53
+ title: 'Instructions outline',
54
+ description: 'Detailed steps for any process',
55
+ keywords: ['steps', 'manual', 'tasks', 'jobs to be done', 'jtbd', 'how-to', 'guide', 'journey', 'checklist', 'tutorial', 'map', 'brochure', 'columns', 'layout', 'help'],
56
+ priority: 99,
57
+ icon: function icon() {
58
+ return /*#__PURE__*/React.createElement(InstructionsOutlineIcon, null);
59
+ },
60
+ action: function action() {
61
+ return false;
62
+ }
63
+ }];
@@ -3,21 +3,25 @@ import EditorCodeIcon from '@atlaskit/icon/glyph/editor/code';
3
3
  import EditorInfoIcon from '@atlaskit/icon/glyph/editor/info';
4
4
  import QuoteIcon from '@atlaskit/icon/glyph/quote';
5
5
  import ExpandIcon from '../assets/expand';
6
- export var transformationOptions = function transformationOptions(api) {
6
+ export var transformationOptions = function transformationOptions(api, schema) {
7
7
  var _api$panel, _api$expand, _api$codeBlock, _api$blockType;
8
8
  return [{
9
+ type: schema.nodes.panel,
9
10
  title: messages.panel,
10
11
  icon: EditorInfoIcon,
11
12
  command: api === null || api === void 0 || (_api$panel = api.panel) === null || _api$panel === void 0 ? void 0 : _api$panel.actions.insertPanel
12
13
  }, {
14
+ type: schema.nodes.expand,
13
15
  title: toolbarMessages.expand,
14
16
  icon: ExpandIcon,
15
17
  command: api === null || api === void 0 || (_api$expand = api.expand) === null || _api$expand === void 0 ? void 0 : _api$expand.actions.insertExpandWithInputMethod
16
18
  }, {
19
+ type: schema.nodes.codeBlock,
17
20
  title: messages.codeblock,
18
21
  icon: EditorCodeIcon,
19
22
  command: api === null || api === void 0 || (_api$codeBlock = api.codeBlock) === null || _api$codeBlock === void 0 ? void 0 : _api$codeBlock.actions.insertCodeBlock
20
23
  }, {
24
+ type: schema.nodes.blockquote,
21
25
  title: messages.blockquote,
22
26
  icon: QuoteIcon,
23
27
  command: api === null || api === void 0 || (_api$blockType = api.blockType) === null || _api$blockType === void 0 ? void 0 : _api$blockType.actions.insertBlockQuote
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function ActionListIcon(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function ApprovalsTrackerIcon(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function DecisionMatrixIcon(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function DiscussionNotesIcon(): JSX.Element;
@@ -3,4 +3,6 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { jsx } from '@emotion/react';
6
- export default function ExpandIcon(): jsx.JSX.Element;
6
+ export default function ExpandIcon({ disabled }: {
7
+ disabled?: boolean;
8
+ }): jsx.JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function InstructionsOutlineIcon(): JSX.Element;
@@ -1,2 +1,6 @@
1
- /// <reference types="react" />
2
- export default function SwitchIcon(): JSX.Element;
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { jsx } from '@emotion/react';
6
+ export default function SwitchIcon(): jsx.JSX.Element;
@@ -0,0 +1,6 @@
1
+ export declare const useIconThemed: () => {
2
+ iconThemed: (colors: {
3
+ light: string;
4
+ dark: string;
5
+ }) => string;
6
+ };
@@ -0,0 +1,2 @@
1
+ import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
2
+ export declare const templateOptions: QuickInsertItem[];
@@ -1,8 +1,10 @@
1
1
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
+ import { type Schema } from '@atlaskit/editor-prosemirror/model';
2
3
  import QuoteIcon from '@atlaskit/icon/glyph/quote';
3
4
  import ExpandIcon from '../assets/expand';
4
5
  import type { InsertBlockPlugin } from '../plugin';
5
- export declare const transformationOptions: (api: ExtractInjectionAPI<InsertBlockPlugin> | undefined) => ({
6
+ export declare const transformationOptions: (api: ExtractInjectionAPI<InsertBlockPlugin> | undefined, schema: Schema) => ({
7
+ type: import("prosemirror-model").NodeType;
6
8
  title: {
7
9
  id: string;
8
10
  defaultMessage: string;
@@ -11,6 +13,7 @@ export declare const transformationOptions: (api: ExtractInjectionAPI<InsertBloc
11
13
  icon: typeof ExpandIcon;
12
14
  command: ((inputMethod: import("@atlaskit/editor-plugin-expand").InsertMethod) => import("@atlaskit/editor-common/types").Command) | undefined;
13
15
  } | {
16
+ type: import("prosemirror-model").NodeType;
14
17
  title: {
15
18
  id: string;
16
19
  defaultMessage: string;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function ActionListIcon(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function ApprovalsTrackerIcon(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function DecisionMatrixIcon(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function DiscussionNotesIcon(): JSX.Element;
@@ -3,4 +3,6 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { jsx } from '@emotion/react';
6
- export default function ExpandIcon(): jsx.JSX.Element;
6
+ export default function ExpandIcon({ disabled }: {
7
+ disabled?: boolean;
8
+ }): jsx.JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function InstructionsOutlineIcon(): JSX.Element;
@@ -1,2 +1,6 @@
1
- /// <reference types="react" />
2
- export default function SwitchIcon(): JSX.Element;
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { jsx } from '@emotion/react';
6
+ export default function SwitchIcon(): jsx.JSX.Element;
@@ -0,0 +1,6 @@
1
+ export declare const useIconThemed: () => {
2
+ iconThemed: (colors: {
3
+ light: string;
4
+ dark: string;
5
+ }) => string;
6
+ };
@@ -0,0 +1,2 @@
1
+ import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
2
+ export declare const templateOptions: QuickInsertItem[];
@@ -1,8 +1,10 @@
1
1
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
+ import { type Schema } from '@atlaskit/editor-prosemirror/model';
2
3
  import QuoteIcon from '@atlaskit/icon/glyph/quote';
3
4
  import ExpandIcon from '../assets/expand';
4
5
  import type { InsertBlockPlugin } from '../plugin';
5
- export declare const transformationOptions: (api: ExtractInjectionAPI<InsertBlockPlugin> | undefined) => ({
6
+ export declare const transformationOptions: (api: ExtractInjectionAPI<InsertBlockPlugin> | undefined, schema: Schema) => ({
7
+ type: import("prosemirror-model").NodeType;
6
8
  title: {
7
9
  id: string;
8
10
  defaultMessage: string;
@@ -11,6 +13,7 @@ export declare const transformationOptions: (api: ExtractInjectionAPI<InsertBloc
11
13
  icon: typeof ExpandIcon;
12
14
  command: ((inputMethod: import("@atlaskit/editor-plugin-expand").InsertMethod) => import("@atlaskit/editor-common/types").Command) | undefined;
13
15
  } | {
16
+ type: import("prosemirror-model").NodeType;
14
17
  title: {
15
18
  id: string;
16
19
  defaultMessage: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-insert-block",
3
- "version": "1.9.2",
3
+ "version": "1.10.1",
4
4
  "description": "Insert block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,20 +33,20 @@
33
33
  ".": "./src/index.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/editor-common": "^88.0.0",
36
+ "@atlaskit/editor-common": "^88.4.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.8.0",
38
- "@atlaskit/editor-plugin-block-type": "^3.13.0",
38
+ "@atlaskit/editor-plugin-block-type": "^3.14.0",
39
39
  "@atlaskit/editor-plugin-code-block": "^3.3.0",
40
40
  "@atlaskit/editor-plugin-date": "^2.3.0",
41
41
  "@atlaskit/editor-plugin-emoji": "^2.3.0",
42
- "@atlaskit/editor-plugin-expand": "^2.5.0",
42
+ "@atlaskit/editor-plugin-expand": "^2.6.0",
43
43
  "@atlaskit/editor-plugin-extension": "^1.14.0",
44
44
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
45
- "@atlaskit/editor-plugin-hyperlink": "^2.8.0",
45
+ "@atlaskit/editor-plugin-hyperlink": "^2.9.0",
46
46
  "@atlaskit/editor-plugin-image-upload": "^1.2.0",
47
47
  "@atlaskit/editor-plugin-layout": "^1.7.0",
48
48
  "@atlaskit/editor-plugin-media": "^1.29.0",
49
- "@atlaskit/editor-plugin-mentions": "^2.4.0",
49
+ "@atlaskit/editor-plugin-mentions": "^2.5.0",
50
50
  "@atlaskit/editor-plugin-panel": "^2.3.0",
51
51
  "@atlaskit/editor-plugin-placeholder-text": "^1.7.0",
52
52
  "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
@@ -59,11 +59,10 @@
59
59
  "@atlaskit/editor-prosemirror": "5.0.1",
60
60
  "@atlaskit/editor-shared-styles": "^2.13.0",
61
61
  "@atlaskit/emoji": "^67.7.0",
62
- "@atlaskit/icon": "^22.14.0",
63
- "@atlaskit/platform-feature-flags": "^0.3.0",
62
+ "@atlaskit/icon": "^22.15.0",
64
63
  "@atlaskit/primitives": "^12.0.0",
65
64
  "@atlaskit/theme": "^13.0.0",
66
- "@atlaskit/tmp-editor-statsig": "^1.2.0",
65
+ "@atlaskit/tmp-editor-statsig": "^1.4.0",
67
66
  "@atlaskit/tokens": "^1.59.0",
68
67
  "@babel/runtime": "^7.0.0",
69
68
  "@emotion/react": "^11.7.1",
@@ -117,10 +116,5 @@
117
116
  "import-no-extraneous-disable-for-examples-and-docs"
118
117
  ]
119
118
  }
120
- },
121
- "platform-feature-flags": {
122
- "platform_editor_migration_icon_and_typography": {
123
- "type": "boolean"
124
- }
125
119
  }
126
120
  }