Reference
Differences from @pierre/trees
What changed in the SolidJS 2 port, and what did not.
solid-trees vendors upstream’s model layer (path store, controller, focus,
selection, search, rename, drag and drop, Git status). The view is a native
Solid 2 rewrite of upstream’s Preact FileTreeView, rendered into the light
DOM, with upstream’s visual styles shipped as an importable stylesheet.
Runtimes
- One runtime:
createFileTree(...)plus<FileTree>. There is no React wrapper, vanillaFileTreeclass,render(...), orhydrate(...). - No SSR or hydration: no
preloadFileTree(...),@pierre/trees/ssrentry, orpreloadedDataprop. The tree renders on the client.
DOM and styling
- No shadow DOM, custom element, or
unsafeCSS; use page CSS. - The DOM keeps upstream’s data attributes (
data-type="item",data-item-path,data-item-selected,data-item-focused,data-item-git-status,data-item-section,data-file-tree-sticky-row, …) and name markup (MiddleTruncate/Truncate), so upstream CSS ports over. themeToTreeStylesreturns CSS property names (background-color), not React’s camelCase.- The scrollbar gutter (
--trees-scrollbar-gutter-measured) is measured once per document, not per tree.
Composition
- Header and context-menu content are Solid JSX (
header,renderContextMenuprops);composition.contextMenukeeps the behavior flags (enabled,triggerMode,buttonVisibility) andonOpen/onClose.
Icons
- Each tree prefixes the symbol ids of its sprite sheet (built-in set plus
icons.spriteSheet) so several trees in one document never resolve each other’s icons; names a sheet does not define resolve document-wide.