Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blocksuite/affine-shared

Package Overview
Dependencies
Maintainers
0
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocksuite/affine-shared - npm Package Compare versions

Comparing version 0.17.5 to 0.17.6

CHANGELOG.md

2

dist/utils/file/filesys.js

@@ -77,3 +77,3 @@ // Polyfill for `showOpenFilePicker` API

accept: {
'text/xml': ['.mm', '.opml'],
'text/xml': ['.mm', '.opml', '.xml'],
},

@@ -80,0 +80,0 @@ },

@@ -1,2 +0,2 @@

import { ConnectorMode, DEFAULT_CONNECTOR_COLOR, DEFAULT_FRONT_END_POINT_STYLE, DEFAULT_NOTE_BACKGROUND_COLOR, DEFAULT_NOTE_SHADOW, DEFAULT_REAR_END_POINT_STYLE, DEFAULT_SHAPE_FILL_COLOR, DEFAULT_SHAPE_STROKE_COLOR, DEFAULT_SHAPE_TEXT_COLOR, DEFAULT_TEXT_COLOR, FillColorsSchema, FontFamily, FontStyle, FontWeight, LayoutType, LineColor, LineColorsSchema, LineWidth, MindmapStyle, NoteBackgroundColorsSchema, NoteDisplayMode, NoteShadowsSchema, PointStyle, ShapeStyle, StrokeColorsSchema, StrokeStyle, TextAlign, TextVerticalAlign, } from '@blocksuite/affine-model';
import { ConnectorMode, DEFAULT_CONNECTOR_COLOR, DEFAULT_CONNECTOR_TEXT_COLOR, DEFAULT_FRONT_END_POINT_STYLE, DEFAULT_NOTE_BACKGROUND_COLOR, DEFAULT_NOTE_BORDER_SIZE, DEFAULT_NOTE_BORDER_STYLE, DEFAULT_NOTE_CORNER, DEFAULT_NOTE_SHADOW, DEFAULT_REAR_END_POINT_STYLE, DEFAULT_ROUGHNESS, DEFAULT_SHAPE_FILL_COLOR, DEFAULT_SHAPE_STROKE_COLOR, DEFAULT_SHAPE_TEXT_COLOR, DEFAULT_TEXT_COLOR, FillColorsSchema, FontFamily, FontStyle, FontWeight, FrameBackgroundColorsSchema, LayoutType, LineColor, LineColorsSchema, LineWidth, MindmapStyle, NoteBackgroundColorsSchema, NoteDisplayMode, NoteShadowsSchema, PointStyle, ShapeStyle, StrokeColorsSchema, StrokeStyle, TextAlign, TextVerticalAlign, } from '@blocksuite/affine-model';
import { z } from 'zod';

@@ -33,2 +33,6 @@ const ConnectorEndpointSchema = z.nativeEnum(PointStyle);

]);
const FrameBackgroundColorSchema = z.union([
FrameBackgroundColorsSchema,
ColorSchema,
]);
export const ConnectorSchema = z

@@ -43,2 +47,10 @@ .object({

mode: ConnectorModeSchema,
labelStyle: z.object({
color: LineColorSchema,
fontSize: z.number(),
fontFamily: FontFamilySchema,
fontWeight: FontWeightSchema,
fontStyle: FontStyleSchema,
textAlign: TextAlignSchema,
}),
})

@@ -53,2 +65,10 @@ .default({

mode: ConnectorMode.Curve,
labelStyle: {
color: DEFAULT_CONNECTOR_TEXT_COLOR,
fontSize: 16,
fontFamily: FontFamily.Inter,
fontWeight: FontWeight.Regular,
fontStyle: FontStyle.Normal,
textAlign: TextAlign.Center,
},
});

@@ -81,2 +101,3 @@ export const BrushSchema = z

textAlign: TextAlign.Center,
roughness: DEFAULT_ROUGHNESS,
};

@@ -99,3 +120,3 @@ const ShapeObject = {

textVerticalAlign: TextVerticalAlignSchema.optional(),
roughness: z.number().optional(),
roughness: z.number(),
};

@@ -109,15 +130,15 @@ export const ShapeSchema = z.object(ShapeObject).default(DEFAULT_SHAPE);

