@atlaskit/onboarding 12.3.3 → 12.3.4

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/onboarding
2
2
 
3
+ ## 12.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#114282](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114282)
8
+ [`ff1c7111d8dd5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ff1c7111d8dd5) -
9
+ Update dependencies and remove unused internal exports.
10
+
3
11
  ## 12.3.3
4
12
 
5
13
  ### Patch Changes
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.useElementBox = exports.ElementBox = void 0;
7
+ exports.ElementBox = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _react = require("react");
10
10
  var _bindEventListener = require("bind-event-listener");
@@ -133,7 +133,7 @@ var usePollingElementBox = function usePollingElementBox(element, updateMethod)
133
133
  * Not using ResizeObserver because of IE11 support.
134
134
  * @param element HTMLElement to watch when resizing.
135
135
  */
136
- var useElementBox = exports.useElementBox = function useElementBox(element, resizeUpdateMethod) {
136
+ var useElementBox = function useElementBox(element, resizeUpdateMethod) {
137
137
  var updateMethod = resizeUpdateMethod || 'resizeListener';
138
138
  var boxViaResizeListener = useResizeAwareElementBox(element, updateMethod);
139
139
  var boxViaPolling = usePollingElementBox(element, updateMethod);
@@ -4,7 +4,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.ElementObserver = ElementObserver;
8
7
  exports.useElementObserver = useElementObserver;
9
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
9
  var _react = require("react");
@@ -68,32 +67,6 @@ function useElementObserver(element) {
68
67
  return targetContentVersion;
69
68
  }
70
69
 
71
- /**
72
- * A component that watches for changes to a node and forces a re-render when it changes.
73
- *
74
- * @param props
75
- * @param props.element The node to watch for changes.
76
- * @param props.children The children to render.
77
- * @param [props.disableWatch=false] Whether to watch for changes or not.
78
- * @param [props.onChange] A callback that is called when the node changes.
79
- *
80
- * @component
81
- * @internal
82
- */
83
- function ElementObserver(_ref) {
84
- var element = _ref.element,
85
- children = _ref.children,
86
- onChange = _ref.onChange,
87
- disableWatch = _ref.disableWatch;
88
- useElementObserver(element, {
89
- disableWatch: disableWatch,
90
- onChange: onChange
91
- });
92
- return {
93
- children: children
94
- };
95
- }
96
-
97
70
  /**
98
71
  * When the browser is idle call the callback.
99
72
  *
@@ -109,7 +109,7 @@ const usePollingElementBox = (element, updateMethod) => {
109
109
  * Not using ResizeObserver because of IE11 support.
110
110
  * @param element HTMLElement to watch when resizing.
111
111
  */
112
- export const useElementBox = (element, resizeUpdateMethod) => {
112
+ const useElementBox = (element, resizeUpdateMethod) => {
113
113
  const updateMethod = resizeUpdateMethod || 'resizeListener';
114
114
  const boxViaResizeListener = useResizeAwareElementBox(element, updateMethod);
115
115
  const boxViaPolling = usePollingElementBox(element, updateMethod);
@@ -54,33 +54,6 @@ export function useElementObserver(element, opts = {}) {
54
54
  return targetContentVersion;
55
55
  }
56
56
 
57
- /**
58
- * A component that watches for changes to a node and forces a re-render when it changes.
59
- *
60
- * @param props
61
- * @param props.element The node to watch for changes.
62
- * @param props.children The children to render.
63
- * @param [props.disableWatch=false] Whether to watch for changes or not.
64
- * @param [props.onChange] A callback that is called when the node changes.
65
- *
66
- * @component
67
- * @internal
68
- */
69
- export function ElementObserver({
70
- element,
71
- children,
72
- onChange,
73
- disableWatch
74
- }) {
75
- useElementObserver(element, {
76
- disableWatch,
77
- onChange
78
- });
79
- return {
80
- children
81
- };
82
- }
83
-
84
57
  /**
85
58
  * When the browser is idle call the callback.
86
59
  *
@@ -126,7 +126,7 @@ var usePollingElementBox = function usePollingElementBox(element, updateMethod)
126
126
  * Not using ResizeObserver because of IE11 support.
127
127
  * @param element HTMLElement to watch when resizing.
128
128
  */
129
- export var useElementBox = function useElementBox(element, resizeUpdateMethod) {
129
+ var useElementBox = function useElementBox(element, resizeUpdateMethod) {
130
130
  var updateMethod = resizeUpdateMethod || 'resizeListener';
131
131
  var boxViaResizeListener = useResizeAwareElementBox(element, updateMethod);
132
132
  var boxViaPolling = usePollingElementBox(element, updateMethod);
@@ -60,32 +60,6 @@ export function useElementObserver(element) {
60
60
  return targetContentVersion;
61
61
  }
62
62
 
63
- /**
64
- * A component that watches for changes to a node and forces a re-render when it changes.
65
- *
66
- * @param props
67
- * @param props.element The node to watch for changes.
68
- * @param props.children The children to render.
69
- * @param [props.disableWatch=false] Whether to watch for changes or not.
70
- * @param [props.onChange] A callback that is called when the node changes.
71
- *
72
- * @component
73
- * @internal
74
- */
75
- export function ElementObserver(_ref) {
76
- var element = _ref.element,
77
- children = _ref.children,
78
- onChange = _ref.onChange,
79
- disableWatch = _ref.disableWatch;
80
- useElementObserver(element, {
81
- disableWatch: disableWatch,
82
- onChange: onChange
83
- });
84
- return {
85
- children: children
86
- };
87
- }
88
-
89
63
  /**
90
64
  * When the browser is idle call the callback.
91
65
  *
@@ -1,5 +1,5 @@
1
1
  import React, { type MouseEvent } from 'react';
2
- export interface CloneProps {
2
+ interface CloneProps {
3
3
  /**
4
4
  * Whether to display a pulse animation around the spotlighted element.
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import React, { Component, type ComponentType, type ReactNode } from 'react';
2
2
  import { type Actions } from '../types';
3
- export interface SpotlightDialogProps {
3
+ interface SpotlightDialogProps {
4
4
  /**
5
5
  * Buttons to render in the footer.
6
6
  */
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type ScrollLogicalPosition, type SpotlightProps } from '../types';
3
3
  import { type ElementBoundingBox } from '../utils/use-element-box';
4
- export interface SpotlightInnerProps extends SpotlightProps {
4
+ interface SpotlightInnerProps extends SpotlightProps {
5
5
  /**
6
6
  * The spotlight target DOM element.
7
7
  */
@@ -5,12 +5,6 @@ export interface ElementBoundingBox {
5
5
  width: number;
6
6
  }
7
7
  type ResizeUpdateMethod = 'polling' | 'resizeListener';
8
- /**
9
- * Will listen to the document resizing to see if an element has moved positions.
10
- * Not using ResizeObserver because of IE11 support.
11
- * @param element HTMLElement to watch when resizing.
12
- */
13
- export declare const useElementBox: (element: HTMLElement, resizeUpdateMethod?: ResizeUpdateMethod) => ElementBoundingBox;
14
8
  /**
15
9
  * __Element box__
16
10
  *
@@ -14,23 +14,3 @@ export declare function useElementObserver(element: Node, opts?: {
14
14
  disableWatch?: boolean;
15
15
  onChange?: (version: number) => void;
16
16
  }): number;
17
- /**
18
- * A component that watches for changes to a node and forces a re-render when it changes.
19
- *
20
- * @param props
21
- * @param props.element The node to watch for changes.
22
- * @param props.children The children to render.
23
- * @param [props.disableWatch=false] Whether to watch for changes or not.
24
- * @param [props.onChange] A callback that is called when the node changes.
25
- *
26
- * @component
27
- * @internal
28
- */
29
- export declare function ElementObserver({ element, children, onChange, disableWatch, }: {
30
- element: HTMLElement;
31
- children: any;
32
- onChange?: (version: number) => void;
33
- disableWatch?: boolean;
34
- }): {
35
- children: any;
36
- };
@@ -1,5 +1,5 @@
1
1
  import React, { type MouseEvent } from 'react';
2
- export interface CloneProps {
2
+ interface CloneProps {
3
3
  /**
4
4
  * Whether to display a pulse animation around the spotlighted element.
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import React, { Component, type ComponentType, type ReactNode } from 'react';
2
2
  import { type Actions } from '../types';
3
- export interface SpotlightDialogProps {
3
+ interface SpotlightDialogProps {
4
4
  /**
5
5
  * Buttons to render in the footer.
6
6
  */
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type ScrollLogicalPosition, type SpotlightProps } from '../types';
3
3
  import { type ElementBoundingBox } from '../utils/use-element-box';
4
- export interface SpotlightInnerProps extends SpotlightProps {
4
+ interface SpotlightInnerProps extends SpotlightProps {
5
5
  /**
6
6
  * The spotlight target DOM element.
7
7
  */
@@ -5,12 +5,6 @@ export interface ElementBoundingBox {
5
5
  width: number;
6
6
  }
7
7
  type ResizeUpdateMethod = 'polling' | 'resizeListener';
8
- /**
9
- * Will listen to the document resizing to see if an element has moved positions.
10
- * Not using ResizeObserver because of IE11 support.
11
- * @param element HTMLElement to watch when resizing.
12
- */
13
- export declare const useElementBox: (element: HTMLElement, resizeUpdateMethod?: ResizeUpdateMethod) => ElementBoundingBox;
14
8
  /**
15
9
  * __Element box__
16
10
  *
@@ -14,23 +14,3 @@ export declare function useElementObserver(element: Node, opts?: {
14
14
  disableWatch?: boolean;
15
15
  onChange?: (version: number) => void;
16
16
  }): number;
17
- /**
18
- * A component that watches for changes to a node and forces a re-render when it changes.
19
- *
20
- * @param props
21
- * @param props.element The node to watch for changes.
22
- * @param props.children The children to render.
23
- * @param [props.disableWatch=false] Whether to watch for changes or not.
24
- * @param [props.onChange] A callback that is called when the node changes.
25
- *
26
- * @component
27
- * @internal
28
- */
29
- export declare function ElementObserver({ element, children, onChange, disableWatch, }: {
30
- element: HTMLElement;
31
- children: any;
32
- onChange?: (version: number) => void;
33
- disableWatch?: boolean;
34
- }): {
35
- children: any;
36
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "12.3.3",
3
+ "version": "12.3.4",
4
4
  "description": "An onboarding spotlight introduces new features to users through focused messages or multi-step tours.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"