@edifice.io/react 2.1.2 → 2.2.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.
package/dist/editor.js CHANGED
@@ -1,17 +1,18 @@
1
- import { EditorContent, useEditor } from "@tiptap/react";
2
- import { default as default2 } from "./modules/editor/components/Editor/Editor.js";
3
- import { default as default3 } from "./modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js";
4
- import { default as default4 } from "./modules/editor/components/NodeView/AudioNodeView.js";
5
- import { default as default5 } from "./modules/editor/components/NodeView/AttachmentNodeView.js";
6
- import { default as default6 } from "./modules/editor/components/NodeView/ImageNodeView.js";
7
- import { default as default7 } from "./modules/editor/components/NodeView/LinkerNodeView.js";
8
- import { default as default8 } from "./modules/editor/components/NodeView/VideoNodeView.js";
9
- import { default as default9 } from "./modules/editor/components/Renderer/AudioRenderer.js";
10
- import { default as default10 } from "./modules/editor/components/Renderer/AttachmentRenderer.js";
11
- import { default as default11 } from "./modules/editor/components/Renderer/LinkerRenderer.js";
12
- import { default as default12 } from "./modules/editor/components/Renderer/MediaRenderer.js";
13
- import { default as default13 } from "./modules/editor/components/Toolbar/TableToolbar.js";
14
- import { default as default14 } from "./modules/editor/components/Toolbar/LinkToolbar.js";
1
+ import { EditorContent, Editor, useEditor } from "@tiptap/react";
2
+ import { default as default2 } from "@tiptap/starter-kit";
3
+ import { default as default3 } from "./modules/editor/components/Editor/Editor.js";
4
+ import { default as default4 } from "./modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js";
5
+ import { default as default5 } from "./modules/editor/components/NodeView/AudioNodeView.js";
6
+ import { default as default6 } from "./modules/editor/components/NodeView/AttachmentNodeView.js";
7
+ import { default as default7 } from "./modules/editor/components/NodeView/ImageNodeView.js";
8
+ import { default as default8 } from "./modules/editor/components/NodeView/LinkerNodeView.js";
9
+ import { default as default9 } from "./modules/editor/components/NodeView/VideoNodeView.js";
10
+ import { default as default10 } from "./modules/editor/components/Renderer/AudioRenderer.js";
11
+ import { default as default11 } from "./modules/editor/components/Renderer/AttachmentRenderer.js";
12
+ import { default as default12 } from "./modules/editor/components/Renderer/LinkerRenderer.js";
13
+ import { default as default13 } from "./modules/editor/components/Renderer/MediaRenderer.js";
14
+ import { default as default14 } from "./modules/editor/components/Toolbar/TableToolbar.js";
15
+ import { default as default15 } from "./modules/editor/components/Toolbar/LinkToolbar.js";
15
16
  import { EditorToolbar } from "./modules/editor/components/EditorToolbar/EditorToolbar.js";
16
17
  import { useActionOptions } from "./modules/editor/hooks/useActionOptions.js";
17
18
  import { useCommentEditor } from "./modules/editor/hooks/useCommentEditor.js";
@@ -26,22 +27,24 @@ import { useSpeechRecognition } from "./modules/editor/hooks/useSpeechRecognitio
26
27
  import { useSpeechSynthetisis } from "./modules/editor/hooks/useSpeechSynthetisis.js";
27
28
  import { useTipTapEditor } from "./modules/editor/hooks/useTipTapEditor.js";
