@textbus/xnote 0.0.1-alpha.32 → 0.0.1-alpha.33

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.
@@ -3608,7 +3608,7 @@ function VideoView(props) {
3608
3608
  const output = useOutput();
3609
3609
  return () => {
3610
3610
  if (readonly() || output()) {
3611
- return (jsx("div", { class: "xnote-video", "data-component": name, children: jsx("video", { ref: videoRef, src: state.src, style: {
3611
+ return (jsx("div", { class: "xnote-video", ref: props.rootRef, "data-component": name, children: jsx("video", { ref: videoRef, src: state.src, style: {
3612
3612
  width: state.width,
3613
3613
  height: state.height
3614
3614
  } }) }));
@@ -3888,7 +3888,7 @@ function InsertTool(props) {
3888
3888
  break;
3889
3889
  case 'image':
3890
3890
  if (fileUploader) {
3891
- Promise.resolve(fileUploader.uploadFile('image')).then(url => {
3891
+ Promise.resolve().then(() => fileUploader.uploadFile('image')).then(url => {
3892
3892
  const img = new ImageComponent(textbus, {
3893
3893
  src: url
3894
3894
  });
@@ -3898,7 +3898,7 @@ function InsertTool(props) {
3898
3898
  break;
3899
3899
  case 'video':
3900
3900
  if (fileUploader) {
3901
- Promise.resolve(fileUploader.uploadFile('video')).then(url => {
3901
+ Promise.resolve().then(() => fileUploader.uploadFile('video')).then(url => {
3902
3902
  const img = new VideoComponent(textbus, {
3903
3903
  src: url
3904
3904
  });
@@ -5735,4 +5735,4 @@ class Editor extends Textbus {
5735
5735
  }
5736
5736
  }
5737
5737
 
5738
- export { AtComponent, AtComponentView, AttrTool, BlockTool, BlockquoteComponent, BlockquoteView, BoldTool, Button, CodeTool, ColorTool, ComponentToolbar, Divider, DragResize, Dropdown, DropdownContextService, DropdownMenuPortal, DropdownService, Editor, EditorService, FontFamilyTool, FontSizeTool, HighlightBoxComponent, HighlightBoxView, ImageComponent, ImageView, InsertTool, ItalicTool, KatexComponent, KatexComponentView, Keymap, LeftToolbar, LeftToolbarPlugin, LinkJump, LinkTool, ListComponent, ListComponentView, Matcher, MenuHeading, MenuItem, Organization, OutputInjectionToken, ParagraphComponent, ParagraphView, Popup, RefreshService, RootComponent, RootView, SourceCodeComponent, SourceCodeView, StrikeThroughTool, TableComponent, TableComponentView, TodolistComponent, TodolistView, Toolbar, ToolbarItem, ToolbarPlugin, UnderlineTool, VideoComponent, VideoView, atComponentLoader, autoComplete, backgroundColorFormatLoader, backgroundColorFormatter, blockquoteComponentLoader, boldFormatLoader, boldFormatter, codeFormatLoader, codeFormatter, colorFormatLoader, colorFormatter, deltaToBlock, fontFamilyFormatLoader, fontFamilyFormatter, fontSizeFormatLoader, fontSizeFormatter, headingAttr, headingAttrLoader, highlightBoxComponentLoader, imageComponentLoader, isSupportFont, italicFormatLoader, italicFormatter, katexComponentLoader, languageList, linkFormatLoader, linkFormatter, listComponentLoader, paragraphComponentLoader, registerAtShortcut, registerBlockquoteShortcut, registerBoldShortcut, registerCodeShortcut, registerHeadingShortcut, registerItalicShortcut, registerListShortcut, registerStrikeThroughShortcut, registerTextAlignShortcut, registerTextIndentShortcut, registerUnderlineShortcut, rootComponentLoader, sourceCodeComponentLoader, sourceCodeThemes, strikeThroughFormatLoader, strikeThroughFormatter, tableComponentLoader, textAlignAttr, textAlignAttrLoader, textIndentAttr, textIndentAttrLoader, toBlockquote, toList, todolistComponentLoader, toggleBold, toggleCode, toggleItalic, toggleStrikeThrough, toggleUnderline, underlineFormatLoader, underlineFormatter, useActiveBlock, useBlockContent, useBlockTransform, useOutput, useReadonly, videoComponentLoader };
5738
+ export { AtComponent, AtComponentView, AttrTool, BlockTool, BlockquoteComponent, BlockquoteView, BoldTool, Button, CodeTool, ColorTool, ComponentToolbar, Divider, DragResize, Dropdown, DropdownContextService, DropdownMenuPortal, DropdownService, Editor, EditorService, FileUploader, FontFamilyTool, FontSizeTool, HighlightBoxComponent, HighlightBoxView, ImageComponent, ImageView, InsertTool, ItalicTool, KatexComponent, KatexComponentView, Keymap, LeftToolbar, LeftToolbarPlugin, LinkJump, LinkTool, ListComponent, ListComponentView, Matcher, MenuHeading, MenuItem, Organization, OutputInjectionToken, ParagraphComponent, ParagraphView, Popup, RefreshService, RootComponent, RootView, SourceCodeComponent, SourceCodeView, StrikeThroughTool, TableComponent, TableComponentView, TodolistComponent, TodolistView, Toolbar, ToolbarItem, ToolbarPlugin, UnderlineTool, VideoComponent, VideoView, atComponentLoader, autoComplete, backgroundColorFormatLoader, backgroundColorFormatter, blockquoteComponentLoader, boldFormatLoader, boldFormatter, codeFormatLoader, codeFormatter, colorFormatLoader, colorFormatter, deltaToBlock, fontFamilyFormatLoader, fontFamilyFormatter, fontSizeFormatLoader, fontSizeFormatter, headingAttr, headingAttrLoader, highlightBoxComponentLoader, imageComponentLoader, isSupportFont, italicFormatLoader, italicFormatter, katexComponentLoader, languageList, linkFormatLoader, linkFormatter, listComponentLoader, paragraphComponentLoader, registerAtShortcut, registerBlockquoteShortcut, registerBoldShortcut, registerCodeShortcut, registerHeadingShortcut, registerItalicShortcut, registerListShortcut, registerStrikeThroughShortcut, registerTextAlignShortcut, registerTextIndentShortcut, registerUnderlineShortcut, rootComponentLoader, sourceCodeComponentLoader, sourceCodeThemes, strikeThroughFormatLoader, strikeThroughFormatter, tableComponentLoader, textAlignAttr, textAlignAttrLoader, textIndentAttr, textIndentAttrLoader, toBlockquote, toList, todolistComponentLoader, toggleBold, toggleCode, toggleItalic, toggleStrikeThrough, toggleUnderline, underlineFormatLoader, underlineFormatter, useActiveBlock, useBlockContent, useBlockTransform, useOutput, useReadonly, videoComponentLoader };
package/bundles/index.js CHANGED
@@ -3610,7 +3610,7 @@ function VideoView(props) {
3610
3610
  const output = useOutput();
3611
3611
  return () => {
3612
3612
  if (readonly() || output()) {
3613
- return (jsxRuntime.jsx("div", { class: "xnote-video", "data-component": name, children: jsxRuntime.jsx("video", { ref: videoRef, src: state.src, style: {
3613
+ return (jsxRuntime.jsx("div", { class: "xnote-video", ref: props.rootRef, "data-component": name, children: jsxRuntime.jsx("video", { ref: videoRef, src: state.src, style: {
3614
3614
  width: state.width,
3615
3615
  height: state.height
3616
3616
  } }) }));
@@ -3890,7 +3890,7 @@ function InsertTool(props) {
3890
3890
  break;
3891
3891
  case 'image':
3892
3892
  if (fileUploader) {
3893
- Promise.resolve(fileUploader.uploadFile('image')).then(url => {
3893
+ Promise.resolve().then(() => fileUploader.uploadFile('image')).then(url => {
3894
3894
  const img = new ImageComponent(textbus, {
3895
3895
  src: url
3896
3896
  });
@@ -3900,7 +3900,7 @@ function InsertTool(props) {
3900
3900
  break;
3901
3901
  case 'video':
3902
3902
  if (fileUploader) {
3903
- Promise.resolve(fileUploader.uploadFile('video')).then(url => {
3903
+ Promise.resolve().then(() => fileUploader.uploadFile('video')).then(url => {
3904
3904
  const img = new VideoComponent(textbus, {
3905
3905
  src: url
3906
3906
  });
@@ -5753,6 +5753,7 @@ exports.DragResize = DragResize;
5753
5753
  exports.Dropdown = Dropdown;
5754
5754
  exports.DropdownMenuPortal = DropdownMenuPortal;
5755
5755
  exports.Editor = Editor;
5756
+ exports.FileUploader = FileUploader;
5756
5757
  exports.FontFamilyTool = FontFamilyTool;
5757
5758
  exports.FontSizeTool = FontSizeTool;
5758
5759
  exports.HighlightBoxComponent = HighlightBoxComponent;
@@ -2,4 +2,5 @@ export * from './components/_api';
2
2
  export * from './plugins/_api';
3
3
  export * from './services/_api';
4
4
  export * from './textbus/_api';
5
+ export * from './interfaces';
5
6
  export * from './editor';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/xnote",
3
- "version": "0.0.1-alpha.32",
3
+ "version": "0.0.1-alpha.33",
4
4
  "description": "A high-performance rich text editor that supports multiplayer online collaboration.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
@@ -27,10 +27,10 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@tanbo/color": "^0.1.1",
30
- "@textbus/adapter-viewfly": "^4.0.0-alpha.61",
30
+ "@textbus/adapter-viewfly": "^4.0.0-alpha.62",
31
31
  "@textbus/collaborate": "^4.0.0-alpha.61",
32
32
  "@textbus/core": "^4.0.0-alpha.61",
33
- "@textbus/platform-browser": "^4.0.0-alpha.61",
33
+ "@textbus/platform-browser": "^4.0.0-alpha.62",
34
34
  "@viewfly/core": "^1.0.0-alpha.11",
35
35
  "@viewfly/hooks": "^1.0.0-alpha.11",
36
36
  "@viewfly/platform-browser": "^1.0.0-alpha.11",