@visactor/vrender-components 0.16.14-alpha.3 → 0.16.14-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const version = "0.16.14-alpha.3";
1
+ export declare const version = "0.16.14-alpha.5";
2
2
  export * from './core/base';
3
3
  export * from './scrollbar';
4
4
  export * from './tag';
package/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "0.16.14-alpha.3";
1
+ export const version = "0.16.14-alpha.5";
2
2
 
3
3
  export * from "./core/base";
4
4
 
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAEzC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.16.14-alpha.3\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAEzC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.16.14-alpha.5\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\n"]}
package/es/util/text.d.ts CHANGED
@@ -1,9 +1,7 @@
1
1
  import type { ITextGraphicAttribute } from '@visactor/vrender-core';
2
2
  import type { ITextMeasureOption } from '@visactor/vutils';
3
3
  import { TextMeasure } from '@visactor/vutils';
4
- export declare const initTextMeasure: (textSpec?: Partial<ITextGraphicAttribute>, option?: Partial<ITextMeasureOption>, useNaiveCanvas?: boolean) => TextMeasure<Omit<ITextGraphicAttribute, 'lineHeight'> & {
5
- lineHeight?: number;
6
- }>;
4
+ export declare const initTextMeasure: (textSpec?: Partial<ITextGraphicAttribute>, option?: Partial<ITextMeasureOption>, useNaiveCanvas?: boolean) => TextMeasure<ITextGraphicAttribute>;
7
5
  export declare function measureTextSize(text: string | number | string[] | number[], textSpec: Partial<ITextGraphicAttribute>): {
8
6
  width: number;
9
7
  height: number;
package/es/util/text.js CHANGED
@@ -1,4 +1,4 @@
1
- import { calculateLineHeight, getTextBounds } from "@visactor/vrender-core";
1
+ import { getTextBounds } from "@visactor/vrender-core";
2
2
 
3
3
  import { TextMeasure } from "@visactor/vutils";
4
4
 
@@ -11,9 +11,7 @@ export const initTextMeasure = (textSpec, option, useNaiveCanvas) => new TextMea
11
11
  },
12
12
  getTextBounds: useNaiveCanvas ? void 0 : getTextBounds,
13
13
  specialCharSet: "-/: .,@%'\"~" + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase()
14
- }, null != option ? option : {}), Object.assign(Object.assign({}, textSpec), {
15
- lineHeight: calculateLineHeight(null == textSpec ? void 0 : textSpec.lineHeight, null == textSpec ? void 0 : textSpec.fontSize)
16
- }));
14
+ }, null != option ? option : {}), textSpec);
17
15
 
