Package not found. Please check the package name and try again.
@atlaskit/editor-common 67.0.1 → 68.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 +19 -0
- package/dist/cjs/styles/shared/block-marks.js +1 -1
- package/dist/cjs/styles/shared/column-layout.js +1 -1
- package/dist/cjs/styles/shared/shadow.js +3 -1
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/styles/shared/task-decision.js +1 -1
- package/dist/cjs/ui/BaseTheme/index.js +4 -21
- package/dist/cjs/ui/OverflowShadow/index.js +49 -11
- package/dist/cjs/ui/OverflowShadow/shadowObserver.js +107 -0
- package/dist/cjs/ui/index.js +14 -0
- package/dist/cjs/utils/breakout.js +2 -2
- package/dist/cjs/utils/unsupportedContent/get-unsupported-content-level-data.js +3 -3
- package/dist/cjs/utils/validate-using-spec.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/styles/shared/block-marks.js +1 -1
- package/dist/es2019/styles/shared/column-layout.js +1 -0
- package/dist/es2019/styles/shared/shadow.js +12 -0
- package/dist/es2019/styles/shared/table.js +3 -3
- package/dist/es2019/styles/shared/task-decision.js +1 -0
- package/dist/es2019/ui/BaseTheme/index.js +3 -21
- package/dist/es2019/ui/OverflowShadow/index.js +48 -12
- package/dist/es2019/ui/OverflowShadow/shadowObserver.js +82 -0
- package/dist/es2019/ui/index.js +1 -0
- package/dist/es2019/utils/breakout.js +1 -1
- package/dist/es2019/utils/unsupportedContent/get-unsupported-content-level-data.js +1 -1
- package/dist/es2019/utils/validate-using-spec.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/styles/shared/block-marks.js +1 -1
- package/dist/esm/styles/shared/column-layout.js +1 -1
- package/dist/esm/styles/shared/shadow.js +2 -1
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/styles/shared/task-decision.js +1 -1
- package/dist/esm/ui/BaseTheme/index.js +4 -22
- package/dist/esm/ui/OverflowShadow/index.js +50 -11
- package/dist/esm/ui/OverflowShadow/shadowObserver.js +98 -0
- package/dist/esm/ui/index.js +1 -0
- package/dist/esm/utils/breakout.js +2 -2
- package/dist/esm/utils/unsupportedContent/get-unsupported-content-level-data.js +1 -1
- package/dist/esm/utils/validate-using-spec.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/extensions/manifest-helpers.d.ts +1 -1
- package/dist/types/extensions/module-helpers.d.ts +1 -1
- package/dist/types/extensions/types/extension-handler.d.ts +1 -1
- package/dist/types/extensions/types/extension-manifest-toolbar-item.d.ts +1 -1
- package/dist/types/extensions/types/extension-manifest.d.ts +1 -1
- package/dist/types/extensions/types/utils.d.ts +1 -1
- package/dist/types/provider-factory/autoformatting-provider.d.ts +1 -1
- package/dist/types/ui/BaseTheme/index.d.ts +2 -4
- package/dist/types/ui/OverflowShadow/index.d.ts +10 -3
- package/dist/types/ui/OverflowShadow/shadowObserver.d.ts +27 -0
- package/dist/types/ui/index.d.ts +1 -0
- package/dist/types/utils/unsupportedContent/get-unsupported-content-level-data.d.ts +1 -1
- package/dist/types/utils/validate-using-spec.d.ts +2 -1
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ADFEntity } from '@atlaskit/adf-utils';
|
|
2
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
3
|
import { Parameters } from './extension-parameters';
|
|
4
4
|
export interface ExtensionParams<T extends Parameters> {
|
|
5
5
|
extensionKey: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ADFEntity } from '@atlaskit/adf-utils';
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
2
|
import { ExtensionAPI } from './extension-handler';
|
|
3
3
|
import { ExtensionIconModule } from './extension-manifest-common';
|
|
4
4
|
export declare type ToolbarButtonAction = (contextNode: ADFEntity, api: ExtensionAPI) => Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
|
-
import { ADFEntity } from '@atlaskit/adf-utils';
|
|
2
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
3
|
import { ExtensionParams, UpdateExtension } from './extension-handler';
|
|
4
4
|
import { ExtensionIconModule, MaybeESModule } from './extension-manifest-common';
|
|
5
5
|
import { ContextualToolbar } from './extension-manifest-toolbar-item';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ADFEntity } from '@atlaskit/adf-utils';
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
2
|
export declare type AutoformatReplacement = ADFEntity;
|
|
3
3
|
export declare type AutoformatHandler = (match: Array<string>) => Promise<AutoformatReplacement>;
|
|
4
4
|
export declare type AutoformatRuleset = {
|
|
@@ -3,15 +3,13 @@ import { Breakpoints } from '../WidthProvider';
|
|
|
3
3
|
export declare function mapBreakpointToLayoutMaxWidth(breakpoint: Breakpoints): 760 | 850 | 680;
|
|
4
4
|
declare type BaseThemeWrapperProps = {
|
|
5
5
|
breakpoint: Breakpoints;
|
|
6
|
-
dynamicTextSizing?: boolean;
|
|
7
6
|
children: React.ReactNode;
|
|
8
7
|
baseFontSize?: number;
|
|
9
8
|
};
|
|
10
|
-
export declare function BaseThemeWrapper({
|
|
9
|
+
export declare function BaseThemeWrapper({ baseFontSize, children, }: BaseThemeWrapperProps): JSX.Element;
|
|
11
10
|
declare type BaseThemeProps = {
|
|
12
11
|
children: React.ReactNode;
|
|
13
|
-
dynamicTextSizing?: boolean;
|
|
14
12
|
baseFontSize?: number;
|
|
15
13
|
};
|
|
16
|
-
export declare function BaseTheme({ children,
|
|
14
|
+
export declare function BaseTheme({ children, baseFontSize }: BaseThemeProps): JSX.Element;
|
|
17
15
|
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ShadowObserver } from './shadowObserver';
|
|
2
3
|
export declare const shadowClassNames: {
|
|
3
4
|
RIGHT_SHADOW: string;
|
|
4
5
|
LEFT_SHADOW: string;
|
|
5
6
|
};
|
|
6
7
|
export interface OverflowShadowProps {
|
|
7
|
-
handleRef
|
|
8
|
-
shadowClassNames
|
|
8
|
+
handleRef?: (ref: HTMLElement | null) => void;
|
|
9
|
+
shadowClassNames?: string;
|
|
9
10
|
}
|
|
10
11
|
export interface OverflowShadowState {
|
|
11
12
|
showLeftShadow: boolean;
|
|
@@ -13,12 +14,14 @@ export interface OverflowShadowState {
|
|
|
13
14
|
}
|
|
14
15
|
export interface OverflowShadowOptions {
|
|
15
16
|
overflowSelector: string;
|
|
16
|
-
|
|
17
|
+
useShadowObserver?: boolean;
|
|
17
18
|
}
|
|
18
19
|
export default function overflowShadow<P>(Component: React.ComponentType<P & OverflowShadowProps> | React.StatelessComponent<P & OverflowShadowProps>, options: OverflowShadowOptions): {
|
|
19
20
|
new (props: Readonly<P>): {
|
|
20
21
|
overflowContainer?: HTMLElement | null | undefined;
|
|
21
22
|
container?: HTMLElement | undefined;
|
|
23
|
+
shadowObserver?: ShadowObserver | undefined;
|
|
24
|
+
overflowContainerWidth: number;
|
|
22
25
|
scrollable?: NodeList | undefined;
|
|
23
26
|
diff?: number | undefined;
|
|
24
27
|
state: {
|
|
@@ -33,6 +36,7 @@ export default function overflowShadow<P>(Component: React.ComponentType<P & Ove
|
|
|
33
36
|
calcOverflowDiff: () => number;
|
|
34
37
|
calcScrollableWidth: () => number;
|
|
35
38
|
handleContainer: (container: HTMLElement | null) => void;
|
|
39
|
+
initShadowObserver(): void;
|
|
36
40
|
render(): JSX.Element;
|
|
37
41
|
context: any;
|
|
38
42
|
setState<K extends keyof OverflowShadowState>(state: OverflowShadowState | ((prevState: Readonly<OverflowShadowState>, props: Readonly<P>) => OverflowShadowState | Pick<OverflowShadowState, K> | null) | Pick<OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
|
|
@@ -57,6 +61,8 @@ export default function overflowShadow<P>(Component: React.ComponentType<P & Ove
|
|
|
57
61
|
new (props: P, context?: any): {
|
|
58
62
|
overflowContainer?: HTMLElement | null | undefined;
|
|
59
63
|
container?: HTMLElement | undefined;
|
|
64
|
+
shadowObserver?: ShadowObserver | undefined;
|
|
65
|
+
overflowContainerWidth: number;
|
|
60
66
|
scrollable?: NodeList | undefined;
|
|
61
67
|
diff?: number | undefined;
|
|
62
68
|
state: {
|
|
@@ -71,6 +77,7 @@ export default function overflowShadow<P>(Component: React.ComponentType<P & Ove
|
|
|
71
77
|
calcOverflowDiff: () => number;
|
|
72
78
|
calcScrollableWidth: () => number;
|
|
73
79
|
handleContainer: (container: HTMLElement | null) => void;
|
|
80
|
+
initShadowObserver(): void;
|
|
74
81
|
render(): JSX.Element;
|
|
75
82
|
context: any;
|
|
76
83
|
setState<K extends keyof OverflowShadowState>(state: OverflowShadowState | ((prevState: Readonly<OverflowShadowState>, props: Readonly<P>) => OverflowShadowState | Pick<OverflowShadowState, K> | null) | Pick<OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare enum ShadowKeys {
|
|
2
|
+
SHOW_LEFT_SHADOW = "showLeftShadow",
|
|
3
|
+
SHOW_RIGHT_SHADOW = "showRightShadow"
|
|
4
|
+
}
|
|
5
|
+
export declare type ShadowsStates = {
|
|
6
|
+
[ShadowKey in ShadowKeys]: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const shadowObserverClassNames: {
|
|
9
|
+
SENTINEL_LEFT: string;
|
|
10
|
+
SENTINEL_RIGHT: string;
|
|
11
|
+
SHADOW_CONTAINER: string;
|
|
12
|
+
};
|
|
13
|
+
export declare class ShadowObserver {
|
|
14
|
+
private intersectionObserver?;
|
|
15
|
+
private scrollContainer;
|
|
16
|
+
private onUpdateShadows;
|
|
17
|
+
private sentinels;
|
|
18
|
+
private requestCallbackId?;
|
|
19
|
+
readonly shadowStates: ShadowsStates;
|
|
20
|
+
constructor({ scrollContainer, onUpdateShadows, }: {
|
|
21
|
+
scrollContainer: HTMLElement;
|
|
22
|
+
onUpdateShadows: (eventData: ShadowsStates) => void;
|
|
23
|
+
});
|
|
24
|
+
private init;
|
|
25
|
+
private onIntersect;
|
|
26
|
+
dispose(): void;
|
|
27
|
+
}
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { WidthConsumer, WidthProvider, getBreakpoint } from './WidthProvider';
|
|
|
16
16
|
export type { WidthConsumerContext, Breakpoints } from './WidthProvider';
|
|
17
17
|
export { default as overflowShadow, shadowClassNames } from './OverflowShadow';
|
|
18
18
|
export type { OverflowShadowOptions, OverflowShadowProps, OverflowShadowState, } from './OverflowShadow';
|
|
19
|
+
export { shadowObserverClassNames, ShadowObserver, } from './OverflowShadow/shadowObserver';
|
|
19
20
|
export { WithCreateAnalyticsEvent } from './WithCreateAnalyticsEvent';
|
|
20
21
|
export { messages as expandMessages, sharedExpandStyles, ExpandIconWrapper, expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, } from './Expand';
|
|
21
22
|
export type { StyleProps as ExpandStyleProps } from './Expand';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Schema } from 'prosemirror-model';
|
|
2
|
-
import { ADFEntity
|
|
2
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
|
+
import type { ErrorCallbackOptions, Validate, ValidationError } from '@atlaskit/adf-utils/validatorTypes';
|
|
3
4
|
export declare const UNSUPPORTED_NODE_ATTRIBUTE = "unsupportedNodeAttribute";
|
|
4
5
|
import { UnsupportedContentPayload } from './analytics';
|
|
5
6
|
export declare type DispatchAnalyticsEvent = (event: UnsupportedContentPayload) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "68.0.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,23 +44,23 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@atlaskit/activity-provider": "^2.3.0",
|
|
47
|
-
"@atlaskit/adf-schema": "^23.
|
|
48
|
-
"@atlaskit/adf-utils": "^
|
|
47
|
+
"@atlaskit/adf-schema": "^23.1.0",
|
|
48
|
+
"@atlaskit/adf-utils": "^17.0.0",
|
|
49
49
|
"@atlaskit/analytics-namespaced-context": "^6.4.0",
|
|
50
50
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
51
51
|
"@atlaskit/code": "^14.3.0",
|
|
52
52
|
"@atlaskit/editor-json-transformer": "^8.7.0",
|
|
53
53
|
"@atlaskit/editor-shared-styles": "^2.1.0",
|
|
54
|
-
"@atlaskit/emoji": "^64.
|
|
54
|
+
"@atlaskit/emoji": "^64.7.0",
|
|
55
55
|
"@atlaskit/icon": "^21.10.0",
|
|
56
56
|
"@atlaskit/in-product-testing": "^0.1.0",
|
|
57
|
-
"@atlaskit/media-card": "^73.
|
|
57
|
+
"@atlaskit/media-card": "^73.7.0",
|
|
58
58
|
"@atlaskit/media-client": "^16.0.0",
|
|
59
|
-
"@atlaskit/media-picker": "^
|
|
59
|
+
"@atlaskit/media-picker": "^63.0.0",
|
|
60
60
|
"@atlaskit/mention": "^21.0.0",
|
|
61
61
|
"@atlaskit/profilecard": "^16.4.0",
|
|
62
62
|
"@atlaskit/smart-card": "^19.1.0",
|
|
63
|
-
"@atlaskit/smart-user-picker": "^5.0
|
|
63
|
+
"@atlaskit/smart-user-picker": "^5.1.0",
|
|
64
64
|
"@atlaskit/task-decision": "^17.4.0",
|
|
65
65
|
"@atlaskit/theme": "^12.1.0",
|
|
66
66
|
"@atlaskit/tokens": "^0.10.0",
|