@compass-framework/core 1.2.65 → 1.2.67

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.
Files changed (44) hide show
  1. package/@types/animation/Animation.d.ts +1 -1
  2. package/@types/animation/Transformation.d.ts +1 -1
  3. package/@types/app/ApplicationConfig.d.ts +2 -0
  4. package/@types/app/ApplicationCreatorConfig.d.ts +1 -1
  5. package/@types/content/AttributeSet.d.ts +3 -3
  6. package/@types/content/AttributeSetBuilder.ts +9 -0
  7. package/@types/content/Context.d.ts +1 -1
  8. package/@types/content/ContextWrapper.d.ts +1 -1
  9. package/@types/content/Resources.d.ts +2 -2
  10. package/@types/display/SurfaceProvider.d.ts +1 -1
  11. package/@types/{drawable → graphics/drawable}/ColorDrawable.d.ts +2 -2
  12. package/@types/{drawable → graphics/drawable}/CornersDrawable.d.ts +2 -2
  13. package/@types/{drawable → graphics/drawable}/Drawable.d.ts +7 -7
  14. package/@types/{drawable → graphics/drawable}/ImageDrawable.ts +3 -3
  15. package/@types/{drawable → graphics/drawable}/LayerDrawable.d.ts +3 -3
  16. package/@types/{drawable → graphics/drawable}/LinearGradientDrawable.d.ts +1 -1
  17. package/@types/{drawable → graphics/drawable}/PictureDrawable.d.ts +4 -4
  18. package/@types/imm/InputConnection.ts +1 -1
  19. package/@types/view/Gravity.d.ts +1 -1
  20. package/@types/view/Outline.d.ts +1 -1
  21. package/@types/view/View.d.ts +4 -4
  22. package/@types/view/ViewGroupOverlay.d.ts +1 -1
  23. package/@types/view/ViewOverlay.d.ts +1 -1
  24. package/index.d.ts +26 -26
  25. package/package.json +1 -1
  26. /package/@types/{canvas → graphics}/BlendMode.ts +0 -0
  27. /package/@types/{canvas → graphics}/Canvas.d.ts +0 -0
  28. /package/@types/{canvas → graphics}/Color.d.ts +0 -0
  29. /package/@types/{canvas → graphics}/ColorFilter.ts +0 -0
  30. /package/@types/{canvas → graphics}/CornerPathEffect.d.ts +0 -0
  31. /package/@types/{canvas → graphics}/ImageFilter.ts +0 -0
  32. /package/@types/{canvas → graphics}/LinearGradient.d.ts +0 -0
  33. /package/@types/{canvas → graphics}/Matrix.d.ts +0 -0
  34. /package/@types/{canvas → graphics}/Paint.d.ts +0 -0
  35. /package/@types/{canvas → graphics}/Path.d.ts +0 -0
  36. /package/@types/{canvas → graphics}/PathEffect.ts +0 -0
  37. /package/@types/{canvas → graphics}/Picture.d.ts +0 -0
  38. /package/@types/{canvas → graphics}/Rect.d.ts +0 -0
  39. /package/@types/{canvas → graphics}/RendererBackend.ts +0 -0
  40. /package/@types/{canvas → graphics}/Shader.d.ts +0 -0
  41. /package/@types/{canvas → graphics}/Shadow.d.ts +0 -0
  42. /package/@types/{canvas → graphics}/Surface.d.ts +0 -0
  43. /package/@types/{canvas → graphics}/Typeface.d.ts +0 -0
  44. /package/@types/{canvas → graphics}/TypefaceFactory.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import { InterfaceTemplate } from "@compass-framework/library";
2
- import { Rect } from '../canvas/Rect';
2
+ import { Rect } from '../graphics/Rect';
3
3
  import { Transformation } from './Transformation';
4
4
  import { Interpolator } from './Interpolator';
5
5
  import { AttributeSet } from "../content/AttributeSet";
@@ -1,4 +1,4 @@
1
- import { Matrix } from '../canvas/Matrix';
1
+ import { Matrix } from '../graphics/Matrix';
2
2
  import { Context } from "../content/Context";
3
3
 