color: TextColorSchema,
fontSize: z.number(),
fontFamily: FontFamilySchema,
textAlign: TextAlignSchema,
fontWeight: FontWeightSchema,
fontStyle: FontStyleSchema,
fontSize: z.number(),
textAlign: TextAlignSchema,
})
.default({
color: DEFAULT_TEXT_COLOR,
fontSize: 24,
fontFamily: FontFamily.Inter,
textAlign: TextAlign.Left,
fontWeight: FontWeight.Regular,
fontStyle: FontStyle.Normal,
fontSize: 24,
textAlign: TextAlign.Left,
});

@@ -128,5 +149,5 @@ export const EdgelessTextSchema = z

fontFamily: FontFamilySchema,
textAlign: TextAlignSchema,
fontWeight: FontWeightSchema,
fontStyle: FontStyleSchema,
textAlign: TextAlignSchema,
})

@@ -136,5 +157,5 @@ .default({

fontFamily: FontFamily.Inter,
textAlign: TextAlign.Left,
fontWeight: FontWeight.Regular,
fontStyle: FontStyle.Normal,
textAlign: TextAlign.Left,
});

@@ -159,5 +180,5 @@ export const NoteSchema = z

style: {
borderRadius: 0,
borderSize: 4,
borderStyle: StrokeStyle.None,
borderRadius: DEFAULT_NOTE_CORNER,
borderSize: DEFAULT_NOTE_BORDER_SIZE,
borderStyle: DEFAULT_NOTE_BORDER_STYLE,
shadowType: DEFAULT_NOTE_SHADOW,

@@ -176,2 +197,7 @@ },

});
export const FrameSchema = z
.object({
background: FrameBackgroundColorSchema.optional(),
})
.default({});
export const NodePropsSchema = z.object({

@@ -184,2 +210,3 @@ connector: ConnectorSchema,

'affine:note': NoteSchema,
'affine:frame': FrameSchema,
// shapes

@@ -186,0 +213,0 @@ 'shape:diamond': ShapeSchema,

{
"name": "@blocksuite/affine-shared",
"version": "0.17.5",
"version": "0.17.6",
"description": "Default BlockSuite editable blocks.",
"type": "module",
"repository": "toeverything/blocksuite",
"scripts": {
"build": "tsc",
"test:unit": "nx vite:test --run",
"test:unit:coverage": "nx vite:test --run --coverage",
"test:e2e": "playwright test"
},
"keywords": [],

@@ -11,2 +17,7 @@ "author": "toeverything",

"dependencies": {
"@blocksuite/affine-model": "0.17.6",
"@blocksuite/block-std": "0.17.6",
"@blocksuite/global": "0.17.6",
"@blocksuite/inline": "0.17.6",
"@blocksuite/store": "0.17.6",
"@floating-ui/dom": "^1.6.10",

@@ -18,8 +29,3 @@ "@lit-labs/preact-signals": "^1.0.2",

"minimatch": "^10.0.1",
"zod": "^3.23.8",
"@blocksuite/affine-model": "0.17.5",
"@blocksuite/block-std": "0.17.5",
"@blocksuite/global": "0.17.5",
"@blocksuite/store": "0.17.5",
"@blocksuite/inline": "0.17.5"
"zod": "^3.23.8"
},

@@ -69,3 +75,47 @@ "exports": {

"publishConfig": {
"access": "public"
"access": "public",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./selection": {
"types": "./dist/selection/index.d.ts",
"import": "./dist/selection/index.js"
},
"./utils": {
"types": "./dist/utils/index.d.ts",
"import": "./dist/utils/index.js"
},
"./consts": {
"types": "./dist/consts/index.d.ts",
"import": "./dist/consts/index.js"
},
"./types": {
"types": "./dist/types/index.d.ts",
"import": "./dist/types/index.js"
},
"./commands": {
"types": "./dist/commands/index.d.ts",
"import": "./dist/commands/index.js"
},
"./mixins": {
"types": "./dist/mixins/index.d.ts",
"import": "./dist/mixins/index.js"
},
"./theme": {
"types": "./dist/theme/index.d.ts",
"import": "./dist/theme/index.js"
},
"./styles": {
"types": "./dist/styles/index.d.ts",
"import": "./dist/styles/index.js"
},
"./services": {
"types": "./dist/services/index.d.ts",
"import": "./dist/services/index.js"
}
}
},

@@ -78,10 +128,4 @@ "files": [

],
"scripts": {
"build": "tsc",
"test:unit": "nx vite:test --run",
"test:unit:coverage": "nx vite:test --run --coverage",
"test:e2e": "playwright test"
},
"main": "dist/index.js",
"types": "dist/index.d.ts"
}

@@ -98,3 +98,3 @@ // Polyfill for `showOpenFilePicker` API

accept: {
'text/xml': ['.mm', '.opml'],
'text/xml': ['.mm', '.opml', '.xml'],
},

@@ -101,0 +101,0 @@ },

