@htmlbricks/hb-site-slideshow 0.68.6 → 0.68.8
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 +1 -1
- package/main.iife.js +1 -1
- package/main.iife.js.map +1 -1
- package/manifest.json +13 -13
- package/package.json +1 -1
- package/types/html-elements.d.ts +14 -1
- package/types/svelte-elements.d.ts +19 -3
- package/types/webcomponent.type.d.ts +1 -1
- package/types/webcomponent_events.type.d.json +9 -9
package/manifest.json
CHANGED
|
@@ -7,38 +7,38 @@
|
|
|
7
7
|
"Events": {
|
|
8
8
|
"additionalProperties": false,
|
|
9
9
|
"properties": {
|
|
10
|
-
"
|
|
10
|
+
"changeHover": {
|
|
11
11
|
"additionalProperties": false,
|
|
12
12
|
"properties": {
|
|
13
|
+
"hover": {
|
|
14
|
+
"type": "boolean"
|
|
15
|
+
},
|
|
13
16
|
"index": {
|
|
14
17
|
"type": "number"
|
|
15
18
|
}
|
|
16
19
|
},
|
|
17
20
|
"required": [
|
|
18
|
-
"index"
|
|
21
|
+
"index",
|
|
22
|
+
"hover"
|
|
19
23
|
],
|
|
20
24
|
"type": "object"
|
|
21
25
|
},
|
|
22
|
-
"
|
|
26
|
+
"changeSlide": {
|
|
23
27
|
"additionalProperties": false,
|
|
24
28
|
"properties": {
|
|
25
|
-
"hover": {
|
|
26
|
-
"type": "boolean"
|
|
27
|
-
},
|
|
28
29
|
"index": {
|
|
29
30
|
"type": "number"
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
"required": [
|
|
33
|
-
"index"
|
|
34
|
-
"hover"
|
|
34
|
+
"index"
|
|
35
35
|
],
|
|
36
36
|
"type": "object"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"required": [
|
|
40
40
|
"changeSlide",
|
|
41
|
-
"
|
|
41
|
+
"changeHover"
|
|
42
42
|
],
|
|
43
43
|
"type": "object"
|
|
44
44
|
}
|
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
"changeSlide": {
|
|
117
117
|
"action": "changeSlide"
|
|
118
118
|
},
|
|
119
|
-
"
|
|
120
|
-
"action": "
|
|
119
|
+
"changeHover": {
|
|
120
|
+
"action": "changeHover"
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
"styleSetup": {
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
],
|
|
245
|
-
"iifeIntegrity": "sha384-
|
|
245
|
+
"iifeIntegrity": "sha384-FjyI/RXQWSFKQJ7lxIXmSBiFXouSH2jcn4cyxHyrKazqltAA4kLJMzfbEII+yTn3",
|
|
246
246
|
"dependencies": [],
|
|
247
247
|
"screenshots": [],
|
|
248
248
|
"licenses": [
|
|
@@ -265,5 +265,5 @@
|
|
|
265
265
|
},
|
|
266
266
|
"iifePath": "main.iife.js",
|
|
267
267
|
"repoName": "@htmlbricks/hb-site-slideshow",
|
|
268
|
-
"version": "0.68.
|
|
268
|
+
"version": "0.68.8"
|
|
269
269
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlbricks/hb-site-slideshow",
|
|
3
|
-
"version": "0.68.
|
|
3
|
+
"version": "0.68.8",
|
|
4
4
|
"contributors": [],
|
|
5
5
|
"description": "Full-viewport image slideshow: pass `data` as an array of slides (`href`, optional `caption`). Supports optional `index` and `timer`, dots and captions via CSS parts, overlay/prev/next/cover slots, and dispatches slide change and hover events.",
|
|
6
6
|
"licenses": [
|
package/types/html-elements.d.ts
CHANGED
|
@@ -4,17 +4,30 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { Component, Events } from "./webcomponent.type";
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Host properties already on `HTMLElement` (no `svelte/elements` here — DOM typings stay
|
|
9
|
+
* usable without Svelte). Custom `Component` keys that collide stay on the native typing.
|
|
10
|
+
*/
|
|
7
11
|
type DomKeys = keyof HTMLElement;
|
|
8
12
|
type HbComponentAttrs = {
|
|
9
13
|
[K in keyof Component as K extends DomKeys ? never : K]?: string;
|
|
10
14
|
};
|
|
11
15
|
|
|
16
|
+
type HbHtmlElementWithoutListeners = Omit<
|
|
17
|
+
HTMLElement,
|
|
18
|
+
"addEventListener" | "removeEventListener"
|
|
19
|
+
>;
|
|
20
|
+
|
|
12
21
|
/**
|
|
13
22
|
* Re-declare listener methods so custom `Events` overloads are compatible with
|
|
14
23
|
* `HTMLElement` (subclass methods must remain assignable to the base signatures).
|
|
24
|
+
*
|
|
25
|
+
* Like `svelte-elements.d.ts`, we `Omit` keys we define on `HbComponentAttrs` from the DOM
|
|
26
|
+
* base, then add them back: avoids `extends A, B` merging the same key with incompatible types
|
|
27
|
+
* if a name slips past `DomKeys`.
|
|
15
28
|
*/
|
|
16
29
|
export interface HbSiteSlideshowElement
|
|
17
|
-
extends Omit<
|
|
30
|
+
extends Omit<HbHtmlElementWithoutListeners, keyof HbComponentAttrs>,
|
|
18
31
|
HbComponentAttrs {
|
|
19
32
|
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
20
33
|
type: K,
|
|
@@ -8,9 +8,13 @@
|
|
|
8
8
|
import type { HTMLAttributes } from "svelte/elements";
|
|
9
9
|
import type { Component, Events } from "./webcomponent.type";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Keys already modeled on `HTMLAttributes` (global attrs + DOM listeners). Exclude these from
|
|
13
|
+
* `Component` so host props stay plain strings and are not merged with unrelated DOM typings.
|
|
14
|
+
*/
|
|
15
|
+
type HtmlReservedAttrKeys = keyof HTMLAttributes<HTMLElement>;
|
|
12
16
|
type HbSvelteAttrs = {
|
|
13
|
-
[K in keyof Component as K extends
|
|
17
|
+
[K in keyof Component as K extends HtmlReservedAttrKeys ? never : K]?: string;
|
|
14
18
|
};
|
|
15
19
|
|
|
16
20
|
/** `detail` matches `Events[K]`; `currentTarget` is the host element. */
|
|
@@ -26,9 +30,21 @@ type HbSvelteEventAttrs = {
|
|
|
26
30
|
[K in keyof Events & string as `on:${K}`]?: HbSvelteCustomEventHandler<Events[K]>;
|
|
27
31
|
};
|
|
28
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Strip keys we re-declare from Svelte’s base, then add them back: plain intersection would
|
|
35
|
+
* merge `on*` / attrs with conflicting DOM typings (`string & EventHandler` → errors or
|
|
36
|
+
* props treated like listeners).
|
|
37
|
+
*/
|
|
38
|
+
type HbSvelteHostAttributes = Omit<
|
|
39
|
+
HTMLAttributes<HTMLElement>,
|
|
40
|
+
keyof HbSvelteAttrs | keyof HbSvelteEventAttrs
|
|
41
|
+
> &
|
|
42
|
+
HbSvelteAttrs &
|
|
43
|
+
HbSvelteEventAttrs;
|
|
44
|
+
|
|
29
45
|
declare module "svelte/elements" {
|
|
30
46
|
export interface SvelteHTMLElements {
|
|
31
|
-
"hb-site-slideshow":
|
|
47
|
+
"hb-site-slideshow": HbSvelteHostAttributes;
|
|
32
48
|
}
|
|
33
49
|
}
|
|
34
50
|
|
|
@@ -5,38 +5,38 @@
|
|
|
5
5
|
"Events": {
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"properties": {
|
|
8
|
-
"
|
|
8
|
+
"changeHover": {
|
|
9
9
|
"additionalProperties": false,
|
|
10
10
|
"properties": {
|
|
11
|
+
"hover": {
|
|
12
|
+
"type": "boolean"
|
|
13
|
+
},
|
|
11
14
|
"index": {
|
|
12
15
|
"type": "number"
|
|
13
16
|
}
|
|
14
17
|
},
|
|
15
18
|
"required": [
|
|
16
|
-
"index"
|
|
19
|
+
"index",
|
|
20
|
+
"hover"
|
|
17
21
|
],
|
|
18
22
|
"type": "object"
|
|
19
23
|
},
|
|
20
|
-
"
|
|
24
|
+
"changeSlide": {
|
|
21
25
|
"additionalProperties": false,
|
|
22
26
|
"properties": {
|
|
23
|
-
"hover": {
|
|
24
|
-
"type": "boolean"
|
|
25
|
-
},
|
|
26
27
|
"index": {
|
|
27
28
|
"type": "number"
|
|
28
29
|
}
|
|
29
30
|
},
|
|
30
31
|
"required": [
|
|
31
|
-
"index"
|
|
32
|
-
"hover"
|
|
32
|
+
"index"
|
|
33
33
|
],
|
|
34
34
|
"type": "object"
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"required": [
|
|
38
38
|
"changeSlide",
|
|
39
|
-
"
|
|
39
|
+
"changeHover"
|
|
40
40
|
],
|
|
41
41
|
"type": "object"
|
|
42
42
|
}
|