@open-pioneer/react-utils 4.6.0-dev.20260417092303 → 4.6.0-dev.20260420101935

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +4 -15
  2. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,26 +1,15 @@
1
1
  # @open-pioneer/react-utils
2
2
 
3
- ## 4.6.0-dev.20260417092303
3
+ ## 4.6.0-dev.20260420101935
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - 4b207f4: # Description
7
+ - 4b207f4: Added a `required` option to `useHeadingLevel` hook to make it return `undefined` instead of throwing an error when used outside of a `TitledSection`.
8
8
 
9
- Added an `required` option to `useHeadingLevel` hook to make it return `undefined` instead of throwing an error when used outside of a `TitledSection`.
10
-
11
- This allows to use the hook in components which do not necessarily need to be used inside a `TitledSection`, while still providing the option to enforce that usage when desired.
12
-
13
- Example usage:
9
+ This allows to use the hook in components which do not necessarily need to be used inside a `TitledSection`.
14
10
 
15
11
  ```tsx
16
- const MyComponent = () => {
17
- const currentHeading: number | undefined = useHeadingLevel({ required: false });
18
- if (currentHeading === undefined) {
19
- return <span>No heading level</span>;
20
- }
21
- const currentHeadingText = `Current heading is ${currentHeading}`;
22
- return <span>{currentHeadingText}</span>;
23
- };
12
+ const currentHeading: number | undefined = useHeadingLevel({ required: false });
24
13
  ```
25
14
 
26
15
  ## 4.5.0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/react-utils",
4
- "version": "4.6.0-dev.20260417092303",
4
+ "version": "4.6.0-dev.20260420101935",
5
5
  "description": "Contains common react utilities used by the open pioneer trails project",
6
6
  "keywords": [
7
7
  "open-pioneer-trails"
@@ -17,9 +17,9 @@
17
17
  "@chakra-ui/react": "^3.34.0",
18
18
  "@conterra/reactivity-core": "^0.8.2",
19
19
  "classnames": "^2.5.1",
20
- "react": "^19.2.4",
21
- "@open-pioneer/core": "4.6.0-dev.20260417092303",
22
- "@open-pioneer/reactivity": "4.6.0-dev.20260417092303"
20
+ "react": "^19.2.5",
21
+ "@open-pioneer/core": "4.6.0-dev.20260420101935",
22
+ "@open-pioneer/reactivity": "4.6.0-dev.20260420101935"
23
23
  },
24
24
  "exports": {
25
25
  "./package.json": "./package.json",