28
29
  export {
29
- default5 as AttachmentNodeView,
30
- default10 as AttachmentRenderer,
31
- default4 as AudioNodeView,
32
- default9 as AudioRenderer,
33
- default3 as BubbleMenuEditImage,
34
- default2 as Editor,
30
+ default6 as AttachmentNodeView,
31
+ default11 as AttachmentRenderer,
32
+ default5 as AudioNodeView,
33
+ default10 as AudioRenderer,
34
+ default4 as BubbleMenuEditImage,
35
+ default3 as Editor,
35
36
  EditorContent,
36
37
  EditorContext,
38
+ Editor as EditorInstance,
37
39
  EditorToolbar,
38
- default6 as ImageNodeView,
39
- default14 as LinkToolbar,
40
- default7 as LinkerNodeView,
41
- default11 as LinkerRenderer,
42
- default12 as MediaRenderer,
43
- default13 as TableToolbar,
44
- default8 as VideoNodeView,
40
+ default7 as ImageNodeView,
41
+ default15 as LinkToolbar,
42
+ default8 as LinkerNodeView,
43
+ default12 as LinkerRenderer,
44
+ default13 as MediaRenderer,
45
+ default2 as StarterKit,
46
+ default14 as TableToolbar,
47
+ default9 as VideoNodeView,
45
48
  useActionOptions,
46
49
  useCommentEditor,
47
50
  useEditor,
@@ -1,6 +1,10 @@
1
1
  export declare const useCheckable: <T extends {
2
2
  _id: string;
3
- }>(data: T[] | undefined) => {
3
+ }>(
4
+ /**
5
+ * Generic data
6
+ */
7
+ data: T[] | undefined) => {
4
8
  selectedItems: string[];
5
9
  allItemsSelected: boolean;
6
10
  isIndeterminate: boolean;
@@ -1,6 +1,7 @@
1
1
  import { useState, useCallback } from "react";
2
2
  import { ERROR_CODE, odeServices } from "@edifice.io/client";
3
3
  import { getOrGenerateBlobId } from "@edifice.io/utilities";
4
+ import { useTranslation } from "react-i18next";
4
5
  import useBrowserInfo from "../useBrowserInfo/useBrowserInfo.js";
5
6
  import useWorkspaceFile from "../useWorkspaceFile/useWorkspaceFile.js";
6
7
  const useUpload = (visibility, application = "media-library") => {
@@ -9,7 +10,9 @@ const useUpload = (visibility, application = "media-library") => {
9
10
  device
10
11
  } = useBrowserInfo(navigator.userAgent), {
11
12
  create
12
- } = useWorkspaceFile(), getUploadStatus = useCallback((upload) => status[getOrGenerateBlobId(upload)], [status]), setUploadStatus = (blob, status2) => {
13
+ } = useWorkspaceFile(), {
14
+ t
15
+ } = useTranslation(), getUploadStatus = useCallback((upload) => status[getOrGenerateBlobId(upload)], [status]), setUploadStatus = (blob, status2) => {
13
16
  setStatus((prevStatus) => {
14
17
  const key = getOrGenerateBlobId(blob);
15
18
  return {
@@ -25,6 +28,9 @@ const useUpload = (visibility, application = "media-library") => {
25
28
  } = prevStatus;
26
29
  return rest;
27
30
  });
31
+ }, getDefaultDate = () => {
32
+ const d = /* @__PURE__ */ new Date();
33
+ return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")} ${String(d.getHours()).padStart(2, "0")}h${String(d.getMinutes()).padStart(2, "0")} ` + t("bbm.video.recorder.defaultName");
28
34
  };
29
35
  async function uploadFile(file, metadata) {
30
36
  setUploadStatus(file, "loading");
@@ -64,7 +70,7 @@ const useUpload = (visibility, application = "media-library") => {
64
70
  },
65
71
  url: window.location.hostname,
66
72
  file: blob,
67
- filename: (metadata == null ? void 0 : metadata.filename) ?? "filename",
73
+ filename: getDefaultDate() ?? "filename",
68
74
  weight: blob.size
69
75
  },
70
76
  appCode: application,
package/dist/icons.js CHANGED
@@ -49,104 +49,106 @@ import { default as default49 } from "./modules/icons/components/IconFolder.js";
49
49
  import { default as default50 } from "./modules/icons/components/IconForgoing.js";
50
50
  import { default as default51 } from "./modules/icons/components/IconFullScreen.js";
51
51
  import { default as default52 } from "./modules/icons/components/IconGlobe.js";
52
- import { default as default53 } from "./modules/icons/components/IconHeadphone.js";
53
- import { default as default54 } from "./modules/icons/components/IconHide.js";
54
- import { default as default55 } from "./modules/icons/components/IconHighlightColumn.js";
55
- import { default as default56 } from "./modules/icons/components/IconHighlightRow.js";
56
- import { default as default57 } from "./modules/icons/components/IconHome.js";
57
- import { default as default58 } from "./modules/icons/components/IconHourglass.js";
58
- import { default as default59 } from "./modules/icons/components/IconImageSizeLarge.js";
59
- import { default as default60 } from "./modules/icons/components/IconImageSizeMedium.js";
60
- import { default as default61 } from "./modules/icons/components/IconImageSizeSmall.js";
61
- import { default as default62 } from "./modules/icons/components/IconInbox.js";
62
- import { default as default63 } from "./modules/icons/components/IconInfoCircle.js";
63
- import { default as default64 } from "./modules/icons/components/IconLandscape.js";
64
- import { default as default65 } from "./modules/icons/components/IconLink.js";
65
- import { default as default66 } from "./modules/icons/components/IconListOrder.js";
66
- import { default as default67 } from "./modules/icons/components/IconLoader.js";
67
- import { default as default68 } from "./modules/icons/components/IconLock.js";
68
- import { default as default69 } from "./modules/icons/components/IconMail.js";
69
- import { default as default70 } from "./modules/icons/components/IconMergeCells.js";
70
- import { default as default71 } from "./modules/icons/components/IconMessageInfo.js";
71
- import { default as default72 } from "./modules/icons/components/IconMic.js";
72
- import { default as default73 } from "./modules/icons/components/IconMinus.js";
73
- import { default as default74 } from "./modules/icons/components/IconMove.js";
74
- import { default as default75 } from "./modules/icons/components/IconNoColors.js";
75
- import { default as default76 } from "./modules/icons/components/IconOptions.js";
76
- import { default as default77 } from "./modules/icons/components/IconOrderedList.js";
77
- import { default as default78 } from "./modules/icons/components/IconPaperclip.js";
78
- import { default as default79 } from "./modules/icons/components/IconPause.js";
79
- import { default as default80 } from "./modules/icons/components/IconPinOff.js";
80
- import { default as default81 } from "./modules/icons/components/IconPinOn.js";
81
- import { default as default82 } from "./modules/icons/components/IconPlaceholder.js";
82
- import { default as default83 } from "./modules/icons/components/IconPlayFilled.js";
83
- import { default as default84 } from "./modules/icons/components/IconPlay.js";
84
- import { default as default85 } from "./modules/icons/components/IconPlus.js";
85
- import { default as default86 } from "./modules/icons/components/IconPointerDefault.js";
86
- import { default as default87 } from "./modules/icons/components/IconPointerHand.js";
87
- import { default as default88 } from "./modules/icons/components/IconPrint.js";
88
- import { default as default89 } from "./modules/icons/components/IconQuestion.js";
89
- import { default as default90 } from "./modules/icons/components/IconRafterDown.js";
90
- import { default as default91 } from "./modules/icons/components/IconRafterLeft.js";
91
- import { default as default92 } from "./modules/icons/components/IconRafterRight.js";
92
- import { default as default93 } from "./modules/icons/components/IconRafterUp.js";
93
- import { default as default94 } from "./modules/icons/components/IconReaction.js";
94
- import { default as default95 } from "./modules/icons/components/IconRecordPause.js";
95
- import { default as default96 } from "./modules/icons/components/IconRecordStop.js";
96
- import { default as default97 } from "./modules/icons/components/IconRecordVideo.js";
97
- import { default as default98 } from "./modules/icons/components/IconRecord.js";
98
- import { default as default99 } from "./modules/icons/components/IconRedo.js";
99
- import { default as default100 } from "./modules/icons/components/IconRefresh.js";
100
- import { default as default101 } from "./modules/icons/components/IconReset.js";
101
- import { default as default102 } from "./modules/icons/components/IconRestart.js";
102
- import { default as default103 } from "./modules/icons/components/IconRestore.js";
103
- import { default as default104 } from "./modules/icons/components/IconSave.js";
104
- import { default as default105 } from "./modules/icons/components/IconSearch.js";
105
- import { default as default106 } from "./modules/icons/components/IconSee.js";
106
- import { default as default107 } from "./modules/icons/components/IconSend.js";
107
- import { default as default108 } from "./modules/icons/components/IconSetBackground.js";
108
- import { default as default109 } from "./modules/icons/components/IconSettings.js";
109
- import { default as default110 } from "./modules/icons/components/IconShare.js";
110
- import { default as default111 } from "./modules/icons/components/IconSmartphone.js";
111
- import { default as default112 } from "./modules/icons/components/IconSmiley.js";
112
- import { default as default113 } from "./modules/icons/components/IconSortAscendingLetters.js";
113
- import { default as default114 } from "./modules/icons/components/IconSortDescendingLetters.js";
114
- import { default as default115 } from "./modules/icons/components/IconSortDescending.js";
115
- import { default as default116 } from "./modules/icons/components/IconSortTime.js";
116
- import { default as default117 } from "./modules/icons/components/IconSpeechToText.js";
117
- import { default as default118 } from "./modules/icons/components/IconSplitCells.js";
118
- import { default as default119 } from "./modules/icons/components/IconSquareRoot.js";
119
- import { default as default120 } from "./modules/icons/components/IconSubscript.js";
120
- import { default as default121 } from "./modules/icons/components/IconSuccessFill.js";
121
- import { default as default122 } from "./modules/icons/components/IconSuccessOutline.js";
122
- import { default as default123 } from "./modules/icons/components/IconSuperscript.js";
123
- import { default as default124 } from "./modules/icons/components/IconTable.js";
124
- import { default as default125 } from "./modules/icons/components/IconTextBold.js";
125
- import { default as default126 } from "./modules/icons/components/IconTextColor.js";
126
- import { default as default127 } from "./modules/icons/components/IconTextHighlight.js";
127
- import { default as default128 } from "./modules/icons/components/IconTextItalic.js";
128
- import { default as default129 } from "./modules/icons/components/IconTextPage.js";
129
- import { default as default130 } from "./modules/icons/components/IconTextSize.js";
130
- import { default as default131 } from "./modules/icons/components/IconTextToSpeech.js";
131
- import { default as default132 } from "./modules/icons/components/IconTextTypo.js";
132
- import { default as default133 } from "./modules/icons/components/IconTextUnderline.js";
133
- import { default as default134 } from "./modules/icons/components/IconTextVanilla.js";
134
- import { default as default135 } from "./modules/icons/components/IconTool.js";
135
- import { default as default136 } from "./modules/icons/components/IconTrendingUp.js";
136
- import { default as default137 } from "./modules/icons/components/IconUndo.js";
137
- import { default as default138 } from "./modules/icons/components/IconUnlink.js";
138
- import { default as default139 } from "./modules/icons/components/IconUnlock.js";
139
- import { default as default140 } from "./modules/icons/components/IconUpload.js";
140
- import { default as default141 } from "./modules/icons/components/IconUserSearch.js";
141
- import { default as default142 } from "./modules/icons/components/IconUser.js";
142
- import { default as default143 } from "./modules/icons/components/IconUsers.js";
143
- import { default as default144 } from "./modules/icons/components/IconVideo.js";
144
- import { default as default145 } from "./modules/icons/components/IconViewCalendar.js";
145
- import { default as default146 } from "./modules/icons/components/IconViewList.js";
146
- import { default as default147 } from "./modules/icons/components/IconWand.js";
147
- import { default as default148 } from "./modules/icons/components/IconWrite.js";
148
- import { default as default149 } from "./modules/icons/components/IconZoomIn.js";
149
- import { default as default150 } from "./modules/icons/components/IconZoomOut.js";
52
+ import { default as default53 } from "./modules/icons/components/IconHandMove.js";
53
+ import { default as default54 } from "./modules/icons/components/IconHeadphone.js";
54
+ import { default as default55 } from "./modules/icons/components/IconHide.js";
55
+ import { default as default56 } from "./modules/icons/components/IconHighlightColumn.js";
56
+ import { default as default57 } from "./modules/icons/components/IconHighlightRow.js";
57
+ import { default as default58 } from "./modules/icons/components/IconHome.js";
58
+ import { default as default59 } from "./modules/icons/components/IconHourglass.js";
59
+ import { default as default60 } from "./modules/icons/components/IconImageSizeLarge.js";
60
+ import { default as default61 } from "./modules/icons/components/IconImageSizeMedium.js";
61
+ import { default as default62 } from "./modules/icons/components/IconImageSizeSmall.js";
62
+ import { default as default63 } from "./modules/icons/components/IconInbox.js";
63
+ import { default as default64 } from "./modules/icons/components/IconInfoCircle.js";
64
+ import { default as default65 } from "./modules/icons/components/IconLandscape.js";
65
+ import { default as default66 } from "./modules/icons/components/IconLink.js";
66
+ import { default as default67 } from "./modules/icons/components/IconListOrder.js";
67
+ import { default as default68 } from "./modules/icons/components/IconLoader.js";
68
+ import { default as default69 } from "./modules/icons/components/IconLock.js";
69
+ import { default as default70 } from "./modules/icons/components/IconMail.js";
70
+ import { default as default71 } from "./modules/icons/components/IconMergeCells.js";
71
+ import { default as default72 } from "./modules/icons/components/IconMessageInfo.js";
72
+ import { default as default73 } from "./modules/icons/components/IconMic.js";
73
+ import { default as default74 } from "./modules/icons/components/IconMinus.js";
74
+ import { default as default75 } from "./modules/icons/components/IconMove.js";
75
+ import { default as default76 } from "./modules/icons/components/IconNoColors.js";
76
+ import { default as default77 } from "./modules/icons/components/IconOptions.js";
77
+ import { default as default78 } from "./modules/icons/components/IconOrderedList.js";
78
+ import { default as default79 } from "./modules/icons/components/IconPaperclip.js";
79
+ import { default as default80 } from "./modules/icons/components/IconPause.js";
80
+ import { default as default81 } from "./modules/icons/components/IconPinOff.js";
81
+ import { default as default82 } from "./modules/icons/components/IconPinOn.js";
82
+ import { default as default83 } from "./modules/icons/components/IconPlaceholder.js";
83
+ import { default as default84 } from "./modules/icons/components/IconPlayFilled.js";
84
+ import { default as default85 } from "./modules/icons/components/IconPlay.js";
85
+ import { default as default86 } from "./modules/icons/components/IconPlus.js";
86
+ import { default as default87 } from "./modules/icons/components/IconPointerDefault.js";
87
+ import { default as default88 } from "./modules/icons/components/IconPointerHand.js";
88
+ import { default as default89 } from "./modules/icons/components/IconPrint.js";
89
+ import { default as default90 } from "./modules/icons/components/IconQuestion.js";
90
+ import { default as default91 } from "./modules/icons/components/IconRafterDown.js";
91
+ import { default as default92 } from "./modules/icons/components/IconRafterLeft.js";
92
+ import { default as default93 } from "./modules/icons/components/IconRafterRight.js";
93
+ import { default as default94 } from "./modules/icons/components/IconRafterUp.js";
94
+ import { default as default95 } from "./modules/icons/components/IconReaction.js";
95
+ import { default as default96 } from "./modules/icons/components/IconRecordPause.js";
96
+ import { default as default97 } from "./modules/icons/components/IconRecordStop.js";
97
+ import { default as default98 } from "./modules/icons/components/IconRecordVideo.js";
98
+ import { default as default99 } from "./modules/icons/components/IconRecord.js";
99
+ import { default as default100 } from "./modules/icons/components/IconRedo.js";
100
+ import { default as default101 } from "./modules/icons/components/IconRefresh.js";
101
+ import { default as default102 } from "./modules/icons/components/IconReset.js";
102
+ import { default as default103 } from "./modules/icons/components/IconRestart.js";
103
+ import { default as default104 } from "./modules/icons/components/IconRestore.js";
104
+ import { default as default105 } from "./modules/icons/components/IconSave.js";
105
+ import { default as default106 } from "./modules/icons/components/IconSearch.js";
106
+ import { default as default107 } from "./modules/icons/components/IconSee.js";
107
+ import { default as default108 } from "./modules/icons/components/IconSend.js";
108
+ import { default as default109 } from "./modules/icons/components/IconSetBackground.js";
109
+ import { default as default110 } from "./modules/icons/components/IconSettings.js";
110
+ import { default as default111 } from "./modules/icons/components/IconShare.js";
111
+ import { default as default112 } from "./modules/icons/components/IconSmartphone.js";
112
+ import { default as default113 } from "./modules/icons/components/IconSmiley.js";
113
+ import { default as default114 } from "./modules/icons/components/IconSortAscendingLetters.js";
114
+ import { default as default115 } from "./modules/icons/components/IconSortDescendingLetters.js";
115
+ import { default as default116 } from "./modules/icons/components/IconSortDescending.js";
116
+ import { default as default117 } from "./modules/icons/components/IconSortTime.js";
117
+ import { default as default118 } from "./modules/icons/components/IconSpeechToText.js";
118
+ import { default as default119 } from "./modules/icons/components/IconSplitCells.js";
119
+ import { default as default120 } from "./modules/icons/components/IconSquareRoot.js";
120
+ import { default as default121 } from "./modules/icons/components/IconSubscript.js";
121
+ import { default as default122 } from "./modules/icons/components/IconSuccessFill.js";
122
+ import { default as default123 } from "./modules/icons/components/IconSuccessOutline.js";
123
+ import { default as default124 } from "./modules/icons/components/IconSuperscript.js";
124
+ import { default as default125 } from "./modules/icons/components/IconTable.js";
125
+ import { default as default126 } from "./modules/icons/components/IconTextBold.js";
126
+ import { default as default127 } from "./modules/icons/components/IconTextColor.js";
127
+ import { default as default128 } from "./modules/icons/components/IconTextHighlight.js";
128
+ import { default as default129 } from "./modules/icons/components/IconTextItalic.js";
129
+ import { default as default130 } from "./modules/icons/components/IconTextPage.js";
130
+ import { default as default131 } from "./modules/icons/components/IconTextSize.js";
131
+ import { default as default132 } from "./modules/icons/components/IconTextToSpeech.js";
132
+ import { default as default133 } from "./modules/icons/components/IconTextTypo.js";
133
+ import { default as default134 } from "./modules/icons/components/IconTextUnderline.js";
134
+ import { default as default135 } from "./modules/icons/components/IconTextVanilla.js";
135
+ import { default as default136 } from "./modules/icons/components/IconToolCenter.js";
136
+ import { default as default137 } from "./modules/icons/components/IconTool.js";
137
+ import { default as default138 } from "./modules/icons/components/IconTrendingUp.js";
138
+ import { default as default139 } from "./modules/icons/components/IconUndo.js";
139
+ import { default as default140 } from "./modules/icons/components/IconUnlink.js";
140
+ import { default as default141 } from "./modules/icons/components/IconUnlock.js";
141
+ import { default as default142 } from "./modules/icons/components/IconUpload.js";
142
+ import { default as default143 } from "./modules/icons/components/IconUserSearch.js";
143
+ import { default as default144 } from "./modules/icons/components/IconUser.js";
144
+ import { default as default145 } from "./modules/icons/components/IconUsers.js";
145
+ import { default as default146 } from "./modules/icons/components/IconVideo.js";
146
+ import { default as default147 } from "./modules/icons/components/IconViewCalendar.js";
147
+ import { default as default148 } from "./modules/icons/components/IconViewList.js";
148
+ import { default as default149 } from "./modules/icons/components/IconWand.js";
149
+ import { default as default150 } from "./modules/icons/components/IconWrite.js";
150
+ import { default as default151 } from "./modules/icons/components/IconZoomIn.js";
151
+ import { default as default152 } from "./modules/icons/components/IconZoomOut.js";
150
152
  export {
151
153
  default3 as IconAdd,
152
154
  default2 as IconAddUser,
@@ -199,102 +201,104 @@ export {
199
201
  default50 as IconForgoing,
200
202
  default51 as IconFullScreen,
201
203
  default52 as IconGlobe,
202
- default53 as IconHeadphone,
203
- default54 as IconHide,
204
- default55 as IconHighlightColumn,
205
- default56 as IconHighlightRow,
206
- default57 as IconHome,
207
- default58 as IconHourglass,
208
- default59 as IconImageSizeLarge,
209
- default60 as IconImageSizeMedium,
210
- default61 as IconImageSizeSmall,
211
- default62 as IconInbox,
212
- default63 as IconInfoCircle,
213
- default64 as IconLandscape,
214
- default65 as IconLink,
215
- default66 as IconListOrder,
216
- default67 as IconLoader,
217
- default68 as IconLock,
218
- default69 as IconMail,
219
- default70 as IconMergeCells,
220
- default71 as IconMessageInfo,
221
- default72 as IconMic,
222
- default73 as IconMinus,
223
- default74 as IconMove,
224
- default75 as IconNoColors,
225
- default76 as IconOptions,
226
- default77 as IconOrderedList,
227
- default78 as IconPaperclip,
228
- default79 as IconPause,
229
- default80 as IconPinOff,
230
- default81 as IconPinOn,
231
- default82 as IconPlaceholder,
232
- default84 as IconPlay,
233
- default83 as IconPlayFilled,
234
- default85 as IconPlus,
235
- default86 as IconPointerDefault,
236
- default87 as IconPointerHand,
237
- default88 as IconPrint,
238
- default89 as IconQuestion,
239
- default90 as IconRafterDown,
240
- default91 as IconRafterLeft,
241
- default92 as IconRafterRight,
242
- default93 as IconRafterUp,
243
- default94 as IconReaction,
244
- default98 as IconRecord,
245
- default95 as IconRecordPause,
246
- default96 as IconRecordStop,
247
- default97 as IconRecordVideo,
248
- default99 as IconRedo,
249
- default100 as IconRefresh,
250
- default101 as IconReset,
251
- default102 as IconRestart,
252
- default103 as IconRestore,
253
- default104 as IconSave,
254
- default105 as IconSearch,
255
- default106 as IconSee,
256
- default107 as IconSend,
257
- default108 as IconSetBackground,
258
- default109 as IconSettings,
259
- default110 as IconShare,
260
- default111 as IconSmartphone,
261
- default112 as IconSmiley,
262
- default113 as IconSortAscendingLetters,
263
- default115 as IconSortDescending,
264
- default114 as IconSortDescendingLetters,
265
- default116 as IconSortTime,
266
- default117 as IconSpeechToText,
267
- default118 as IconSplitCells,
268
- default119 as IconSquareRoot,
269
- default120 as IconSubscript,
270
- default121 as IconSuccessFill,
271
- default122 as IconSuccessOutline,
272
- default123 as IconSuperscript,
273
- default124 as IconTable,
274
- default125 as IconTextBold,
275
- default126 as IconTextColor,
276
- default127 as IconTextHighlight,
277
- default128 as IconTextItalic,
278
- default129 as IconTextPage,
279
- default130 as IconTextSize,
280
- default131 as IconTextToSpeech,
281
- default132 as IconTextTypo,
282
- default133 as IconTextUnderline,
283
- default134 as IconTextVanilla,
284
- default135 as IconTool,
285
- default136 as IconTrendingUp,
286
- default137 as IconUndo,
287
- default138 as IconUnlink,
288
- default139 as IconUnlock,
289
- default140 as IconUpload,
290
- default142 as IconUser,
291
- default141 as IconUserSearch,
292
- default143 as IconUsers,
293
- default144 as IconVideo,
294
- default145 as IconViewCalendar,
295
- default146 as IconViewList,
296
- default147 as IconWand,
297
- default148 as IconWrite,
298
- default149 as IconZoomIn,
299
- default150 as IconZoomOut
204
+ default53 as IconHandMove,
205
+ default54 as IconHeadphone,
206
+ default55 as IconHide,
207
+ default56 as IconHighlightColumn,
208
+ default57 as IconHighlightRow,
209
+ default58 as IconHome,
210
+ default59 as IconHourglass,
211
+ default60 as IconImageSizeLarge,
212
+ default61 as IconImageSizeMedium,
213
+ default62 as IconImageSizeSmall,
214
+ default63 as IconInbox,
215
+ default64 as IconInfoCircle,
216
+ default65 as IconLandscape,
217
+ default66 as IconLink,
218
+ default67 as IconListOrder,
219
+ default68 as IconLoader,
220
+ default69 as IconLock,
221
+ default70 as IconMail,
222
+ default71 as IconMergeCells,
223
+ default72 as IconMessageInfo,
224
+ default73 as IconMic,
225
+ default74 as IconMinus,
226
+ default75 as IconMove,
227
+ default76 as IconNoColors,
228
+ default77 as IconOptions,
229
+ default78 as IconOrderedList,
230
+ default79 as IconPaperclip,
231
+ default80 as IconPause,
232
+ default81 as IconPinOff,
233
+ default82 as IconPinOn,
234
+ default83 as IconPlaceholder,
235
+ default85 as IconPlay,
236
+ default84 as IconPlayFilled,
237
+ default86 as IconPlus,
238
+ default87 as IconPointerDefault,
239
+ default88 as IconPointerHand,
240
+ default89 as IconPrint,
241
+ default90 as IconQuestion,
242
+ default91 as IconRafterDown,
243
+ default92 as IconRafterLeft,
244
+ default93 as IconRafterRight,
245
+ default94 as IconRafterUp,
246
+ default95 as IconReaction,
247
+ default99 as IconRecord,
248
+ default96 as IconRecordPause,
249
+ default97 as IconRecordStop,
250
+ default98 as IconRecordVideo,
251
+ default100 as IconRedo,
252
+ default101 as IconRefresh,
253
+ default102 as IconReset,
254
+ default103 as IconRestart,
255
+ default104 as IconRestore,
256
+ default105 as IconSave,
257
+ default106 as IconSearch,
258
+ default107 as IconSee,
259
+ default108 as IconSend,
260
+ default109 as IconSetBackground,
261
+ default110 as IconSettings,
262
+ default111 as IconShare,
263
+ default112 as IconSmartphone,
264
+ default113 as IconSmiley,
265
+ default114 as IconSortAscendingLetters,
266
+ default116 as IconSortDescending,
267
+ default115 as IconSortDescendingLetters,
268
+ default117 as IconSortTime,
269
+ default118 as IconSpeechToText,
270
+ default119 as IconSplitCells,
271
+ default120 as IconSquareRoot,
272
+ default121 as IconSubscript,
273
+ default122 as IconSuccessFill,
274
+ default123 as IconSuccessOutline,
275
+ default124 as IconSuperscript,
276
+ default125 as IconTable,
277
+ default126 as IconTextBold,
278
+ default127 as IconTextColor,
279
+ default128 as IconTextHighlight,
280
+ default129 as IconTextItalic,
281
+ default130 as IconTextPage,
282
+ default131 as IconTextSize,
283
+ default132 as IconTextToSpeech,
284
+ default133 as IconTextTypo,
285
+ default134 as IconTextUnderline,
286
+ default135 as IconTextVanilla,
287
+ default137 as IconTool,
288
+ default136 as IconToolCenter,
289
+ default138 as IconTrendingUp,
290
+ default139 as IconUndo,
291
+ default140 as IconUnlink,
292
+ default141 as IconUnlock,
293
+ default142 as IconUpload,
294
+ default144 as IconUser,
295
+ default143 as IconUserSearch,
296
+ default145 as IconUsers,
297
+ default146 as IconVideo,
298
+ default147 as IconViewCalendar,
299
+ default148 as IconViewList,
300
+ default149 as IconWand,
301
+ default150 as IconWrite,
302
+ default151 as IconZoomIn,
303
+ default152 as IconZoomOut
300
304
  };
@@ -1 +1,5 @@
1
- export declare const useAutosizeTextarea: (autoFocus?: boolean) => [React.RefObject<HTMLTextAreaElement>, (event: React.FocusEvent<HTMLTextAreaElement>) => void, () => void];
1
+ export declare const useAutosizeTextarea: (
2
+ /**
3
+ * Set autofocus when editing content
4
+ */
5
+ autoFocus?: boolean) => [React.RefObject<HTMLTextAreaElement>, (event: React.FocusEvent<HTMLTextAreaElement>) => void, () => void];
@@ -2,6 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef, useId, useImperativeHandle, Suspense, lazy } from "react";
3
3
  import { EditorContent } from "@tiptap/react";
4
4
  import clsx from "clsx";
5
+ import "@tiptap/starter-kit";
5
6
  import { useEdificeClient } from "../../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
6
7
  import { useMathsStyles } from "../../hooks/useMathsStyles.js";
7
8
  import { useTipTapEditor } from "../../hooks/useTipTapEditor.js";
@@ -2,6 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import "@tiptap/react";
5
+ import "@tiptap/starter-kit";
5
6
  import SvgIconAlignLeft from "../../../icons/components/IconAlignLeft.js";
6
7
  import SvgIconBulletList from "../../../icons/components/IconBulletList.js";
7
8
  import SvgIconLandscape from "../../../icons/components/IconLandscape.js";
@@ -2,6 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
3
  import { NodeViewWrapper } from "@tiptap/react";
4
4
  import { useTranslation } from "react-i18next";
5
+ import "@tiptap/starter-kit";
5
6
  import SvgIconDelete from "../../../icons/components/IconDelete.js";
6
7
  import SvgIconDownload from "../../../icons/components/IconDownload.js";
7
8
  import Attachment from "../../../../components/Attachment/Attachment.js";
@@ -5,9 +5,30 @@ const AudioRenderer = (props) => {
5
5
  node
6
6
  } = props;
7
7
  return /* @__PURE__ */ jsx(NodeViewWrapper, { style: {
8
- display: "inline-block",
9
- width: "fit-content"
10
- }, children: /* @__PURE__ */ jsx("div", { className: "audio-wrapper", "data-drag-handle": !0, children: /* @__PURE__ */ jsx("audio", { src: node.attrs.src, controls: !0, "data-document-id": node.attrs.src, children: /* @__PURE__ */ jsx("track", { kind: "captions" }) }) }) });
8
+ cursor: "text"
9
+ }, children: /* @__PURE__ */ jsx("div", { className: "audio-wrapper", "data-drag-handle": !0, style: ((textalign) => {
10
+ switch (textalign) {
11
+ case "center":
12
+ case "justify":
13
+ return {
14
+ marginLeft: "auto",
15
+ marginRight: "auto",
16
+ width: "fit-content"
17
+ };
18
+ case "left":
19
+ return {
20
+ marginRight: "auto",
21
+ width: "fit-content"
22
+ };
23
+ case "right":
24
+ return {
25
+ marginLeft: "auto",
26
+ width: "fit-content"
27
+ };
28
+ default:
29
+ return {};
30
+ }
31
+ })(node.attrs.textAlign), children: /* @__PURE__ */ jsx("audio", { src: node.attrs.src, controls: !0, "data-document-id": node.attrs.src, children: /* @__PURE__ */ jsx("track", { kind: "captions" }) }) }) });
11
32
  };
