@spaced-out/ui-design-system 0.6.32 → 0.6.33
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/.github/workflows/publish_to_npm.yml +8 -7
- package/CHANGELOG.md +8 -0
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.d.ts.map +1 -1
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.js +17 -9
- package/mcp/package.json +1 -1
- package/package.json +1 -1
|
@@ -94,7 +94,14 @@ jobs:
|
|
|
94
94
|
fi
|
|
95
95
|
# Note(Nishant): Unified step for version bump, respecting prerelease condition
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
# Publish version to NPM repository
|
|
98
|
+
- name: Publish to NPM
|
|
99
|
+
env:
|
|
100
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
|
101
|
+
run: yarn publish --verbose --access public --tag "$RELEASE_TAG"
|
|
102
|
+
|
|
103
|
+
# Push changes only after a successful publish, so a failed publish
|
|
104
|
+
# never leaves a chore(release) commit/tag behind on the branch.
|
|
98
105
|
- name: Push CHANGELOG.md and created release tag
|
|
99
106
|
env:
|
|
100
107
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -103,9 +110,3 @@ jobs:
|
|
|
103
110
|
git push --follow-tags origin "${GITHUB_REF_NAME}"
|
|
104
111
|
|
|
105
112
|
# Note(Nishant): Push to selected branch, not hardcoded master
|
|
106
|
-
|
|
107
|
-
# Publish version to NPM repository
|
|
108
|
-
- name: Publish to NPM
|
|
109
|
-
env:
|
|
110
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
|
111
|
-
run: yarn publish --verbose --access public --tag "$RELEASE_TAG"
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.6.33](https://github.com/spaced-out/ui-design-system/compare/v0.6.32...v0.6.33) (2026-09-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **chore-release:** commit version update only after successful npm publish ([#503](https://github.com/spaced-out/ui-design-system/issues/503)) ([3e89b88](https://github.com/spaced-out/ui-design-system/commit/3e89b88492fb0461fb5e9ddf32481f13005e0633))
|
|
11
|
+
* **truncated-text-with-tooltip:** re-attach ResizeObserver when truncated node changes ([#502](https://github.com/spaced-out/ui-design-system/issues/502)) ([5305ba6](https://github.com/spaced-out/ui-design-system/commit/5305ba6fceb6643f8432b4c8bd85c07ff25d4c4b))
|
|
12
|
+
|
|
5
13
|
### [0.6.32](https://github.com/spaced-out/ui-design-system/compare/v0.6.31...v0.6.32) (2026-09-04)
|
|
6
14
|
|
|
7
15
|
### [0.6.31](https://github.com/spaced-out/ui-design-system/compare/v0.6.30...v0.6.31) (2026-08-31)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TruncatedTextWithTooltip.d.ts","sourceRoot":"","sources":["../../../src/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TruncatedTextWithTooltip.d.ts","sourceRoot":"","sources":["../../../src/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AAM7D,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAYD,eAAO,MAAM,wBAAwB,GAAI,uEAQtC,6BAA6B,sBAkG/B,CAAC"}
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.TruncatedTextWithTooltip = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
9
|
-
var _useWindowSize = require("../../hooks/useWindowSize");
|
|
10
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
11
10
|
var _qa = require("../../utils/qa");
|
|
12
11
|
var _ConditionalWrapper = require("../ConditionalWrapper");
|
|
@@ -29,23 +28,32 @@ const TruncatedTextWithTooltip = _ref => {
|
|
|
29
28
|
wordBreak = 'break-all',
|
|
30
29
|
testId
|
|
31
30
|
} = _ref;
|
|
32
|
-
const {
|
|
33
|
-
width
|
|
34
|
-
} = (0, _useWindowSize.useWindowSize)();
|
|
35
31
|
const [showMouseTip, setShowMouseTip] = React.useState(false);
|
|
36
|
-
const
|
|
32
|
+
const [truncatedNode, setTruncatedNode] = React.useState(null);
|
|
37
33
|
const checkIfTextOverflowing = React.useMemo(() => (0, _debounce.default)(() => {
|
|
38
|
-
if (!wrapText &&
|
|
34
|
+
if (!wrapText && truncatedNode && truncatedNode.scrollHeight > truncatedNode.clientHeight) {
|
|
39
35
|
setShowMouseTip(true);
|
|
40
36
|
} else {
|
|
41
37
|
setShowMouseTip(false);
|
|
42
38
|
}
|
|
43
39
|
}, 200, {
|
|
44
40
|
leading: true
|
|
45
|
-
}), []);
|
|
41
|
+
}), [truncatedNode, wrapText]);
|
|
46
42
|
React.useEffect(() => {
|
|
47
43
|
checkIfTextOverflowing();
|
|
48
|
-
}, [
|
|
44
|
+
}, [line, children, wrapText, checkIfTextOverflowing]);
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
if (!truncatedNode) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
const observer = new ResizeObserver(() => {
|
|
50
|
+
checkIfTextOverflowing();
|
|
51
|
+
});
|
|
52
|
+
observer.observe(truncatedNode);
|
|
53
|
+
return () => {
|
|
54
|
+
observer.disconnect();
|
|
55
|
+
};
|
|
56
|
+
}, [truncatedNode, checkIfTextOverflowing]);
|
|
49
57
|
const styles = {
|
|
50
58
|
'--line-clamp': wrapText ? 'unset' : line,
|
|
51
59
|
'--word-break': wordBreak
|
|
@@ -94,7 +102,7 @@ const TruncatedTextWithTooltip = _ref => {
|
|
|
94
102
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
95
103
|
className: (0, _classify.default)(_TruncatedTextWithTooltipModule.default.truncateLineClamp, classNames?.wrapper),
|
|
96
104
|
style: styles,
|
|
97
|
-
ref:
|
|
105
|
+
ref: setTruncatedNode,
|
|
98
106
|
"data-testid": (0, _qa.generateTestId)({
|
|
99
107
|
base: testId,
|
|
100
108
|
slot: 'text'
|
package/mcp/package.json
CHANGED