@blocksuite/virgo
Advanced tools
Comparing version 0.5.0-20230307224400-a4c096e to 0.5.0-20230308090832-6594d8d
@@ -12,3 +12,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
const unitTextStyles = styleMap({ | ||
whiteSpace: 'break-spaces', | ||
whiteSpace: 'pre-wrap', | ||
}); | ||
@@ -15,0 +15,0 @@ let VText = class VText extends LitElement { |
import type { TemplateResult } from 'lit'; | ||
import type { VText } from './components/index.js'; | ||
import type { BaseTextAttributes } from './utils/index.js'; | ||
export interface CustomTypes { | ||
[key: string]: unknown; | ||
} | ||
type ExtendableKeys = 'Element' | 'Attributes'; | ||
type ExtendedType<K extends ExtendableKeys, B> = unknown extends CustomTypes[K] ? B : CustomTypes[K]; | ||
export type TextAttributes = ExtendedType<'Attributes', BaseTextAttributes>; | ||
export type DeltaInsert<TextAttributes extends BaseTextAttributes = BaseTextAttributes> = { | ||
@@ -15,3 +9,2 @@ insert: string; | ||
export type AttributesRenderer<TextAttributes extends BaseTextAttributes = BaseTextAttributes> = (vText: VText, attributes?: TextAttributes) => TemplateResult<1>; | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -24,3 +24,3 @@ import { html } from 'lit'; | ||
return styleMap({ | ||
'white-space': 'break-spaces', | ||
'white-space': 'pre-wrap', | ||
'font-weight': props.bold ? 'bold' : 'normal', | ||
@@ -27,0 +27,0 @@ 'font-style': props.italic ? 'italic' : 'normal', |
export * from './attributes-renderer.js'; | ||
export * from './base-attributes.js'; | ||
export * from './convert.js'; | ||
export * from './render.js'; | ||
export * from './renderer.js'; | ||
//# sourceMappingURL=index.d.ts.map |
export * from './attributes-renderer.js'; | ||
export * from './base-attributes.js'; | ||
export * from './convert.js'; | ||
export * from './render.js'; | ||
export * from './renderer.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -8,3 +8,3 @@ import { assertExists, Slot } from '@blocksuite/global/utils'; | ||
import { baseTextAttributes } from './utils/index.js'; | ||
import { renderElement } from './utils/render.js'; | ||
import { renderElement } from './utils/renderer.js'; | ||
export class VEditor { | ||
@@ -11,0 +11,0 @@ static nativePointToTextPoint(node, offset) { |
{ | ||
"name": "@blocksuite/virgo", | ||
"version": "0.5.0-20230307224400-a4c096e", | ||
"version": "0.5.0-20230308090832-6594d8d", | ||
"description": "A micro editor.", | ||
@@ -26,3 +26,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@blocksuite/global": "0.5.0-20230307224400-a4c096e", | ||
"@blocksuite/global": "0.5.0-20230308090832-6594d8d", | ||
"zod": "^3.20.6" | ||
@@ -29,0 +29,0 @@ }, |
@@ -9,3 +9,3 @@ import { html, LitElement } from 'lit'; | ||
const unitTextStyles = styleMap({ | ||
whiteSpace: 'break-spaces', | ||
whiteSpace: 'pre-wrap', | ||
}); | ||
@@ -12,0 +12,0 @@ |
@@ -6,13 +6,2 @@ import type { TemplateResult } from 'lit'; | ||
export interface CustomTypes { | ||
[key: string]: unknown; | ||
} | ||
type ExtendableKeys = 'Element' | 'Attributes'; | ||
type ExtendedType<K extends ExtendableKeys, B> = unknown extends CustomTypes[K] | ||
? B | ||
: CustomTypes[K]; | ||
export type TextAttributes = ExtendedType<'Attributes', BaseTextAttributes>; | ||
export type DeltaInsert< | ||
@@ -19,0 +8,0 @@ TextAttributes extends BaseTextAttributes = BaseTextAttributes |
@@ -33,3 +33,3 @@ import { html } from 'lit'; | ||
return styleMap({ | ||
'white-space': 'break-spaces', | ||
'white-space': 'pre-wrap', | ||
'font-weight': props.bold ? 'bold' : 'normal', | ||
@@ -36,0 +36,0 @@ 'font-style': props.italic ? 'italic' : 'normal', |
export * from './attributes-renderer.js'; | ||
export * from './base-attributes.js'; | ||
export * from './convert.js'; | ||
export * from './render.js'; | ||
export * from './renderer.js'; |
@@ -13,3 +13,3 @@ import { assertExists, Slot } from '@blocksuite/global/utils'; | ||
import { baseTextAttributes } from './utils/index.js'; | ||
import { renderElement } from './utils/render.js'; | ||
import { renderElement } from './utils/renderer.js'; | ||
@@ -16,0 +16,0 @@ export interface VRange { |
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
353447
4773
+ Added@blocksuite/global@0.5.0-20230308090832-6594d8d(transitive)
- Removed@blocksuite/global@0.5.0-20230307224400-a4c096e(transitive)