@atlaskit/editor-plugin-loom 3.1.22 → 3.1.24
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 +15 -0
- package/dist/cjs/pm-plugins/commands.js +10 -0
- package/dist/cjs/pm-plugins/main.js +10 -1
- package/dist/cjs/ui/PrimaryToolbarButton.js +8 -6
- package/dist/cjs/ui/quickInsert.js +1 -0
- package/dist/es2019/pm-plugins/commands.js +12 -0
- package/dist/es2019/pm-plugins/main.js +11 -0
- package/dist/es2019/ui/PrimaryToolbarButton.js +8 -6
- package/dist/es2019/ui/quickInsert.js +1 -0
- package/dist/esm/pm-plugins/commands.js +12 -0
- package/dist/esm/pm-plugins/main.js +11 -0
- package/dist/esm/ui/PrimaryToolbarButton.js +8 -6
- package/dist/esm/ui/quickInsert.js +1 -0
- package/dist/types/loomPluginType.d.ts +3 -1
- package/dist/types/pm-plugins/commands.d.ts +6 -1
- package/dist/types/pm-plugins/main.d.ts +6 -1
- package/dist/types-ts4.5/loomPluginType.d.ts +3 -1
- package/dist/types-ts4.5/pm-plugins/commands.d.ts +6 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +6 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-loom
|
|
2
2
|
|
|
3
|
+
## 3.1.24
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 3.1.23
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#174866](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/174866)
|
|
14
|
+
[`f942caa52a5dd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f942caa52a5dd) -
|
|
15
|
+
[ux] Disable the loom plugin while offline.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 3.1.22
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -11,6 +11,16 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
11
11
|
var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
12
12
|
var _quickInsert = require("../ui/quickInsert");
|
|
13
13
|
var _main = require("./main");
|
|
14
|
+
// FIXME: removed to support TypeScript bundler mode
|
|
15
|
+
// import type { SDKUnsupportedReasons } from '@loomhq/record-sdk';
|
|
16
|
+
// copied from @loomhq/record-sdk
|
|
17
|
+
// FIXME: remove once @loomhq/record-sdk get updated to support "package exports"
|
|
18
|
+
var SDKUnsupportedReasons = /*#__PURE__*/function (SDKUnsupportedReasons) {
|
|
19
|
+
SDKUnsupportedReasons["IncompatibleBrowser"] = "incompatible-browser";
|
|
20
|
+
SDKUnsupportedReasons["ThirdPartyCookiesDisabled"] = "third-party-cookies-disabled";
|
|
21
|
+
SDKUnsupportedReasons["NoMediaStreamsSupport"] = "no-media-streams-support";
|
|
22
|
+
return SDKUnsupportedReasons;
|
|
23
|
+
}(SDKUnsupportedReasons || {});
|
|
14
24
|
var enableLoom = exports.enableLoom = function enableLoom(_ref) {
|
|
15
25
|
var loomButton = _ref.loomButton;
|
|
16
26
|
return function (_ref2) {
|
|
@@ -10,7 +10,16 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
11
|
var _commands = require("./commands");
|
|
12
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // FIXME: removed to support TypeScript bundler mode
|
|
14
|
+
// import type { SDKUnsupportedReasons } from '@loomhq/record-sdk';
|
|
15
|
+
// copied from @loomhq/record-sdk
|
|
16
|
+
// FIXME: remove once @loomhq/record-sdk get updated to support "package exports"
|
|
17
|
+
var SDKUnsupportedReasons = /*#__PURE__*/function (SDKUnsupportedReasons) {
|
|
18
|
+
SDKUnsupportedReasons["IncompatibleBrowser"] = "incompatible-browser";
|
|
19
|
+
SDKUnsupportedReasons["ThirdPartyCookiesDisabled"] = "third-party-cookies-disabled";
|
|
20
|
+
SDKUnsupportedReasons["NoMediaStreamsSupport"] = "no-media-streams-support";
|
|
21
|
+
return SDKUnsupportedReasons;
|
|
22
|
+
}(SDKUnsupportedReasons || {});
|
|
14
23
|
var LoomPluginAction = exports.LoomPluginAction = /*#__PURE__*/function (LoomPluginAction) {
|
|
15
24
|
LoomPluginAction[LoomPluginAction["ENABLE"] = 0] = "ENABLE";
|
|
16
25
|
LoomPluginAction[LoomPluginAction["DISABLE"] = 1] = "DISABLE";
|
|
@@ -28,8 +28,9 @@ var CustomisableLoomToolbarButton = function CustomisableLoomToolbarButton(disab
|
|
|
28
28
|
isDisabled = _props$isDisabled === void 0 ? false : _props$isDisabled,
|
|
29
29
|
href = props.href,
|
|
30
30
|
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
31
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['loom']),
|
|
32
|
-
loomState = _useSharedPluginState.loomState
|
|
31
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['loom', 'connectivity']),
|
|
32
|
+
loomState = _useSharedPluginState.loomState,
|
|
33
|
+
connectivityState = _useSharedPluginState.connectivityState;
|
|
33
34
|
var isLoomEnabled = !!(loomState !== null && loomState !== void 0 && loomState.isEnabled);
|
|
34
35
|
var handleOnClick = (0, _react.useCallback)(function (e) {
|
|
35
36
|
if (isLoomEnabled) {
|
|
@@ -44,7 +45,7 @@ var CustomisableLoomToolbarButton = function CustomisableLoomToolbarButton(disab
|
|
|
44
45
|
// Ignore href if Loom is enabled so that it doesn't interfere with recording
|
|
45
46
|
,
|
|
46
47
|
href: isLoomEnabled ? undefined : href,
|
|
47
|
-
disabled: disabled || isDisabled,
|
|
48
|
+
disabled: disabled || isDisabled || (connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode) === 'offline',
|
|
48
49
|
api: api,
|
|
49
50
|
appearance: appearance,
|
|
50
51
|
onClick: function onClick(e) {
|
|
@@ -60,15 +61,16 @@ var LoomToolbarButtonWrapper = function LoomToolbarButtonWrapper(_ref) {
|
|
|
60
61
|
var handleOnClick = (0, _react.useCallback)(function () {
|
|
61
62
|
return (0, _commands.executeRecordVideo)(api);
|
|
62
63
|
}, [api]);
|
|
63
|
-
var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(api, ['loom']),
|
|
64
|
-
loomState = _useSharedPluginState2.loomState
|
|
64
|
+
var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(api, ['loom', 'connectivity']),
|
|
65
|
+
loomState = _useSharedPluginState2.loomState,
|
|
66
|
+
connectivityState = _useSharedPluginState2.connectivityState;
|
|
65
67
|
if (!loomState) {
|
|
66
68
|
return null;
|
|
67
69
|
}
|
|
68
70
|
return (0, _react2.jsx)(_ToolbarButtonComponent.default
|
|
69
71
|
// Disable the icon while the SDK isn't initialised
|
|
70
72
|
, {
|
|
71
|
-
disabled: disabled || !(loomState !== null && loomState !== void 0 && loomState.isEnabled),
|
|
73
|
+
disabled: disabled || !(loomState !== null && loomState !== void 0 && loomState.isEnabled) || (connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode) === 'offline',
|
|
72
74
|
api: api,
|
|
73
75
|
appearance: appearance,
|
|
74
76
|
onClick: handleOnClick
|
|
@@ -21,6 +21,7 @@ var getQuickInsertItem = exports.getQuickInsertItem = function getQuickInsertIte
|
|
|
21
21
|
description: formatMessage(_messages.toolbarInsertBlockMessages.recordVideoDescription),
|
|
22
22
|
keywords: ['loom', 'record', 'video'],
|
|
23
23
|
priority: 800,
|
|
24
|
+
isDisabledOffline: true,
|
|
24
25
|
icon: function icon() {
|
|
25
26
|
return /*#__PURE__*/_react.default.createElement(_video.default, {
|
|
26
27
|
label: "",
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
// FIXME: removed to support TypeScript bundler mode
|
|
2
|
+
// import type { SDKUnsupportedReasons } from '@loomhq/record-sdk';
|
|
3
|
+
|
|
1
4
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
5
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
3
6
|
import { getQuickInsertItem } from '../ui/quickInsert';
|
|
4
7
|
import { LoomPluginAction, loomPluginKey } from './main';
|
|
8
|
+
|
|
9
|
+
// copied from @loomhq/record-sdk
|
|
10
|
+
// FIXME: remove once @loomhq/record-sdk get updated to support "package exports"
|
|
11
|
+
var SDKUnsupportedReasons = /*#__PURE__*/function (SDKUnsupportedReasons) {
|
|
12
|
+
SDKUnsupportedReasons["IncompatibleBrowser"] = "incompatible-browser";
|
|
13
|
+
SDKUnsupportedReasons["ThirdPartyCookiesDisabled"] = "third-party-cookies-disabled";
|
|
14
|
+
SDKUnsupportedReasons["NoMediaStreamsSupport"] = "no-media-streams-support";
|
|
15
|
+
return SDKUnsupportedReasons;
|
|
16
|
+
}(SDKUnsupportedReasons || {});
|
|
5
17
|
export const enableLoom = ({
|
|
6
18
|
loomButton
|
|
7
19
|
}) => ({
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
// FIXME: removed to support TypeScript bundler mode
|
|
2
|
+
// import type { SDKUnsupportedReasons } from '@loomhq/record-sdk';
|
|
3
|
+
|
|
1
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
+
// copied from @loomhq/record-sdk
|
|
7
|
+
// FIXME: remove once @loomhq/record-sdk get updated to support "package exports"
|
|
8
|
+
var SDKUnsupportedReasons = /*#__PURE__*/function (SDKUnsupportedReasons) {
|
|
9
|
+
SDKUnsupportedReasons["IncompatibleBrowser"] = "incompatible-browser";
|
|
10
|
+
SDKUnsupportedReasons["ThirdPartyCookiesDisabled"] = "third-party-cookies-disabled";
|
|
11
|
+
SDKUnsupportedReasons["NoMediaStreamsSupport"] = "no-media-streams-support";
|
|
12
|
+
return SDKUnsupportedReasons;
|
|
13
|
+
}(SDKUnsupportedReasons || {});
|
|
3
14
|
import { setupLoom } from './commands';
|
|
4
15
|
export let LoomPluginAction = /*#__PURE__*/function (LoomPluginAction) {
|
|
5
16
|
LoomPluginAction[LoomPluginAction["ENABLE"] = 0] = "ENABLE";
|
|
@@ -18,8 +18,9 @@ const CustomisableLoomToolbarButton = (disabled, appearance, api) => /*#__PURE__
|
|
|
18
18
|
...restProps
|
|
19
19
|
} = props;
|
|
20
20
|
const {
|
|
21
|
-
loomState
|
|
22
|
-
|
|
21
|
+
loomState,
|
|
22
|
+
connectivityState
|
|
23
|
+
} = useSharedPluginState(api, ['loom', 'connectivity']);
|
|
23
24
|
const isLoomEnabled = !!(loomState !== null && loomState !== void 0 && loomState.isEnabled);
|
|
24
25
|
const handleOnClick = useCallback(e => {
|
|
25
26
|
if (isLoomEnabled) {
|
|
@@ -34,7 +35,7 @@ const CustomisableLoomToolbarButton = (disabled, appearance, api) => /*#__PURE__
|
|
|
34
35
|
// Ignore href if Loom is enabled so that it doesn't interfere with recording
|
|
35
36
|
,
|
|
36
37
|
href: isLoomEnabled ? undefined : href,
|
|
37
|
-
disabled: disabled || isDisabled,
|
|
38
|
+
disabled: disabled || isDisabled || (connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode) === 'offline',
|
|
38
39
|
api: api,
|
|
39
40
|
appearance: appearance,
|
|
40
41
|
onClick: e => handleOnClick(e)
|
|
@@ -47,15 +48,16 @@ const LoomToolbarButtonWrapper = ({
|
|
|
47
48
|
}) => {
|
|
48
49
|
const handleOnClick = useCallback(() => executeRecordVideo(api), [api]);
|
|
49
50
|
const {
|
|
50
|
-
loomState
|
|
51
|
-
|
|
51
|
+
loomState,
|
|
52
|
+
connectivityState
|
|
53
|
+
} = useSharedPluginState(api, ['loom', 'connectivity']);
|
|
52
54
|
if (!loomState) {
|
|
53
55
|
return null;
|
|
54
56
|
}
|
|
55
57
|
return jsx(ToolbarButtonComponent
|
|
56
58
|
// Disable the icon while the SDK isn't initialised
|
|
57
59
|
, {
|
|
58
|
-
disabled: disabled || !(loomState !== null && loomState !== void 0 && loomState.isEnabled),
|
|
60
|
+
disabled: disabled || !(loomState !== null && loomState !== void 0 && loomState.isEnabled) || (connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode) === 'offline',
|
|
59
61
|
api: api,
|
|
60
62
|
appearance: appearance,
|
|
61
63
|
onClick: handleOnClick
|
|
@@ -13,6 +13,7 @@ export const getQuickInsertItem = editorAnalyticsAPI => ({
|
|
|
13
13
|
description: formatMessage(toolbarInsertBlockMessages.recordVideoDescription),
|
|
14
14
|
keywords: ['loom', 'record', 'video'],
|
|
15
15
|
priority: 800,
|
|
16
|
+
isDisabledOffline: true,
|
|
16
17
|
icon: () => /*#__PURE__*/React.createElement(VideoIcon, {
|
|
17
18
|
label: "",
|
|
18
19
|
color: "var(--ds-text, #172B4D)",
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
// FIXME: removed to support TypeScript bundler mode
|
|
4
|
+
// import type { SDKUnsupportedReasons } from '@loomhq/record-sdk';
|
|
5
|
+
|
|
3
6
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
7
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
5
8
|
import { getQuickInsertItem } from '../ui/quickInsert';
|
|
6
9
|
import { LoomPluginAction, loomPluginKey } from './main';
|
|
10
|
+
|
|
11
|
+
// copied from @loomhq/record-sdk
|
|
12
|
+
// FIXME: remove once @loomhq/record-sdk get updated to support "package exports"
|
|
13
|
+
var SDKUnsupportedReasons = /*#__PURE__*/function (SDKUnsupportedReasons) {
|
|
14
|
+
SDKUnsupportedReasons["IncompatibleBrowser"] = "incompatible-browser";
|
|
15
|
+
SDKUnsupportedReasons["ThirdPartyCookiesDisabled"] = "third-party-cookies-disabled";
|
|
16
|
+
SDKUnsupportedReasons["NoMediaStreamsSupport"] = "no-media-streams-support";
|
|
17
|
+
return SDKUnsupportedReasons;
|
|
18
|
+
}(SDKUnsupportedReasons || {});
|
|
7
19
|
export var enableLoom = function enableLoom(_ref) {
|
|
8
20
|
var loomButton = _ref.loomButton;
|
|
9
21
|
return function (_ref2) {
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
// FIXME: removed to support TypeScript bundler mode
|
|
5
|
+
// import type { SDKUnsupportedReasons } from '@loomhq/record-sdk';
|
|
6
|
+
|
|
4
7
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
8
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
9
|
+
// copied from @loomhq/record-sdk
|
|
10
|
+
// FIXME: remove once @loomhq/record-sdk get updated to support "package exports"
|
|
11
|
+
var SDKUnsupportedReasons = /*#__PURE__*/function (SDKUnsupportedReasons) {
|
|
12
|
+
SDKUnsupportedReasons["IncompatibleBrowser"] = "incompatible-browser";
|
|
13
|
+
SDKUnsupportedReasons["ThirdPartyCookiesDisabled"] = "third-party-cookies-disabled";
|
|
14
|
+
SDKUnsupportedReasons["NoMediaStreamsSupport"] = "no-media-streams-support";
|
|
15
|
+
return SDKUnsupportedReasons;
|
|
16
|
+
}(SDKUnsupportedReasons || {});
|
|
6
17
|
import { setupLoom } from './commands';
|
|
7
18
|
export var LoomPluginAction = /*#__PURE__*/function (LoomPluginAction) {
|
|
8
19
|
LoomPluginAction[LoomPluginAction["ENABLE"] = 0] = "ENABLE";
|
|
@@ -19,8 +19,9 @@ var CustomisableLoomToolbarButton = function CustomisableLoomToolbarButton(disab
|
|
|
19
19
|
isDisabled = _props$isDisabled === void 0 ? false : _props$isDisabled,
|
|
20
20
|
href = props.href,
|
|
21
21
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
22
|
-
var _useSharedPluginState = useSharedPluginState(api, ['loom']),
|
|
23
|
-
loomState = _useSharedPluginState.loomState
|
|
22
|
+
var _useSharedPluginState = useSharedPluginState(api, ['loom', 'connectivity']),
|
|
23
|
+
loomState = _useSharedPluginState.loomState,
|
|
24
|
+
connectivityState = _useSharedPluginState.connectivityState;
|
|
24
25
|
var isLoomEnabled = !!(loomState !== null && loomState !== void 0 && loomState.isEnabled);
|
|
25
26
|
var handleOnClick = useCallback(function (e) {
|
|
26
27
|
if (isLoomEnabled) {
|
|
@@ -35,7 +36,7 @@ var CustomisableLoomToolbarButton = function CustomisableLoomToolbarButton(disab
|
|
|
35
36
|
// Ignore href if Loom is enabled so that it doesn't interfere with recording
|
|
36
37
|
,
|
|
37
38
|
href: isLoomEnabled ? undefined : href,
|
|
38
|
-
disabled: disabled || isDisabled,
|
|
39
|
+
disabled: disabled || isDisabled || (connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode) === 'offline',
|
|
39
40
|
api: api,
|
|
40
41
|
appearance: appearance,
|
|
41
42
|
onClick: function onClick(e) {
|
|
@@ -51,15 +52,16 @@ var LoomToolbarButtonWrapper = function LoomToolbarButtonWrapper(_ref) {
|
|
|
51
52
|
var handleOnClick = useCallback(function () {
|
|
52
53
|
return executeRecordVideo(api);
|
|
53
54
|
}, [api]);
|
|
54
|
-
var _useSharedPluginState2 = useSharedPluginState(api, ['loom']),
|
|
55
|
-
loomState = _useSharedPluginState2.loomState
|
|
55
|
+
var _useSharedPluginState2 = useSharedPluginState(api, ['loom', 'connectivity']),
|
|
56
|
+
loomState = _useSharedPluginState2.loomState,
|
|
57
|
+
connectivityState = _useSharedPluginState2.connectivityState;
|
|
56
58
|
if (!loomState) {
|
|
57
59
|
return null;
|
|
58
60
|
}
|
|
59
61
|
return jsx(ToolbarButtonComponent
|
|
60
62
|
// Disable the icon while the SDK isn't initialised
|
|
61
63
|
, {
|
|
62
|
-
disabled: disabled || !(loomState !== null && loomState !== void 0 && loomState.isEnabled),
|
|
64
|
+
disabled: disabled || !(loomState !== null && loomState !== void 0 && loomState.isEnabled) || (connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode) === 'offline',
|
|
63
65
|
api: api,
|
|
64
66
|
appearance: appearance,
|
|
65
67
|
onClick: handleOnClick
|
|
@@ -14,6 +14,7 @@ export var getQuickInsertItem = function getQuickInsertItem(editorAnalyticsAPI)
|
|
|
14
14
|
description: formatMessage(toolbarInsertBlockMessages.recordVideoDescription),
|
|
15
15
|
keywords: ['loom', 'record', 'video'],
|
|
16
16
|
priority: 800,
|
|
17
|
+
isDisabledOffline: true,
|
|
17
18
|
icon: function icon() {
|
|
18
19
|
return /*#__PURE__*/React.createElement(VideoIcon, {
|
|
19
20
|
label: "",
|
|
@@ -2,6 +2,7 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
|
2
2
|
import { type INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
|
+
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
5
6
|
import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
6
7
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
7
8
|
import { type QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
@@ -15,7 +16,8 @@ export type LoomPlugin = NextEditorPlugin<'loom', {
|
|
|
15
16
|
WidthPlugin,
|
|
16
17
|
HyperlinkPlugin,
|
|
17
18
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
18
|
-
OptionalPlugin<QuickInsertPlugin
|
|
19
|
+
OptionalPlugin<QuickInsertPlugin>,
|
|
20
|
+
OptionalPlugin<ConnectivityPlugin>
|
|
19
21
|
];
|
|
20
22
|
sharedState: LoomPluginState | undefined;
|
|
21
23
|
actions: {
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type { SDKUnsupportedReasons } from '@loomhq/record-sdk';
|
|
2
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
2
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
3
|
import type { EditorCommand, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
5
|
import type { LoomPlugin } from '../loomPluginType';
|
|
7
6
|
import type { LoomProviderOptions, PositionType, VideoMeta } from '../types';
|
|
7
|
+
declare enum SDKUnsupportedReasons {
|
|
8
|
+
IncompatibleBrowser = "incompatible-browser",
|
|
9
|
+
ThirdPartyCookiesDisabled = "third-party-cookies-disabled",
|
|
10
|
+
NoMediaStreamsSupport = "no-media-streams-support"
|
|
11
|
+
}
|
|
8
12
|
export declare const enableLoom: ({ loomButton }: {
|
|
9
13
|
loomButton: HTMLButtonElement;
|
|
10
14
|
}) => EditorCommand;
|
|
@@ -29,3 +33,4 @@ export declare const executeRecordVideo: (api: ExtractInjectionAPI<LoomPlugin> |
|
|
|
29
33
|
export declare const setupLoom: (loomProvider: LoomProviderOptions, api: ExtractInjectionAPI<LoomPlugin> | undefined, editorView: EditorView | null, initViaCommand?: boolean) => Promise<{
|
|
30
34
|
error?: string;
|
|
31
35
|
}>;
|
|
36
|
+
export {};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import type { SDKUnsupportedReasons } from '@loomhq/record-sdk';
|
|
2
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
4
|
import type { LoomPlugin } from '../loomPluginType';
|
|
6
5
|
import type { LoomPluginOptions } from '../types';
|
|
6
|
+
declare enum SDKUnsupportedReasons {
|
|
7
|
+
IncompatibleBrowser = "incompatible-browser",
|
|
8
|
+
ThirdPartyCookiesDisabled = "third-party-cookies-disabled",
|
|
9
|
+
NoMediaStreamsSupport = "no-media-streams-support"
|
|
10
|
+
}
|
|
7
11
|
export interface LoomPluginState {
|
|
8
12
|
isEnabled: boolean;
|
|
9
13
|
loomButton: HTMLButtonElement | null;
|
|
@@ -21,3 +25,4 @@ export declare const createPlugin: ({ config, api, }: {
|
|
|
21
25
|
config: LoomPluginOptions;
|
|
22
26
|
api: ExtractInjectionAPI<LoomPlugin> | undefined;
|
|
23
27
|
}) => SafePlugin<LoomPluginState>;
|
|
28
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
|
2
2
|
import { type INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
|
+
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
5
6
|
import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
6
7
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
7
8
|
import { type QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
@@ -15,7 +16,8 @@ export type LoomPlugin = NextEditorPlugin<'loom', {
|
|
|
15
16
|
WidthPlugin,
|
|
16
17
|
HyperlinkPlugin,
|
|
17
18
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
18
|
-
OptionalPlugin<QuickInsertPlugin
|
|
19
|
+
OptionalPlugin<QuickInsertPlugin>,
|
|
20
|
+
OptionalPlugin<ConnectivityPlugin>
|
|
19
21
|
];
|
|
20
22
|
sharedState: LoomPluginState | undefined;
|
|
21
23
|
actions: {
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type { SDKUnsupportedReasons } from '@loomhq/record-sdk';
|
|
2
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
2
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
3
|
import type { EditorCommand, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
5
|
import type { LoomPlugin } from '../loomPluginType';
|
|
7
6
|
import type { LoomProviderOptions, PositionType, VideoMeta } from '../types';
|
|
7
|
+
declare enum SDKUnsupportedReasons {
|
|
8
|
+
IncompatibleBrowser = "incompatible-browser",
|
|
9
|
+
ThirdPartyCookiesDisabled = "third-party-cookies-disabled",
|
|
10
|
+
NoMediaStreamsSupport = "no-media-streams-support"
|
|
11
|
+
}
|
|
8
12
|
export declare const enableLoom: ({ loomButton }: {
|
|
9
13
|
loomButton: HTMLButtonElement;
|
|
10
14
|
}) => EditorCommand;
|
|
@@ -29,3 +33,4 @@ export declare const executeRecordVideo: (api: ExtractInjectionAPI<LoomPlugin> |
|
|
|
29
33
|
export declare const setupLoom: (loomProvider: LoomProviderOptions, api: ExtractInjectionAPI<LoomPlugin> | undefined, editorView: EditorView | null, initViaCommand?: boolean) => Promise<{
|
|
30
34
|
error?: string;
|
|
31
35
|
}>;
|
|
36
|
+
export {};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import type { SDKUnsupportedReasons } from '@loomhq/record-sdk';
|
|
2
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
4
|
import type { LoomPlugin } from '../loomPluginType';
|
|
6
5
|
import type { LoomPluginOptions } from '../types';
|
|
6
|
+
declare enum SDKUnsupportedReasons {
|
|
7
|
+
IncompatibleBrowser = "incompatible-browser",
|
|
8
|
+
ThirdPartyCookiesDisabled = "third-party-cookies-disabled",
|
|
9
|
+
NoMediaStreamsSupport = "no-media-streams-support"
|
|
10
|
+
}
|
|
7
11
|
export interface LoomPluginState {
|
|
8
12
|
isEnabled: boolean;
|
|
9
13
|
loomButton: HTMLButtonElement | null;
|
|
@@ -21,3 +25,4 @@ export declare const createPlugin: ({ config, api, }: {
|
|
|
21
25
|
config: LoomPluginOptions;
|
|
22
26
|
api: ExtractInjectionAPI<LoomPlugin> | undefined;
|
|
23
27
|
}) => SafePlugin<LoomPluginState>;
|
|
28
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-loom",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.24",
|
|
4
4
|
"description": "Loom plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@atlaskit/button": "^20.3.0",
|
|
38
|
-
"@atlaskit/editor-common": "^96.
|
|
38
|
+
"@atlaskit/editor-common": "^96.4.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
40
40
|
"@atlaskit/editor-plugin-hyperlink": "^3.2.0",
|
|
41
41
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
|
|
42
|
-
"@atlaskit/editor-plugin-quick-insert": "^1.
|
|
42
|
+
"@atlaskit/editor-plugin-quick-insert": "^1.8.0",
|
|
43
43
|
"@atlaskit/editor-plugin-width": "^1.3.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
45
|
-
"@atlaskit/icon": "23.0
|
|
45
|
+
"@atlaskit/icon": "23.1.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "0.3.0",
|
|
47
|
-
"@atlaskit/tokens": "2.4.
|
|
47
|
+
"@atlaskit/tokens": "2.4.2",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@emotion/react": "^11.7.1",
|
|
50
50
|
"@loomhq/record-sdk": "^2.36.18"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@atlaskit/editor-plugin-base": "^2.0.0",
|
|
59
|
-
"@atlaskit/editor-plugin-card": "^4.
|
|
59
|
+
"@atlaskit/editor-plugin-card": "^4.5.0",
|
|
60
60
|
"@atlaskit/editor-plugin-copy-button": "^1.3.0",
|
|
61
61
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
62
62
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|