@blocklet/editor 2.0.99 → 2.0.100

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.
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { BlockWithAlignableContents } from '@lexical/react/LexicalBlockWithAlignableContents';
3
3
  import { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode';
4
4
  function FigmaComponent({ className, format, nodeKey, documentID }) {
5
- return (_jsx(BlockWithAlignableContents, { className: className, format: format, nodeKey: nodeKey, children: _jsx("iframe", { width: "560", height: "315", title: "figma", src: `https://www.figma.com/embed?embed_host=lexical&url=\
6
- https://www.figma.com/file/${documentID}`, allowFullScreen: true }) }));
5
+ return (_jsx(BlockWithAlignableContents, { className: className, format: format, nodeKey: nodeKey, children: _jsx("iframe", { title: "figma", src: `https://www.figma.com/embed?embed_host=lexical&url=\
6
+ https://www.figma.com/file/${documentID}`, allowFullScreen: true, style: { width: '100%', maxWidth: '560px', aspectRatio: 16 / 9 } }) }));
7
7
  }
8
8
  export class FigmaNode extends DecoratorBlockNode {
9
9
  __id;
@@ -13,6 +13,7 @@ import { useMemo, useState, useEffect, useRef } from 'react';
13
13
  import { $getNearestNodeOfType } from '@lexical/utils';
14
14
  import { LinkNode, $createLinkNode } from '@lexical/link';
15
15
  import compact from 'lodash/compact';
16
+ import { Box } from '@mui/material';
16
17
  import useModal from '../../hooks/useModal';
17
18
  import Button from '../../ui/Button';
18
19
  import { DialogActions } from '../../ui/Dialog';
@@ -196,7 +197,7 @@ export function AutoEmbedDialog({ embedConfig, onClose, }) {
196
197
  onClose();
197
198
  }
198
199
  };
199
- return (_jsxs("div", { style: { width: '600px' }, children: [_jsx("div", { className: "Input__wrapper", children: _jsx("input", { type: "text", className: "Input__input", placeholder: embedConfig.exampleUrl, value: text, "data-test-id": `${embedConfig.type}-embed-modal-url`, onChange: (e) => {
200
+ return (_jsxs(Box, { sx: { width: { xs: 300, sm: 400, md: 600 } }, children: [_jsx("div", { className: "Input__wrapper", children: _jsx("input", { type: "text", className: "Input__input", placeholder: embedConfig.exampleUrl, value: text, "data-test-id": `${embedConfig.type}-embed-modal-url`, onChange: (e) => {
200
201
  const { value } = e.target;
201
202
  setText(value);
202
203
  validateText(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/editor",
3
- "version": "2.0.99",
3
+ "version": "2.0.100",
4
4
  "main": "lib/index.js",
5
5
  "scripts": {
6
6
  "dev": "npm run storybook",
@@ -40,7 +40,7 @@
40
40
  "@arcblock/ux": "^2.10.12",
41
41
  "@blocklet/embed": "^0.1.11",
42
42
  "@blocklet/pages-kit": "^0.2.390",
43
- "@blocklet/pdf": "2.0.99",
43
+ "@blocklet/pdf": "2.0.100",
44
44
  "@excalidraw/excalidraw": "^0.14.2",
45
45
  "@iconify/iconify": "^3.0.1",
46
46
  "@iconify/icons-tabler": "^1.2.95",
@@ -113,5 +113,5 @@
113
113
  "react": "*",
114
114
  "react-dom": "*"
115
115
  },
116
- "gitHead": "9cf729989456de5f3b22b0d9936250d9a072780c"
116
+ "gitHead": "843130ec0c98f4dc0cc08ac7b92fe24d148b884a"
117
117
  }