@aiquants/directory-tree 3.7.0 → 3.7.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/package.json +1 -1
- package/dist/src/DirectoryTree.d.ts +0 -24
- package/dist/src/DirectoryTree.d.ts.map +0 -1
- package/dist/src/DirectoryTreeGrid.d.ts +0 -64
- package/dist/src/DirectoryTreeGrid.d.ts.map +0 -1
- package/dist/src/TreeLine.d.ts +0 -9
- package/dist/src/TreeLine.d.ts.map +0 -1
- package/dist/src/cli.server.d.ts +0 -2
- package/dist/src/cli.server.d.ts.map +0 -1
- package/dist/src/entryRendering.d.ts +0 -50
- package/dist/src/entryRendering.d.ts.map +0 -1
- package/dist/src/gridUtils.d.ts +0 -47
- package/dist/src/gridUtils.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -14
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/logger.d.ts +0 -98
- package/dist/src/logger.d.ts.map +0 -1
- package/dist/src/scrollAnchor.d.ts +0 -39
- package/dist/src/scrollAnchor.d.ts.map +0 -1
- package/dist/src/types.d.ts +0 -591
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/useDirectoryTreeState.d.ts +0 -15
- package/dist/src/useDirectoryTreeState.d.ts.map +0 -1
- package/dist/src/useEntryInteraction.d.ts +0 -20
- package/dist/src/useEntryInteraction.d.ts.map +0 -1
- package/dist/tests/test-setup.d.ts +0 -1
- package/dist/tests/test-setup.d.ts.map +0 -1
- package/dist/vite.config.d.ts +0 -3
- package/dist/vite.config.d.ts.map +0 -1
- package/src/DirectoryTree.spec.md +0 -550
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { directoryTreeClasses } from './entryRendering.tsx';
|
|
2
|
-
import { DirectoryTreeProps, TreeLineGeometry, TreeLineItemInfo } from './types.ts';
|
|
3
|
-
/**
|
|
4
|
-
* Builds geometry data for the canvas based tree line renderer, including segments and glyphs.
|
|
5
|
-
*
|
|
6
|
-
* Canvas ベースのツリーラインレンダラ用に線分とグリフのジオメトリデータを構築する。
|
|
7
|
-
*
|
|
8
|
-
* @param items - ツリーラインアイテムの配列。
|
|
9
|
-
* @param itemHeights - 各アイテムの高さの配列 (items と同じ順序・長さ)。
|
|
10
|
-
* @param itemOffsets - 各アイテムの累積上端オフセット表 (長さ = items.length + 1)。
|
|
11
|
-
* @param segmentWidth - インデントセグメントの幅。
|
|
12
|
-
* @param includeGlyphs - グリフ情報を含めるかどうか。
|
|
13
|
-
* @param glyphSizeOverride - グリフサイズの上書き値。
|
|
14
|
-
* @returns セグメントおよびグリフの配列をまとめたジオメトリデータ。
|
|
15
|
-
*/
|
|
16
|
-
export declare const buildTreeLineGeometry: (items: TreeLineItemInfo[], itemHeights: number[], itemOffsets: number[], segmentWidth: number, includeGlyphs: boolean, glyphSizeOverride?: number) => TreeLineGeometry;
|
|
17
|
-
/**
|
|
18
|
-
* @component DirectoryTree
|
|
19
|
-
* @description A component to display a directory tree structure. It allows navigation and selection of files.
|
|
20
|
-
* ディレクトリツリー構造を表示するコンポーネント。ファイルのナビゲーションと選択が可能。
|
|
21
|
-
*/
|
|
22
|
-
export declare const DirectoryTree: ({ entries, expansion: { toggle, isExpanded, expandMultiple, collapseMultiple, isPending, alwaysExpanded, doubleClickAction }, selection: { onEntryClick, selectedPath, mode: selectionMode, selectedItems, onSelectionChange }, visual: { className, style, lineColor, showTreeLines, showExpandIcons, showDirectoryIcons, showFileIcons, iconOverrides, expandIconSize, itemHeight, removeRootIndent, highlightStyles, entryClassName, entryStyle, nameClassName, nameStyle, directoryNameClassName, directoryNameStyle, fileNameClassName, fileNameStyle, }, virtualScroll: virtualScrollOptions, grid, }: DirectoryTreeProps) => import("react").JSX.Element;
|
|
23
|
-
export { directoryTreeClasses };
|
|
24
|
-
//# sourceMappingURL=DirectoryTree.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DirectoryTree.d.ts","sourceRoot":"","sources":["../../src/DirectoryTree.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAuB,oBAAoB,EAAyF,MAAM,sBAAsB,CAAA;AAGvK,OAAO,KAAK,EAA2C,kBAAkB,EAAqC,gBAAgB,EAAiB,gBAAgB,EAAmB,MAAM,YAAY,CAAA;AA+IpM;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,gBAAgB,EAAE,EAAE,aAAa,MAAM,EAAE,EAAE,aAAa,MAAM,EAAE,EAAE,cAAc,MAAM,EAAE,eAAe,OAAO,EAAE,oBAAoB,MAAM,KAAG,gBA4IzL,CAAA;AA8ND;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,6kBA4B3B,kBAAkB,gCA2ZpB,CAAA;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAA"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { DirectoryEntry, DirectoryTreeColumn, DirectoryTreeIconOverrides, HighlightStyles } from './types.ts';
|
|
2
|
-
/** Visual options shared by grid rows (mirrors the subset of DirectoryTree visual props needed here). */
|
|
3
|
-
export type GridRowVisual = {
|
|
4
|
-
iconOverrides?: DirectoryTreeIconOverrides;
|
|
5
|
-
showExpandIcons?: boolean;
|
|
6
|
-
showDirectoryIcons?: boolean;
|
|
7
|
-
showFileIcons?: boolean;
|
|
8
|
-
useCanvasExpandIcons?: boolean;
|
|
9
|
-
expandIconSize?: number;
|
|
10
|
-
highlightStyles?: HighlightStyles;
|
|
11
|
-
};
|
|
12
|
-
/** True when the entry is an expanded directory. Files short-circuit without querying isDirOpen. / 展開済みディレクトリなら true。 */
|
|
13
|
-
export declare const isEntryExpanded: (entry: DirectoryEntry, isDirOpen: (path: string) => boolean) => boolean;
|
|
14
|
-
export type DirectoryTreeGridRowProps = {
|
|
15
|
-
entry: DirectoryEntry;
|
|
16
|
-
indentLevel: number;
|
|
17
|
-
rowHeight: number;
|
|
18
|
-
isDirOpen: (path: string) => boolean;
|
|
19
|
-
columns: DirectoryTreeColumn[];
|
|
20
|
-
numericTemplate: string;
|
|
21
|
-
numericTotal: number;
|
|
22
|
-
nameWidth: number;
|
|
23
|
-
rowClassName?: string | ((entry: DirectoryEntry) => string);
|
|
24
|
-
selection: {
|
|
25
|
-
selectedPath: string | null;
|
|
26
|
-
mode?: "none" | "single" | "multiple";
|
|
27
|
-
selectedItems?: Set<string>;
|
|
28
|
-
onEntryClick: (event: import('./types.ts').DirectoryTreeClickEvent) => void;
|
|
29
|
-
onSelectionChange?: (entry: DirectoryEntry, isSelected: boolean) => void;
|
|
30
|
-
};
|
|
31
|
-
expansion: {
|
|
32
|
-
toggleDirectory: (path: string) => void;
|
|
33
|
-
onToggleDirectoryRecursive: (entry: DirectoryEntry) => void;
|
|
34
|
-
};
|
|
35
|
-
visual: GridRowVisual;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* @component DirectoryTreeGridRow
|
|
39
|
-
* @description A single TreeGrid row: frozen name cell (indent + glyph + icon + label) plus a
|
|
40
|
-
* horizontally-scrollable numeric track. Memoized; the `--dt-hscroll` variable is not
|
|
41
|
-
* a prop, so horizontal scrolling never re-renders rows.
|
|
42
|
-
*/
|
|
43
|
-
export declare const DirectoryTreeGridRow: import('react').NamedExoticComponent<DirectoryTreeGridRowProps>;
|
|
44
|
-
export type DirectoryTreeGridHeaderRowProps = {
|
|
45
|
-
columns: DirectoryTreeColumn[];
|
|
46
|
-
numericTemplate: string;
|
|
47
|
-
numericTotal: number;
|
|
48
|
-
nameWidth: number;
|
|
49
|
-
scrollBarWidth: number;
|
|
50
|
-
className?: string;
|
|
51
|
-
};
|
|
52
|
-
export declare const DirectoryTreeGridHeaderRow: ({ columns, className, ...rest }: DirectoryTreeGridHeaderRowProps) => import("react").JSX.Element;
|
|
53
|
-
export type DirectoryTreeGridFooterRowProps = {
|
|
54
|
-
columns: DirectoryTreeColumn[];
|
|
55
|
-
numericTemplate: string;
|
|
56
|
-
numericTotal: number;
|
|
57
|
-
nameWidth: number;
|
|
58
|
-
scrollBarWidth: number;
|
|
59
|
-
/** All nodes of the tree (collapsed included), for footer aggregation. / フッタ集計用の全ノード。 */
|
|
60
|
-
allEntries: DirectoryEntry[];
|
|
61
|
-
className?: string;
|
|
62
|
-
};
|
|
63
|
-
export declare const DirectoryTreeGridFooterRow: ({ columns, allEntries, className, ...rest }: DirectoryTreeGridFooterRowProps) => import("react").JSX.Element;
|
|
64
|
-
//# sourceMappingURL=DirectoryTreeGrid.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DirectoryTreeGrid.d.ts","sourceRoot":"","sources":["../../src/DirectoryTreeGrid.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAGlH,yGAAyG;AACzG,MAAM,MAAM,aAAa,GAAG;IACxB,aAAa,CAAC,EAAE,0BAA0B,CAAA;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,eAAe,CAAA;CACpC,CAAA;AAKD,yHAAyH;AACzH,eAAO,MAAM,eAAe,GAAI,OAAO,cAAc,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,KAAG,OAAwE,CAAA;AAQtK,MAAM,MAAM,yBAAyB,GAAG;IACpC,KAAK,EAAE,cAAc,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IACpC,OAAO,EAAE,mBAAmB,EAAE,CAAA;IAC9B,eAAe,EAAE,MAAM,CAAA;IACvB,YAAY,EAA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EAAE,MAAM,CAAA;IACtB,yFAAyF;IACzF,UAAU,EAAE,cAAc,EAAE,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAKD,eAAO,MAAM,0BAA0B,GAAI,6CAA6C,+BAA+B,gCAEtH,CAAA"}
|
package/dist/src/TreeLine.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TreeLineProps } from './types.ts';
|
|
2
|
-
/**
|
|
3
|
-
* Canvas based tree line renderer that repaints on animation frames.
|
|
4
|
-
*
|
|
5
|
-
* アニメーションフレーム単位で再描画する Canvas ベースのツリーラインレンダラ。
|
|
6
|
-
*/
|
|
7
|
-
declare const TreeLine: import('react').NamedExoticComponent<TreeLineProps>;
|
|
8
|
-
export { TreeLine };
|
|
9
|
-
//# sourceMappingURL=TreeLine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TreeLine.d.ts","sourceRoot":"","sources":["../../src/TreeLine.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,aAAa,EAAmB,MAAM,YAAY,CAAA;AAqL/E;;;;GAIG;AACH,QAAA,MAAM,QAAQ,qDA4GZ,CAAA;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
package/dist/src/cli.server.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.server.d.ts","sourceRoot":"","sources":["../../src/cli.server.ts"],"names":[],"mappings":""}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { DirectoryTreeIconOverrides, DirectoryTreeIconRenderContext } from './types.ts';
|
|
3
|
-
/** Default row height in px. / 各行の高さの既定値 (px)。 */
|
|
4
|
-
export declare const DEFAULT_ITEM_HEIGHT = 20;
|
|
5
|
-
/** Indentation per depth level in px. / 1 階層あたりのインデント幅 (px)。 */
|
|
6
|
-
export declare const INDENT_SIZE = 16;
|
|
7
|
-
/** Standard expand glyph size. / 展開アイコンの標準サイズ。 */
|
|
8
|
-
export declare const EXPAND_GLYPH_SIZE = 12;
|
|
9
|
-
/**
|
|
10
|
-
* TailwindCSS v4 class names for DirectoryTree component.
|
|
11
|
-
* DirectoryTreeコンポーネント用の TailwindCSS v4 クラス名。
|
|
12
|
-
*/
|
|
13
|
-
export declare const directoryTreeClasses: {
|
|
14
|
-
container: string;
|
|
15
|
-
containerPending: string;
|
|
16
|
-
entry: string;
|
|
17
|
-
entryHover: string;
|
|
18
|
-
entrySelected: string;
|
|
19
|
-
entryItemSelected: string;
|
|
20
|
-
expandIcon: string;
|
|
21
|
-
expandIconSelected: string;
|
|
22
|
-
typeIcon: string;
|
|
23
|
-
typeIconSelected: string;
|
|
24
|
-
name: string;
|
|
25
|
-
nameDirectory: string;
|
|
26
|
-
nameSelected: string;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* @function getFileExtension
|
|
30
|
-
* @description Extracts the extension from a filename. / ファイル名から拡張子を抽出する。
|
|
31
|
-
*/
|
|
32
|
-
export declare const getFileExtension: (filename: string) => string;
|
|
33
|
-
export type ExpandIconParams = {
|
|
34
|
-
isDirectory: boolean;
|
|
35
|
-
isExpanded: boolean;
|
|
36
|
-
showExpandIcons: boolean;
|
|
37
|
-
useCanvasExpandIcons: boolean;
|
|
38
|
-
expandIconSize?: number;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* @function resolveExpandIcon
|
|
42
|
-
* @description Determines the expand icon node for a directory entry. / 展開アイコンノードを決定する。
|
|
43
|
-
*/
|
|
44
|
-
export declare const resolveExpandIcon: ({ isDirectory, isExpanded, showExpandIcons, useCanvasExpandIcons, expandIconSize }: ExpandIconParams) => ReactNode;
|
|
45
|
-
/**
|
|
46
|
-
* Determines the icon to render for a directory entry.
|
|
47
|
-
* ディレクトリエントリに表示するアイコンを決定する関数。
|
|
48
|
-
*/
|
|
49
|
-
export declare const resolveEntryIcon: (ctx: DirectoryTreeIconRenderContext, overrides?: DirectoryTreeIconOverrides) => ReactNode;
|
|
50
|
-
//# sourceMappingURL=entryRendering.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entryRendering.d.ts","sourceRoot":"","sources":["../../src/entryRendering.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,0BAA0B,EAAE,8BAA8B,EAA6B,MAAM,YAAY,CAAA;AAEvH,kDAAkD;AAClD,eAAO,MAAM,mBAAmB,KAAK,CAAA;AACrC,gEAAgE;AAChE,eAAO,MAAM,WAAW,KAAK,CAAA;AAC7B,kDAAkD;AAClD,eAAO,MAAM,iBAAiB,KAAK,CAAA;AAEnC;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;CA8BhC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,KAAG,MAEnD,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC3B,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,eAAe,EAAE,OAAO,CAAA;IACxB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,oFAAoF,gBAAgB,KAAG,SAQxI,CAAA;AA8BD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,8BAA8B,EAAE,YAAY,0BAA0B,KAAG,SAW9G,CAAA"}
|
package/dist/src/gridUtils.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { DirectoryEntry, DirectoryTreeColumn } from './types.ts';
|
|
2
|
-
/** Default frozen width of the name (tree) column in px. / 名前列の既定凍結幅 (px)。 */
|
|
3
|
-
export declare const DEFAULT_NAME_COLUMN_WIDTH = 240;
|
|
4
|
-
/** Default width of a numeric column in px. / 数値列の既定幅 (px)。 */
|
|
5
|
-
export declare const DEFAULT_NUMERIC_COLUMN_WIDTH = 96;
|
|
6
|
-
/** Default vertical scrollbar width used to align header/footer with the body. / ヘッダ/フッタ整合用の既定縦バー幅。 */
|
|
7
|
-
export declare const DEFAULT_GRID_SCROLLBAR_WIDTH = 12;
|
|
8
|
-
/**
|
|
9
|
-
* Builds the `grid-template-columns` string for the numeric (non-name) columns.
|
|
10
|
-
* 数値列(columns[1..])の `grid-template-columns` 文字列を構築する。
|
|
11
|
-
*
|
|
12
|
-
* @returns e.g. `"96px 96px 120px"`. Empty string when there is no numeric column.
|
|
13
|
-
*/
|
|
14
|
-
export declare const buildNumericTemplate: (columns: DirectoryTreeColumn[]) => string;
|
|
15
|
-
/** Metrics describing the frozen/scrollable split of a TreeGrid. / TreeGrid の凍結/可動分割を表す寸法。 */
|
|
16
|
-
export type GridMetrics = {
|
|
17
|
-
/** Frozen width of the name column. / 名前列の凍結幅。 */
|
|
18
|
-
nameWidth: number;
|
|
19
|
-
/** Total width of all numeric columns (the scrollable content width). / 数値列合計幅(可動コンテンツ幅)。 */
|
|
20
|
-
numericTotal: number;
|
|
21
|
-
/** Visible width of the numeric region (viewport). / 数値領域の可視幅(ビューポート)。 */
|
|
22
|
-
numericVisible: number;
|
|
23
|
-
/** Maximum horizontal scroll offset (>= 0). / 横スクロールの最大オフセット (>= 0)。 */
|
|
24
|
-
maxHScroll: number;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Computes the frozen/scrollable layout metrics from the measured container width.
|
|
28
|
-
* 計測済みコンテナ幅から凍結/可動レイアウトの寸法を算出する。
|
|
29
|
-
*
|
|
30
|
-
* `numericVisible = measuredWidth - nameWidth - scrollBarWidth`, clamped to >= 0. This single
|
|
31
|
-
* source of truth keeps the body (reduced by the vertical scrollbar) aligned with the
|
|
32
|
-
* header/footer (which reserve an equal right-side spacer).
|
|
33
|
-
*/
|
|
34
|
-
export declare const computeGridMetrics: ({ measuredWidth, columns, scrollBarWidth }: {
|
|
35
|
-
measuredWidth: number;
|
|
36
|
-
columns: DirectoryTreeColumn[];
|
|
37
|
-
scrollBarWidth?: number;
|
|
38
|
-
}) => GridMetrics;
|
|
39
|
-
/** Clamps a horizontal scroll offset into `[0, maxHScroll]`. / 横スクロール量を [0, maxHScroll] に丸める。 */
|
|
40
|
-
export declare const clampHScroll: (value: number, maxHScroll: number) => number;
|
|
41
|
-
/**
|
|
42
|
-
* Depth-first flattens every node of the tree **regardless of expansion state** — used to feed
|
|
43
|
-
* column footers that total over all entries (including collapsed subtrees).
|
|
44
|
-
* 展開状態に依存せず全ノードを DFS で平坦化する。列フッタの全 entries 合計に使用。
|
|
45
|
-
*/
|
|
46
|
-
export declare const flattenAllEntries: (entries: DirectoryEntry[]) => DirectoryEntry[];
|
|
47
|
-
//# sourceMappingURL=gridUtils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gridUtils.d.ts","sourceRoot":"","sources":["../../src/gridUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErE,8EAA8E;AAC9E,eAAO,MAAM,yBAAyB,MAAM,CAAA;AAC5C,+DAA+D;AAC/D,eAAO,MAAM,4BAA4B,KAAK,CAAA;AAC9C,uGAAuG;AACvG,eAAO,MAAM,4BAA4B,KAAK,CAAA;AAQ9C;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,SAAS,mBAAmB,EAAE,KAAG,MAIpD,CAAA;AAElB,8FAA8F;AAC9F,MAAM,MAAM,WAAW,GAAG;IACtB,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAA;IACjB,6FAA6F;IAC7F,YAAY,EAAE,MAAM,CAAA;IACpB,0EAA0E;IAC1E,cAAc,EAAE,MAAM,CAAA;IACtB,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,4CAA2E;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,WAOlM,CAAA;AAED,iGAAiG;AACjG,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,EAAE,YAAY,MAAM,KAAG,MAKhE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,cAAc,EAAE,KAAG,cAAc,EAY3E,CAAA"}
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Directory Tree Component Library
|
|
3
|
-
* @package @aiquants/directory-tree
|
|
4
|
-
*
|
|
5
|
-
* This module provides a comprehensive directory tree component for React applications.
|
|
6
|
-
* The component supports virtualization for performance, file selection, and theming.
|
|
7
|
-
*
|
|
8
|
-
* このモジュールは React アプリケーション用の包括的なディレクトリツリーコンポーネントを提供します。
|
|
9
|
-
* このコンポーネントはパフォーマンス向上のための仮想化、ファイル選択、およびテーマ設定をサポートしています。
|
|
10
|
-
*/
|
|
11
|
-
export { DirectoryTree, directoryTreeClasses } from './DirectoryTree.tsx';
|
|
12
|
-
export type { DirectoryEntry, DirectoryEntryItemProps, DirectoryTreeClickEvent, DirectoryTreeColumn, DirectoryTreeGrid, DirectoryTreeIconOverrides, DirectoryTreeIconRenderContext, DirectoryTreeIconRenderer, DirectoryTreeProps, DirectoryTreeState, DirectoryTreeVirtualScrollOptions, HighlightStyles, ItemHeight, TreeLineItemInfo, TreeLineProps, UseDirectoryTreeStateProps, } from './types.ts';
|
|
13
|
-
export { useDirectoryTreeState } from './useDirectoryTreeState.ts';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AACzE,YAAY,EACR,cAAc,EACd,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,iBAAiB,EACjB,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,iCAAiC,EACjC,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,0BAA0B,GAC7B,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA"}
|
package/dist/src/logger.d.ts
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module utils/logger
|
|
3
|
-
* @description Logger utility for consistent log management across the library.
|
|
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
|
-
* @constructor
|
|
40
|
-
* @param {LogLevel} [level=LogLevel.WARN] - The minimum log level to output.
|
|
41
|
-
* @param {string} [prefix="[fuzzy-search]"] - The prefix to add to all log messages.
|
|
42
|
-
* @param {ILogger} [impl=console] - The implementation to use for logging.
|
|
43
|
-
*/
|
|
44
|
-
constructor(level?: LogLevel, prefix?: string, impl?: ILogger);
|
|
45
|
-
private static instance;
|
|
46
|
-
/**
|
|
47
|
-
* @method setLevel
|
|
48
|
-
* @description Updates the current log level for the static instance.
|
|
49
|
-
* @description 静的インスタンスの現在のログレベルを更新します。
|
|
50
|
-
* @param {LogLevel} level - The new log level.
|
|
51
|
-
*/
|
|
52
|
-
static setLevel(level: LogLevel): void;
|
|
53
|
-
/**
|
|
54
|
-
* @method setLevel
|
|
55
|
-
* @description Updates the current log level.
|
|
56
|
-
* @description 現在のログレベルを更新します。
|
|
57
|
-
* @param {LogLevel} level - The new log level.
|
|
58
|
-
*/
|
|
59
|
-
setLevel(level: LogLevel): void;
|
|
60
|
-
/**
|
|
61
|
-
* @method setImplementation
|
|
62
|
-
* @description Updates the logger implementation for the static instance.
|
|
63
|
-
* @description 静的インスタンスのロガーの実装を更新します。
|
|
64
|
-
* @param {ILogger} impl - The new logger implementation.
|
|
65
|
-
*/
|
|
66
|
-
static setImplementation(impl: ILogger): void;
|
|
67
|
-
/**
|
|
68
|
-
* @method setImplementation
|
|
69
|
-
* @description Updates the logger implementation.
|
|
70
|
-
* @description ロガーの実装を更新します。
|
|
71
|
-
* @param {ILogger} impl - The new logger implementation.
|
|
72
|
-
*/
|
|
73
|
-
setImplementation(impl: ILogger): void;
|
|
74
|
-
/**
|
|
75
|
-
* @method setPrefix
|
|
76
|
-
* @description Updates the log prefix for the static instance.
|
|
77
|
-
* @description 静的インスタンスのログのプレフィックスを更新します。
|
|
78
|
-
* @param {string} prefix - The new prefix.
|
|
79
|
-
*/
|
|
80
|
-
static setPrefix(prefix: string): void;
|
|
81
|
-
/**
|
|
82
|
-
* @method setPrefix
|
|
83
|
-
* @description Updates the log prefix.
|
|
84
|
-
* @description ログのプレフィックスを更新します。
|
|
85
|
-
* @param {string} prefix - The new prefix.
|
|
86
|
-
*/
|
|
87
|
-
setPrefix(prefix: string): void;
|
|
88
|
-
private formatMessage;
|
|
89
|
-
static debug(message?: unknown, ...optionalParams: unknown[]): void;
|
|
90
|
-
debug(message?: unknown, ...optionalParams: unknown[]): void;
|
|
91
|
-
static info(message?: unknown, ...optionalParams: unknown[]): void;
|
|
92
|
-
info(message?: unknown, ...optionalParams: unknown[]): void;
|
|
93
|
-
static warn(message?: unknown, ...optionalParams: unknown[]): void;
|
|
94
|
-
warn(message?: unknown, ...optionalParams: unknown[]): void;
|
|
95
|
-
static error(message?: unknown, ...optionalParams: unknown[]): void;
|
|
96
|
-
error(message?: unknown, ...optionalParams: unknown[]): void;
|
|
97
|
-
}
|
|
98
|
-
//# sourceMappingURL=logger.d.ts.map
|
package/dist/src/logger.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/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;AACH,MAAM,WAAW,OAAO;IACpB,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,cAAc,EAA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,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"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure helpers for preserving the visual scroll anchor across row-list mutations.
|
|
3
|
-
* 行リストの変異を跨いで視覚的スクロールアンカーを保持するための純関数ヘルパーモジュール。
|
|
4
|
-
*
|
|
5
|
-
* ストリーミング追記などで viewport より上に行が挿入されると、ピクセル位置を維持する
|
|
6
|
-
* 通常のスクロールでは表示内容が下へずれる。本モジュールは「変更前の先頭可視行」を
|
|
7
|
-
* アンカーとして捕捉し、変更後の行リスト内で同じ行が同じ画面位置に来るスクロール量を
|
|
8
|
-
* 算出する。副作用を持たないため単体テストで全経路を検証できる。
|
|
9
|
-
*/
|
|
10
|
-
/** アンカー捕捉に必要な最小の行形状 (構造的部分型) */
|
|
11
|
-
export type AnchorableItem = {
|
|
12
|
-
entry: {
|
|
13
|
-
absolutePath: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
/** 捕捉されたスクロールアンカー */
|
|
17
|
-
export type ScrollAnchor = {
|
|
18
|
-
/** 変更前の先頭可視行のパス */
|
|
19
|
-
path: string;
|
|
20
|
-
/** 行上端から viewport 上端までのピクセル差 (行の途中まで見えている量) */
|
|
21
|
-
offsetInViewport: number;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Captures the first visible row as a scroll anchor (null when anchoring is unnecessary).
|
|
25
|
-
* 先頭可視行をスクロールアンカーとして捕捉する処理 (アンカー不要時は null)。
|
|
26
|
-
*
|
|
27
|
-
* scrollPosition が 0 以下 (最上部) の場合は「先頭に張り付いて新着を眺める」挙動が
|
|
28
|
-
* 自然なため、意図的にアンカーしない。
|
|
29
|
-
*/
|
|
30
|
-
export declare const captureScrollAnchor: (items: ReadonlyArray<AnchorableItem>, offsets: number[], scrollPosition: number) => ScrollAnchor | null;
|
|
31
|
-
/**
|
|
32
|
-
* Resolves the scroll position that keeps the anchored row visually stationary in the new list.
|
|
33
|
-
* 新しい行リスト内でアンカー行を同じ画面位置に保つスクロール量を解決する処理。
|
|
34
|
-
*
|
|
35
|
-
* アンカー行が新リストに存在しない場合 (折りたたみ・フィルタで消えた等) は null を返し、
|
|
36
|
-
* 呼び出し側は補正を行わない (ピクセル位置維持のフォールバック)。
|
|
37
|
-
*/
|
|
38
|
-
export declare const resolveAnchorScroll: (anchor: ScrollAnchor, items: ReadonlyArray<AnchorableItem>, offsets: number[]) => number | null;
|
|
39
|
-
//# sourceMappingURL=scrollAnchor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scrollAnchor.d.ts","sourceRoot":"","sources":["../../src/scrollAnchor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,gCAAgC;AAChC,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC,CAAA;AAED,qBAAqB;AACrB,MAAM,MAAM,YAAY,GAAG;IACvB,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,+CAA+C;IAC/C,gBAAgB,EAAE,MAAM,CAAA;CAC3B,CAAA;AAwBD;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,aAAa,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,gBAAgB,MAAM,KAAG,YAAY,GAAG,IAapI,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,YAAY,EAAE,OAAO,aAAa,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,KAAG,MAAM,GAAG,IAW5H,CAAA"}
|