@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.
Files changed (45) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/LICENSE.md +1 -0
  3. package/{lib/getDisplayName.js → babel.config.cjs} +11 -20
  4. package/es/DeterministicIdContext/DeterministicIdContext.js +0 -2
  5. package/es/DeterministicIdContext/DeterministicIdContextProvider.js +2 -1
  6. package/es/DeterministicIdContext/index.js +5 -4
  7. package/es/DeterministicIdContext/useDeterministicId.js +2 -1
  8. package/es/DeterministicIdContext/withDeterministicId.js +1 -1
  9. package/es/ensureSingleChild.js +2 -1
  10. package/es/getInteraction.js +0 -1
  11. package/es/index.js +13 -12
  12. package/es/matchComponentTypes.js +2 -1
  13. package/es/omitProps.js +0 -1
  14. package/package.json +9 -11
  15. package/src/DeterministicIdContext/DeterministicIdContext.ts +0 -1
  16. package/src/DeterministicIdContext/DeterministicIdContextProvider.tsx +1 -1
  17. package/src/DeterministicIdContext/index.ts +4 -4
  18. package/src/DeterministicIdContext/useDeterministicId.tsx +1 -1
  19. package/src/DeterministicIdContext/withDeterministicId.tsx +1 -1
  20. package/src/ensureSingleChild.tsx +1 -1
  21. package/src/index.ts +12 -12
  22. package/src/matchComponentTypes.ts +1 -1
  23. package/tsconfig.build.tsbuildinfo +1 -1
  24. package/types/DeterministicIdContext/DeterministicIdContext.d.ts.map +1 -1
  25. package/types/DeterministicIdContext/index.d.ts +4 -4
  26. package/types/DeterministicIdContext/index.d.ts.map +1 -1
  27. package/types/index.d.ts +12 -12
  28. package/types/index.d.ts.map +1 -1
  29. package/lib/DeterministicIdContext/DeterministicIdContext.js +0 -52
  30. package/lib/DeterministicIdContext/DeterministicIdContextProvider.js +0 -54
  31. package/lib/DeterministicIdContext/index.js +0 -33
  32. package/lib/DeterministicIdContext/useDeterministicId.js +0 -66
  33. package/lib/DeterministicIdContext/withDeterministicId.js +0 -75
  34. package/lib/callRenderProp.js +0 -57
  35. package/lib/ensureSingleChild.js +0 -62
  36. package/lib/getElementType.js +0 -77
  37. package/lib/getInteraction.js +0 -63
  38. package/lib/index.js +0 -107
  39. package/lib/matchComponentTypes.js +0 -53
  40. package/lib/omitProps.js +0 -73
  41. package/lib/package.json +0 -1
  42. package/lib/passthroughProps.js +0 -53
  43. package/lib/pickProps.js +0 -64
  44. package/lib/safeCloneElement.js +0 -105
  45. 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.3-snapshot-43](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-43) (2026-05-07)
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
@@ -2,6 +2,7 @@
2
2
  title: The MIT License (MIT)
3
3
  category: Getting Started
4
4
  order: 9
5
+ isWIP: true
5
6
  ---
6
7
 
7
8
  # The MIT License (MIT)
@@ -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
- * category: utilities/react
35
- * ---
36
- * Get the displayName of a React component.
37
- * needs a babel plugin to work https://github.com/facebook/react/issues/4915 !!
38
- * @module getDisplayName
39
- * @param ReactComponent
40
- * @returns the component displayName
41
- */
42
- function getDisplayName(ReactComponent) {
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;
@@ -1,5 +1,3 @@
1
- import "core-js/modules/es.map.get-or-insert.js";
2
- import "core-js/modules/es.map.get-or-insert-computed.js";
3
1
  /*
4
2
  * The MIT License (MIT)
5
3
  *
@@ -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
- import { DeterministicIdContext, defaultDeterministicIDMap } from "./DeterministicIdContext.js";
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
- export { DeterministicIdContextProvider } from "./DeterministicIdContextProvider.js";
25
- export { DeterministicIdContext } from "./DeterministicIdContext.js";
26
- export { withDeterministicId } from "./withDeterministicId.js";
27
- export { useDeterministicId } from "./useDeterministicId.js";
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 "./DeterministicIdContext.js";
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 "./DeterministicIdContext.js";
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';
@@ -23,7 +23,8 @@
23
23
  */
24
24
 
25
25
  import { Children } from 'react';
26
- import { safeCloneElement } from "./safeCloneElement.js";
26
+ import { safeCloneElement } from './safeCloneElement.js';
27
+
27
28
  /**
28
29
  * ---
29
30
  * category: utilities/react
@@ -1,4 +1,3 @@
1
- import "core-js/modules/es.array.includes.js";
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
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 "./callRenderProp.js";
26
- export { ensureSingleChild } from "./ensureSingleChild.js";
27
- export { getDisplayName } from "./getDisplayName.js";
28
- export { getElementType } from "./getElementType.js";
29
- export { getInteraction } from "./getInteraction.js";
30
- export { matchComponentTypes } from "./matchComponentTypes.js";
31
- export { omitProps } from "./omitProps.js";
32
- export { passthroughProps } from "./passthroughProps.js";
33
- export { pickProps } from "./pickProps.js";
34
- export { safeCloneElement } from "./safeCloneElement.js";
35
- export { windowMessageListener } from "./windowMessageListener.js";
36
- export { DeterministicIdContext, DeterministicIdContextProvider, withDeterministicId, useDeterministicId } from "./DeterministicIdContext/index.js";
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
- import { getDisplayName } from "./getDisplayName.js";
24
+
25
+ import { getDisplayName } from './getDisplayName.js';
25
26
  /**
26
27
  * ---
27
28
  * category: utilities/react
package/es/omitProps.js CHANGED
@@ -1,4 +1,3 @@
1
- import "core-js/modules/es.array.includes.js";
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@instructure/ui-react-utils",
3
- "version": "11.7.3-snapshot-43",
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/console": "11.7.3-snapshot-43",
21
- "@instructure/shared-types": "11.7.3-snapshot-43",
22
- "@instructure/ui-decorator": "11.7.3-snapshot-43",
23
- "@instructure/ui-dom-utils": "11.7.3-snapshot-43",
24
- "@instructure/ui-utils": "11.7.3-snapshot-43"
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.3-snapshot-43"
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 --modules es,cjs",
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
 
@@ -23,7 +23,7 @@
23
23
  */
24
24
 
25
25
  import { Children, ReactElement, ReactNode } from 'react'
26
- import { safeCloneElement } from './safeCloneElement'
26
+ import { safeCloneElement } from './safeCloneElement.js'
27
27
 
28
28
  /**
29
29
  * ---
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'
@@ -22,7 +22,7 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { getDisplayName } from './getDisplayName'
25
+ import { getDisplayName } from './getDisplayName.js'
26
26
  import { ComponentType, ReactElement, ReactNode } from 'react'
27
27
 
28
28
  /**