18
16
  export function measureTextSize(text, textSpec) {
19
17
  var _a;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/util/text.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAG5E,OAAO,EAAE,WAAW,EAAE,MAAM,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AU,EAAE,QAAQ,CAAC,QAAQ,IAAI,EAAE;KACpC,CAAC,CAAC;IAEH,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;AAC5D,CAAC","file":"text.js","sourcesContent":["import type { ITextGraphicAttribute } from '@visactor/vrender-core';\n// eslint-disable-next-line no-duplicate-imports\nimport { calculateLineHeight, getTextBounds } from '@visactor/vrender-core';\nimport type { ITextMeasureOption } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { TextMeasure } from '@visactor/vutils';\nimport { DEFAULT_TEXT_FONT_FAMILY, DEFAULT_TEXT_FONT_SIZE } from '../constant';\n\nexport const initTextMeasure = (\n textSpec?: Partial<ITextGraphicAttribute>,\n option?: Partial<ITextMeasureOption>,\n useNaiveCanvas?: boolean\n): TextMeasure<Omit<ITextGraphicAttribute, 'lineHeight'> & { lineHeight?: number }> => {\n return new TextMeasure<Omit<ITextGraphicAttribute, 'lineHeight'> & { lineHeight?: number }>(\n {\n defaultFontParams: {\n fontFamily: DEFAULT_TEXT_FONT_FAMILY,\n fontSize: DEFAULT_TEXT_FONT_SIZE\n },\n getTextBounds: useNaiveCanvas ? undefined : getTextBounds,\n specialCharSet: '-/: .,@%\\'\"~' + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase(),\n ...(option ?? {})\n },\n {\n ...textSpec,\n lineHeight: calculateLineHeight(textSpec?.lineHeight, textSpec?.fontSize)\n }\n );\n};\n\n// FIXME: 和上一个方法统一,使用 TextMeasure 类\nexport function measureTextSize(text: string | number | string[] | number[], textSpec: Partial<ITextGraphicAttribute>) {\n if (!text) {\n return { width: 0, height: 0 };\n }\n const bounds = getTextBounds({\n text,\n fontFamily: textSpec.fontFamily,\n fontSize: textSpec.fontSize || 12,\n fontWeight: textSpec.fontWeight as any,\n textAlign: textSpec.textAlign ?? 'center',\n textBaseline: textSpec.textBaseline,\n ellipsis: !!textSpec.ellipsis,\n maxLineWidth: textSpec.maxLineWidth || Infinity,\n lineHeight: textSpec.fontSize || 12\n });\n\n return { width: bounds.width(), height: bounds.height() };\n}\n"]}
1
+ {"version":3,"sources":["../src/util/text.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE/E,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,QAAyC,EACzC,MAAoC,EACpC,cAAwB,EACY,EAAE;IACtC,OAAO,IAAI,WAAW,iBAElB,iBAAiB,EAAE;YACjB,UAAU,EAAE,wBAAwB;YACpC,QAAQ,EAAE,sBAAsB;SACjC,EACD,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,EACzD,cAAc,EAAE,cAAc,GAAG,WAAW,CAAC,iBAAiB,GAAG,WAAW,CAAC,iBAAiB,CAAC,WAAW,EAAE,IACzG,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC,GAEnB,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC;AAGF,MAAM,UAAU,eAAe,CAAC,IAA2C,EAAE,QAAwC;;IACnH,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;KAChC;IACD,MAAM,MAAM,GAAG,aAAa,CAAC;QAC3B,IAAI;QACJ,UAAU,EAAE,QAAQ,CAAC,UAAU;QAC/B,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,EAAE;QACjC,UAAU,EAAE,QAAQ,CAAC,UAAiB;QACtC,SAAS,EAAE,MAAA,QAAQ,CAAC,SAAS,mCAAI,QAAQ;QACzC,YAAY,EAAE,QAAQ,CAAC,YAAY;QACnC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ;QAC7B,YAAY,EAAE,QAAQ,CAAC,YAAY,IAAI,QAAQ;QAC/C,UAAU,EAAE,QAAQ,CAAC,QAAQ,IAAI,EAAE;KACpC,CAAC,CAAC;IAEH,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;AAC5D,CAAC","file":"text.js","sourcesContent":["import type { ITextGraphicAttribute } from '@visactor/vrender-core';\n// eslint-disable-next-line no-duplicate-imports\nimport { getTextBounds } from '@visactor/vrender-core';\nimport type { ITextMeasureOption } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { TextMeasure } from '@visactor/vutils';\nimport { DEFAULT_TEXT_FONT_FAMILY, DEFAULT_TEXT_FONT_SIZE } from '../constant';\n\nexport const initTextMeasure = (\n textSpec?: Partial<ITextGraphicAttribute>,\n option?: Partial<ITextMeasureOption>,\n useNaiveCanvas?: boolean\n): TextMeasure<ITextGraphicAttribute> => {\n return new TextMeasure<ITextGraphicAttribute>(\n {\n defaultFontParams: {\n fontFamily: DEFAULT_TEXT_FONT_FAMILY,\n fontSize: DEFAULT_TEXT_FONT_SIZE\n },\n getTextBounds: useNaiveCanvas ? undefined : getTextBounds,\n specialCharSet: '-/: .,@%\\'\"~' + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase(),\n ...(option ?? {})\n },\n textSpec\n );\n};\n\n// FIXME: 和上一个方法统一,使用 TextMeasure 类\nexport function measureTextSize(text: string | number | string[] | number[], textSpec: Partial<ITextGraphicAttribute>) {\n if (!text) {\n return { width: 0, height: 0 };\n }\n const bounds = getTextBounds({\n text,\n fontFamily: textSpec.fontFamily,\n fontSize: textSpec.fontSize || 12,\n fontWeight: textSpec.fontWeight as any,\n textAlign: textSpec.textAlign ?? 'center',\n textBaseline: textSpec.textBaseline,\n ellipsis: !!textSpec.ellipsis,\n maxLineWidth: textSpec.maxLineWidth || Infinity,\n lineHeight: textSpec.fontSize || 12\n });\n\n return { width: bounds.width(), height: bounds.height() };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vrender-components",
3
- "version": "0.16.14-alpha.3",
3
+ "version": "0.16.14-alpha.5",
4
4
  "description": "components library for dp visualization",
5
5
  "sideEffects": false,
6
6
  "main": "cjs/index.js",
@@ -12,14 +12,14 @@
12
12
  "dist"
13
13
  ],
14
14
  "dependencies": {
15
- "@visactor/vrender-core": "0.16.14-alpha.3",
16
- "@visactor/vrender-kits": "0.16.14-alpha.3",
17
- "@visactor/vutils": "~0.16.6",
18
- "@visactor/vscale": "~0.16.0"
15
+ "@visactor/vrender-core": "0.16.14-alpha.5",
16
+ "@visactor/vrender-kits": "0.16.14-alpha.5",
17
+ "@visactor/vutils": "0.16.8-alpha.1",
18
+ "@visactor/vscale": "0.16.8-alpha.1"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@rushstack/eslint-patch": "~1.1.4",
22
- "@visactor/vscale": "~0.16.0",
22
+ "@visactor/vscale": "0.16.8-alpha.1",
23
23
  "@types/jest": "^26.0.0",
24
24
  "jest": "^26.0.0",
25
25
  "jest-electron": "^0.1.12",