@forgeax/app-shell 0.5.0 → 0.6.1

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
@@ -57,6 +57,9 @@ export function ProductShell() {
57
57
  Generic persisted sizing and pointer-capture handles use the same public entry:
58
58
 
59
59
  ```tsx
60
+ import '@forgeax/app-shell/resize.css';
61
+ import { ResizeHandle, useLocalSize } from '@forgeax/app-shell/react';
62
+
60
63
  const [width, setWidth] = useLocalSize('product.sidebar.width', 280, 180, 640);
61
64
 
62
65
  <aside style={{ width }}>
@@ -0,0 +1,47 @@
1
+ .resize-handle {
2
+ flex-shrink: 0;
3
+ position: relative;
4
+ background: transparent;
5
+ z-index: 5;
6
+ }
7
+
8
+ .resize-handle::after {
9
+ content: "";
10
+ position: absolute;
11
+ background: var(--color-border-default);
12
+ transition: background 150ms;
13
+ pointer-events: none;
14
+ }
15
+
16
+ .resize-handle-col {
17
+ width: 4px;
18
+ cursor: col-resize;
19
+ margin: 0 -2px;
20
+ }
21
+
22
+ .resize-handle-col::after {
23
+ top: 0;
24
+ bottom: 0;
25
+ left: 50%;
26
+ width: 1px;
27
+ transform: translateX(-50%);
28
+ }
29
+
30
+ .resize-handle-row {
31
+ height: 4px;
32
+ cursor: row-resize;
33
+ margin: -2px 0;
34
+ }
35
+
36
+ .resize-handle-row::after {
37
+ left: 0;
38
+ right: 0;
39
+ top: 50%;
40
+ height: 1px;
41
+ transform: translateY(-50%);
42
+ }
43
+
44
+ .resize-handle:hover::after,
45
+ .resize-handle:active::after {
46
+ background: var(--color-border-strong);
47
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@forgeax/app-shell",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "Generic Dock, Panel, Window, and Slot composition primitives",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
- "sideEffects": false,
7
+ "sideEffects": ["./dist/resize.css"],
8
8
  "files": ["dist"],
9
9
  "main": "./dist/index.js",
10
10
  "types": "./dist/index.d.ts",
@@ -20,12 +20,13 @@
20
20
  "./react": {
21
21
  "types": "./dist/react.d.ts",
22
22
  "import": "./dist/react.js"
23
- }
23
+ },
24
+ "./resize.css": "./dist/resize.css"
24
25
  },
25
26
  "scripts": {
26
27
  "typecheck": "tsc --noEmit",
27
28
  "test": "bun test test",
28
- "build": "tsup src/index.ts src/dock.ts src/react.tsx --format esm --dts --outDir dist",
29
+ "build": "tsup src/index.ts src/dock.ts src/react.tsx --format esm --dts --outDir dist && bun run scripts/copy-resize-css.ts",
29
30
  "check": "bun run typecheck && bun run test && bun run build",
30
31
  "release:preflight": "bun run scripts/release-preflight.ts"
31
32
  },