@operato/scene-progressbar 10.0.0-beta.2 → 10.0.0-beta.31

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/README.md CHANGED
@@ -1,15 +1,35 @@
1
- # things-scene-progressbar
1
+ # @operato/scene-progressbar
2
2
 
3
- ## build
3
+ > Progressbar component for things-scene
4
4
 
5
- `$ yarn build`
5
+ <!-- AUTOGEN_BEGIN: do not edit between markers (run scripts/regenerate-readmes.mjs to update) -->
6
6
 
7
- | type | filename | for | tested |
8
- | ---- | ------------------------------ | -------------- | ------ |
9
- | UMD | things-scene-progressbar.js | modern browser | O |
10
- | UMD | things-scene-progressbar-ie.js | ie 11 | O |
11
- | ESM | things-scene-progressbar.mjs | modern browser | O |
7
+ ## Components
12
8
 
13
- ## publish
9
+ - `ProgressCircle`
10
+ - `ProgressVertical`
11
+ - `ProgressHorizontal`
14
12
 
15
- `$ yarn publish`
13
+ ## Install
14
+
15
+ ```bash
16
+ yarn add @operato/scene-progressbar
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```ts
22
+ import { ProgressCircle, ProgressVertical, ProgressHorizontal } from '@operato/scene-progressbar'
23
+ ```
24
+
25
+ ## Build
26
+
27
+ ```bash
28
+ yarn build
29
+ ```
30
+
31
+ Output: ESM module at `dist/index.js` (single bundle, no UMD/IE legacy).
32
+
33
+ _Version: 10.0.0-beta.14_
34
+
35
+ <!-- AUTOGEN_END -->
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import { registerRealObjectFactory, RealObjectPlane2D } from '@hatiolab/things-scene';
2
+ const plane2D = (component) => new RealObjectPlane2D(component);
3
+ registerRealObjectFactory('progress-circle', plane2D);
4
+ registerRealObjectFactory('progress-horizontal', plane2D);
5
+ registerRealObjectFactory('progress-vertical', plane2D);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/factories/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAErF,MAAM,OAAO,GAAG,CAAC,SAAc,EAAE,EAAE,CAAC,IAAI,iBAAiB,CAAC,SAAS,CAAC,CAAA;AACpE,yBAAyB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA;AACrD,yBAAyB,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAA;AACzD,yBAAyB,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA","sourcesContent":["import { registerRealObjectFactory, RealObjectPlane2D } from '@hatiolab/things-scene'\n\nconst plane2D = (component: any) => new RealObjectPlane2D(component)\nregisterRealObjectFactory('progress-circle', plane2D)\nregisterRealObjectFactory('progress-horizontal', plane2D)\nregisterRealObjectFactory('progress-vertical', plane2D)\n"]}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import './factories/index.js';
1
2
  export { default as ProgressCircle } from './progress-circle.js';
2
3
  export { default as ProgressVertical } from './progress-vertical.js';
3
4
  export { default as ProgressHorizontal } from './progress-horizontal.js';
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import './factories/index.js';
1
2
  export { default as ProgressCircle } from './progress-circle.js';
2
3
  export { default as ProgressVertical } from './progress-vertical.js';
3
4
  export { default as ProgressHorizontal } from './progress-horizontal.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA","sourcesContent":["export { default as ProgressCircle } from './progress-circle.js'\nexport { default as ProgressVertical } from './progress-vertical.js'\nexport { default as ProgressHorizontal } from './progress-horizontal.js'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAE7B,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA","sourcesContent":["import './factories/index.js'\n\nexport { default as ProgressCircle } from './progress-circle.js'\nexport { default as ProgressVertical } from './progress-vertical.js'\nexport { default as ProgressHorizontal } from './progress-horizontal.js'\n"]}
@@ -1,4 +1,4 @@
1
- import { Component, ComponentNature, Ellipse } from '@hatiolab/things-scene';
1
+ import { ComponentNature, Ellipse } from '@hatiolab/things-scene';
2
2
  declare const ProgressCircle_base: (new (...args: any[]) => {
3
3
  _lastValue: number;
4
4
  _anim_alpha: number;
@@ -40,7 +40,7 @@ declare const ProgressCircle_base: (new (...args: any[]) => {
40
40
  get disposed(): boolean;
41
41
  isLayer(): boolean;
42
42
  isGroup(): boolean;
43
- isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
43
+ isContainer(): this is import("@hatiolab/things-scene").Container;
44
44
  isLine(): boolean;
45
45
  isRoot(): boolean;
46
46
  isRootModel(): boolean;
@@ -56,9 +56,9 @@ declare const ProgressCircle_base: (new (...args: any[]) => {
56
56
  get(property: any): any;
57
57
  set(props: any, propval?: any): any;
58
58
  getState(property: any): any;
59
- setState(props: any, propval?: any): any;
59
+ setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
60
60
  get model(): any;
61
- get state(): any;
61
+ get state(): import("@hatiolab/things-scene").State;
62
62
  get hierarchy(): any;
63
63
  get volatile(): never[];
64
64
  _applyProps(target: any, props: any, options: any): any;
@@ -100,7 +100,7 @@ declare const ProgressCircle_base: (new (...args: any[]) => {
100
100
  prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
101
101
  render(context: import("@hatiolab/things-scene").SceneRenderContext): void;
102
102
  postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
103
- prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
103
+ prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
104
104
  prepareIf(condition: boolean): void;
105
105
  drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
106
106
  drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
@@ -149,16 +149,16 @@ declare const ProgressCircle_base: (new (...args: any[]) => {
149
149
  get started(): boolean;
150
150
  set started(v: boolean): any;
151
151
  get controls(): import("@hatiolab/things-scene").Control[] | undefined;
152
- findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
153
- findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
154
- capture(x: number, y: number, except?: (c: Component) => boolean): any;
152
+ findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
153
+ findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
154
+ capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
155
155
  findAnchor(name: string): any;
156
- isDescendible(container: Component): boolean;
156
+ isDescendible(container: import("@hatiolab/things-scene").Component | any): boolean;
157
157
  getContext(component?: unknown): any;
158
- get root(): Component;
159
- get rootModel(): Component;
160
- get parent(): Component;
161
- set parent(v: Component): any;
158
+ get root(): import("@hatiolab/things-scene").Component;
159
+ get rootModel(): import("@hatiolab/things-scene").Component;
160
+ get parent(): import("@hatiolab/things-scene").Component;
161
+ set parent(v: import("@hatiolab/things-scene").Component): any;
162
162
  get anchors(): import("@hatiolab/things-scene").Anchor[];
163
163
  get scalable(): boolean;
164
164
  get stuck(): boolean;
@@ -184,46 +184,50 @@ declare const ProgressCircle_base: (new (...args: any[]) => {
184
184
  ondropfile(transfered: FileList, files: string[]): void;
185
185
  transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
186
186
  transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
187
- transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
188
- transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
189
- transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
190
- transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
191
- transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
192
- transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
193
- transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
187
+ transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
188
+ transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
189
+ transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
190
+ transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
191
+ transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
192
+ transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
193
+ transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
194
194
  toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
195
195
  fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
196
- toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
197
- fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
198
- toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
199
- toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
200
- toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
196
+ toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
197
+ fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
198
+ toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
199
+ toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
200
+ toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
201
+ on<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
201
202
  on(name: string | object, callback: Function, context?: any): any;
203
+ off<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback?: ((...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void) | undefined, context?: any): any;
202
204
  off(name?: string | object, callback?: Function, context?: any): any;
205
+ once<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
203
206
  once(name: string | object, callback: Function, context?: any): any;
207
+ trigger<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, ...args: import("@hatiolab/things-scene").ComponentEventMap[K]): any;
204
208
  trigger(name: string, ...args: any[]): any;
205
209
  delegate_on(delegator: any): any;
206
210
  delegate_off(delegator: any): any;
207
211
  calculateBounds?(): void;
208
212
  oncreate_element?(element: HTMLElement): void;
209
- removeComponent(component: Component, ghost?: boolean): void;
210
- addComponent(component: Component, ghost?: boolean): void;
211
- insertComponentAt(component: Component, index: number, ghost?: boolean): void;
212
- getOverlay(component: Component): HTMLElement | undefined;
213
- findById(id: string): Component | undefined;
214
- findByRefid(ref: string | number): Component | undefined;
215
- findAllById(id: string): Component[];
213
+ removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
214
+ addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
215
+ insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
216
+ getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
217
+ findById(id: string): import("@hatiolab/things-scene").Component | undefined;
218
+ findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
219
+ findAllById(id: string): import("@hatiolab/things-scene").Component[];
216
220
  resize(): void;
217
221
  fit(type?: string): void;
218
- get components(): Component[] | undefined;
222
+ get components(): import("@hatiolab/things-scene").Component[] | undefined;
219
223
  get layout(): any;
220
224
  get auxOverlay(): HTMLElement | undefined;
221
225
  get isReady(): boolean;
222
226
  get unitScale(): number;
223
- get selected(): Component[];
224
- set selected(_v: Component[]): any;
225
- get focused(): Component | null;
226
- set focused(_v: Component | null): any;
227
+ get selected(): import("@hatiolab/things-scene").Component[];
228
+ set selected(_v: import("@hatiolab/things-scene").Component[]): any;
229
+ get focused(): import("@hatiolab/things-scene").Component | null;
230
+ set focused(_v: import("@hatiolab/things-scene").Component | null): any;
227
231
  get hasSameParentForAllSelected(): boolean;
228
232
  set hasSameParentForAllSelected(_v: boolean): any;
229
233
  get fitMode(): string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"progress-circle.js","sourceRoot":"","sources":["../src/progress-circle.ts"],"names":[],"mappings":";AAAA,OAAO,EAA8B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEzG,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAA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C,SAAS,EAAE,CAAA;QAEnB,sBAAsB;QAEtB,OAAO,CAAC,OAAO,CACb,EAAE,EACF,EAAE,EACF,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EACZ,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EACZ,CAAC,EACD,kBAAkB,EAClB,kBAAkB,GAAG,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,GAAG,OAAO,CACvE,CAAA;QAED,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;IAC1B,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AA7EoB,cAAc;IADlC,cAAc,CAAC,iBAAiB,CAAC;GACb,cAAc,CA6ElC;eA7EoB,cAAc","sourcesContent":["import { Component, ComponentNature, Ellipse, ValueHolder, sceneComponent } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'value',\n name: 'value'\n },\n {\n type: 'number',\n label: 'start-angle',\n name: 'startAngle'\n },\n {\n type: 'number',\n label: 'end-angle',\n name: 'endAngle'\n },\n {\n type: 'color',\n label: 'blank-stroke-style',\n name: 'blankStrokeStyle'\n },\n {\n type: 'checkbox',\n label: 'packman-style',\n name: 'packmanStyle'\n },\n {\n type: 'checkbox',\n label: 'anim-from-base',\n name: 'animFromBase'\n }\n ],\n help: 'scene/component/progress-circle'\n}\n\n@sceneComponent('progress-circle')\nexport default class ProgressCircle extends ValueHolder(Ellipse) {\n render(context: CanvasRenderingContext2D) {\n var {\n startAngle = 0,\n endAngle = 360,\n lineWidth = 20,\n blankStrokeStyle,\n cx,\n cy,\n rx,\n ry,\n packmanStyle = false,\n animFromBase = false\n } = this.state\n\n this.animOnValueChange(this.value, animFromBase, 0)\n\n const RADIAN = 0.0174533 / Math.PI\n\n context.beginPath()\n this.drawStroke(context)\n // Angle마다 '-90'와 '-0.5 * Math.PI'가 있는 이유는 0도를 시계의 12시 방향으로 맞추기 위함.\n var startAngleToRadian = (startAngle - 90) * RADIAN * Math.PI\n var endAngleToRadian = (endAngle - 90) * RADIAN * Math.PI\n\n //// / 바깥쪽 원 그리기 ////\n context.strokeStyle = blankStrokeStyle\n context.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, startAngleToRadian, endAngleToRadian)\n\n context.lineWidth = lineWidth\n context.stroke()\n\n var percent = Math.min(Math.max(this.animValue / 100, 0), 100)\n\n context.beginPath()\n if (packmanStyle) {\n context.ellipse(\n cx,\n cy,\n Math.abs(rx),\n Math.abs(ry),\n 0,\n startAngleToRadian,\n startAngleToRadian + (endAngleToRadian - startAngleToRadian) * percent\n )\n context.lineTo(cx, cy)\n } else {\n context.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, startAngleToRadian, endAngleToRadian)\n }\n this.drawFill(context)\n\n context.closePath()\n\n context.beginPath()\n\n //// 채워지는 원 그리기 ////\n\n context.ellipse(\n cx,\n cy,\n Math.abs(rx),\n Math.abs(ry),\n 0,\n startAngleToRadian,\n startAngleToRadian + (endAngleToRadian - startAngleToRadian) * percent\n )\n\n this.drawStroke(context)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawText(context)\n }\n\n get nature() {\n return NATURE\n }\n}\n"]}
1
+ {"version":3,"file":"progress-circle.js","sourceRoot":"","sources":["../src/progress-circle.ts"],"names":[],"mappings":";AAAA,OAAO,EAAmB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAE9F,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;SACd;QACD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I,CAAC,GAAG,CAAC,EAAE,CAAC,EACZ,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EACZ,CAAC,EACD,kBAAkB,EAClB,kBAAkB,GAAG,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,GAAG,OAAO,CACvE,CAAA;QAED,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;IAC1B,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IACD,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AA5EoB,cAAc;IADlC,cAAc,CAAC,iBAAiB,CAAC;GACb,cAAc,CA4ElC;eA5EoB,cAAc","sourcesContent":["import { ComponentNature, Ellipse, ValueHolder, sceneComponent } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'value',\n name: 'value'\n },\n {\n type: 'number',\n label: 'start-angle',\n name: 'startAngle'\n },\n {\n type: 'number',\n label: 'end-angle',\n name: 'endAngle'\n },\n {\n type: 'color',\n label: 'blank-stroke-style',\n name: 'blankStrokeStyle'\n },\n {\n type: 'checkbox',\n label: 'packman-style',\n name: 'packmanStyle'\n },\n {\n type: 'checkbox',\n label: 'anim-from-base',\n name: 'animFromBase'\n }\n ],\n help: 'scene/component/progress-circle'\n}\n\n@sceneComponent('progress-circle')\nexport default class ProgressCircle extends ValueHolder(Ellipse) {\n render(context: CanvasRenderingContext2D) {\n var {\n startAngle = 0,\n endAngle = 360,\n lineWidth = 20,\n blankStrokeStyle,\n cx,\n cy,\n rx,\n ry,\n packmanStyle = false,\n animFromBase = false\n } = this.state\n\n this.animOnValueChange(this.value, animFromBase, 0)\n\n const RADIAN = 0.0174533 / Math.PI\n\n context.beginPath()\n this.drawStroke(context)\n // Angle마다 '-90'와 '-0.5 * Math.PI'가 있는 이유는 0도를 시계의 12시 방향으로 맞추기 위함.\n var startAngleToRadian = (startAngle - 90) * RADIAN * Math.PI\n var endAngleToRadian = (endAngle - 90) * RADIAN * Math.PI\n\n //// / 바깥쪽 원 그리기 ////\n context.strokeStyle = blankStrokeStyle\n context.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, startAngleToRadian, endAngleToRadian)\n\n context.lineWidth = lineWidth\n context.stroke()\n\n var percent = Math.min(Math.max(this.animValue / 100, 0), 100)\n\n context.beginPath()\n if (packmanStyle) {\n context.ellipse(\n cx,\n cy,\n Math.abs(rx),\n Math.abs(ry),\n 0,\n startAngleToRadian,\n startAngleToRadian + (endAngleToRadian - startAngleToRadian) * percent\n )\n context.lineTo(cx, cy)\n } else {\n context.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, startAngleToRadian, endAngleToRadian)\n }\n this.drawFill(context)\n\n context.closePath()\n\n context.beginPath()\n\n //// 채워지는 원 그리기 ////\n\n context.ellipse(\n cx,\n cy,\n Math.abs(rx),\n Math.abs(ry),\n 0,\n startAngleToRadian,\n startAngleToRadian + (endAngleToRadian - startAngleToRadian) * percent\n )\n\n this.drawStroke(context)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawText(context)\n }\n get nature() {\n return NATURE\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Component, ComponentNature, Shape } from '@hatiolab/things-scene';
1
+ import { ComponentNature, Shape } from '@hatiolab/things-scene';
2
2
  declare const ProgressHorizontal_base: (new (...args: any[]) => {
3
3
  _lastValue: number;
4
4
  _anim_alpha: number;
@@ -40,7 +40,7 @@ declare const ProgressHorizontal_base: (new (...args: any[]) => {
40
40
  get disposed(): boolean;
41
41
  isLayer(): boolean;
42
42
  isGroup(): boolean;
43
- isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
43
+ isContainer(): this is import("@hatiolab/things-scene").Container;
44
44
  isLine(): boolean;
45
45
  isRoot(): boolean;
46
46
  isRootModel(): boolean;
@@ -56,9 +56,9 @@ declare const ProgressHorizontal_base: (new (...args: any[]) => {
56
56
  get(property: any): any;
57
57
  set(props: any, propval?: any): any;
58
58
  getState(property: any): any;
59
- setState(props: any, propval?: any): any;
59
+ setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
60
60
  get model(): any;
61
- get state(): any;
61
+ get state(): import("@hatiolab/things-scene").State;
62
62
  get hierarchy(): any;
63
63
  get volatile(): never[];
64
64
  _applyProps(target: any, props: any, options: any): any;
@@ -100,7 +100,7 @@ declare const ProgressHorizontal_base: (new (...args: any[]) => {
100
100
  prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
101
101
  render(context: import("@hatiolab/things-scene").SceneRenderContext): void;
102
102
  postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
103
- prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
103
+ prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
104
104
  prepareIf(condition: boolean): void;
105
105
  drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
106
106
  drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
@@ -149,16 +149,16 @@ declare const ProgressHorizontal_base: (new (...args: any[]) => {
149
149
  get started(): boolean;
150
150
  set started(v: boolean): any;
151
151
  get controls(): import("@hatiolab/things-scene").Control[] | undefined;
152
- findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
153
- findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
154
- capture(x: number, y: number, except?: (c: Component) => boolean): any;
152
+ findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
153
+ findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
154
+ capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
155
155
  findAnchor(name: string): any;
156
- isDescendible(container: Component): boolean;
156
+ isDescendible(container: import("@hatiolab/things-scene").Component | any): boolean;
157
157
  getContext(component?: unknown): any;
158
- get root(): Component;
159
- get rootModel(): Component;
160
- get parent(): Component;
161
- set parent(v: Component): any;
158
+ get root(): import("@hatiolab/things-scene").Component;
159
+ get rootModel(): import("@hatiolab/things-scene").Component;
160
+ get parent(): import("@hatiolab/things-scene").Component;
161
+ set parent(v: import("@hatiolab/things-scene").Component): any;
162
162
  get anchors(): import("@hatiolab/things-scene").Anchor[];
163
163
  get scalable(): boolean;
164
164
  get stuck(): boolean;
@@ -184,46 +184,50 @@ declare const ProgressHorizontal_base: (new (...args: any[]) => {
184
184
  ondropfile(transfered: FileList, files: string[]): void;
185
185
  transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
186
186
  transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
187
- transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
188
- transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
189
- transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
190
- transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
191
- transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
192
- transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
193
- transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
187
+ transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
188
+ transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
189
+ transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
190
+ transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
191
+ transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
192
+ transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
193
+ transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
194
194
  toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
195
195
  fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
196
- toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
197
- fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
198
- toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
199
- toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
200
- toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
196
+ toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
197
+ fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
198
+ toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
199
+ toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
200
+ toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
201
+ on<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
201
202
  on(name: string | object, callback: Function, context?: any): any;
203
+ off<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback?: ((...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void) | undefined, context?: any): any;
202
204
  off(name?: string | object, callback?: Function, context?: any): any;
205
+ once<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
203
206
  once(name: string | object, callback: Function, context?: any): any;
207
+ trigger<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, ...args: import("@hatiolab/things-scene").ComponentEventMap[K]): any;
204
208
  trigger(name: string, ...args: any[]): any;
205
209
  delegate_on(delegator: any): any;
206
210
  delegate_off(delegator: any): any;
207
211
  calculateBounds?(): void;
208
212
  oncreate_element?(element: HTMLElement): void;
209
- removeComponent(component: Component, ghost?: boolean): void;
210
- addComponent(component: Component, ghost?: boolean): void;
211
- insertComponentAt(component: Component, index: number, ghost?: boolean): void;
212
- getOverlay(component: Component): HTMLElement | undefined;
213
- findById(id: string): Component | undefined;
214
- findByRefid(ref: string | number): Component | undefined;
215
- findAllById(id: string): Component[];
213
+ removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
214
+ addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
215
+ insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
216
+ getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
217
+ findById(id: string): import("@hatiolab/things-scene").Component | undefined;
218
+ findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
219
+ findAllById(id: string): import("@hatiolab/things-scene").Component[];
216
220
  resize(): void;
217
221
  fit(type?: string): void;
218
- get components(): Component[] | undefined;
222
+ get components(): import("@hatiolab/things-scene").Component[] | undefined;
219
223
  get layout(): any;
220
224
  get auxOverlay(): HTMLElement | undefined;
221
225
  get isReady(): boolean;
222
226
  get unitScale(): number;
223
- get selected(): Component[];
224
- set selected(_v: Component[]): any;
225
- get focused(): Component | null;
226
- set focused(_v: Component | null): any;
227
+ get selected(): import("@hatiolab/things-scene").Component[];
228
+ set selected(_v: import("@hatiolab/things-scene").Component[]): any;
229
+ get focused(): import("@hatiolab/things-scene").Component | null;
230
+ set focused(_v: import("@hatiolab/things-scene").Component | null): any;
227
231
  get hasSameParentForAllSelected(): boolean;
228
232
  set hasSameParentForAllSelected(_v: boolean): any;
229
233
  get fitMode(): string | undefined;
@@ -280,7 +284,7 @@ declare const ProgressHorizontal_base: (new (...args: any[]) => {
280
284
  get disposed(): boolean;
281
285
  isLayer(): boolean;
282
286
  isGroup(): boolean;
283
- isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
287
+ isContainer(): this is import("@hatiolab/things-scene").Container;
284
288
  isLine(): boolean;
285
289
  isRoot(): boolean;
286
290
  isRootModel(): boolean;
@@ -296,9 +300,9 @@ declare const ProgressHorizontal_base: (new (...args: any[]) => {
296
300
  get(property: any): any;
297
301
  set(props: any, propval?: any): any;
298
302
  getState(property: any): any;
299
- setState(props: any, propval?: any): any;
303
+ setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
300
304
  get model(): any;
301
- get state(): any;
305
+ get state(): import("@hatiolab/things-scene").State;
302
306
  get hierarchy(): any;
303
307
  get volatile(): never[];
304
308
  _applyProps(target: any, props: any, options: any): any;
@@ -334,7 +338,7 @@ declare const ProgressHorizontal_base: (new (...args: any[]) => {
334
338
  draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
335
339
  prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
336
340
  postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
337
- prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
341
+ prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
338
342
  prepareIf(condition: boolean): void;
339
343
  drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
340
344
  drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
@@ -385,16 +389,16 @@ declare const ProgressHorizontal_base: (new (...args: any[]) => {
385
389
  get started(): boolean;
386
390
  set started(v: boolean): any;
387
391
  get controls(): import("@hatiolab/things-scene").Control[] | undefined;
388
- findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
389
- findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
390
- capture(x: number, y: number, except?: (c: Component) => boolean): any;
392
+ findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
393
+ findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
394
+ capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
391
395
  findAnchor(name: string): any;
392
- isDescendible(container: Component): boolean;
396
+ isDescendible(container: import("@hatiolab/things-scene").Component | any): boolean;
393
397
  getContext(component?: unknown): any;
394
- get root(): Component;
395
- get rootModel(): Component;
396
- get parent(): Component;
397
- set parent(v: Component): any;
398
+ get root(): import("@hatiolab/things-scene").Component;
399
+ get rootModel(): import("@hatiolab/things-scene").Component;
400
+ get parent(): import("@hatiolab/things-scene").Component;
401
+ set parent(v: import("@hatiolab/things-scene").Component): any;
398
402
  get scalable(): boolean;
399
403
  get stuck(): boolean;
400
404
  get capturable(): boolean;
@@ -419,47 +423,51 @@ declare const ProgressHorizontal_base: (new (...args: any[]) => {
419
423
  ondropfile(transfered: FileList, files: string[]): void;
420
424
  transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
421
425
  transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
422
- transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
423
- transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
424
- transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
425
- transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
426
- transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
427
- transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
428
- transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
426
+ transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
427
+ transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
428
+ transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
429
+ transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
430
+ transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
431
+ transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
432
+ transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
429
433
  toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
430
434
  fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
431
- toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
432
- fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
433
- toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
434
- toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
435
- toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
435
+ toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
436
+ fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
437
+ toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
438
+ toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
439
+ toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
440
+ on<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
436
441
  on(name: string | object, callback: Function, context?: any): any;
442
+ off<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback?: ((...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void) | undefined, context?: any): any;
437
443
  off(name?: string | object, callback?: Function, context?: any): any;
444
+ once<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
438
445
  once(name: string | object, callback: Function, context?: any): any;
446
+ trigger<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, ...args: import("@hatiolab/things-scene").ComponentEventMap[K]): any;
439
447
  trigger(name: string, ...args: any[]): any;
440
448
  delegate_on(delegator: any): any;
441
449
  delegate_off(delegator: any): any;
442
450
  onchange(after: Record<string, any>, before: Record<string, any>): void;
443
451
  calculateBounds?(): void;
444
452
  oncreate_element?(element: HTMLElement): void;
445
- removeComponent(component: Component, ghost?: boolean): void;
446
- addComponent(component: Component, ghost?: boolean): void;
447
- insertComponentAt(component: Component, index: number, ghost?: boolean): void;
448
- getOverlay(component: Component): HTMLElement | undefined;
449
- findById(id: string): Component | undefined;
450
- findByRefid(ref: string | number): Component | undefined;
451
- findAllById(id: string): Component[];
453
+ removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
454
+ addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
455
+ insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
456
+ getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
457
+ findById(id: string): import("@hatiolab/things-scene").Component | undefined;
458
+ findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
459
+ findAllById(id: string): import("@hatiolab/things-scene").Component[];
452
460
  resize(): void;
453
461
  fit(type?: string): void;
454
- get components(): Component[] | undefined;
462
+ get components(): import("@hatiolab/things-scene").Component[] | undefined;
455
463
  get layout(): any;
456
464
  get auxOverlay(): HTMLElement | undefined;
457
465
  get isReady(): boolean;
458
466
  get unitScale(): number;
459
- get selected(): Component[];
460
- set selected(_v: Component[]): any;
461
- get focused(): Component | null;
462
- set focused(_v: Component | null): any;
467
+ get selected(): import("@hatiolab/things-scene").Component[];
468
+ set selected(_v: import("@hatiolab/things-scene").Component[]): any;
469
+ get focused(): import("@hatiolab/things-scene").Component | null;
470
+ set focused(_v: import("@hatiolab/things-scene").Component | null): any;
463
471
  get hasSameParentForAllSelected(): boolean;
464
472
  set hasSameParentForAllSelected(_v: boolean): any;
465
473
  get fitMode(): string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"progress-horizontal.js","sourceRoot":"","sources":["../src/progress-horizontal.ts"],"names":[],"mappings":";AAAA,OAAO,EAA8B,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEjH,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,OAAO;YACb,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,iBAAiB;SAC5B;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,SAAS;SACpB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,cAAc;SACrB;KACF;IACD,IAAI,EAAE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,OAAO,CAAC,CAAA;QAEtB,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IACxC,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QACxB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IAED,oBAAoB;IAEpB,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AA1CoB,kBAAkB;IADtC,cAAc,CAAC,qBAAqB,CAAC;GACjB,kBAAkB,CA0CtC;eA1CoB,kBAAkB","sourcesContent":["import { Component, ComponentNature, RectPath, Shape, ValueHolder, sceneComponent } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'value',\n name: 'value',\n property: 'value'\n },\n {\n type: 'color',\n label: 'background-color',\n name: 'backgroundColor',\n property: 'backgroundColor'\n },\n {\n type: 'checkbox',\n label: 'reverse',\n name: 'reverse',\n property: 'reverse'\n },\n {\n type: 'checkbox',\n label: 'anim-from-base',\n name: 'animFromBase'\n }\n ],\n help: 'scene/component/progress-horizontal'\n}\n\n@sceneComponent('progress-horizontal')\nexport default class ProgressHorizontal extends ValueHolder(RectPath(Shape)) {\n render(context: CanvasRenderingContext2D) {\n var { top, left, height, width, backgroundColor = 'transparent', reverse, animFromBase = false } = this.state\n\n this.animOnValueChange(this.value, animFromBase, 0)\n\n // background의 색상\n context.beginPath()\n context.rect(left, top, width, height)\n\n context.fillStyle = backgroundColor\n context.fill()\n\n // value의 색상\n context.beginPath()\n\n var drawValue = width - (width * Math.max(Math.min(this.animValue, 100), 0)) / 100\n drawValue = Math.max(Math.min(drawValue, width), 0) // DrawValue도 높이보다 작거나 커지지 말아야 한다.\n\n // 그리는 값의 방향을 지정\n if (reverse) context.rect(left, top, width - drawValue, height)\n else context.rect(left + drawValue, top, width - drawValue, height)\n\n this.drawFill(context)\n\n context.closePath()\n\n context.beginPath()\n\n context.rect(left, top, width, height)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawStroke(context)\n this.drawText(context)\n }\n\n // get controls() {}\n\n get nature() {\n return NATURE\n }\n}\n"]}
1
+ {"version":3,"file":"progress-horizontal.js","sourceRoot":"","sources":["../src/progress-horizontal.ts"],"names":[],"mappings":";AAAA,OAAO,EAAmB,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,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,OAAO;YACb,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,iBAAiB;SAC5B;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,SAAS;SACpB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,cAAc;SACrB;KACF;IACD,IAAI,EAAE,qCAAqC;CAC5C,CAAA;AAGc,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1E,MAAM,CAAC,OAAiC;QACtC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,aAAa,EAAE,OAAO,EAAE,YAAY,GA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CAAC,CAAA;QACxB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IAED,oBAAoB;IACpB,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AAzCoB,kBAAkB;IADtC,cAAc,CAAC,qBAAqB,CAAC;GACjB,kBAAkB,CAyCtC;eAzCoB,kBAAkB","sourcesContent":["import { ComponentNature, RectPath, Shape, ValueHolder, sceneComponent } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'value',\n name: 'value',\n property: 'value'\n },\n {\n type: 'color',\n label: 'background-color',\n name: 'backgroundColor',\n property: 'backgroundColor'\n },\n {\n type: 'checkbox',\n label: 'reverse',\n name: 'reverse',\n property: 'reverse'\n },\n {\n type: 'checkbox',\n label: 'anim-from-base',\n name: 'animFromBase'\n }\n ],\n help: 'scene/component/progress-horizontal'\n}\n\n@sceneComponent('progress-horizontal')\nexport default class ProgressHorizontal extends ValueHolder(RectPath(Shape)) {\n render(context: CanvasRenderingContext2D) {\n var { top, left, height, width, backgroundColor = 'transparent', reverse, animFromBase = false } = this.state\n\n this.animOnValueChange(this.value, animFromBase, 0)\n\n // background의 색상\n context.beginPath()\n context.rect(left, top, width, height)\n\n context.fillStyle = backgroundColor\n context.fill()\n\n // value의 색상\n context.beginPath()\n\n var drawValue = width - (width * Math.max(Math.min(this.animValue, 100), 0)) / 100\n drawValue = Math.max(Math.min(drawValue, width), 0) // DrawValue도 높이보다 작거나 커지지 말아야 한다.\n\n // 그리는 값의 방향을 지정\n if (reverse) context.rect(left, top, width - drawValue, height)\n else context.rect(left + drawValue, top, width - drawValue, height)\n\n this.drawFill(context)\n\n context.closePath()\n\n context.beginPath()\n\n context.rect(left, top, width, height)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawStroke(context)\n this.drawText(context)\n }\n\n // get controls() {}\n get nature() {\n return NATURE\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Component, ComponentNature, Shape } from '@hatiolab/things-scene';
1
+ import { ComponentNature, Shape } from '@hatiolab/things-scene';
2
2
  declare const ProgressVertical_base: (new (...args: any[]) => {
3
3
  _lastValue: number;
4
4
  _anim_alpha: number;
@@ -40,7 +40,7 @@ declare const ProgressVertical_base: (new (...args: any[]) => {
40
40
  get disposed(): boolean;
41
41
  isLayer(): boolean;
42
42
  isGroup(): boolean;
43
- isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
43
+ isContainer(): this is import("@hatiolab/things-scene").Container;
44
44
  isLine(): boolean;
45
45
  isRoot(): boolean;
46
46
  isRootModel(): boolean;
@@ -56,9 +56,9 @@ declare const ProgressVertical_base: (new (...args: any[]) => {
56
56
  get(property: any): any;
57
57
  set(props: any, propval?: any): any;
58
58
  getState(property: any): any;
59
- setState(props: any, propval?: any): any;
59
+ setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
60
60
  get model(): any;
61
- get state(): any;
61
+ get state(): import("@hatiolab/things-scene").State;
62
62
  get hierarchy(): any;
63
63
  get volatile(): never[];
64
64
  _applyProps(target: any, props: any, options: any): any;
@@ -100,7 +100,7 @@ declare const ProgressVertical_base: (new (...args: any[]) => {
100
100
  prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
101
101
  render(context: import("@hatiolab/things-scene").SceneRenderContext): void;
102
102
  postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
103
- prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
103
+ prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
104
104
  prepareIf(condition: boolean): void;
105
105
  drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
106
106
  drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
@@ -149,16 +149,16 @@ declare const ProgressVertical_base: (new (...args: any[]) => {
149
149
  get started(): boolean;
150
150
  set started(v: boolean): any;
151
151
  get controls(): import("@hatiolab/things-scene").Control[] | undefined;
152
- findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
153
- findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
154
- capture(x: number, y: number, except?: (c: Component) => boolean): any;
152
+ findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
153
+ findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
154
+ capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
155
155
  findAnchor(name: string): any;
156
- isDescendible(container: Component): boolean;
156
+ isDescendible(container: import("@hatiolab/things-scene").Component | any): boolean;
157
157
  getContext(component?: unknown): any;
158
- get root(): Component;
159
- get rootModel(): Component;
160
- get parent(): Component;
161
- set parent(v: Component): any;
158
+ get root(): import("@hatiolab/things-scene").Component;
159
+ get rootModel(): import("@hatiolab/things-scene").Component;
160
+ get parent(): import("@hatiolab/things-scene").Component;
161
+ set parent(v: import("@hatiolab/things-scene").Component): any;
162
162
  get anchors(): import("@hatiolab/things-scene").Anchor[];
163
163
  get scalable(): boolean;
164
164
  get stuck(): boolean;
@@ -184,46 +184,50 @@ declare const ProgressVertical_base: (new (...args: any[]) => {
184
184
  ondropfile(transfered: FileList, files: string[]): void;
185
185
  transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
186
186
  transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
187
- transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
188
- transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
189
- transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
190
- transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
191
- transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
192
- transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
193
- transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
187
+ transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
188
+ transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
189
+ transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
190
+ transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
191
+ transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
192
+ transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
193
+ transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
194
194
  toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
195
195
  fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
196
- toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
197
- fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
198
- toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
199
- toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
200
- toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
196
+ toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
197
+ fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
198
+ toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
199
+ toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
200
+ toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
201
+ on<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
201
202
  on(name: string | object, callback: Function, context?: any): any;
203
+ off<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback?: ((...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void) | undefined, context?: any): any;
202
204
  off(name?: string | object, callback?: Function, context?: any): any;
205
+ once<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
203
206
  once(name: string | object, callback: Function, context?: any): any;
207
+ trigger<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, ...args: import("@hatiolab/things-scene").ComponentEventMap[K]): any;
204
208
  trigger(name: string, ...args: any[]): any;
205
209
  delegate_on(delegator: any): any;
206
210
  delegate_off(delegator: any): any;
207
211
  calculateBounds?(): void;
208
212
  oncreate_element?(element: HTMLElement): void;
209
- removeComponent(component: Component, ghost?: boolean): void;
210
- addComponent(component: Component, ghost?: boolean): void;
211
- insertComponentAt(component: Component, index: number, ghost?: boolean): void;
212
- getOverlay(component: Component): HTMLElement | undefined;
213
- findById(id: string): Component | undefined;
214
- findByRefid(ref: string | number): Component | undefined;
215
- findAllById(id: string): Component[];
213
+ removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
214
+ addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
215
+ insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
216
+ getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
217
+ findById(id: string): import("@hatiolab/things-scene").Component | undefined;
218
+ findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
219
+ findAllById(id: string): import("@hatiolab/things-scene").Component[];
216
220
  resize(): void;
217
221
  fit(type?: string): void;
218
- get components(): Component[] | undefined;
222
+ get components(): import("@hatiolab/things-scene").Component[] | undefined;
219
223
  get layout(): any;
220
224
  get auxOverlay(): HTMLElement | undefined;
221
225
  get isReady(): boolean;
222
226
  get unitScale(): number;
223
- get selected(): Component[];
224
- set selected(_v: Component[]): any;
225
- get focused(): Component | null;
226
- set focused(_v: Component | null): any;
227
+ get selected(): import("@hatiolab/things-scene").Component[];
228
+ set selected(_v: import("@hatiolab/things-scene").Component[]): any;
229
+ get focused(): import("@hatiolab/things-scene").Component | null;
230
+ set focused(_v: import("@hatiolab/things-scene").Component | null): any;
227
231
  get hasSameParentForAllSelected(): boolean;
228
232
  set hasSameParentForAllSelected(_v: boolean): any;
229
233
  get fitMode(): string | undefined;
@@ -280,7 +284,7 @@ declare const ProgressVertical_base: (new (...args: any[]) => {
280
284
  get disposed(): boolean;
281
285
  isLayer(): boolean;
282
286
  isGroup(): boolean;
283
- isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
287
+ isContainer(): this is import("@hatiolab/things-scene").Container;
284
288
  isLine(): boolean;
285
289
  isRoot(): boolean;
286
290
  isRootModel(): boolean;
@@ -296,9 +300,9 @@ declare const ProgressVertical_base: (new (...args: any[]) => {
296
300
  get(property: any): any;
297
301
  set(props: any, propval?: any): any;
298
302
  getState(property: any): any;
299
- setState(props: any, propval?: any): any;
303
+ setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
300
304
  get model(): any;
301
- get state(): any;
305
+ get state(): import("@hatiolab/things-scene").State;
302
306
  get hierarchy(): any;
303
307
  get volatile(): never[];
304
308
  _applyProps(target: any, props: any, options: any): any;
@@ -334,7 +338,7 @@ declare const ProgressVertical_base: (new (...args: any[]) => {
334
338
  draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
335
339
  prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
336
340
  postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
337
- prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
341
+ prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
338
342
  prepareIf(condition: boolean): void;
339
343
  drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
340
344
  drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
@@ -385,16 +389,16 @@ declare const ProgressVertical_base: (new (...args: any[]) => {
385
389
  get started(): boolean;
386
390
  set started(v: boolean): any;
387
391
  get controls(): import("@hatiolab/things-scene").Control[] | undefined;
388
- findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
389
- findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
390
- capture(x: number, y: number, except?: (c: Component) => boolean): any;
392
+ findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
393
+ findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
394
+ capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
391
395
  findAnchor(name: string): any;
392
- isDescendible(container: Component): boolean;
396
+ isDescendible(container: import("@hatiolab/things-scene").Component | any): boolean;
393
397
  getContext(component?: unknown): any;
394
- get root(): Component;
395
- get rootModel(): Component;
396
- get parent(): Component;
397
- set parent(v: Component): any;
398
+ get root(): import("@hatiolab/things-scene").Component;
399
+ get rootModel(): import("@hatiolab/things-scene").Component;
400
+ get parent(): import("@hatiolab/things-scene").Component;
401
+ set parent(v: import("@hatiolab/things-scene").Component): any;
398
402
  get scalable(): boolean;
399
403
  get stuck(): boolean;
400
404
  get capturable(): boolean;
@@ -419,47 +423,51 @@ declare const ProgressVertical_base: (new (...args: any[]) => {
419
423
  ondropfile(transfered: FileList, files: string[]): void;
420
424
  transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
421
425
  transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
422
- transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
423
- transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
424
- transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
425
- transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
426
- transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
427
- transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
428
- transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
426
+ transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
427
+ transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
428
+ transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
429
+ transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
430
+ transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
431
+ transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
432
+ transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
429
433
  toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
430
434
  fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
431
- toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
432
- fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
433
- toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
434
- toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
435
- toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
435
+ toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
436
+ fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
437
+ toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
438
+ toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
439
+ toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
440
+ on<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
436
441
  on(name: string | object, callback: Function, context?: any): any;
442
+ off<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback?: ((...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void) | undefined, context?: any): any;
437
443
  off(name?: string | object, callback?: Function, context?: any): any;
444
+ once<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
438
445
  once(name: string | object, callback: Function, context?: any): any;
446
+ trigger<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, ...args: import("@hatiolab/things-scene").ComponentEventMap[K]): any;
439
447
  trigger(name: string, ...args: any[]): any;
440
448
  delegate_on(delegator: any): any;
441
449
  delegate_off(delegator: any): any;
442
450
  onchange(after: Record<string, any>, before: Record<string, any>): void;
443
451
  calculateBounds?(): void;
444
452
  oncreate_element?(element: HTMLElement): void;
445
- removeComponent(component: Component, ghost?: boolean): void;
446
- addComponent(component: Component, ghost?: boolean): void;
447
- insertComponentAt(component: Component, index: number, ghost?: boolean): void;
448
- getOverlay(component: Component): HTMLElement | undefined;
449
- findById(id: string): Component | undefined;
450
- findByRefid(ref: string | number): Component | undefined;
451
- findAllById(id: string): Component[];
453
+ removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
454
+ addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
455
+ insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
456
+ getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
457
+ findById(id: string): import("@hatiolab/things-scene").Component | undefined;
458
+ findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
459
+ findAllById(id: string): import("@hatiolab/things-scene").Component[];
452
460
  resize(): void;
453
461
  fit(type?: string): void;
454
- get components(): Component[] | undefined;
462
+ get components(): import("@hatiolab/things-scene").Component[] | undefined;
455
463
  get layout(): any;
456
464
  get auxOverlay(): HTMLElement | undefined;
457
465
  get isReady(): boolean;
458
466
  get unitScale(): number;
459
- get selected(): Component[];
460
- set selected(_v: Component[]): any;
461
- get focused(): Component | null;
462
- set focused(_v: Component | null): any;
467
+ get selected(): import("@hatiolab/things-scene").Component[];
468
+ set selected(_v: import("@hatiolab/things-scene").Component[]): any;
469
+ get focused(): import("@hatiolab/things-scene").Component | null;
470
+ set focused(_v: import("@hatiolab/things-scene").Component | null): any;
463
471
  get hasSameParentForAllSelected(): boolean;
464
472
  set hasSameParentForAllSelected(_v: boolean): any;
465
473
  get fitMode(): string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"progress-vertical.js","sourceRoot":"","sources":["../src/progress-vertical.ts"],"names":[],"mappings":";AAAA,OAAO,EAA8B,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEjH,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;Y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CAAC,CAAC,CAAA,CAAC,kCAAkC;QACvF,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;QAE9D,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAEtB,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IACxC,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QACxB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AArCoB,gBAAgB;IADpC,cAAc,CAAC,mBAAmB,CAAC;GACf,gBAAgB,CAqCpC;eArCoB,gBAAgB","sourcesContent":["import { Component, ComponentNature, RectPath, Shape, ValueHolder, sceneComponent } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'value',\n name: 'value',\n property: 'value'\n },\n {\n type: 'color',\n label: 'background-color',\n name: 'backgroundColor',\n property: 'backgroundColor'\n },\n {\n type: 'checkbox',\n label: 'anim-from-base',\n name: 'animFromBase'\n }\n ],\n help: 'scene/component/progress-vertical'\n}\n\n@sceneComponent('progress-vertical')\nexport default class ProgressVertical extends ValueHolder(RectPath(Shape)) {\n render(context: CanvasRenderingContext2D) {\n var { top, left, height, width, backgroundColor = 'transparent', animFromBase = false } = this.state\n\n this.animOnValueChange(this.value, animFromBase, 0)\n\n // background의 색상\n context.beginPath()\n context.rect(left, top, width, height)\n\n context.fillStyle = backgroundColor\n context.fill()\n\n // value의 색상\n context.beginPath()\n\n var drawValue = height - (height * Math.max(Math.min(this.animValue, 100), 0)) / 100\n drawValue = Math.max(Math.min(drawValue, height), 0) // DrawValue도 높이보다 작거나 커지지 말아야 한다.\n context.rect(left, top + drawValue, width, height - drawValue)\n\n this.drawFill(context)\n\n context.closePath()\n\n context.beginPath()\n\n context.rect(left, top, width, height)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawStroke(context)\n this.drawText(context)\n }\n\n get nature() {\n return NATURE\n }\n}\n"]}
1
+ {"version":3,"file":"progress-vertical.js","sourceRoot":"","sources":["../src/progress-vertical.ts"],"names":[],"mappings":";AAAA,OAAO,EAAmB,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,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,OAAO;YACb,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,iBAAiB;SAC5B;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,cAAc;SACrB;KACF;IACD,IAAI,EAAE,mCAAmC;CAC1C,CAAA;AAGc,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxE,MAAM,CAAC,OAAiC;QACtC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,aAAa,EAAE,YAAY,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAEpG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,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entNature, RectPath, Shape, ValueHolder, sceneComponent } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'value',\n name: 'value',\n property: 'value'\n },\n {\n type: 'color',\n label: 'background-color',\n name: 'backgroundColor',\n property: 'backgroundColor'\n },\n {\n type: 'checkbox',\n label: 'anim-from-base',\n name: 'animFromBase'\n }\n ],\n help: 'scene/component/progress-vertical'\n}\n\n@sceneComponent('progress-vertical')\nexport default class ProgressVertical extends ValueHolder(RectPath(Shape)) {\n render(context: CanvasRenderingContext2D) {\n var { top, left, height, width, backgroundColor = 'transparent', animFromBase = false } = this.state\n\n this.animOnValueChange(this.value, animFromBase, 0)\n\n // background의 색상\n context.beginPath()\n context.rect(left, top, width, height)\n\n context.fillStyle = backgroundColor\n context.fill()\n\n // value의 색상\n context.beginPath()\n\n var drawValue = height - (height * Math.max(Math.min(this.animValue, 100), 0)) / 100\n drawValue = Math.max(Math.min(drawValue, height), 0) // DrawValue도 높이보다 작거나 커지지 말아야 한다.\n context.rect(left, top + drawValue, width, height - drawValue)\n\n this.drawFill(context)\n\n context.closePath()\n\n context.beginPath()\n\n context.rect(left, top, width, height)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawStroke(context)\n this.drawText(context)\n }\n get nature() {\n return NATURE\n }\n}\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/scene-progressbar",
3
3
  "description": "Progressbar component for things-scene",
4
4
  "author": "heartyoh",
5
- "version": "10.0.0-beta.2",
5
+ "version": "10.0.0-beta.31",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.js",
@@ -58,5 +58,5 @@
58
58
  "prettier --write"
59
59
  ]
60
60
  },
61
- "gitHead": "350ece104754d007967cf8e3f54d0d157465e94a"
61
+ "gitHead": "fdafbd04fd083a43690be937230c7d96a3ee5da3"
62
62
  }