spaday-regular-layout 0.2.2__tar.gz → 0.2.3__tar.gz

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.
Files changed (38) hide show
  1. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/PKG-INFO +1 -1
  2. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/package.json +1 -1
  3. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/src/css/spa.css +14 -0
  4. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/tests/index.spec.js +36 -0
  5. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/pyproject.toml +2 -2
  6. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/spaday_regular_layout/__init__.py +1 -1
  7. spaday_regular_layout-0.2.3/spaday_regular_layout/extension/css/spa.css +1 -0
  8. spaday_regular_layout-0.2.2/spaday_regular_layout/extension/css/spa.css +0 -1
  9. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/.gitignore +0 -0
  10. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/LICENSE +0 -0
  11. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/README.md +0 -0
  12. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/.oxfmtrc.json +0 -0
  13. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/.oxlintrc.json +0 -0
  14. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/build.mjs +0 -0
  15. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/playwright.config.js +0 -0
  16. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/pnpm-lock.yaml +0 -0
  17. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/pnpm-workspace.yaml +0 -0
  18. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/src/css/index.css +0 -0
  19. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/src/html/index.html +0 -0
  20. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/src/ts/css.d.ts +0 -0
  21. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/src/ts/define-guard.ts +0 -0
  22. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/src/ts/index.ts +0 -0
  23. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/tools/bundle.mjs +0 -0
  24. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/tools/css.mjs +0 -0
  25. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/tools/externals.mjs +0 -0
  26. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/tools/getarg.mjs +0 -0
  27. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/tools/html.mjs +0 -0
  28. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/js/tsconfig.json +0 -0
  29. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/spaday_regular_layout/components.cem.json +0 -0
  30. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/spaday_regular_layout/components.py +0 -0
  31. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/spaday_regular_layout/example.py +0 -0
  32. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/spaday_regular_layout/extension/cdn/index.js +0 -0
  33. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/spaday_regular_layout/extension/cdn/index.js.map +0 -0
  34. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/spaday_regular_layout/extension/css/index.css +0 -0
  35. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/spaday_regular_layout/extension/css/lorax.css +0 -0
  36. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/spaday_regular_layout/extension/index.html +0 -0
  37. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/spaday_regular_layout/tests/test_all.py +0 -0
  38. {spaday_regular_layout-0.2.2 → spaday_regular_layout-0.2.3}/spaday_regular_layout/tests/test_example.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: spaday-regular-layout
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: regular-layout for spaday
5
5
  Project-URL: Repository, https://github.com/1kbgz/spaday-regular-layout
6
6
  Project-URL: Homepage, https://github.com/1kbgz/spaday-regular-layout
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spaday-regular-layout",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "regular-layout for spaday",
5
5
  "repository": "git@github.com:1kbgz/spaday-regular-layout.git",
6
6
  "author": "1kbgz <dev@1kbgz.com>",
@@ -29,6 +29,19 @@ spaday-regular-layout.spa {
29
29
  --spa-rl-shadow: rgba(0, 0, 0, 0.05);
30
30
  }
31
31
 
32
+ /* Structural, theme-independent (deliberately not gated on `.spa`): the engine's frame is
33
+ * a column flexbox whose titlebar (height: 24px, shrinkable) loses to the container's
34
+ * min-content floor when panel content is taller than the frame — the tabs collapse to
35
+ * zero height and the content paints where they were. Pin the titlebar and let the
36
+ * container shrink so tall content overflows inside the panel instead. */
37
+ spaday-regular-layout regular-layout-frame::part(titlebar) {
38
+ flex-shrink: 0;
39
+ }
40
+
41
+ spaday-regular-layout regular-layout-frame::part(container) {
42
+ min-height: 0;
43
+ }
44
+
32
45
  spaday-regular-layout.spa regular-layout-frame {
33
46
  --rl-tab-width: 200px;
34
47
  }
