@aiquants/resize-panels 2.0.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.
- package/dist/GlobalDebugOverlay.d.ts +4 -0
- package/dist/Panel.d.ts +13 -0
- package/dist/{src/PanelDebugInfo.d.ts → PanelDebugInfo.d.ts} +2 -14
- package/dist/PanelGroup.d.ts +2 -0
- package/dist/PanelResizeHandle.d.ts +2 -0
- package/dist/allocateLayout.d.ts +12 -0
- package/dist/context.d.ts +3 -0
- package/dist/debugOverlayStore.d.ts +32 -0
- package/dist/{src/hooks.d.ts → hooks.d.ts} +8 -23
- package/dist/index.d.ts +13 -2
- package/dist/reducer.d.ts +8 -0
- package/dist/roundHalfToEven.d.ts +1 -0
- package/dist/types.d.ts +183 -0
- package/dist/utils/simple-logger.d.ts +37 -0
- package/dist/utils.d.ts +16 -0
- package/package.json +2 -3
- package/dist/src/GlobalDebugOverlay.d.ts +0 -21
- package/dist/src/GlobalDebugOverlay.d.ts.map +0 -1
- package/dist/src/Panel.d.ts +0 -46
- package/dist/src/Panel.d.ts.map +0 -1
- package/dist/src/PanelDebugInfo.d.ts.map +0 -1
- package/dist/src/PanelGroup.d.ts +0 -7
- package/dist/src/PanelGroup.d.ts.map +0 -1
- package/dist/src/PanelResizeHandle.d.ts +0 -7
- package/dist/src/PanelResizeHandle.d.ts.map +0 -1
- package/dist/src/allocateLayout.d.ts +0 -60
- package/dist/src/allocateLayout.d.ts.map +0 -1
- package/dist/src/context.d.ts +0 -12
- package/dist/src/context.d.ts.map +0 -1
- package/dist/src/debugOverlayStore.d.ts +0 -69
- package/dist/src/debugOverlayStore.d.ts.map +0 -1
- package/dist/src/hooks.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -32
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/reducer.d.ts +0 -49
- package/dist/src/reducer.d.ts.map +0 -1
- package/dist/src/roundHalfToEven.d.ts +0 -10
- package/dist/src/roundHalfToEven.d.ts.map +0 -1
- package/dist/src/types.d.ts +0 -481
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/utils/simple-logger.d.ts +0 -111
- package/dist/src/utils/simple-logger.d.ts.map +0 -1
- package/dist/src/utils.d.ts +0 -164
- package/dist/src/utils.d.ts.map +0 -1
- package/dist/tests/support/dom-harness.d.ts +0 -89
- package/dist/tests/support/dom-harness.d.ts.map +0 -1
- package/src/GlobalDebugOverlay.tsx +0 -284
- package/src/Panel.tsx +0 -297
- package/src/PanelDebugInfo.tsx +0 -94
- package/src/PanelGroup.tsx +0 -245
- package/src/PanelResizeHandle.tsx +0 -758
- package/src/allocateLayout.ts +0 -412
- package/src/context.ts +0 -25
- package/src/debugOverlayStore.ts +0 -355
- package/src/hooks.ts +0 -376
- package/src/index.ts +0 -93
- package/src/reducer.ts +0 -472
- package/src/roundHalfToEven.ts +0 -40
- package/src/styles/components.entry.css +0 -10
- package/src/styles/resize-panels.css +0 -1
- package/src/styles/standalone.entry.css +0 -12
- package/src/types.ts +0 -505
- package/src/utils/simple-logger.ts +0 -186
- package/src/utils.ts +0 -320
package/dist/src/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAErE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAA;AAEtC;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,WAAO,CAAA;AAE5C;;;GAGG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAA;AAEvC;;;GAGG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAA;AAE1C;;;GAGG;AACH,eAAO,MAAM,iCAAiC,KAAK,CAAA;AAEnD;;;GAGG;AACH,eAAO,MAAM,+BAA+B,KAAK,CAAA;AAEjD;;;GA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,OAAO,CAAA;IAChB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B"}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module utils/logger
|
|
3
|
-
* @description Logger utility for consistent log management across the application.
|
|
4
|
-
* @description アプリケーション全体で一貫したログ管理を行うためのロガーユーティリティ。
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* @enum LogLevel
|
|
8
|
-
* @description Log levels for filtering output.
|
|
9
|
-
* @description 出力をフィルタリングするためのログレベル。
|
|
10
|
-
*/
|
|
11
|
-
export declare enum LogLevel {
|
|
12
|
-
DEBUG = 0,
|
|
13
|
-
INFO = 1,
|
|
14
|
-
WARN = 2,
|
|
15
|
-
ERROR = 3,
|
|
16
|
-
NONE = 4
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @interface ILogger
|
|
20
|
-
* @description Interface for a logger object compatible with Console.
|
|
21
|
-
* @description Console と互換性のあるロガーオブジェクトのインターフェース。
|
|
22
|
-
*/
|
|
23
|
-
export interface ILogger {
|
|
24
|
-
debug(message?: unknown, ...optionalParams: unknown[]): void;
|
|
25
|
-
info(message?: unknown, ...optionalParams: unknown[]): void;
|
|
26
|
-
warn(message?: unknown, ...optionalParams: unknown[]): void;
|
|
27
|
-
error(message?: unknown, ...optionalParams: unknown[]): void;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @class Logger
|
|
31
|
-
* @description A wrapper class for handling logging with levels and prefixes.
|
|
32
|
-
* @description レベルとプレフィックスを使用したログ記録を処理するためのラッパークラス。
|
|
33
|
-
*/
|
|
34
|
-
export declare class Logger implements ILogger {
|
|
35
|
-
private level;
|
|
36
|
-
private prefix;
|
|
37
|
-
private impl;
|
|
38
|
-
/**
|
|
39
|
-
* Registry of all constructed loggers so the static configuration API can reach them.
|
|
40
|
-
* static 設定 API が全ロガーへ到達できるようにするための生成済みインスタンスの登録簿。
|
|
41
|
-
*/
|
|
42
|
-
private static readonly instances;
|
|
43
|
-
/**
|
|
44
|
-
* @constructor
|
|
45
|
-
* @param {LogLevel} [level=LogLevel.WARN] - The minimum log level to output.
|
|
46
|
-
* @param {string} [prefix="[resize-panels]"] - The prefix to add to all log messages.
|
|
47
|
-
* @param {ILogger} [impl=console] - The implementation to use for logging.
|
|
48
|
-
*/
|
|
49
|
-
constructor(level?: LogLevel, prefix?: string, impl?: ILogger);
|
|
50
|
-
private static instance;
|
|
51
|
-
/**
|
|
52
|
-
* @method setLevel
|
|
53
|
-
* @description Updates the log level for every constructed logger (module-level loggers included).
|
|
54
|
-
* @description 生成済みのすべてのロガー (モジュールレベルのロガーを含む) のログレベルを更新します。
|
|
55
|
-
* @param {LogLevel} level - The new log level.
|
|
56
|
-
*/
|
|
57
|
-
static setLevel(level: LogLevel): void;
|
|
58
|
-
/**
|
|
59
|
-
* @method setLevel
|
|
60
|
-
* @description Updates the current log level.
|
|
61
|
-
* @description 現在のログレベルを更新します。
|
|
62
|
-
* @param {LogLevel} level - The new log level.
|
|
63
|
-
*/
|
|
64
|
-
setLevel(level: LogLevel): void;
|
|
65
|
-
/**
|
|
66
|
-
* @method setImplementation
|
|
67
|
-
* @description Updates the logger implementation for every constructed logger.
|
|
68
|
-
* @description 生成済みのすべてのロガーの実装を更新します。
|
|
69
|
-
* @param {ILogger} impl - The new logger implementation.
|
|
70
|
-
*/
|
|
71
|
-
static setImplementation(impl: ILogger): void;
|
|
72
|
-
/**
|
|
73
|
-
* @method setImplementation
|
|
74
|
-
* @description Updates the logger implementation.
|
|
75
|
-
* @description ロガーの実装を更新します。
|
|
76
|
-
* @param {ILogger} impl - The new logger implementation.
|
|
77
|
-
*/
|
|
78
|
-
setImplementation(impl: ILogger): void;
|
|
79
|
-
/**
|
|
80
|
-
* @method setPrefix
|
|
81
|
-
* @description Updates the log prefix for every constructed logger.
|
|
82
|
-
* @description 生成済みのすべてのロガーのログのプレフィックスを更新します。
|
|
83
|
-
* @param {string} prefix - The new prefix.
|
|
84
|
-
*/
|
|
85
|
-
static setPrefix(prefix: string): void;
|
|
86
|
-
/**
|
|
87
|
-
* @method setPrefix
|
|
88
|
-
* @description Updates the log prefix.
|
|
89
|
-
* @description ログのプレフィックスを更新します。
|
|
90
|
-
* @param {string} prefix - The new prefix.
|
|
91
|
-
*/
|
|
92
|
-
setPrefix(prefix: string): void;
|
|
93
|
-
/**
|
|
94
|
-
* @method enabledFor
|
|
95
|
-
* @description Returns whether messages at the given level would be emitted.
|
|
96
|
-
* @description 指定レベルのメッセージが出力対象かどうかを返します。
|
|
97
|
-
* 高コストなログ引数 (スナップショット等) の組み立てを抑制中に省略するために使用します。
|
|
98
|
-
* @param {LogLevel} level - The message level to test.
|
|
99
|
-
*/
|
|
100
|
-
enabledFor(level: LogLevel): boolean;
|
|
101
|
-
private formatMessage;
|
|
102
|
-
static debug(message?: unknown, ...optionalParams: unknown[]): void;
|
|
103
|
-
debug(message?: unknown, ...optionalParams: unknown[]): void;
|
|
104
|
-
static info(message?: unknown, ...optionalParams: unknown[]): void;
|
|
105
|
-
info(message?: unknown, ...optionalParams: unknown[]): void;
|
|
106
|
-
static warn(message?: unknown, ...optionalParams: unknown[]): void;
|
|
107
|
-
warn(message?: unknown, ...optionalParams: unknown[]): void;
|
|
108
|
-
static error(message?: unknown, ...optionalParams: unknown[]): void;
|
|
109
|
-
error(message?: unknown, ...optionalParams: unknown[]): void;
|
|
110
|
-
}
|
|
111
|
-
//# sourceMappingURL=simple-logger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"simple-logger.d.ts","sourceRoot":"","sources":["../../../src/utils/simple-logger.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,oBAAY,QAAQ;IAChB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,IAAI,IAAI;CACX;AAED;;;;GAIG;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,KAAK,EAAE,QAAQ,GAAG,OAAO;IAIpC,OAAO,CAAC,aAAa;IAOrB,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,OAAO,EAAE,GAAG,IAAI;IAInE,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,OAAO,EAAE,GAAG,IAAI;IAM5D,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,OAAO,EAAE,GAAG,IAAI;IAIlE,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,OAAO,EAAE,GAAG,IAAI;IAM3D,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,OAAO,EAAE,GAAG,IAAI;IAIlE,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,OAAO,EAAE,GAAG,IAAI;IAM3D,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,OAAO,EAAE,GAAG,IAAI;IAInE,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,OAAO,EAAE,GAAG,IAAI;CAK/D"}
|
package/dist/src/utils.d.ts
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { ContainerAxisMeasurement, FlexibleSize, PanelDirection, PersistedPanelSize, SizeConfig, SizeUnit } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Number of significant fractional digits to preserve when rounding percentage-based sizes.
|
|
4
|
-
* パーセンテージサイズの丸めで保持する有効小数桁数。
|
|
5
|
-
*/
|
|
6
|
-
export declare const PERCENTAGE_DIGITS = 6;
|
|
7
|
-
/**
|
|
8
|
-
* Convert a pixel measurement to a percentage of the container using banker's rounding.
|
|
9
|
-
* ピクセル寸法をバンカーズラウンディングでコンテナ比率のパーセンテージへ変換する。
|
|
10
|
-
*
|
|
11
|
-
* @param size - Length in pixels / 長さ (px)
|
|
12
|
-
* @param base - Container length the percentage is relative to / 基準となるコンテナ長
|
|
13
|
-
* @returns Percentage of the container, 0 when the base is not positive / コンテナ比 (%)、基準が非正なら 0
|
|
14
|
-
*/
|
|
15
|
-
export declare const toRoundedPercentage: (size: number, base: number) => number;
|
|
16
|
-
/**
|
|
17
|
-
* Translate a percentage-based size back into pixels relative to the container.
|
|
18
|
-
* パーセンテージ指定のサイズをコンテナ基準のピクセル値へ変換する。
|
|
19
|
-
*
|
|
20
|
-
* @param percentage - Share of the container in percent / コンテナ比 (%)
|
|
21
|
-
* @param base - Container length the percentage is relative to / 基準となるコンテナ長
|
|
22
|
-
* @returns Length in pixels / 長さ (px)
|
|
23
|
-
*/
|
|
24
|
-
export declare const percentageToPixels: (percentage: number, base: number) => number;
|
|
25
|
-
/**
|
|
26
|
-
* Normalize a flexible size into a size configuration object.
|
|
27
|
-
* 柔軟なサイズ指定をサイズ設定オブジェクトへ正規化する。
|
|
28
|
-
*
|
|
29
|
-
* @param size - Author-provided size / 利用者が指定したサイズ
|
|
30
|
-
* @param defaultUnit - Unit applied to bare numbers / 数値のみの指定に適用する単位
|
|
31
|
-
* @returns Normalized configuration, or undefined when nothing was provided / 正規化後の設定、未指定なら undefined
|
|
32
|
-
*/
|
|
33
|
-
export declare const normalizeSizeConfig: (size: FlexibleSize | undefined, defaultUnit?: SizeUnit) => SizeConfig | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* Convert flexible size constraints into pixel values based on container size.
|
|
36
|
-
* 柔軟サイズ制約をコンテナサイズ基準のピクセル値へ変換する。
|
|
37
|
-
*
|
|
38
|
-
* @param size - Constraint to resolve; bare numbers are percentages / 解決する制約 (数値のみの指定はパーセンテージ)
|
|
39
|
-
* @param defaultValue - Value used when the constraint is absent / 制約が無い場合の値
|
|
40
|
-
* @param containerSize - Container content-box length / コンテナ内容領域長
|
|
41
|
-
* @returns Constraint in pixels / ピクセル換算した制約
|
|
42
|
-
*/
|
|
43
|
-
export declare const getConstraintInPixels: (size: FlexibleSize | undefined, defaultValue: number, containerSize: number) => number;
|
|
44
|
-
/**
|
|
45
|
-
* Clamp a numeric value between the provided bounds.
|
|
46
|
-
* 数値を指定した範囲に収めるためのクリッピング処理。
|
|
47
|
-
*
|
|
48
|
-
* @param value - Value to clamp / 収める値
|
|
49
|
-
* @param min - Lower bound / 下限
|
|
50
|
-
* @param max - Upper bound / 上限
|
|
51
|
-
* @returns Clamped value / 範囲内へ収めた値
|
|
52
|
-
*/
|
|
53
|
-
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
54
|
-
/**
|
|
55
|
-
* Derive a snap-to-zero threshold from the container axis length using shared heuristics.
|
|
56
|
-
* 共通ヒューリスティクスに基づきコンテナ軸長からゼロスナップ閾値を算出する。
|
|
57
|
-
*
|
|
58
|
-
* @param axisSize - Container content-box length along the axis / 軸方向のコンテナ内容領域長
|
|
59
|
-
* @returns Threshold in pixels below which a panel snaps closed / 閉じたとみなすピクセル閾値
|
|
60
|
-
*/
|
|
61
|
-
export declare const calculateSnapThreshold: (axisSize: number) => number;
|
|
62
|
-
/**
|
|
63
|
-
* Measure a container along one axis, returning its content-box and border-box lengths.
|
|
64
|
-
* 指定軸でコンテナを計測し、内容領域長と境界領域長を返す処理。
|
|
65
|
-
*
|
|
66
|
-
* The content box is the authority for every layout number in this package: a panel's `flex-basis` resolves
|
|
67
|
-
* against it, so the allocator must fill exactly this length for the rendered geometry and the reducer state
|
|
68
|
-
* to agree. The measurement is therefore taken in LAYOUT pixels — `getBoundingClientRect` reports the visual
|
|
69
|
-
* rect, so a scaled ancestor would otherwise make the group allocate a container it does not have.
|
|
70
|
-
* このパッケージのレイアウト数値の基準は内容領域である。パネルの `flex-basis` はこの領域に解決されるため、
|
|
71
|
-
* 描画結果とリデューサー状態を一致させるには配分器がこの長さを満たす必要がある。計測は**レイアウトピクセル**で
|
|
72
|
-
* 行う: `getBoundingClientRect` は視覚上の矩形を返すため、拡大縮小された祖先の下では存在しない長さを配ってしまう。
|
|
73
|
-
*
|
|
74
|
-
* @param element - Element to measure / 計測対象の要素
|
|
75
|
-
* @param direction - Axis to measure along / 計測する軸
|
|
76
|
-
* @param entry - Observation that triggered the measurement, when it came from a ResizeObserver / 計測契機となった観測結果
|
|
77
|
-
* @returns Content-box and border-box lengths in pixels / 内容領域長と境界領域長 (px)
|
|
78
|
-
*/
|
|
79
|
-
export declare const getContainerSize: (element: HTMLElement, direction: PanelDirection, entry?: ResizeObserverEntry) => ContainerAxisMeasurement;
|
|
80
|
-
/**
|
|
81
|
-
* Selector that matches the elements a group lays out: its panels and its handle anchors.
|
|
82
|
-
* グループが配置する要素 (パネルとハンドルのアンカー) に一致するセレクタ。
|
|
83
|
-
*/
|
|
84
|
-
export declare const LAYOUT_ELEMENT_SELECTOR = "[data-panel-id], [data-resize-handle-anchor]";
|
|
85
|
-
/**
|
|
86
|
-
* Resolve the innermost panel group that owns an element.
|
|
87
|
-
* ある要素を所有する最も内側のパネルグループを解決する処理。
|
|
88
|
-
*
|
|
89
|
-
* The owner is never simply the parent: a wrapper element (including `display: contents`, which flex layout
|
|
90
|
-
* flattens away) sits between the group and its panels without changing the geometry, and nested groups make
|
|
91
|
-
* "the closest group" the only answer that is right in both directions.
|
|
92
|
-
* 所有者は単なる親要素ではない。中間要素 (フレックスレイアウトが畳む `display: contents` を含む) は幾何を
|
|
93
|
-
* 変えずにグループとパネルの間へ入り込み、入れ子グループもあるため「最も近いグループ」だけが正解となる。
|
|
94
|
-
*
|
|
95
|
-
* @param element - Element to resolve the owner for / 所有者を解決する対象の要素
|
|
96
|
-
* @returns Owning group element, or null when the element is outside every group / 所有するグループ要素、どのグループにも属さないなら null
|
|
97
|
-
*/
|
|
98
|
-
export declare const findOwningGroup: (element: HTMLElement | null | undefined) => HTMLElement | null;
|
|
99
|
-
/**
|
|
100
|
-
* Collect the panels and handle anchors a group owns, in document order.
|
|
101
|
-
* グループが所有するパネルとハンドルのアンカーを、文書順で収集する処理。
|
|
102
|
-
*
|
|
103
|
-
* Direct children are not enough: a wrapper (including `display: contents`, which flex layout flattens away)
|
|
104
|
-
* leaves the geometry intact while hiding the panels from a sibling scan, and the handle would silently lose
|
|
105
|
-
* its neighbours.
|
|
106
|
-
* 直下の子だけでは足りない。中間要素 (フレックスレイアウトが畳む `display: contents` を含む) があると幾何は
|
|
107
|
-
* 保たれたままパネルが兄弟走査から消え、ハンドルが隣接パネルを見失う。
|
|
108
|
-
*
|
|
109
|
-
* @param group - Group element / グループ要素
|
|
110
|
-
* @returns Owned panel and anchor elements in document order / 所有するパネル・アンカー要素 (文書順)
|
|
111
|
-
*/
|
|
112
|
-
export declare const getGroupLayoutElements: (group: HTMLElement) => HTMLElement[];
|
|
113
|
-
/**
|
|
114
|
-
* Report whether a DOM mutation touched an element the group lays out.
|
|
115
|
-
* DOM の変更がグループの配置要素に触れたかどうかを判定する処理。
|
|
116
|
-
*
|
|
117
|
-
* Content inside a panel changes constantly (a virtualised list recycles rows every frame), so a group-wide
|
|
118
|
-
* rescan on every mutation costs time proportional to the whole subtree for changes that can never move a
|
|
119
|
-
* panel. Only additions and removals that carry a layout element can.
|
|
120
|
-
* パネルの内容は絶え間なく変わる (仮想化リストは毎フレーム行を入れ替える) ため、変更のたびにグループ全体を
|
|
121
|
-
* 走査すると、パネルを動かしようのない変更に対して部分木全体に比例した時間を払う。配置要素を含む
|
|
122
|
-
* 追加・削除だけがパネルを動かしうる。
|
|
123
|
-
*
|
|
124
|
-
* @param records - Mutation records delivered by the observer / オブザーバーが届けた変更記録
|
|
125
|
-
* @returns True when at least one record added or removed a layout element / 配置要素の追加・削除が 1 件でもあれば true
|
|
126
|
-
*/
|
|
127
|
-
export declare const touchesLayoutElements: (records: ReadonlyArray<MutationRecord>) => boolean;
|
|
128
|
-
/**
|
|
129
|
-
* Ratio between visual pixels (pointer coordinates) and layout pixels (the lengths the allocator hands out).
|
|
130
|
-
* 視覚ピクセル (ポインタ座標) とレイアウトピクセル (配分器が配る長さ) の比。
|
|
131
|
-
*
|
|
132
|
-
* A transformed ancestor scales pointer coordinates but not the lengths the layout is computed in, so a drag
|
|
133
|
-
* delta read straight from the pointer moves the boundary by `travel × scale` instead of `travel` — the grab
|
|
134
|
-
* point slides out from under the cursor, and the error grows without bound as the gesture continues.
|
|
135
|
-
* 変形された祖先の下ではポインタ座標だけが拡大縮小され、レイアウトが計算される長さは変わらない。
|
|
136
|
-
* ポインタの変位をそのまま使うと境界は `移動量 × 倍率` しか動かず、掴んだ点がカーソルから滑り出し、
|
|
137
|
-
* その誤差はジェスチャーが続く限り増え続ける。
|
|
138
|
-
*
|
|
139
|
-
* @param element - Element whose box is compared in both spaces / 双方の空間で矩形を比べる要素
|
|
140
|
-
* @param direction - Axis to measure along / 計測する軸
|
|
141
|
-
* @returns Visual length divided by layout length, 1 when either is unavailable / 視覚長 ÷ レイアウト長 (いずれか不明なら 1)
|
|
142
|
-
*/
|
|
143
|
-
export declare const getVisualScale: (element: HTMLElement, direction: PanelDirection) => number;
|
|
144
|
-
/**
|
|
145
|
-
* Persist a panel layout to local storage.
|
|
146
|
-
* パネルレイアウトをローカルストレージへ保存する。
|
|
147
|
-
*
|
|
148
|
-
* @param id - Auto-save identifier / 自動保存の識別子
|
|
149
|
-
* @param entries - Panel lengths with their identifiers, in DOM order / DOM 順の識別子つきパネル長
|
|
150
|
-
*/
|
|
151
|
-
export declare const saveLayout: (id: string, entries: PersistedPanelSize[]) => void;
|
|
152
|
-
/**
|
|
153
|
-
* Restore a panel layout from local storage.
|
|
154
|
-
* パネルレイアウトをローカルストレージから復元する。
|
|
155
|
-
*
|
|
156
|
-
* A stored layout is only usable when every entry names the panel it belongs to, so a payload written by a
|
|
157
|
-
* different panel set is rejected instead of being applied by position.
|
|
158
|
-
* 保存レイアウトは各項目が所属パネルを名指ししている場合にだけ利用できる。別構成が書いた内容は位置で当てはめず拒否する。
|
|
159
|
-
*
|
|
160
|
-
* @param id - Auto-save identifier / 自動保存の識別子
|
|
161
|
-
* @returns Stored layout, or null when nothing usable is stored / 保存済みレイアウト、利用できなければ null
|
|
162
|
-
*/
|
|
163
|
-
export declare const loadLayout: (id: string) => PersistedPanelSize[] | null;
|
|
164
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/dist/src/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,YAAY,EAAsF,KAAK,cAAc,EAAE,KAAK,kBAAkB,EAAE,KAAK,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAE5O;;;GAGG;AACH,eAAO,MAAM,iBAAiB,IAAI,CAAA;AAElC;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,KAAG,MAKhE,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,YAAY,MAAM,EAAE,MAAM,MAAM,KAAG,MAKrE,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,YAAY,GAAG,SAAS,EAAE,cAAa,QAAuB,KAAG,UAAU,GAAG,SAQvH,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,YAAY,GAAG,SAAS,EAAE,cAAc,MAAM,EAAE,eAAe,MAAM,KAAG,MAWnH,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,MAE/D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,KAAG,MAKzD,CAAA;AAcD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,WAAW,EAAE,WAAW,cAAc,EAAE,QAAQ,mBAAmB,KAAG,wBAgB/G,CAAA;AAQD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,iDAAiD,CAAA;AAQrF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,WAAW,GAAG,IAAI,GAAG,SAAS,KAAG,WAAW,GAAG,IAA6D,CAAA;AAErJ;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,WAAW,KAAG,WAAW,EASjE,CAAA;AAEN;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,aAAa,CAAC,cAAc,CAAC,KAAG,OAa9E,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,GAAI,SAAS,WAAW,EAAE,WAAW,cAAc,KAAG,MAgBhF,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,IAAI,MAAM,EAAE,SAAS,kBAAkB,EAAE,KAAG,IAMtE,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GAAI,IAAI,MAAM,KAAG,kBAAkB,EAAE,GAAG,IAgB9D,CAAA"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Shared jsdom harness for panel group component tests.
|
|
3
|
-
* パネルグループのコンポーネントテスト用 jsdom 共通ハーネス。
|
|
4
|
-
*
|
|
5
|
-
* jsdom does not lay out flex containers, so the harness supplies the one measurement the package reads
|
|
6
|
-
* from the DOM — the group's box — and lets the assertions work on the allocator's state and on the inline
|
|
7
|
-
* styles the components render from it.
|
|
8
|
-
* jsdom はフレックスレイアウトを行わないため、パッケージが DOM から読む唯一の計測値 (グループの矩形) を
|
|
9
|
-
* ハーネスが与え、検証は配分器の状態とそこから描画されるインラインスタイルに対して行う。
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Observer stub that re-invokes its callback on demand.
|
|
13
|
-
* 任意のタイミングでコールバックを再実行できる ResizeObserver スタブ。
|
|
14
|
-
*/
|
|
15
|
-
declare class ManualResizeObserver implements ResizeObserver {
|
|
16
|
-
static instances: ManualResizeObserver[];
|
|
17
|
-
readonly callback: ResizeObserverCallback;
|
|
18
|
-
readonly targets: Element[];
|
|
19
|
-
disconnected: boolean;
|
|
20
|
-
constructor(callback: ResizeObserverCallback);
|
|
21
|
-
/**
|
|
22
|
-
* Build the observation a browser would deliver for one target.
|
|
23
|
-
* ブラウザが 1 つの対象について届ける観測結果を組み立てる処理。
|
|
24
|
-
*/
|
|
25
|
-
entriesFor: (target: Element) => ResizeObserverEntry[];
|
|
26
|
-
observe: (target: Element) => void;
|
|
27
|
-
unobserve: () => void;
|
|
28
|
-
disconnect: () => void;
|
|
29
|
-
takeRecords: () => ResizeObserverEntry[];
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Give an element a fixed box so `getContainerSize` can measure it.
|
|
33
|
-
* `getContainerSize` が計測できるよう、要素へ固定の矩形を与える処理。
|
|
34
|
-
*
|
|
35
|
-
* @param element - Element to measure / 計測対象の要素
|
|
36
|
-
* @param width - Border-box width in pixels / 境界領域の幅 (px)
|
|
37
|
-
* @param height - Border-box height in pixels / 境界領域の高さ (px)
|
|
38
|
-
*/
|
|
39
|
-
export declare const setElementBox: (element: HTMLElement, width: number, height: number) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Install the observer stub and clear the instances collected by a previous test.
|
|
42
|
-
* オブザーバースタブを導入し、直前のテストで収集したインスタンスを破棄する処理。
|
|
43
|
-
*
|
|
44
|
-
* @returns Accessor for the observers created during the test / テスト中に生成されたオブザーバーへのアクセサ
|
|
45
|
-
*/
|
|
46
|
-
export declare const installResizeObserver: () => {
|
|
47
|
-
readonly instances: ManualResizeObserver[];
|
|
48
|
-
/**
|
|
49
|
-
* Re-run every live observer callback, as the browser would after a layout change.
|
|
50
|
-
* レイアウト変化後にブラウザが行うのと同様、生存中の全オブザーバーのコールバックを再実行する処理。
|
|
51
|
-
*/
|
|
52
|
-
flush: () => void;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Resize the group element and notify the observers, as a real container resize would.
|
|
56
|
-
* グループ要素をリサイズしてオブザーバーへ通知する (実際のコンテナリサイズ相当) 処理。
|
|
57
|
-
*
|
|
58
|
-
* @param group - Group element to resize / リサイズするグループ要素
|
|
59
|
-
* @param observers - Observer accessor returned by `installResizeObserver` / オブザーバーアクセサ
|
|
60
|
-
* @param width - New border-box width in pixels / 新しい境界領域の幅 (px)
|
|
61
|
-
* @param height - New border-box height in pixels / 新しい境界領域の高さ (px)
|
|
62
|
-
*/
|
|
63
|
-
export declare const resizeGroup: (group: HTMLElement, observers: ReturnType<typeof installResizeObserver>, width: number, height: number) => void;
|
|
64
|
-
/**
|
|
65
|
-
* Read the panel elements of one group in DOM order.
|
|
66
|
-
* 1 つのグループに属するパネル要素を DOM 順で取得する処理。
|
|
67
|
-
*
|
|
68
|
-
* @param group - Group element / グループ要素
|
|
69
|
-
* @returns Panel elements that are direct children of the group / グループ直下のパネル要素
|
|
70
|
-
*/
|
|
71
|
-
export declare const getPanelElements: (group: HTMLElement) => HTMLElement[];
|
|
72
|
-
/**
|
|
73
|
-
* Read the allocated sizes the panels published through their data attributes.
|
|
74
|
-
* パネルが data 属性で公開している配分済みサイズを読み取る処理。
|
|
75
|
-
*
|
|
76
|
-
* @param group - Group element / グループ要素
|
|
77
|
-
* @returns Allocated sizes in DOM order / DOM 順の配分済みサイズ
|
|
78
|
-
*/
|
|
79
|
-
export declare const getPanelSizes: (group: HTMLElement) => number[];
|
|
80
|
-
/**
|
|
81
|
-
* Read the flex basis each panel rendered, in pixels.
|
|
82
|
-
* 各パネルが描画した flex basis をピクセルで読み取る処理。
|
|
83
|
-
*
|
|
84
|
-
* @param group - Group element / グループ要素
|
|
85
|
-
* @returns Rendered flex basis values in DOM order / DOM 順の flex basis 値 (px)
|
|
86
|
-
*/
|
|
87
|
-
export declare const getRenderedBases: (group: HTMLElement) => number[];
|
|
88
|
-
export {};
|
|
89
|
-
//# sourceMappingURL=dom-harness.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dom-harness.d.ts","sourceRoot":"","sources":["../../../tests/support/dom-harness.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH;;;GAGG;AACH,cAAM,oBAAqB,YAAW,cAAc;IAChD,MAAM,CAAC,SAAS,EAAE,oBAAoB,EAAE,CAAK;IAE7C,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAA;IACzC,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,CAAK;IAChC,YAAY,UAAQ;gBAER,QAAQ,EAAE,sBAAsB;IAK5C;;;OAGG;IACH,UAAU,GAAI,QAAQ,OAAO,KAAG,mBAAmB,EAAE,CAepD;IAED,OAAO,GAAI,QAAQ,OAAO,KAAG,IAAI,CAGhC;IAED,SAAS,QAAO,IAAI,CAAM;IAE1B,UAAU,QAAO,IAAI,CAEpB;IAED,WAAW,QAAO,mBAAmB,EAAE,CAAM;CAChD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,SAAS,WAAW,EAAE,OAAO,MAAM,EAAE,QAAQ,MAAM,KAAG,IASnF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;IAO1B;;;OAGG;;CAcV,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,WAAW,EAAE,WAAW,UAAU,CAAC,OAAO,qBAAqB,CAAC,EAAE,OAAO,MAAM,EAAE,QAAQ,MAAM,KAAG,IAGpI,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,WAAW,KAAG,WAAW,EAA8H,CAAA;AAE/L;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,WAAW,KAAG,MAAM,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