12
33
  export {
13
34
  AudioRenderer as default
@@ -58,7 +58,7 @@ const useTipTapEditor = (editable, content, focus, placeholder, onContentChange,
58
58
  }), Underline, TextStyle, Color, Subscript, Superscript, Table.configure({
59
59
  resizable: !0
60
60
  }), TableRow, TableHeader, TableCell, TextAlign.configure({
61
- types: ["heading", "paragraph", "video"]
61
+ types: ["heading", "paragraph", "video", "audio"]
62
62
  }), CustomHeading.configure({
63
63
  levels: [1, 2]
64
64
  }), Typography, FontSize, SpeechRecognition, SpeechSynthesis.configure({
@@ -1,3 +1,5 @@
1
- export { EditorContent, type Content, useEditor } from '@tiptap/react';
1
+ import { default as StarterKit } from '@tiptap/starter-kit';
2
+ export { EditorContent, type Content, useEditor, Editor as EditorInstance, } from '@tiptap/react';
3
+ export { StarterKit };
2
4
  export * from './components';
3
5
  export * from './hooks';
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconHandMove: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconHandMove;
@@ -0,0 +1,12 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconHandMove = ({
3
+ title,
4
+ titleId,
5
+ ...props
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
+ title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M9.144 4.129C9.072 4.192 9 4.293 9 4.5V13a1 1 0 0 1-1.707.707l-1.469-1.469a.87.87 0 0 0-1.06-.13.5.5 0 0 0-.178.674l1.093 1.947c1.126 2.011 1.687 3.011 2.155 3.72l.008.011c.389.607.887 1.278 2.012 1.952a5 5 0 0 0 2.354.588H14a5 5 0 0 0 5-5v-4.5a.5.5 0 1 0-1 0v.5a1 1 0 1 1-2 0v-1.5c0-.197-.07-.3-.149-.367A.57.57 0 0 0 15.5 10a.57.57 0 0 0-.351.133c-.079.068-.149.17-.149.367V12a1 1 0 1 1-2 0V9.5c0-.194-.07-.297-.15-.366A.57.57 0 0 0 12.5 9a.57.57 0 0 0-.35.134c-.08.07-.15.172-.15.366V12a1 1 0 1 1-2 0V4.5c0-.206-.072-.307-.144-.37A.57.57 0 0 0 9.497 4a.56.56 0 0 0-.353.129M12 7.055V4.5c0-1.682-1.388-2.497-2.497-2.5C8.385 1.997 7 2.822 7 4.5v6.111a2.87 2.87 0 0 0-3.263-.22 2.5 2.5 0 0 0-.895 3.371c.4.71.75 1.336 1.061 1.891 1.137 2.029 1.747 3.118 2.259 3.893.5.778 1.206 1.714 2.688 2.596l.037.02c1.02.55 2.162.838 3.321.838H14a7 7 0 0 0 7-7v-4.5a2.5 2.5 0 0 0-3.372-2.343C17.135 8.379 16.238 8 15.5 8c-.278 0-.578.054-.87.162C14.135 7.38 13.234 7 12.5 7c-.16 0-.33.018-.5.055m1.025-3.78a1 1 0 0 1 1.2-.75c1.46.337 3.04.873 4.287 1.616a1 1 0 1 1-1.024 1.718c-1.005-.599-2.366-1.074-3.713-1.385a1 1 0 0 1-.75-1.199M1.338 5.25a1 1 0 1 0 1.324 1.5c.739-.653 1.87-1.416 2.77-1.848a1 1 0 0 0-.865-1.803c-1.077.517-2.36 1.385-3.229 2.151", clipRule: "evenodd" })
9
+ ] });
10
+ export {
11
+ SvgIconHandMove as default
12
+ };
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconToolCenter: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconToolCenter;
@@ -0,0 +1,12 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconToolCenter = ({
3
+ title,
4
+ titleId,
5
+ ...props
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
+ title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M3 4.222C3 3.547 3.547 3 4.222 3h3.89a1 1 0 1 0 0-2h-3.89A3.22 3.22 0 0 0 1 4.222v2.89a1 1 0 1 0 2 0zM15.89 1a1 1 0 1 0 0 2h3.888C20.453 3 21 3.547 21 4.222v2.89a1 1 0 1 0 2 0v-2.89A3.22 3.22 0 0 0 19.778 1zM3 16.89a1 1 0 1 0-2 0v2.888A3.22 3.22 0 0 0 4.222 23h3.89a1 1 0 0 0 0-2h-3.89A1.22 1.22 0 0 1 3 19.778zm20 0a1 1 0 0 0-2 0v2.888c0 .675-.547 1.222-1.222 1.222h-3.889a1 1 0 1 0 0 2h3.889A3.22 3.22 0 0 0 23 19.778zM6 11a1 1 0 1 0 0 2h2q.063 0 .124-.008a4.01 4.01 0 0 0 2.884 2.884Q11 15.936 11 16v2a1 1 0 1 0 2 0v-2q0-.063-.008-.124a4.01 4.01 0 0 0 2.884-2.884q.06.008.124.008h2a1 1 0 1 0 0-2h-2q-.063 0-.124.008a4.01 4.01 0 0 0-2.884-2.884Q13 8.064 13 8V6a1 1 0 1 0-2 0v2q0 .063.008.124a4.01 4.01 0 0 0-2.884 2.884A1 1 0 0 0 8 11zm8 1a2 2 0 1 1-4 0 2 2 0 0 1 4 0", clipRule: "evenodd" })
9
+ ] });
10
+ export {
11
+ SvgIconToolCenter as default
12
+ };
@@ -49,6 +49,7 @@ export { default as IconFolder } from './IconFolder';
49
49
  export { default as IconForgoing } from './IconForgoing';
