@htmlbricks/hb-layout-desktop 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/manifest.json CHANGED
@@ -166,9 +166,6 @@
166
166
  },
167
167
  "type": "array"
168
168
  },
169
- "onescreen": {
170
- "type": "boolean"
171
- },
172
169
  "page_title": {
173
170
  "type": "string"
174
171
  },
@@ -196,6 +193,9 @@
196
193
  },
197
194
  "type": "object"
198
195
  },
196
+ "single_screen": {
197
+ "type": "boolean"
198
+ },
199
199
  "socials": {
200
200
  "$ref": "#/definitions/ISocials"
201
201
  },
@@ -547,7 +547,7 @@
547
547
  }
548
548
  }
549
549
  },
550
- "description": "Desktop layout with top navbar, optional left sidebar (sidebar-desktop) when navigation links are present, main page area, optional cookie-law banner, and footer. The host is fixed to the viewport height (100dvh) so tall slotted content cannot grow the shell or stretch the sidebar; the sidebar rail never exceeds that band. Without onescreen, the page column scrolls and includes the cookie banner and footer after the slot. With onescreen, cookie and footer sit fixed at the bottom of the main column (always visible) and only the page slot area scrolls; with footer.type auto the footer uses the compact (small) variant. The main row uses CSS Grid (sidebar track + page).",
550
+ "description": "Desktop layout with top navbar, optional left sidebar (sidebar-desktop) when navigation links are present, main page area, optional cookie-law banner, and footer. The host is fixed to the viewport height (100dvh) so tall slotted content cannot grow the shell or stretch the sidebar; the sidebar rail never exceeds that band. Without `single_screen`, the page column scrolls and includes the cookie banner and footer after the slot. With `single_screen`, cookie and footer sit fixed at the bottom of the main column (always visible) and only the page slot area scrolls; with footer.type auto the footer uses the compact (small) variant. The main row uses CSS Grid (sidebar track + page).",
551
551
  "storybookArgs": {
552
552
  "pageChange": {
553
553
  "action": "pageChange"
@@ -634,7 +634,7 @@
634
634
  "type": "boolean"
635
635
  }
636
636
  },
637
- "onescreen": {
637
+ "single_screen": {
638
638
  "control": {
639
639
  "type": "boolean"
640
640
  }
@@ -820,7 +820,7 @@
820
820
  }
821
821
  },
822
822
  {
823
- "name": "onescreen",
823
+ "name": "single_screen",
824
824
  "description": "Viewport shell: cookie and footer stay at the bottom of the main column (always visible); only the page slot scrolls. With footer.type auto the footer uses the compact (small) variant. Long sidebar (26 links) exercises internal sidebar scrolling.",
825
825
  "data": {
826
826
  "company": {
@@ -1051,7 +1051,7 @@
1051
1051
  "key": "cookiepolicy"
1052
1052
  }
1053
1053
  ],
1054
- "onescreen": true,
1054
+ "single_screen": true,
1055
1055
  "page_title": "One-screen layout"
1056
1056
  }
1057
1057
  },
@@ -1254,7 +1254,7 @@
1254
1254
  }
1255
1255
  }
1256
1256
  ],
1257
- "iifeIntegrity": "sha384-Eyh4EIDeeN8wKFpDYMilB2XeuJc+jj5Q55snpMoSkJZXOdnQJ0zZZoAzRxA13mFp",
1257
+ "iifeIntegrity": "sha384-j9YN0qhdsf6EcE/0VVR4BpVd0DvQuF9UY+7PvrEaE0+PzSCRIjEEI4e2TV9yJM2D",
1258
1258
  "dependencies": [
1259
1259
  {
1260
1260
  "name": "hb-footer",
@@ -1328,5 +1328,5 @@
1328
1328
  },
1329
1329
  "iifePath": "main.iife.js",
1330
1330
  "repoName": "@htmlbricks/hb-layout-desktop",
1331
- "version": "0.68.6"
1331
+ "version": "0.68.8"
1332
1332
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-layout-desktop",
3
- "version": "0.68.6",
3
+ "version": "0.68.8",
4
4
  "contributors": [],
5
- "description": "Desktop layout with top navbar, optional left sidebar (sidebar-desktop) when navigation links are present, main page area, optional cookie-law banner, and footer. The host is fixed to the viewport height (100dvh) so tall slotted content cannot grow the shell or stretch the sidebar; the sidebar rail never exceeds that band. Without onescreen, the page column scrolls and includes the cookie banner and footer after the slot. With onescreen, cookie and footer sit fixed at the bottom of the main column (always visible) and only the page slot area scrolls; with footer.type auto the footer uses the compact (small) variant. The main row uses CSS Grid (sidebar track + page).",
5
+ "description": "Desktop layout with top navbar, optional left sidebar (sidebar-desktop) when navigation links are present, main page area, optional cookie-law banner, and footer. The host is fixed to the viewport height (100dvh) so tall slotted content cannot grow the shell or stretch the sidebar; the sidebar rail never exceeds that band. Without `single_screen`, the page column scrolls and includes the cookie banner and footer after the slot. With `single_screen`, cookie and footer sit fixed at the bottom of the main column (always visible) and only the page slot area scrolls; with footer.type auto the footer uses the compact (small) variant. The main row uses CSS Grid (sidebar track + page).",
6
6
  "licenses": [
7
7
  {
8
8
  "type": "Apache-2.0",
@@ -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 HbLayoutDesktopElement
17
- extends Omit<HTMLElement, "addEventListener" | "removeEventListener">,
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
- type DomKeys = keyof HTMLElement;
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 DomKeys ? never : K]?: string;
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-layout-desktop": HTMLAttributes<HTMLElement> & HbSvelteAttrs & HbSvelteEventAttrs;
47
+ "hb-layout-desktop": HbSvelteHostAttributes;
32
48
  }
33
49
  }
34
50
 
@@ -59,9 +59,6 @@
59
59
  },
60
60
  "type": "array"
61
61
  },
62
- "onescreen": {
63
- "type": "boolean"
64
- },
65
62
  "page_title": {
66
63
  "type": "string"
67
64
  },
@@ -89,6 +86,9 @@
89
86
  },
90
87
  "type": "object"
91
88
  },
89
+ "single_screen": {
90
+ "type": "boolean"
91
+ },
92
92
  "socials": {
93
93
  "$ref": "#/definitions/ISocials"
94
94
  },
@@ -21,7 +21,7 @@ export type Component = {
21
21
  usermenu?: IUserMenu;
22
22
  cookielaw?: string;
23
23
  columns?: IColumn[];
24
- onescreen?: boolean;
24
+ single_screen?: boolean;
25
25
  cookielawuri4more?: string;
26
26
  cookielawallowdecline?: boolean;
27
27
  cookielawlanguage?: string;