@styloviz/tree-view 1.0.2 → 2.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"styloviz-tree-view.mjs","names":[],"sources":["../../../../projects/tree-view-free/src/lib/tree-view.component.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n signal,\n untracked,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { SvIconComponent } from '@styloviz/icons';\nimport {\n SvEmptyShellComponent,\n SvErrorShellComponent,\n SvSkeletonShellComponent,\n createTypeahead,\n svAttrSelector,\n svCollectionTarget,\n svCutHierarchyCycles,\n svIsTypeaheadKey,\n svRecoverFocus,\n svSuccessorIndex,\n svWarnUnvirtualizedCeiling,\n warnOnDuplicateItemKeys,\n type SvDataError,\n} from '@styloviz/core';\n\ndeclare const ngDevMode: boolean | undefined;\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport interface TreeNode {\n readonly id: string;\n readonly label: string;\n readonly icon?: string;\n children?: TreeNode[];\n readonly expanded?: boolean;\n readonly disabled?: boolean;\n readonly badge?: string;\n}\n\nexport interface FlatNode {\n readonly node: TreeNode;\n readonly depth: number;\n readonly isLast: boolean;\n readonly hasChildren: boolean;\n readonly isExpanded: boolean;\n}\n\nexport interface TreeNodeClickEvent {\n readonly node: TreeNode;\n readonly depth: number;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * SvTreeViewComponent (Free) — Collapsible single-select tree.\n *\n * For the full 8-variant suite (file explorer, checkbox tri-state,\n * org chart, tree table, searchable, draggable, lazy-load) upgrade to\n * `@styloviz-pro/tree-view`.\n *\n * @example\n * ```html\n * <sv-tree-view [nodes]=\"nodes\" (nodeClick)=\"onNodeClick($event)\" />\n * ```\n */\n@Component({\n imports: [SvIconComponent, SvSkeletonShellComponent, SvErrorShellComponent, SvEmptyShellComponent],\n selector: 'sv-tree-view',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (loading()) {\n <div class=\"p-2\" data-sv-state=\"loading\">\n <sv-skeleton-shell variant=\"list\" [rows]=\"5\" ariaLabel=\"Loading tree\" />\n </div>\n } @else if (error()) {\n <sv-error-shell\n [error]=\"error()\"\n title=\"Could not load this tree\"\n (retry)=\"retry.emit()\"\n data-sv-state=\"error\"\n />\n } @else {\n\n <div class=\"sv-tree-view select-none\" role=\"tree\" [attr.aria-label]=\"ariaLabel().trim() || null\">\n @for (fn of visibleNodes(); track fn.node.id) {\n <div class=\"group flex items-center gap-1 rounded-lg px-1 outline-none transition-colors duration-100 cursor-pointer focus-visible:ring-2 focus-visible:ring-brandaccent-400\"\n [class]=\"fn.node.disabled\n ? 'opacity-40 cursor-not-allowed py-1.5'\n : isSelected(fn.node.id)\n ? 'py-1.5 bg-brandaccent-50 dark:bg-brandaccent-900/25'\n : 'py-1.5 hover:bg-gray-100/70 dark:hover:bg-gray-800/50'\"\n (click)=\"select(fn.node, fn.depth); setActive(fn.node.id)\"\n (keydown)=\"onKeydown($event, fn, $index)\"\n role=\"treeitem\"\n [attr.data-tree-id]=\"fn.node.id\"\n [attr.tabindex]=\"treeTabIndex(fn.node.id)\"\n [attr.aria-level]=\"fn.depth + 1\"\n [attr.aria-expanded]=\"fn.hasChildren ? fn.isExpanded : null\"\n [attr.aria-selected]=\"selectable() ? isSelected(fn.node.id) : null\">\n\n <!--\n Depth spacers, one per level, carrying the optional connector guide.\n Indentation used to be a paddingLeft on the row, which left\n showLines - declared, documented, default true - with nothing to\n hang a line on, so it did nothing at all. The Pro twin has rendered\n these all along; this is the same 20px-per-level geometry.\n (No backticks in here: this template is an inline JS literal.)\n -->\n @for (d of depthArray(fn.depth); track d) {\n <span class=\"relative w-5 shrink-0 self-stretch\" aria-hidden=\"true\">\n @if (showLines()) {\n <span class=\"absolute inset-y-0 left-1/2 w-px -translate-x-1/2\n bg-gray-200 dark:bg-gray-700/70\"></span>\n }\n </span>\n }\n\n <!-- Chevron toggle -->\n <!-- Out of the tab order (X-10): ArrowRight/ArrowLeft on the row\n expand and collapse, so a 1,500-row tree stays ONE tab stop. -->\n <button type=\"button\"\n tabindex=\"-1\"\n class=\"flex h-5 w-5 shrink-0 items-center justify-center rounded\n text-gray-400 transition-all hover:text-gray-700 dark:hover:text-gray-200\n focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-brandaccent-400\"\n [class.invisible]=\"!fn.hasChildren\"\n (click)=\"toggle(fn.node); $event.stopPropagation()\"\n [attr.aria-label]=\"(fn.isExpanded ? 'Collapse ' : 'Expand ') + fn.node.label\">\n <sv-icon name=\"chevron-right\"\n [cssClass]=\"'h-3.5 w-3.5 transition-transform duration-150' + (fn.isExpanded ? ' rotate-90' : '')\"\n [strokeWidth]=\"2\" />\n </button>\n\n <!-- Icon -->\n @if (fn.node.icon) {\n <span class=\"shrink-0 text-sm\" aria-hidden=\"true\">{{ fn.node.icon }}</span>\n }\n\n <!-- Label -->\n <span class=\"flex-1 truncate text-[13px] font-medium\"\n [class]=\"isSelected(fn.node.id)\n ? 'text-brandaccent-700 dark:text-brandaccent-300'\n : 'text-gray-800 dark:text-gray-100'\">\n {{ fn.node.label }}\n </span>\n\n <!-- Badge -->\n @if (fn.node.badge) {\n <span class=\"ml-auto shrink-0 rounded-full bg-gray-100 px-1.5 py-px\n text-[10px] font-semibold text-gray-600\n dark:bg-gray-800 dark:text-gray-300\">\n {{ fn.node.badge }}\n </span>\n }\n </div>\n }\n\n @if (!visibleNodes().length) {\n <sv-empty-shell reason=\"no-data\" [title]=\"emptyText()\" data-sv-state=\"empty\" />\n }\n </div>\n }\n\n `,\n})\nexport class SvTreeViewComponent {\n /** Tree node data (nested children, optional icons). */\n readonly nodes = input<TreeNode[]>([]);\n /**\n * Enable single-row selection highlight. @default true\n *\n * ★ Also decides whether the rows claim `aria-selected` at all. A display-only\n * tree that reports `aria-selected=\"false\"` on every row announces a\n * selection model that does not exist, and a listener can only discover that\n * by pressing Enter and getting nothing.\n */\n readonly selectable = input<boolean>(true);\n /** Show vertical connector guide lines. @default true */\n readonly showLines = input<boolean>(true);\n /**\n * What this tree is, e.g. `'Project files'` — names the `role=\"tree\"` region.\n *\n * ★ Two trees side by side both announce as an unnamed \"tree\" without this.\n * Left unset, no name is invented: an `aria-label` of \"Tree\" only repeats\n * the role. Matches `sv-tree-view-pro`'s input of the same name.\n *\n * @default ''\n */\n readonly ariaLabel = input<string>('');\n\n /**\n * True while the tree is being fetched. Replaces it with a placeholder.\n * @default false\n */\n readonly loading = input<boolean>(false);\n\n /**\n * Load failure. Use `toSvDataError()` from `@styloviz/core` to normalize an\n * `HttpErrorResponse`.\n * @default null\n */\n readonly error = input<SvDataError | string | null>(null);\n\n /** Copy for the empty state. @default 'No items to display' */\n readonly emptyText = input<string>('No items to display');\n\n /** Fires when an enabled node is clicked or activated with Enter/Space while `selectable`; payload is the node and its depth (0 for roots). */\n readonly nodeClick = output<TreeNodeClickEvent>();\n /** Fires with the node when an enabled parent is expanded, by its chevron or ArrowRight. */\n readonly nodeExpand = output<TreeNode>();\n /** Fires with the node when an expanded parent is collapsed, by its chevron or ArrowLeft. */\n readonly nodeCollapse = output<TreeNode>();\n /** Fires with the node when it becomes selected by click or Enter/Space; never fires while `selectable` is false. */\n readonly nodeSelect = output<TreeNode>();\n /** The host should re-run the failed load. */\n readonly retry = output<void>();\n\n /**\n * Expanded node ids. Two-way bindable, so an expansion state loaded from the\n * server — or restored from a URL — survives a reload.\n */\n readonly expandedIds = model<Set<string>>(new Set());\n /** The selected node id. Two-way bindable. */\n readonly selectedId = model<string | null>(null);\n /** The treeitem currently in the tab order (roving tabindex). */\n readonly activeId = signal<string | null>(null);\n\n private readonly _nodes = signal<TreeNode[]>([]);\n private readonly _warnedBindings = new Set<string>();\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n /** Injected, not the global: this runs during SSR, where there is no `document`. */\n private readonly _doc = inject(DOCUMENT);\n\n readonly visibleNodes = computed<FlatNode[]>(() => {\n const rows = this._flatten(this._nodes(), 0, this.expandedIds());\n // `TreeNode.id` is required by the type, but the type cannot require it to be\n // UNIQUE, and a tree is where duplicates are easiest to introduce: ids unique\n // among their own siblings collide the moment two branches are flattened into\n // one `@for`. Angular answers that with NG0955 and an empty tree.\n warnOnDuplicateItemKeys(rows, (n) => n.node.id, 'sv-tree-view [nodes]');\n return rows;\n });\n\n /** Applied only on the first non-empty node set — after that the user owns it. */\n private _seededFromNodes = false;\n\n constructor() {\n // `nodes` used to be read once in ngOnInit, so a host that fetched the tree\n // asynchronously and bound the result saw an empty component forever.\n effect(() => {\n // ★ Cut before anything walks it. `_flatten` and `_collectExpanded` both\n // recurse into `children` unconditionally, so a cycle in the host's data\n // — the ordinary result of building `children` from a `parentId` map —\n // recursed until the stack ended and took the tab with it.\n const incoming = svCutHierarchyCycles(this.nodes(), 'sv-tree-view').nodes as TreeNode[];\n // `X-12`: the host may delete the node that holds focus. Note where it\n // was BEFORE the new set renders, so focus can go to its successor.\n const focusedRow = untracked(() => this._focusedRowSnapshot());\n this._nodes.set(incoming);\n if (focusedRow) this._recoverAfterNodesChange(focusedRow);\n if (this._seededFromNodes || incoming.length === 0) return;\n this._seededFromNodes = true;\n const ids = new Set<string>();\n this._collectExpanded(incoming, ids);\n // `node.expanded` seeds this only when nobody else has: `expandedIds` is a\n // `model`, so a host may have bound a restored view, and the flags must not\n // win on first render only to lose on the next write.\n if (ids.size && untracked(this.expandedIds).size === 0) {\n this.expandedIds.set(ids);\n }\n // Seed the roving tabindex on the first node so the tree is tab-reachable.\n // ★ UNREACHABLE BRANCH — the `?? null` right operand can never be taken.\n // The guard four lines up already returned for `incoming.length === 0`,\n // `_nodes` was set to `incoming` synchronously above, and `_flatten` of a\n // non-empty list always yields at least one row — so `[0]` is defined and\n // the `?.` never short-circuits. Kept because the expression is what\n // makes the `activeId` type honest; counted as unreachable, not uncovered.\n this.activeId.set(this.visibleNodes()[0]?.node.id ?? null);\n });\n\n // `X-10`: a tree renders every visible row. Past the documented ceiling,\n // say so once in dev mode.\n effect(() => svWarnUnvirtualizedCeiling('sv-tree-view', this.visibleNodes().length, false));\n\n effect(() => this._warnIgnoredBindings());\n }\n\n /** Dev-mode only, once per instance: bindings the tree cannot act on. */\n private _warnIgnoredBindings(): void {\n if (typeof ngDevMode === 'undefined' || !ngDevMode) return;\n // An unnamed tree: two of them side by side both announce as \"tree\", and a\n // listener cannot tell the folder pane from the permissions pane.\n if (\n !this.ariaLabel().trim() &&\n !this.host.nativeElement.hasAttribute('aria-labelledby') &&\n !this._warnedBindings.has('no-name')\n ) {\n this._warnedBindings.add('no-name');\n console.warn(\n '[styloviz] sv-tree-view: the tree has no accessible name — [ariaLabel] is ' +\n 'empty and the host has no aria-labelledby, so a screen reader announces only ' +\n '\"tree\". Pass [ariaLabel]=\"\\'Project files\\'\" (or similar).',\n );\n }\n }\n\n // ── Focus after the host mutates `nodes` (X-12) ─────────────────────────────\n\n /** The row holding DOM focus, and its index among the visible rows — or null. */\n private _focusedRowSnapshot(): { readonly id: string; readonly index: number } | null {\n const active = this._doc.activeElement as HTMLElement | null;\n if (!active || !this.host.nativeElement.contains(active)) return null;\n const id = (active.closest('[data-tree-id]') as HTMLElement | null)?.dataset['treeId'];\n if (id === undefined) return null;\n return { id, index: this.visibleNodes().findIndex(fn => fn.node.id === id) };\n }\n\n /**\n * The kit's mutation rule (`svSuccessorIndex`): when a new `nodes` set drops\n * the focused row, focus the row now at its index, else the one before it,\n * else the tree itself — never `<body>`. Runs after the render, the only\n * point at which the successor row exists.\n */\n private _recoverAfterNodesChange(was: { readonly id: string; readonly index: number }): void {\n setTimeout(() => {\n const list = this.visibleNodes();\n if (list.some(fn => fn.node.id === was.id)) return;\n const next = list[svSuccessorIndex(was.index, list.length)];\n if (next) this.setActive(next.node.id);\n const root = this.host.nativeElement;\n const successor = next ? root.querySelector<HTMLElement>(svAttrSelector('data-tree-id', next.node.id)) : null;\n // The roving tab stop moves with focus; the binding catches up on the\n // next render, and focus cannot wait for it.\n if (successor && !next?.node.disabled) successor.tabIndex = 0;\n svRecoverFocus({\n to: [successor],\n fallback: root.querySelector('[role=\"tree\"]'),\n });\n }, 0);\n }\n\n toggle(node: TreeNode): void {\n if (node.disabled) return;\n const ids = new Set(this.expandedIds());\n const collapsing = ids.has(node.id);\n if (collapsing) ids.delete(node.id);\n else ids.add(node.id);\n this.expandedIds.set(ids);\n\n // Collapsing hides every descendant, including the one that may hold focus.\n // The WAI-ARIA tree pattern puts focus on the parent that was collapsed.\n if (collapsing) this._repairFocus(node.id);\n\n if (collapsing) this.nodeCollapse.emit(node);\n else this.nodeExpand.emit(node);\n }\n\n /**\n * Put DOM focus back on a rendered row after a collapse removed the one that\n * had it, preferring `preferredId`.\n *\n * ★ Acts only when the row that actually holds focus has left the render.\n * Collapsing by clicking a chevron leaves focus on that chevron, whose row is\n * still there, and moving it would put a focus ring on screen for a mouse\n * user who never asked for one.\n */\n private _repairFocus(preferredId: string): void {\n const active = this._doc.activeElement;\n if (!active || !this.host.nativeElement.contains(active)) return;\n\n const row = (active as HTMLElement).closest('[data-tree-id]') as HTMLElement | null;\n const activeRowId = row?.dataset['treeId'] ?? null;\n if (activeRowId === null) return;\n\n const list = this.visibleNodes();\n if (list.some(fn => fn.node.id === activeRowId)) return;\n\n const target = list.some(fn => fn.node.id === preferredId)\n ? preferredId\n : this._tabStopId();\n if (target) this._focus(target);\n }\n\n /** One entry per ancestor level, for the indentation spacers. */\n depthArray(depth: number): number[] {\n return Array.from({ length: depth }, (_, i) => i);\n }\n\n select(node: TreeNode, depth: number): void {\n if (node.disabled || !this.selectable()) return;\n this.selectedId.set(node.id);\n this.nodeSelect.emit(node);\n this.nodeClick.emit({ node, depth });\n }\n\n isSelected(id: string): boolean { return this.selectedId() === id; }\n\n // ── Keyboard navigation (WAI-ARIA tree) ─────────────────────────────────────\n\n /**\n * The treeitem that holds the tab stop.\n *\n * ★★★ THE ACTIVE NODE IS NOT ALWAYS STILL RENDERED, and the `??` above could\n * not see that: it falls back when `activeId` is null, not when `activeId`\n * names a row that has gone. Collapsing a parent while a descendant was\n * active left every row at −1 — a fully populated tree that Tab could not\n * enter, and no arrow key could rescue it because arrows need focus inside\n * the tree first.\n */\n private readonly _tabStopId = computed<string | null>(() => {\n const list = this.visibleNodes();\n const active = this.activeId();\n if (active !== null && list.some(fn => fn.node.id === active)) return active;\n return list[0]?.node.id ?? null;\n });\n\n treeTabIndex(id: string): number {\n return id === this._tabStopId() ? 0 : -1;\n }\n\n setActive(id: string): void { this.activeId.set(id); }\n\n /**\n * Arrow / Home / End / Enter / Space handling per the WAI-ARIA tree pattern.\n * Arrow Up/Down move between visible rows; Right expands or steps into a\n * child; Left collapses or steps to the parent; Enter/Space selects.\n */\n onKeydown(event: KeyboardEvent, fn: FlatNode, index: number): void {\n const list = this.visibleNodes();\n switch (event.key) {\n case 'ArrowDown': event.preventDefault(); this._focusStep(list, index, +1); break;\n case 'ArrowUp': event.preventDefault(); this._focusStep(list, index, -1); break;\n case 'Home': event.preventDefault(); this._focusFrom(list, 0, +1); break;\n case 'End': event.preventDefault(); this._focusFrom(list, list.length - 1, -1); break;\n case 'PageDown':\n case 'PageUp': {\n // `X-10`: a page of rows, clamped at the ends — never wrapped. Lands on\n // the nearest enabled row in the direction of travel.\n event.preventDefault();\n const next = svCollectionTarget(event.key, list.length, index, { pageSize: 10 }) ?? index;\n const dir = event.key === 'PageDown' ? 1 : -1;\n if (list[next]?.node.disabled) this._focusFrom(list, next, dir);\n else if (list[next]) this._focus(list[next].node.id);\n break;\n }\n case 'ArrowRight':\n event.preventDefault();\n if (fn.hasChildren && !fn.isExpanded) { this.toggle(fn.node); }\n else if (fn.hasChildren && fn.isExpanded) { this._focusStep(list, index, +1); }\n break;\n case 'ArrowLeft':\n event.preventDefault();\n if (fn.hasChildren && fn.isExpanded) { this.toggle(fn.node); }\n else { this._focusParent(list, index, fn.depth); }\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n this.select(fn.node, fn.depth);\n this.setActive(fn.node.id);\n break;\n default:\n this._typeahead(event, list, index);\n return;\n }\n }\n\n /** `X-10` typeahead over visible, enabled rows — type \"re\" to reach \"Reports\". */\n private readonly _typeaheadBuffer = createTypeahead<FlatNode>({ labelOf: fn => fn.node.label });\n\n private _typeahead(event: KeyboardEvent, list: readonly FlatNode[], index: number): void {\n if (!svIsTypeaheadKey(event)) return;\n const enabled = list.filter(fn => !fn.node.disabled);\n const current = enabled.findIndex(fn => fn.node.id === list[index]?.node.id);\n const next = this._typeaheadBuffer.handle(event.key, enabled, current);\n if (next === null) return;\n event.preventDefault();\n this._focus(enabled[next].node.id);\n }\n\n /** Move focus by `dir` steps from `from`, skipping disabled rows. */\n private _focusStep(list: readonly FlatNode[], from: number, dir: 1 | -1): void {\n for (let i = from + dir; i >= 0 && i < list.length; i += dir) {\n if (!list[i].node.disabled) { this._focus(list[i].node.id); return; }\n }\n }\n\n /** From `start`, find the first enabled row in direction `dir` and focus it. */\n private _focusFrom(list: readonly FlatNode[], start: number, dir: 1 | -1): void {\n for (let i = start; i >= 0 && i < list.length; i += dir) {\n if (!list[i].node.disabled) { this._focus(list[i].node.id); return; }\n }\n }\n\n /** Focus the parent row (nearest previous row with a smaller depth). */\n private _focusParent(list: readonly FlatNode[], index: number, depth: number): void {\n for (let i = index - 1; i >= 0; i--) {\n if (list[i].depth < depth) { this._focus(list[i].node.id); return; }\n }\n }\n\n /**\n * Set the active id and move DOM focus to that row once the view has caught\n * up with the signals.\n *\n * ★★ A MICROTASK IS TOO EARLY (DD-45-I3, matching the Pro twin's `_focusRow`).\n * Change detection is itself scheduled from the same event handler, so a\n * `queueMicrotask` ran BEFORE the re-render: a row that the keystroke's own\n * state change was about to render was not in the DOM yet, and the focus\n * call found nothing, leaving the user on whatever they had before. A\n * macrotask lands after the render, the only point at which the element\n * that will keep focus is the one on screen.\n */\n private _focus(id: string): void {\n this.setActive(id);\n setTimeout(() => {\n const rows = this.host.nativeElement.querySelectorAll<HTMLElement>('[data-tree-id]');\n rows.forEach(el => { if (el.dataset['treeId'] === id) el.focus(); });\n }, 0);\n }\n\n /**\n * ★ Appends into one accumulator rather than splicing each level in with\n * `push(...children)`. A spread call passes one argument per element, so a\n * branch with more visible descendants than the engine's argument cap —\n * ~65k in JavaScriptCore, ~124k in V8 — threw `RangeError` and took the\n * render with it. A demo fixture never gets there; a real folder tree does.\n */\n private _flatten(nodes: TreeNode[], depth: number, expanded: Set<string>): FlatNode[] {\n const out: FlatNode[] = [];\n this._flattenInto(out, nodes, depth, expanded);\n return out;\n }\n\n private _flattenInto(out: FlatNode[], nodes: TreeNode[], depth: number, expanded: Set<string>): void {\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n const hasChildren = !!node.children?.length;\n const isExp = expanded.has(node.id);\n out.push({ node, depth, isLast: i === nodes.length - 1, hasChildren, isExpanded: isExp });\n if (isExp && node.children?.length) {\n this._flattenInto(out, node.children, depth + 1, expanded);\n }\n }\n }\n\n private _collectExpanded(nodes: TreeNode[], ids: Set<string>): void {\n for (const n of nodes) {\n if (n.expanded) ids.add(n.id);\n if (n.children) this._collectExpanded(n.children, ids);\n }\n }\n}\n"],"mappings":";;;;;AA6KA,IAAa,sBAAb,MAAa,oBAAmB;CAErB,QAAa,MAAkB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CASlC,aAAa,MAAe,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAEjC,YAAa,MAAe,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAUjC,YAAa,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAM9B,UAAU,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,C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;;;;;;;EA8FT,UAAA;EAAA,cAAA;GAAA;IAAA,MAAA;IAAA,MAlGS;IAAe,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAwB,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAqB,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA,CAAA,OAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAqB,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA,CAAA,QAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAoGtF,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmB,YAAA,CAAA;EArG/B,MAAA;EAAU,MAAA,CAAA;GACT,SAAS;IAAC;IAAiB;IAA0B;IAAuB;GAAqB;GACjG,UAAU;GACV,YAAY;GACZ,iBAAiB,wBAAwB;GACzC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+FX,CAAA"}
1
+ {"version":3,"file":"styloviz-tree-view.mjs","names":[],"sources":["../../../../projects/tree-view-free/src/lib/tree-view.labels.ts","../../../../projects/tree-view-free/src/lib/tree-view.component.icons.ts","../../../../projects/tree-view-free/src/lib/tree-view.component.ts","../../../../projects/tree-view-free/src/lib/tree-view.labels.en.ts","../../../../projects/tree-view-free/src/lib/tree-view.labels.de.ts","../../../../projects/tree-view-free/src/lib/tree-view.labels.fr.ts","../../../../projects/tree-view-free/src/lib/tree-view.labels.es.ts","../../../../projects/tree-view-free/src/lib/tree-view.labels.pt-BR.ts","../../../../projects/tree-view-free/src/lib/tree-view.labels.it.ts","../../../../projects/tree-view-free/src/lib/tree-view.labels.nl.ts","../../../../projects/tree-view-free/src/lib/tree-view.labels.pl.ts","../../../../projects/tree-view-free/src/lib/tree-view.labels.tr.ts","../../../../projects/tree-view-free/src/lib/tree-view.labels.ja.ts","../../../../projects/tree-view-free/src/lib/tree-view.labels.zh-CN.ts","../../../../projects/tree-view-free/src/lib/tree-view.labels.ar.ts"],"sourcesContent":["/**\n * The accessible names and visible text `sv-tree-view` renders, in English. Override any of\n * them with `provideSvLabels({ treeView: { … } })` from `@styloviz/core`.\n */\nexport interface SvTreeViewLabels {\n readonly expandNode: string;\n readonly collapseNode: string;\n readonly errorTitle: string;\n readonly emptyText: string;\n /** The `org` layout's scroll region, when `ariaLabel` does not name it. */\n readonly orgChart: string;\n}\n\nexport const SV_TREE_VIEW_LABELS: SvTreeViewLabels = {\n expandNode: 'Expand {name}',\n collapseNode: 'Collapse {name}',\n errorTitle: 'Could not load this tree',\n emptyText: 'No items to display',\n orgChart: 'Org chart',\n};\n\ndeclare module '@styloviz/core/i18n' {\n interface SvLabelRegistry {\n treeView: SvTreeViewLabels;\n }\n}\n","// GENERATED by scripts/icon-registrations.mjs from this component's template — do not edit;\n// run `npm run icons:register`.\nimport { registerSvIcons, type SvIconDef } from '@styloviz/icons';\nimport { chevronRightIcon } from '@styloviz/icons/glyph/chevron-right';\n\n/** Registers the glyphs this component draws by name (FL-B4). Call in a field initializer. */\nexport const registerTreeViewIcons = (): readonly SvIconDef[] =>\n registerSvIcons([chevronRightIcon]);\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n signal,\n untracked,\n type TemplateRef,\n} from '@angular/core';\nimport { DOCUMENT, NgTemplateOutlet } from '@angular/common';\nimport { SvIconComponent } from '@styloviz/icons';\nimport {\n createTypeahead,\n svCollectionTarget,\n svIsRtl,\n svIsTypeaheadKey,\n svWarnUnvirtualizedCeiling,\n} from '@styloviz/core/a11y';\nimport {\n SvEmptyShellComponent,\n SvErrorShellComponent,\n SvSkeletonShellComponent,\n svCutHierarchyCycles,\n warnOnDuplicateItemKeys,\n type SvDataError,\n} from '@styloviz/core/data';\nimport { svWarn } from '@styloviz/core/dev';\nimport { injectSvLabels, SvLabelPipe } from '@styloviz/core/i18n';\nimport { svRecoverFocus, svSuccessorIndex } from '@styloviz/core/overlay';\nimport { svAttrSelector } from '@styloviz/core/security';\nimport { SV_TREE_VIEW_LABELS } from './tree-view.labels';\n\nimport { registerTreeViewIcons } from './tree-view.component.icons';\ndeclare const ngDevMode: boolean | undefined;\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport interface TreeNode {\n readonly id: string;\n readonly label: string;\n readonly icon?: string;\n children?: TreeNode[];\n readonly expanded?: boolean;\n readonly disabled?: boolean;\n readonly badge?: string;\n /** Second line under the label in the `org` layout — a job title, say. Same name as on `sv-tree-view-pro`. */\n readonly role?: string;\n /** Soft chip on the box in the `org` layout. Same name as on `sv-tree-view-pro`. */\n readonly department?: string;\n}\n\n/**\n * How the tree is drawn.\n *\n * - `list` — indented rows, one under another (the default).\n * - `org` — top-down boxes: each parent centred over its children, joined by\n * orthogonal connector lines, scrolling sideways when the chart is\n * wider than its container.\n */\nexport type TreeViewLayout = 'list' | 'org';\n\nexport interface FlatNode {\n readonly node: TreeNode;\n readonly depth: number;\n readonly isLast: boolean;\n readonly hasChildren: boolean;\n readonly isExpanded: boolean;\n}\n\n/**\n * What an `iconTemplate` is stamped with, once per row of the `list` layout.\n *\n * `$implicit` is the node, so `let-node` reads it; `expanded` and `depth` are the\n * row's state — a folder glyph that opens when its branch does needs the first.\n */\nexport interface TreeIconContext {\n readonly $implicit: TreeNode;\n readonly expanded: boolean;\n readonly depth: number;\n}\n\nexport interface TreeNodeClickEvent {\n readonly node: TreeNode;\n readonly depth: number;\n}\n\n/**\n * One box of the `org` layout: a visible row, re-nested under its parent.\n *\n * `index` is the row's position in `visibleNodes()` — the flat order the\n * keyboard engine walks — and `posinset` / `setsize` its place among its\n * siblings, published as `aria-posinset` / `aria-setsize`.\n */\nexport interface TreeOrgBox {\n readonly fn: FlatNode;\n readonly index: number;\n readonly posinset: number;\n readonly setsize: number;\n readonly children: readonly TreeOrgBox[];\n}\n\n/**\n * Re-nest the visible rows for the `org` layout.\n *\n * ★ Built FROM `visibleNodes()`, never from `nodes` directly, so the org chart\n * cannot disagree with the keyboard engine about which boxes exist: a collapsed\n * branch is absent from both, and ArrowDown from a box lands on the box this\n * nesting put next. One pass, no recursion — the depth stack holds the latest\n * box seen at each level, which is the parent of anything one level deeper.\n */\nfunction nestForOrg(rows: readonly FlatNode[]): TreeOrgBox[] {\n interface Draft { fn: FlatNode; index: number; posinset: number; setsize: number; children: Draft[] }\n const roots: Draft[] = [];\n const groups: Draft[][] = [roots];\n const open: Draft[] = [];\n rows.forEach((fn, index) => {\n const box: Draft = { fn, index, posinset: 0, setsize: 0, children: [] };\n groups.push(box.children);\n const siblings = fn.depth > 0 && open[fn.depth - 1] ? open[fn.depth - 1].children : roots;\n siblings.push(box);\n box.posinset = siblings.length;\n open[fn.depth] = box;\n open.length = fn.depth + 1;\n });\n for (const group of groups) for (const box of group) box.setsize = group.length;\n return roots;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * SvTreeViewComponent (Free) — Collapsible single-select tree.\n *\n * For the full 8-variant suite (file explorer, checkbox tri-state,\n * org chart, tree table, searchable, draggable, lazy-load) upgrade to\n * `@styloviz-pro/tree-view`.\n *\n * @example\n * ```html\n * <sv-tree-view [nodes]=\"nodes\" (nodeClick)=\"onNodeClick($event)\" />\n * ```\n */\n@Component({\n imports: [NgTemplateOutlet, SvIconComponent, SvSkeletonShellComponent, SvErrorShellComponent, SvEmptyShellComponent, SvLabelPipe],\n selector: 'sv-tree-view',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (loading()) {\n <div class=\"p-2\" data-sv-state=\"loading\">\n <sv-skeleton-shell variant=\"list\" [rows]=\"5\" ariaLabel=\"Loading tree\" />\n </div>\n } @else if (error()) {\n <sv-error-shell\n [error]=\"error()\"\n [title]=\"labels.errorTitle\"\n (retry)=\"retry.emit()\"\n data-sv-state=\"error\"\n />\n } @else if (layout() === 'org') {\n @if (!visibleNodes().length) {\n <sv-empty-shell reason=\"no-data\" [title]=\"emptyText()\" data-sv-state=\"empty\" />\n } @else {\n <!--\n The org layout. A wide chart scrolls sideways inside this labelled\n region, never the page; on paper the region lets go and the whole\n chart prints. The tree inside is the SAME tree as the list layout:\n role tree, treeitem and group, one tab stop, one keyboard engine.\n -->\n <div class=\"sv-tree-view-org overflow-x-auto rounded-xl outline-none\n focus-visible:ring-2 focus-visible:ring-brandaccent-400 print:overflow-visible\"\n role=\"region\"\n tabindex=\"0\"\n data-sv-tree-layout=\"org\"\n [attr.aria-label]=\"ariaLabel().trim() || labels.orgChart\">\n <ul class=\"flex w-max min-w-full select-none items-start justify-center gap-8 p-4\"\n role=\"tree\"\n [attr.aria-label]=\"ariaLabel().trim() || null\">\n @for (box of orgBoxes(); track box.fn.node.id) {\n <ng-container [ngTemplateOutlet]=\"orgBranch\" [ngTemplateOutletContext]=\"{ $implicit: box }\" />\n }\n </ul>\n </div>\n }\n } @else {\n\n <!-- A tree must own a treeitem (axe aria-required-children, critical), so\n with no rows it is a named group around the empty shell (FL-A8-03). -->\n <div class=\"sv-tree-view select-none\" [attr.role]=\"visibleNodes().length ? 'tree' : 'group'\"\n [attr.aria-label]=\"ariaLabel().trim() || null\" data-sv-tree-root>\n @for (fn of visibleNodes(); track fn.node.id) {\n <div class=\"group flex items-center gap-1 rounded-lg px-1 outline-none transition-colors duration-100 cursor-pointer focus-visible:ring-2 focus-visible:ring-brandaccent-400\"\n [class]=\"fn.node.disabled\n ? 'opacity-40 cursor-not-allowed py-1.5'\n : isSelected(fn.node.id)\n ? 'py-1.5 bg-brandaccent-50 dark:bg-brandaccent-900/25'\n : 'py-1.5 hover:bg-gray-100/70 dark:hover:bg-gray-800/50'\"\n (click)=\"select(fn.node, fn.depth); setActive(fn.node.id)\"\n (keydown)=\"onKeydown($event, fn, $index)\"\n role=\"treeitem\"\n [attr.data-tree-id]=\"fn.node.id\"\n [attr.tabindex]=\"treeTabIndex(fn.node.id)\"\n [attr.aria-level]=\"fn.depth + 1\"\n [attr.aria-expanded]=\"fn.hasChildren ? fn.isExpanded : null\"\n [attr.aria-selected]=\"selectable() ? isSelected(fn.node.id) : null\">\n\n <!--\n Depth spacers, one per level, carrying the optional connector guide.\n Indentation used to be a paddingLeft on the row, which left\n showLines - declared, documented, default true - with nothing to\n hang a line on, so it did nothing at all. The Pro twin has rendered\n these all along; this is the same 20px-per-level geometry.\n (No backticks in here: this template is an inline JS literal.)\n -->\n @for (d of depthArray(fn.depth); track d) {\n <span class=\"relative w-5 shrink-0 self-stretch\" aria-hidden=\"true\">\n @if (showLines()) {\n <!-- sv-physical: centring — the guide line is centred in its indent cell -->\n <span class=\"absolute inset-y-0 left-1/2 w-px -translate-x-1/2\n bg-gray-200 dark:bg-gray-700/70\"></span>\n }\n </span>\n }\n\n <!-- Chevron toggle -->\n <!-- Out of the tab order (X-10): ArrowRight/ArrowLeft on the row\n expand and collapse, so a 1,500-row tree stays ONE tab stop. -->\n <button type=\"button\"\n tabindex=\"-1\"\n class=\"sv-target flex h-5 w-5 shrink-0 items-center justify-center rounded\n text-gray-400 transition-all hover:text-gray-700 dark:hover:text-gray-200\n focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-brandaccent-400\"\n [class.invisible]=\"!fn.hasChildren\"\n (click)=\"toggle(fn.node); $event.stopPropagation()\"\n [attr.aria-label]=\"(fn.isExpanded ? labels.collapseNode : labels.expandNode) | svLabel: { name: fn.node.label }\">\n <sv-icon name=\"chevron-right\"\n [cssClass]=\"'h-3.5 w-3.5 transition-transform duration-150 rtl:-scale-x-100' + (fn.isExpanded ? ' rotate-90 rtl:-rotate-90' : '')\"\n [strokeWidth]=\"2\" />\n </button>\n\n <!-- Icon: the host's template when given (a glyph per node), else the text icon. -->\n @if (iconTemplate(); as iconTpl) {\n <span class=\"flex shrink-0 items-center\" aria-hidden=\"true\" data-sv-tree-icon>\n <ng-container [ngTemplateOutlet]=\"iconTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: fn.node, expanded: fn.isExpanded, depth: fn.depth }\" />\n </span>\n } @else if (fn.node.icon) {\n <span class=\"shrink-0 text-sm\" aria-hidden=\"true\">{{ fn.node.icon }}</span>\n }\n\n <!-- Label -->\n <span class=\"flex-1 truncate text-[13px] font-medium\"\n [class]=\"isSelected(fn.node.id)\n ? 'text-brandaccent-700 dark:text-brandaccent-300'\n : 'text-gray-800 dark:text-gray-100'\">\n {{ fn.node.label }}\n </span>\n\n <!-- Badge -->\n @if (fn.node.badge) {\n <span class=\"ms-auto shrink-0 rounded-full bg-gray-100 px-1.5 py-px\n text-[10px] font-semibold text-gray-600\n dark:bg-gray-800 dark:text-gray-300\">\n {{ fn.node.badge }}\n </span>\n }\n </div>\n }\n\n @if (!visibleNodes().length) {\n <sv-empty-shell reason=\"no-data\" [title]=\"emptyText()\" data-sv-state=\"empty\" />\n }\n </div>\n }\n\n <!--\n One box of the org layout, and its subtree. The treeitem is the li, so\n its group of children sits INSIDE it as the pattern requires; its name is\n set explicitly, because a name taken from content would read out every\n descendant below it.\n\n Connectors are CSS borders on two half-width spans across the top of each\n child: the start half carries the bar from the previous sibling, the end\n half the bar to the next one plus the drop into this box. First and last\n children leave off the outer half, an only child keeps just the drop.\n Logical sides throughout, so RTL mirrors with no extra rule.\n -->\n <ng-template #orgBranch let-box>\n @let b = orgBox(box);\n <li class=\"relative flex flex-col items-center px-2 outline-none\n [&:focus-visible>.sv-org-card]:ring-2 [&:focus-visible>.sv-org-card]:ring-brandaccent-400\"\n [class.pt-6]=\"b.fn.depth > 0\"\n [class.pb-3]=\"b.fn.hasChildren && !b.fn.isExpanded\"\n role=\"treeitem\"\n [attr.data-tree-id]=\"b.fn.node.id\"\n [attr.tabindex]=\"treeTabIndex(b.fn.node.id)\"\n [attr.aria-label]=\"orgItemLabel(b.fn.node)\"\n [attr.aria-level]=\"b.fn.depth + 1\"\n [attr.aria-setsize]=\"b.setsize\"\n [attr.aria-posinset]=\"b.posinset\"\n [attr.aria-expanded]=\"b.fn.hasChildren ? b.fn.isExpanded : null\"\n [attr.aria-selected]=\"selectable() ? isSelected(b.fn.node.id) : null\"\n [attr.aria-disabled]=\"b.fn.node.disabled || null\"\n (click)=\"onOrgClick($event, b)\"\n (keydown)=\"onOrgKeydown($event, b)\">\n\n @if (b.fn.depth > 0) {\n <span class=\"pointer-events-none absolute inset-x-0 top-0 h-6\" aria-hidden=\"true\" data-sv-org-connector>\n <span class=\"absolute start-0 top-0 h-full w-1/2 border-gray-300 dark:border-gray-600\"\n [class.border-t]=\"b.posinset > 1\"\n [class.border-e]=\"b.setsize > 1 && b.posinset === b.setsize\"\n [class.rounded-se-lg]=\"b.setsize > 1 && b.posinset === b.setsize\"></span>\n <span class=\"absolute end-0 top-0 h-full w-1/2 border-gray-300 dark:border-gray-600\"\n [class.border-t]=\"b.posinset < b.setsize\"\n [class.border-s]=\"b.posinset < b.setsize || b.setsize === 1\"\n [class.rounded-ss-lg]=\"b.posinset === 1 && b.setsize > 1\"></span>\n </span>\n }\n\n <div class=\"sv-org-card relative w-52 rounded-xl border px-3 py-2.5 text-start shadow-sm\n transition-colors duration-100 print:break-inside-avoid print:shadow-none\"\n [class]=\"b.fn.node.disabled\n ? 'cursor-not-allowed border-gray-200 bg-white opacity-40 dark:border-gray-700 dark:bg-gray-900'\n : isSelected(b.fn.node.id)\n ? 'cursor-pointer border-brandaccent-400 bg-brandaccent-50 dark:border-brandaccent-500 dark:bg-brandaccent-950'\n : 'cursor-pointer border-gray-200 bg-white hover:border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:hover:border-gray-600'\"\n data-sv-org-card>\n <div class=\"flex items-center gap-2.5\">\n <span class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-brandaccent-100\n text-xs font-bold text-brandaccent-700 dark:bg-brandaccent-900/40 dark:text-brandaccent-200\"\n aria-hidden=\"true\">{{ b.fn.node.icon || orgInitials(b.fn.node.label) }}</span>\n <span class=\"flex min-w-0 flex-1 flex-col\">\n <span class=\"truncate text-[13px] font-semibold leading-tight\"\n [class]=\"isSelected(b.fn.node.id)\n ? 'text-brandaccent-700 dark:text-brandaccent-300'\n : 'text-gray-900 dark:text-gray-100'\">{{ b.fn.node.label }}</span>\n @if (b.fn.node.role) {\n <span class=\"truncate text-[11px] leading-tight text-gray-500 dark:text-gray-400\">{{ b.fn.node.role }}</span>\n }\n </span>\n </div>\n @if (b.fn.node.department || b.fn.node.badge) {\n <span class=\"mt-2 flex items-center gap-1.5\">\n @if (b.fn.node.department) {\n <span class=\"truncate rounded-md bg-gray-100 px-1.5 py-0.5 text-[10px] font-medium\n text-gray-600 dark:bg-gray-800 dark:text-gray-300\">{{ b.fn.node.department }}</span>\n }\n @if (b.fn.node.badge) {\n <span class=\"ms-auto shrink-0 rounded-full bg-gray-100 px-1.5 py-px text-[10px] font-semibold\n text-gray-600 dark:bg-gray-800 dark:text-gray-300\">{{ b.fn.node.badge }}</span>\n }\n </span>\n }\n\n <!-- Out of the tab order like the list chevron: ArrowRight and\n ArrowLeft on the box expand and collapse it. Collapsed, it says\n how many boxes are folded away under it. -->\n @if (b.fn.hasChildren) {\n <span class=\"absolute inset-x-0 -bottom-3 flex justify-center\">\n <button type=\"button\"\n tabindex=\"-1\"\n class=\"sv-target flex h-6 min-w-6 items-center justify-center gap-0.5 rounded-full border\n border-gray-300 bg-white px-1.5 text-[10px] font-semibold text-gray-600 shadow-sm\n transition-colors hover:border-brandaccent-400 hover:text-brandaccent-700\n focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brandaccent-400\n dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300\n dark:hover:border-brandaccent-400 dark:hover:text-brandaccent-300 print:hidden\"\n data-sv-org-toggle\n (click)=\"toggle(b.fn.node); setActive(b.fn.node.id); $event.stopPropagation()\"\n [attr.aria-label]=\"(b.fn.isExpanded ? labels.collapseNode : labels.expandNode) | svLabel: { name: b.fn.node.label }\">\n @if (!b.fn.isExpanded) {\n <span aria-hidden=\"true\">{{ b.fn.node.children?.length }}</span>\n }\n <sv-icon name=\"chevron-right\"\n [cssClass]=\"'h-3 w-3 transition-transform duration-150 ' + (b.fn.isExpanded ? '-rotate-90' : 'rotate-90')\"\n [strokeWidth]=\"2.5\" />\n </button>\n </span>\n }\n </div>\n\n @if (b.children.length) {\n <span class=\"h-6 w-px shrink-0 bg-gray-300 dark:bg-gray-600\" aria-hidden=\"true\" data-sv-org-stem></span>\n <ul class=\"flex items-start justify-center\" role=\"group\">\n @for (child of b.children; track child.fn.node.id) {\n <ng-container [ngTemplateOutlet]=\"orgBranch\" [ngTemplateOutletContext]=\"{ $implicit: child }\" />\n }\n </ul>\n }\n </li>\n </ng-template>\n `,\n})\nexport class SvTreeViewComponent {\n /** The glyphs this template draws by name (FL-B4). */\n protected readonly svIcons = registerTreeViewIcons();\n\n /** @internal Accessible names — English unless `provideSvLabels({ treeView })` says otherwise. */\n protected readonly labels = injectSvLabels('treeView', SV_TREE_VIEW_LABELS);\n\n /** Tree node data (nested children, optional icons). */\n readonly nodes = input<TreeNode[]>([]);\n /**\n * Enable single-row selection highlight. @default true\n *\n * ★ Also decides whether the rows claim `aria-selected` at all. A display-only\n * tree that reports `aria-selected=\"false\"` on every row announces a\n * selection model that does not exist, and a listener can only discover that\n * by pressing Enter and getting nothing.\n */\n readonly selectable = input<boolean>(true);\n /**\n * Show vertical connector guide lines in the `list` layout. The `org` layout\n * always draws its connectors — they are what make it a chart.\n * @default true\n */\n readonly showLines = input<boolean>(true);\n /**\n * How the tree is drawn: `list` (indented rows) or `org` (top-down boxes joined\n * by connector lines, each parent centred over its children). Same tree, same\n * keyboard model, same outputs — only the picture changes. `org` shows each\n * node's `role` and `department` and scrolls sideways inside a labelled region\n * when it is wider than its container.\n * @default 'list'\n */\n readonly layout = input<TreeViewLayout>('list');\n /**\n * What this tree is, e.g. `'Project files'` — names the `role=\"tree\"` region.\n *\n * ★ Two trees side by side both announce as an unnamed \"tree\" without this.\n * Left unset, no name is invented: an `aria-label` of \"Tree\" only repeats\n * the role. Matches `sv-tree-view-pro`'s input of the same name.\n *\n * @default ''\n */\n readonly ariaLabel = input<string>('');\n\n /**\n * True while the tree is being fetched. Replaces it with a placeholder.\n * @default false\n */\n readonly loading = input<boolean>(false);\n\n /**\n * Load failure. Use `toSvDataError()` from `@styloviz/core` to normalize an\n * `HttpErrorResponse`.\n * @default null\n */\n readonly error = input<SvDataError | string | null>(null);\n\n /**\n * A template for the glyph before each label in the `list` layout, drawn in\n * place of the text `icon`. Stamped with {@link TreeIconContext} — the node as\n * `$implicit`, plus `expanded` and `depth` — so a host can draw an icon-library\n * glyph per node (`sv-file-tree` draws a file-type glyph this way). Decorative:\n * the row's name is its label. The `org` layout keeps its initials avatar.\n * Same input on `sv-tree-view-pro`.\n * @default null\n */\n readonly iconTemplate = input<TemplateRef<TreeIconContext> | null>(null);\n\n /** Copy for the empty state. @default 'No items to display' */\n readonly emptyText = input<string>(this.labels.emptyText);\n\n /** Fires when an enabled node is clicked or activated with Enter/Space while `selectable`; payload is the node and its depth (0 for roots). */\n readonly nodeClick = output<TreeNodeClickEvent>();\n /** Fires with the node when an enabled parent is expanded, by its chevron or ArrowRight. */\n readonly nodeExpand = output<TreeNode>();\n /** Fires with the node when an expanded parent is collapsed, by its chevron or ArrowLeft. */\n readonly nodeCollapse = output<TreeNode>();\n /** Fires with the node when it becomes selected by click or Enter/Space; never fires while `selectable` is false. */\n readonly nodeSelect = output<TreeNode>();\n /** The host should re-run the failed load. */\n readonly retry = output<void>();\n\n /**\n * Expanded node ids. Two-way bindable, so an expansion state loaded from the\n * server — or restored from a URL — survives a reload.\n */\n readonly expandedIds = model<Set<string>>(new Set());\n /** The selected node id. Two-way bindable. */\n readonly selectedId = model<string | null>(null);\n /** The treeitem currently in the tab order (roving tabindex). */\n readonly activeId = signal<string | null>(null);\n\n private readonly _nodes = signal<TreeNode[]>([]);\n private readonly _warnedBindings = new Set<string>();\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n /** Injected, not the global: this runs during SSR, where there is no `document`. */\n private readonly _doc = inject(DOCUMENT);\n\n readonly visibleNodes = computed<FlatNode[]>(() => {\n const rows = this._flatten(this._nodes(), 0, this.expandedIds());\n // `TreeNode.id` is required by the type, but the type cannot require it to be\n // UNIQUE, and a tree is where duplicates are easiest to introduce: ids unique\n // among their own siblings collide the moment two branches are flattened into\n // one `@for`. Angular answers that with NG0955 and an empty tree.\n warnOnDuplicateItemKeys(rows, (n) => n.node.id, 'sv-tree-view [nodes]');\n return rows;\n });\n\n /** The visible rows re-nested as boxes, for the `org` layout only. */\n protected readonly orgBoxes = computed<readonly TreeOrgBox[]>(() =>\n this.layout() === 'org' ? nestForOrg(this.visibleNodes()) : [],\n );\n\n /** Applied only on the first non-empty node set — after that the user owns it. */\n private _seededFromNodes = false;\n\n constructor() {\n // `nodes` used to be read once in ngOnInit, so a host that fetched the tree\n // asynchronously and bound the result saw an empty component forever.\n effect(() => {\n // ★ Cut before anything walks it. `_flatten` and `_collectExpanded` both\n // recurse into `children` unconditionally, so a cycle in the host's data\n // — the ordinary result of building `children` from a `parentId` map —\n // recursed until the stack ended and took the tab with it.\n const incoming = svCutHierarchyCycles(this.nodes(), 'sv-tree-view').nodes as TreeNode[];\n // `X-12`: the host may delete the node that holds focus. Note where it\n // was BEFORE the new set renders, so focus can go to its successor.\n const focusedRow = untracked(() => this._focusedRowSnapshot());\n this._nodes.set(incoming);\n if (focusedRow) this._recoverAfterNodesChange(focusedRow);\n if (this._seededFromNodes || incoming.length === 0) return;\n this._seededFromNodes = true;\n const ids = new Set<string>();\n this._collectExpanded(incoming, ids);\n // `node.expanded` seeds this only when nobody else has: `expandedIds` is a\n // `model`, so a host may have bound a restored view, and the flags must not\n // win on first render only to lose on the next write.\n if (ids.size && untracked(this.expandedIds).size === 0) {\n this.expandedIds.set(ids);\n }\n // Seed the roving tabindex on the first node so the tree is tab-reachable.\n // ★ UNREACHABLE BRANCH — the `?? null` right operand can never be taken.\n // The guard four lines up already returned for `incoming.length === 0`,\n // `_nodes` was set to `incoming` synchronously above, and `_flatten` of a\n // non-empty list always yields at least one row — so `[0]` is defined and\n // the `?.` never short-circuits. Kept because the expression is what\n // makes the `activeId` type honest; counted as unreachable, not uncovered.\n this.activeId.set(this.visibleNodes()[0]?.node.id ?? null);\n });\n\n // `X-10`: a tree renders every visible row. Past the documented ceiling,\n // say so once in dev mode.\n effect(() => svWarnUnvirtualizedCeiling('sv-tree-view', this.visibleNodes().length, false));\n\n effect(() => this._warnIgnoredBindings());\n }\n\n /** Dev-mode only, once per instance: bindings the tree cannot act on. */\n private _warnIgnoredBindings(): void {\n if (typeof ngDevMode === 'undefined' || !ngDevMode) return;\n // An unnamed tree: two of them side by side both announce as \"tree\", and a\n // listener cannot tell the folder pane from the permissions pane.\n if (\n !this.ariaLabel().trim() &&\n !this.host.nativeElement.hasAttribute('aria-labelledby') &&\n !this._warnedBindings.has('no-name')\n ) {\n this._warnedBindings.add('no-name');\n svWarn(\n '[styloviz] sv-tree-view: the tree has no accessible name — [ariaLabel] is ' +\n 'empty and the host has no aria-labelledby, so a screen reader announces only ' +\n '\"tree\". Pass [ariaLabel]=\"\\'Project files\\'\" (or similar).',\n );\n }\n }\n\n // ── Focus after the host mutates `nodes` (X-12) ─────────────────────────────\n\n /** The row holding DOM focus, and its index among the visible rows — or null. */\n private _focusedRowSnapshot(): { readonly id: string; readonly index: number } | null {\n const active = this._doc.activeElement as HTMLElement | null;\n if (!active || !this.host.nativeElement.contains(active)) return null;\n const id = (active.closest('[data-tree-id]') as HTMLElement | null)?.dataset['treeId'];\n if (id === undefined) return null;\n return { id, index: this.visibleNodes().findIndex(fn => fn.node.id === id) };\n }\n\n /**\n * The kit's mutation rule (`svSuccessorIndex`): when a new `nodes` set drops\n * the focused row, focus the row now at its index, else the one before it,\n * else the tree itself — never `<body>`. Runs after the render, the only\n * point at which the successor row exists.\n */\n private _recoverAfterNodesChange(was: { readonly id: string; readonly index: number }): void {\n setTimeout(() => {\n const list = this.visibleNodes();\n if (list.some(fn => fn.node.id === was.id)) return;\n const next = list[svSuccessorIndex(was.index, list.length)];\n if (next) this.setActive(next.node.id);\n const root = this.host.nativeElement;\n const successor = next ? root.querySelector<HTMLElement>(svAttrSelector('data-tree-id', next.node.id)) : null;\n // The roving tab stop moves with focus; the binding catches up on the\n // next render, and focus cannot wait for it.\n if (successor && !next?.node.disabled) successor.tabIndex = 0;\n svRecoverFocus({\n to: [successor],\n // By hook, not role: an emptied list is a `group`, not a `tree`.\n fallback: root.querySelector('[data-sv-tree-root], [role=\"tree\"]'),\n });\n }, 0);\n }\n\n toggle(node: TreeNode): void {\n if (node.disabled) return;\n const ids = new Set(this.expandedIds());\n const collapsing = ids.has(node.id);\n if (collapsing) ids.delete(node.id);\n else ids.add(node.id);\n this.expandedIds.set(ids);\n\n // Collapsing hides every descendant, including the one that may hold focus.\n // The WAI-ARIA tree pattern puts focus on the parent that was collapsed.\n if (collapsing) this._repairFocus(node.id);\n\n if (collapsing) this.nodeCollapse.emit(node);\n else this.nodeExpand.emit(node);\n }\n\n /**\n * Put DOM focus back on a rendered row after a collapse removed the one that\n * had it, preferring `preferredId`.\n *\n * ★ Acts only when the row that actually holds focus has left the render.\n * Collapsing by clicking a chevron leaves focus on that chevron, whose row is\n * still there, and moving it would put a focus ring on screen for a mouse\n * user who never asked for one.\n */\n private _repairFocus(preferredId: string): void {\n const active = this._doc.activeElement;\n if (!active || !this.host.nativeElement.contains(active)) return;\n\n const row = (active as HTMLElement).closest('[data-tree-id]') as HTMLElement | null;\n const activeRowId = row?.dataset['treeId'] ?? null;\n if (activeRowId === null) return;\n\n const list = this.visibleNodes();\n if (list.some(fn => fn.node.id === activeRowId)) return;\n\n const target = list.some(fn => fn.node.id === preferredId)\n ? preferredId\n : this._tabStopId();\n if (target) this._focus(target);\n }\n\n // ── The org layout ──────────────────────────────────────────────────────────\n\n /** Types the recursive template's context, which Angular hands over untyped. */\n protected orgBox(box: TreeOrgBox): TreeOrgBox { return box; }\n\n /** A box's accessible name: what it shows, in reading order. */\n protected orgItemLabel(node: TreeNode): string {\n return [node.label, node.role, node.department, node.badge].filter(Boolean).join(', ');\n }\n\n /** Up to two initials for a box with no `icon`. */\n protected orgInitials(label: string): string {\n const parts = label.trim().split(/\\s+/).filter(Boolean);\n if (parts.length >= 2) return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();\n return (parts[0]?.slice(0, 2) ?? '?').toUpperCase();\n }\n\n /**\n * Keys in the `org` layout — handed straight to `onKeydown`, the list's engine.\n *\n * ★★ THE VISUAL DIRECTION DIFFERS; THE TREE MODEL DOES NOT. Children sit BELOW\n * their parent here and siblings sit side by side, but the keys keep the\n * WAI-ARIA tree meanings: ArrowDown / ArrowUp walk the visible boxes in tree\n * order (depth first), ArrowRight opens a box or steps to its first child,\n * ArrowLeft closes it or climbs to its parent, Home / End / typeahead as in\n * the list. Inventing a 2-D grid would give a screen-reader user, who hears\n * \"tree\", keys that do something other than what the role promised.\n *\n * ★ Treeitems NEST in this layout, so a key pressed on a child box bubbles\n * through every ancestor's handler. Only the box that owns the focused\n * element answers.\n */\n protected onOrgKeydown(event: KeyboardEvent, box: TreeOrgBox): void {\n if (!this._ownsOrgEvent(event)) return;\n this.onKeydown(event, box.fn, box.index);\n }\n\n /**\n * A click on a box's card selects it — the innermost box only, for the same\n * reason, and only on the card: the treeitem also spans the whitespace around\n * its subtree, and a click there is not a choice of the manager above it.\n */\n protected onOrgClick(event: MouseEvent, box: TreeOrgBox): void {\n if (!this._ownsOrgEvent(event) || !(event.target as HTMLElement).closest('[data-sv-org-card]')) return;\n this.select(box.fn.node, box.fn.depth);\n this.setActive(box.fn.node.id);\n }\n\n /** Whether the treeitem this handler sits on is the innermost one around the event's target. */\n private _ownsOrgEvent(event: Event): boolean {\n const target = event.target as HTMLElement | null;\n return target?.closest('[role=\"treeitem\"]') === event.currentTarget;\n }\n\n /** One entry per ancestor level, for the indentation spacers. */\n depthArray(depth: number): number[] {\n return Array.from({ length: depth }, (_, i) => i);\n }\n\n select(node: TreeNode, depth: number): void {\n if (node.disabled || !this.selectable()) return;\n this.selectedId.set(node.id);\n this.nodeSelect.emit(node);\n this.nodeClick.emit({ node, depth });\n }\n\n isSelected(id: string): boolean { return this.selectedId() === id; }\n\n // ── Keyboard navigation (WAI-ARIA tree) ─────────────────────────────────────\n\n /**\n * The treeitem that holds the tab stop.\n *\n * ★★★ THE ACTIVE NODE IS NOT ALWAYS STILL RENDERED, and the `??` above could\n * not see that: it falls back when `activeId` is null, not when `activeId`\n * names a row that has gone. Collapsing a parent while a descendant was\n * active left every row at −1 — a fully populated tree that Tab could not\n * enter, and no arrow key could rescue it because arrows need focus inside\n * the tree first.\n */\n private readonly _tabStopId = computed<string | null>(() => {\n const list = this.visibleNodes();\n const active = this.activeId();\n if (active !== null && list.some(fn => fn.node.id === active)) return active;\n return list[0]?.node.id ?? null;\n });\n\n treeTabIndex(id: string): number {\n return id === this._tabStopId() ? 0 : -1;\n }\n\n setActive(id: string): void { this.activeId.set(id); }\n\n /**\n * Arrow / Home / End / Enter / Space handling per the WAI-ARIA tree pattern.\n * Arrow Up/Down move between visible rows; Right expands or steps into a\n * child; Left collapses or steps to the parent; Enter/Space selects.\n */\n onKeydown(event: KeyboardEvent, fn: FlatNode, index: number): void {\n const list = this.visibleNodes();\n switch (this._inlineArrow(event.key)) {\n case 'ArrowDown': event.preventDefault(); this._focusStep(list, index, +1); break;\n case 'ArrowUp': event.preventDefault(); this._focusStep(list, index, -1); break;\n case 'Home': event.preventDefault(); this._focusFrom(list, 0, +1); break;\n case 'End': event.preventDefault(); this._focusFrom(list, list.length - 1, -1); break;\n case 'PageDown':\n case 'PageUp': {\n // `X-10`: a page of rows, clamped at the ends — never wrapped. Lands on\n // the nearest enabled row in the direction of travel.\n event.preventDefault();\n const next = svCollectionTarget(event.key, list.length, index, { pageSize: 10 }) ?? index;\n const dir = event.key === 'PageDown' ? 1 : -1;\n if (list[next]?.node.disabled) this._focusFrom(list, next, dir);\n else if (list[next]) this._focus(list[next].node.id);\n break;\n }\n case 'ArrowRight':\n event.preventDefault();\n if (fn.hasChildren && !fn.isExpanded) { this.toggle(fn.node); }\n else if (fn.hasChildren && fn.isExpanded) { this._focusStep(list, index, +1); }\n break;\n case 'ArrowLeft':\n event.preventDefault();\n if (fn.hasChildren && fn.isExpanded) { this.toggle(fn.node); }\n else { this._focusParent(list, index, fn.depth); }\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n this.select(fn.node, fn.depth);\n this.setActive(fn.node.id);\n break;\n default:\n this._typeahead(event, list, index);\n return;\n }\n }\n\n /**\n * `ArrowLeft`/`ArrowRight` as the tree reads them. Under dir=\"rtl\" the\n * indentation spacers push children to the LEFT, so the APG treeview swaps\n * the pair: ArrowLeft opens a branch, ArrowRight closes it (FL-B9).\n */\n private _inlineArrow(key: string): string {\n if ((key !== 'ArrowLeft' && key !== 'ArrowRight') || !svIsRtl(this.host.nativeElement)) return key;\n return key === 'ArrowLeft' ? 'ArrowRight' : 'ArrowLeft';\n }\n\n /** `X-10` typeahead over visible, enabled rows — type \"re\" to reach \"Reports\". */\n private readonly _typeaheadBuffer = createTypeahead<FlatNode>({ labelOf: fn => fn.node.label });\n\n private _typeahead(event: KeyboardEvent, list: readonly FlatNode[], index: number): void {\n if (!svIsTypeaheadKey(event)) return;\n const enabled = list.filter(fn => !fn.node.disabled);\n const current = enabled.findIndex(fn => fn.node.id === list[index]?.node.id);\n const next = this._typeaheadBuffer.handle(event.key, enabled, current);\n if (next === null) return;\n event.preventDefault();\n this._focus(enabled[next].node.id);\n }\n\n /** Move focus by `dir` steps from `from`, skipping disabled rows. */\n private _focusStep(list: readonly FlatNode[], from: number, dir: 1 | -1): void {\n for (let i = from + dir; i >= 0 && i < list.length; i += dir) {\n if (!list[i].node.disabled) { this._focus(list[i].node.id); return; }\n }\n }\n\n /** From `start`, find the first enabled row in direction `dir` and focus it. */\n private _focusFrom(list: readonly FlatNode[], start: number, dir: 1 | -1): void {\n for (let i = start; i >= 0 && i < list.length; i += dir) {\n if (!list[i].node.disabled) { this._focus(list[i].node.id); return; }\n }\n }\n\n /** Focus the parent row (nearest previous row with a smaller depth). */\n private _focusParent(list: readonly FlatNode[], index: number, depth: number): void {\n for (let i = index - 1; i >= 0; i--) {\n if (list[i].depth < depth) { this._focus(list[i].node.id); return; }\n }\n }\n\n /**\n * Set the active id and move DOM focus to that row once the view has caught\n * up with the signals.\n *\n * ★★ A MICROTASK IS TOO EARLY (DD-45-I3, matching the Pro twin's `_focusRow`).\n * Change detection is itself scheduled from the same event handler, so a\n * `queueMicrotask` ran BEFORE the re-render: a row that the keystroke's own\n * state change was about to render was not in the DOM yet, and the focus\n * call found nothing, leaving the user on whatever they had before. A\n * macrotask lands after the render, the only point at which the element\n * that will keep focus is the one on screen.\n */\n private _focus(id: string): void {\n this.setActive(id);\n setTimeout(() => {\n const rows = this.host.nativeElement.querySelectorAll<HTMLElement>('[data-tree-id]');\n rows.forEach(el => { if (el.dataset['treeId'] === id) el.focus(); });\n }, 0);\n }\n\n /**\n * ★ Appends into one accumulator rather than splicing each level in with\n * `push(...children)`. A spread call passes one argument per element, so a\n * branch with more visible descendants than the engine's argument cap —\n * ~65k in JavaScriptCore, ~124k in V8 — threw `RangeError` and took the\n * render with it. A demo fixture never gets there; a real folder tree does.\n */\n private _flatten(nodes: TreeNode[], depth: number, expanded: Set<string>): FlatNode[] {\n const out: FlatNode[] = [];\n this._flattenInto(out, nodes, depth, expanded);\n return out;\n }\n\n private _flattenInto(out: FlatNode[], nodes: TreeNode[], depth: number, expanded: Set<string>): void {\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n const hasChildren = !!node.children?.length;\n const isExp = expanded.has(node.id);\n out.push({ node, depth, isLast: i === nodes.length - 1, hasChildren, isExpanded: isExp });\n if (isExp && node.children?.length) {\n this._flattenInto(out, node.children, depth + 1, expanded);\n }\n }\n }\n\n private _collectExpanded(nodes: TreeNode[], ids: Set<string>): void {\n for (const n of nodes) {\n if (n.expanded) ids.add(n.id);\n if (n.children) this._collectExpanded(n.children, ids);\n }\n }\n}\n","// GENERATED by scripts/label-packs.mjs — do not edit; run `npm run labels:sync`.\nimport { SV_TREE_VIEW_LABELS, type SvTreeViewLabels } from './tree-view.labels';\n\n/** The English labels for `@styloviz/tree-view` as a pack — the defaults, for an app that switches languages at runtime. */\nexport const SV_TREE_VIEW_LABELS_EN: { readonly treeView: SvTreeViewLabels } = { treeView: SV_TREE_VIEW_LABELS };\n","// GENERATED by scripts/label-packs.mjs from i18n/packs/de/treeView.json — do not edit; run `npm run labels:sync`.\nimport type { SvTreeViewLabels } from './tree-view.labels';\n\n/**\n * German labels for `@styloviz/tree-view` — machine-translated, awaiting native review.\n * `provideSvLabels(SV_TREE_VIEW_LABELS_DE)` from `@styloviz/core`; pair it with `provideSvLocale('de')`.\n */\nexport const SV_TREE_VIEW_LABELS_DE: { readonly treeView: SvTreeViewLabels } = {\n treeView: {\n expandNode: '{name} aufklappen',\n collapseNode: '{name} zuklappen',\n errorTitle: 'Diese Baumansicht konnte nicht geladen werden',\n emptyText: 'Keine Elemente vorhanden',\n orgChart: 'Organigramm',\n },\n};\n","// GENERATED by scripts/label-packs.mjs from i18n/packs/fr/treeView.json — do not edit; run `npm run labels:sync`.\nimport type { SvTreeViewLabels } from './tree-view.labels';\n\n/**\n * French labels for `@styloviz/tree-view` — machine-translated, awaiting native review.\n * `provideSvLabels(SV_TREE_VIEW_LABELS_FR)` from `@styloviz/core`; pair it with `provideSvLocale('fr')`.\n */\nexport const SV_TREE_VIEW_LABELS_FR: { readonly treeView: SvTreeViewLabels } = {\n treeView: {\n expandNode: 'Développer {name}',\n collapseNode: 'Réduire {name}',\n errorTitle: 'Impossible de charger cette arborescence',\n emptyText: 'Aucun élément à afficher',\n orgChart: 'Organigramme',\n },\n};\n","// GENERATED by scripts/label-packs.mjs from i18n/packs/es/treeView.json — do not edit; run `npm run labels:sync`.\nimport type { SvTreeViewLabels } from './tree-view.labels';\n\n/**\n * Spanish labels for `@styloviz/tree-view` — machine-translated, awaiting native review.\n * `provideSvLabels(SV_TREE_VIEW_LABELS_ES)` from `@styloviz/core`; pair it with `provideSvLocale('es')`.\n */\nexport const SV_TREE_VIEW_LABELS_ES: { readonly treeView: SvTreeViewLabels } = {\n treeView: {\n expandNode: 'Expandir {name}',\n collapseNode: 'Contraer {name}',\n errorTitle: 'No se pudo cargar este árbol',\n emptyText: 'No hay elementos para mostrar',\n orgChart: 'Organigrama',\n },\n};\n","// GENERATED by scripts/label-packs.mjs from i18n/packs/pt-BR/treeView.json — do not edit; run `npm run labels:sync`.\nimport type { SvTreeViewLabels } from './tree-view.labels';\n\n/**\n * Brazilian Portuguese labels for `@styloviz/tree-view` — machine-translated, awaiting native review.\n * `provideSvLabels(SV_TREE_VIEW_LABELS_PT_BR)` from `@styloviz/core`; pair it with `provideSvLocale('pt-BR')`.\n */\nexport const SV_TREE_VIEW_LABELS_PT_BR: { readonly treeView: SvTreeViewLabels } = {\n treeView: {\n expandNode: 'Expandir {name}',\n collapseNode: 'Recolher {name}',\n errorTitle: 'Não foi possível carregar esta árvore',\n emptyText: 'Nenhum item para exibir',\n orgChart: 'Organograma',\n },\n};\n","// GENERATED by scripts/label-packs.mjs from i18n/packs/it/treeView.json — do not edit; run `npm run labels:sync`.\nimport type { SvTreeViewLabels } from './tree-view.labels';\n\n/**\n * Italian labels for `@styloviz/tree-view` — machine-translated, awaiting native review.\n * `provideSvLabels(SV_TREE_VIEW_LABELS_IT)` from `@styloviz/core`; pair it with `provideSvLocale('it')`.\n */\nexport const SV_TREE_VIEW_LABELS_IT: { readonly treeView: SvTreeViewLabels } = {\n treeView: {\n expandNode: 'Espandi {name}',\n collapseNode: 'Comprimi {name}',\n errorTitle: 'Impossibile caricare questo albero',\n emptyText: 'Nessun elemento da visualizzare',\n orgChart: 'Organigramma',\n },\n};\n","// GENERATED by scripts/label-packs.mjs from i18n/packs/nl/treeView.json — do not edit; run `npm run labels:sync`.\nimport type { SvTreeViewLabels } from './tree-view.labels';\n\n/**\n * Dutch labels for `@styloviz/tree-view` — machine-translated, awaiting native review.\n * `provideSvLabels(SV_TREE_VIEW_LABELS_NL)` from `@styloviz/core`; pair it with `provideSvLocale('nl')`.\n */\nexport const SV_TREE_VIEW_LABELS_NL: { readonly treeView: SvTreeViewLabels } = {\n treeView: {\n expandNode: '{name} uitvouwen',\n collapseNode: '{name} samenvouwen',\n errorTitle: 'Kan deze boom niet laden',\n emptyText: 'Geen items om weer te geven',\n orgChart: 'Organogram',\n },\n};\n","// GENERATED by scripts/label-packs.mjs from i18n/packs/pl/treeView.json — do not edit; run `npm run labels:sync`.\nimport type { SvTreeViewLabels } from './tree-view.labels';\n\n/**\n * Polish labels for `@styloviz/tree-view` — machine-translated, awaiting native review.\n * `provideSvLabels(SV_TREE_VIEW_LABELS_PL)` from `@styloviz/core`; pair it with `provideSvLocale('pl')`.\n */\nexport const SV_TREE_VIEW_LABELS_PL: { readonly treeView: SvTreeViewLabels } = {\n treeView: {\n expandNode: 'Rozwiń {name}',\n collapseNode: 'Zwiń {name}',\n errorTitle: 'Nie udało się wczytać tego drzewa',\n emptyText: 'Brak elementów do wyświetlenia',\n orgChart: 'Schemat organizacyjny',\n },\n};\n","// GENERATED by scripts/label-packs.mjs from i18n/packs/tr/treeView.json — do not edit; run `npm run labels:sync`.\nimport type { SvTreeViewLabels } from './tree-view.labels';\n\n/**\n * Turkish labels for `@styloviz/tree-view` — machine-translated, awaiting native review.\n * `provideSvLabels(SV_TREE_VIEW_LABELS_TR)` from `@styloviz/core`; pair it with `provideSvLocale('tr')`.\n */\nexport const SV_TREE_VIEW_LABELS_TR: { readonly treeView: SvTreeViewLabels } = {\n treeView: {\n expandNode: '{name} genişlet',\n collapseNode: '{name} daralt',\n errorTitle: 'Bu ağaç yüklenemedi',\n emptyText: 'Görüntülenecek öğe yok',\n orgChart: 'Organizasyon şeması',\n },\n};\n","// GENERATED by scripts/label-packs.mjs from i18n/packs/ja/treeView.json — do not edit; run `npm run labels:sync`.\nimport type { SvTreeViewLabels } from './tree-view.labels';\n\n/**\n * Japanese labels for `@styloviz/tree-view` — machine-translated, awaiting native review.\n * `provideSvLabels(SV_TREE_VIEW_LABELS_JA)` from `@styloviz/core`; pair it with `provideSvLocale('ja')`.\n */\nexport const SV_TREE_VIEW_LABELS_JA: { readonly treeView: SvTreeViewLabels } = {\n treeView: {\n expandNode: '{name} を展開',\n collapseNode: '{name} を折りたたむ',\n errorTitle: 'このツリーを読み込めませんでした',\n emptyText: '表示する項目はありません',\n orgChart: '組織図',\n },\n};\n","// GENERATED by scripts/label-packs.mjs from i18n/packs/zh-CN/treeView.json — do not edit; run `npm run labels:sync`.\nimport type { SvTreeViewLabels } from './tree-view.labels';\n\n/**\n * Simplified Chinese labels for `@styloviz/tree-view` — machine-translated, awaiting native review.\n * `provideSvLabels(SV_TREE_VIEW_LABELS_ZH_CN)` from `@styloviz/core`; pair it with `provideSvLocale('zh-CN')`.\n */\nexport const SV_TREE_VIEW_LABELS_ZH_CN: { readonly treeView: SvTreeViewLabels } = {\n treeView: {\n expandNode: '展开{name}',\n collapseNode: '折叠{name}',\n errorTitle: '无法加载此树',\n emptyText: '没有可显示的项目',\n orgChart: '组织结构图',\n },\n};\n","// GENERATED by scripts/label-packs.mjs from i18n/packs/ar/treeView.json — do not edit; run `npm run labels:sync`.\nimport type { SvTreeViewLabels } from './tree-view.labels';\n\n/**\n * Arabic labels for `@styloviz/tree-view` — machine-translated, awaiting native review.\n * `provideSvLabels(SV_TREE_VIEW_LABELS_AR)` from `@styloviz/core`; pair it with `provideSvLocale('ar')`.\n */\nexport const SV_TREE_VIEW_LABELS_AR: { readonly treeView: SvTreeViewLabels } = {\n treeView: {\n expandNode: 'توسيع {name}',\n collapseNode: 'طي {name}',\n errorTitle: 'تعذّر تحميل هذه الشجرة',\n emptyText: 'لا توجد عناصر لعرضها',\n orgChart: 'الهيكل التنظيمي',\n },\n};\n"],"mappings":";;;;;;;;;;;AAaA,MAAa,sBAAwC;CACnD,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,UAAU;AACX;ACbD,MAAa,8BACX,gBAAgB,CAAC,gBAAgB,CAAC;AC4GpC,SAAS,WAAW,MAAyB;CAE3C,MAAM,QAAiB,CAAA;CACvB,MAAM,SAAoB,CAAC,KAAK;CAChC,MAAM,OAAgB,CAAA;CACtB,KAAK,SAAS,IAAI,UAAS;EACzB,MAAM,MAAa;GAAE;GAAI;GAAO,UAAU;GAAG,SAAS;GAAG,UAAU,CAAA;EAAE;EACrE,OAAO,KAAK,IAAI,QAAQ;EACxB,MAAM,WAAW,GAAG,QAAQ,KAAK,KAAK,GAAG,QAAQ,KAAK,KAAK,GAAG,QAAQ,EAAE,CAAC,WAAW;EACpF,SAAS,KAAK,GAAG;EACjB,IAAI,WAAW,SAAS;EACxB,KAAK,GAAG,SAAS;EACjB,KAAK,SAAS,GAAG,QAAQ;CAC3B,CAAC;CACD,KAAK,MAAM,SAAS,QAAQ,KAAK,MAAM,OAAO,OAAO,IAAI,UAAU,MAAM;CACzE,OAAO;AACT;AA2QA,IAAa,sBAAb,MAAa,oBAAmB;CAEX,UAAU,sBAAqB;CAG/B,SAAS,eAAe,YAAY,mBAAmB;CAGjE,QAAa,MAAkB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CASlC,aAAa,MAAe,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAMjC,YAAa,MAAe,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CASjC,SAAa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AAkE,EAC7E,UAAU;CACR,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,UAAU;AACX,EACF;ACRD,MAAa,yBAAkE,EAC7E,UAAU;CACR,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,UAAU;AACX,EACF;ACRD,MAAa,yBAAkE,EAC7E,UAAU;CACR,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,UAAU;AACX,EACF;ACRD,MAAa,yBAAkE,EAC7E,UAAU;CACR,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,UAAU;AACX,EACF;ACRD,MAAa,yBAAkE,EAC7E,UAAU;CACR,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,UAAU;AACX,EACF;ACRD,MAAa,4BAAqE,EAChF,UAAU;CACR,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,UAAU;AACX,EACF;ACRD,MAAa,yBAAkE,EAC7E,UAAU;CACR,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,WAAW;CACX,UAAU;AACX,EACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@styloviz/tree-view",
3
- "version": "1.0.2",
4
- "description": "8 premium variants: collapsible tree, file explorer, tri-state checkboxes, org chart, tree table, searchable, drag & drop reordering and lazy load. Lazy loading, the tree-table columns and drag & drop reordering are Pro (`sv-tree-view-pro`); the free component renders the nodes you give it.",
3
+ "version": "2.0.0",
4
+ "description": "8 variants: collapsible tree, file explorer, tri-state checkboxes, org chart, tree table, searchable, drag & drop reordering and lazy load. Lazy loading, the tree-table columns and drag & drop reordering are Pro (`sv-tree-view-pro`); the free component renders the nodes you give it.",
5
5
  "keywords": [
6
6
  "angular",
7
7
  "tailwind",
@@ -25,8 +25,8 @@
25
25
  "peerDependencies": {
26
26
  "@angular/common": ">=21.0.0 <23.0.0",
27
27
  "@angular/core": ">=21.0.0 <23.0.0",
28
- "@styloviz/core": "^1.0.2",
29
- "@styloviz/icons": "^1.0.2"
28
+ "@styloviz/core": "^2.0.0",
29
+ "@styloviz/icons": "^2.0.0"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"
@@ -35,6 +35,123 @@
35
35
  "node": "^20.19.0 || ^22.12.0 || >=24.0.0"
36
36
  },
37
37
  "sideEffects": false,
38
+ "ng-update": {
39
+ "migrations": "./schematics/migration.json",
40
+ "packageGroup": [
41
+ "@styloviz-pro/a2ui",
42
+ "@styloviz-pro/accordion",
43
+ "@styloviz-pro/agent-approval",
44
+ "@styloviz-pro/agent-task-queue",
45
+ "@styloviz-pro/ai-agent-activity-log",
46
+ "@styloviz-pro/ai-chat",
47
+ "@styloviz-pro/ai-chat-transport",
48
+ "@styloviz-pro/ai-model-selector",
49
+ "@styloviz-pro/ai-privacy-inspector",
50
+ "@styloviz-pro/ai-token-dashboard",
51
+ "@styloviz-pro/ai-workflow-builder",
52
+ "@styloviz-pro/ai-writing-assistant",
53
+ "@styloviz-pro/all",
54
+ "@styloviz-pro/artifact-panel",
55
+ "@styloviz-pro/avatar",
56
+ "@styloviz-pro/charts",
57
+ "@styloviz-pro/command-palette",
58
+ "@styloviz-pro/commerce",
59
+ "@styloviz-pro/data-table",
60
+ "@styloviz-pro/display",
61
+ "@styloviz-pro/embedding-map",
62
+ "@styloviz-pro/eval-scorecard",
63
+ "@styloviz-pro/export",
64
+ "@styloviz-pro/file-upload",
65
+ "@styloviz-pro/forms",
66
+ "@styloviz-pro/gantt",
67
+ "@styloviz-pro/guardrail-panel",
68
+ "@styloviz-pro/icons",
69
+ "@styloviz-pro/image-editor",
70
+ "@styloviz-pro/input-field",
71
+ "@styloviz-pro/kanban",
72
+ "@styloviz-pro/layout",
73
+ "@styloviz-pro/list-view",
74
+ "@styloviz-pro/mcp-tool-registry",
75
+ "@styloviz-pro/mega-menu",
76
+ "@styloviz-pro/notification-center",
77
+ "@styloviz-pro/overlays",
78
+ "@styloviz-pro/pivot-table",
79
+ "@styloviz-pro/product-tour",
80
+ "@styloviz-pro/prompt-template-library",
81
+ "@styloviz-pro/query-builder",
82
+ "@styloviz-pro/rag-knowledge-base",
83
+ "@styloviz-pro/reasoning-trace",
84
+ "@styloviz-pro/rich-editor",
85
+ "@styloviz-pro/scheduler",
86
+ "@styloviz-pro/search-bar",
87
+ "@styloviz-pro/select-dropdown",
88
+ "@styloviz-pro/sentiment-analysis-widget",
89
+ "@styloviz-pro/split-button",
90
+ "@styloviz-pro/stat-card",
91
+ "@styloviz-pro/stepper",
92
+ "@styloviz-pro/tag-input",
93
+ "@styloviz-pro/timeline",
94
+ "@styloviz-pro/tool-call-card",
95
+ "@styloviz-pro/tree-view",
96
+ "@styloviz-pro/voice-assistant",
97
+ "@styloviz/accordion",
98
+ "@styloviz/affix",
99
+ "@styloviz/ai",
100
+ "@styloviz/ai-insight-cards",
101
+ "@styloviz/alert-banner",
102
+ "@styloviz/all",
103
+ "@styloviz/anchor",
104
+ "@styloviz/avatar",
105
+ "@styloviz/back-up",
106
+ "@styloviz/badge",
107
+ "@styloviz/barcode-1d",
108
+ "@styloviz/breadcrumb",
109
+ "@styloviz/button",
110
+ "@styloviz/charts",
111
+ "@styloviz/citation-sources",
112
+ "@styloviz/code-block",
113
+ "@styloviz/commerce",
114
+ "@styloviz/cookie-consent",
115
+ "@styloviz/core",
116
+ "@styloviz/data",
117
+ "@styloviz/data-table",
118
+ "@styloviz/display",
119
+ "@styloviz/empty-state",
120
+ "@styloviz/file-upload",
121
+ "@styloviz/forms",
122
+ "@styloviz/icons",
123
+ "@styloviz/image-compare",
124
+ "@styloviz/input-field",
125
+ "@styloviz/jump-menu",
126
+ "@styloviz/kbd",
127
+ "@styloviz/layout",
128
+ "@styloviz/list-view",
129
+ "@styloviz/modal",
130
+ "@styloviz/notification-center",
131
+ "@styloviz/overlays",
132
+ "@styloviz/pagination",
133
+ "@styloviz/password-strength",
134
+ "@styloviz/phone-input",
135
+ "@styloviz/pro",
136
+ "@styloviz/product-tour",
137
+ "@styloviz/scroll-area",
138
+ "@styloviz/search-bar",
139
+ "@styloviz/select-dropdown",
140
+ "@styloviz/sidebar-nav",
141
+ "@styloviz/skeleton-loader",
142
+ "@styloviz/sparkline",
143
+ "@styloviz/stat-card",
144
+ "@styloviz/stepper",
145
+ "@styloviz/streaming-markdown",
146
+ "@styloviz/tabs",
147
+ "@styloviz/tag-input",
148
+ "@styloviz/timeline",
149
+ "@styloviz/toast",
150
+ "@styloviz/toggle-switch",
151
+ "@styloviz/tree-view",
152
+ "@styloviz/watermark"
153
+ ]
154
+ },
38
155
  "module": "fesm2022/styloviz-tree-view.mjs",
39
156
  "typings": "types/styloviz-tree-view.d.ts",
40
157
  "exports": {
@@ -0,0 +1,3 @@
1
+ {
2
+ "schematics": {}
3
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "type": "commonjs",
3
+ "version": "2.0.0"
4
+ }