@cosmicdrift/kumiko-renderer-web 0.269.0 → 0.269.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-renderer-web",
3
- "version": "0.269.0",
3
+ "version": "0.269.2",
4
4
  "description": "Web-platform bindings for @cosmicdrift/kumiko-renderer. HTML default-primitives, browser history-based navigation, EventSource-backed live events, and a one-call createKumikoApp that mounts the whole stack via react-dom.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -16,9 +16,9 @@
16
16
  "./styles.css": "./src/styles.css"
17
17
  },
18
18
  "dependencies": {
19
- "@cosmicdrift/kumiko-dispatcher-live": "0.269.0",
20
- "@cosmicdrift/kumiko-headless": "0.269.0",
21
- "@cosmicdrift/kumiko-renderer": "0.269.0",
19
+ "@cosmicdrift/kumiko-dispatcher-live": "0.269.2",
20
+ "@cosmicdrift/kumiko-headless": "0.269.2",
21
+ "@cosmicdrift/kumiko-renderer": "0.269.2",
22
22
  "@radix-ui/react-dialog": "^1.1.15",
23
23
  "@radix-ui/react-dropdown-menu": "^2.1.16",
24
24
  "@radix-ui/react-label": "^2.1.8",
@@ -66,7 +66,7 @@
66
66
  "@types/react-dom": "^19.2.3",
67
67
  "jsdom": "^29.1.1",
68
68
  "tailwindcss": "^4.3.0",
69
- "@cosmicdrift/kumiko-locale-de": "0.269.0"
69
+ "@cosmicdrift/kumiko-locale-de": "0.269.2"
70
70
  },
71
71
  "repository": {
72
72
  "type": "git",
@@ -152,7 +152,7 @@ describe("Drawer", () => {
152
152
  });
153
153
 
154
154
  describe("belowHeader", () => {
155
- test("default (false): variant=flush keeps inset-y-0, no header offset", () => {
155
+ test("default (false): variant=flush keeps inset-y-0 + h-full, no header offset", () => {
156
156
  render(
157
157
  <Drawer open={true} onOpenChange={() => {}} side="right" variant="flush" testId="drawer">
158
158
  <div>Body</div>
@@ -160,10 +160,11 @@ describe("Drawer", () => {
160
160
  );
161
161
  const content = screen.getByTestId("drawer");
162
162
  expect(content.className).toContain("inset-y-0");
163
+ expect(content.className).toContain("h-full");
163
164
  expect(content.style.top).toBe("");
164
165
  });
165
166
 
166
- test("true + variant=flush + side=right: offsets top by the header var via inline style, sticks to bottom", () => {
167
+ test("true + variant=flush + side=right: offsets top by the header var via inline style, sticks to bottom, swaps h-full for h-auto", () => {
167
168
  render(
168
169
  <Drawer
169
170
  open={true}
@@ -183,6 +184,32 @@ describe("Drawer", () => {
183
184
  expect(content.style.top).toBe("var(--shell-header-height)");
184
185
  expect(content.style.bottom).toBe("0px");
185
186
  expect(content.className).toContain("inset-y-0");
187
+ // h-full would force 100% viewport height and push the bottom edge
188
+ // (and the footer slot) past the viewport once top is also shifted
189
+ // down — h-auto lets bottom-0 (via the inline style above) determine
190
+ // the height instead, so the panel's bottom edge stays on-screen.
191
+ expect(content.className).not.toContain("h-full");
192
+ expect(content.className).toContain("h-auto");
193
+ });
194
+
195
+ test("true + variant=flush + side=left: same h-full-to-h-auto swap as side=right", () => {
196
+ render(
197
+ <Drawer
198
+ open={true}
199
+ onOpenChange={() => {}}
200
+ side="left"
201
+ variant="flush"
202
+ belowHeader
203
+ testId="drawer"
204
+ >
205
+ <div>Body</div>
206
+ </Drawer>,
207
+ );
208
+ const content = screen.getByTestId("drawer");
209
+ expect(content.style.top).toBe("var(--shell-header-height)");
210
+ expect(content.style.bottom).toBe("0px");
211
+ expect(content.className).not.toContain("h-full");
212
+ expect(content.className).toContain("h-auto");
186
213
  });
187
214
 
188
215
  test("true + variant=flush + side=top: top offset instead of top-0", () => {
@@ -115,14 +115,19 @@ function sidePanelClass(
115
115
  // same-group `top-0` vs `top-(--x)`, which it does). Overriding top
116
116
  // via inline `style` instead (Drawer's `verticalOffsetStyle`) always
117
117
  // wins over both, without depending on that gap.
118
+ // `h-full` fights that same style override on height: it pins the
119
+ // panel to 100% of the viewport regardless of `top`, pushing the
120
+ // bottom edge (and the footer slot) past the viewport when belowHeader
121
+ // also shifts `top` down. `h-auto` lets `inset-y-0`'s `bottom-0` (kept
122
+ // in sync by the inline `bottom: 0`) determine the height instead.
118
123
  case "left":
119
- return `inset-y-0 left-0 h-full ${WIDTH_CLASS} border-r shadow-2xl overflow-hidden`;
124
+ return `inset-y-0 left-0 ${belowHeader ? "h-auto" : "h-full"} ${WIDTH_CLASS} border-r shadow-2xl overflow-hidden`;
120
125
  case "top":
121
126
  return `inset-x-0 ${belowHeader ? "top-(--shell-header-height)" : "top-0"} h-auto max-h-[80vh] border-b shadow-2xl overflow-hidden`;
122
127
  case "bottom":
123
128
  return "inset-x-0 bottom-0 h-auto max-h-[80vh] border-t shadow-2xl overflow-hidden";
124
129
  default:
125
- return `inset-y-0 right-0 h-full ${WIDTH_CLASS} border-l shadow-2xl overflow-hidden`;
130
+ return `inset-y-0 right-0 ${belowHeader ? "h-auto" : "h-full"} ${WIDTH_CLASS} border-l shadow-2xl overflow-hidden`;
126
131
  }
127
132
  }
128
133
  switch (side) {