@atlaskit/media-document-viewer 0.4.0 → 0.4.1
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 +7 -0
- package/dist/cjs/annotations.js +4 -2
- package/dist/es2019/annotations.js +4 -4
- package/dist/esm/annotations.js +4 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/media-document-viewer
|
|
2
2
|
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5837970f7f5af`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5837970f7f5af) -
|
|
8
|
+
Fixed fontsize annotations for Media Document Viewer
|
|
9
|
+
|
|
3
10
|
## 0.4.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
package/dist/cjs/annotations.js
CHANGED
|
@@ -20,8 +20,10 @@ var foreignObjectProps = {
|
|
|
20
20
|
};
|
|
21
21
|
var TextInput = function TextInput(_ref) {
|
|
22
22
|
var Component = _ref.as,
|
|
23
|
-
value = _ref.value
|
|
23
|
+
value = _ref.value,
|
|
24
|
+
style = _ref.style;
|
|
24
25
|
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, foreignObjectProps, {
|
|
26
|
+
style: style,
|
|
25
27
|
onKeyUp: function onKeyUp(e) {
|
|
26
28
|
// stop propagation of the arrow key events because they can be used to navigate viewports
|
|
27
29
|
if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
|
|
@@ -37,7 +39,7 @@ var TextInput = function TextInput(_ref) {
|
|
|
37
39
|
var TextInputFormField = exports.TextInputFormField = function TextInputFormField(_ref2) {
|
|
38
40
|
var field = _ref2.field,
|
|
39
41
|
dataTestId = _ref2.dataTestId;
|
|
40
|
-
var style = (0, _defineProperty2.default)(
|
|
42
|
+
var style = (0, _defineProperty2.default)({}, 'fontSize', "".concat(field.f, "px"));
|
|
41
43
|
return /*#__PURE__*/_react.default.createElement("foreignObject", {
|
|
42
44
|
x: field.x,
|
|
43
45
|
y: -field.y,
|
|
@@ -13,8 +13,10 @@ const foreignObjectProps = {
|
|
|
13
13
|
};
|
|
14
14
|
const TextInput = ({
|
|
15
15
|
as: Component,
|
|
16
|
-
value
|
|
16
|
+
value,
|
|
17
|
+
style
|
|
17
18
|
}) => /*#__PURE__*/React.createElement(Component, _extends({}, foreignObjectProps, {
|
|
19
|
+
style: style,
|
|
18
20
|
onKeyUp: e => {
|
|
19
21
|
// stop propagation of the arrow key events because they can be used to navigate viewports
|
|
20
22
|
if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
|
|
@@ -31,9 +33,7 @@ export const TextInputFormField = ({
|
|
|
31
33
|
dataTestId
|
|
32
34
|
}) => {
|
|
33
35
|
const style = {
|
|
34
|
-
['fontSize']: `${field.f}px
|
|
35
|
-
width: '100%',
|
|
36
|
-
boxSizing: 'border-box'
|
|
36
|
+
['fontSize']: `${field.f}px`
|
|
37
37
|
};
|
|
38
38
|
return /*#__PURE__*/React.createElement("foreignObject", {
|
|
39
39
|
x: field.x,
|
package/dist/esm/annotations.js
CHANGED
|
@@ -14,8 +14,10 @@ var foreignObjectProps = {
|
|
|
14
14
|
};
|
|
15
15
|
var TextInput = function TextInput(_ref) {
|
|
16
16
|
var Component = _ref.as,
|
|
17
|
-
value = _ref.value
|
|
17
|
+
value = _ref.value,
|
|
18
|
+
style = _ref.style;
|
|
18
19
|
return /*#__PURE__*/React.createElement(Component, _extends({}, foreignObjectProps, {
|
|
20
|
+
style: style,
|
|
19
21
|
onKeyUp: function onKeyUp(e) {
|
|
20
22
|
// stop propagation of the arrow key events because they can be used to navigate viewports
|
|
21
23
|
if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
|
|
@@ -31,7 +33,7 @@ var TextInput = function TextInput(_ref) {
|
|
|
31
33
|
export var TextInputFormField = function TextInputFormField(_ref2) {
|
|
32
34
|
var field = _ref2.field,
|
|
33
35
|
dataTestId = _ref2.dataTestId;
|
|
34
|
-
var style = _defineProperty(
|
|
36
|
+
var style = _defineProperty({}, 'fontSize', "".concat(field.f, "px"));
|
|
35
37
|
return /*#__PURE__*/React.createElement("foreignObject", {
|
|
36
38
|
x: field.x,
|
|
37
39
|
y: -field.y,
|
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/browser-apis": "^0.0.1",
|
|
28
28
|
"@atlaskit/css": "^0.14.0",
|
|
29
|
-
"@atlaskit/icon": "^28.
|
|
29
|
+
"@atlaskit/icon": "^28.5.0",
|
|
30
30
|
"@atlaskit/media-common": "^12.3.0",
|
|
31
31
|
"@atlaskit/primitives": "^14.15.0",
|
|
32
32
|
"@atlaskit/spinner": "^19.0.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"name": "@atlaskit/media-document-viewer",
|
|
84
|
-
"version": "0.4.
|
|
84
|
+
"version": "0.4.1",
|
|
85
85
|
"description": "Modern and fast document viewer",
|
|
86
86
|
"author": "Atlassian Pty Ltd",
|
|
87
87
|
"license": "Apache-2.0",
|