@blocksuite/affine-model
Advanced tools
Comparing version 0.17.0-canary-202408231153-6f0e185 to 0.17.0-canary-202408240639-504c3dd
@@ -0,1 +1,2 @@ | ||
export * from './connector.js'; | ||
export * from './line.js'; | ||
@@ -2,0 +3,0 @@ export * from './note.js'; |
@@ -0,1 +1,2 @@ | ||
export * from './connector.js'; | ||
export * from './line.js'; | ||
@@ -2,0 +3,0 @@ export * from './note.js'; |
@@ -0,1 +1,9 @@ | ||
export declare enum LineWidth { | ||
Eight = 8, | ||
Four = 4, | ||
Six = 6, | ||
Ten = 10, | ||
Twelve = 12, | ||
Two = 2 | ||
} | ||
export declare enum LineColor { | ||
@@ -2,0 +10,0 @@ Black = "--affine-palette-line-black", |
import { createZodUnion } from '../utils/zod.js'; | ||
export var LineWidth; | ||
(function (LineWidth) { | ||
LineWidth[LineWidth["Eight"] = 8] = "Eight"; | ||
// Thin | ||
LineWidth[LineWidth["Four"] = 4] = "Four"; | ||
LineWidth[LineWidth["Six"] = 6] = "Six"; | ||
// Thick | ||
LineWidth[LineWidth["Ten"] = 10] = "Ten"; | ||
LineWidth[LineWidth["Twelve"] = 12] = "Twelve"; | ||
LineWidth[LineWidth["Two"] = 2] = "Two"; | ||
})(LineWidth || (LineWidth = {})); | ||
export var LineColor; | ||
@@ -3,0 +14,0 @@ (function (LineColor) { |
@@ -6,11 +6,3 @@ import type { BaseElementProps, PointTestOptions, SerializedElement } from '@blocksuite/block-std/gfx'; | ||
import { type Y } from '@blocksuite/store'; | ||
import { type Color, StrokeStyle, type TextStyleProps } from '../../consts/index.js'; | ||
export declare enum ConnectorEndpoint { | ||
Front = "Front", | ||
Rear = "Rear" | ||
} | ||
export type PointStyle = 'None' | 'Arrow' | 'Triangle' | 'Circle' | 'Diamond'; | ||
export declare const DEFAULT_FRONT_END_POINT_STYLE: "None"; | ||
export declare const DEFAULT_REAR_END_POINT_STYLE: "Arrow"; | ||
export declare const CONNECTOR_LABEL_MAX_WIDTH = 280; | ||
import { type Color, ConnectorLabelOffsetAnchor, ConnectorMode, type PointStyle, StrokeStyle, type TextStyleProps } from '../../consts/index.js'; | ||
export type SerializedConnection = { | ||
@@ -24,13 +16,3 @@ id?: string; | ||
}; | ||
export declare enum ConnectorMode { | ||
Straight = 0, | ||
Orthogonal = 1, | ||
Curve = 2 | ||
} | ||
export declare const getConnectorModeName: (mode: ConnectorMode) => string; | ||
export declare enum ConnectorLabelOffsetAnchor { | ||
Bottom = "bottom", | ||
Center = "center", | ||
Top = "top" | ||
} | ||
export type ConnectorLabelOffsetProps = { | ||
@@ -37,0 +19,0 @@ distance: number; |
@@ -38,17 +38,3 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { | ||
import { DocCollection } from '@blocksuite/store'; | ||
import { DEFAULT_ROUGHNESS, FontFamily, FontStyle, FontWeight, StrokeStyle, TextAlign, } from '../../consts/index.js'; | ||
export var ConnectorEndpoint; | ||
(function (ConnectorEndpoint) { | ||
ConnectorEndpoint["Front"] = "Front"; | ||
ConnectorEndpoint["Rear"] = "Rear"; | ||
})(ConnectorEndpoint || (ConnectorEndpoint = {})); | ||
export const DEFAULT_FRONT_END_POINT_STYLE = 'None'; | ||
export const DEFAULT_REAR_END_POINT_STYLE = 'Arrow'; | ||
export const CONNECTOR_LABEL_MAX_WIDTH = 280; | ||
export var ConnectorMode; | ||
(function (ConnectorMode) { | ||
ConnectorMode[ConnectorMode["Straight"] = 0] = "Straight"; | ||
ConnectorMode[ConnectorMode["Orthogonal"] = 1] = "Orthogonal"; | ||
ConnectorMode[ConnectorMode["Curve"] = 2] = "Curve"; | ||
})(ConnectorMode || (ConnectorMode = {})); | ||
import { CONNECTOR_LABEL_MAX_WIDTH, ConnectorLabelOffsetAnchor, ConnectorMode, DEFAULT_ROUGHNESS, FontFamily, FontStyle, FontWeight, StrokeStyle, TextAlign, } from '../../consts/index.js'; | ||
export const getConnectorModeName = (mode) => { | ||
@@ -61,8 +47,2 @@ return { | ||
}; | ||
export var ConnectorLabelOffsetAnchor; | ||
(function (ConnectorLabelOffsetAnchor) { | ||
ConnectorLabelOffsetAnchor["Bottom"] = "bottom"; | ||
ConnectorLabelOffsetAnchor["Center"] = "center"; | ||
ConnectorLabelOffsetAnchor["Top"] = "top"; | ||
})(ConnectorLabelOffsetAnchor || (ConnectorLabelOffsetAnchor = {})); | ||
let ConnectorElementModel = (() => { | ||
@@ -69,0 +49,0 @@ let _classSuper = GfxPrimitiveElementModel; |
import type { PointLocation } from '@blocksuite/global/utils'; | ||
import type { SerializedXYWH } from '@blocksuite/global/utils'; | ||
import { GfxLocalElementModel } from '@blocksuite/block-std/gfx'; | ||
import { type Color, StrokeStyle } from '../../consts/index.js'; | ||
import { type Connection, ConnectorMode, type PointStyle } from './connector.js'; | ||
import type { PointStyle } from '../../consts/index.js'; | ||
import type { Connection } from './connector.js'; | ||
import { type Color, ConnectorMode, StrokeStyle } from '../../consts/index.js'; | ||
export declare class LocalConnectorElementModel extends GfxLocalElementModel { | ||
@@ -7,0 +8,0 @@ private _path; |
import { GfxLocalElementModel } from '@blocksuite/block-std/gfx'; | ||
import { DEFAULT_ROUGHNESS, StrokeStyle, } from '../../consts/index.js'; | ||
import { ConnectorMode, } from './connector.js'; | ||
import { ConnectorMode, DEFAULT_ROUGHNESS, StrokeStyle, } from '../../consts/index.js'; | ||
export class LocalConnectorElementModel extends GfxLocalElementModel { | ||
@@ -5,0 +4,0 @@ constructor() { |
{ | ||
"name": "@blocksuite/affine-model", | ||
"version": "0.17.0-canary-202408231153-6f0e185", | ||
"version": "0.17.0-canary-202408240639-504c3dd", | ||
"description": "Default BlockSuite editable blocks.", | ||
@@ -12,6 +12,6 @@ "type": "module", | ||
"zod": "^3.23.8", | ||
"@blocksuite/block-std": "0.17.0-canary-202408231153-6f0e185", | ||
"@blocksuite/global": "0.17.0-canary-202408231153-6f0e185", | ||
"@blocksuite/store": "0.17.0-canary-202408231153-6f0e185", | ||
"@blocksuite/inline": "0.17.0-canary-202408231153-6f0e185" | ||
"@blocksuite/block-std": "0.17.0-canary-202408240639-504c3dd", | ||
"@blocksuite/inline": "0.17.0-canary-202408240639-504c3dd", | ||
"@blocksuite/store": "0.17.0-canary-202408240639-504c3dd", | ||
"@blocksuite/global": "0.17.0-canary-202408240639-504c3dd" | ||
}, | ||
@@ -18,0 +18,0 @@ "exports": { |
@@ -0,1 +1,2 @@ | ||
export * from './connector.js'; | ||
export * from './line.js'; | ||
@@ -2,0 +3,0 @@ export * from './note.js'; |
import { createZodUnion } from '../utils/zod.js'; | ||
export enum LineWidth { | ||
Eight = 8, | ||
// Thin | ||
Four = 4, | ||
Six = 6, | ||
// Thick | ||
Ten = 10, | ||
Twelve = 12, | ||
Two = 2, | ||
} | ||
export enum LineColor { | ||
@@ -4,0 +15,0 @@ Black = '--affine-palette-line-black', |
@@ -30,3 +30,6 @@ import type { | ||
import { | ||
CONNECTOR_LABEL_MAX_WIDTH, | ||
type Color, | ||
ConnectorLabelOffsetAnchor, | ||
ConnectorMode, | ||
DEFAULT_ROUGHNESS, | ||
@@ -36,2 +39,3 @@ FontFamily, | ||
FontWeight, | ||
type PointStyle, | ||
StrokeStyle, | ||
@@ -42,13 +46,2 @@ TextAlign, | ||
export enum ConnectorEndpoint { | ||
Front = 'Front', | ||
Rear = 'Rear', | ||
} | ||
export type PointStyle = 'None' | 'Arrow' | 'Triangle' | 'Circle' | 'Diamond'; | ||
export const DEFAULT_FRONT_END_POINT_STYLE = 'None' as const; | ||
export const DEFAULT_REAR_END_POINT_STYLE = 'Arrow' as const; | ||
export const CONNECTOR_LABEL_MAX_WIDTH = 280; | ||
export type SerializedConnection = { | ||
@@ -66,7 +59,2 @@ id?: string; | ||
export enum ConnectorMode { | ||
Straight, | ||
Orthogonal, | ||
Curve, | ||
} | ||
export const getConnectorModeName = (mode: ConnectorMode) => { | ||
@@ -80,8 +68,2 @@ return { | ||
export enum ConnectorLabelOffsetAnchor { | ||
Bottom = 'bottom', | ||
Center = 'center', | ||
Top = 'top', | ||
} | ||
export type ConnectorLabelOffsetProps = { | ||
@@ -88,0 +70,0 @@ // [0, 1], `0.5` by default |
@@ -6,12 +6,11 @@ import type { PointLocation } from '@blocksuite/global/utils'; | ||
import type { PointStyle } from '../../consts/index.js'; | ||
import type { Connection } from './connector.js'; | ||
import { | ||
type Color, | ||
ConnectorMode, | ||
DEFAULT_ROUGHNESS, | ||
StrokeStyle, | ||
} from '../../consts/index.js'; | ||
import { | ||
type Connection, | ||
ConnectorMode, | ||
type PointStyle, | ||
} from './connector.js'; | ||
@@ -18,0 +17,0 @@ export class LocalConnectorElementModel extends GfxLocalElementModel { |
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
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
534393
397
7318
+ Added@blocksuite/block-std@0.17.0-canary-202408240639-504c3dd(transitive)
+ Added@blocksuite/global@0.17.0-canary-202408240639-504c3dd(transitive)
+ Added@blocksuite/inline@0.17.0-canary-202408240639-504c3dd(transitive)
+ Added@blocksuite/store@0.17.0-canary-202408240639-504c3dd(transitive)
+ Added@blocksuite/sync@0.17.0-canary-202408240639-504c3dd(transitive)
- Removed@blocksuite/block-std@0.17.0-canary-202408231153-6f0e185(transitive)
- Removed@blocksuite/global@0.17.0-canary-202408231153-6f0e185(transitive)
- Removed@blocksuite/inline@0.17.0-canary-202408231153-6f0e185(transitive)
- Removed@blocksuite/store@0.17.0-canary-202408231153-6f0e185(transitive)
- Removed@blocksuite/sync@0.17.0-canary-202408231153-6f0e185(transitive)
Updated@blocksuite/block-std@0.17.0-canary-202408240639-504c3dd
Updated@blocksuite/global@0.17.0-canary-202408240639-504c3dd
Updated@blocksuite/inline@0.17.0-canary-202408240639-504c3dd