@atlaskit/native-embeds-common 2.2.5 → 2.2.7
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
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/native-embeds-common
|
|
2
2
|
|
|
3
|
+
## 2.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.2.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`89392d1eb49c1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/89392d1eb49c1) -
|
|
14
|
+
[fix] Keep native embeds and their resize handles aligned within old and new panel resize
|
|
15
|
+
boundaries, with a dynamic-config kill switch for rollback.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 2.2.5
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -134,6 +134,17 @@ var nativeEmbedAlignmentStyles = exports.nativeEmbedAlignmentStyles = (0, _react
|
|
|
134
134
|
paddingLeft: '0 !important',
|
|
135
135
|
paddingRight: '0 !important'
|
|
136
136
|
},
|
|
137
|
+
// Panel divider resizing can temporarily rebuild panel content before the
|
|
138
|
+
// native embed plugin re-syncs data-native-embed-nested. Support both the
|
|
139
|
+
// panel wrapper used by the old style and the content wrapper introduced by
|
|
140
|
+
// the new style, but only while the native embed containment kill switch is off.
|
|
141
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- DOM ancestry fallback for transient missing data-native-embed-nested
|
|
142
|
+
'.ProseMirror .ak-editor-panel .extension-container:has([data-native-embed-panel-resize-containment="true"]):has([data-native-embed-alignment]):has([data-native-embed-width]), .ProseMirror .ak-editor-panel__content .extension-container:has([data-native-embed-panel-resize-containment="true"]):has([data-native-embed-alignment]):has([data-native-embed-width]), .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .ak-editor-panel .extension-container.block:has([data-native-embed-panel-resize-containment="true"]):has([data-native-embed-alignment]):has([data-native-embed-width]), .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .ak-editor-panel__content .extension-container.block:has([data-native-embed-panel-resize-containment="true"]):has([data-native-embed-alignment]):has([data-native-embed-width])': {
|
|
143
|
+
width: 'auto !important',
|
|
144
|
+
maxWidth: 'var(--native-embed-width) !important',
|
|
145
|
+
paddingLeft: '0 !important',
|
|
146
|
+
paddingRight: '0 !important'
|
|
147
|
+
},
|
|
137
148
|
// Override the extension wrapper's width so alignment margins take effect.
|
|
138
149
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Target extension wrappers by data attribute
|
|
139
150
|
'.extension-container:has([data-native-embed-alignment="left"]), .ak-renderer-extension:has([data-native-embed-alignment="left"])': {
|
|
@@ -127,6 +127,17 @@ export const nativeEmbedAlignmentStyles = css({
|
|
|
127
127
|
paddingLeft: '0 !important',
|
|
128
128
|
paddingRight: '0 !important'
|
|
129
129
|
},
|
|
130
|
+
// Panel divider resizing can temporarily rebuild panel content before the
|
|
131
|
+
// native embed plugin re-syncs data-native-embed-nested. Support both the
|
|
132
|
+
// panel wrapper used by the old style and the content wrapper introduced by
|
|
133
|
+
// the new style, but only while the native embed containment kill switch is off.
|
|
134
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- DOM ancestry fallback for transient missing data-native-embed-nested
|
|
135
|
+
'.ProseMirror .ak-editor-panel .extension-container:has([data-native-embed-panel-resize-containment="true"]):has([data-native-embed-alignment]):has([data-native-embed-width]), .ProseMirror .ak-editor-panel__content .extension-container:has([data-native-embed-panel-resize-containment="true"]):has([data-native-embed-alignment]):has([data-native-embed-width]), .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .ak-editor-panel .extension-container.block:has([data-native-embed-panel-resize-containment="true"]):has([data-native-embed-alignment]):has([data-native-embed-width]), .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .ak-editor-panel__content .extension-container.block:has([data-native-embed-panel-resize-containment="true"]):has([data-native-embed-alignment]):has([data-native-embed-width])': {
|
|
136
|
+
width: 'auto !important',
|
|
137
|
+
maxWidth: 'var(--native-embed-width) !important',
|
|
138
|
+
paddingLeft: '0 !important',
|
|
139
|
+
paddingRight: '0 !important'
|
|
140
|
+
},
|
|
130
141
|
// Override the extension wrapper's width so alignment margins take effect.
|
|
131
142
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Target extension wrappers by data attribute
|
|
132
143
|
'.extension-container:has([data-native-embed-alignment="left"]), .ak-renderer-extension:has([data-native-embed-alignment="left"])': {
|
|
@@ -127,6 +127,17 @@ export var nativeEmbedAlignmentStyles = css({
|
|
|
127
127
|
paddingLeft: '0 !important',
|
|
128
128
|
paddingRight: '0 !important'
|
|
129
129
|
},
|
|
130
|
+
// Panel divider resizing can temporarily rebuild panel content before the
|
|
131
|
+
// native embed plugin re-syncs data-native-embed-nested. Support both the
|
|
132
|
+
// panel wrapper used by the old style and the content wrapper introduced by
|
|
133
|
+
// the new style, but only while the native embed containment kill switch is off.
|
|
134
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- DOM ancestry fallback for transient missing data-native-embed-nested
|
|
135
|
+
'.ProseMirror .ak-editor-panel .extension-container:has([data-native-embed-panel-resize-containment="true"]):has([data-native-embed-alignment]):has([data-native-embed-width]), .ProseMirror .ak-editor-panel__content .extension-container:has([data-native-embed-panel-resize-containment="true"]):has([data-native-embed-alignment]):has([data-native-embed-width]), .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .ak-editor-panel .extension-container.block:has([data-native-embed-panel-resize-containment="true"]):has([data-native-embed-alignment]):has([data-native-embed-width]), .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .ak-editor-panel__content .extension-container.block:has([data-native-embed-panel-resize-containment="true"]):has([data-native-embed-alignment]):has([data-native-embed-width])': {
|
|
136
|
+
width: 'auto !important',
|
|
137
|
+
maxWidth: 'var(--native-embed-width) !important',
|
|
138
|
+
paddingLeft: '0 !important',
|
|
139
|
+
paddingRight: '0 !important'
|
|
140
|
+
},
|
|
130
141
|
// Override the extension wrapper's width so alignment margins take effect.
|
|
131
142
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Target extension wrappers by data attribute
|
|
132
143
|
'.extension-container:has([data-native-embed-alignment="left"]), .ak-renderer-extension:has([data-native-embed-alignment="left"])': {
|
|
@@ -3,7 +3,7 @@ import type { NativeEmbedParameterValues } from './types';
|
|
|
3
3
|
* URL query-parameter key used to track the current embedding depth.
|
|
4
4
|
* Each nested native-embed iframe increments this value by 1.
|
|
5
5
|
*/
|
|
6
|
-
export declare const EMBED_DEPTH_QUERY_PARAM:
|
|
6
|
+
export declare const EMBED_DEPTH_QUERY_PARAM: 'nativeEmbedDepth';
|
|
7
7
|
/**
|
|
8
8
|
* Maximum allowed embedding depth. When `getCurrentEmbedDepth()` returns a
|
|
9
9
|
* value **≥** this limit the extension renderer should display a fallback
|
|
@@ -17,8 +17,8 @@ export declare const MAX_EMBED_DEPTH = 2;
|
|
|
17
17
|
* non-negative integer, which is the expected case for top-level pages.
|
|
18
18
|
*/
|
|
19
19
|
export declare const getCurrentEmbedDepth: () => number;
|
|
20
|
-
export declare const ALIGNMENT_VALUES: readonly [
|
|
21
|
-
export declare const DEFAULT_ALIGNMENT:
|
|
20
|
+
export declare const ALIGNMENT_VALUES: readonly ['left', 'center', 'right', 'wrap-left', 'wrap-right'];
|
|
21
|
+
export declare const DEFAULT_ALIGNMENT: 'center';
|
|
22
22
|
export declare const NATIVE_EMBED_PARAMETER_DEFAULTS: NativeEmbedParameterValues;
|
|
23
23
|
/**
|
|
24
24
|
* Built-in keys that can be referenced in the `items` and `moreItems` arrays.
|
|
@@ -28,31 +28,31 @@ export declare const NATIVE_EMBED_PARAMETER_DEFAULTS: NativeEmbedParameterValues
|
|
|
28
28
|
* Shared: SEPARATOR (usable in both)
|
|
29
29
|
*/
|
|
30
30
|
export declare const BUILTIN_TOOLBAR_KEYS: {
|
|
31
|
-
readonly ASK_ROVO:
|
|
32
|
-
readonly REMIX:
|
|
33
|
-
readonly REMIX_VARIANT:
|
|
34
|
-
readonly SUMMARISE:
|
|
35
|
-
readonly REFRESH:
|
|
36
|
-
readonly EDIT:
|
|
37
|
-
readonly EMBED:
|
|
38
|
-
readonly BORDER:
|
|
39
|
-
readonly ALIGNMENT:
|
|
40
|
-
readonly OPEN_IN_NEW_WINDOW:
|
|
31
|
+
readonly ASK_ROVO: 'askRovo';
|
|
32
|
+
readonly REMIX: 'remix';
|
|
33
|
+
readonly REMIX_VARIANT: 'remixVariant';
|
|
34
|
+
readonly SUMMARISE: 'summarise';
|
|
35
|
+
readonly REFRESH: 'refresh';
|
|
36
|
+
readonly EDIT: 'edit';
|
|
37
|
+
readonly EMBED: 'embed';
|
|
38
|
+
readonly BORDER: 'border';
|
|
39
|
+
readonly ALIGNMENT: 'alignment';
|
|
40
|
+
readonly OPEN_IN_NEW_WINDOW: 'openInNewWindow';
|
|
41
41
|
/** Opens the embed's fullscreen preview dialog. */
|
|
42
|
-
readonly EXPAND:
|
|
43
|
-
readonly EDIT_URL:
|
|
44
|
-
readonly ALWAYS_SHOW_TITLE:
|
|
45
|
-
readonly SET_EMBED_TYPE:
|
|
42
|
+
readonly EXPAND: 'expand';
|
|
43
|
+
readonly EDIT_URL: 'editUrl';
|
|
44
|
+
readonly ALWAYS_SHOW_TITLE: 'alwaysShowTitle';
|
|
45
|
+
readonly SET_EMBED_TYPE: 'setEmbedType';
|
|
46
46
|
/**
|
|
47
47
|
* Copies the native-embed node to the clipboard.
|
|
48
48
|
*/
|
|
49
|
-
readonly COPY:
|
|
49
|
+
readonly COPY: 'copy';
|
|
50
50
|
/**
|
|
51
51
|
* @private
|
|
52
52
|
* @deprecated Use `COPY` instead. `COPY_LINK` is a deprecated alias for `COPY` and will be removed in a future release.
|
|
53
53
|
*/
|
|
54
|
-
readonly COPY_LINK:
|
|
55
|
-
readonly DELETE:
|
|
56
|
-
readonly SEPARATOR:
|
|
54
|
+
readonly COPY_LINK: 'copyLink';
|
|
55
|
+
readonly DELETE: 'delete';
|
|
56
|
+
readonly SEPARATOR: 'separator';
|
|
57
57
|
};
|
|
58
|
-
export declare const EDITOR_TOOLBAR_HANDLER_KEYS: readonly [
|
|
58
|
+
export declare const EDITOR_TOOLBAR_HANDLER_KEYS: readonly ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onSummariseClick', 'onChangeBorderClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onExpandClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
|
package/package.json
CHANGED
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"atlaskit:src": "src/index.ts",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@atlaskit/button": "^24.3.0",
|
|
20
|
-
"@atlaskit/editor-common": "^116.
|
|
20
|
+
"@atlaskit/editor-common": "^116.44.0",
|
|
21
21
|
"@atlaskit/editor-plugin-local-id": "^10.1.0",
|
|
22
22
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
23
|
-
"@atlaskit/heading": "^
|
|
24
|
-
"@atlaskit/icon": "^37.
|
|
23
|
+
"@atlaskit/heading": "^7.0.0",
|
|
24
|
+
"@atlaskit/icon": "^37.2.0",
|
|
25
25
|
"@atlaskit/primitives": "^22.2.0",
|
|
26
26
|
"@atlaskit/tokens": "^16.3.0",
|
|
27
27
|
"@atlassian/afm-i18n-platform-native-embeds-native-embeds-common": "1.7.0",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
"name": "@atlaskit/native-embeds-common",
|
|
85
|
-
"version": "2.2.
|
|
85
|
+
"version": "2.2.7",
|
|
86
86
|
"description": "A shared package for native embeds to be used across experiences and plugin",
|
|
87
87
|
"author": "Atlassian Pty Ltd",
|
|
88
88
|
"license": "Apache-2.0",
|