Skip to content

Commit

Permalink
Merge faf4a1c into 2d0c7f8
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoiver committed Sep 15, 2022
2 parents 2d0c7f8 + faf4a1c commit 9a7ab41
Show file tree
Hide file tree
Showing 61 changed files with 214 additions and 145 deletions.
2 changes: 1 addition & 1 deletion packages/g-camera-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-camera-api",
"version": "1.0.1",
"version": "1.0.2",
"description": "A simple implementation of Camera API.",
"keywords": [
"antv",
Expand Down
14 changes: 7 additions & 7 deletions packages/g-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-canvas",
"version": "1.9.0",
"version": "1.9.1",
"description": "A renderer implemented by Canvas 2D API",
"keywords": [
"antv",
Expand Down Expand Up @@ -30,12 +30,12 @@
"README.md"
],
"dependencies": {
"@antv/g-plugin-canvas-path-generator": "^1.1.12",
"@antv/g-plugin-canvas-picker": "^1.8.9",
"@antv/g-plugin-canvas-renderer": "^1.7.15",
"@antv/g-plugin-dom-interaction": "^1.7.12",
"@antv/g-plugin-html-renderer": "^1.7.12",
"@antv/g-plugin-image-loader": "^1.1.13",
"@antv/g-plugin-canvas-path-generator": "^1.1.13",
"@antv/g-plugin-canvas-picker": "^1.8.10",
"@antv/g-plugin-canvas-renderer": "^1.7.16",
"@antv/g-plugin-dom-interaction": "^1.7.13",
"@antv/g-plugin-html-renderer": "^1.7.13",
"@antv/g-plugin-image-loader": "^1.1.14",
"tslib": "^2.3.1"
},
"devDependencies": {
Expand Down
14 changes: 7 additions & 7 deletions packages/g-canvaskit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-canvaskit",
"version": "0.8.0",
"version": "0.8.1",
"description": "A renderer implemented by CanvasKit",
"keywords": [
"antv",
Expand Down Expand Up @@ -30,12 +30,12 @@
"README.md"
],
"dependencies": {
"@antv/g-plugin-canvas-path-generator": "^1.1.12",
"@antv/g-plugin-canvas-picker": "^1.8.9",
"@antv/g-plugin-canvaskit-renderer": "^1.1.13",
"@antv/g-plugin-dom-interaction": "^1.7.12",
"@antv/g-plugin-html-renderer": "^1.7.12",
"@antv/g-plugin-image-loader": "^1.1.13",
"@antv/g-plugin-canvas-path-generator": "^1.1.13",
"@antv/g-plugin-canvas-picker": "^1.8.10",
"@antv/g-plugin-canvaskit-renderer": "^1.1.14",
"@antv/g-plugin-dom-interaction": "^1.7.13",
"@antv/g-plugin-html-renderer": "^1.7.13",
"@antv/g-plugin-image-loader": "^1.1.14",
"canvaskit-wasm": "^0.34.0",
"tslib": "^2.3.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/g-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-compat",
"version": "1.0.1",
"version": "1.0.2",
"description": "The migration build which provides some compatible API for G 4.0.",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-components",
"version": "1.7.12",
"version": "1.7.13",
"description": "Components for g",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-css-layout-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-css-layout-api",
"version": "1.0.1",
"version": "1.0.2",
"description": "A simple implementation of CSS Layout API.",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-css-typed-om-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-css-typed-om-api",
"version": "1.0.1",
"version": "1.0.2",
"description": "A simple implementation of CSS Typed OM API.",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-devtool/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@antv/g-devtool",
"private": true,
"version": "0.10.12",
"version": "0.10.13",
"description": "devtool for g in browser",
"main": "index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-dom-mutation-observer-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-dom-mutation-observer-api",
"version": "1.0.1",
"version": "1.0.2",
"description": "A simple implementation of DOM MutationObserver API.",
"keywords": [
"antv",
Expand Down
6 changes: 3 additions & 3 deletions packages/g-gesture/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-gesture",
"version": "0.0.35",
"version": "0.0.36",
"description": "G Gesture",
"keywords": [
"antv",
Expand Down Expand Up @@ -31,8 +31,8 @@
"eventemitter3": "^4.0.0"
},
"devDependencies": {
"@antv/g-mobile-canvas": "^0.8.9",
"@antv/g-mobile-canvas-element": "^0.6.12"
"@antv/g-mobile-canvas": "^0.8.10",
"@antv/g-mobile-canvas-element": "^0.6.13"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/g-image-exporter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-image-exporter",
"version": "0.5.12",
"version": "0.5.13",
"description": "A image exporter for G using DOM API",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-layout-blocklike/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-layout-blocklike",
"version": "1.7.12",
"version": "1.7.13",
"description": "A blocklike layout",
"keywords": [
"antv",
Expand Down
5 changes: 3 additions & 2 deletions packages/g-lite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-lite",
"version": "1.0.1",
"version": "1.0.2",
"description": "A core module for rendering engine implements DOM API.",
"keywords": [
"antv",
Expand Down Expand Up @@ -29,14 +29,15 @@
"README.md"
],
"dependencies": {
"@antv/g-math": "^1.7.12",
"@antv/g-math": "^1.7.13",
"@antv/util": "^3.2.3",
"@types/offscreencanvas": "^2019.6.4",
"d3-color": "^1.4.0",
"eventemitter3": "^4.0.0",
"gl-matrix": "^3.1.0",
"mana-syringe": "^0.3.1",
"rbush": "^3.0.1",
"reflect-metadata": "^0.1.13",
"request-animation-frame-polyfill": "^1.1.2",
"tslib": "^2.3.1"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/g-lite/src/css/StyleValueRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,10 @@ export const BUILT_IN_PROPERTIES: PropertyMetadata[] = [
k: ['start', 'center', 'end', 'left', 'right'],
d: 'start',
},
{
n: 'whiteSpace',
l: true,
},
// {
// n: 'whiteSpace',
// l: true,
// },
{
n: 'markerStart',
syntax: PropertySyntax.MARKER,
Expand Down
106 changes: 88 additions & 18 deletions packages/g-lite/src/display-objects/Text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ export interface TextStyleProps extends BaseStyleProps {
x?: number | string;
y?: number | string;
text: string;
/** 设置文本内容的当前对齐方式 */

/**
* The text-align property sets the horizontal alignment of the inline-level content.
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-align
*/
textAlign?: CSSGlobalKeywords | 'start' | 'center' | 'end' | 'left' | 'right';
/** 设置在绘制文本时使用的当前文本基线 */

/**
* It specifies the current text baseline used when drawing text.
* @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/textBaseline
*/
textBaseline?:
| CSSGlobalKeywords
| 'top'
Expand All @@ -20,49 +28,111 @@ export interface TextStyleProps extends BaseStyleProps {
| 'alphabetic'
| 'ideographic'
| 'bottom';
/** 字体样式 */

/**
* The text-overflow property sets how hidden overflow content is signaled to users.
* It can be clipped, display an ellipsis ('…'), or display a custom string.
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow#values
*/
textOverflow?: 'clip' | 'ellipsis' | '';

/**
* The font-style property sets whether a font should be styled with a normal, italic, or oblique face from its font-family.
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
*/
fontStyle?: CSSGlobalKeywords | 'normal' | 'italic' | 'oblique';
/** 文本字体大小 */

/**
* The font-size property sets the size of the font.
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
*/
fontSize?: number | string;
/** 文本字体 */

/**
* The font-family property specifies a prioritized list of one or more font family names and/or generic family names for the selected element.
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family
*/
fontFamily?: string;
/** 文本粗细 */

/**
* The font-weight property sets the weight (or boldness) of the font. The weights available depend on the font-family that is currently set.
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
*/
fontWeight?: CSSGlobalKeywords | 'normal' | 'bold' | 'bolder' | 'lighter' | number;
/** 字体变体 */

/**
* The font-variant shorthand property allows you to set all the font variants for a font.
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant
*/
fontVariant?: CSSGlobalKeywords | 'normal' | 'small-caps' | string;
/** 文本行高 */

/**
* The line-height property sets the height of a line box.
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
*/
lineHeight?: number | string;

/**
* It specifies the spacing between letters when drawing text.
* @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/letterSpacing
*/
letterSpacing?: number | string;
whiteSpace?: 'pre';

/**
* The white-space property sets how white space inside an element is handled.
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
*/
// whiteSpace?: 'pre';

/**
* There is no "CSS leading" property
* @see https://css-tricks.com/how-to-tame-line-height-in-css/
*/
leading?: number;

/**
* The overflow-wrap CSS property applies to inline elements,
* setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box.
*
* The overflow-wrap property acts in the same way as the non-standard property word-wrap.
* The word-wrap property is now treated by browsers as an alias of the standard property.
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap
*/
wordWrap?: boolean;

/**
* Max width of overflowing box.
*/
wordWrapWidth?: number;
// dropShadow?: boolean;
// dropShadowDistance?: number;

/**
* The dx attribute indicates a shift along the x-axis on the position of an element or its content.
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/dx
*/
dx?: number | string;

/**
* The dy attribute indicates a shift along the y-axis on the position of an element or its content.
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/dy
*/
dy?: number | string;
}
export interface ParsedTextStyleProps extends ParsedBaseStyleProps {
x: number;
y: number;
text: string;
textAlign?: 'start' | 'center' | 'end' | 'left' | 'right';
/** 设置在绘制文本时使用的当前文本基线 */
textBaseline?: 'top' | 'hanging' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom';
/** 字体样式 */
fontStyle?: 'normal' | 'italic' | 'oblique';
/** 文本字体大小 */
fontSize?: number;
/** 文本字体 */
fontFamily?: string;
/** 文本粗细 */
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | number;
/** 字体变体 */
fontVariant?: 'normal' | 'small-caps' | string;
/** 文本行高 */
lineHeight?: number;
letterSpacing?: number;
whiteSpace?: 'pre';
// whiteSpace?: 'pre';
leading?: number;
wordWrap?: boolean;
wordWrapWidth?: number;
Expand Down Expand Up @@ -103,7 +173,7 @@ export class Text extends DisplayObject<TextStyleProps, ParsedTextStyleProps> {
letterSpacing: '',
lineHeight: '',
miterLimit: '',
whiteSpace: 'pre',
// whiteSpace: 'pre',
wordWrap: false,
wordWrapWidth: 0,
leading: 0,
Expand Down
1 change: 1 addition & 0 deletions packages/g-lite/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'reflect-metadata';
import { GlobalContainer } from 'mana-syringe';
import RBush from 'rbush';
import { StyleValueRegistry } from './css';
Expand Down
2 changes: 1 addition & 1 deletion packages/g-math/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-math",
"version": "1.7.12",
"version": "1.7.13",
"description": "Geometry util",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-mobile-canvas-element/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-mobile-canvas-element",
"version": "0.6.12",
"version": "0.6.13",
"description": "Create a CanvasLike element from existed context in mobile environment",
"keywords": [
"antv",
Expand Down
12 changes: 6 additions & 6 deletions packages/g-mobile-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-mobile-canvas",
"version": "0.8.9",
"version": "0.8.10",
"description": "A renderer implemented with Canvas2D API in mobile environment",
"keywords": [
"antv",
Expand All @@ -27,11 +27,11 @@
"README.md"
],
"dependencies": {
"@antv/g-plugin-canvas-path-generator": "^1.1.12",
"@antv/g-plugin-canvas-picker": "^1.8.9",
"@antv/g-plugin-canvas-renderer": "^1.7.15",
"@antv/g-plugin-image-loader": "^1.1.13",
"@antv/g-plugin-mobile-interaction": "^0.7.12",
"@antv/g-plugin-canvas-path-generator": "^1.1.13",
"@antv/g-plugin-canvas-picker": "^1.8.10",
"@antv/g-plugin-canvas-renderer": "^1.7.16",
"@antv/g-plugin-image-loader": "^1.1.14",
"@antv/g-plugin-mobile-interaction": "^0.7.13",
"tslib": "^2.3.1"
},
"devDependencies": {
Expand Down

0 comments on commit 9a7ab41

Please sign in to comment.