@tour-kit/hints 0.1.0 → 0.2.0

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,41 @@
1
1
  # @tour-kit/hints
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add tour hooks and utility functions
8
+
9
+ ### New Hooks
10
+
11
+ - `useTour` - Main tour control hook with state and actions
12
+ - `useStep` - Individual step management hook
13
+ - `useSpotlight` - Spotlight overlay positioning and styling
14
+ - `useKeyboardNavigation` - Keyboard navigation (arrow keys, Escape)
15
+ - `useFocusTrap` - Focus trap for accessibility compliance
16
+ - `usePersistence` - Tour state persistence (localStorage/sessionStorage/cookies)
17
+ - `useElementPosition` - Track element position with ResizeObserver
18
+ - `useMediaQuery` / `usePrefersReducedMotion` - Media query hooks
19
+
20
+ ### New Utilities
21
+
22
+ - DOM utilities: `waitForElement`, `isElementVisible`, `getScrollParent`
23
+ - Position utilities: `calculatePosition`, `getOptimalPlacement`
24
+ - Scroll utilities: `scrollIntoView`, `getScrollOffset`
25
+ - Storage utilities: `createStorageAdapter`, `createPrefixedStorage`
26
+ - Accessibility utilities: `generateId`, `announceToScreenReader`, `trapFocus`
27
+ - Factory functions: `createTour`, `createStep`
28
+
29
+ ### Context Providers
30
+
31
+ - `TourProvider` - Main tour state management with reducer
32
+ - `TourKitProvider` - Configuration wrapper with merged configs
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies
37
+ - @tour-kit/core@0.2.0
38
+
3
39
  ## 0.1.0
4
40
 
5
41
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -3,10 +3,6 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
6
  var __copyProps = (to, from, except, desc) => {
11
7
  if (from && typeof from === "object" || typeof from === "function") {
12
8
  for (let key of __getOwnPropNames(from))
@@ -15,23 +11,15 @@ var __copyProps = (to, from, except, desc) => {
15
11
  }
16
12
  return to;
17
13
  };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
18
15
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
16
 
20
17
  // src/index.ts
21
18
  var index_exports = {};
22
- __export(index_exports, {
23
- VERSION: () => VERSION,
24
- hello: () => hello2,
25
- helloCore: () => import_core.hello
26
- });
27
19
  module.exports = __toCommonJS(index_exports);
28
- var import_core = require("@tour-kit/core");
29
- var VERSION = "0.0.1";
30
- var hello2 = () => "Hello from @tour-kit/hints!";
20
+ __reExport(index_exports, require("@tour-kit/core"), module.exports);
31
21
  // Annotate the CommonJS export names for ESM import in node:
32
22
  0 && (module.exports = {
33
- VERSION,
34
- hello,
35
- helloCore
23
+ ...require("@tour-kit/core")
36
24
  });
37
25
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export const VERSION = '0.0.1'\nexport const hello = () => 'Hello from @tour-kit/hints!'\nexport { hello as helloCore } from '@tour-kit/core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA;AAAA;AAAA;AAEA,kBAAmC;AAF5B,IAAM,UAAU;AAChB,IAAMA,SAAQ,MAAM;","names":["hello"]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Re-export types from core\nexport * from '@tour-kit/core'\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AACA,0BAAc,2BADd;","names":[]}
package/dist/index.d.cts CHANGED
@@ -1,6 +1 @@
1
- export { hello as helloCore } from '@tour-kit/core';
2
-
3
- declare const VERSION = "0.0.1";
4
- declare const hello: () => string;
5
-
6
- export { VERSION, hello };
1
+ export * from '@tour-kit/core';
package/dist/index.d.ts CHANGED
@@ -1,6 +1 @@
1
- export { hello as helloCore } from '@tour-kit/core';
2
-
3
- declare const VERSION = "0.0.1";
4
- declare const hello: () => string;
5
-
6
- export { VERSION, hello };
1
+ export * from '@tour-kit/core';
package/dist/index.js CHANGED
@@ -1,10 +1,3 @@
1
1
  // src/index.ts
2
- import { hello } from "@tour-kit/core";
3
- var VERSION = "0.0.1";
4
- var hello2 = () => "Hello from @tour-kit/hints!";
5
- export {
6
- VERSION,
7
- hello2 as hello,
8
- hello as helloCore
9
- };
2
+ export * from "@tour-kit/core";
10
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export const VERSION = '0.0.1'\nexport const hello = () => 'Hello from @tour-kit/hints!'\nexport { hello as helloCore } from '@tour-kit/core'\n"],"mappings":";AAEA,SAAkB,aAAiB;AAF5B,IAAM,UAAU;AAChB,IAAMA,SAAQ,MAAM;","names":["hello"]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Re-export types from core\nexport * from '@tour-kit/core'\n"],"mappings":";AACA,cAAc;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tour-kit/hints",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Headless onboarding and product tour library for React - Hints package",
5
5
  "author": "Tour Kit Team",
6
6
  "license": "MIT",
@@ -53,11 +53,11 @@
53
53
  "registry": "https://registry.npmjs.org/"
54
54
  },
55
55
  "dependencies": {
56
- "@tour-kit/core": "0.1.0"
56
+ "@tour-kit/core": "0.2.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "react": ">=18.0.0",
60
- "react-dom": ">=18.0.0"
59
+ "react": "^18.0.0 || >=19.2.0",
60
+ "react-dom": "^18.0.0 || >=19.2.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/react": "^19.2.0",