@aiquants/resize-panels 1.8.0 → 1.9.0
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 +91 -93
- package/dist/{GlobalDebugOverlay-DYCR0FIu.js → GlobalDebugOverlay-Do70T2l6.js} +1 -1
- package/dist/{GlobalDebugOverlay-afs0vF-Q.cjs → GlobalDebugOverlay-sEQN6exo.cjs} +1 -1
- package/dist/PanelResizeHandle.d.ts +1 -1
- package/dist/PanelResizeHandle.d.ts.map +1 -1
- package/dist/index-B6YGX2DH.js +2009 -0
- package/dist/index-DssZUxGw.cjs +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/resize-panels.standalone.css +1 -1
- package/dist/types.d.ts +126 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/PanelResizeHandle.tsx +169 -90
- package/src/index.ts +25 -3
- package/src/styles/components.entry.css +3 -1
- package/src/styles/resize-panels.css +1 -3
- package/src/types.ts +133 -2
- package/dist/index-BzgId8aQ.js +0 -1972
- package/dist/index-xTV-c0PN.cjs +0 -2
package/src/types.ts
CHANGED
|
@@ -17,6 +17,42 @@ export const PANEL_SNAP_THRESHOLD = 12
|
|
|
17
17
|
*/
|
|
18
18
|
export const PANEL_HANDLE_THICKNESS = 8
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Default thickness in pixels for the visual indicator wrapper.
|
|
22
|
+
* 視覚インジケーター外枠のデフォルト厚み (px)。
|
|
23
|
+
*/
|
|
24
|
+
export const PANEL_INDICATOR_THICKNESS = 6
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Default length in pixels for the visual indicator wrapper in horizontal layout.
|
|
28
|
+
* 水平レイアウトにおける視覚インジケーター外枠のデフォルト長さ (px)。
|
|
29
|
+
*/
|
|
30
|
+
export const PANEL_INDICATOR_LENGTH_HORIZONTAL = 48
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Default length in pixels for the visual indicator wrapper in vertical layout.
|
|
34
|
+
* 垂直レイアウトにおける視覚インジケーター外枠のデフォルト長さ (px)。
|
|
35
|
+
*/
|
|
36
|
+
export const PANEL_INDICATOR_LENGTH_VERTICAL = 80
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Default thickness in pixels for the inner bar inside the visual indicator.
|
|
40
|
+
* 視覚インジケーター内部バーのデフォルト厚み (px)。
|
|
41
|
+
*/
|
|
42
|
+
export const PANEL_INDICATOR_BAR_THICKNESS = 2
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Default length in pixels for the inner bar inside the visual indicator in horizontal layout.
|
|
46
|
+
* 水平レイアウトにおける視覚インジケーター内部バーのデフォルト長さ (px)。
|
|
47
|
+
*/
|
|
48
|
+
export const PANEL_INDICATOR_BAR_LENGTH_HORIZONTAL = 32
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Default length in pixels for the inner bar inside the visual indicator in vertical layout.
|
|
52
|
+
* 垂直レイアウトにおける視覚インジケーター内部バーのデフォルト長さ (px)。
|
|
53
|
+
*/
|
|
54
|
+
export const PANEL_INDICATOR_BAR_LENGTH_VERTICAL = 64
|
|
55
|
+
|
|
20
56
|
/**
|
|
21
57
|
* Spacing in pixels between visual indicator dots in the handle.
|
|
22
58
|
* ハンドル内の視覚インジケーター点同士のピクセル間隔。
|
|
@@ -149,11 +185,15 @@ export type ContainerAxisMeasurement = {
|
|
|
149
185
|
}
|
|
150
186
|
|
|
151
187
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
188
|
+
* Reason code for layout constraint violations.
|
|
189
|
+
* レイアウト制約違反の理由コード。
|
|
154
190
|
*/
|
|
155
191
|
export type LayoutConstraintViolationReason = "minimum-exceeded" | "maximum-insufficient"
|
|
156
192
|
|
|
193
|
+
/**
|
|
194
|
+
* Snapshot describing when panel constraints conflict with the container size.
|
|
195
|
+
* パネル制約とコンテナサイズが矛盾した際のスナップショット。
|
|
196
|
+
*/
|
|
157
197
|
export type LayoutConstraintViolation = {
|
|
158
198
|
reason: LayoutConstraintViolationReason
|
|
159
199
|
totalMinimumSize: number | null
|
|
@@ -256,6 +296,55 @@ export interface PanelGroupContextValue {
|
|
|
256
296
|
layoutConstraintViolation: LayoutConstraintViolation | null
|
|
257
297
|
}
|
|
258
298
|
|
|
299
|
+
/**
|
|
300
|
+
* Visual indicator configuration options for PanelResizeHandle.
|
|
301
|
+
* PanelResizeHandle の視覚インジケーターに関する設定オプション。
|
|
302
|
+
*/
|
|
303
|
+
export interface PanelResizeHandleIndicatorConfig {
|
|
304
|
+
/**
|
|
305
|
+
* Primary axis thickness of the indicator pill in pixels.
|
|
306
|
+
* (Horizontal: width, Vertical: height)
|
|
307
|
+
* インジケーター外枠の主軸方向の厚み (px)。(水平: 幅, 垂直: 高さ)
|
|
308
|
+
* @default 6
|
|
309
|
+
*/
|
|
310
|
+
thickness?: number
|
|
311
|
+
/**
|
|
312
|
+
* Cross axis length of the indicator pill in pixels.
|
|
313
|
+
* (Horizontal: height, Vertical: width)
|
|
314
|
+
* インジケーター外枠の交差軸方向の長さ (px)。(水平: 高さ, 垂直: 幅)
|
|
315
|
+
* @default horizontal ? 48 : 80
|
|
316
|
+
*/
|
|
317
|
+
length?: number
|
|
318
|
+
/**
|
|
319
|
+
* Primary axis thickness of the inner bar in pixels.
|
|
320
|
+
* インジケーター内部バーの主軸方向の厚み (px)。
|
|
321
|
+
* @default 2
|
|
322
|
+
*/
|
|
323
|
+
barThickness?: number
|
|
324
|
+
/**
|
|
325
|
+
* Cross axis length of the inner bar in pixels.
|
|
326
|
+
* インジケーター内部バーの交差軸方向の長さ (px)。
|
|
327
|
+
* @default horizontal ? 32 : 64
|
|
328
|
+
*/
|
|
329
|
+
barLength?: number
|
|
330
|
+
/**
|
|
331
|
+
* Whether the indicator is visible.
|
|
332
|
+
* インジケーターを表示するかどうかの指定。
|
|
333
|
+
* @default true
|
|
334
|
+
*/
|
|
335
|
+
visible?: boolean
|
|
336
|
+
/**
|
|
337
|
+
* Additional CSS class name for the indicator wrapper.
|
|
338
|
+
* インジケーター外枠に付与する追加 CSS クラス名。
|
|
339
|
+
*/
|
|
340
|
+
className?: string
|
|
341
|
+
/**
|
|
342
|
+
* Additional CSS class name for the inner bar.
|
|
343
|
+
* インジケーター内部バーに付与する追加 CSS クラス名。
|
|
344
|
+
*/
|
|
345
|
+
barClassName?: string
|
|
346
|
+
}
|
|
347
|
+
|
|
259
348
|
/**
|
|
260
349
|
* Props for the PanelResizeHandle component
|
|
261
350
|
* PanelResizeHandle コンポーネントのプロパティ
|
|
@@ -267,8 +356,50 @@ export interface PanelResizeHandleProps {
|
|
|
267
356
|
className?: string
|
|
268
357
|
style?: React.CSSProperties
|
|
269
358
|
children?: ReactNode
|
|
359
|
+
/**
|
|
360
|
+
* Primary axis thickness of the handle's interactive area in pixels.
|
|
361
|
+
* (Horizontal: width, Vertical: height)
|
|
362
|
+
* リサイズハンドルの操作領域 (ヒットエリア) の厚み (px)。(水平: 幅, 垂直: 高さ)
|
|
363
|
+
* @default PANEL_HANDLE_THICKNESS (8)
|
|
364
|
+
*/
|
|
365
|
+
thickness?: number
|
|
366
|
+
/**
|
|
367
|
+
* Configuration for the visual indicator, or boolean to toggle visibility.
|
|
368
|
+
* 視覚インジケーターの設定オブジェクト、または表示/非表示の真偽値。
|
|
369
|
+
* @default true
|
|
370
|
+
*/
|
|
371
|
+
indicator?: boolean | PanelResizeHandleIndicatorConfig
|
|
372
|
+
/**
|
|
373
|
+
* Shorthand for indicator wrapper thickness in pixels.
|
|
374
|
+
* インジケーター外枠厚み (px) のショートハンド。
|
|
375
|
+
*/
|
|
376
|
+
indicatorThickness?: number
|
|
377
|
+
/**
|
|
378
|
+
* Shorthand for indicator wrapper length in pixels.
|
|
379
|
+
* インジケーター外枠長さ (px) のショートハンド。
|
|
380
|
+
*/
|
|
381
|
+
indicatorLength?: number
|
|
382
|
+
/**
|
|
383
|
+
* Shorthand for indicator inner bar thickness in pixels.
|
|
384
|
+
* インジケーター内部バー厚み (px) のショートハンド。
|
|
385
|
+
*/
|
|
386
|
+
indicatorBarThickness?: number
|
|
387
|
+
/**
|
|
388
|
+
* Shorthand for indicator inner bar length in pixels.
|
|
389
|
+
* インジケーター内部バー長さ (px) のショートハンド。
|
|
390
|
+
*/
|
|
391
|
+
indicatorBarLength?: number
|
|
392
|
+
/**
|
|
393
|
+
* Custom tooltip text for the handle element.
|
|
394
|
+
* ハンドル要素のカスタムツールチップテキスト。
|
|
395
|
+
*/
|
|
396
|
+
title?: string
|
|
270
397
|
}
|
|
271
398
|
|
|
399
|
+
/**
|
|
400
|
+
* Observed pixel and percentage measurements for a registered panel.
|
|
401
|
+
* 登録済みパネルの実測ピクセル寸法およびパーセンテージ寸法。
|
|
402
|
+
*/
|
|
272
403
|
export interface PanelMeasurement {
|
|
273
404
|
pixelSize: number
|
|
274
405
|
percentageSize: number
|