arxatec-ui 0.1.71 → 0.1.72

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.
Files changed (203) hide show
  1. package/README.md +277 -9
  2. package/dist/arxatec-ui.css +1 -1
  3. package/dist/components/autosave_field_status/index.d.ts +5 -0
  4. package/dist/components/autosave_field_status/index.js +12 -0
  5. package/dist/components/autosave_field_status/index.js.map +1 -0
  6. package/dist/components/autosave_status/constants/index.d.ts +1 -0
  7. package/dist/components/autosave_status/constants/index.js +6 -0
  8. package/dist/components/autosave_status/constants/index.js.map +1 -0
  9. package/dist/components/autosave_status/index.d.ts +9 -0
  10. package/dist/components/autosave_status/index.js +46 -0
  11. package/dist/components/autosave_status/index.js.map +1 -0
  12. package/dist/components/autosave_status/types/index.d.ts +2 -0
  13. package/dist/components/editable_fields/context/index.d.ts +31 -0
  14. package/dist/components/editable_fields/context/index.js +30 -0
  15. package/dist/components/editable_fields/context/index.js.map +1 -0
  16. package/dist/components/editable_fields/hooks/index.d.ts +1 -0
  17. package/dist/components/editable_fields/hooks/index.js +8 -0
  18. package/dist/components/editable_fields/hooks/index.js.map +1 -0
  19. package/dist/components/editable_fields/index.d.ts +3 -0
  20. package/dist/components/editable_fields/index.js +32 -0
  21. package/dist/components/editable_fields/index.js.map +1 -0
  22. package/dist/components/emoji_picker/components/emoji_picker_content/index.d.ts +3 -1
  23. package/dist/components/emoji_picker/components/emoji_picker_content/index.js +3 -3
  24. package/dist/components/emoji_picker/components/emoji_picker_content/index.js.map +1 -1
  25. package/dist/components/emoji_picker/components/emoji_picker_footer/index.d.ts +3 -1
  26. package/dist/components/emoji_picker/components/emoji_picker_footer/index.js +3 -3
  27. package/dist/components/emoji_picker/components/emoji_picker_footer/index.js.map +1 -1
  28. package/dist/components/file_explorer/constants/index.d.ts +1 -0
  29. package/dist/components/file_explorer/constants/index.js +6 -0
  30. package/dist/components/file_explorer/constants/index.js.map +1 -0
  31. package/dist/components/file_explorer/explorer_breadcrumb/index.d.ts +9 -0
  32. package/dist/components/file_explorer/explorer_breadcrumb/index.js +21 -0
  33. package/dist/components/file_explorer/explorer_breadcrumb/index.js.map +1 -0
  34. package/dist/components/file_explorer/explorer_empty_state/index.d.ts +9 -0
  35. package/dist/components/file_explorer/explorer_empty_state/index.js +32 -0
  36. package/dist/components/file_explorer/explorer_empty_state/index.js.map +1 -0
  37. package/dist/components/file_explorer/explorer_error_state/index.d.ts +6 -0
  38. package/dist/components/file_explorer/explorer_error_state/index.js +18 -0
  39. package/dist/components/file_explorer/explorer_error_state/index.js.map +1 -0
  40. package/dist/components/file_explorer/explorer_grid/index.d.ts +10 -0
  41. package/dist/components/file_explorer/explorer_grid/index.js +21 -0
  42. package/dist/components/file_explorer/explorer_grid/index.js.map +1 -0
  43. package/dist/components/file_explorer/explorer_grid_card/index.d.ts +25 -0
  44. package/dist/components/file_explorer/explorer_grid_card/index.js +79 -0
  45. package/dist/components/file_explorer/explorer_grid_card/index.js.map +1 -0
  46. package/dist/components/file_explorer/explorer_loading_state/index.d.ts +4 -0
  47. package/dist/components/file_explorer/explorer_loading_state/index.js +9 -0
  48. package/dist/components/file_explorer/explorer_loading_state/index.js.map +1 -0
  49. package/dist/components/file_explorer/explorer_name_cell/index.d.ts +12 -0
  50. package/dist/components/file_explorer/explorer_name_cell/index.js +32 -0
  51. package/dist/components/file_explorer/explorer_name_cell/index.js.map +1 -0
  52. package/dist/components/file_explorer/explorer_panel/index.d.ts +11 -0
  53. package/dist/components/file_explorer/explorer_panel/index.js +17 -0
  54. package/dist/components/file_explorer/explorer_panel/index.js.map +1 -0
  55. package/dist/components/file_explorer/explorer_row/index.d.ts +18 -0
  56. package/dist/components/file_explorer/explorer_row/index.js +39 -0
  57. package/dist/components/file_explorer/explorer_row/index.js.map +1 -0
  58. package/dist/components/file_explorer/explorer_table/index.d.ts +20 -0
  59. package/dist/components/file_explorer/explorer_table/index.js +63 -0
  60. package/dist/components/file_explorer/explorer_table/index.js.map +1 -0
  61. package/dist/components/file_explorer/index.d.ts +26 -0
  62. package/dist/components/file_explorer/item_actions/index.d.ts +3 -0
  63. package/dist/components/file_explorer/item_actions/item_actions_context_content/index.d.ts +5 -0
  64. package/dist/components/file_explorer/item_actions/item_actions_context_content/index.js +21 -0
  65. package/dist/components/file_explorer/item_actions/item_actions_context_content/index.js.map +1 -0
  66. package/dist/components/file_explorer/item_actions/item_actions_dropdown/index.d.ts +7 -0
  67. package/dist/components/file_explorer/item_actions/item_actions_dropdown/index.js +38 -0
  68. package/dist/components/file_explorer/item_actions/item_actions_dropdown/index.js.map +1 -0
  69. package/dist/components/file_explorer/item_actions/types/index.d.ts +9 -0
  70. package/dist/components/file_explorer/item_actions/utils/index.d.ts +2 -0
  71. package/dist/components/file_explorer/item_actions/utils/index.js +6 -0
  72. package/dist/components/file_explorer/item_actions/utils/index.js.map +1 -0
  73. package/dist/components/file_explorer/shared/utils/index.d.ts +2 -0
  74. package/dist/components/file_explorer/shared/utils/index.js +8 -0
  75. package/dist/components/file_explorer/shared/utils/index.js.map +1 -0
  76. package/dist/components/file_explorer/types/index.d.ts +1 -0
  77. package/dist/components/file_thumbnail/index.d.ts +12 -0
  78. package/dist/components/file_thumbnail/index.js +35 -0
  79. package/dist/components/file_thumbnail/index.js.map +1 -0
  80. package/dist/components/file_type_icon/file_kind/index.d.ts +13 -0
  81. package/dist/components/file_type_icon/file_kind/index.js +178 -0
  82. package/dist/components/file_type_icon/file_kind/index.js.map +1 -0
  83. package/dist/components/file_type_icon/file_kind/mime_extensions.d.ts +2 -0
  84. package/dist/components/file_type_icon/file_kind/mime_extensions.js +54 -0
  85. package/dist/components/file_type_icon/file_kind/mime_extensions.js.map +1 -0
  86. package/dist/components/file_type_icon/file_type_icon.d.ts +6 -0
  87. package/dist/components/file_type_icon/file_type_icon.js +67 -0
  88. package/dist/components/file_type_icon/file_type_icon.js.map +1 -0
  89. package/dist/components/file_type_icon/index.d.ts +4 -0
  90. package/dist/components/folder_icon/constants/index.d.ts +11 -0
  91. package/dist/components/folder_icon/constants/index.js +41 -0
  92. package/dist/components/folder_icon/constants/index.js.map +1 -0
  93. package/dist/components/folder_icon/index.d.ts +8 -0
  94. package/dist/components/folder_icon/index.js +31 -0
  95. package/dist/components/folder_icon/index.js.map +1 -0
  96. package/dist/components/hex_color_picker/hex_color_picker_content/index.d.ts +12 -0
  97. package/dist/components/hex_color_picker/hex_color_picker_content/index.js +42 -0
  98. package/dist/components/hex_color_picker/hex_color_picker_content/index.js.map +1 -0
  99. package/dist/components/hex_color_picker/hex_color_picker_popover/index.d.ts +11 -0
  100. package/dist/components/hex_color_picker/hex_color_picker_popover/index.js +35 -0
  101. package/dist/components/hex_color_picker/hex_color_picker_popover/index.js.map +1 -0
  102. package/dist/components/hex_color_picker/index.d.ts +2 -0
  103. package/dist/components/hex_color_picker/utils/index.d.ts +3 -0
  104. package/dist/components/hex_color_picker/utils/index.js +35 -0
  105. package/dist/components/hex_color_picker/utils/index.js.map +1 -0
  106. package/dist/components/icon_emoji_picker/icon_emoji/index.d.ts +5 -0
  107. package/dist/components/icon_emoji_picker/icon_emoji/index.js +19 -0
  108. package/dist/components/icon_emoji_picker/icon_emoji/index.js.map +1 -0
  109. package/dist/components/icon_emoji_picker/icon_emoji_picker/index.d.ts +23 -0
  110. package/dist/components/icon_emoji_picker/icon_emoji_picker/index.js +91 -0
  111. package/dist/components/icon_emoji_picker/icon_emoji_picker/index.js.map +1 -0
  112. package/dist/components/icon_emoji_picker/icon_grid/constants/index.d.ts +3 -0
  113. package/dist/components/icon_emoji_picker/icon_grid/constants/index.js +6 -0
  114. package/dist/components/icon_emoji_picker/icon_grid/constants/index.js.map +1 -0
  115. package/dist/components/icon_emoji_picker/icon_grid/hooks/index.d.ts +1 -0
  116. package/dist/components/icon_emoji_picker/icon_grid/hooks/use_icon_pagination/index.d.ts +7 -0
  117. package/dist/components/icon_emoji_picker/icon_grid/hooks/use_icon_pagination/index.js +35 -0
  118. package/dist/components/icon_emoji_picker/icon_grid/hooks/use_icon_pagination/index.js.map +1 -0
  119. package/dist/components/icon_emoji_picker/icon_grid/index.d.ts +8 -0
  120. package/dist/components/icon_emoji_picker/icon_grid/index.js +49 -0
  121. package/dist/components/icon_emoji_picker/icon_grid/index.js.map +1 -0
  122. package/dist/components/icon_emoji_picker/index.d.ts +3 -0
  123. package/dist/components/icon_emoji_picker/utils/index.d.ts +1 -0
  124. package/dist/components/icon_emoji_picker/utils/index.js +6 -0
  125. package/dist/components/icon_emoji_picker/utils/index.js.map +1 -0
  126. package/dist/components/icons/components/google_calendar_isotype/index.d.ts +2 -0
  127. package/dist/components/icons/components/google_calendar_isotype/index.js +414 -0
  128. package/dist/components/icons/components/google_calendar_isotype/index.js.map +1 -0
  129. package/dist/components/icons/components/google_drive_isotype/index.d.ts +2 -0
  130. package/dist/components/icons/components/google_drive_isotype/index.js +103 -0
  131. package/dist/components/icons/components/google_drive_isotype/index.js.map +1 -0
  132. package/dist/components/icons/components/index.d.ts +4 -0
  133. package/dist/components/icons/components/onedrive_isotype/index.d.ts +2 -0
  134. package/dist/components/icons/components/onedrive_isotype/index.js +246 -0
  135. package/dist/components/icons/components/onedrive_isotype/index.js.map +1 -0
  136. package/dist/components/icons/components/outlook_calendar_isotype/index.d.ts +2 -0
  137. package/dist/components/icons/components/outlook_calendar_isotype/index.js +378 -0
  138. package/dist/components/icons/components/outlook_calendar_isotype/index.js.map +1 -0
  139. package/dist/components/inline_date_field/index.d.ts +11 -0
  140. package/dist/components/inline_date_field/index.js +52 -0
  141. package/dist/components/inline_date_field/index.js.map +1 -0
  142. package/dist/components/inline_duration_field/components/duration_column/index.d.ts +8 -0
  143. package/dist/components/inline_duration_field/components/duration_column/index.js +47 -0
  144. package/dist/components/inline_duration_field/components/duration_column/index.js.map +1 -0
  145. package/dist/components/inline_duration_field/constants/index.d.ts +4 -0
  146. package/dist/components/inline_duration_field/constants/index.js +12 -0
  147. package/dist/components/inline_duration_field/constants/index.js.map +1 -0
  148. package/dist/components/inline_duration_field/index.d.ts +9 -0
  149. package/dist/components/inline_duration_field/index.js +89 -0
  150. package/dist/components/inline_duration_field/index.js.map +1 -0
  151. package/dist/components/inline_duration_field/utils/index.d.ts +11 -0
  152. package/dist/components/inline_duration_field/utils/index.js +21 -0
  153. package/dist/components/inline_duration_field/utils/index.js.map +1 -0
  154. package/dist/components/inline_editable_text/constants/index.d.ts +2 -0
  155. package/dist/components/inline_editable_text/constants/index.js +7 -0
  156. package/dist/components/inline_editable_text/constants/index.js.map +1 -0
  157. package/dist/components/inline_editable_text/index.d.ts +16 -0
  158. package/dist/components/inline_editable_text/index.js +109 -0
  159. package/dist/components/inline_editable_text/index.js.map +1 -0
  160. package/dist/components/inline_field_trigger/index.d.ts +3 -0
  161. package/dist/components/inline_field_trigger/index.js +16 -0
  162. package/dist/components/inline_field_trigger/index.js.map +1 -0
  163. package/dist/components/inline_markdown_field/index.d.ts +14 -0
  164. package/dist/components/inline_markdown_field/index.js +70 -0
  165. package/dist/components/inline_markdown_field/index.js.map +1 -0
  166. package/dist/components/inline_option_field/index.d.ts +19 -0
  167. package/dist/components/inline_option_field/index.js +56 -0
  168. package/dist/components/inline_option_field/index.js.map +1 -0
  169. package/dist/components/offline_banner/index.d.ts +12 -0
  170. package/dist/components/offline_banner/index.js +76 -0
  171. package/dist/components/offline_banner/index.js.map +1 -0
  172. package/dist/components/property_row/index.d.ts +10 -0
  173. package/dist/components/property_row/index.js +46 -0
  174. package/dist/components/property_row/index.js.map +1 -0
  175. package/dist/components/select_table_header/index.d.ts +13 -0
  176. package/dist/components/select_table_header/index.js +17 -0
  177. package/dist/components/select_table_header/index.js.map +1 -0
  178. package/dist/components/shiny_text/index.d.ts +7 -0
  179. package/dist/components/shiny_text/index.js +22 -0
  180. package/dist/components/shiny_text/index.js.map +1 -0
  181. package/dist/components/table_date_field/index.d.ts +8 -0
  182. package/dist/components/table_date_field/index.js +67 -0
  183. package/dist/components/table_date_field/index.js.map +1 -0
  184. package/dist/components/table_option_field/index.d.ts +13 -0
  185. package/dist/components/table_option_field/index.js +73 -0
  186. package/dist/components/table_option_field/index.js.map +1 -0
  187. package/dist/editable-fields.js +19 -0
  188. package/dist/exports/editable-fields.d.ts +19 -0
  189. package/dist/exports/icon-emoji-picker.d.ts +1 -0
  190. package/dist/exports/offline-banner.d.ts +1 -0
  191. package/dist/exports/provider-icons.d.ts +4 -0
  192. package/dist/exports/shiny-text.d.ts +1 -0
  193. package/dist/icon-emoji-picker.js +4 -0
  194. package/dist/index.d.ts +8 -0
  195. package/dist/index.js +85 -40
  196. package/dist/offline-banner.js +2 -0
  197. package/dist/provider-icons.js +5 -0
  198. package/dist/shiny-text.js +2 -0
  199. package/dist/styles.css +40 -1
  200. package/dist/utilities/colors/index.d.ts +1 -0
  201. package/dist/utilities/colors/index.js +9 -0
  202. package/dist/utilities/colors/index.js.map +1 -0
  203. package/package.json +32 -3
@@ -0,0 +1,26 @@
1
+ export { EXPLORER_GRID_CLASS } from './constants';
2
+ export type { ExplorerItemType } from './types';
3
+ export { ExplorerBreadcrumb } from './explorer_breadcrumb';
4
+ export type { ExplorerBreadcrumbProps, ExplorerBreadcrumbItem, } from './explorer_breadcrumb';
5
+ export { ExplorerEmptyState } from './explorer_empty_state';
6
+ export type { ExplorerEmptyStateProps } from './explorer_empty_state';
7
+ export { ExplorerErrorState } from './explorer_error_state';
8
+ export type { ExplorerErrorStateProps } from './explorer_error_state';
9
+ export { ExplorerGrid } from './explorer_grid';
10
+ export type { ExplorerGridProps } from './explorer_grid';
11
+ export { ExplorerGridCard } from './explorer_grid_card';
12
+ export type { ExplorerGridCardProps } from './explorer_grid_card';
13
+ export { ExplorerLoadingState } from './explorer_loading_state';
14
+ export type { ExplorerLoadingStateProps } from './explorer_loading_state';
15
+ export { ExplorerNameCell } from './explorer_name_cell';
16
+ export type { ExplorerNameCellProps } from './explorer_name_cell';
17
+ export { ExplorerPanel } from './explorer_panel';
18
+ export type { ExplorerPanelProps } from './explorer_panel';
19
+ export { ExplorerRow } from './explorer_row';
20
+ export type { ExplorerRowProps } from './explorer_row';
21
+ export { ExplorerTable } from './explorer_table';
22
+ export type { ExplorerTableProps, ExplorerColumn } from './explorer_table';
23
+ export { ItemActionsContextContent, ItemActionsDropdown } from './item_actions';
24
+ export type { ExplorerAction } from './item_actions';
25
+ export type { ItemActionsDropdownProps } from './item_actions/item_actions_dropdown';
26
+ export type { ItemActionsContextContentProps } from './item_actions/item_actions_context_content';
@@ -0,0 +1,3 @@
1
+ export { ItemActionsContextContent } from './item_actions_context_content';
2
+ export { ItemActionsDropdown } from './item_actions_dropdown';
3
+ export type { ExplorerAction } from './types';
@@ -0,0 +1,5 @@
1
+ import { ExplorerAction } from '../types';
2
+ export interface ItemActionsContextContentProps {
3
+ actions: ExplorerAction[];
4
+ }
5
+ export declare const ItemActionsContextContent: ({ actions, }: ItemActionsContextContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { ContextMenuContent as e } from "../../../context_menu/components/context_menu_content/index.js";
2
+ import { ContextMenuItem as t } from "../../../context_menu/components/context_menu_item/index.js";
3
+ import { ContextMenuSeparator as n } from "../../../context_menu/components/context_menu_separator/index.js";
4
+ import { stopEvent as r } from "../../shared/utils/index.js";
5
+ import { visibleActions as i } from "../utils/index.js";
6
+ import { Fragment as a } from "react";
7
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
+ //#region src/components/file_explorer/item_actions/item_actions_context_content/index.tsx
9
+ var c = ({ actions: c }) => /* @__PURE__ */ o(e, {
10
+ onClick: r,
11
+ onDoubleClick: r,
12
+ children: i(c).map((e) => /* @__PURE__ */ s(a, { children: [e.separatorBefore && /* @__PURE__ */ o(n, {}), /* @__PURE__ */ s(t, {
13
+ className: "gap-2",
14
+ onClick: e.onSelect,
15
+ children: [/* @__PURE__ */ o(e.icon, { className: "size-4" }), e.label]
16
+ })] }, e.key))
17
+ });
18
+ //#endregion
19
+ export { c as ItemActionsContextContent };
20
+
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/file_explorer/item_actions/item_actions_context_content/index.tsx"],"sourcesContent":["import {\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuSeparator,\n} from \"../../../context_menu\";\nimport { Fragment } from \"react\";\nimport { stopEvent } from \"../../shared/utils\";\nimport type { ExplorerAction } from \"../types\";\nimport { visibleActions } from \"../utils\";\n\nexport interface ItemActionsContextContentProps {\n actions: ExplorerAction[];\n}\n\nexport const ItemActionsContextContent = ({\n actions,\n}: ItemActionsContextContentProps) => (\n <ContextMenuContent onClick={stopEvent} onDoubleClick={stopEvent}>\n {visibleActions(actions).map((action) => (\n <Fragment key={action.key}>\n {action.separatorBefore && <ContextMenuSeparator />}\n\n <ContextMenuItem className=\"gap-2\" onClick={action.onSelect}>\n <action.icon className=\"size-4\" />\n {action.label}\n </ContextMenuItem>\n </Fragment>\n ))}\n </ContextMenuContent>\n);\n"],"mappings":";;;;;;;;AAcA,IAAa,KAA6B,EACxC,iBAEA,kBAAC,GAAD;CAAoB,SAAS;CAAW,eAAe;WACpD,EAAe,EAAQ,CAAC,KAAK,MAC5B,kBAAC,GAAD,EAAA,UAAA,CACG,EAAO,mBAAmB,kBAAC,GAAD,EAAwB,CAAA,EAEnD,kBAAC,GAAD;EAAiB,WAAU;EAAQ,SAAS,EAAO;YAAnD,CACE,kBAAC,EAAO,MAAR,EAAa,WAAU,UAAW,CAAA,EACjC,EAAO,MACQ;IACT,EAAA,EAPI,EAAO,IAOX,CACX;CACiB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { ExplorerAction } from '../types';
2
+ export interface ItemActionsDropdownProps {
3
+ actions: ExplorerAction[];
4
+ iconClassName?: string;
5
+ label?: string;
6
+ }
7
+ export declare const ItemActionsDropdown: ({ actions, iconClassName, label, }: ItemActionsDropdownProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { cn as e } from "../../../../utilities/class/index.js";
2
+ import { Button as t } from "../../../button/index.js";
3
+ import { DropdownMenu as n } from "../../../dropdown_menu/components/dropdown_menu/index.js";
4
+ import { DropdownMenuTrigger as r } from "../../../dropdown_menu/components/dropdown_menu_trigger/index.js";
5
+ import { DropdownMenuContent as i } from "../../../dropdown_menu/components/dropdown_menu_content/index.js";
6
+ import { DropdownMenuItem as a } from "../../../dropdown_menu/components/dropdown_menu_item/index.js";
7
+ import { DropdownMenuSeparator as o } from "../../../dropdown_menu/components/dropdown_menu_separator/index.js";
8
+ import { stopEvent as s } from "../../shared/utils/index.js";
9
+ import { visibleActions as c } from "../utils/index.js";
10
+ import { Fragment as l } from "react";
11
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
12
+ import { Ellipsis as f } from "lucide-react";
13
+ //#region src/components/file_explorer/item_actions/item_actions_dropdown/index.tsx
14
+ var p = ({ actions: p, iconClassName: m, label: h = "Actions" }) => /* @__PURE__ */ d(n, { children: [/* @__PURE__ */ u(r, {
15
+ asChild: !0,
16
+ children: /* @__PURE__ */ u(t, {
17
+ className: "mx-auto flex size-7",
18
+ variant: "secondary",
19
+ size: "icon",
20
+ "aria-label": h,
21
+ onClick: s,
22
+ onDoubleClick: s,
23
+ children: /* @__PURE__ */ u(f, { className: e("size-4", m) })
24
+ })
25
+ }), /* @__PURE__ */ u(i, {
26
+ align: "end",
27
+ onClick: s,
28
+ onDoubleClick: s,
29
+ children: c(p).map((e) => /* @__PURE__ */ d(l, { children: [e.separatorBefore && /* @__PURE__ */ u(o, {}), /* @__PURE__ */ d(a, {
30
+ className: "gap-2",
31
+ onClick: e.onSelect,
32
+ children: [/* @__PURE__ */ u(e.icon, { className: "size-4" }), e.label]
33
+ })] }, e.key))
34
+ })] });
35
+ //#endregion
36
+ export { p as ItemActionsDropdown };
37
+
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/file_explorer/item_actions/item_actions_dropdown/index.tsx"],"sourcesContent":["import { Button } from \"../../../button\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../../../dropdown_menu\";\nimport { Ellipsis } from \"lucide-react\";\nimport { Fragment } from \"react\";\nimport { cn } from \"../../../../utilities/class\";\nimport { stopEvent } from \"../../shared/utils\";\nimport type { ExplorerAction } from \"../types\";\nimport { visibleActions } from \"../utils\";\n\nexport interface ItemActionsDropdownProps {\n actions: ExplorerAction[];\n iconClassName?: string;\n label?: string;\n}\n\nexport const ItemActionsDropdown = ({\n actions,\n iconClassName,\n label = \"Actions\",\n}: ItemActionsDropdownProps) => (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n className=\"mx-auto flex size-7\"\n variant=\"secondary\"\n size=\"icon\"\n aria-label={label}\n onClick={stopEvent}\n onDoubleClick={stopEvent}\n >\n <Ellipsis className={cn(\"size-4\", iconClassName)} />\n </Button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent\n align=\"end\"\n onClick={stopEvent}\n onDoubleClick={stopEvent}\n >\n {visibleActions(actions).map((action) => (\n <Fragment key={action.key}>\n {action.separatorBefore && <DropdownMenuSeparator />}\n\n <DropdownMenuItem className=\"gap-2\" onClick={action.onSelect}>\n <action.icon className=\"size-4\" />\n {action.label}\n </DropdownMenuItem>\n </Fragment>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n);\n"],"mappings":";;;;;;;;;;;;;AAqBA,IAAa,KAAuB,EAClC,YACA,kBACA,WAAQ,gBAER,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;CAAqB,SAAA;WACnB,kBAAC,GAAD;EACE,WAAU;EACV,SAAQ;EACR,MAAK;EACL,cAAY;EACZ,SAAS;EACT,eAAe;YAEf,kBAAC,GAAD,EAAU,WAAW,EAAG,UAAU,EAAc,EAAI,CAAA;EAC7C,CAAA;CACW,CAAA,EAEtB,kBAAC,GAAD;CACE,OAAM;CACN,SAAS;CACT,eAAe;WAEd,EAAe,EAAQ,CAAC,KAAK,MAC5B,kBAAC,GAAD,EAAA,UAAA,CACG,EAAO,mBAAmB,kBAAC,GAAD,EAAyB,CAAA,EAEpD,kBAAC,GAAD;EAAkB,WAAU;EAAQ,SAAS,EAAO;YAApD,CACE,kBAAC,EAAO,MAAR,EAAa,WAAU,UAAW,CAAA,EACjC,EAAO,MACS;IACV,EAAA,EAPI,EAAO,IAOX,CACX;CACkB,CAAA,CACT,EAAA,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { LucideIcon } from 'lucide-react';
2
+ export interface ExplorerAction {
3
+ key: string;
4
+ label: string;
5
+ icon: LucideIcon;
6
+ onSelect: () => void;
7
+ separatorBefore?: boolean;
8
+ hidden?: boolean;
9
+ }
@@ -0,0 +1,2 @@
1
+ import { ExplorerAction } from '../types';
2
+ export declare const visibleActions: (actions: ExplorerAction[]) => ExplorerAction[];
@@ -0,0 +1,6 @@
1
+ //#region src/components/file_explorer/item_actions/utils/index.ts
2
+ var e = (e) => e.filter((e) => !e.hidden);
3
+ //#endregion
4
+ export { e as visibleActions };
5
+
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/file_explorer/item_actions/utils/index.ts"],"sourcesContent":["import type { ExplorerAction } from \"../types\";\n\nexport const visibleActions = (actions: ExplorerAction[]) =>\n actions.filter((action) => !action.hidden);\n"],"mappings":";AAEA,IAAa,KAAkB,MAC7B,EAAQ,QAAQ,MAAW,CAAC,EAAO,OAAO"}
@@ -0,0 +1,2 @@
1
+ import { MouseEvent } from 'react';
2
+ export declare const stopEvent: (event: MouseEvent) => void;
@@ -0,0 +1,8 @@
1
+ //#region src/components/file_explorer/shared/utils/index.ts
2
+ var e = (e) => {
3
+ e.stopPropagation();
4
+ };
5
+ //#endregion
6
+ export { e as stopEvent };
7
+
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/file_explorer/shared/utils/index.ts"],"sourcesContent":["import type { MouseEvent } from \"react\";\n\nexport const stopEvent = (event: MouseEvent) => {\n event.stopPropagation();\n};\n"],"mappings":";AAEA,IAAa,KAAa,MAAsB;AAC9C,GAAM,iBAAiB"}
@@ -0,0 +1 @@
1
+ export type ExplorerItemType = "file" | "folder";
@@ -0,0 +1,12 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ export interface FileThumbnailProps extends ComponentProps<"div"> {
3
+ source?: string | null;
4
+ isLoading?: boolean;
5
+ isError?: boolean;
6
+ fallback: ReactNode;
7
+ alt?: string;
8
+ imageClassName?: string;
9
+ onImageError?: ComponentProps<"img">["onError"];
10
+ }
11
+ /** Displays a supplied thumbnail URL; fetching and rendering previews belong to the consumer. */
12
+ export declare const FileThumbnail: import('react').ForwardRefExoticComponent<Omit<FileThumbnailProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,35 @@
1
+ import { cn as e } from "../../utilities/class/index.js";
2
+ import { Skeleton as t } from "../skeleton/index.js";
3
+ import { forwardRef as n, useState as r } from "react";
4
+ import { Fragment as i, jsx as a } from "react/jsx-runtime";
5
+ //#region src/components/file_thumbnail/index.tsx
6
+ function o({ source: t, alt: n, fallback: o, className: s, onError: c }) {
7
+ let [l, u] = r(!1);
8
+ return l ? /* @__PURE__ */ a(i, { children: o }) : /* @__PURE__ */ a("img", {
9
+ src: t,
10
+ alt: n,
11
+ loading: "lazy",
12
+ className: e("size-full object-cover object-top", s),
13
+ onError: (e) => {
14
+ u(!0), c?.(e);
15
+ }
16
+ });
17
+ }
18
+ var s = n(function({ source: n, isLoading: r = !1, isError: i = !1, fallback: s, alt: c = "", imageClassName: l, onImageError: u, className: d, ...f }, p) {
19
+ return /* @__PURE__ */ a("div", {
20
+ ref: p,
21
+ className: e("flex size-full items-center justify-center overflow-hidden", d),
22
+ ...f,
23
+ children: i ? s : r ? /* @__PURE__ */ a(t, { className: "size-full rounded-none" }) : n ? /* @__PURE__ */ a(o, {
24
+ source: n,
25
+ alt: c,
26
+ fallback: s,
27
+ className: l,
28
+ onError: u
29
+ }, n) : s
30
+ });
31
+ });
32
+ //#endregion
33
+ export { s as FileThumbnail };
34
+
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/file_thumbnail/index.tsx"],"sourcesContent":["import {\n forwardRef,\n useState,\n type ComponentProps,\n type ReactNode,\n} from \"react\";\nimport { cn } from \"../../utilities/class\";\nimport { Skeleton } from \"../skeleton\";\n\nexport interface FileThumbnailProps extends ComponentProps<\"div\"> {\n source?: string | null;\n isLoading?: boolean;\n isError?: boolean;\n fallback: ReactNode;\n alt?: string;\n imageClassName?: string;\n onImageError?: ComponentProps<\"img\">[\"onError\"];\n}\n\ninterface ThumbnailImageProps {\n source: string;\n alt: string;\n fallback: ReactNode;\n className?: string;\n onError?: ComponentProps<\"img\">[\"onError\"];\n}\n\nfunction ThumbnailImage({\n source,\n alt,\n fallback,\n className,\n onError,\n}: ThumbnailImageProps) {\n const [failed, setFailed] = useState(false);\n if (failed) return <>{fallback}</>;\n\n return (\n <img\n src={source}\n alt={alt}\n loading=\"lazy\"\n className={cn(\"size-full object-cover object-top\", className)}\n onError={(event) => {\n setFailed(true);\n onError?.(event);\n }}\n />\n );\n}\n\n/** Displays a supplied thumbnail URL; fetching and rendering previews belong to the consumer. */\nexport const FileThumbnail = forwardRef<HTMLDivElement, FileThumbnailProps>(\n function FileThumbnail(\n {\n source,\n isLoading = false,\n isError = false,\n fallback,\n alt = \"\",\n imageClassName,\n onImageError,\n className,\n ...props\n },\n ref,\n ) {\n return (\n <div\n ref={ref}\n className={cn(\n \"flex size-full items-center justify-center overflow-hidden\",\n className,\n )}\n {...props}\n >\n {isError ? (\n fallback\n ) : isLoading ? (\n <Skeleton className=\"size-full rounded-none\" />\n ) : source ? (\n <ThumbnailImage\n key={source}\n source={source}\n alt={alt}\n fallback={fallback}\n className={imageClassName}\n onError={onImageError}\n />\n ) : (\n fallback\n )}\n </div>\n );\n },\n);\n"],"mappings":";;;;;AA2BA,SAAS,EAAe,EACtB,WACA,QACA,aACA,cACA,cACsB;CACtB,IAAM,CAAC,GAAQ,KAAa,EAAS,GAAM;AAG3C,QAFI,IAAe,kBAAA,GAAA,EAAA,UAAG,GAAY,CAAA,GAGhC,kBAAC,OAAD;EACE,KAAK;EACA;EACL,SAAQ;EACR,WAAW,EAAG,qCAAqC,EAAU;EAC7D,UAAU,MAAU;AAElB,GADA,EAAU,GAAK,EACf,IAAU,EAAM;;EAElB,CAAA;;AAKN,IAAa,IAAgB,EAC3B,SACE,EACE,WACA,eAAY,IACZ,aAAU,IACV,aACA,SAAM,IACN,mBACA,iBACA,cACA,GAAG,KAEL,GACA;AACA,QACE,kBAAC,OAAD;EACO;EACL,WAAW,EACT,8DACA,EACD;EACD,GAAI;YAEH,IACC,IACE,IACF,kBAAC,GAAD,EAAU,WAAU,0BAA2B,CAAA,GAC7C,IACF,kBAAC,GAAD;GAEU;GACH;GACK;GACV,WAAW;GACX,SAAS;GACT,EANK,EAML,GAEF;EAEE,CAAA;EAGX"}
@@ -0,0 +1,13 @@
1
+ export type FileKind = "pdf" | "document" | "spreadsheet" | "presentation" | "image" | "video" | "audio" | "archive" | "code" | "json" | "markup" | "font" | "database" | "binary" | "unknown";
2
+ export interface FileKindStyle {
3
+ color: string;
4
+ accent: string;
5
+ fallbackLabel: string;
6
+ }
7
+ export declare const FILE_KIND_STYLES: Record<FileKind, FileKindStyle>;
8
+ export declare const SHEET_BODY = "M6.5 1.5h7L20 8v12.5a2 2 0 0 1-2 2H6.5a2 2 0 0 1-2-2v-17a2 2 0 0 1 2-2Z";
9
+ export declare const SHEET_FOLD = "M13.5 1.5 20 8h-4.5a2 2 0 0 1-2-2Z";
10
+ export declare const SHEET_BAND = "M4.5 14H20v6.5a2 2 0 0 1-2 2H6.5a2 2 0 0 1-2-2Z";
11
+ export declare const LABEL_FONT_SIZE: Record<number, number>;
12
+ export declare const getFileKindStyle: (mimeType: string) => FileKindStyle;
13
+ export declare const getFileTypeLabel: (mimeType: string, fileName?: string) => string;
@@ -0,0 +1,178 @@
1
+ import { extensionFromFileName as e, extensionFromMime as t } from "./mime_extensions.js";
2
+ //#region src/components/file_type_icon/file_kind/index.ts
3
+ var n = {
4
+ pdf: {
5
+ color: "text-red-600 dark:text-red-500",
6
+ accent: "[--file-kind:var(--color-red-600)] dark:[--file-kind:var(--color-red-500)]",
7
+ fallbackLabel: "PDF"
8
+ },
9
+ document: {
10
+ color: "text-blue-600 dark:text-blue-500",
11
+ accent: "[--file-kind:var(--color-blue-600)] dark:[--file-kind:var(--color-blue-500)]",
12
+ fallbackLabel: "DOC"
13
+ },
14
+ spreadsheet: {
15
+ color: "text-emerald-700 dark:text-emerald-600",
16
+ accent: "[--file-kind:var(--color-emerald-700)] dark:[--file-kind:var(--color-emerald-600)]",
17
+ fallbackLabel: "XLS"
18
+ },
19
+ presentation: {
20
+ color: "text-orange-600 dark:text-orange-500",
21
+ accent: "[--file-kind:var(--color-orange-600)] dark:[--file-kind:var(--color-orange-500)]",
22
+ fallbackLabel: "PPT"
23
+ },
24
+ image: {
25
+ color: "text-violet-600 dark:text-violet-500",
26
+ accent: "[--file-kind:var(--color-violet-600)] dark:[--file-kind:var(--color-violet-500)]",
27
+ fallbackLabel: "IMG"
28
+ },
29
+ video: {
30
+ color: "text-pink-600 dark:text-pink-500",
31
+ accent: "[--file-kind:var(--color-pink-600)] dark:[--file-kind:var(--color-pink-500)]",
32
+ fallbackLabel: "VID"
33
+ },
34
+ audio: {
35
+ color: "text-cyan-700 dark:text-cyan-600",
36
+ accent: "[--file-kind:var(--color-cyan-700)] dark:[--file-kind:var(--color-cyan-600)]",
37
+ fallbackLabel: "AUD"
38
+ },
39
+ archive: {
40
+ color: "text-amber-700 dark:text-amber-600",
41
+ accent: "[--file-kind:var(--color-amber-700)] dark:[--file-kind:var(--color-amber-600)]",
42
+ fallbackLabel: "ZIP"
43
+ },
44
+ code: {
45
+ color: "text-sky-600 dark:text-sky-500",
46
+ accent: "[--file-kind:var(--color-sky-600)] dark:[--file-kind:var(--color-sky-500)]",
47
+ fallbackLabel: "CODE"
48
+ },
49
+ json: {
50
+ color: "text-lime-700 dark:text-lime-600",
51
+ accent: "[--file-kind:var(--color-lime-700)] dark:[--file-kind:var(--color-lime-600)]",
52
+ fallbackLabel: "JSON"
53
+ },
54
+ markup: {
55
+ color: "text-teal-700 dark:text-teal-600",
56
+ accent: "[--file-kind:var(--color-teal-700)] dark:[--file-kind:var(--color-teal-600)]",
57
+ fallbackLabel: "XML"
58
+ },
59
+ font: {
60
+ color: "text-fuchsia-600 dark:text-fuchsia-500",
61
+ accent: "[--file-kind:var(--color-fuchsia-600)] dark:[--file-kind:var(--color-fuchsia-500)]",
62
+ fallbackLabel: "FONT"
63
+ },
64
+ database: {
65
+ color: "text-indigo-600 dark:text-indigo-500",
66
+ accent: "[--file-kind:var(--color-indigo-600)] dark:[--file-kind:var(--color-indigo-500)]",
67
+ fallbackLabel: "DB"
68
+ },
69
+ binary: {
70
+ color: "text-zinc-600 dark:text-zinc-500",
71
+ accent: "[--file-kind:var(--color-zinc-600)] dark:[--file-kind:var(--color-zinc-500)]",
72
+ fallbackLabel: "BIN"
73
+ },
74
+ unknown: {
75
+ color: "text-slate-500 dark:text-slate-500",
76
+ accent: "[--file-kind:var(--color-slate-500)] dark:[--file-kind:var(--color-slate-500)]",
77
+ fallbackLabel: "FILE"
78
+ }
79
+ }, r = {
80
+ "application/pdf": "pdf",
81
+ "application/msword": "document",
82
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "document",
83
+ "application/vnd.oasis.opendocument.text": "document",
84
+ "text/plain": "document",
85
+ "text/rtf": "document",
86
+ "application/rtf": "document",
87
+ "application/vnd.google-apps.document": "document",
88
+ "application/vnd.google-apps.kix": "document",
89
+ "application/vnd.ms-excel": "spreadsheet",
90
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "spreadsheet",
91
+ "application/vnd.oasis.opendocument.spreadsheet": "spreadsheet",
92
+ "text/csv": "spreadsheet",
93
+ "application/vnd.google-apps.spreadsheet": "spreadsheet",
94
+ "application/vnd.ms-powerpoint": "presentation",
95
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": "presentation",
96
+ "application/vnd.oasis.opendocument.presentation": "presentation",
97
+ "application/vnd.google-apps.presentation": "presentation",
98
+ "image/jpeg": "image",
99
+ "image/jpg": "image",
100
+ "image/png": "image",
101
+ "image/gif": "image",
102
+ "image/bmp": "image",
103
+ "image/webp": "image",
104
+ "image/tiff": "image",
105
+ "image/svg+xml": "image",
106
+ "image/x-icon": "image",
107
+ "image/vnd.microsoft.icon": "image",
108
+ "image/heic": "image",
109
+ "image/heif": "image",
110
+ "application/vnd.google-apps.drawing": "image",
111
+ "application/vnd.google-apps.photo": "image",
112
+ "video/mp4": "video",
113
+ "video/mpeg": "video",
114
+ "video/quicktime": "video",
115
+ "video/x-msvideo": "video",
116
+ "video/x-ms-wmv": "video",
117
+ "video/webm": "video",
118
+ "video/ogg": "video",
119
+ "video/3gpp": "video",
120
+ "video/x-flv": "video",
121
+ "audio/mpeg": "audio",
122
+ "audio/mp3": "audio",
123
+ "audio/wav": "audio",
124
+ "audio/ogg": "audio",
125
+ "audio/webm": "audio",
126
+ "audio/aac": "audio",
127
+ "audio/x-m4a": "audio",
128
+ "audio/flac": "audio",
129
+ "audio/x-ms-wma": "audio",
130
+ "application/zip": "archive",
131
+ "application/vnd.rar": "archive",
132
+ "application/x-rar-compressed": "archive",
133
+ "application/x-7z-compressed": "archive",
134
+ "application/x-tar": "archive",
135
+ "application/gzip": "archive",
136
+ "application/x-bzip2": "archive",
137
+ "text/html": "code",
138
+ "text/css": "code",
139
+ "text/javascript": "code",
140
+ "application/javascript": "code",
141
+ "application/typescript": "code",
142
+ "text/x-python": "code",
143
+ "text/x-java": "code",
144
+ "text/x-c": "code",
145
+ "text/x-c++": "code",
146
+ "text/x-php": "code",
147
+ "text/x-ruby": "code",
148
+ "text/x-go": "code",
149
+ "text/x-rust": "code",
150
+ "application/x-sh": "code",
151
+ "application/vnd.google-apps.script": "code",
152
+ "text/markdown": "code",
153
+ "application/json": "json",
154
+ "application/ld+json": "json",
155
+ "application/xml": "markup",
156
+ "text/xml": "markup",
157
+ "application/sql": "database",
158
+ "application/x-sqlite3": "database",
159
+ "application/octet-stream": "binary",
160
+ "application/x-msdownload": "binary",
161
+ "application/x-executable": "binary",
162
+ "application/vnd.google-apps.form": "binary",
163
+ "application/vnd.google-apps.shortcut": "binary",
164
+ "font/ttf": "font",
165
+ "font/otf": "font",
166
+ "font/woff": "font",
167
+ "font/woff2": "font",
168
+ "application/font-woff": "font"
169
+ }, i = "M6.5 1.5h7L20 8v12.5a2 2 0 0 1-2 2H6.5a2 2 0 0 1-2-2v-17a2 2 0 0 1 2-2Z", a = "M13.5 1.5 20 8h-4.5a2 2 0 0 1-2-2Z", o = "M4.5 14H20v6.5a2 2 0 0 1-2 2H6.5a2 2 0 0 1-2-2Z", s = {
170
+ 1: 7.4,
171
+ 2: 7.4,
172
+ 3: 6.4,
173
+ 4: 5.2
174
+ }, c = (e) => n[r[e] ?? "unknown"], l = (n, r) => ((r ? e(r) : null) ?? t(n) ?? c(n).fallbackLabel).toUpperCase().slice(0, 4);
175
+ //#endregion
176
+ export { n as FILE_KIND_STYLES, s as LABEL_FONT_SIZE, o as SHEET_BAND, i as SHEET_BODY, a as SHEET_FOLD, c as getFileKindStyle, l as getFileTypeLabel };
177
+
178
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/file_type_icon/file_kind/index.ts"],"sourcesContent":["import { extensionFromFileName, extensionFromMime } from \"./mime_extensions\";\n\nexport type FileKind =\n | \"pdf\"\n | \"document\"\n | \"spreadsheet\"\n | \"presentation\"\n | \"image\"\n | \"video\"\n | \"audio\"\n | \"archive\"\n | \"code\"\n | \"json\"\n | \"markup\"\n | \"font\"\n | \"database\"\n | \"binary\"\n | \"unknown\";\n\nexport interface FileKindStyle {\n color: string;\n accent: string;\n fallbackLabel: string;\n}\n\nexport const FILE_KIND_STYLES: Record<FileKind, FileKindStyle> = {\n pdf: {\n color: \"text-red-600 dark:text-red-500\",\n accent:\n \"[--file-kind:var(--color-red-600)] dark:[--file-kind:var(--color-red-500)]\",\n fallbackLabel: \"PDF\",\n },\n document: {\n color: \"text-blue-600 dark:text-blue-500\",\n accent:\n \"[--file-kind:var(--color-blue-600)] dark:[--file-kind:var(--color-blue-500)]\",\n fallbackLabel: \"DOC\",\n },\n spreadsheet: {\n color: \"text-emerald-700 dark:text-emerald-600\",\n accent:\n \"[--file-kind:var(--color-emerald-700)] dark:[--file-kind:var(--color-emerald-600)]\",\n fallbackLabel: \"XLS\",\n },\n presentation: {\n color: \"text-orange-600 dark:text-orange-500\",\n accent:\n \"[--file-kind:var(--color-orange-600)] dark:[--file-kind:var(--color-orange-500)]\",\n fallbackLabel: \"PPT\",\n },\n image: {\n color: \"text-violet-600 dark:text-violet-500\",\n accent:\n \"[--file-kind:var(--color-violet-600)] dark:[--file-kind:var(--color-violet-500)]\",\n fallbackLabel: \"IMG\",\n },\n video: {\n color: \"text-pink-600 dark:text-pink-500\",\n accent:\n \"[--file-kind:var(--color-pink-600)] dark:[--file-kind:var(--color-pink-500)]\",\n fallbackLabel: \"VID\",\n },\n audio: {\n color: \"text-cyan-700 dark:text-cyan-600\",\n accent:\n \"[--file-kind:var(--color-cyan-700)] dark:[--file-kind:var(--color-cyan-600)]\",\n fallbackLabel: \"AUD\",\n },\n archive: {\n color: \"text-amber-700 dark:text-amber-600\",\n accent:\n \"[--file-kind:var(--color-amber-700)] dark:[--file-kind:var(--color-amber-600)]\",\n fallbackLabel: \"ZIP\",\n },\n code: {\n color: \"text-sky-600 dark:text-sky-500\",\n accent:\n \"[--file-kind:var(--color-sky-600)] dark:[--file-kind:var(--color-sky-500)]\",\n fallbackLabel: \"CODE\",\n },\n json: {\n color: \"text-lime-700 dark:text-lime-600\",\n accent:\n \"[--file-kind:var(--color-lime-700)] dark:[--file-kind:var(--color-lime-600)]\",\n fallbackLabel: \"JSON\",\n },\n markup: {\n color: \"text-teal-700 dark:text-teal-600\",\n accent:\n \"[--file-kind:var(--color-teal-700)] dark:[--file-kind:var(--color-teal-600)]\",\n fallbackLabel: \"XML\",\n },\n font: {\n color: \"text-fuchsia-600 dark:text-fuchsia-500\",\n accent:\n \"[--file-kind:var(--color-fuchsia-600)] dark:[--file-kind:var(--color-fuchsia-500)]\",\n fallbackLabel: \"FONT\",\n },\n database: {\n color: \"text-indigo-600 dark:text-indigo-500\",\n accent:\n \"[--file-kind:var(--color-indigo-600)] dark:[--file-kind:var(--color-indigo-500)]\",\n fallbackLabel: \"DB\",\n },\n binary: {\n color: \"text-zinc-600 dark:text-zinc-500\",\n accent:\n \"[--file-kind:var(--color-zinc-600)] dark:[--file-kind:var(--color-zinc-500)]\",\n fallbackLabel: \"BIN\",\n },\n unknown: {\n color: \"text-slate-500 dark:text-slate-500\",\n accent:\n \"[--file-kind:var(--color-slate-500)] dark:[--file-kind:var(--color-slate-500)]\",\n fallbackLabel: \"FILE\",\n },\n};\n\nconst MIME_TO_KIND: Record<string, FileKind> = {\n \"application/pdf\": \"pdf\",\n\n \"application/msword\": \"document\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":\n \"document\",\n \"application/vnd.oasis.opendocument.text\": \"document\",\n \"text/plain\": \"document\",\n \"text/rtf\": \"document\",\n \"application/rtf\": \"document\",\n\n \"application/vnd.google-apps.document\": \"document\",\n \"application/vnd.google-apps.kix\": \"document\",\n\n \"application/vnd.ms-excel\": \"spreadsheet\",\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":\n \"spreadsheet\",\n \"application/vnd.oasis.opendocument.spreadsheet\": \"spreadsheet\",\n \"text/csv\": \"spreadsheet\",\n \"application/vnd.google-apps.spreadsheet\": \"spreadsheet\",\n\n \"application/vnd.ms-powerpoint\": \"presentation\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\":\n \"presentation\",\n \"application/vnd.oasis.opendocument.presentation\": \"presentation\",\n \"application/vnd.google-apps.presentation\": \"presentation\",\n\n \"image/jpeg\": \"image\",\n \"image/jpg\": \"image\",\n \"image/png\": \"image\",\n \"image/gif\": \"image\",\n \"image/bmp\": \"image\",\n \"image/webp\": \"image\",\n \"image/tiff\": \"image\",\n \"image/svg+xml\": \"image\",\n \"image/x-icon\": \"image\",\n \"image/vnd.microsoft.icon\": \"image\",\n \"image/heic\": \"image\",\n \"image/heif\": \"image\",\n \"application/vnd.google-apps.drawing\": \"image\",\n \"application/vnd.google-apps.photo\": \"image\",\n\n \"video/mp4\": \"video\",\n \"video/mpeg\": \"video\",\n \"video/quicktime\": \"video\",\n \"video/x-msvideo\": \"video\",\n \"video/x-ms-wmv\": \"video\",\n \"video/webm\": \"video\",\n \"video/ogg\": \"video\",\n \"video/3gpp\": \"video\",\n \"video/x-flv\": \"video\",\n\n \"audio/mpeg\": \"audio\",\n \"audio/mp3\": \"audio\",\n \"audio/wav\": \"audio\",\n \"audio/ogg\": \"audio\",\n \"audio/webm\": \"audio\",\n \"audio/aac\": \"audio\",\n \"audio/x-m4a\": \"audio\",\n \"audio/flac\": \"audio\",\n \"audio/x-ms-wma\": \"audio\",\n\n \"application/zip\": \"archive\",\n \"application/vnd.rar\": \"archive\",\n \"application/x-rar-compressed\": \"archive\",\n \"application/x-7z-compressed\": \"archive\",\n \"application/x-tar\": \"archive\",\n \"application/gzip\": \"archive\",\n \"application/x-bzip2\": \"archive\",\n\n \"text/html\": \"code\",\n \"text/css\": \"code\",\n \"text/javascript\": \"code\",\n \"application/javascript\": \"code\",\n \"application/typescript\": \"code\",\n \"text/x-python\": \"code\",\n \"text/x-java\": \"code\",\n \"text/x-c\": \"code\",\n \"text/x-c++\": \"code\",\n \"text/x-php\": \"code\",\n \"text/x-ruby\": \"code\",\n \"text/x-go\": \"code\",\n \"text/x-rust\": \"code\",\n \"application/x-sh\": \"code\",\n \"application/vnd.google-apps.script\": \"code\",\n \"text/markdown\": \"code\",\n\n \"application/json\": \"json\",\n \"application/ld+json\": \"json\",\n\n \"application/xml\": \"markup\",\n \"text/xml\": \"markup\",\n\n \"application/sql\": \"database\",\n \"application/x-sqlite3\": \"database\",\n\n \"application/octet-stream\": \"binary\",\n \"application/x-msdownload\": \"binary\",\n \"application/x-executable\": \"binary\",\n \"application/vnd.google-apps.form\": \"binary\",\n \"application/vnd.google-apps.shortcut\": \"binary\",\n\n \"font/ttf\": \"font\",\n \"font/otf\": \"font\",\n \"font/woff\": \"font\",\n \"font/woff2\": \"font\",\n \"application/font-woff\": \"font\",\n};\n\nexport const SHEET_BODY =\n \"M6.5 1.5h7L20 8v12.5a2 2 0 0 1-2 2H6.5a2 2 0 0 1-2-2v-17a2 2 0 0 1 2-2Z\";\nexport const SHEET_FOLD = \"M13.5 1.5 20 8h-4.5a2 2 0 0 1-2-2Z\";\nexport const SHEET_BAND = \"M4.5 14H20v6.5a2 2 0 0 1-2 2H6.5a2 2 0 0 1-2-2Z\";\n\nexport const LABEL_FONT_SIZE: Record<number, number> = {\n 1: 7.4,\n 2: 7.4,\n 3: 6.4,\n 4: 5.2,\n};\n\nexport const getFileKindStyle = (mimeType: string): FileKindStyle =>\n FILE_KIND_STYLES[MIME_TO_KIND[mimeType] ?? \"unknown\"];\n\nexport const getFileTypeLabel = (\n mimeType: string,\n fileName?: string,\n): string => {\n const fromName = fileName ? extensionFromFileName(fileName) : null;\n const ext = fromName ?? extensionFromMime(mimeType);\n const label = ext ?? getFileKindStyle(mimeType).fallbackLabel;\n return label.toUpperCase().slice(0, 4);\n};\n"],"mappings":";;AAyBA,IAAa,IAAoD;CAC/D,KAAK;EACH,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,UAAU;EACR,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,aAAa;EACX,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,cAAc;EACZ,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,OAAO;EACL,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,OAAO;EACL,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,OAAO;EACL,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,SAAS;EACP,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,MAAM;EACJ,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,MAAM;EACJ,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,QAAQ;EACN,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,MAAM;EACJ,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,UAAU;EACR,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,QAAQ;EACN,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACD,SAAS;EACP,OAAO;EACP,QACE;EACF,eAAe;EAChB;CACF,EAEK,IAAyC;CAC7C,mBAAmB;CAEnB,sBAAsB;CACtB,2EACE;CACF,2CAA2C;CAC3C,cAAc;CACd,YAAY;CACZ,mBAAmB;CAEnB,wCAAwC;CACxC,mCAAmC;CAEnC,4BAA4B;CAC5B,qEACE;CACF,kDAAkD;CAClD,YAAY;CACZ,2CAA2C;CAE3C,iCAAiC;CACjC,6EACE;CACF,mDAAmD;CACnD,4CAA4C;CAE5C,cAAc;CACd,aAAa;CACb,aAAa;CACb,aAAa;CACb,aAAa;CACb,cAAc;CACd,cAAc;CACd,iBAAiB;CACjB,gBAAgB;CAChB,4BAA4B;CAC5B,cAAc;CACd,cAAc;CACd,uCAAuC;CACvC,qCAAqC;CAErC,aAAa;CACb,cAAc;CACd,mBAAmB;CACnB,mBAAmB;CACnB,kBAAkB;CAClB,cAAc;CACd,aAAa;CACb,cAAc;CACd,eAAe;CAEf,cAAc;CACd,aAAa;CACb,aAAa;CACb,aAAa;CACb,cAAc;CACd,aAAa;CACb,eAAe;CACf,cAAc;CACd,kBAAkB;CAElB,mBAAmB;CACnB,uBAAuB;CACvB,gCAAgC;CAChC,+BAA+B;CAC/B,qBAAqB;CACrB,oBAAoB;CACpB,uBAAuB;CAEvB,aAAa;CACb,YAAY;CACZ,mBAAmB;CACnB,0BAA0B;CAC1B,0BAA0B;CAC1B,iBAAiB;CACjB,eAAe;CACf,YAAY;CACZ,cAAc;CACd,cAAc;CACd,eAAe;CACf,aAAa;CACb,eAAe;CACf,oBAAoB;CACpB,sCAAsC;CACtC,iBAAiB;CAEjB,oBAAoB;CACpB,uBAAuB;CAEvB,mBAAmB;CACnB,YAAY;CAEZ,mBAAmB;CACnB,yBAAyB;CAEzB,4BAA4B;CAC5B,4BAA4B;CAC5B,4BAA4B;CAC5B,oCAAoC;CACpC,wCAAwC;CAExC,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,cAAc;CACd,yBAAyB;CAC1B,EAEY,IACX,2EACW,IAAa,sCACb,IAAa,mDAEb,IAA0C;CACrD,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ,EAEY,KAAoB,MAC/B,EAAiB,EAAa,MAAa,YAEhC,KACX,GACA,QAEiB,IAAW,EAAsB,EAAS,GAAG,SACtC,EAAkB,EAAS,IAC9B,EAAiB,EAAS,CAAC,eACnC,aAAa,CAAC,MAAM,GAAG,EAAE"}
@@ -0,0 +1,2 @@
1
+ export declare function extensionFromMime(mimeType: string): string | null;
2
+ export declare function extensionFromFileName(fileName: string): string | null;
@@ -0,0 +1,54 @@
1
+ //#region src/components/file_type_icon/file_kind/mime_extensions.ts
2
+ var e = {
3
+ "application/pdf": "pdf",
4
+ "application/msword": "doc",
5
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
6
+ "image/png": "png",
7
+ "image/jpeg": "jpg",
8
+ "image/webp": "webp",
9
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
10
+ "application/vnd.ms-excel": "xls",
11
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": "pptx",
12
+ "application/vnd.ms-powerpoint": "ppt",
13
+ "image/gif": "gif",
14
+ "image/svg+xml": "svg",
15
+ "image/bmp": "bmp",
16
+ "image/tiff": "tif",
17
+ "image/heic": "heic",
18
+ "image/heif": "heif",
19
+ "image/x-icon": "ico",
20
+ "text/plain": "txt",
21
+ "text/csv": "csv",
22
+ "application/json": "json",
23
+ "text/html": "html",
24
+ "application/rtf": "rtf",
25
+ "application/xml": "xml",
26
+ "application/vnd.oasis.opendocument.text": "odt",
27
+ "application/vnd.oasis.opendocument.spreadsheet": "ods",
28
+ "application/vnd.oasis.opendocument.presentation": "odp",
29
+ "application/zip": "zip",
30
+ "application/vnd.rar": "rar",
31
+ "application/x-7z-compressed": "7z",
32
+ "application/x-tar": "tar",
33
+ "application/gzip": "gz",
34
+ "video/mp4": "mp4",
35
+ "video/x-msvideo": "avi",
36
+ "video/webm": "webm",
37
+ "video/quicktime": "mov",
38
+ "audio/mpeg": "mp3",
39
+ "audio/wav": "wav",
40
+ "audio/ogg": "ogg"
41
+ };
42
+ function t(t) {
43
+ return e[t.toLowerCase().trim()] ?? null;
44
+ }
45
+ function n(e) {
46
+ let t = e.trim(), n = t.lastIndexOf(".");
47
+ if (n <= 0 || n === t.length - 1) return null;
48
+ let r = t.slice(n + 1).toLowerCase();
49
+ return /^[a-z0-9]{1,8}$/.test(r) ? r : null;
50
+ }
51
+ //#endregion
52
+ export { n as extensionFromFileName, t as extensionFromMime };
53
+
54
+ //# sourceMappingURL=mime_extensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mime_extensions.js","names":[],"sources":["../../../../src/components/file_type_icon/file_kind/mime_extensions.ts"],"sourcesContent":["const MIME_EXTENSIONS: Readonly<Record<string, string>> = {\n \"application/pdf\": \"pdf\",\n \"application/msword\": \"doc\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":\n \"docx\",\n \"image/png\": \"png\",\n \"image/jpeg\": \"jpg\",\n \"image/webp\": \"webp\",\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n \"application/vnd.ms-excel\": \"xls\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\":\n \"pptx\",\n \"application/vnd.ms-powerpoint\": \"ppt\",\n \"image/gif\": \"gif\",\n \"image/svg+xml\": \"svg\",\n \"image/bmp\": \"bmp\",\n \"image/tiff\": \"tif\",\n \"image/heic\": \"heic\",\n \"image/heif\": \"heif\",\n \"image/x-icon\": \"ico\",\n \"text/plain\": \"txt\",\n \"text/csv\": \"csv\",\n \"application/json\": \"json\",\n \"text/html\": \"html\",\n \"application/rtf\": \"rtf\",\n \"application/xml\": \"xml\",\n \"application/vnd.oasis.opendocument.text\": \"odt\",\n \"application/vnd.oasis.opendocument.spreadsheet\": \"ods\",\n \"application/vnd.oasis.opendocument.presentation\": \"odp\",\n \"application/zip\": \"zip\",\n \"application/vnd.rar\": \"rar\",\n \"application/x-7z-compressed\": \"7z\",\n \"application/x-tar\": \"tar\",\n \"application/gzip\": \"gz\",\n \"video/mp4\": \"mp4\",\n \"video/x-msvideo\": \"avi\",\n \"video/webm\": \"webm\",\n \"video/quicktime\": \"mov\",\n \"audio/mpeg\": \"mp3\",\n \"audio/wav\": \"wav\",\n \"audio/ogg\": \"ogg\",\n};\n\nexport function extensionFromMime(mimeType: string): string | null {\n return MIME_EXTENSIONS[mimeType.toLowerCase().trim()] ?? null;\n}\n\nexport function extensionFromFileName(fileName: string): string | null {\n const trimmed = fileName.trim();\n const dot = trimmed.lastIndexOf(\".\");\n if (dot <= 0 || dot === trimmed.length - 1) return null;\n const ext = trimmed.slice(dot + 1).toLowerCase();\n return /^[a-z0-9]{1,8}$/.test(ext) ? ext : null;\n}\n"],"mappings":";AAAA,IAAM,IAAoD;CACxD,mBAAmB;CACnB,sBAAsB;CACtB,2EACE;CACF,aAAa;CACb,cAAc;CACd,cAAc;CACd,qEAAqE;CACrE,4BAA4B;CAC5B,6EACE;CACF,iCAAiC;CACjC,aAAa;CACb,iBAAiB;CACjB,aAAa;CACb,cAAc;CACd,cAAc;CACd,cAAc;CACd,gBAAgB;CAChB,cAAc;CACd,YAAY;CACZ,oBAAoB;CACpB,aAAa;CACb,mBAAmB;CACnB,mBAAmB;CACnB,2CAA2C;CAC3C,kDAAkD;CAClD,mDAAmD;CACnD,mBAAmB;CACnB,uBAAuB;CACvB,+BAA+B;CAC/B,qBAAqB;CACrB,oBAAoB;CACpB,aAAa;CACb,mBAAmB;CACnB,cAAc;CACd,mBAAmB;CACnB,cAAc;CACd,aAAa;CACb,aAAa;CACd;AAED,SAAgB,EAAkB,GAAiC;AACjE,QAAO,EAAgB,EAAS,aAAa,CAAC,MAAM,KAAK;;AAG3D,SAAgB,EAAsB,GAAiC;CACrE,IAAM,IAAU,EAAS,MAAM,EACzB,IAAM,EAAQ,YAAY,IAAI;AACpC,KAAI,KAAO,KAAK,MAAQ,EAAQ,SAAS,EAAG,QAAO;CACnD,IAAM,IAAM,EAAQ,MAAM,IAAM,EAAE,CAAC,aAAa;AAChD,QAAO,kBAAkB,KAAK,EAAI,GAAG,IAAM"}
@@ -0,0 +1,6 @@
1
+ import { SVGProps } from 'react';
2
+ export interface FileTypeIconProps extends SVGProps<SVGSVGElement> {
3
+ mimeType: string;
4
+ fileName?: string;
5
+ }
6
+ export declare const FileTypeIcon: ({ mimeType, className, fileName, ...props }: FileTypeIconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,67 @@
1
+ import { cn as e } from "../../utilities/class/index.js";
2
+ import { LABEL_FONT_SIZE as t, SHEET_BAND as n, SHEET_BODY as r, SHEET_FOLD as i, getFileKindStyle as a, getFileTypeLabel as o } from "./file_kind/index.js";
3
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
+ //#region src/components/file_type_icon/file_type_icon.tsx
5
+ var l = ({ mimeType: l, className: u = "size-4", fileName: d, ...f }) => {
6
+ let { color: p } = a(l), m = o(l, d);
7
+ return /* @__PURE__ */ c("svg", {
8
+ viewBox: "0 0 24 24",
9
+ fill: "none",
10
+ "aria-hidden": "true",
11
+ "data-file-label": m,
12
+ className: e("shrink-0", p, u),
13
+ ...f,
14
+ children: [
15
+ /* @__PURE__ */ s("path", {
16
+ d: r,
17
+ fill: "currentColor"
18
+ }),
19
+ /* @__PURE__ */ s("path", {
20
+ d: i,
21
+ fill: "currentColor",
22
+ opacity: "0.45"
23
+ }),
24
+ /* @__PURE__ */ c("g", {
25
+ fill: "#fff",
26
+ opacity: "0.9",
27
+ children: [/* @__PURE__ */ s("rect", {
28
+ x: "7.4",
29
+ y: "9.6",
30
+ width: "8",
31
+ height: "1.5",
32
+ rx: "0.75"
33
+ }), /* @__PURE__ */ s("rect", {
34
+ x: "7.4",
35
+ y: "12.2",
36
+ width: "5",
37
+ height: "1.5",
38
+ rx: "0.75"
39
+ })]
40
+ }),
41
+ /* @__PURE__ */ s("path", {
42
+ d: n,
43
+ fill: "currentColor"
44
+ }),
45
+ /* @__PURE__ */ s("path", {
46
+ d: n,
47
+ fill: "#000",
48
+ opacity: "0.24"
49
+ }),
50
+ /* @__PURE__ */ s("text", {
51
+ x: "12.25",
52
+ y: "20",
53
+ textAnchor: "middle",
54
+ fill: "#fff",
55
+ fontSize: t[m.length] ?? 5.2,
56
+ fontWeight: "700",
57
+ letterSpacing: "-0.15",
58
+ fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
59
+ children: m
60
+ })
61
+ ]
62
+ });
63
+ };
64
+ //#endregion
65
+ export { l as FileTypeIcon };
66
+
67
+ //# sourceMappingURL=file_type_icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file_type_icon.js","names":[],"sources":["../../../src/components/file_type_icon/file_type_icon.tsx"],"sourcesContent":["import type { SVGProps } from \"react\";\nimport { cn } from \"../../utilities/class\";\nimport {\n getFileKindStyle,\n getFileTypeLabel,\n LABEL_FONT_SIZE,\n SHEET_BAND,\n SHEET_BODY,\n SHEET_FOLD,\n} from \"./file_kind\";\n\nexport interface FileTypeIconProps extends SVGProps<SVGSVGElement> {\n mimeType: string;\n fileName?: string;\n}\n\nexport const FileTypeIcon = ({\n mimeType,\n className = \"size-4\",\n fileName,\n ...props\n}: FileTypeIconProps) => {\n const { color } = getFileKindStyle(mimeType);\n const label = getFileTypeLabel(mimeType, fileName);\n\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n aria-hidden=\"true\"\n data-file-label={label}\n className={cn(\"shrink-0\", color, className)}\n {...props}\n >\n <path d={SHEET_BODY} fill=\"currentColor\" />\n <path d={SHEET_FOLD} fill=\"currentColor\" opacity=\"0.45\" />\n <g fill=\"#fff\" opacity=\"0.9\">\n <rect x=\"7.4\" y=\"9.6\" width=\"8\" height=\"1.5\" rx=\"0.75\" />\n <rect x=\"7.4\" y=\"12.2\" width=\"5\" height=\"1.5\" rx=\"0.75\" />\n </g>\n <path d={SHEET_BAND} fill=\"currentColor\" />\n <path d={SHEET_BAND} fill=\"#000\" opacity=\"0.24\" />\n <text\n x=\"12.25\"\n y=\"20\"\n textAnchor=\"middle\"\n fill=\"#fff\"\n fontSize={LABEL_FONT_SIZE[label.length] ?? 5.2}\n fontWeight=\"700\"\n letterSpacing=\"-0.15\"\n fontFamily=\"ui-monospace, SFMono-Regular, Menlo, monospace\"\n >\n {label}\n </text>\n </svg>\n );\n};\n"],"mappings":";;;;AAgBA,IAAa,KAAgB,EAC3B,aACA,eAAY,UACZ,aACA,GAAG,QACoB;CACvB,IAAM,EAAE,aAAU,EAAiB,EAAS,EACtC,IAAQ,EAAiB,GAAU,EAAS;AAElD,QACE,kBAAC,OAAD;EACE,SAAQ;EACR,MAAK;EACL,eAAY;EACZ,mBAAiB;EACjB,WAAW,EAAG,YAAY,GAAO,EAAU;EAC3C,GAAI;YANN;GAQE,kBAAC,QAAD;IAAM,GAAG;IAAY,MAAK;IAAiB,CAAA;GAC3C,kBAAC,QAAD;IAAM,GAAG;IAAY,MAAK;IAAe,SAAQ;IAAS,CAAA;GAC1D,kBAAC,KAAD;IAAG,MAAK;IAAO,SAAQ;cAAvB,CACE,kBAAC,QAAD;KAAM,GAAE;KAAM,GAAE;KAAM,OAAM;KAAI,QAAO;KAAM,IAAG;KAAS,CAAA,EACzD,kBAAC,QAAD;KAAM,GAAE;KAAM,GAAE;KAAO,OAAM;KAAI,QAAO;KAAM,IAAG;KAAS,CAAA,CACxD;;GACJ,kBAAC,QAAD;IAAM,GAAG;IAAY,MAAK;IAAiB,CAAA;GAC3C,kBAAC,QAAD;IAAM,GAAG;IAAY,MAAK;IAAO,SAAQ;IAAS,CAAA;GAClD,kBAAC,QAAD;IACE,GAAE;IACF,GAAE;IACF,YAAW;IACX,MAAK;IACL,UAAU,EAAgB,EAAM,WAAW;IAC3C,YAAW;IACX,eAAc;IACd,YAAW;cAEV;IACI,CAAA;GACH"}
@@ -0,0 +1,4 @@
1
+ export { FileTypeIcon } from './file_type_icon';
2
+ export type { FileTypeIconProps } from './file_type_icon';
3
+ export { getFileKindStyle, getFileTypeLabel, FILE_KIND_STYLES, } from './file_kind';
4
+ export type { FileKind, FileKindStyle } from './file_kind';
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const FOLDER_VARIANT: {
3
+ readonly DEFAULT: "default";
4
+ readonly SHARED: "shared";
5
+ readonly DRIVE: "drive";
6
+ };
7
+ export type FolderVariant = (typeof FOLDER_VARIANT)[keyof typeof FOLDER_VARIANT];
8
+ export declare const MARK_COLOR = "var(--primary-foreground)";
9
+ export declare const MARKS: Record<FolderVariant, ReactNode>;
10
+ export declare const FOLDER_BODY = "M4.5 6.5a2 2 0 0 1 2-2h3.36a2 2 0 0 1 1.42.59l1.23 1.23a2 2 0 0 0 1.41.59H18a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2H6.5a2 2 0 0 1-2-2Z";
11
+ export declare const FOLDER_FRONT = "M4.5 9.6h15.5V18a2 2 0 0 1-2 2H6.5a2 2 0 0 1-2-2Z";