react-resizable-panels 4.12.1 → 4.12.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/README.md CHANGED
@@ -240,6 +240,12 @@ Falls back to <code>useId</code> when not provided.</p>
240
240
  <tr>
241
241
  <td>defaultSize</td>
242
242
  <td><p>Default size of Panel within its parent group; default is auto-assigned based on the total number of Panels.</p>
243
+ <p>ℹ️ Interpretation rules:</p>
244
+ <ul>
245
+ <li>Numbers are interpreted as pixels (e.g. <code>defaultSize={200}</code> is 200 pixels)</li>
246
+ <li>Strings without explicit units are interpreted as percentage (e.g. <code>defaultSize=&quot;50&quot;</code> is 50 percent)</li>
247
+ <li>Use explicit units (e.g. &quot;px&quot;, &quot;%&quot;, &quot;em&quot;, &quot;rem&quot;, &quot;vh&quot;, or &quot;vw&quot;) to change interpretation</li>
248
+ </ul>
243
249
  <p>⚠️ Percentage based sizes may cause slight layout shift when server-rendering.
244
250
  For more information see the documentation.</p>
245
251
  </td>
@@ -268,12 +274,24 @@ Defaults to <code>preserve-relative-size</code>.</p>
268
274
  </tr>
269
275
  <tr>
270
276
  <td>maxSize</td>
271
- <td><p>Maximum size of Panel within its parent group; defaults to 100%.</p>
277
+ <td><p>Maximum size of Panel within its parent group; defaults to <code>&quot;100%&quot;</code>.</p>
278
+ <p>ℹ️ Interpretation rules:</p>
279
+ <ul>
280
+ <li>Numbers are interpreted as pixels (e.g. <code>maxSize={200}</code> is 200 pixels)</li>
281
+ <li>Strings without explicit units are interpreted as percentage (e.g. <code>maxSize=&quot;50&quot;</code> is 50 percent)</li>
282
+ <li>Use explicit units (e.g. &quot;px&quot;, &quot;%&quot;, &quot;em&quot;, &quot;rem&quot;, &quot;vh&quot;, or &quot;vw&quot;) to change interpretation</li>
283
+ </ul>
272
284
  </td>
273
285
  </tr>
274
286
  <tr>
275
287
  <td>minSize</td>
276
288
  <td><p>Minimum size of Panel within its parent group; defaults to 0%.</p>
289
+ <p>ℹ️ Interpretation rules:</p>
290
+ <ul>
291
+ <li>Numbers are interpreted as pixels (e.g. <code>minSize={200}</code> is 200 pixels)</li>
292
+ <li>Strings without explicit units are interpreted as percentage (e.g. <code>minSize=&quot;50&quot;</code> is 50 percent)</li>
293
+ <li>Use explicit units (e.g. &quot;px&quot;, &quot;%&quot;, &quot;em&quot;, &quot;rem&quot;, &quot;vh&quot;, or &quot;vw&quot;) to change interpretation</li>
294
+ </ul>
277
295
  </td>
278
296
  </tr>
279
297
  <tr>
