goatdee-canvas 0.0.36 → 0.0.38

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.
Binary file
package/dist/index.cjs CHANGED
@@ -4249,7 +4249,7 @@ const add = async (type, properties) => {
4249
4249
  if (type === "image" && props.src) {
4250
4250
  await manager.registerImageIfNeeded(props.src);
4251
4251
  }
4252
- if ((type === "frame" || type === "slide") && props.objects) {
4252
+ if ((type === "frame" || type === "slide" || type === "group") && props.objects) {
4253
4253
  await preRegisterImages(props.objects);
4254
4254
  }
4255
4255
  return canvas.add(type, props);
@@ -4828,7 +4828,7 @@ const exportImage = (type = "image/png", multiplier = 2, quality = 1) => {
4828
4828
  * @param options - 导出选项,如 MIME 类型、导出倍率、质量等
4829
4829
  * @returns 返回画布导出的 base64。失败返回 ''
4830
4830
  */
4831
- const exportImages = (ids, options = {
4831
+ const exportImages = async (ids, options = {
4832
4832
  type: "image/png",
4833
4833
  multiplier: 2,
4834
4834
  quality: 1,
@@ -6002,8 +6002,8 @@ const GoatdeeCanvas = react.forwardRef((props, ref) => {
6002
6002
  exportImage: (type = "image/png", multiplier = 2, quality = 1) => {
6003
6003
  return exportImage(type, multiplier, quality);
6004
6004
  },
6005
- exportImages: (ids, options) => {
6006
- return exportImages(ids, options);
6005
+ exportImages: async (ids, options) => {
6006
+ return await exportImages(ids, options);
6007
6007
  },
6008
6008
  mergeLayer: async (onUpload) => {
6009
6009
  await mergeLayer(onUpload);