@atlaskit/editor-core 185.6.5 → 185.8.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.
Files changed (175) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/plugins/card/index.js +14 -0
  3. package/dist/cjs/plugins/card/nodeviews/datasource.js +2 -4
  4. package/dist/cjs/plugins/card/pm-plugins/main.js +2 -1
  5. package/dist/cjs/plugins/card/pm-plugins/mountHyperlink.js +46 -0
  6. package/dist/cjs/plugins/card/toolbar.js +4 -5
  7. package/dist/cjs/plugins/{hyperlink → card/ui}/HyperlinkToolbarAppearance.js +5 -3
  8. package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +24 -20
  9. package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +2 -2
  10. package/dist/cjs/plugins/card/ui/SmallerEditIcon.js +2 -2
  11. package/dist/cjs/plugins/card/utils.js +2 -30
  12. package/dist/cjs/plugins/hyperlink/Toolbar.js +18 -30
  13. package/dist/cjs/plugins/hyperlink/commands.js +7 -3
  14. package/dist/cjs/plugins/hyperlink/index.js +9 -2
  15. package/dist/cjs/plugins/hyperlink/pm-plugins/toolbar-buttons.js +41 -0
  16. package/dist/cjs/plugins/hyperlink/ui/EditorLinkPicker/index.js +6 -3
  17. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +8 -4
  18. package/dist/cjs/plugins/media/index.js +9 -1
  19. package/dist/cjs/plugins/media/toolbar/index.js +3 -3
  20. package/dist/cjs/plugins/media/utils/media-common.js +1 -1
  21. package/dist/cjs/plugins/paste/handlers.js +12 -12
  22. package/dist/cjs/plugins/paste/index.js +1 -1
  23. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +12 -8
  24. package/dist/cjs/plugins/paste/pm-plugins/main.js +18 -17
  25. package/dist/cjs/plugins/paste/util/index.js +29 -2
  26. package/dist/cjs/ui/ContentStyles/index.js +2 -4
  27. package/dist/cjs/version-wrapper.js +1 -1
  28. package/dist/cjs/version.json +1 -1
  29. package/dist/es2019/plugins/card/index.js +12 -0
  30. package/dist/es2019/plugins/card/nodeviews/datasource.js +1 -2
  31. package/dist/es2019/plugins/card/pm-plugins/main.js +2 -1
  32. package/dist/es2019/plugins/card/pm-plugins/mountHyperlink.js +36 -0
  33. package/dist/es2019/plugins/card/toolbar.js +4 -3
  34. package/dist/es2019/plugins/{hyperlink → card/ui}/HyperlinkToolbarAppearance.js +5 -3
  35. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +12 -13
  36. package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +1 -1
  37. package/dist/es2019/plugins/card/ui/SmallerEditIcon.js +1 -1
  38. package/dist/es2019/plugins/card/utils.js +0 -28
  39. package/dist/es2019/plugins/hyperlink/Toolbar.js +21 -30
  40. package/dist/es2019/plugins/hyperlink/commands.js +6 -3
  41. package/dist/es2019/plugins/hyperlink/index.js +9 -2
  42. package/dist/es2019/plugins/hyperlink/pm-plugins/toolbar-buttons.js +37 -0
  43. package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/index.js +11 -4
  44. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +13 -5
  45. package/dist/es2019/plugins/media/index.js +10 -2
  46. package/dist/es2019/plugins/media/toolbar/index.js +1 -1
  47. package/dist/es2019/plugins/media/utils/media-common.js +1 -1
  48. package/dist/es2019/plugins/paste/handlers.js +12 -13
  49. package/dist/es2019/plugins/paste/index.js +1 -1
  50. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +24 -12
  51. package/dist/es2019/plugins/paste/pm-plugins/main.js +11 -10
  52. package/dist/es2019/plugins/paste/util/index.js +28 -1
  53. package/dist/es2019/ui/ContentStyles/index.js +1 -3
  54. package/dist/es2019/version-wrapper.js +1 -1
  55. package/dist/es2019/version.json +1 -1
  56. package/dist/esm/plugins/card/index.js +14 -0
  57. package/dist/esm/plugins/card/nodeviews/datasource.js +1 -2
  58. package/dist/esm/plugins/card/pm-plugins/main.js +2 -1
  59. package/dist/esm/plugins/card/pm-plugins/mountHyperlink.js +38 -0
  60. package/dist/esm/plugins/card/toolbar.js +4 -3
  61. package/dist/esm/plugins/{hyperlink → card/ui}/HyperlinkToolbarAppearance.js +5 -3
  62. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +14 -13
  63. package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +1 -1
  64. package/dist/esm/plugins/card/ui/SmallerEditIcon.js +1 -1
  65. package/dist/esm/plugins/card/utils.js +0 -27
  66. package/dist/esm/plugins/hyperlink/Toolbar.js +19 -30
  67. package/dist/esm/plugins/hyperlink/commands.js +6 -3
  68. package/dist/esm/plugins/hyperlink/index.js +9 -2
  69. package/dist/esm/plugins/hyperlink/pm-plugins/toolbar-buttons.js +32 -0
  70. package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/index.js +7 -4
  71. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +9 -5
  72. package/dist/esm/plugins/media/index.js +10 -2
  73. package/dist/esm/plugins/media/toolbar/index.js +1 -1
  74. package/dist/esm/plugins/media/utils/media-common.js +1 -1
  75. package/dist/esm/plugins/paste/handlers.js +12 -13
  76. package/dist/esm/plugins/paste/index.js +1 -1
  77. package/dist/esm/plugins/paste/pm-plugins/analytics.js +12 -8
  78. package/dist/esm/plugins/paste/pm-plugins/main.js +11 -10
  79. package/dist/esm/plugins/paste/util/index.js +27 -1
  80. package/dist/esm/ui/ContentStyles/index.js +1 -3
  81. package/dist/esm/version-wrapper.js +1 -1
  82. package/dist/esm/version.json +1 -1
  83. package/dist/types/labs/next/presets/cxhtml.d.ts +6 -0
  84. package/dist/types/labs/next/presets/default.d.ts +12 -0
  85. package/dist/types/labs/next/presets/mobile.d.ts +6 -0
  86. package/dist/types/plugins/card/index.d.ts +5 -1
  87. package/dist/types/plugins/card/nodeviews/datasource.d.ts +0 -1
  88. package/dist/types/plugins/card/pm-plugins/doc.d.ts +2 -1
  89. package/dist/types/plugins/card/pm-plugins/mountHyperlink.d.ts +5 -0
  90. package/dist/types/plugins/card/pm-plugins/util/state.d.ts +1 -1
  91. package/dist/types/plugins/card/types.d.ts +2 -3
  92. package/dist/types/plugins/{hyperlink → card/ui}/HyperlinkToolbarAppearance.d.ts +2 -0
  93. package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +7 -5
  94. package/dist/types/plugins/card/utils.d.ts +1 -3
  95. package/dist/types/plugins/hyperlink/Toolbar.d.ts +3 -2
  96. package/dist/types/plugins/hyperlink/commands.d.ts +2 -0
  97. package/dist/types/plugins/hyperlink/index.d.ts +11 -0
  98. package/dist/types/plugins/hyperlink/pm-plugins/toolbar-buttons.d.ts +19 -0
  99. package/dist/types/plugins/paste/handlers.d.ts +6 -5
  100. package/dist/types/plugins/paste/index.d.ts +6 -2
  101. package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +6 -5
  102. package/dist/types/plugins/paste/pm-plugins/main.d.ts +3 -2
  103. package/dist/types/plugins/paste/util/index.d.ts +2 -0
  104. package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +6 -0
  105. package/dist/types-ts4.5/labs/next/presets/default.d.ts +12 -0
  106. package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +6 -0
  107. package/dist/types-ts4.5/plugins/card/index.d.ts +5 -1
  108. package/dist/types-ts4.5/plugins/card/nodeviews/datasource.d.ts +0 -1
  109. package/dist/types-ts4.5/plugins/card/pm-plugins/doc.d.ts +2 -1
  110. package/dist/types-ts4.5/plugins/card/pm-plugins/mountHyperlink.d.ts +5 -0
  111. package/dist/types-ts4.5/plugins/card/pm-plugins/util/state.d.ts +1 -1
  112. package/dist/types-ts4.5/plugins/card/types.d.ts +2 -3
  113. package/dist/types-ts4.5/plugins/{hyperlink → card/ui}/HyperlinkToolbarAppearance.d.ts +2 -0
  114. package/dist/types-ts4.5/plugins/card/ui/LinkToolbarAppearance.d.ts +7 -5
  115. package/dist/types-ts4.5/plugins/card/utils.d.ts +1 -3
  116. package/dist/types-ts4.5/plugins/hyperlink/Toolbar.d.ts +3 -2
  117. package/dist/types-ts4.5/plugins/hyperlink/commands.d.ts +2 -0
  118. package/dist/types-ts4.5/plugins/hyperlink/index.d.ts +11 -0
  119. package/dist/types-ts4.5/plugins/hyperlink/pm-plugins/toolbar-buttons.d.ts +19 -0
  120. package/dist/types-ts4.5/plugins/paste/handlers.d.ts +6 -5
  121. package/dist/types-ts4.5/plugins/paste/index.d.ts +4 -2
  122. package/dist/types-ts4.5/plugins/paste/pm-plugins/analytics.d.ts +6 -5
  123. package/dist/types-ts4.5/plugins/paste/pm-plugins/main.d.ts +3 -2
  124. package/dist/types-ts4.5/plugins/paste/util/index.d.ts +2 -0
  125. package/package.json +12 -9
  126. package/dist/cjs/plugins/card/messages.js +0 -90
  127. package/dist/cjs/plugins/card/styles.js +0 -18
  128. package/dist/cjs/plugins/card/ui/LinkToolbarButtonGroup.js +0 -63
  129. package/dist/cjs/plugins/card/ui/assets/card.js +0 -30
  130. package/dist/cjs/plugins/card/ui/assets/embed.js +0 -30
  131. package/dist/cjs/plugins/card/ui/assets/inline.js +0 -30
  132. package/dist/cjs/plugins/card/ui/assets/url.js +0 -32
  133. package/dist/cjs/plugins/card/ui/link-toolbar-button-group-options.js +0 -52
  134. package/dist/cjs/plugins/card/ui/styled.js +0 -16
  135. package/dist/cjs/plugins/card/ui/types.js +0 -5
  136. package/dist/es2019/plugins/card/messages.js +0 -83
  137. package/dist/es2019/plugins/card/styles.js +0 -132
  138. package/dist/es2019/plugins/card/ui/LinkToolbarButtonGroup.js +0 -61
  139. package/dist/es2019/plugins/card/ui/assets/card.js +0 -22
  140. package/dist/es2019/plugins/card/ui/assets/embed.js +0 -22
  141. package/dist/es2019/plugins/card/ui/assets/inline.js +0 -22
  142. package/dist/es2019/plugins/card/ui/assets/url.js +0 -24
  143. package/dist/es2019/plugins/card/ui/link-toolbar-button-group-options.js +0 -45
  144. package/dist/es2019/plugins/card/ui/styled.js +0 -27
  145. package/dist/es2019/plugins/card/ui/types.js +0 -1
  146. package/dist/esm/plugins/card/messages.js +0 -83
  147. package/dist/esm/plugins/card/styles.js +0 -10
  148. package/dist/esm/plugins/card/ui/LinkToolbarButtonGroup.js +0 -56
  149. package/dist/esm/plugins/card/ui/assets/card.js +0 -22
  150. package/dist/esm/plugins/card/ui/assets/embed.js +0 -22
  151. package/dist/esm/plugins/card/ui/assets/inline.js +0 -22
  152. package/dist/esm/plugins/card/ui/assets/url.js +0 -24
  153. package/dist/esm/plugins/card/ui/link-toolbar-button-group-options.js +0 -45
  154. package/dist/esm/plugins/card/ui/styled.js +0 -6
  155. package/dist/esm/plugins/card/ui/types.js +0 -1
  156. package/dist/types/plugins/card/messages.d.ts +0 -82
  157. package/dist/types/plugins/card/styles.d.ts +0 -2
  158. package/dist/types/plugins/card/ui/LinkToolbarButtonGroup.d.ts +0 -16
  159. package/dist/types/plugins/card/ui/assets/card.d.ts +0 -3
  160. package/dist/types/plugins/card/ui/assets/embed.d.ts +0 -3
  161. package/dist/types/plugins/card/ui/assets/inline.d.ts +0 -3
  162. package/dist/types/plugins/card/ui/assets/url.d.ts +0 -3
  163. package/dist/types/plugins/card/ui/link-toolbar-button-group-options.d.ts +0 -5
  164. package/dist/types/plugins/card/ui/styled.d.ts +0 -3
  165. package/dist/types/plugins/card/ui/types.d.ts +0 -12
  166. package/dist/types-ts4.5/plugins/card/messages.d.ts +0 -82
  167. package/dist/types-ts4.5/plugins/card/styles.d.ts +0 -2
  168. package/dist/types-ts4.5/plugins/card/ui/LinkToolbarButtonGroup.d.ts +0 -16
  169. package/dist/types-ts4.5/plugins/card/ui/assets/card.d.ts +0 -3
  170. package/dist/types-ts4.5/plugins/card/ui/assets/embed.d.ts +0 -3
  171. package/dist/types-ts4.5/plugins/card/ui/assets/inline.d.ts +0 -3
  172. package/dist/types-ts4.5/plugins/card/ui/assets/url.d.ts +0 -3
  173. package/dist/types-ts4.5/plugins/card/ui/link-toolbar-button-group-options.d.ts +0 -5
  174. package/dist/types-ts4.5/plugins/card/ui/styled.d.ts +0 -3
  175. package/dist/types-ts4.5/plugins/card/ui/types.d.ts +0 -12
