Comments (5)
Subject: [PATCH] chore: bump version
---
Index: packages/app/src/components/edgeless-toolbar/index.tsx
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/packages/app/src/components/edgeless-toolbar/index.tsx b/packages/app/src/components/edgeless-toolbar/index.tsx
--- a/packages/app/src/components/edgeless-toolbar/index.tsx (revision 88d421f2d6790aae328de70905e8583e8db12758)
+++ b/packages/app/src/components/edgeless-toolbar/index.tsx (date 1670992045566)
@@ -17,7 +17,7 @@
import { Tooltip } from '@/ui/tooltip';
import Slide from '@mui/material/Slide';
import { useEditor } from '@/components/editor-provider';
-import { createEvent } from '@blocksuite/blocks';
+import { createEvent ,TDShapeType, ColorStyle } from '@blocksuite/blocks';
const toolbarList1 = [
{
@@ -48,8 +48,8 @@
window.dispatchEvent(
createEvent('affine.switch-mouse-mode', {
type: 'shape',
- shape: 'rectangle',
- color: 'black',
+ shape: TDShapeType.Rectangle,
+ color: ColorStyle.Black,
})
);
},
Index: pnpm-lock.yaml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
--- a/pnpm-lock.yaml (revision 88d421f2d6790aae328de70905e8583e8db12758)
+++ b/pnpm-lock.yaml (date 1670992045578)
@@ -30,9 +30,9 @@
packages/app:
specifiers:
- '@blocksuite/blocks': 0.3.0-alpha.4
- '@blocksuite/editor': 0.3.0-alpha.4
- '@blocksuite/store': 0.3.0-alpha.4
+ '@blocksuite/blocks': 0.3.0-alpha.8
+ '@blocksuite/editor': 0.3.0-alpha.8
+ '@blocksuite/store': 0.3.0-alpha.8
'@emotion/css': ^11.10.0
'@emotion/react': ^11.10.4
'@emotion/server': ^11.10.0
@@ -60,9 +60,9 @@
react-dom: 18.2.0
typescript: 4.8.3
dependencies:
- '@blocksuite/blocks': 0.3.0-alpha.4
- '@blocksuite/editor': 0.3.0-alpha.4
- '@blocksuite/store': 0.3.0-alpha.4
+ '@blocksuite/blocks': 0.3.0-alpha.8
+ '@blocksuite/editor': 0.3.0-alpha.8
+ '@blocksuite/store': 0.3.0-alpha.8
'@emotion/css': 11.10.0
'@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34
'@emotion/server': 11.10.0_@[email protected]
@@ -472,12 +472,15 @@
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
dev: true
- /@blocksuite/blocks/0.3.0-alpha.4:
- resolution: {integrity: sha512-ij/kKW5ahJQPKMZe2UjwJwvcPNQFQ09/KoRIfFRwBdTBisPGtlSUwunDMlFFoY7CbnH4E+cpg+6XjcJDQniDBw==}
+ /@blocksuite/blocks/0.3.0-alpha.8:
+ resolution: {integrity: sha512-Q7md4N1H0lTMG0nX1PnAdSlTjBfNX4nFLlcX3SrdgjSM9QOu0G6E6OvfHHHCj4SJPnzyHH5xb6Lb0jU9Lpas6Q==}
dependencies:
- '@blocksuite/store': 0.3.0-alpha.4
+ '@blocksuite/store': 0.3.0-alpha.8
+ '@tldraw/intersect': 1.8.0
+ '@tldraw/vec': 1.8.0
hotkeys-js: 3.10.0
lit: 2.4.0
+ perfect-freehand: 1.2.0
quill: 1.3.7
quill-cursors: 4.0.0
transitivePeerDependencies:
@@ -486,11 +489,11 @@
- utf-8-validate
dev: false
- /@blocksuite/editor/0.3.0-alpha.4:
- resolution: {integrity: sha512-qTNFFIhqQqGT/qwQvUVmgv+EgiBnHB4G5NCPCKn5pdHXM3vrihsY3yG33YVFc1M7+ZwJsfw6sNbtkv+Ih62aaw==}
+ /@blocksuite/editor/0.3.0-alpha.8:
+ resolution: {integrity: sha512-Sx5E69LMZkUcc37q2PLXAnNTHy9okn/UFBfcWG8i5LO/T8QpYJgbllZGJDx7A3qP8Uz+BQyhgI5gp8S/dnra7g==}
dependencies:
- '@blocksuite/blocks': 0.3.0-alpha.4
- '@blocksuite/store': 0.3.0-alpha.4
+ '@blocksuite/blocks': 0.3.0-alpha.8
+ '@blocksuite/store': 0.3.0-alpha.8
lit: 2.4.0
marked: 4.1.1
turndown: 7.1.1
@@ -500,12 +503,15 @@
- utf-8-validate
dev: false
- /@blocksuite/store/0.3.0-alpha.4:
- resolution: {integrity: sha512-hLXFiTf1e4qdX9T0uU+SsBwYWMLqU3ILTxALHRWCxSgKs4/qw7pu24c/XT9L+AAUWFMbNH4MnAK+lrCBiOS1wg==}
+ /@blocksuite/store/0.3.0-alpha.8:
+ resolution: {integrity: sha512-u63FWZSiYID8++tEIaQZ5FSj7NZu9XM2ZdTaTU+7PDEwucK5Gqo8+YrEC9gVl+2jkSW5cp43pxf2kZolUgkyYg==}
dependencies:
+ buffer: 6.0.3
flexsearch: 0.7.21
idb-keyval: 6.2.0
+ ky: 0.32.2
lib0: 0.2.52
+ sha3: 2.1.4
y-indexeddb: [email protected]
y-protocols: 1.0.5
y-webrtc: 10.2.3
@@ -1469,6 +1475,16 @@
dependencies:
tslib: 2.4.0
dev: false
+
+ /@tldraw/intersect/1.8.0:
+ resolution: {integrity: sha512-0UarshNpyq2+O4o0xHMJIBgF0E630mes5CkMoO+D5xgYppSBIkeqYDcv0ujsmAhMKX1O6Y0ShuuHeflBEULUoQ==}
+ dependencies:
+ '@tldraw/vec': 1.8.0
+ dev: false
+
+ /@tldraw/vec/1.8.0:
+ resolution: {integrity: sha512-GiS5Df3CzXY/fPBFcM0CKFERZfI4Cg1X33VPZX+NLo7Fwm/h9zu/aU24N1mG75Q9LuMnwKm7woxKr8BiUXGYCg==}
+ dev: false
/@types/babel__core/7.1.20:
resolution: {integrity: sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ==}
@@ -2495,7 +2511,7 @@
eslint-import-resolver-webpack:
optional: true
dependencies:
- '@typescript-eslint/parser': 5.38.0_76twfck5d7crjqrmw4yltga7zm
+ '@typescript-eslint/parser': 5.38.0_tg6quxtr5dyl3tikvj7rwonxxi
debug: 3.2.7
eslint: 8.22.0
eslint-import-resolver-node: 0.3.6
@@ -2514,7 +2530,7 @@
'@typescript-eslint/parser':
optional: true
dependencies:
- '@typescript-eslint/parser': 5.38.0_76twfck5d7crjqrmw4yltga7zm
+ '@typescript-eslint/parser': 5.38.0_tg6quxtr5dyl3tikvj7rwonxxi
array-includes: 3.1.5
array.prototype.flat: 1.3.0
debug: 2.6.9
@@ -3763,6 +3779,11 @@
engines: {node: '>=6'}
dev: true
+ /ky/0.32.2:
+ resolution: {integrity: sha512-eBJeF6IXNwX5rksdwBrE2rIJrU2d84GoTvdM7OmmTIwUVXEMd72wIwvT+nyhrqtv7AzbSNsWz7yRsHgVhj1uog==}
+ engines: {node: '>=14.16'}
+ dev: false
+
/language-subtag-registry/0.3.22:
resolution: {integrity: sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==}
dev: true
@@ -4326,6 +4347,10 @@
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
engines: {node: '>=8'}
+ /perfect-freehand/1.2.0:
+ resolution: {integrity: sha512-h/0ikF1M3phW7CwpZ5MMvKnfpHficWoOEyr//KVNTxV4F6deRK1eYMtHyBKEAKFK0aXIEUK9oBvlF6PNXMDsAw==}
+ dev: false
+
/picocolors/1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
@@ -4620,6 +4645,12 @@
lru-cache: 6.0.0
dev: true
+ /sha3/2.1.4:
+ resolution: {integrity: sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==}
+ dependencies:
+ buffer: 6.0.3
+ dev: false
+
/shebang-command/2.0.0:
resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
engines: {node: '>=8'}
Index: packages/app/package.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/packages/app/package.json b/packages/app/package.json
--- a/packages/app/package.json (revision 88d421f2d6790aae328de70905e8583e8db12758)
+++ b/packages/app/package.json (date 1670992045570)
@@ -9,9 +9,9 @@
"lint": "next lint"
},
"dependencies": {
- "@blocksuite/blocks": "0.3.0-alpha.4",
- "@blocksuite/editor": "0.3.0-alpha.4",
- "@blocksuite/store": "0.3.0-alpha.4",
+ "@blocksuite/blocks": "0.3.0-alpha.8",
+ "@blocksuite/editor": "0.3.0-alpha.8",
+ "@blocksuite/store": "0.3.0-alpha.8",
"@emotion/css": "^11.10.0",
"@emotion/react": "^11.10.4",
"@emotion/server": "^11.10.0",
Index: packages/app/tsconfig.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/packages/app/tsconfig.json b/packages/app/tsconfig.json
--- a/packages/app/tsconfig.json (revision 88d421f2d6790aae328de70905e8583e8db12758)
+++ b/packages/app/tsconfig.json (date 1670992134524)
@@ -17,7 +17,8 @@
"experimentalDecorators": true,
"baseUrl": ".",
"paths": {
- "@/*": ["src/*"]
+ "@/*": ["src/*"],
+ "@toeverything/pathfinder-logger": ["../logger/src/index"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
Index: packages/app/src/components/editor.tsx
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/packages/app/src/components/editor.tsx b/packages/app/src/components/editor.tsx
--- a/packages/app/src/components/editor.tsx (revision 88d421f2d6790aae328de70905e8583e8db12758)
+++ b/packages/app/src/components/editor.tsx (date 1670992331786)
@@ -16,18 +16,27 @@
return;
}
const workspace = new Workspace({});
- const page = workspace.createPage('page0').register(BlockSchema);
- const editor = createEditor(page);
- containerElement.current.appendChild(editor);
- if (ref) {
- if ('current' in ref) {
- ref.current = editor;
- } else {
- ref(editor);
- }
- }
+ workspace.register(BlockSchema);
+ let editor: EditorContainer | null = null
+ workspace.signals.pageAdded.once(pageId => {
+ const page = workspace.getPage(pageId);
+ if (!page) {
+ return
+ }
+ editor = createEditor(page);
+ containerElement.current?.appendChild(editor);
+ if (ref) {
+ if ('current' in ref) {
+ ref.current = editor;
+ } else {
+ ref(editor);
+ }
+ }
+ });
+ const page = workspace.createPage('page0');
+
return () => {
- editor.remove();
+ editor?.remove();
};
}, [ref]);
return <div id="editor" style={{ height: '100%' }} ref={containerElement} />;
from blocksuite.
Does this mean import { Text } from '@blocksuite/store'
doesn't work? A workaround would be using new page.Text
, this is prepared for E2E testing, since we can't import ESM module inside evaluate
scripts.
from blocksuite.
Does this happen in previous alpha versions?
from blocksuite.
occurs when import { createEvent } from '@blocksuite/blocks';
from blocksuite.
I think this is a future, not a bug
from blocksuite.
Related Issues (20)
- Updated version returning errors HOT 1
- Unable to scroll to last column of the table database in slidelayout model
- Unable to import snapshot in playground HOT 1
- Stale state in resorted numbered list HOT 2
- Can we hide the icon under the title bar? HOT 3
- 【bug】When exporting pdf or png, the hover selection style will appear.
- Callout Block feature request HOT 3
- "Ctrl+A" cause a wrong all selection in table cell HOT 2
- let fonts in public folder pls... HOT 3
- Remove background from image in Edgeless HOT 4
- How to play around with toolbar? HOT 3
- blob resource collaboration issues HOT 1
- Press Enter in the editor to add lines and automatically scroll to the bottom
- Copy Paste issue HOT 2
- rewrite image preview as widget HOT 2
- Copy content and paste in edgeless throw error
- Unable to use editor with more notes, entire chrome tab getting stucked. HOT 11
- Problems with importing and exporting .md files HOT 1
- Adding a card in filtered Kanban mode adds the card to ungroups
- Blocksuite not working in react app HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blocksuite.