import {
ConnectorMode,
DEFAULT_CONNECTOR_COLOR,
DEFAULT_CONNECTOR_TEXT_COLOR,
DEFAULT_FRONT_END_POINT_STYLE,
DEFAULT_NOTE_BACKGROUND_COLOR,
DEFAULT_NOTE_BORDER_SIZE,
DEFAULT_NOTE_BORDER_STYLE,
DEFAULT_NOTE_CORNER,
DEFAULT_NOTE_SHADOW,
DEFAULT_REAR_END_POINT_STYLE,
DEFAULT_ROUGHNESS,
DEFAULT_SHAPE_FILL_COLOR,

@@ -16,2 +21,3 @@ DEFAULT_SHAPE_STROKE_COLOR,

FontWeight,
FrameBackgroundColorsSchema,
LayoutType,

@@ -65,2 +71,6 @@ LineColor,

]);
const FrameBackgroundColorSchema = z.union([
FrameBackgroundColorsSchema,
ColorSchema,
]);

@@ -76,2 +86,10 @@ export const ConnectorSchema = z

mode: ConnectorModeSchema,
labelStyle: z.object({
color: LineColorSchema,
fontSize: z.number(),
fontFamily: FontFamilySchema,
fontWeight: FontWeightSchema,
fontStyle: FontStyleSchema,
textAlign: TextAlignSchema,
}),
})

@@ -86,2 +104,10 @@ .default({

mode: ConnectorMode.Curve,
labelStyle: {
color: DEFAULT_CONNECTOR_TEXT_COLOR,
fontSize: 16,
fontFamily: FontFamily.Inter,
fontWeight: FontWeight.Regular,
fontStyle: FontStyle.Normal,
textAlign: TextAlign.Center,
},
});

@@ -116,2 +142,3 @@

textAlign: TextAlign.Center,
roughness: DEFAULT_ROUGHNESS,
};

@@ -135,3 +162,3 @@

textVerticalAlign: TextVerticalAlignSchema.optional(),
roughness: z.number().optional(),
roughness: z.number(),
};

@@ -148,15 +175,15 @@

color: TextColorSchema,
fontSize: z.number(),
fontFamily: FontFamilySchema,
textAlign: TextAlignSchema,
fontWeight: FontWeightSchema,
fontStyle: FontStyleSchema,
fontSize: z.number(),
textAlign: TextAlignSchema,
})
.default({
color: DEFAULT_TEXT_COLOR,
fontSize: 24,
fontFamily: FontFamily.Inter,
textAlign: TextAlign.Left,
fontWeight: FontWeight.Regular,
fontStyle: FontStyle.Normal,
fontSize: 24,
textAlign: TextAlign.Left,
});

@@ -168,5 +195,5 @@

fontFamily: FontFamilySchema,
textAlign: TextAlignSchema,
fontWeight: FontWeightSchema,
fontStyle: FontStyleSchema,
textAlign: TextAlignSchema,
})

@@ -176,5 +203,5 @@ .default({

fontFamily: FontFamily.Inter,
textAlign: TextAlign.Left,
fontWeight: FontWeight.Regular,
fontStyle: FontStyle.Normal,
textAlign: TextAlign.Left,
});

@@ -200,5 +227,5 @@

style: {
borderRadius: 0,
borderSize: 4,
borderStyle: StrokeStyle.None,
borderRadius: DEFAULT_NOTE_CORNER,
borderSize: DEFAULT_NOTE_BORDER_SIZE,
borderStyle: DEFAULT_NOTE_BORDER_STYLE,
shadowType: DEFAULT_NOTE_SHADOW,

@@ -219,2 +246,8 @@ },

export const FrameSchema = z
.object({
background: FrameBackgroundColorSchema.optional(),
})
.default({});
export const NodePropsSchema = z.object({

@@ -227,2 +260,3 @@ connector: ConnectorSchema,

'affine:note': NoteSchema,
'affine:frame': FrameSchema,
// shapes

@@ -229,0 +263,0 @@ 'shape:diamond': ShapeSchema,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc