@operato/scene-tab 1.2.36 → 1.2.45

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/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.2.45](https://github.com/things-scene/operato-scene/compare/v1.2.44...v1.2.45) (2023-06-09)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * set => setState, get => getState for whole scene component ([c205db4](https://github.com/things-scene/operato-scene/commit/c205db4c7bfa5c6dd7d34ea82af283d83b551bad))
12
+
13
+
14
+
6
15
  ## [1.2.36](https://github.com/things-scene/operato-scene/compare/v1.2.35...v1.2.36) (2023-05-13)
7
16
 
8
17
 
@@ -71,7 +71,7 @@ export default class TabButton extends RectPath(Component) {
71
71
  this._fontColor = after.fontColor;
72
72
  if (after.hasOwnProperty('text')) {
73
73
  ;
74
- this.parent.reference.getAt(this.index).set('text', after.text);
74
+ this.parent.reference.getAt(this.index).setState('text', after.text);
75
75
  }
76
76
  this.invalidate();
77
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tab-button.js","sourceRoot":"","sources":["../src/tab-button.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAS,MAAM,wBAAwB,CAAA;AAInE,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,QAAQ,CAAC,SAAS,CAAC;IACxD,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAA;IACzB,CAAC;IAED,IAAI,SAAS;QACX,OAAQ,IAAI,CAAC,MAAc,CAAC,WAAW,KAAK,IAAI,CAAC,KAAK,CAAA;IACxD,CAAC;IAED,OAAO,CAAC,MAAW;QACjB,IAAI,CAAC,OAAO,EAAE,CAAA;IAChB,CAAC;IAOD,SAAS,CAAC,OAAiC;QACzC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C,cAAc,CAAC,MAAM,CAAC,EAAE;YAChC,CAAC;YAAC,IAAI,CAAC,MAAc,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;SAC1E;QAED,IAAI,CAAC,UAAU,EAAE,CAAA;IACnB,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport { Component, RectPath, State } from '@hatiolab/things-scene'\n\nimport Tab from './tab'\n\nexport default class TabButton extends RectPath(Component) {\n get index() {\n return this.model.index\n }\n\n get activated() {\n return (this.parent as Tab).activeIndex === this.index\n }\n\n removed(parent: Tab) {\n this.dispose()\n }\n\n private _fillStyle?: string\n private _fontColor?: string\n private _strokeStyle?: string\n private _lineWidth?: string\n\n prerender(context: CanvasRenderingContext2D) {\n super.prerender(context)\n let { fillStyle, activeFillStyle, activeLineColor, activeLineWidth, fontColor, activeFontColor } = this.state\n\n // backup style\n if (!this.hasOwnProperty('_fillStyle')) {\n this._fillStyle = fillStyle\n }\n if (!this.hasOwnProperty('_fontColor')) {\n this._fontColor = fontColor\n }\n\n if (this.activated) {\n this.model.fillStyle = activeFillStyle\n this.model.fontColor = activeFontColor\n this.model.strokeStyle = activeLineColor\n this.model.lineWidth = activeLineWidth\n } else {\n this.model.fillStyle = this._fillStyle\n this.model.fontColor = this._fontColor\n this.model.strokeStyle = this._strokeStyle\n this.model.lineWidth = this._lineWidth\n }\n }\n\n render(context: CanvasRenderingContext2D) {\n var { left = 0, top = 0, width, height } = this.bounds\n\n // 컨테이너의 바운드를 표현한다.(컨테이너의 기본 그리기 기능)\n context.beginPath()\n\n context.rect(left, top, width, height)\n\n this.drawFill(context)\n this.drawStroke(context)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n super.postrender(context)\n\n // restore style\n this.model.fillStyle = this._fillStyle\n this.model.fontColor = this._fontColor\n this.model.strokeStyle = this._strokeStyle\n this.model.lineWidth = this._lineWidth\n\n delete this._fillStyle\n delete this._fontColor\n delete this._strokeStyle\n delete this._lineWidth\n }\n\n onclick(e: MouseEvent) {\n ;(this.parent as Tab).activeIndex = this.index\n this.parent.invalidate()\n }\n\n onchange(after: State) {\n if (after.hasOwnProperty('fillStyle')) this._fillStyle = after.fillStyle\n\n if (after.hasOwnProperty('fontColor')) this._fontColor = after.fontColor\n\n if (after.hasOwnProperty('strokeStyle')) this._fontColor = after.fontColor\n\n if (after.hasOwnProperty('lineWidth')) this._fontColor = after.fontColor\n\n if (after.hasOwnProperty('text')) {\n ;(this.parent as Tab).reference.getAt(this.index).set('text', after.text)\n }\n\n this.invalidate()\n }\n}\n\nComponent.register('tab-button', TabButton)\n"]}
1
+ {"version":3,"file":"tab-button.js","sourceRoot":"","sources":["../src/tab-button.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAS,MAAM,wBAAwB,CAAA;AAInE,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,QAAQ,CAAC,SAAS,CAAC;IACxD,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAA;IACzB,CAAC;IAED,IAAI,SAAS;QACX,OAAQ,IAAI,CAAC,MAAc,CAAC,WAAW,KAAK,IAAI,CAAC,KAAK,CAAA;IACxD,CAAC;IAED,OAAO,CAAC,MAAW;QACjB,IAAI,CAAC,OAAO,EAAE,CAAA;IAChB,CAAC;IAOD,SAAS,CAAC,OAAiC;QACzC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QACxB,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAE7G,eAAe;QACf,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,YAAY,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A;IACnB,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport { Component, RectPath, State } from '@hatiolab/things-scene'\n\nimport Tab from './tab'\n\nexport default class TabButton extends RectPath(Component) {\n get index() {\n return this.model.index\n }\n\n get activated() {\n return (this.parent as Tab).activeIndex === this.index\n }\n\n removed(parent: Tab) {\n this.dispose()\n }\n\n private _fillStyle?: string\n private _fontColor?: string\n private _strokeStyle?: string\n private _lineWidth?: string\n\n prerender(context: CanvasRenderingContext2D) {\n super.prerender(context)\n let { fillStyle, activeFillStyle, activeLineColor, activeLineWidth, fontColor, activeFontColor } = this.state\n\n // backup style\n if (!this.hasOwnProperty('_fillStyle')) {\n this._fillStyle = fillStyle\n }\n if (!this.hasOwnProperty('_fontColor')) {\n this._fontColor = fontColor\n }\n\n if (this.activated) {\n this.model.fillStyle = activeFillStyle\n this.model.fontColor = activeFontColor\n this.model.strokeStyle = activeLineColor\n this.model.lineWidth = activeLineWidth\n } else {\n this.model.fillStyle = this._fillStyle\n this.model.fontColor = this._fontColor\n this.model.strokeStyle = this._strokeStyle\n this.model.lineWidth = this._lineWidth\n }\n }\n\n render(context: CanvasRenderingContext2D) {\n var { left = 0, top = 0, width, height } = this.bounds\n\n // 컨테이너의 바운드를 표현한다.(컨테이너의 기본 그리기 기능)\n context.beginPath()\n\n context.rect(left, top, width, height)\n\n this.drawFill(context)\n this.drawStroke(context)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n super.postrender(context)\n\n // restore style\n this.model.fillStyle = this._fillStyle\n this.model.fontColor = this._fontColor\n this.model.strokeStyle = this._strokeStyle\n this.model.lineWidth = this._lineWidth\n\n delete this._fillStyle\n delete this._fontColor\n delete this._strokeStyle\n delete this._lineWidth\n }\n\n onclick(e: MouseEvent) {\n ;(this.parent as Tab).activeIndex = this.index\n this.parent.invalidate()\n }\n\n onchange(after: State) {\n if (after.hasOwnProperty('fillStyle')) this._fillStyle = after.fillStyle\n\n if (after.hasOwnProperty('fontColor')) this._fontColor = after.fontColor\n\n if (after.hasOwnProperty('strokeStyle')) this._fontColor = after.fontColor\n\n if (after.hasOwnProperty('lineWidth')) this._fontColor = after.fontColor\n\n if (after.hasOwnProperty('text')) {\n ;(this.parent as Tab).reference.getAt(this.index).setState('text', after.text)\n }\n\n this.invalidate()\n }\n}\n\nComponent.register('tab-button', TabButton)\n"]}
@@ -44,19 +44,19 @@ export default class TabContainer extends Container {
44
44
  return CardLayout;
45
45
  }
46
46
  get layoutConfig() {
47
- return this.get('layoutConfig');
47
+ return this.getState('layoutConfig');
48
48
  }
49
49
  set layoutConfig(config) {
50
- this.set('layoutConfig', config);
50
+ this.setState('layoutConfig', config);
51
51
  }
52
52
  get activeCard() {
53
- return this.components[this.get('layoutConfig').activeIndex];
53
+ return this.components[this.getState('layoutConfig').activeIndex];
54
54
  }
55
55
  get activeIndex() {
56
- return this.get('activeIndex');
56
+ return this.getState('activeIndex');
57
57
  }
58
58
  set activeIndex(activeIndex) {
59
- this.set('activeIndex', Number(activeIndex));
59
+ this.setState('activeIndex', Number(activeIndex));
60
60
  }
61
61
  ready() {
62
62
  super.ready();
@@ -140,7 +140,7 @@ export default class TabContainer extends Container {
140
140
  // height: 100
141
141
  // }))
142
142
  // }
143
- this.set('activeIndex', y);
143
+ this.setState('activeIndex', y);
144
144
  }
145
145
  onmousedown(e) {
146
146
  this.__down_point = {
@@ -160,7 +160,7 @@ export default class TabContainer extends Container {
160
160
  height: 100
161
161
  });
162
162
  this.addComponent(tabCard);
163
- this.set('activeIndex', this.components.length - 1);
163
+ this.setState('activeIndex', this.components.length - 1);
164
164
  }
165
165
  }
166
166
  Component.register('tab-container', TabContainer);
@@ -1 +1 @@
1
- {"version":3,"file":"tab-container.js","sourceRoot":"","sources":["../src/tab-container.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAmB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AE,OAAM;QAEvC,wCAAwC;QACxC,oCAAoC;QACpC,6BAA6B;QAC7B,wBAAwB;QACxB,kBAAkB;QAClB,kBAAkB;QAClB,QAAQ;QACR,IAAI;QACJ,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,CAAA;IAC5B,CAAC;IAED,WAAW,CAAC,CAAa;QACvB,IAAI,CAAC,YAAY,GAAG;YAClB,CAAC,EAAE,CAAC,CAAC,OAAO;YACZ,CAAC,EAAE,CAAC,CAAC,OAAO;SACb,CAAA;IACH,CAAC;IAED,OAAO;QACL,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAA;QAC/D,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;QAE9B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;YAC5B,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE;YAChC,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;SACZ,CAAC,CAAA;QAEF,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;QAC1B,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IACrD,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,YAAY,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport { CardLayout, Component, ComponentNature, Container, Model, POINT, State } from '@hatiolab/things-scene'\n\nimport TabCard from './tab-card'\n\nconst LABEL_WIDTH = 25\nconst LABEL_HEIGHT = 25\n\nfunction rgba(r: number, g: number, b: number, a: number) {\n return `rgba(${r}, ${g}, ${b}, ${a})`\n}\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'action',\n label: 'add-card',\n name: 'addCard',\n property: {\n icon: 'add_circle',\n action: (tabContainer: TabContainer) => {\n tabContainer.addCard()\n }\n }\n },\n {\n type: 'number',\n label: 'active index',\n name: 'activeIndex'\n }\n ],\n 'value-property': 'activeIndex',\n help: 'scene/component/tab-container'\n}\n\nexport default class TabContainer extends Container {\n private _focused: boolean = false\n private __down_point?: POINT\n\n get nature() {\n return NATURE\n }\n\n get layout() {\n return CardLayout\n }\n\n get layoutConfig() {\n return this.get('layoutConfig')\n }\n\n set layoutConfig(config) {\n this.set('layoutConfig', config)\n }\n\n get activeCard(): TabCard {\n return this.components[this.get('layoutConfig').activeIndex] as TabCard\n }\n\n get activeIndex() {\n return this.get('activeIndex')\n }\n\n set activeIndex(activeIndex: number) {\n this.set('activeIndex', Number(activeIndex))\n }\n\n ready() {\n super.ready()\n\n if (this.components.length == 0) this.addCard()\n }\n\n postrender(context: CanvasRenderingContext2D) {\n if (!this.app.isViewMode && this._focused) {\n var { left, top, width, fillStyle } = this.state\n\n // tabCard 선택 탭 그리기\n for (let i = 0; i < this.components.length; i++) {\n context.beginPath()\n\n context.rect(left - LABEL_WIDTH, top + i * LABEL_HEIGHT, LABEL_WIDTH, LABEL_HEIGHT)\n\n let color = 255 - ((20 * (i + 1)) % 255)\n context.fillStyle = rgba(color, color, color, 1)\n context.fill()\n\n context.closePath()\n }\n\n context.beginPath()\n\n context.moveTo(left, top)\n context.lineTo(left - LABEL_WIDTH, top)\n context.lineTo(left - LABEL_WIDTH, top + this.components.length * LABEL_HEIGHT)\n context.lineTo(left, top + this.components.length * LABEL_HEIGHT)\n\n context.strokeStyle = '#ccc'\n context.stroke()\n\n context.closePath()\n }\n\n super.postrender(context)\n }\n\n contains(x: number, y: number) {\n var contains = super.contains(x, y)\n\n if (this.app.isViewMode) return contains\n\n var { left, top, width } = this.bounds\n var h = LABEL_HEIGHT\n\n contains =\n contains ||\n // card selector 영역에 포함되는지\n (x < Math.max(left - LABEL_WIDTH, left) &&\n x > Math.min(left - LABEL_WIDTH, left) &&\n y < Math.max(top + h * this.size(), top) &&\n y > Math.min(top + h * this.size(), top))\n\n if (contains) this._focused = true\n else this._focused = false\n\n this.invalidate()\n return contains\n }\n\n onchange(after: State) {\n if ('activeIndex' in after) {\n this.layoutConfig = {\n ...this.layoutConfig,\n activeIndex: after.activeIndex\n }\n }\n }\n\n onmouseup(e: MouseEvent) {\n var down_point = this.__down_point\n delete this.__down_point\n\n if (!down_point || down_point.x != e.offsetX || down_point.y != e.offsetY) {\n return\n }\n\n var point = this.transcoordC2S(e.offsetX, e.offsetY)\n\n var { left, top } = this.state\n\n var x = point.x - left\n var y = point.y - top\n\n if (x > 0) return\n\n y /= LABEL_HEIGHT\n y = Math.floor(y)\n\n if (!this.layoutConfig) this.layoutConfig = {}\n\n if (y >= this.components.length) return\n\n // /* 생성 버튼이 클릭되면, 새로운 tabCard를 추가한다. */\n // if(y == this.components.length) {\n // this.add(Model.compile({\n // type: 'tab-card',\n // width: 100,\n // height: 100\n // }))\n // }\n this.set('activeIndex', y)\n }\n\n onmousedown(e: MouseEvent) {\n this.__down_point = {\n x: e.offsetX,\n y: e.offsetY\n }\n }\n\n addCard() {\n const color = 255 - ((20 * (this.components.length + 1)) % 255)\n const hex = color.toString(16)\n\n const tabCard = Model.compile({\n type: 'tab-card',\n fillStyle: `#${hex}${hex}${hex}`,\n top: 0,\n left: 0,\n width: 100,\n height: 100\n })\n\n this.addComponent(tabCard)\n this.set('activeIndex', this.components.length - 1)\n }\n}\n\nComponent.register('tab-container', TabContainer)\n"]}
1
+ {"version":3,"file":"tab-container.js","sourceRoot":"","sources":["../src/tab-container.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAmB,SAAS,EAAE,KAAK,EAAgB,MAAM,wBAA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oCAAoC;QACpC,6BAA6B;QAC7B,wBAAwB;QACxB,kBAAkB;QAClB,kBAAkB;QAClB,QAAQ;QACR,IAAI;QACJ,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC,CAAA;IACjC,CAAC;IAED,WAAW,CAAC,CAAa;QACvB,IAAI,CAAC,YAAY,GAAG;YAClB,CAAC,EAAE,CAAC,CAAC,OAAO;YACZ,CAAC,EAAE,CAAC,CAAC,OAAO;SACb,CAAA;IACH,CAAC;IAED,OAAO;QACL,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAA;QAC/D,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;QAE9B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;YAC5B,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE;YAChC,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;SACZ,CAAC,CAAA;QAEF,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;QAC1B,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAC1D,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,YAAY,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport { CardLayout, Component, ComponentNature, Container, Model, POINT, State } from '@hatiolab/things-scene'\n\nimport TabCard from './tab-card'\n\nconst LABEL_WIDTH = 25\nconst LABEL_HEIGHT = 25\n\nfunction rgba(r: number, g: number, b: number, a: number) {\n return `rgba(${r}, ${g}, ${b}, ${a})`\n}\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'action',\n label: 'add-card',\n name: 'addCard',\n property: {\n icon: 'add_circle',\n action: (tabContainer: TabContainer) => {\n tabContainer.addCard()\n }\n }\n },\n {\n type: 'number',\n label: 'active index',\n name: 'activeIndex'\n }\n ],\n 'value-property': 'activeIndex',\n help: 'scene/component/tab-container'\n}\n\nexport default class TabContainer extends Container {\n private _focused: boolean = false\n private __down_point?: POINT\n\n get nature() {\n return NATURE\n }\n\n get layout() {\n return CardLayout\n }\n\n get layoutConfig() {\n return this.getState('layoutConfig')\n }\n\n set layoutConfig(config) {\n this.setState('layoutConfig', config)\n }\n\n get activeCard(): TabCard {\n return this.components[this.getState('layoutConfig').activeIndex] as TabCard\n }\n\n get activeIndex() {\n return this.getState('activeIndex')\n }\n\n set activeIndex(activeIndex: number) {\n this.setState('activeIndex', Number(activeIndex))\n }\n\n ready() {\n super.ready()\n\n if (this.components.length == 0) this.addCard()\n }\n\n postrender(context: CanvasRenderingContext2D) {\n if (!this.app.isViewMode && this._focused) {\n var { left, top, width, fillStyle } = this.state\n\n // tabCard 선택 탭 그리기\n for (let i = 0; i < this.components.length; i++) {\n context.beginPath()\n\n context.rect(left - LABEL_WIDTH, top + i * LABEL_HEIGHT, LABEL_WIDTH, LABEL_HEIGHT)\n\n let color = 255 - ((20 * (i + 1)) % 255)\n context.fillStyle = rgba(color, color, color, 1)\n context.fill()\n\n context.closePath()\n }\n\n context.beginPath()\n\n context.moveTo(left, top)\n context.lineTo(left - LABEL_WIDTH, top)\n context.lineTo(left - LABEL_WIDTH, top + this.components.length * LABEL_HEIGHT)\n context.lineTo(left, top + this.components.length * LABEL_HEIGHT)\n\n context.strokeStyle = '#ccc'\n context.stroke()\n\n context.closePath()\n }\n\n super.postrender(context)\n }\n\n contains(x: number, y: number) {\n var contains = super.contains(x, y)\n\n if (this.app.isViewMode) return contains\n\n var { left, top, width } = this.bounds\n var h = LABEL_HEIGHT\n\n contains =\n contains ||\n // card selector 영역에 포함되는지\n (x < Math.max(left - LABEL_WIDTH, left) &&\n x > Math.min(left - LABEL_WIDTH, left) &&\n y < Math.max(top + h * this.size(), top) &&\n y > Math.min(top + h * this.size(), top))\n\n if (contains) this._focused = true\n else this._focused = false\n\n this.invalidate()\n return contains\n }\n\n onchange(after: State) {\n if ('activeIndex' in after) {\n this.layoutConfig = {\n ...this.layoutConfig,\n activeIndex: after.activeIndex\n }\n }\n }\n\n onmouseup(e: MouseEvent) {\n var down_point = this.__down_point\n delete this.__down_point\n\n if (!down_point || down_point.x != e.offsetX || down_point.y != e.offsetY) {\n return\n }\n\n var point = this.transcoordC2S(e.offsetX, e.offsetY)\n\n var { left, top } = this.state\n\n var x = point.x - left\n var y = point.y - top\n\n if (x > 0) return\n\n y /= LABEL_HEIGHT\n y = Math.floor(y)\n\n if (!this.layoutConfig) this.layoutConfig = {}\n\n if (y >= this.components.length) return\n\n // /* 생성 버튼이 클릭되면, 새로운 tabCard를 추가한다. */\n // if(y == this.components.length) {\n // this.add(Model.compile({\n // type: 'tab-card',\n // width: 100,\n // height: 100\n // }))\n // }\n this.setState('activeIndex', y)\n }\n\n onmousedown(e: MouseEvent) {\n this.__down_point = {\n x: e.offsetX,\n y: e.offsetY\n }\n }\n\n addCard() {\n const color = 255 - ((20 * (this.components.length + 1)) % 255)\n const hex = color.toString(16)\n\n const tabCard = Model.compile({\n type: 'tab-card',\n fillStyle: `#${hex}${hex}${hex}`,\n top: 0,\n left: 0,\n width: 100,\n height: 100\n })\n\n this.addComponent(tabCard)\n this.setState('activeIndex', this.components.length - 1)\n }\n}\n\nComponent.register('tab-container', TabContainer)\n"]}
package/dist/tab.js CHANGED
@@ -94,7 +94,7 @@ export default class Tab extends Container {
94
94
  return (components > 0 && height / components) || height;
95
95
  }
96
96
  get activeIndex() {
97
- return this.get('activeIndex');
97
+ return this.getState('activeIndex');
98
98
  }
99
99
  set reference(reference) {
100
100
  if (this.reference)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A;YACjB,eAAe;YACf,0BAA0B;YAC1B,sCAAsC;YACtC,0BAA0B;YAC1B,sCAAsC;YACtC,8BAA8B;YAC9B,0BAA0B;YAC1B,4BAA4B;YAC5B,wBAAwB;YACxB,4BAA4B;YAC5B,oBAAoB;YACpB,eAAe;YACf,KAAK;SACN;IACH,CAAC;IAED,mCAAmC;IACnC,YAAY,CAAC,KAAU,EAAE,MAAW,EAAE,IAAS;QAC7C,wDAAwD;QACxD,qCAAqC;QACrC,4CAA4C;QAC5C,sBAAsB;QACtB,IAAI;IACN,CAAC;IAED,QAAQ,CAAC,KAAY,EAAE,MAAa;QAClC,IAAI,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE;YACrC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;YAChC,IAAI,CAAC,UAAU,EAAE,CAAA;SAClB;QAED,6CAA6C;QAC7C,+CAA+C;QAC/C,yCAAyC;QACzC,yCAAyC;QACzC,2CAA2C;QAC3C,yCAAyC;QACzC,0CAA0C;QAC1C,wCAAwC;QACxC,0CAA0C;QAC1C,sCAAsC;QACtC,uCAAuC;QACvC,EAAE;QACF,IAAI;QACJ,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAA;IAChC,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport {\n Component,\n ComponentNature,\n Container,\n LinearHorizontalLayout,\n LinearVerticalLayout,\n Model,\n State,\n Style\n} from '@hatiolab/things-scene'\n\nconst HANDLE_WIDTH = 25\nconst HANDLE_HEIGHT = 25\n\nfunction rgba(r: number, g: number, b: number, a: number) {\n return `rgba(${r}, ${g}, ${b}, ${a})`\n}\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'id-input',\n label: 'tab-reference',\n name: 'reference',\n property: {\n component: (c: Component) => {\n /* this means compare target component */\n const ret = ['tab-container', 'indoor-map'].includes(c.model.type as string)\n return ret\n }\n }\n },\n {\n type: 'number',\n label: 'tab-active-index',\n name: 'activeIndex',\n property: {\n min: 0,\n step: 1\n }\n },\n {\n type: 'color',\n label: 'active-fill-style',\n name: 'activeFillStyle',\n property: 'activeFillStyle'\n },\n {\n type: 'color',\n label: 'active-font-color',\n name: 'activeFontColor',\n property: 'activeFontColor'\n },\n {\n type: 'color',\n label: 'active-line-color',\n name: 'activeLineColor',\n property: 'activeLineColor'\n },\n {\n type: 'number',\n label: 'active-line-width',\n name: 'activeLineWidth',\n property: 'activeLineWidth'\n }\n ]\n}\n\nexport default class Tab extends Container {\n get layout() {\n let { width, height } = this.state\n\n if (width >= height) {\n return LinearHorizontalLayout\n } else {\n return LinearVerticalLayout\n }\n }\n\n get nature() {\n return NATURE\n }\n\n // 컴포넌트를 임의로 추가 및 삭제할 수 있는 지를 지정하는 속성임.\n get focusible() {\n return false\n }\n\n get reference() {\n var { reference } = this.state\n if (!reference) {\n return null\n }\n\n if (!this._reference) {\n this._reference = this.root.findById(reference)\n if (this._reference) this._reference.on('change', this.onRefChanged, this)\n }\n\n return this._reference\n }\n\n get labelHeight() {\n var components = this.reference.components.length\n var { height } = this.state\n\n return (components > 0 && height / components) || height\n }\n\n get activeIndex() {\n return this.get('activeIndex')\n }\n\n private _reference: any\n\n set reference(reference) {\n if (this.reference) this.reference.off('change', this.onRefChanged, this)\n\n this._reference = null\n this.model.reference = reference\n }\n\n set activeIndex(index) {\n this.set('activeIndex', index)\n if (this.reference) {\n this.reference.activeIndex = index\n }\n }\n\n render(context: CanvasRenderingContext2D) {\n super.render(context)\n\n if (this.reference) {\n if (this.size() !== this.reference.size()) this.rebuildTabButtons()\n } else {\n // TODO reference 가 잘못되거나 안되어있다는 경고 의미로 뭔가 그려라..\n var componentsLength = this.components.length\n for (var i = componentsLength - 1; i >= 0; i--) {\n var tabBtn = this.components[i]\n this.removeComponent(tabBtn)\n }\n }\n }\n\n postrender(context: CanvasRenderingContext2D) {\n super.postrender(context)\n\n // if (!this.app.isEditMode) return\n\n var { left, top, width, fillStyle } = this.state\n\n // 이동 핸들 그리기\n context.beginPath()\n\n context.rect(left + width, top, HANDLE_WIDTH, HANDLE_HEIGHT)\n\n let color = 255 - (20 % 255)\n context.fillStyle = rgba(color, color, color, 1)\n context.fill()\n\n context.closePath()\n }\n\n contains(x: number, y: number) {\n if (!this.app.isEditMode) return super.contains(x, y)\n\n if (super.contains(x, y)) return true\n\n var { left, top, width } = this.bounds\n\n var right = left + width\n\n var h = HANDLE_HEIGHT\n\n return (\n x < Math.max(right + HANDLE_WIDTH, right) &&\n x > Math.min(right + HANDLE_WIDTH, right) &&\n y < Math.max(top + h, top) &&\n y > Math.min(top + h, top)\n )\n }\n\n dispose() {\n if (this.reference) this.reference.off('change', this.onRefChanged, this)\n\n super.dispose()\n }\n\n rebuildTabButtons() {\n var {\n tabIndex = 0,\n left,\n top,\n width,\n height,\n fillStyle,\n activeFillStyle,\n activeLineColor,\n activeLineWidth,\n strokeStyle,\n fontColor,\n activeFontColor,\n fontFamily,\n fontSize,\n lineHeight,\n italic,\n bold,\n lineWidth = 0\n } = this.state\n\n var reference = this.reference\n let children = []\n\n let components = reference.components\n let label_height = this.labelHeight\n\n let componentsLength = this.components.length\n\n for (var i = componentsLength - 1; i >= 0; i--) {\n this.removeComponent(this.components[i])\n }\n\n for (let i = 0; i < components.length; i++) {\n if (components[i].model.type != 'tab-card') continue\n\n let tabCardText = components[i].text || ''\n\n children.push(\n Model.compile({\n type: 'tab-button',\n index: i,\n text: tabCardText || String(i + 1),\n fillStyle: fillStyle || 'transparent',\n activeFillStyle: activeFillStyle,\n activeLineColor: activeLineColor,\n activeLineWidth: activeLineWidth,\n fontColor: fontColor,\n activeFontColor: activeFontColor || fontColor,\n fontFamily: fontFamily,\n fontSize: fontSize,\n lineHeight: lineHeight,\n italic: italic,\n bold: bold,\n strokeStyle: strokeStyle,\n lineWidth: lineWidth,\n left: 0,\n top: 0,\n width: width,\n height: height\n })\n )\n }\n\n this.add(children)\n\n this.reflow()\n\n this.activeIndex = this.state.activeIndex || 0\n }\n\n setTabButtonsStyle(style: Style) {\n // var {\n // fillStyle,\n // activeFillStyle,\n // fontColor,\n // activeFontColor,\n // strokeStyle,\n // lineWidth = 0,\n // fontFamily,\n // fontSize,\n // lineHeight,\n // italic,\n // bold\n // } = style\n\n var children = this.components\n\n for (var i in children) {\n var tabBtn = children[i]\n tabBtn.set(style)\n // tabBtn.set({\n // fillStyle: fillStyle,\n // activeFillStyle: activeFillStyle,\n // fontColor: fontColor,\n // activeFontColor: activeFontColor,\n // strokeStyle: strokeStyle,\n // lineWidth: lineWidth,\n // fontFamily: fontFamily,\n // fontSize: fontSize,\n // lineHeight: lineHeight,\n // italic: italic,\n // bold: bold\n // })\n }\n }\n\n // reference가 변했을 때 (tab에 변화를 주기위해)\n onRefChanged(after: any, before: any, hint: any) {\n // let sourceIndex = hint.deliverer.indexOf(hint.origin)\n // if(this.components[sourceIndex]) {\n // this.components[sourceIndex].set(after)\n // this.invalidate()\n // }\n }\n\n onchange(after: State, before: State) {\n if (after.hasOwnProperty('reference')) {\n this.reference = after.reference\n this.invalidate()\n }\n\n // if(after.hasOwnProperty(\"activeFillStyle\")\n // || after.hasOwnProperty(\"activeFontColor\")\n // || after.hasOwnProperty(\"fillStyle\")\n // || after.hasOwnProperty(\"fontColor\")\n // || after.hasOwnProperty(\"strokeStyle\")\n // || after.hasOwnProperty(\"lineWidth\")\n // || after.hasOwnProperty(\"fontFamily\")\n // || after.hasOwnProperty(\"fontSize\")\n // || after.hasOwnProperty(\"lineHeight\")\n // || after.hasOwnProperty(\"italic\")\n // || after.hasOwnProperty(\"bold\")) {\n //\n // }\n this.setTabButtonsStyle(after)\n }\n}\n\nComponent.register('tab', Tab)\n"]}
1
+ {"version":3,"file":"tab.js","sourceRoot":"","sources":["../src/tab.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,S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BAAwB;YACxB,4BAA4B;YAC5B,oBAAoB;YACpB,eAAe;YACf,KAAK;SACN;IACH,CAAC;IAED,mCAAmC;IACnC,YAAY,CAAC,KAAU,EAAE,MAAW,EAAE,IAAS;QAC7C,wDAAwD;QACxD,qCAAqC;QACrC,4CAA4C;QAC5C,sBAAsB;QACtB,IAAI;IACN,CAAC;IAED,QAAQ,CAAC,KAAY,EAAE,MAAa;QAClC,IAAI,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE;YACrC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;YAChC,IAAI,CAAC,UAAU,EAAE,CAAA;SAClB;QAED,6CAA6C;QAC7C,+CAA+C;QAC/C,yCAAyC;QACzC,yCAAyC;QACzC,2CAA2C;QAC3C,yCAAyC;QACzC,0CAA0C;QAC1C,wCAAwC;QACxC,0CAA0C;QAC1C,sCAAsC;QACtC,uCAAuC;QACvC,EAAE;QACF,IAAI;QACJ,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAA;IAChC,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport {\n Component,\n ComponentNature,\n Container,\n LinearHorizontalLayout,\n LinearVerticalLayout,\n Model,\n State,\n Style\n} from '@hatiolab/things-scene'\n\nconst HANDLE_WIDTH = 25\nconst HANDLE_HEIGHT = 25\n\nfunction rgba(r: number, g: number, b: number, a: number) {\n return `rgba(${r}, ${g}, ${b}, ${a})`\n}\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'id-input',\n label: 'tab-reference',\n name: 'reference',\n property: {\n component: (c: Component) => {\n /* this means compare target component */\n const ret = ['tab-container', 'indoor-map'].includes(c.model.type as string)\n return ret\n }\n }\n },\n {\n type: 'number',\n label: 'tab-active-index',\n name: 'activeIndex',\n property: {\n min: 0,\n step: 1\n }\n },\n {\n type: 'color',\n label: 'active-fill-style',\n name: 'activeFillStyle',\n property: 'activeFillStyle'\n },\n {\n type: 'color',\n label: 'active-font-color',\n name: 'activeFontColor',\n property: 'activeFontColor'\n },\n {\n type: 'color',\n label: 'active-line-color',\n name: 'activeLineColor',\n property: 'activeLineColor'\n },\n {\n type: 'number',\n label: 'active-line-width',\n name: 'activeLineWidth',\n property: 'activeLineWidth'\n }\n ]\n}\n\nexport default class Tab extends Container {\n get layout() {\n let { width, height } = this.state\n\n if (width >= height) {\n return LinearHorizontalLayout\n } else {\n return LinearVerticalLayout\n }\n }\n\n get nature() {\n return NATURE\n }\n\n // 컴포넌트를 임의로 추가 및 삭제할 수 있는 지를 지정하는 속성임.\n get focusible() {\n return false\n }\n\n get reference() {\n var { reference } = this.state\n if (!reference) {\n return null\n }\n\n if (!this._reference) {\n this._reference = this.root.findById(reference)\n if (this._reference) this._reference.on('change', this.onRefChanged, this)\n }\n\n return this._reference\n }\n\n get labelHeight() {\n var components = this.reference.components.length\n var { height } = this.state\n\n return (components > 0 && height / components) || height\n }\n\n get activeIndex() {\n return this.getState('activeIndex')\n }\n\n private _reference: any\n\n set reference(reference) {\n if (this.reference) this.reference.off('change', this.onRefChanged, this)\n\n this._reference = null\n this.model.reference = reference\n }\n\n set activeIndex(index) {\n this.set('activeIndex', index)\n if (this.reference) {\n this.reference.activeIndex = index\n }\n }\n\n render(context: CanvasRenderingContext2D) {\n super.render(context)\n\n if (this.reference) {\n if (this.size() !== this.reference.size()) this.rebuildTabButtons()\n } else {\n // TODO reference 가 잘못되거나 안되어있다는 경고 의미로 뭔가 그려라..\n var componentsLength = this.components.length\n for (var i = componentsLength - 1; i >= 0; i--) {\n var tabBtn = this.components[i]\n this.removeComponent(tabBtn)\n }\n }\n }\n\n postrender(context: CanvasRenderingContext2D) {\n super.postrender(context)\n\n // if (!this.app.isEditMode) return\n\n var { left, top, width, fillStyle } = this.state\n\n // 이동 핸들 그리기\n context.beginPath()\n\n context.rect(left + width, top, HANDLE_WIDTH, HANDLE_HEIGHT)\n\n let color = 255 - (20 % 255)\n context.fillStyle = rgba(color, color, color, 1)\n context.fill()\n\n context.closePath()\n }\n\n contains(x: number, y: number) {\n if (!this.app.isEditMode) return super.contains(x, y)\n\n if (super.contains(x, y)) return true\n\n var { left, top, width } = this.bounds\n\n var right = left + width\n\n var h = HANDLE_HEIGHT\n\n return (\n x < Math.max(right + HANDLE_WIDTH, right) &&\n x > Math.min(right + HANDLE_WIDTH, right) &&\n y < Math.max(top + h, top) &&\n y > Math.min(top + h, top)\n )\n }\n\n dispose() {\n if (this.reference) this.reference.off('change', this.onRefChanged, this)\n\n super.dispose()\n }\n\n rebuildTabButtons() {\n var {\n tabIndex = 0,\n left,\n top,\n width,\n height,\n fillStyle,\n activeFillStyle,\n activeLineColor,\n activeLineWidth,\n strokeStyle,\n fontColor,\n activeFontColor,\n fontFamily,\n fontSize,\n lineHeight,\n italic,\n bold,\n lineWidth = 0\n } = this.state\n\n var reference = this.reference\n let children = []\n\n let components = reference.components\n let label_height = this.labelHeight\n\n let componentsLength = this.components.length\n\n for (var i = componentsLength - 1; i >= 0; i--) {\n this.removeComponent(this.components[i])\n }\n\n for (let i = 0; i < components.length; i++) {\n if (components[i].model.type != 'tab-card') continue\n\n let tabCardText = components[i].text || ''\n\n children.push(\n Model.compile({\n type: 'tab-button',\n index: i,\n text: tabCardText || String(i + 1),\n fillStyle: fillStyle || 'transparent',\n activeFillStyle: activeFillStyle,\n activeLineColor: activeLineColor,\n activeLineWidth: activeLineWidth,\n fontColor: fontColor,\n activeFontColor: activeFontColor || fontColor,\n fontFamily: fontFamily,\n fontSize: fontSize,\n lineHeight: lineHeight,\n italic: italic,\n bold: bold,\n strokeStyle: strokeStyle,\n lineWidth: lineWidth,\n left: 0,\n top: 0,\n width: width,\n height: height\n })\n )\n }\n\n this.add(children)\n\n this.reflow()\n\n this.activeIndex = this.state.activeIndex || 0\n }\n\n setTabButtonsStyle(style: Style) {\n // var {\n // fillStyle,\n // activeFillStyle,\n // fontColor,\n // activeFontColor,\n // strokeStyle,\n // lineWidth = 0,\n // fontFamily,\n // fontSize,\n // lineHeight,\n // italic,\n // bold\n // } = style\n\n var children = this.components\n\n for (var i in children) {\n var tabBtn = children[i]\n tabBtn.set(style)\n // tabBtn.set({\n // fillStyle: fillStyle,\n // activeFillStyle: activeFillStyle,\n // fontColor: fontColor,\n // activeFontColor: activeFontColor,\n // strokeStyle: strokeStyle,\n // lineWidth: lineWidth,\n // fontFamily: fontFamily,\n // fontSize: fontSize,\n // lineHeight: lineHeight,\n // italic: italic,\n // bold: bold\n // })\n }\n }\n\n // reference가 변했을 때 (tab에 변화를 주기위해)\n onRefChanged(after: any, before: any, hint: any) {\n // let sourceIndex = hint.deliverer.indexOf(hint.origin)\n // if(this.components[sourceIndex]) {\n // this.components[sourceIndex].set(after)\n // this.invalidate()\n // }\n }\n\n onchange(after: State, before: State) {\n if (after.hasOwnProperty('reference')) {\n this.reference = after.reference\n this.invalidate()\n }\n\n // if(after.hasOwnProperty(\"activeFillStyle\")\n // || after.hasOwnProperty(\"activeFontColor\")\n // || after.hasOwnProperty(\"fillStyle\")\n // || after.hasOwnProperty(\"fontColor\")\n // || after.hasOwnProperty(\"strokeStyle\")\n // || after.hasOwnProperty(\"lineWidth\")\n // || after.hasOwnProperty(\"fontFamily\")\n // || after.hasOwnProperty(\"fontSize\")\n // || after.hasOwnProperty(\"lineHeight\")\n // || after.hasOwnProperty(\"italic\")\n // || after.hasOwnProperty(\"bold\")) {\n //\n // }\n this.setTabButtonsStyle(after)\n }\n}\n\nComponent.register('tab', Tab)\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/scene-tab",
3
3
  "description": "Tab style container for Things Scene",
4
4
  "author": "heartyoh",
5
- "version": "1.2.36",
5
+ "version": "1.2.45",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
8
  "license": "MIT",
@@ -57,5 +57,5 @@
57
57
  "prettier --write"
58
58
  ]
59
59
  },
60
- "gitHead": "65a40a190365b3b6256409b6491af360e36d1a98"
60
+ "gitHead": "131e93569c5da183050eb855d67b72580414d370"
61
61
  }
package/src/tab-button.ts CHANGED
@@ -90,7 +90,7 @@ export default class TabButton extends RectPath(Component) {
90
90
  if (after.hasOwnProperty('lineWidth')) this._fontColor = after.fontColor
91
91
 
92
92
  if (after.hasOwnProperty('text')) {
93
- ;(this.parent as Tab).reference.getAt(this.index).set('text', after.text)
93
+ ;(this.parent as Tab).reference.getAt(this.index).setState('text', after.text)
94
94
  }
95
95
 
96
96
  this.invalidate()
@@ -51,23 +51,23 @@ export default class TabContainer extends Container {
51
51
  }
52
52
 
53
53
  get layoutConfig() {
54
- return this.get('layoutConfig')
54
+ return this.getState('layoutConfig')
55
55
  }
56
56
 
57
57
  set layoutConfig(config) {
58
- this.set('layoutConfig', config)
58
+ this.setState('layoutConfig', config)
59
59
  }
60
60
 
61
61
  get activeCard(): TabCard {
62
- return this.components[this.get('layoutConfig').activeIndex] as TabCard
62
+ return this.components[this.getState('layoutConfig').activeIndex] as TabCard
63
63
  }
64
64
 
65
65
  get activeIndex() {
66
- return this.get('activeIndex')
66
+ return this.getState('activeIndex')
67
67
  }
68
68
 
69
69
  set activeIndex(activeIndex: number) {
70
- this.set('activeIndex', Number(activeIndex))
70
+ this.setState('activeIndex', Number(activeIndex))
71
71
  }
72
72
 
73
73
  ready() {
@@ -173,7 +173,7 @@ export default class TabContainer extends Container {
173
173
  // height: 100
174
174
  // }))
175
175
  // }
176
- this.set('activeIndex', y)
176
+ this.setState('activeIndex', y)
177
177
  }
178
178
 
179
179
  onmousedown(e: MouseEvent) {
@@ -197,7 +197,7 @@ export default class TabContainer extends Container {
197
197
  })
198
198
 
199
199
  this.addComponent(tabCard)
200
- this.set('activeIndex', this.components.length - 1)
200
+ this.setState('activeIndex', this.components.length - 1)
201
201
  }
202
202
  }
203
203
 
package/src/tab.ts CHANGED
@@ -114,7 +114,7 @@ export default class Tab extends Container {
114
114
  }
115
115
 
116
116
  get activeIndex() {
117
- return this.get('activeIndex')
117
+ return this.getState('activeIndex')
118
118
  }
119
119
 
120
120
  private _reference: any
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@hatiolab/things-scene/things-scene.d.ts","./src/tab-container.ts","./src/tab-card.ts","./src/tab.ts","./src/tab-button.ts","./src/index.ts","./src/templates/tab-container.ts","./src/templates/tab.ts","./src/templates/index.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"f1c9fe42b65437a61104e601eb298c5c859fb522b483f1bdb700eed67a16f980","1ec425c4c916d3a75b0557409a967eb5fee869beb69eefc2fbbf563f92bda771",{"version":"e03b5ed7f64ff3d2b6d8283445ad833ec35849e0b3ca92d3d34ada890a5924e2","signature":"4272b1b18af2ee717d5ee74400c801837c5a9ac2509d792c177827fd6d7c563a"},{"version":"61b8b1a87df8810b18d96e5540ce18140708b6ff9bcd6e0a41da5b01834dd77f","signature":"903336d4b0a83371879de11f43ac82d819d200198638bc27d1c5324575863569"},{"version":"353239f14bc46aa51f63dce4c0be6d490b7bffdc6c65ac1e065f9f8141994eda","signature":"27a25d465931c2bc8ac0804f396fb5019f4bc1062cd124944ab0a665010f5ee2"},{"version":"1efd8b048687652a259b171367dec3d7f8b8c6d0f41c5c2cbcd0a88ca33fe5ff","signature":"1e29443446bc89c0d939030c3c55e8476a81f64da3fa633f108370bb9ef56f39"},{"version":"0f300668d702080921c78d3c4edd493925de582dce2a50c0993ac4b8c62bb7d4","signature":"88132cd35f670e57b6d85e802f4453aff313270908886369da0561fbc599c354"},{"version":"b668e19c84a1d923f78e4def083d7eb2cb0cc7b834d38e130be5a60f33d2a41f","signature":"ce7354820bf2fb9fad3221a704dbede20b61e9f30f384128b3be81f685c63a08"},{"version":"9958af937b59735fadadb4cac852bdde6aea78bfcf803deecc2f63a2f3127918","signature":"b21130ee402d2f055d24259958864b717e89897989b3663d6fe8fafbf692dd7f"},{"version":"66603f5a0bd2d7052120523791e8edb77078229aaf5314522886798ce92151bb","signature":"05890472fb38b7b901355c9294924f1da43644a9150fe916eab7b020d77aadb6"},"66a6e7b6e32eea099615d627028ed0d681679e31237df03e68e1b912e3e61da0","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"f749812878fecfa53cfc13b36e5d35086fb6377983a9df44175da83ccc23af1f","affectsGlobalScope":true},"fd536fe411f46ae62c4729e342a3494adbdd54335e41039c238170c9781da9ff",{"version":"772ff00e189d93488d1ca6f0f4dfba77bd090a99ed31e19a14bc16fad4078e48","affectsGlobalScope":true},"d9b1fa0da9fbff85402c3ee794bcfe6d7cfef2fa053761b7d83989cdb7f9b26d","ac0c7cb0a4c1bec60be2c0460b3bda1e674eaf2c98312d7b6f16a0bb58718e2d",{"version":"7e2181a6fc140b4525d5a45c204477c37fa78a635558e88552c68f76a4325403","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","6a6bfa45d3ed96dea1ad653444fb26ddaa9245d2e2d6ddaab050cb9a2c0936d7","276b547eeb8eeeee9a446a3bfa6e07d1c0199269bdcf33813abab1281394a9cb","c999f7816955f75b447823e3e4085f699600e2a4a3327907df9af65b0a9c0df6","958df89fdcf5555cdfd57a14037e05505048dd29c59e8009bea279b65523b241","ffa8324a4c0611f9a50262fb36f097eeabe0fa0d71755aa67156da13cde1b932","9b814e0806922056145bedb096f11b73bdce70cc871f3ccfc4ce00b2cba75718",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"be3d24f3fd8c85fedd91485b207d180f14ac2602805b52f6a33462ada14c27b0","affectsGlobalScope":true},"e58cfbe7db26c2077027662ef6c87a3cf9d721717e77ecaa98c4d8d7911b3299","2ad6a251b6ef19fd1f8498f83bb7b265033bd52287e1f6569d09544f18806713","bfa08f2c30c475aef1c9451855ba6b2acfdc64f61950a38fae75806d66fb85c2","159807eb55a9439f9a675bd493788190a6203b5f36c315f8c3acbfcb875c7072","fe31b2b31ac5453fc7b8eef32b62017e55b214ceb884f0b177f442af92e84682","dd72576c8ea64d55af46a386068503d3cfcecce84ed7e1cbd4ff4081ba67fafc",{"version":"125af9d85cb9d5e508353f10a8d52f01652d2d48b2cea54789a33e5b4d289c1c","affectsGlobalScope":true},"70a7e8a7880d55396285e4b85ff5bdf3af3083176abe07f944967836f2a43188","3570df7c6f3a976109f55b596a2d88c2f87e0574cd1502272594ee5c4e56d0ef","850e95721334c2aa7697b08782f443ec4286274e5024169d4443933544f359d7",{"version":"74e6cd21f7b5e29fab05060ea24e2b90aa254f16f3f62ccd7055bdb8fc7b2ff5","affectsGlobalScope":true},{"version":"5761c90b0cabdd6bd1f5fb1c3bf942088fdd39e18ed35dbe39b0c34bc733bf13","affectsGlobalScope":true},"1eb6c5569d41e6021832d0a8a71f45fecbc13d03ad7d306da485999148b64955","c05ef0ecf06540ad3039515c10d3b27f9380639ced40f4093fd073e1b5ff21d9","c774096c5935712de41c763e3c08a04b7a788a85fb07a0c2df23fb5ace3bc610","2b847f2aba41dcd69677684d5d300c08aea4e306c305fd39bf548cef19f03cfe","f4c0cbc93eb51fd61e07a86111739770dd524f6297bd83266ff004aec553e085","9a134dbb29f0af914d90b23f609b39019d66ed53db7d492ab6b04c67114559da","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","785e5be57d4f20f290a20e7b0c6263f6c57fd6e51283050756cef07d6d651c68","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","7b3781fbdfddbee8dba55ccee5aa74a7c8d6701ade11d49ab7d8cb1fcefe669e","c4aab2ec3a249f2a4caa9cbdb099752a80daf999b79d85aa3504cdfd6e559476",{"version":"2cff47e15621f3055af1df1547426f833c9d0a571750c4f0659836f45c50fe0a","affectsGlobalScope":true},"ad08154d9602429522cac965a715fde27d421d69b24756c5d291877dda75353e","c764a6cf523d13f2304a23216cd1084e28c041eebabd8aa9b2a9d99866c668c0","1272a5c2bd05961adc473e905332b7a422b00485c10b41c752f7fcf6835e3436","30ef92bf8135ce36ba1231fe41715276f2a40be72a478ddeb862bc16672e8680",{"version":"4ace0a30a70fe5963442d75ea6e69f525671ae76f6e57ab7556c44839b4237e8","affectsGlobalScope":true},{"version":"a6f03dbf03c001fb3ac1c9bea6dde049dfff27ef8886cc4a886374aacf2e997d","affectsGlobalScope":true},"66bfb3de947abf4b117ee849c245425dbe494d6903e28f9ded566e91c9d05d77","c28d4f58131b93d60e087b86148d4e0c9d9b5c49c23ff1a9d1a9594fdedd5d08","c6b5d7f259544c91024ecf2b17138574a3f6ff2476468fafd7f957d2b68d6d98",{"version":"1ec27c4b695590464113276d174f873e260e468ef226b7dc18f9193875fa559d","affectsGlobalScope":true},"33da4ee2ab9fdd9ef8b3fc526d871ce02ae8c825283f5695e7cad507c087b97c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"71709584ed5ed7d236dc225441ec4634ffc6c718853e04b9c27b9ea121459044"],"root":[[47,54]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./dist","rootDir":"./src","sourceMap":true,"strict":true,"target":5},"fileIdsList":[[101],[55,101],[58,101],[59,64,92,101],[60,71,72,79,89,100,101],[60,61,71,79,101],[62,101],[63,64,72,80,101],[64,89,97,101],[65,67,71,79,101],[66,101],[67,68,101],[71,101],[69,71,101],[71,72,73,89,100,101],[71,72,73,86,89,92,101],[101,105],[67,71,74,79,89,100,101],[71,72,74,75,79,89,97,100,101],[74,76,89,97,100,101],[55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107],[71,77,101],[78,100,101],[67,71,79,89,101],[80,101],[81,101],[58,82,101],[83,99,101,105],[84,101],[85,101],[71,86,87,101],[86,88,101,103],[59,71,89,90,91,92,101],[59,89,91,101],[89,90,101],[92,101],[93,101],[89,101],[71,95,96,101],[95,96,101],[64,79,89,97,101],[98,101],[79,99,101],[59,74,85,100,101],[64,101],[89,101,102],[101,103],[101,104],[59,64,71,73,82,89,100,101,103,105],[89,101,106],[45,47,48,49,50,101],[45,46,49,101],[45,46,47,101],[45,46,48,101],[45,46,101],[45,52,53,101],[45,101],[47,48,49,50],[46,49],[46],[46,48]],"referencedMap":[[46,1],[55,2],[56,2],[58,3],[59,4],[60,5],[61,6],[62,7],[63,8],[64,9],[65,10],[66,11],[67,12],[68,12],[70,13],[69,14],[71,13],[72,15],[73,16],[57,17],[107,1],[74,18],[75,19],[76,20],[108,21],[77,22],[78,23],[79,24],[80,25],[81,26],[82,27],[83,28],[84,29],[85,30],[86,31],[87,31],[88,32],[89,33],[91,34],[90,35],[92,36],[93,37],[94,38],[95,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[106,50],[45,1],[43,1],[44,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[33,1],[30,1],[31,1],[32,1],[34,1],[7,1],[35,1],[40,1],[41,1],[36,1],[37,1],[38,1],[39,1],[1,1],[42,1],[51,51],[50,52],[48,53],[47,54],[49,55],[54,56],[52,57],[53,57]],"exportedModulesMap":[[46,1],[55,2],[56,2],[58,3],[59,4],[60,5],[61,6],[62,7],[63,8],[64,9],[65,10],[66,11],[67,12],[68,12],[70,13],[69,14],[71,13],[72,15],[73,16],[57,17],[107,1],[74,18],[75,19],[76,20],[108,21],[77,22],[78,23],[79,24],[80,25],[81,26],[82,27],[83,28],[84,29],[85,30],[86,31],[87,31],[88,32],[89,33],[91,34],[90,35],[92,36],[93,37],[94,38],[95,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[106,50],[45,1],[43,1],[44,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[33,1],[30,1],[31,1],[32,1],[34,1],[7,1],[35,1],[40,1],[41,1],[36,1],[37,1],[38,1],[39,1],[1,1],[42,1],[51,58],[50,59],[48,60],[47,61],[49,60]],"semanticDiagnosticsPerFile":[46,55,56,58,59,60,61,62,63,64,65,66,67,68,70,69,71,72,73,57,107,74,75,76,108,77,78,79,80,81,82,83,84,85,86,87,88,89,91,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,45,43,44,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,51,50,48,47,49,54,52,53]},"version":"5.0.4"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@hatiolab/things-scene/things-scene.d.ts","./src/tab-container.ts","./src/tab-card.ts","./src/tab.ts","./src/tab-button.ts","./src/index.ts","./src/templates/tab-container.ts","./src/templates/tab.ts","./src/templates/index.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"f1c9fe42b65437a61104e601eb298c5c859fb522b483f1bdb700eed67a16f980","1ec425c4c916d3a75b0557409a967eb5fee869beb69eefc2fbbf563f92bda771",{"version":"4571a00fec3b083008be5189a7d356ddfcaeb71f9ed2651e69903c474bcc0eb1","signature":"4272b1b18af2ee717d5ee74400c801837c5a9ac2509d792c177827fd6d7c563a"},{"version":"61b8b1a87df8810b18d96e5540ce18140708b6ff9bcd6e0a41da5b01834dd77f","signature":"903336d4b0a83371879de11f43ac82d819d200198638bc27d1c5324575863569"},{"version":"f9cbe326263feed1697d42ee8681ead51dbacf9d3f4ac63833beef77859497fb","signature":"27a25d465931c2bc8ac0804f396fb5019f4bc1062cd124944ab0a665010f5ee2"},{"version":"43764e902042ce56678cfdf9b932aae1e51d50c1c68fa2c536f20882b0f0cd9b","signature":"1e29443446bc89c0d939030c3c55e8476a81f64da3fa633f108370bb9ef56f39"},{"version":"0f300668d702080921c78d3c4edd493925de582dce2a50c0993ac4b8c62bb7d4","signature":"88132cd35f670e57b6d85e802f4453aff313270908886369da0561fbc599c354"},{"version":"b668e19c84a1d923f78e4def083d7eb2cb0cc7b834d38e130be5a60f33d2a41f","signature":"ce7354820bf2fb9fad3221a704dbede20b61e9f30f384128b3be81f685c63a08"},{"version":"9958af937b59735fadadb4cac852bdde6aea78bfcf803deecc2f63a2f3127918","signature":"b21130ee402d2f055d24259958864b717e89897989b3663d6fe8fafbf692dd7f"},{"version":"66603f5a0bd2d7052120523791e8edb77078229aaf5314522886798ce92151bb","signature":"05890472fb38b7b901355c9294924f1da43644a9150fe916eab7b020d77aadb6"},"587f13f1e8157bd8cec0adda0de4ef558bb8573daa9d518d1e2af38e87ecc91f","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"bce910d9164785c9f0d4dcea4be359f5f92130c7c7833dea6138ab1db310a1f9","affectsGlobalScope":true},"7a435e0c814f58f23e9a0979045ec0ef5909aac95a70986e8bcce30c27dff228",{"version":"241a2e19e03fd1d884e0f304429378d05bc2c1b26b5693c84868f7ad0674982d","affectsGlobalScope":true},"db71be322f07f769200108aa19b79a75dd19a187c9dca2a30c4537b233aa2863","0b70ce7a20fa21c7201a5a972b7f2288cb90ace8a2dde9f3344b5dfc6504abaf",{"version":"49479e21a040c0177d1b1bc05a124c0383df7a08a0726ad4d9457619642e875a","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","3fd0f1af75fb7abe0ea376aa71541daaf489f3d87c394b1165db684ea44b48be","3690133deae19c8127c5505fcb67b04bdc9eb053796008538a9b9abbb70d85aa","5b1c0a23f464f894e7c2b2b6c56df7b9afa60ed48c5345f8618d389a636b2108","be2b092f2765222757c6441b86c53a5ea8dfed47bbc43eab4c5fe37942c866b3","8e6b05abc98adba15e1ac78e137c64576c74002e301d682e66feb77a23907ab8","1ca735bb3d407b2af4fbee7665f3a0a83be52168c728cc209755060ba7ed67bd",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"b85c02e14ecb2a873dad5a1de72319b265160ba48f1b83661aeb3bba1366c1bc","affectsGlobalScope":true},"48a9a4c1c8d3df1e2a243ca91213b246aa0199aaedeff2baf480fcda85abd5b6","404c251593761ec3a964b0d15fd4d717fb0e2f98fef8941a7216f1dc81c3ddb3","55709608060f77965c270ac10ac646286589f1bd1cb174fff1778a2dd9a7ef31","790623a47c5eda62910098884ecb154dc0e5f3a23fc36c1bfb3b5b9ed44e2c2d","42b40e40f2a358cda332456214fad311e1806a6abf3cebaaac72496e07556642","354612fe1d49ecc9551ea3a27d94eef2887b64ef4a71f72ca444efe0f2f0ba80",{"version":"125af9d85cb9d5e508353f10a8d52f01652d2d48b2cea54789a33e5b4d289c1c","affectsGlobalScope":true},"6a325d4c96569bdd5a9a59f819a672e2d5644ee6cf98ab910e0064402557af8d","5e2b91328a540a0933ab5c2203f4358918e6f0fe7505d22840a891a6117735f1","3abc3512fa04aa0230f59ea1019311fd8667bd935d28306311dccc8b17e79d5d",{"version":"14a50dafe3f45713f7f27cb6320dff07c6ac31678f07959c2134260061bf91ff","affectsGlobalScope":true},{"version":"5761c90b0cabdd6bd1f5fb1c3bf942088fdd39e18ed35dbe39b0c34bc733bf13","affectsGlobalScope":true},"1349077576abb41f0e9c78ec30762ff75b710208aff77f5fdcc6a8c8ce6289dd","e2ce82603102b5c0563f59fb40314cc1ff95a4d521a66ad14146e130ea80d89c","a3e0395220255a350aa9c6d56f882bfcb5b85c19fddf5419ec822cf22246a26d","c27b01e8ddff5cd280711af5e13aecd9a3228d1c256ea797dd64f8fdec5f7df5","898840e876dfd21843db9f2aa6ae38ba2eab550eb780ff62b894b9fbfebfae6b","0cab4d7d4edc40cd3af9eea7c3ed6d1016910c0954c49c4297e479bf3822a625","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","785e5be57d4f20f290a20e7b0c6263f6c57fd6e51283050756cef07d6d651c68","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","164deb2409ac5f4da3cd139dbcee7f7d66753d90363a4d7e2db8d8874f272270","1fb6c5ec52332a8b531a8d7a5300ac9301f98c4fe62f68e744e0841ccba65e7e",{"version":"ab294c4b7279318ee2a8fdf681305457ecc05970c94108d304933f18823eeac1","affectsGlobalScope":true},"ad08154d9602429522cac965a715fde27d421d69b24756c5d291877dda75353e","bbda6ea452a2386093a1eda18a6e26a989e98869f1b9f37e46f510a986d2e740","812b25f798033c202baedf386a1ccc41f9191b122f089bffd10fdccce99fba11","244cdeb8c344eb42e6142cbb0727752b9b735443fba7007c11b14ca06ebed97c",{"version":"75dd741ca6a6c8d2437a6ca8349b64b816421dbf9fe82dd026afaba965576962","affectsGlobalScope":true},{"version":"8799401a7ab57764f0d464513a7fa7c72e1d70a226b172ec60fff534ea94d108","affectsGlobalScope":true},"2ce2210032ccaff7710e2abf6a722e62c54960458e73e356b6a365c93ab6ca66","92db194ef7d208d5e4b6242a3434573fd142a621ff996d84cc9dbba3553277d0","69f5747ad0887c24c76858ed458712101771349f2287e21871fcd1562daa7dc0",{"version":"0bd9543cd8fc0959c76fb8f4f5a26626c2ed62ef4be98fd857bce268066db0a2","affectsGlobalScope":true},"1ca6858a0cbcd74d7db72d7b14c5360a928d1d16748a55ecfa6bfaff8b83071b",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"220717df86539e219f619d31965d177e7235185e4bc6f6e6ed7e11a9b004d5ca"],"root":[[47,54]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./dist","rootDir":"./src","sourceMap":true,"strict":true,"target":5},"fileIdsList":[[101],[55,101],[58,101],[59,64,92,101],[60,71,72,79,89,100,101],[60,61,71,79,101],[62,101],[63,64,72,80,101],[64,89,97,101],[65,67,71,79,101],[66,101],[67,68,101],[71,101],[69,71,101],[71,72,73,89,100,101],[71,72,73,86,89,92,101],[101,105],[67,71,74,79,89,100,101],[71,72,74,75,79,89,97,100,101],[74,76,89,97,100,101],[55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107],[71,77,101],[78,100,101],[67,71,79,89,101],[80,101],[81,101],[58,82,101],[83,99,101,105],[84,101],[85,101],[71,86,87,101],[86,88,101,103],[59,71,89,90,91,92,101],[59,89,91,101],[89,90,101],[92,101],[93,101],[89,101],[71,95,96,101],[95,96,101],[64,79,89,97,101],[98,101],[79,99,101],[59,74,85,100,101],[64,101],[89,101,102],[101,103],[101,104],[59,64,71,73,82,89,100,101,103,105],[89,101,106],[45,47,48,49,50,101],[45,46,49,101],[45,46,47,101],[45,46,48,101],[45,46,101],[45,52,53,101],[45,101],[47,48,49,50],[46,49],[46],[46,48]],"referencedMap":[[46,1],[55,2],[56,2],[58,3],[59,4],[60,5],[61,6],[62,7],[63,8],[64,9],[65,10],[66,11],[67,12],[68,12],[70,13],[69,14],[71,13],[72,15],[73,16],[57,17],[107,1],[74,18],[75,19],[76,20],[108,21],[77,22],[78,23],[79,24],[80,25],[81,26],[82,27],[83,28],[84,29],[85,30],[86,31],[87,31],[88,32],[89,33],[91,34],[90,35],[92,36],[93,37],[94,38],[95,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[106,50],[45,1],[43,1],[44,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[33,1],[30,1],[31,1],[32,1],[34,1],[7,1],[35,1],[40,1],[41,1],[36,1],[37,1],[38,1],[39,1],[1,1],[42,1],[51,51],[50,52],[48,53],[47,54],[49,55],[54,56],[52,57],[53,57]],"exportedModulesMap":[[46,1],[55,2],[56,2],[58,3],[59,4],[60,5],[61,6],[62,7],[63,8],[64,9],[65,10],[66,11],[67,12],[68,12],[70,13],[69,14],[71,13],[72,15],[73,16],[57,17],[107,1],[74,18],[75,19],[76,20],[108,21],[77,22],[78,23],[79,24],[80,25],[81,26],[82,27],[83,28],[84,29],[85,30],[86,31],[87,31],[88,32],[89,33],[91,34],[90,35],[92,36],[93,37],[94,38],[95,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[106,50],[45,1],[43,1],[44,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[33,1],[30,1],[31,1],[32,1],[34,1],[7,1],[35,1],[40,1],[41,1],[36,1],[37,1],[38,1],[39,1],[1,1],[42,1],[51,58],[50,59],[48,60],[47,61],[49,60]],"semanticDiagnosticsPerFile":[46,55,56,58,59,60,61,62,63,64,65,66,67,68,70,69,71,72,73,57,107,74,75,76,108,77,78,79,80,81,82,83,84,85,86,87,88,89,91,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,45,43,44,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,51,50,48,47,49,54,52,53]},"version":"5.0.4"}