@fulate/ui 1.0.19 → 3.0.2

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 (49) hide show
  1. package/README.md +130 -177
  2. package/dist/circle.d.ts +2 -1
  3. package/dist/connection/commands.d.ts +3 -3
  4. package/dist/connection/types.d.ts +5 -1
  5. package/dist/connection-port-decoration.d.ts +18 -2
  6. package/dist/editor/capability.d.ts +37 -6
  7. package/dist/editor/frame-flush.d.ts +3 -4
  8. package/dist/editor/properties.d.ts +31 -0
  9. package/dist/editor/shape-capability.d.ts +13 -0
  10. package/dist/editor/shape.d.ts +16 -19
  11. package/dist/editor/transform.d.ts +1 -3
  12. package/dist/editor-vector-path.d.ts +70 -0
  13. package/dist/floating.d.ts +12 -2
  14. package/dist/group.d.ts +17 -8
  15. package/dist/image.d.ts +16 -19
  16. package/dist/index.d.ts +15 -6
  17. package/dist/index.js +2757 -1555
  18. package/dist/line/base.d.ts +64 -27
  19. package/dist/line/geometry.d.ts +28 -0
  20. package/dist/line/index.d.ts +2 -0
  21. package/dist/line/label.d.ts +58 -0
  22. package/dist/line/orthogonal.d.ts +23 -0
  23. package/dist/line/serialization.d.ts +11 -0
  24. package/dist/line/straight.d.ts +7 -3
  25. package/dist/line-tree/history-delta.d.ts +2 -0
  26. package/dist/line-tree/index.d.ts +15 -8
  27. package/dist/line-tree/serialization.d.ts +2 -0
  28. package/dist/line-tree/transform.d.ts +1 -0
  29. package/dist/line-tree/types.d.ts +3 -2
  30. package/dist/polygon.d.ts +19 -38
  31. package/dist/rectangle.d.ts +5 -4
  32. package/dist/ripple.d.ts +18 -4
  33. package/dist/scrollbars.d.ts +36 -0
  34. package/dist/scrollview.d.ts +27 -21
  35. package/dist/serialization.d.ts +4 -0
  36. package/dist/text/block.d.ts +5 -1
  37. package/dist/text/editing.d.ts +54 -12
  38. package/dist/text/index.d.ts +22 -20
  39. package/dist/text/layout.d.ts +8 -2
  40. package/dist/text/paint.d.ts +3 -2
  41. package/dist/text/style.d.ts +4 -0
  42. package/dist/triangle.d.ts +10 -5
  43. package/dist/worker-surface-worker.d.ts +4 -1
  44. package/dist/worker-surface-worker.js +11 -8
  45. package/dist/worker-surface.d.ts +1 -0
  46. package/dist/workspace.d.ts +3 -3
  47. package/package.json +33 -33
  48. package/dist/authored-path.d.ts +0 -28
  49. package/dist/vector-path.d.ts +0 -58
@@ -1,58 +0,0 @@
1
- import type { PointView } from "@fulate/share";
2
- import { ChangeImpact, ShapeProperties, type AuthoredSubpath, type GeometrySnapshot, type OwnerPropertyChange, type PropertyChanges, type ReparentTransformIntent, type ShapeOption, type ShapeOptionPatch, type ElementTransformBaseline, type TransformIntent } from "@fulate/core";
3
- import { EditorShape, EditorShapeTransform } from "./editor/shape";
4
- import { type EditorCapabilityToken, type PointControlDescriptor, type PointEditRequest, type PointEditingScope, type PointOwnerEdit } from "./editor/capability";
5
- /** Sketch/SVG-style creation intent; commands never enter live Properties. */
6
- export type VectorPathCommand = Readonly<{
7
- type: "M" | "L";
8
- point: PointView;
9
- }> | Readonly<{
10
- type: "C";
11
- control1: PointView;
12
- control2: PointView;
13
- point: PointView;
14
- }> | Readonly<{
15
- type: "Z";
16
- }>;
17
- export interface VectorPathGeometry {
18
- readonly subpaths: readonly AuthoredSubpath[];
19
- }
20
- export interface VectorPathOption extends ShapeOption<VectorPath> {
21
- /** 普通创建传 commands;restore 直接传 canonical geometry。 */
22
- path?: readonly VectorPathCommand[] | VectorPathGeometry;
23
- }
24
- type VectorPathPatch = ShapeOptionPatch<VectorPathOption>;
25
- interface VectorPathStateOption extends Omit<VectorPathOption, "path"> {
26
- path?: VectorPathGeometry;
27
- }
28
- export declare class VectorPathProperties extends ShapeProperties {
29
- path: VectorPathGeometry;
30
- constructor(options?: VectorPathStateOption);
31
- getImpact(changes: PropertyChanges): ChangeImpact;
32
- }
33
- export declare class VectorPathTransform<E extends VectorPath = VectorPath> extends EditorShapeTransform<E> {
34
- protected buildGeometrySnapshot(revision: number): GeometrySnapshot;
35
- }
36
- export declare class VectorPath extends EditorShape<VectorPathProperties, VectorPathOption> {
37
- readonly type = "vectorPath";
38
- get path(): VectorPathGeometry;
39
- constructor(options?: VectorPathOption);
40
- protected resolveOptions(options: VectorPathPatch): Partial<Omit<VectorPathOption, "key" | "children">>;
41
- getEditorCapability<T>(token: EditorCapabilityToken<T>): T | undefined;
42
- resolvePointScope(worldPoint: PointView): {
43
- readonly kind: "owner";
44
- };
45
- hasPointScope(scope: PointEditingScope): scope is {
46
- readonly kind: "owner";
47
- };
48
- getPointControls(_scope: PointEditingScope): readonly PointControlDescriptor[];
49
- getPointScopeOutline(_scope: PointEditingScope): any;
50
- resolvePointEdit(request: PointEditRequest): PointOwnerEdit | null;
51
- private findAnchor;
52
- private findSegment;
53
- private ownerPathChange;
54
- captureTransformBaseline(_bakeGeometry: boolean): ElementTransformBaseline<VectorPathGeometry>;
55
- resolveTransformChange(baseline: Readonly<ElementTransformBaseline<VectorPathGeometry>>, intent: Readonly<TransformIntent | ReparentTransformIntent>): readonly OwnerPropertyChange[];
56
- protected buildPath(ctx: CanvasRenderingContext2D): void;
57
- }
58
- export {};