@edifice.io/react 2.2.11-develop-pedago.20250707151414 → 2.2.11-develop.20250702174802

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,15 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Placement } from '@floating-ui/react';
3
3
  import { default as DropdownCheckboxItem } from './DropdownCheckboxItem';
4
- export interface DropdownApi {
5
- visible: boolean;
6
- isFocused: string | null;
7
- menuRef: React.MutableRefObject<HTMLUListElement | null>;
8
- triggerRef: React.MutableRefObject<HTMLButtonElement | null>;
9
- setVisible: (visible: boolean) => void;
10
- openDropdown: () => void;
11
- closeDropdown: () => void;
12
- }
13
4
  export interface DropdownProps {
14
5
  /** Children Props */
15
6
  children: ReactNode | ((...props: any) => ReactNode);
@@ -77,7 +68,10 @@ export type DropdownMenuOptions = {
77
68
  */
78
69
  type: 'divider';
79
70
  };
80
- declare const Dropdown: import('react').ForwardRefExoticComponent<DropdownProps & import('react').RefAttributes<DropdownApi>> & {
71
+ declare const Dropdown: {
72
+ ({ children, block, overflow, noWrap, placement, extraTriggerKeyDownHandler, onToggle, isTriggerHovered, focusOnVisible, openOnSpace, focusOnMouseEnter, }: DropdownProps): import("react/jsx-runtime").JSX.Element;
73
+ displayName: string;
74
+ } & {
81
75
  Trigger: import('react').ForwardRefExoticComponent<Omit<import('./DropdownTrigger').DropdownTriggerProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
82
76
  Menu: import('react').ForwardRefExoticComponent<Omit<import('./DropdownMenu').DropdownMenuProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
83
77
  Item: {
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { forwardRef, useImperativeHandle, useMemo, useEffect } from "react";
2
+ import { useMemo, useEffect } from "react";
3
3
  import clsx from "clsx";
4
4
  import useDropdown from "../../hooks/useDropdown/useDropdown.js";
5
5
  import DropdownCheckboxItem from "./DropdownCheckboxItem.js";
@@ -11,7 +11,7 @@ import DropdownRadioItem from "./DropdownRadioItem.js";
11
11
  import DropdownSeparator from "./DropdownSeparator.js";
12
12
  import DropdownTrigger from "./DropdownTrigger.js";
13
13
  import useClickOutside from "../../hooks/useClickOutside/useClickOutside.js";
14
- const Root = /* @__PURE__ */ forwardRef(({
14
+ const Root = ({
15
15
  children,
16
16
  block,
17
17
  overflow = !0,
@@ -23,7 +23,7 @@ const Root = /* @__PURE__ */ forwardRef(({
23
23
  focusOnVisible = !0,
24
24
  openOnSpace = !0,
25
25
  focusOnMouseEnter = !0
26
- }, refDropdown) => {
26
+ }) => {
27
27
  const {
28
28
  visible,
29
29
  isFocused,
@@ -31,22 +31,8 @@ const Root = /* @__PURE__ */ forwardRef(({
31
31
  menuProps,
32
32
  itemProps,
33
33
  itemRefs,
34
- setVisible,
35
- menuRef,
36
- triggerRef,
37
- closeDropdown,
38
- openDropdown
39
- } = useDropdown(placement, extraTriggerKeyDownHandler, isTriggerHovered, focusOnVisible, openOnSpace, focusOnMouseEnter);
40
- useImperativeHandle(refDropdown, () => ({
41
- visible,
42
- setVisible,
43
- isFocused,
44
- menuRef,
45
- triggerRef,
46
- closeDropdown,
47
- openDropdown
48
- }));
49
- const ref = useClickOutside(() => {
34
+ setVisible
35
+ } = useDropdown(placement, extraTriggerKeyDownHandler, isTriggerHovered, focusOnVisible, openOnSpace, focusOnMouseEnter), ref = useClickOutside(() => {
50
36
  setVisible(!1);
51
37
  }), value = useMemo(() => ({
52
38
  visible,
@@ -56,10 +42,8 @@ const Root = /* @__PURE__ */ forwardRef(({
56
42
  itemProps,
57
43
  itemRefs,
58
44
  block,
59
- setVisible,
60
- openDropdown,
61
- closeDropdown
62
- }), [visible, isFocused, triggerProps, menuProps, itemProps, itemRefs, block, setVisible, openDropdown, closeDropdown]), dropdown = clsx("dropdown", {
45
+ setVisible
46
+ }), [visible, isFocused, triggerProps, menuProps, itemProps, itemRefs, block, setVisible]), dropdown = clsx("dropdown", {
63
47
  "w-100": block,
64
48
  "dropdown-nowrap": noWrap,
65
49
  overflow
@@ -67,7 +51,7 @@ const Root = /* @__PURE__ */ forwardRef(({
67
51
  return useEffect(() => {
68
52
  onToggle == null || onToggle(visible);
69
53
  }, [visible]), /* @__PURE__ */ jsx(DropdownContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { ref, className: dropdown, children: typeof children == "function" ? children(triggerProps, itemRefs, setVisible) : children }) });
70
- }), Dropdown = /* @__PURE__ */ Object.assign(Root, {
54
+ }, Dropdown = /* @__PURE__ */ Object.assign(Root, {
71
55
  Trigger: DropdownTrigger,
72
56
  Menu: DropdownMenu,
73
57
  Item: DropdownItem,
@@ -4,11 +4,9 @@ export interface LayoutProps extends ComponentPropsWithoutRef<any> {
4
4
  children: ReactNode;
5
5
  /** Full screen mode without header component */
6
6
  headless?: boolean;
7
- /** Control white background - defaults to true */
8
- whiteBg?: boolean;
9
7
  }
10
8
  export declare const Layout: {
11
- ({ children, headless, whiteBg, ...restProps }: LayoutProps): import("react/jsx-runtime").JSX.Element;
9
+ ({ children, headless, ...restProps }: LayoutProps): import("react/jsx-runtime").JSX.Element;
12
10
  displayName: string;
13
11
  };
14
12
  export default Layout;
@@ -12,7 +12,6 @@ import Button from "../Button/Button.js";
12
12
  const Layout = ({
13
13
  children,
14
14
  headless = !1,
15
- whiteBg = !0,
16
15
  ...restProps
17
16
  }) => {
18
17
  const {
@@ -25,8 +24,7 @@ const Layout = ({
25
24
  handleCloseCookiesConsent
26
25
  } = useCookiesConsent();
27
26
  useZendeskGuide(), useCantoo();
28
- const classes = clsx("d-flex flex-column", {
29
- "bg-white": whiteBg,
27
+ const classes = clsx("d-flex flex-column bg-white", {
30
28
  "container-fluid": !headless,
31
29
  "rounded-4 border": (theme == null ? void 0 : theme.is1d) && !headless,
32
30
  "mt-24": (theme == null ? void 0 : theme.is1d) && !headless
@@ -17,20 +17,12 @@ export interface TabsProps {
17
17
  * Children Props
18
18
  */
19
19
  children?: (...props: any) => ReactNode;
20
- /**
21
- * Whether tabs should take full available width
22
- */
23
- fullWidth?: boolean;
24
- /**
25
- * Whether tabs should take full available height
26
- */
27
- fullHeight?: boolean;
28
20
  }
29
21
  /**
30
22
  * Tab Content displayed one at a time when a Tab Item is selected
31
23
  */
32
24
  export declare const Tabs: {
33
- ({ defaultId, items, fullWidth, fullHeight, onChange, children, }: TabsProps): import("react/jsx-runtime").JSX.Element;
25
+ ({ defaultId, items, onChange, children }: TabsProps): import("react/jsx-runtime").JSX.Element;
34
26
  Item: {
35
27
  ({ icon, badge, label, id, order, }: TabsItemProps & {
36
28
  order: number;
@@ -38,11 +30,11 @@ export declare const Tabs: {
38
30
  displayName: string;
39
31
  };
40
32
  Panel: {
41
- ({ children, currentItem, fullHeight }: import('./TabsPanel').TabsPanelProps): import("react/jsx-runtime").JSX.Element;
33
+ ({ children, currentItem }: import('./TabsPanel').TabsPanelProps): import("react/jsx-runtime").JSX.Element;
42
34
  displayName: string;
43
35
  };
44
36
  List: {
45
- (props: import('./TabsList').TabsListProps): import("react/jsx-runtime").JSX.Element;
37
+ (props: import('react').ComponentPropsWithoutRef<"div">): import("react/jsx-runtime").JSX.Element;
46
38
  displayName: string;
47
39
  };
48
40
  displayName: string;
@@ -8,8 +8,6 @@ import TabsPanel from "./TabsPanel.js";
8
8
  const Tabs = ({
9
9
  defaultId,
10
10
  items,
11
- fullWidth = !1,
12
- fullHeight = !1,
13
11
  onChange,
14
12
  children
15
13
  }) => {
@@ -34,8 +32,8 @@ const Tabs = ({
34
32
  onKeyDown
35
33
  }), [activeTab, items, onKeyDown, setSelectedTab, tabUnderlineLeft, tabUnderlineWidth, tabsRef]), currentItem = items.find((item) => item.id === activeTab);
36
34
  return /* @__PURE__ */ jsx(TabsContext.Provider, { value, children: typeof children == "function" ? children(currentItem) : /* @__PURE__ */ jsxs(Fragment, { children: [
37
- /* @__PURE__ */ jsx(Tabs.List, { fullWidth }),
38
- /* @__PURE__ */ jsx(Tabs.Panel, { currentItem, fullHeight, children: currentItem == null ? void 0 : currentItem.content })
35
+ /* @__PURE__ */ jsx(Tabs.List, {}),
36
+ /* @__PURE__ */ jsx(Tabs.Panel, { currentItem, children: currentItem == null ? void 0 : currentItem.content })
39
37
  ] }) });
40
38
  };
41
39
  Tabs.Item = TabsItem;
@@ -1,12 +1,6 @@
1
1
  import { ComponentPropsWithoutRef } from 'react';
2
- export interface TabsListProps extends ComponentPropsWithoutRef<'div'> {
3
- /**
4
- * Whether tabs should take full available width
5
- */
6
- fullWidth?: boolean;
7
- }
8
2
  declare const TabsList: {
9
- (props: TabsListProps): import("react/jsx-runtime").JSX.Element;
3
+ (props: ComponentPropsWithoutRef<"div">): import("react/jsx-runtime").JSX.Element;
10
4
  displayName: string;
11
5
  };
12
6
  export default TabsList;
@@ -9,13 +9,10 @@ const TabsList = (props) => {
9
9
  tabUnderlineWidth
10
10
  } = useTabsContext(), {
11
11
  className,
12
- fullWidth,
13
12
  ...restProps
14
- } = props, ulClasses = clsx("nav nav-tabs flex-nowrap", {
15
- "w-100": fullWidth
16
- }), tabslist = clsx("position-relative flex-shrink-0 overflow-x-auto", className);
13
+ } = props, tabslist = clsx("position-relative flex-shrink-0 overflow-x-auto", className);
17
14
  return /* @__PURE__ */ jsxs("div", { className: tabslist, ...restProps, children: [
18
- /* @__PURE__ */ jsx("ul", { className: ulClasses, role: "tablist", children: items.map((item, order) => /* @__PURE__ */ jsx(Tabs.Item, { order, ...item }, item.id)) }),
15
+ /* @__PURE__ */ jsx("ul", { className: "nav nav-tabs flex-nowrap", role: "tablist", children: items.map((item, order) => /* @__PURE__ */ jsx(Tabs.Item, { order, ...item }, item.id)) }),
19
16
  /* @__PURE__ */ jsx("span", { className: "nav-slide", style: {
20
17
  left: tabUnderlineLeft,
21
18
  width: tabUnderlineWidth
@@ -9,13 +9,9 @@ export interface TabsPanelProps {
9
9
  * Current Item
10
10
  */
11
11
  currentItem: TabsItemProps | undefined;
12
- /**
13
- * Whether tabs should take full available height
14
- */
15
- fullHeight?: boolean;
16
12
  }
17
13
  declare const TabsPanel: {
18
- ({ children, currentItem, fullHeight }: TabsPanelProps): import("react/jsx-runtime").JSX.Element;
14
+ ({ children, currentItem }: TabsPanelProps): import("react/jsx-runtime").JSX.Element;
19
15
  displayName: string;
20
16
  };
21
17
  export default TabsPanel;
@@ -1,17 +1,13 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useTabsContext } from "../context/TabsContext.js";
3
- import clsx from "clsx";
4
3
  const TabsPanel = ({
5
4
  children,
6
- currentItem,
7
- fullHeight
5
+ currentItem
8
6
  }) => {
9
7
  const {
10
8
  activeTab
11
- } = useTabsContext(), contentClasses = clsx("tab-content d-flex flex-fill w-100", {
12
- "position-relative h-100": fullHeight
13
- });
14
- return /* @__PURE__ */ jsx("div", { className: contentClasses, children: /* @__PURE__ */ jsx("div", { className: `tab-pane flex-fill w-100 fade ${activeTab === (currentItem == null ? void 0 : currentItem.id) ? "show active" : ""}`, id: `tabpanel-${currentItem == null ? void 0 : currentItem.id}`, role: "tabpanel", "aria-labelledby": `tab-${currentItem == null ? void 0 : currentItem.id}`, tabIndex: 0, children }) });
9
+ } = useTabsContext();
10
+ return /* @__PURE__ */ jsx("div", { className: "tab-content d-flex flex-fill w-100", children: /* @__PURE__ */ jsx("div", { className: `tab-pane flex-fill w-100 fade ${activeTab === (currentItem == null ? void 0 : currentItem.id) ? "show active" : ""}`, id: `tabpanel-${currentItem == null ? void 0 : currentItem.id}`, role: "tabpanel", "aria-labelledby": `tab-${currentItem == null ? void 0 : currentItem.id}`, tabIndex: 0, children }) });
15
11
  };
16
12
  export {
17
13
  TabsPanel as default
@@ -28,8 +28,6 @@ export interface UseDropdownProps {
28
28
  itemProps: Record<string, any>;
29
29
  setVisible: Dispatch<SetStateAction<boolean>>;
30
30
  openOnSpace?: boolean;
31
- openDropdown: () => void;
32
- closeDropdown: () => void;
33
31
  }
34
32
  declare const useDropdown: (placement: Placement | undefined, extraTriggerKeyDownHandler?: (event: React.KeyboardEvent<HTMLButtonElement>) => void, isTriggerHovered?: boolean, focusOnVisible?: boolean, openOnSpace?: boolean, focusOnMouseEnter?: boolean) => UseDropdownProps;
35
33
  export default useDropdown;
@@ -159,8 +159,6 @@ const useDropdown = (placement, extraTriggerKeyDownHandler, isTriggerHovered = !
159
159
  onMenuItemClick: closeDropdown,
160
160
  onMenuItemKeyDown
161
161
  },
162
- openDropdown,
163
- closeDropdown,
164
162
  setVisible
165
163
  };
166
164
  };
package/dist/index.js CHANGED
@@ -92,12 +92,11 @@ import { default as default91 } from "./modules/multimedia/AudioRecorder/AudioRe
92
92
  import { default as default92 } from "./modules/multimedia/Embed/Embed.js";
93
93
  import { default as default93 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
94
94
  import { default as default94 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
95
- import { default as default95 } from "./modules/multimedia/FileCard/FileCard.js";
96
- import { default as default96 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
97
- import { default as default97 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
98
- import { default as default98 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
99
- import { default as default99 } from "./modules/multimedia/Workspace/Workspace.js";
100
- import { default as default100 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
95
+ import { default as default95 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
96
+ import { default as default96 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
97
+ import { default as default97 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
98
+ import { default as default98 } from "./modules/multimedia/Workspace/Workspace.js";
99
+ import { default as default99 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
101
100
  import { AccessiblePalette, DefaultPalette } from "./components/ColorPicker/ColorPalette.js";
102
101
  import { DropzoneContext, useDropzoneContext } from "./components/Dropzone/DropzoneContext.js";
103
102
  import { Column, Grid } from "./components/Grid/Grid.js";
@@ -160,7 +159,6 @@ export {
160
159
  default92 as Embed,
161
160
  default21 as EmptyScreen,
162
161
  ExternalLinker,
163
- default95 as FileCard,
164
162
  default22 as Flex,
165
163
  default24 as FormControl,
166
164
  default23 as FormText,
@@ -178,7 +176,7 @@ export {
178
176
  default29 as Loading,
179
177
  default30 as LoadingScreen,
180
178
  default31 as Logo,
181
- default96 as MediaLibrary,
179
+ default95 as MediaLibrary,
182
180
  Menu,
183
181
  MockedProvider,
184
182
  default32 as Modal,
@@ -209,13 +207,13 @@ export {
209
207
  TreeNode,
210
208
  TreeNodeFolderWrapper,
211
209
  default46 as TreeView,
212
- default97 as VideoEmbed,
213
- default98 as VideoRecorder,
210
+ default96 as VideoEmbed,
211
+ default97 as VideoRecorder,
214
212
  default47 as VisuallyHidden,
215
213
  WORKSPACE_SHARED_FOLDER_ID,
216
214
  WORKSPACE_USER_FOLDER_ID,
217
- default99 as Workspace,
218
- default100 as WorkspaceFolders,
215
+ default98 as Workspace,
216
+ default99 as WorkspaceFolders,
219
217
  addNode,
220
218
  arrayUnique,
221
219
  buildTree,
@@ -46,7 +46,7 @@ const TableToolbarAddMenu = ({
46
46
  }];
47
47
  return /* @__PURE__ */ jsxs(Fragment, { children: [
48
48
  /* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.table.toolbar.tooltip.add"), placement: "top", children: /* @__PURE__ */ jsx(Dropdown.Trigger, { variant: "ghost", label: t("tiptap.table.toolbar.add") }) }),
49
- /* @__PURE__ */ jsx(Dropdown.Menu, { children: addOptions.map((option) => /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: option.onClick, children: option.label }) }, option.key)) })
49
+ /* @__PURE__ */ jsx(Dropdown.Menu, { children: addOptions.map((option) => /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: option.onClick, children: option.label }, option.key) })) })
50
50
  ] });
51
51
  };
52
52
  export {
@@ -40,7 +40,7 @@ const TableToolbarDelMenu = ({
40
40
  }];
41
41
  return /* @__PURE__ */ jsxs(Fragment, { children: [
42
42
  /* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.table.toolbar.tooltip.del"), placement: "top", children: /* @__PURE__ */ jsx(Dropdown.Trigger, { variant: "ghost", label: t("tiptap.table.toolbar.del") }) }),
43
- /* @__PURE__ */ jsx(Dropdown.Menu, { children: delOptions.map((option) => /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: option.onClick, children: option.label }) }, option.key)) })
43
+ /* @__PURE__ */ jsx(Dropdown.Menu, { children: delOptions.map((option) => /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: option.onClick, children: option.label }, option.key) })) })
44
44
  ] });
45
45
  };
46
46
  export {
@@ -1,24 +1,13 @@
1
- import { ReactNode } from 'react';
2
1
  import { WorkspaceElement } from '@edifice.io/client';
3
2
  import { CardProps } from '../../../components';
4
3
  export interface FileCardProps extends CardProps {
5
4
  /**
6
5
  * WorkspaceElement
7
- */
6
+ * */
8
7
  doc: WorkspaceElement;
9
- /**
10
- * Custom icon to override the default based on file type
11
- * Can be a string or a React node
12
- */
13
- customIcon?: ReactNode;
14
- /**
15
- * Custom color class to override the default based on file type
16
- * Example: "bg-purple-300" or any valid CSS class
17
- */
18
- customColor?: string;
19
8
  }
20
9
  declare const FileCard: {
21
- ({ doc, isClickable, isSelectable, isSelected, onClick, className, onSelect, isFocused, app, customIcon, customColor, }: FileCardProps): import("react/jsx-runtime").JSX.Element;
10
+ ({ doc, isClickable, isSelectable, isSelected, onClick, className, }: FileCardProps): import("react/jsx-runtime").JSX.Element;
22
11
  displayName: string;
23
12
  };
24
13
  export default FileCard;
@@ -15,21 +15,11 @@ const FileCard = ({
15
15
  isSelectable = !1,
16
16
  isSelected = !1,
17
17
  onClick,
18
- className,
19
- onSelect,
20
- isFocused,
21
- app,
22
- customIcon,
23
- customColor
18
+ className
24
19
  }) => {
20
+ var _a;
25
21
  const ref = useRef(null), type = DocumentHelper.getRole(doc);
26
22
  function getRoleMap(type2) {
27
- if (customIcon !== void 0 || customColor !== void 0)
28
- return {
29
- icon: customIcon || /* @__PURE__ */ jsx(SvgIconTextPage, { width: 22, height: 22 }),
30
- color: customColor || "bg-gray-300",
31
- hasShadow: !1
32
- };
33
23
  const roleMappings = {
34
24
  csv: {
35
25
  icon: ".CSV",
@@ -82,17 +72,17 @@ const FileCard = ({
82
72
  };
83
73
  return roleMappings[type2] || roleMappings.unknown;
84
74
  }
85
- const roleMap = getRoleMap(type ?? "unknown"), file = clsx("file position-relative rounded", (roleMap == null ? void 0 : roleMap.color) ?? "bg-yellow-200"), mediaSrc = type === "img" || type === "video" ? odeServices.workspace().getThumbnailUrl(doc) : null, hasThumbnail = useThumbnail(mediaSrc, {
75
+ const file = clsx("file position-relative rounded", ((_a = getRoleMap(type ?? "default")) == null ? void 0 : _a.color) ?? "bg-yellow-200"), mediaSrc = type === "img" || type === "video" ? odeServices.workspace().getThumbnailUrl(doc) : null, hasThumbnail = useThumbnail(mediaSrc, {
86
76
  ref
87
77
  }), imageStyles = hasThumbnail && {
88
78
  backgroundImage: `url(${mediaSrc})`,
89
79
  backgroundSize: "cover"
90
80
  };
91
- return /* @__PURE__ */ jsx(Card, { className: clsx("card-file", className), isClickable, isSelectable, isSelected, onClick, app, isFocused, onSelect, children: /* @__PURE__ */ jsxs(Card.Body, { space: "8", children: [
81
+ return /* @__PURE__ */ jsx(Card, { className: clsx("card-file", className), isClickable, isSelectable, isSelected, onClick, children: /* @__PURE__ */ jsxs(Card.Body, { space: "8", children: [
92
82
  /* @__PURE__ */ jsx("div", { ref, className: file, style: {
93
83
  aspectRatio: "16/10",
94
84
  ...imageStyles
95
- }, children: type !== "img" || type === "img" && !hasThumbnail ? /* @__PURE__ */ jsx(FileIcon, { type, roleMap }) : null }),
85
+ }, children: type !== "img" || type === "img" && !hasThumbnail ? /* @__PURE__ */ jsx(FileIcon, { type, roleMap: getRoleMap(type) }) : null }),
96
86
  /* @__PURE__ */ jsxs("div", { className: "mt-4", children: [
97
87
  /* @__PURE__ */ jsx(Card.Text, { children: doc.name }),
98
88
  /* @__PURE__ */ jsx(Card.Text, { className: "text-black-50", children: doc == null ? void 0 : doc.ownerName })
@@ -1,10 +1,6 @@
1
1
  import { Role } from '@edifice.io/client';
2
2
  declare const FileIcon: ({ type, roleMap, }: {
3
3
  type: Role | "unknown";
4
- roleMap?: {
5
- icon: React.ReactNode | string;
6
- color: string;
7
- hasShadow?: boolean;
8
- };
4
+ roleMap?: Record<string, string | JSX.Element>;
9
5
  }) => import("react/jsx-runtime").JSX.Element;
10
6
  export default FileIcon;
@@ -5,8 +5,8 @@ const FileIcon = ({
5
5
  type,
6
6
  roleMap
7
7
  }) => {
8
- const hasShadow = typeof (roleMap == null ? void 0 : roleMap.icon) != "string" && type !== "unknown" && (roleMap == null ? void 0 : roleMap.hasShadow) !== !1, fileicon = clsx("position-absolute top-50 start-50 translate-middle", {
9
- "p-12 rounded-circle shadow": hasShadow
8
+ const hasNoShadow = typeof (roleMap == null ? void 0 : roleMap.icon) != "string" && type !== "unknown", fileicon = clsx("position-absolute top-50 start-50 translate-middle", {
9
+ "p-12 rounded-circle shadow": hasNoShadow
10
10
  }, roleMap == null ? void 0 : roleMap.color);
11
11
  return /* @__PURE__ */ jsx("div", { className: fileicon, children: (roleMap == null ? void 0 : roleMap.icon) ?? /* @__PURE__ */ jsx(SvgIconPaperclip, {}) });
12
12
  };
@@ -35,9 +35,7 @@ export type MediaLibraryType =
35
35
  /** Embedded websites */
36
36
  | 'embedder'
37
37
  /** Hyperlinks */
38
- | 'hyperlink'
39
- /** Studio mode for recording audio and video */
40
- | 'studio';
38
+ | 'hyperlink';
41
39
  export interface MediaLibraryRef {
42
40
  /** Open the Media Library on given type. */
43
41
  show: (type: MediaLibraryType) => void;
@@ -56,11 +56,6 @@ const orderedTabs = [
56
56
  embedder: {
57
57
  title: "bbm.embed.modal.title",
58
58
  defaultTab: "iframe"
59
- },
60
- // Add studio type with video-capture as default tab
61
- studio: {
62
- title: "bbm.studio.modal.title",
63
- defaultTab: "audio-capture"
64
59
  }
65
60
  }, MediaLibrary = /* @__PURE__ */ forwardRef(({
66
61
  appCode,
@@ -106,7 +101,7 @@ const orderedTabs = [
106
101
  icon: /* @__PURE__ */ jsx(SvgIconRecordVideo, {}),
107
102
  label: t("bbm.video"),
108
103
  content: /* @__PURE__ */ jsx(InnerTabs.Video, {}),
109
- availableFor: ["video", "studio"],
104
+ availableFor: ["video"],
110
105
  isEnable: () => !!videoCaptureWorkflow
111
106
  },
112
107
  "audio-capture": {
@@ -114,7 +109,7 @@ const orderedTabs = [
114
109
  icon: /* @__PURE__ */ jsx(SvgIconMic, {}),
115
110
  label: t("bbm.audio"),
116
111
  content: /* @__PURE__ */ jsx(InnerTabs.Audio, {}),
117
- availableFor: ["audio", "studio"],
112
+ availableFor: ["audio"],
118
113
  isEnable: () => !!workspaceCreateWorkflow
119
114
  },
120
115
  "external-link": {
@@ -2,7 +2,6 @@ export * from './AudioRecorder';
2
2
  export * from './Embed';
3
3
  export * from './ImageEditor';
4
4
  export * from './ImagePicker';
5
- export * from './FileCard';
6
5
  export * from './Linker';
7
6
  export * from './MediaLibrary';
8
7
  export * from './VideoEmbed';
@@ -2,25 +2,23 @@ import { default as default2 } from "./modules/multimedia/AudioRecorder/AudioRec
2
2
  import { default as default3 } from "./modules/multimedia/Embed/Embed.js";
3
3
  import { default as default4 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
4
4
  import { default as default5 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
5
- import { default as default6 } from "./modules/multimedia/FileCard/FileCard.js";
6
- import { default as default7 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
7
- import { default as default8 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
8
- import { default as default9 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
9
- import { default as default10 } from "./modules/multimedia/Workspace/Workspace.js";
10
- import { default as default11 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
5
+ import { default as default6 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
6
+ import { default as default7 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
7
+ import { default as default8 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
8
+ import { default as default9 } from "./modules/multimedia/Workspace/Workspace.js";
9
+ import { default as default10 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
11
10
  import { ExternalLinker } from "./modules/multimedia/Linker/ExternalLinker/ExternalLinker.js";
12
11
  import { InternalLinker } from "./modules/multimedia/Linker/InternalLinker/InternalLinker.js";
13
12
  export {
14
13
  default2 as AudioRecorder,
15
14
  default3 as Embed,
16
15
  ExternalLinker,
17
- default6 as FileCard,
18
16
  default4 as ImageEditor,
19
17
  default5 as ImagePicker,
20
18
  InternalLinker,
21
- default7 as MediaLibrary,
22
- default8 as VideoEmbed,
23
- default9 as VideoRecorder,
24
- default10 as Workspace,
25
- default11 as WorkspaceFolders
19
+ default6 as MediaLibrary,
20
+ default7 as VideoEmbed,
21
+ default8 as VideoRecorder,
22
+ default9 as Workspace,
23
+ default10 as WorkspaceFolders
26
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.2.11-develop-pedago.20250707151414",
3
+ "version": "2.2.11-develop.20250702174802",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -130,9 +130,9 @@
130
130
  "react-slugify": "^3.0.3",
131
131
  "swiper": "^10.1.0",
132
132
  "ua-parser-js": "^1.0.36",
133
- "@edifice.io/bootstrap": "2.2.11-develop-pedago.20250707151414",
134
- "@edifice.io/tiptap-extensions": "2.2.11-develop-pedago.20250707151414",
135
- "@edifice.io/utilities": "2.2.11-develop-pedago.20250707151414"
133
+ "@edifice.io/bootstrap": "2.2.11-develop.20250702174802",
134
+ "@edifice.io/tiptap-extensions": "2.2.11-develop.20250702174802",
135
+ "@edifice.io/utilities": "2.2.11-develop.20250702174802"
136
136
  },
137
137
  "devDependencies": {
138
138
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -163,8 +163,8 @@
163
163
  "vite": "^5.4.11",
164
164
  "vite-plugin-dts": "^4.1.0",
165
165
  "vite-tsconfig-paths": "^5.0.1",
166
- "@edifice.io/client": "2.2.11-develop-pedago.20250707151414",
167
- "@edifice.io/config": "2.2.11-develop-pedago.20250707151414"
166
+ "@edifice.io/client": "2.2.11-develop.20250702174802",
167
+ "@edifice.io/config": "2.2.11-develop.20250702174802"
168
168
  },
169
169
  "peerDependencies": {
170
170
  "@react-spring/web": "^9.7.5",