@operato/scene-basic 9.1.1 → 10.0.0-beta.14
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/dist/audio.d.ts +240 -4
- package/dist/audio.js +6 -3
- package/dist/audio.js.map +1 -1
- package/dist/donut.d.ts +0 -1
- package/dist/donut.js +0 -3
- package/dist/donut.js.map +1 -1
- package/dist/ellipse.d.ts +229 -5
- package/dist/ellipse.js +0 -3
- package/dist/ellipse.js.map +1 -1
- package/dist/gif-view.d.ts +1 -1
- package/dist/gif-view.js +3 -1
- package/dist/gif-view.js.map +1 -1
- package/dist/image-view.d.ts +240 -4
- package/dist/image-view.js +7 -3
- package/dist/image-view.js.map +1 -1
- package/dist/polygon.d.ts +0 -1
- package/dist/polygon.js +0 -3
- package/dist/polygon.js.map +1 -1
- package/dist/polyline.js +2 -3
- package/dist/polyline.js.map +1 -1
- package/dist/rect.d.ts +465 -5
- package/dist/rect.js +0 -3
- package/dist/rect.js.map +1 -1
- package/dist/star.d.ts +0 -1
- package/dist/star.js +0 -3
- package/dist/star.js.map +1 -1
- package/dist/text.d.ts +237 -2
- package/dist/text.js +0 -3
- package/dist/text.js.map +1 -1
- package/package.json +13 -13
package/dist/rect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rect.js","sourceRoot":"","sources":["../src/rect.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,EAGL,WAAW,EAGX,QAAQ,EACR,KAAK,EACL,cAAc,EACf,MAAM,wBAAwB,CAAA;AAE/B,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE;gBACR,GAAG,EAAE,CAAC;aACP;SACF;KACF;IACD,IAAI,E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,KAAK,CAAC,CAAC;IAC5D,IAAI,QAAQ;QACV,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QACpD,KAAK,GAAG,KAAK,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;QAEhE,OAAO;YACL;gBACE,CAAC,EAAE,IAAI,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC;gBACrC,CAAC,EAAE,GAAG;gBACN,OAAO,EAAE,cAAc;aACxB;SACF,CAAA;IACH,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AAjBoB,IAAI;IADxB,cAAc,CAAC,MAAM,CAAC;GACF,IAAI,CAiBxB;eAjBoB,IAAI","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport {\n Component,\n ComponentNature,\n Connectable,\n POSITION,\n Properties,\n RectPath,\n Shape,\n sceneComponent\n} from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'number',\n label: 'round',\n name: 'round',\n property: {\n min: 0\n }\n }\n ],\n help: 'scene/component/rect'\n}\n\nvar controlHandler = {\n ondragmove: function (point: POSITION, index: number, component: Component) {\n var { left, top, width, height } = component.model\n\n var transcoorded = component.transcoordP2S(point.x, point.y)\n var round = ((transcoorded.x - left) / (width / 2)) * 100\n\n round = safeRound(round, width, height)\n\n component.set({\n round\n })\n }\n}\n\nfunction safeRound(round: number, width: number, height: number) {\n var max = width > height ? (height / width) * 100 : 100\n\n if (round >= max) round = max\n else if (round <= 0) round = 0\n\n return round\n}\n\n@sceneComponent('rect')\nexport default class Rect extends Connectable(RectPath(Shape)) {\n get controls() {\n var { left, top, width, round, height } = this.state\n round = round == undefined ? 0 : safeRound(round, width, height)\n\n return [\n {\n x: left + (width / 2) * (round / 100),\n y: top,\n handler: controlHandler\n }\n ]\n }\n\n get nature() {\n return NATURE\n }\n}\n"]}
|
package/dist/star.d.ts
CHANGED
package/dist/star.js
CHANGED
package/dist/star.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"star.js","sourceRoot":"","sources":["../src/star.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,EAAE,SAAS,EAAmB,OAAO,EAAY,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEtG,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,OAAO;SAClB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,MAAM;SACjB;KACF;IACD,IAAI,EAAE,sBAAsB;CAC7B,CAAA;AAED,IAAI,cAAc,GAAG;IACnB,UAAU,EAAE,UAAU,KAAe,EAAE,KAAa,EAAE,SAAoB;QACxE,IAAI,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAA;QACjC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC,KAAK,CAAA;QAEhC,IAAI,YAAY,GAAG,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAA;QAE5D,IAAI,KAAK,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,GAAG,GAAG,CAAA;QAEpD,IAAI,KAAK,IAAI,GAAG;YAAE,KAAK,GAAG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A;QAEtC,OAAO;YACL;gBACE,CAAC,EAAE,EAAE;gBACL,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC;gBAC/B,OAAO,EAAE,cAAc;aACxB;SACF,CAAA;IACH,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AApDoB,IAAI;IADxB,cAAc,CAAC,MAAM,CAAC;GACF,IAAI,CAoDxB;eApDoB,IAAI;AAsDzB,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { Component, ComponentNature, Ellipse, POSITION, sceneComponent } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'number',\n label: 'ratio',\n name: 'ratio',\n property: 'ratio'\n },\n {\n type: 'number',\n label: 'wing',\n name: 'wing',\n property: 'wing'\n }\n ],\n help: 'scene/component/star'\n}\n\nvar controlHandler = {\n ondragmove: function (point: POSITION, index: number, component: Component) {\n var controls = component.controls\n var { cy, ry } = component.model\n\n var transcoorded = component.transcoordP2S(point.x, point.y)\n\n var ratio = ((transcoorded.y - cy) / ry) * 100 + 100\n\n if (ratio >= 100) ratio = 100\n else if (ratio <= 0) ratio = 0\n\n component.set({ ratio }) // ratio: ratio => ratio\n }\n}\n\n@sceneComponent('star')\nexport default class Star extends Ellipse {\n render(ctx: CanvasRenderingContext2D) {\n var { ratio = 30, wing = 5, cx, cy, rx, ry, startAngle, endAngle, anticlockwise } = this.state\n\n // 박스 그리기\n\n if (wing < 3) return\n\n const RADIAN = 1.5707963267948966 // 90도 뒤틀기\n var a = (Math.PI * 2) / wing\n var xRatio = rx - (ratio / 100) * rx\n var yRatio = ry - (ratio / 100) * ry\n\n ctx.save()\n ctx.beginPath()\n\n ctx.translate(cx, cy)\n\n ctx.moveTo(rx * Math.cos(-RADIAN), ry * Math.sin(-RADIAN))\n ctx.lineTo(\n ((rx - xRatio) * (Math.cos(a - RADIAN) + Math.cos(0 - RADIAN))) / 2,\n ((ry - yRatio) * (Math.sin(a - RADIAN) + Math.sin(0 - RADIAN))) / 2\n )\n\n for (var i = 1; i < wing; i++) {\n ctx.lineTo(rx * Math.cos(a * i - RADIAN), ry * Math.sin(a * i - RADIAN))\n\n ctx.lineTo(\n ((rx - xRatio) * (Math.cos(a * (i + 1) - RADIAN) + Math.cos(a * i - RADIAN))) / 2,\n ((ry - yRatio) * (Math.sin(a * (i + 1) - RADIAN) + Math.sin(a * i - RADIAN))) / 2\n )\n }\n // ratio /= 1.5;\n ctx.closePath()\n ctx.restore()\n }\n\n get controls() {\n var { cx, cy, ry, ratio } = this.state\n\n return [\n {\n x: cx,\n y: cy - ry + ry * (ratio / 100),\n handler: controlHandler\n }\n ]\n }\n\n get nature(): ComponentNature {\n return NATURE\n }\n}\n\nComponent.memoize(Star.prototype, 'controls', false)\n"]}
|
package/dist/text.d.ts
CHANGED
|
@@ -1,6 +1,241 @@
|
|
|
1
1
|
import { Component } from '@hatiolab/things-scene';
|
|
2
|
-
declare const Text_base:
|
|
3
|
-
|
|
2
|
+
declare const Text_base: (new (...args: any[]) => {
|
|
3
|
+
contains(x: number, y: number): boolean;
|
|
4
|
+
get path(): {
|
|
5
|
+
x: any;
|
|
6
|
+
y: any;
|
|
7
|
+
}[];
|
|
8
|
+
set path(path: {
|
|
9
|
+
x: any;
|
|
10
|
+
y: any;
|
|
11
|
+
}[]): any;
|
|
12
|
+
get anchors(): {
|
|
13
|
+
name: string;
|
|
14
|
+
position: {
|
|
15
|
+
x: any;
|
|
16
|
+
y: any;
|
|
17
|
+
};
|
|
18
|
+
}[];
|
|
19
|
+
get bounds(): any;
|
|
20
|
+
set bounds(bounds: any): any;
|
|
21
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
22
|
+
_app: any;
|
|
23
|
+
_model: any;
|
|
24
|
+
_state: any;
|
|
25
|
+
_delta: any;
|
|
26
|
+
_animation: any;
|
|
27
|
+
_animate: any;
|
|
28
|
+
_parent: any;
|
|
29
|
+
_disposed: any;
|
|
30
|
+
_textHidden: any;
|
|
31
|
+
_text_substitutor: any;
|
|
32
|
+
_value_substitutor: any;
|
|
33
|
+
_mappings: any;
|
|
34
|
+
_realObject: import("@hatiolab/things-scene").IRealObject | undefined;
|
|
35
|
+
_cachedState: any;
|
|
36
|
+
updatedAt: any;
|
|
37
|
+
fontSize: any;
|
|
38
|
+
__cache__: any;
|
|
39
|
+
created(): void;
|
|
40
|
+
added(parent: any): void;
|
|
41
|
+
removed(parent: any): void;
|
|
42
|
+
ready(): Promise<void>;
|
|
43
|
+
touch(): void;
|
|
44
|
+
clearCache(...attrs: any[]): void;
|
|
45
|
+
removeSelf(completely: any): void;
|
|
46
|
+
resetAnimation(): void;
|
|
47
|
+
dispose(): void;
|
|
48
|
+
get nature(): import("@hatiolab/things-scene").ComponentNature;
|
|
49
|
+
get disposed(): boolean;
|
|
50
|
+
isLayer(): boolean;
|
|
51
|
+
isGroup(): boolean;
|
|
52
|
+
isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
|
|
53
|
+
isLine(): boolean;
|
|
54
|
+
isRoot(): boolean;
|
|
55
|
+
isRootModel(): boolean;
|
|
4
56
|
is3dish(): boolean;
|
|
57
|
+
get is3dMode(): boolean;
|
|
58
|
+
isIn3DSpace(): boolean;
|
|
59
|
+
isTemplate(): boolean;
|
|
60
|
+
isHTMLElement(): boolean;
|
|
61
|
+
isConnectable(): boolean;
|
|
62
|
+
isIdentifiable(): boolean;
|
|
63
|
+
isPositionable(): boolean;
|
|
64
|
+
replaceRefids(replaceMap: any): void;
|
|
65
|
+
get(property: any): any;
|
|
66
|
+
set(props: any, propval?: any): any;
|
|
67
|
+
getState(property: any): any;
|
|
68
|
+
setState(props: any, propval?: any): any;
|
|
69
|
+
get model(): any;
|
|
70
|
+
get state(): any;
|
|
71
|
+
get hierarchy(): any;
|
|
72
|
+
get volatile(): never[];
|
|
73
|
+
_applyProps(target: any, props: any, options: any): any;
|
|
74
|
+
move(offset: {
|
|
75
|
+
x: number;
|
|
76
|
+
y: number;
|
|
77
|
+
}, ...args: boolean[]): void;
|
|
78
|
+
symmetryX(x?: number): void;
|
|
79
|
+
symmetryY(y: number): void;
|
|
80
|
+
adjustResize(bounds: import("@hatiolab/things-scene").BOUNDS, origin_bounds: import("@hatiolab/things-scene").BOUNDS, diagonal: boolean): {
|
|
81
|
+
left: any;
|
|
82
|
+
top: any;
|
|
83
|
+
width: any;
|
|
84
|
+
height: any;
|
|
85
|
+
};
|
|
86
|
+
adjustRotation(rotation: number, step: boolean): number;
|
|
87
|
+
outline(progress: number): any;
|
|
88
|
+
get center(): import("@hatiolab/things-scene").POINT;
|
|
89
|
+
set center(p: import("@hatiolab/things-scene").POINT): any;
|
|
90
|
+
get location(): import("@hatiolab/things-scene").POINT;
|
|
91
|
+
set location(l: import("@hatiolab/things-scene").POINT): any;
|
|
92
|
+
get rotate(): import("@hatiolab/things-scene").POINT;
|
|
93
|
+
set rotate(r: import("@hatiolab/things-scene").POINT): any;
|
|
94
|
+
get dimension(): import("@hatiolab/things-scene").DIMENSION;
|
|
95
|
+
set dimension(d: import("@hatiolab/things-scene").DIMENSION): any;
|
|
96
|
+
get drawPath(): import("@hatiolab/things-scene").POINT[];
|
|
97
|
+
get rotatePoint(): import("@hatiolab/things-scene").POINT;
|
|
98
|
+
get mutable(): boolean;
|
|
99
|
+
get resizable(): boolean;
|
|
100
|
+
get rotatable(): boolean;
|
|
101
|
+
buildRealObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
102
|
+
get realObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
103
|
+
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
104
|
+
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
105
|
+
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
106
|
+
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
107
|
+
prepareIf(condition: boolean): void;
|
|
108
|
+
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
109
|
+
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
110
|
+
drawFill(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
111
|
+
get strokeStyle(): any;
|
|
112
|
+
set strokeStyle(v: any): any;
|
|
113
|
+
get fillStyle(): any;
|
|
114
|
+
set fillStyle(v: any): any;
|
|
115
|
+
get fontColor(): string;
|
|
116
|
+
set fontColor(v: string): any;
|
|
117
|
+
get rotation(): number;
|
|
118
|
+
set rotation(v: number): any;
|
|
119
|
+
get decorators(): string[];
|
|
120
|
+
get decotag(): string;
|
|
121
|
+
get hidden(): boolean;
|
|
122
|
+
set hidden(v: boolean): any;
|
|
123
|
+
get tag(): string;
|
|
124
|
+
set tag(v: string): any;
|
|
125
|
+
get appendum(): any;
|
|
126
|
+
set appendum(v: any): any;
|
|
127
|
+
defaultTextSubstitutor(): string;
|
|
128
|
+
textLines(context?: import("@hatiolab/things-scene").SceneRenderContext): any[][];
|
|
129
|
+
get font(): string;
|
|
130
|
+
get lineHeight(): number;
|
|
131
|
+
get textSubstitutor(): () => string;
|
|
132
|
+
get text(): string;
|
|
133
|
+
set text(v: string): any;
|
|
134
|
+
get textBounds(): import("@hatiolab/things-scene").BOUNDS;
|
|
135
|
+
get textRotation(): number;
|
|
136
|
+
get textHidden(): boolean;
|
|
137
|
+
set textHidden(v: boolean): any;
|
|
138
|
+
get hasTextProperty(): boolean;
|
|
139
|
+
animate(opts: import("@hatiolab/things-scene").AnimationConfig): any;
|
|
140
|
+
effect(context: import("@hatiolab/things-scene").SceneRenderContext, model: any): void;
|
|
141
|
+
serialize(...others: any[]): string;
|
|
142
|
+
trim(): void;
|
|
143
|
+
closeScene(data: any): void;
|
|
144
|
+
delta(attr?: string | object, value?: any): any;
|
|
145
|
+
invalidate(): void;
|
|
146
|
+
get value(): any;
|
|
147
|
+
set value(v: any): any;
|
|
148
|
+
get data(): any;
|
|
149
|
+
set data(v: any): any;
|
|
150
|
+
set tap(v: any): any;
|
|
151
|
+
get mappings(): any[];
|
|
152
|
+
get retention(): number;
|
|
153
|
+
get animation(): import("@hatiolab/things-scene").AnimationController | undefined;
|
|
154
|
+
get started(): boolean;
|
|
155
|
+
set started(v: boolean): any;
|
|
156
|
+
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
157
|
+
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
|
|
158
|
+
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
159
|
+
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
160
|
+
findAnchor(name: string): any;
|
|
161
|
+
isDescendible(container: Component): boolean;
|
|
162
|
+
getContext(component?: unknown): any;
|
|
163
|
+
get root(): Component;
|
|
164
|
+
get rootModel(): Component;
|
|
165
|
+
get parent(): Component;
|
|
166
|
+
set parent(v: Component): any;
|
|
167
|
+
get scalable(): boolean;
|
|
168
|
+
get stuck(): boolean;
|
|
169
|
+
get capturable(): boolean;
|
|
170
|
+
get position(): string;
|
|
171
|
+
get origin(): string;
|
|
172
|
+
get offset(): import("@hatiolab/things-scene").POINT;
|
|
173
|
+
get app(): import("@hatiolab/things-scene").ApplicationContext;
|
|
174
|
+
drawEffect(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
175
|
+
prepareFill(resolve: Function, reject: Function): void;
|
|
176
|
+
prepareFillIf(condition: boolean): void;
|
|
177
|
+
onchangeFill(after: Record<string, any>, before: Record<string, any>): void;
|
|
178
|
+
drawImage(context: import("@hatiolab/things-scene").SceneRenderContext, image: HTMLImageElement, left: number, top: number, width: number, height: number): void;
|
|
179
|
+
mutateBounds(logic: ((bounds: import("@hatiolab/things-scene").BOUNDS) => import("@hatiolab/things-scene").BOUNDS | void) | null, context?: any): void;
|
|
180
|
+
mutatePath(beforeLogic: ((path: import("@hatiolab/things-scene").POINT[]) => import("@hatiolab/things-scene").POINT[] | void) | null, afterLogic: ((path: import("@hatiolab/things-scene").POINT[]) => import("@hatiolab/things-scene").POINT[] | void) | null, context?: any): void;
|
|
181
|
+
access(accessor: string): any;
|
|
182
|
+
substitute(template: string, data: any): string | undefined;
|
|
183
|
+
onchangeMappings(after: Record<string, any>, before: Record<string, any>): void;
|
|
184
|
+
onchangeData(after: Record<string, any>, before: Record<string, any>): void;
|
|
185
|
+
buildMappings(): void;
|
|
186
|
+
executeMappings(force?: boolean): void;
|
|
187
|
+
disposeMappings(): void;
|
|
188
|
+
ondropfile(transfered: FileList, files: string[]): void;
|
|
189
|
+
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
190
|
+
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
191
|
+
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
+
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
193
|
+
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
194
|
+
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
195
|
+
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
196
|
+
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
197
|
+
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
198
|
+
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
199
|
+
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
200
|
+
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
201
|
+
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
202
|
+
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
203
|
+
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
204
|
+
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
205
|
+
on(name: string | object, callback: Function, context?: any): any;
|
|
206
|
+
off(name?: string | object, callback?: Function, context?: any): any;
|
|
207
|
+
once(name: string | object, callback: Function, context?: any): any;
|
|
208
|
+
trigger(name: string, ...args: any[]): any;
|
|
209
|
+
delegate_on(delegator: any): any;
|
|
210
|
+
delegate_off(delegator: any): any;
|
|
211
|
+
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
212
|
+
calculateBounds?(): void;
|
|
213
|
+
oncreate_element?(element: HTMLElement): void;
|
|
214
|
+
removeComponent(component: Component, ghost?: boolean): void;
|
|
215
|
+
addComponent(component: Component, ghost?: boolean): void;
|
|
216
|
+
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
217
|
+
getOverlay(component: Component): HTMLElement | undefined;
|
|
218
|
+
findById(id: string): Component | undefined;
|
|
219
|
+
findByRefid(ref: string | number): Component | undefined;
|
|
220
|
+
findAllById(id: string): Component[];
|
|
221
|
+
resize(): void;
|
|
222
|
+
fit(type?: string): void;
|
|
223
|
+
get components(): Component[] | undefined;
|
|
224
|
+
get layout(): any;
|
|
225
|
+
get auxOverlay(): HTMLElement | undefined;
|
|
226
|
+
get isReady(): boolean;
|
|
227
|
+
get unitScale(): number;
|
|
228
|
+
get selected(): Component[];
|
|
229
|
+
set selected(_v: Component[]): any;
|
|
230
|
+
get focused(): Component | null;
|
|
231
|
+
set focused(_v: Component | null): any;
|
|
232
|
+
get hasSameParentForAllSelected(): boolean;
|
|
233
|
+
set hasSameParentForAllSelected(_v: boolean): any;
|
|
234
|
+
get fitMode(): string | undefined;
|
|
235
|
+
set fitMode(_v: string | undefined): any;
|
|
236
|
+
get element(): HTMLElement | null;
|
|
237
|
+
set element(_v: HTMLElement | null): any;
|
|
238
|
+
}) & typeof Component;
|
|
239
|
+
export default class Text extends Text_base {
|
|
5
240
|
}
|
|
6
241
|
export {};
|
package/dist/text.js
CHANGED
package/dist/text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"","sources":["../src/text.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAG7D,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,QAAQ,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../src/text.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAG7D,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,QAAQ,CAAC,SAAS,CAAC;CAAG,CAAA;AAAnC,IAAI;IADxB,cAAc,CAAC,MAAM,CAAC;GACF,IAAI,CAA+B;eAAnC,IAAI","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport { Component, RectPath, sceneComponent } from '@hatiolab/things-scene'\n\n@sceneComponent('text')\nexport default class Text extends RectPath(Component) {}\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/scene-basic",
|
|
3
3
|
"description": "basic component for things-scene",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "10.0.0-beta.14",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"module": "dist/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"things-scene": true,
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public",
|
|
13
|
-
"@
|
|
13
|
+
"@operato:registry": "https://registry.npmjs.org"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
@@ -22,28 +22,28 @@
|
|
|
22
22
|
"serve:dev": "npm run serve",
|
|
23
23
|
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
|
|
24
24
|
"build": "tsc",
|
|
25
|
-
"
|
|
26
|
-
"lint": "eslint
|
|
27
|
-
"format": "eslint
|
|
25
|
+
"prepublishOnly": "tsc",
|
|
26
|
+
"lint": "eslint src/ && prettier \"src/**/*.ts\" --check",
|
|
27
|
+
"format": "eslint src/ --fix && prettier \"src/**/*.ts\" --write",
|
|
28
28
|
"migration": "things-factory-migration"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@hatiolab/things-scene": "^
|
|
31
|
+
"@hatiolab/things-scene": "^10.0.0-beta.1",
|
|
32
32
|
"@wizpanda/super-gif": "^0.0.6"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@hatiolab/prettier-config": "^1.0.0",
|
|
36
|
-
"@things-factory/builder": "^
|
|
37
|
-
"@things-factory/operato-board": "^
|
|
38
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
39
|
-
"@typescript-eslint/parser": "^
|
|
36
|
+
"@things-factory/builder": "^10.0.0-beta.1",
|
|
37
|
+
"@things-factory/operato-board": "^10.0.0-beta.1",
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
39
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
40
40
|
"@web/dev-server": "^0.1.28",
|
|
41
41
|
"concurrently": "^8.0.1",
|
|
42
42
|
"eslint": "^9.18.0",
|
|
43
43
|
"eslint-config-prettier": "^10.0.1",
|
|
44
44
|
"husky": "^8.0.3",
|
|
45
|
-
"lint-staged": "^
|
|
46
|
-
"prettier": "^2.
|
|
45
|
+
"lint-staged": "^15.2.2",
|
|
46
|
+
"prettier": "^3.2.5",
|
|
47
47
|
"tslib": "^2.3.1",
|
|
48
48
|
"typescript": "^5.0.4"
|
|
49
49
|
},
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"prettier --write"
|
|
60
60
|
]
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "3defb7207c541d87da3f5ebdd34f06d2e9e1cebb"
|
|
63
63
|
}
|