@@ -36,6 +49,7 @@ spaday-regular-layout.spa regular-layout-frame {
36
49
  /* Panel content chrome (only the selected frame's container is rendered). */
37
50
  spaday-regular-layout.spa regular-layout-frame::part(container) {
38
51
  box-sizing: border-box;
52
+ overflow: auto;
39
53
  margin: 0 3px 3px 3px;
40
54
  padding: 8px;
41
55
  /* Square top-left so the tab strip sits flush; rounded elsewhere. */
@@ -285,3 +285,39 @@ test("locked layouts select tabs but do not drag-rearrange", async ({
285
285
  );
286
286
  expect(unlocked).not.toBe(before); // the same gesture rearranges once unlocked
287
287
  });
288
+
289
+ test("tall panel content cannot crush the tab titlebar", async ({ page }) => {
290
+ await page.goto("/dist/index.html");
291
+ await page.evaluate(() => {
292
+ const layout = document.createElement("spaday-regular-layout");
293
+ layout.id = "tall-rig";
294
+ layout.className = "spa";
295
+ layout.style.cssText = "width:800px;height:300px";
296
+ const frame = document.createElement("regular-layout-frame");
297
+ frame.setAttribute("name", "chart");
298
+ const tall = document.createElement("div");
299
+ tall.style.cssText = "height:5000px";
300
+ frame.appendChild(tall);
301
+ layout.appendChild(frame);
302
+ layout.layout = { type: "tab-layout", tabs: ["chart"] };
303
+ document.body.appendChild(layout);
304
+ });
305
+ await expect(
306
+ page.locator('regular-layout-frame[name="chart"]'),
307
+ ).toBeVisible();
308
+ const r = await page.evaluate(() => {
309
+ const frame = document.querySelector('regular-layout-frame[name="chart"]');
310
+ const titlebar = frame.shadowRoot.querySelector('[part~="titlebar"]');
311
+ const container = frame.shadowRoot.querySelector('[part~="container"]');
312
+ const cr = container.getBoundingClientRect();
313
+ return {
314
+ titlebarHeight: titlebar.getBoundingClientRect().height,
315
+ containerBottom: cr.bottom,
316
+ frameBottom: frame.getBoundingClientRect().bottom,
317
+ scrolls: container.scrollHeight > container.clientHeight,
318
+ };
319
+ });
320
+ expect(r.titlebarHeight).toBe(24); // the min-content floor must not crush the tabs
321
+ expect(r.containerBottom).toBeLessThanOrEqual(r.frameBottom + 1);
322
+ expect(r.scrolls).toBe(true); // tall content scrolls inside the panel
323
+ });
@@ -13,7 +13,7 @@ authors = [
13
13
  description = "regular-layout for spaday"
14
14
  readme = "README.md"
15
15
  license = { text = "Apache-2.0" }
16
- version = "0.2.2"
16
+ version = "0.2.3"
17
17
  requires-python = ">=3.11"
18
18
  keywords = []
19
19
 
@@ -75,7 +75,7 @@ Repository = "https://github.com/1kbgz/spaday-regular-layout"
75
75
  Homepage = "https://github.com/1kbgz/spaday-regular-layout"
76
76
 
77
77
  [tool.bumpversion]
78
- current_version = "0.2.2"
78
+ current_version = "0.2.3"
79
79
  commit = true
80
80
  tag = true
81
81
  commit_args = "-s"
@@ -4,7 +4,7 @@ from spaday import ComponentPackage
4
4
 
5
5
  from .components import RegularLayoutFrame, SpadayRegularLayout
6
6
 
7
- __version__ = "0.2.2"
7
+ __version__ = "0.2.3"
8
8
 
9
9
  package = ComponentPackage(
10
10
  name="regular-layout",
@@ -0,0 +1 @@
1
+ spaday-regular-layout.spa{--spa-rl-surface:var(--spa-surface,#fff);--spa-rl-surface-2:var(--spa-surface-2,#fafafa);--spa-rl-border:var(--spa-border,#e6e6e6);--spa-rl-muted:var(--spa-muted,#666);--spa-rl-shadow:#0000000d}:where(.wa-dark) spaday-regular-layout.spa{--spa-rl-surface:var(--spa-surface,#15191e);--spa-rl-surface-2:var(--spa-surface-2,#1d232b);--spa-rl-border:var(--spa-border,#333b45);--spa-rl-muted:var(--spa-muted,#9aa3ad);--spa-rl-shadow:#00000059}:where(.wa-light) spaday-regular-layout.spa{--spa-rl-surface:var(--spa-surface,#fff);--spa-rl-surface-2:var(--spa-surface-2,#fafafa);--spa-rl-border:var(--spa-border,#e6e6e6);--spa-rl-muted:var(--spa-muted,#666);--spa-rl-shadow:#0000000d}spaday-regular-layout regular-layout-frame::part(titlebar){flex-shrink:0}spaday-regular-layout regular-layout-frame::part(container){min-height:0}spaday-regular-layout.spa regular-layout-frame{--rl-tab-width:200px}spaday-regular-layout.spa regular-layout-frame::part(container){box-sizing:border-box;border:1px solid var(--spa-rl-border);background:var(--spa-rl-surface);box-shadow:0 1px 2px var(--spa-rl-shadow);border-radius:0 8px 8px;margin:0 3px 3px;padding:8px;overflow:auto}spaday-regular-layout.spa regular-layout-frame::part(titlebar){align-items:end;margin:3px 6px 0 3px}spaday-regular-layout.spa regular-layout-frame::part(tab){box-sizing:border-box;cursor:pointer;border:1px solid var(--spa-rl-border);background:var(--spa-rl-surface-2);color:var(--spa-rl-muted);border-bottom:none;border-radius:8px 8px 0 0;justify-content:center;align-items:center;margin-right:2px;padding:0 10px;font-size:12px}spaday-regular-layout.spa regular-layout-frame::part(title){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}spaday-regular-layout.spa regular-layout-frame::part(active-tab){background:var(--spa-rl-surface);color:inherit}spaday-regular-layout.spa regular-layout-frame::part(close){color:var(--spa-rl-muted);cursor:pointer;background:0 0;border:none;border-radius:4px;align-self:center;width:16px;height:14px;padding:0;font-size:13px;line-height:13px}spaday-regular-layout.spa regular-layout-frame::part(close):before{content:"×"}spaday-regular-layout.spa regular-layout-frame::part(close):hover{background-color:var(--spa-rl-surface-2);transition:background-color .2s}spaday-regular-layout.spa:has(.overlay)>*{opacity:.6}spaday-regular-layout.spa:has(.overlay)>.overlay{opacity:1}spaday-regular-layout.spa regular-layout-frame.overlay{background:var(--spa-rl-surface-2);border:1px dashed var(--spa-rl-border);border-radius:8px;transition:top .1s ease-in-out,height .1s ease-in-out,width .1s ease-in-out,left .1s ease-in-out}
@@ -1 +0,0 @@
1
- spaday-regular-layout.spa{--spa-rl-surface:var(--spa-surface,#fff);--spa-rl-surface-2:var(--spa-surface-2,#fafafa);--spa-rl-border:var(--spa-border,#e6e6e6);--spa-rl-muted:var(--spa-muted,#666);--spa-rl-shadow:#0000000d}:where(.wa-dark) spaday-regular-layout.spa{--spa-rl-surface:var(--spa-surface,#15191e);--spa-rl-surface-2:var(--spa-surface-2,#1d232b);--spa-rl-border:var(--spa-border,#333b45);--spa-rl-muted:var(--spa-muted,#9aa3ad);--spa-rl-shadow:#00000059}:where(.wa-light) spaday-regular-layout.spa{--spa-rl-surface:var(--spa-surface,#fff);--spa-rl-surface-2:var(--spa-surface-2,#fafafa);--spa-rl-border:var(--spa-border,#e6e6e6);--spa-rl-muted:var(--spa-muted,#666);--spa-rl-shadow:#0000000d}spaday-regular-layout.spa regular-layout-frame{--rl-tab-width:200px}spaday-regular-layout.spa regular-layout-frame::part(container){box-sizing:border-box;border:1px solid var(--spa-rl-border);background:var(--spa-rl-surface);box-shadow:0 1px 2px var(--spa-rl-shadow);border-radius:0 8px 8px;margin:0 3px 3px;padding:8px}spaday-regular-layout.spa regular-layout-frame::part(titlebar){align-items:end;margin:3px 6px 0 3px}spaday-regular-layout.spa regular-layout-frame::part(tab){box-sizing:border-box;cursor:pointer;border:1px solid var(--spa-rl-border);background:var(--spa-rl-surface-2);color:var(--spa-rl-muted);border-bottom:none;border-radius:8px 8px 0 0;justify-content:center;align-items:center;margin-right:2px;padding:0 10px;font-size:12px}spaday-regular-layout.spa regular-layout-frame::part(title){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}spaday-regular-layout.spa regular-layout-frame::part(active-tab){background:var(--spa-rl-surface);color:inherit}spaday-regular-layout.spa regular-layout-frame::part(close){color:var(--spa-rl-muted);cursor:pointer;background:0 0;border:none;border-radius:4px;align-self:center;width:16px;height:14px;padding:0;font-size:13px;line-height:13px}spaday-regular-layout.spa regular-layout-frame::part(close):before{content:"×"}spaday-regular-layout.spa regular-layout-frame::part(close):hover{background-color:var(--spa-rl-surface-2);transition:background-color .2s}spaday-regular-layout.spa:has(.overlay)>*{opacity:.6}spaday-regular-layout.spa:has(.overlay)>.overlay{opacity:1}spaday-regular-layout.spa regular-layout-frame.overlay{background:var(--spa-rl-surface-2);border:1px dashed var(--spa-rl-border);border-radius:8px;transition:top .1s ease-in-out,height .1s ease-in-out,width .1s ease-in-out,left .1s ease-in-out}