@blocksuite/affine-shared
Advanced tools
Comparing version 0.17.0-canary-202408260304-56ec428 to 0.17.0-canary-202408271459-2b40d5e
@@ -58,3 +58,5 @@ import { ColorScheme } from '@blocksuite/affine-model'; | ||
if (color.light && color.dark) { | ||
return `light-dark(${color.light}, ${color.dark})`; | ||
return this.mode === ColorScheme.Dark | ||
? `var(${color.dark})` | ||
: `var(${color.light})`; | ||
} | ||
@@ -61,0 +63,0 @@ return color.normal ?? fallback; |
@@ -1,2 +0,2 @@ | ||
import { FontFamily, FontStyle, FontWeight, LineColor, LineWidth, NoteDisplayMode, PointStyle, ShapeStyle, ShapeTextFontSize, ShapeType, StrokeStyle, TextAlign, TextVerticalAlign } from '@blocksuite/affine-model'; | ||
import { ConnectorMode, FontFamily, FontStyle, FontWeight, LineColor, LineWidth, NoteDisplayMode, PointStyle, ShapeStyle, ShapeTextFontSize, ShapeType, StrokeStyle, TextAlign, TextVerticalAlign } from '@blocksuite/affine-model'; | ||
import { z } from 'zod'; | ||
@@ -41,5 +41,5 @@ export declare const ColorSchema: z.ZodUnion<[z.ZodObject<{ | ||
rough: z.ZodBoolean; | ||
mode: z.ZodNumber; | ||
mode: z.ZodNativeEnum<typeof ConnectorMode>; | ||
}, "strip", z.ZodTypeAny, { | ||
mode: number; | ||
mode: ConnectorMode; | ||
frontEndpointStyle: PointStyle; | ||
@@ -57,3 +57,3 @@ rearEndpointStyle: PointStyle; | ||
}, { | ||
mode: number; | ||
mode: ConnectorMode; | ||
frontEndpointStyle: PointStyle; | ||
@@ -60,0 +60,0 @@ rearEndpointStyle: PointStyle; |
@@ -15,2 +15,3 @@ 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, LineColor, LineColorsSchema, LineWidth, NoteBackgroundColorsSchema, NoteDisplayMode, NoteShadowsSchema, PointStyle, ShapeStyle, ShapeTextFontSize, ShapeType, StrokeColorsSchema, StrokeStyle, TextAlign, TextVerticalAlign, } from '@blocksuite/affine-model'; | ||
const NoteDisplayModeSchema = z.nativeEnum(NoteDisplayMode); | ||
const ConnectorModeSchema = z.nativeEnum(ConnectorMode); | ||
export const ColorSchema = z.union([ | ||
@@ -41,3 +42,3 @@ z.object({ | ||
rough: z.boolean(), | ||
mode: z.number(), | ||
mode: ConnectorModeSchema, | ||
}) | ||
@@ -44,0 +45,0 @@ .default({ |
{ | ||
"name": "@blocksuite/affine-shared", | ||
"version": "0.17.0-canary-202408260304-56ec428", | ||
"version": "0.17.0-canary-202408271459-2b40d5e", | ||
"description": "Default BlockSuite editable blocks.", | ||
@@ -18,7 +18,7 @@ "type": "module", | ||
"zod": "^3.23.8", | ||
"@blocksuite/affine-model": "0.17.0-canary-202408260304-56ec428", | ||
"@blocksuite/inline": "0.17.0-canary-202408260304-56ec428", | ||
"@blocksuite/global": "0.17.0-canary-202408260304-56ec428", | ||
"@blocksuite/store": "0.17.0-canary-202408260304-56ec428", | ||
"@blocksuite/block-std": "0.17.0-canary-202408260304-56ec428" | ||
"@blocksuite/affine-model": "0.17.0-canary-202408271459-2b40d5e", | ||
"@blocksuite/inline": "0.17.0-canary-202408271459-2b40d5e", | ||
"@blocksuite/global": "0.17.0-canary-202408271459-2b40d5e", | ||
"@blocksuite/block-std": "0.17.0-canary-202408271459-2b40d5e", | ||
"@blocksuite/store": "0.17.0-canary-202408271459-2b40d5e" | ||
}, | ||
@@ -25,0 +25,0 @@ "exports": { |
@@ -68,3 +68,5 @@ import { type Color, ColorScheme } from '@blocksuite/affine-model'; | ||
if (color.light && color.dark) { | ||
return `light-dark(${color.light}, ${color.dark})`; | ||
return this.mode === ColorScheme.Dark | ||
? `var(${color.dark})` | ||
: `var(${color.light})`; | ||
} | ||
@@ -71,0 +73,0 @@ |
@@ -45,2 +45,3 @@ import { | ||
const NoteDisplayModeSchema = z.nativeEnum(NoteDisplayMode); | ||
const ConnectorModeSchema = z.nativeEnum(ConnectorMode); | ||
@@ -73,3 +74,3 @@ export const ColorSchema = z.union([ | ||
rough: z.boolean(), | ||
mode: z.number(), | ||
mode: ConnectorModeSchema, | ||
}) | ||
@@ -76,0 +77,0 @@ .default({ |
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
433227
6759
+ Added@blocksuite/affine-model@0.17.0-canary-202408271459-2b40d5e(transitive)
+ Added@blocksuite/block-std@0.17.0-canary-202408271459-2b40d5e(transitive)
+ Added@blocksuite/global@0.17.0-canary-202408271459-2b40d5e(transitive)
+ Added@blocksuite/inline@0.17.0-canary-202408271459-2b40d5e(transitive)
+ Added@blocksuite/store@0.17.0-canary-202408271459-2b40d5e(transitive)
+ Added@blocksuite/sync@0.17.0-canary-202408271459-2b40d5e(transitive)
+ Addedlodash.merge@4.6.2(transitive)
- Removed@blocksuite/affine-model@0.17.0-canary-202408260304-56ec428(transitive)
- Removed@blocksuite/block-std@0.17.0-canary-202408260304-56ec428(transitive)
- Removed@blocksuite/global@0.17.0-canary-202408260304-56ec428(transitive)
- Removed@blocksuite/inline@0.17.0-canary-202408260304-56ec428(transitive)
- Removed@blocksuite/store@0.17.0-canary-202408260304-56ec428(transitive)
- Removed@blocksuite/sync@0.17.0-canary-202408260304-56ec428(transitive)
- Removedmerge@2.1.1(transitive)
Updated@blocksuite/affine-model@0.17.0-canary-202408271459-2b40d5e
Updated@blocksuite/block-std@0.17.0-canary-202408271459-2b40d5e
Updated@blocksuite/global@0.17.0-canary-202408271459-2b40d5e
Updated@blocksuite/inline@0.17.0-canary-202408271459-2b40d5e