rspress-plugin-file-tree 1.0.3 → 1.0.5

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.
@@ -51,12 +51,8 @@
51
51
  }
52
52
 
53
53
  .iconWrapper-SwAXs4 {
54
- flex-shrink: 0;
55
- justify-content: center;
56
- align-items: center;
57
54
  width: 16px;
58
55
  height: 16px;
59
- display: inline-flex;
60
56
  }
61
57
 
62
58
  .name-ItNtUc {
@@ -436,7 +436,7 @@ const RemoteSvgIcon = ({ content, className })=>{
436
436
  content
437
437
  ]);
438
438
  if (!svgContent) return null;
439
- return /*#__PURE__*/ jsx("span", {
439
+ return /*#__PURE__*/ jsx("div", {
440
440
  className: className,
441
441
  dangerouslySetInnerHTML: {
442
442
  __html: svgContent
@@ -487,12 +487,9 @@ const FileTreeItem = ({ node, depth })=>{
487
487
  })
488
488
  })
489
489
  }),
490
- /*#__PURE__*/ jsx("div", {
491
- className: FileTreeItem_module.iconWrapper,
492
- children: /*#__PURE__*/ jsx(RemoteSvgIcon, {
493
- content: icon.content,
494
- className: FileTreeItem_module.iconWrapper
495
- })
490
+ /*#__PURE__*/ jsx(RemoteSvgIcon, {
491
+ content: icon.content,
492
+ className: FileTreeItem_module.iconWrapper
496
493
  }),
497
494
  /*#__PURE__*/ jsx("span", {
498
495
  className: FileTreeItem_module.name,
package/dist/index.js CHANGED
@@ -139,7 +139,7 @@ function isDirectoryName(name) {
139
139
  const lastPart = name.split('/').pop() || name;
140
140
  if (/^\.{2,}$/.test(lastPart)) return false;
141
141
  if (lastPart.startsWith('.')) return false;
142
- if (/\.[a-zA-Z0-9]+$/.test(lastPart)) return false;
142
+ if (/\.[a-zA-Z0-9_-]+$/.test(lastPart)) return false;
143
143
  return true;
144
144
  }
145
145
  function getExtension(name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rspress-plugin-file-tree",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Rspress plugin that add support for file tree component.",
5
5
  "files": [
6
6
  "dist"