@instructure/ui-react-utils 11.7.3-snapshot-43 → 11.7.4-pr-snapshot-1781695314229
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 +9 -1
- package/LICENSE.md +1 -0
- package/{lib/getDisplayName.js → babel.config.cjs} +11 -20
- package/es/DeterministicIdContext/DeterministicIdContext.js +0 -2
- package/es/DeterministicIdContext/DeterministicIdContextProvider.js +2 -1
- package/es/DeterministicIdContext/index.js +5 -4
- package/es/DeterministicIdContext/useDeterministicId.js +2 -1
- package/es/DeterministicIdContext/withDeterministicId.js +1 -1
- package/es/ensureSingleChild.js +2 -1
- package/es/getInteraction.js +0 -1
- package/es/index.js +13 -12
- package/es/matchComponentTypes.js +2 -1
- package/es/omitProps.js +0 -1
- package/package.json +9 -11
- package/src/DeterministicIdContext/DeterministicIdContext.ts +0 -1
- package/src/DeterministicIdContext/DeterministicIdContextProvider.tsx +1 -1
- package/src/DeterministicIdContext/index.ts +4 -4
- package/src/DeterministicIdContext/useDeterministicId.tsx +1 -1
- package/src/DeterministicIdContext/withDeterministicId.tsx +1 -1
- package/src/ensureSingleChild.tsx +1 -1
- package/src/index.ts +12 -12
- package/src/matchComponentTypes.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/DeterministicIdContext/DeterministicIdContext.d.ts.map +1 -1
- package/types/DeterministicIdContext/index.d.ts +4 -4
- package/types/DeterministicIdContext/index.d.ts.map +1 -1
- package/types/index.d.ts +12 -12
- package/types/index.d.ts.map +1 -1
- package/lib/DeterministicIdContext/DeterministicIdContext.js +0 -52
- package/lib/DeterministicIdContext/DeterministicIdContextProvider.js +0 -54
- package/lib/DeterministicIdContext/index.js +0 -33
- package/lib/DeterministicIdContext/useDeterministicId.js +0 -66
- package/lib/DeterministicIdContext/withDeterministicId.js +0 -75
- package/lib/callRenderProp.js +0 -57
- package/lib/ensureSingleChild.js +0 -62
- package/lib/getElementType.js +0 -77
- package/lib/getInteraction.js +0 -63
- package/lib/index.js +0 -107
- package/lib/matchComponentTypes.js +0 -53
- package/lib/omitProps.js +0 -73
- package/lib/package.json +0 -1
- package/lib/passthroughProps.js +0 -53
- package/lib/pickProps.js +0 -64
- package/lib/safeCloneElement.js +0 -105
- package/lib/windowMessageListener.js +0 -110
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [11.7.
|
|
6
|
+
## [11.7.4-pr-snapshot-1781695314229](https://github.com/instructure/instructure-ui/compare/v11.7.3...v11.7.4-pr-snapshot-1781695314229) (2026-06-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-react-utils
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [11.7.3](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3) (2026-05-07)
|
|
7
15
|
|
|
8
16
|
|
|
9
17
|
### Bug Fixes
|
package/LICENSE.md
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
exports.getDisplayName = getDisplayName;
|
|
8
1
|
/*
|
|
9
2
|
* The MIT License (MIT)
|
|
10
3
|
*
|
|
@@ -29,17 +22,15 @@ exports.getDisplayName = getDisplayName;
|
|
|
29
22
|
* SOFTWARE.
|
|
30
23
|
*/
|
|
31
24
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return typeof ReactComponent === 'string' ? ReactComponent : ReactComponent.displayName || ReactComponent.name;
|
|
25
|
+
module.exports = {
|
|
26
|
+
presets: [
|
|
27
|
+
[
|
|
28
|
+
require('@instructure/ui-babel-preset'),
|
|
29
|
+
{
|
|
30
|
+
esModules: Boolean(process.env.ES_MODULES),
|
|
31
|
+
removeConsole: process.env.NODE_ENV === 'production',
|
|
32
|
+
transformImports: Boolean(process.env.TRANSFORM_IMPORTS)
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
]
|
|
44
36
|
}
|
|
45
|
-
var _default = exports.default = getDisplayName;
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
import { DeterministicIdContext, defaultDeterministicIDMap } from './DeterministicIdContext.js';
|
|
25
26
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
26
27
|
/**
|
|
27
28
|
* ---
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
24
|
+
|
|
25
|
+
export { DeterministicIdContextProvider } from './DeterministicIdContextProvider.js';
|
|
26
|
+
export { DeterministicIdContext } from './DeterministicIdContext.js';
|
|
27
|
+
export { withDeterministicId } from './withDeterministicId.js';
|
|
28
|
+
export { useDeterministicId } from './useDeterministicId.js';
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
import { useContext } from 'react';
|
|
26
26
|
import { generateId } from '@instructure/ui-utils';
|
|
27
|
-
import { DeterministicIdContext } from
|
|
27
|
+
import { DeterministicIdContext } from './DeterministicIdContext.js';
|
|
28
|
+
|
|
28
29
|
/**
|
|
29
30
|
* A React hook that provides deterministic ID generation for functional components.
|
|
30
31
|
*
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import { forwardRef, useContext } from 'react';
|
|
25
25
|
import hoistNonReactStatics from 'hoist-non-react-statics';
|
|
26
|
-
import { DeterministicIdContext } from
|
|
26
|
+
import { DeterministicIdContext } from './DeterministicIdContext.js';
|
|
27
27
|
import { decorator } from '@instructure/ui-decorator';
|
|
28
28
|
import { generateId } from '@instructure/ui-utils';
|
|
29
29
|
import { warn } from '@instructure/console';
|
package/es/ensureSingleChild.js
CHANGED
package/es/getInteraction.js
CHANGED
package/es/index.js
CHANGED
|
@@ -21,16 +21,17 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
+
|
|
24
25
|
/* list utils in alphabetical order */
|
|
25
|
-
export { callRenderProp } from
|
|
26
|
-
export { ensureSingleChild } from
|
|
27
|
-
export { getDisplayName } from
|
|
28
|
-
export { getElementType } from
|
|
29
|
-
export { getInteraction } from
|
|
30
|
-
export { matchComponentTypes } from
|
|
31
|
-
export { omitProps } from
|
|
32
|
-
export { passthroughProps } from
|
|
33
|
-
export { pickProps } from
|
|
34
|
-
export { safeCloneElement } from
|
|
35
|
-
export { windowMessageListener } from
|
|
36
|
-
export { DeterministicIdContext, DeterministicIdContextProvider, withDeterministicId, useDeterministicId } from
|
|
26
|
+
export { callRenderProp } from './callRenderProp.js';
|
|
27
|
+
export { ensureSingleChild } from './ensureSingleChild.js';
|
|
28
|
+
export { getDisplayName } from './getDisplayName.js';
|
|
29
|
+
export { getElementType } from './getElementType.js';
|
|
30
|
+
export { getInteraction } from './getInteraction.js';
|
|
31
|
+
export { matchComponentTypes } from './matchComponentTypes.js';
|
|
32
|
+
export { omitProps } from './omitProps.js';
|
|
33
|
+
export { passthroughProps } from './passthroughProps.js';
|
|
34
|
+
export { pickProps } from './pickProps.js';
|
|
35
|
+
export { safeCloneElement } from './safeCloneElement.js';
|
|
36
|
+
export { windowMessageListener } from './windowMessageListener.js';
|
|
37
|
+
export { DeterministicIdContext, DeterministicIdContextProvider, withDeterministicId, useDeterministicId } from './DeterministicIdContext/index.js';
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
import { getDisplayName } from './getDisplayName.js';
|
|
25
26
|
/**
|
|
26
27
|
* ---
|
|
27
28
|
* category: utilities/react
|
package/es/omitProps.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-react-utils",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.4-pr-snapshot-1781695314229",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "A React utility library made by Instructure Inc.",
|
|
5
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
7
|
"module": "./es/index.js",
|
|
7
|
-
"main": "./lib/index.js",
|
|
8
8
|
"types": "./types/index.d.ts",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"@babel/runtime": "^7.29.2",
|
|
18
18
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
19
19
|
"hoist-non-react-statics": "^3.3.2",
|
|
20
|
-
"@instructure/
|
|
21
|
-
"@instructure/
|
|
22
|
-
"@instructure/ui-
|
|
23
|
-
"@instructure/ui-
|
|
24
|
-
"@instructure/ui-utils": "11.7.
|
|
20
|
+
"@instructure/shared-types": "11.7.4-pr-snapshot-1781695314229",
|
|
21
|
+
"@instructure/console": "11.7.4-pr-snapshot-1781695314229",
|
|
22
|
+
"@instructure/ui-utils": "11.7.4-pr-snapshot-1781695314229",
|
|
23
|
+
"@instructure/ui-decorator": "11.7.4-pr-snapshot-1781695314229",
|
|
24
|
+
"@instructure/ui-dom-utils": "11.7.4-pr-snapshot-1781695314229"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@testing-library/jest-dom": "^6.6.3",
|
|
28
28
|
"@testing-library/react": "15.0.7",
|
|
29
29
|
"vitest": "^3.2.2",
|
|
30
|
-
"@instructure/ui-babel-preset": "11.7.
|
|
30
|
+
"@instructure/ui-babel-preset": "11.7.4-pr-snapshot-1781695314229"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": ">=18 <=19",
|
|
@@ -42,10 +42,8 @@
|
|
|
42
42
|
"src": "./src/index.ts",
|
|
43
43
|
"types": "./types/index.d.ts",
|
|
44
44
|
"import": "./es/index.js",
|
|
45
|
-
"require": "./lib/index.js",
|
|
46
45
|
"default": "./es/index.js"
|
|
47
46
|
},
|
|
48
|
-
"./lib/*": "./lib/*",
|
|
49
47
|
"./es/*": "./es/*",
|
|
50
48
|
"./types/*": "./types/*",
|
|
51
49
|
"./package.json": "./package.json",
|
|
@@ -55,7 +53,7 @@
|
|
|
55
53
|
"lint": "ui-scripts lint",
|
|
56
54
|
"lint:fix": "ui-scripts lint --fix",
|
|
57
55
|
"clean": "ui-scripts clean",
|
|
58
|
-
"build": "ui-scripts build
|
|
56
|
+
"build": "ui-scripts build",
|
|
59
57
|
"build:watch": "ui-scripts build --watch",
|
|
60
58
|
"build:types": "tsc -p tsconfig.build.json"
|
|
61
59
|
}
|
|
@@ -25,7 +25,6 @@ import React from 'react'
|
|
|
25
25
|
import type { DeterministicIdProviderValue } from './DeterministicIdContextProvider'
|
|
26
26
|
|
|
27
27
|
declare global {
|
|
28
|
-
// eslint-disable-next-line no-var
|
|
29
28
|
var __INSTUI_GLOBAL_INSTANCE_COUNTER__: Map<string, number>
|
|
30
29
|
}
|
|
31
30
|
const instUIInstanceCounter = '__INSTUI_GLOBAL_INSTANCE_COUNTER__'
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import {
|
|
26
26
|
DeterministicIdContext,
|
|
27
27
|
defaultDeterministicIDMap
|
|
28
|
-
} from './DeterministicIdContext'
|
|
28
|
+
} from './DeterministicIdContext.js'
|
|
29
29
|
|
|
30
30
|
type DeterministicIdProviderValue = Map<string, number>
|
|
31
31
|
type DeterministicIdProviderProps = React.PropsWithChildren<{
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
export { DeterministicIdContextProvider } from './DeterministicIdContextProvider'
|
|
26
|
-
export { DeterministicIdContext } from './DeterministicIdContext'
|
|
27
|
-
export { withDeterministicId } from './withDeterministicId'
|
|
28
|
-
export { useDeterministicId } from './useDeterministicId'
|
|
25
|
+
export { DeterministicIdContextProvider } from './DeterministicIdContextProvider.js'
|
|
26
|
+
export { DeterministicIdContext } from './DeterministicIdContext.js'
|
|
27
|
+
export { withDeterministicId } from './withDeterministicId.js'
|
|
28
|
+
export { useDeterministicId } from './useDeterministicId.js'
|
|
29
29
|
export type { DeterministicIdProviderValue } from './DeterministicIdContextProvider'
|
|
30
30
|
export type { WithDeterministicIdProps } from './withDeterministicId'
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
import { useContext } from 'react'
|
|
26
26
|
import { generateId } from '@instructure/ui-utils'
|
|
27
|
-
import { DeterministicIdContext } from './DeterministicIdContext'
|
|
27
|
+
import { DeterministicIdContext } from './DeterministicIdContext.js'
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* A React hook that provides deterministic ID generation for functional components.
|
|
@@ -29,7 +29,7 @@ import type {
|
|
|
29
29
|
} from 'react'
|
|
30
30
|
import hoistNonReactStatics from 'hoist-non-react-statics'
|
|
31
31
|
|
|
32
|
-
import { DeterministicIdContext } from './DeterministicIdContext'
|
|
32
|
+
import { DeterministicIdContext } from './DeterministicIdContext.js'
|
|
33
33
|
import { decorator } from '@instructure/ui-decorator'
|
|
34
34
|
import { generateId } from '@instructure/ui-utils'
|
|
35
35
|
|
package/src/index.ts
CHANGED
|
@@ -23,23 +23,23 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
/* list utils in alphabetical order */
|
|
26
|
-
export { callRenderProp } from './callRenderProp'
|
|
27
|
-
export { ensureSingleChild } from './ensureSingleChild'
|
|
28
|
-
export { getDisplayName } from './getDisplayName'
|
|
29
|
-
export { getElementType } from './getElementType'
|
|
30
|
-
export { getInteraction } from './getInteraction'
|
|
31
|
-
export { matchComponentTypes } from './matchComponentTypes'
|
|
32
|
-
export { omitProps } from './omitProps'
|
|
33
|
-
export { passthroughProps } from './passthroughProps'
|
|
34
|
-
export { pickProps } from './pickProps'
|
|
35
|
-
export { safeCloneElement } from './safeCloneElement'
|
|
36
|
-
export { windowMessageListener } from './windowMessageListener'
|
|
26
|
+
export { callRenderProp } from './callRenderProp.js'
|
|
27
|
+
export { ensureSingleChild } from './ensureSingleChild.js'
|
|
28
|
+
export { getDisplayName } from './getDisplayName.js'
|
|
29
|
+
export { getElementType } from './getElementType.js'
|
|
30
|
+
export { getInteraction } from './getInteraction.js'
|
|
31
|
+
export { matchComponentTypes } from './matchComponentTypes.js'
|
|
32
|
+
export { omitProps } from './omitProps.js'
|
|
33
|
+
export { passthroughProps } from './passthroughProps.js'
|
|
34
|
+
export { pickProps } from './pickProps.js'
|
|
35
|
+
export { safeCloneElement } from './safeCloneElement.js'
|
|
36
|
+
export { windowMessageListener } from './windowMessageListener.js'
|
|
37
37
|
export {
|
|
38
38
|
DeterministicIdContext,
|
|
39
39
|
DeterministicIdContextProvider,
|
|
40
40
|
withDeterministicId,
|
|
41
41
|
useDeterministicId
|
|
42
|
-
} from './DeterministicIdContext'
|
|
42
|
+
} from './DeterministicIdContext/index.js'
|
|
43
43
|
|
|
44
44
|
export type { GetInteractionOptions } from './getInteraction'
|
|
45
45
|
export type { InteractionType } from './getInteraction'
|