heatspot 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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  - ESM package output with TypeScript declarations
8
8
  - Pointer heat tracking utility API
9
- - Reusable `<heat-map>` component with slot-based content
9
+ - Reusable `<heat-spot>` component with slot-based content
10
10
  - Built-in toggle icon (top-left) to show heat overlay
11
11
  - Configurable `toolbar` attribute: `simple` (default) or `hidden`
12
12
 
@@ -24,17 +24,17 @@ npm install heatspot
24
24
  import "heatspot";
25
25
  ```
26
26
 
27
- The `heat-map` custom element is registered on import.
27
+ The `heat-spot` custom element is registered on import.
28
28
 
29
29
  ### 2. Render the component
30
30
 
31
31
  ```html
32
- <heat-map toolbar="simple">
32
+ <heat-spot toolbar="simple">
33
33
  <section>
34
34
  <h2>Example Panel</h2>
35
35
  <p>Move the mouse over this area, then click the icon in the top-left.</p>
36
36
  </section>
37
- </heat-map>
37
+ </heat-spot>
38
38
  ```
39
39
 
40
40
  `toolbar` options:
@@ -45,12 +45,12 @@ The `heat-map` custom element is registered on import.
45
45
  Example with hidden toolbar:
46
46
 
47
47
  ```html
48
- <heat-map toolbar="hidden">
48
+ <heat-spot toolbar="hidden">
49
49
  <section>
50
50
  <h2>Passive Tracking Panel</h2>
51
51
  <p>The heatmap toggle icon is not rendered in this mode.</p>
52
52
  </section>
53
- </heat-map>
53
+ </heat-spot>
54
54
  ```
55
55
 
56
56
  ### Example
@@ -9,7 +9,7 @@ export declare const MIN_MERGE_RADIUS = 4;
9
9
  /** Minimum allowed hotspot storage size for a tracker instance. */
10
10
  export declare const MIN_MAX_HOTSPOTS = 20;
11
11
  /**
12
- * Tracker configuration used by the `heat-map` web component instance.
12
+ * Tracker configuration used by the `heat-spot` web component instance.
13
13
  */
14
14
  export declare const ELEMENT_TRACKER_CONFIG: HeatmapConfig;
15
15
  /**
@@ -10,7 +10,7 @@ export const MIN_MERGE_RADIUS = 4;
10
10
  /** Minimum allowed hotspot storage size for a tracker instance. */
11
11
  export const MIN_MAX_HOTSPOTS = 20;
12
12
  /**
13
- * Tracker configuration used by the `heat-map` web component instance.
13
+ * Tracker configuration used by the `heat-spot` web component instance.
14
14
  */
15
15
  export const ELEMENT_TRACKER_CONFIG = {
16
16
  mergeRadius: 24,
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from "lit";
2
- export declare class HeatMapElement extends LitElement {
2
+ export declare class HeatSpotElement extends LitElement {
3
3
  static properties: {
4
4
  heatmapVisible: {
5
5
  state: boolean;
@@ -2,7 +2,7 @@ import { LitElement, css, html } from "lit";
2
2
  import { HeatmapTracker } from "./core/heatmap-tracker.js";
3
3
  import { ELEMENT_TRACKER_CONFIG } from "./constants/constants.js";
4
4
  import { renderHeatmapOverlay } from "./rendering/renderer.js";
5
- export class HeatMapElement extends LitElement {
5
+ export class HeatSpotElement extends LitElement {
6
6
  static properties = {
7
7
  heatmapVisible: { state: true },
8
8
  toolbar: { type: String, reflect: true }
@@ -171,6 +171,6 @@ export class HeatMapElement extends LitElement {
171
171
  `;
172
172
  }
173
173
  }
174
- if (typeof customElements !== "undefined" && !customElements.get("heat-map")) {
175
- customElements.define("heat-map", HeatMapElement);
174
+ if (typeof customElements !== "undefined" && !customElements.get("heat-spot")) {
175
+ customElements.define("heat-spot", HeatSpotElement);
176
176
  }
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { HeatmapTracker } from "./core/heatmap-tracker.js";
2
2
  import { DEFAULT_HEATMAP_CONFIG } from "./constants/constants.js";
3
- import { HeatMapElement } from "./heatmap-element.js";
3
+ import { HeatSpotElement } from "./heatspot-element.js";
4
4
  import { type HeatmapConfig, type HeatmapSnapshot, type ViewportSize } from "./contracts/heatmap-contracts.js";
5
5
  export declare const hello = "hello";
6
- export { HeatMapElement };
6
+ export { HeatSpotElement };
7
7
  export { DEFAULT_HEATMAP_CONFIG, HeatmapTracker };
8
8
  export type { HeatmapConfig, HeatmapHotspot, HeatmapToolbarMode, HeatmapSnapshot, ViewportSize } from "./contracts/heatmap-contracts.js";
9
9
  /**
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { HeatmapTracker } from "./core/heatmap-tracker.js";
2
2
  import { DEFAULT_HEATMAP_CONFIG } from "./constants/constants.js";
3
- import { HeatMapElement } from "./heatmap-element.js";
3
+ import { HeatSpotElement } from "./heatspot-element.js";
4
4
  export const hello = "hello";
5
- export { HeatMapElement };
5
+ export { HeatSpotElement };
6
6
  export { DEFAULT_HEATMAP_CONFIG, HeatmapTracker };
7
7
  const globalTracker = new HeatmapTracker(DEFAULT_HEATMAP_CONFIG);
8
8
  let moveListener = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heatspot",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A tiny ESM TypeScript library.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,8 +17,8 @@
17
17
  "scripts": {
18
18
  "prebuild": "rimraf dist",
19
19
  "build": "tsc -p tsconfig.build.json",
20
- "build:verify": "npm run test:coverage && npm run build:harness",
21
- "prepublishOnly": "npm run test && npm run build",
20
+ "build:verify": "npm run test:coverage && npm run lint && npm run build:harness && npm run test:check",
21
+ "prepublishOnly": "npm run build:verify && npm run test && npm run build",
22
22
  "pack:check": "npm pack --dry-run",
23
23
  "start": "npm run build && vite --config harness/vite.config.ts",
24
24
  "build:harness": "npm run build && vite build --config harness/vite.config.ts",