@aiquants/resize-panels 1.9.0 → 2.0.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.
Files changed (62) hide show
  1. package/README.md +129 -22
  2. package/dist/GlobalDebugOverlay-Cf3GOn2A.cjs +1 -0
  3. package/dist/{GlobalDebugOverlay-Do70T2l6.js → GlobalDebugOverlay-DQtUdNeF.js} +28 -28
  4. package/dist/GlobalDebugOverlay.d.ts +1 -18
  5. package/dist/Panel.d.ts +13 -7
  6. package/dist/PanelDebugInfo.d.ts +6 -10
  7. package/dist/PanelGroup.d.ts +1 -6
  8. package/dist/PanelResizeHandle.d.ts +2 -7
  9. package/dist/allocateLayout.d.ts +12 -0
  10. package/dist/context.d.ts +2 -11
  11. package/dist/debugOverlayStore-D7FT6zPE.js +135 -0
  12. package/dist/debugOverlayStore-DY09saU8.cjs +1 -0
  13. package/dist/debugOverlayStore.d.ts +7 -36
  14. package/dist/hooks.d.ts +12 -24
  15. package/dist/index-DZ0itiBD.js +1299 -0
  16. package/dist/index-DqATP_BA.cjs +2 -0
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.d.ts +10 -26
  19. package/dist/index.js +25 -13
  20. package/dist/reducer.d.ts +7 -38
  21. package/dist/roundHalfToEven.d.ts +0 -9
  22. package/dist/styles/resize-panels.standalone.css +1 -1
  23. package/dist/types.d.ts +67 -261
  24. package/dist/utils/simple-logger.d.ts +0 -74
  25. package/dist/utils.d.ts +10 -55
  26. package/package.json +2 -3
  27. package/dist/GlobalDebugOverlay-sEQN6exo.cjs +0 -1
  28. package/dist/GlobalDebugOverlay.d.ts.map +0 -1
  29. package/dist/Panel.d.ts.map +0 -1
  30. package/dist/PanelDebugInfo.d.ts.map +0 -1
  31. package/dist/PanelGroup.d.ts.map +0 -1
  32. package/dist/PanelResizeHandle.d.ts.map +0 -1
  33. package/dist/context.d.ts.map +0 -1
  34. package/dist/debugOverlayStore-Cntyxboe.js +0 -141
  35. package/dist/debugOverlayStore-Dkl-fHoa.cjs +0 -1
  36. package/dist/debugOverlayStore.d.ts.map +0 -1
  37. package/dist/hooks.d.ts.map +0 -1
  38. package/dist/index-B6YGX2DH.js +0 -2009
  39. package/dist/index-DssZUxGw.cjs +0 -2
  40. package/dist/index.d.ts.map +0 -1
  41. package/dist/reducer.d.ts.map +0 -1
  42. package/dist/roundHalfToEven.d.ts.map +0 -1
  43. package/dist/types.d.ts.map +0 -1
  44. package/dist/utils/simple-logger.d.ts.map +0 -1
  45. package/dist/utils.d.ts.map +0 -1
  46. package/src/GlobalDebugOverlay.tsx +0 -284
  47. package/src/Panel.tsx +0 -635
  48. package/src/PanelDebugInfo.tsx +0 -148
  49. package/src/PanelGroup.tsx +0 -260
  50. package/src/PanelResizeHandle.tsx +0 -797
  51. package/src/context.ts +0 -25
  52. package/src/debugOverlayStore.ts +0 -351
  53. package/src/hooks.ts +0 -968
  54. package/src/index.ts +0 -84
  55. package/src/reducer.ts +0 -1234
  56. package/src/roundHalfToEven.ts +0 -40
  57. package/src/styles/components.entry.css +0 -10
  58. package/src/styles/resize-panels.css +0 -1
  59. package/src/styles/standalone.entry.css +0 -12
  60. package/src/types.ts +0 -419
  61. package/src/utils/simple-logger.ts +0 -186
  62. package/src/utils.ts +0 -279
package/src/index.ts DELETED
@@ -1,84 +0,0 @@
1
- /**
2
- * @package @aiquants/resize-panels
3
- * @description Reusable resizable panel components and utilities for React
4
- *
5
- * 再利用可能なリサイズパネルコンポーネントとユーティリティ
6
- */
7
-
8
- export { PanelGroupContext, usePanelGroup } from "./context"
9
- export { usePanelControls, useResizablePanels } from "./hooks"
10
- export { Panel } from "./Panel"
11
- export { PanelGroup } from "./PanelGroup"
12
- export { PanelResizeHandle } from "./PanelResizeHandle"
13
-
14
- export type {
15
- CollapsibleConfig,
16
- CollapsibleDirection,
17
- ContainerAxisMeasurement,
18
- ContainerSize,
19
- FlexibleSize,
20
- LayoutConstraintViolation,
21
- LayoutConstraintViolationReason,
22
- PanelCollapseDirection,
23
- PanelDirection,
24
- PanelGroupContextValue,
25
- PanelGroupProps,
26
- PanelLayoutData,
27
- PanelMeasurement,
28
- PanelProps,
29
- PanelResizeHandleIndicatorConfig,
30
- PanelResizeHandleProps,
31
- ResizeHandleLayoutData,
32
- SizeConfig,
33
- SizeUnit,
34
- } from "./types"
35
-
36
- export {
37
- clamp,
38
- getConstraintInPixels,
39
- getContainerSize,
40
- loadLayout,
41
- normalizeSizeConfig,
42
- saveLayout,
43
- } from "./utils"
44
-
45
- /**
46
- * Safely escape a selector identifier for use in CSS query selectors.
47
- * セレクタ文字列を安全にエスケープする補助関数。
48
- */
49
- const escapeIdentifier = (id: string): string => {
50
- return typeof CSS !== "undefined" && typeof CSS.escape === "function" ? CSS.escape(id) : id.replace(/["\\]/g, "\\$&")
51
- }
52
-
53
- /**
54
- * Locate a panel element in the DOM by its data attribute.
55
- * data 属性を手がかりにパネル要素を DOM から取得する補助関数。
56
- */
57
- export const getPanelElement = (id: string): HTMLElement | null => {
58
- if (typeof document === "undefined") {
59
- return null
60
- }
61
- return document.querySelector(`[data-panel-id="${escapeIdentifier(id)}"]`)
62
- }
63
-
64
- /**
65
- * Locate a panel group element in the DOM by its data attribute.
66
- * data 属性を手がかりにパネルグループ要素を DOM から取得する補助関数。
67
- */
68
- export const getPanelGroupElement = (id: string): HTMLElement | null => {
69
- if (typeof document === "undefined") {
70
- return null
71
- }
72
- return document.querySelector(`[data-panel-group-id="${escapeIdentifier(id)}"]`)
73
- }
74
-
75
- /**
76
- * Locate a resize handle element in the DOM by its data attribute.
77
- * data 属性を手がかりにリサイズハンドル要素を DOM から取得する補助関数。
78
- */
79
- export const getResizeHandleElement = (id: string): HTMLElement | null => {
80
- if (typeof document === "undefined") {
81
- return null
82
- }
83
- return document.querySelector(`[data-resize-handle-id="${escapeIdentifier(id)}"]`)
84
- }