@appquality/unguess-design-system 3.1.95 → 3.1.96
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 +18 -0
- package/build/index.js +27 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# v3.1.96 (Mon May 27 2024)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Tagging tool improvements [#373](https://github.com/AppQuality/unguess-design-system/pull/373) ([@marcbon](https://github.com/marcbon) [@sinatragianpaolo](https://github.com/sinatragianpaolo))
|
|
6
|
+
- 🎨 style(bookmark.tsx): add z-index property to hovered bookmark for better layering [#369](https://github.com/AppQuality/unguess-design-system/pull/369) ([@marcbon](https://github.com/marcbon) [@sinatragianpaolo](https://github.com/sinatragianpaolo))
|
|
7
|
+
- ✨ feat(highlight): add font-weight style to StyledWord in highlight component [#370](https://github.com/AppQuality/unguess-design-system/pull/370) ([@marcbon](https://github.com/marcbon))
|
|
8
|
+
- feat: add random hue to new observation label in index.stories.tsx [#372](https://github.com/AppQuality/unguess-design-system/pull/372) ([@sinatragianpaolo](https://github.com/sinatragianpaolo))
|
|
9
|
+
- 🔨 refactor(highlight/index.tsx): improve logic to find closest observation to word [#368](https://github.com/AppQuality/unguess-design-system/pull/368) ([@marcbon](https://github.com/marcbon) [@sinatragianpaolo](https://github.com/sinatragianpaolo))
|
|
10
|
+
- 🔧 fix(player): update end time for second bookmark in index.stories.tsx [#371](https://github.com/AppQuality/unguess-design-system/pull/371) ([@marcbon](https://github.com/marcbon))
|
|
11
|
+
|
|
12
|
+
#### Authors: 2
|
|
13
|
+
|
|
14
|
+
- Gianpaolo Sinatra ([@sinatragianpaolo](https://github.com/sinatragianpaolo))
|
|
15
|
+
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
1
19
|
# v3.1.95 (Fri May 24 2024)
|
|
2
20
|
|
|
3
21
|
#### 🐛 Bug Fix
|
package/build/index.js
CHANGED
|
@@ -4045,12 +4045,15 @@ const activeBookMark = styled.css `
|
|
|
4045
4045
|
const Rect = styled.styled.div `
|
|
4046
4046
|
position: absolute;
|
|
4047
4047
|
height: 110%;
|
|
4048
|
-
background-color: ${({ hue, theme }) => hue || theme.palette.grey[800]};
|
|
4048
|
+
background-color: ${({ hue, theme }) => getColor(hue || theme.palette.grey[800], undefined, undefined, 0.8)};
|
|
4049
4049
|
z-index: 1;
|
|
4050
4050
|
border-radius: 2px;
|
|
4051
4051
|
&:hover {
|
|
4052
4052
|
${activeBookMark}
|
|
4053
4053
|
border-radius: 4px;
|
|
4054
|
+
background-color: ${({ hue, theme }) => hue || theme.palette.grey[800]};
|
|
4055
|
+
cursor: pointer;
|
|
4056
|
+
z-index: 2;
|
|
4054
4057
|
}
|
|
4055
4058
|
color: white;
|
|
4056
4059
|
${({ isActive }) => isActive && activeBookMark}
|
|
@@ -4501,6 +4504,15 @@ const StyledDiv$1 = styled__default["default"].div `
|
|
|
4501
4504
|
display: flex;
|
|
4502
4505
|
align-items: center;
|
|
4503
4506
|
`;
|
|
4507
|
+
const CurrentTimeMarker = styled__default["default"].div `
|
|
4508
|
+
width: 2px;
|
|
4509
|
+
top: 0;
|
|
4510
|
+
left: ${({ left }) => `${left}%`};
|
|
4511
|
+
position: absolute;
|
|
4512
|
+
height: 110%;
|
|
4513
|
+
z-index: 1;
|
|
4514
|
+
background-color: white;
|
|
4515
|
+
`;
|
|
4504
4516
|
const Controls = ({ container, onCutHandler, bookmarks, isCutting, onBookMarkUpdated, i18n, }) => {
|
|
4505
4517
|
var _a, _b, _c;
|
|
4506
4518
|
const [progress, setProgress] = React.useState(0);
|
|
@@ -4587,7 +4599,7 @@ const Controls = ({ container, onCutHandler, bookmarks, isCutting, onBookMarkUpd
|
|
|
4587
4599
|
}
|
|
4588
4600
|
}, [debouncedMark, onBookMarkUpdated]);
|
|
4589
4601
|
return (jsxRuntime.jsxs(ControlsWrapper, Object.assign({ isPlaying: context.isPlaying }, { children: [jsxRuntime.jsxs(ProgressContainer, Object.assign({ onMouseEnter: onMouseEvent, onMouseMove: onMouseEvent, onMouseLeave: onMouseEvent }, { children: [jsxRuntime.jsx(StyledTooltip, Object.assign({ style: { marginLeft: `${tooltipMargin}px` } }, { children: tooltipLabel })), !!duration &&
|
|
4590
|
-
(marks === null || marks === void 0 ? void 0 : marks.map((bookmark, index) => (jsxRuntime.jsx(Bookmark, Object.assign({}, bookmark), `${index}${bookmark.start}`)))), jsxRuntime.jsx(ProgressBar, { ref: progressRef, progress: progress, handleSkipAhead: handleSkipAhead, duration: duration })] })), jsxRuntime.jsxs(ControlsBar, { children: [jsxRuntime.jsxs(StyledDiv$1, Object.assign({ style: { width: "20%", justifyContent: "start" } }, { children: [jsxRuntime.jsx(AudioButton, {}), jsxRuntime.jsx(TimeLabel, { current: relCurrentTime, duration: duration })] })), jsxRuntime.jsx(ControlsGroupCenter, { style: { width: "60%" } }), jsxRuntime.jsxs(StyledDiv$1, Object.assign({ style: { width: "20%", justifyContent: "end" } }, { children: [jsxRuntime.jsx(Cutter, { onCutHandler: onCutHandler, isCutting: isCutting, i18n: i18n }), jsxRuntime.jsx(FullScreenButton, { container: container })] }))] })] })));
|
|
4602
|
+
(marks === null || marks === void 0 ? void 0 : marks.map((bookmark, index) => (jsxRuntime.jsx(Bookmark, Object.assign({}, bookmark), `${index}${bookmark.start}`)))), jsxRuntime.jsx(ProgressBar, { ref: progressRef, progress: progress, handleSkipAhead: handleSkipAhead, duration: duration }), jsxRuntime.jsx(CurrentTimeMarker, { left: progress })] })), jsxRuntime.jsxs(ControlsBar, { children: [jsxRuntime.jsxs(StyledDiv$1, Object.assign({ style: { width: "20%", justifyContent: "start" } }, { children: [jsxRuntime.jsx(AudioButton, {}), jsxRuntime.jsx(TimeLabel, { current: relCurrentTime, duration: duration })] })), jsxRuntime.jsx(ControlsGroupCenter, { style: { width: "60%" } }), jsxRuntime.jsxs(StyledDiv$1, Object.assign({ style: { width: "20%", justifyContent: "end" } }, { children: [jsxRuntime.jsx(Cutter, { onCutHandler: onCutHandler, isCutting: isCutting, i18n: i18n }), jsxRuntime.jsx(FullScreenButton, { container: container })] }))] })] })));
|
|
4591
4603
|
};
|
|
4592
4604
|
|
|
4593
4605
|
var _path$c;
|
|
@@ -5608,6 +5620,8 @@ const StyledWord = styled__default["default"](reactTypography.Span) `
|
|
|
5608
5620
|
background-color: ${(_a = observation.hue) !== null && _a !== void 0 ? _a : getColor(theme.palette.azure, 700, undefined, 0.5)};
|
|
5609
5621
|
color: ${(_b = observation.color) !== null && _b !== void 0 ? _b : "white"};
|
|
5610
5622
|
box-sizing: border-box;
|
|
5623
|
+
font-weight: ${theme.fontWeights.semibold};
|
|
5624
|
+
|
|
5611
5625
|
&:focus {
|
|
5612
5626
|
outline: none;
|
|
5613
5627
|
}
|
|
@@ -5671,12 +5685,20 @@ const Word = (props) => {
|
|
|
5671
5685
|
const isActive = props.currentTime &&
|
|
5672
5686
|
props.currentTime >= props.start &&
|
|
5673
5687
|
props.currentTime < props.end;
|
|
5674
|
-
//
|
|
5675
|
-
const
|
|
5688
|
+
// Are there any observations containing this word?
|
|
5689
|
+
const foundObservations = (_a = props.observations) === null || _a === void 0 ? void 0 : _a.map((obs) => (props.start >= obs.start && props.end <= obs.end) ? obs : null);
|
|
5690
|
+
// Get the closer observation to the word
|
|
5691
|
+
const observation = foundObservations === null || foundObservations === void 0 ? void 0 : foundObservations.reduce((prev, current) => {
|
|
5692
|
+
if (!prev)
|
|
5693
|
+
return current;
|
|
5694
|
+
if (!current)
|
|
5695
|
+
return prev;
|
|
5696
|
+
return current.end - current.start < prev.end - prev.start ? current : prev;
|
|
5697
|
+
}, null);
|
|
5676
5698
|
if (props.tooltipContent !== undefined && !!observation) {
|
|
5677
5699
|
return (jsxRuntime.jsx(Tooltip, Object.assign({ content: props.tooltipContent(observation), isTransparent: true }, { children: jsxRuntime.jsxs(StyledWord, Object.assign({}, props, { observation: observation, "data-start": props.start, "data-end": props.end, className: !!observation ? "highlighted" : "" }, (!!observation ? { tag: "observation" } : {}), { children: [isActive ? (jsxRuntime.jsx(ActiveWord, { children: jsxRuntime.jsx(Searchable, { text: props.text }) })) : (jsxRuntime.jsx(Searchable, { text: props.text })), " "] })) })));
|
|
5678
5700
|
}
|
|
5679
|
-
return (jsxRuntime.jsxs(StyledWord, Object.assign({}, props, {
|
|
5701
|
+
return (jsxRuntime.jsxs(StyledWord, Object.assign({}, props, { "data-start": props.start, "data-end": props.end, className: !!observation ? "highlighted" : "" }, (observation && { observation }), (!!observation ? { tag: "observation" } : {}), { children: [isActive ? (jsxRuntime.jsx(ActiveWord, { children: jsxRuntime.jsx(Searchable, { text: props.text }) })) : (jsxRuntime.jsx(Searchable, { text: props.text })), " "] })));
|
|
5680
5702
|
};
|
|
5681
5703
|
Highlight.Word = Word;
|
|
5682
5704
|
|