4
4
  /**
@@ -1,5 +1,7 @@
1
1
  import { ActivityType } from "../activity/ActivityType";
2
+ import { Context } from "../content/Context";
2
3
 
3
4
  export interface ApplicationConfig {
4
5
  launcher: ActivityType;
6
+ preload?: (context: Context) => Promise<void>;
5
7
  }
@@ -1,4 +1,4 @@
1
- import { RendererBackend } from "../canvas/RendererBackend";
1
+ import { RendererBackend } from "../graphics/RendererBackend";
2
2
  import { CanvaskitPlatformHostConfig } from "../host/backend/CanvaskitPlatformHostConfig";
3
3
  import { WebPlatformHostConfig } from "../host/backend/WebPlatformHostConfig";
4
4
  import { NodePlatformHostConfig } from "../host/backend/NodePlatformHostConfig";
@@ -1,8 +1,8 @@
1
1
  import { CharSequence, Influence, Nullable } from "@compass-framework/library";
2
2
  import { Resources } from "./Resources";
3
- import { PictureDrawable } from "../drawable/PictureDrawable";
4
- import { Drawable } from "../drawable/Drawable";
5
- import { ColorDrawable } from "../drawable/ColorDrawable";
3
+ import { PictureDrawable } from "../graphics/drawable/PictureDrawable";
4
+ import { Drawable } from "../graphics/drawable/Drawable";
5
+ import { ColorDrawable } from "../graphics/drawable/ColorDrawable";
6
6
 
7
7
  /**
8
8
  * 属性集合,从资源或布局中按名称读取类型化属性值。
@@ -0,0 +1,9 @@
1
+ import { Context } from "./Context";
2
+ import { AttributeSet } from "./AttributeSet";
3
+
4
+ export declare class AttributeSetBuilder {
5
+ public static from(context: Context): AttributeSetBuilder;
6
+
7
+ public build(): AttributeSet;
8
+ public build(attribute: Record<string, string>): AttributeSet;
9
+ }
@@ -2,7 +2,7 @@ import { Class } from "@compass-framework/library";
2
2
  import { Environment } from "../evaluate/Environment";
3
3
  import { Resources } from "./Resources";
4
4
  import { MouseCursor } from "../display/MouseCursor";
5
- import { RendererBackend } from "../canvas/RendererBackend";
5
+ import { RendererBackend } from "../graphics/RendererBackend";
6
6
  import { WindowManager } from "../window/WindowManager";
7
7
  import { SurfaceProvider } from "../display/SurfaceProvider";
8
8
  import { ViewFactoryRegistry } from "./ViewFactoryRegistry";
@@ -1,7 +1,7 @@
1
1
  import { Context } from "./Context";
2
2
  import { Environment } from "../evaluate/Environment";
3
3
  import { MouseCursor } from "../display/MouseCursor";
4
- import { RendererBackend } from "../canvas/RendererBackend";
4
+ import { RendererBackend } from "../graphics/RendererBackend";
5
5
  import { Resources } from "./Resources";
6
6
  import { SurfaceProvider } from "../display/SurfaceProvider";
7
7
  import { ViewFactoryRegistry } from "./ViewFactoryRegistry";
@@ -1,7 +1,7 @@
1
1
  import { CharSequence, RefValue, XML } from "@compass-framework/library";
2
- import { Drawable } from "../drawable/Drawable";
2
+ import { Drawable } from "../graphics/drawable/Drawable";
3
3
  import { DisplayMetrics } from "./DisplayMetrics";
4
- import { ColorDrawable } from "../drawable/ColorDrawable";
4
+ import { ColorDrawable } from "../graphics/drawable/ColorDrawable";
5
5
  import { AttributeSet } from "./AttributeSet";
6
6
  import { Configuration } from "./Configuration";
7
7
 
@@ -1,6 +1,6 @@
1
1
  import { InterfaceTemplate } from "@compass-framework/library";
2
2
  import { Context } from "../content/Context";
3
- import { Surface } from "../canvas/Surface";
3
+ import { Surface } from "../graphics/Surface";
4
4
 
5
5
  /**
6
6
  * Surface 提供者,按设备尺寸创建绘制表面。
@@ -1,6 +1,6 @@
1
1
  import { Drawable } from "./Drawable";
2
- import { Canvas } from "../canvas/Canvas";
3
- import { Context } from "../content/Context";
2
+ import { Canvas } from "../Canvas";
3
+ import { Context } from "../../content/Context";
4
4
 
5
5
  /**
6
6
  * 纯色 Drawable,用单一颜色填充自身边界。
@@ -1,6 +1,6 @@
1
1
  import { Drawable } from "./Drawable";
2
- import { Canvas } from "../canvas/Canvas";
3
- import { Context } from "../content/Context";
2
+ import { Canvas } from "../Canvas";
3
+ import { Context } from "../../content/Context";
4
4
 
5
5
  /**
6
6
  * 圆角矩形 Drawable,支持填充色与描边。
@@ -1,11 +1,11 @@
1
1
  import { InterfaceTemplate, Runnable } from "@compass-framework/library";
2
- import { Resources } from "../content/Resources";
3
- import { Canvas } from "../canvas/Canvas";
4
- import { Outline } from "../view/Outline";
5
- import { Rect } from "../canvas/Rect";
6
- import { Configuration } from "../content/Configuration";
7
- import { Context } from "../content/Context";
8
- import { DisplayMetrics } from "../content/DisplayMetrics";
2
+ import { Resources } from "../../content/Resources";
3
+ import { Canvas } from "../Canvas";
4
+ import { Outline } from "../../view/Outline";
5
+ import { Rect } from "../Rect";
6
+ import { Configuration } from "../../content/Configuration";
7
+ import { Context } from "../../content/Context";
8
+ import { DisplayMetrics } from "../../content/DisplayMetrics";
9
9
 
10
10
  /**
11
11
  * 可绘制对象的基类,封装边界、透明度与绘制回调。
@@ -1,7 +1,7 @@
1
1
  import { Drawable } from "./Drawable";
2
- import { Image } from "../widget/Image";
3
- import { Canvas } from "../canvas/Canvas";
4
- import { Context } from "../content/Context";
2
+ import { Image } from "../../widget/Image";
3
+ import { Canvas } from "../Canvas";
4
+ import { Context } from "../../content/Context";
5
5
 
6
6
  /**
7
7
  * 图像 Drawable,将 Image 按重力对齐绘制到边界内。
@@ -1,8 +1,8 @@
1
1
  import { Implements, Runnable } from "@compass-framework/library";
2
2
  import { Drawable } from "./Drawable";
3
- import { Canvas } from "../canvas/Canvas";
4
- import { Resources } from "../content/Resources";
5
- import { Context } from "../content/Context";
3
+ import { Canvas } from "../Canvas";
4
+ import { Resources } from "../../content/Resources";
5
+ import { Context } from "../../content/Context";
6
6
 
7
7
  /**
8
8
  * 图层 Drawable,按顺序叠加绘制多个子 Drawable。
@@ -1,4 +1,4 @@
1
- import { Canvas } from "../canvas/Canvas";
1
+ import { Canvas } from "../Canvas";
2
2
 
3
3
  /**
4
4
  * 线性渐变 Drawable,按角度或方向填充渐变色。
@@ -1,9 +1,9 @@
1
1
  import { Consumer, Implements } from "@compass-framework/library";
2
- import { Paint } from "../canvas/Paint";
2
+ import { Paint } from "../Paint";
3
3
  import { ImageDrawable } from "./ImageDrawable";
4
- import { Picture } from "../canvas/Picture";
5
- import { ImageView } from "../widget/ImageView";
6
- import { Context } from "../content/Context";
4
+ import { Picture } from "../Picture";
5
+ import { ImageView } from "../../widget/ImageView";
6
+ import { Context } from "../../content/Context";
7
7
 
8
8
  /**
9
9
  * 基于 Picture 的图像 Drawable,支持加载状态通知。
@@ -1,5 +1,5 @@
1
1
  import { CharSequence } from "@compass-framework/library";
2
- import { Rect } from "../canvas/Rect";
2
+ import { Rect } from "../graphics/Rect";
3
3
  import { KeyEvent } from "../event/KeyEvent";
4
4
 
5
5
  export interface InputConnection {
@@ -1,4 +1,4 @@
1
- import { Rect } from "../canvas/Rect";
1
+ import { Rect } from "../graphics/Rect";
2
2
 
3
3
  /**
4
4
  * 重力对齐常量与布局定位工具。
@@ -1,4 +1,4 @@
1
- import { Rect } from "../canvas/Rect";
1
+ import { Rect } from "../graphics/Rect";
2
2
  import { Context } from "../content/Context";
3
3
 
4
4
  /**
@@ -7,18 +7,18 @@ import {
7
7
  import { ViewOverlay } from "./ViewOverlay";
8
8
  import { Context } from "../content/Context";
9
9
  import { Configuration } from "../content/Configuration";
10
- import { Rect } from "../canvas/Rect";
10
+ import { Rect } from "../graphics/Rect";
11
11
  import { AttributeSet } from "../content/AttributeSet";
12
- import { Canvas } from "../canvas/Canvas";
12
+ import { Canvas } from "../graphics/Canvas";
13
13
  import { Transformation } from "../animation/Transformation";
14
14
  import { KeyEvent } from "../event/KeyEvent";
15
- import { Drawable } from "../drawable/Drawable";
15
+ import { Drawable } from "../graphics/drawable/Drawable";
16
16
  import { Outline } from "./Outline";
17
17
  import { ViewTreeObserver } from "./ViewTreeObserver";
18
18
  import { ViewGroup } from "./ViewGroup";
19
19
  import { Animation } from "../animation/Animation";
20
20
  import { MotionEvent } from "../event/MotionEvent";
21
- import { Matrix } from "../canvas/Matrix";
21
+ import { Matrix } from "../graphics/Matrix";
22
22
  import { Resources } from "../content/Resources";
23
23
  import { ViewParent } from "./ViewParent";
24
24
  import { ViewOutlineProvider } from "./ViewOutlineProvider";
@@ -1,5 +1,5 @@
1
1
  import { ViewOverlay } from "./ViewOverlay";
2
- import { Drawable } from "../drawable/Drawable";
2
+ import { Drawable } from "../graphics/drawable/Drawable";
3
3
  import { View } from "./View";
4
4
 
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { Drawable } from "../drawable/Drawable";
1
+ import { Drawable } from "../graphics/drawable/Drawable";
2
2
  import { ViewGroup } from "./ViewGroup";
3
3
 
4
4
  /**
package/index.d.ts CHANGED
@@ -35,25 +35,25 @@ export * from "./@types/content/ServiceRegister";
35
35
  export * from "./@types/content/LayoutInflater";
36
36
  export * from "./@types/content/ViewFactoryRegistry";
37
37
 
38
- export * from "./@types/canvas/BlendMode";
39
- export * from "./@types/canvas/Canvas";
40
- export * from "./@types/canvas/Color";
41
- export * from "./@types/canvas/ColorFilter";
42
- export * from "./@types/canvas/CornerPathEffect";
43
- export * from "./@types/canvas/ImageFilter";
44
- export * from "./@types/canvas/LinearGradient";
45
- export * from "./@types/canvas/Paint";
46
- export * from "./@types/canvas/Path";
47
- export * from "./@types/canvas/Rect";
48
- export * from "./@types/canvas/Matrix";
49
- export * from "./@types/canvas/RendererBackend";
50
- export * from "./@types/canvas/PathEffect";
51
- export * from "./@types/canvas/Picture";
52
- export * from "./@types/canvas/Shader";
53
- export * from "./@types/canvas/Shadow";
54
- export * from "./@types/canvas/Surface";
55
- export * from "./@types/canvas/Typeface";
56
- export * from "./@types/canvas/TypefaceFactory";
38
+ export * from "./@types/graphics/BlendMode";
39
+ export * from "./@types/graphics/Canvas";
40
+ export * from "./@types/graphics/Color";
41
+ export * from "./@types/graphics/ColorFilter";
42
+ export * from "./@types/graphics/CornerPathEffect";
43
+ export * from "./@types/graphics/ImageFilter";
44
+ export * from "./@types/graphics/LinearGradient";
45
+ export * from "./@types/graphics/Paint";
46
+ export * from "./@types/graphics/Path";
47
+ export * from "./@types/graphics/Rect";
48
+ export * from "./@types/graphics/Matrix";
49
+ export * from "./@types/graphics/RendererBackend";
50
+ export * from "./@types/graphics/PathEffect";
51
+ export * from "./@types/graphics/Picture";
52
+ export * from "./@types/graphics/Shader";
53
+ export * from "./@types/graphics/Shadow";
54
+ export * from "./@types/graphics/Surface";
55
+ export * from "./@types/graphics/Typeface";
56
+ export * from "./@types/graphics/TypefaceFactory";
57
57
 
58
58
  export * from "./@types/animation/AccelerateDecelerateInterpolator";
59
59
  export * from "./@types/animation/AccelerateInterpolator";
@@ -88,13 +88,13 @@ export * from "./@types/animator/ValueAnimator";
88
88
  export * from "./@types/animator/Animator";
89
89
  export * from "./@types/animator/PropertyValuesHolder";
90
90
 
91
- export * from "./@types/drawable/CornersDrawable";
92
- export * from "./@types/drawable/Drawable";
93
- export * from "./@types/drawable/ImageDrawable";
94
- export * from "./@types/drawable/LayerDrawable";
95
- export * from "./@types/drawable/LinearGradientDrawable";
96
- export * from "./@types/drawable/PictureDrawable";
97
- export * from "./@types/drawable/ColorDrawable";
91
+ export * from "./@types/graphics/drawable/CornersDrawable";
92
+ export * from "./@types/graphics/drawable/Drawable";
93
+ export * from "./@types/graphics/drawable/ImageDrawable";
94
+ export * from "./@types/graphics/drawable/LayerDrawable";
95
+ export * from "./@types/graphics/drawable/LinearGradientDrawable";
96
+ export * from "./@types/graphics/drawable/PictureDrawable";
97
+ export * from "./@types/graphics/drawable/ColorDrawable";
98
98
 
99
99
  export * from "./@types/evaluate/Resolver";
100
100
  export * from "./@types/evaluate/Environment";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-framework/core",
3
- "version": "1.2.65",
3
+ "version": "1.2.67",
4
4
  "description": "@compass-framework/core public api",
5
5
  "types": "./index.d.ts",
6
6
  "main": "./index.js",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes