@atlaskit/editor-plugin-loom 13.0.1 → 14.0.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 +26 -0
- package/loom-plugin/package.json +1 -8
- package/loom-plugin-state-type/package.json +1 -8
- package/loom-plugin-type/package.json +1 -8
- package/package.json +16 -24
- package/types/package.json +1 -8
- package/dist/types-ts4.5/entry-points/loom-plugin-state-type.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/loom-plugin-type.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/loom-plugin.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -4
- package/dist/types-ts4.5/loomPlugin.d.ts +0 -2
- package/dist/types-ts4.5/loomPluginType.d.ts +0 -50
- package/dist/types-ts4.5/pm-plugins/commands.d.ts +0 -35
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -23
- package/dist/types-ts4.5/types/index.d.ts +0 -71
- package/dist/types-ts4.5/ui/LoomMenuItem.d.ts +0 -8
- package/dist/types-ts4.5/ui/MenuSection.d.ts +0 -9
- package/dist/types-ts4.5/ui/PrimaryToolbarButton.d.ts +0 -4
- package/dist/types-ts4.5/ui/ToolbarButtonComponent.d.ts +0 -20
- package/dist/types-ts4.5/ui/quickInsert.d.ts +0 -3
- package/dist/types-ts4.5/ui/toolbar-components.d.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-loom
|
|
2
2
|
|
|
3
|
+
## 14.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 13.0.1
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/loom-plugin/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/loom-plugin.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/loom-plugin.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/loom-plugin.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/loom-plugin-state-type.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/loom-plugin-state-type.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/loom-plugin-state-type.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/loom-plugin-type.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/loom-plugin-type.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/loom-plugin-type.d.ts"
|
|
17
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-loom",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"description": "Loom plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -19,39 +19,31 @@
|
|
|
19
19
|
"module": "dist/esm/index.js",
|
|
20
20
|
"module:es2019": "dist/es2019/index.js",
|
|
21
21
|
"types": "dist/types/index.d.ts",
|
|
22
|
-
"typesVersions": {
|
|
23
|
-
">=4.5 <4.9": {
|
|
24
|
-
"*": [
|
|
25
|
-
"dist/types-ts4.5/*",
|
|
26
|
-
"dist/types-ts4.5/index.d.ts"
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
22
|
"sideEffects": [
|
|
31
23
|
"*.compiled.css"
|
|
32
24
|
],
|
|
33
25
|
"atlaskit:src": "src/index.ts",
|
|
34
26
|
"dependencies": {
|
|
35
|
-
"@atlaskit/button": "^
|
|
36
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
37
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
38
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
39
|
-
"@atlaskit/editor-plugin-hyperlink": "^
|
|
40
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
41
|
-
"@atlaskit/editor-plugin-quick-insert": "^
|
|
42
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
43
|
-
"@atlaskit/editor-plugin-width": "^
|
|
44
|
-
"@atlaskit/editor-prosemirror": "^
|
|
45
|
-
"@atlaskit/editor-toolbar": "^
|
|
46
|
-
"@atlaskit/icon": "^
|
|
47
|
-
"@atlaskit/platform-feature-flags": "^
|
|
48
|
-
"@atlaskit/tokens": "^
|
|
27
|
+
"@atlaskit/button": "^24.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-connectivity": "^12.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^14.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-hyperlink": "^14.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^13.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-quick-insert": "^12.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-toolbar": "^9.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-width": "^13.0.0",
|
|
36
|
+
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
37
|
+
"@atlaskit/editor-toolbar": "^2.0.0",
|
|
38
|
+
"@atlaskit/icon": "^36.0.0",
|
|
39
|
+
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
40
|
+
"@atlaskit/tokens": "^14.0.0",
|
|
49
41
|
"@babel/runtime": "^7.0.0",
|
|
50
42
|
"@emotion/react": "^11.7.1",
|
|
51
43
|
"@loomhq/record-sdk": "^4.12.2"
|
|
52
44
|
},
|
|
53
45
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^
|
|
46
|
+
"@atlaskit/editor-common": "^116.0.0",
|
|
55
47
|
"react": "^18.2.0",
|
|
56
48
|
"react-dom": "^18.2.0",
|
|
57
49
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
package/types/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/types.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/types.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/types.d.ts"
|
|
17
10
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { LoomPluginState } from '../pm-plugins/main';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { LoomPlugin } from '../loomPluginType';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { loomPlugin } from '../loomPlugin';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { LoomPluginOptions, LoomPluginOptionsWithProvider, LoomPluginOptionsWithoutProvider, LoomProviderOptions, VideoMeta, GetClient, GetClientResult, LoomPluginErrorMessages, LoomSDKErrorMessages, ButtonComponentProps, ButtonComponent, RenderButton, PositionType, } from '../types/index';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { loomPlugin } from './loomPlugin';
|
|
2
|
-
export type { LoomPlugin } from './loomPluginType';
|
|
3
|
-
export type { LoomPluginState } from './pm-plugins/main';
|
|
4
|
-
export type { LoomPluginOptions, LoomPluginOptionsWithProvider, LoomPluginOptionsWithoutProvider, LoomProviderOptions, VideoMeta, GetClient, GetClientResult, LoomPluginErrorMessages, LoomSDKErrorMessages, ButtonComponentProps, ButtonComponent, RenderButton, PositionType, } from './types';
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
|
-
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
6
|
-
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
7
|
-
import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
8
|
-
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
9
|
-
import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
10
|
-
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
|
|
11
|
-
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
12
|
-
import type { LoomPluginState } from './pm-plugins/main';
|
|
13
|
-
import type { LoomPluginOptions, LoomProviderOptions, PositionType, VideoMeta } from './types';
|
|
14
|
-
export type LoomPlugin = NextEditorPlugin<'loom', {
|
|
15
|
-
actions: {
|
|
16
|
-
/**
|
|
17
|
-
* Given loom provider, initialise loom SDK
|
|
18
|
-
* @returns error message if initialisation failed
|
|
19
|
-
*/
|
|
20
|
-
initLoom: ({ loomProvider, }: {
|
|
21
|
-
loomProvider: LoomProviderOptions;
|
|
22
|
-
}) => Promise<{
|
|
23
|
-
error?: string;
|
|
24
|
-
}>;
|
|
25
|
-
/**
|
|
26
|
-
* Insert loom into the document.
|
|
27
|
-
*
|
|
28
|
-
* @param video Video metadata (`sharedUrl` and `title`)
|
|
29
|
-
* @param positionType {'start' | 'end' | 'current'} Where you want to insert the loom
|
|
30
|
-
* @returns {boolean} If the loom was successfully inserted
|
|
31
|
-
*/
|
|
32
|
-
insertLoom: (video: VideoMeta, positionType: PositionType) => boolean;
|
|
33
|
-
recordVideo: ({ inputMethod, editorAnalyticsAPI, }: {
|
|
34
|
-
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
35
|
-
inputMethod: INPUT_METHOD;
|
|
36
|
-
}) => EditorCommand;
|
|
37
|
-
};
|
|
38
|
-
dependencies: [
|
|
39
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
40
|
-
WidthPlugin,
|
|
41
|
-
HyperlinkPlugin,
|
|
42
|
-
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
43
|
-
OptionalPlugin<QuickInsertPlugin>,
|
|
44
|
-
OptionalPlugin<ConnectivityPlugin>,
|
|
45
|
-
OptionalPlugin<ToolbarPlugin>,
|
|
46
|
-
OptionalPlugin<EditorViewModePlugin>
|
|
47
|
-
];
|
|
48
|
-
pluginConfiguration: LoomPluginOptions;
|
|
49
|
-
sharedState: LoomPluginState | undefined;
|
|
50
|
-
}>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { SDKUnsupportedReasons } from '@loomhq/record-sdk';
|
|
2
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import type { EditorCommand, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { LoomPlugin } from '../loomPluginType';
|
|
7
|
-
import type { LoomProviderOptions, PositionType, VideoMeta } from '../types';
|
|
8
|
-
export declare const enableLoom: ({ loomButton }: {
|
|
9
|
-
loomButton: HTMLButtonElement;
|
|
10
|
-
}) => EditorCommand;
|
|
11
|
-
export declare const disableLoom: ({ error }: {
|
|
12
|
-
error: string;
|
|
13
|
-
}) => EditorCommand;
|
|
14
|
-
export declare const recordVideo: ({ inputMethod, editorAnalyticsAPI, }: {
|
|
15
|
-
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
16
|
-
inputMethod: INPUT_METHOD;
|
|
17
|
-
}) => EditorCommand;
|
|
18
|
-
export declare const recordVideoFailed: ({ inputMethod, error, editorAnalyticsAPI, }: {
|
|
19
|
-
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
20
|
-
error: SDKUnsupportedReasons | undefined;
|
|
21
|
-
inputMethod: INPUT_METHOD;
|
|
22
|
-
}) => EditorCommand;
|
|
23
|
-
export declare const insertVideo: ({ editorAnalyticsAPI, video, }: {
|
|
24
|
-
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
25
|
-
video: VideoMeta;
|
|
26
|
-
}) => EditorCommand;
|
|
27
|
-
export declare const insertLoom: (editorView: EditorView | null, api: ExtractInjectionAPI<LoomPlugin> | undefined, video: VideoMeta, positionType: PositionType) => boolean;
|
|
28
|
-
export declare const executeRecordVideo: (api: ExtractInjectionAPI<LoomPlugin> | undefined) => void;
|
|
29
|
-
export declare const setupLoom: (loomProvider: LoomProviderOptions, api: ExtractInjectionAPI<LoomPlugin> | undefined, editorView: EditorView | null,
|
|
30
|
-
/**
|
|
31
|
-
* Whether loom initialisation is evoked via `initLoom` command.
|
|
32
|
-
*/
|
|
33
|
-
initViaCommand?: boolean) => Promise<{
|
|
34
|
-
error?: string;
|
|
35
|
-
}>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { SDKUnsupportedReasons } from '@loomhq/record-sdk';
|
|
2
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import type { LoomPlugin } from '../loomPluginType';
|
|
6
|
-
import type { LoomPluginOptions } from '../types';
|
|
7
|
-
export interface LoomPluginState {
|
|
8
|
-
error: SDKUnsupportedReasons | undefined;
|
|
9
|
-
isEnabled: boolean;
|
|
10
|
-
isRecordingVideo: boolean;
|
|
11
|
-
loomButton: HTMLButtonElement | null;
|
|
12
|
-
}
|
|
13
|
-
export declare enum LoomPluginAction {
|
|
14
|
-
ENABLE = 0,
|
|
15
|
-
DISABLE = 1,
|
|
16
|
-
RECORD_VIDEO = 2,
|
|
17
|
-
INSERT_VIDEO = 3
|
|
18
|
-
}
|
|
19
|
-
export declare const loomPluginKey: PluginKey<LoomPluginState>;
|
|
20
|
-
export declare const createPlugin: ({ config, api, }: {
|
|
21
|
-
api: ExtractInjectionAPI<LoomPlugin> | undefined;
|
|
22
|
-
config: LoomPluginOptions;
|
|
23
|
-
}) => SafePlugin<LoomPluginState>;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { ButtonProps as AKButtonProps } from '@atlaskit/button';
|
|
3
|
-
export type VideoMeta = {
|
|
4
|
-
duration?: number;
|
|
5
|
-
sharedUrl: string;
|
|
6
|
-
title: string;
|
|
7
|
-
};
|
|
8
|
-
type LoomClient = {
|
|
9
|
-
attachToButton: (options: {
|
|
10
|
-
button: HTMLElement;
|
|
11
|
-
onInsert: (videoMeta: VideoMeta) => void;
|
|
12
|
-
}) => void;
|
|
13
|
-
};
|
|
14
|
-
export type PositionType = 'start' | 'end' | 'current';
|
|
15
|
-
export type LoomPluginErrorMessages = 'is-supported-failure' | 'failed-to-initialise' | 'api-key-not-provided';
|
|
16
|
-
export type LoomSDKErrorMessages = 'incompatible-browser' | 'third-party-cookies-disabled' | 'no-media-streams-support';
|
|
17
|
-
export type GetClientResult = {
|
|
18
|
-
client: LoomClient;
|
|
19
|
-
status: 'loaded';
|
|
20
|
-
} | {
|
|
21
|
-
message: LoomPluginErrorMessages | LoomSDKErrorMessages;
|
|
22
|
-
status: 'error';
|
|
23
|
-
};
|
|
24
|
-
export type GetClient = Promise<GetClientResult>;
|
|
25
|
-
export type LoomProviderOptions = {
|
|
26
|
-
getClient: () => GetClient;
|
|
27
|
-
};
|
|
28
|
-
export interface ButtonComponentProps extends Pick<AKButtonProps, 'selected' | 'isDisabled' | 'onBlur' | 'onFocus' | 'onKeyDown' | 'onMouseEnter' | 'onMouseLeave' | 'aria-controls' | 'aria-expanded' | 'aria-haspopup' | 'href' | 'target' | 'rel'> {
|
|
29
|
-
'data-ds--level'?: string;
|
|
30
|
-
/**
|
|
31
|
-
* on click handler that will only be called before the Loom SDK is initialised.
|
|
32
|
-
* Once the SDK is initialised, onClick will be handled by editor to start recording.
|
|
33
|
-
*/
|
|
34
|
-
onClickBeforeInit?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
35
|
-
}
|
|
36
|
-
export type ButtonComponent = React.ForwardRefExoticComponent<ButtonComponentProps & React.RefAttributes<HTMLElement>>;
|
|
37
|
-
export type RenderButton = (ButtonComponent: ButtonComponent) => JSX.Element | null;
|
|
38
|
-
export type LoomPluginOptionsWithProvider = {
|
|
39
|
-
loomProvider: LoomProviderOptions;
|
|
40
|
-
/**
|
|
41
|
-
* Customize the button component, e.g. adding pulse, a11y.
|
|
42
|
-
* @note When this is provided, `shouldShowToolbarButton` can be skipped and the button will still show. \
|
|
43
|
-
* If `shouldShowToolbarButton` is false, the button will not show regardless of this prop.
|
|
44
|
-
* @param ButtonComponent Loom toolbar button component (mainly UI)
|
|
45
|
-
*/
|
|
46
|
-
renderButton?: RenderButton;
|
|
47
|
-
/**
|
|
48
|
-
* Due to contrainsts with the toolbar model the menu needs to know if any menu items will truely render. Right now
|
|
49
|
-
* it's not possible to inspect the output of renderButton to detemine this so we need to pass it in as a prop.
|
|
50
|
-
*/
|
|
51
|
-
shouldRenderButton?: () => boolean;
|
|
52
|
-
shouldShowToolbarButton?: boolean;
|
|
53
|
-
};
|
|
54
|
-
export type LoomPluginOptionsWithoutProvider = {
|
|
55
|
-
loomProvider?: LoomProviderOptions;
|
|
56
|
-
/**
|
|
57
|
-
* Customize the button component, e.g. adding pulse, a11y.
|
|
58
|
-
* @note When this is provided, `shouldShowToolbarButton` can be skipped and the button will still show. \
|
|
59
|
-
* If `shouldShowToolbarButton` is false, the button will not show regardless of this prop.
|
|
60
|
-
* @param ButtonComponent Loom toolbar button component (mainly UI)
|
|
61
|
-
*/
|
|
62
|
-
renderButton: RenderButton;
|
|
63
|
-
/**
|
|
64
|
-
* Due to contrainsts with the toolbar model the menu needs to know if any menu items will truely render. Right now
|
|
65
|
-
* it's not possible to inspect the output of renderButton to detemine this so we need to pass it in as a prop.
|
|
66
|
-
*/
|
|
67
|
-
shouldRenderButton?: () => boolean;
|
|
68
|
-
shouldShowToolbarButton?: boolean;
|
|
69
|
-
};
|
|
70
|
-
export type LoomPluginOptions = LoomPluginOptionsWithProvider | LoomPluginOptionsWithoutProvider;
|
|
71
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { LoomPlugin } from '../loomPluginType';
|
|
4
|
-
import type { ButtonComponentProps, LoomPluginOptions } from '../types';
|
|
5
|
-
export declare const LoomMenuItem: ({ api, renderButton, }: {
|
|
6
|
-
api: ExtractInjectionAPI<LoomPlugin> | undefined;
|
|
7
|
-
} & Pick<LoomPluginOptions, "renderButton">) => React.JSX.Element | null | undefined;
|
|
8
|
-
export declare const CustomisableLoomMenuItem: (api: ExtractInjectionAPI<LoomPlugin> | undefined) => React.ForwardRefExoticComponent<ButtonComponentProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { LoomPlugin } from '../loomPluginType';
|
|
4
|
-
type MenuSectionProps = {
|
|
5
|
-
api: ExtractInjectionAPI<LoomPlugin> | undefined;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
export declare const MenuSection: ({ children, api }: MenuSectionProps) => React.JSX.Element | null;
|
|
9
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI, ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { LoomPlugin } from '../loomPluginType';
|
|
3
|
-
import type { LoomPluginOptions } from '../types';
|
|
4
|
-
export declare const loomPrimaryToolbarComponent: (config: LoomPluginOptions, api: ExtractInjectionAPI<LoomPlugin> | undefined) => ToolbarUIComponentFactory;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
7
|
-
import type { EditorAppearance, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
-
import type { LoomPlugin } from '../loomPluginType';
|
|
9
|
-
import type { ButtonComponentProps } from '../types';
|
|
10
|
-
interface Props extends Omit<ButtonComponentProps, 'onClickBeforeInit'> {
|
|
11
|
-
api: ExtractInjectionAPI<LoomPlugin> | undefined;
|
|
12
|
-
appearance: EditorAppearance;
|
|
13
|
-
disabled: boolean;
|
|
14
|
-
hideTooltip?: boolean;
|
|
15
|
-
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
16
|
-
}
|
|
17
|
-
declare const _default_1: React.ForwardRefExoticComponent<Omit<WithIntlProps<React.PropsWithChildren<Props & WrappedComponentProps & React.RefAttributes<HTMLElement>>>, 'ref'> & React.RefAttributes<any>> & {
|
|
18
|
-
WrappedComponent: React.ComponentType<Props & WrappedComponentProps & React.RefAttributes<HTMLElement>>;
|
|
19
|
-
};
|
|
20
|
-
export default _default_1;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
3
|
-
import type { LoomPlugin } from '../loomPluginType';
|
|
4
|
-
import type { LoomPluginOptions } from '../types';
|
|
5
|
-
export declare const getToolbarComponents: (config: LoomPluginOptions, api: ExtractInjectionAPI<LoomPlugin> | undefined) => RegisterComponent[];
|