@@ -1,56 +0,0 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
- var _excluded = ["disabled"];
4
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
5
- /** @jsx jsx */
6
- import React from 'react';
7
- import { css, jsx } from '@emotion/react';
8
- import { ButtonGroup } from '@atlaskit/button';
9
- import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
10
-
11
- /**
12
- * Applying `pointer-events: none;` when disabled allows the Tooltip to be displayed
13
- */
14
- var buttonStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pointer-events: auto;\n"])));
15
- var buttonStyleNoneEvent = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pointer-events: none;\n"])));
16
- var DisallowedWrapper = function DisallowedWrapper(_ref) {
17
- var disabled = _ref.disabled,
18
- props = _objectWithoutProperties(_ref, _excluded);
19
- return jsx("div", props);
20
- };
21
-
22
- /**
23
- * The button requires `pointer-events: none;` in order to fix the tooltip, hence
24
- * leaving us without a disabled cursor, the following fixes this:
25
- */
26
- var defaultWrapperStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n cursor: pointer;\n"])));
27
- var disallowedWrapperStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n"])));
28
- export var LinkToolbarButtonGroup = function LinkToolbarButtonGroup(_ref2) {
29
- var options = _ref2.options;
30
- return jsx(ButtonGroup, null, options.map(function (_ref3) {
31
- var onClick = _ref3.onClick,
32
- selected = _ref3.selected,
33
- disabled = _ref3.disabled,
34
- testId = _ref3.testId,
35
- tooltipContent = _ref3.tooltipContent,
36
- title = _ref3.title,
37
- Icon = _ref3.icon;
38
- return jsx(DisallowedWrapper, {
39
- css: disabled ? disallowedWrapperStyle : defaultWrapperStyle,
40
- key: testId,
41
- disabled: disabled
42
- }, jsx(Button, {
43
- css: disabled ? buttonStyleNoneEvent : buttonStyle,
44
- title: title,
45
- icon: jsx(Icon, {
46
- size: "medium",
47
- label: title
48
- }),
49
- selected: selected,
50
- onClick: onClick,
51
- testId: testId,
52
- disabled: disabled,
53
- tooltipContent: tooltipContent
54
- }));
55
- }));
56
- };
@@ -1,22 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import Icon from '@atlaskit/icon';
4
- var IconCardGlyph = function IconCardGlyph(props) {
5
- return /*#__PURE__*/React.createElement("svg", _extends({
6
- width: "32",
7
- height: "32",
8
- viewBox: "0 0 32 32",
9
- fill: "none",
10
- xmlns: "http://www.w3.org/2000/svg"
11
- }, props), /*#__PURE__*/React.createElement("path", {
12
- fillRule: "evenodd",
13
- clipRule: "evenodd",
14
- d: "M8 9c-1.10457 0-2 .89543-2 2v10c0 1.1046.89543 2 2 2h16c1.1046 0 2-.8954 2-2V11c0-1.10457-.8954-2-2-2H8Zm0 3c0-.5523.44772-1 1-1h2c.5523 0 1 .4477 1 1v2c0 .5523-.4477 1-1 1H9c-.55228 0-1-.4477-1-1v-2Zm5 1c0-.2761.2239-.5.5-.5h10c.2761 0 .5.2239.5.5s-.2239.5-.5.5h-10c-.2761 0-.5-.2239-.5-.5Zm-4 3c-.55228 0-1 .4477-1 1s.44772 1 1 1h14c.5523 0 1-.4477 1-1s-.4477-1-1-1H9Zm-1 4c0-.5523.44772-1 1-1h6c.5523 0 1 .4477 1 1s-.4477 1-1 1H9c-.55228 0-1-.4477-1-1Z",
15
- fill: "currentColor"
16
- }));
17
- };
18
- export var IconCard = function IconCard(props) {
19
- return /*#__PURE__*/React.createElement(Icon, _extends({
20
- glyph: IconCardGlyph
21
- }, props));
22
- };
@@ -1,22 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import Icon from '@atlaskit/icon';
4
- var IconEmbedGlyph = function IconEmbedGlyph(props) {
5
- return /*#__PURE__*/React.createElement("svg", _extends({
6
- width: "32",
7
- height: "32",
8
- viewBox: "0 0 32 32",
9
- fill: "none",
10
- xmlns: "http://www.w3.org/2000/svg"
11
- }, props), /*#__PURE__*/React.createElement("path", {
12
- fillRule: "evenodd",
13
- clipRule: "evenodd",
14
- d: "M8 6c-1.10457 0-2 .89543-2 2v16c0 1.1046.89543 2 2 2h16c1.1046 0 2-.8954 2-2V8c0-1.10457-.8954-2-2-2H8Zm1 2c-.55228 0-1 .44772-1 1v2c0 .5523.44772 1 1 1h2c.5523 0 1-.4477 1-1V9c0-.55228-.4477-1-1-1H9Zm4.5 1.5c-.2761 0-.5.22386-.5.5 0 .2761.2239.5.5.5h10c.2761 0 .5-.2239.5-.5 0-.27614-.2239-.5-.5-.5h-10ZM9 14c-.55228 0-1 .4477-1 1v8c0 .5523.44772 1 1 1h14c.5523 0 1-.4477 1-1v-8c0-.5523-.4477-1-1-1H9Zm6 2.5c0 .8284-.6716 1.5-1.5 1.5s-1.5-.6716-1.5-1.5.6716-1.5 1.5-1.5 1.5.6716 1.5 1.5Zm0 5.5-1-1-2 2h8v-1.8L18 19l-3 3Z",
15
- fill: "currentColor"
16
- }));
17
- };
18
- export var IconEmbed = function IconEmbed(props) {
19
- return /*#__PURE__*/React.createElement(Icon, _extends({
20
- glyph: IconEmbedGlyph
21
- }, props));
22
- };
@@ -1,22 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import Icon from '@atlaskit/icon';
4
- var IconInlineGlyph = function IconInlineGlyph(props) {
5
- return /*#__PURE__*/React.createElement("svg", _extends({
6
- width: "32",
7
- height: "32",
8
- viewBox: "0 0 32 32",
9
- fill: "none",
10
- xmlns: "http://www.w3.org/2000/svg"
11
- }, props), /*#__PURE__*/React.createElement("path", {
12
- fillRule: "evenodd",
13
- clipRule: "evenodd",
14
- d: "M8 12c-1.10457 0-2 .8954-2 2v4c0 1.1046.89543 2 2 2h16c1.1046 0 2-.8954 2-2v-4c0-1.1046-.8954-2-2-2H8Zm0 3c0-.5523.44772-1 1-1h2c.5523 0 1 .4477 1 1v2c0 .5523-.4477 1-1 1H9c-.55228 0-1-.4477-1-1v-2Zm5 1c0-.2761.2239-.5.5-.5h10c.2761 0 .5.2239.5.5s-.2239.5-.5.5h-10c-.2761 0-.5-.2239-.5-.5Z",
15
- fill: "currentColor"
16
- }));
17
- };
18
- export var IconInline = function IconInline(props) {
19
- return /*#__PURE__*/React.createElement(Icon, _extends({
20
- glyph: IconInlineGlyph
21
- }, props));
22
- };
@@ -1,24 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import Icon from '@atlaskit/icon';
4
- var IconUrlGlyph = function IconUrlGlyph(props) {
5
- return /*#__PURE__*/React.createElement("svg", _extends({
6
- width: "32",
7
- height: "32",
8
- viewBox: "0 0 32 32",
9
- fill: "none",
10
- xmlns: "http://www.w3.org/2000/svg"
11
- }, props), /*#__PURE__*/React.createElement("rect", {
12
- x: "6",
13
- y: "15",
14
- width: "20",
15
- height: "2",
16
- rx: "1",
17
- fill: "currentColor"
18
- }));
19
- };
20
- export var IconUrl = function IconUrl(props) {
21
- return /*#__PURE__*/React.createElement(Icon, _extends({
22
- glyph: IconUrlGlyph
23
- }, props));
24
- };
@@ -1,45 +0,0 @@
1
- import { messages } from '../messages';
2
- import { IconCard } from './assets/card';
3
- import { IconEmbed } from './assets/embed';
4
- import { IconInline } from './assets/inline';
5
- import { IconUrl } from './assets/url';
6
- var appearancePropsMap = {
7
- url: {
8
- title: messages.urlTitle,
9
- icon: IconUrl
10
- },
11
- inline: {
12
- title: messages.inlineTitle,
13
- icon: IconInline
14
- },
15
- block: {
16
- title: messages.blockTitle,
17
- icon: IconCard
18
- },
19
- embed: {
20
- title: messages.embedTitle,
21
- icon: IconEmbed
22
- }
23
- };
24
- export var getButtonGroupOption = function getButtonGroupOption(intl, dispatchCommand, _ref) {
25
- var disabled = _ref.disabled,
26
- _onClick = _ref.onClick,
27
- selected = _ref.selected,
28
- appearance = _ref.appearance,
29
- testId = _ref.testId,
30
- tooltip = _ref.tooltip;
31
- var _appearancePropsMap = appearancePropsMap[appearance !== null && appearance !== void 0 ? appearance : 'url'],
32
- title = _appearancePropsMap.title,
33
- icon = _appearancePropsMap.icon;
34
- return {
35
- title: intl.formatMessage(title),
36
- icon: icon,
37
- onClick: function onClick() {
38
- return dispatchCommand(_onClick);
39
- },
40
- disabled: Boolean(disabled),
41
- tooltipContent: tooltip || null,
42
- testId: testId,
43
- selected: selected
44
- };
45
- };
@@ -1,6 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3;
3
- import { css } from '@emotion/react';
4
- export var embedCardStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .embedCardView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n }\n\n .embedCardView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .embedCardView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .embedCardView-content-wrap[layout='wrap-right']\n + .embedCardView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n }\n"])));
5
- export var embedSpacingStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 0 10px;\n"])));
6
- export var editIconStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 20px;\n"])));
@@ -1 +0,0 @@
1
- export {};
@@ -1,82 +0,0 @@
1
- export declare const messages: {
2
- url: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- block: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- inline: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- embed: {
18
- id: string;
19
- defaultMessage: string;
20
- description: string;
21
- };
22
- link: {
23
- id: string;
24
- defaultMessage: string;
25
- description: string;
26
- };
27
- card: {
28
- id: string;
29
- defaultMessage: string;
30
- description: string;
31
- };
32
- blockCardUnavailable: {
33
- id: string;
34
- defaultMessage: string;
35
- description: string;
36
- };
37
- displayOptionUnavailableInParentNode: {
38
- id: string;
39
- defaultMessage: string;
40
- description: string;
41
- };
42
- urlTitle: {
43
- id: string;
44
- defaultMessage: string;
45
- description: string;
46
- };
47
- blockTitle: {
48
- id: string;
49
- defaultMessage: string;
50
- description: string;
51
- };
52
- inlineTitle: {
53
- id: string;
54
- defaultMessage: string;
55
- description: string;
56
- };
57
- embedTitle: {
58
- id: string;
59
- defaultMessage: string;
60
- description: string;
61
- };
62
- urlDescription: {
63
- id: string;
64
- defaultMessage: string;
65
- description: string;
66
- };
67
- blockDescription: {
68
- id: string;
69
- defaultMessage: string;
70
- description: string;
71
- };
72
- inlineDescription: {
73
- id: string;
74
- defaultMessage: string;
75
- description: string;
76
- };
77
- embedDescription: {
78
- id: string;
79
- defaultMessage: string;
80
- description: string;
81
- };
82
- };
@@ -1,2 +0,0 @@
1
- export declare const FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = "card-floating-toolbar--link-picker";
2
- export declare const smartCardStyles: import("@emotion/react").SerializedStyles;
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import { jsx } from '@emotion/react';
3
- import type { GlyphProps } from '@atlaskit/icon/types';
4
- export interface ButtonOptionProps {
5
- title: string;
6
- selected: boolean;
7
- testId: string;
8
- disabled: boolean;
9
- tooltipContent?: string | null;
10
- onClick: () => void;
11
- icon: (props: GlyphProps) => JSX.Element;
12
- }
13
- export interface LinkToolbarButtonGroupProps {
14
- options: ButtonOptionProps[];
15
- }
16
- export declare const LinkToolbarButtonGroup: ({ options, }: LinkToolbarButtonGroupProps) => jsx.JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconCard: (props: GlyphProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconEmbed: (props: GlyphProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconInline: (props: GlyphProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconUrl: (props: GlyphProps) => JSX.Element;
@@ -1,5 +0,0 @@
1
- import { IntlShape } from 'react-intl-next';
2
- import { Command } from '@atlaskit/editor-common/types';
3
- import { OptionConfig } from './types';
4
- import { ButtonOptionProps } from './LinkToolbarButtonGroup';
5
- export declare const getButtonGroupOption: (intl: IntlShape, dispatchCommand: (command: Command) => void, { disabled, onClick, selected, appearance, testId, tooltip }: OptionConfig) => ButtonOptionProps;
@@ -1,3 +0,0 @@
1
- export declare const embedCardStyles: import("@emotion/react").SerializedStyles;
2
- export declare const embedSpacingStyles: import("@emotion/react").SerializedStyles;
3
- export declare const editIconStyles: import("@emotion/react").SerializedStyles;
@@ -1,12 +0,0 @@
1
- import { CardAppearance } from '@atlaskit/editor-common/provider-factory';
2
- import { Command } from '@atlaskit/editor-common/types';
3
- export interface OptionConfig {
4
- appearance?: CardAppearance;
5
- title: string;
6
- onClick: Command;
7
- selected: boolean;
8
- testId: string;
9
- disabled?: boolean;
10
- hidden?: boolean;
11
- tooltip?: string;
12
- }
@@ -1,82 +0,0 @@
1
- export declare const messages: {
2
- url: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- block: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- inline: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- embed: {
18
- id: string;
19
- defaultMessage: string;
20
- description: string;
21
- };
22
- link: {
23
- id: string;
24
- defaultMessage: string;
25
- description: string;
26
- };
27
- card: {
28
- id: string;
29
- defaultMessage: string;
30
- description: string;
31
- };
32
- blockCardUnavailable: {
33
- id: string;
34
- defaultMessage: string;
35
- description: string;
36
- };
37
- displayOptionUnavailableInParentNode: {
38
- id: string;
39
- defaultMessage: string;
40
- description: string;
41
- };
42
- urlTitle: {
43
- id: string;
44
- defaultMessage: string;
45
- description: string;
46
- };
47
- blockTitle: {
48
- id: string;
49
- defaultMessage: string;
50
- description: string;
51
- };
52
- inlineTitle: {
53
- id: string;
54
- defaultMessage: string;
55
- description: string;
56
- };
57
- embedTitle: {
58
- id: string;
59
- defaultMessage: string;
60
- description: string;
61
- };
62
- urlDescription: {
63
- id: string;
64
- defaultMessage: string;
65
- description: string;
66
- };
67
- blockDescription: {
68
- id: string;
69
- defaultMessage: string;
70
- description: string;
71
- };
72
- inlineDescription: {
73
- id: string;
74
- defaultMessage: string;
75
- description: string;
76
- };
77
- embedDescription: {
78
- id: string;
79
- defaultMessage: string;
80
- description: string;
81
- };
82
- };
@@ -1,2 +0,0 @@
1
- export declare const FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = "card-floating-toolbar--link-picker";
2
- export declare const smartCardStyles: import("@emotion/react").SerializedStyles;
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import { jsx } from '@emotion/react';
3
- import type { GlyphProps } from '@atlaskit/icon/types';
4
- export interface ButtonOptionProps {
5
- title: string;
6
- selected: boolean;
7
- testId: string;
8
- disabled: boolean;
9
- tooltipContent?: string | null;
10
- onClick: () => void;
11
- icon: (props: GlyphProps) => JSX.Element;
12
- }
13
- export interface LinkToolbarButtonGroupProps {
14
- options: ButtonOptionProps[];
15
- }
16
- export declare const LinkToolbarButtonGroup: ({ options, }: LinkToolbarButtonGroupProps) => jsx.JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconCard: (props: GlyphProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconEmbed: (props: GlyphProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconInline: (props: GlyphProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconUrl: (props: GlyphProps) => JSX.Element;
@@ -1,5 +0,0 @@
1
- import { IntlShape } from 'react-intl-next';
2
- import { Command } from '@atlaskit/editor-common/types';
3
- import { OptionConfig } from './types';
4
- import { ButtonOptionProps } from './LinkToolbarButtonGroup';
5
- export declare const getButtonGroupOption: (intl: IntlShape, dispatchCommand: (command: Command) => void, { disabled, onClick, selected, appearance, testId, tooltip }: OptionConfig) => ButtonOptionProps;
@@ -1,3 +0,0 @@
1
- export declare const embedCardStyles: import("@emotion/react").SerializedStyles;
2
- export declare const embedSpacingStyles: import("@emotion/react").SerializedStyles;
3
- export declare const editIconStyles: import("@emotion/react").SerializedStyles;
@@ -1,12 +0,0 @@
1
- import { CardAppearance } from '@atlaskit/editor-common/provider-factory';
2
- import { Command } from '@atlaskit/editor-common/types';
3
- export interface OptionConfig {
4
- appearance?: CardAppearance;
5
- title: string;
6
- onClick: Command;
7
- selected: boolean;
8
- testId: string;
9
- disabled?: boolean;
10
- hidden?: boolean;
11
- tooltip?: string;
12
- }