@blocksuite/affine-model
Advanced tools
Comparing version 0.17.6 to 0.17.7
# @blocksuite/affine-model | ||
## 0.17.7 | ||
### Patch Changes | ||
- 5ab06c3: - Peek view as extension | ||
- Editor settings as extension | ||
- Edit props store as extension | ||
- Notifications as extension | ||
- Fix mini mindmap get service error | ||
- Fix generating placeholder style | ||
- Fix brush menu settings | ||
- Fix brush element line width | ||
- Fix edgeless preview pointer events | ||
- Fix latex editor focus shake | ||
- Updated dependencies [5ab06c3] | ||
- @blocksuite/block-std@0.17.7 | ||
- @blocksuite/global@0.17.7 | ||
- @blocksuite/inline@0.17.7 | ||
- @blocksuite/store@0.17.7 | ||
## 0.17.6 | ||
@@ -4,0 +24,0 @@ |
import { z } from 'zod'; | ||
export type DocMode = 'edgeless' | 'page'; | ||
export declare const DocModes: readonly ["edgeless", "page"]; | ||
export declare const ReferenceParamsSchema: z.ZodObject<{ | ||
mode: z.ZodOptional<z.ZodEnum<["edgeless", "page"]>>; | ||
blockIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
elementIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
}, "strip", z.ZodTypeAny, { | ||
mode?: "page" | "edgeless" | undefined; | ||
blockIds?: string[] | undefined; | ||
elementIds?: string[] | undefined; | ||
}, { | ||
mode?: "page" | "edgeless" | undefined; | ||
blockIds?: string[] | undefined; | ||
elementIds?: string[] | undefined; | ||
}>; | ||
export type ReferenceParams = z.infer<typeof ReferenceParamsSchema>; | ||
export declare const ReferenceInfoSchema: z.ZodObject<{ | ||
@@ -5,0 +19,0 @@ pageId: z.ZodString; |
import { z } from 'zod'; | ||
export const DocModes = ['edgeless', 'page']; | ||
export const ReferenceParamsSchema = z | ||
.object({ | ||
mode: z.enum(DocModes), | ||
blockIds: z.string().array(), | ||
elementIds: z.string().array(), | ||
}) | ||
.partial(); | ||
export const ReferenceInfoSchema = z.object({ | ||
pageId: z.string(), | ||
params: z | ||
.object({ | ||
mode: z.enum(DocModes), | ||
blockIds: z.string().array(), | ||
elementIds: z.string().array(), | ||
}) | ||
.partial() | ||
.optional(), | ||
params: ReferenceParamsSchema.optional(), | ||
}); | ||
//# sourceMappingURL=doc.js.map |
@@ -61,7 +61,9 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { | ||
}), derive((lineWidth, instance) => { | ||
if (lineWidth === instance.lineWidth) | ||
const oldBound = instance.elementBound; | ||
if (lineWidth === instance.lineWidth || | ||
oldBound.w === 0 || | ||
oldBound.h === 0) | ||
return {}; | ||
const bound = instance.elementBound; | ||
const points = instance.points; | ||
const transformed = transformPointsToNewBound(points.map(([x, y]) => ({ x, y })), bound, lineWidth / 2, inflateBound(bound, lineWidth - instance.lineWidth), lineWidth / 2); | ||
const transformed = transformPointsToNewBound(points.map(([x, y]) => ({ x, y })), oldBound, instance.lineWidth / 2, inflateBound(oldBound, lineWidth - instance.lineWidth), lineWidth / 2); | ||
return { | ||
@@ -102,3 +104,3 @@ points: transformed.points.map((p, i) => [ | ||
const { lineWidth } = instance; | ||
const transformed = transformPointsToNewBound(instance.points.map(([x, y]) => ({ x, y })), instance, lineWidth / 2, bound, lineWidth / 2); | ||
const transformed = transformPointsToNewBound(instance.points.map(([x, y]) => ({ x, y })), instance, instance.lineWidth / 2, bound, lineWidth / 2); | ||
return { | ||
@@ -105,0 +107,0 @@ points: transformed.points.map((p, i) => [ |
{ | ||
"name": "@blocksuite/affine-model", | ||
"version": "0.17.6", | ||
"version": "0.17.7", | ||
"description": "Default BlockSuite editable blocks.", | ||
@@ -17,6 +17,6 @@ "type": "module", | ||
"dependencies": { | ||
"@blocksuite/block-std": "0.17.6", | ||
"@blocksuite/global": "0.17.6", | ||
"@blocksuite/inline": "0.17.6", | ||
"@blocksuite/store": "0.17.6", | ||
"@blocksuite/block-std": "0.17.7", | ||
"@blocksuite/global": "0.17.7", | ||
"@blocksuite/inline": "0.17.7", | ||
"@blocksuite/store": "0.17.7", | ||
"zod": "^3.23.8" | ||
@@ -23,0 +23,0 @@ }, |
@@ -7,14 +7,17 @@ import { z } from 'zod'; | ||
export const ReferenceParamsSchema = z | ||
.object({ | ||
mode: z.enum(DocModes), | ||
blockIds: z.string().array(), | ||
elementIds: z.string().array(), | ||
}) | ||
.partial(); | ||
export type ReferenceParams = z.infer<typeof ReferenceParamsSchema>; | ||
export const ReferenceInfoSchema = z.object({ | ||
pageId: z.string(), | ||
params: z | ||
.object({ | ||
mode: z.enum(DocModes), | ||
blockIds: z.string().array(), | ||
elementIds: z.string().array(), | ||
}) | ||
.partial() | ||
.optional(), | ||
params: ReferenceParamsSchema.optional(), | ||
}); | ||
export type ReferenceInfo = z.infer<typeof ReferenceInfoSchema>; |
@@ -141,11 +141,17 @@ import type { | ||
@derive((lineWidth: number, instance: Instance) => { | ||
if (lineWidth === instance.lineWidth) return {}; | ||
const oldBound = instance.elementBound; | ||
const bound = instance.elementBound; | ||
if ( | ||
lineWidth === instance.lineWidth || | ||
oldBound.w === 0 || | ||
oldBound.h === 0 | ||
) | ||
return {}; | ||
const points = instance.points; | ||
const transformed = transformPointsToNewBound( | ||
points.map(([x, y]) => ({ x, y })), | ||
bound, | ||
lineWidth / 2, | ||
inflateBound(bound, lineWidth - instance.lineWidth), | ||
oldBound, | ||
instance.lineWidth / 2, | ||
inflateBound(oldBound, lineWidth - instance.lineWidth), | ||
lineWidth / 2 | ||
@@ -198,10 +204,10 @@ ); | ||
const bound = Bound.deserialize(xywh); | ||
if (bound.w === instance.w && bound.h === instance.h) return {}; | ||
const { lineWidth } = instance; | ||
const transformed = transformPointsToNewBound( | ||
instance.points.map(([x, y]) => ({ x, y })), | ||
instance, | ||
lineWidth / 2, | ||
instance.lineWidth / 2, | ||
bound, | ||
@@ -208,0 +214,0 @@ lineWidth / 2 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
561093
7975
216
216
+ Added@blocksuite/block-std@0.17.7(transitive)
+ Added@blocksuite/global@0.17.7(transitive)
+ Added@blocksuite/inline@0.17.7(transitive)
+ Added@blocksuite/store@0.17.7(transitive)
+ Added@blocksuite/sync@0.17.7(transitive)
- Removed@blocksuite/block-std@0.17.6(transitive)
- Removed@blocksuite/global@0.17.6(transitive)
- Removed@blocksuite/inline@0.17.6(transitive)
- Removed@blocksuite/store@0.17.6(transitive)
- Removed@blocksuite/sync@0.17.6(transitive)
Updated@blocksuite/block-std@0.17.7
Updated@blocksuite/global@0.17.7
Updated@blocksuite/inline@0.17.7
Updated@blocksuite/store@0.17.7