@@ -289,6 +289,11 @@ export declare type PanelProps = BasePanelAttributes & {
289
289
  /**
290
290
  * Default size of Panel within its parent group; default is auto-assigned based on the total number of Panels.
291
291
  *
292
+ * ℹ️ Interpretation rules:
293
+ * - Numbers are interpreted as pixels (e.g. `defaultSize={200}` is 200 pixels)
294
+ * - Strings without explicit units are interpreted as percentage (e.g. `defaultSize="50"` is 50 percent)
295
+ * - Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation
296
+ *
292
297
  * ⚠️ Percentage based sizes may cause slight layout shift when server-rendering.
293
298
  * For more information see the documentation.
294
299
  */
@@ -323,11 +328,21 @@ export declare type PanelProps = BasePanelAttributes & {
323
328
  */
324
329
  id?: string | number | undefined;
325
330
  /**
326
- * Maximum size of Panel within its parent group; defaults to 100%.
331
+ * Maximum size of Panel within its parent group; defaults to `"100%"`.
332
+ *
333
+ * ℹ️ Interpretation rules:
334
+ * - Numbers are interpreted as pixels (e.g. `maxSize={200}` is 200 pixels)
335
+ * - Strings without explicit units are interpreted as percentage (e.g. `maxSize="50"` is 50 percent)
336
+ * - Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation
327
337
  */
328
338
  maxSize?: number | string | undefined;
329
339
  /**
330
340
  * Minimum size of Panel within its parent group; defaults to 0%.
341
+ *
342
+ * ℹ️ Interpretation rules:
343
+ * - Numbers are interpreted as pixels (e.g. `minSize={200}` is 200 pixels)
344
+ * - Strings without explicit units are interpreted as percentage (e.g. `minSize="50"` is 50 percent)
345
+ * - Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation
331
346
  */
332
347
  minSize?: number | string | undefined;
333
348
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-resizable-panels",
3
- "version": "4.12.1",
3
+ "version": "4.12.2",
4
4
  "type": "module",
5
5
  "author": "Brian Vaughn <brian.david.vaughn@gmail.com> (https://github.com/bvaughn/)",
6
6
  "contributors": [
@@ -18,34 +18,6 @@
18
18
  "files": [
19
19
  "dist"
20
20
  ],
21
- "scripts": {
22
- "dev": "vite",
23
- "dev:integrations": "pnpm run /^dev:integrations:.*/",
24
- "dev:integrations:next": "pnpm -C integrations/next/ run dev",
25
- "dev:integrations:vike": "pnpm -C integrations/vike/ run dev",
26
- "dev:integrations:vite": "pnpm -C integrations/vite/ run dev",
27
- "build": "pnpm run /^build:.*/",
28
- "build:docs": "cross-env TARGET=docs vite build",
29
- "build:lib": "cross-env TARGET=lib vite build",
30
- "compile": "pnpm run --sequential /^compile:.*/",
31
- "compile:docs": "tsx ./scripts/compile-docs",
32
- "compile:examples": "tsx ./scripts/compile-examples",
33
- "compile:search-index": "tsx ./scripts/compile-search-index",
34
- "compress:og-image": "tsx ./scripts/compress-og-image",
35
- "e2e:install": "pnpm -C integrations/tests exec playwright install --with-deps",
36
- "e2e:test": "pnpm -C integrations/tests run test",
37
- "e2e:test:main": "pnpm -C integrations/tests run test --project=chromium",
38
- "e2e:test:popup": "pnpm -C integrations/tests run test --project=chromium:popup",
39
- "lint": "eslint .",
40
- "prerelease": "rimraf dist && pnpm run build:lib",
41
- "prettier": "prettier --write \"**/*.{css,html,js,json,jsx,ts,tsx}\"",
42
- "prettier:ci": "prettier --check \"**/*.{css,html,js,json,jsx,ts,tsx}\"",
43
- "preview": "vite preview",
44
- "test": "vitest",
45
- "test:ci": "vitest run",
46
- "test:debug": "vitest --inspect-brk=127.0.0.1:3000 --no-file-parallelism",
47
- "tsc": "tsc -b"
48
- },
49
21
  "lint-staged": {
50
22
  "**/*": "prettier --write --ignore-unknown"
51
23
  },
@@ -120,5 +92,33 @@
120
92
  "vitest": "^3.2.4",
121
93
  "vitest-fail-on-console": "^0.10.1",
122
94
  "zustand": "^5.0.7"
95
+ },
96
+ "scripts": {
97
+ "dev": "vite",
98
+ "dev:integrations": "pnpm run /^dev:integrations:.*/",
99
+ "dev:integrations:next": "pnpm -C integrations/next/ run dev",
100
+ "dev:integrations:vike": "pnpm -C integrations/vike/ run dev",
101
+ "dev:integrations:vite": "pnpm -C integrations/vite/ run dev",
102
+ "build": "pnpm run /^build:.*/",
103
+ "build:docs": "cross-env TARGET=docs vite build",
104
+ "build:lib": "cross-env TARGET=lib vite build",
105
+ "compile": "pnpm run --sequential /^compile:.*/",
106
+ "compile:docs": "tsx ./scripts/compile-docs",
107
+ "compile:examples": "tsx ./scripts/compile-examples",
108
+ "compile:search-index": "tsx ./scripts/compile-search-index",
109
+ "compress:og-image": "tsx ./scripts/compress-og-image",
110
+ "e2e:install": "pnpm -C integrations/tests exec playwright install --with-deps",
111
+ "e2e:test": "pnpm -C integrations/tests run test",
112
+ "e2e:test:main": "pnpm -C integrations/tests run test --project=chromium",
113
+ "e2e:test:popup": "pnpm -C integrations/tests run test --project=chromium:popup",
114
+ "lint": "eslint .",
115
+ "prerelease": "rimraf dist && pnpm run build:lib",
116
+ "prettier": "prettier --write \"**/*.{css,html,js,json,jsx,ts,tsx}\"",
117
+ "prettier:ci": "prettier --check \"**/*.{css,html,js,json,jsx,ts,tsx}\"",
118
+ "preview": "vite preview",
119
+ "test": "vitest",
120
+ "test:ci": "vitest run",
121
+ "test:debug": "vitest --inspect-brk=127.0.0.1:3000 --no-file-parallelism",
122
+ "tsc": "tsc -b"
123
123
  }
124
- }
124
+ }