50
50
  export { default as IconFullScreen } from './IconFullScreen';
51
51
  export { default as IconGlobe } from './IconGlobe';
52
+ export { default as IconHandMove } from './IconHandMove';
52
53
  export { default as IconHeadphone } from './IconHeadphone';
53
54
  export { default as IconHide } from './IconHide';
54
55
  export { default as IconHighlightColumn } from './IconHighlightColumn';
@@ -131,6 +132,7 @@ export { default as IconTextToSpeech } from './IconTextToSpeech';
131
132
  export { default as IconTextTypo } from './IconTextTypo';
132
133
  export { default as IconTextUnderline } from './IconTextUnderline';
133
134
  export { default as IconTextVanilla } from './IconTextVanilla';
135
+ export { default as IconToolCenter } from './IconToolCenter';
134
136
  export { default as IconTool } from './IconTool';
135
137
  export { default as IconTrendingUp } from './IconTrendingUp';
136
138
  export { default as IconUndo } from './IconUndo';
@@ -27,6 +27,10 @@ const AudioRecorder = /* @__PURE__ */ forwardRef(({
27
27
  } = useAudioRecorder(onSaveSuccess, onRecordUpdated, hideSaveAction, visibility, "media-library"), {
28
28
  t
29
29
  } = useTranslation();
30
+ function getDefaultDate() {
31
+ const d = /* @__PURE__ */ new Date();
32
+ return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")} ${String(d.getHours()).padStart(2, "0")}h${String(d.getMinutes()).padStart(2, "0")} ` + t("bbm.audio.recorder.defaultName");
33
+ }
30
34
  useImperativeHandle(ref, () => ({
31
35
  save: handleSave
32
36
  }));
@@ -37,7 +41,7 @@ const AudioRecorder = /* @__PURE__ */ forwardRef(({
37
41
  setAudioTime(event.target.currentTime);
38
42
  };
39
43
  return /* @__PURE__ */ jsxs("div", { className: "audio-recorder m-auto d-flex flex-column", children: [
40
- /* @__PURE__ */ jsx(FormControl, { id: "recordName", className: "mb-32", isRequired: !0, isReadOnly: recordState === "SAVED" || recordState === "SAVING", children: /* @__PURE__ */ jsx(Input, { type: "text", size: "sm", placeholder: t("bbm.audio.recorder.name"), ref: audioNameRef, defaultValue: t("bbm.audio.recorder.defaultName") + (/* @__PURE__ */ new Date()).toLocaleDateString() }) }),
44
+ /* @__PURE__ */ jsx(FormControl, { id: "recordName", className: "mb-32", isRequired: !0, isReadOnly: recordState === "SAVED" || recordState === "SAVING", children: /* @__PURE__ */ jsx(Input, { type: "text", size: "sm", placeholder: t("bbm.audio.recorder.name"), ref: audioNameRef, defaultValue: getDefaultDate() }) }),
41
45
  /* @__PURE__ */ jsx("div", { className: "audio-recorder-icon mx-auto", children: /* @__PURE__ */ jsx(SvgIconMic, { width: 64, height: 64, className: classColor }) }),
42
46
  /* @__PURE__ */ jsx(AudioRecorderTimer, { recordState, playState, recordTime, audioTime, maxDuration }),
43
47
  /* @__PURE__ */ jsx("audio", { ref: audioRef, onEnded: handlePlayEnded, onTimeUpdate: handleTimeUpdate, children: /* @__PURE__ */ jsx("track", { default: !0, kind: "captions", srcLang: "fr", src: "" }) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.1.2",
3
+ "version": "2.2.0",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -118,9 +118,9 @@
118
118
  "react-slugify": "^3.0.3",
119
119
  "swiper": "^10.1.0",
120
120
  "ua-parser-js": "^1.0.36",
121
- "@edifice.io/bootstrap": "2.1.2",
122
- "@edifice.io/utilities": "2.1.2",
123
- "@edifice.io/tiptap-extensions": "2.1.2"
121
+ "@edifice.io/bootstrap": "2.2.0",
122
+ "@edifice.io/tiptap-extensions": "2.2.0",
123
+ "@edifice.io/utilities": "2.2.0"
124
124
  },
125
125
  "devDependencies": {
126
126
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -151,8 +151,8 @@
151
151
  "vite": "^5.4.11",
152
152
  "vite-plugin-dts": "^4.1.0",
153
153
  "vite-tsconfig-paths": "^5.0.1",
154
- "@edifice.io/client": "2.1.2",
155
- "@edifice.io/config": "2.1.2"
154
+ "@edifice.io/client": "2.2.0",
155
+ "@edifice.io/config": "2.2.0"
156
156
  },
157
157
  "peerDependencies": {
158
158
  "@react-spring/web": "^9.7.5",